From 24486ffc2e73a5efb4995e37b996d0fa165249c7 Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Thu, 16 Mar 2017 10:40:34 +0100 Subject: [PATCH 01/30] Initial commit. --- bin/build.js | 55 +++ build-config.js | 18 + build/ckeditor.es6.js | 740 ++++++++++++++++++++++++++++++++++++++ build/ckeditor.es6.js.map | 1 + build/ckeditor.js | 233 ++++++++++++ build/ckeditor.js.map | 1 + ckeditor.js | 19 + dev/webpackConfig.js | 31 ++ dev/webpackEs6Config.js | 52 +++ package.json | 20 ++ 10 files changed, 1170 insertions(+) create mode 100755 bin/build.js create mode 100644 build-config.js create mode 100644 build/ckeditor.es6.js create mode 100644 build/ckeditor.es6.js.map create mode 100644 build/ckeditor.js create mode 100644 build/ckeditor.js.map create mode 100644 ckeditor.js create mode 100644 dev/webpackConfig.js create mode 100644 dev/webpackEs6Config.js create mode 100644 package.json diff --git a/bin/build.js b/bin/build.js new file mode 100755 index 0000000000..9855be31a8 --- /dev/null +++ b/bin/build.js @@ -0,0 +1,55 @@ +#!/usr/bin/env node + +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const webpack = require( 'webpack' ); +const tasks = require( '@ckeditor/ckeditor5-dev-bundler-rollup' ); + +const config = require( '../build-config' ); +const getWebpackEs6Config = require( '../dev/webpackEs6Config' ); +const getWebpackConfig = require( '../dev/webpackConfig' ); + +console.log( 'Creating an entry file...' ); + +tasks.createEntryFile( '.', { + plugins: config.plugins, + moduleName: config.moduleName, + editor: config.editor, + config: config.editorConfig, +} ); + +const webpackEs6Config = getWebpackEs6Config( config.destinationPath, config.moduleName ); +const webpackConfig = getWebpackConfig( config.destinationPath, config.moduleName ); + +Promise.all( [ + runWebpack( webpackEs6Config, 'ES6' ), + runWebpack( webpackConfig, 'ES5' ), + ] ) + .then( () => { + + } ) + .catch( ( err ) => { + process.exitCode = -1; + + console.log( err ); + } ); + +function runWebpack( webpackConfig, label ) { + console.log( `Creating an ${ label } build...` ); + + return new Promise( ( resolve, reject ) => { + webpack( webpackConfig, ( err ) => { + if ( err ) { + return reject( err ); + } + + console.log( `The ${ label } build has been created.` ); + return resolve(); + } ); + } ); +} diff --git a/build-config.js b/build-config.js new file mode 100644 index 0000000000..7a09bdc248 --- /dev/null +++ b/build-config.js @@ -0,0 +1,18 @@ +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +module.exports = { + destinationPath: './build/', + editor: '@ckeditor/ckeditor5-editor-classic/src/classic', + plugins: [ + '@ckeditor/ckeditor5-presets/src/article' + ], + moduleName: 'ClassicEditor', + editorConfig: { + toolbar: [ 'image', 'headings' ] + } +}; diff --git a/build/ckeditor.es6.js b/build/ckeditor.es6.js new file mode 100644 index 0000000000..155d4c0d3f --- /dev/null +++ b/build/ckeditor.es6.js @@ -0,0 +1,740 @@ +var _NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor=Math.floor,_Mathmax=Math.max,_Mathmin=Math.min;(function(r,s){'object'==typeof exports&&'object'==typeof module?module.exports=s():'function'==typeof define&&define.amd?define([],s):'object'==typeof exports?exports.ClassicEditor=s():r.ClassicEditor=s()})(this,function(){return function(o){function r(d){if(s[d])return s[d].exports;var u=s[d]={i:d,l:!1,exports:{}};return o[d].call(u.exports,u,u.exports,r),u.l=!0,u.exports}var s={};return r.m=o,r.c=s,r.i=function(d){return d},r.d=function(d,u,f){r.o(d,u)||Object.defineProperty(d,u,{configurable:!1,enumerable:!0,get:f})},r.n=function(d){var u=d&&d.__esModule?function(){return d['default']}:function(){return d};return r.d(u,'a',u),u},r.o=function(d,u){return Object.prototype.hasOwnProperty.call(d,u)},r.p='',r(r.s=525)}([function(o,r){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class d extends Error{constructor(u,f){f&&(u+=' '+JSON.stringify(f)),super(u),this.name='CKEditorError',this.data=f}static isCKEditorError(u){return u instanceof d}}r.a=d},function(o,r,s){'use strict';var d=s(33),u=s(18),f=s(51),h=s(0),w=s(24);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C{constructor(T,P){if(!T.is('element')&&!T.is('documentFragment'))throw new h.a('model-position-root-invalid: Position root invalid.');if(!(P instanceof Array)||0===P.length)throw new h.a('model-position-path-incorrect: Position path must be an Array with at least one item.',{path:P});P=T.getPath().concat(P),T=T.root,this.root=T,this.path=P}get offset(){return s.i(u.a)(this.path)}set offset(T){this.path[this.path.length-1]=T}get parent(){let T=this.root;for(let P=0;PS?0:S,P}isAfter(T){return'after'==this.compareWith(T)}isBefore(T){return'before'==this.compareWith(T)}isEqual(T){return'same'==this.compareWith(T)}isTouching(T){let P=null,S=null,E=this.compareWith(T);switch(E){case'same':return!0;case'before':P=C.createFromPosition(this),S=C.createFromPosition(T);break;case'after':P=C.createFromPosition(T),S=C.createFromPosition(this);break;default:return!1;}for(let O=P.parent;P.path.length+S.path.length;){if(P.isEqual(S))return!0;if(P.path.length>S.path.length){if(P.offset!==O.maxOffset)return!1;P.path=P.path.slice(0,-1),O=O.parent,P.offset++}else{if(0!==S.offset)return!1;S.path=S.path.slice(0,-1)}}}_getTransformedByDeletion(T,P){let S=C.createFromPosition(this);if(this.root!=T.root)return S;if('same'==s.i(f.a)(T.getParentPath(),this.getParentPath())){if(T.offsetthis.offset)return null;S.offset-=P}}else if('prefix'==s.i(f.a)(T.getParentPath(),this.getParentPath())){const E=T.path.length-1;if(T.offset<=this.path[E]){if(T.offset+P>this.path[E])return null;S.path[E]-=P}}return S}_getTransformedByInsertion(T,P,S){let E=C.createFromPosition(this);if(this.root!=T.root)return E;if('same'==s.i(f.a)(T.getParentPath(),this.getParentPath()))(T.offsetC+1;){let S=P.maxOffset-T.offset;0!=S&&w.push(new h(T,T.getShiftedBy(S))),T.path=T.path.slice(0,-1),T.offset++,P=P.parent}for(;T.path.length<=this.end.path.length;){let S=this.end.path[T.path.length-1],E=S-T.offset;0!=E&&w.push(new h(T,T.getShiftedBy(E))),T.offset=S,T.path.push(0)}return w}getWalker(w={}){return w.boundaries=this,new u.a(w)}*getItems(w={}){w.boundaries=this,w.ignoreElementEnd=!0;const C=new u.a(w);for(let T of C)yield T.item}*getPositions(w={}){w.boundaries=this;const C=new u.a(w);yield C.position;for(let T of C)yield T.nextPosition}getTransformedByDelta(w){let C=[h.createFromRange(this)];const T=new Set(['insert','move','remove','reinsert']);for(let P of w.operations)if(T.has(P.type))for(let S=0;SS.start.isAfter(E.start));const T=w.indexOf(C),P=new this(C.start,C.end);for(let S=T-1;0<=S&&w[S].end.isEqual(P.start);S++)P.start=d.a.createFromPosition(w[S].start);for(let S=T+1;S{Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h)).forEach((w)=>{if(!(w in u.prototype)){const C=Object.getOwnPropertyDescriptor(h,w);C.enumerable=!1,Object.defineProperty(u.prototype,w,C)}})})}},function(o,r,s){'use strict';function d(T){return'string'==typeof T?[new h.a(T)]:(s.i(w.a)(T)||(T=[T]),Array.from(T).map((P)=>'string'==typeof P?new h.a(P):P))}var u=s(58),f=s(69),h=s(24),w=s(41);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends u.a{constructor(T,P,S){super(P),this.name=T,this._children=new f.a,S&&this.insertChildren(0,S)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(T,P=null){return P?'element'==T&&P==this.name:'element'==T||T==this.name}getChild(T){return this._children.getNode(T)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(T){return this._children.getNodeIndex(T)}getChildStartOffset(T){return this._children.getNodeStartOffset(T)}clone(T=!1){const P=T?Array.from(this._children).map((S)=>S.clone()):Array.from(this._children);return new C(this.name,this.getAttributes(),P)}offsetToIndex(T){return this._children.offsetToIndex(T)}appendChildren(T){this.insertChildren(this.childCount,T)}insertChildren(T,P){P=d(P);for(let S of P)S.parent=this;this._children.insertNodes(T,P)}removeChildren(T,P=1){const S=this._children.removeNodes(T,P);for(let E of S)E.parent=null;return S}getNodeByPath(T){let P=this;for(const S of T)P=P.getChild(S);return P}toJSON(){let T=super.toJSON();if(T.name=this.name,0{return re instanceof te?re.getValue(ie):re})}function f(oe,ie,{node:re}){let se=u(oe,re);se=1==oe.length&&oe[0]instanceof ne?se[0]:se.reduce(F,''),L(se)?ie.remove():ie.set(se)}function h(oe){return{set(ie){oe.textContent=ie},remove(){oe.textContent=''}}}function w(oe,ie,re){return{set(se){oe.setAttributeNS(re,ie,se)},remove(){oe.removeAttributeNS(re,ie)}}}function C(oe,ie){return{set(re){oe.style[ie]=re},remove(){oe.style[ie]=null}}}function T(oe){const ie=s.i(J.a)(oe,(re)=>{if(re&&(re instanceof te||D(re)||I(re)||q(re)))return re});return ie}function P(oe){if('string'==typeof oe?oe=O(oe):oe.text&&V(oe),oe.on&&(oe.eventListeners=E(oe.on),delete oe.on),!oe.text){oe.attributes&&S(oe.attributes);const ie=new W.a;if(oe.children)if(q(oe.children))ie.add(oe.children);else for(let re of oe.children)D(re)||I(re)?ie.add(re):ie.add(new ee(re));oe.children=ie}return oe}function S(oe){for(let ie in oe)oe[ie].value&&(oe[ie].value=[].concat(oe[ie].value)),R(oe,ie)}function E(oe){for(let ie in oe)R(oe,ie);return oe}function O(oe){return{text:[oe]}}function V(oe){Array.isArray(oe.text)||(oe.text=[oe.text])}function R(oe,ie){Array.isArray(oe[ie])||(oe[ie]=[oe[ie]])}function F(oe,ie){return L(ie)?oe:L(oe)?ie:`${oe} ${ie}`}function N(oe,ie){for(let re in ie)oe[re]?oe[re].push(...ie[re]):oe[re]=ie[re]}function M(oe,ie){if(ie.attributes&&(!oe.attributes&&(oe.attributes={}),N(oe.attributes,ie.attributes)),ie.eventListeners&&(!oe.eventListeners&&(oe.eventListeners={}),N(oe.eventListeners,ie.eventListeners)),ie.text&&oe.text.push(...ie.text),ie.children&&ie.children.length){if(oe.children.length!=ie.children.length)throw new K.a('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let re=0;for(let se of ie.children)M(oe.children.get(re++),se)}}function L(oe){return!oe&&0!==oe}function I(oe){return oe instanceof Z.a}function D(oe){return oe instanceof ee}function q(oe){return oe instanceof G.a}function z(){return{children:[],bindings:[],attributes:{}}}function $(oe){return'class'==oe||'style'==oe}var K=s(0),H=s(4),U=s(7),W=s(78),Z=s(9),G=s(118),J=s(503),Y=s(14),X=s(57);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class ee{constructor(oe){Object.assign(this,P(T(oe))),this._isRendered=!1,this._revertData=null}render(){const oe=this._renderNode({intoFragment:!0});return this._isRendered=!0,oe}apply(oe){return this._revertData=z(),this._renderNode({node:oe,isApplying:!0,revertData:this._revertData}),oe}revert(oe){if(!this._revertData)throw new K.a('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');this._revertTemplateFromNode(oe,this._revertData)}static bind(oe,ie){return{to(re,se){return new ae({eventNameOrFunction:re,attribute:re,observable:oe,emitter:ie,callback:se})},if(re,se,le){return new ne({observable:oe,emitter:ie,attribute:re,valueIfTrue:se,callback:le})}}}static extend(oe,ie){oe._isRendered&&X.a.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),M(oe,P(T(ie)))}_renderNode(oe){let ie;if(ie=oe.node?this.tag&&this.text:this.tag?this.text:!this.text,ie)throw new K.a('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering new Node.');return this.text?this._renderText(oe):this._renderElement(oe)}_renderElement(oe){let ie=oe.node;return ie||(ie=oe.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(oe),this._renderElementChildren(oe),this._setUpListeners(oe),ie}_renderText(oe){let ie=oe.node;return ie?oe.revertData.text=ie.textContent:ie=oe.node=document.createTextNode(''),d(this.text)?this._bindToObservable({schema:this.text,updater:h(ie),data:oe}):ie.textContent=this.text.join(''),ie}_renderAttributes(oe){let ie,re,se,le;if(this.attributes){const de=oe.node,ce=oe.revertData;for(ie in this.attributes)if(se=de.getAttribute(ie),re=this.attributes[ie],ce&&(ce.attributes[ie]=se),le=s.i(Y.a)(re[0])&&re[0].ns?re[0].ns:null,d(re)){const ue=le?re[0].value:re;ce&&$(ie)&&ue.unshift(se),this._bindToObservable({schema:ue,updater:w(de,ie,le),data:oe})}else'style'==ie&&'string'!=typeof re[0]?this._renderStyleAttribute(re[0],oe):(ce&&se&&$(ie)&&re.unshift(se),re=re.map((ue)=>ue?ue.value||ue:ue).reduce((ue,me)=>ue.concat(me),[]).reduce(F,''),L(re)||de.setAttributeNS(le,ie,re))}}_renderStyleAttribute(oe,ie){const re=ie.node;for(let se in oe){const le=oe[se];d(le)?this._bindToObservable({schema:[le],updater:C(re,se),data:ie}):re.style[se]=le}}_renderElementChildren(oe){const ie=oe.node,re=oe.intoFragment?document.createDocumentFragment():ie,se=oe.isApplying;let le=0;for(let de of this.children)if(q(de)){if(!se){de.setParent(ie);for(let ce of de)re.appendChild(ce.element)}}else if(I(de))se||re.appendChild(de.element);else if(se){const ce=oe.revertData,ue=z();ce.children.push(ue),de._renderNode({node:re.childNodes[le++],isApplying:!0,revertData:ue})}else re.appendChild(de.render());oe.intoFragment&&ie.appendChild(re)}_setUpListeners(oe){if(this.eventListeners)for(let ie in this.eventListeners){const re=this.eventListeners[ie].map((se)=>{const[le,de]=ie.split('@');return se.activateDomEventListener(le,de,oe)});oe.revertData&&oe.revertData.bindings.push(re)}}_bindToObservable({schema:oe,updater:ie,data:re}){const se=re.revertData;f(oe,ie,re);const le=oe.filter((de)=>!L(de)).filter((de)=>de.observable).map((de)=>de.activateAttributeListener(oe,ie,re));se&&se.bindings.push(le)}_revertTemplateFromNode(oe,ie){for(let re of ie.bindings)for(let se of re)se();if(ie.text)return void(oe.textContent=ie.text);for(let re in ie.attributes){const se=ie.attributes[re];null===se?oe.removeAttribute(re):oe.setAttribute(re,se)}for(let re=0;ref(oe,ie,re);return this.emitter.listenTo(this.observable,'change:'+this.attribute,se),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,se)}}}class ae extends te{activateDomEventListener(oe,ie,re){const se=(le,de)=>{(!ie||de.target.matches(ie))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(de):this.observable.fire(this.eventNameOrFunction,de))};return this.emitter.listenTo(re.node,oe,se),()=>{this.emitter.stopListening(re.node,oe,se)}}}class ne extends te{getValue(oe){const ie=super.getValue(oe);return!L(ie)&&(this.valueIfTrue||!0)}}},function(o,r,s){'use strict';function u(M,L){M[F]||(M[F]=L||s.i(O.a)())}function f(M){return M[F]}function h(M){return M._events||Object.defineProperty(M,'_events',{value:{}}),M._events}function w(){return{callbacks:[],childEvents:[]}}function C(M,L){const I=h(M);if(I[L])return;let D=L,q=null;const z=[];for(;''!==D&&!I[D];)I[D]=w(),z.push(I[D]),q&&I[D].childEvents.push(q),q=D,D=D.substr(0,D.lastIndexOf(':'));if(''!==D){for(let $ of z)$.callbacks=I[D].callbacks.slice();I[D].childEvents.push(q)}}function T(M,L){const I=h(M)[L];if(!I)return[];let D=[I.callbacks];for(let q=0,z;q{this._delegations||(this._delegations=new Map);for(let D of M){let q=this._delegations.get(D);q?q.set(L,I):this._delegations.set(D,new Map([[L,I]]))}}}},stopDelegating(M,L){if(this._delegations)if(!M)this._delegations.clear();else if(!L)this._delegations.delete(M);else{const I=this._delegations.get(M);I&&I.delete(L)}}};r.a=N},function(o,r,s){'use strict';var u=s(191),f=s(15),w=_Mathmax;r.a=function(C,T){if('function'!=typeof C)throw new TypeError('Expected a function');return T=w(void 0===T?C.length-1:s.i(f.a)(T),0),function(){for(var P=arguments,S=-1,E=w(P.length-T,0),O=Array(E);++S{V.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=f.a.bind(this,this)}createCollection(){const E=new u.a;return this._viewCollections.add(E),E}addChildren(E){s.i(P.a)(E)||(E=[E]);for(let O of E)this._unboundChildren.add(O)}init(){if(this.ready)throw new d.a('ui-view-init-reinit: This View has already been initialized.');return Promise.resolve().then(()=>{return Promise.all(this._viewCollections.map((E)=>E.init()))}).then(()=>{this.ready=!0})}destroy(){this.stopListening();const E=this._viewCollections.map((O)=>O.destroy());return this._unboundChildren.clear(),this._viewCollections.clear(),this.element=this.template=this.locale=this.t=this._viewCollections=this._unboundChildren=null,Promise.all(E)}_addTemplateChildren(){const E=(O)=>{if(O.children)for(let V of O.children)V instanceof S?this.addChildren(V):E(V)};E(this.template)}}r.a=S,s.i(T.a)(S,h.a),s.i(T.a)(S,w.a)},function(o,r,s){'use strict';var u=s(443),f=s(444),h=s(225),w=s(11),C=s(514);r.a=function(T){return'function'==typeof T?T:null==T?h.a:'object'==typeof T?s.i(w.a)(T)?s.i(f.a)(T[0],T[1]):s.i(u.a)(T):s.i(C.a)(T)}},function(o,r){'use strict';var d=Array.isArray;r.a=d},function(o,r,s){'use strict';function d(w,C){C.isEnabled=!1}var u=s(31),f=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h{constructor(w){this.editor=w,this.set('isEnabled',!0),this._checkEnabled&&this.on('refreshState',(C,T)=>{T.isEnabled=this._checkEnabled()})}destroy(){this.stopListening()}refreshState(){const w={isEnabled:!0};this.fire('refreshState',w),this.isEnabled=w.isEnabled}_execute(w){this.isEnabled&&this._doExecute(w)}_disable(){this.on('refreshState',d),this.refreshState()}_enable(){this.off('refreshState',d),this.refreshState()}_doExecute(){}}r.a=h,s.i(f.a)(h,u.a)},function(o,r,s){'use strict';var u=s(95),f=s(43);r.a=function(h){return s.i(f.a)(h)&&s.i(u.a)(h)}},function(o,r){'use strict';r.a=function(u){var f=typeof u;return!!u&&('object'==f||'function'==f)}},function(o,r,s){'use strict';var u=s(516);r.a=function(f){var h=s.i(u.a)(f),w=h%1;return h===h?w?h-w:h:0}},function(o,r,s){'use strict';var u=s(0);r.b=function(h,w){if(f.prototype[h])throw new u.a('model-batch-register-taken: This batch method name is already taken.',{name:h});f.prototype[h]=w};/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f{constructor(h,w='default'){this.document=h,this.deltas=[],this.type=w}get baseVersion(){return 0K+H.offsetSize,0),z=I.parent;P(I);const $=I.index;return z.insertChildren($,D),T(z,$+D.length),T(z,$),new R.a(I,I.getShiftedBy(q))},remove:u,move:function(I,D){if(!I.isFlat)throw new M.a('model-writer-move-range-not-flat: Trying to move a range that starts and ends in different element.');const q=this.remove(I);return D=D._getTransformedByDeletion(I.start,I.end.offset-I.start.offset),this.insert(D,q)},setAttribute:function(I,D,q){P(I.start),P(I.end);for(let z of I.getItems()){let $=z.is('textProxy')?z.textNode:z;null===q?$.removeAttribute(D):$.setAttribute(D,q),T($.parent,$.index)}T(I.end.parent,I.end.index)},removeAttribute:function(I,D){this.setAttribute(I,D,null)},normalizeNodes:C}},function(o,r,s){'use strict';function d(O,V){const R=/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g;let F;for(O.clear();null!==(F=R.exec(V));)O.set(F[1],F[2].trim())}function u(O,V){const R=V.split(/\s+/);O.clear(),R.forEach((F)=>O.add(F))}function f(O){return'string'==typeof O?[new w.a(O)]:(s.i(T.a)(O)||(O=[O]),Array.from(O).map((V)=>'string'==typeof V?new w.a(V):V))}var h=s(74),w=s(29),C=s(270),T=s(41),P=s(97),S=s(166);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class E extends h.a{constructor(O,V,R){if(super(),this.name=O,this._attrs=s.i(P.a)(V)?s.i(C.a)(V):new Map(V),this._children=[],R&&this.insertChildren(0,R),this._classes=new Set,this._attrs.has('class')){const F=this._attrs.get('class');u(this._classes,F),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(d(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(O,V=null){return V?'element'==O&&V==this.name:'element'==O||O==this.name}clone(O){const V=[];if(O)for(let F of this.getChildren())V.push(F.clone(O));const R=new this.constructor(this.name,this._attrs,V);return R._classes=new Set(this._classes),R._styles=new Map(this._styles),R._customProperties=new Map(this._customProperties),R.getFillerOffset=this.getFillerOffset,R}appendChildren(O){return this.insertChildren(this.childCount,O)}getChild(O){return this._children[O]}getChildIndex(O){return this._children.indexOf(O)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0this._classes.add(V))}removeClass(...O){this._fireChange('attributes',this),O.forEach((V)=>this._classes.delete(V))}hasClass(...O){for(let V of O)if(!this._classes.has(V))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(O,V){if(this._fireChange('attributes',this),s.i(P.a)(O)){const R=Object.keys(O);for(let F of R)this._styles.set(F,O[F])}else this._styles.set(O,V)}getStyle(O){return this._styles.get(O)}getStyleNames(){return this._styles.keys()}hasStyle(...O){for(let V of O)if(!this._styles.has(V))return!1;return!0}removeStyle(...O){this._fireChange('attributes',this),O.forEach((V)=>this._styles.delete(V))}findAncestor(...O){const V=new S.a(...O);for(let R=this.parent;R;){if(V.match(R))return R;R=R.parent}return null}setCustomProperty(O,V){this._customProperties.set(O,V)}getCustomProperty(O){return this._customProperties.get(O)}removeCustomProperty(O){return this._customProperties.delete(O)}*getCustomProperties(){yield*this._customProperties.entries()}}r.a=E},function(o,r,s){'use strict';function d(S){let E;if('string'!=typeof S)E=S.keyCode+(S.altKey?P.alt:0)+(S.ctrlKey?P.ctrl:0)+(S.shiftKey?P.shift:0);else if(E=P[S.toLowerCase()],!E)throw new C.a('keyboard-unknown-key: Unknown key name.',{key:S});return E}function w(S){return S.split(/\s*\+\s*/)}var C=s(0),T=s(420);r.c=d,r.a=function(S){return'string'==typeof S&&(S=w(S)),S.map((E)=>'string'==typeof E?d(E):E).reduce((E,O)=>O+E,0)},r.b=function(S){const E=w(S);return T.a.mac&&'ctrl'==E[0].toLowerCase()?'\u2318'+(E[1]||''):S};/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const P=function(){const S={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let E=65;90>=E;E++){const O=String.fromCharCode(E);S[O.toLowerCase()]=E}for(let E=48;57>=E;E++)S[E-48]=E;for(let E=112;123>=E;E++)S['f'+(E-111)]=E;return S}();r.d=P},function(o,r,s){'use strict';function d(h,w,C,T,P){var S=-1,E=h.length;for(C||(C=f.a),P||(P=[]);++SP?0:P,T}getLastMatchingPosition(C,T={}){T.startPosition=this;const P=new d.a(T);return P.skip(C),P.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeNode:!0})}isEqual(C){return this.parent==C.parent&&this.offset==C.offset}isBefore(C){return'before'==this.compareWith(C)}isAfter(C){return'after'==this.compareWith(C)}compareWith(C){if(this.isEqual(C))return'same';if(this.parent===C.parent)return 0>this.offset-C.offset?'before':'after';const T=this.getAncestors(),P=C.getAncestors(),S=s.i(u.a)(T,P);let E;switch(S){case 0:return'different';case'prefix':E=T.length-1;break;case'extension':E=P.length-1;break;default:E=S-1;}const O=T[E],V=T[E+1],R=P[E+1];if(O===this.parent){const N=this.offset-R.index;return 0>=N?'before':'after'}if(O===C.parent){const N=V.index-C.offset;return 0>N?'before':'after'}const F=V.index-R.index;return 0>F?'before':'after'}static createAt(C,T){if(C instanceof w)return this.createFromPosition(C);let P=C;if('end'==T)T=P.is('text')?P.data.length:P.childCount;else{if('before'==T)return this.createBefore(P);if('after'==T)return this.createAfter(P);T||(T=0)}return new w(P,T)}static createAfter(C){if(C.is('textProxy'))return new w(C.textNode,C.offsetInText+C.data.length);if(!C.parent)throw new f.a('view-position-after-root: You can not make position after root.',{root:C});return new w(C.parent,C.index+1)}static createBefore(C){if(C.is('textProxy'))return new w(C.textNode,C.offsetInText);if(!C.parent)throw new f.a('view-position-before-root: You can not make position before root.',{root:C});return new w(C.parent,C.index)}static createFromPosition(C){return new this(C.parent,C.offset)}}r.a=w},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(395),h=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{constructor(C){super(C),this.set('label'),this.set('keystroke'),this.set('tooltip'),this.set('type','button'),this.set('isOn',!1),this.set('isEnabled',!0),this.set('withText',!1),this.set('icon'),this.set('tabindex',-1),this.bind('_tooltipString').to(this,'tooltip',this,'label',this,'keystroke',this._getTooltipString.bind(this));const T=this.bindTemplate;this.template=new u.a({tag:'button',attributes:{class:['ck-button',T.if('_tooltipString','ck-tooltip_s'),T.to('isEnabled',(P)=>P?'ck-enabled':'ck-disabled'),T.to('isOn',(P)=>P?'ck-on':'ck-off'),T.if('withText','ck-button_with-text')],type:T.to('type',(P)=>P?P:'button'),'data-ck-tooltip':[T.to('_tooltipString')],tabindex:T.to('tabindex')},children:[{tag:'span',attributes:{class:['ck-button__label']},children:[{text:T.to('label')}]}],on:{mousedown:T.to((P)=>{P.preventDefault()}),click:T.to((P)=>{this.isEnabled?this.fire('execute'):P.preventDefault()})}})}init(){let C=Promise.resolve();if(this.icon&&!this.iconView){const T=this.iconView=new f.a;T.bind('content').to(this,'icon'),this.element.insertBefore(T.element,this.element.firstChild),C=C.then(()=>this.addChildren(T))}return C.then(()=>super.init())}focus(){this.element.focus()}_getTooltipString(C,T,P){if(C){if('string'==typeof C)return C;if(P&&(P=s.i(h.b)(P)),C instanceof Function)return C(T,P);if(!0===C)return`${T}${P?` (${P})`:''}`}return!1}}r.a=w},function(o,r){'use strict';r.a=function(u,f){for(var h=-1,w=u.length,C=Array(w);++hP.maxOffset)throw new h.a('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(P===S&&E=E&&this.targetPosition.path[R]{if(z.attrs.length&&z.attrs.length!==q)throw new E.a('observable-bind-to-attrs-length: The number of attributes must match.');z.attrs.length||(z.attrs=this._bindAttrs)}),this._to=I.to,I.callback&&(this._bindings.get(D[0]).callback=I.callback),P(this._observable,this._to),C(this),this._bindAttrs.forEach((z)=>{T(this._observable,z)})}function f(L){return L.every((I)=>'string'==typeof I)}function h(...L){if(!L.length)throw new E.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const I={to:[]};let D;return'function'==typeof L[L.length-1]&&(I.callback=L.pop()),L.forEach((q)=>{if('string'==typeof q)D.attrs.push(q);else if('object'==typeof q)D={observable:q,attrs:[]},I.to.push(D);else throw new E.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),I}function w(L,I,D,q){const z=L[F],$=z.get(D),K=$||{};K[q]||(K[q]=new Set),K[q].add(I),$||z.set(D,K)}function C(L){let I;L._bindings.forEach((D,q)=>{L._to.forEach((z)=>{I=z.attrs[D.callback?0:L._bindAttrs.indexOf(q)],D.to.push([z.observable,I]),w(L._observable,D,z.observable,I)})})}function T(L,I){const D=L[N],q=D.get(I);let z;q.callback?z=q.callback.apply(L,q.to.map(($)=>$[0][$[1]])):(z=q.to[0],z=z[0][z[1]]),L.hasOwnProperty(I)?L[I]=z:L.set(I,z)}function P(L,I){I.forEach((D)=>{const q=L[F];let z;q.get(D.observable)||L.listenTo(D.observable,'change',($,K)=>{z=q.get(D.observable)[K],z&&z.forEach((H)=>{T(L,H.attr)})})})}var S=s(7),E=s(0),O=s(56),V=s(14);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const R=Symbol('attributes'),F=Symbol('boundObservables'),N=Symbol('boundAttributes'),M={set(L,I){if(s.i(V.a)(L))return void Object.keys(L).forEach((q)=>{this.set(q,L[q])},this);d(this);const D=this[R];if(L in this&&!D.has(L))throw new E.a('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,L,{enumerable:!0,configurable:!0,get(){return D.get(L)},set(q){const z=D.get(L);z===q&&D.has(L)||(D.set(L,q),this.fire('change:'+L,L,q,z))}}),this[L]=I},bind(...L){if(!L.length||!f(L))throw new E.a('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(L).size!==L.length)throw new E.a('observable-bind-duplicate-attrs: Attributes must be unique.');d(this);const I=this[N];L.forEach((q)=>{if(I.has(q))throw new E.a('observable-bind-rebind: Cannot bind the same attribute more that once.')});const D=new Map;return L.forEach((q)=>{const z={attr:q,to:[]};I.set(q,z),D.set(q,z)}),{to:u,_observable:this,_bindAttrs:L,_to:[],_bindings:D}},unbind(...L){if(!(R in this))return;const I=this[N],D=this[F];if(L.length){if(!f(L))throw new E.a('observable-unbind-wrong-attrs: Attributes must be strings.');L.forEach((q)=>{const z=I.get(q);let $,K,H,U;z.to.forEach((W)=>{$=W[0],K=W[1],H=D.get($),U=H[K],U.delete(z),U.size||delete H[K],Object.keys(H).length||(D.delete($),this.stopListening($,'change'))}),I.delete(q)})}else D.forEach((q,z)=>{this.stopListening(z,'change')}),D.clear(),I.clear()}};r.a=M,s.i(O.a)(M,S.a)},function(o,r,s){'use strict';var d=s(94);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u{constructor(f){this.baseVersion=f}toJSON(){const f=s.i(d.a)(this,!0);return f.__className=this.constructor.className,delete f.delta,f}static get className(){return'engine.model.operation.Operation'}static fromJSON(f){return new this(f.baseVersion)}}r.a=u},function(o,r,s){'use strict';function d(P,S,E,O,V){return{done:!1,value:{type:P,item:S,previousPosition:E,nextPosition:O,length:V}}}var u=s(24),f=s(72),h=s(5),w=s(1),C=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T{constructor(P={}){if(!P.boundaries&&!P.startPosition)throw new C.a('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const S=P.direction||'forward';if('forward'!=S&&'backward'!=S)throw new C.a('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:S});this.direction=S,this.boundaries=P.boundaries||null,this.position=P.startPosition?w.a.createFromPosition(P.startPosition):w.a.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!P.singleCharacters,this.shallow=!!P.shallow,this.ignoreElementEnd=!!P.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(P){let S,E,O,V;do O=this.position,V=this._visitedParent,({done:S,value:E}=this.next());while(!S&&P(E));S||(this.position=O,this._visitedParent=V)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const P=this.position,S=w.a.createFromPosition(this.position),E=this._visitedParent;if(null===E.parent&&S.offset===E.maxOffset)return{done:!0};if(E===this._boundaryEndParent&&S.offset==this.boundaries.end.offset)return{done:!0};const O=S.textNode?S.textNode:S.nodeAfter;if(O instanceof h.a)return this.shallow?S.offset++:(S.path.push(0),this._visitedParent=O),this.position=S,d('elementStart',O,P,S,1);if(O instanceof u.a){let V,R;if(this.singleCharacters)V=1;else{let N=O.endOffset;this._boundaryEndParent==E&&this.boundaries.end.offsetN&&(N=this.boundaries.start.offset),V=S.offset-N}R=S.offset-O.startOffset;const F=new f.a(O,R-V,V);return S.offset-=V,this.position=S,d('text',F,P,S,V)}return S.path.pop(),this.position=S,this._visitedParent=E.parent,d('elementStart',E,P,S,1)}}r.a=T},function(o,r,s){'use strict';function d(w){return w.item.is('attributeElement')||w.item.is('uiElement')}var u=s(25),f=s(76);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h{constructor(w,C=null){this.start=u.a.createFromPosition(w),this.end=C?u.a.createFromPosition(C):u.a.createFromPosition(w)}*[Symbol.iterator](){yield*new f.a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let w=this.start.getLastMatchingPosition(d,{direction:'backward'}),C=this.end.getLastMatchingPosition(d);return w.parent.is('text')&&w.isAtStart&&(w=u.a.createBefore(w.parent)),C.parent.is('text')&&C.isAtEnd&&(C=u.a.createAfter(C.parent)),new h(w,C)}getTrimmed(){let w=this.start.getLastMatchingPosition(d),C=this.end.getLastMatchingPosition(d,{direction:'backward'}),T=w.nodeAfter,P=C.nodeBefore;return T&&T.is('text')&&(w=new u.a(T,0)),P&&P.is('text')&&(C=new u.a(P,P.data.length)),new h(w,C)}isEqual(w){return this==w||this.start.isEqual(w.start)&&this.end.isEqual(w.end)}containsPosition(w){return w.isAfter(this.start)&&w.isBefore(this.end)}containsRange(w){return this.containsPosition(w.start)&&this.containsPosition(w.end)}getDifference(w){const C=[];return this.isIntersecting(w)?(this.containsPosition(w.start)&&C.push(new h(this.start,w.start)),this.containsPosition(w.end)&&C.push(new h(w.end,this.end))):C.push(h.createFromRange(this)),C}getIntersection(w){if(this.isIntersecting(w)){let C=this.start,T=this.end;return this.containsPosition(w.start)&&(C=w.start),this.containsPosition(w.end)&&(T=w.end),new h(C,T)}return null}getWalker(w={}){return w.boundaries=this,new f.a(w)}*getItems(w={}){w.boundaries=this,w.ignoreElementEnd=!0;const C=new f.a(w);for(let T of C)yield T.item}*getPositions(w={}){w.boundaries=this;const C=new f.a(w);yield C.position;for(let T of C)yield T.nextPosition}isIntersecting(w){return this.start.isBefore(w.end)&&this.end.isAfter(w.start)}static createFromParentsAndOffsets(w,C,T,P){return new this(new u.a(w,C),new u.a(T,P))}static createFromRange(w){return new this(w.start,w.end)}static createFromPositionAndShift(w,C){const T=w,P=w.getShiftedBy(C);return 0f&&(f=-f>C?0:C+f),h=h>C?C:h,0>h&&(h+=C),C=f>h?0:h-f>>>0,f>>>=0;for(var T=Array(C);++wE.clone(!0)));return new P(this.position,S,this.baseVersion)}getReversed(){return new h.a(this.position,this.nodes.maxOffset,this.baseVersion+1)}_execute(){const S=this.nodes;this.nodes=new f.a([...S].map((O)=>O.clone(!0)));const E=w.a.insert(this.position,S);return{range:E}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(S,E){let O=[];for(let V of S.nodes)V.name?O.push(T.a.fromJSON(V)):O.push(C.a.fromJSON(V));return new P(u.a.fromJSON(S.position,E),O,S.baseVersion)}}r.a=P},function(o,r,s){'use strict';var d=s(28),u=s(1),f=s(5),h=s(109);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{constructor(C,T,P){const S=C.root.document.graveyard,E=new u.a(S,[S.maxOffset,0]);super(C,T,E,P)}get type(){return'remove'}get _holderElementOffset(){return this.targetPosition.path[0]}set _holderElementOffset(C){this.targetPosition.path[0]=C}get _needsHolderElement(){if(this.delta)for(let C of this.delta.operations)if(C instanceof w){if(C==this)return!0;if(C._holderElementOffset==this._holderElementOffset)return!1}return!0}getReversed(){return new h.a(this.targetPosition,this.howMany,this.sourcePosition,this.baseVersion+1)}clone(){let C=new w(this.sourcePosition,this.howMany,this.baseVersion);return C.targetPosition=u.a.createFromPosition(this.targetPosition),C}_execute(){if(this._needsHolderElement){const C=this.targetPosition.root,T=new f.a('$graveyardHolder');C.insertChildren(this._holderElementOffset,T),this.sourcePosition.root==C&&this.sourcePosition.path[0]>=this._holderElementOffset&&this.sourcePosition.path[0]++}return super._execute()}static get className(){return'engine.model.operation.RemoveOperation'}static fromJSON(C,T){let P=u.a.fromJSON(C.sourcePosition,T);const S=new w(P,C.howMany,C.baseVersion);return S.targetPosition=u.a.fromJSON(C.targetPosition,T),S}}r.a=w},function(o,r,s){'use strict';function d(){return 0===this.childCount?0:null}var u=s(21);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends u.a{constructor(h,w,C){super(h,w,C),this.getFillerOffset=d}is(h,w=null){return w?'containerElement'==h&&w==this.name||super.is(h,w):'containerElement'==h||super.is(h)}}r.a=f},function(o,r,s){'use strict';var h=s(115),w=s(5);r.c=function(T,P){return T.setCustomProperty(C,!0),s.i(h.a)(T,{label:function(){const E=T.getChild(0),O=E.getAttribute('alt');return O?`${O} ${P}`:P}})},r.a=function(T){return!!T.getCustomProperty(C)&&s.i(h.b)(T)},r.b=function(T){return T instanceof w.a&&'image'==T.name};/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const C=Symbol('isImage')},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return!!(u&&u[Symbol.iterator])}},function(o,r,s){'use strict';var u=s(81),f=s(123),h=s(124),w=s(134),C=s(461),T=s(93);r.a=function(S,E,O){var V=-1,R=f.a,F=S.length,N=!0,M=[],L=M;if(O)N=!1,R=h.a;else if(F>=200){var I=E?null:s.i(C.a)(S);if(I)return s.i(T.a)(I);N=!1,R=w.a,L=new u.a}else L=E?[]:M;outer:for(;++V{let L=V.matcher.matchAll(F.input);if(L)for(let I of L){const D=E instanceof Function?E(F.input):new h.a(E),q=Array.from(D.getAttributeKeys());if(!M.schema.check({name:D.name,attributes:q,inside:F.context}))continue;if(!N.consume(F.input,V.consume||I.match))continue;F.context.push(D);const z=M.convertChildren(F.input,N,F),$=w.a.createAt(D,'end');C.a.insert($,z),F.context.pop(),F.output=D;break}}},'normal')}toAttribute(E,O){this._setCallback(function(R){return(F,N,M,L)=>{let I=R.matcher.matchAll(N.input);if(I)for(let D of I){if(!M.consume(N.input,R.consume||D.match))continue;N.output||(N.output=L.convertChildren(N.input,M,N));let q=E instanceof Function?E(N.input):{key:E,value:O};d(N.output,q,N,L);break}}},'low')}toMarker(E){this._setCallback(function(V){return(R,F,N)=>{const M=V.matcher.matchAll(F.input);if(!M)return;let L;if(L=E instanceof Function?E(F.input):new h.a('$marker',{'data-name':F.input.getAttribute('data-name')}),'$marker'!=L.name||'string'!=typeof L.getAttribute('data-name'))throw new T.a('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const I of M)if(N.consume(F.input,V.consume||I.match)){F.output=L;break}}},'normal')}_setCallback(E,O){for(let V of this._from){const R=V.matcher.getElementName(),F=R?'element:'+R:'element',N=E(V),M=null===V.priority?O:V.priority;for(let L of this._dispatchers)L.on(F,N,{priority:M})}}}},function(o,r,s){'use strict';function d(T){return'string'==typeof T?[new h.a(T)]:(s.i(w.a)(T)||(T=[T]),Array.from(T).map((P)=>'string'==typeof P?new h.a(P):P))}var u=s(69),f=s(5),h=s(24),w=s(41);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C{constructor(T){this.markers=new Map,this._children=new u.a,T&&this.insertChildren(0,T)}[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(T){return'documentFragment'==T}getChild(T){return this._children.getNode(T)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(T){return this._children.getNodeIndex(T)}getChildStartOffset(T){return this._children.getNodeStartOffset(T)}getPath(){return[]}offsetToIndex(T){return this._children.offsetToIndex(T)}appendChildren(T){this.insertChildren(this.childCount,T)}insertChildren(T,P){P=d(P);for(let S of P)S.parent=this;this._children.insertNodes(T,P)}removeChildren(T,P=1){const S=this._children.removeNodes(T,P);for(let E of S)E.parent=null;return S}toJSON(){let T=[];for(let P of this._children)T.push(P.toJSON());return T}static fromJSON(T){let P=[];for(let S of T)S.name?P.push(f.a.fromJSON(S)):P.push(h.a.fromJSON(S));return new C(P)}}r.a=C},function(o,r,s){'use strict';var d=s(79),u=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f{constructor(h){this.document=h,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}r.a=f,s.i(u.a)(f,d.a)},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u,f){const h=_Mathmin(u.length,f.length);for(let w=0;wd(M,R));return F.forEach((M)=>R.add(M)),N}var f=s(1),h=s(5),w=s(3),C=s(7),T=s(0),P=s(4),S=s(150),E=s(521);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class O{constructor(){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map}get anchor(){if(0{if(!(N instanceof w.a))throw new T.a('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((M)=>{return!M.isEqual(N)})});if(V.length!==this._ranges.length||F){this._removeAllRanges();for(let N of V)this._pushRange(N);this._lastRangeBackward=!!R,this.fire('change:range',{directChange:!0})}}setTo(V){this.setRanges(V.getRanges(),V.isBackward)}collapse(V,R){const F=f.a.createAt(V,R),N=new w.a(F,F);this.setRanges([N])}collapseToStart(){const V=this.getFirstPosition();null!==V&&this.setRanges([new w.a(V,V)])}collapseToEnd(){const V=this.getLastPosition();null!==V&&this.setRanges([new w.a(V,V)])}setFocus(V,R){if(null===this.anchor)throw new T.a('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const F=f.a.createAt(V,R);if('same'!=F.compareWith(this.focus)){const N=this.anchor;this._ranges.length&&this._popRange(),'before'==F.compareWith(N)?this.addRange(new w.a(F,N),!0):this.addRange(new w.a(N,F))}}getAttribute(V){return this._attrs.get(V)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(V){return this._attrs.has(V)}clearAttributes(){if(0{const F=R.createElement('br');return F.dataset.ckeFiller=!0,F};r.a=(R)=>R.createTextNode('\xA0');const E=7;r.d=E;let O='';for(let R=0;R{this.listenTo(h,C,(T,P)=>{this.isEnabled&&this.onDomEvent(P)},{useCapture:this.useCapture})})}fire(h,w,C){this.isEnabled&&this.document.fire(h,new u.a(this.document,w,C))}}r.a=f},function(o,r){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a={window,document}},function(o,r,s){'use strict';var d=s(79),u=s(31),f=s(0),h=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w{constructor(){this.set('isFocused',!1),this.focusedElement=null,this._elements=new Set,this._nextEventLoopTimeout=null}add(C){if(this._elements.has(C))throw new f.a('focusTracker-add-element-already-exist');this.listenTo(C,'focus',()=>this._focus(C),{useCapture:!0}),this.listenTo(C,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(C)}remove(C){C===this.focusedElement&&this._blur(C),this._elements.has(C)&&(this.stopListening(C),this._elements.delete(C))}_focus(C){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=C,this.isFocused=!0}_blur(){this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}r.a=w,s.i(h.a)(w,d.a),s.i(h.a)(w,u.a)},function(o,r,s){'use strict';var d=s(79),u=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(){this._listener=Object.create(d.a),this._keystrokes=new Map}listenTo(h){this._listener.listenTo(h,'keydown',(w,C)=>{this.press(C)})}set(h,w){const C=s.i(u.a)(h),T=this._keystrokes.get(C);T?T.push(w):this._keystrokes.set(C,[w])}press(h){const w=s.i(u.c)(h),C=this._keystrokes.get(w);if(!C)return!1;for(let T of C)T(h,()=>{h.preventDefault(),h.stopPropagation()});return!0}destroy(){this._keystrokes=new Map,this._listener.stopListening()}}},function(o,r,s){'use strict';var u=s(55),f=Object.prototype,h=f.hasOwnProperty;r.a=function(w,C,T){var P=w[C];h.call(w,C)&&s.i(u.a)(P,T)&&(T!==void 0||C in w)||(w[C]=T)}},function(o,r,s){'use strict';var u=s(81),f=s(123),h=s(124),w=s(27),C=s(132),T=s(134);r.a=function(S,E,O,V){var R=-1,F=f.a,N=!0,M=S.length,L=[],I=E.length;if(!M)return L;O&&(E=s.i(w.a)(E,s.i(C.a)(O))),V?(F=h.a,N=!1):E.length>=200&&(F=T.a,N=!1,E=new u.a(E));outer:for(;++Rf;f++)u+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return u}},function(o,r,s){'use strict';var d=s(58),u=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f{constructor(h){this._nodes=[],h&&this.insertNodes(0,h)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((h,w)=>h+w.offsetSize,0)}getNode(h){return this._nodes[h]||null}getNodeIndex(h){const w=this._nodes.indexOf(h);return-1==w?null:w}getNodeStartOffset(h){const w=this.getNodeIndex(h);return null===w?null:this._nodes.slice(0,w).reduce((C,T)=>C+T.offsetSize,0)}indexToOffset(h){if(h==this._nodes.length)return this.maxOffset;const w=this._nodes[h];if(!w)throw new u.a('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(w)}offsetToIndex(h){let w=0;for(let C of this._nodes){if(h>=w&&hh.toJSON())}}r.a=f},function(o,r,s){'use strict';var d=s(32),u=s(3),f=s(0),h=s(20),w=s(508);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends d.a{constructor(T,P,S,E,O){super(O),this.range=u.a.createFromRange(T),this.key=P,this.oldValue=S===void 0?null:S,this.newValue=E===void 0?null:E}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new C(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new C(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){for(let T of this.range.getItems()){if(null!==this.oldValue&&!s.i(w.a)(T.getAttribute(this.key),this.oldValue))throw new f.a('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{item:T,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&T.hasAttribute(this.key))throw new f.a('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:T,key:this.key});if(s.i(w.a)(this.oldValue,this.newValue))return}return h.a.setAttribute(this.range,this.key,this.newValue),{range:this.range,key:this.key,oldValue:this.oldValue,newValue:this.newValue}}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(T,P){return new C(u.a.fromJSON(T.range,P),T.key,T.oldValue,T.newValue,T.baseVersion)}}r.a=C},function(o,r,s){'use strict';var d=s(32);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{clone(){return new u(this.baseVersion)}getReversed(){return new u(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}r.a=u},function(o,r,s){'use strict';var d=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u{constructor(f,h,w){if(this.textNode=f,0>h||h>f.offsetSize)throw new d.a('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>w||h+w>f.offsetSize)throw new d.a('model-textproxy-wrong-length: Given length value is incorrect.');this.data=f.data.substring(h,h+w),this.offsetInText=h}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(f){return'textProxy'==f}getPath(){const f=this.textNode.getPath();return 0P&&T.selection.editableElement==this),this.listenTo(T,'render',()=>{this.isFocused=T.isFocused&&T.selection.editableElement==this},{priority:'high'})}}r.a=C,s.i(f.a)(C,h.a)},function(o,r,s){'use strict';var d=s(0),u=s(7),f=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h{constructor(){this.parent=null}get index(){let w;if(!this.parent)return null;if(-1==(w=this.parent.getChildIndex(this)))throw new d.a('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return w}get nextSibling(){const w=this.index;return null!==w&&this.parent.getChild(w+1)||null}get previousSibling(){const w=this.index;return null!==w&&this.parent.getChild(w-1)||null}get root(){let w=this;for(;w.parent;)w=w.parent;return w}get document(){return this.parent instanceof h?this.parent.document:null}getAncestors(w={includeNode:!1,parentFirst:!1}){const C=[];for(let T=w.includeNode?this:this.parent;T;)C[w.parentFirst?'push':'unshift'](T),T=T.parent;return C}remove(){this.parent.removeChildren(this.index)}_fireChange(w,C){this.fire('change:'+w,C),this.parent&&this.parent._fireChange(w,C)}}r.a=h,s.i(f.a)(h,u.a)},function(o,r,s){'use strict';var d=s(0),u=s(34),f=s(25),h=s(4),w=s(7),C=s(21);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T{constructor(){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel=''}setFake(P=!0,S={}){this._isFake=P,this._fakeSelectionLabel=P?S.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const P=this._ranges[this._ranges.length-1],S=this._lastRangeBackward?P.end:P.start;return f.a.createFromPosition(S)}get focus(){if(!this._ranges.length)return null;const P=this._ranges[this._ranges.length-1],S=this._lastRangeBackward?P.start:P.end;return f.a.createFromPosition(S)}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(P,S){if(!(P instanceof u.a))throw new d.a('view-selection-invalid-range: Invalid Range.');this._pushRange(P),this._lastRangeBackward=!!S,this.fire('change')}*getRanges(){for(let P of this._ranges)yield u.a.createFromRange(P)}getFirstRange(){let P=null;for(let S of this._ranges)(!P||S.start.isBefore(P.start))&&(P=S);return P?u.a.createFromRange(P):null}getLastRange(){let P=null;for(let S of this._ranges)(!P||S.end.isAfter(P.end))&&(P=S);return P?u.a.createFromRange(P):null}getFirstPosition(){const P=this.getFirstRange();return P?f.a.createFromPosition(P.start):null}getLastPosition(){const P=this.getLastRange();return P?f.a.createFromPosition(P.end):null}isEqual(P){if(this.isFake!=P.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=P.fakeSelectionLabel)return!1;if(this.rangeCount!=P.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(P.anchor)||!this.focus.isEqual(P.focus))return!1;for(let S of this._ranges){let E=!1;for(let O of P._ranges)if(S.isEqual(O)){E=!0;break}if(!E)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(P,S){this._ranges=[];for(let E of P){if(!(E instanceof u.a))throw new d.a('view-selection-invalid-range: Invalid Range.');this._pushRange(E)}this._lastRangeBackward=!!S,this.fire('change')}setTo(P){this._isFake=P._isFake,this._fakeSelectionLabel=P._fakeSelectionLabel,this.setRanges(P.getRanges(),P.isBackward)}collapse(P,S){const E=f.a.createAt(P,S),O=new u.a(E,E);this.setRanges([O])}collapseToStart(){const P=this.getFirstPosition();null!==P&&this.setRanges([new u.a(P,P)])}collapseToEnd(){const P=this.getLastPosition();null!==P&&this.setRanges([new u.a(P,P)])}setFocus(P,S){if(null===this.anchor)throw new d.a('view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const E=f.a.createAt(P,S);if('same'!=E.compareWith(this.focus)){const O=this.anchor;this._ranges.pop(),'before'==E.compareWith(O)?this.addRange(new u.a(E,O),!0):this.addRange(new u.a(O,E))}}getSelectedElement(){if(1!==this.rangeCount)return null;const P=this.getFirstRange(),S=P.start.nodeAfter,E=P.end.nodeBefore;return S instanceof C.a&&S==E?S:null}static createFromSelection(P){const S=new T;return S.setTo(P),S}_pushRange(P){for(let S of this._ranges)if(P.isIntersecting(S))throw new d.a('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:P,intersectingRange:S});this._ranges.push(u.a.createFromRange(P))}}r.a=T,s.i(h.a)(T,w.a)},function(o,r,s){'use strict';var d=s(21),u=s(29),f=s(344),h=s(25),w=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C{constructor(T={}){if(!T.boundaries&&!T.startPosition)throw new w.a('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(T.direction&&'forward'!=T.direction&&'backward'!=T.direction)throw new w.a('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:T.direction});this.boundaries=T.boundaries||null,this.position=T.startPosition?h.a.createFromPosition(T.startPosition):h.a.createFromPosition(T.boundaries['backward'==T.direction?'end':'start']),this.direction=T.direction||'forward',this.singleCharacters=!!T.singleCharacters,this.shallow=!!T.shallow,this.ignoreElementEnd=!!T.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(T){let P,S,E;do E=this.position,({done:P,value:S}=this.next());while(!P&&T(S));P||(this.position=E)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let T=h.a.createFromPosition(this.position);const P=this.position,S=T.parent;if(null===S.parent&&T.offset===S.childCount)return{done:!0};if(S===this._boundaryEndParent&&T.offset==this.boundaries.end.offset)return{done:!0};let E;if(S instanceof u.a){if(T.isAtEnd)return this.position=h.a.createAfter(S),this._next();E=S.data[T.offset]}else E=S.getChild(T.offset);if(E instanceof d.a)return this.shallow?T.offset++:T=new h.a(E,0),this.position=T,this._formatReturnValue('elementStart',E,P,T,1);if(E instanceof u.a){if(this.singleCharacters)return T=new h.a(E,0),this.position=T,this._next();let O=E.data.length,V=E;return E==this._boundaryEndParent?(O=this.boundaries.end.offset,V=new f.a(E,0,O),T=h.a.createAfter(V)):T.offset++,this.position=T,this._formatReturnValue('text',V,P,T,O)}if('string'==typeof E){let O;if(this.singleCharacters)O=1;else{const R=S===this._boundaryEndParent?this.boundaries.end.offset:S.data.length;O=R-T.offset}const V=new f.a(S,T.offset,O);return T.offset+=O,this.position=T,this._formatReturnValue('text',V,P,T,O)}return T=h.a.createAfter(S),this.position=T,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',S,P,T)}_previous(){let T=h.a.createFromPosition(this.position);const P=this.position,S=T.parent;if(null===S.parent&&0===T.offset)return{done:!0};if(S==this._boundaryStartParent&&T.offset==this.boundaries.start.offset)return{done:!0};let E;if(S instanceof u.a){if(T.isAtStart)return this.position=h.a.createBefore(S),this._previous();E=S.data[T.offset-1]}else E=S.getChild(T.offset-1);if(E instanceof d.a)return this.shallow?(T.offset--,this.position=T,this._formatReturnValue('elementStart',E,P,T,1)):(T=new h.a(E,E.childCount),this.position=T,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',E,P,T));if(E instanceof u.a){if(this.singleCharacters)return T=new h.a(E,E.data.length),this.position=T,this._previous();let O=E.data.length,V=E;if(E==this._boundaryStartParent){const R=this.boundaries.start.offset;V=new f.a(E,R,E.data.length-R),O=V.data.length,T=h.a.createBefore(V)}else T.offset--;return this.position=T,this._formatReturnValue('text',V,P,T,O)}if('string'==typeof E){let O;if(!this.singleCharacters){const R=S===this._boundaryStartParent?this.boundaries.start.offset:0;O=T.offset-R}else O=1;T.offset-=O;const V=new f.a(S,T.offset,O);return this.position=T,this._formatReturnValue('text',V,P,T,O)}return T=h.a.createBefore(S),this.position=T,this._formatReturnValue('elementStart',S,P,T,1)}_formatReturnValue(T,P,S,E,O){return P instanceof f.a&&(P.offsetInText+P.data.length==P.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?S=h.a.createAfter(P.textNode):(E=h.a.createAfter(P.textNode),this.position=E)),0===P.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?S=h.a.createBefore(P.textNode):(E=h.a.createBefore(P.textNode),this.position=E))),{done:!1,value:{type:T,item:P,previousPosition:S,nextPosition:E,length:O}}}}r.a=C},function(o,r,s){'use strict';function f(le){const de=le.offset,ce=le.parent;if(ce.is('text'))return le;if(ce.is('attributeElement')&&0===ce.childCount){const pe=ce.parent,ge=ce.index;return ce.remove(),f(new G.a(pe,ge))}const ue=ce.getChild(de-1),me=ce.getChild(de);if(!ue||!me)return le;if(ue.is('text')&&me.is('text'))return z(ue,me);if(ue.is('attributeElement')&&me.is('attributeElement')&&ue.isSimilar(me)){const pe=ue.childCount;return ue.appendChildren(me.getChildren()),me.remove(),f(new G.a(ue,pe))}return le}function C(le,de){de=s.i(ie.a)(de)?[...de]:[de],U(de);const ce=F(le);if(!ce)throw new ne.a('view-writer-invalid-position-container');const ue=M(le,!0),me=ce.insertChildren(ue.offset,de),pe=ue.getShiftedBy(me),ge=f(ue);if(0===me)return new te.a(ge,ge);ge.isEqual(ue)||pe.offset--;const fe=f(pe);return new te.a(ge,fe)}function T(le){if(Z(le),le.isCollapsed)return new oe.a;const{start:de,end:ce}=N(le,!0),ue=de.parent,me=ce.offset-de.offset,pe=ue.removeChildren(de.offset,me),ge=f(de);return le.start=ge,le.end=G.a.createFromPosition(ge),new oe.a(pe)}function S(le,de){let ce;if(de.isAfter(le.end)){de=M(de,!0);const ue=de.parent,me=ue.childCount;le=N(le,!0),ce=T(le),de.offset+=ue.childCount-me}else ce=T(le);return C(de,ce)}function E(le,de){if(!(de instanceof Y.a))throw new ne.a('view-writer-wrap-invalid-attribute');if(Z(le),le.isCollapsed)return le;if(le.end.isEqual(le.start.getShiftedBy(1))){const be=le.start.nodeAfter;if(be instanceof Y.a&&$(de,be))return le}if(H(le)&&$(de,le.start.parent)){const be=le.start.parent.parent,_e=le.start.parent.index;return te.a.createFromParentsAndOffsets(be,_e,be,_e+1)}const{start:ce,end:ue}=N(le,!0),me=ce.parent,pe=L(me,ce.offset,ue.offset,de),ge=I(me,pe.start.offset,pe.end.offset,de),fe=f(ge.start);fe.isEqual(ge.start)||ge.end.offset--;const he=f(ge.end);return new te.a(fe,he)}function F(le){let de=le.parent;for(;!W(de);){if(!de)return;de=de.parent}return de}function N(le,de=!1){const ce=le.start,ue=le.end;if(Z(le),le.isCollapsed){const fe=M(le.start,de);return new te.a(fe,fe)}const me=M(ue,de),pe=me.parent.childCount,ge=M(ce,de);return me.offset+=me.parent.childCount-pe,new te.a(ge,me)}function M(le,de=!1){const ce=le.offset,ue=le.parent;if(le.parent.is('emptyElement'))throw new ne.a('view-writer-cannot-break-empty-element');if(le.parent.is('uiElement'))throw new ne.a('view-writer-cannot-break-ui-element');if(!de&&ue.is('text')&&W(ue.parent))return G.a.createFromPosition(le);if(W(ue))return G.a.createFromPosition(le);if(ue.is('text'))return M(q(le),de);const me=ue.childCount;if(ce==me){const pe=new G.a(ue.parent,ue.index+1);return M(pe,de)}if(0===ce){const pe=new G.a(ue.parent,ue.index);return M(pe,de)}const pe=ue.index+1,ge=ue.clone();ue.parent.insertChildren(pe,ge);const fe=ue.childCount-ce,he=ue.removeChildren(ce,fe);ge.appendChildren(he);const be=new G.a(ue.parent,pe);return M(be,de)}function L(le,de,ce,ue){let me=de;const pe=[];for(;mede instanceof ce))throw new ne.a('view-writer-insert-invalid-node');de.is('text')||U(de.getChildren())}}function W(le){return le&&(le.is('containerElement')||le.is('documentFragment'))}function Z(le){const de=F(le.start),ce=F(le.end);if(!de||!ce||de!==ce)throw new ne.a('view-writer-invalid-range-container')}var G=s(25),J=s(39),Y=s(112),X=s(165),Q=s(169),ee=s(29),te=s(34),ae=s(76),ne=s(0),oe=s(113),ie=s(41);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a={breakAttributes:function(le){return le instanceof G.a?M(le):N(le)},breakContainer:function(le){const de=le.parent;if(!de.is('containerElement'))throw new ne.a('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!de.parent)throw new ne.a('view-writer-break-root: Trying to break root element.');if(le.isAtStart)return G.a.createBefore(de);if(!le.isAtEnd){const ce=de.clone(!1);C(G.a.createAfter(de),ce);const ue=new te.a(le,G.a.createAt(de,'end')),me=new G.a(ce,0);S(ue,me)}return G.a.createAfter(de)},mergeAttributes:f,mergeContainers:function(le){const de=le.nodeBefore,ce=le.nodeAfter;if(!de||!ce||!de.is('containerElement')||!ce.is('containerElement'))throw new ne.a('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const ue=de.getChild(de.childCount-1),me=ue instanceof ee.a?G.a.createAt(ue,'end'):G.a.createAt(de,'end');return S(te.a.createIn(ce),G.a.createAt(de,'end')),T(te.a.createOn(ce)),me},insert:C,remove:T,clear:function(le,de){Z(le);const ce=le.getWalker({direction:'backward',ignoreElementEnd:!0});for(const ue of ce){const me=ue.item;let pe;if(me.is('element')&&de.isSimilar(me))pe=te.a.createOn(me);else if(!ue.nextPosition.isAfter(le.start)&&(me.is('text')||me.is('textProxy'))){const ge=me.getAncestors().find((fe)=>{return fe.is('element')&&de.isSimilar(fe)});ge&&(pe=te.a.createIn(ge))}pe&&(pe.end.isAfter(le.end)&&(pe.end=le.end),pe.start.isBefore(le.start)&&(pe.start=le.start),T(pe))}},move:S,wrap:E,wrapPosition:function(le,de){if(!(de instanceof Y.a))throw new ne.a('view-writer-wrap-invalid-attribute');if(de.isSimilar(le.parent))return D(G.a.createFromPosition(le));le.parent.is('text')&&(le=q(le));const ce=new Y.a;ce.priority=_NumberPOSITIVE_INFINITY,ce.isSimilar=()=>!1,le.parent.insertChildren(le.offset,ce);const ue=new te.a(le,le.getShiftedBy(1));E(ue,de);const me=new G.a(ce.parent,ce.index);ce.remove();const pe=me.nodeBefore,ge=me.nodeAfter;return pe instanceof ee.a&&ge instanceof ee.a?z(pe,ge):D(me)},unwrap:function(le,de){if(!(de instanceof Y.a))throw new ne.a('view-writer-unwrap-invalid-attribute');if(Z(le),le.isCollapsed)return le;if(le.end.isEqual(le.start.getShiftedBy(1))){const he=le.start.nodeAfter;if(!de.isSimilar(he)&&he instanceof Y.a&&K(de,he))return le}const{start:ce,end:ue}=N(le,!0),me=ce.parent,pe=L(me,ce.offset,ue.offset,de),ge=f(pe.start);ge.isEqual(pe.start)||pe.end.offset--;const fe=f(pe.end);return new te.a(ge,fe)},rename:function(le,de){const ce=new J.a(de,le.getAttributes());return C(G.a.createAfter(le),ce),S(te.a.createIn(le),G.a.createAt(ce)),T(te.a.createOn(le)),ce},breakViewRangePerContainer:function(le){const de=[],ce=new ae.a({boundaries:le});let ue=le.start;for(let me of ce)me.item.is('containerElement')&&(ue.isEqual(me.previousPosition)||de.push(new te.a(ue,me.previousPosition)),ue=me.nextPosition);return de.push(new te.a(ue,le.end)),de}};const se=[ee.a,Y.a,J.a,X.a,Q.a]},function(o,r,s){'use strict';var d=s(7),u=s(0),f=s(68),h=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w{constructor(C){this._items=[],this._itemMap=new Map,this._idProperty=C&&C.idProperty||'id',this._boundItemsMap=new Map}get length(){return this._items.length}add(C,T){let P;const S=this._idProperty;if(S in C){if(P=C[S],'string'!=typeof P)throw new u.a('collection-add-invalid-id');if(this.get(P))throw new u.a('collection-add-item-already-exists')}else C[S]=P=s.i(f.a)();if(void 0===T)T=this._items.length;else if(T>this._items.length||0>T)throw new u.a('collection-add-item-invalid-index');return this._items.splice(T,0,C),this._itemMap.set(P,C),this.fire('add',C,T),this}get(C){let T;if('string'==typeof C)T=this._itemMap.get(C);else if('number'==typeof C)T=this._items[C];else throw new u.a('collection-get-invalid-arg: Index or id must be given.');return T||null}getIndex(C){let T;return T='string'==typeof C?this._itemMap.get(C):C,this._items.indexOf(T)}remove(C){let E=!1,T,P,S;const O=this._idProperty;if('string'==typeof C?(P=C,S=this._itemMap.get(P),E=!S,S&&(T=this._items.indexOf(S))):'number'==typeof C?(T=C,S=this._items[T],E=!S,S&&(P=S[O])):(S=C,P=S[O],T=this._items.indexOf(S),E=-1==T||!this._itemMap.get(P)),E)throw new u.a('collection-remove-404: Item not found.');return this._items.splice(T,1),this._itemMap.delete(P),this.fire('remove',S),S}map(C,T){return this._items.map(C,T)}find(C,T){return this._items.find(C,T)}filter(C,T){return this._items.filter(C,T)}clear(){for(;this.length;)this.remove(0)}bindTo(C){const T=(P)=>{for(let S of C)this.add(P(S));this.listenTo(C,'add',(S,E,O)=>{this.add(P(E),O)}),this.listenTo(C,'remove',(S,E)=>{this.remove(this._boundItemsMap.get(E)),this._boundItemsMap.delete(E)})};return{as:(P)=>{T((S)=>{const E=new P(S);return this._boundItemsMap.set(S,E),E})},using:(P)=>{let S;S='function'==typeof P?(E)=>{const O=P(E);return this._boundItemsMap.set(E,O),O}:(E)=>{const O=E[P];return this._boundItemsMap.set(E,O),O},T(S)}}}[Symbol.iterator](){return this._items[Symbol.iterator]()}}r.a=w,s.i(h.a)(w,d.a)},function(o,r,s){'use strict';function d(S){return S['data-ck-expando']||(S['data-ck-expando']=s.i(h.a)())}function u(S){return S&&s.i(C.a)(S.addEventListener)}var f=s(7),h=s(68),w=s(56),C=s(231);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const T=s.i(w.a)({},f.a,{listenTo(...S){const E=S[0];u(E)&&(S[0]=this._getProxyEmitter(E)||new P(E)),f.a.listenTo.apply(this,S)},stopListening(...S){const E=S[0];if(u(E)){let O=this._getProxyEmitter(E);if(!O)return;S[0]=O}f.a.stopListening.apply(this,S)},_getProxyEmitter(S){return s.i(f.b)(this,d(S))}});r.a=T;class P{constructor(S){s.i(f.c)(this,d(S)),this._domNode=S}}s.i(w.a)(P.prototype,f.a,{on(S,E,O={}){if(f.a.on.apply(this,arguments),!(this._domListeners&&this._domListeners[S])){const V=this._createDomListener(S);this._domNode.addEventListener(S,V,!!O.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[S]=V}},off(S){f.a.off.apply(this,arguments);let E;!this._domListeners[S]||(E=this._events[S])&&E.callbacks.length||this._domListeners[S].removeListener()},_createDomListener(S){const E=(O)=>{this.fire(S,O)};return E.removeListener=()=>{this._domNode.removeEventListener(S,E),delete this._domListeners[S]},E}})},function(o,r,s){'use strict';function d(T){var P=-1,S=T?T.length:0;for(this.clear();++P>>1){for(;E>>1,R=T[V];null!==R&&!s.i(h.a)(R)&&(S?R<=P:R{const $=L instanceof F.a?L.clone(!0):L(D,q,z);if($&&q.consume(D.item,'insert')){const K=z.mapper.toViewPosition(D.range.start);z.mapper.bindElements(D.item,$),M.a.insert(K,$)}}},r.j=function(){return(L,I,D,q)=>{if(D.consume(I.item,'insert')){const z=q.mapper.toViewPosition(I.range.start),$=new N.a(I.item.data);M.a.insert(z,$)}}},r.f=function(L){return(I,D,q,z)=>{let $,K;if((L instanceof F.a?($=L.clone(!0),K=L.clone(!0)):(D.isOpening=!0,$=L(D,q,z),D.isOpening=!1,K=L(D,q,z)),$&&K)&&q.consume(D.range,'addMarker')){const H=z.mapper;M.a.insert(H.toViewPosition(D.range.start),$),D.range.isCollapsed||M.a.insert(H.toViewPosition(D.range.end),K)}}},r.h=function(L){return L=L||((I,D)=>({value:I,key:D})),(I,D,q,z)=>{if(q.consume(D.item,V(I.name))){const{key:$,value:K}=L(D.attributeNewValue,D.attributeKey,D,q,z);z.mapper.toViewElement(D.item).setAttribute($,K)}}},r.i=function(L){return L=L||((I,D)=>({key:D})),(I,D,q,z)=>{if(q.consume(D.item,V(I.name))){const{key:$}=L(D.attributeOldValue,D.attributeKey,D,q,z);z.mapper.toViewElement(D.item).removeAttribute($)}}},r.b=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D.attributeNewValue,D,q,z);if(!$)return;if(!q.consume(D.item,V(I.name)))return;let K=z.mapper.toViewRange(D.range);if(null!==D.attributeOldValue&&!(L instanceof F.a)){const H=L(D.attributeOldValue,D,q,z);K=M.a.unwrap(K,H)}M.a.wrap(K,$)}},r.c=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D.attributeOldValue,D,q,z);if($&&q.consume(D.item,V(I.name))){const K=z.mapper.toViewRange(D.range);M.a.unwrap(K,$)}}},r.d=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D,q,z);if($&&q.consume(D.range,'addMarker')){const K=z.mapper.toViewRange(D.range),H=M.a.breakViewRangePerContainer(K);for(let U of H)M.a.wrap(U,$)}}},r.e=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D,q,z);if($&&q.consume(D.range,'removeMarker')){const K=z.mapper.toViewRange(D.range),H=M.a.breakViewRangePerContainer(K);for(let U of H)M.a.unwrap(U,$)}}},r.k=function(){return(L,I,D,q)=>{if(D.consume(I.item,'remove')){const z=R.a.createFromPositionAndShift(I.sourcePosition,I.item.offsetSize),$=q.mapper.toViewRange(z);M.a.remove($.getTrimmed()),q.mapper.unbindModelElement(I.item)}}},r.g=function(L){return(I,D,q,z)=>{let $,K;if((L instanceof F.a?($=L.clone(!0),K=L.clone(!0)):(D.isOpening=!0,$=L(D,q,z),D.isOpening=!1,K=L(D,q,z)),$&&K)&&q.consume(D.range,'removeMarker')){const H=z.mapper.toViewRange(D.range);M.a.clear(H.getEnlarged(),K),$.isSimilar(K)||M.a.clear(H.getEnlarged(),$)}}}},function(o,r,s){'use strict';var d=s(19),u=s(17),f=s(103),h=s(16),w=s(37),C=s(49),T=s(3),P=s(1);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class S extends d.a{get type(){return'insert'}get position(){return this._insertOperation?this._insertOperation.position:null}get nodes(){return this._insertOperation?this._insertOperation.nodes:null}get _insertOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return f.a}static get className(){return'engine.model.delta.InsertDelta'}static get _priority(){return 20}}r.a=S,s.i(h.b)('insert',function(E,O){const V=new S,R=new w.a(E,O,this.document.version);if(this.addDelta(V),V.addOperation(R),this.document.applyOperation(R),O instanceof C.a)for(const[F,N]of O.markers){const M=P.a.createAt(N.root),L=new T.a(N.start._getCombined(M,E),N.end._getCombined(M,E));this.setMarker(F,L)}return this}),u.a.register(S)},function(o,r,s){'use strict';var d=s(19),u=s(17),f=s(104),h=s(16),w=s(1),C=s(5),T=s(38),P=s(28),S=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class E extends d.a{get type(){return'merge'}get position(){return this._removeOperation?this._removeOperation.sourcePosition:null}getReversed(){let O=super.getReversed();return 0M._priority)||!(N._priority{return M+L.operations.length},0)}function S(N,M){const L=N[N.length-1];let I=L.operations.length+L.baseVersion,D=new E.a;for(let q=0;q'string'==typeof P?new u.a(P):P))}var u=s(29),f=s(4),h=s(41),w=s(7);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C{constructor(T){this._children=[],T&&this.insertChildren(0,T)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(T){return'documentFragment'==T}appendChildren(T){return this.insertChildren(this.childCount,T)}getChild(T){return this._children[T]}getChildIndex(T){return this._children.indexOf(T)}getChildren(){return this._children[Symbol.iterator]()}insertChildren(T,P){this._fireChange('children',this);let S=0;P=d(P);for(let E of P)E.parent=this,this._children.splice(T,0,E),T++,S++;return S}removeChildren(T,P=1){this._fireChange('children',this);for(let S=T;S{d(D,$,K,H,U)},{priority:'lowest'}),q.viewToModel.on('element',f,{priority:'lowest'}),q.viewToModel.on('documentFragment',f,{priority:'lowest'}),q.viewToModel.on('element',($,K,H,U)=>{u(D,$,K,H,U)},{priority:'low'}),I.commands.set('paragraph',new w.a(I))}}r.a=M,M.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const L=new WeakSet},function(o,r){'use strict';/** + * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function d(f){return f.focus}class u{constructor(f){if(Object.assign(this,f),f.actions&&f.keystrokeHandler)for(let h in f.actions){let w=f.actions[h];'string'==typeof w&&(w=[w]);for(let C of w)f.keystrokeHandler.set(C,(T,P)=>{this[h](),P()})}}get first(){return this.focusables.find(d)||null}get last(){return this.focusables.filter(d).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let f=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((h,w)=>{const C=h.element===this.focusTracker.focusedElement;return C&&(f=w),C}),f)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(f){f&&f.focus()}_getFocusableItem(f){const h=this.current,w=this.focusables.length;if(!w||null===h)return null;let C=(h+w+f)%w;do{let T=this.focusables.get(C);if(d(T))return T;C=(C+w+f)%w}while(C!==h);return null}}r.a=u},function(o,r,s){'use strict';function d(T){return T.every((P)=>'string'==typeof P)}var u=s(0),f=s(31),h=s(78),w=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends h.a{constructor(T){super({idProperty:'viewUid'}),this.on('add',(P,S,E)=>{S.element&&this._parentElement&&this._parentElement.insertBefore(S.element,this._parentElement.children[E])}),this.on('remove',(P,S)=>{S.element&&this._parentElement&&S.element.remove()}),this.locale=T,this.set('ready',!1),this._parentElement=null}init(){if(this.ready)throw new u.a('ui-viewcollection-init-reinit: This ViewCollection has already been initialized.');return Promise.all(this.map((T)=>T.init())).then(()=>{this.ready=!0})}destroy(){let T=[];for(let P of this)T.push(P.destroy());return Promise.all(T)}add(T,P){super.add(T,P);let S=Promise.resolve();return this.ready&&!T.ready&&(S=S.then(()=>{return T.init()})),S}setParent(T){this._parentElement=T}delegate(...T){if(!T.length||!d(T))throw new u.a('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(P)=>{for(let S of this)for(let E of T)S.delegate(E).to(P);this.on('add',(S,E)=>{for(let O of T)E.delegate(O).to(P)}),this.on('remove',(S,E)=>{for(let O of T)E.stopDelegating(O,P)})}}}}r.a=C,s.i(w.a)(h.a,f.a)},function(o,r,s){'use strict';function d(w,C){let T=u([w],C);T.sort((P,S)=>P.start.isBefore(S.start)?-1:1);for(let P=1;PR.start.root!=P.graveyard);V&&S.push(V)}S.length&&P.selection.setRanges(S,C)}}r.a=h},function(o,r,s){'use strict';function d(T){var P=-1,S=T?T.length:0;for(this.clear();++P=S||0>X||G&&Q>=$}function N(){var Y=s.i(f.a)();return F(Y)?M(Y):void(H=setTimeout(N,R(Y)))}function M(Y){return(clearTimeout(H),H=void 0,J&&q)?O(Y):(q=z=void 0,K)}function D(){var Y=s.i(f.a)(),X=F(Y);if(q=arguments,z=this,U=Y,X){if(void 0===H)return V(U);if(G)return clearTimeout(H),H=setTimeout(N,S),O(U)}return void 0===H&&(H=setTimeout(N,S)),K}var U=0,W=0,Z=!1,G=!1,J=!0,q,z,$,K,H;if('function'!=typeof P)throw new TypeError('Expected a function');return S=s.i(h.a)(S)||0,s.i(u.a)(E)&&(Z=!!E.leading,G='maxWait'in E,$=G?_Mathmax(s.i(h.a)(E.maxWait)||0,S):$,J='trailing'in E?!!E.trailing:J),D.cancel=function(){void 0!==H&&clearTimeout(H),U=W=0,q=z=H=void 0},D.flush=function(){return void 0===H?K:M(s.i(f.a)())},D}},function(o,r,s){'use strict';var u=s(35),f=s(15);r.a=function(h,w,C){var T=h?h.length:0;return T?(w=C||void 0===w?1:s.i(f.a)(w),s.i(u.a)(h,0>w?0:w,T)):[]}},function(o,r,s){'use strict';var u=s(35),f=s(15);r.a=function(h,w,C){var T=h?h.length:0;return T?(w=C||void 0===w?1:s.i(f.a)(w),w=T-w,s.i(u.a)(h,0,0>w?0:w)):[]}},function(o,r){'use strict';r.a=function(u){return u&&u.length?u[0]:void 0}},function(o,r,s){'use strict';var u=s(13),h=Object.prototype,w=h.hasOwnProperty,C=h.toString,T=h.propertyIsEnumerable;r.a=function(P){return s.i(u.a)(P)&&w.call(P,'callee')&&(!T.call(P,'callee')||C.call(P)=='[object Arguments]')}},function(o,r,s){'use strict';var u=s(14),w=Object.prototype,C=w.toString;r.a=function(T){var P=s.i(u.a)(T)?C.call(T):'';return P=='[object Function]'||P=='[object GeneratorFunction]'}},function(o,r,s){'use strict';var u=s(11),f=s(43),w=Object.prototype,C=w.toString;r.a=function(T){return'string'==typeof T||!s.i(u.a)(T)&&s.i(f.a)(T)&&C.call(T)=='[object String]'}},function(o,r,s){'use strict';var u=s(130);r.a=function(f,h){return f&&f.length&&h&&h.length?s.i(u.a)(f,h):f}},function(o,r,s){'use strict';var u=s(191),f=s(27),h=s(98);r.a=function(w,C){if(!(w&&w.length))return[];var T=s.i(h.a)(w);return null==C?T:s.i(f.a)(T,function(P){return s.i(u.a)(C,void 0,P)})}},function(o,r,s){'use strict';var u=s(97),f=s(270);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(h){return s.i(u.a)(h)?s.i(f.a)(h):new Map(h)}},function(o){o.exports=function(s){if(!s.webpackPolyfill){var d=Object.create(s);d.children||(d.children=[]),Object.defineProperty(d,'loaded',{enumerable:!0,get:function(){return d.l}}),Object.defineProperty(d,'id',{enumerable:!0,get:function(){return d.i}}),Object.defineProperty(d,'exports',{enumerable:!0}),d.webpackPolyfill=1}return d}},function(o,r,s){'use strict';var u=s(33),f=s(3),h=s(1);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(w,C,T){const P=[];for(let S of C){const E=new u.a({boundaries:S,mergeCharacters:!0});let O=E.next(),V=S.start,R=S.start,F=S.end;for(;!O.done;){const N=O.value.item.name||'$text',M=h.a.createBefore(O.value.item);T.check({name:N,inside:M,attributes:w})||(!R.isEqual(V)&&P.push(new f.a(R,V)),R=E.position),V=E.position,O=E.next()}R&&!R.isEqual(F)&&P.push(new f.a(R,F))}return P}},function(o,r,s){'use strict';var u=s(33);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(f,h,w){if(h.isCollapsed)return w.check({name:'$text',inside:h.getFirstPosition(),attributes:f});const C=h.getRanges();for(let T of C){const P=new u.a({boundaries:T,mergeCharacters:!0});for(let S=P.position,E=P.next();!E.done;){const O=E.value.item.name||'$text';if(w.check({name:O,inside:S,attributes:f}))return!0;S=P.position,E=P.next()}}return!1}},function(o,r,s){'use strict';var d=s(12),u=s(152),f=s(153);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{constructor(w,C){super(w),this.attributeKey=C,this.set('value',!1),this.listenTo(this.editor.document.selection,'change:attribute',()=>{this.value=this.editor.document.selection.hasAttribute(this.attributeKey)})}_checkEnabled(){const w=this.editor.document;return s.i(f.a)(this.attributeKey,w.selection,w.schema)}_doExecute(w={}){const C=this.editor.document,T=C.selection,P=w.forceValue===void 0?!this.value:w.forceValue;C.enqueueChanges(()=>{if(T.isCollapsed)P?T.setAttribute(this.attributeKey,!0):T.removeAttribute(this.attributeKey);else{const S=s.i(u.a)(this.attributeKey,T.getRanges(),C.schema),E=w.batch||C.batch();for(let O of S)P?E.setAttribute(O,this.attributeKey,P):E.removeAttribute(O,this.attributeKey)}})}}r.a=h},function(o,r,s){'use strict';var d=s(1),u=s(3),f=s(25),h=s(34),w=s(29),C=s(7),T=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class P{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map}bindElements(S,E){this._modelToViewMapping.set(S,E),this._viewToModelMapping.set(E,S)}unbindViewElement(S){const E=this.toModelElement(S);this._unbindElements(E,S)}unbindModelElement(S){const E=this.toViewElement(S);this._unbindElements(S,E)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap}toModelElement(S){return this._viewToModelMapping.get(S)}toViewElement(S){return this._modelToViewMapping.get(S)}toModelRange(S){return new u.a(this.toModelPosition(S.start),this.toModelPosition(S.end))}toViewRange(S){return new h.a(this.toViewPosition(S.start),this.toViewPosition(S.end))}toModelPosition(S){const E={viewPosition:S,modelPosition:this._defaultToModelPosition(S),mapper:this};return this.fire('viewToModelPosition',E),E.modelPosition}_defaultToViewPosition(S){let E=this._modelToViewMapping.get(S.parent);return this._findPositionIn(E,S.offset)}toViewPosition(S){const E={viewPosition:this._defaultToViewPosition(S),modelPosition:S,mapper:this};return this.fire('modelToViewPosition',E),E.viewPosition}_defaultToModelPosition(S){let E=S.parent,O=this._viewToModelMapping.get(E);for(;!O;)E=E.parent,O=this._viewToModelMapping.get(E);let V=this._toModelOffset(S.parent,S.offset,E);return d.a.createFromParentAndOffset(O,V)}registerViewToModelLength(S,E){this._viewToModelLengthCallbacks.set(S,E)}_toModelOffset(S,E,O){if(O!=S){const R=this._toModelOffset(S.parent,S.index,O),F=this._toModelOffset(S,E,S);return R+F}if(S.is('text'))return E;let V=0;for(let R=0;R{const N=V.selection;if(!N.isCollapsed&&R.consume(N,'selection')){F.viewSelection.removeAllRanges();for(let M of N.getRanges()){const L=F.mapper.toViewRange(M);F.viewSelection.addRange(L,N.isBackward)}}}},r.f=function(){return(O,V,R,F)=>{const N=V.selection;if(N.isCollapsed&&R.consume(N,'selection')){const M=N.getFirstPosition(),L=F.mapper.toViewPosition(M),I=E.a.breakAttributes(L);F.viewSelection.removeAllRanges(),F.viewSelection.addRange(new S.a(I,I))}}},r.a=function(O){return(V,R,F,N)=>{const M=O instanceof P.a?O.clone(!0):O(R.value,R,R.selection,F,N);if(M){const L='selectionAttribute:'+R.key;w(R.selection,N.viewSelection,M,F,L)}}},r.b=function(O){return(V,R,F,N)=>{const M=O instanceof P.a?O.clone(!0):O(R,F,N);if(M){const L='selectionMarker:'+R.name;w(R.selection,N.viewSelection,M,F,L)}}},r.c=function(){return(O,V,R,F)=>{for(let N of F.viewSelection.getRanges())N.isCollapsed&&N.end.parent.document&&E.a.mergeAttributes(N.start);F.viewSelection.removeAllRanges()}},r.d=function(){return(O,V,R,F)=>F.viewSelection.setFake(!1)}},function(o,r,s){'use strict';var d=s(319),u=s(3),f=s(1),h=s(49),w=s(7),C=s(4),T=s(56);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class P{constructor(S,E={}){this._modelDocument=S,this.conversionApi=s.i(T.a)({dispatcher:this},E)}convertChange(S,E){'remove'!==S&&E.range&&'$graveyard'==E.range.root.rootName||'remove'==S&&'$graveyard'==E.sourcePosition.root.rootName||'rename'==S&&'$graveyard'==E.element.root.rootName||('insert'==S||'reinsert'==S?this.convertInsertion(E.range):'move'==S?this.convertMove(E.sourcePosition,E.range):'remove'==S?this.convertRemove(E.sourcePosition,E.range):'addAttribute'==S||'removeAttribute'==S||'changeAttribute'==S?this.convertAttribute(S,E.range,E.key,E.oldValue,E.newValue):'rename'==S&&this.convertRename(E.element,E.oldName))}convertInsertion(S){const E=this._createInsertConsumable(S);for(let O of S){const V=O.item,R=u.a.createFromPositionAndShift(O.previousPosition,O.length),F={item:V,range:R};this._testAndFire('insert',F,E);for(let N of V.getAttributeKeys())F.attributeKey=N,F.attributeOldValue=null,F.attributeNewValue=V.getAttribute(N),this._testAndFire(`addAttribute:${N}`,F,E)}for(let O of this._modelDocument.markers){const V=O.getRange();V.containsPosition(S.start)&&this.convertMarker('addMarker',O.name,V.getIntersection(S)),(S.containsRange(V)||S.isEqual(V))&&this.convertMarker('addMarker',O.name,V)}}convertMove(S,E){this.convertRemove(S,E),this.convertInsertion(E)}convertRemove(S,E){const O=this._createConsumableForRange(E,'remove');for(let V of E.getItems({shallow:!0})){this._testAndFire(`remove`,{sourcePosition:S,item:V},O)}}convertAttribute(S,E,O,V,R){const F=this._createConsumableForRange(E,S+':'+O);for(let N of E){const M=N.item,L=u.a.createFromPositionAndShift(N.previousPosition,N.length);this._testAndFire(`${S}:${O}`,{item:M,range:L,attributeKey:O,attributeOldValue:V,attributeNewValue:R},F)}}convertRename(S,E){const O=S.clone(!0);O.name=E,this.conversionApi.mapper.bindElements(O,this.conversionApi.mapper.toViewElement(S));const V=new h.a;V.appendChildren(O),this.convertRemove(f.a.createBefore(S),u.a.createOn(O)),this.convertInsertion(u.a.createOn(S))}convertSelection(S){const E=Array.from(this._modelDocument.markers.getMarkersAtPosition(S.getFirstPosition())),O=this._createSelectionConsumable(S,E);this.fire('selection',{selection:S},O,this.conversionApi);for(let V of E){const R={selection:S,name:V.name};O.test(S,'selectionMarker:'+V.name)&&this.fire('selectionMarker:'+V.name,R,O,this.conversionApi)}for(let V of S.getAttributeKeys()){const R={selection:S,key:V,value:S.getAttribute(V)};O.test(S,'selectionAttribute:'+R.key)&&this.fire('selectionAttribute:'+R.key,R,O,this.conversionApi)}}convertMarker(S,E,O){if(O.root.document&&'$graveyard'!=O.root.rootName){const V=this._createMarkerConsumable(S,O);this.fire(S+':'+E,{name:E,range:O},V,this.conversionApi)}}_createInsertConsumable(S){const E=new d.a;for(let O of S){const V=O.item;E.add(V,'insert');for(let R of V.getAttributeKeys())E.add(V,'addAttribute:'+R)}return E}_createConsumableForRange(S,E){const O=new d.a;for(let V of S.getItems())O.add(V,E);return O}_createSelectionConsumable(S,E){const O=new d.a;O.add(S,'selection');for(let V of E)O.add(S,'selectionMarker:'+V.name);for(let V of S.getAttributeKeys())O.add(S,'selectionAttribute:'+V);return O}_createMarkerConsumable(S,E){const O=new d.a;return O.add(E,S),O}_testAndFire(S,E,O){if(O.test(E.item,S)){const V=E.item.name||'$text';this.fire(S+':'+V,E,O,this.conversionApi)}}}r.a=P,s.i(C.a)(P,w.a)},function(o,r,s){'use strict';var d=s(324),u=s(164),f=s(60);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(){this._domParser=new DOMParser,this._domConverter=new u.a({blockFiller:f.a}),this._htmlWriter=new d.a}toData(w){const C=this._domConverter.viewToDom(w,document);return this._htmlWriter.getHtml(C)}toView(w){const C=this._toDom(w);return this._domConverter.domToView(C)}_toDom(w){const C=this._domParser.parseFromString(w,'text/html'),T=C.createDocumentFragment(),P=C.body.childNodes;for(;0{S.has(O)&&u.call(this,O,V.range,V.sourcePosition)},{priority:'high'})}function u(S,E,O){let V=E.end.offset-E.start.offset,R;switch(S){case'insert':let F='sticksToNext'==this.stickiness;R=this._getTransformedByInsertion(E.start,V,F);break;case'move':case'remove':case'reinsert':let N=h.a.createFromPositionAndShift(O,V),M=N.containsPosition(this)||N.start.isEqual(this)&&'sticksToNext'==this.stickiness||N.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(M)R=this._getCombined(O,E.start);else{let L='sticksToNext'==this.stickiness;R=this._getTransformedByMove(O,E.start,V,L)}}if(!this.isEqual(R)){const F=f.a.createFromPosition(this);this.path=R.path,this.root=R.root,this.fire('change',F)}}var f=s(1),h=s(3),w=s(7),C=s(4),T=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class P extends f.a{constructor(S,E,O){if(super(S,E),!this.root.is('rootElement'))throw new T.a('model-liveposition-root-not-rootelement: LivePosition root has to be an instance of RootElement.');this.stickiness=O||'sticksToNext',d.call(this)}detach(){this.stopListening()}}r.a=P,s.i(C.a)(P,w.a)},function(o,r,s){'use strict';function d(){const T=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document,'change',(P,S,E,O,V)=>{T.has(S)&&u.call(this,S,V,E.range,E.sourcePosition)},{priority:'high'})}function u(T,P,S,E){const O=S.end.offset-S.start.offset;let V=S.start;'move'==T&&(V=V._getTransformedByInsertion(E,O));const R=this._getTransformedByDocumentChange(T,P,V,O,E);'move'==T&&3==R.length&&(R[2]=S);const F=f.a.createFromRanges(R);if(!F.isEqual(this)){const N=f.a.createFromRange(this);this.start=F.start,this.end=F.end,this.fire('change',N)}}var f=s(3),h=s(7),w=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends f.a{constructor(T,P){super(T,P),d.call(this)}detach(){this.stopListening()}}r.a=C,s.i(w.a)(C,h.a)},function(o,r,s){'use strict';function d(F,N,M){let L=s.i(O.a)(F);return M&&(L=L.slice(L.indexOf(M)+1)),L.some((I)=>I.tagName&&N.includes(I.tagName.toLowerCase()))}var u=s(29),f=s(21),h=s(25),w=s(34),C=s(75),T=s(113),P=s(76),S=s(60),E=s(412),O=s(186),V=s(409);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(F={}){this.blockFiller=F.blockFiller||S.b,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(F,N){this._fakeSelectionMapping.set(F,C.a.createFromSelection(N))}fakeSelectionToView(F){return this._fakeSelectionMapping.get(F)}bindElements(F,N){this._domToViewMapping.set(F,N),this._viewToDomMapping.set(N,F)}bindDocumentFragments(F,N){this._domToViewMapping.set(F,N),this._viewToDomMapping.set(N,F)}viewToDom(F,N,M={}){if(F.is('text')){const L=this._processDataFromViewText(F);return N.createTextNode(L)}if(this.getCorrespondingDom(F))return this.getCorrespondingDom(F);let L;if(F.is('documentFragment'))L=N.createDocumentFragment(),M.bind&&this.bindDocumentFragments(L,F);else{L=N.createElement(F.name),M.bind&&this.bindElements(L,F);for(let I of F.getAttributeKeys())L.setAttribute(I,F.getAttribute(I))}if(M.withChildren||void 0===M.withChildren)for(let I of this.viewChildrenToDom(F,N,M))L.appendChild(I);return L}*viewChildrenToDom(F,N,M={}){let L=F.getFillerOffset&&F.getFillerOffset(),I=0;for(let D of F.getChildren())L===I&&(yield this.blockFiller(N)),yield this.viewToDom(D,N,M),I++;L===I&&(yield this.blockFiller(N))}viewRangeToDom(F){const N=this.viewPositionToDom(F.start),M=this.viewPositionToDom(F.end),L=new Range;return L.setStart(N.parent,N.offset),L.setEnd(M.parent,M.offset),L}viewPositionToDom(F){const N=F.parent;if(N.is('text')){const M=this.getCorrespondingDomText(N);if(!M)return null;let L=F.offset;return s.i(S.c)(M)&&(L+=S.d),{parent:M,offset:L}}let M,L,I;if(0===F.offset){if(M=this.getCorrespondingDom(F.parent),!M)return null;I=M.childNodes[0]}else{if(L=this.getCorrespondingDom(F.nodeBefore),!L)return null;M=L.parentNode,I=L.nextSibling}if(this.isText(I)&&s.i(S.c)(I))return{parent:I,offset:S.d};const D=L?s.i(E.a)(L)+1:0;return{parent:M,offset:D}}domToView(F,N={}){if(s.i(S.e)(F,this.blockFiller))return null;if(this.isText(F)){if(s.i(S.f)(F))return null;const M=this._processDataFromDomText(F);return''===M?null:new u.a(M)}if(this.getCorrespondingView(F))return this.getCorrespondingView(F);let M;if(this.isDocumentFragment(F))M=new T.a,N.bind&&this.bindDocumentFragments(F,M);else{const L=N.keepOriginalCase?F.tagName:F.tagName.toLowerCase();M=new f.a(L),N.bind&&this.bindElements(F,M);const I=F.attributes;for(let D=I.length-1;0<=D;D--)M.setAttribute(I[D].name,I[D].value)}if(N.withChildren||void 0===N.withChildren)for(let L of this.domChildrenToView(F,N))M.appendChildren(L);return M}*domChildrenToView(F,N={}){for(let M=0;ML?0:L),new h.a(M,L)):null}if(0===N){const M=this.getCorrespondingView(F);if(M)return new h.a(M,0)}else{const M=this.getCorrespondingView(F.childNodes[N-1]);if(M&&M.parent)return new h.a(M.parent,M.index+1)}return null}getCorrespondingView(F){if(this.isElement(F))return this.getCorrespondingViewElement(F);return this.isDocumentFragment(F)?this.getCorrespondingViewDocumentFragment(F):this.isText(F)?this.getCorrespondingViewText(F):null}getCorrespondingViewElement(F){return this._domToViewMapping.get(F)}getCorrespondingViewDocumentFragment(F){return this._domToViewMapping.get(F)}getCorrespondingViewText(F){if(s.i(S.f)(F))return null;const N=F.previousSibling;if(N){if(!this.isElement(N))return null;const M=this.getCorrespondingViewElement(N);if(M){const L=M.nextSibling;return L instanceof u.a?M.nextSibling:null}}else{const M=this.getCorrespondingViewElement(F.parentNode);if(M){const L=M.getChild(0);return L instanceof u.a?L:null}}return null}getCorrespondingDom(F){if(F instanceof f.a)return this.getCorrespondingDomElement(F);return F instanceof T.a?this.getCorrespondingDomDocumentFragment(F):F instanceof u.a?this.getCorrespondingDomText(F):null}getCorrespondingDomElement(F){return this._viewToDomMapping.get(F)}getCorrespondingDomDocumentFragment(F){return this._viewToDomMapping.get(F)}getCorrespondingDomText(F){const N=F.previousSibling;return N&&this.getCorrespondingDom(N)?this.getCorrespondingDom(N).nextSibling:!N&&F.parent&&this.getCorrespondingDom(F.parent)?this.getCorrespondingDom(F.parent).childNodes[0]:null}focus(F){const N=this.getCorrespondingDomElement(F);N&&N.ownerDocument.activeElement!==N&&N.focus()}isText(F){return F&&F.nodeType==Node.TEXT_NODE}isElement(F){return F&&F.nodeType==Node.ELEMENT_NODE}isDocumentFragment(F){return F&&F.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isDomSelectionBackward(F){if(F.isCollapsed)return!1;const N=new Range;N.setStart(F.anchorNode,F.anchorOffset),N.setEnd(F.focusNode,F.focusOffset);const M=N.collapsed;return N.detach(),M}_processDataFromViewText(F){let N=F.data;if(F.getAncestors().some((q)=>this.preElements.includes(q.name)))return N;const M=this._getTouchingViewTextNode(F,!1),L=this._getTouchingViewTextNode(F,!0);let I=N.match(/ *$/)[0],D=N.substr(0,N.length-I.length);if(M&&' '!=M.data.charAt(M.data.length-1)||(D=D.replace(/^ /,'\xA0')),D=D.replace(/ /g,' \xA0'),0d()),s.i(f.a)().for(F.modelToView).fromElement('image').toElement(()=>s.i(C.c)(d(),N('image widget'))),s.i(w.a)([F.modelToView,R.modelToView],'src'),s.i(w.a)([F.modelToView,R.modelToView],'alt'),R.viewToModel.on('element:figure',s.i(w.b)())}}r.a=S},function(o,r,s){'use strict';var d=s(515),u=s(62),f=s(182),h=s(40);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const w=f.a.arrowVerticalOffset,C={south(P,S){return{top:P.bottom+w,left:P.left+P.width/2-S.width/2,name:'s'}},north(P,S){return{top:P.top-S.height-w,left:P.left+P.width/2-S.width/2,name:'n'}}};class T extends f.a{constructor(P){super(P.locale),this.editor=P;const S=P.editing.view;this.listenTo(P.ui.focusTracker,'change:isFocused',(E,O,V,R)=>{R&&!V&&this.detach()}),P.listenTo(S,'render',()=>{const E=S.selection.getSelectedElement();E&&s.i(h.a)(E)||this.detach()},{priority:'low'}),this._throttledAttach=s.i(d.a)(()=>{this._attach()},100)}init(){return this.editor.ui.focusTracker.add(this.element),super.init()}attach(){this._attach(),this.editor.ui.view.listenTo(u.a.window,'scroll',this._throttledAttach),this.editor.ui.view.listenTo(u.a.window,'resize',this._throttledAttach)}detach(){this.hide(),this.editor.ui.view.stopListening(u.a.window,'scroll',this._throttledAttach),this.editor.ui.view.stopListening(u.a.window,'resize',this._throttledAttach)}_attach(){const P=this.editor.editing.view;this.attachTo({target:P.domConverter.viewRangeToDom(P.selection.getFirstRange()),positions:[C.north,C.south]})}}r.a=T},function(o,r,s){'use strict';var d=s(6),u=s(2),f=s(183),h=s(40),w=s(171);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends u.a{constructor(T){super(T),T.config.set('image.defaultToolbar',[]),this.isEnabled=!0}afterInit(){const T=this.editor,P=T.config.get('image.toolbar')||T.config.get('image.defaultToolbar');if(P.length){const S=this._panel=new w.a(T),E=[],O=new f.a;return d.a.extend(S.template,{attributes:{class:['ck-toolbar__container']}}),E.push(S.content.add(O)),E.push(O.fillFromConfig(P,T.ui.componentFactory)),E.push(T.ui.view.body.add(S)),this.listenTo(this.editor.editing.view,'render',()=>{this.isEnabled&&this.show()},{priority:'low'}),this.listenTo(T.ui.focusTracker,'change:isFocused',(V,R,F,N)=>{!N&&F&&this.isEnabled&&this.show()}),Promise.all(E)}}show(){const T=this.editor.editing.view.selection.getSelectedElement();T&&s.i(h.a)(T)&&this._panel.attach()}hide(){this._panel.detach()}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(115);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{init(){let h;this.editor.editing.modelToView.on('selection',(w,C,T,P)=>{h&&h.hasClass(u.c)&&h.removeClass(u.c);const S=P.viewSelection,E=S.getSelectedElement();E&&s.i(u.b)(E)&&(S.setFake(!0,{label:s.i(u.d)(E)}),E.addClass(u.c),h=E)},{priority:'low'})}}r.a=f},function(o,r,s){'use strict';function u(w,C,T){let P=w.textNode||(T?w.nodeBefore:w.nodeAfter),S=null;for(;P&&P.getAttribute('linkHref')==C;)S=P,P=T?P.previousSibling:P.nextSibling;return S?h.a.createAt(S,T?'before':'after'):w}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */var f=s(3),h=s(1);r.a=function(w,C){return new f.a(u(w,C,!0),u(w,C,!1))}},function(o,r,s){'use strict';var d=s(112);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{}r.a=u},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return Array.from(u.getAncestors()).find((f)=>'listItem'==f.name)||null}},function(o,r,s){'use strict';var d=s(184);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u{constructor(f,h=20){this.document=f,this.size=0,this.limit=h,this.isLocked=!1,this._changeCallback=(w,C,T,P)=>{this._onBatch(P)},this._selectionChangeCallback=()=>{this._reset()},f.on('change',this._changeCallback),f.selection.on('change:range',this._selectionChangeCallback),f.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(f){this.size+=f,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(f){'transparent'!=f.type&&f!==this._batch&&1>=s.i(d.a)(f.getOperations())&&this._reset(!0)}_reset(f){(!this.isLocked||f)&&(this._batch=null,this.size=0)}}r.a=u},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function({emitter:u,activator:f,callback:h,contextElement:w}){u.listenTo(document,'mouseup',(C,{target:T})=>{f()&&!w.contains(T)&&h()})}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function({view:u}){u.listenTo(u.element,'submit',(f,h)=>{h.preventDefault(),u.fire('submit')},{useCapture:!0})}},function(o,r,s){'use strict';var d=s(9),u=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h),this.set('value'),this.set('id');const w=this.bindTemplate;this.template=new u.a({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:w.to('id')}}),this.on('change:value',(C,T,P)=>this.element.value=P||'')}select(){this.element.select()}focus(){this.element.focus()}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(68),h=s(396);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{constructor(C,T){super(C);const P=`ck-input-${s.i(f.a)()}`;this.set('label'),this.set('value'),this.labelView=this._createLabelView(P),this.inputView=this._createInputView(T,P),this.template=new u.a({tag:'div',children:[this.labelView,this.inputView]})}_createLabelView(C){const T=new h.a(this.locale);return T.for=C,T.bind('text').to(this,'label'),T}_createInputView(C,T){const P=new C(this.locale);return P.id=T,P.bind('value').to(this),P}select(){this.inputView.select()}focus(){this.inputView.focus()}}r.a=w},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(415),h=s(187);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const w=s.i(h.a)('px');class C extends d.a{constructor(T){super(T);const P=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','se'),this.set('isVisible',!1),this.content=this.createCollection(),this.template=new u.a({tag:'div',attributes:{class:['ck-balloon-panel',P.to('position',(S)=>`ck-balloon-panel_arrow_${S}`),P.if('isVisible','ck-balloon-panel_visible')],style:{top:P.to('top',w),left:P.to('left',w),maxWidth:P.to('maxWidth',w)},tabindex:-1},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(T){this.show();const P=C.defaultPositions,S=Object.assign({},{element:this.element,positions:[P.se,P.sw,P.ne,P.nw],limiter:document.body,fitInViewport:!0},T),{top:E,left:O,name:V}=s.i(f.a)(S);Object.assign(this,{top:E,left:O,position:V})}}r.a=C,C.arrowHorizontalOffset=30,C.arrowVerticalOffset=15,C.defaultPositions={se:(T)=>({top:T.bottom+C.arrowVerticalOffset,left:T.left+T.width/2-C.arrowHorizontalOffset,name:'se'}),sw:(T,P)=>({top:T.bottom+C.arrowVerticalOffset,left:T.left+T.width/2-P.width+C.arrowHorizontalOffset,name:'sw'}),ne:(T,P)=>({top:T.top-P.height-C.arrowVerticalOffset,left:T.left+T.width/2-C.arrowHorizontalOffset,name:'ne'}),nw:(T,P)=>({top:T.top-P.height-C.arrowVerticalOffset,left:T.left+T.width/2-P.width+C.arrowHorizontalOffset,name:'nw'})}},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(63),h=s(117),w=s(64),C=s(402);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T extends d.a{constructor(P){super(P),this.items=this.createCollection(),this.focusTracker=new f.a,this.keystrokes=new w.a,this._focusCycler=new h.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.template=new u.a({tag:'div',attributes:{class:['ck-toolbar']},children:this.items}),this.items.on('add',(S,E)=>{this.focusTracker.add(E.element)}),this.items.on('remove',(S,E)=>{this.focusTracker.remove(E.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}fillFromConfig(P,S){return P?Promise.all(P.map((E)=>{const O='|'==E?new C.a:S.create(E);return this.items.add(O)})):Promise.resolve()}}r.a=T},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){let f=0;for(let h of u)f++;return f}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u,f,h){function w(N){const M=(V[N-1]===void 0?-1:V[N-1])+1,L=V[N+1]===void 0?-1:V[N+1],I=M>L?-1:1;O[N+I]&&(O[N]=O[N+I].slice(0)),O[N]||(O[N]=[]),O[N].push(M>L?C:T);let D=_Mathmax(M,L),q=D-N;for(;qE;F--)V[F]=w(F);V[E]=w(E),R++}while(V[E]!==S);return O[E].slice(1)}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){const f=[];for(;u&&u.nodeType!=Node.DOCUMENT_NODE;)f.unshift(u),u=u.parentNode;return f}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return(f)=>f+u}},function(o,r,s){'use strict';var d=s(52),u=s(30),f=s.i(d.a)(u.a,'Map');r.a=f},function(o,r,s){'use strict';var d=s(52),u=s(30),f=s.i(d.a)(u.a,'Set');r.a=f},function(o,r,s){'use strict';var d=s(30),u=d.a.Uint8Array;r.a=u},function(o,r){'use strict';r.a=function(u,f,h){var w=h.length;return 0===w?u.call(f):1===w?u.call(f,h[0]):2===w?u.call(f,h[0],h[1]):3===w?u.call(f,h[0],h[1],h[2]):u.apply(f,h)}},function(o,r){'use strict';r.a=function(u,f,h,w){var C=-1,T=u.length;for(w&&T&&(h=u[++C]);++CR))return!1;var N=O.get(C);if(N)return N==T;var M=-1,L=!0,I=E&1?new u.a:void 0;for(O.set(C,T);++MP)return[];for(var O=0,V=0,R=Array(w(E/P));OT&&(T=_Mathmax(P+T,0)),s.i(u.a)(w,C,T)):-1}},function(o,r,s){'use strict';var u=s(143);r.a=function(f){return s.i(u.a)(f,1)}},function(o,r,s){'use strict';var d=s(27),u=s(127),f=s(135),h=s(8),w=s.i(h.a)(function(C){var T=s.i(d.a)(C,f.a);return T.length&&T[0]===C[0]?s.i(u.a)(T):[]});r.a=w},function(o,r,s){'use strict';var d=s(27),u=s(127),f=s(10),h=s(135),w=s(18),C=s(8),T=s.i(C.a)(function(P){var S=s.i(w.a)(P),E=s.i(d.a)(P,h.a);return S===s.i(w.a)(E)?S=void 0:E.pop(),E.length&&E[0]===P[0]?s.i(u.a)(E,s.i(f.a)(S)):[]});r.a=T},function(o,r,s){'use strict';var d=s(27),u=s(127),f=s(135),h=s(18),w=s(8),C=s.i(w.a)(function(T){var P=s.i(h.a)(T),S=s.i(d.a)(T,f.a);return P===s.i(h.a)(S)?P=void 0:S.pop(),S.length&&S[0]===T[0]?s.i(u.a)(S,void 0,P):[]});r.a=C},function(o,r,s){'use strict';var u=s(146),f=s(89),h=s(14),w=s(207),C=/[\\^$.*+?()[\]{}|]/g,T=/^\[object .+?Constructor\]$/,P=Object.prototype,S=Function.prototype.toString,E=P.hasOwnProperty,O=RegExp('^'+S.call(E).replace(C,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');r.a=function(V){if(!s.i(h.a)(V))return!1;var R=s.i(u.a)(V)||s.i(f.a)(V)?O:T;return R.test(s.i(w.a)(V))}},function(o,r){'use strict';var u=Array.prototype,f=u.join;r.a=function(h,w){return h?f.call(h,w):''}},function(o,r,s){'use strict';var u=s(204),f=s(15);r.a=function(C,T,P){var S=C?C.length:0;if(!S)return-1;var E=S;if(void 0!==P&&(E=s.i(f.a)(P),E=(0>E?_Mathmax(S+E,0):_Mathmin(E,S-1))+1),T!==T)return s.i(u.a)(C,E,!0);for(;E--;)if(C[E]===T)return E;return-1}},function(o,r,s){'use strict';var u=s(445),f=s(15);r.a=function(h,w){return h&&h.length?s.i(u.a)(h,s.i(f.a)(w)):void 0}},function(o,r,s){'use strict';var d=s(148),u=s(8),f=s.i(u.a)(d.a);r.a=f},function(o,r,s){'use strict';var u=s(10),f=s(130);r.a=function(h,w,C){return h&&h.length&&w&&w.length?s.i(f.a)(h,w,s.i(u.a)(C)):h}},function(o,r,s){'use strict';var u=s(130);r.a=function(f,h,w){return f&&f.length&&h&&h.length?s.i(u.a)(f,h,void 0,w):f}},function(o,r,s){'use strict';var d=s(27),u=s(432),f=s(23),h=s(196),w=s(458),C=s(36),T=s(8),P=s.i(T.a)(function(S,E){E=s.i(f.a)(E,1);var O=S?S.length:0,V=s.i(u.a)(S,E);return s.i(h.a)(S,s.i(d.a)(E,function(R){return s.i(C.a)(R,O)?+R:R}).sort(w.a)),V});r.a=P},function(o,r,s){'use strict';var u=s(10),f=s(196);r.a=function(h,w){var C=[];if(!(h&&h.length))return C;var T=-1,P=[],S=h.length;for(w=s.i(u.a)(w,3);++Tw?0:w)):[]}},function(o,r,s){'use strict';var u=s(35),f=s(15);r.a=function(h,w,C){var T=h?h.length:0;return T?(w=C||void 0===w?1:s.i(f.a)(w),w=T-w,s.i(u.a)(h,0>w?0:w,T)):[]}},function(o,r,s){'use strict';var u=s(10),f=s(86);r.a=function(h,w){return h&&h.length?s.i(f.a)(h,s.i(u.a)(w,3),!1,!0):[]}},function(o,r,s){'use strict';var u=s(10),f=s(86);r.a=function(h,w){return h&&h.length?s.i(f.a)(h,s.i(u.a)(w,3)):[]}},function(o,r,s){'use strict';var u=s(146),f=s(14),h=s(44),w=0/0,C=/^\s+|\s+$/g,T=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,S=/^0o[0-7]+$/i,E=parseInt;r.a=function(O){if('number'==typeof O)return O;if(s.i(h.a)(O))return w;if(s.i(f.a)(O)){var V=s.i(u.a)(O.valueOf)?O.valueOf():O;O=s.i(f.a)(V)?V+'':V}if('string'!=typeof O)return 0===O?O:+O;O=O.replace(C,'');var R=P.test(O);return R||S.test(O)?E(O.slice(2),R?2:8):T.test(O)?w:+O}},function(o,r,s){'use strict';var d=s(23),u=s(42),f=s(13),h=s(8),w=s.i(h.a)(function(C){return s.i(u.a)(s.i(d.a)(C,1,f.a,!0))});r.a=w},function(o,r,s){'use strict';var d=s(23),u=s(10),f=s(42),h=s(13),w=s(18),C=s(8),T=s.i(C.a)(function(P){var S=s.i(w.a)(P);return s.i(h.a)(S)&&(S=void 0),s.i(f.a)(s.i(d.a)(P,1,h.a,!0),s.i(u.a)(S))});r.a=T},function(o,r,s){'use strict';var d=s(23),u=s(42),f=s(13),h=s(18),w=s(8),C=s.i(w.a)(function(T){var P=s.i(h.a)(T);return s.i(f.a)(P)&&(P=void 0),s.i(u.a)(s.i(d.a)(T,1,f.a,!0),void 0,P)});r.a=C},function(o,r,s){'use strict';var u=s(42);r.a=function(f){return f&&f.length?s.i(u.a)(f):[]}},function(o,r,s){'use strict';var u=s(10),f=s(42);r.a=function(h,w){return h&&h.length?s.i(f.a)(h,s.i(u.a)(w)):[]}},function(o,r,s){'use strict';var u=s(42);r.a=function(f,h){return f&&f.length?s.i(u.a)(f,void 0,h):[]}},function(o,r,s){'use strict';var d=s(66),u=s(13),f=s(8),h=s.i(f.a)(function(w,C){return s.i(u.a)(w)?s.i(d.a)(w,C):[]});r.a=h},function(o,r,s){'use strict';var d=s(82),u=s(133),f=s(13),h=s(8),w=s.i(h.a)(function(C){return s.i(u.a)(s.i(d.a)(C,f.a))});r.a=w},function(o,r,s){'use strict';var d=s(82),u=s(10),f=s(133),h=s(13),w=s(18),C=s(8),T=s.i(C.a)(function(P){var S=s.i(w.a)(P);return s.i(h.a)(S)&&(S=void 0),s.i(f.a)(s.i(d.a)(P,h.a),s.i(u.a)(S))});r.a=T},function(o,r,s){'use strict';var d=s(82),u=s(133),f=s(13),h=s(18),w=s(8),C=s.i(w.a)(function(T){var P=s.i(h.a)(T);return s.i(f.a)(P)&&(P=void 0),s.i(u.a)(s.i(d.a)(T,f.a),void 0,P)});r.a=C},function(o,r,s){'use strict';var d=s(8),u=s(98),f=s.i(d.a)(u.a);r.a=f},function(o,r,s){'use strict';var u=s(65),f=s(199);r.a=function(h,w){return s.i(f.a)(h||[],w||[],u.a)}},function(o,r,s){'use strict';var u=s(447),f=s(199);r.a=function(h,w){return s.i(f.a)(h||[],w||[],u.a)}},function(o,r,s){'use strict';var d=s(8),u=s(149),f=s.i(d.a)(function(h){var w=h.length,C=1 * {\n margin-right: 0.4em; }\n .ck-toolbar > *:last-child {\n margin-right: 0; }\n\n.ck-dropdown::after {\n border-style: solid;\n border-width: .4em .4em 0 .4em;\n border-color: #707070 transparent;\n right: 0.8em; }\n\n.ck-dropdown .ck-button.ck-dropdown__button {\n padding-right: 1.6em; }\n .ck-dropdown .ck-button.ck-dropdown__button .ck-button__label {\n width: 7em;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n.ck-dropdown__panel {\n border: 1px solid #b9b9b9;\n bottom: 1px;\n background: white;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2); }\n .ck-dropdown__panel.ck-rounded-corners,\n .ck-rounded-corners .ck-dropdown__panel {\n border-radius: 2px; }\n\n.ck-list {\n list-style-type: none;\n background: white; }\n .ck-list.ck-rounded-corners,\n .ck-rounded-corners .ck-list {\n border-radius: 2px; }\n .ck-list__item {\n padding: 0.64em 0.64em 0.64em 0;\n cursor: pointer;\n min-width: 12em; }\n .ck-list__item::before {\n content: "";\n display: inline-block;\n width: 12px;\n font-weight: normal;\n font-size: 12px;\n text-align: center;\n margin: 0 6px; }\n .ck-list__item:hover, .ck-list__item:focus {\n background: #f7f7f7; }\n .ck-list__item:focus {\n box-shadow: 0 0 3px 2px #9bcdfb;\n position: relative;\n z-index: 1;\n outline: none; }\n .ck-list__item:last-of-type {\n border: none; }\n .ck-list__item_active {\n background: #ebebeb; }\n .ck-list__item_active::before {\n content: "\\2713"; }\n .ck-list__item_active:hover, .ck-list__item_active:focus {\n background: #dedede; }\n\n.ck-label {\n font-weight: bold; }\n\n.ck-input-text {\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n border: 1px solid #b9b9b9;\n padding: 0.64em;\n min-width: 250px; }\n .ck-input-text.ck-rounded-corners,\n .ck-rounded-corners .ck-input-text {\n border-radius: 2px; }\n .ck-input-text:focus {\n outline: none;\n border: 1px solid #6ab5f9;\n box-shadow: 0 0 3px 2px #9bcdfb, 2px 2px 3px #e6e6e6 inset; }\n\n.ck-balloon-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n min-width: 50px;\n min-height: 15px;\n background: white;\n border: 1px solid #b9b9b9; }\n .ck-balloon-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-balloon-panel {\n border-radius: 2px; }\n .ck-balloon-panel:before, .ck-balloon-panel:after {\n width: 0;\n height: 0;\n border-style: solid; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n border-width: 0 10px 15px 10px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\n border-color: transparent transparent #b9b9b9 transparent; }\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\n border-color: transparent transparent white transparent;\n margin-top: 2px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n border-width: 15px 10px 0 10px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\n border-color: #b9b9b9 transparent transparent; }\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\n border-color: white transparent transparent transparent;\n margin-bottom: 2px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after {\n left: 50%;\n margin-left: -10px;\n top: -15px; }\n .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after {\n left: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n right: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after {\n left: 50%;\n margin-left: -10px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after {\n left: 20px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n right: 20px;\n bottom: -15px; }\n\n.ck-floating-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n background: #f7f7f7; }\n .ck-floating-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-floating-panel {\n border-radius: 2px; }\n\n.ck-toolbar__container {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar {\n border-radius: 0;\n border: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-toolbar__container .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-toolbar__container.ck-balloon-panel_arrow_s:after, .ck-toolbar__container.ck-balloon-panel_arrow_se:after, .ck-toolbar__container.ck-balloon-panel_arrow_sw:after {\n border-bottom-color: #f7f7f7; }\n .ck-toolbar__container.ck-balloon-panel_arrow_n:after, .ck-toolbar__container.ck-balloon-panel_arrow_ne:after, .ck-toolbar__container.ck-balloon-panel_arrow_nw:after {\n border-top-color: #f7f7f7; }\n\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n border-width: 0 0 1px;\n background: #f7f7f7; }\n\n.ck-editor {\n position: relative; }\n .ck-editor.ck-rounded-corners,\n .ck-rounded-corners .ck-editor {\n border-radius: 2px; }\n .ck-editor .ck-editor__top .ck-toolbar {\n border-radius: 0;\n border-top: 0;\n border-left: 0;\n border-right: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-editor .ck-editor__main {\n background: white; }\n .ck-editor .ck-editor__bottom {\n border-bottom: 0;\n border-left: 0;\n border-right: 0;\n padding: 0.8em; }\n .ck-editor .ck-editor__editable.ck-focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset; }\n .ck-editor .ck-editor__editable_inline {\n overflow: auto;\n padding: 0 0.8em; }\n\n.ck-editor,\n.ck-editor-bottom {\n background: #f7f7f7;\n border: 1px solid #b9b9b9; }\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'.ck-heading_heading1 {\n font-size: 1.5em; }\n\n.ck-heading_heading2 {\n font-size: 1.3em; }\n\n.ck-heading_heading3 {\n font-size: 1.1em; }\n\n[class*="ck-heading_heading"] {\n font-weight: bold; }\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'@charset "UTF-8";\n/**\n * Colors configured by the user.\n *\n * @type Map\n * @example\n *\t\t$ck-colors: ( \'foreground\': red );\n * @see $_ck-colors\n */\n/**\n * Internal map with default colors.\n *\n * @type Map\n * @see ck-color-add\n */\n/**\n * Returns a color of given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $_ck-colors\n */\n/**\n * Returns a border\u2013color for a given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $ck-color\n */\n/**\n * Adds a color to internal color map.\n *\n * @example\n *\t\t@include ck-color-add( ( \'special\': yellow, \'hover\': #00FF00 ) );\n * @param {Map} $map - A map with new colors.\n * @see $_ck-colors\n */\n/**\n * A visual style of element\'s inner shadow (i.e. input).\n */\n/**\n * A visual style of element\'s drop shadow (i.e. panel).\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n/**\n * A visual style of focused element\'s outer shadow.\n */\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * A class which indicates that an element holding it is disabled.\n */\n.ck-disabled {\n opacity: .5; }\n\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * Brings visual styling for :focus state.\n */\n.ck-widget.image figcaption {\n background-color: #f7f7f7;\n padding: 10px;\n font-size: .8em;\n color: #858585; }\n .ck-widget.image figcaption:focus {\n outline: none;\n box-shadow: none; }\n .ck-widget.image figcaption.focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n background-color: white; }\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.cke-text-alternative-form {\n padding: 1.2em;\n overflow: hidden; }\n .cke-text-alternative-form .ck-label {\n margin-bottom: 0.4em; }\n .cke-text-alternative-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .cke-text-alternative-form__actions .ck-button {\n float: right; }\n .cke-text-alternative-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .cke-text-alternative-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'.ck-widget {\n margin: 10px 0;\n padding: 0; }\n .ck-widget.ck-widget_selected, .ck-widget.ck-widget_selected:hover {\n outline: 2px solid #ace; }\n .ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected {\n outline: 2px solid #ddd; }\n .ck-widget:hover {\n outline: 2px solid yellow; }\n\n.image {\n text-align: center;\n clear: both; }\n .image.image-style-side {\n float: right;\n margin-left: 0.8em;\n max-width: 50%; }\n\n.image > img {\n display: block;\n margin: 0 auto;\n max-width: 100%; }\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.ck-link-form {\n padding: 1.2em;\n overflow: hidden; }\n .ck-link-form .ck-label {\n margin-bottom: 0.4em; }\n .ck-link-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .ck-link-form__actions .ck-button {\n float: right; }\n .ck-link-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .ck-link-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n',''])},function(o){o.exports='\n\n \n bold\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n\n \n italic\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n'},function(o){o.exports='\n'},function(o){o.exports='\n'},function(o){o.exports='\n\n \n link\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n\n \n unlink\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n\n \n bulletedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n\n \n numberedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n\n \n redo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(o){o.exports='\n\n \n undo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(o,r,s){var d=s(273);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(274);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(275);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(276);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(277);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(278);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){'use strict';var d=s(2),u=s(297),f=s(26),h=s(279),w=s.n(h);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends d.a{static get requires(){return[u.a]}init(){const T=this.editor,P=T.t,S=T.commands.get('bold'),E='CTRL+B';T.ui.componentFactory.add('bold',(O)=>{const V=new f.a(O);return V.set({label:P('Bold'),icon:w.a,keystroke:E,tooltip:!0}),V.bind('isOn','isEnabled').to(S,'value','isEnabled'),this.listenTo(V,'execute',()=>T.execute('bold')),V}),T.keystrokes.set(E,'bold')}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(154);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const w='bold';class C extends d.a{init(){const T=this.editor,P=T.data,S=T.editing;T.document.schema.allow({name:'$inline',attributes:[w]}),s.i(u.a)().for(P.modelToView,S.modelToView).fromAttribute(w).toElement('strong'),s.i(f.a)().for(P.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{'font-weight':'bold'}).toAttribute(w,!0),T.commands.set(w,new h.a(T,w))}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(299),f=s(26),h=s(280),w=s.n(h);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends d.a{static get requires(){return[u.a]}init(){const T=this.editor,P=T.t,S=T.commands.get('italic'),E='CTRL+I';T.ui.componentFactory.add('italic',(O)=>{const V=new f.a(O);return V.set({label:P('Italic'),icon:w.a,keystroke:E,tooltip:!0}),V.bind('isOn','isEnabled').to(S,'value','isEnabled'),this.listenTo(V,'execute',()=>T.execute('italic')),V}),T.keystrokes.set(E,'italic')}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(154);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const w='italic';class C extends d.a{init(){const T=this.editor,P=T.data,S=T.editing;T.document.schema.allow({name:'$inline',attributes:[w]}),s.i(u.a)().for(P.modelToView,S.modelToView).fromAttribute(w).toElement('em'),s.i(f.a)().for(P.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{'font-style':'italic'}).toAttribute(w,!0),T.commands.set(w,new h.a(T,w))}}r.a=C},function(o){var s=function(){return this}();try{s=s||Function('return this')()||(1,eval)('this')}catch(d){'object'==typeof window&&(s=window)}o.exports=s},function(o,r,s){'use strict';var d=s(2),u=s(302),f=s(305),h=s(304),w=s(158);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends d.a{init(){const T=this.editor,P=T.document,S=T.editing.view;this._htmlDataProcessor=new w.a,S.addObserver(u.a),this.listenTo(S,'paste',(O,V)=>{const R=V.dataTransfer;let F='';R.getData('text/html')?F=s.i(h.a)(R.getData('text/html')):R.getData('text/plain')&&(F=s.i(f.a)(R.getData('text/plain'))),F=this._htmlDataProcessor.toView(F),V.preventDefault(),S.fire('clipboardInput',{dataTransfer:R,content:F})},{priority:'low'}),this.listenTo(S,'clipboardInput',(O,V)=>{if(!V.content.isEmpty){const R=this.editor.data,F=R.toModel(V.content,'$clipboardHolder');P.enqueueChanges(()=>{R.insertContent(F,P.selection)})}},{priority:'low'});const E=(O,V)=>{const R=V.dataTransfer,F=T.data.toView(T.data.getSelectedContent(P.selection));V.preventDefault(),S.fire('clipboardOutput',{dataTransfer:R,content:F,method:O.name})};this.listenTo(S,'copy',E,{priority:'low'}),this.listenTo(S,'cut',E,{priority:'low'}),this.listenTo(S,'clipboardOutput',(O,V)=>{V.content.isEmpty||V.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(V.content)),'cut'==V.method&&P.enqueueChanges(()=>{T.data.deleteContent(P.selection,P.batch(),{merge:!0})})},{priority:'low'})}}r.a=C},function(o,r,s){'use strict';var d=s(61),u=s(303);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h),this.domEventType=['paste','copy','cut']}onDomEvent(h){this.fire(h.type,h,{dataTransfer:new u.a(h.clipboardData)})}}r.a=f},function(o,r){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(u){this._native=u}getData(u){return this._native.getData(u)}setData(u,f){this._native.setData(u,f)}}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return u.replace(/(\s+)<\/span>/g,(f,h)=>{return 1==h.length?' ':h})}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return u=u.replace(//g,'>').replace(/\n\n/g,'

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

')&&(u=`

${u}

`),u}},function(o,r,s){'use strict';var d=s(64);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{constructor(f){super(),this.editor=f}set(f,h){if('string'==typeof h){const w=h;h=()=>{this.editor.execute(w)}}super.set(f,h)}listenTo(f){this._listener.listenTo(f,'keydown',(h,w)=>{const C=this.press(w);C&&w.preventDefault()})}}r.a=u},function(o,r,s){'use strict';var d=s(7),u=s(407),f=s(309),h=s(520),w=s(313),C=s(328),T=s(0),P=s(4);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class S{constructor(E){const O=this.constructor.build&&this.constructor.build.plugins;this.config=new u.a(E,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',O),this.plugins=new f.a(this,O),this.commands=new Map,this.locale=new h.a(this.config.get('lang')),this.t=this.locale.t,this.document=new C.a,this.data=new w.a(this.document)}initPlugins(){function O(F,N){return F.reduce((M,L)=>{return M.then(L[N].bind(L))},Promise.resolve())}const V=this,R=this.config;return function(){return V.plugins.load(R.get('plugins')||[])}().then((F)=>{return O(F,'init').then(()=>O(F,'afterInit'))}).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),Promise.resolve().then(()=>{this.document.destroy(),this.data.destroy()})}execute(E,O){let V=this.commands.get(E);if(!V)throw new T.a('editor-command-not-found: Specified command has not been added to the editor.');V._execute(O)}static create(E){return new Promise((O)=>{const V=new this(E);O(V.initPlugins().then(()=>{V.fire('dataReady'),V.fire('ready')}).then(()=>V))})}}r.a=S,s.i(P.a)(S,d.a)},function(o,r,s){'use strict';var d=s(307),u=s(306),f=s(315),h=s(410),w=s(418);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends d.a{constructor(T,P){super(P),this.element=T,this.editing=new f.a(this.document),this.keystrokes=new u.a(this),this.keystrokes.listenTo(this.editing.view)}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(T){this.data.set(T)}getData(){return this.data.get()}updateEditorElement(){s.i(w.a)(this.element,this.getData())}loadDataFromEditorElement(){this.setData(s.i(h.a)(this.element))}static create(T,P){return new Promise((S)=>{const E=new this(T,P);S(E.initPlugins().then(()=>{E.fire('dataReady'),E.fire('ready')}).then(()=>E))})}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(0),f=s(57);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h{constructor(w,C=[]){this._editor=w,this._availablePlugins=new Map,this._plugins=new Map;for(const T of C)this._availablePlugins.set(T,T),T.pluginName&&this._availablePlugins.set(T.pluginName,T)}*[Symbol.iterator](){for(const w of this._plugins)'function'==typeof w[0]&&(yield w)}get(w){return this._plugins.get(w)}load(w,C=[]){function T(q){return I.includes(q)||R.get(q)||N.has(q)?void 0:P(q).catch((z)=>{throw f.a.error('plugincollection-load: It was not possible to load the plugin.',{plugin:q}),z})}function P(q){return new Promise((z)=>{N.add(q),E(q),q.requires&&q.requires.forEach((K)=>{const H=S(K);if(C.includes(H))throw new u.a('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:H,requiredBy:q});T(H)});const $=new q(F);R._add(q,$),M.push($),z()})}function S(q){return'function'==typeof q?q:R._availablePlugins.get(q)}function E(q){if(!(q.prototype instanceof d.a))throw new u.a('plugincollection-instance: The loaded plugin module is not an instance of Plugin.',{plugin:q})}function V(q){return q.map((z)=>S(z)).filter((z)=>!!z)}const R=this,F=this._editor,N=new Set,M=[],L=V(w),I=V(C),D=function(q){const z=[];for(const $ of q)S($)||z.push($);return z.length?z:null}(w);if(D){const q='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return f.a.error(q,{plugins:D}),Promise.reject(new u.a(q,{plugins:D}))}return Promise.all(L.map(T)).then(()=>M)}_add(w,C){this._plugins.set(w,C),w.pluginName&&this._plugins.set(w.pluginName,C)}}r.a=h},function(o,r,s){'use strict';var d=s(308),u=s(158),f=s(311),h=s(312),w=s(419),C=s(290),T=s.n(C);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class P extends d.a{constructor(S,E){super(S,E),this.document.createRoot(),this.data.processor=new u.a,this.ui=new f.a(this,new h.a(this.locale)),this._elementReplacer=new w.a}destroy(){return this.updateEditorElement(),this._elementReplacer.restore(),this.ui.destroy().then(()=>super.destroy())}static create(S,E){return new Promise((O)=>{const V=new P(S,E);O(V.initPlugins().then(()=>V._elementReplacer.replace(S,V.ui.view.element)).then(()=>V.ui.init()).then(()=>V.fire('uiReady')).then(()=>V.editing.view.attachDomRoot(V.ui.view.editableElement)).then(()=>V.loadDataFromEditorElement()).then(()=>{V.fire('dataReady'),V.fire('ready')}).then(()=>V))})}}r.a=P},function(o,r,s){'use strict';var d=s(386),u=s(63),f=s(400);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(w,C){this.editor=w,this.view=C,this.componentFactory=new d.a(w),this.focusTracker=new u.a,C.set('width',w.config.get('ui.width')),C.set('height',w.config.get('ui.height')),C.toolbar.bind('isActive').to(this.focusTracker,'isFocused'),C.toolbar.limiterElement=C.element;const T=w.editing.createRoot('div');C.editable.bind('isReadOnly').to(T),C.editable.bind('isFocused').to(w.editing.view),C.editable.name=T.rootName,this.focusTracker.add(C.editableElement)}init(){const w=this.editor;return this.view.init().then(()=>{return this.view.toolbar.fillFromConfig(w.config.get('toolbar'),this.componentFactory)}).then(()=>{s.i(f.a)({origin:w.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:w.keystrokes,toolbar:this.view.toolbar})})}destroy(){return this.view.destroy()}}},function(o,r,s){'use strict';var d=s(393),u=s(392),f=s(401);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{constructor(w){super(w),this.toolbar=new f.a(w),this.editable=new u.a(w),this.top.add(this.toolbar),this.main.add(this.editable)}get editableElement(){return this.editable.element}}r.a=h},function(o,r,s){'use strict';var d=s(4),u=s(7),f=s(155),h=s(157),w=s(99),C=s(323),T=s(321),P=s(113),S=s(3),E=s(1),O=s(317),V=s(314),R=s(318),F=s(316);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class N{constructor(M,L){this.model=M,this.processor=L,this.mapper=new f.a,this.modelToView=new h.a(this.model,{mapper:this.mapper}),this.modelToView.on('insert:$text',s.i(w.j)(),{priority:'lowest'}),this.viewToModel=new C.a({schema:M.schema}),this.viewToModel.on('text',s.i(T.a)(),{priority:'lowest'}),this.viewToModel.on('element',s.i(T.b)(),{priority:'lowest'}),this.viewToModel.on('documentFragment',s.i(T.b)(),{priority:'lowest'}),this.on('insertContent',(I,D)=>s.i(O.a)(this,D.content,D.selection,D.batch)),this.on('deleteContent',(I,D)=>s.i(V.a)(D.selection,D.batch,D.options)),this.on('modifySelection',(I,D)=>s.i(R.a)(this,D.selection,D.options)),this.on('getSelectedContent',(I,D)=>{D.content=s.i(F.a)(D.selection)})}get(M='main'){return this.stringify(this.model.getRoot(M))}stringify(M){const L=this.toView(M);return this.processor.toData(L)}toView(M){const L=S.a.createIn(M),I=new P.a;return this.mapper.bindElements(M,I),this.modelToView.convertInsertion(L),this.mapper.clearBindings(),I}set(M,L='main'){const I=this.model.getRoot(L);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(S.a.createIn(I)).insert(E.a.createAt(I,0),this.parse(M))})}parse(M,L='$root'){const I=this.processor.toView(M);return this.toModel(I,L)}toModel(M,L='$root'){return this.viewToModel.convert(M,{context:[L]})}destroy(){}insertContent(M,L,I){this.fire('insertContent',{content:M,selection:L,batch:I})}deleteContent(M,L,I){this.fire('deleteContent',{batch:L,selection:M,options:I})}modifySelection(M,L){this.fire('modifySelection',{selection:M,options:L})}getSelectedContent(M){const L={selection:M};return this.fire('getSelectedContent',L),L.content}}r.a=N,s.i(d.a)(N,u.a)},function(o,r,s){'use strict';function u(S,E,O){const V=O.path,R=_Mathmin(E.path.length-1,V.length-1);let F=s.i(P.a)(E.path,V);if('number'==typeof F)for(;F{this.modelToView.convertChange(O,V)},{priority:'low'}),this._listener.listenTo(this.model,'changesDone',()=>{const E=this.model.selection;this.modelToView.convertSelection(E),this.view.render()},{priority:'low'}),this._listener.listenTo(this.model.markers,'add',(E,O)=>{this.modelToView.convertMarker('addMarker',O.name,O.getRange())}),this._listener.listenTo(this.model.markers,'remove',(E,O)=>{this.modelToView.convertMarker('removeMarker',O.name,O.getRange())}),this._listener.listenTo(this.view,'selectionChange',s.i(w.a)(this.model,this.mapper)),this.modelToView.on('insert:$text',s.i(h.j)(),{priority:'lowest'}),this.modelToView.on('remove',s.i(h.k)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.c)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.d)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.e)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.f)(),{priority:'low'})}createRoot(S,E='main'){const O=this.view.createRoot(S,E),V=this.model.getRoot(E);return this.mapper.bindElements(V,O),O}destroy(){this.view.destroy(),this._listener.stopListening()}}},function(o,r,s){'use strict';function u(P){const S=[];Array.from(P.getItems({direction:'backward'})).map((E)=>h.a.createOn(E)).filter((E)=>{const O=(E.start.isAfter(P.start)||E.start.isEqual(P.start))&&(E.end.isBefore(P.end)||E.end.isEqual(P.end));return O}).forEach((E)=>{S.push(E.start.parent),s.i(T.c)(E)}),S.forEach((E)=>{for(let O=E;O.parent&&O.isEmpty;){const V=h.a.createOn(O);O=O.parent,s.i(T.c)(V)}})}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */var f=s(49),h=s(3),w=s(1),C=s(24),T=s(20);r.a=function(P){const S=new f.a,E=P.getFirstRange();if(!E||E.isCollapsed)return S;const O=E.start.root,V=E.start.getCommonPath(E.end),R=O.getNodeByPath(V);let F=E.start.parent==E.end.parent?E:h.a.createFromParentsAndOffsets(R,E.start.path[V.length],R,E.end.path[V.length]+1);const N=F.end.offset-F.start.offset;for(const M of F.getItems({shallow:!0}))M.is('textProxy')?S.appendChildren(new C.a(M.data,M.getAttributes())):S.appendChildren(M.clone(!0));if(F!=E){const M=E._getTransformedByMove(F.start,w.a.createAt(S,0),N)[0],L=new h.a(w.a.createAt(S),M.start),I=new h.a(M.end,w.a.createAt(S,'end'));u(I),u(L)}return S}},function(o,r,s){'use strict';var u=s(1),f=s(162),h=s(5),w=s(3),C=s(57);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(P,S,E,O){O||(O=P.model.batch()),E.isCollapsed||P.deleteContent(E,O,{merge:!0});const V=new T(P,O,E.anchor);V.handleNodes(S.getChildren(),{isFirst:!0,isLast:!0});const R=V.getSelectionRange();R?E.setRanges([R]):C.a.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')};class T{constructor(P,S,E){this.dataController=P,this.batch=S,this.position=E,this.canMergeWith=new Set([this.position.parent]),this.schema=P.model.schema}handleNodes(P,S){P=Array.from(P);for(let E=0;E!0);if(S.schema.check({name:'$text',inside:E.nextPosition}))return E.nextPosition}}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function f(S,E){const O=S.position.textNode;if(O){const V=O.data;for(let R=S.position.offset-O.startOffset;s.i(P.a)(V,R)||'character'==E&&s.i(P.b)(V,R);)S.next(),R=S.position.offset-O.startOffset}return S.position}function h(S,E){const O=S.root,V=w.a.createAt(O,E?'end':0);return E?new T.a(S,V):new T.a(V,S)}var w=s(1),C=s(33),T=s(3),P=s(271);r.a=function(S,E,O={}){const V=S.model.schema,R='backward'!=O.direction,F=O.unit?O.unit:'character',N=E.focus,M=new C.a({boundaries:h(N,R),singleCharacters:!0,direction:R?'forward':'backward'}),L={walker:M,schema:V,isForward:R,unit:F};for(let I;I=M.next();){if(I.done)return;const D=u(L,I.value);if(D)return void E.setFocus(D)}}},function(o,r,s){'use strict';var d=s(72);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(f,h){f instanceof d.a&&(f=this._getSymbolForTextProxy(f)),this._consumable.has(f)||this._consumable.set(f,new Map),this._consumable.get(f).set(h,!0)}consume(f,h){return f instanceof d.a&&(f=this._getSymbolForTextProxy(f)),!!this.test(f,h)&&(this._consumable.get(f).set(h,!1),!0)}test(f,h){f instanceof d.a&&(f=this._getSymbolForTextProxy(f));const w=this._consumable.get(f);if(w===void 0)return null;const C=w.get(h);return void 0===C?null:C}revert(f,h){f instanceof d.a&&(f=this._getSymbolForTextProxy(f));const w=this.test(f,h);return!1===w?(this._consumable.get(f).set(h,!0),!0):!0!==w&&null}_getSymbolForTextProxy(f){let h=null;const w=this._textProxyRegistry.get(f.startOffset);if(w){const C=w.get(f.endOffset);C&&(h=C.get(f.parent))}return h||(h=this._addSymbolForTextProxy(f.startOffset,f.endOffset,f.parent)),h}_addSymbolForTextProxy(f,h,w){const C=Symbol();let T,P;return T=this._textProxyRegistry.get(f),T||(T=new Map,this._textProxyRegistry.set(f,T)),P=T.get(h),P||(P=new Map,T.set(h,P)),P.set(w,C),C}}},function(o,r,s){'use strict';var u=s(59);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(f,h){return(w,C)=>{const T=C.newSelection,P=new u.a,S=[];for(let E of T.getRanges())S.push(h.toModelRange(E));P.setRanges(S,T.isBackward),P.isEqual(f.selection)||f.enqueueChanges(()=>{f.selection.setTo(P)})}}},function(o,r,s){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */var f=s(49),h=s(24),w=s(20);r.b=function(){return(C,T,P,S)=>{if(!T.output&&P.consume(T.input,{name:!0})){const E=S.convertChildren(T.input,P,T);T.output=new f.a(s.i(w.b)(E))}}},r.a=function(){return(C,T,P,S)=>{const E={name:'$text',inside:T.context};S.schema.check(E)&&P.consume(T.input)&&(T.output=new h.a(T.input.data))}}},function(o,r,s){'use strict';var d=s(11),u=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f{constructor(){this._consumables=new Map}add(w,C){let T;return w.is('text')||w.is('documentFragment')?void this._consumables.set(w,!0):void(this._consumables.has(w)?T=this._consumables.get(w):(T=new h,this._consumables.set(w,T)),T.add(C))}test(w,C){const T=this._consumables.get(w);return void 0===T?null:w.is('text')||w.is('documentFragment')?T:T.test(C)}consume(w,C){return!!this.test(w,C)&&(w.is('text')||w.is('documentFragment')?this._consumables.set(w,!1):this._consumables.get(w).consume(C),!0)}revert(w,C){const T=this._consumables.get(w);T!==void 0&&(w.is('text')||w.is('documentFragment')?this._consumables.set(w,!0):T.revert(C))}static consumablesFromElement(w){const C={name:!0,attribute:[],class:[],style:[]},T=w.getAttributeKeys();for(let E of T)'style'!=E&&'class'!=E&&C.attribute.push(E);const P=w.getClassNames();for(let E of P)C.class.push(E);const S=w.getStyleNames();for(let E of S)C.style.push(E);return C}static createFrom(w,C){if(C||(C=new f),w.is('text'))return C.add(w),C;w.is('element')&&C.add(w,f.consumablesFromElement(w)),w.is('documentFragment')&&C.add(w);for(let T of w.getChildren())C=f.createFrom(T,C);return C}}r.a=f;class h{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(w){for(let C in w.name&&(this._canConsumeName=!0),this._consumables)C in w&&this._add(C,w[C])}test(w){if(w.name&&!this._canConsumeName)return this._canConsumeName;for(let C in this._consumables)if(C in w){const T=this._test(C,w[C]);if(!0!==T)return T}return!0}consume(w){for(let C in w.name&&(this._canConsumeName=!1),this._consumables)C in w&&this._consume(C,w[C])}revert(w){for(let C in w.name&&(this._canConsumeName=!0),this._consumables)C in w&&this._revert(C,w[C])}_add(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T){if('attribute'===w&&('class'===S||'style'===S))throw new u.a('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');P.set(S,!0)}}_test(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T)if('attribute'===w&&('class'===S||'style'===S)){const E=this._test(S,[...this._consumables[S].keys()]);if(!0!==E)return E}else{const E=P.get(S);if(E===void 0)return null;if(!E)return!1}return!0}_consume(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T)'attribute'===w&&('class'===S||'style'===S)?this._consume(S,[...this._consumables[S].keys()]):P.set(S,!1)}_revert(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T)if('attribute'===w&&('class'===S||'style'===S))this._revert(S,[...this._consumables[S].keys()]);else{const E=P.get(S);!1===E&&P.set(S,!0)}}}},function(o,r,s){'use strict';function d(R){const F=new Set,N=new Map,M=new P.a({startPosition:T.a.createAt(R,0),ignoreElementEnd:!0});for(const L of M)'$marker'==L.item.name&&F.add(L.item);for(const L of F){const I=L.getAttribute('data-name'),D=T.a.createBefore(L);N.has(I)?N.get(I).end=T.a.createFromPosition(D):N.set(I,new C.a(T.a.createFromPosition(D))),s.i(O.c)(C.a.createOn(L))}return N}var u=s(322),f=s(7),h=s(4),w=s(56),C=s(3),T=s(1),P=s(33),S=s(58),E=s(49),O=s(20);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class V{constructor(R={}){this.conversionApi=s.i(w.a)({},R),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this)}convert(R,F={}){this.fire('viewCleanup',R);const N=u.a.createFrom(R),M=this._convertItem(R,N,F);if(!(M instanceof S.a||M instanceof E.a))return M;let L=M;return L.is('documentFragment')||(L=new E.a([L])),L.markers=d(L),L}_convertItem(R,F,N={}){const M=s.i(w.a)({},N,{input:R,output:null});return R.is('element')?this.fire('element:'+R.name,M,F,this.conversionApi):R.is('text')?this.fire('text',M,F,this.conversionApi):this.fire('documentFragment',M,F,this.conversionApi),M.output}_convertChildren(R,F,N={}){const M=Array.from(R.getChildren()),L=M.map((I)=>this._convertItem(I,F,N));return L.reduce((I,D)=>D?I.concat(D):I,[])}}r.a=V,s.i(h.a)(V,f.a)},function(o,r){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{getHtml(u){const f=document.implementation.createHTMLDocument(''),h=f.createElement('div');return h.appendChild(u),h.innerHTML}}},function(o,r,s){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */var d=s(159),u=s(100),f=s(101),h=s(102),w=s(103),C=s(160),T=s(104),P=s(106),S=s(161),E=s(107)},function(o,r,s){'use strict';function d(H,U){const W=H.clone(),Z=W.operations[0];return Z.oldRange=Z.oldRange.getTransformedByDelta(U)[0],Z.newRange=Z.newRange.getTransformedByDelta(U)[0],[W]}function u(H,U){function W(){const Q=new w.a(H.position.getShiftedBy(Y),H.position.getShiftedBy(X)),ee=new P.a(Q,U.key,J,U.value,0);Z.addOperation(ee)}const Z=new V.a,G=H.nodes;let J=G.getNode(0).getAttribute(U.key),Y=0,X=G.getNode(0).offsetSize;for(let Q=1;Q{const Z=s.i(h.c)(H,U,W);return H.range.containsPosition(U.position)&&Z.push(u(U,H)),Z}),s.i(h.b)(V.a,L.a,(H,U,W)=>{const Z=new C.a(U.position.root,U.position.path.slice(0,-1)),G=s.i(h.c)(H,U,W);for(let J of H.operations)if(J.range.containsPosition(Z)||J.range.start.isEqual(Z)){const Y=new V.a,X=Z.getShiftedBy(1),Q=C.a.createFromPosition(X);Q.path.push(0);const ee=U._cloneOperation.nodes.getNode(0).getAttribute(J.key);Y.addOperation(new P.a(new w.a(X,Q),J.key,ee===void 0?null:ee,J.newValue,0)),G.push(Y);break}return G}),s.i(h.b)(R.a,N.a,(H,U,W)=>{return H.position.isEqual(U.position)?[U.getReversed(),H.clone()]:s.i(h.c)(H,U,W)}),s.i(h.b)(F.a,L.a,d),s.i(h.b)(F.a,N.a,d),s.i(h.b)(F.a,D.a,d),s.i(h.b)(F.a,q.a,d),s.i(h.b)(M.a,N.a,(H,U,W)=>{const Z=H.sourcePosition.root==U.position.root&&'same'===s.i(K.a)(H.sourcePosition.getParentPath(),U.position.getParentPath()),G=H.sourcePosition.offset<=U.position.offset&&H.sourcePosition.offset+H.howMany>U.position.offset;return Z&&G?[U.getReversed(),H.clone()]:s.i(h.c)(H,U,W)}),s.i(h.b)(N.a,R.a,(H,U,W)=>{return H.position.isEqual(U.position)?[f()]:s.i(h.c)(H,U,W)}),s.i(h.b)(N.a,M.a,(H,U,W)=>{const Z=H.position.root==U.sourcePosition.root&&'same'===s.i(K.a)(H.position.getParentPath(),U.sourcePosition.getParentPath()),G=U.sourcePosition.offset<=H.position.offset&&U.sourcePosition.offset+U.howMany>H.position.offset;return Z&&G?[f()]:s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,L.a,(H,U,W)=>{const Z=H.position.getParentPath(),G=U.position.getParentPath();if('same'==s.i(K.a)(Z,G)){if(H.position.offset==U.position.offset)return[f()];if(H.position.offsetU._cloneOperation.sourcePosition.offset&&J._cloneOperation.sourcePosition.offset--,[J]}const J=H.clone();return J._cloneOperation.position.offset++,J._moveOperation.sourcePosition.path[J._moveOperation.sourcePosition.path.length-2]++,J._moveOperation.targetPosition.path[J._moveOperation.targetPosition.path.length-2]++,J._moveOperation.sourcePosition.offset=H.position.offset-U.position.offset,H._cloneOperation instanceof E.a&&U._cloneOperation instanceof E.a&&H._cloneOperation.sourcePosition.offset>U._cloneOperation.sourcePosition.offset&&J._cloneOperation.sourcePosition.offset--,[J]}return s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,q.a,(H,U,W)=>{return'same'===s.i(K.a)(U.position.path,H.position.getParentPath())?[f()]:s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,D.a,(H,U,W)=>{const Z='same'===s.i(K.a)(H.position.getParentPath(),U.range.start.getParentPath()),G=U.range.start.offset=H.position.offset;if(Z&&G)return[f()];if('same'===s.i(K.a)(H.position.getParentPath(),U.range.end.getShiftedBy(-1).path)){const J=H.clone(),Y=C.a.createFromPosition(U.range.start);Y.path.push(U.howMany-1);const X=Y.getShiftedBy(1);J._cloneOperation.position=X;const Q=C.a.createFromPosition(Y);Q.path.push(H.position.offset),J._moveOperation.sourcePosition=Q;const ee=C.a.createFromPosition(X);return ee.path.push(0),J._moveOperation.targetPosition=ee,[J]}return s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,V.a,(H,U)=>{H=H.clone();const W=new C.a(H.position.root,H.position.path.slice(0,-1));if(H._cloneOperation instanceof S.a)for(let Z of U.operations)if(Z.range.containsPosition(W)||Z.range.start.isEqual(W)){null===Z.newValue?H._cloneOperation.nodes.getNode(0).removeAttribute(Z.key):H._cloneOperation.nodes.getNode(0).setAttribute(Z.key,Z.newValue);break}return[H]}),s.i(h.b)(q.a,L.a,(H,U,W)=>{if('same'===s.i(K.a)(H.position.path,U.position.getParentPath())){const Z=[U.getReversed(),H.clone()];return Z[1].operations[1].targetPosition.path[0]++,Z}return s.i(h.c)(H,U,W)}),s.i(h.b)(I.a,V.a,(H,U)=>{const W=[H.clone()];return U.range.containsPosition(H.position)&&W.push(u(H,U)),W}),s.i(h.b)(D.a,L.a,(H,U,W)=>{const Z='same'===s.i(K.a)(H.range.start.getParentPath(),U.position.getParentPath()),G=H.range.start.offset=U.position.offset;if(Z&&G)return[U.getReversed(),H.clone()];if('same'===s.i(K.a)(U.position.getParentPath(),H.range.end.getShiftedBy(-1).path)){const J=H.clone();return J._insertOperation.position.offset++,J._moveOperation.howMany++,J._moveOperation.targetPosition.path[J._moveOperation.targetPosition.path.length-2]++,[J]}return s.i(h.c)(H,U,W)}),s.i(h.b)(z.a,L.a,(H,U,W)=>{const Z=new C.a(U.position.root,U.position.path.slice(0,-1)),G=s.i(h.c)(H,U,W);if(H.operations[0].position.isEqual(Z)){const J=H.clone();J.operations[0].position=H.operations[0].position.getShiftedBy(1),G.push(J)}return G}),s.i(h.b)(L.a,z.a,(H,U)=>{H=H.clone();const W=new C.a(H.position.root,H.position.path.slice(0,-1));return H._cloneOperation instanceof S.a&&U.operations[0].position.isEqual(W)&&(H._cloneOperation.nodes.getNode(0).name=U.operations[0].newName),[H]}),s.i(h.b)($.a,L.a,(H,U,W)=>{const Z=s.i(h.c)(H,U,W),G=U._cloneOperation.position;for(let J of Z)for(let Y of J.operations){const X=Y.sourcePosition.getShiftedBy(Y.howMany);X.isEqual(G)&&(Y.howMany+=1)}return Z}),s.i(h.b)(L.a,$.a,(H,U,W)=>{U=U.clone();const Z=H._cloneOperation.position;for(let G of U.operations){const J=G.sourcePosition.getShiftedBy(G.howMany);J.isEqual(Z)&&(G.howMany+=1)}return s.i(h.c)(H,U,W)})},function(o,r,s){'use strict';function d(P,S,E,O){const V=P.document,R=new T,F=new w.a(S,E,O,V.markers,V.version);P.addDelta(R),R.addOperation(F),V.applyOperation(F)}var u=s(19),f=s(17),h=s(16),w=s(108),C=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T extends u.a{get type(){return'marker'}get _reverseDeltaClass(){return T}static get className(){return'engine.model.delta.MarkerDelta'}}r.a=T,s.i(h.b)('setMarker',function(P,S){const E='string'==typeof P?P:P.name,O=this.document.markers.get(E);if(!S&&!O)throw new C.a('batch-setMarker-no-range: Range parameter is required when adding a new marker.');const V=O?O.getRange():null;return S?d(this,E,V,S):d(this,E,null,V),this}),s.i(h.b)('removeMarker',function(P){const S='string'==typeof P?P:P.name;if(!this.document.markers.has(S))throw new C.a('batch-removeMarker-no-marker: Trying to remove marker that does not exist.');const E=this.document.markers.get(S).getRange();return d(this,S,E,null),this}),f.a.register(T)},function(o,r,s){'use strict';function d(z){const $=z.textNode;if($){const K=$.data,H=z.offset-$.startOffset;return!s.i(I.a)(K,H)&&!s.i(I.b)(K,H)}return!0}function*u(z,$){for(let K=!1;!K;){if(K=!0,z){const H=z.next();H.done||(K=!1,yield{walker:z,value:H.value})}if($){const H=$.next();H.done||(K=!1,yield{walker:$,value:H.value})}}}var f=s(325),h=s(326),w=s(3),C=s(1),T=s(334),P=s(16),S=s(329),E=s(330),O=s(335),V=s(33),R=s(331),F=s(94),N=s(7),M=s(0),L=s(4),I=s(271);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const D='$graveyard';class q{constructor(){this.version=0,this.schema=new O.a,this.history=new S.a(this),this.markers=new R.a,this.selection=new E.a(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(let z of this.selection.getRanges())if(!this._validateSelectionRange(z))throw new M.a('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:z})}),this.createRoot('$root',D)}get graveyard(){return this.getRoot(D)}applyOperation(z){if(z.baseVersion!==this.version)throw new M.a('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:z});let $=z._execute();this.version++,this.history.addDelta(z.delta),$&&this.fire('change',z.type,$,z.delta.batch,z.delta.type)}batch(z){return new P.a(this,z)}createRoot(z='$root',$='main'){if(this.roots.has($))throw new M.a('model-document-createRoot-name-exists: Root with specified name already exists.',{name:$});const K=new T.a(this,z,$);return this.roots.set($,K),K}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges(z){if(this._pendingChanges.push(z),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot(z='main'){if(!this.roots.has(z))throw new M.a('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:z});return this.roots.get(z)}hasRoot(z){return this.roots.has(z)}getRootNames(){return Array.from(this.roots.keys()).filter((z)=>z!=D)}getNearestSelectionRange(z,$='both'){if(this.schema.check({name:'$text',inside:z}))return new w.a(z);let K,H;('both'==$||'backward'==$)&&(K=new V.a({startPosition:z,direction:'backward'})),('both'==$||'forward'==$)&&(H=new V.a({startPosition:z}));for(let U of u(K,H)){const W=U.walker==K?'elementEnd':'elementStart',Z=U.value;if(Z.type==W&&this.schema.objects.has(Z.item.name))return w.a.createOn(Z.item);if(this.schema.check({name:'$text',inside:Z.nextPosition}))return new w.a(Z.nextPosition)}return null}toJSON(){const z=s.i(F.a)(this);return z.selection='[engine.model.LiveSelection]',z}_getDefaultRoot(){for(let z of this.roots.values())if(z!==this.graveyard)return z;return this.graveyard}_getDefaultRange(){const z=this._getDefaultRoot(),$=new C.a(z,[0]),K=this.getNearestSelectionRange($);return K||new w.a($)}_validateSelectionRange(z){return d(z.start)&&d(z.end)}}r.a=q,s.i(L.a)(q,N.a)},function(o,r,s){'use strict';var d=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(){this._deltas=[],this._historyPoints=new Map}addDelta(f){if(0=h)break;yield C}}}getDelta(f){let h=this._historyPoints.get(f);if(h===void 0)return null;const w=[];for(h;hf&&this._historyPoints.set(T,this._historyPoints.get(T)+C)}}_getIndex(f){let h=this._historyPoints.get(f);if(h===void 0){const w=this._deltas[this._deltas.length-1],C=w.baseVersion+w.operations.length;if(0>f||f>=C)return-1;throw new d.a('model-history-wrong-version: Given base version points to the middle of a delta.')}return h}}},function(o,r,s){'use strict';function d(F){return F instanceof C.a||F instanceof w.a?F.getAttributes():null}var u=s(1),f=s(3),h=s(163),w=s(24),C=s(72),T=s(150),P=s(0),S=s(57),E=s(59);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const O='selection:',V=new Set(['addAttribute','removeAttribute','changeAttribute','addRootAttribute','removeRootAttribute','changeRootAttribute']);class R extends E.a{constructor(F){super(),this._document=F,this._attributePriority=new Map,this.listenTo(this._document,'change',(N,M)=>{V.has(M)&&this._updateAttributes(!1)})}get isCollapsed(){const F=this._ranges.length;return!(0!==F)||super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().start}get rangeCount(){return this._ranges.length?this._ranges.length:1}destroy(){for(let F=0;F{N.root==this._document.graveyard&&this._fixGraveyardSelection(N,L),this.fire('change:range',{directChange:!1})}),N}_updateAttributes(F){const N=s.i(T.a)(this._getSurroundingAttributes()),M=s.i(T.a)(this.getAttributes());if(F)this._attributePriority=new Map,this._attrs=new Map;else for(let[I,D]of this._attributePriority)'low'==D&&(this._attrs.delete(I),this._attributePriority.delete(I));this._setAttributesTo(N,!1);const L=[];for(let[I,D]of this.getAttributes())M.has(I)&&M.get(I)===D||L.push(I);for(let[I]of M)this.hasAttribute(I)||L.push(I);0{return new T.a(q,L.key,L.oldValue,L.newValue,L.baseVersion)})},AttributeOperation(L,I,D){if(L.key===I.key){let q=L.range.getDifference(I.range).map(($)=>{return new T.a($,L.key,L.oldValue,L.newValue,L.baseVersion)});const z=L.range.getIntersection(I.range);return z&&(D?q.push(new T.a(z,I.key,I.newValue,L.newValue,L.baseVersion)):0===q.length&&q.push(new R.a(0))),q}return[L.clone()]},RootAttributeOperation:u,RenameOperation:u,MarkerOperation:u,MoveOperation(L,I){const D=F.a.createFromPositionAndShift(I.sourcePosition,I.howMany);let q=[];I instanceof V.a&&I._needsHolderElement&&L.range.root==I.targetPosition.root&&L.range.start.path[0]>=I._holderElementOffset&&(L=L.clone(),L.range.start.path[0]++,L.range.end.path[0]++);const z=w(L.range.getDifference(D)),$=L.range.getIntersection(D);return null!==z&&(z.start=z.start._getTransformedByDeletion(I.sourcePosition,I.howMany),z.end=z.end._getTransformedByDeletion(I.sourcePosition,I.howMany),q=z._getTransformedByInsertion(I.getMovedRangeStart(),I.howMany,!0,!1).reverse()),null!==$&&($.start=$.start._getCombined(I.sourcePosition,I.getMovedRangeStart()),$.end=$.end._getCombined(I.sourcePosition,I.getMovedRangeStart()),q.push($)),q.map((K)=>{return new T.a(K,L.key,L.oldValue,L.newValue,L.baseVersion)})}},RootAttributeOperation:{InsertOperation:u,AttributeOperation:u,RootAttributeOperation(L,I,D){return L.root!==I.root||L.key!==I.key||(L.newValue===I.newValue||D)&&L.newValue!==I.newValue?[L.clone()]:[new R.a(L.baseVersion)]},RenameOperation:u,MarkerOperation:u,MoveOperation:u},RenameOperation:{InsertOperation(L,I){const D=L.clone();return D.position=D.position._getTransformedByInsertion(I.position,I.nodes.maxOffset,!0),[D]},AttributeOperation:u,RootAttributeOperation:u,RenameOperation(L,I,D){const q=L.clone();if(L.position.isEqual(I.position))if(D)q.oldName=I.newName;else return[new R.a(L.baseVersion)];return[q]},MarkerOperation:u,MoveOperation(L,I){const D=L.clone(),q=D.position.isEqual(I.sourcePosition);return D.position=D.position._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,!0,q),[D]}},MarkerOperation:{InsertOperation(L,I){const D=L.clone();return D.oldRange&&(D.oldRange=D.oldRange._getTransformedByInsertion(I.position,I.nodes.maxOffset,!1,!1)[0]),D.newRange&&(D.newRange=D.newRange._getTransformedByInsertion(I.position,I.nodes.maxOffset,!1,!1)[0]),[D]},AttributeOperation:u,RootAttributeOperation:u,RenameOperation:u,MarkerOperation(L,I,D){const q=L.clone();if(L.name==I.name)if(D)q.oldRange=I.newRange;else return[new R.a(L.baseVersion)];return[q]},MoveOperation(L,I){const D=L.clone();if(D.oldRange){const q=D.oldRange._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany);D.oldRange=F.a.createFromRanges(q)}if(D.newRange){const q=D.newRange._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany);D.newRange=F.a.createFromRanges(q)}return[D]}},MoveOperation:{InsertOperation(L,I,D){let q=F.a.createFromPositionAndShift(L.sourcePosition,L.howMany);q=q._getTransformedByInsertion(I.position,I.nodes.maxOffset,!1,L.isSticky)[0];let z=new L.constructor(q.start,q.end.offset-q.start.offset,L instanceof V.a?L.baseVersion:L.targetPosition._getTransformedByInsertion(I.position,I.nodes.maxOffset,!D),L instanceof V.a?void 0:L.baseVersion);return z.isSticky=L.isSticky,z._holderElementOffset=L._holderElementOffset,[z]},AttributeOperation:u,RootAttributeOperation:u,RenameOperation:u,MarkerOperation:u,MoveOperation(L,I,D){if(h(L,I)&&h(I,L))return[I.getReversed()];if(L instanceof V.a&&I instanceof V.a){const J=L.targetPosition.path[0],Y=I.targetPosition.path[0];J>=Y&&D&&(L=L.clone(),L.targetPosition.path[0]++)}L instanceof V.a&&!(I instanceof V.a)?D=!0:!(L instanceof V.a)&&I instanceof V.a&&(D=!1);const q=F.a.createFromPositionAndShift(L.sourcePosition,L.howMany),z=F.a.createFromPositionAndShift(I.sourcePosition,I.howMany);let $=[],K=w(q.getDifference(z));K&&(K.start=K.start._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,!L.isSticky,!1),K.end=K.end._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,L.isSticky,!1),$.push(K));const H=q.getIntersection(z);let U=s.i(N.a)(L.sourcePosition.getParentPath(),I.sourcePosition.getParentPath()),W=q.containsPosition(I.targetPosition)||q.start.isEqual(I.targetPosition)&&L.isSticky||q.end.isEqual(I.targetPosition)&&L.isSticky,Z=z.containsRange(q)&&(z.containsPosition(L.targetPosition)||z.start.isEqual(L.targetPosition)||z.end.isEqual(L.targetPosition));if(null!==H&&('extension'===U||'same'===U&&D||Z)&&!W&&(H.start=H.start._getCombined(I.sourcePosition,I.getMovedRangeStart()),H.end=H.end._getCombined(I.sourcePosition,I.getMovedRangeStart()),K&&q.start.isBefore(z.start)?$.push(H):$.unshift(H)),0===$.length)return L instanceof V.a?(L=L.clone(),L.howMany=0,L.sourcePosition=I.targetPosition,[L]):[new R.a(L.baseVersion)];let G=L.targetPosition._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,!D,I.isSticky||Z);return $.reverse().map((J)=>{let Y=new L.constructor(J.start,J.end.offset-J.start.offset,L instanceof V.a?L.baseVersion:G,L instanceof V.a?void 0:L.baseVersion);return Y.isSticky=L.isSticky,Y._holderElementOffset=L._holderElementOffset,Y})}}}},function(o,r,s){'use strict';var d=s(5);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{constructor(f,h,w='main'){super(h),this._doc=f,this.rootName=w}get document(){return this._doc}is(f,h){return h?'rootElement'==f&&h==this.name||super.is(f,h):'rootElement'==f||super.is(f)}toJSON(){return this.rootName}}r.a=u},function(o,r,s){'use strict';function d(E,O,V){for(let R=V.length-1,F=O.length-1;0<=R&&0<=F;){const N=O[F];if(!E.hasItem(N))return!1;const M=E._extensionChains.get(N);if(M.includes(V[R]))R--,F--;else return!1}return!0}var u=s(1),f=s(5),h=s(94),w=s(11),C=s(147),T=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class P{constructor(){this.objects=new Set,this.limits=new Set,this._items=new Map,this._extensionChains=new Map,this.registerItem('$root'),this.registerItem('$block'),this.registerItem('$inline'),this.registerItem('$text','$inline'),this.allow({name:'$block',inside:'$root'}),this.allow({name:'$inline',inside:'$block'}),this.registerItem('$clipboardHolder','$root'),this.allow({name:'$inline',inside:'$clipboardHolder'})}allow(E){this._getItem(E.name).allow(P._normalizeQueryPath(E.inside),E.attributes)}disallow(E){this._getItem(E.name).disallow(P._normalizeQueryPath(E.inside),E.attributes)}requireAttributes(E,O){this._getItem(E).requireAttributes(O)}check(E){if(!this.hasItem(E.name))return!1;s.i(w.a)(E.attributes)?0===E.attributes.length&&E.attributes.push(void 0):E.attributes=[E.attributes];const O=P._normalizeQueryPath(E.inside),V=this._extensionChains.get(E.name).map((R)=>{return this._getItem(R)});if(!this._getItem(E.name)._checkRequiredAttributes(E.attributes))return!1;for(let R of E.attributes)for(let F of V)if(F._hasMatchingPath('disallow',O,R))return!1;for(let R of E.attributes){let F=!1;for(let N of V)if(N._hasMatchingPath('allow',O,R)){F=!0;break}if(!F)return!1}return!0}hasItem(E){return this._items.has(E)}registerItem(E,O){if(this.hasItem(E))throw new T.a('model-schema-item-exists: Item with specified name already exists in schema.');if(!!O&&!this.hasItem(O))throw new T.a('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(E,new S(this));const V=this.hasItem(O)?this._extensionChains.get(O).concat(E):[E];this._extensionChains.set(E,V)}itemExtends(E,O){if(!this.hasItem(E)||!this.hasItem(O))throw new T.a('model-schema-no-item: Item with specified name does not exist in schema.');const V=this._extensionChains.get(E);return V.some((R)=>R==O)}_getItem(E){if(!this.hasItem(E))throw new T.a('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(E)}static _normalizeQueryPath(E){let O=[];if(s.i(w.a)(E))for(let V of E)V instanceof f.a?O.push(V.name):s.i(C.a)(V)&&O.push(V);else if(E instanceof u.a){for(let V=E.parent;null!==V;)O.push(V.name),V=V.parent;O.reverse()}else s.i(C.a)(E)&&(O=E.split(' '));return O}}r.a=P;class S{constructor(E){this._schema=E,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(E,O){this._addPath('_allowed',E,O)}disallow(E,O){this._addPath('_disallowed',E,O)}requireAttributes(E){this._requiredAttributes.push(E)}_addPath(E,O,V){O=O.slice(),s.i(w.a)(V)||(V=[V]);for(let R of V)this[E].push({path:O,attribute:R})}_getPaths(E,O){const V='allow'===E?this._allowed:this._disallowed,R=[];for(let F of V)F.attribute===O&&R.push(F.path);return R}_checkRequiredAttributes(E){let O=!0;for(let V of this._requiredAttributes){O=!0;for(let R of V)if(-1==E.indexOf(R)){O=!1;break}if(O)break}return O}_hasMatchingPath(E,O,V){const R=this._getPaths(E,V);for(const F of R)if(d(this._schema,O,F))return!0;return!1}toJSON(){const E=s.i(h.a)(this);return E._schema='[model.Schema]',E}}},function(o,r,s){'use strict';var d=s(75),u=s(343),f=s(164),h=s(168),w=s(60),C=s(57),T=s(167),P=s(342),S=s(339),E=s(340),O=s(338),V=s(4),R=s(31);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class F{constructor(){this.domRoots=new Map,this.selection=new d.a,this.domConverter=new f.a,this.roots=new Map,this.set('isFocused',!1),this.renderer=new u.a(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this,'isFocused'),this._observers=new Map,this.addObserver(T.a),this.addObserver(P.a),this.addObserver(S.a),this.addObserver(E.a),this.addObserver(O.a),s.i(w.h)(this),this.on('render',()=>{this.disableObservers(),this.renderer.render(),this.enableObservers()})}addObserver(N){let M=this._observers.get(N);if(M)return M;M=new N(this),this._observers.set(N,M);for(let[L,I]of this.domRoots)M.observe(I,L);return M.enable(),M}getObserver(N){return this._observers.get(N)}createRoot(N,M='main'){const L='string'==typeof N?N:N.tagName,I=new h.a(L.toLowerCase(),M);return I.document=this,this.roots.set(M,I),I.on('change:children',(D,q)=>this.renderer.markToSync('children',q)),I.on('change:attributes',(D,q)=>this.renderer.markToSync('attributes',q)),I.on('change:text',(D,q)=>this.renderer.markToSync('text',q)),this.domConverter.isElement(N)&&this.attachDomRoot(N,M),I}attachDomRoot(N,M='main'){const L=this.getRoot(M);this.domRoots.set(M,N),this.domConverter.bindElements(N,L),this.renderer.markToSync('children',L),this.renderer.domDocuments.add(N.ownerDocument);for(let I of this._observers.values())I.observe(N,M)}getRoot(N='main'){return this.roots.get(N)}getDomRoot(N='main'){return this.domRoots.get(N)}render(){this.fire('render')}focus(){if(!this.isFocused){const N=this.selection.editableElement;N?(this.domConverter.focus(N),this.render()):C.a.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}disableObservers(){for(let N of this._observers.values())N.disable()}enableObservers(){for(let N of this._observers.values())N.enable()}destroy(){for(let N of this._observers.values())N.destroy()}}r.a=F,s.i(V.a)(F,R.a)},function(o,r,s){'use strict';var d=s(61);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{constructor(f){super(f),this.domEventType='click'}onDomEvent(f){this.fire(f.type,f)}}r.a=u},function(o,r,s){'use strict';function d(T){return T==h.d.arrowright||T==h.d.arrowleft||T==h.d.arrowup||T==h.d.arrowdown}var u=s(50),f=s(75),h=s(22),w=s(141);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends u.a{constructor(T){super(T),this._fireSelectionChangeDoneDebounced=s.i(w.a)((P)=>this.document.fire('selectionChangeDone',P),200)}observe(){const T=this.document;T.on('keydown',(P,S)=>{const E=T.selection;E.isFake&&d(S.keyCode)&&this.isEnabled&&(S.preventDefault(),this._handleSelectionMove(S.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(T){const P=this.document.selection,S=f.a.createFromSelection(P);S.setFake(!1),(T==h.d.arrowleft||T==h.d.arrowup)&&S.collapseToStart(),(T==h.d.arrowright||T==h.d.arrowdown)&&S.collapseToEnd();const E={oldSelection:P,newSelection:S,domSelection:null};this.document.fire('selectionChange',E),this._fireSelectionChangeDoneDebounced(E)}}r.a=C},function(o,r,s){'use strict';var d=s(61);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{constructor(f){super(f),this.domEventType=['focus','blur'],this.useCapture=!0,f.on('focus',()=>{f.isFocused=!0}),f.on('blur',(h,w)=>{const C=f.selection.editableElement;(null===C||C===w.target)&&(f.isFocused=!1,f.render())})}onDomEvent(f){this.fire(f.type,f)}}r.a=u},function(o,r,s){'use strict';var d=s(61),u=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h),this.domEventType='keydown'}onDomEvent(h){this.fire('keydown',h,{keyCode:h.keyCode,altKey:h.altKey,ctrlKey:h.ctrlKey||h.metaKey,shiftKey:h.shiftKey,get keystroke(){return s.i(u.c)(this)}})}}r.a=f},function(o,r,s){'use strict';var d=s(61);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u extends d.a{constructor(f){super(f),this.domEventType='mousedown'}onDomEvent(f){this.fire(f.type,f)}}r.a=u},function(o,r,s){'use strict';var d=s(50),u=s(167),f=s(57),h=s(141);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{constructor(C){super(C),this.mutationObserver=C.getObserver(u.a),this.document=C,this.selection=C.selection,this.domConverter=C.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=s.i(h.a)((T)=>this.document.fire('selectionChangeDone',T),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),2e3)}observe(C){const T=C.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(C){if(this.isEnabled&&this.document.isFocused){this.mutationObserver.flush();const T=C.defaultView.getSelection(),P=this.domConverter.domSelectionToView(T);if(!this.selection.isEqual(P)){if(this._isInfiniteLoop(P))return void f.a.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');const S={oldSelection:this.selection,newSelection:P,domSelection:T};this.document.fire('selectionChange',S),this._fireSelectionChangeDoneDebounced(S)}}}_isInfiniteLoop(C){return this._lastSelection&&this._lastButOneSelection&&(C.isEqual(this._lastSelection)||C.isEqual(this._lastButOneSelection))?this._loopbackCounter++:(this._lastButOneSelection=this._lastSelection,this._lastSelection=C,this._loopbackCounter=0),!!(50N.name),F=O.getAttributeKeys();for(let N of F)V.setAttribute(N,O.getAttribute(N));for(let N of R)O.hasAttribute(N)||V.removeAttribute(N)}_updateChildren(O,V){const F=this.domConverter,N=F.getCorrespondingDom(O),M=N.ownerDocument,L=V.inlineFillerPosition,I=N.childNodes,D=Array.from(F.viewChildrenToDom(O,M,{bind:!0}));if(L&&L.parent==O){const $=D[L.offset];this.domConverter.isText($)?$.data=f.i+$.data:D.splice(L.offset,0,M.createTextNode(f.i))}const q=s.i(w.a)(I,D,function($,K){if($===K)return!0;return F.isText($)&&F.isText(K)?$.data===K.data:s.i(f.e)($,F.blockFiller)&&s.i(f.e)(K,F.blockFiller)});let z=0;for(let $ of q)'insert'===$?(s.i(C.a)(N,z,D[z]),z++):'delete'===$?s.i(T.a)(I[z]):z++}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const O=this.domConverter.getCorrespondingDomElement(this.selection.editableElement);this.isFocused&&O&&(this.selection.isFake?this._updateFakeSelection(O):(this._removeFakeSelection(),this._updateDomSelection(O)))}_updateFakeSelection(O){const V=O.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=V.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(V.createTextNode('\xA0'))),this._fakeSelectionContainer.parentElement||O.appendChild(this._fakeSelectionContainer);const R=this.selection.fakeSelectionLabel||'\xA0';this._fakeSelectionContainer.firstChild.data=R;const F=V.getSelection();F.removeAllRanges();const N=new Range;N.selectNodeContents(this._fakeSelectionContainer),F.addRange(N),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(O){const V=O.ownerDocument.defaultView.getSelection(),R=V&&this.domConverter.domSelectionToView(V);if(!(R&&this.selection.isEqual(R))){const F=this.domConverter.viewPositionToDom(this.selection.anchor),N=this.domConverter.viewPositionToDom(this.selection.focus);V.collapse(F.parent,F.offset),V.extend(N.parent,N.offset)}}_removeDomSelection(){for(let O of this.domDocuments){const V=O.getSelection();if(V.rangeCount){const R=O.activeElement,F=this.domConverter.getCorrespondingViewElement(R);R&&F&&O.getSelection().removeAllRanges()}}}_removeFakeSelection(){const O=this._fakeSelectionContainer;O&&O.remove()}_updateFocus(){if(this.isFocused){const O=this.selection.editableElement;O&&this.domConverter.focus(O)}}}r.a=E,s.i(h.a)(E,P.a)},function(o,r,s){'use strict';var d=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class u{constructor(f,h,w){if(this.textNode=f,0>h||h>f.data.length)throw new d.a('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>w||h+w>f.data.length)throw new d.a('view-textproxy-wrong-length: Given length value is incorrect.');this.data=f.data.substring(h,h+w),this.offsetInText=h}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(f){return'textProxy'==f}getAncestors(f={includeNode:!1,parentFirst:!1}){const h=[];for(let w=f.includeNode?this.textNode:this.parent;null!==w;)h[f.parentFirst?'push':'unshift'](w),w=w.parent;return h}}r.a=u},function(o,r,s){'use strict';var d=s(2),u=s(346),f=s(347);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{init(){const w=this.editor,C=w.editing.view;C.addObserver(f.a),w.commands.set('enter',new u.a(w)),this.listenTo(C,'enter',(T,P)=>{w.execute('enter'),P.preventDefault()},{priority:'low'})}}r.a=h},function(o,r,s){'use strict';function d(C,T,P,S){const E=P.isCollapsed,O=P.getFirstRange(),V=O.start.parent,R=O.end.parent;if(!(S.limits.has(V.name)||S.limits.has(R.name))){if(V.root==V)return void(E||C.deleteContent(P,T));if(E)u(T,P,O.start);else{const F=O.start.isAtStart&&O.end.isAtEnd;C.deleteContent(P,T,{merge:F}),F||(V==R?u(T,P,P.focus):P.collapse(R))}}}function u(C,T,P){if(P.isAtEnd){const S=P.parent,E=new S.constructor(S.name,S.getAttributes());C.insert(h.a.createAfter(P.parent),E)}else C.split(P);T.collapse(P.parent.nextSibling)}var f=s(12),h=s(1);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends f.a{_doExecute(){const C=this.editor.document,T=C.batch();C.enqueueChanges(()=>{d(this.editor.data,T,C.selection,C.schema),this.fire('afterExecute',{batch:T})})}}r.a=w},function(o,r,s){'use strict';var d=s(50),u=s(114),f=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{constructor(w){super(w),w.on('keydown',(C,T)=>{this.isEnabled&&T.keyCode==f.d.enter&&w.fire('enter',new u.a(w,T.domEvent))})}observe(){}}r.a=h},function(o,r,s){'use strict';function d(O,V){return Array.prototype.concat(...O.map((R)=>[R,V]))}var u=s(116),f=s(350),h=s(2),w=s(399),C=s(390),T=s(78),P=s(291),S=s.n(P);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class E extends h.a{static get requires(){return[u.a,f.a]}init(){const O=this.editor,V=new T.a,R=this._getLocalizedOptions(),F=[],N=O.t;let M;for(let I of R){const D=O.commands.get(I.modelElement),q=new w.a({commandName:I.modelElement,label:I.title,class:I.class});q.bind('isActive').to(D,'value'),V.add(q),F.push(D),M||'paragraph'!=I.modelElement||(M=I)}const L=new w.a({withText:!0,items:V,tooltip:N('Heading')});L.bind('isEnabled').to(...d(F,'isEnabled'),(...I)=>I.some((D)=>D)),L.bind('label').to(...d(F,'value'),(...I)=>{const D=I.findIndex((q)=>q);return(R[D]||M).title}),O.ui.componentFactory.add('headings',(I)=>{const D=s.i(C.a)(L,I);return this.listenTo(D,'execute',(q)=>{O.execute(q.source.commandName),O.editing.view.focus()}),D})}_getLocalizedOptions(){const O=this.editor,V=O.t,R={Paragraph:V('Paragraph'),'Heading 1':V('Heading 1'),'Heading 2':V('Heading 2'),'Heading 3':V('Heading 3')};return O.config.get('heading.options').map((F)=>{const N=R[F.title];return N&&N!=F.title&&(F=Object.assign({},F,{title:N})),F})}}r.a=E},function(o,r,s){'use strict';var d=s(3),u=s(12),f=s(59);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends u.a{constructor(w,C){super(w),Object.assign(this,C),this.set('value',!1),this.listenTo(w.document,'changesDone',()=>this._updateValue())}_doExecute(w={}){const C=this.editor,T=C.document,P=this.value;T.enqueueChanges(()=>{const S=w.batch||T.batch();for(let E of T.selection.getSelectedBlocks())if(!P)E.is(this.modelElement)||S.rename(E,this.modelElement);else if(E.is(this.modelElement)){const O=new f.a;O.addRange(d.a.createIn(E)),C.execute('paragraph',{selection:O,batch:S})}})}_updateValue(){const w=this.editor.document.selection.getSelectedBlocks().next().value;w&&(this.value=w.is(this.modelElement))}}r.a=h},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(116),w=s(349);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const C='paragraph';class T extends d.a{constructor(P){super(P),P.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[h.a]}init(){const P=this.editor,S=P.data,E=P.editing,O=P.config.get('heading.options');for(let V of O)V.modelElement!==C&&(P.document.schema.registerItem(V.modelElement,'$block'),s.i(u.a)().for(S.modelToView,E.modelToView).fromElement(V.modelElement).toElement(V.viewElement),s.i(f.a)().for(S.viewToModel).fromElement(V.viewElement).toElement(V.modelElement),P.commands.set(V.modelElement,new w.a(P,V)))}afterInit(){const P=this.editor,S=P.commands.get('enter'),E=P.config.get('heading.options');S&&this.listenTo(S,'afterExecute',(O,V)=>{const R=P.document.selection.getFirstPosition().parent,F=V.batch,N=E.some((M)=>R.is(M.modelElement));N&&!R.is(C)&&0===R.childCount&&F.rename(R,C)})}}r.a=T},function(o,r,s){'use strict';var d=s(2),u=s(170),f=s(364),h=s(360),w=s(294),C=s.n(w);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T extends d.a{static get requires(){return[u.a,f.a,h.a]}}r.a=T},function(o,r,s){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function f(T,P,S,E){const O=T.name.split(':'),V=O[0]+':'+O[1];if(S.consume(P.item,V)){const R=E.mapper.toViewElement(P.item),F=R.getChild(0);'removeAttribute'==O[0]?F.removeAttribute(P.attributeKey):F.setAttribute(P.attributeKey,P.attributeNewValue)}}var h=s(5),w=s(1),C=s(20);r.b=function(){return(T,P,S,E)=>{const O=P.input;if(S.test(O,{name:!0,class:'image'})&&E.schema.check({name:'image',inside:P.context,attributes:'src'})){const V=O.getChild(0);if(V&&'img'==V.name&&S.test(V,{name:!0,attribute:'src'})){S.consume(O,{name:!0,class:'image'}),S.consume(V,{name:!0,attribute:'src'});const R=new h.a('image',{src:V.getAttribute('src')});S.consume(V,{attribute:['alt']})&&R.setAttribute('alt',V.getAttribute('alt')),P.context.push(R);const F=E.convertChildren(O,S,P),N=w.a.createAt(R,'end');C.a.insert(N,F),P.context.pop(),P.output=R}}}},r.a=function(T,P){for(let S of T)S.on(`addAttribute:${P}:image`,f),S.on(`changeAttribute:${P}:image`,f),S.on(`removeAttribute:${P}:image`,f)}},function(o,r,s){'use strict';var d=s(2),u=s(354),f=s(292),h=s.n(f);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{static get requires(){return[u.a]}}r.a=w},function(o,r,s){'use strict';function d(D,q,z,$){if('insert'===q){const K=new T.a({boundaries:z.range,ignoreElementEnd:!0});for(let H of K){const U=H.item;'elementStart'==H.type&&s.i(M.b)(U)&&!s.i(L.c)(U)&&$.document.enqueueChanges(()=>{$.insert(R.a.createAt(U,'end'),new P.a('caption'))})}}}function u(D,q){return(z,$)=>{if(h($.item)){const K=$.item.parent,H=K.parent,U=q.toViewElement(H);let W=q.toViewElement(K);U&&!W&&(W=D(),w(W,K,U,q))}}}function f(D){return(q,z,$,K)=>{const H=z.item;if(s.i(M.b)(H.parent)&&0this._updateView(),{priority:'high'})}_removeEmptyCaption(){const D=this.editor.editing.view.selection,q=this._lastSelectedEditable;if(!q)return;if(D.editableElement===q)return;const z=D.getSelectedElement();if(z&&s.i(M.a)(z)){const $=q.findAncestor((K)=>K==z);if($)return}if(0===q.childCount){const $=this.editor.editing.mapper;V.a.remove(O.a.createOn(q)),$.unbindViewElement(q)}}_addCaptionWhenSelected(){const D=this.editor.editing,q=D.view.selection,z=q.getSelectedElement(),$=D.mapper;if(z&&s.i(M.a)(z)){const K=$.toModelElement(z),H=s.i(L.c)(K);let U=$.toViewElement(H);U||(U=this._createCaption(),w(U,H,z,$)),this._lastSelectedEditable=U}}_updateView(){const D=this.editor.editing.view.selection;this._removeEmptyCaption(),this._addCaptionWhenSelected();const q=D.editableElement;q&&s.i(L.d)(D.editableElement)&&(this._lastSelectedEditable=D.editableElement)}}r.a=I},function(o,r,s){'use strict';var w=s(73),C=s(5);r.a=function(P){return()=>{const S=new w.a('figcaption',{contenteditable:!0});return S.document=P,S.setCustomProperty(T,!0),S.on('change:isFocused',(E,O,V)=>{V?S.addClass('focused'):S.removeClass('focused')}),S}},r.d=function(P){return!!P.getCustomProperty(T)},r.c=function(P){for(let S of P.getChildren())if(S instanceof C.a&&'caption'==S.name)return S;return null},r.b=function(P){const S=P.parent;return'figcaption'==P.name&&S&&'figure'==S.name&&S.hasClass('image')?{name:!0}:null};/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const T=Symbol('imageCaption')},function(o,r,s){'use strict';var d=s(2),u=s(359),f=s(26);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{static get requires(){return[u.a]}init(){const w=this.editor.config.get('image.styles');for(let T of w)this._createButton(T);const C=this.editor.config.get('image.defaultToolbar');C&&(C.length&&C.push('|'),w.forEach((T)=>C.push(T.name)))}_createButton(w){const C=this.editor,T=C.commands.get(w.name);C.ui.componentFactory.add(w.name,(P)=>{const S=new f.a(P);return S.set({label:w.title,icon:w.icon,tooltip:!0}),S.bind('isEnabled').to(T,'isEnabled'),S.bind('isOn').to(T,'value'),this.listenTo(S,'execute',()=>C.execute(w.name)),S})}}r.a=h},function(o,r,s){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function f(P,S,E,O){const V=S.input,R=S.output;if(E.test(V,{class:P.className})&&s.i(T.b)(R)){const F=[...R.getAttributeKeys(),'imageStyle'];O.schema.check({name:'image',inside:S.context,attributes:F})&&(E.consume(V,{class:P.className}),R.setAttribute('imageStyle',P.value))}}function h(P,S){for(let E of S)if(E.value===P)return E}function w(P,S,E){return S&&('changeAttribute'==P||'removeAttribute'==P)&&(E.removeClass(S.className),!0)}function C(P,S,E){return S&&('addAttribute'==P||'changeAttribute'==P)&&(E.addClass(S.className),!0)}var T=s(40);r.a=function(P){return(S,E,O,V)=>{const R=S.name.split(':')[0],F=R+':imageStyle';if(O.test(E.item,F)){const N=h(E.attributeNewValue,P),M=h(E.attributeOldValue,P),L=V.mapper.toViewElement(E.item);(w(R,M,L)||C(R,N,L))&&O.consume(E.item,F)}}},r.b=function(P){const S=P.filter((E)=>null!==E.value);return(E,O,V,R)=>{for(let F of S)f(F,O,V,R)}}},function(o,r,s){'use strict';var d=s(12),u=s(40);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h,w){super(h),this.set('value',!1),this.style=w,this.listenTo(h.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const h=this.editor.document,w=h.selection.getSelectedElement();return w?void(null===this.style.value?this.value=!w.hasAttribute('imageStyle'):this.value=w.getAttribute('imageStyle')==this.style.value):void(this.value=!1)}_checkEnabled(){const h=this.editor.document.selection.getSelectedElement();return s.i(u.b)(h)}_doExecute(h={}){if(this.value)return;const w=this.editor,C=w.document,T=C.selection,P=T.getSelectedElement();C.enqueueChanges(()=>{const S=h.batch||C.batch();S.setAttribute(P,'imageStyle',this.style.value)})}}r.a=f},function(o,r,s){'use strict';var d=s(2),u=s(358),f=s(170),h=s(357),w=s(282),C=s.n(w),T=s(283),P=s.n(T);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class S extends d.a{static get requires(){return[f.a]}init(){const E=this.editor,O=E.t,V=E.document,R=V.schema,F=E.data,N=E.editing;E.config.define('image.styles',[{name:'imageStyleFull',title:O('Full size image'),icon:C.a,value:null},{name:'imageStyleSide',title:O('Side image'),icon:P.a,value:'side',className:'image-style-side'}]);const M=E.config.get('image.styles');R.allow({name:'image',attributes:'imageStyle',inside:'$root'});const L=s.i(h.a)(M);N.modelToView.on('addAttribute:imageStyle:image',L),F.modelToView.on('addAttribute:imageStyle:image',L),N.modelToView.on('changeAttribute:imageStyle:image',L),F.modelToView.on('changeAttribute:imageStyle:image',L),N.modelToView.on('removeAttribute:imageStyle:image',L),F.modelToView.on('removeAttribute:imageStyle:image',L),F.viewToModel.on('element:figure',s.i(h.b)(M),{priority:'low'});for(let I of M)E.commands.set(I.name,new u.a(E,I))}}r.a=S},function(o,r,s){'use strict';var d=s(2),u=s(26),f=s(362),h=s(385),w=s(178),C=s(172),T=s(363),P=s(171),S=s(281),E=s.n(S),O=s(293),V=s.n(O);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class R extends d.a{static get requires(){return[f.a]}init(){this._createButton();const F=this.editor.config.get('image.defaultToolbar');return F&&(F.length&&F.push('|'),F.push('imageTextAlternative')),this._createBalloonPanel().then((N)=>{this.balloonPanel=N,this.form=N.content.get(0)})}_createButton(){const F=this.editor,N=F.commands.get('imageTextAlternative'),M=F.t;F.ui.componentFactory.add('imageTextAlternative',(L)=>{const I=new u.a(L);return I.set({label:M('Change image text alternative'),icon:E.a,tooltip:!0}),I.bind('isEnabled').to(N,'isEnabled'),this.listenTo(I,'execute',()=>this._showBalloonPanel()),I})}_createBalloonPanel(){const F=this.editor,N=new P.a(F),M=new T.a(F.locale);this.listenTo(M,'submit',()=>{F.execute('imageTextAlternative',{newValue:M.lebeledInput.inputView.element.value}),this._hideBalloonPanel()});const L=F.plugins.get(C.a);return L&&this.listenTo(N,'change:isVisible',()=>{N.isVisible?(L.hide(),L.isEnabled=!1):(L.show(),L.isEnabled=!0)}),this.listenTo(M,'cancel',()=>this._hideBalloonPanel()),s.i(h.a)({emitter:N,activator:()=>N.isVisible,callback:()=>this._hideBalloonPanel()}),s.i(w.a)({emitter:N,activator:()=>N.isVisible,contextElement:N.element,callback:()=>this._hideBalloonPanel()}),Promise.all([N.content.add(M),F.ui.view.body.add(N)]).then(()=>N)}_showBalloonPanel(){const F=this.editor,N=F.commands.get('imageTextAlternative');this.form.lebeledInput.value=N.value||'',this.balloonPanel.attach(),this.form.lebeledInput.select()}_hideBalloonPanel(){const F=this.editor;this.balloonPanel.detach(),F.editing.view.focus()}}r.a=R},function(o,r,s){'use strict';var d=s(12),u=s(40);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h),this.set('value',!1),this.listenTo(h.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const h=this.editor.document,w=h.selection.getSelectedElement();this.value=s.i(u.b)(w)&&w.hasAttribute('alt')&&w.getAttribute('alt')}_checkEnabled(){const h=this.editor.document.selection.getSelectedElement();return s.i(u.b)(h)}_doExecute(h){const w=this.editor,C=w.document,T=C.selection.getSelectedElement();C.enqueueChanges(()=>{const P=h.batch||C.batch();P.setAttribute(T,'alt',h.newValue)})}}r.a=f},function(o,r,s){'use strict';var d=s(361),u=s(2);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends u.a{init(){this.editor.commands.set('imageTextAlternative',new d.a(this.editor))}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(26),f=s(6),h=s(181),w=s(180),C=s(179);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T extends d.a{constructor(P){super(P);const S=this.locale.t;this.lebeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(S('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(S('Cancel'),'cancel'),f.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new f.a({tag:'form',attributes:{class:['cke-text-alternative-form']},children:[this.lebeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]}),s.i(C.a)({view:this})}_createButton(P,S){const E=new u.a(this.locale);return E.label=P,E.withText=!0,S&&E.delegate('execute').to(this,S),E}_createLabeledInputView(){const P=this.locale.t,S=new h.a(this.locale,w.a);return S.label=P('Text alternative'),S}}r.a=T},function(o,r,s){'use strict';function d(N){return N==R.d.arrowright||N==R.d.arrowleft||N==R.d.arrowup||N==R.d.arrowdown}function u(N){return N==R.d.delete||N==R.d.backspace}function f(N){for(;N;){if(N instanceof E.a&&!(N instanceof O.a))return!0;N=N.parent}return!1}var h=s(2),w=s(173),C=s(341),T=s(3),P=s(59),S=s(5),E=s(73),O=s(168),V=s(115),R=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class F extends h.a{static get requires(){return[w.a]}init(){const N=this.editor.editing.view;N.addObserver(C.a),this.listenTo(N,'mousedown',(...M)=>this._onMousedown(...M)),this.listenTo(N,'keydown',(...M)=>this._onKeydown(...M),{priority:'high'})}_onMousedown(N,M){const L=this.editor,I=L.editing.view;let D=M.target;if(f(D))return;if(!s.i(V.b)(D)&&(D=D.findAncestor(V.b),!D))return;M.preventDefault(),I.isFocused||I.focus();const q=L.editing.mapper.toModelElement(D);L.document.enqueueChanges(()=>{this._setSelectionOverElement(q)})}_onKeydown(N,M){const L=M.keyCode,I=L==R.d.delete||L==R.d.arrowdown||L==R.d.arrowright;(u(L)&&this._handleDelete(I)||d(L)&&this._handleArrowKeys(I))&&(M.preventDefault(),N.stop())}_handleDelete(N){const M=this.editor.document,L=M.selection;if(!L.isCollapsed)return;const I=this._getObjectElementNextToSelection(N);if(I)return M.enqueueChanges(()=>{const D=L.anchor.parent;if(D.isEmpty){const q=M.batch();q.remove(D)}this._setSelectionOverElement(I)}),!0}_handleArrowKeys(N){const M=this.editor.document,L=M.schema,I=M.selection,D=I.getSelectedElement();if(D&&L.objects.has(D.name)){const z=N?I.getLastPosition():I.getFirstPosition(),$=M.getNearestSelectionRange(z,N?'forward':'backward');return $&&M.enqueueChanges(()=>{I.setRanges([$])}),!0}if(!I.isCollapsed)return;const q=this._getObjectElementNextToSelection(N);if(q instanceof S.a&&M.schema.objects.has(q.name))return M.enqueueChanges(()=>{this._setSelectionOverElement(q)}),!0}_setSelectionOverElement(N){this.editor.document.selection.setRanges([T.a.createOn(N)])}_getObjectElementNextToSelection(N){const M=this.editor.document,L=M.schema,I=M.selection,D=this.editor.data,q=P.a.createFromSelection(I);D.modifySelection(q,{direction:N?'forward':'backward'});const z=N?q.focus.nodeBefore:q.focus.nodeAfter;return z instanceof S.a&&L.objects.has(z.name)?z:null}}r.a=F},function(o,r,s){'use strict';function d(L){return L.parent.getAncestors().find((I)=>I instanceof w.a)}var u=s(2),f=s(337),h=s(367),w=s(175),C=s(178),T=s(26),P=s(182),S=s(368),E=s(284),O=s.n(E),V=s(285),R=s.n(V),F=s(295),N=s.n(F);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class M extends u.a{static get requires(){return[h.a]}init(){this.editor.editing.view.addObserver(f.a),this.balloonPanelView=this._createBalloonPanel(),this.formView=this._createForm(),this._createToolbarLinkButton(),this._createToolbarUnlinkButton()}_createToolbarLinkButton(){const L=this.editor,I=L.commands.get('link'),D=L.t;L.keystrokes.set('CTRL+K',()=>this._showPanel()),L.ui.componentFactory.add('link',(q)=>{const z=new T.a(q);return z.isEnabled=!0,z.label=D('Link'),z.icon=O.a,z.keystroke='CTRL+K',z.tooltip=!0,z.bind('isEnabled').to(I,'isEnabled'),this.listenTo(z,'execute',()=>this._showPanel()),z})}_createToolbarUnlinkButton(){const L=this.editor,I=L.t,D=L.commands.get('unlink');L.ui.componentFactory.add('unlink',(q)=>{const z=new T.a(q);return z.isEnabled=!1,z.label=I('Unlink'),z.icon=R.a,z.tooltip=!0,z.bind('isEnabled').to(D,'isEnabled'),this.listenTo(z,'execute',()=>L.execute('unlink')),z})}_createBalloonPanel(){const L=this.editor,I=L.editing.view,D=new P.a(L.locale);return D.maxWidth=300,L.ui.focusTracker.add(D.element),this.listenTo(I,'click',()=>{const q=I.selection,z=d(q.getFirstPosition());q.isCollapsed&&z&&(this._attachPanelToElement(),this.listenTo(I,'render',()=>{const $=d(q.getFirstPosition());q.isCollapsed&&z===$?this._attachPanelToElement(z):this._hidePanel()}),this.listenTo(D,'change:isVisible',()=>this.stopListening(I,'render')))}),L.keystrokes.set('Tab',(q,z)=>{D.isVisible&&!this.formView.focusTracker.isFocused&&(this.formView.focus(),z())}),L.keystrokes.set('Esc',(q,z)=>{D.isVisible&&(this._hidePanel(!0),z())}),s.i(C.a)({emitter:D,activator:()=>D.isVisible,contextElement:D.element,callback:()=>this._hidePanel()}),L.ui.view.body.add(D),D}_createForm(){const L=this.editor,I=new S.a(L.locale);return I.urlInputView.bind('value').to(L.commands.get('link'),'value'),this.listenTo(I,'submit',()=>{L.execute('link',I.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(I,'unlink',()=>{L.execute('unlink'),this._hidePanel(!0)}),I.keystrokes.set('Esc',(D,q)=>{this._hidePanel(!0),q()}),this.listenTo(I,'cancel',()=>this._hidePanel(!0)),this.balloonPanelView.content.add(I),I}_attachPanelToElement(L){const I=this.editor.editing.view,D=L||d(I.selection.getFirstPosition()),q=D?I.domConverter.getCorrespondingDomElement(D):I.domConverter.viewRangeToDom(I.selection.getFirstRange());this.balloonPanelView.attachTo({target:q,limiter:I.domConverter.getCorrespondingDomElement(I.selection.editableElement)})}_hidePanel(L){this.balloonPanelView.hide(),L&&this.editor.editing.view.focus()}_showPanel(){this._attachPanelToElement(),this.formView.urlInputView.select()}}r.a=M},function(o,r,s){'use strict';var d=s(12),u=s(24),f=s(3),h=s(152),w=s(153),C=s(174);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T extends d.a{constructor(P){super(P),this.set('value',void 0),this.listenTo(this.editor.document.selection,'change:attribute',()=>{this.value=this.editor.document.selection.getAttribute('linkHref')})}_checkEnabled(){const P=this.editor.document;return s.i(w.a)('linkHref',P.selection,P.schema)}_doExecute(P){const S=this.editor.document,E=S.selection;S.enqueueChanges(()=>{const O=S.batch();if(E.isCollapsed){const V=E.getFirstPosition(),R=V.parent;if(E.hasAttribute('linkHref')){const F=s.i(C.a)(E.getFirstPosition(),E.getAttribute('linkHref'));O.setAttribute(F,'linkHref',P),E.setRanges([F])}else if(S.schema.check({name:'$text',attributes:'linkHref',inside:R.name})){const F=new u.a(P,{linkHref:P});O.insert(V,F),E.setRanges([f.a.createOn(F)])}}else{const V=s.i(h.a)('linkHref',E.getRanges(),S.schema);for(let R of V)O.setAttribute(R,'linkHref',P)}})}}r.a=T},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(175),w=s(366),C=s(369);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class T extends d.a{init(){const P=this.editor,S=P.data,E=P.editing;P.document.schema.allow({name:'$inline',attributes:'linkHref'}),s.i(u.a)().for(S.modelToView,E.modelToView).fromAttribute('linkHref').toElement((O)=>new h.a('a',{href:O})),s.i(f.a)().for(S.viewToModel).fromElement('a').toAttribute((O)=>({key:'linkHref',value:O.getAttribute('href')})),P.commands.set('link',new w.a(P)),P.commands.set('unlink',new C.a(P))}}r.a=T},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(118),h=s(26),w=s(181),C=s(180),T=s(179),P=s(63),S=s(117),E=s(64);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class O extends d.a{constructor(V){super(V);const R=V.t;this.focusTracker=new P.a,this.keystrokes=new E.a,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(R('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(R('Cancel'),'cancel'),this.unlinkButtonView=this._createButton(R('Unlink'),'unlink'),this._focusables=new f.a,this._focusCycler=new S.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),u.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new u.a({tag:'form',attributes:{class:['ck-link-form']},children:[this.urlInputView,{tag:'div',attributes:{class:['ck-link-form__actions']},children:[this.saveButtonView,this.cancelButtonView,this.unlinkButtonView]}]}),s.i(T.a)({view:this});const F=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];F.forEach((N)=>{this._focusables.add(N),this.focusTracker.add(N.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const V=this.locale.t,R=new w.a(this.locale,C.a);return R.label=V('Link URL'),R}_createButton(V,R){const F=new h.a(this.locale);return F.label=V,F.withText=!0,R&&F.delegate('execute').to(this,R),F}}r.a=O},function(o,r,s){'use strict';var d=s(12),u=s(174);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h),this.listenTo(h.document.selection,'change:attribute',()=>this.refreshState())}_doExecute(){const h=this.editor.document,w=h.selection;h.enqueueChanges(()=>{const C=w.isCollapsed?[s.i(u.a)(w.getFirstPosition(),w.getAttribute('linkHref'))]:w.getRanges(),T=h.batch();for(let P of C)T.removeAttribute(P,'linkHref')})}_checkEnabled(){return this.editor.document.selection.hasAttribute('linkHref')}}r.a=f},function(o,r,s){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function O($,K){const H='numbered'==$.getAttribute('type')?'ol':'ul',U=new N.a,W=new I.a(H,null);return W.appendChildren(U),K.bindElements($,U),U}function V($,K){const H=K.getNext?'nextSibling':'previousSibling',U=!!K.checkAllSiblings,W=!!K.sameIndent,Z=!!K.biggerIndent,G=$.getAttribute('indent');for(let J=$[H],Y;J&&'listItem'==J.name;){if(Y=J.getAttribute('indent'),W&&G==Y||Z&&GY)return null;J=J[H]}return null}function R($,K){$&&K&&('ul'==$.name||'ol'==$.name)&&$.name==K.name&&z.a.mergeContainers(D.a.createAfter($))}function F($,K,H){const U=K.parent,W=V($,{sameIndent:!0,biggerIndent:!0});if(W){let X=H.toViewElement(W),Q=D.a.createAfter(X);z.a.breakContainer(Q)}const Z=V($,{sameIndent:!0,checkAllSiblings:!0});let G;if(Z){let X=H.toViewElement(Z),Q=D.a.createAfter(X);G=z.a.breakContainer(Q)}else{const X=$.previousSibling;G=X&&'listItem'==X.name?D.a.createAt(H.toViewElement(X),'end'):H.toViewPosition(L.a.createBefore($))}z.a.insert(G,U);const J=V($,{getNext:!0,biggerIndent:!0}),Y=H.toViewElement(J);if(Y){let X=q.a.createOn(Y.parent),Q=D.a.createAt(K,'end');z.a.move(X,Q)}R(U,U.nextSibling),R(U.previousSibling,U)}var N=s(375),M=s(5),L=s(1),I=s(39),D=s(25),q=s(34),z=s(77);r.d=function($,K,H,U){if(H.test(K.item,'insert')&&H.test(K.item,'addAttribute:type')&&H.test(K.item,'addAttribute:indent')){H.consume(K.item,'insert'),H.consume(K.item,'addAttribute:type'),H.consume(K.item,'addAttribute:indent');const W=K.item,Z=O(W,U.mapper);F(W,Z,U.mapper)}},r.e=function($,K,H,U){if(!H.consume(K.item,'changeAttribute:type'))return;const W=U.mapper.toViewElement(K.item);z.a.breakContainer(D.a.createBefore(W)),z.a.breakContainer(D.a.createAfter(W));let Z=W.parent;const G='numbered'==K.attributeNewValue?'ol':'ul';Z=z.a.rename(Z,G),R(Z,Z.nextSibling),R(Z.previousSibling,Z)},r.f=function($,K,H,U){if(H.consume(K.item,'remove')){const W=U.mapper.toViewElement(K.item);z.a.breakContainer(D.a.createBefore(W)),z.a.breakContainer(D.a.createAfter(W));const Z=W.parent;z.a.remove(q.a.createOn(Z))}},r.h=function($,K,H,U){if(H.consume(K.item,'changeAttribute:indent')){const W=U.mapper.toViewElement(K.item);z.a.breakContainer(D.a.createBefore(W)),z.a.breakContainer(D.a.createAfter(W));const Z=W.parent,G=Z.previousSibling;z.a.remove(q.a.createOn(Z)),R(G,G.nextSibling),F(K.item,W,U.mapper)}},r.c=function($,K,H,U){if('listItem'!=K.item.name)for(let W=U.mapper.toViewPosition(K.range.start);('ul'==W.parent.name||'ol'==W.parent.name)&&(W=z.a.breakContainer(W),null!==W.parent.parent);)W=D.a.createBefore(W.parent)},r.g=function($,K,H,U){const W=U.mapper.toViewPosition(K.sourcePosition),Z=W.nodeBefore,G=W.nodeAfter;R(Z,G)},r.i=function($,K,H,U){if(H.consume(K.input,{name:!0})){const W=new M.a('listItem');K.indent=K.indent?K.indent:0;const Z='ul'==K.input.parent.name?'bulleted':'numbered';W.setAttribute('type',Z),W.setAttribute('indent',K.indent),K.context.push(W),K.indent++;let G=[W];for(let J of K.input.getChildren()){const Y=U.convertItem(J,H,K);'ul'==J.name||'ol'==J.name?G=G.concat(Array.from(Y.getChildren())):W.appendChildren(Y)}K.indent--,K.context.pop(),K.output=K.output?K.output.concat(G):G}},r.j=function($,K,H){if(H.test(K.input,{name:!0})){const U=Array.from(K.input.getChildren());for(let W of U)W.name&&'li'==W.name||W.remove()}},r.a=function($,K){'li'==K.viewPosition.parent.name&&'listItem'!=K.modelPosition.parent.name&&(K.viewPosition=D.a.createBefore(K.viewPosition.parent),$.stop())},r.b=function($,K){const H=K.viewPosition,U=K.mapper,W=H.nodeAfter,Z=H.nodeBefore;let G;if(W)'ul'==W.name||'ol'==W.name?G=U.toModelElement(W.getChild(0)):'li'==W.name&&(G=U.toModelElement(W)),G&&(K.modelPosition=L.a.createBefore(G));else if(Z){let J;if('ul'==Z.name||'ol'==Z.name?J=Z.getChild(Z.childCount-1):'li'==Z.name&&(J=Z),J){G=U.toModelElement(J);const Y=U.getModelLength(J);K.modelPosition=L.a.createBefore(G).getShiftedBy(Y)}}null!==K.modelPosition&&$.stop()}},function(o,r,s){'use strict';var d=s(12),u=s(176);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h,w){super(h),this._indentBy='forward'==w?1:-1,this.listenTo(h.document.selection,'change:range',()=>{this.refreshState()}),this.listenTo(h.document,'changesDone',()=>{this.refreshState()})}_doExecute(){const h=this.editor.document,w=h.batch(),C=s.i(u.a)(h.selection.getFirstPosition());h.enqueueChanges(()=>{const T=C.getAttribute('indent');let P=[C],S=C.nextSibling;for(;S&&'listItem'==S.name&&S.getAttribute('indent')>T;)P.push(S),S=S.nextSibling;0>this._indentBy&&(P=P.reverse());for(let E of P){const O=E.getAttribute('indent')+this._indentBy;0>O?w.rename(E,'paragraph').removeAttribute(E,'indent').removeAttribute(E,'type'):w.setAttribute(E,'indent',O)}})}_checkEnabled(){const h=s.i(u.a)(this.editor.document.selection.getFirstPosition());if(!h)return!1;const w=h.previousSibling,C=h.getAttribute('indent'),T=C+this._indentBy;if(0{const R=this.editor.document,F=R.selection.getLastPosition().parent;R.selection.isCollapsed&&'listItem'==F.name&&F.isEmpty&&(this.editor.execute('outdentList'),V.preventDefault(),O.stop())}),this.listenTo(this.editor.editing.view,'keydown',(O,V)=>{let R=null;if(V.keystroke==s.i(h.a)('tab')?R='indentList':V.keystroke==s.i(h.a)('Shift+tab')&&(R='outdentList'),R){const F=this.editor.commands.get(R);F.isEnabled&&(this.editor.execute(R),V.preventDefault(),O.stop())}})}_addButton(E,O,V){const R=this.editor,F=R.commands.get(E);R.ui.componentFactory.add(E,(N)=>{const M=new f.a(N);return M.set({label:O,icon:V,tooltip:!0}),M.bind('isOn','isEnabled').to(F,'value','isEnabled'),this.listenTo(M,'execute',()=>R.execute(E)),M})}}r.a=S},function(o,r,s){'use strict';var d=s(12),u=s(1),f=s(176);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{constructor(w,C){super(w),this.type='bulleted'==C?'bulleted':'numbered',this.set('value',!1);const T=()=>{this.refreshValue(),this.refreshState()};this.listenTo(w.document.selection,'change:range',T),this.listenTo(w.document,'changesDone',T)}refreshValue(){const w=this.editor.document.selection.getFirstPosition(),C=s.i(f.a)(w);this.value=null!==C&&C.getAttribute('type')==this.type}_doExecute(w={}){const C=this.editor.document,T=Array.from(C.selection.getSelectedBlocks()),P=!0===this.value;C.enqueueChanges(()=>{const S=w.batch||C.batch();if(P){let E=T[T.length-1].nextSibling,O=_NumberPOSITIVE_INFINITY,V=[];for(;E&&'listItem'==E.name&&0!==E.getAttribute('indent');){const R=E.getAttribute('indent');Rthis._updateValue())}_doExecute(f={}){const h=this.editor.document;h.enqueueChanges(()=>{const w=f.batch||h.batch(),C=(f.selection||h.selection).getSelectedBlocks();for(let T of C)T.is('paragraph')||w.rename(T,'paragraph')})}_updateValue(){const f=this.editor.document.selection.getSelectedBlocks().next().value;f&&(this.value=f.is('paragraph'))}}r.a=u},function(o,r,s){'use strict';var d=s(2),u=s(378),f=s(116),h=s(296),w=s(348),C=s(351),T=s(353),P=s(356),S=s(172),E=s(298),O=s(365),V=s(372);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class R extends d.a{static get requires(){return[u.a,f.a,h.a,w.a,C.a,T.a,P.a,S.a,E.a,O.a,V.a]}}r.a=R},function(o,r,s){'use strict';var d=s(2),u=s(301),f=s(345),h=s(384),w=s(404);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class C extends d.a{static get requires(){return[u.a,f.a,h.a,w.a]}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(380),f=s(381);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{init(){const w=this.editor,C=w.editing.view;C.addObserver(f.a),w.commands.set('forwardDelete',new u.a(w,'forward')),w.commands.set('delete',new u.a(w,'backward')),this.listenTo(C,'delete',(T,P)=>{w.execute('forward'==P.direction?'forwardDelete':'delete',{unit:P.unit}),P.preventDefault()})}}r.a=h},function(o,r,s){'use strict';var d=s(12),u=s(59),f=s(177),h=s(184);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{constructor(C,T){super(C),this.direction=T,this._buffer=new f.a(C.document,C.config.get('typing.undoStep'))}_doExecute(C={}){const T=this.editor.document,P=this.editor.data;T.enqueueChanges(()=>{this._buffer.lock();const S=u.a.createFromSelection(T.selection);if(S.isCollapsed&&P.modifySelection(S,{direction:this.direction,unit:C.unit}),S.isCollapsed)return;let E=0;S.getFirstRange().getMinimalFlatRanges().forEach((O)=>{E+=s.i(h.a)(O.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),P.deleteContent(S,this._buffer.batch,{merge:!0}),this._buffer.input(E),T.selection.setRanges(S.getRanges(),S.isBackward),this._buffer.unlock()})}}r.a=w},function(o,r,s){'use strict';var d=s(50),u=s(114),f=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{constructor(w){super(w),w.on('keydown',(C,T)=>{const P={};if(T.keyCode==f.d.delete)P.direction='forward',P.unit='character';else if(T.keyCode==f.d.backspace)P.direction='backward',P.unit='codePoint';else return;P.unit=T.altKey?'word':P.unit,w.fire('delete',new u.a(w,T.domEvent,P))})}observe(){}}r.a=h},function(o,r,s){'use strict';function d(F){return!!F.ctrlKey||R.includes(F.keyCode)}function u(F,N){return F instanceof C.a&&N instanceof C.a?F.data===N.data:F===N}var f=s(2),h=s(3),w=s(25),C=s(29),T=s(185),P=s(408),S=s(22),E=s(383);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class O extends f.a{init(){const F=this.editor,N=F.editing.view,M=new E.a(F,F.config.get('typing.undoStep')||20);F.commands.set('input',M),this.listenTo(N,'keydown',(L,I)=>{this._handleKeydown(I,M.buffer)},{priority:'lowest'}),this.listenTo(N,'mutations',(L,I,D)=>{this._handleMutations(I,D)})}_handleKeydown(F,N){const M=this.editor.document;d(F)||M.selection.isCollapsed||(N.lock(),M.enqueueChanges(()=>{this.editor.data.deleteContent(M.selection,N.batch)}),N.unlock())}_handleMutations(F,N){new V(this.editor).handle(F,N)}}r.a=O;class V{constructor(F){this.editor=F,this.editing=this.editor.editing}handle(F,N){for(let M of F)this._handleTextMutation(M,N),this._handleTextNodeInsertion(M)}_handleTextMutation(F,N){if('text'!=F.type)return;const M=F.newText.replace(/\u00A0/g,' '),L=F.oldText.replace(/\u00A0/g,' '),I=s.i(T.a)(L,M);let D=null,q=null;for(let G=0;G=F;F++)R.push(F)},function(o,r,s){'use strict';var d=s(12),u=s(177);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h,w){super(h),this._buffer=new u.a(h.document,w)}destroy(){super.destroy(),this._buffer.destroy(),this._buffer=null}get buffer(){return this._buffer}_doExecute(h={}){const w=this.editor.document,C=h.text||'',T=C.length,P=h.range||w.selection.getFirstRange(),S=h.resultRange;w.enqueueChanges(()=>{const E=P.isCollapsed;this._buffer.lock(),E||this._buffer.batch.remove(P),this._buffer.batch.weakInsert(P.start,C),S?this.editor.data.model.selection.setRanges([S]):E&&this.editor.data.model.selection.collapse(P.start.getShiftedBy(T)),this._buffer.unlock(),this._buffer.input(T)})}}r.a=f},function(o,r,s){'use strict';var d=s(2),u=s(382),f=s(379);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{static get requires(){return[u.a,f.a]}}r.a=h},function(o,r,s){'use strict';var u=s(22);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function({emitter:f,activator:h,callback:w}){f.listenTo(document,'keydown',(C,{keyCode:T})=>{T==u.d.esc&&h()&&w()})}},function(o,r,s){'use strict';var d=s(0);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(f){this.editor=f,this._components=new Map}add(f,h){if(this._components.get(f))throw new d.a('componentfactory-item-exists: The item already exists in the component factory.',{name:f});this._components.set(f,h)}create(f){return this._components.get(f)(this.editor.locale)}}},function(o,r,s){'use strict';var u=s(26),f=s(389),h=s(388);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(w,C){const T=new u.a(C);T.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(w);const P=new h.a(C);return new f.a(C,T,P)}},function(o,r,s){'use strict';var d=s(9),u=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h);const w=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.template=new u.a({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',w.if('isVisible','ck-dropdown__panel-visible')]},children:this.children})}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(63),h=s(64);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class w extends d.a{constructor(C,T,P){super(C),u.a.extend(T.template,{attributes:{class:['ck-dropdown__button']}}),this.buttonView=T,this.panelView=P,this.set('isOpen',!1),this.focusTracker=new f.a,this.keystrokes=new h.a,this.template=new u.a({tag:'div',attributes:{class:['ck-dropdown']},children:[T,P]}),this.listenTo(T,'execute',()=>this.isOpen=!this.isOpen),P.bind('isVisible').to(this,'isOpen')}init(){this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const C=(T,P)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,P())};return this.keystrokes.set('arrowdown',(T,P)=>{this.isOpen||(this.isOpen=!0,P())}),this.keystrokes.set('arrowright',(T,P)=>{this.isOpen&&P()}),this.keystrokes.set('arrowleft',C),this.keystrokes.set('esc',C),super.init()}focus(){this.buttonView.focus()}}r.a=w},function(o,r,s){'use strict';function u(C){C.listenTo(document,'click',(T,{target:P})=>{C.element==P||C.element.contains(P)||(C.isOpen=!1)})}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */var f=s(398),h=s(397),w=s(387);r.a=function(C,T){const P=s.i(w.a)(C,T),S=P.listView=new f.a(T);return S.items.bindTo(C.items).using((E)=>{const O=new h.a(T);return O.bind(...Object.keys(E)).to(E),O}),S.items.delegate('execute').to(P),P.panelView.children.add(S),P.on('change:isOpen',(E,O,V)=>{V?u(P):P.stopListening(document)}),P.on('execute',()=>{P.isOpen=!1}),P.keystrokes.set('arrowdown',(E,O)=>{P.isOpen&&(S.focus(),O())}),P.keystrokes.set('arrowup',(E,O)=>{P.isOpen&&(S.focusLast(),O())}),P}},function(o,r,s){'use strict';var d=s(9),u=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h,w){super(h);const C=this.bindTemplate;w&&(this.element=this.editableElement=w),this.template=new u.a({tag:'div',attributes:{class:[C.to('isFocused',(T)=>T?'ck-focused':'ck-blurred'),'ck-editor__editable'],contenteditable:C.to('isReadOnly',(T)=>!T)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=w}init(){return this.externalElement?this.template.apply(this.externalElement):this.editableElement=this.element,super.init()}destroy(){return this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}r.a=f},function(o,r,s){'use strict';var d=s(391),u=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h,w){super(h,w);const C=this.bindTemplate,T=this.t;this.set('name',null);u.a.extend(this.template,{attributes:{role:'textbox','aria-label':C.to('name',(S)=>{return T('Rich Text Editor, %0',[S])}),class:'ck-editor__editable_inline'}})}}r.a=f},function(o,r,s){'use strict';var d=s(394),u=s(68),f=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h extends d.a{constructor(w){super(w);const C=this.t,T=s.i(u.a)();this.set('width',null),this.set('height',null),this.top=this.createCollection(),this.main=this.createCollection(),this.template=new f.a({tag:'div',attributes:{class:['ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:w.lang,'aria-labelledby':`cke-editor__aria-label_${T}`},children:[{tag:'span',attributes:{id:`cke-editor__aria-label_${T}`,class:'cke-voice-label'},children:[C('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}]})}}r.a=h},function(o,r,s){'use strict';var d=s(9),u=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(h){super(h),this.body=this.createCollection()}init(){return Promise.resolve().then(()=>this._renderBodyCollection()).then(()=>super.init())}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const h=this._bodyCollectionContainer=new u.a({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(h)}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(6);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{constructor(){super();const h=this.bindTemplate;this.set('content'),this.set('viewBox','0 0 20 20'),this.template=new u.a({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:h.to('viewBox')}}),this.on('change:content',(w,C,T)=>{for(const P=new DOMParser().parseFromString(T.trim(),'image/svg+xml').firstChild;0{this.focusTracker.add(P.element)}),this.items.on('remove',(T,P)=>{this.focusTracker.remove(P.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}r.a=C},function(o,r,s){'use strict';var d=s(56),u=s(4),f=s(31);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class h{constructor(w,C){C&&s.i(d.a)(this,C),w&&this.set(w)}}r.a=h,s.i(u.a)(h,f.a)},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function({origin:u,originKeystrokeHandler:f,originFocusTracker:h,toolbar:w}){h.add(w.element),f.set('Alt+F10',(C,T)=>{h.isFocused&&!w.focusTracker.isFocused&&(w.focus(),T())}),w.keystrokes.set('Esc',(C,T)=>{w.focusTracker.isFocused&&(u.focus(),T())})}},function(o,r,s){'use strict';var d=s(62),u=s(6),f=s(183),h=s(187);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const w=s.i(h.a)('px');class C extends f.a{constructor(T){super(T);const P=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterOffset',50),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),u.a.extend(this.template,{attributes:{class:[P.if('isSticky','ck-toolbar_sticky'),P.if('_isStickyToTheLimiter','ck-toolbar_sticky_bottom-limit')],style:{width:P.to('isSticky',(S)=>{return S?w(this._elementPlaceholder.getBoundingClientRect().width):null}),bottom:P.to('_isStickyToTheLimiter',(S)=>{return S?w(this.limiterOffset):null}),marginLeft:P.to('_marginLeft')}}}),this._elementPlaceholder=new u.a({tag:'div',attributes:{class:['ck-toolbar__placeholder'],style:{display:P.to('isSticky',(S)=>S?'block':'none'),height:P.to('isSticky',(S)=>{return S?w(this._toolbarRect.height):null})}}}).render()}init(){super.init(),this.element.parentNode.insertBefore(this._elementPlaceholder,this.element),this.listenTo(d.a.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}destroy(){return super.destroy().then(()=>{this._elementPlaceholder.remove()})}_checkIfShouldBeSticky(){const T=this._limiterRect=this.limiterElement.getBoundingClientRect(),P=this._toolbarRect=this.element.getBoundingClientRect();this.isSticky=this.isActive&&0>T.top&&this._toolbarRect.height+this.limiterOffset{const w=h.batch.deltas[h.batch.deltas.length-1],C=w.baseVersion+w.operations.length,T=Array.from(this.editor.document.history.getDeltas(C)).filter((P)=>{return!this._createdBatches.has(P.batch)});this._restoreSelection(h.selection.ranges,h.selection.isBackward,T),this._redo(h.batch)}),this.refreshState()}_redo(h){const w=this.editor.document,C=w.batch();this._createdBatches.add(C);const T=h.deltas.slice();T.reverse();for(let P of T){const S=P.baseVersion+P.operations.length;let E=[P.getReversed()];for(let O of w.history.getDeltas(S))this._createdBatches.has(O.batch)||(E=s.i(u.a)(E,[O],!0).deltasA);for(let O of E){O.baseVersion=w.version,C.addDelta(O);for(let V of O.operations)w.applyOperation(V)}}}}r.a=f},function(o,r,s){'use strict';var d=s(2),u=s(406),f=s(26),h=s(289),w=s.n(h),C=s(288),T=s.n(C);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class P extends d.a{static get requires(){return[u.a]}init(){const S=this.editor,E=S.t;this._addButton('undo',E('Undo'),'CTRL+Z',w.a),this._addButton('redo',E('Redo'),'CTRL+Y',T.a),S.keystrokes.set('CTRL+Z','undo'),S.keystrokes.set('CTRL+Y','redo'),S.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(S,E,O,V){const R=this.editor,F=R.commands.get(S);R.ui.componentFactory.add(S,(N)=>{const M=new f.a(N);return M.set({label:E,icon:V,keystroke:O,tooltip:!0}),M.bind('isEnabled').to(F,'isEnabled'),this.listenTo(M,'execute',()=>R.execute(S)),M})}}r.a=P},function(o,r,s){'use strict';var d=s(119),u=s(105);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */class f extends d.a{_doExecute(h=null){let w=h?this._stack.findIndex((T)=>T.batch==h):this._stack.length-1;const C=this._stack.splice(w,1)[0];this.editor.document.enqueueChanges(()=>{const T=this._undo(C.batch),P=this.editor.document.history.getDeltas(C.batch.baseVersion);this._restoreSelection(C.selection.ranges,C.selection.isBackward,P),this.fire('revert',C.batch,T)}),this.refreshState()}_getItemIndexFromBaseVersion(h){for(let w=0;w{this._batchRegistry.has(P)||'transparent'==P.type||(this._redoCommand._createdBatches.has(P)?this._undoCommand.addBatch(P):!this._undoCommand._createdBatches.has(P)&&(this._undoCommand.addBatch(P),this._redoCommand.clearStack()),this._batchRegistry.add(P))},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(w,C,T)=>{this._redoCommand.addBatch(T)})}}r.a=h},function(o,r,s){'use strict';var d=s(97);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(f,h){this._config={},h&&this.define(h),f&&this._setObjectToTarget(this._config,f)}set(f,h){this._setToTarget(this._config,f,h)}define(f,h){this._setToTarget(this._config,f,h,!0)}get(f){return this._getFromSource(this._config,f)}_setToTarget(f,h,w,C=!1){if(s.i(d.a)(h))return void this._setObjectToTarget(f,h,C);const T=h.split('.');h=T.pop();for(let P of T)s.i(d.a)(f[P])||(f[P]={}),f=f[P];return s.i(d.a)(w)?(s.i(d.a)(f[h])||(f[h]={}),f=f[h],void this._setObjectToTarget(f,w,C)):void(C&&'undefined'!=typeof f[h]||(f[h]=w))}_getFromSource(f,h){const w=h.split('.');h=w.pop();for(let C of w){if(!s.i(d.a)(f[C])){f=null;break}f=f[C]}return f?f[h]:void 0}_setObjectToTarget(f,h,w){Object.keys(h).forEach((C)=>{this._setToTarget(f,C,h[C],w)})}}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u,f){function h(){P&&(C.push(P),P=null)}function w(S){return P&&P.type==S}const C=[];let T=0,P;return u.forEach((S)=>{'equal'==S?(h(),T++):'insert'==S?(w('insert')?P.values.push(f[T]):(h(),P={type:'insert',index:T,values:[f[T]]}),T++):w('delete')?P.howMany++:(h(),P={type:'delete',index:T,howMany:1})}),h(),C}},function(o,r,s){'use strict';var u=s(186);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(f,h){const w=s.i(u.a)(f),C=s.i(u.a)(h);let T=0;for(;w[T]==C[T]&&w[T];)T++;return 0==T?null:w[T-1]}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return u instanceof HTMLTextAreaElement?u.value:u.innerHTML}},function(o,r,s){'use strict';var u=s(62);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=function(f){for(;f&&'html'!=f.tagName.toLowerCase();){if('static'!=u.a.window.getComputedStyle(f).position)return f;f=f.parentElement}return null}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){let f=0;for(;u.previousSibling;)u=u.previousSibling,f++;return f}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u,f,h){u.insertBefore(h,u.childNodes[f]||null)}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){return'[object Range]'==Object.prototype.toString.apply(u)}},function(o,r,s){'use strict';function u(P,S,E){const{left:O,top:V,name:R}=P(S,E);return[R,E.clone().moveTo(O,V)]}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function f(P,S,E,O,V){let R=0,F=0,N,M;const L=E.getArea();return P.some((I)=>{function D(){F=K,R=$,N=z,M=q}const[q,z]=u(I,S,E);let $,K;if(O)if(V){const H=O.getIntersection(V);$=H?H.getIntersectionArea(z):0}else $=O.getIntersectionArea(z);return V&&(K=V.getIntersectionArea(z)),V&&!O?K>F&&D():!V&&O?$>R&&D():K>F&&$>=R?D():K>=F&&$>R&&D(),$===L}),N?[M,N]:null}function h({left:P,top:S}){const{scrollX:E,scrollY:O}=w.a.window;return{left:P+E,top:S+O}}var w=s(62),C=s(416),T=s(411);r.a=function({element:P,target:S,positions:E,limiter:O,fitInViewport:V}){const R=s.i(T.a)(P.parentElement),F=new C.a(P),N=new C.a(S);let M,L;if(!O&&!V)[L,M]=u(E[0],N,F);else{const q=O&&new C.a(O),z=V&&C.a.getViewportRect();[L,M]=f(E,N,F,q,z)||u(E[0],N,F)}let{left:I,top:D}=h(M);if(R){const q=h(new C.a(R));I-=q.left,D-=q.top}return{left:I,top:D,name:L}}},function(o,r,s){'use strict';var d=s(62),u=s(414),f=s(507);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const h=['top','right','bottom','left','width','height'];class w{constructor(C){(s.i(f.a)(C)||s.i(u.a)(C))&&(C=C.getBoundingClientRect()),h.forEach((T)=>this[T]=C[T])}clone(){return new w(this)}moveTo(C,T){return this.top=T,this.right=C+this.width,this.bottom=T+this.height,this.left=C,this}moveBy(C,T){return this.top+=T,this.right+=C,this.left+=C,this.bottom+=T,this}getIntersection(C){const T={top:_Mathmax(this.top,C.top),right:_Mathmin(this.right,C.right),bottom:_Mathmin(this.bottom,C.bottom),left:_Mathmax(this.left,C.left)};return T.width=T.right-T.left,T.height=T.bottom-T.top,0>T.width||0>T.height?null:new w(T)}getIntersectionArea(C){const T=this.getIntersection(C);return T?T.getArea():0}getArea(){return this.width*this.height}static getViewportRect(){const{innerWidth:C,innerHeight:T}=d.a.window;return new w({top:0,right:C,bottom:T,left:0,width:C,height:T})}}r.a=w},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u){const f=u.parentNode;f&&f.removeChild(u)}},function(o,r){'use strict';r.a=/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */function(u,f){u instanceof HTMLTextAreaElement&&(u.value=f),u.innerHTML=f}},function(o,r){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(){this._replacedElements=[]}replace(u,f){this._replacedElements.push({element:u,newElement:f}),u.style.display='none',f&&u.parentNode.insertBefore(f,u.nextSibling)}restore(){this._replacedElements.forEach(({element:u,newElement:f})=>{u.style.display='',f&&f.remove()}),this._replacedElements=[]}}},function(o,r){'use strict';/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */const u=navigator.userAgent.toLowerCase(),f={mac:function(h){return-1=f?u:f)),u}},function(o,r,s){'use strict';var u=s(14),f=Object.create;r.a=function(h){return s.i(u.a)(h)?f(h):{}}},function(o,r,s){'use strict';var u=s(15),f=s(517);r.a=function(h,w,C,T){var P=h.length;for(C=s.i(u.a)(C),0>C&&(C=-C>P?0:P+C),T=void 0===T||T>P?P:s.i(u.a)(T),0>T&&(T+=P),T=C>T?0:s.i(f.a)(T);Ch?w:0,s.i(u.a)(h,w)?f[h]:void 0}},function(o,r,s){'use strict';var u=s(125);r.a=function(f){return function(h){return s.i(u.a)(h,f)}}},function(o,r,s){'use strict';var u=s(65),f=s(87),h=s(36),w=s(53),C=s(14),T=s(54);r.a=function(P,S,E,O){S=s.i(w.a)(S,P)?[S]:s.i(f.a)(S);for(var V=-1,R=S.length,N=P,M;null!=N&&++Vh||P&&S&&O&&!E&&!V||C&&S&&O||!w&&O||!T)return 1;if(!C&&!P&&!V&&fP?void 0:S,P=1),w=Object(w);++TT)return!1;var P=C.length-1;return T==P?C.pop():h.call(C,T,1),!0}},function(o,r,s){'use strict';var u=s(84);r.a=function(f){var h=this.__data__,w=s.i(u.a)(h,f);return 0>w?void 0:h[w][1]}},function(o,r,s){'use strict';var u=s(84);r.a=function(f){return-1C?w.push([f,h]):w[C][1]=h,this}},function(o,r,s){'use strict';var u=s(423),f=s(80),h=s(188);r.a=function(){this.__data__={hash:new u.a,map:new(h.a||f.a),string:new u.a}}},function(o,r,s){'use strict';var u=s(88);r.a=function(f){return s.i(u.a)(this,f)['delete'](f)}},function(o,r,s){'use strict';var u=s(88);r.a=function(f){return s.i(u.a)(this,f).get(f)}},function(o,r,s){'use strict';var u=s(88);r.a=function(f){return s.i(u.a)(this,f).has(f)}},function(o,r,s){'use strict';var u=s(88);r.a=function(f,h){return s.i(u.a)(this,f).set(f,h),this}},function(o,r,s){'use strict';var u=s(125),f=s(35);r.a=function(h,w){return 1==w.length?h:s.i(u.a)(h,s.i(f.a)(w,0,-1))}},function(o,r){'use strict';r.a=function(f){return this.__data__.set(f,'__lodash_hash_undefined__'),this}},function(o,r){'use strict';r.a=function(u){return this.__data__.has(u)}},function(o,r){'use strict';r.a=function(u){var f=-1,h=Array(u.size);return u.forEach(function(w){h[++f]=[w,w]}),h}},function(o,r,s){'use strict';var u=s(80);r.a=function(){this.__data__=new u.a}},function(o,r){'use strict';r.a=function(u){return this.__data__['delete'](u)}},function(o,r){'use strict';r.a=function(u){return this.__data__.get(u)}},function(o,r){'use strict';r.a=function(u){return this.__data__.has(u)}},function(o,r,s){'use strict';var u=s(80),f=s(120);r.a=function(w,C){var T=this.__data__;return T instanceof u.a&&T.__data__.length==200&&(T=this.__data__=new f.a(T.__data__)),T.set(w,C),this}},function(o,r,s){'use strict';var d=s(511),u=s(519),f=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,h=/\\(\\)?/g,w=s.i(d.a)(function(C){var T=[];return s.i(u.a)(C).replace(f,function(P,S,E,O){T.push(E?O.replace(h,'$1'):S||P)}),T});r.a=w},function(o,r,s){'use strict';var d=s(208),u=s(209),f=s(210),h=s(211),w=s(212),C=s(213),T=s(142),P=s(143),S=s(214),E=s(215),O=s(216),V=s(217),R=s(218),F=s(219),N=s(220),M=s(221),L=s(222),I=s(223),D=s(144),q=s(226),z=s(227),$=s(228),K=s(229),H=s(230),U=s(232),W=s(18),Z=s(233),G=s(234),J=s(235),Y=s(148),X=s(236),Q=s(237),ee=s(238),te=s(239),ae=s(240),ne=s(241),oe=s(242),ie=s(243),re=s(244),se=s(245),le=s(246),de=s(247),ce=s(248),ue=s(249),me=s(250),pe=s(251),ge=s(252),fe=s(253),he=s(254),be=s(256),_e=s(257),ke=s(258),ye=s(259),we=s(260),ve=s(261),xe=s(98),Ce=s(149),Te=s(262),Pe=s(263),Ae=s(264),Se=s(265),Ee=s(266),Oe=s(267),Ve=s(268),Re=s(269);r.a={chunk:d.a,compact:u.a,concat:f.a,difference:h.a,differenceBy:w.a,differenceWith:C.a,drop:T.a,dropRight:P.a,dropRightWhile:S.a,dropWhile:E.a,fill:O.a,findIndex:V.a,findLastIndex:R.a,first:F.a,flatten:N.a,flattenDeep:M.a,flattenDepth:L.a,fromPairs:I.a,head:D.a,indexOf:q.a,initial:z.a,intersection:$.a,intersectionBy:K.a,intersectionWith:H.a,join:U.a,last:W.a,lastIndexOf:Z.a,nth:G.a,pull:J.a,pullAll:Y.a,pullAllBy:X.a,pullAllWith:Q.a,pullAt:ee.a,remove:te.a,reverse:ae.a,slice:ne.a,sortedIndex:oe.a,sortedIndexBy:ie.a,sortedIndexOf:re.a,sortedLastIndex:se.a,sortedLastIndexBy:le.a,sortedLastIndexOf:de.a,sortedUniq:ce.a,sortedUniqBy:ue.a,tail:me.a,take:pe.a,takeRight:ge.a,takeRightWhile:fe.a,takeWhile:he.a,union:be.a,unionBy:_e.a,unionWith:ke.a,uniq:ye.a,uniqBy:we.a,uniqWith:ve.a,unzip:xe.a,unzipWith:Ce.a,without:Te.a,xor:Pe.a,xorBy:Ae.a,xorWith:Se.a,zip:Ee.a,zipObject:Oe.a,zipObjectDeep:Ve.a,zipWith:Re.a}},function(o,r,s){'use strict';var d=s(208),u=s(209),f=s(210),h=s(211),w=s(212),C=s(213),T=s(142),P=s(143),S=s(214),E=s(215),O=s(216),V=s(217),R=s(218),F=s(219),N=s(220),M=s(221),L=s(222),I=s(223),D=s(144),q=s(226),z=s(227),$=s(228),K=s(229),H=s(230),U=s(232),W=s(18),Z=s(233),G=s(234),J=s(235),Y=s(148),X=s(236),Q=s(237),ee=s(238),te=s(239),ae=s(240),ne=s(241),oe=s(242),ie=s(243),re=s(244),se=s(245),le=s(246),de=s(247),ce=s(248),ue=s(249),me=s(250),pe=s(251),ge=s(252),fe=s(253),he=s(254),be=s(256),_e=s(257),ke=s(258),ye=s(259),we=s(260),ve=s(261),xe=s(98),Ce=s(149),Te=s(262),Pe=s(263),Ae=s(264),Se=s(265),Ee=s(266),Oe=s(267),Ve=s(268),Re=s(269),Fe=s(500);s.d(r,'a',function(){return Fe.a})},function(o,r,s){'use strict';var d=s(65),u=s(137),f=s(460),h=s(95),w=s(91),C=s(510),T=Object.prototype,P=T.propertyIsEnumerable,S=!P.call({valueOf:1},'valueOf'),E=s.i(f.a)(function(O,V){if(S||s.i(w.a)(V)||s.i(h.a)(V))return void s.i(u.a)(V,s.i(C.a)(V),O);for(var R in V)s.i(d.a)(O,R,V[R])});r.a=E},function(o,r,s){'use strict';var u=s(193);r.a=function(f,h){return s.i(u.a)(f,!0,!0,h)}},function(o,r){'use strict';r.a=function(u){return function(){return u}}},function(o,r,s){'use strict';var u=s(437),f=s(468);r.a=function(h,w){return null!=h&&s.i(f.a)(h,w,u.a)}},function(o,r,s){'use strict';(function(d){var u=s(504),f=s(30),h={'function':!0,object:!0},w=h[typeof exports]&&exports&&!exports.nodeType?exports:void 0,C=h[typeof d]&&d&&!d.nodeType?d:void 0,T=C&&C.exports===w?w:void 0,P=T?f.a.Buffer:void 0,S=P?function(E){return E instanceof P}:s.i(u.a)(!1);r.a=S}).call(r,s(151)(o))},function(o,r,s){'use strict';var u=s(43),f=s(97);r.a=function(h){return!!h&&1===h.nodeType&&s.i(u.a)(h)&&!s.i(f.a)(h)}},function(o,r,s){'use strict';var u=s(128);r.a=function(f,h){return s.i(u.a)(f,h)}},function(o,r,s){'use strict';var u=s(96),f=s(43),G={};G['[object Float32Array]']=G['[object Float64Array]']=G['[object Int8Array]']=G['[object Int16Array]']=G['[object Int32Array]']=G['[object Uint8Array]']=G['[object Uint8ClampedArray]']=G['[object Uint16Array]']=G['[object Uint32Array]']=!0,G['[object Arguments]']=G['[object Array]']=G['[object ArrayBuffer]']=G['[object Boolean]']=G['[object DataView]']=G['[object Date]']=G['[object Error]']=G['[object Function]']=G['[object Map]']=G['[object Number]']=G['[object Object]']=G['[object RegExp]']=G['[object Set]']=G['[object String]']=G['[object WeakMap]']=!1;var J=Object.prototype,Y=J.toString;r.a=function(X){return s.i(f.a)(X)&&s.i(u.a)(X.length)&&!!G[Y.call(X)]}},function(o,r,s){'use strict';var u=s(442),f=s(203),h=s(36),w=s(91),C=Object.prototype,T=C.hasOwnProperty;r.a=function(P){for(var S=-1,E=s.i(w.a)(P),O=s.i(u.a)(P),V=O.length,R=s.i(f.a)(P),N=R||[],M=N.length,L;++Sw?-1:1;return C*1.7976931348623157e308}return w===w?w:0}},function(o,r,s){'use strict';var u=s(433),f=s(15);r.a=function(w){return w?s.i(u.a)(s.i(f.a)(w),0,4294967295):0}},function(o,r,s){'use strict';var d=s(462),u=s(67),f=s.i(d.a)(u.a);r.a=f},function(o,r,s){'use strict';var u=s(449);r.a=function(f){return null==f?'':s.i(u.a)(f)}},function(o,r,s){'use strict';var d=s(524);/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */r.a=class{constructor(f){this.lang=f||'en',this.t=(...h)=>this._t(...h)}_t(f,h){let w=s.i(d.a)(this.lang,f);return h&&(w=w.replace(/\%(\d+)/g,(C,T)=>{return TS?0:S,P}isAfter(T){return'after'==this.compareWith(T)}isBefore(T){return'before'==this.compareWith(T)}isEqual(T){return'same'==this.compareWith(T)}isTouching(T){let P=null,S=null,E=this.compareWith(T);switch(E){case'same':return!0;case'before':P=C.createFromPosition(this),S=C.createFromPosition(T);break;case'after':P=C.createFromPosition(T),S=C.createFromPosition(this);break;default:return!1;}for(let O=P.parent;P.path.length+S.path.length;){if(P.isEqual(S))return!0;if(P.path.length>S.path.length){if(P.offset!==O.maxOffset)return!1;P.path=P.path.slice(0,-1),O=O.parent,P.offset++}else{if(0!==S.offset)return!1;S.path=S.path.slice(0,-1)}}}_getTransformedByDeletion(T,P){let S=C.createFromPosition(this);if(this.root!=T.root)return S;if('same'==s.i(f.a)(T.getParentPath(),this.getParentPath())){if(T.offsetthis.offset)return null;S.offset-=P}}else if('prefix'==s.i(f.a)(T.getParentPath(),this.getParentPath())){const E=T.path.length-1;if(T.offset<=this.path[E]){if(T.offset+P>this.path[E])return null;S.path[E]-=P}}return S}_getTransformedByInsertion(T,P,S){let E=C.createFromPosition(this);if(this.root!=T.root)return E;if('same'==s.i(f.a)(T.getParentPath(),this.getParentPath()))(T.offsetC+1;){let S=P.maxOffset-T.offset;0!=S&&w.push(new h(T,T.getShiftedBy(S))),T.path=T.path.slice(0,-1),T.offset++,P=P.parent}for(;T.path.length<=this.end.path.length;){let S=this.end.path[T.path.length-1],E=S-T.offset;0!=E&&w.push(new h(T,T.getShiftedBy(E))),T.offset=S,T.path.push(0)}return w}getWalker(w={}){return w.boundaries=this,new u.a(w)}*getItems(w={}){w.boundaries=this,w.ignoreElementEnd=!0;const C=new u.a(w);for(let T of C)yield T.item}*getPositions(w={}){w.boundaries=this;const C=new u.a(w);yield C.position;for(let T of C)yield T.nextPosition}getTransformedByDelta(w){let C=[h.createFromRange(this)];const T=new Set(['insert','move','remove','reinsert']);for(let P of w.operations)if(T.has(P.type))for(let S=0;SS.start.isAfter(E.start));const T=w.indexOf(C),P=new this(C.start,C.end);for(let S=T-1;0<=S&&w[S].end.isEqual(P.start);S++)P.start=d.a.createFromPosition(w[S].start);for(let S=T+1;S{Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h)).forEach((w)=>{if(!(w in u.prototype)){const C=Object.getOwnPropertyDescriptor(h,w);C.enumerable=!1,Object.defineProperty(u.prototype,w,C)}})})}},function(o,r,s){'use strict';function d(T){return'string'==typeof T?[new h.a(T)]:(s.i(w.a)(T)||(T=[T]),Array.from(T).map((P)=>'string'==typeof P?new h.a(P):P))}var u=s(58),f=s(69),h=s(24),w=s(41);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends u.a{constructor(T,P,S){super(P),this.name=T,this._children=new f.a,S&&this.insertChildren(0,S)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(T,P=null){return P?'element'==T&&P==this.name:'element'==T||T==this.name}getChild(T){return this._children.getNode(T)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(T){return this._children.getNodeIndex(T)}getChildStartOffset(T){return this._children.getNodeStartOffset(T)}clone(T=!1){const P=T?Array.from(this._children).map((S)=>S.clone()):Array.from(this._children);return new C(this.name,this.getAttributes(),P)}offsetToIndex(T){return this._children.offsetToIndex(T)}appendChildren(T){this.insertChildren(this.childCount,T)}insertChildren(T,P){P=d(P);for(let S of P)S.parent=this;this._children.insertNodes(T,P)}removeChildren(T,P=1){const S=this._children.removeNodes(T,P);for(let E of S)E.parent=null;return S}getNodeByPath(T){let P=this;for(const S of T)P=P.getChild(S);return P}toJSON(){let T=super.toJSON();if(T.name=this.name,0{return re instanceof te?re.getValue(ie):re})}function f(oe,ie,{node:re}){let se=u(oe,re);se=1==oe.length&&oe[0]instanceof ne?se[0]:se.reduce(F,''),L(se)?ie.remove():ie.set(se)}function h(oe){return{set(ie){oe.textContent=ie},remove(){oe.textContent=''}}}function w(oe,ie,re){return{set(se){oe.setAttributeNS(re,ie,se)},remove(){oe.removeAttributeNS(re,ie)}}}function C(oe,ie){return{set(re){oe.style[ie]=re},remove(){oe.style[ie]=null}}}function T(oe){const ie=s.i(J.a)(oe,(re)=>{if(re&&(re instanceof te||D(re)||I(re)||q(re)))return re});return ie}function P(oe){if('string'==typeof oe?oe=O(oe):oe.text&&V(oe),oe.on&&(oe.eventListeners=E(oe.on),delete oe.on),!oe.text){oe.attributes&&S(oe.attributes);const ie=new W.a;if(oe.children)if(q(oe.children))ie.add(oe.children);else for(let re of oe.children)D(re)||I(re)?ie.add(re):ie.add(new ee(re));oe.children=ie}return oe}function S(oe){for(let ie in oe)oe[ie].value&&(oe[ie].value=[].concat(oe[ie].value)),R(oe,ie)}function E(oe){for(let ie in oe)R(oe,ie);return oe}function O(oe){return{text:[oe]}}function V(oe){Array.isArray(oe.text)||(oe.text=[oe.text])}function R(oe,ie){Array.isArray(oe[ie])||(oe[ie]=[oe[ie]])}function F(oe,ie){return L(ie)?oe:L(oe)?ie:`${oe} ${ie}`}function N(oe,ie){for(let re in ie)oe[re]?oe[re].push(...ie[re]):oe[re]=ie[re]}function M(oe,ie){if(ie.attributes&&(!oe.attributes&&(oe.attributes={}),N(oe.attributes,ie.attributes)),ie.eventListeners&&(!oe.eventListeners&&(oe.eventListeners={}),N(oe.eventListeners,ie.eventListeners)),ie.text&&oe.text.push(...ie.text),ie.children&&ie.children.length){if(oe.children.length!=ie.children.length)throw new K.a('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let re=0;for(let se of ie.children)M(oe.children.get(re++),se)}}function L(oe){return!oe&&0!==oe}function I(oe){return oe instanceof Z.a}function D(oe){return oe instanceof ee}function q(oe){return oe instanceof G.a}function z(){return{children:[],bindings:[],attributes:{}}}function $(oe){return'class'==oe||'style'==oe}var K=s(0),H=s(4),U=s(7),W=s(78),Z=s(9),G=s(118),J=s(503),Y=s(14),X=s(57);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class ee{constructor(oe){Object.assign(this,P(T(oe))),this._isRendered=!1,this._revertData=null}render(){const oe=this._renderNode({intoFragment:!0});return this._isRendered=!0,oe}apply(oe){return this._revertData=z(),this._renderNode({node:oe,isApplying:!0,revertData:this._revertData}),oe}revert(oe){if(!this._revertData)throw new K.a('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');this._revertTemplateFromNode(oe,this._revertData)}static bind(oe,ie){return{to(re,se){return new ae({eventNameOrFunction:re,attribute:re,observable:oe,emitter:ie,callback:se})},if(re,se,le){return new ne({observable:oe,emitter:ie,attribute:re,valueIfTrue:se,callback:le})}}}static extend(oe,ie){oe._isRendered&&X.a.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),M(oe,P(T(ie)))}_renderNode(oe){let ie;if(ie=oe.node?this.tag&&this.text:this.tag?this.text:!this.text,ie)throw new K.a('ui-template-wrong-syntax: Node definition must have either \"tag\" or \"text\" when rendering new Node.');return this.text?this._renderText(oe):this._renderElement(oe)}_renderElement(oe){let ie=oe.node;return ie||(ie=oe.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(oe),this._renderElementChildren(oe),this._setUpListeners(oe),ie}_renderText(oe){let ie=oe.node;return ie?oe.revertData.text=ie.textContent:ie=oe.node=document.createTextNode(''),d(this.text)?this._bindToObservable({schema:this.text,updater:h(ie),data:oe}):ie.textContent=this.text.join(''),ie}_renderAttributes(oe){let ie,re,se,le;if(this.attributes){const de=oe.node,ce=oe.revertData;for(ie in this.attributes)if(se=de.getAttribute(ie),re=this.attributes[ie],ce&&(ce.attributes[ie]=se),le=s.i(Y.a)(re[0])&&re[0].ns?re[0].ns:null,d(re)){const ue=le?re[0].value:re;ce&&$(ie)&&ue.unshift(se),this._bindToObservable({schema:ue,updater:w(de,ie,le),data:oe})}else'style'==ie&&'string'!=typeof re[0]?this._renderStyleAttribute(re[0],oe):(ce&&se&&$(ie)&&re.unshift(se),re=re.map((ue)=>ue?ue.value||ue:ue).reduce((ue,me)=>ue.concat(me),[]).reduce(F,''),L(re)||de.setAttributeNS(le,ie,re))}}_renderStyleAttribute(oe,ie){const re=ie.node;for(let se in oe){const le=oe[se];d(le)?this._bindToObservable({schema:[le],updater:C(re,se),data:ie}):re.style[se]=le}}_renderElementChildren(oe){const ie=oe.node,re=oe.intoFragment?document.createDocumentFragment():ie,se=oe.isApplying;let le=0;for(let de of this.children)if(q(de)){if(!se){de.setParent(ie);for(let ce of de)re.appendChild(ce.element)}}else if(I(de))se||re.appendChild(de.element);else if(se){const ce=oe.revertData,ue=z();ce.children.push(ue),de._renderNode({node:re.childNodes[le++],isApplying:!0,revertData:ue})}else re.appendChild(de.render());oe.intoFragment&&ie.appendChild(re)}_setUpListeners(oe){if(this.eventListeners)for(let ie in this.eventListeners){const re=this.eventListeners[ie].map((se)=>{const[le,de]=ie.split('@');return se.activateDomEventListener(le,de,oe)});oe.revertData&&oe.revertData.bindings.push(re)}}_bindToObservable({schema:oe,updater:ie,data:re}){const se=re.revertData;f(oe,ie,re);const le=oe.filter((de)=>!L(de)).filter((de)=>de.observable).map((de)=>de.activateAttributeListener(oe,ie,re));se&&se.bindings.push(le)}_revertTemplateFromNode(oe,ie){for(let re of ie.bindings)for(let se of re)se();if(ie.text)return void(oe.textContent=ie.text);for(let re in ie.attributes){const se=ie.attributes[re];null===se?oe.removeAttribute(re):oe.setAttribute(re,se)}for(let re=0;ref(oe,ie,re);return this.emitter.listenTo(this.observable,'change:'+this.attribute,se),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,se)}}}class ae extends te{activateDomEventListener(oe,ie,re){const se=(le,de)=>{(!ie||de.target.matches(ie))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(de):this.observable.fire(this.eventNameOrFunction,de))};return this.emitter.listenTo(re.node,oe,se),()=>{this.emitter.stopListening(re.node,oe,se)}}}class ne extends te{getValue(oe){const ie=super.getValue(oe);return!L(ie)&&(this.valueIfTrue||!0)}}},function(o,r,s){'use strict';function u(M,L){M[F]||(M[F]=L||s.i(O.a)())}function f(M){return M[F]}function h(M){return M._events||Object.defineProperty(M,'_events',{value:{}}),M._events}function w(){return{callbacks:[],childEvents:[]}}function C(M,L){const I=h(M);if(I[L])return;let D=L,q=null;const z=[];for(;''!==D&&!I[D];)I[D]=w(),z.push(I[D]),q&&I[D].childEvents.push(q),q=D,D=D.substr(0,D.lastIndexOf(':'));if(''!==D){for(let $ of z)$.callbacks=I[D].callbacks.slice();I[D].childEvents.push(q)}}function T(M,L){const I=h(M)[L];if(!I)return[];let D=[I.callbacks];for(let q=0,z;q{this._delegations||(this._delegations=new Map);for(let D of M){let q=this._delegations.get(D);q?q.set(L,I):this._delegations.set(D,new Map([[L,I]]))}}}},stopDelegating(M,L){if(this._delegations)if(!M)this._delegations.clear();else if(!L)this._delegations.delete(M);else{const I=this._delegations.get(M);I&&I.delete(L)}}};r.a=N},function(o,r,s){'use strict';var u=s(191),f=s(15),w=_Mathmax;r.a=function(C,T){if('function'!=typeof C)throw new TypeError('Expected a function');return T=w(void 0===T?C.length-1:s.i(f.a)(T),0),function(){for(var P=arguments,S=-1,E=w(P.length-T,0),O=Array(E);++S{V.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=f.a.bind(this,this)}createCollection(){const E=new u.a;return this._viewCollections.add(E),E}addChildren(E){s.i(P.a)(E)||(E=[E]);for(let O of E)this._unboundChildren.add(O)}init(){if(this.ready)throw new d.a('ui-view-init-reinit: This View has already been initialized.');return Promise.resolve().then(()=>{return Promise.all(this._viewCollections.map((E)=>E.init()))}).then(()=>{this.ready=!0})}destroy(){this.stopListening();const E=this._viewCollections.map((O)=>O.destroy());return this._unboundChildren.clear(),this._viewCollections.clear(),this.element=this.template=this.locale=this.t=this._viewCollections=this._unboundChildren=null,Promise.all(E)}_addTemplateChildren(){const E=(O)=>{if(O.children)for(let V of O.children)V instanceof S?this.addChildren(V):E(V)};E(this.template)}}r.a=S,s.i(T.a)(S,h.a),s.i(T.a)(S,w.a)},function(o,r,s){'use strict';var u=s(443),f=s(444),h=s(225),w=s(11),C=s(514);r.a=function(T){return'function'==typeof T?T:null==T?h.a:'object'==typeof T?s.i(w.a)(T)?s.i(f.a)(T[0],T[1]):s.i(u.a)(T):s.i(C.a)(T)}},function(o,r){'use strict';var d=Array.isArray;r.a=d},function(o,r,s){'use strict';function d(w,C){C.isEnabled=!1}var u=s(31),f=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h{constructor(w){this.editor=w,this.set('isEnabled',!0),this._checkEnabled&&this.on('refreshState',(C,T)=>{T.isEnabled=this._checkEnabled()})}destroy(){this.stopListening()}refreshState(){const w={isEnabled:!0};this.fire('refreshState',w),this.isEnabled=w.isEnabled}_execute(w){this.isEnabled&&this._doExecute(w)}_disable(){this.on('refreshState',d),this.refreshState()}_enable(){this.off('refreshState',d),this.refreshState()}_doExecute(){}}r.a=h,s.i(f.a)(h,u.a)},function(o,r,s){'use strict';var u=s(95),f=s(43);r.a=function(h){return s.i(f.a)(h)&&s.i(u.a)(h)}},function(o,r){'use strict';r.a=function(u){var f=typeof u;return!!u&&('object'==f||'function'==f)}},function(o,r,s){'use strict';var u=s(516);r.a=function(f){var h=s.i(u.a)(f),w=h%1;return h===h?w?h-w:h:0}},function(o,r,s){'use strict';var u=s(0);r.b=function(h,w){if(f.prototype[h])throw new u.a('model-batch-register-taken: This batch method name is already taken.',{name:h});f.prototype[h]=w};/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f{constructor(h,w='default'){this.document=h,this.deltas=[],this.type=w}get baseVersion(){return 0K+H.offsetSize,0),z=I.parent;P(I);const $=I.index;return z.insertChildren($,D),T(z,$+D.length),T(z,$),new R.a(I,I.getShiftedBy(q))},remove:u,move:function(I,D){if(!I.isFlat)throw new M.a('model-writer-move-range-not-flat: Trying to move a range that starts and ends in different element.');const q=this.remove(I);return D=D._getTransformedByDeletion(I.start,I.end.offset-I.start.offset),this.insert(D,q)},setAttribute:function(I,D,q){P(I.start),P(I.end);for(let z of I.getItems()){let $=z.is('textProxy')?z.textNode:z;null===q?$.removeAttribute(D):$.setAttribute(D,q),T($.parent,$.index)}T(I.end.parent,I.end.index)},removeAttribute:function(I,D){this.setAttribute(I,D,null)},normalizeNodes:C}},function(o,r,s){'use strict';function d(O,V){const R=/\\s*([^:;\\s]+)\\s*:\\s*([^;]+)\\s*(?=;|$)/g;let F;for(O.clear();null!==(F=R.exec(V));)O.set(F[1],F[2].trim())}function u(O,V){const R=V.split(/\\s+/);O.clear(),R.forEach((F)=>O.add(F))}function f(O){return'string'==typeof O?[new w.a(O)]:(s.i(T.a)(O)||(O=[O]),Array.from(O).map((V)=>'string'==typeof V?new w.a(V):V))}var h=s(74),w=s(29),C=s(270),T=s(41),P=s(97),S=s(166);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class E extends h.a{constructor(O,V,R){if(super(),this.name=O,this._attrs=s.i(P.a)(V)?s.i(C.a)(V):new Map(V),this._children=[],R&&this.insertChildren(0,R),this._classes=new Set,this._attrs.has('class')){const F=this._attrs.get('class');u(this._classes,F),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(d(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(O,V=null){return V?'element'==O&&V==this.name:'element'==O||O==this.name}clone(O){const V=[];if(O)for(let F of this.getChildren())V.push(F.clone(O));const R=new this.constructor(this.name,this._attrs,V);return R._classes=new Set(this._classes),R._styles=new Map(this._styles),R._customProperties=new Map(this._customProperties),R.getFillerOffset=this.getFillerOffset,R}appendChildren(O){return this.insertChildren(this.childCount,O)}getChild(O){return this._children[O]}getChildIndex(O){return this._children.indexOf(O)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0this._classes.add(V))}removeClass(...O){this._fireChange('attributes',this),O.forEach((V)=>this._classes.delete(V))}hasClass(...O){for(let V of O)if(!this._classes.has(V))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(O,V){if(this._fireChange('attributes',this),s.i(P.a)(O)){const R=Object.keys(O);for(let F of R)this._styles.set(F,O[F])}else this._styles.set(O,V)}getStyle(O){return this._styles.get(O)}getStyleNames(){return this._styles.keys()}hasStyle(...O){for(let V of O)if(!this._styles.has(V))return!1;return!0}removeStyle(...O){this._fireChange('attributes',this),O.forEach((V)=>this._styles.delete(V))}findAncestor(...O){const V=new S.a(...O);for(let R=this.parent;R;){if(V.match(R))return R;R=R.parent}return null}setCustomProperty(O,V){this._customProperties.set(O,V)}getCustomProperty(O){return this._customProperties.get(O)}removeCustomProperty(O){return this._customProperties.delete(O)}*getCustomProperties(){yield*this._customProperties.entries()}}r.a=E},function(o,r,s){'use strict';function d(S){let E;if('string'!=typeof S)E=S.keyCode+(S.altKey?P.alt:0)+(S.ctrlKey?P.ctrl:0)+(S.shiftKey?P.shift:0);else if(E=P[S.toLowerCase()],!E)throw new C.a('keyboard-unknown-key: Unknown key name.',{key:S});return E}function w(S){return S.split(/\\s*\\+\\s*/)}var C=s(0),T=s(420);r.c=d,r.a=function(S){return'string'==typeof S&&(S=w(S)),S.map((E)=>'string'==typeof E?d(E):E).reduce((E,O)=>O+E,0)},r.b=function(S){const E=w(S);return T.a.mac&&'ctrl'==E[0].toLowerCase()?'\\u2318'+(E[1]||''):S};/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const P=function(){const S={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let E=65;90>=E;E++){const O=String.fromCharCode(E);S[O.toLowerCase()]=E}for(let E=48;57>=E;E++)S[E-48]=E;for(let E=112;123>=E;E++)S['f'+(E-111)]=E;return S}();r.d=P},function(o,r,s){'use strict';function d(h,w,C,T,P){var S=-1,E=h.length;for(C||(C=f.a),P||(P=[]);++SP?0:P,T}getLastMatchingPosition(C,T={}){T.startPosition=this;const P=new d.a(T);return P.skip(C),P.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeNode:!0})}isEqual(C){return this.parent==C.parent&&this.offset==C.offset}isBefore(C){return'before'==this.compareWith(C)}isAfter(C){return'after'==this.compareWith(C)}compareWith(C){if(this.isEqual(C))return'same';if(this.parent===C.parent)return 0>this.offset-C.offset?'before':'after';const T=this.getAncestors(),P=C.getAncestors(),S=s.i(u.a)(T,P);let E;switch(S){case 0:return'different';case'prefix':E=T.length-1;break;case'extension':E=P.length-1;break;default:E=S-1;}const O=T[E],V=T[E+1],R=P[E+1];if(O===this.parent){const N=this.offset-R.index;return 0>=N?'before':'after'}if(O===C.parent){const N=V.index-C.offset;return 0>N?'before':'after'}const F=V.index-R.index;return 0>F?'before':'after'}static createAt(C,T){if(C instanceof w)return this.createFromPosition(C);let P=C;if('end'==T)T=P.is('text')?P.data.length:P.childCount;else{if('before'==T)return this.createBefore(P);if('after'==T)return this.createAfter(P);T||(T=0)}return new w(P,T)}static createAfter(C){if(C.is('textProxy'))return new w(C.textNode,C.offsetInText+C.data.length);if(!C.parent)throw new f.a('view-position-after-root: You can not make position after root.',{root:C});return new w(C.parent,C.index+1)}static createBefore(C){if(C.is('textProxy'))return new w(C.textNode,C.offsetInText);if(!C.parent)throw new f.a('view-position-before-root: You can not make position before root.',{root:C});return new w(C.parent,C.index)}static createFromPosition(C){return new this(C.parent,C.offset)}}r.a=w},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(395),h=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{constructor(C){super(C),this.set('label'),this.set('keystroke'),this.set('tooltip'),this.set('type','button'),this.set('isOn',!1),this.set('isEnabled',!0),this.set('withText',!1),this.set('icon'),this.set('tabindex',-1),this.bind('_tooltipString').to(this,'tooltip',this,'label',this,'keystroke',this._getTooltipString.bind(this));const T=this.bindTemplate;this.template=new u.a({tag:'button',attributes:{class:['ck-button',T.if('_tooltipString','ck-tooltip_s'),T.to('isEnabled',(P)=>P?'ck-enabled':'ck-disabled'),T.to('isOn',(P)=>P?'ck-on':'ck-off'),T.if('withText','ck-button_with-text')],type:T.to('type',(P)=>P?P:'button'),'data-ck-tooltip':[T.to('_tooltipString')],tabindex:T.to('tabindex')},children:[{tag:'span',attributes:{class:['ck-button__label']},children:[{text:T.to('label')}]}],on:{mousedown:T.to((P)=>{P.preventDefault()}),click:T.to((P)=>{this.isEnabled?this.fire('execute'):P.preventDefault()})}})}init(){let C=Promise.resolve();if(this.icon&&!this.iconView){const T=this.iconView=new f.a;T.bind('content').to(this,'icon'),this.element.insertBefore(T.element,this.element.firstChild),C=C.then(()=>this.addChildren(T))}return C.then(()=>super.init())}focus(){this.element.focus()}_getTooltipString(C,T,P){if(C){if('string'==typeof C)return C;if(P&&(P=s.i(h.b)(P)),C instanceof Function)return C(T,P);if(!0===C)return`${T}${P?` (${P})`:''}`}return!1}}r.a=w},function(o,r){'use strict';r.a=function(u,f){for(var h=-1,w=u.length,C=Array(w);++hP.maxOffset)throw new h.a('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(P===S&&E=E&&this.targetPosition.path[R]{if(z.attrs.length&&z.attrs.length!==q)throw new E.a('observable-bind-to-attrs-length: The number of attributes must match.');z.attrs.length||(z.attrs=this._bindAttrs)}),this._to=I.to,I.callback&&(this._bindings.get(D[0]).callback=I.callback),P(this._observable,this._to),C(this),this._bindAttrs.forEach((z)=>{T(this._observable,z)})}function f(L){return L.every((I)=>'string'==typeof I)}function h(...L){if(!L.length)throw new E.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const I={to:[]};let D;return'function'==typeof L[L.length-1]&&(I.callback=L.pop()),L.forEach((q)=>{if('string'==typeof q)D.attrs.push(q);else if('object'==typeof q)D={observable:q,attrs:[]},I.to.push(D);else throw new E.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),I}function w(L,I,D,q){const z=L[F],$=z.get(D),K=$||{};K[q]||(K[q]=new Set),K[q].add(I),$||z.set(D,K)}function C(L){let I;L._bindings.forEach((D,q)=>{L._to.forEach((z)=>{I=z.attrs[D.callback?0:L._bindAttrs.indexOf(q)],D.to.push([z.observable,I]),w(L._observable,D,z.observable,I)})})}function T(L,I){const D=L[N],q=D.get(I);let z;q.callback?z=q.callback.apply(L,q.to.map(($)=>$[0][$[1]])):(z=q.to[0],z=z[0][z[1]]),L.hasOwnProperty(I)?L[I]=z:L.set(I,z)}function P(L,I){I.forEach((D)=>{const q=L[F];let z;q.get(D.observable)||L.listenTo(D.observable,'change',($,K)=>{z=q.get(D.observable)[K],z&&z.forEach((H)=>{T(L,H.attr)})})})}var S=s(7),E=s(0),O=s(56),V=s(14);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const R=Symbol('attributes'),F=Symbol('boundObservables'),N=Symbol('boundAttributes'),M={set(L,I){if(s.i(V.a)(L))return void Object.keys(L).forEach((q)=>{this.set(q,L[q])},this);d(this);const D=this[R];if(L in this&&!D.has(L))throw new E.a('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,L,{enumerable:!0,configurable:!0,get(){return D.get(L)},set(q){const z=D.get(L);z===q&&D.has(L)||(D.set(L,q),this.fire('change:'+L,L,q,z))}}),this[L]=I},bind(...L){if(!L.length||!f(L))throw new E.a('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(L).size!==L.length)throw new E.a('observable-bind-duplicate-attrs: Attributes must be unique.');d(this);const I=this[N];L.forEach((q)=>{if(I.has(q))throw new E.a('observable-bind-rebind: Cannot bind the same attribute more that once.')});const D=new Map;return L.forEach((q)=>{const z={attr:q,to:[]};I.set(q,z),D.set(q,z)}),{to:u,_observable:this,_bindAttrs:L,_to:[],_bindings:D}},unbind(...L){if(!(R in this))return;const I=this[N],D=this[F];if(L.length){if(!f(L))throw new E.a('observable-unbind-wrong-attrs: Attributes must be strings.');L.forEach((q)=>{const z=I.get(q);let $,K,H,U;z.to.forEach((W)=>{$=W[0],K=W[1],H=D.get($),U=H[K],U.delete(z),U.size||delete H[K],Object.keys(H).length||(D.delete($),this.stopListening($,'change'))}),I.delete(q)})}else D.forEach((q,z)=>{this.stopListening(z,'change')}),D.clear(),I.clear()}};r.a=M,s.i(O.a)(M,S.a)},function(o,r,s){'use strict';var d=s(94);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u{constructor(f){this.baseVersion=f}toJSON(){const f=s.i(d.a)(this,!0);return f.__className=this.constructor.className,delete f.delta,f}static get className(){return'engine.model.operation.Operation'}static fromJSON(f){return new this(f.baseVersion)}}r.a=u},function(o,r,s){'use strict';function d(P,S,E,O,V){return{done:!1,value:{type:P,item:S,previousPosition:E,nextPosition:O,length:V}}}var u=s(24),f=s(72),h=s(5),w=s(1),C=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T{constructor(P={}){if(!P.boundaries&&!P.startPosition)throw new C.a('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const S=P.direction||'forward';if('forward'!=S&&'backward'!=S)throw new C.a('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:S});this.direction=S,this.boundaries=P.boundaries||null,this.position=P.startPosition?w.a.createFromPosition(P.startPosition):w.a.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!P.singleCharacters,this.shallow=!!P.shallow,this.ignoreElementEnd=!!P.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(P){let S,E,O,V;do O=this.position,V=this._visitedParent,({done:S,value:E}=this.next());while(!S&&P(E));S||(this.position=O,this._visitedParent=V)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const P=this.position,S=w.a.createFromPosition(this.position),E=this._visitedParent;if(null===E.parent&&S.offset===E.maxOffset)return{done:!0};if(E===this._boundaryEndParent&&S.offset==this.boundaries.end.offset)return{done:!0};const O=S.textNode?S.textNode:S.nodeAfter;if(O instanceof h.a)return this.shallow?S.offset++:(S.path.push(0),this._visitedParent=O),this.position=S,d('elementStart',O,P,S,1);if(O instanceof u.a){let V,R;if(this.singleCharacters)V=1;else{let N=O.endOffset;this._boundaryEndParent==E&&this.boundaries.end.offsetN&&(N=this.boundaries.start.offset),V=S.offset-N}R=S.offset-O.startOffset;const F=new f.a(O,R-V,V);return S.offset-=V,this.position=S,d('text',F,P,S,V)}return S.path.pop(),this.position=S,this._visitedParent=E.parent,d('elementStart',E,P,S,1)}}r.a=T},function(o,r,s){'use strict';function d(w){return w.item.is('attributeElement')||w.item.is('uiElement')}var u=s(25),f=s(76);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h{constructor(w,C=null){this.start=u.a.createFromPosition(w),this.end=C?u.a.createFromPosition(C):u.a.createFromPosition(w)}*[Symbol.iterator](){yield*new f.a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let w=this.start.getLastMatchingPosition(d,{direction:'backward'}),C=this.end.getLastMatchingPosition(d);return w.parent.is('text')&&w.isAtStart&&(w=u.a.createBefore(w.parent)),C.parent.is('text')&&C.isAtEnd&&(C=u.a.createAfter(C.parent)),new h(w,C)}getTrimmed(){let w=this.start.getLastMatchingPosition(d),C=this.end.getLastMatchingPosition(d,{direction:'backward'}),T=w.nodeAfter,P=C.nodeBefore;return T&&T.is('text')&&(w=new u.a(T,0)),P&&P.is('text')&&(C=new u.a(P,P.data.length)),new h(w,C)}isEqual(w){return this==w||this.start.isEqual(w.start)&&this.end.isEqual(w.end)}containsPosition(w){return w.isAfter(this.start)&&w.isBefore(this.end)}containsRange(w){return this.containsPosition(w.start)&&this.containsPosition(w.end)}getDifference(w){const C=[];return this.isIntersecting(w)?(this.containsPosition(w.start)&&C.push(new h(this.start,w.start)),this.containsPosition(w.end)&&C.push(new h(w.end,this.end))):C.push(h.createFromRange(this)),C}getIntersection(w){if(this.isIntersecting(w)){let C=this.start,T=this.end;return this.containsPosition(w.start)&&(C=w.start),this.containsPosition(w.end)&&(T=w.end),new h(C,T)}return null}getWalker(w={}){return w.boundaries=this,new f.a(w)}*getItems(w={}){w.boundaries=this,w.ignoreElementEnd=!0;const C=new f.a(w);for(let T of C)yield T.item}*getPositions(w={}){w.boundaries=this;const C=new f.a(w);yield C.position;for(let T of C)yield T.nextPosition}isIntersecting(w){return this.start.isBefore(w.end)&&this.end.isAfter(w.start)}static createFromParentsAndOffsets(w,C,T,P){return new this(new u.a(w,C),new u.a(T,P))}static createFromRange(w){return new this(w.start,w.end)}static createFromPositionAndShift(w,C){const T=w,P=w.getShiftedBy(C);return 0f&&(f=-f>C?0:C+f),h=h>C?C:h,0>h&&(h+=C),C=f>h?0:h-f>>>0,f>>>=0;for(var T=Array(C);++wE.clone(!0)));return new P(this.position,S,this.baseVersion)}getReversed(){return new h.a(this.position,this.nodes.maxOffset,this.baseVersion+1)}_execute(){const S=this.nodes;this.nodes=new f.a([...S].map((O)=>O.clone(!0)));const E=w.a.insert(this.position,S);return{range:E}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(S,E){let O=[];for(let V of S.nodes)V.name?O.push(T.a.fromJSON(V)):O.push(C.a.fromJSON(V));return new P(u.a.fromJSON(S.position,E),O,S.baseVersion)}}r.a=P},function(o,r,s){'use strict';var d=s(28),u=s(1),f=s(5),h=s(109);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{constructor(C,T,P){const S=C.root.document.graveyard,E=new u.a(S,[S.maxOffset,0]);super(C,T,E,P)}get type(){return'remove'}get _holderElementOffset(){return this.targetPosition.path[0]}set _holderElementOffset(C){this.targetPosition.path[0]=C}get _needsHolderElement(){if(this.delta)for(let C of this.delta.operations)if(C instanceof w){if(C==this)return!0;if(C._holderElementOffset==this._holderElementOffset)return!1}return!0}getReversed(){return new h.a(this.targetPosition,this.howMany,this.sourcePosition,this.baseVersion+1)}clone(){let C=new w(this.sourcePosition,this.howMany,this.baseVersion);return C.targetPosition=u.a.createFromPosition(this.targetPosition),C}_execute(){if(this._needsHolderElement){const C=this.targetPosition.root,T=new f.a('$graveyardHolder');C.insertChildren(this._holderElementOffset,T),this.sourcePosition.root==C&&this.sourcePosition.path[0]>=this._holderElementOffset&&this.sourcePosition.path[0]++}return super._execute()}static get className(){return'engine.model.operation.RemoveOperation'}static fromJSON(C,T){let P=u.a.fromJSON(C.sourcePosition,T);const S=new w(P,C.howMany,C.baseVersion);return S.targetPosition=u.a.fromJSON(C.targetPosition,T),S}}r.a=w},function(o,r,s){'use strict';function d(){return 0===this.childCount?0:null}var u=s(21);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends u.a{constructor(h,w,C){super(h,w,C),this.getFillerOffset=d}is(h,w=null){return w?'containerElement'==h&&w==this.name||super.is(h,w):'containerElement'==h||super.is(h)}}r.a=f},function(o,r,s){'use strict';var h=s(115),w=s(5);r.c=function(T,P){return T.setCustomProperty(C,!0),s.i(h.a)(T,{label:function(){const E=T.getChild(0),O=E.getAttribute('alt');return O?`${O} ${P}`:P}})},r.a=function(T){return!!T.getCustomProperty(C)&&s.i(h.b)(T)},r.b=function(T){return T instanceof w.a&&'image'==T.name};/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const C=Symbol('isImage')},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return!!(u&&u[Symbol.iterator])}},function(o,r,s){'use strict';var u=s(81),f=s(123),h=s(124),w=s(134),C=s(461),T=s(93);r.a=function(S,E,O){var V=-1,R=f.a,F=S.length,N=!0,M=[],L=M;if(O)N=!1,R=h.a;else if(F>=200){var I=E?null:s.i(C.a)(S);if(I)return s.i(T.a)(I);N=!1,R=w.a,L=new u.a}else L=E?[]:M;outer:for(;++V{let L=V.matcher.matchAll(F.input);if(L)for(let I of L){const D=E instanceof Function?E(F.input):new h.a(E),q=Array.from(D.getAttributeKeys());if(!M.schema.check({name:D.name,attributes:q,inside:F.context}))continue;if(!N.consume(F.input,V.consume||I.match))continue;F.context.push(D);const z=M.convertChildren(F.input,N,F),$=w.a.createAt(D,'end');C.a.insert($,z),F.context.pop(),F.output=D;break}}},'normal')}toAttribute(E,O){this._setCallback(function(R){return(F,N,M,L)=>{let I=R.matcher.matchAll(N.input);if(I)for(let D of I){if(!M.consume(N.input,R.consume||D.match))continue;N.output||(N.output=L.convertChildren(N.input,M,N));let q=E instanceof Function?E(N.input):{key:E,value:O};d(N.output,q,N,L);break}}},'low')}toMarker(E){this._setCallback(function(V){return(R,F,N)=>{const M=V.matcher.matchAll(F.input);if(!M)return;let L;if(L=E instanceof Function?E(F.input):new h.a('$marker',{'data-name':F.input.getAttribute('data-name')}),'$marker'!=L.name||'string'!=typeof L.getAttribute('data-name'))throw new T.a('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const I of M)if(N.consume(F.input,V.consume||I.match)){F.output=L;break}}},'normal')}_setCallback(E,O){for(let V of this._from){const R=V.matcher.getElementName(),F=R?'element:'+R:'element',N=E(V),M=null===V.priority?O:V.priority;for(let L of this._dispatchers)L.on(F,N,{priority:M})}}}},function(o,r,s){'use strict';function d(T){return'string'==typeof T?[new h.a(T)]:(s.i(w.a)(T)||(T=[T]),Array.from(T).map((P)=>'string'==typeof P?new h.a(P):P))}var u=s(69),f=s(5),h=s(24),w=s(41);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C{constructor(T){this.markers=new Map,this._children=new u.a,T&&this.insertChildren(0,T)}[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(T){return'documentFragment'==T}getChild(T){return this._children.getNode(T)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(T){return this._children.getNodeIndex(T)}getChildStartOffset(T){return this._children.getNodeStartOffset(T)}getPath(){return[]}offsetToIndex(T){return this._children.offsetToIndex(T)}appendChildren(T){this.insertChildren(this.childCount,T)}insertChildren(T,P){P=d(P);for(let S of P)S.parent=this;this._children.insertNodes(T,P)}removeChildren(T,P=1){const S=this._children.removeNodes(T,P);for(let E of S)E.parent=null;return S}toJSON(){let T=[];for(let P of this._children)T.push(P.toJSON());return T}static fromJSON(T){let P=[];for(let S of T)S.name?P.push(f.a.fromJSON(S)):P.push(h.a.fromJSON(S));return new C(P)}}r.a=C},function(o,r,s){'use strict';var d=s(79),u=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f{constructor(h){this.document=h,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}r.a=f,s.i(u.a)(f,d.a)},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u,f){const h=_Mathmin(u.length,f.length);for(let w=0;wd(M,R));return F.forEach((M)=>R.add(M)),N}var f=s(1),h=s(5),w=s(3),C=s(7),T=s(0),P=s(4),S=s(150),E=s(521);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class O{constructor(){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map}get anchor(){if(0{if(!(N instanceof w.a))throw new T.a('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((M)=>{return!M.isEqual(N)})});if(V.length!==this._ranges.length||F){this._removeAllRanges();for(let N of V)this._pushRange(N);this._lastRangeBackward=!!R,this.fire('change:range',{directChange:!0})}}setTo(V){this.setRanges(V.getRanges(),V.isBackward)}collapse(V,R){const F=f.a.createAt(V,R),N=new w.a(F,F);this.setRanges([N])}collapseToStart(){const V=this.getFirstPosition();null!==V&&this.setRanges([new w.a(V,V)])}collapseToEnd(){const V=this.getLastPosition();null!==V&&this.setRanges([new w.a(V,V)])}setFocus(V,R){if(null===this.anchor)throw new T.a('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const F=f.a.createAt(V,R);if('same'!=F.compareWith(this.focus)){const N=this.anchor;this._ranges.length&&this._popRange(),'before'==F.compareWith(N)?this.addRange(new w.a(F,N),!0):this.addRange(new w.a(N,F))}}getAttribute(V){return this._attrs.get(V)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(V){return this._attrs.has(V)}clearAttributes(){if(0{const F=R.createElement('br');return F.dataset.ckeFiller=!0,F};r.a=(R)=>R.createTextNode('\\xA0');const E=7;r.d=E;let O='';for(let R=0;R{this.listenTo(h,C,(T,P)=>{this.isEnabled&&this.onDomEvent(P)},{useCapture:this.useCapture})})}fire(h,w,C){this.isEnabled&&this.document.fire(h,new u.a(this.document,w,C))}}r.a=f},function(o,r){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a={window,document}},function(o,r,s){'use strict';var d=s(79),u=s(31),f=s(0),h=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w{constructor(){this.set('isFocused',!1),this.focusedElement=null,this._elements=new Set,this._nextEventLoopTimeout=null}add(C){if(this._elements.has(C))throw new f.a('focusTracker-add-element-already-exist');this.listenTo(C,'focus',()=>this._focus(C),{useCapture:!0}),this.listenTo(C,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(C)}remove(C){C===this.focusedElement&&this._blur(C),this._elements.has(C)&&(this.stopListening(C),this._elements.delete(C))}_focus(C){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=C,this.isFocused=!0}_blur(){this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}r.a=w,s.i(h.a)(w,d.a),s.i(h.a)(w,u.a)},function(o,r,s){'use strict';var d=s(79),u=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(){this._listener=Object.create(d.a),this._keystrokes=new Map}listenTo(h){this._listener.listenTo(h,'keydown',(w,C)=>{this.press(C)})}set(h,w){const C=s.i(u.a)(h),T=this._keystrokes.get(C);T?T.push(w):this._keystrokes.set(C,[w])}press(h){const w=s.i(u.c)(h),C=this._keystrokes.get(w);if(!C)return!1;for(let T of C)T(h,()=>{h.preventDefault(),h.stopPropagation()});return!0}destroy(){this._keystrokes=new Map,this._listener.stopListening()}}},function(o,r,s){'use strict';var u=s(55),f=Object.prototype,h=f.hasOwnProperty;r.a=function(w,C,T){var P=w[C];h.call(w,C)&&s.i(u.a)(P,T)&&(T!==void 0||C in w)||(w[C]=T)}},function(o,r,s){'use strict';var u=s(81),f=s(123),h=s(124),w=s(27),C=s(132),T=s(134);r.a=function(S,E,O,V){var R=-1,F=f.a,N=!0,M=S.length,L=[],I=E.length;if(!M)return L;O&&(E=s.i(w.a)(E,s.i(C.a)(O))),V?(F=h.a,N=!1):E.length>=200&&(F=T.a,N=!1,E=new u.a(E));outer:for(;++Rf;f++)u+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return u}},function(o,r,s){'use strict';var d=s(58),u=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f{constructor(h){this._nodes=[],h&&this.insertNodes(0,h)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((h,w)=>h+w.offsetSize,0)}getNode(h){return this._nodes[h]||null}getNodeIndex(h){const w=this._nodes.indexOf(h);return-1==w?null:w}getNodeStartOffset(h){const w=this.getNodeIndex(h);return null===w?null:this._nodes.slice(0,w).reduce((C,T)=>C+T.offsetSize,0)}indexToOffset(h){if(h==this._nodes.length)return this.maxOffset;const w=this._nodes[h];if(!w)throw new u.a('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(w)}offsetToIndex(h){let w=0;for(let C of this._nodes){if(h>=w&&hh.toJSON())}}r.a=f},function(o,r,s){'use strict';var d=s(32),u=s(3),f=s(0),h=s(20),w=s(508);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends d.a{constructor(T,P,S,E,O){super(O),this.range=u.a.createFromRange(T),this.key=P,this.oldValue=S===void 0?null:S,this.newValue=E===void 0?null:E}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new C(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new C(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){for(let T of this.range.getItems()){if(null!==this.oldValue&&!s.i(w.a)(T.getAttribute(this.key),this.oldValue))throw new f.a('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\\'s old attribute value.',{item:T,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&T.hasAttribute(this.key))throw new f.a('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:T,key:this.key});if(s.i(w.a)(this.oldValue,this.newValue))return}return h.a.setAttribute(this.range,this.key,this.newValue),{range:this.range,key:this.key,oldValue:this.oldValue,newValue:this.newValue}}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(T,P){return new C(u.a.fromJSON(T.range,P),T.key,T.oldValue,T.newValue,T.baseVersion)}}r.a=C},function(o,r,s){'use strict';var d=s(32);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{clone(){return new u(this.baseVersion)}getReversed(){return new u(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}r.a=u},function(o,r,s){'use strict';var d=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u{constructor(f,h,w){if(this.textNode=f,0>h||h>f.offsetSize)throw new d.a('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>w||h+w>f.offsetSize)throw new d.a('model-textproxy-wrong-length: Given length value is incorrect.');this.data=f.data.substring(h,h+w),this.offsetInText=h}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(f){return'textProxy'==f}getPath(){const f=this.textNode.getPath();return 0P&&T.selection.editableElement==this),this.listenTo(T,'render',()=>{this.isFocused=T.isFocused&&T.selection.editableElement==this},{priority:'high'})}}r.a=C,s.i(f.a)(C,h.a)},function(o,r,s){'use strict';var d=s(0),u=s(7),f=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h{constructor(){this.parent=null}get index(){let w;if(!this.parent)return null;if(-1==(w=this.parent.getChildIndex(this)))throw new d.a('view-node-not-found-in-parent: The node\\'s parent does not contain this node.');return w}get nextSibling(){const w=this.index;return null!==w&&this.parent.getChild(w+1)||null}get previousSibling(){const w=this.index;return null!==w&&this.parent.getChild(w-1)||null}get root(){let w=this;for(;w.parent;)w=w.parent;return w}get document(){return this.parent instanceof h?this.parent.document:null}getAncestors(w={includeNode:!1,parentFirst:!1}){const C=[];for(let T=w.includeNode?this:this.parent;T;)C[w.parentFirst?'push':'unshift'](T),T=T.parent;return C}remove(){this.parent.removeChildren(this.index)}_fireChange(w,C){this.fire('change:'+w,C),this.parent&&this.parent._fireChange(w,C)}}r.a=h,s.i(f.a)(h,u.a)},function(o,r,s){'use strict';var d=s(0),u=s(34),f=s(25),h=s(4),w=s(7),C=s(21);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T{constructor(){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel=''}setFake(P=!0,S={}){this._isFake=P,this._fakeSelectionLabel=P?S.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const P=this._ranges[this._ranges.length-1],S=this._lastRangeBackward?P.end:P.start;return f.a.createFromPosition(S)}get focus(){if(!this._ranges.length)return null;const P=this._ranges[this._ranges.length-1],S=this._lastRangeBackward?P.start:P.end;return f.a.createFromPosition(S)}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(P,S){if(!(P instanceof u.a))throw new d.a('view-selection-invalid-range: Invalid Range.');this._pushRange(P),this._lastRangeBackward=!!S,this.fire('change')}*getRanges(){for(let P of this._ranges)yield u.a.createFromRange(P)}getFirstRange(){let P=null;for(let S of this._ranges)(!P||S.start.isBefore(P.start))&&(P=S);return P?u.a.createFromRange(P):null}getLastRange(){let P=null;for(let S of this._ranges)(!P||S.end.isAfter(P.end))&&(P=S);return P?u.a.createFromRange(P):null}getFirstPosition(){const P=this.getFirstRange();return P?f.a.createFromPosition(P.start):null}getLastPosition(){const P=this.getLastRange();return P?f.a.createFromPosition(P.end):null}isEqual(P){if(this.isFake!=P.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=P.fakeSelectionLabel)return!1;if(this.rangeCount!=P.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(P.anchor)||!this.focus.isEqual(P.focus))return!1;for(let S of this._ranges){let E=!1;for(let O of P._ranges)if(S.isEqual(O)){E=!0;break}if(!E)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(P,S){this._ranges=[];for(let E of P){if(!(E instanceof u.a))throw new d.a('view-selection-invalid-range: Invalid Range.');this._pushRange(E)}this._lastRangeBackward=!!S,this.fire('change')}setTo(P){this._isFake=P._isFake,this._fakeSelectionLabel=P._fakeSelectionLabel,this.setRanges(P.getRanges(),P.isBackward)}collapse(P,S){const E=f.a.createAt(P,S),O=new u.a(E,E);this.setRanges([O])}collapseToStart(){const P=this.getFirstPosition();null!==P&&this.setRanges([new u.a(P,P)])}collapseToEnd(){const P=this.getLastPosition();null!==P&&this.setRanges([new u.a(P,P)])}setFocus(P,S){if(null===this.anchor)throw new d.a('view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const E=f.a.createAt(P,S);if('same'!=E.compareWith(this.focus)){const O=this.anchor;this._ranges.pop(),'before'==E.compareWith(O)?this.addRange(new u.a(E,O),!0):this.addRange(new u.a(O,E))}}getSelectedElement(){if(1!==this.rangeCount)return null;const P=this.getFirstRange(),S=P.start.nodeAfter,E=P.end.nodeBefore;return S instanceof C.a&&S==E?S:null}static createFromSelection(P){const S=new T;return S.setTo(P),S}_pushRange(P){for(let S of this._ranges)if(P.isIntersecting(S))throw new d.a('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:P,intersectingRange:S});this._ranges.push(u.a.createFromRange(P))}}r.a=T,s.i(h.a)(T,w.a)},function(o,r,s){'use strict';var d=s(21),u=s(29),f=s(344),h=s(25),w=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C{constructor(T={}){if(!T.boundaries&&!T.startPosition)throw new w.a('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(T.direction&&'forward'!=T.direction&&'backward'!=T.direction)throw new w.a('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:T.direction});this.boundaries=T.boundaries||null,this.position=T.startPosition?h.a.createFromPosition(T.startPosition):h.a.createFromPosition(T.boundaries['backward'==T.direction?'end':'start']),this.direction=T.direction||'forward',this.singleCharacters=!!T.singleCharacters,this.shallow=!!T.shallow,this.ignoreElementEnd=!!T.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(T){let P,S,E;do E=this.position,({done:P,value:S}=this.next());while(!P&&T(S));P||(this.position=E)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let T=h.a.createFromPosition(this.position);const P=this.position,S=T.parent;if(null===S.parent&&T.offset===S.childCount)return{done:!0};if(S===this._boundaryEndParent&&T.offset==this.boundaries.end.offset)return{done:!0};let E;if(S instanceof u.a){if(T.isAtEnd)return this.position=h.a.createAfter(S),this._next();E=S.data[T.offset]}else E=S.getChild(T.offset);if(E instanceof d.a)return this.shallow?T.offset++:T=new h.a(E,0),this.position=T,this._formatReturnValue('elementStart',E,P,T,1);if(E instanceof u.a){if(this.singleCharacters)return T=new h.a(E,0),this.position=T,this._next();let O=E.data.length,V=E;return E==this._boundaryEndParent?(O=this.boundaries.end.offset,V=new f.a(E,0,O),T=h.a.createAfter(V)):T.offset++,this.position=T,this._formatReturnValue('text',V,P,T,O)}if('string'==typeof E){let O;if(this.singleCharacters)O=1;else{const R=S===this._boundaryEndParent?this.boundaries.end.offset:S.data.length;O=R-T.offset}const V=new f.a(S,T.offset,O);return T.offset+=O,this.position=T,this._formatReturnValue('text',V,P,T,O)}return T=h.a.createAfter(S),this.position=T,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',S,P,T)}_previous(){let T=h.a.createFromPosition(this.position);const P=this.position,S=T.parent;if(null===S.parent&&0===T.offset)return{done:!0};if(S==this._boundaryStartParent&&T.offset==this.boundaries.start.offset)return{done:!0};let E;if(S instanceof u.a){if(T.isAtStart)return this.position=h.a.createBefore(S),this._previous();E=S.data[T.offset-1]}else E=S.getChild(T.offset-1);if(E instanceof d.a)return this.shallow?(T.offset--,this.position=T,this._formatReturnValue('elementStart',E,P,T,1)):(T=new h.a(E,E.childCount),this.position=T,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',E,P,T));if(E instanceof u.a){if(this.singleCharacters)return T=new h.a(E,E.data.length),this.position=T,this._previous();let O=E.data.length,V=E;if(E==this._boundaryStartParent){const R=this.boundaries.start.offset;V=new f.a(E,R,E.data.length-R),O=V.data.length,T=h.a.createBefore(V)}else T.offset--;return this.position=T,this._formatReturnValue('text',V,P,T,O)}if('string'==typeof E){let O;if(!this.singleCharacters){const R=S===this._boundaryStartParent?this.boundaries.start.offset:0;O=T.offset-R}else O=1;T.offset-=O;const V=new f.a(S,T.offset,O);return this.position=T,this._formatReturnValue('text',V,P,T,O)}return T=h.a.createBefore(S),this.position=T,this._formatReturnValue('elementStart',S,P,T,1)}_formatReturnValue(T,P,S,E,O){return P instanceof f.a&&(P.offsetInText+P.data.length==P.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?S=h.a.createAfter(P.textNode):(E=h.a.createAfter(P.textNode),this.position=E)),0===P.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?S=h.a.createBefore(P.textNode):(E=h.a.createBefore(P.textNode),this.position=E))),{done:!1,value:{type:T,item:P,previousPosition:S,nextPosition:E,length:O}}}}r.a=C},function(o,r,s){'use strict';function f(le){const de=le.offset,ce=le.parent;if(ce.is('text'))return le;if(ce.is('attributeElement')&&0===ce.childCount){const pe=ce.parent,ge=ce.index;return ce.remove(),f(new G.a(pe,ge))}const ue=ce.getChild(de-1),me=ce.getChild(de);if(!ue||!me)return le;if(ue.is('text')&&me.is('text'))return z(ue,me);if(ue.is('attributeElement')&&me.is('attributeElement')&&ue.isSimilar(me)){const pe=ue.childCount;return ue.appendChildren(me.getChildren()),me.remove(),f(new G.a(ue,pe))}return le}function C(le,de){de=s.i(ie.a)(de)?[...de]:[de],U(de);const ce=F(le);if(!ce)throw new ne.a('view-writer-invalid-position-container');const ue=M(le,!0),me=ce.insertChildren(ue.offset,de),pe=ue.getShiftedBy(me),ge=f(ue);if(0===me)return new te.a(ge,ge);ge.isEqual(ue)||pe.offset--;const fe=f(pe);return new te.a(ge,fe)}function T(le){if(Z(le),le.isCollapsed)return new oe.a;const{start:de,end:ce}=N(le,!0),ue=de.parent,me=ce.offset-de.offset,pe=ue.removeChildren(de.offset,me),ge=f(de);return le.start=ge,le.end=G.a.createFromPosition(ge),new oe.a(pe)}function S(le,de){let ce;if(de.isAfter(le.end)){de=M(de,!0);const ue=de.parent,me=ue.childCount;le=N(le,!0),ce=T(le),de.offset+=ue.childCount-me}else ce=T(le);return C(de,ce)}function E(le,de){if(!(de instanceof Y.a))throw new ne.a('view-writer-wrap-invalid-attribute');if(Z(le),le.isCollapsed)return le;if(le.end.isEqual(le.start.getShiftedBy(1))){const be=le.start.nodeAfter;if(be instanceof Y.a&&$(de,be))return le}if(H(le)&&$(de,le.start.parent)){const be=le.start.parent.parent,_e=le.start.parent.index;return te.a.createFromParentsAndOffsets(be,_e,be,_e+1)}const{start:ce,end:ue}=N(le,!0),me=ce.parent,pe=L(me,ce.offset,ue.offset,de),ge=I(me,pe.start.offset,pe.end.offset,de),fe=f(ge.start);fe.isEqual(ge.start)||ge.end.offset--;const he=f(ge.end);return new te.a(fe,he)}function F(le){let de=le.parent;for(;!W(de);){if(!de)return;de=de.parent}return de}function N(le,de=!1){const ce=le.start,ue=le.end;if(Z(le),le.isCollapsed){const fe=M(le.start,de);return new te.a(fe,fe)}const me=M(ue,de),pe=me.parent.childCount,ge=M(ce,de);return me.offset+=me.parent.childCount-pe,new te.a(ge,me)}function M(le,de=!1){const ce=le.offset,ue=le.parent;if(le.parent.is('emptyElement'))throw new ne.a('view-writer-cannot-break-empty-element');if(le.parent.is('uiElement'))throw new ne.a('view-writer-cannot-break-ui-element');if(!de&&ue.is('text')&&W(ue.parent))return G.a.createFromPosition(le);if(W(ue))return G.a.createFromPosition(le);if(ue.is('text'))return M(q(le),de);const me=ue.childCount;if(ce==me){const pe=new G.a(ue.parent,ue.index+1);return M(pe,de)}if(0===ce){const pe=new G.a(ue.parent,ue.index);return M(pe,de)}const pe=ue.index+1,ge=ue.clone();ue.parent.insertChildren(pe,ge);const fe=ue.childCount-ce,he=ue.removeChildren(ce,fe);ge.appendChildren(he);const be=new G.a(ue.parent,pe);return M(be,de)}function L(le,de,ce,ue){let me=de;const pe=[];for(;mede instanceof ce))throw new ne.a('view-writer-insert-invalid-node');de.is('text')||U(de.getChildren())}}function W(le){return le&&(le.is('containerElement')||le.is('documentFragment'))}function Z(le){const de=F(le.start),ce=F(le.end);if(!de||!ce||de!==ce)throw new ne.a('view-writer-invalid-range-container')}var G=s(25),J=s(39),Y=s(112),X=s(165),Q=s(169),ee=s(29),te=s(34),ae=s(76),ne=s(0),oe=s(113),ie=s(41);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a={breakAttributes:function(le){return le instanceof G.a?M(le):N(le)},breakContainer:function(le){const de=le.parent;if(!de.is('containerElement'))throw new ne.a('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!de.parent)throw new ne.a('view-writer-break-root: Trying to break root element.');if(le.isAtStart)return G.a.createBefore(de);if(!le.isAtEnd){const ce=de.clone(!1);C(G.a.createAfter(de),ce);const ue=new te.a(le,G.a.createAt(de,'end')),me=new G.a(ce,0);S(ue,me)}return G.a.createAfter(de)},mergeAttributes:f,mergeContainers:function(le){const de=le.nodeBefore,ce=le.nodeAfter;if(!de||!ce||!de.is('containerElement')||!ce.is('containerElement'))throw new ne.a('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const ue=de.getChild(de.childCount-1),me=ue instanceof ee.a?G.a.createAt(ue,'end'):G.a.createAt(de,'end');return S(te.a.createIn(ce),G.a.createAt(de,'end')),T(te.a.createOn(ce)),me},insert:C,remove:T,clear:function(le,de){Z(le);const ce=le.getWalker({direction:'backward',ignoreElementEnd:!0});for(const ue of ce){const me=ue.item;let pe;if(me.is('element')&&de.isSimilar(me))pe=te.a.createOn(me);else if(!ue.nextPosition.isAfter(le.start)&&(me.is('text')||me.is('textProxy'))){const ge=me.getAncestors().find((fe)=>{return fe.is('element')&&de.isSimilar(fe)});ge&&(pe=te.a.createIn(ge))}pe&&(pe.end.isAfter(le.end)&&(pe.end=le.end),pe.start.isBefore(le.start)&&(pe.start=le.start),T(pe))}},move:S,wrap:E,wrapPosition:function(le,de){if(!(de instanceof Y.a))throw new ne.a('view-writer-wrap-invalid-attribute');if(de.isSimilar(le.parent))return D(G.a.createFromPosition(le));le.parent.is('text')&&(le=q(le));const ce=new Y.a;ce.priority=_NumberPOSITIVE_INFINITY,ce.isSimilar=()=>!1,le.parent.insertChildren(le.offset,ce);const ue=new te.a(le,le.getShiftedBy(1));E(ue,de);const me=new G.a(ce.parent,ce.index);ce.remove();const pe=me.nodeBefore,ge=me.nodeAfter;return pe instanceof ee.a&&ge instanceof ee.a?z(pe,ge):D(me)},unwrap:function(le,de){if(!(de instanceof Y.a))throw new ne.a('view-writer-unwrap-invalid-attribute');if(Z(le),le.isCollapsed)return le;if(le.end.isEqual(le.start.getShiftedBy(1))){const he=le.start.nodeAfter;if(!de.isSimilar(he)&&he instanceof Y.a&&K(de,he))return le}const{start:ce,end:ue}=N(le,!0),me=ce.parent,pe=L(me,ce.offset,ue.offset,de),ge=f(pe.start);ge.isEqual(pe.start)||pe.end.offset--;const fe=f(pe.end);return new te.a(ge,fe)},rename:function(le,de){const ce=new J.a(de,le.getAttributes());return C(G.a.createAfter(le),ce),S(te.a.createIn(le),G.a.createAt(ce)),T(te.a.createOn(le)),ce},breakViewRangePerContainer:function(le){const de=[],ce=new ae.a({boundaries:le});let ue=le.start;for(let me of ce)me.item.is('containerElement')&&(ue.isEqual(me.previousPosition)||de.push(new te.a(ue,me.previousPosition)),ue=me.nextPosition);return de.push(new te.a(ue,le.end)),de}};const se=[ee.a,Y.a,J.a,X.a,Q.a]},function(o,r,s){'use strict';var d=s(7),u=s(0),f=s(68),h=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w{constructor(C){this._items=[],this._itemMap=new Map,this._idProperty=C&&C.idProperty||'id',this._boundItemsMap=new Map}get length(){return this._items.length}add(C,T){let P;const S=this._idProperty;if(S in C){if(P=C[S],'string'!=typeof P)throw new u.a('collection-add-invalid-id');if(this.get(P))throw new u.a('collection-add-item-already-exists')}else C[S]=P=s.i(f.a)();if(void 0===T)T=this._items.length;else if(T>this._items.length||0>T)throw new u.a('collection-add-item-invalid-index');return this._items.splice(T,0,C),this._itemMap.set(P,C),this.fire('add',C,T),this}get(C){let T;if('string'==typeof C)T=this._itemMap.get(C);else if('number'==typeof C)T=this._items[C];else throw new u.a('collection-get-invalid-arg: Index or id must be given.');return T||null}getIndex(C){let T;return T='string'==typeof C?this._itemMap.get(C):C,this._items.indexOf(T)}remove(C){let E=!1,T,P,S;const O=this._idProperty;if('string'==typeof C?(P=C,S=this._itemMap.get(P),E=!S,S&&(T=this._items.indexOf(S))):'number'==typeof C?(T=C,S=this._items[T],E=!S,S&&(P=S[O])):(S=C,P=S[O],T=this._items.indexOf(S),E=-1==T||!this._itemMap.get(P)),E)throw new u.a('collection-remove-404: Item not found.');return this._items.splice(T,1),this._itemMap.delete(P),this.fire('remove',S),S}map(C,T){return this._items.map(C,T)}find(C,T){return this._items.find(C,T)}filter(C,T){return this._items.filter(C,T)}clear(){for(;this.length;)this.remove(0)}bindTo(C){const T=(P)=>{for(let S of C)this.add(P(S));this.listenTo(C,'add',(S,E,O)=>{this.add(P(E),O)}),this.listenTo(C,'remove',(S,E)=>{this.remove(this._boundItemsMap.get(E)),this._boundItemsMap.delete(E)})};return{as:(P)=>{T((S)=>{const E=new P(S);return this._boundItemsMap.set(S,E),E})},using:(P)=>{let S;S='function'==typeof P?(E)=>{const O=P(E);return this._boundItemsMap.set(E,O),O}:(E)=>{const O=E[P];return this._boundItemsMap.set(E,O),O},T(S)}}}[Symbol.iterator](){return this._items[Symbol.iterator]()}}r.a=w,s.i(h.a)(w,d.a)},function(o,r,s){'use strict';function d(S){return S['data-ck-expando']||(S['data-ck-expando']=s.i(h.a)())}function u(S){return S&&s.i(C.a)(S.addEventListener)}var f=s(7),h=s(68),w=s(56),C=s(231);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const T=s.i(w.a)({},f.a,{listenTo(...S){const E=S[0];u(E)&&(S[0]=this._getProxyEmitter(E)||new P(E)),f.a.listenTo.apply(this,S)},stopListening(...S){const E=S[0];if(u(E)){let O=this._getProxyEmitter(E);if(!O)return;S[0]=O}f.a.stopListening.apply(this,S)},_getProxyEmitter(S){return s.i(f.b)(this,d(S))}});r.a=T;class P{constructor(S){s.i(f.c)(this,d(S)),this._domNode=S}}s.i(w.a)(P.prototype,f.a,{on(S,E,O={}){if(f.a.on.apply(this,arguments),!(this._domListeners&&this._domListeners[S])){const V=this._createDomListener(S);this._domNode.addEventListener(S,V,!!O.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[S]=V}},off(S){f.a.off.apply(this,arguments);let E;!this._domListeners[S]||(E=this._events[S])&&E.callbacks.length||this._domListeners[S].removeListener()},_createDomListener(S){const E=(O)=>{this.fire(S,O)};return E.removeListener=()=>{this._domNode.removeEventListener(S,E),delete this._domListeners[S]},E}})},function(o,r,s){'use strict';function d(T){var P=-1,S=T?T.length:0;for(this.clear();++P>>1){for(;E>>1,R=T[V];null!==R&&!s.i(h.a)(R)&&(S?R<=P:R{const $=L instanceof F.a?L.clone(!0):L(D,q,z);if($&&q.consume(D.item,'insert')){const K=z.mapper.toViewPosition(D.range.start);z.mapper.bindElements(D.item,$),M.a.insert(K,$)}}},r.j=function(){return(L,I,D,q)=>{if(D.consume(I.item,'insert')){const z=q.mapper.toViewPosition(I.range.start),$=new N.a(I.item.data);M.a.insert(z,$)}}},r.f=function(L){return(I,D,q,z)=>{let $,K;if((L instanceof F.a?($=L.clone(!0),K=L.clone(!0)):(D.isOpening=!0,$=L(D,q,z),D.isOpening=!1,K=L(D,q,z)),$&&K)&&q.consume(D.range,'addMarker')){const H=z.mapper;M.a.insert(H.toViewPosition(D.range.start),$),D.range.isCollapsed||M.a.insert(H.toViewPosition(D.range.end),K)}}},r.h=function(L){return L=L||((I,D)=>({value:I,key:D})),(I,D,q,z)=>{if(q.consume(D.item,V(I.name))){const{key:$,value:K}=L(D.attributeNewValue,D.attributeKey,D,q,z);z.mapper.toViewElement(D.item).setAttribute($,K)}}},r.i=function(L){return L=L||((I,D)=>({key:D})),(I,D,q,z)=>{if(q.consume(D.item,V(I.name))){const{key:$}=L(D.attributeOldValue,D.attributeKey,D,q,z);z.mapper.toViewElement(D.item).removeAttribute($)}}},r.b=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D.attributeNewValue,D,q,z);if(!$)return;if(!q.consume(D.item,V(I.name)))return;let K=z.mapper.toViewRange(D.range);if(null!==D.attributeOldValue&&!(L instanceof F.a)){const H=L(D.attributeOldValue,D,q,z);K=M.a.unwrap(K,H)}M.a.wrap(K,$)}},r.c=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D.attributeOldValue,D,q,z);if($&&q.consume(D.item,V(I.name))){const K=z.mapper.toViewRange(D.range);M.a.unwrap(K,$)}}},r.d=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D,q,z);if($&&q.consume(D.range,'addMarker')){const K=z.mapper.toViewRange(D.range),H=M.a.breakViewRangePerContainer(K);for(let U of H)M.a.wrap(U,$)}}},r.e=function(L){return(I,D,q,z)=>{const $=L instanceof F.a?L.clone(!0):L(D,q,z);if($&&q.consume(D.range,'removeMarker')){const K=z.mapper.toViewRange(D.range),H=M.a.breakViewRangePerContainer(K);for(let U of H)M.a.unwrap(U,$)}}},r.k=function(){return(L,I,D,q)=>{if(D.consume(I.item,'remove')){const z=R.a.createFromPositionAndShift(I.sourcePosition,I.item.offsetSize),$=q.mapper.toViewRange(z);M.a.remove($.getTrimmed()),q.mapper.unbindModelElement(I.item)}}},r.g=function(L){return(I,D,q,z)=>{let $,K;if((L instanceof F.a?($=L.clone(!0),K=L.clone(!0)):(D.isOpening=!0,$=L(D,q,z),D.isOpening=!1,K=L(D,q,z)),$&&K)&&q.consume(D.range,'removeMarker')){const H=z.mapper.toViewRange(D.range);M.a.clear(H.getEnlarged(),K),$.isSimilar(K)||M.a.clear(H.getEnlarged(),$)}}}},function(o,r,s){'use strict';var d=s(19),u=s(17),f=s(103),h=s(16),w=s(37),C=s(49),T=s(3),P=s(1);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class S extends d.a{get type(){return'insert'}get position(){return this._insertOperation?this._insertOperation.position:null}get nodes(){return this._insertOperation?this._insertOperation.nodes:null}get _insertOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return f.a}static get className(){return'engine.model.delta.InsertDelta'}static get _priority(){return 20}}r.a=S,s.i(h.b)('insert',function(E,O){const V=new S,R=new w.a(E,O,this.document.version);if(this.addDelta(V),V.addOperation(R),this.document.applyOperation(R),O instanceof C.a)for(const[F,N]of O.markers){const M=P.a.createAt(N.root),L=new T.a(N.start._getCombined(M,E),N.end._getCombined(M,E));this.setMarker(F,L)}return this}),u.a.register(S)},function(o,r,s){'use strict';var d=s(19),u=s(17),f=s(104),h=s(16),w=s(1),C=s(5),T=s(38),P=s(28),S=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class E extends d.a{get type(){return'merge'}get position(){return this._removeOperation?this._removeOperation.sourcePosition:null}getReversed(){let O=super.getReversed();return 0M._priority)||!(N._priority{return M+L.operations.length},0)}function S(N,M){const L=N[N.length-1];let I=L.operations.length+L.baseVersion,D=new E.a;for(let q=0;q'string'==typeof P?new u.a(P):P))}var u=s(29),f=s(4),h=s(41),w=s(7);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C{constructor(T){this._children=[],T&&this.insertChildren(0,T)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(T){return'documentFragment'==T}appendChildren(T){return this.insertChildren(this.childCount,T)}getChild(T){return this._children[T]}getChildIndex(T){return this._children.indexOf(T)}getChildren(){return this._children[Symbol.iterator]()}insertChildren(T,P){this._fireChange('children',this);let S=0;P=d(P);for(let E of P)E.parent=this,this._children.splice(T,0,E),T++,S++;return S}removeChildren(T,P=1){this._fireChange('children',this);for(let S=T;S{d(D,$,K,H,U)},{priority:'lowest'}),q.viewToModel.on('element',f,{priority:'lowest'}),q.viewToModel.on('documentFragment',f,{priority:'lowest'}),q.viewToModel.on('element',($,K,H,U)=>{u(D,$,K,H,U)},{priority:'low'}),I.commands.set('paragraph',new w.a(I))}}r.a=M,M.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const L=new WeakSet},function(o,r){'use strict';/**\n * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function d(f){return f.focus}class u{constructor(f){if(Object.assign(this,f),f.actions&&f.keystrokeHandler)for(let h in f.actions){let w=f.actions[h];'string'==typeof w&&(w=[w]);for(let C of w)f.keystrokeHandler.set(C,(T,P)=>{this[h](),P()})}}get first(){return this.focusables.find(d)||null}get last(){return this.focusables.filter(d).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let f=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((h,w)=>{const C=h.element===this.focusTracker.focusedElement;return C&&(f=w),C}),f)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(f){f&&f.focus()}_getFocusableItem(f){const h=this.current,w=this.focusables.length;if(!w||null===h)return null;let C=(h+w+f)%w;do{let T=this.focusables.get(C);if(d(T))return T;C=(C+w+f)%w}while(C!==h);return null}}r.a=u},function(o,r,s){'use strict';function d(T){return T.every((P)=>'string'==typeof P)}var u=s(0),f=s(31),h=s(78),w=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends h.a{constructor(T){super({idProperty:'viewUid'}),this.on('add',(P,S,E)=>{S.element&&this._parentElement&&this._parentElement.insertBefore(S.element,this._parentElement.children[E])}),this.on('remove',(P,S)=>{S.element&&this._parentElement&&S.element.remove()}),this.locale=T,this.set('ready',!1),this._parentElement=null}init(){if(this.ready)throw new u.a('ui-viewcollection-init-reinit: This ViewCollection has already been initialized.');return Promise.all(this.map((T)=>T.init())).then(()=>{this.ready=!0})}destroy(){let T=[];for(let P of this)T.push(P.destroy());return Promise.all(T)}add(T,P){super.add(T,P);let S=Promise.resolve();return this.ready&&!T.ready&&(S=S.then(()=>{return T.init()})),S}setParent(T){this._parentElement=T}delegate(...T){if(!T.length||!d(T))throw new u.a('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(P)=>{for(let S of this)for(let E of T)S.delegate(E).to(P);this.on('add',(S,E)=>{for(let O of T)E.delegate(O).to(P)}),this.on('remove',(S,E)=>{for(let O of T)E.stopDelegating(O,P)})}}}}r.a=C,s.i(w.a)(h.a,f.a)},function(o,r,s){'use strict';function d(w,C){let T=u([w],C);T.sort((P,S)=>P.start.isBefore(S.start)?-1:1);for(let P=1;PR.start.root!=P.graveyard);V&&S.push(V)}S.length&&P.selection.setRanges(S,C)}}r.a=h},function(o,r,s){'use strict';function d(T){var P=-1,S=T?T.length:0;for(this.clear();++P=S||0>X||G&&Q>=$}function N(){var Y=s.i(f.a)();return F(Y)?M(Y):void(H=setTimeout(N,R(Y)))}function M(Y){return(clearTimeout(H),H=void 0,J&&q)?O(Y):(q=z=void 0,K)}function D(){var Y=s.i(f.a)(),X=F(Y);if(q=arguments,z=this,U=Y,X){if(void 0===H)return V(U);if(G)return clearTimeout(H),H=setTimeout(N,S),O(U)}return void 0===H&&(H=setTimeout(N,S)),K}var U=0,W=0,Z=!1,G=!1,J=!0,q,z,$,K,H;if('function'!=typeof P)throw new TypeError('Expected a function');return S=s.i(h.a)(S)||0,s.i(u.a)(E)&&(Z=!!E.leading,G='maxWait'in E,$=G?_Mathmax(s.i(h.a)(E.maxWait)||0,S):$,J='trailing'in E?!!E.trailing:J),D.cancel=function(){void 0!==H&&clearTimeout(H),U=W=0,q=z=H=void 0},D.flush=function(){return void 0===H?K:M(s.i(f.a)())},D}},function(o,r,s){'use strict';var u=s(35),f=s(15);r.a=function(h,w,C){var T=h?h.length:0;return T?(w=C||void 0===w?1:s.i(f.a)(w),s.i(u.a)(h,0>w?0:w,T)):[]}},function(o,r,s){'use strict';var u=s(35),f=s(15);r.a=function(h,w,C){var T=h?h.length:0;return T?(w=C||void 0===w?1:s.i(f.a)(w),w=T-w,s.i(u.a)(h,0,0>w?0:w)):[]}},function(o,r){'use strict';r.a=function(u){return u&&u.length?u[0]:void 0}},function(o,r,s){'use strict';var u=s(13),h=Object.prototype,w=h.hasOwnProperty,C=h.toString,T=h.propertyIsEnumerable;r.a=function(P){return s.i(u.a)(P)&&w.call(P,'callee')&&(!T.call(P,'callee')||C.call(P)=='[object Arguments]')}},function(o,r,s){'use strict';var u=s(14),w=Object.prototype,C=w.toString;r.a=function(T){var P=s.i(u.a)(T)?C.call(T):'';return P=='[object Function]'||P=='[object GeneratorFunction]'}},function(o,r,s){'use strict';var u=s(11),f=s(43),w=Object.prototype,C=w.toString;r.a=function(T){return'string'==typeof T||!s.i(u.a)(T)&&s.i(f.a)(T)&&C.call(T)=='[object String]'}},function(o,r,s){'use strict';var u=s(130);r.a=function(f,h){return f&&f.length&&h&&h.length?s.i(u.a)(f,h):f}},function(o,r,s){'use strict';var u=s(191),f=s(27),h=s(98);r.a=function(w,C){if(!(w&&w.length))return[];var T=s.i(h.a)(w);return null==C?T:s.i(f.a)(T,function(P){return s.i(u.a)(C,void 0,P)})}},function(o,r,s){'use strict';var u=s(97),f=s(270);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(h){return s.i(u.a)(h)?s.i(f.a)(h):new Map(h)}},function(o){o.exports=function(s){if(!s.webpackPolyfill){var d=Object.create(s);d.children||(d.children=[]),Object.defineProperty(d,'loaded',{enumerable:!0,get:function(){return d.l}}),Object.defineProperty(d,'id',{enumerable:!0,get:function(){return d.i}}),Object.defineProperty(d,'exports',{enumerable:!0}),d.webpackPolyfill=1}return d}},function(o,r,s){'use strict';var u=s(33),f=s(3),h=s(1);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(w,C,T){const P=[];for(let S of C){const E=new u.a({boundaries:S,mergeCharacters:!0});let O=E.next(),V=S.start,R=S.start,F=S.end;for(;!O.done;){const N=O.value.item.name||'$text',M=h.a.createBefore(O.value.item);T.check({name:N,inside:M,attributes:w})||(!R.isEqual(V)&&P.push(new f.a(R,V)),R=E.position),V=E.position,O=E.next()}R&&!R.isEqual(F)&&P.push(new f.a(R,F))}return P}},function(o,r,s){'use strict';var u=s(33);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(f,h,w){if(h.isCollapsed)return w.check({name:'$text',inside:h.getFirstPosition(),attributes:f});const C=h.getRanges();for(let T of C){const P=new u.a({boundaries:T,mergeCharacters:!0});for(let S=P.position,E=P.next();!E.done;){const O=E.value.item.name||'$text';if(w.check({name:O,inside:S,attributes:f}))return!0;S=P.position,E=P.next()}}return!1}},function(o,r,s){'use strict';var d=s(12),u=s(152),f=s(153);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{constructor(w,C){super(w),this.attributeKey=C,this.set('value',!1),this.listenTo(this.editor.document.selection,'change:attribute',()=>{this.value=this.editor.document.selection.hasAttribute(this.attributeKey)})}_checkEnabled(){const w=this.editor.document;return s.i(f.a)(this.attributeKey,w.selection,w.schema)}_doExecute(w={}){const C=this.editor.document,T=C.selection,P=w.forceValue===void 0?!this.value:w.forceValue;C.enqueueChanges(()=>{if(T.isCollapsed)P?T.setAttribute(this.attributeKey,!0):T.removeAttribute(this.attributeKey);else{const S=s.i(u.a)(this.attributeKey,T.getRanges(),C.schema),E=w.batch||C.batch();for(let O of S)P?E.setAttribute(O,this.attributeKey,P):E.removeAttribute(O,this.attributeKey)}})}}r.a=h},function(o,r,s){'use strict';var d=s(1),u=s(3),f=s(25),h=s(34),w=s(29),C=s(7),T=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class P{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map}bindElements(S,E){this._modelToViewMapping.set(S,E),this._viewToModelMapping.set(E,S)}unbindViewElement(S){const E=this.toModelElement(S);this._unbindElements(E,S)}unbindModelElement(S){const E=this.toViewElement(S);this._unbindElements(S,E)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap}toModelElement(S){return this._viewToModelMapping.get(S)}toViewElement(S){return this._modelToViewMapping.get(S)}toModelRange(S){return new u.a(this.toModelPosition(S.start),this.toModelPosition(S.end))}toViewRange(S){return new h.a(this.toViewPosition(S.start),this.toViewPosition(S.end))}toModelPosition(S){const E={viewPosition:S,modelPosition:this._defaultToModelPosition(S),mapper:this};return this.fire('viewToModelPosition',E),E.modelPosition}_defaultToViewPosition(S){let E=this._modelToViewMapping.get(S.parent);return this._findPositionIn(E,S.offset)}toViewPosition(S){const E={viewPosition:this._defaultToViewPosition(S),modelPosition:S,mapper:this};return this.fire('modelToViewPosition',E),E.viewPosition}_defaultToModelPosition(S){let E=S.parent,O=this._viewToModelMapping.get(E);for(;!O;)E=E.parent,O=this._viewToModelMapping.get(E);let V=this._toModelOffset(S.parent,S.offset,E);return d.a.createFromParentAndOffset(O,V)}registerViewToModelLength(S,E){this._viewToModelLengthCallbacks.set(S,E)}_toModelOffset(S,E,O){if(O!=S){const R=this._toModelOffset(S.parent,S.index,O),F=this._toModelOffset(S,E,S);return R+F}if(S.is('text'))return E;let V=0;for(let R=0;R{const N=V.selection;if(!N.isCollapsed&&R.consume(N,'selection')){F.viewSelection.removeAllRanges();for(let M of N.getRanges()){const L=F.mapper.toViewRange(M);F.viewSelection.addRange(L,N.isBackward)}}}},r.f=function(){return(O,V,R,F)=>{const N=V.selection;if(N.isCollapsed&&R.consume(N,'selection')){const M=N.getFirstPosition(),L=F.mapper.toViewPosition(M),I=E.a.breakAttributes(L);F.viewSelection.removeAllRanges(),F.viewSelection.addRange(new S.a(I,I))}}},r.a=function(O){return(V,R,F,N)=>{const M=O instanceof P.a?O.clone(!0):O(R.value,R,R.selection,F,N);if(M){const L='selectionAttribute:'+R.key;w(R.selection,N.viewSelection,M,F,L)}}},r.b=function(O){return(V,R,F,N)=>{const M=O instanceof P.a?O.clone(!0):O(R,F,N);if(M){const L='selectionMarker:'+R.name;w(R.selection,N.viewSelection,M,F,L)}}},r.c=function(){return(O,V,R,F)=>{for(let N of F.viewSelection.getRanges())N.isCollapsed&&N.end.parent.document&&E.a.mergeAttributes(N.start);F.viewSelection.removeAllRanges()}},r.d=function(){return(O,V,R,F)=>F.viewSelection.setFake(!1)}},function(o,r,s){'use strict';var d=s(319),u=s(3),f=s(1),h=s(49),w=s(7),C=s(4),T=s(56);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class P{constructor(S,E={}){this._modelDocument=S,this.conversionApi=s.i(T.a)({dispatcher:this},E)}convertChange(S,E){'remove'!==S&&E.range&&'$graveyard'==E.range.root.rootName||'remove'==S&&'$graveyard'==E.sourcePosition.root.rootName||'rename'==S&&'$graveyard'==E.element.root.rootName||('insert'==S||'reinsert'==S?this.convertInsertion(E.range):'move'==S?this.convertMove(E.sourcePosition,E.range):'remove'==S?this.convertRemove(E.sourcePosition,E.range):'addAttribute'==S||'removeAttribute'==S||'changeAttribute'==S?this.convertAttribute(S,E.range,E.key,E.oldValue,E.newValue):'rename'==S&&this.convertRename(E.element,E.oldName))}convertInsertion(S){const E=this._createInsertConsumable(S);for(let O of S){const V=O.item,R=u.a.createFromPositionAndShift(O.previousPosition,O.length),F={item:V,range:R};this._testAndFire('insert',F,E);for(let N of V.getAttributeKeys())F.attributeKey=N,F.attributeOldValue=null,F.attributeNewValue=V.getAttribute(N),this._testAndFire(`addAttribute:${N}`,F,E)}for(let O of this._modelDocument.markers){const V=O.getRange();V.containsPosition(S.start)&&this.convertMarker('addMarker',O.name,V.getIntersection(S)),(S.containsRange(V)||S.isEqual(V))&&this.convertMarker('addMarker',O.name,V)}}convertMove(S,E){this.convertRemove(S,E),this.convertInsertion(E)}convertRemove(S,E){const O=this._createConsumableForRange(E,'remove');for(let V of E.getItems({shallow:!0})){this._testAndFire(`remove`,{sourcePosition:S,item:V},O)}}convertAttribute(S,E,O,V,R){const F=this._createConsumableForRange(E,S+':'+O);for(let N of E){const M=N.item,L=u.a.createFromPositionAndShift(N.previousPosition,N.length);this._testAndFire(`${S}:${O}`,{item:M,range:L,attributeKey:O,attributeOldValue:V,attributeNewValue:R},F)}}convertRename(S,E){const O=S.clone(!0);O.name=E,this.conversionApi.mapper.bindElements(O,this.conversionApi.mapper.toViewElement(S));const V=new h.a;V.appendChildren(O),this.convertRemove(f.a.createBefore(S),u.a.createOn(O)),this.convertInsertion(u.a.createOn(S))}convertSelection(S){const E=Array.from(this._modelDocument.markers.getMarkersAtPosition(S.getFirstPosition())),O=this._createSelectionConsumable(S,E);this.fire('selection',{selection:S},O,this.conversionApi);for(let V of E){const R={selection:S,name:V.name};O.test(S,'selectionMarker:'+V.name)&&this.fire('selectionMarker:'+V.name,R,O,this.conversionApi)}for(let V of S.getAttributeKeys()){const R={selection:S,key:V,value:S.getAttribute(V)};O.test(S,'selectionAttribute:'+R.key)&&this.fire('selectionAttribute:'+R.key,R,O,this.conversionApi)}}convertMarker(S,E,O){if(O.root.document&&'$graveyard'!=O.root.rootName){const V=this._createMarkerConsumable(S,O);this.fire(S+':'+E,{name:E,range:O},V,this.conversionApi)}}_createInsertConsumable(S){const E=new d.a;for(let O of S){const V=O.item;E.add(V,'insert');for(let R of V.getAttributeKeys())E.add(V,'addAttribute:'+R)}return E}_createConsumableForRange(S,E){const O=new d.a;for(let V of S.getItems())O.add(V,E);return O}_createSelectionConsumable(S,E){const O=new d.a;O.add(S,'selection');for(let V of E)O.add(S,'selectionMarker:'+V.name);for(let V of S.getAttributeKeys())O.add(S,'selectionAttribute:'+V);return O}_createMarkerConsumable(S,E){const O=new d.a;return O.add(E,S),O}_testAndFire(S,E,O){if(O.test(E.item,S)){const V=E.item.name||'$text';this.fire(S+':'+V,E,O,this.conversionApi)}}}r.a=P,s.i(C.a)(P,w.a)},function(o,r,s){'use strict';var d=s(324),u=s(164),f=s(60);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(){this._domParser=new DOMParser,this._domConverter=new u.a({blockFiller:f.a}),this._htmlWriter=new d.a}toData(w){const C=this._domConverter.viewToDom(w,document);return this._htmlWriter.getHtml(C)}toView(w){const C=this._toDom(w);return this._domConverter.domToView(C)}_toDom(w){const C=this._domParser.parseFromString(w,'text/html'),T=C.createDocumentFragment(),P=C.body.childNodes;for(;0{S.has(O)&&u.call(this,O,V.range,V.sourcePosition)},{priority:'high'})}function u(S,E,O){let V=E.end.offset-E.start.offset,R;switch(S){case'insert':let F='sticksToNext'==this.stickiness;R=this._getTransformedByInsertion(E.start,V,F);break;case'move':case'remove':case'reinsert':let N=h.a.createFromPositionAndShift(O,V),M=N.containsPosition(this)||N.start.isEqual(this)&&'sticksToNext'==this.stickiness||N.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(M)R=this._getCombined(O,E.start);else{let L='sticksToNext'==this.stickiness;R=this._getTransformedByMove(O,E.start,V,L)}}if(!this.isEqual(R)){const F=f.a.createFromPosition(this);this.path=R.path,this.root=R.root,this.fire('change',F)}}var f=s(1),h=s(3),w=s(7),C=s(4),T=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class P extends f.a{constructor(S,E,O){if(super(S,E),!this.root.is('rootElement'))throw new T.a('model-liveposition-root-not-rootelement: LivePosition root has to be an instance of RootElement.');this.stickiness=O||'sticksToNext',d.call(this)}detach(){this.stopListening()}}r.a=P,s.i(C.a)(P,w.a)},function(o,r,s){'use strict';function d(){const T=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document,'change',(P,S,E,O,V)=>{T.has(S)&&u.call(this,S,V,E.range,E.sourcePosition)},{priority:'high'})}function u(T,P,S,E){const O=S.end.offset-S.start.offset;let V=S.start;'move'==T&&(V=V._getTransformedByInsertion(E,O));const R=this._getTransformedByDocumentChange(T,P,V,O,E);'move'==T&&3==R.length&&(R[2]=S);const F=f.a.createFromRanges(R);if(!F.isEqual(this)){const N=f.a.createFromRange(this);this.start=F.start,this.end=F.end,this.fire('change',N)}}var f=s(3),h=s(7),w=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends f.a{constructor(T,P){super(T,P),d.call(this)}detach(){this.stopListening()}}r.a=C,s.i(w.a)(C,h.a)},function(o,r,s){'use strict';function d(F,N,M){let L=s.i(O.a)(F);return M&&(L=L.slice(L.indexOf(M)+1)),L.some((I)=>I.tagName&&N.includes(I.tagName.toLowerCase()))}var u=s(29),f=s(21),h=s(25),w=s(34),C=s(75),T=s(113),P=s(76),S=s(60),E=s(412),O=s(186),V=s(409);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(F={}){this.blockFiller=F.blockFiller||S.b,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(F,N){this._fakeSelectionMapping.set(F,C.a.createFromSelection(N))}fakeSelectionToView(F){return this._fakeSelectionMapping.get(F)}bindElements(F,N){this._domToViewMapping.set(F,N),this._viewToDomMapping.set(N,F)}bindDocumentFragments(F,N){this._domToViewMapping.set(F,N),this._viewToDomMapping.set(N,F)}viewToDom(F,N,M={}){if(F.is('text')){const L=this._processDataFromViewText(F);return N.createTextNode(L)}if(this.getCorrespondingDom(F))return this.getCorrespondingDom(F);let L;if(F.is('documentFragment'))L=N.createDocumentFragment(),M.bind&&this.bindDocumentFragments(L,F);else{L=N.createElement(F.name),M.bind&&this.bindElements(L,F);for(let I of F.getAttributeKeys())L.setAttribute(I,F.getAttribute(I))}if(M.withChildren||void 0===M.withChildren)for(let I of this.viewChildrenToDom(F,N,M))L.appendChild(I);return L}*viewChildrenToDom(F,N,M={}){let L=F.getFillerOffset&&F.getFillerOffset(),I=0;for(let D of F.getChildren())L===I&&(yield this.blockFiller(N)),yield this.viewToDom(D,N,M),I++;L===I&&(yield this.blockFiller(N))}viewRangeToDom(F){const N=this.viewPositionToDom(F.start),M=this.viewPositionToDom(F.end),L=new Range;return L.setStart(N.parent,N.offset),L.setEnd(M.parent,M.offset),L}viewPositionToDom(F){const N=F.parent;if(N.is('text')){const M=this.getCorrespondingDomText(N);if(!M)return null;let L=F.offset;return s.i(S.c)(M)&&(L+=S.d),{parent:M,offset:L}}let M,L,I;if(0===F.offset){if(M=this.getCorrespondingDom(F.parent),!M)return null;I=M.childNodes[0]}else{if(L=this.getCorrespondingDom(F.nodeBefore),!L)return null;M=L.parentNode,I=L.nextSibling}if(this.isText(I)&&s.i(S.c)(I))return{parent:I,offset:S.d};const D=L?s.i(E.a)(L)+1:0;return{parent:M,offset:D}}domToView(F,N={}){if(s.i(S.e)(F,this.blockFiller))return null;if(this.isText(F)){if(s.i(S.f)(F))return null;const M=this._processDataFromDomText(F);return''===M?null:new u.a(M)}if(this.getCorrespondingView(F))return this.getCorrespondingView(F);let M;if(this.isDocumentFragment(F))M=new T.a,N.bind&&this.bindDocumentFragments(F,M);else{const L=N.keepOriginalCase?F.tagName:F.tagName.toLowerCase();M=new f.a(L),N.bind&&this.bindElements(F,M);const I=F.attributes;for(let D=I.length-1;0<=D;D--)M.setAttribute(I[D].name,I[D].value)}if(N.withChildren||void 0===N.withChildren)for(let L of this.domChildrenToView(F,N))M.appendChildren(L);return M}*domChildrenToView(F,N={}){for(let M=0;ML?0:L),new h.a(M,L)):null}if(0===N){const M=this.getCorrespondingView(F);if(M)return new h.a(M,0)}else{const M=this.getCorrespondingView(F.childNodes[N-1]);if(M&&M.parent)return new h.a(M.parent,M.index+1)}return null}getCorrespondingView(F){if(this.isElement(F))return this.getCorrespondingViewElement(F);return this.isDocumentFragment(F)?this.getCorrespondingViewDocumentFragment(F):this.isText(F)?this.getCorrespondingViewText(F):null}getCorrespondingViewElement(F){return this._domToViewMapping.get(F)}getCorrespondingViewDocumentFragment(F){return this._domToViewMapping.get(F)}getCorrespondingViewText(F){if(s.i(S.f)(F))return null;const N=F.previousSibling;if(N){if(!this.isElement(N))return null;const M=this.getCorrespondingViewElement(N);if(M){const L=M.nextSibling;return L instanceof u.a?M.nextSibling:null}}else{const M=this.getCorrespondingViewElement(F.parentNode);if(M){const L=M.getChild(0);return L instanceof u.a?L:null}}return null}getCorrespondingDom(F){if(F instanceof f.a)return this.getCorrespondingDomElement(F);return F instanceof T.a?this.getCorrespondingDomDocumentFragment(F):F instanceof u.a?this.getCorrespondingDomText(F):null}getCorrespondingDomElement(F){return this._viewToDomMapping.get(F)}getCorrespondingDomDocumentFragment(F){return this._viewToDomMapping.get(F)}getCorrespondingDomText(F){const N=F.previousSibling;return N&&this.getCorrespondingDom(N)?this.getCorrespondingDom(N).nextSibling:!N&&F.parent&&this.getCorrespondingDom(F.parent)?this.getCorrespondingDom(F.parent).childNodes[0]:null}focus(F){const N=this.getCorrespondingDomElement(F);N&&N.ownerDocument.activeElement!==N&&N.focus()}isText(F){return F&&F.nodeType==Node.TEXT_NODE}isElement(F){return F&&F.nodeType==Node.ELEMENT_NODE}isDocumentFragment(F){return F&&F.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isDomSelectionBackward(F){if(F.isCollapsed)return!1;const N=new Range;N.setStart(F.anchorNode,F.anchorOffset),N.setEnd(F.focusNode,F.focusOffset);const M=N.collapsed;return N.detach(),M}_processDataFromViewText(F){let N=F.data;if(F.getAncestors().some((q)=>this.preElements.includes(q.name)))return N;const M=this._getTouchingViewTextNode(F,!1),L=this._getTouchingViewTextNode(F,!0);let I=N.match(/ *$/)[0],D=N.substr(0,N.length-I.length);if(M&&' '!=M.data.charAt(M.data.length-1)||(D=D.replace(/^ /,'\\xA0')),D=D.replace(/ /g,' \\xA0'),0d()),s.i(f.a)().for(F.modelToView).fromElement('image').toElement(()=>s.i(C.c)(d(),N('image widget'))),s.i(w.a)([F.modelToView,R.modelToView],'src'),s.i(w.a)([F.modelToView,R.modelToView],'alt'),R.viewToModel.on('element:figure',s.i(w.b)())}}r.a=S},function(o,r,s){'use strict';var d=s(515),u=s(62),f=s(182),h=s(40);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const w=f.a.arrowVerticalOffset,C={south(P,S){return{top:P.bottom+w,left:P.left+P.width/2-S.width/2,name:'s'}},north(P,S){return{top:P.top-S.height-w,left:P.left+P.width/2-S.width/2,name:'n'}}};class T extends f.a{constructor(P){super(P.locale),this.editor=P;const S=P.editing.view;this.listenTo(P.ui.focusTracker,'change:isFocused',(E,O,V,R)=>{R&&!V&&this.detach()}),P.listenTo(S,'render',()=>{const E=S.selection.getSelectedElement();E&&s.i(h.a)(E)||this.detach()},{priority:'low'}),this._throttledAttach=s.i(d.a)(()=>{this._attach()},100)}init(){return this.editor.ui.focusTracker.add(this.element),super.init()}attach(){this._attach(),this.editor.ui.view.listenTo(u.a.window,'scroll',this._throttledAttach),this.editor.ui.view.listenTo(u.a.window,'resize',this._throttledAttach)}detach(){this.hide(),this.editor.ui.view.stopListening(u.a.window,'scroll',this._throttledAttach),this.editor.ui.view.stopListening(u.a.window,'resize',this._throttledAttach)}_attach(){const P=this.editor.editing.view;this.attachTo({target:P.domConverter.viewRangeToDom(P.selection.getFirstRange()),positions:[C.north,C.south]})}}r.a=T},function(o,r,s){'use strict';var d=s(6),u=s(2),f=s(183),h=s(40),w=s(171);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends u.a{constructor(T){super(T),T.config.set('image.defaultToolbar',[]),this.isEnabled=!0}afterInit(){const T=this.editor,P=T.config.get('image.toolbar')||T.config.get('image.defaultToolbar');if(P.length){const S=this._panel=new w.a(T),E=[],O=new f.a;return d.a.extend(S.template,{attributes:{class:['ck-toolbar__container']}}),E.push(S.content.add(O)),E.push(O.fillFromConfig(P,T.ui.componentFactory)),E.push(T.ui.view.body.add(S)),this.listenTo(this.editor.editing.view,'render',()=>{this.isEnabled&&this.show()},{priority:'low'}),this.listenTo(T.ui.focusTracker,'change:isFocused',(V,R,F,N)=>{!N&&F&&this.isEnabled&&this.show()}),Promise.all(E)}}show(){const T=this.editor.editing.view.selection.getSelectedElement();T&&s.i(h.a)(T)&&this._panel.attach()}hide(){this._panel.detach()}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(115);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{init(){let h;this.editor.editing.modelToView.on('selection',(w,C,T,P)=>{h&&h.hasClass(u.c)&&h.removeClass(u.c);const S=P.viewSelection,E=S.getSelectedElement();E&&s.i(u.b)(E)&&(S.setFake(!0,{label:s.i(u.d)(E)}),E.addClass(u.c),h=E)},{priority:'low'})}}r.a=f},function(o,r,s){'use strict';function u(w,C,T){let P=w.textNode||(T?w.nodeBefore:w.nodeAfter),S=null;for(;P&&P.getAttribute('linkHref')==C;)S=P,P=T?P.previousSibling:P.nextSibling;return S?h.a.createAt(S,T?'before':'after'):w}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */var f=s(3),h=s(1);r.a=function(w,C){return new f.a(u(w,C,!0),u(w,C,!1))}},function(o,r,s){'use strict';var d=s(112);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{}r.a=u},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return Array.from(u.getAncestors()).find((f)=>'listItem'==f.name)||null}},function(o,r,s){'use strict';var d=s(184);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u{constructor(f,h=20){this.document=f,this.size=0,this.limit=h,this.isLocked=!1,this._changeCallback=(w,C,T,P)=>{this._onBatch(P)},this._selectionChangeCallback=()=>{this._reset()},f.on('change',this._changeCallback),f.selection.on('change:range',this._selectionChangeCallback),f.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(f){this.size+=f,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(f){'transparent'!=f.type&&f!==this._batch&&1>=s.i(d.a)(f.getOperations())&&this._reset(!0)}_reset(f){(!this.isLocked||f)&&(this._batch=null,this.size=0)}}r.a=u},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function({emitter:u,activator:f,callback:h,contextElement:w}){u.listenTo(document,'mouseup',(C,{target:T})=>{f()&&!w.contains(T)&&h()})}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function({view:u}){u.listenTo(u.element,'submit',(f,h)=>{h.preventDefault(),u.fire('submit')},{useCapture:!0})}},function(o,r,s){'use strict';var d=s(9),u=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h),this.set('value'),this.set('id');const w=this.bindTemplate;this.template=new u.a({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:w.to('id')}}),this.on('change:value',(C,T,P)=>this.element.value=P||'')}select(){this.element.select()}focus(){this.element.focus()}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(68),h=s(396);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{constructor(C,T){super(C);const P=`ck-input-${s.i(f.a)()}`;this.set('label'),this.set('value'),this.labelView=this._createLabelView(P),this.inputView=this._createInputView(T,P),this.template=new u.a({tag:'div',children:[this.labelView,this.inputView]})}_createLabelView(C){const T=new h.a(this.locale);return T.for=C,T.bind('text').to(this,'label'),T}_createInputView(C,T){const P=new C(this.locale);return P.id=T,P.bind('value').to(this),P}select(){this.inputView.select()}focus(){this.inputView.focus()}}r.a=w},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(415),h=s(187);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const w=s.i(h.a)('px');class C extends d.a{constructor(T){super(T);const P=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','se'),this.set('isVisible',!1),this.content=this.createCollection(),this.template=new u.a({tag:'div',attributes:{class:['ck-balloon-panel',P.to('position',(S)=>`ck-balloon-panel_arrow_${S}`),P.if('isVisible','ck-balloon-panel_visible')],style:{top:P.to('top',w),left:P.to('left',w),maxWidth:P.to('maxWidth',w)},tabindex:-1},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(T){this.show();const P=C.defaultPositions,S=Object.assign({},{element:this.element,positions:[P.se,P.sw,P.ne,P.nw],limiter:document.body,fitInViewport:!0},T),{top:E,left:O,name:V}=s.i(f.a)(S);Object.assign(this,{top:E,left:O,position:V})}}r.a=C,C.arrowHorizontalOffset=30,C.arrowVerticalOffset=15,C.defaultPositions={se:(T)=>({top:T.bottom+C.arrowVerticalOffset,left:T.left+T.width/2-C.arrowHorizontalOffset,name:'se'}),sw:(T,P)=>({top:T.bottom+C.arrowVerticalOffset,left:T.left+T.width/2-P.width+C.arrowHorizontalOffset,name:'sw'}),ne:(T,P)=>({top:T.top-P.height-C.arrowVerticalOffset,left:T.left+T.width/2-C.arrowHorizontalOffset,name:'ne'}),nw:(T,P)=>({top:T.top-P.height-C.arrowVerticalOffset,left:T.left+T.width/2-P.width+C.arrowHorizontalOffset,name:'nw'})}},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(63),h=s(117),w=s(64),C=s(402);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T extends d.a{constructor(P){super(P),this.items=this.createCollection(),this.focusTracker=new f.a,this.keystrokes=new w.a,this._focusCycler=new h.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.template=new u.a({tag:'div',attributes:{class:['ck-toolbar']},children:this.items}),this.items.on('add',(S,E)=>{this.focusTracker.add(E.element)}),this.items.on('remove',(S,E)=>{this.focusTracker.remove(E.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}fillFromConfig(P,S){return P?Promise.all(P.map((E)=>{const O='|'==E?new C.a:S.create(E);return this.items.add(O)})):Promise.resolve()}}r.a=T},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){let f=0;for(let h of u)f++;return f}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u,f,h){function w(N){const M=(V[N-1]===void 0?-1:V[N-1])+1,L=V[N+1]===void 0?-1:V[N+1],I=M>L?-1:1;O[N+I]&&(O[N]=O[N+I].slice(0)),O[N]||(O[N]=[]),O[N].push(M>L?C:T);let D=_Mathmax(M,L),q=D-N;for(;qE;F--)V[F]=w(F);V[E]=w(E),R++}while(V[E]!==S);return O[E].slice(1)}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){const f=[];for(;u&&u.nodeType!=Node.DOCUMENT_NODE;)f.unshift(u),u=u.parentNode;return f}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return(f)=>f+u}},function(o,r,s){'use strict';var d=s(52),u=s(30),f=s.i(d.a)(u.a,'Map');r.a=f},function(o,r,s){'use strict';var d=s(52),u=s(30),f=s.i(d.a)(u.a,'Set');r.a=f},function(o,r,s){'use strict';var d=s(30),u=d.a.Uint8Array;r.a=u},function(o,r){'use strict';r.a=function(u,f,h){var w=h.length;return 0===w?u.call(f):1===w?u.call(f,h[0]):2===w?u.call(f,h[0],h[1]):3===w?u.call(f,h[0],h[1],h[2]):u.apply(f,h)}},function(o,r){'use strict';r.a=function(u,f,h,w){var C=-1,T=u.length;for(w&&T&&(h=u[++C]);++CR))return!1;var N=O.get(C);if(N)return N==T;var M=-1,L=!0,I=E&1?new u.a:void 0;for(O.set(C,T);++MP)return[];for(var O=0,V=0,R=Array(w(E/P));OT&&(T=_Mathmax(P+T,0)),s.i(u.a)(w,C,T)):-1}},function(o,r,s){'use strict';var u=s(143);r.a=function(f){return s.i(u.a)(f,1)}},function(o,r,s){'use strict';var d=s(27),u=s(127),f=s(135),h=s(8),w=s.i(h.a)(function(C){var T=s.i(d.a)(C,f.a);return T.length&&T[0]===C[0]?s.i(u.a)(T):[]});r.a=w},function(o,r,s){'use strict';var d=s(27),u=s(127),f=s(10),h=s(135),w=s(18),C=s(8),T=s.i(C.a)(function(P){var S=s.i(w.a)(P),E=s.i(d.a)(P,h.a);return S===s.i(w.a)(E)?S=void 0:E.pop(),E.length&&E[0]===P[0]?s.i(u.a)(E,s.i(f.a)(S)):[]});r.a=T},function(o,r,s){'use strict';var d=s(27),u=s(127),f=s(135),h=s(18),w=s(8),C=s.i(w.a)(function(T){var P=s.i(h.a)(T),S=s.i(d.a)(T,f.a);return P===s.i(h.a)(S)?P=void 0:S.pop(),S.length&&S[0]===T[0]?s.i(u.a)(S,void 0,P):[]});r.a=C},function(o,r,s){'use strict';var u=s(146),f=s(89),h=s(14),w=s(207),C=/[\\\\^$.*+?()[\\]{}|]/g,T=/^\\[object .+?Constructor\\]$/,P=Object.prototype,S=Function.prototype.toString,E=P.hasOwnProperty,O=RegExp('^'+S.call(E).replace(C,'\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,'$1.*?')+'$');r.a=function(V){if(!s.i(h.a)(V))return!1;var R=s.i(u.a)(V)||s.i(f.a)(V)?O:T;return R.test(s.i(w.a)(V))}},function(o,r){'use strict';var u=Array.prototype,f=u.join;r.a=function(h,w){return h?f.call(h,w):''}},function(o,r,s){'use strict';var u=s(204),f=s(15);r.a=function(C,T,P){var S=C?C.length:0;if(!S)return-1;var E=S;if(void 0!==P&&(E=s.i(f.a)(P),E=(0>E?_Mathmax(S+E,0):_Mathmin(E,S-1))+1),T!==T)return s.i(u.a)(C,E,!0);for(;E--;)if(C[E]===T)return E;return-1}},function(o,r,s){'use strict';var u=s(445),f=s(15);r.a=function(h,w){return h&&h.length?s.i(u.a)(h,s.i(f.a)(w)):void 0}},function(o,r,s){'use strict';var d=s(148),u=s(8),f=s.i(u.a)(d.a);r.a=f},function(o,r,s){'use strict';var u=s(10),f=s(130);r.a=function(h,w,C){return h&&h.length&&w&&w.length?s.i(f.a)(h,w,s.i(u.a)(C)):h}},function(o,r,s){'use strict';var u=s(130);r.a=function(f,h,w){return f&&f.length&&h&&h.length?s.i(u.a)(f,h,void 0,w):f}},function(o,r,s){'use strict';var d=s(27),u=s(432),f=s(23),h=s(196),w=s(458),C=s(36),T=s(8),P=s.i(T.a)(function(S,E){E=s.i(f.a)(E,1);var O=S?S.length:0,V=s.i(u.a)(S,E);return s.i(h.a)(S,s.i(d.a)(E,function(R){return s.i(C.a)(R,O)?+R:R}).sort(w.a)),V});r.a=P},function(o,r,s){'use strict';var u=s(10),f=s(196);r.a=function(h,w){var C=[];if(!(h&&h.length))return C;var T=-1,P=[],S=h.length;for(w=s.i(u.a)(w,3);++Tw?0:w)):[]}},function(o,r,s){'use strict';var u=s(35),f=s(15);r.a=function(h,w,C){var T=h?h.length:0;return T?(w=C||void 0===w?1:s.i(f.a)(w),w=T-w,s.i(u.a)(h,0>w?0:w,T)):[]}},function(o,r,s){'use strict';var u=s(10),f=s(86);r.a=function(h,w){return h&&h.length?s.i(f.a)(h,s.i(u.a)(w,3),!1,!0):[]}},function(o,r,s){'use strict';var u=s(10),f=s(86);r.a=function(h,w){return h&&h.length?s.i(f.a)(h,s.i(u.a)(w,3)):[]}},function(o,r,s){'use strict';var u=s(146),f=s(14),h=s(44),w=0/0,C=/^\\s+|\\s+$/g,T=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,S=/^0o[0-7]+$/i,E=parseInt;r.a=function(O){if('number'==typeof O)return O;if(s.i(h.a)(O))return w;if(s.i(f.a)(O)){var V=s.i(u.a)(O.valueOf)?O.valueOf():O;O=s.i(f.a)(V)?V+'':V}if('string'!=typeof O)return 0===O?O:+O;O=O.replace(C,'');var R=P.test(O);return R||S.test(O)?E(O.slice(2),R?2:8):T.test(O)?w:+O}},function(o,r,s){'use strict';var d=s(23),u=s(42),f=s(13),h=s(8),w=s.i(h.a)(function(C){return s.i(u.a)(s.i(d.a)(C,1,f.a,!0))});r.a=w},function(o,r,s){'use strict';var d=s(23),u=s(10),f=s(42),h=s(13),w=s(18),C=s(8),T=s.i(C.a)(function(P){var S=s.i(w.a)(P);return s.i(h.a)(S)&&(S=void 0),s.i(f.a)(s.i(d.a)(P,1,h.a,!0),s.i(u.a)(S))});r.a=T},function(o,r,s){'use strict';var d=s(23),u=s(42),f=s(13),h=s(18),w=s(8),C=s.i(w.a)(function(T){var P=s.i(h.a)(T);return s.i(f.a)(P)&&(P=void 0),s.i(u.a)(s.i(d.a)(T,1,f.a,!0),void 0,P)});r.a=C},function(o,r,s){'use strict';var u=s(42);r.a=function(f){return f&&f.length?s.i(u.a)(f):[]}},function(o,r,s){'use strict';var u=s(10),f=s(42);r.a=function(h,w){return h&&h.length?s.i(f.a)(h,s.i(u.a)(w)):[]}},function(o,r,s){'use strict';var u=s(42);r.a=function(f,h){return f&&f.length?s.i(u.a)(f,void 0,h):[]}},function(o,r,s){'use strict';var d=s(66),u=s(13),f=s(8),h=s.i(f.a)(function(w,C){return s.i(u.a)(w)?s.i(d.a)(w,C):[]});r.a=h},function(o,r,s){'use strict';var d=s(82),u=s(133),f=s(13),h=s(8),w=s.i(h.a)(function(C){return s.i(u.a)(s.i(d.a)(C,f.a))});r.a=w},function(o,r,s){'use strict';var d=s(82),u=s(10),f=s(133),h=s(13),w=s(18),C=s(8),T=s.i(C.a)(function(P){var S=s.i(w.a)(P);return s.i(h.a)(S)&&(S=void 0),s.i(f.a)(s.i(d.a)(P,h.a),s.i(u.a)(S))});r.a=T},function(o,r,s){'use strict';var d=s(82),u=s(133),f=s(13),h=s(18),w=s(8),C=s.i(w.a)(function(T){var P=s.i(h.a)(T);return s.i(f.a)(P)&&(P=void 0),s.i(u.a)(s.i(d.a)(T,f.a),void 0,P)});r.a=C},function(o,r,s){'use strict';var d=s(8),u=s(98),f=s.i(d.a)(u.a);r.a=f},function(o,r,s){'use strict';var u=s(65),f=s(199);r.a=function(h,w){return s.i(f.a)(h||[],w||[],u.a)}},function(o,r,s){'use strict';var u=s(447),f=s(199);r.a=function(h,w){return s.i(f.a)(h||[],w||[],u.a)}},function(o,r,s){'use strict';var d=s(8),u=s(149),f=s.i(d.a)(function(h){var w=h.length,C=1 * {\\n margin-right: 0.4em; }\\n .ck-toolbar > *:last-child {\\n margin-right: 0; }\\n\\n.ck-dropdown::after {\\n border-style: solid;\\n border-width: .4em .4em 0 .4em;\\n border-color: #707070 transparent;\\n right: 0.8em; }\\n\\n.ck-dropdown .ck-button.ck-dropdown__button {\\n padding-right: 1.6em; }\\n .ck-dropdown .ck-button.ck-dropdown__button .ck-button__label {\\n width: 7em;\\n overflow: hidden;\\n text-overflow: ellipsis; }\\n\\n.ck-dropdown__panel {\\n border: 1px solid #b9b9b9;\\n bottom: 1px;\\n background: white;\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2); }\\n .ck-dropdown__panel.ck-rounded-corners,\\n .ck-rounded-corners .ck-dropdown__panel {\\n border-radius: 2px; }\\n\\n.ck-list {\\n list-style-type: none;\\n background: white; }\\n .ck-list.ck-rounded-corners,\\n .ck-rounded-corners .ck-list {\\n border-radius: 2px; }\\n .ck-list__item {\\n padding: 0.64em 0.64em 0.64em 0;\\n cursor: pointer;\\n min-width: 12em; }\\n .ck-list__item::before {\\n content: \"\";\\n display: inline-block;\\n width: 12px;\\n font-weight: normal;\\n font-size: 12px;\\n text-align: center;\\n margin: 0 6px; }\\n .ck-list__item:hover, .ck-list__item:focus {\\n background: #f7f7f7; }\\n .ck-list__item:focus {\\n box-shadow: 0 0 3px 2px #9bcdfb;\\n position: relative;\\n z-index: 1;\\n outline: none; }\\n .ck-list__item:last-of-type {\\n border: none; }\\n .ck-list__item_active {\\n background: #ebebeb; }\\n .ck-list__item_active::before {\\n content: \"\\\\2713\"; }\\n .ck-list__item_active:hover, .ck-list__item_active:focus {\\n background: #dedede; }\\n\\n.ck-label {\\n font-weight: bold; }\\n\\n.ck-input-text {\\n box-shadow: 2px 2px 3px #e6e6e6 inset;\\n border: 1px solid #b9b9b9;\\n padding: 0.64em;\\n min-width: 250px; }\\n .ck-input-text.ck-rounded-corners,\\n .ck-rounded-corners .ck-input-text {\\n border-radius: 2px; }\\n .ck-input-text:focus {\\n outline: none;\\n border: 1px solid #6ab5f9;\\n box-shadow: 0 0 3px 2px #9bcdfb, 2px 2px 3px #e6e6e6 inset; }\\n\\n.ck-balloon-panel {\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\\n min-width: 50px;\\n min-height: 15px;\\n background: white;\\n border: 1px solid #b9b9b9; }\\n .ck-balloon-panel.ck-rounded-corners,\\n .ck-rounded-corners .ck-balloon-panel {\\n border-radius: 2px; }\\n .ck-balloon-panel:before, .ck-balloon-panel:after {\\n width: 0;\\n height: 0;\\n border-style: solid; }\\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\\n border-width: 0 10px 15px 10px; }\\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\\n border-color: transparent transparent #b9b9b9 transparent; }\\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\\n border-color: transparent transparent white transparent;\\n margin-top: 2px; }\\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\\n border-width: 15px 10px 0 10px; }\\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\\n border-color: #b9b9b9 transparent transparent; }\\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\\n border-color: white transparent transparent transparent;\\n margin-bottom: 2px; }\\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after {\\n left: 50%;\\n margin-left: -10px;\\n top: -15px; }\\n .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after {\\n left: 20px;\\n top: -15px; }\\n .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\\n right: 20px;\\n top: -15px; }\\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after {\\n left: 50%;\\n margin-left: -10px;\\n bottom: -15px; }\\n .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after {\\n left: 20px;\\n bottom: -15px; }\\n .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\\n right: 20px;\\n bottom: -15px; }\\n\\n.ck-floating-panel {\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\\n border: 1px solid #bfbfbf;\\n background: #f7f7f7; }\\n .ck-floating-panel.ck-rounded-corners,\\n .ck-rounded-corners .ck-floating-panel {\\n border-radius: 2px; }\\n\\n.ck-toolbar__container {\\n background: #f7f7f7; }\\n .ck-toolbar__container .ck-toolbar {\\n border-radius: 0;\\n border: 0; }\\n .ck-toolbar__container .ck-toolbar .ck-button {\\n border-width: 0; }\\n .ck-toolbar__container .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-toolbar__container .ck-toolbar .ck-button.ck-disabled {\\n background: #f7f7f7; }\\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on {\\n background: #dedede;\\n border-color: #a1a1a1; }\\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\\n background: #c6c6c6;\\n border-color: #888888; }\\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\\n background: #b9b9b9;\\n border-color: #7c7c7c;\\n box-shadow: inset 0 2px 2px #a1a1a1; }\\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button {\\n border-width: 1px; }\\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\\n background: white; }\\n .ck-toolbar__container.ck-balloon-panel_arrow_s:after, .ck-toolbar__container.ck-balloon-panel_arrow_se:after, .ck-toolbar__container.ck-balloon-panel_arrow_sw:after {\\n border-bottom-color: #f7f7f7; }\\n .ck-toolbar__container.ck-balloon-panel_arrow_n:after, .ck-toolbar__container.ck-balloon-panel_arrow_ne:after, .ck-toolbar__container.ck-balloon-panel_arrow_nw:after {\\n border-top-color: #f7f7f7; }\\n\\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\\n border: 1px solid #bfbfbf;\\n border-width: 0 0 1px;\\n background: #f7f7f7; }\\n\\n.ck-editor {\\n position: relative; }\\n .ck-editor.ck-rounded-corners,\\n .ck-rounded-corners .ck-editor {\\n border-radius: 2px; }\\n .ck-editor .ck-editor__top .ck-toolbar {\\n border-radius: 0;\\n border-top: 0;\\n border-left: 0;\\n border-right: 0; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button {\\n border-width: 0; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-disabled {\\n background: #f7f7f7; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on {\\n background: #dedede;\\n border-color: #a1a1a1; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\\n background: #c6c6c6;\\n border-color: #888888; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\\n background: #b9b9b9;\\n border-color: #7c7c7c;\\n box-shadow: inset 0 2px 2px #a1a1a1; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button {\\n border-width: 1px; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\\n background: white; }\\n .ck-editor .ck-editor__main {\\n background: white; }\\n .ck-editor .ck-editor__bottom {\\n border-bottom: 0;\\n border-left: 0;\\n border-right: 0;\\n padding: 0.8em; }\\n .ck-editor .ck-editor__editable.ck-focused {\\n outline: 1px solid #6ab5f9;\\n box-shadow: 2px 2px 3px #e6e6e6 inset; }\\n .ck-editor .ck-editor__editable_inline {\\n overflow: auto;\\n padding: 0 0.8em; }\\n\\n.ck-editor,\\n.ck-editor-bottom {\\n background: #f7f7f7;\\n border: 1px solid #b9b9b9; }\\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'.ck-heading_heading1 {\\n font-size: 1.5em; }\\n\\n.ck-heading_heading2 {\\n font-size: 1.3em; }\\n\\n.ck-heading_heading3 {\\n font-size: 1.1em; }\\n\\n[class*=\"ck-heading_heading\"] {\\n font-weight: bold; }\\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'@charset \"UTF-8\";\\n/**\\n * Colors configured by the user.\\n *\\n * @type Map\\n * @example\\n *\\t\\t$ck-colors: ( \\'foreground\\': red );\\n * @see $_ck-colors\\n */\\n/**\\n * Internal map with default colors.\\n *\\n * @type Map\\n * @see ck-color-add\\n */\\n/**\\n * Returns a color of given name and lightness offset.\\n *\\n * @param {String} $name [ \\'background\\' ] - Name of the color.\\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\\n * @return {String}\\n * @see $_ck-colors\\n */\\n/**\\n * Returns a border\\u2013color for a given name and lightness offset.\\n *\\n * @param {String} $name [ \\'background\\' ] - Name of the color.\\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\\n * @return {String}\\n * @see $ck-color\\n */\\n/**\\n * Adds a color to internal color map.\\n *\\n * @example\\n *\\t\\t@include ck-color-add( ( \\'special\\': yellow, \\'hover\\': #00FF00 ) );\\n * @param {Map} $map - A map with new colors.\\n * @see $_ck-colors\\n */\\n/**\\n * A visual style of element\\'s inner shadow (i.e. input).\\n */\\n/**\\n * A visual style of element\\'s drop shadow (i.e. panel).\\n */\\n/**\\n * A helper to combine multiple shadows.\\n */\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n/**\\n * A visual style of focused element\\'s outer shadow.\\n */\\n/**\\n * A visual style of focused element\\'s border or outline.\\n */\\n/**\\n * A class which indicates that an element holding it is disabled.\\n */\\n.ck-disabled {\\n opacity: .5; }\\n\\n/**\\n * A visual style of focused element\\'s border or outline.\\n */\\n/**\\n * Brings visual styling for :focus state.\\n */\\n.ck-widget.image figcaption {\\n background-color: #f7f7f7;\\n padding: 10px;\\n font-size: .8em;\\n color: #858585; }\\n .ck-widget.image figcaption:focus {\\n outline: none;\\n box-shadow: none; }\\n .ck-widget.image figcaption.focused {\\n outline: 1px solid #6ab5f9;\\n box-shadow: 2px 2px 3px #e6e6e6 inset;\\n background-color: white; }\\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'/**\\n * Default spacing value (\"unit\").\\n *\\n */\\n/**\\n * Internal map with default spacings.\\n *\\n * @type Map\\n * @see ck-spacing\\n */\\n/**\\n * Returns a spacing value with units for given name.\\n *\\n * @param {String} $spacing [ \\'standard\\' ] - Spacing level.\\n * @return {String}\\n * @see $ck-def-spacing\\n * @see $ck-def-spacings\\n */\\n.cke-text-alternative-form {\\n padding: 1.2em;\\n overflow: hidden; }\\n .cke-text-alternative-form .ck-label {\\n margin-bottom: 0.4em; }\\n .cke-text-alternative-form__actions {\\n clear: both;\\n padding-top: 1.2em; }\\n .cke-text-alternative-form__actions .ck-button {\\n float: right; }\\n .cke-text-alternative-form__actions .ck-button + .ck-button {\\n margin-right: 0.64em; }\\n .cke-text-alternative-form__actions .ck-button + .ck-button + .ck-button {\\n float: left; }\\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'.ck-widget {\\n margin: 10px 0;\\n padding: 0; }\\n .ck-widget.ck-widget_selected, .ck-widget.ck-widget_selected:hover {\\n outline: 2px solid #ace; }\\n .ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected {\\n outline: 2px solid #ddd; }\\n .ck-widget:hover {\\n outline: 2px solid yellow; }\\n\\n.image {\\n text-align: center;\\n clear: both; }\\n .image.image-style-side {\\n float: right;\\n margin-left: 0.8em;\\n max-width: 50%; }\\n\\n.image > img {\\n display: block;\\n margin: 0 auto;\\n max-width: 100%; }\\n',''])},function(o,r,s){r=o.exports=s(45)(),r.push([o.i,'/**\\n * Default spacing value (\"unit\").\\n *\\n */\\n/**\\n * Internal map with default spacings.\\n *\\n * @type Map\\n * @see ck-spacing\\n */\\n/**\\n * Returns a spacing value with units for given name.\\n *\\n * @param {String} $spacing [ \\'standard\\' ] - Spacing level.\\n * @return {String}\\n * @see $ck-def-spacing\\n * @see $ck-def-spacings\\n */\\n.ck-link-form {\\n padding: 1.2em;\\n overflow: hidden; }\\n .ck-link-form .ck-label {\\n margin-bottom: 0.4em; }\\n .ck-link-form__actions {\\n clear: both;\\n padding-top: 1.2em; }\\n .ck-link-form__actions .ck-button {\\n float: right; }\\n .ck-link-form__actions .ck-button + .ck-button {\\n margin-right: 0.64em; }\\n .ck-link-form__actions .ck-button + .ck-button + .ck-button {\\n float: left; }\\n',''])},function(o){o.exports='\\n\\n \\n bold\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n\\n \\n italic\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n'},function(o){o.exports='\\n'},function(o){o.exports='\\n'},function(o){o.exports='\\n\\n \\n link\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n\\n \\n unlink\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n\\n \\n bulletedlist\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n\\n \\n numberedlist\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n\\n \\n redo\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o){o.exports='\\n\\n \\n undo\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(o,r,s){var d=s(273);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(274);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(275);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(276);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(277);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){var d=s(278);'string'==typeof d&&(d=[[o.i,d,'']]);s(46)(d,{});d.locals&&(o.exports=d.locals),!1},function(o,r,s){'use strict';var d=s(2),u=s(297),f=s(26),h=s(279),w=s.n(h);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends d.a{static get requires(){return[u.a]}init(){const T=this.editor,P=T.t,S=T.commands.get('bold'),E='CTRL+B';T.ui.componentFactory.add('bold',(O)=>{const V=new f.a(O);return V.set({label:P('Bold'),icon:w.a,keystroke:E,tooltip:!0}),V.bind('isOn','isEnabled').to(S,'value','isEnabled'),this.listenTo(V,'execute',()=>T.execute('bold')),V}),T.keystrokes.set(E,'bold')}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(154);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const w='bold';class C extends d.a{init(){const T=this.editor,P=T.data,S=T.editing;T.document.schema.allow({name:'$inline',attributes:[w]}),s.i(u.a)().for(P.modelToView,S.modelToView).fromAttribute(w).toElement('strong'),s.i(f.a)().for(P.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{'font-weight':'bold'}).toAttribute(w,!0),T.commands.set(w,new h.a(T,w))}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(299),f=s(26),h=s(280),w=s.n(h);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends d.a{static get requires(){return[u.a]}init(){const T=this.editor,P=T.t,S=T.commands.get('italic'),E='CTRL+I';T.ui.componentFactory.add('italic',(O)=>{const V=new f.a(O);return V.set({label:P('Italic'),icon:w.a,keystroke:E,tooltip:!0}),V.bind('isOn','isEnabled').to(S,'value','isEnabled'),this.listenTo(V,'execute',()=>T.execute('italic')),V}),T.keystrokes.set(E,'italic')}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(154);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const w='italic';class C extends d.a{init(){const T=this.editor,P=T.data,S=T.editing;T.document.schema.allow({name:'$inline',attributes:[w]}),s.i(u.a)().for(P.modelToView,S.modelToView).fromAttribute(w).toElement('em'),s.i(f.a)().for(P.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{'font-style':'italic'}).toAttribute(w,!0),T.commands.set(w,new h.a(T,w))}}r.a=C},function(o){var s=function(){return this}();try{s=s||Function('return this')()||(1,eval)('this')}catch(d){'object'==typeof window&&(s=window)}o.exports=s},function(o,r,s){'use strict';var d=s(2),u=s(302),f=s(305),h=s(304),w=s(158);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends d.a{init(){const T=this.editor,P=T.document,S=T.editing.view;this._htmlDataProcessor=new w.a,S.addObserver(u.a),this.listenTo(S,'paste',(O,V)=>{const R=V.dataTransfer;let F='';R.getData('text/html')?F=s.i(h.a)(R.getData('text/html')):R.getData('text/plain')&&(F=s.i(f.a)(R.getData('text/plain'))),F=this._htmlDataProcessor.toView(F),V.preventDefault(),S.fire('clipboardInput',{dataTransfer:R,content:F})},{priority:'low'}),this.listenTo(S,'clipboardInput',(O,V)=>{if(!V.content.isEmpty){const R=this.editor.data,F=R.toModel(V.content,'$clipboardHolder');P.enqueueChanges(()=>{R.insertContent(F,P.selection)})}},{priority:'low'});const E=(O,V)=>{const R=V.dataTransfer,F=T.data.toView(T.data.getSelectedContent(P.selection));V.preventDefault(),S.fire('clipboardOutput',{dataTransfer:R,content:F,method:O.name})};this.listenTo(S,'copy',E,{priority:'low'}),this.listenTo(S,'cut',E,{priority:'low'}),this.listenTo(S,'clipboardOutput',(O,V)=>{V.content.isEmpty||V.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(V.content)),'cut'==V.method&&P.enqueueChanges(()=>{T.data.deleteContent(P.selection,P.batch(),{merge:!0})})},{priority:'low'})}}r.a=C},function(o,r,s){'use strict';var d=s(61),u=s(303);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h),this.domEventType=['paste','copy','cut']}onDomEvent(h){this.fire(h.type,h,{dataTransfer:new u.a(h.clipboardData)})}}r.a=f},function(o,r){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(u){this._native=u}getData(u){return this._native.getData(u)}setData(u,f){this._native.setData(u,f)}}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return u.replace(/(\\s+)<\\/span>/g,(f,h)=>{return 1==h.length?' ':h})}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return u=u.replace(//g,'>').replace(/\\n\\n/g,'

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

')&&(u=`

${u}

`),u}},function(o,r,s){'use strict';var d=s(64);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{constructor(f){super(),this.editor=f}set(f,h){if('string'==typeof h){const w=h;h=()=>{this.editor.execute(w)}}super.set(f,h)}listenTo(f){this._listener.listenTo(f,'keydown',(h,w)=>{const C=this.press(w);C&&w.preventDefault()})}}r.a=u},function(o,r,s){'use strict';var d=s(7),u=s(407),f=s(309),h=s(520),w=s(313),C=s(328),T=s(0),P=s(4);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class S{constructor(E){const O=this.constructor.build&&this.constructor.build.plugins;this.config=new u.a(E,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',O),this.plugins=new f.a(this,O),this.commands=new Map,this.locale=new h.a(this.config.get('lang')),this.t=this.locale.t,this.document=new C.a,this.data=new w.a(this.document)}initPlugins(){function O(F,N){return F.reduce((M,L)=>{return M.then(L[N].bind(L))},Promise.resolve())}const V=this,R=this.config;return function(){return V.plugins.load(R.get('plugins')||[])}().then((F)=>{return O(F,'init').then(()=>O(F,'afterInit'))}).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),Promise.resolve().then(()=>{this.document.destroy(),this.data.destroy()})}execute(E,O){let V=this.commands.get(E);if(!V)throw new T.a('editor-command-not-found: Specified command has not been added to the editor.');V._execute(O)}static create(E){return new Promise((O)=>{const V=new this(E);O(V.initPlugins().then(()=>{V.fire('dataReady'),V.fire('ready')}).then(()=>V))})}}r.a=S,s.i(P.a)(S,d.a)},function(o,r,s){'use strict';var d=s(307),u=s(306),f=s(315),h=s(410),w=s(418);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends d.a{constructor(T,P){super(P),this.element=T,this.editing=new f.a(this.document),this.keystrokes=new u.a(this),this.keystrokes.listenTo(this.editing.view)}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(T){this.data.set(T)}getData(){return this.data.get()}updateEditorElement(){s.i(w.a)(this.element,this.getData())}loadDataFromEditorElement(){this.setData(s.i(h.a)(this.element))}static create(T,P){return new Promise((S)=>{const E=new this(T,P);S(E.initPlugins().then(()=>{E.fire('dataReady'),E.fire('ready')}).then(()=>E))})}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(0),f=s(57);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h{constructor(w,C=[]){this._editor=w,this._availablePlugins=new Map,this._plugins=new Map;for(const T of C)this._availablePlugins.set(T,T),T.pluginName&&this._availablePlugins.set(T.pluginName,T)}*[Symbol.iterator](){for(const w of this._plugins)'function'==typeof w[0]&&(yield w)}get(w){return this._plugins.get(w)}load(w,C=[]){function T(q){return I.includes(q)||R.get(q)||N.has(q)?void 0:P(q).catch((z)=>{throw f.a.error('plugincollection-load: It was not possible to load the plugin.',{plugin:q}),z})}function P(q){return new Promise((z)=>{N.add(q),E(q),q.requires&&q.requires.forEach((K)=>{const H=S(K);if(C.includes(H))throw new u.a('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:H,requiredBy:q});T(H)});const $=new q(F);R._add(q,$),M.push($),z()})}function S(q){return'function'==typeof q?q:R._availablePlugins.get(q)}function E(q){if(!(q.prototype instanceof d.a))throw new u.a('plugincollection-instance: The loaded plugin module is not an instance of Plugin.',{plugin:q})}function V(q){return q.map((z)=>S(z)).filter((z)=>!!z)}const R=this,F=this._editor,N=new Set,M=[],L=V(w),I=V(C),D=function(q){const z=[];for(const $ of q)S($)||z.push($);return z.length?z:null}(w);if(D){const q='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return f.a.error(q,{plugins:D}),Promise.reject(new u.a(q,{plugins:D}))}return Promise.all(L.map(T)).then(()=>M)}_add(w,C){this._plugins.set(w,C),w.pluginName&&this._plugins.set(w.pluginName,C)}}r.a=h},function(o,r,s){'use strict';var d=s(308),u=s(158),f=s(311),h=s(312),w=s(419),C=s(290),T=s.n(C);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class P extends d.a{constructor(S,E){super(S,E),this.document.createRoot(),this.data.processor=new u.a,this.ui=new f.a(this,new h.a(this.locale)),this._elementReplacer=new w.a}destroy(){return this.updateEditorElement(),this._elementReplacer.restore(),this.ui.destroy().then(()=>super.destroy())}static create(S,E){return new Promise((O)=>{const V=new P(S,E);O(V.initPlugins().then(()=>V._elementReplacer.replace(S,V.ui.view.element)).then(()=>V.ui.init()).then(()=>V.fire('uiReady')).then(()=>V.editing.view.attachDomRoot(V.ui.view.editableElement)).then(()=>V.loadDataFromEditorElement()).then(()=>{V.fire('dataReady'),V.fire('ready')}).then(()=>V))})}}r.a=P},function(o,r,s){'use strict';var d=s(386),u=s(63),f=s(400);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(w,C){this.editor=w,this.view=C,this.componentFactory=new d.a(w),this.focusTracker=new u.a,C.set('width',w.config.get('ui.width')),C.set('height',w.config.get('ui.height')),C.toolbar.bind('isActive').to(this.focusTracker,'isFocused'),C.toolbar.limiterElement=C.element;const T=w.editing.createRoot('div');C.editable.bind('isReadOnly').to(T),C.editable.bind('isFocused').to(w.editing.view),C.editable.name=T.rootName,this.focusTracker.add(C.editableElement)}init(){const w=this.editor;return this.view.init().then(()=>{return this.view.toolbar.fillFromConfig(w.config.get('toolbar'),this.componentFactory)}).then(()=>{s.i(f.a)({origin:w.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:w.keystrokes,toolbar:this.view.toolbar})})}destroy(){return this.view.destroy()}}},function(o,r,s){'use strict';var d=s(393),u=s(392),f=s(401);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{constructor(w){super(w),this.toolbar=new f.a(w),this.editable=new u.a(w),this.top.add(this.toolbar),this.main.add(this.editable)}get editableElement(){return this.editable.element}}r.a=h},function(o,r,s){'use strict';var d=s(4),u=s(7),f=s(155),h=s(157),w=s(99),C=s(323),T=s(321),P=s(113),S=s(3),E=s(1),O=s(317),V=s(314),R=s(318),F=s(316);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class N{constructor(M,L){this.model=M,this.processor=L,this.mapper=new f.a,this.modelToView=new h.a(this.model,{mapper:this.mapper}),this.modelToView.on('insert:$text',s.i(w.j)(),{priority:'lowest'}),this.viewToModel=new C.a({schema:M.schema}),this.viewToModel.on('text',s.i(T.a)(),{priority:'lowest'}),this.viewToModel.on('element',s.i(T.b)(),{priority:'lowest'}),this.viewToModel.on('documentFragment',s.i(T.b)(),{priority:'lowest'}),this.on('insertContent',(I,D)=>s.i(O.a)(this,D.content,D.selection,D.batch)),this.on('deleteContent',(I,D)=>s.i(V.a)(D.selection,D.batch,D.options)),this.on('modifySelection',(I,D)=>s.i(R.a)(this,D.selection,D.options)),this.on('getSelectedContent',(I,D)=>{D.content=s.i(F.a)(D.selection)})}get(M='main'){return this.stringify(this.model.getRoot(M))}stringify(M){const L=this.toView(M);return this.processor.toData(L)}toView(M){const L=S.a.createIn(M),I=new P.a;return this.mapper.bindElements(M,I),this.modelToView.convertInsertion(L),this.mapper.clearBindings(),I}set(M,L='main'){const I=this.model.getRoot(L);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(S.a.createIn(I)).insert(E.a.createAt(I,0),this.parse(M))})}parse(M,L='$root'){const I=this.processor.toView(M);return this.toModel(I,L)}toModel(M,L='$root'){return this.viewToModel.convert(M,{context:[L]})}destroy(){}insertContent(M,L,I){this.fire('insertContent',{content:M,selection:L,batch:I})}deleteContent(M,L,I){this.fire('deleteContent',{batch:L,selection:M,options:I})}modifySelection(M,L){this.fire('modifySelection',{selection:M,options:L})}getSelectedContent(M){const L={selection:M};return this.fire('getSelectedContent',L),L.content}}r.a=N,s.i(d.a)(N,u.a)},function(o,r,s){'use strict';function u(S,E,O){const V=O.path,R=_Mathmin(E.path.length-1,V.length-1);let F=s.i(P.a)(E.path,V);if('number'==typeof F)for(;F{this.modelToView.convertChange(O,V)},{priority:'low'}),this._listener.listenTo(this.model,'changesDone',()=>{const E=this.model.selection;this.modelToView.convertSelection(E),this.view.render()},{priority:'low'}),this._listener.listenTo(this.model.markers,'add',(E,O)=>{this.modelToView.convertMarker('addMarker',O.name,O.getRange())}),this._listener.listenTo(this.model.markers,'remove',(E,O)=>{this.modelToView.convertMarker('removeMarker',O.name,O.getRange())}),this._listener.listenTo(this.view,'selectionChange',s.i(w.a)(this.model,this.mapper)),this.modelToView.on('insert:$text',s.i(h.j)(),{priority:'lowest'}),this.modelToView.on('remove',s.i(h.k)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.c)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.d)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.e)(),{priority:'low'}),this.modelToView.on('selection',s.i(C.f)(),{priority:'low'})}createRoot(S,E='main'){const O=this.view.createRoot(S,E),V=this.model.getRoot(E);return this.mapper.bindElements(V,O),O}destroy(){this.view.destroy(),this._listener.stopListening()}}},function(o,r,s){'use strict';function u(P){const S=[];Array.from(P.getItems({direction:'backward'})).map((E)=>h.a.createOn(E)).filter((E)=>{const O=(E.start.isAfter(P.start)||E.start.isEqual(P.start))&&(E.end.isBefore(P.end)||E.end.isEqual(P.end));return O}).forEach((E)=>{S.push(E.start.parent),s.i(T.c)(E)}),S.forEach((E)=>{for(let O=E;O.parent&&O.isEmpty;){const V=h.a.createOn(O);O=O.parent,s.i(T.c)(V)}})}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */var f=s(49),h=s(3),w=s(1),C=s(24),T=s(20);r.a=function(P){const S=new f.a,E=P.getFirstRange();if(!E||E.isCollapsed)return S;const O=E.start.root,V=E.start.getCommonPath(E.end),R=O.getNodeByPath(V);let F=E.start.parent==E.end.parent?E:h.a.createFromParentsAndOffsets(R,E.start.path[V.length],R,E.end.path[V.length]+1);const N=F.end.offset-F.start.offset;for(const M of F.getItems({shallow:!0}))M.is('textProxy')?S.appendChildren(new C.a(M.data,M.getAttributes())):S.appendChildren(M.clone(!0));if(F!=E){const M=E._getTransformedByMove(F.start,w.a.createAt(S,0),N)[0],L=new h.a(w.a.createAt(S),M.start),I=new h.a(M.end,w.a.createAt(S,'end'));u(I),u(L)}return S}},function(o,r,s){'use strict';var u=s(1),f=s(162),h=s(5),w=s(3),C=s(57);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(P,S,E,O){O||(O=P.model.batch()),E.isCollapsed||P.deleteContent(E,O,{merge:!0});const V=new T(P,O,E.anchor);V.handleNodes(S.getChildren(),{isFirst:!0,isLast:!0});const R=V.getSelectionRange();R?E.setRanges([R]):C.a.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')};class T{constructor(P,S,E){this.dataController=P,this.batch=S,this.position=E,this.canMergeWith=new Set([this.position.parent]),this.schema=P.model.schema}handleNodes(P,S){P=Array.from(P);for(let E=0;E!0);if(S.schema.check({name:'$text',inside:E.nextPosition}))return E.nextPosition}}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function f(S,E){const O=S.position.textNode;if(O){const V=O.data;for(let R=S.position.offset-O.startOffset;s.i(P.a)(V,R)||'character'==E&&s.i(P.b)(V,R);)S.next(),R=S.position.offset-O.startOffset}return S.position}function h(S,E){const O=S.root,V=w.a.createAt(O,E?'end':0);return E?new T.a(S,V):new T.a(V,S)}var w=s(1),C=s(33),T=s(3),P=s(271);r.a=function(S,E,O={}){const V=S.model.schema,R='backward'!=O.direction,F=O.unit?O.unit:'character',N=E.focus,M=new C.a({boundaries:h(N,R),singleCharacters:!0,direction:R?'forward':'backward'}),L={walker:M,schema:V,isForward:R,unit:F};for(let I;I=M.next();){if(I.done)return;const D=u(L,I.value);if(D)return void E.setFocus(D)}}},function(o,r,s){'use strict';var d=s(72);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(f,h){f instanceof d.a&&(f=this._getSymbolForTextProxy(f)),this._consumable.has(f)||this._consumable.set(f,new Map),this._consumable.get(f).set(h,!0)}consume(f,h){return f instanceof d.a&&(f=this._getSymbolForTextProxy(f)),!!this.test(f,h)&&(this._consumable.get(f).set(h,!1),!0)}test(f,h){f instanceof d.a&&(f=this._getSymbolForTextProxy(f));const w=this._consumable.get(f);if(w===void 0)return null;const C=w.get(h);return void 0===C?null:C}revert(f,h){f instanceof d.a&&(f=this._getSymbolForTextProxy(f));const w=this.test(f,h);return!1===w?(this._consumable.get(f).set(h,!0),!0):!0!==w&&null}_getSymbolForTextProxy(f){let h=null;const w=this._textProxyRegistry.get(f.startOffset);if(w){const C=w.get(f.endOffset);C&&(h=C.get(f.parent))}return h||(h=this._addSymbolForTextProxy(f.startOffset,f.endOffset,f.parent)),h}_addSymbolForTextProxy(f,h,w){const C=Symbol();let T,P;return T=this._textProxyRegistry.get(f),T||(T=new Map,this._textProxyRegistry.set(f,T)),P=T.get(h),P||(P=new Map,T.set(h,P)),P.set(w,C),C}}},function(o,r,s){'use strict';var u=s(59);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(f,h){return(w,C)=>{const T=C.newSelection,P=new u.a,S=[];for(let E of T.getRanges())S.push(h.toModelRange(E));P.setRanges(S,T.isBackward),P.isEqual(f.selection)||f.enqueueChanges(()=>{f.selection.setTo(P)})}}},function(o,r,s){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */var f=s(49),h=s(24),w=s(20);r.b=function(){return(C,T,P,S)=>{if(!T.output&&P.consume(T.input,{name:!0})){const E=S.convertChildren(T.input,P,T);T.output=new f.a(s.i(w.b)(E))}}},r.a=function(){return(C,T,P,S)=>{const E={name:'$text',inside:T.context};S.schema.check(E)&&P.consume(T.input)&&(T.output=new h.a(T.input.data))}}},function(o,r,s){'use strict';var d=s(11),u=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f{constructor(){this._consumables=new Map}add(w,C){let T;return w.is('text')||w.is('documentFragment')?void this._consumables.set(w,!0):void(this._consumables.has(w)?T=this._consumables.get(w):(T=new h,this._consumables.set(w,T)),T.add(C))}test(w,C){const T=this._consumables.get(w);return void 0===T?null:w.is('text')||w.is('documentFragment')?T:T.test(C)}consume(w,C){return!!this.test(w,C)&&(w.is('text')||w.is('documentFragment')?this._consumables.set(w,!1):this._consumables.get(w).consume(C),!0)}revert(w,C){const T=this._consumables.get(w);T!==void 0&&(w.is('text')||w.is('documentFragment')?this._consumables.set(w,!0):T.revert(C))}static consumablesFromElement(w){const C={name:!0,attribute:[],class:[],style:[]},T=w.getAttributeKeys();for(let E of T)'style'!=E&&'class'!=E&&C.attribute.push(E);const P=w.getClassNames();for(let E of P)C.class.push(E);const S=w.getStyleNames();for(let E of S)C.style.push(E);return C}static createFrom(w,C){if(C||(C=new f),w.is('text'))return C.add(w),C;w.is('element')&&C.add(w,f.consumablesFromElement(w)),w.is('documentFragment')&&C.add(w);for(let T of w.getChildren())C=f.createFrom(T,C);return C}}r.a=f;class h{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(w){for(let C in w.name&&(this._canConsumeName=!0),this._consumables)C in w&&this._add(C,w[C])}test(w){if(w.name&&!this._canConsumeName)return this._canConsumeName;for(let C in this._consumables)if(C in w){const T=this._test(C,w[C]);if(!0!==T)return T}return!0}consume(w){for(let C in w.name&&(this._canConsumeName=!1),this._consumables)C in w&&this._consume(C,w[C])}revert(w){for(let C in w.name&&(this._canConsumeName=!0),this._consumables)C in w&&this._revert(C,w[C])}_add(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T){if('attribute'===w&&('class'===S||'style'===S))throw new u.a('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');P.set(S,!0)}}_test(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T)if('attribute'===w&&('class'===S||'style'===S)){const E=this._test(S,[...this._consumables[S].keys()]);if(!0!==E)return E}else{const E=P.get(S);if(E===void 0)return null;if(!E)return!1}return!0}_consume(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T)'attribute'===w&&('class'===S||'style'===S)?this._consume(S,[...this._consumables[S].keys()]):P.set(S,!1)}_revert(w,C){const T=s.i(d.a)(C)?C:[C],P=this._consumables[w];for(let S of T)if('attribute'===w&&('class'===S||'style'===S))this._revert(S,[...this._consumables[S].keys()]);else{const E=P.get(S);!1===E&&P.set(S,!0)}}}},function(o,r,s){'use strict';function d(R){const F=new Set,N=new Map,M=new P.a({startPosition:T.a.createAt(R,0),ignoreElementEnd:!0});for(const L of M)'$marker'==L.item.name&&F.add(L.item);for(const L of F){const I=L.getAttribute('data-name'),D=T.a.createBefore(L);N.has(I)?N.get(I).end=T.a.createFromPosition(D):N.set(I,new C.a(T.a.createFromPosition(D))),s.i(O.c)(C.a.createOn(L))}return N}var u=s(322),f=s(7),h=s(4),w=s(56),C=s(3),T=s(1),P=s(33),S=s(58),E=s(49),O=s(20);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class V{constructor(R={}){this.conversionApi=s.i(w.a)({},R),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this)}convert(R,F={}){this.fire('viewCleanup',R);const N=u.a.createFrom(R),M=this._convertItem(R,N,F);if(!(M instanceof S.a||M instanceof E.a))return M;let L=M;return L.is('documentFragment')||(L=new E.a([L])),L.markers=d(L),L}_convertItem(R,F,N={}){const M=s.i(w.a)({},N,{input:R,output:null});return R.is('element')?this.fire('element:'+R.name,M,F,this.conversionApi):R.is('text')?this.fire('text',M,F,this.conversionApi):this.fire('documentFragment',M,F,this.conversionApi),M.output}_convertChildren(R,F,N={}){const M=Array.from(R.getChildren()),L=M.map((I)=>this._convertItem(I,F,N));return L.reduce((I,D)=>D?I.concat(D):I,[])}}r.a=V,s.i(h.a)(V,f.a)},function(o,r){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{getHtml(u){const f=document.implementation.createHTMLDocument(''),h=f.createElement('div');return h.appendChild(u),h.innerHTML}}},function(o,r,s){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */var d=s(159),u=s(100),f=s(101),h=s(102),w=s(103),C=s(160),T=s(104),P=s(106),S=s(161),E=s(107)},function(o,r,s){'use strict';function d(H,U){const W=H.clone(),Z=W.operations[0];return Z.oldRange=Z.oldRange.getTransformedByDelta(U)[0],Z.newRange=Z.newRange.getTransformedByDelta(U)[0],[W]}function u(H,U){function W(){const Q=new w.a(H.position.getShiftedBy(Y),H.position.getShiftedBy(X)),ee=new P.a(Q,U.key,J,U.value,0);Z.addOperation(ee)}const Z=new V.a,G=H.nodes;let J=G.getNode(0).getAttribute(U.key),Y=0,X=G.getNode(0).offsetSize;for(let Q=1;Q{const Z=s.i(h.c)(H,U,W);return H.range.containsPosition(U.position)&&Z.push(u(U,H)),Z}),s.i(h.b)(V.a,L.a,(H,U,W)=>{const Z=new C.a(U.position.root,U.position.path.slice(0,-1)),G=s.i(h.c)(H,U,W);for(let J of H.operations)if(J.range.containsPosition(Z)||J.range.start.isEqual(Z)){const Y=new V.a,X=Z.getShiftedBy(1),Q=C.a.createFromPosition(X);Q.path.push(0);const ee=U._cloneOperation.nodes.getNode(0).getAttribute(J.key);Y.addOperation(new P.a(new w.a(X,Q),J.key,ee===void 0?null:ee,J.newValue,0)),G.push(Y);break}return G}),s.i(h.b)(R.a,N.a,(H,U,W)=>{return H.position.isEqual(U.position)?[U.getReversed(),H.clone()]:s.i(h.c)(H,U,W)}),s.i(h.b)(F.a,L.a,d),s.i(h.b)(F.a,N.a,d),s.i(h.b)(F.a,D.a,d),s.i(h.b)(F.a,q.a,d),s.i(h.b)(M.a,N.a,(H,U,W)=>{const Z=H.sourcePosition.root==U.position.root&&'same'===s.i(K.a)(H.sourcePosition.getParentPath(),U.position.getParentPath()),G=H.sourcePosition.offset<=U.position.offset&&H.sourcePosition.offset+H.howMany>U.position.offset;return Z&&G?[U.getReversed(),H.clone()]:s.i(h.c)(H,U,W)}),s.i(h.b)(N.a,R.a,(H,U,W)=>{return H.position.isEqual(U.position)?[f()]:s.i(h.c)(H,U,W)}),s.i(h.b)(N.a,M.a,(H,U,W)=>{const Z=H.position.root==U.sourcePosition.root&&'same'===s.i(K.a)(H.position.getParentPath(),U.sourcePosition.getParentPath()),G=U.sourcePosition.offset<=H.position.offset&&U.sourcePosition.offset+U.howMany>H.position.offset;return Z&&G?[f()]:s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,L.a,(H,U,W)=>{const Z=H.position.getParentPath(),G=U.position.getParentPath();if('same'==s.i(K.a)(Z,G)){if(H.position.offset==U.position.offset)return[f()];if(H.position.offsetU._cloneOperation.sourcePosition.offset&&J._cloneOperation.sourcePosition.offset--,[J]}const J=H.clone();return J._cloneOperation.position.offset++,J._moveOperation.sourcePosition.path[J._moveOperation.sourcePosition.path.length-2]++,J._moveOperation.targetPosition.path[J._moveOperation.targetPosition.path.length-2]++,J._moveOperation.sourcePosition.offset=H.position.offset-U.position.offset,H._cloneOperation instanceof E.a&&U._cloneOperation instanceof E.a&&H._cloneOperation.sourcePosition.offset>U._cloneOperation.sourcePosition.offset&&J._cloneOperation.sourcePosition.offset--,[J]}return s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,q.a,(H,U,W)=>{return'same'===s.i(K.a)(U.position.path,H.position.getParentPath())?[f()]:s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,D.a,(H,U,W)=>{const Z='same'===s.i(K.a)(H.position.getParentPath(),U.range.start.getParentPath()),G=U.range.start.offset=H.position.offset;if(Z&&G)return[f()];if('same'===s.i(K.a)(H.position.getParentPath(),U.range.end.getShiftedBy(-1).path)){const J=H.clone(),Y=C.a.createFromPosition(U.range.start);Y.path.push(U.howMany-1);const X=Y.getShiftedBy(1);J._cloneOperation.position=X;const Q=C.a.createFromPosition(Y);Q.path.push(H.position.offset),J._moveOperation.sourcePosition=Q;const ee=C.a.createFromPosition(X);return ee.path.push(0),J._moveOperation.targetPosition=ee,[J]}return s.i(h.c)(H,U,W)}),s.i(h.b)(L.a,V.a,(H,U)=>{H=H.clone();const W=new C.a(H.position.root,H.position.path.slice(0,-1));if(H._cloneOperation instanceof S.a)for(let Z of U.operations)if(Z.range.containsPosition(W)||Z.range.start.isEqual(W)){null===Z.newValue?H._cloneOperation.nodes.getNode(0).removeAttribute(Z.key):H._cloneOperation.nodes.getNode(0).setAttribute(Z.key,Z.newValue);break}return[H]}),s.i(h.b)(q.a,L.a,(H,U,W)=>{if('same'===s.i(K.a)(H.position.path,U.position.getParentPath())){const Z=[U.getReversed(),H.clone()];return Z[1].operations[1].targetPosition.path[0]++,Z}return s.i(h.c)(H,U,W)}),s.i(h.b)(I.a,V.a,(H,U)=>{const W=[H.clone()];return U.range.containsPosition(H.position)&&W.push(u(H,U)),W}),s.i(h.b)(D.a,L.a,(H,U,W)=>{const Z='same'===s.i(K.a)(H.range.start.getParentPath(),U.position.getParentPath()),G=H.range.start.offset=U.position.offset;if(Z&&G)return[U.getReversed(),H.clone()];if('same'===s.i(K.a)(U.position.getParentPath(),H.range.end.getShiftedBy(-1).path)){const J=H.clone();return J._insertOperation.position.offset++,J._moveOperation.howMany++,J._moveOperation.targetPosition.path[J._moveOperation.targetPosition.path.length-2]++,[J]}return s.i(h.c)(H,U,W)}),s.i(h.b)(z.a,L.a,(H,U,W)=>{const Z=new C.a(U.position.root,U.position.path.slice(0,-1)),G=s.i(h.c)(H,U,W);if(H.operations[0].position.isEqual(Z)){const J=H.clone();J.operations[0].position=H.operations[0].position.getShiftedBy(1),G.push(J)}return G}),s.i(h.b)(L.a,z.a,(H,U)=>{H=H.clone();const W=new C.a(H.position.root,H.position.path.slice(0,-1));return H._cloneOperation instanceof S.a&&U.operations[0].position.isEqual(W)&&(H._cloneOperation.nodes.getNode(0).name=U.operations[0].newName),[H]}),s.i(h.b)($.a,L.a,(H,U,W)=>{const Z=s.i(h.c)(H,U,W),G=U._cloneOperation.position;for(let J of Z)for(let Y of J.operations){const X=Y.sourcePosition.getShiftedBy(Y.howMany);X.isEqual(G)&&(Y.howMany+=1)}return Z}),s.i(h.b)(L.a,$.a,(H,U,W)=>{U=U.clone();const Z=H._cloneOperation.position;for(let G of U.operations){const J=G.sourcePosition.getShiftedBy(G.howMany);J.isEqual(Z)&&(G.howMany+=1)}return s.i(h.c)(H,U,W)})},function(o,r,s){'use strict';function d(P,S,E,O){const V=P.document,R=new T,F=new w.a(S,E,O,V.markers,V.version);P.addDelta(R),R.addOperation(F),V.applyOperation(F)}var u=s(19),f=s(17),h=s(16),w=s(108),C=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T extends u.a{get type(){return'marker'}get _reverseDeltaClass(){return T}static get className(){return'engine.model.delta.MarkerDelta'}}r.a=T,s.i(h.b)('setMarker',function(P,S){const E='string'==typeof P?P:P.name,O=this.document.markers.get(E);if(!S&&!O)throw new C.a('batch-setMarker-no-range: Range parameter is required when adding a new marker.');const V=O?O.getRange():null;return S?d(this,E,V,S):d(this,E,null,V),this}),s.i(h.b)('removeMarker',function(P){const S='string'==typeof P?P:P.name;if(!this.document.markers.has(S))throw new C.a('batch-removeMarker-no-marker: Trying to remove marker that does not exist.');const E=this.document.markers.get(S).getRange();return d(this,S,E,null),this}),f.a.register(T)},function(o,r,s){'use strict';function d(z){const $=z.textNode;if($){const K=$.data,H=z.offset-$.startOffset;return!s.i(I.a)(K,H)&&!s.i(I.b)(K,H)}return!0}function*u(z,$){for(let K=!1;!K;){if(K=!0,z){const H=z.next();H.done||(K=!1,yield{walker:z,value:H.value})}if($){const H=$.next();H.done||(K=!1,yield{walker:$,value:H.value})}}}var f=s(325),h=s(326),w=s(3),C=s(1),T=s(334),P=s(16),S=s(329),E=s(330),O=s(335),V=s(33),R=s(331),F=s(94),N=s(7),M=s(0),L=s(4),I=s(271);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const D='$graveyard';class q{constructor(){this.version=0,this.schema=new O.a,this.history=new S.a(this),this.markers=new R.a,this.selection=new E.a(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(let z of this.selection.getRanges())if(!this._validateSelectionRange(z))throw new M.a('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:z})}),this.createRoot('$root',D)}get graveyard(){return this.getRoot(D)}applyOperation(z){if(z.baseVersion!==this.version)throw new M.a('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:z});let $=z._execute();this.version++,this.history.addDelta(z.delta),$&&this.fire('change',z.type,$,z.delta.batch,z.delta.type)}batch(z){return new P.a(this,z)}createRoot(z='$root',$='main'){if(this.roots.has($))throw new M.a('model-document-createRoot-name-exists: Root with specified name already exists.',{name:$});const K=new T.a(this,z,$);return this.roots.set($,K),K}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges(z){if(this._pendingChanges.push(z),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot(z='main'){if(!this.roots.has(z))throw new M.a('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:z});return this.roots.get(z)}hasRoot(z){return this.roots.has(z)}getRootNames(){return Array.from(this.roots.keys()).filter((z)=>z!=D)}getNearestSelectionRange(z,$='both'){if(this.schema.check({name:'$text',inside:z}))return new w.a(z);let K,H;('both'==$||'backward'==$)&&(K=new V.a({startPosition:z,direction:'backward'})),('both'==$||'forward'==$)&&(H=new V.a({startPosition:z}));for(let U of u(K,H)){const W=U.walker==K?'elementEnd':'elementStart',Z=U.value;if(Z.type==W&&this.schema.objects.has(Z.item.name))return w.a.createOn(Z.item);if(this.schema.check({name:'$text',inside:Z.nextPosition}))return new w.a(Z.nextPosition)}return null}toJSON(){const z=s.i(F.a)(this);return z.selection='[engine.model.LiveSelection]',z}_getDefaultRoot(){for(let z of this.roots.values())if(z!==this.graveyard)return z;return this.graveyard}_getDefaultRange(){const z=this._getDefaultRoot(),$=new C.a(z,[0]),K=this.getNearestSelectionRange($);return K||new w.a($)}_validateSelectionRange(z){return d(z.start)&&d(z.end)}}r.a=q,s.i(L.a)(q,N.a)},function(o,r,s){'use strict';var d=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(){this._deltas=[],this._historyPoints=new Map}addDelta(f){if(0=h)break;yield C}}}getDelta(f){let h=this._historyPoints.get(f);if(h===void 0)return null;const w=[];for(h;hf&&this._historyPoints.set(T,this._historyPoints.get(T)+C)}}_getIndex(f){let h=this._historyPoints.get(f);if(h===void 0){const w=this._deltas[this._deltas.length-1],C=w.baseVersion+w.operations.length;if(0>f||f>=C)return-1;throw new d.a('model-history-wrong-version: Given base version points to the middle of a delta.')}return h}}},function(o,r,s){'use strict';function d(F){return F instanceof C.a||F instanceof w.a?F.getAttributes():null}var u=s(1),f=s(3),h=s(163),w=s(24),C=s(72),T=s(150),P=s(0),S=s(57),E=s(59);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const O='selection:',V=new Set(['addAttribute','removeAttribute','changeAttribute','addRootAttribute','removeRootAttribute','changeRootAttribute']);class R extends E.a{constructor(F){super(),this._document=F,this._attributePriority=new Map,this.listenTo(this._document,'change',(N,M)=>{V.has(M)&&this._updateAttributes(!1)})}get isCollapsed(){const F=this._ranges.length;return!(0!==F)||super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().start}get rangeCount(){return this._ranges.length?this._ranges.length:1}destroy(){for(let F=0;F{N.root==this._document.graveyard&&this._fixGraveyardSelection(N,L),this.fire('change:range',{directChange:!1})}),N}_updateAttributes(F){const N=s.i(T.a)(this._getSurroundingAttributes()),M=s.i(T.a)(this.getAttributes());if(F)this._attributePriority=new Map,this._attrs=new Map;else for(let[I,D]of this._attributePriority)'low'==D&&(this._attrs.delete(I),this._attributePriority.delete(I));this._setAttributesTo(N,!1);const L=[];for(let[I,D]of this.getAttributes())M.has(I)&&M.get(I)===D||L.push(I);for(let[I]of M)this.hasAttribute(I)||L.push(I);0{return new T.a(q,L.key,L.oldValue,L.newValue,L.baseVersion)})},AttributeOperation(L,I,D){if(L.key===I.key){let q=L.range.getDifference(I.range).map(($)=>{return new T.a($,L.key,L.oldValue,L.newValue,L.baseVersion)});const z=L.range.getIntersection(I.range);return z&&(D?q.push(new T.a(z,I.key,I.newValue,L.newValue,L.baseVersion)):0===q.length&&q.push(new R.a(0))),q}return[L.clone()]},RootAttributeOperation:u,RenameOperation:u,MarkerOperation:u,MoveOperation(L,I){const D=F.a.createFromPositionAndShift(I.sourcePosition,I.howMany);let q=[];I instanceof V.a&&I._needsHolderElement&&L.range.root==I.targetPosition.root&&L.range.start.path[0]>=I._holderElementOffset&&(L=L.clone(),L.range.start.path[0]++,L.range.end.path[0]++);const z=w(L.range.getDifference(D)),$=L.range.getIntersection(D);return null!==z&&(z.start=z.start._getTransformedByDeletion(I.sourcePosition,I.howMany),z.end=z.end._getTransformedByDeletion(I.sourcePosition,I.howMany),q=z._getTransformedByInsertion(I.getMovedRangeStart(),I.howMany,!0,!1).reverse()),null!==$&&($.start=$.start._getCombined(I.sourcePosition,I.getMovedRangeStart()),$.end=$.end._getCombined(I.sourcePosition,I.getMovedRangeStart()),q.push($)),q.map((K)=>{return new T.a(K,L.key,L.oldValue,L.newValue,L.baseVersion)})}},RootAttributeOperation:{InsertOperation:u,AttributeOperation:u,RootAttributeOperation(L,I,D){return L.root!==I.root||L.key!==I.key||(L.newValue===I.newValue||D)&&L.newValue!==I.newValue?[L.clone()]:[new R.a(L.baseVersion)]},RenameOperation:u,MarkerOperation:u,MoveOperation:u},RenameOperation:{InsertOperation(L,I){const D=L.clone();return D.position=D.position._getTransformedByInsertion(I.position,I.nodes.maxOffset,!0),[D]},AttributeOperation:u,RootAttributeOperation:u,RenameOperation(L,I,D){const q=L.clone();if(L.position.isEqual(I.position))if(D)q.oldName=I.newName;else return[new R.a(L.baseVersion)];return[q]},MarkerOperation:u,MoveOperation(L,I){const D=L.clone(),q=D.position.isEqual(I.sourcePosition);return D.position=D.position._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,!0,q),[D]}},MarkerOperation:{InsertOperation(L,I){const D=L.clone();return D.oldRange&&(D.oldRange=D.oldRange._getTransformedByInsertion(I.position,I.nodes.maxOffset,!1,!1)[0]),D.newRange&&(D.newRange=D.newRange._getTransformedByInsertion(I.position,I.nodes.maxOffset,!1,!1)[0]),[D]},AttributeOperation:u,RootAttributeOperation:u,RenameOperation:u,MarkerOperation(L,I,D){const q=L.clone();if(L.name==I.name)if(D)q.oldRange=I.newRange;else return[new R.a(L.baseVersion)];return[q]},MoveOperation(L,I){const D=L.clone();if(D.oldRange){const q=D.oldRange._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany);D.oldRange=F.a.createFromRanges(q)}if(D.newRange){const q=D.newRange._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany);D.newRange=F.a.createFromRanges(q)}return[D]}},MoveOperation:{InsertOperation(L,I,D){let q=F.a.createFromPositionAndShift(L.sourcePosition,L.howMany);q=q._getTransformedByInsertion(I.position,I.nodes.maxOffset,!1,L.isSticky)[0];let z=new L.constructor(q.start,q.end.offset-q.start.offset,L instanceof V.a?L.baseVersion:L.targetPosition._getTransformedByInsertion(I.position,I.nodes.maxOffset,!D),L instanceof V.a?void 0:L.baseVersion);return z.isSticky=L.isSticky,z._holderElementOffset=L._holderElementOffset,[z]},AttributeOperation:u,RootAttributeOperation:u,RenameOperation:u,MarkerOperation:u,MoveOperation(L,I,D){if(h(L,I)&&h(I,L))return[I.getReversed()];if(L instanceof V.a&&I instanceof V.a){const J=L.targetPosition.path[0],Y=I.targetPosition.path[0];J>=Y&&D&&(L=L.clone(),L.targetPosition.path[0]++)}L instanceof V.a&&!(I instanceof V.a)?D=!0:!(L instanceof V.a)&&I instanceof V.a&&(D=!1);const q=F.a.createFromPositionAndShift(L.sourcePosition,L.howMany),z=F.a.createFromPositionAndShift(I.sourcePosition,I.howMany);let $=[],K=w(q.getDifference(z));K&&(K.start=K.start._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,!L.isSticky,!1),K.end=K.end._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,L.isSticky,!1),$.push(K));const H=q.getIntersection(z);let U=s.i(N.a)(L.sourcePosition.getParentPath(),I.sourcePosition.getParentPath()),W=q.containsPosition(I.targetPosition)||q.start.isEqual(I.targetPosition)&&L.isSticky||q.end.isEqual(I.targetPosition)&&L.isSticky,Z=z.containsRange(q)&&(z.containsPosition(L.targetPosition)||z.start.isEqual(L.targetPosition)||z.end.isEqual(L.targetPosition));if(null!==H&&('extension'===U||'same'===U&&D||Z)&&!W&&(H.start=H.start._getCombined(I.sourcePosition,I.getMovedRangeStart()),H.end=H.end._getCombined(I.sourcePosition,I.getMovedRangeStart()),K&&q.start.isBefore(z.start)?$.push(H):$.unshift(H)),0===$.length)return L instanceof V.a?(L=L.clone(),L.howMany=0,L.sourcePosition=I.targetPosition,[L]):[new R.a(L.baseVersion)];let G=L.targetPosition._getTransformedByMove(I.sourcePosition,I.targetPosition,I.howMany,!D,I.isSticky||Z);return $.reverse().map((J)=>{let Y=new L.constructor(J.start,J.end.offset-J.start.offset,L instanceof V.a?L.baseVersion:G,L instanceof V.a?void 0:L.baseVersion);return Y.isSticky=L.isSticky,Y._holderElementOffset=L._holderElementOffset,Y})}}}},function(o,r,s){'use strict';var d=s(5);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{constructor(f,h,w='main'){super(h),this._doc=f,this.rootName=w}get document(){return this._doc}is(f,h){return h?'rootElement'==f&&h==this.name||super.is(f,h):'rootElement'==f||super.is(f)}toJSON(){return this.rootName}}r.a=u},function(o,r,s){'use strict';function d(E,O,V){for(let R=V.length-1,F=O.length-1;0<=R&&0<=F;){const N=O[F];if(!E.hasItem(N))return!1;const M=E._extensionChains.get(N);if(M.includes(V[R]))R--,F--;else return!1}return!0}var u=s(1),f=s(5),h=s(94),w=s(11),C=s(147),T=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class P{constructor(){this.objects=new Set,this.limits=new Set,this._items=new Map,this._extensionChains=new Map,this.registerItem('$root'),this.registerItem('$block'),this.registerItem('$inline'),this.registerItem('$text','$inline'),this.allow({name:'$block',inside:'$root'}),this.allow({name:'$inline',inside:'$block'}),this.registerItem('$clipboardHolder','$root'),this.allow({name:'$inline',inside:'$clipboardHolder'})}allow(E){this._getItem(E.name).allow(P._normalizeQueryPath(E.inside),E.attributes)}disallow(E){this._getItem(E.name).disallow(P._normalizeQueryPath(E.inside),E.attributes)}requireAttributes(E,O){this._getItem(E).requireAttributes(O)}check(E){if(!this.hasItem(E.name))return!1;s.i(w.a)(E.attributes)?0===E.attributes.length&&E.attributes.push(void 0):E.attributes=[E.attributes];const O=P._normalizeQueryPath(E.inside),V=this._extensionChains.get(E.name).map((R)=>{return this._getItem(R)});if(!this._getItem(E.name)._checkRequiredAttributes(E.attributes))return!1;for(let R of E.attributes)for(let F of V)if(F._hasMatchingPath('disallow',O,R))return!1;for(let R of E.attributes){let F=!1;for(let N of V)if(N._hasMatchingPath('allow',O,R)){F=!0;break}if(!F)return!1}return!0}hasItem(E){return this._items.has(E)}registerItem(E,O){if(this.hasItem(E))throw new T.a('model-schema-item-exists: Item with specified name already exists in schema.');if(!!O&&!this.hasItem(O))throw new T.a('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(E,new S(this));const V=this.hasItem(O)?this._extensionChains.get(O).concat(E):[E];this._extensionChains.set(E,V)}itemExtends(E,O){if(!this.hasItem(E)||!this.hasItem(O))throw new T.a('model-schema-no-item: Item with specified name does not exist in schema.');const V=this._extensionChains.get(E);return V.some((R)=>R==O)}_getItem(E){if(!this.hasItem(E))throw new T.a('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(E)}static _normalizeQueryPath(E){let O=[];if(s.i(w.a)(E))for(let V of E)V instanceof f.a?O.push(V.name):s.i(C.a)(V)&&O.push(V);else if(E instanceof u.a){for(let V=E.parent;null!==V;)O.push(V.name),V=V.parent;O.reverse()}else s.i(C.a)(E)&&(O=E.split(' '));return O}}r.a=P;class S{constructor(E){this._schema=E,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(E,O){this._addPath('_allowed',E,O)}disallow(E,O){this._addPath('_disallowed',E,O)}requireAttributes(E){this._requiredAttributes.push(E)}_addPath(E,O,V){O=O.slice(),s.i(w.a)(V)||(V=[V]);for(let R of V)this[E].push({path:O,attribute:R})}_getPaths(E,O){const V='allow'===E?this._allowed:this._disallowed,R=[];for(let F of V)F.attribute===O&&R.push(F.path);return R}_checkRequiredAttributes(E){let O=!0;for(let V of this._requiredAttributes){O=!0;for(let R of V)if(-1==E.indexOf(R)){O=!1;break}if(O)break}return O}_hasMatchingPath(E,O,V){const R=this._getPaths(E,V);for(const F of R)if(d(this._schema,O,F))return!0;return!1}toJSON(){const E=s.i(h.a)(this);return E._schema='[model.Schema]',E}}},function(o,r,s){'use strict';var d=s(75),u=s(343),f=s(164),h=s(168),w=s(60),C=s(57),T=s(167),P=s(342),S=s(339),E=s(340),O=s(338),V=s(4),R=s(31);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class F{constructor(){this.domRoots=new Map,this.selection=new d.a,this.domConverter=new f.a,this.roots=new Map,this.set('isFocused',!1),this.renderer=new u.a(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this,'isFocused'),this._observers=new Map,this.addObserver(T.a),this.addObserver(P.a),this.addObserver(S.a),this.addObserver(E.a),this.addObserver(O.a),s.i(w.h)(this),this.on('render',()=>{this.disableObservers(),this.renderer.render(),this.enableObservers()})}addObserver(N){let M=this._observers.get(N);if(M)return M;M=new N(this),this._observers.set(N,M);for(let[L,I]of this.domRoots)M.observe(I,L);return M.enable(),M}getObserver(N){return this._observers.get(N)}createRoot(N,M='main'){const L='string'==typeof N?N:N.tagName,I=new h.a(L.toLowerCase(),M);return I.document=this,this.roots.set(M,I),I.on('change:children',(D,q)=>this.renderer.markToSync('children',q)),I.on('change:attributes',(D,q)=>this.renderer.markToSync('attributes',q)),I.on('change:text',(D,q)=>this.renderer.markToSync('text',q)),this.domConverter.isElement(N)&&this.attachDomRoot(N,M),I}attachDomRoot(N,M='main'){const L=this.getRoot(M);this.domRoots.set(M,N),this.domConverter.bindElements(N,L),this.renderer.markToSync('children',L),this.renderer.domDocuments.add(N.ownerDocument);for(let I of this._observers.values())I.observe(N,M)}getRoot(N='main'){return this.roots.get(N)}getDomRoot(N='main'){return this.domRoots.get(N)}render(){this.fire('render')}focus(){if(!this.isFocused){const N=this.selection.editableElement;N?(this.domConverter.focus(N),this.render()):C.a.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}disableObservers(){for(let N of this._observers.values())N.disable()}enableObservers(){for(let N of this._observers.values())N.enable()}destroy(){for(let N of this._observers.values())N.destroy()}}r.a=F,s.i(V.a)(F,R.a)},function(o,r,s){'use strict';var d=s(61);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{constructor(f){super(f),this.domEventType='click'}onDomEvent(f){this.fire(f.type,f)}}r.a=u},function(o,r,s){'use strict';function d(T){return T==h.d.arrowright||T==h.d.arrowleft||T==h.d.arrowup||T==h.d.arrowdown}var u=s(50),f=s(75),h=s(22),w=s(141);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends u.a{constructor(T){super(T),this._fireSelectionChangeDoneDebounced=s.i(w.a)((P)=>this.document.fire('selectionChangeDone',P),200)}observe(){const T=this.document;T.on('keydown',(P,S)=>{const E=T.selection;E.isFake&&d(S.keyCode)&&this.isEnabled&&(S.preventDefault(),this._handleSelectionMove(S.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(T){const P=this.document.selection,S=f.a.createFromSelection(P);S.setFake(!1),(T==h.d.arrowleft||T==h.d.arrowup)&&S.collapseToStart(),(T==h.d.arrowright||T==h.d.arrowdown)&&S.collapseToEnd();const E={oldSelection:P,newSelection:S,domSelection:null};this.document.fire('selectionChange',E),this._fireSelectionChangeDoneDebounced(E)}}r.a=C},function(o,r,s){'use strict';var d=s(61);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{constructor(f){super(f),this.domEventType=['focus','blur'],this.useCapture=!0,f.on('focus',()=>{f.isFocused=!0}),f.on('blur',(h,w)=>{const C=f.selection.editableElement;(null===C||C===w.target)&&(f.isFocused=!1,f.render())})}onDomEvent(f){this.fire(f.type,f)}}r.a=u},function(o,r,s){'use strict';var d=s(61),u=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h),this.domEventType='keydown'}onDomEvent(h){this.fire('keydown',h,{keyCode:h.keyCode,altKey:h.altKey,ctrlKey:h.ctrlKey||h.metaKey,shiftKey:h.shiftKey,get keystroke(){return s.i(u.c)(this)}})}}r.a=f},function(o,r,s){'use strict';var d=s(61);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u extends d.a{constructor(f){super(f),this.domEventType='mousedown'}onDomEvent(f){this.fire(f.type,f)}}r.a=u},function(o,r,s){'use strict';var d=s(50),u=s(167),f=s(57),h=s(141);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{constructor(C){super(C),this.mutationObserver=C.getObserver(u.a),this.document=C,this.selection=C.selection,this.domConverter=C.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=s.i(h.a)((T)=>this.document.fire('selectionChangeDone',T),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),2e3)}observe(C){const T=C.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(C){if(this.isEnabled&&this.document.isFocused){this.mutationObserver.flush();const T=C.defaultView.getSelection(),P=this.domConverter.domSelectionToView(T);if(!this.selection.isEqual(P)){if(this._isInfiniteLoop(P))return void f.a.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');const S={oldSelection:this.selection,newSelection:P,domSelection:T};this.document.fire('selectionChange',S),this._fireSelectionChangeDoneDebounced(S)}}}_isInfiniteLoop(C){return this._lastSelection&&this._lastButOneSelection&&(C.isEqual(this._lastSelection)||C.isEqual(this._lastButOneSelection))?this._loopbackCounter++:(this._lastButOneSelection=this._lastSelection,this._lastSelection=C,this._loopbackCounter=0),!!(50N.name),F=O.getAttributeKeys();for(let N of F)V.setAttribute(N,O.getAttribute(N));for(let N of R)O.hasAttribute(N)||V.removeAttribute(N)}_updateChildren(O,V){const F=this.domConverter,N=F.getCorrespondingDom(O),M=N.ownerDocument,L=V.inlineFillerPosition,I=N.childNodes,D=Array.from(F.viewChildrenToDom(O,M,{bind:!0}));if(L&&L.parent==O){const $=D[L.offset];this.domConverter.isText($)?$.data=f.i+$.data:D.splice(L.offset,0,M.createTextNode(f.i))}const q=s.i(w.a)(I,D,function($,K){if($===K)return!0;return F.isText($)&&F.isText(K)?$.data===K.data:s.i(f.e)($,F.blockFiller)&&s.i(f.e)(K,F.blockFiller)});let z=0;for(let $ of q)'insert'===$?(s.i(C.a)(N,z,D[z]),z++):'delete'===$?s.i(T.a)(I[z]):z++}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const O=this.domConverter.getCorrespondingDomElement(this.selection.editableElement);this.isFocused&&O&&(this.selection.isFake?this._updateFakeSelection(O):(this._removeFakeSelection(),this._updateDomSelection(O)))}_updateFakeSelection(O){const V=O.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=V.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(V.createTextNode('\\xA0'))),this._fakeSelectionContainer.parentElement||O.appendChild(this._fakeSelectionContainer);const R=this.selection.fakeSelectionLabel||'\\xA0';this._fakeSelectionContainer.firstChild.data=R;const F=V.getSelection();F.removeAllRanges();const N=new Range;N.selectNodeContents(this._fakeSelectionContainer),F.addRange(N),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(O){const V=O.ownerDocument.defaultView.getSelection(),R=V&&this.domConverter.domSelectionToView(V);if(!(R&&this.selection.isEqual(R))){const F=this.domConverter.viewPositionToDom(this.selection.anchor),N=this.domConverter.viewPositionToDom(this.selection.focus);V.collapse(F.parent,F.offset),V.extend(N.parent,N.offset)}}_removeDomSelection(){for(let O of this.domDocuments){const V=O.getSelection();if(V.rangeCount){const R=O.activeElement,F=this.domConverter.getCorrespondingViewElement(R);R&&F&&O.getSelection().removeAllRanges()}}}_removeFakeSelection(){const O=this._fakeSelectionContainer;O&&O.remove()}_updateFocus(){if(this.isFocused){const O=this.selection.editableElement;O&&this.domConverter.focus(O)}}}r.a=E,s.i(h.a)(E,P.a)},function(o,r,s){'use strict';var d=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class u{constructor(f,h,w){if(this.textNode=f,0>h||h>f.data.length)throw new d.a('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>w||h+w>f.data.length)throw new d.a('view-textproxy-wrong-length: Given length value is incorrect.');this.data=f.data.substring(h,h+w),this.offsetInText=h}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(f){return'textProxy'==f}getAncestors(f={includeNode:!1,parentFirst:!1}){const h=[];for(let w=f.includeNode?this.textNode:this.parent;null!==w;)h[f.parentFirst?'push':'unshift'](w),w=w.parent;return h}}r.a=u},function(o,r,s){'use strict';var d=s(2),u=s(346),f=s(347);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{init(){const w=this.editor,C=w.editing.view;C.addObserver(f.a),w.commands.set('enter',new u.a(w)),this.listenTo(C,'enter',(T,P)=>{w.execute('enter'),P.preventDefault()},{priority:'low'})}}r.a=h},function(o,r,s){'use strict';function d(C,T,P,S){const E=P.isCollapsed,O=P.getFirstRange(),V=O.start.parent,R=O.end.parent;if(!(S.limits.has(V.name)||S.limits.has(R.name))){if(V.root==V)return void(E||C.deleteContent(P,T));if(E)u(T,P,O.start);else{const F=O.start.isAtStart&&O.end.isAtEnd;C.deleteContent(P,T,{merge:F}),F||(V==R?u(T,P,P.focus):P.collapse(R))}}}function u(C,T,P){if(P.isAtEnd){const S=P.parent,E=new S.constructor(S.name,S.getAttributes());C.insert(h.a.createAfter(P.parent),E)}else C.split(P);T.collapse(P.parent.nextSibling)}var f=s(12),h=s(1);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends f.a{_doExecute(){const C=this.editor.document,T=C.batch();C.enqueueChanges(()=>{d(this.editor.data,T,C.selection,C.schema),this.fire('afterExecute',{batch:T})})}}r.a=w},function(o,r,s){'use strict';var d=s(50),u=s(114),f=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{constructor(w){super(w),w.on('keydown',(C,T)=>{this.isEnabled&&T.keyCode==f.d.enter&&w.fire('enter',new u.a(w,T.domEvent))})}observe(){}}r.a=h},function(o,r,s){'use strict';function d(O,V){return Array.prototype.concat(...O.map((R)=>[R,V]))}var u=s(116),f=s(350),h=s(2),w=s(399),C=s(390),T=s(78),P=s(291),S=s.n(P);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class E extends h.a{static get requires(){return[u.a,f.a]}init(){const O=this.editor,V=new T.a,R=this._getLocalizedOptions(),F=[],N=O.t;let M;for(let I of R){const D=O.commands.get(I.modelElement),q=new w.a({commandName:I.modelElement,label:I.title,class:I.class});q.bind('isActive').to(D,'value'),V.add(q),F.push(D),M||'paragraph'!=I.modelElement||(M=I)}const L=new w.a({withText:!0,items:V,tooltip:N('Heading')});L.bind('isEnabled').to(...d(F,'isEnabled'),(...I)=>I.some((D)=>D)),L.bind('label').to(...d(F,'value'),(...I)=>{const D=I.findIndex((q)=>q);return(R[D]||M).title}),O.ui.componentFactory.add('headings',(I)=>{const D=s.i(C.a)(L,I);return this.listenTo(D,'execute',(q)=>{O.execute(q.source.commandName),O.editing.view.focus()}),D})}_getLocalizedOptions(){const O=this.editor,V=O.t,R={Paragraph:V('Paragraph'),'Heading 1':V('Heading 1'),'Heading 2':V('Heading 2'),'Heading 3':V('Heading 3')};return O.config.get('heading.options').map((F)=>{const N=R[F.title];return N&&N!=F.title&&(F=Object.assign({},F,{title:N})),F})}}r.a=E},function(o,r,s){'use strict';var d=s(3),u=s(12),f=s(59);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends u.a{constructor(w,C){super(w),Object.assign(this,C),this.set('value',!1),this.listenTo(w.document,'changesDone',()=>this._updateValue())}_doExecute(w={}){const C=this.editor,T=C.document,P=this.value;T.enqueueChanges(()=>{const S=w.batch||T.batch();for(let E of T.selection.getSelectedBlocks())if(!P)E.is(this.modelElement)||S.rename(E,this.modelElement);else if(E.is(this.modelElement)){const O=new f.a;O.addRange(d.a.createIn(E)),C.execute('paragraph',{selection:O,batch:S})}})}_updateValue(){const w=this.editor.document.selection.getSelectedBlocks().next().value;w&&(this.value=w.is(this.modelElement))}}r.a=h},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(116),w=s(349);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const C='paragraph';class T extends d.a{constructor(P){super(P),P.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[h.a]}init(){const P=this.editor,S=P.data,E=P.editing,O=P.config.get('heading.options');for(let V of O)V.modelElement!==C&&(P.document.schema.registerItem(V.modelElement,'$block'),s.i(u.a)().for(S.modelToView,E.modelToView).fromElement(V.modelElement).toElement(V.viewElement),s.i(f.a)().for(S.viewToModel).fromElement(V.viewElement).toElement(V.modelElement),P.commands.set(V.modelElement,new w.a(P,V)))}afterInit(){const P=this.editor,S=P.commands.get('enter'),E=P.config.get('heading.options');S&&this.listenTo(S,'afterExecute',(O,V)=>{const R=P.document.selection.getFirstPosition().parent,F=V.batch,N=E.some((M)=>R.is(M.modelElement));N&&!R.is(C)&&0===R.childCount&&F.rename(R,C)})}}r.a=T},function(o,r,s){'use strict';var d=s(2),u=s(170),f=s(364),h=s(360),w=s(294),C=s.n(w);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T extends d.a{static get requires(){return[u.a,f.a,h.a]}}r.a=T},function(o,r,s){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function f(T,P,S,E){const O=T.name.split(':'),V=O[0]+':'+O[1];if(S.consume(P.item,V)){const R=E.mapper.toViewElement(P.item),F=R.getChild(0);'removeAttribute'==O[0]?F.removeAttribute(P.attributeKey):F.setAttribute(P.attributeKey,P.attributeNewValue)}}var h=s(5),w=s(1),C=s(20);r.b=function(){return(T,P,S,E)=>{const O=P.input;if(S.test(O,{name:!0,class:'image'})&&E.schema.check({name:'image',inside:P.context,attributes:'src'})){const V=O.getChild(0);if(V&&'img'==V.name&&S.test(V,{name:!0,attribute:'src'})){S.consume(O,{name:!0,class:'image'}),S.consume(V,{name:!0,attribute:'src'});const R=new h.a('image',{src:V.getAttribute('src')});S.consume(V,{attribute:['alt']})&&R.setAttribute('alt',V.getAttribute('alt')),P.context.push(R);const F=E.convertChildren(O,S,P),N=w.a.createAt(R,'end');C.a.insert(N,F),P.context.pop(),P.output=R}}}},r.a=function(T,P){for(let S of T)S.on(`addAttribute:${P}:image`,f),S.on(`changeAttribute:${P}:image`,f),S.on(`removeAttribute:${P}:image`,f)}},function(o,r,s){'use strict';var d=s(2),u=s(354),f=s(292),h=s.n(f);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{static get requires(){return[u.a]}}r.a=w},function(o,r,s){'use strict';function d(D,q,z,$){if('insert'===q){const K=new T.a({boundaries:z.range,ignoreElementEnd:!0});for(let H of K){const U=H.item;'elementStart'==H.type&&s.i(M.b)(U)&&!s.i(L.c)(U)&&$.document.enqueueChanges(()=>{$.insert(R.a.createAt(U,'end'),new P.a('caption'))})}}}function u(D,q){return(z,$)=>{if(h($.item)){const K=$.item.parent,H=K.parent,U=q.toViewElement(H);let W=q.toViewElement(K);U&&!W&&(W=D(),w(W,K,U,q))}}}function f(D){return(q,z,$,K)=>{const H=z.item;if(s.i(M.b)(H.parent)&&0this._updateView(),{priority:'high'})}_removeEmptyCaption(){const D=this.editor.editing.view.selection,q=this._lastSelectedEditable;if(!q)return;if(D.editableElement===q)return;const z=D.getSelectedElement();if(z&&s.i(M.a)(z)){const $=q.findAncestor((K)=>K==z);if($)return}if(0===q.childCount){const $=this.editor.editing.mapper;V.a.remove(O.a.createOn(q)),$.unbindViewElement(q)}}_addCaptionWhenSelected(){const D=this.editor.editing,q=D.view.selection,z=q.getSelectedElement(),$=D.mapper;if(z&&s.i(M.a)(z)){const K=$.toModelElement(z),H=s.i(L.c)(K);let U=$.toViewElement(H);U||(U=this._createCaption(),w(U,H,z,$)),this._lastSelectedEditable=U}}_updateView(){const D=this.editor.editing.view.selection;this._removeEmptyCaption(),this._addCaptionWhenSelected();const q=D.editableElement;q&&s.i(L.d)(D.editableElement)&&(this._lastSelectedEditable=D.editableElement)}}r.a=I},function(o,r,s){'use strict';var w=s(73),C=s(5);r.a=function(P){return()=>{const S=new w.a('figcaption',{contenteditable:!0});return S.document=P,S.setCustomProperty(T,!0),S.on('change:isFocused',(E,O,V)=>{V?S.addClass('focused'):S.removeClass('focused')}),S}},r.d=function(P){return!!P.getCustomProperty(T)},r.c=function(P){for(let S of P.getChildren())if(S instanceof C.a&&'caption'==S.name)return S;return null},r.b=function(P){const S=P.parent;return'figcaption'==P.name&&S&&'figure'==S.name&&S.hasClass('image')?{name:!0}:null};/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const T=Symbol('imageCaption')},function(o,r,s){'use strict';var d=s(2),u=s(359),f=s(26);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{static get requires(){return[u.a]}init(){const w=this.editor.config.get('image.styles');for(let T of w)this._createButton(T);const C=this.editor.config.get('image.defaultToolbar');C&&(C.length&&C.push('|'),w.forEach((T)=>C.push(T.name)))}_createButton(w){const C=this.editor,T=C.commands.get(w.name);C.ui.componentFactory.add(w.name,(P)=>{const S=new f.a(P);return S.set({label:w.title,icon:w.icon,tooltip:!0}),S.bind('isEnabled').to(T,'isEnabled'),S.bind('isOn').to(T,'value'),this.listenTo(S,'execute',()=>C.execute(w.name)),S})}}r.a=h},function(o,r,s){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function f(P,S,E,O){const V=S.input,R=S.output;if(E.test(V,{class:P.className})&&s.i(T.b)(R)){const F=[...R.getAttributeKeys(),'imageStyle'];O.schema.check({name:'image',inside:S.context,attributes:F})&&(E.consume(V,{class:P.className}),R.setAttribute('imageStyle',P.value))}}function h(P,S){for(let E of S)if(E.value===P)return E}function w(P,S,E){return S&&('changeAttribute'==P||'removeAttribute'==P)&&(E.removeClass(S.className),!0)}function C(P,S,E){return S&&('addAttribute'==P||'changeAttribute'==P)&&(E.addClass(S.className),!0)}var T=s(40);r.a=function(P){return(S,E,O,V)=>{const R=S.name.split(':')[0],F=R+':imageStyle';if(O.test(E.item,F)){const N=h(E.attributeNewValue,P),M=h(E.attributeOldValue,P),L=V.mapper.toViewElement(E.item);(w(R,M,L)||C(R,N,L))&&O.consume(E.item,F)}}},r.b=function(P){const S=P.filter((E)=>null!==E.value);return(E,O,V,R)=>{for(let F of S)f(F,O,V,R)}}},function(o,r,s){'use strict';var d=s(12),u=s(40);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h,w){super(h),this.set('value',!1),this.style=w,this.listenTo(h.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const h=this.editor.document,w=h.selection.getSelectedElement();return w?void(null===this.style.value?this.value=!w.hasAttribute('imageStyle'):this.value=w.getAttribute('imageStyle')==this.style.value):void(this.value=!1)}_checkEnabled(){const h=this.editor.document.selection.getSelectedElement();return s.i(u.b)(h)}_doExecute(h={}){if(this.value)return;const w=this.editor,C=w.document,T=C.selection,P=T.getSelectedElement();C.enqueueChanges(()=>{const S=h.batch||C.batch();S.setAttribute(P,'imageStyle',this.style.value)})}}r.a=f},function(o,r,s){'use strict';var d=s(2),u=s(358),f=s(170),h=s(357),w=s(282),C=s.n(w),T=s(283),P=s.n(T);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class S extends d.a{static get requires(){return[f.a]}init(){const E=this.editor,O=E.t,V=E.document,R=V.schema,F=E.data,N=E.editing;E.config.define('image.styles',[{name:'imageStyleFull',title:O('Full size image'),icon:C.a,value:null},{name:'imageStyleSide',title:O('Side image'),icon:P.a,value:'side',className:'image-style-side'}]);const M=E.config.get('image.styles');R.allow({name:'image',attributes:'imageStyle',inside:'$root'});const L=s.i(h.a)(M);N.modelToView.on('addAttribute:imageStyle:image',L),F.modelToView.on('addAttribute:imageStyle:image',L),N.modelToView.on('changeAttribute:imageStyle:image',L),F.modelToView.on('changeAttribute:imageStyle:image',L),N.modelToView.on('removeAttribute:imageStyle:image',L),F.modelToView.on('removeAttribute:imageStyle:image',L),F.viewToModel.on('element:figure',s.i(h.b)(M),{priority:'low'});for(let I of M)E.commands.set(I.name,new u.a(E,I))}}r.a=S},function(o,r,s){'use strict';var d=s(2),u=s(26),f=s(362),h=s(385),w=s(178),C=s(172),T=s(363),P=s(171),S=s(281),E=s.n(S),O=s(293),V=s.n(O);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class R extends d.a{static get requires(){return[f.a]}init(){this._createButton();const F=this.editor.config.get('image.defaultToolbar');return F&&(F.length&&F.push('|'),F.push('imageTextAlternative')),this._createBalloonPanel().then((N)=>{this.balloonPanel=N,this.form=N.content.get(0)})}_createButton(){const F=this.editor,N=F.commands.get('imageTextAlternative'),M=F.t;F.ui.componentFactory.add('imageTextAlternative',(L)=>{const I=new u.a(L);return I.set({label:M('Change image text alternative'),icon:E.a,tooltip:!0}),I.bind('isEnabled').to(N,'isEnabled'),this.listenTo(I,'execute',()=>this._showBalloonPanel()),I})}_createBalloonPanel(){const F=this.editor,N=new P.a(F),M=new T.a(F.locale);this.listenTo(M,'submit',()=>{F.execute('imageTextAlternative',{newValue:M.lebeledInput.inputView.element.value}),this._hideBalloonPanel()});const L=F.plugins.get(C.a);return L&&this.listenTo(N,'change:isVisible',()=>{N.isVisible?(L.hide(),L.isEnabled=!1):(L.show(),L.isEnabled=!0)}),this.listenTo(M,'cancel',()=>this._hideBalloonPanel()),s.i(h.a)({emitter:N,activator:()=>N.isVisible,callback:()=>this._hideBalloonPanel()}),s.i(w.a)({emitter:N,activator:()=>N.isVisible,contextElement:N.element,callback:()=>this._hideBalloonPanel()}),Promise.all([N.content.add(M),F.ui.view.body.add(N)]).then(()=>N)}_showBalloonPanel(){const F=this.editor,N=F.commands.get('imageTextAlternative');this.form.lebeledInput.value=N.value||'',this.balloonPanel.attach(),this.form.lebeledInput.select()}_hideBalloonPanel(){const F=this.editor;this.balloonPanel.detach(),F.editing.view.focus()}}r.a=R},function(o,r,s){'use strict';var d=s(12),u=s(40);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h),this.set('value',!1),this.listenTo(h.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const h=this.editor.document,w=h.selection.getSelectedElement();this.value=s.i(u.b)(w)&&w.hasAttribute('alt')&&w.getAttribute('alt')}_checkEnabled(){const h=this.editor.document.selection.getSelectedElement();return s.i(u.b)(h)}_doExecute(h){const w=this.editor,C=w.document,T=C.selection.getSelectedElement();C.enqueueChanges(()=>{const P=h.batch||C.batch();P.setAttribute(T,'alt',h.newValue)})}}r.a=f},function(o,r,s){'use strict';var d=s(361),u=s(2);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends u.a{init(){this.editor.commands.set('imageTextAlternative',new d.a(this.editor))}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(26),f=s(6),h=s(181),w=s(180),C=s(179);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T extends d.a{constructor(P){super(P);const S=this.locale.t;this.lebeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(S('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(S('Cancel'),'cancel'),f.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new f.a({tag:'form',attributes:{class:['cke-text-alternative-form']},children:[this.lebeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]}),s.i(C.a)({view:this})}_createButton(P,S){const E=new u.a(this.locale);return E.label=P,E.withText=!0,S&&E.delegate('execute').to(this,S),E}_createLabeledInputView(){const P=this.locale.t,S=new h.a(this.locale,w.a);return S.label=P('Text alternative'),S}}r.a=T},function(o,r,s){'use strict';function d(N){return N==R.d.arrowright||N==R.d.arrowleft||N==R.d.arrowup||N==R.d.arrowdown}function u(N){return N==R.d.delete||N==R.d.backspace}function f(N){for(;N;){if(N instanceof E.a&&!(N instanceof O.a))return!0;N=N.parent}return!1}var h=s(2),w=s(173),C=s(341),T=s(3),P=s(59),S=s(5),E=s(73),O=s(168),V=s(115),R=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class F extends h.a{static get requires(){return[w.a]}init(){const N=this.editor.editing.view;N.addObserver(C.a),this.listenTo(N,'mousedown',(...M)=>this._onMousedown(...M)),this.listenTo(N,'keydown',(...M)=>this._onKeydown(...M),{priority:'high'})}_onMousedown(N,M){const L=this.editor,I=L.editing.view;let D=M.target;if(f(D))return;if(!s.i(V.b)(D)&&(D=D.findAncestor(V.b),!D))return;M.preventDefault(),I.isFocused||I.focus();const q=L.editing.mapper.toModelElement(D);L.document.enqueueChanges(()=>{this._setSelectionOverElement(q)})}_onKeydown(N,M){const L=M.keyCode,I=L==R.d.delete||L==R.d.arrowdown||L==R.d.arrowright;(u(L)&&this._handleDelete(I)||d(L)&&this._handleArrowKeys(I))&&(M.preventDefault(),N.stop())}_handleDelete(N){const M=this.editor.document,L=M.selection;if(!L.isCollapsed)return;const I=this._getObjectElementNextToSelection(N);if(I)return M.enqueueChanges(()=>{const D=L.anchor.parent;if(D.isEmpty){const q=M.batch();q.remove(D)}this._setSelectionOverElement(I)}),!0}_handleArrowKeys(N){const M=this.editor.document,L=M.schema,I=M.selection,D=I.getSelectedElement();if(D&&L.objects.has(D.name)){const z=N?I.getLastPosition():I.getFirstPosition(),$=M.getNearestSelectionRange(z,N?'forward':'backward');return $&&M.enqueueChanges(()=>{I.setRanges([$])}),!0}if(!I.isCollapsed)return;const q=this._getObjectElementNextToSelection(N);if(q instanceof S.a&&M.schema.objects.has(q.name))return M.enqueueChanges(()=>{this._setSelectionOverElement(q)}),!0}_setSelectionOverElement(N){this.editor.document.selection.setRanges([T.a.createOn(N)])}_getObjectElementNextToSelection(N){const M=this.editor.document,L=M.schema,I=M.selection,D=this.editor.data,q=P.a.createFromSelection(I);D.modifySelection(q,{direction:N?'forward':'backward'});const z=N?q.focus.nodeBefore:q.focus.nodeAfter;return z instanceof S.a&&L.objects.has(z.name)?z:null}}r.a=F},function(o,r,s){'use strict';function d(L){return L.parent.getAncestors().find((I)=>I instanceof w.a)}var u=s(2),f=s(337),h=s(367),w=s(175),C=s(178),T=s(26),P=s(182),S=s(368),E=s(284),O=s.n(E),V=s(285),R=s.n(V),F=s(295),N=s.n(F);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class M extends u.a{static get requires(){return[h.a]}init(){this.editor.editing.view.addObserver(f.a),this.balloonPanelView=this._createBalloonPanel(),this.formView=this._createForm(),this._createToolbarLinkButton(),this._createToolbarUnlinkButton()}_createToolbarLinkButton(){const L=this.editor,I=L.commands.get('link'),D=L.t;L.keystrokes.set('CTRL+K',()=>this._showPanel()),L.ui.componentFactory.add('link',(q)=>{const z=new T.a(q);return z.isEnabled=!0,z.label=D('Link'),z.icon=O.a,z.keystroke='CTRL+K',z.tooltip=!0,z.bind('isEnabled').to(I,'isEnabled'),this.listenTo(z,'execute',()=>this._showPanel()),z})}_createToolbarUnlinkButton(){const L=this.editor,I=L.t,D=L.commands.get('unlink');L.ui.componentFactory.add('unlink',(q)=>{const z=new T.a(q);return z.isEnabled=!1,z.label=I('Unlink'),z.icon=R.a,z.tooltip=!0,z.bind('isEnabled').to(D,'isEnabled'),this.listenTo(z,'execute',()=>L.execute('unlink')),z})}_createBalloonPanel(){const L=this.editor,I=L.editing.view,D=new P.a(L.locale);return D.maxWidth=300,L.ui.focusTracker.add(D.element),this.listenTo(I,'click',()=>{const q=I.selection,z=d(q.getFirstPosition());q.isCollapsed&&z&&(this._attachPanelToElement(),this.listenTo(I,'render',()=>{const $=d(q.getFirstPosition());q.isCollapsed&&z===$?this._attachPanelToElement(z):this._hidePanel()}),this.listenTo(D,'change:isVisible',()=>this.stopListening(I,'render')))}),L.keystrokes.set('Tab',(q,z)=>{D.isVisible&&!this.formView.focusTracker.isFocused&&(this.formView.focus(),z())}),L.keystrokes.set('Esc',(q,z)=>{D.isVisible&&(this._hidePanel(!0),z())}),s.i(C.a)({emitter:D,activator:()=>D.isVisible,contextElement:D.element,callback:()=>this._hidePanel()}),L.ui.view.body.add(D),D}_createForm(){const L=this.editor,I=new S.a(L.locale);return I.urlInputView.bind('value').to(L.commands.get('link'),'value'),this.listenTo(I,'submit',()=>{L.execute('link',I.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(I,'unlink',()=>{L.execute('unlink'),this._hidePanel(!0)}),I.keystrokes.set('Esc',(D,q)=>{this._hidePanel(!0),q()}),this.listenTo(I,'cancel',()=>this._hidePanel(!0)),this.balloonPanelView.content.add(I),I}_attachPanelToElement(L){const I=this.editor.editing.view,D=L||d(I.selection.getFirstPosition()),q=D?I.domConverter.getCorrespondingDomElement(D):I.domConverter.viewRangeToDom(I.selection.getFirstRange());this.balloonPanelView.attachTo({target:q,limiter:I.domConverter.getCorrespondingDomElement(I.selection.editableElement)})}_hidePanel(L){this.balloonPanelView.hide(),L&&this.editor.editing.view.focus()}_showPanel(){this._attachPanelToElement(),this.formView.urlInputView.select()}}r.a=M},function(o,r,s){'use strict';var d=s(12),u=s(24),f=s(3),h=s(152),w=s(153),C=s(174);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T extends d.a{constructor(P){super(P),this.set('value',void 0),this.listenTo(this.editor.document.selection,'change:attribute',()=>{this.value=this.editor.document.selection.getAttribute('linkHref')})}_checkEnabled(){const P=this.editor.document;return s.i(w.a)('linkHref',P.selection,P.schema)}_doExecute(P){const S=this.editor.document,E=S.selection;S.enqueueChanges(()=>{const O=S.batch();if(E.isCollapsed){const V=E.getFirstPosition(),R=V.parent;if(E.hasAttribute('linkHref')){const F=s.i(C.a)(E.getFirstPosition(),E.getAttribute('linkHref'));O.setAttribute(F,'linkHref',P),E.setRanges([F])}else if(S.schema.check({name:'$text',attributes:'linkHref',inside:R.name})){const F=new u.a(P,{linkHref:P});O.insert(V,F),E.setRanges([f.a.createOn(F)])}}else{const V=s.i(h.a)('linkHref',E.getRanges(),S.schema);for(let R of V)O.setAttribute(R,'linkHref',P)}})}}r.a=T},function(o,r,s){'use strict';var d=s(2),u=s(47),f=s(48),h=s(175),w=s(366),C=s(369);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class T extends d.a{init(){const P=this.editor,S=P.data,E=P.editing;P.document.schema.allow({name:'$inline',attributes:'linkHref'}),s.i(u.a)().for(S.modelToView,E.modelToView).fromAttribute('linkHref').toElement((O)=>new h.a('a',{href:O})),s.i(f.a)().for(S.viewToModel).fromElement('a').toAttribute((O)=>({key:'linkHref',value:O.getAttribute('href')})),P.commands.set('link',new w.a(P)),P.commands.set('unlink',new C.a(P))}}r.a=T},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(118),h=s(26),w=s(181),C=s(180),T=s(179),P=s(63),S=s(117),E=s(64);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class O extends d.a{constructor(V){super(V);const R=V.t;this.focusTracker=new P.a,this.keystrokes=new E.a,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(R('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(R('Cancel'),'cancel'),this.unlinkButtonView=this._createButton(R('Unlink'),'unlink'),this._focusables=new f.a,this._focusCycler=new S.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),u.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new u.a({tag:'form',attributes:{class:['ck-link-form']},children:[this.urlInputView,{tag:'div',attributes:{class:['ck-link-form__actions']},children:[this.saveButtonView,this.cancelButtonView,this.unlinkButtonView]}]}),s.i(T.a)({view:this});const F=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];F.forEach((N)=>{this._focusables.add(N),this.focusTracker.add(N.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const V=this.locale.t,R=new w.a(this.locale,C.a);return R.label=V('Link URL'),R}_createButton(V,R){const F=new h.a(this.locale);return F.label=V,F.withText=!0,R&&F.delegate('execute').to(this,R),F}}r.a=O},function(o,r,s){'use strict';var d=s(12),u=s(174);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h),this.listenTo(h.document.selection,'change:attribute',()=>this.refreshState())}_doExecute(){const h=this.editor.document,w=h.selection;h.enqueueChanges(()=>{const C=w.isCollapsed?[s.i(u.a)(w.getFirstPosition(),w.getAttribute('linkHref'))]:w.getRanges(),T=h.batch();for(let P of C)T.removeAttribute(P,'linkHref')})}_checkEnabled(){return this.editor.document.selection.hasAttribute('linkHref')}}r.a=f},function(o,r,s){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function O($,K){const H='numbered'==$.getAttribute('type')?'ol':'ul',U=new N.a,W=new I.a(H,null);return W.appendChildren(U),K.bindElements($,U),U}function V($,K){const H=K.getNext?'nextSibling':'previousSibling',U=!!K.checkAllSiblings,W=!!K.sameIndent,Z=!!K.biggerIndent,G=$.getAttribute('indent');for(let J=$[H],Y;J&&'listItem'==J.name;){if(Y=J.getAttribute('indent'),W&&G==Y||Z&&GY)return null;J=J[H]}return null}function R($,K){$&&K&&('ul'==$.name||'ol'==$.name)&&$.name==K.name&&z.a.mergeContainers(D.a.createAfter($))}function F($,K,H){const U=K.parent,W=V($,{sameIndent:!0,biggerIndent:!0});if(W){let X=H.toViewElement(W),Q=D.a.createAfter(X);z.a.breakContainer(Q)}const Z=V($,{sameIndent:!0,checkAllSiblings:!0});let G;if(Z){let X=H.toViewElement(Z),Q=D.a.createAfter(X);G=z.a.breakContainer(Q)}else{const X=$.previousSibling;G=X&&'listItem'==X.name?D.a.createAt(H.toViewElement(X),'end'):H.toViewPosition(L.a.createBefore($))}z.a.insert(G,U);const J=V($,{getNext:!0,biggerIndent:!0}),Y=H.toViewElement(J);if(Y){let X=q.a.createOn(Y.parent),Q=D.a.createAt(K,'end');z.a.move(X,Q)}R(U,U.nextSibling),R(U.previousSibling,U)}var N=s(375),M=s(5),L=s(1),I=s(39),D=s(25),q=s(34),z=s(77);r.d=function($,K,H,U){if(H.test(K.item,'insert')&&H.test(K.item,'addAttribute:type')&&H.test(K.item,'addAttribute:indent')){H.consume(K.item,'insert'),H.consume(K.item,'addAttribute:type'),H.consume(K.item,'addAttribute:indent');const W=K.item,Z=O(W,U.mapper);F(W,Z,U.mapper)}},r.e=function($,K,H,U){if(!H.consume(K.item,'changeAttribute:type'))return;const W=U.mapper.toViewElement(K.item);z.a.breakContainer(D.a.createBefore(W)),z.a.breakContainer(D.a.createAfter(W));let Z=W.parent;const G='numbered'==K.attributeNewValue?'ol':'ul';Z=z.a.rename(Z,G),R(Z,Z.nextSibling),R(Z.previousSibling,Z)},r.f=function($,K,H,U){if(H.consume(K.item,'remove')){const W=U.mapper.toViewElement(K.item);z.a.breakContainer(D.a.createBefore(W)),z.a.breakContainer(D.a.createAfter(W));const Z=W.parent;z.a.remove(q.a.createOn(Z))}},r.h=function($,K,H,U){if(H.consume(K.item,'changeAttribute:indent')){const W=U.mapper.toViewElement(K.item);z.a.breakContainer(D.a.createBefore(W)),z.a.breakContainer(D.a.createAfter(W));const Z=W.parent,G=Z.previousSibling;z.a.remove(q.a.createOn(Z)),R(G,G.nextSibling),F(K.item,W,U.mapper)}},r.c=function($,K,H,U){if('listItem'!=K.item.name)for(let W=U.mapper.toViewPosition(K.range.start);('ul'==W.parent.name||'ol'==W.parent.name)&&(W=z.a.breakContainer(W),null!==W.parent.parent);)W=D.a.createBefore(W.parent)},r.g=function($,K,H,U){const W=U.mapper.toViewPosition(K.sourcePosition),Z=W.nodeBefore,G=W.nodeAfter;R(Z,G)},r.i=function($,K,H,U){if(H.consume(K.input,{name:!0})){const W=new M.a('listItem');K.indent=K.indent?K.indent:0;const Z='ul'==K.input.parent.name?'bulleted':'numbered';W.setAttribute('type',Z),W.setAttribute('indent',K.indent),K.context.push(W),K.indent++;let G=[W];for(let J of K.input.getChildren()){const Y=U.convertItem(J,H,K);'ul'==J.name||'ol'==J.name?G=G.concat(Array.from(Y.getChildren())):W.appendChildren(Y)}K.indent--,K.context.pop(),K.output=K.output?K.output.concat(G):G}},r.j=function($,K,H){if(H.test(K.input,{name:!0})){const U=Array.from(K.input.getChildren());for(let W of U)W.name&&'li'==W.name||W.remove()}},r.a=function($,K){'li'==K.viewPosition.parent.name&&'listItem'!=K.modelPosition.parent.name&&(K.viewPosition=D.a.createBefore(K.viewPosition.parent),$.stop())},r.b=function($,K){const H=K.viewPosition,U=K.mapper,W=H.nodeAfter,Z=H.nodeBefore;let G;if(W)'ul'==W.name||'ol'==W.name?G=U.toModelElement(W.getChild(0)):'li'==W.name&&(G=U.toModelElement(W)),G&&(K.modelPosition=L.a.createBefore(G));else if(Z){let J;if('ul'==Z.name||'ol'==Z.name?J=Z.getChild(Z.childCount-1):'li'==Z.name&&(J=Z),J){G=U.toModelElement(J);const Y=U.getModelLength(J);K.modelPosition=L.a.createBefore(G).getShiftedBy(Y)}}null!==K.modelPosition&&$.stop()}},function(o,r,s){'use strict';var d=s(12),u=s(176);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h,w){super(h),this._indentBy='forward'==w?1:-1,this.listenTo(h.document.selection,'change:range',()=>{this.refreshState()}),this.listenTo(h.document,'changesDone',()=>{this.refreshState()})}_doExecute(){const h=this.editor.document,w=h.batch(),C=s.i(u.a)(h.selection.getFirstPosition());h.enqueueChanges(()=>{const T=C.getAttribute('indent');let P=[C],S=C.nextSibling;for(;S&&'listItem'==S.name&&S.getAttribute('indent')>T;)P.push(S),S=S.nextSibling;0>this._indentBy&&(P=P.reverse());for(let E of P){const O=E.getAttribute('indent')+this._indentBy;0>O?w.rename(E,'paragraph').removeAttribute(E,'indent').removeAttribute(E,'type'):w.setAttribute(E,'indent',O)}})}_checkEnabled(){const h=s.i(u.a)(this.editor.document.selection.getFirstPosition());if(!h)return!1;const w=h.previousSibling,C=h.getAttribute('indent'),T=C+this._indentBy;if(0{const R=this.editor.document,F=R.selection.getLastPosition().parent;R.selection.isCollapsed&&'listItem'==F.name&&F.isEmpty&&(this.editor.execute('outdentList'),V.preventDefault(),O.stop())}),this.listenTo(this.editor.editing.view,'keydown',(O,V)=>{let R=null;if(V.keystroke==s.i(h.a)('tab')?R='indentList':V.keystroke==s.i(h.a)('Shift+tab')&&(R='outdentList'),R){const F=this.editor.commands.get(R);F.isEnabled&&(this.editor.execute(R),V.preventDefault(),O.stop())}})}_addButton(E,O,V){const R=this.editor,F=R.commands.get(E);R.ui.componentFactory.add(E,(N)=>{const M=new f.a(N);return M.set({label:O,icon:V,tooltip:!0}),M.bind('isOn','isEnabled').to(F,'value','isEnabled'),this.listenTo(M,'execute',()=>R.execute(E)),M})}}r.a=S},function(o,r,s){'use strict';var d=s(12),u=s(1),f=s(176);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{constructor(w,C){super(w),this.type='bulleted'==C?'bulleted':'numbered',this.set('value',!1);const T=()=>{this.refreshValue(),this.refreshState()};this.listenTo(w.document.selection,'change:range',T),this.listenTo(w.document,'changesDone',T)}refreshValue(){const w=this.editor.document.selection.getFirstPosition(),C=s.i(f.a)(w);this.value=null!==C&&C.getAttribute('type')==this.type}_doExecute(w={}){const C=this.editor.document,T=Array.from(C.selection.getSelectedBlocks()),P=!0===this.value;C.enqueueChanges(()=>{const S=w.batch||C.batch();if(P){let E=T[T.length-1].nextSibling,O=_NumberPOSITIVE_INFINITY,V=[];for(;E&&'listItem'==E.name&&0!==E.getAttribute('indent');){const R=E.getAttribute('indent');Rthis._updateValue())}_doExecute(f={}){const h=this.editor.document;h.enqueueChanges(()=>{const w=f.batch||h.batch(),C=(f.selection||h.selection).getSelectedBlocks();for(let T of C)T.is('paragraph')||w.rename(T,'paragraph')})}_updateValue(){const f=this.editor.document.selection.getSelectedBlocks().next().value;f&&(this.value=f.is('paragraph'))}}r.a=u},function(o,r,s){'use strict';var d=s(2),u=s(378),f=s(116),h=s(296),w=s(348),C=s(351),T=s(353),P=s(356),S=s(172),E=s(298),O=s(365),V=s(372);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class R extends d.a{static get requires(){return[u.a,f.a,h.a,w.a,C.a,T.a,P.a,S.a,E.a,O.a,V.a]}}r.a=R},function(o,r,s){'use strict';var d=s(2),u=s(301),f=s(345),h=s(384),w=s(404);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class C extends d.a{static get requires(){return[u.a,f.a,h.a,w.a]}}r.a=C},function(o,r,s){'use strict';var d=s(2),u=s(380),f=s(381);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{init(){const w=this.editor,C=w.editing.view;C.addObserver(f.a),w.commands.set('forwardDelete',new u.a(w,'forward')),w.commands.set('delete',new u.a(w,'backward')),this.listenTo(C,'delete',(T,P)=>{w.execute('forward'==P.direction?'forwardDelete':'delete',{unit:P.unit}),P.preventDefault()})}}r.a=h},function(o,r,s){'use strict';var d=s(12),u=s(59),f=s(177),h=s(184);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{constructor(C,T){super(C),this.direction=T,this._buffer=new f.a(C.document,C.config.get('typing.undoStep'))}_doExecute(C={}){const T=this.editor.document,P=this.editor.data;T.enqueueChanges(()=>{this._buffer.lock();const S=u.a.createFromSelection(T.selection);if(S.isCollapsed&&P.modifySelection(S,{direction:this.direction,unit:C.unit}),S.isCollapsed)return;let E=0;S.getFirstRange().getMinimalFlatRanges().forEach((O)=>{E+=s.i(h.a)(O.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),P.deleteContent(S,this._buffer.batch,{merge:!0}),this._buffer.input(E),T.selection.setRanges(S.getRanges(),S.isBackward),this._buffer.unlock()})}}r.a=w},function(o,r,s){'use strict';var d=s(50),u=s(114),f=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{constructor(w){super(w),w.on('keydown',(C,T)=>{const P={};if(T.keyCode==f.d.delete)P.direction='forward',P.unit='character';else if(T.keyCode==f.d.backspace)P.direction='backward',P.unit='codePoint';else return;P.unit=T.altKey?'word':P.unit,w.fire('delete',new u.a(w,T.domEvent,P))})}observe(){}}r.a=h},function(o,r,s){'use strict';function d(F){return!!F.ctrlKey||R.includes(F.keyCode)}function u(F,N){return F instanceof C.a&&N instanceof C.a?F.data===N.data:F===N}var f=s(2),h=s(3),w=s(25),C=s(29),T=s(185),P=s(408),S=s(22),E=s(383);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class O extends f.a{init(){const F=this.editor,N=F.editing.view,M=new E.a(F,F.config.get('typing.undoStep')||20);F.commands.set('input',M),this.listenTo(N,'keydown',(L,I)=>{this._handleKeydown(I,M.buffer)},{priority:'lowest'}),this.listenTo(N,'mutations',(L,I,D)=>{this._handleMutations(I,D)})}_handleKeydown(F,N){const M=this.editor.document;d(F)||M.selection.isCollapsed||(N.lock(),M.enqueueChanges(()=>{this.editor.data.deleteContent(M.selection,N.batch)}),N.unlock())}_handleMutations(F,N){new V(this.editor).handle(F,N)}}r.a=O;class V{constructor(F){this.editor=F,this.editing=this.editor.editing}handle(F,N){for(let M of F)this._handleTextMutation(M,N),this._handleTextNodeInsertion(M)}_handleTextMutation(F,N){if('text'!=F.type)return;const M=F.newText.replace(/\\u00A0/g,' '),L=F.oldText.replace(/\\u00A0/g,' '),I=s.i(T.a)(L,M);let D=null,q=null;for(let G=0;G=F;F++)R.push(F)},function(o,r,s){'use strict';var d=s(12),u=s(177);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h,w){super(h),this._buffer=new u.a(h.document,w)}destroy(){super.destroy(),this._buffer.destroy(),this._buffer=null}get buffer(){return this._buffer}_doExecute(h={}){const w=this.editor.document,C=h.text||'',T=C.length,P=h.range||w.selection.getFirstRange(),S=h.resultRange;w.enqueueChanges(()=>{const E=P.isCollapsed;this._buffer.lock(),E||this._buffer.batch.remove(P),this._buffer.batch.weakInsert(P.start,C),S?this.editor.data.model.selection.setRanges([S]):E&&this.editor.data.model.selection.collapse(P.start.getShiftedBy(T)),this._buffer.unlock(),this._buffer.input(T)})}}r.a=f},function(o,r,s){'use strict';var d=s(2),u=s(382),f=s(379);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{static get requires(){return[u.a,f.a]}}r.a=h},function(o,r,s){'use strict';var u=s(22);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function({emitter:f,activator:h,callback:w}){f.listenTo(document,'keydown',(C,{keyCode:T})=>{T==u.d.esc&&h()&&w()})}},function(o,r,s){'use strict';var d=s(0);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(f){this.editor=f,this._components=new Map}add(f,h){if(this._components.get(f))throw new d.a('componentfactory-item-exists: The item already exists in the component factory.',{name:f});this._components.set(f,h)}create(f){return this._components.get(f)(this.editor.locale)}}},function(o,r,s){'use strict';var u=s(26),f=s(389),h=s(388);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(w,C){const T=new u.a(C);T.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(w);const P=new h.a(C);return new f.a(C,T,P)}},function(o,r,s){'use strict';var d=s(9),u=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h);const w=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.template=new u.a({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',w.if('isVisible','ck-dropdown__panel-visible')]},children:this.children})}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(6),f=s(63),h=s(64);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class w extends d.a{constructor(C,T,P){super(C),u.a.extend(T.template,{attributes:{class:['ck-dropdown__button']}}),this.buttonView=T,this.panelView=P,this.set('isOpen',!1),this.focusTracker=new f.a,this.keystrokes=new h.a,this.template=new u.a({tag:'div',attributes:{class:['ck-dropdown']},children:[T,P]}),this.listenTo(T,'execute',()=>this.isOpen=!this.isOpen),P.bind('isVisible').to(this,'isOpen')}init(){this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const C=(T,P)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,P())};return this.keystrokes.set('arrowdown',(T,P)=>{this.isOpen||(this.isOpen=!0,P())}),this.keystrokes.set('arrowright',(T,P)=>{this.isOpen&&P()}),this.keystrokes.set('arrowleft',C),this.keystrokes.set('esc',C),super.init()}focus(){this.buttonView.focus()}}r.a=w},function(o,r,s){'use strict';function u(C){C.listenTo(document,'click',(T,{target:P})=>{C.element==P||C.element.contains(P)||(C.isOpen=!1)})}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */var f=s(398),h=s(397),w=s(387);r.a=function(C,T){const P=s.i(w.a)(C,T),S=P.listView=new f.a(T);return S.items.bindTo(C.items).using((E)=>{const O=new h.a(T);return O.bind(...Object.keys(E)).to(E),O}),S.items.delegate('execute').to(P),P.panelView.children.add(S),P.on('change:isOpen',(E,O,V)=>{V?u(P):P.stopListening(document)}),P.on('execute',()=>{P.isOpen=!1}),P.keystrokes.set('arrowdown',(E,O)=>{P.isOpen&&(S.focus(),O())}),P.keystrokes.set('arrowup',(E,O)=>{P.isOpen&&(S.focusLast(),O())}),P}},function(o,r,s){'use strict';var d=s(9),u=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h,w){super(h);const C=this.bindTemplate;w&&(this.element=this.editableElement=w),this.template=new u.a({tag:'div',attributes:{class:[C.to('isFocused',(T)=>T?'ck-focused':'ck-blurred'),'ck-editor__editable'],contenteditable:C.to('isReadOnly',(T)=>!T)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=w}init(){return this.externalElement?this.template.apply(this.externalElement):this.editableElement=this.element,super.init()}destroy(){return this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}r.a=f},function(o,r,s){'use strict';var d=s(391),u=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h,w){super(h,w);const C=this.bindTemplate,T=this.t;this.set('name',null);u.a.extend(this.template,{attributes:{role:'textbox','aria-label':C.to('name',(S)=>{return T('Rich Text Editor, %0',[S])}),class:'ck-editor__editable_inline'}})}}r.a=f},function(o,r,s){'use strict';var d=s(394),u=s(68),f=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h extends d.a{constructor(w){super(w);const C=this.t,T=s.i(u.a)();this.set('width',null),this.set('height',null),this.top=this.createCollection(),this.main=this.createCollection(),this.template=new f.a({tag:'div',attributes:{class:['ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:w.lang,'aria-labelledby':`cke-editor__aria-label_${T}`},children:[{tag:'span',attributes:{id:`cke-editor__aria-label_${T}`,class:'cke-voice-label'},children:[C('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}]})}}r.a=h},function(o,r,s){'use strict';var d=s(9),u=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(h){super(h),this.body=this.createCollection()}init(){return Promise.resolve().then(()=>this._renderBodyCollection()).then(()=>super.init())}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const h=this._bodyCollectionContainer=new u.a({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(h)}}r.a=f},function(o,r,s){'use strict';var d=s(9),u=s(6);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{constructor(){super();const h=this.bindTemplate;this.set('content'),this.set('viewBox','0 0 20 20'),this.template=new u.a({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:h.to('viewBox')}}),this.on('change:content',(w,C,T)=>{for(const P=new DOMParser().parseFromString(T.trim(),'image/svg+xml').firstChild;0{this.focusTracker.add(P.element)}),this.items.on('remove',(T,P)=>{this.focusTracker.remove(P.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}r.a=C},function(o,r,s){'use strict';var d=s(56),u=s(4),f=s(31);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class h{constructor(w,C){C&&s.i(d.a)(this,C),w&&this.set(w)}}r.a=h,s.i(u.a)(h,f.a)},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function({origin:u,originKeystrokeHandler:f,originFocusTracker:h,toolbar:w}){h.add(w.element),f.set('Alt+F10',(C,T)=>{h.isFocused&&!w.focusTracker.isFocused&&(w.focus(),T())}),w.keystrokes.set('Esc',(C,T)=>{w.focusTracker.isFocused&&(u.focus(),T())})}},function(o,r,s){'use strict';var d=s(62),u=s(6),f=s(183),h=s(187);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const w=s.i(h.a)('px');class C extends f.a{constructor(T){super(T);const P=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterOffset',50),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),u.a.extend(this.template,{attributes:{class:[P.if('isSticky','ck-toolbar_sticky'),P.if('_isStickyToTheLimiter','ck-toolbar_sticky_bottom-limit')],style:{width:P.to('isSticky',(S)=>{return S?w(this._elementPlaceholder.getBoundingClientRect().width):null}),bottom:P.to('_isStickyToTheLimiter',(S)=>{return S?w(this.limiterOffset):null}),marginLeft:P.to('_marginLeft')}}}),this._elementPlaceholder=new u.a({tag:'div',attributes:{class:['ck-toolbar__placeholder'],style:{display:P.to('isSticky',(S)=>S?'block':'none'),height:P.to('isSticky',(S)=>{return S?w(this._toolbarRect.height):null})}}}).render()}init(){super.init(),this.element.parentNode.insertBefore(this._elementPlaceholder,this.element),this.listenTo(d.a.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}destroy(){return super.destroy().then(()=>{this._elementPlaceholder.remove()})}_checkIfShouldBeSticky(){const T=this._limiterRect=this.limiterElement.getBoundingClientRect(),P=this._toolbarRect=this.element.getBoundingClientRect();this.isSticky=this.isActive&&0>T.top&&this._toolbarRect.height+this.limiterOffset{const w=h.batch.deltas[h.batch.deltas.length-1],C=w.baseVersion+w.operations.length,T=Array.from(this.editor.document.history.getDeltas(C)).filter((P)=>{return!this._createdBatches.has(P.batch)});this._restoreSelection(h.selection.ranges,h.selection.isBackward,T),this._redo(h.batch)}),this.refreshState()}_redo(h){const w=this.editor.document,C=w.batch();this._createdBatches.add(C);const T=h.deltas.slice();T.reverse();for(let P of T){const S=P.baseVersion+P.operations.length;let E=[P.getReversed()];for(let O of w.history.getDeltas(S))this._createdBatches.has(O.batch)||(E=s.i(u.a)(E,[O],!0).deltasA);for(let O of E){O.baseVersion=w.version,C.addDelta(O);for(let V of O.operations)w.applyOperation(V)}}}}r.a=f},function(o,r,s){'use strict';var d=s(2),u=s(406),f=s(26),h=s(289),w=s.n(h),C=s(288),T=s.n(C);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class P extends d.a{static get requires(){return[u.a]}init(){const S=this.editor,E=S.t;this._addButton('undo',E('Undo'),'CTRL+Z',w.a),this._addButton('redo',E('Redo'),'CTRL+Y',T.a),S.keystrokes.set('CTRL+Z','undo'),S.keystrokes.set('CTRL+Y','redo'),S.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(S,E,O,V){const R=this.editor,F=R.commands.get(S);R.ui.componentFactory.add(S,(N)=>{const M=new f.a(N);return M.set({label:E,icon:V,keystroke:O,tooltip:!0}),M.bind('isEnabled').to(F,'isEnabled'),this.listenTo(M,'execute',()=>R.execute(S)),M})}}r.a=P},function(o,r,s){'use strict';var d=s(119),u=s(105);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */class f extends d.a{_doExecute(h=null){let w=h?this._stack.findIndex((T)=>T.batch==h):this._stack.length-1;const C=this._stack.splice(w,1)[0];this.editor.document.enqueueChanges(()=>{const T=this._undo(C.batch),P=this.editor.document.history.getDeltas(C.batch.baseVersion);this._restoreSelection(C.selection.ranges,C.selection.isBackward,P),this.fire('revert',C.batch,T)}),this.refreshState()}_getItemIndexFromBaseVersion(h){for(let w=0;w{this._batchRegistry.has(P)||'transparent'==P.type||(this._redoCommand._createdBatches.has(P)?this._undoCommand.addBatch(P):!this._undoCommand._createdBatches.has(P)&&(this._undoCommand.addBatch(P),this._redoCommand.clearStack()),this._batchRegistry.add(P))},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(w,C,T)=>{this._redoCommand.addBatch(T)})}}r.a=h},function(o,r,s){'use strict';var d=s(97);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(f,h){this._config={},h&&this.define(h),f&&this._setObjectToTarget(this._config,f)}set(f,h){this._setToTarget(this._config,f,h)}define(f,h){this._setToTarget(this._config,f,h,!0)}get(f){return this._getFromSource(this._config,f)}_setToTarget(f,h,w,C=!1){if(s.i(d.a)(h))return void this._setObjectToTarget(f,h,C);const T=h.split('.');h=T.pop();for(let P of T)s.i(d.a)(f[P])||(f[P]={}),f=f[P];return s.i(d.a)(w)?(s.i(d.a)(f[h])||(f[h]={}),f=f[h],void this._setObjectToTarget(f,w,C)):void(C&&'undefined'!=typeof f[h]||(f[h]=w))}_getFromSource(f,h){const w=h.split('.');h=w.pop();for(let C of w){if(!s.i(d.a)(f[C])){f=null;break}f=f[C]}return f?f[h]:void 0}_setObjectToTarget(f,h,w){Object.keys(h).forEach((C)=>{this._setToTarget(f,C,h[C],w)})}}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u,f){function h(){P&&(C.push(P),P=null)}function w(S){return P&&P.type==S}const C=[];let T=0,P;return u.forEach((S)=>{'equal'==S?(h(),T++):'insert'==S?(w('insert')?P.values.push(f[T]):(h(),P={type:'insert',index:T,values:[f[T]]}),T++):w('delete')?P.howMany++:(h(),P={type:'delete',index:T,howMany:1})}),h(),C}},function(o,r,s){'use strict';var u=s(186);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(f,h){const w=s.i(u.a)(f),C=s.i(u.a)(h);let T=0;for(;w[T]==C[T]&&w[T];)T++;return 0==T?null:w[T-1]}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return u instanceof HTMLTextAreaElement?u.value:u.innerHTML}},function(o,r,s){'use strict';var u=s(62);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=function(f){for(;f&&'html'!=f.tagName.toLowerCase();){if('static'!=u.a.window.getComputedStyle(f).position)return f;f=f.parentElement}return null}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){let f=0;for(;u.previousSibling;)u=u.previousSibling,f++;return f}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u,f,h){u.insertBefore(h,u.childNodes[f]||null)}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){return'[object Range]'==Object.prototype.toString.apply(u)}},function(o,r,s){'use strict';function u(P,S,E){const{left:O,top:V,name:R}=P(S,E);return[R,E.clone().moveTo(O,V)]}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function f(P,S,E,O,V){let R=0,F=0,N,M;const L=E.getArea();return P.some((I)=>{function D(){F=K,R=$,N=z,M=q}const[q,z]=u(I,S,E);let $,K;if(O)if(V){const H=O.getIntersection(V);$=H?H.getIntersectionArea(z):0}else $=O.getIntersectionArea(z);return V&&(K=V.getIntersectionArea(z)),V&&!O?K>F&&D():!V&&O?$>R&&D():K>F&&$>=R?D():K>=F&&$>R&&D(),$===L}),N?[M,N]:null}function h({left:P,top:S}){const{scrollX:E,scrollY:O}=w.a.window;return{left:P+E,top:S+O}}var w=s(62),C=s(416),T=s(411);r.a=function({element:P,target:S,positions:E,limiter:O,fitInViewport:V}){const R=s.i(T.a)(P.parentElement),F=new C.a(P),N=new C.a(S);let M,L;if(!O&&!V)[L,M]=u(E[0],N,F);else{const q=O&&new C.a(O),z=V&&C.a.getViewportRect();[L,M]=f(E,N,F,q,z)||u(E[0],N,F)}let{left:I,top:D}=h(M);if(R){const q=h(new C.a(R));I-=q.left,D-=q.top}return{left:I,top:D,name:L}}},function(o,r,s){'use strict';var d=s(62),u=s(414),f=s(507);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const h=['top','right','bottom','left','width','height'];class w{constructor(C){(s.i(f.a)(C)||s.i(u.a)(C))&&(C=C.getBoundingClientRect()),h.forEach((T)=>this[T]=C[T])}clone(){return new w(this)}moveTo(C,T){return this.top=T,this.right=C+this.width,this.bottom=T+this.height,this.left=C,this}moveBy(C,T){return this.top+=T,this.right+=C,this.left+=C,this.bottom+=T,this}getIntersection(C){const T={top:_Mathmax(this.top,C.top),right:_Mathmin(this.right,C.right),bottom:_Mathmin(this.bottom,C.bottom),left:_Mathmax(this.left,C.left)};return T.width=T.right-T.left,T.height=T.bottom-T.top,0>T.width||0>T.height?null:new w(T)}getIntersectionArea(C){const T=this.getIntersection(C);return T?T.getArea():0}getArea(){return this.width*this.height}static getViewportRect(){const{innerWidth:C,innerHeight:T}=d.a.window;return new w({top:0,right:C,bottom:T,left:0,width:C,height:T})}}r.a=w},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u){const f=u.parentNode;f&&f.removeChild(u)}},function(o,r){'use strict';r.a=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(u,f){u instanceof HTMLTextAreaElement&&(u.value=f),u.innerHTML=f}},function(o,r){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(){this._replacedElements=[]}replace(u,f){this._replacedElements.push({element:u,newElement:f}),u.style.display='none',f&&u.parentNode.insertBefore(f,u.nextSibling)}restore(){this._replacedElements.forEach(({element:u,newElement:f})=>{u.style.display='',f&&f.remove()}),this._replacedElements=[]}}},function(o,r){'use strict';/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */const u=navigator.userAgent.toLowerCase(),f={mac:function(h){return-1=f?u:f)),u}},function(o,r,s){'use strict';var u=s(14),f=Object.create;r.a=function(h){return s.i(u.a)(h)?f(h):{}}},function(o,r,s){'use strict';var u=s(15),f=s(517);r.a=function(h,w,C,T){var P=h.length;for(C=s.i(u.a)(C),0>C&&(C=-C>P?0:P+C),T=void 0===T||T>P?P:s.i(u.a)(T),0>T&&(T+=P),T=C>T?0:s.i(f.a)(T);Ch?w:0,s.i(u.a)(h,w)?f[h]:void 0}},function(o,r,s){'use strict';var u=s(125);r.a=function(f){return function(h){return s.i(u.a)(h,f)}}},function(o,r,s){'use strict';var u=s(65),f=s(87),h=s(36),w=s(53),C=s(14),T=s(54);r.a=function(P,S,E,O){S=s.i(w.a)(S,P)?[S]:s.i(f.a)(S);for(var V=-1,R=S.length,N=P,M;null!=N&&++Vh||P&&S&&O&&!E&&!V||C&&S&&O||!w&&O||!T)return 1;if(!C&&!P&&!V&&fP?void 0:S,P=1),w=Object(w);++TT)return!1;var P=C.length-1;return T==P?C.pop():h.call(C,T,1),!0}},function(o,r,s){'use strict';var u=s(84);r.a=function(f){var h=this.__data__,w=s.i(u.a)(h,f);return 0>w?void 0:h[w][1]}},function(o,r,s){'use strict';var u=s(84);r.a=function(f){return-1C?w.push([f,h]):w[C][1]=h,this}},function(o,r,s){'use strict';var u=s(423),f=s(80),h=s(188);r.a=function(){this.__data__={hash:new u.a,map:new(h.a||f.a),string:new u.a}}},function(o,r,s){'use strict';var u=s(88);r.a=function(f){return s.i(u.a)(this,f)['delete'](f)}},function(o,r,s){'use strict';var u=s(88);r.a=function(f){return s.i(u.a)(this,f).get(f)}},function(o,r,s){'use strict';var u=s(88);r.a=function(f){return s.i(u.a)(this,f).has(f)}},function(o,r,s){'use strict';var u=s(88);r.a=function(f,h){return s.i(u.a)(this,f).set(f,h),this}},function(o,r,s){'use strict';var u=s(125),f=s(35);r.a=function(h,w){return 1==w.length?h:s.i(u.a)(h,s.i(f.a)(w,0,-1))}},function(o,r){'use strict';r.a=function(f){return this.__data__.set(f,'__lodash_hash_undefined__'),this}},function(o,r){'use strict';r.a=function(u){return this.__data__.has(u)}},function(o,r){'use strict';r.a=function(u){var f=-1,h=Array(u.size);return u.forEach(function(w){h[++f]=[w,w]}),h}},function(o,r,s){'use strict';var u=s(80);r.a=function(){this.__data__=new u.a}},function(o,r){'use strict';r.a=function(u){return this.__data__['delete'](u)}},function(o,r){'use strict';r.a=function(u){return this.__data__.get(u)}},function(o,r){'use strict';r.a=function(u){return this.__data__.has(u)}},function(o,r,s){'use strict';var u=s(80),f=s(120);r.a=function(w,C){var T=this.__data__;return T instanceof u.a&&T.__data__.length==200&&(T=this.__data__=new f.a(T.__data__)),T.set(w,C),this}},function(o,r,s){'use strict';var d=s(511),u=s(519),f=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]/g,h=/\\\\(\\\\)?/g,w=s.i(d.a)(function(C){var T=[];return s.i(u.a)(C).replace(f,function(P,S,E,O){T.push(E?O.replace(h,'$1'):S||P)}),T});r.a=w},function(o,r,s){'use strict';var d=s(208),u=s(209),f=s(210),h=s(211),w=s(212),C=s(213),T=s(142),P=s(143),S=s(214),E=s(215),O=s(216),V=s(217),R=s(218),F=s(219),N=s(220),M=s(221),L=s(222),I=s(223),D=s(144),q=s(226),z=s(227),$=s(228),K=s(229),H=s(230),U=s(232),W=s(18),Z=s(233),G=s(234),J=s(235),Y=s(148),X=s(236),Q=s(237),ee=s(238),te=s(239),ae=s(240),ne=s(241),oe=s(242),ie=s(243),re=s(244),se=s(245),le=s(246),de=s(247),ce=s(248),ue=s(249),me=s(250),pe=s(251),ge=s(252),fe=s(253),he=s(254),be=s(256),_e=s(257),ke=s(258),ye=s(259),we=s(260),ve=s(261),xe=s(98),Ce=s(149),Te=s(262),Pe=s(263),Ae=s(264),Se=s(265),Ee=s(266),Oe=s(267),Ve=s(268),Re=s(269);r.a={chunk:d.a,compact:u.a,concat:f.a,difference:h.a,differenceBy:w.a,differenceWith:C.a,drop:T.a,dropRight:P.a,dropRightWhile:S.a,dropWhile:E.a,fill:O.a,findIndex:V.a,findLastIndex:R.a,first:F.a,flatten:N.a,flattenDeep:M.a,flattenDepth:L.a,fromPairs:I.a,head:D.a,indexOf:q.a,initial:z.a,intersection:$.a,intersectionBy:K.a,intersectionWith:H.a,join:U.a,last:W.a,lastIndexOf:Z.a,nth:G.a,pull:J.a,pullAll:Y.a,pullAllBy:X.a,pullAllWith:Q.a,pullAt:ee.a,remove:te.a,reverse:ae.a,slice:ne.a,sortedIndex:oe.a,sortedIndexBy:ie.a,sortedIndexOf:re.a,sortedLastIndex:se.a,sortedLastIndexBy:le.a,sortedLastIndexOf:de.a,sortedUniq:ce.a,sortedUniqBy:ue.a,tail:me.a,take:pe.a,takeRight:ge.a,takeRightWhile:fe.a,takeWhile:he.a,union:be.a,unionBy:_e.a,unionWith:ke.a,uniq:ye.a,uniqBy:we.a,uniqWith:ve.a,unzip:xe.a,unzipWith:Ce.a,without:Te.a,xor:Pe.a,xorBy:Ae.a,xorWith:Se.a,zip:Ee.a,zipObject:Oe.a,zipObjectDeep:Ve.a,zipWith:Re.a}},function(o,r,s){'use strict';var d=s(208),u=s(209),f=s(210),h=s(211),w=s(212),C=s(213),T=s(142),P=s(143),S=s(214),E=s(215),O=s(216),V=s(217),R=s(218),F=s(219),N=s(220),M=s(221),L=s(222),I=s(223),D=s(144),q=s(226),z=s(227),$=s(228),K=s(229),H=s(230),U=s(232),W=s(18),Z=s(233),G=s(234),J=s(235),Y=s(148),X=s(236),Q=s(237),ee=s(238),te=s(239),ae=s(240),ne=s(241),oe=s(242),ie=s(243),re=s(244),se=s(245),le=s(246),de=s(247),ce=s(248),ue=s(249),me=s(250),pe=s(251),ge=s(252),fe=s(253),he=s(254),be=s(256),_e=s(257),ke=s(258),ye=s(259),we=s(260),ve=s(261),xe=s(98),Ce=s(149),Te=s(262),Pe=s(263),Ae=s(264),Se=s(265),Ee=s(266),Oe=s(267),Ve=s(268),Re=s(269),Fe=s(500);s.d(r,'a',function(){return Fe.a})},function(o,r,s){'use strict';var d=s(65),u=s(137),f=s(460),h=s(95),w=s(91),C=s(510),T=Object.prototype,P=T.propertyIsEnumerable,S=!P.call({valueOf:1},'valueOf'),E=s.i(f.a)(function(O,V){if(S||s.i(w.a)(V)||s.i(h.a)(V))return void s.i(u.a)(V,s.i(C.a)(V),O);for(var R in V)s.i(d.a)(O,R,V[R])});r.a=E},function(o,r,s){'use strict';var u=s(193);r.a=function(f,h){return s.i(u.a)(f,!0,!0,h)}},function(o,r){'use strict';r.a=function(u){return function(){return u}}},function(o,r,s){'use strict';var u=s(437),f=s(468);r.a=function(h,w){return null!=h&&s.i(f.a)(h,w,u.a)}},function(o,r,s){'use strict';(function(d){var u=s(504),f=s(30),h={'function':!0,object:!0},w=h[typeof exports]&&exports&&!exports.nodeType?exports:void 0,C=h[typeof d]&&d&&!d.nodeType?d:void 0,T=C&&C.exports===w?w:void 0,P=T?f.a.Buffer:void 0,S=P?function(E){return E instanceof P}:s.i(u.a)(!1);r.a=S}).call(r,s(151)(o))},function(o,r,s){'use strict';var u=s(43),f=s(97);r.a=function(h){return!!h&&1===h.nodeType&&s.i(u.a)(h)&&!s.i(f.a)(h)}},function(o,r,s){'use strict';var u=s(128);r.a=function(f,h){return s.i(u.a)(f,h)}},function(o,r,s){'use strict';var u=s(96),f=s(43),G={};G['[object Float32Array]']=G['[object Float64Array]']=G['[object Int8Array]']=G['[object Int16Array]']=G['[object Int32Array]']=G['[object Uint8Array]']=G['[object Uint8ClampedArray]']=G['[object Uint16Array]']=G['[object Uint32Array]']=!0,G['[object Arguments]']=G['[object Array]']=G['[object ArrayBuffer]']=G['[object Boolean]']=G['[object DataView]']=G['[object Date]']=G['[object Error]']=G['[object Function]']=G['[object Map]']=G['[object Number]']=G['[object Object]']=G['[object RegExp]']=G['[object Set]']=G['[object String]']=G['[object WeakMap]']=!1;var J=Object.prototype,Y=J.toString;r.a=function(X){return s.i(f.a)(X)&&s.i(u.a)(X.length)&&!!G[Y.call(X)]}},function(o,r,s){'use strict';var u=s(442),f=s(203),h=s(36),w=s(91),C=Object.prototype,T=C.hasOwnProperty;r.a=function(P){for(var S=-1,E=s.i(w.a)(P),O=s.i(u.a)(P),V=O.length,R=s.i(f.a)(P),N=R||[],M=N.length,L;++Sw?-1:1;return C*1.7976931348623157e308}return w===w?w:0}},function(o,r,s){'use strict';var u=s(433),f=s(15);r.a=function(w){return w?s.i(u.a)(s.i(f.a)(w),0,4294967295):0}},function(o,r,s){'use strict';var d=s(462),u=s(67),f=s.i(d.a)(u.a);r.a=f},function(o,r,s){'use strict';var u=s(449);r.a=function(f){return null==f?'':s.i(u.a)(f)}},function(o,r,s){'use strict';var d=s(524);/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */r.a=class{constructor(f){this.lang=f||'en',this.t=(...h)=>this._t(...h)}_t(f,h){let w=s.i(d.a)(this.lang,f);return h&&(w=w.replace(/\\%(\\d+)/g,(C,T)=>{return T1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;var n=new u.default(t);return n.skip(e),n.position}},{key:"getParentPath",value:function(){return this.path.slice(0,-1)}},{key:"getAncestors",value:function(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeNode:!0})}},{key:"getCommonPath",value:function(e){if(this.root!=e.root)return[];var t=(0,c.default)(this.path,e.path),n="string"==typeof t?Math.min(this.path.length,e.path.length):t;return this.path.slice(0,n)}},{key:"getShiftedBy",value:function(t){var n=e.createFromPosition(this),r=n.offset+t;return n.offset=r<0?0:r,n}},{key:"isAfter",value:function(e){return"after"==this.compareWith(e)}},{key:"isBefore",value:function(e){return"before"==this.compareWith(e)}},{key:"isEqual",value:function(e){return"same"==this.compareWith(e)}},{key:"isTouching",value:function(t){var n=null,r=null;switch(this.compareWith(t)){case"same":return!0;case"before":n=e.createFromPosition(this),r=e.createFromPosition(t);break;case"after":n=e.createFromPosition(t),r=e.createFromPosition(this);break;default:return!1}for(var o=n.parent;n.path.length+r.path.length;){if(n.isEqual(r))return!0;if(n.path.length>r.path.length){if(n.offset!==o.maxOffset)return!1;n.path=n.path.slice(0,-1),o=o.parent,n.offset++}else{if(0!==r.offset)return!1;r.path=r.path.slice(0,-1)}}}},{key:"_getTransformedByDeletion",value:function(t,n){var r=e.createFromPosition(this);if(this.root!=t.root)return r;if("same"==(0,c.default)(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;r.offset-=n}}else if("prefix"==(0,c.default)(t.getParentPath(),this.getParentPath())){var o=t.path.length-1;if(t.offset<=this.path[o]){if(t.offset+n>this.path[o])return null;r.path[o]-=n}}return r}},{key:"_getTransformedByInsertion",value:function(t,n,r){var o=e.createFromPosition(this);if(this.root!=t.root)return o;if("same"==(0,c.default)(t.getParentPath(),this.getParentPath()))(t.offset1&&void 0!==arguments[1]?arguments[1]:null;i(this,e),this.start=l.default.createFromPosition(t),this.end=n?l.default.createFromPosition(n):l.default.createFromPosition(t)}return a(e,[{key:Symbol.iterator,value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(new f.default({boundaries:this,ignoreElementEnd:!0}),"t0",1);case 1:case"end":return e.stop()}},e,this)})},{key:"containsPosition",value:function(e){return e.isAfter(this.start)&&e.isBefore(this.end)}},{key:"containsRange",value:function(e){return this.containsPosition(e.start)&&this.containsPosition(e.end)}},{key:"isEqual",value:function(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}},{key:"isIntersecting",value:function(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}},{key:"getDifference",value:function(t){var n=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&n.push(new e(this.start,t.start)),this.containsPosition(t.end)&&n.push(new e(t.end,this.end))):n.push(e.createFromRange(this)),n}},{key:"getIntersection",value:function(t){if(this.isIntersecting(t)){var n=this.start,r=this.end;return this.containsPosition(t.start)&&(n=t.start),this.containsPosition(t.end)&&(r=t.end),new e(n,r)}return null}},{key:"getMinimalFlatRanges",value:function(){for(var t=[],n=this.start.getCommonPath(this.end).length,r=l.default.createFromPosition(this.start),o=r.parent;r.path.length>n+1;){var i=o.maxOffset-r.offset;0!==i&&t.push(new e(r,r.getShiftedBy(i))),r.path=r.path.slice(0,-1),r.offset++,o=o.parent}for(;r.path.length<=this.end.path.length;){var a=this.end.path[r.path.length-1],u=a-r.offset;0!==u&&t.push(new e(r,r.getShiftedBy(u))),r.offset=a,r.path.push(0)}return t}},{key:"getWalker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new f.default(e)}},{key:"getItems",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,u,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l.boundaries=this,l.ignoreElementEnd=!0,t=new f.default(l),n=!0,r=!1,o=void 0,e.prev=6,i=t[Symbol.iterator]();case 8:if(n=(a=i.next()).done){e.next=15;break}return u=a.value,e.next=12,u.item;case 12:n=!0,e.next=8;break;case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(6),r=!0,o=e.t0;case 21:e.prev=21,e.prev=22,!n&&i.return&&i.return();case 24:if(e.prev=24,!r){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(21);case 29:case"end":return e.stop()}},e,this,[[6,17,21,29],[22,,24,28]])})},{key:"getPositions",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,u,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l.boundaries=this,t=new f.default(l),e.next=4,t.position;case 4:n=!0,r=!1,o=void 0,e.prev=7,i=t[Symbol.iterator]();case 9:if(n=(a=i.next()).done){e.next=16;break}return u=a.value,e.next=13,u.nextPosition;case 13:n=!0,e.next=9;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(7),r=!0,o=e.t0;case 22:e.prev=22,e.prev=23,!n&&i.return&&i.return();case 25:if(e.prev=25,!r){e.next=28;break}throw o;case 28:return e.finish(25);case 29:return e.finish(22);case 30:case"end":return e.stop()}},e,this,[[7,18,22,30],[23,,25,29]])})},{key:"getTransformedByDelta",value:function(t){var n=[e.createFromRange(this)],r=new Set(["insert","move","remove","reinsert"]),i=!0,a=!1,u=void 0;try{for(var l,s=t.operations[Symbol.iterator]();!(i=(l=s.next()).done);i=!0){var f=l.value;if(r.has(f.type))for(var c=0;c2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(r&&this.containsPosition(t))return[new e(this.start,t),new e(t._getTransformedByInsertion(t,n,!0),this.end._getTransformedByInsertion(t,n,this.isCollapsed))];var i=e.createFromRange(this),a=!!i.isCollapsed||!o,u=!!i.isCollapsed||o;return i.start=i.start._getTransformedByInsertion(t,n,a),i.end=i.end._getTransformedByInsertion(t,n,u),[i]}},{key:"_getTransformedByMove",value:function(t,n,r){if(this.isCollapsed){return[new e(this.start._getTransformedByMove(t,n,r,!0,!1))]}var o=void 0,i=new e(t,t.getShiftedBy(r)),a=this.getDifference(i),u=null,l=this.getIntersection(i);1==a.length?u=new e(a[0].start._getTransformedByDeletion(t,r),a[0].end._getTransformedByDeletion(t,r)):2==a.length&&(u=new e(this.start,this.end._getTransformedByDeletion(t,r)));var s=n._getTransformedByDeletion(t,r);return o=u?u._getTransformedByInsertion(s,r,null!==l):[],l&&o.push(new e(l.start._getCombined(i.start,s),l.end._getCombined(i.start,s))),o}},{key:"isCollapsed",get:function(){return this.start.isEqual(this.end)}},{key:"isFlat",get:function(){return this.start.parent===this.end.parent}},{key:"root",get:function(){return this.start.root}}],[{key:"createFromPositionAndShift",value:function(e,t){var n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}},{key:"createFromParentsAndOffsets",value:function(e,t,n,r){return new this(l.default.createFromParentAndOffset(e,t),l.default.createFromParentAndOffset(n,r))}},{key:"createFromRange",value:function(e){return new this(e.start,e.end)}},{key:"createIn",value:function(e){return this.createFromParentsAndOffsets(e,0,e,e.maxOffset)}},{key:"createOn",value:function(e){return this.createFromPositionAndShift(l.default.createBefore(e),e.offsetSize)}},{key:"createFromRanges",value:function(e){if(0===e.length)throw new d.default("range-create-from-ranges-empty-array: At least one range has to be passed.");if(1==e.length)return this.createFromRange(e[0]);var t=e[0];e.sort(function(e,t){return e.start.isAfter(t.start)});for(var n=e.indexOf(t),r=new this(t.start,t.end),o=n-1;o>=0&&e[o].end.isEqual(r.start);o++)r.start=l.default.createFromPosition(e[o].start);for(var i=n+1;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null;return t?"element"==e&&t==this.name:"element"==e||e==this.name}},{key:"getChild",value:function(e){return this._children.getNode(e)}},{key:"getChildren",value:function(){return this._children[Symbol.iterator]()}},{key:"getChildIndex",value:function(e){return this._children.getNodeIndex(e)}},{key:"getChildStartOffset",value:function(e){return this._children.getNodeStartOffset(e)}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e?Array.from(this._children).map(function(e){return e.clone()}):Array.from(this._children);return new t(this.name,this.getAttributes(),n)}},{key:"offsetToIndex",value:function(e){return this._children.offsetToIndex(e)}},{key:"appendChildren",value:function(e){this.insertChildren(this.childCount,e)}},{key:"insertChildren",value:function(e,t){t=u(t);var n=!0,r=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){i.value.parent=this}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}this._children.insertNodes(e,t)}},{key:"removeChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this._children.removeNodes(e,t),r=!0,o=!1,i=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){a.value.parent=null}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}},{key:"getNodeByPath",value:function(e){var t=this,n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value;t=t.getChild(u)}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return t}},{key:"toJSON",value:function(){var e=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"toJSON",this).call(this);if(e.name=this.name,this._children.length>0){e.children=[];var n=!0,r=!1,o=void 0;try{for(var i,a=this._children[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value;e.children.push(u.toJSON())}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}}return e}},{key:"childCount",get:function(){return this._children.length}},{key:"maxOffset",get:function(){return this._children.maxOffset}},{key:"isEmpty",get:function(){return 0===this.childCount}}],[{key:"fromJSON",value:function(e){var n=null;if(e.children){n=[];var r=!0,o=!1,i=void 0;try{for(var a,u=e.children[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;l.name?n.push(t.fromJSON(l)):n.push(v.default.fromJSON(l))}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}}return new t(e.name,e.attributes,n)}}]),t}(c.default);t.default=_},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1?d(e,t.substr(0,t.lastIndexOf(":"))):null}function h(e,t,n){var r=!0,i=!1,a=void 0;try{for(var u,l=e[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){var s=p(u.value,2),f=s[0],c=s[1];c?"function"==typeof c&&(c=c(t.name)):c=t.name;var d=new y.default(t.source,c);d.path=[].concat(o(t.path)),f.fire.apply(f,[d].concat(o(n)))}}catch(e){i=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}}Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +t._getEmitterListenedTo=i,t._setEmitterId=a,t._getEmitterId=u;var v=n(421),y=r(v),b=n(68),_=r(b),m=n(522),g=r(m),w=Symbol("listeningTo"),k=Symbol("emitterId"),O={on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(this,e);var r=c(this,e),o=g.default.get(n.priority);t={callback:t,context:n.context||this,priority:o};var i=!0,a=!1,u=void 0;try{for(var l,s=r[Symbol.iterator]();!(i=(l=s.next()).done);i=!0){for(var d=l.value,h=!1,p=0;p1?o-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:"default";o(this,e),this.document=t,this.deltas=[],this.type=n}return a(e,[{key:"addDelta",value:function(e){return e.batch=this,this.deltas.push(e),e}},{key:"getOperations",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=!1,r=void 0,e.prev=3,o=this.deltas[Symbol.iterator]();case 5:if(t=(i=o.next()).done){e.next=11;break}return a=i.value,e.delegateYield(a.operations,"t0",8);case 8:t=!0,e.next=5;break;case 11:e.next=17;break;case 13:e.prev=13,e.t1=e.catch(3),n=!0,r=e.t1;case 17:e.prev=17,e.prev=18,!t&&o.return&&o.return();case 20:if(e.prev=20,!n){e.next=23;break}throw r;case 23:return e.finish(20);case 24:return e.finish(17);case 25:case"end":return e.stop()}},e,this,[[3,13,17,25],[18,,20,24]])})},{key:"baseVersion",get:function(){return this.deltas.length>0?this.deltas[0].baseVersion:null}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0?this.operations[0].baseVersion:null},set:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this.operations[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.baseVersion=e++}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}}},{key:"_reverseDeltaClass",get:function(){return e}}],[{key:"className",get:function(){return"engine.model.delta.Delta"}},{key:"_priority",get:function(){return 0}}]),e}();t.default=f,s.default.register(f)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:null;return t?"element"==e&&t==this.name:"element"==e||e==this.name}},{key:"clone",value:function(e){var t=[];if(e){var n=!0,r=!1,o=void 0;try{for(var i,a=this.getChildren()[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value;t.push(u.clone(e))}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}}var l=new this.constructor(this.name,this._attrs,t);return l._classes=new Set(this._classes),l._styles=new Map(this._styles),l._customProperties=new Map(this._customProperties),l.getFillerOffset=this.getFillerOffset,l}},{key:"appendChildren",value:function(e){return this.insertChildren(this.childCount,e)}},{key:"getChild",value:function(e){return this._children[e]}},{key:"getChildIndex",value:function(e){return this._children.indexOf(e)}},{key:"getChildren",value:function(){return this._children[Symbol.iterator]()}},{key:"getAttributeKeys",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._classes.size>0)){e.next=3;break}return e.next=3,"class";case 3:if(!(this._styles.size>0)){e.next=6;break}return e.next=6,"style";case 6:t=!0,n=!1,r=void 0,e.prev=9,o=this._attrs.keys()[Symbol.iterator]();case 11:if(t=(i=o.next()).done){e.next=18;break}return a=i.value,e.next=15,a;case 15:t=!0,e.next=11;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(9),n=!0,r=e.t0;case 24:e.prev=24,e.prev=25,!t&&o.return&&o.return();case 27:if(e.prev=27,!n){e.next=30;break}throw r;case 30:return e.finish(27);case 31:return e.finish(24);case 32:case"end":return e.stop()}},e,this,[[9,20,24,32],[25,,27,31]])})},{key:"getAttributes",value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this._attrs.entries(),"t0",1);case 1:if(!(this._classes.size>0)){e.next=4;break}return e.next=4,["class",this.getAttribute("class")];case 4:if(!(this._styles.size>0)){e.next=7;break}return e.next=7,["style",this.getAttribute("style")];case 7:case"end":return e.stop()}},e,this)})},{key:"getAttribute",value:function(e){if("class"!=e){if("style"!=e)return this._attrs.get(e);if(this._styles.size>0){var t="",n=!0,r=!1,i=void 0;try{for(var a,u=this._styles[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=c(a.value,2);t+=l[0]+":"+l[1]+";"}}catch(e){r=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}return t}}else if(this._classes.size>0)return[].concat(o(this._classes)).join(" ")}},{key:"hasAttribute",value:function(e){return"class"==e?this._classes.size>0:"style"==e?this._styles.size>0:this._attrs.has(e)}},{key:"setAttribute",value:function(e,t){this._fireChange("attributes",this),"class"==e?s(this._classes,t):"style"==e?l(this._styles,t):this._attrs.set(e,t)}},{key:"insertChildren",value:function(e,t){this._fireChange("children",this);var n=0;t=f(t);var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;l.parent=this,this._children.splice(e,0,l),e++,n++}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}},{key:"removeAttribute",value:function(e){return this._fireChange("attributes",this),"class"==e?this._classes.size>0&&(this._classes.clear(),!0):"style"==e?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(e)}},{key:"removeChildren",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(var n=e;n0&&n(f)?t>1?o(f,t-1,n,r,i):(0,a.default)(i,f):r||(i[i.length]=f)}return i}Object.defineProperty(t,"__esModule",{value:!0});var i=n(83),a=r(i),u=n(477),l=r(u);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t.startPosition=this;var n=new u.default(t);return n.skip(e),n.position}},{key:"getAncestors",value:function(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeNode:!0})}},{key:"isEqual",value:function(e){return this.parent==e.parent&&this.offset==e.offset}},{key:"isBefore",value:function(e){return"before"==this.compareWith(e)}},{key:"isAfter",value:function(e){return"after"==this.compareWith(e)}},{key:"compareWith",value:function(e){if(this.isEqual(e))return"same";if(this.parent===e.parent)return this.offset-e.offset<0?"before":"after";var t=this.getAncestors(),n=e.getAncestors(),r=(0,s.default)(t,n),o=void 0;switch(r){case 0:return"different";case"prefix":o=t.length-1;break;case"extension":o=n.length-1;break;default:o=r-1}var i=t[o],a=t[o+1],u=n[o+1];if(i===this.parent){return this.offset-u.index<=0?"before":"after"}if(i===e.parent){return a.index-e.offset<0?"before":"after"}return a.index-u.index<0?"before":"after"}},{key:"nodeAfter",get:function(){return this.parent.is("text")?null:this.parent.getChild(this.offset)||null}},{key:"nodeBefore",get:function(){return this.parent.is("text")?null:this.parent.getChild(this.offset-1)||null}},{key:"isAtStart",get:function(){return 0===this.offset}},{key:"isAtEnd",get:function(){var e=this.parent.is("text")?this.parent.data.length:this.parent.childCount;return this.offset===e}},{key:"root",get:function(){return this.parent.root}},{key:"editableElement",get:function(){for(var e=this.parent;!(e instanceof h.default);){if(!e.parent)return null;e=e.parent}return e}}],[{key:"createAt",value:function(t,n){if(t instanceof e)return this.createFromPosition(t);var r=t;if("end"==n)n=r.is("text")?r.data.length:r.childCount;else{if("before"==n)return this.createBefore(r);if("after"==n)return this.createAfter(r);n||(n=0)}return new e(r,n)}},{key:"createAfter",value:function(t){if(t.is("textProxy"))return new e(t.textNode,t.offsetInText+t.data.length);if(!t.parent)throw new c.default("view-position-after-root: You can not make position after root.",{root:t});return new e(t.parent,t.index+1)}},{key:"createBefore",value:function(t){if(t.is("textProxy"))return new e(t.textNode,t.offsetInText);if(!t.parent)throw new c.default("view-position-before-root: You can not make position before root.",{root:t});return new e(t.parent,t.index)}},{key:"createFromPosition",value:function(e){return new this(e.parent,e.offset)}}]),e}();t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;ne.maxOffset)throw new v.default("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.");if(e===t&&n=n&&this.targetPosition.path[o]1)throw new y.default("observable-bind-to-no-callback: Binding multiple observables only possible with callback.");if(r>1&&t.callback)throw new y.default("observable-bind-to-extra-callback: Cannot bind multiple attributes and use a callback in one binding.");t.to.forEach(function(t){if(t.attrs.length&&t.attrs.length!==r)throw new y.default("observable-bind-to-attrs-length: The number of attributes must match.");t.attrs.length||(t.attrs=e._bindAttrs)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),c(this._observable,this._to),s(this),this._bindAttrs.forEach(function(t){f(e._observable,t)})}function a(e){return e.every(function(e){return"string"==typeof e})}function u(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,e),!t.boundaries&&!t.startPosition)throw new y.default("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.");var n=t.direction||"forward";if("forward"!=n&&"backward"!=n)throw new y.default("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",{direction:n});this.direction=n,this.boundaries=t.boundaries||null,t.startPosition?this.position=p.default.createFromPosition(t.startPosition):this.position=p.default.createFromPosition(this.boundaries["backward"==this.direction?"end":"start"]),this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}return a(e,[{key:Symbol.iterator,value:function(){return this}},{key:"skip",value:function(e){var t=void 0,n=void 0,r=void 0,o=void 0;do{r=this.position,o=this._visitedParent;var i=this.next();t=i.done,n=i.value}while(!t&&e(n));t||(this.position=r,this._visitedParent=o)}},{key:"next",value:function(){return"forward"==this.direction?this._next():this._previous()}},{key:"_next",value:function(){var e=this.position,t=p.default.createFromPosition(this.position),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};var r=t.textNode?t.textNode:t.nodeAfter;if(r instanceof d.default)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=r),this.position=t,i("elementStart",r,e,t,1);if(r instanceof l.default){var o=void 0,a=void 0;if(this.singleCharacters)o=1;else{var u=r.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsetu&&(u=this.boundaries.start.offset),o=t.offset-u}a=t.offset-r.startOffset;var s=new f.default(r,a-o,o);return t.offset-=o,this.position=t,i("text",s,e,t,o)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,i("elementStart",n,e,t,1)}}]),e}();t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;o(this,e),this.start=l.default.createFromPosition(t),this.end=n?l.default.createFromPosition(n):l.default.createFromPosition(t)}return a(e,[{key:Symbol.iterator,value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(new f.default({boundaries:this,ignoreElementEnd:!0}),"t0",1);case 1:case"end":return e.stop()}},e,this)})},{key:"getEnlarged",value:function(){var t=this.start.getLastMatchingPosition(i,{direction:"backward"}),n=this.end.getLastMatchingPosition(i);return t.parent.is("text")&&t.isAtStart&&(t=l.default.createBefore(t.parent)),n.parent.is("text")&&n.isAtEnd&&(n=l.default.createAfter(n.parent)),new e(t,n)}},{key:"getTrimmed",value:function(){var t=this.start.getLastMatchingPosition(i),n=this.end.getLastMatchingPosition(i,{direction:"backward"}),r=t.nodeAfter,o=n.nodeBefore;return r&&r.is("text")&&(t=new l.default(r,0)),o&&o.is("text")&&(n=new l.default(o,o.data.length)),new e(t,n)}},{key:"isEqual",value:function(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}},{key:"containsPosition",value:function(e){return e.isAfter(this.start)&&e.isBefore(this.end)}},{key:"containsRange",value:function(e){return this.containsPosition(e.start)&&this.containsPosition(e.end)}},{key:"getDifference",value:function(t){var n=[];return this.isIntersecting(t)?(this.containsPosition(t.start)&&n.push(new e(this.start,t.start)),this.containsPosition(t.end)&&n.push(new e(t.end,this.end))):n.push(e.createFromRange(this)),n}},{key:"getIntersection",value:function(t){if(this.isIntersecting(t)){var n=this.start,r=this.end;return this.containsPosition(t.start)&&(n=t.start),this.containsPosition(t.end)&&(r=t.end),new e(n,r)}return null}},{key:"getWalker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.boundaries=this,new f.default(e)}},{key:"getItems",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,u,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l.boundaries=this,l.ignoreElementEnd=!0,t=new f.default(l),n=!0,r=!1,o=void 0,e.prev=6,i=t[Symbol.iterator]();case 8:if(n=(a=i.next()).done){e.next=15;break}return u=a.value,e.next=12,u.item;case 12:n=!0,e.next=8;break;case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(6),r=!0,o=e.t0;case 21:e.prev=21,e.prev=22,!n&&i.return&&i.return();case 24:if(e.prev=24,!r){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(21);case 29:case"end":return e.stop()}},e,this,[[6,17,21,29],[22,,24,28]])})},{key:"getPositions",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,u,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l.boundaries=this,t=new f.default(l),e.next=4,t.position;case 4:n=!0,r=!1,o=void 0,e.prev=7,i=t[Symbol.iterator]();case 9:if(n=(a=i.next()).done){e.next=16;break}return u=a.value,e.next=13,u.nextPosition;case 13:n=!0,e.next=9;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(7),r=!0,o=e.t0;case 22:e.prev=22,e.prev=23,!n&&i.return&&i.return();case 25:if(e.prev=25,!r){e.next=28;break}throw o;case 28:return e.finish(25);case 29:return e.finish(22);case 30:case"end":return e.stop()}},e,this,[[7,18,22,30],[23,,25,29]])})},{key:"isIntersecting",value:function(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}},{key:"isCollapsed",get:function(){return this.start.isEqual(this.end)}},{key:"isFlat",get:function(){return this.start.parent===this.end.parent}},{key:"root",get:function(){return this.start.root}}],[{key:"createFromParentsAndOffsets",value:function(e,t,n,r){return new this(new l.default(e,t),new l.default(n,r))}},{key:"createFromRange",value:function(e){return new this(e.start,e.end)}},{key:"createFromPositionAndShift",value:function(e,t){var n=e,r=e.getShiftedBy(t);return t>0?new this(n,r):new this(r,n)}},{key:"createIn",value:function(e){return this.createFromParentsAndOffsets(e,0,e,e.childCount)}},{key:"createOn",value:function(e){return this.createFromPositionAndShift(l.default.createBefore(e),1)}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r-1&&e%1==0&&e=this._holderElementOffset&&this.sourcePosition.path[0]++}return l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_execute",this).call(this)}},{key:"type",get:function(){return"remove"}},{key:"_holderElementOffset",get:function(){return this.targetPosition.path[0]},set:function(e){this.targetPosition.path[0]=e}},{key:"_needsHolderElement",get:function(){if(this.delta){var e=!0,n=!1,r=void 0;try{for(var o,i=this.delta.operations[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var a=o.value;if(a instanceof t){if(a==this)return!0;if(a._holderElementOffset==this._holderElementOffset)return!1}}}catch(e){n=!0,r=e}finally{try{!e&&i.return&&i.return()}finally{if(n)throw r}}}return!0}}],[{key:"fromJSON",value:function(e,n){var r=d.default.fromJSON(e.sourcePosition,n),o=new t(r,e.howMany,e.baseVersion);return o.targetPosition=d.default.fromJSON(e.targetPosition,n),o}},{key:"className",get:function(){return"engine.model.operation.RemoveOperation"}}]),t}(f.default);t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){return 0===this.childCount?0:null}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;return n?"containerElement"==e&&n==this.name||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e,n):"containerElement"==e||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e)}}]),t}(c.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){function n(){var n=e.getChild(0),r=n.getAttribute("alt");return r?r+" "+t:t}return e.setCustomProperty(f,!0),(0,u.widgetize)(e,{label:n})}function i(e){return!!e.getCustomProperty(f)&&(0,u.isWidget)(e)}function a(e){return e instanceof s.default&&"image"==e.name}Object.defineProperty(t,"__esModule",{value:!0}),t.toImageWidget=o,t.isImageWidget=i,t.isImage=a;var u=n(115),l=n(5),s=r(l),f=Symbol("isImage")},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){return!(!e||!e[Symbol.iterator])}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=-1,o=l.default,i=e.length,u=!0,s=[],c=s;if(n)u=!1,o=f.default;else if(i>=b){var h=t?null:(0,p.default)(e);if(h)return(0,y.default)(h);u=!1,o=d.default,c=new a.default}else c=t?[]:s;e:for(;++r=0&&_.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var l=b++;n=y||(y=a(t)),r=s.bind(null,n,l,!1),o=s.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=c.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function s(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=m(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function c(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var d={},h=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},p=h(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,b=0,_=[];e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},void 0===t.singleton&&(t.singleton=p()),void 0===t.insertAt&&(t.insertAt="bottom");var o=r(e);return n(o,t),function(e){for(var i=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:/.*/,n={};return n[e]=t,this.from(n)}},{key:"from",value:function(e){return e instanceof s.default||(e=new s.default(e)),this._from.push({matcher:e,consume:!1,priority:null}),this}},{key:"consuming",value:function(e){return this._from[this._from.length-1].consume=e,this}},{key:"withPriority",value:function(e){return this._from[this._from.length-1].priority=e,this}},{key:"toElement",value:function(e){function t(t){return function(n,r,o,i){var a=t.matcher.matchAll(r.input);if(a){var u=!0,l=!1,s=void 0;try{for(var f,d=a[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value,y=e instanceof Function?e(r.input):new c.default(e),b=Array.from(y.getAttributeKeys());if(i.schema.check({name:y.name,attributes:b,inside:r.context})&&o.consume(r.input,t.consume||p.match)){r.context.push(y);var _=i.convertChildren(r.input,o,r),m=h.default.createAt(y,"end");v.default.insert(m,_),r.context.pop(),r.output=y;break}}}catch(e){l=!0,s=e}finally{try{!u&&d.return&&d.return()}finally{if(l)throw s}}}}}this._setCallback(t,"normal")}},{key:"toAttribute",value:function(e,t){function n(n){return function(r,o,a,u){var l=n.matcher.matchAll(o.input);if(l){var s=!0,f=!1,c=void 0;try{for(var d,h=l[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var p=d.value;if(a.consume(o.input,n.consume||p.match)){o.output||(o.output=u.convertChildren(o.input,a,o));var v=e instanceof Function?e(o.input):{key:e,value:t};i(o.output,v,o,u);break}}}catch(e){f=!0,c=e}finally{try{!s&&h.return&&h.return()}finally{if(f)throw c}}}}}this._setCallback(n,"low")}},{key:"toMarker",value:function(e){function t(t){return function(n,r,o){var i=t.matcher.matchAll(r.input);if(i){var a=void 0;if(a=e instanceof Function?e(r.input):new c.default("$marker",{"data-name":r.input.getAttribute("data-name")}),"$marker"!=a.name||"string"!=typeof a.getAttribute("data-name"))throw new b.default("build-view-converter-invalid-marker: Invalid model element to mark marker range.");var u=!0,l=!1,s=void 0;try{for(var f,d=i[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;if(o.consume(r.input,t.consume||h.match)){r.output=a;break}}}catch(e){l=!0,s=e}finally{try{!u&&d.return&&d.return()}finally{if(l)throw s}}}}}this._setCallback(t,"normal")}},{key:"_setCallback",value:function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=this._from[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,l=u.matcher.getElementName(),s=l?"element:"+l:"element",f=e(u),c=null===u.priority?t:u.priority,d=!0,h=!1,p=void 0;try{for(var v,y=this._dispatchers[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){v.value.on(s,f,{priority:c})}}catch(e){h=!0,p=e}finally{try{!d&&y.return&&y.return()}finally{if(h)throw p}}}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}}}]),e}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return"string"==typeof e?[new d.default(e)]:((0,p.default)(e)||(e=[e]),Array.from(e).map(function(e){return"string"==typeof e?new d.default(e):e}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1,n=this._children.removeNodes(e,t),r=!0,o=!1,i=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){a.value.parent=null}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}},{key:"toJSON",value:function(){var e=[],t=!0,n=!1,r=void 0;try{for(var o,i=this._children[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.push(a.toJSON())}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}return e}},{key:"childCount",get:function(){return this._children.length}},{key:"maxOffset",get:function(){return this._children.maxOffset}},{key:"isEmpty",get:function(){return 0===this.childCount}},{key:"root",get:function(){return this}},{key:"parent",get:function(){return null}}],[{key:"fromJSON",value:function(t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;l.name?n.push(f.default.fromJSON(l)):n.push(d.default.fromJSON(l))}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return new e(n)}}]),e}();t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{includeNode:!1,parentFirst:!1},t=[],n=e.includeNode?this:this.parent;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"remove",value:function(){this.parent.removeChildren(this.index)}},{key:"hasAttribute",value:function(e){return this._attrs.has(e)}},{key:"getAttribute",value:function(e){return this._attrs.get(e)}},{key:"getAttributes",value:function(){return this._attrs.entries()}},{key:"getAttributeKeys",value:function(){return this._attrs.keys()}},{key:"setAttribute",value:function(e,t){this._attrs.set(e,t)}},{key:"setAttributesTo",value:function(e){this._attrs=(0,l.default)(e)}},{key:"removeAttribute",value:function(e){return this._attrs.delete(e)}},{key:"clearAttributes",value:function(){this._attrs.clear()}},{key:"toJSON",value:function(){var e={};return this._attrs.size&&(e.attributes=[].concat(o(this._attrs))),e}},{key:"index",get:function(){var e=void 0;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new f.default("model-node-not-found-in-parent: The node's parent does not contain this node.");return e}},{key:"startOffset",get:function(){var e=void 0;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new f.default("model-node-not-found-in-parent: The node's parent does not contain this node.");return e}},{key:"offsetSize",get:function(){return 1}},{key:"endOffset",get:function(){return this.parent?this.startOffset+this.offsetSize:null}},{key:"nextSibling",get:function(){var e=this.index;return null!==e&&this.parent.getChild(e+1)||null}},{key:"previousSibling",get:function(){var e=this.index;return null!==e&&this.parent.getChild(e-1)||null}},{key:"root",get:function(){for(var e=this;e.parent;)e=e.parent;return e}},{key:"document",get:function(){return this.root==this?null:this.root.document||null}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return!t.has(e)&&(t.add(e),e.document.schema.itemExtends(e.name,"$block")&&e.parent)}function a(e,t){var n=e.parent.getAncestors({parentFirst:!0,includeNode:!0}),r=n.find(function(e){return i(e,t)});return n.forEach(function(e){return t.add(e)}),r}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];this._pushRange(e),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}},{key:"removeAllRanges",value:function(){this._ranges.length>0&&(this._removeAllRanges(),this.fire("change:range",{directChange:!0}))}},{key:"setRanges",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Array.from(e);var r=e.some(function(e){if(!(e instanceof p.default))throw new _.default("model-selection-added-not-range: Trying to add an object that is not an instance of Range.");return t._ranges.every(function(t){return!t.isEqual(e)})});if(e.length!==this._ranges.length||r){this._removeAllRanges();var o=!0,i=!1,a=void 0;try{for(var u,l=e[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var s=u.value;this._pushRange(s)}}catch(e){i=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(i)throw a}}this._lastRangeBackward=!!n,this.fire("change:range",{directChange:!0})}}},{key:"setTo",value:function(e){this.setRanges(e.getRanges(),e.isBackward)}},{key:"collapse",value:function(e,t){var n=f.default.createAt(e,t),r=new p.default(n,n);this.setRanges([r])}},{key:"collapseToStart",value:function(){var e=this.getFirstPosition();null!==e&&this.setRanges([new p.default(e,e)])}},{key:"collapseToEnd",value:function(){var e=this.getLastPosition();null!==e&&this.setRanges([new p.default(e,e)])}},{key:"setFocus",value:function(e,t){if(null===this.anchor)throw new _.default("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.");var n=f.default.createAt(e,t);if("same"!=n.compareWith(this.focus)){var r=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(r)?this.addRange(new p.default(n,r),!0):this.addRange(new p.default(r,n))}}},{key:"getAttribute",value:function(e){return this._attrs.get(e)}},{key:"getAttributes",value:function(){return this._attrs.entries()}},{key:"getAttributeKeys",value:function(){return this._attrs.keys()}},{key:"hasAttribute",value:function(e){return this._attrs.has(e)}},{key:"clearAttributes",value:function(){if(this._attrs.size>0){var e=Array.from(this._attrs.keys());this._attrs.clear(),this.fire("change:attribute",{attributeKeys:e,directChange:!0})}}},{key:"removeAttribute",value:function(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}},{key:"setAttribute",value:function(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}},{key:"setAttributesTo",value:function(e){if(e=(0,k.default)(e),!(0,P.default)(e,this._attrs)){var t=new Set(Array.from(e.keys()).concat(Array.from(this._attrs.keys()))),n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=u(i.value,2),s=l[0],f=l[1];this._attrs.get(s)===f&&t.delete(s)}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}this._attrs=e,this.fire("change:attribute",{attributeKeys:Array.from(t),directChange:!0})}}},{key:"getSelectedElement",value:function(){if(1!==this.rangeCount)return null;var e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof d.default&&t==n?t:null}},{key:"getSelectedBlocks",value:regeneratorRuntime.mark(function e(){var t,n,r,o,u,l,s,f,c,d,h,p,v,y,b;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=new WeakSet,n=!0,r=!1,o=void 0,e.prev=4,u=this.getRanges()[Symbol.iterator]();case 6:if(n=(l=u.next()).done){e.next=46;break}if(s=l.value,!(f=a(s.start,t))){e.next=12;break}return e.next=12,f;case 12:c=!0,d=!1,h=void 0,e.prev=15,p=s.getWalker()[Symbol.iterator]();case 17:if(c=(v=p.next()).done){e.next=25;break}if(y=v.value,"elementEnd"!=y.type||!i(y.item,t)){e.next=22;break}return e.next=22,y.item;case 22:c=!0,e.next=17;break;case 25:e.next=31;break;case 27:e.prev=27,e.t0=e.catch(15),d=!0,h=e.t0;case 31:e.prev=31,e.prev=32,!c&&p.return&&p.return();case 34:if(e.prev=34,!d){e.next=37;break}throw h;case 37:return e.finish(34);case 38:return e.finish(31);case 39:if(!(b=a(s.end,t))){e.next=43;break}return e.next=43,b;case 43:n=!0,e.next=6;break;case 46:e.next=52;break;case 48:e.prev=48,e.t1=e.catch(4),r=!0,o=e.t1;case 52:e.prev=52,e.prev=53,!n&&u.return&&u.return();case 55:if(e.prev=55,!r){e.next=58;break}throw o;case 58:return e.finish(55);case 59:return e.finish(52);case 60:case"end":return e.stop()}},e,this,[[4,48,52,60],[15,27,31,39],[32,,34,38],[53,,55,59]])})},{key:"_pushRange",value:function(e){if(!(e instanceof p.default))throw new _.default("model-selection-added-not-range: Trying to add an object that is not an instance of Range.");this._checkRange(e),this._ranges.push(p.default.createFromRange(e))}},{key:"_checkRange",value:function(e){for(var t=0;t0;)this._popRange()}},{key:"anchor",get:function(){if(this._ranges.length>0){var e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}},{key:"focus",get:function(){if(this._ranges.length>0){var e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}},{key:"isCollapsed",get:function(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}},{key:"rangeCount",get:function(){return this._ranges.length}},{key:"isBackward",get:function(){return!this.isCollapsed&&this._lastRangeBackward}}],[{key:"createFromSelection",value:function(e){var t=new this;return t.setTo(e),t}}]),e}();t.default=j,(0,g.default)(j,y.default)},function(e,t,n){"use strict";function r(e){return e instanceof Text&&e.data.substr(0,f)===c}function o(e){return e.data.length==f&&r(e)}function i(e){return r(e)?e.data.slice(f):e.data}function a(e,t){var n=h.get(t);return n||(n=t(window.document),h.set(t,n)),e.isEqualNode(n)}function u(e){e.on("keydown",l)}function l(e,t){if(t.keyCode==s.keyCodes.arrowleft){var n=t.domTarget.ownerDocument.defaultView.getSelection();if(1==n.rangeCount&&n.getRangeAt(0).collapsed){var o=n.getRangeAt(0).startContainer,i=n.getRangeAt(0).startOffset;if(r(o)&&i<=f){var a=new Range;a.setStart(o,0),a.collapse(!0),n.removeAllRanges(),n.addRange(a)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.INLINE_FILLER=t.INLINE_FILLER_LENGTH=t.NBSP_FILLER=t.BR_FILLER=void 0,t.startsWithFiller=r,t.isInlineFiller=o,t.getDataWithoutFiller=i,t.isBlockFiller=a,t.injectQuirksHandling=u;for(var s=n(21),f=(t.BR_FILLER=function(e){var t=e.createElement("br");return t.dataset.ckeFiller=!0,t},t.NBSP_FILLER=function(e){return e.createTextNode(" ")},t.INLINE_FILLER_LENGTH=7),c=t.INLINE_FILLER="",d=0;d=b&&(i=y.default,u=!1,t=new a.default(t));e:for(;++o=t&&e1&&void 0!==arguments[1]?arguments[1]:1;return this._nodes.splice(e,t)}},{key:"toJSON",value:function(){return this._nodes.map(function(e){return e.toJSON()})}},{key:"length",get:function(){return this._nodes.length}},{key:"maxOffset",get:function(){return this._nodes.reduce(function(e,t){return e+t.offsetSize},0)}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nt.offsetSize)throw new u.default("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.");if(r<0||n+r>t.offsetSize)throw new u.default("model-textproxy-wrong-length: Given length value is incorrect.");this.data=t.data.substring(n,n+r),this.offsetInText=n}return i(e,[{key:"is",value:function(e){return"textProxy"==e}},{key:"getPath",value:function(){var e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}},{key:"getAncestors",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeNode:!1,parentFirst:!1},t=[],n=e.includeNode?this:this.parent;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"hasAttribute",value:function(e){return this.textNode.hasAttribute(e)}},{key:"getAttribute",value:function(e){return this.textNode.getAttribute(e)}},{key:"getAttributes",value:function(){return this.textNode.getAttributes()}},{key:"getAttributeKeys",value:function(){return this.textNode.getAttributeKeys()}},{key:"startOffset",get:function(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}},{key:"offsetSize",get:function(){return this.data.length}},{key:"endOffset",get:function(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}},{key:"isPartial",get:function(){return this.offsetSize!==this.textNode.offsetSize}},{key:"parent",get:function(){return this.textNode.parent}},{key:"root",get:function(){return this.textNode.root}},{key:"document",get:function(){return this.textNode.document}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{includeNode:!1,parentFirst:!1},t=[],n=e.includeNode?this:this.parent;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"remove",value:function(){this.parent.removeChildren(this.index)}},{key:"_fireChange",value:function(e,t){this.fire("change:"+e,t),this.parent&&this.parent._fireChange(e,t)}},{key:"index",get:function(){var e=void 0;if(!this.parent)return null;if((e=this.parent.getChildIndex(this))==-1)throw new u.default("view-node-not-found-in-parent: The node's parent does not contain this node.");return e}},{key:"nextSibling",get:function(){var e=this.index;return null!==e&&this.parent.getChild(e+1)||null}},{key:"previousSibling",get:function(){var e=this.index;return null!==e&&this.parent.getChild(e-1)||null}},{key:"root",get:function(){for(var e=this;e.parent;)e=e.parent;return e}},{key:"document",get:function(){return this.parent instanceof e?this.parent.document:null}}]),e}();t.default=d,(0,c.default)(d,s.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._isFake=e,this._fakeSelectionLabel=e?t.label||"":"",this.fire("change")}},{key:"addRange",value:function(e,t){if(!(e instanceof s.default))throw new u.default("view-selection-invalid-range: Invalid Range.");this._pushRange(e),this._lastRangeBackward=!!t,this.fire("change")}},{key:"getRanges",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=!1,r=void 0,e.prev=3,o=this._ranges[Symbol.iterator]();case 5:if(t=(i=o.next()).done){e.next=12;break}return a=i.value,e.next=9,s.default.createFromRange(a);case 9:t=!0,e.next=5;break;case 12:e.next=18;break;case 14:e.prev=14,e.t0=e.catch(3),n=!0,r=e.t0;case 18:e.prev=18,e.prev=19,!t&&o.return&&o.return();case 21:if(e.prev=21,!n){e.next=24;break}throw r;case 24:return e.finish(21);case 25:return e.finish(18);case 26:case"end":return e.stop()}},e,this,[[3,14,18,26],[19,,21,25]])})},{key:"getFirstRange",value:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var o,i=this._ranges[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e&&!a.start.isBefore(e.start)||(e=a)}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}return e?s.default.createFromRange(e):null}},{key:"getLastRange",value:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var o,i=this._ranges[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e&&!a.end.isAfter(e.end)||(e=a)}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}return e?s.default.createFromRange(e):null}},{key:"getFirstPosition",value:function(){var e=this.getFirstRange();return e?c.default.createFromPosition(e.start):null}},{key:"getLastPosition",value:function(){var e=this.getLastRange();return e?c.default.createFromPosition(e.end):null}},{key:"isEqual",value:function(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;var t=!0,n=!1,r=void 0;try{for(var o,i=this._ranges[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value,u=!1,l=!0,s=!1,f=void 0;try{for(var c,d=e._ranges[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var h=c.value;if(a.isEqual(h)){u=!0;break}}}catch(e){s=!0,f=e}finally{try{!l&&d.return&&d.return()}finally{if(s)throw f}}if(!u)return!1}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}return!0}},{key:"removeAllRanges",value:function(){this._ranges.length&&(this._ranges=[],this.fire("change"))}},{key:"setRanges",value:function(e,t){this._ranges=[];var n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value;if(!(l instanceof s.default))throw new u.default("view-selection-invalid-range: Invalid Range.");this._pushRange(l)}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}this._lastRangeBackward=!!t,this.fire("change")}},{key:"setTo",value:function(e){this._isFake=e._isFake,this._fakeSelectionLabel=e._fakeSelectionLabel,this.setRanges(e.getRanges(),e.isBackward)}},{key:"collapse",value:function(e,t){var n=c.default.createAt(e,t),r=new s.default(n,n);this.setRanges([r])}},{key:"collapseToStart",value:function(){var e=this.getFirstPosition();null!==e&&this.setRanges([new s.default(e,e)])}},{key:"collapseToEnd",value:function(){var e=this.getLastPosition();null!==e&&this.setRanges([new s.default(e,e)])}},{key:"setFocus",value:function(e,t){if(null===this.anchor)throw new u.default("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.");var n=c.default.createAt(e,t);if("same"!=n.compareWith(this.focus)){var r=this.anchor;this._ranges.pop(),"before"==n.compareWith(r)?this.addRange(new s.default(n,r),!0):this.addRange(new s.default(r,n))}}},{key:"getSelectedElement",value:function(){if(1!==this.rangeCount)return null;var e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof b.default&&t==n?t:null}},{key:"_pushRange",value:function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=this._ranges[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(e.isIntersecting(a))throw new u.default("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",{addedRange:e,intersectingRange:a})}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}this._ranges.push(s.default.createFromRange(e))}},{key:"isFake",get:function(){return this._isFake}},{key:"fakeSelectionLabel",get:function(){return this._fakeSelectionLabel}},{key:"anchor",get:function(){if(!this._ranges.length)return null;var e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.end:e.start;return c.default.createFromPosition(t)}},{key:"focus",get:function(){if(!this._ranges.length)return null;var e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.start:e.end;return c.default.createFromPosition(t)}},{key:"isCollapsed",get:function(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}},{key:"rangeCount",get:function(){return this._ranges.length}},{key:"isBackward",get:function(){return!this.isCollapsed&&this._lastRangeBackward}},{key:"editableElement",get:function(){return this.anchor?this.anchor.editableElement:null}}],[{key:"createFromSelection",value:function(t){var n=new e;return n.setTo(t),n}}]),e}();t.default=_,(0,h.default)(_,v.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,e),!t.boundaries&&!t.startPosition)throw new v.default("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.");if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new v.default("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this.position=h.default.createFromPosition(t.startPosition):this.position=h.default.createFromPosition(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}return i(e,[{key:Symbol.iterator,value:function(){return this}},{key:"skip",value:function(e){var t=void 0,n=void 0,r=void 0;do{r=this.position;var o=this.next();t=o.done,n=o.value}while(!t&&e(n));t||(this.position=r)}},{key:"next",value:function(){return"forward"==this.direction?this._next():this._previous()}},{key:"_next",value:function(){var e=h.default.createFromPosition(this.position),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};var r=void 0;if(n instanceof s.default){if(e.isAtEnd)return this.position=h.default.createAfter(n),this._next();r=n.data[e.offset]}else r=n.getChild(e.offset);if(r instanceof u.default)return this.shallow?e.offset++:e=new h.default(r,0),this.position=e,this._formatReturnValue("elementStart",r,t,e,1);if(r instanceof s.default){if(this.singleCharacters)return e=new h.default(r,0),this.position=e,this._next();var o=r.data.length,i=r;return r==this._boundaryEndParent?(o=this.boundaries.end.offset,i=new c.default(r,0,o),e=h.default.createAfter(i)):e.offset++,this.position=e,this._formatReturnValue("text",i,t,e,o)}if("string"==typeof r){var a=void 0;if(this.singleCharacters)a=1;else{a=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset}var l=new c.default(n,e.offset,a);return e.offset+=a,this.position=e,this._formatReturnValue("text",l,t,e,a)}return e=h.default.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}},{key:"_previous",value:function(){var e=h.default.createFromPosition(this.position),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};var r=void 0;if(n instanceof s.default){if(e.isAtStart)return this.position=h.default.createBefore(n),this._previous();r=n.data[e.offset-1]}else r=n.getChild(e.offset-1);if(r instanceof u.default)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",r,t,e,1)):(e=new h.default(r,r.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",r,t,e));if(r instanceof s.default){if(this.singleCharacters)return e=new h.default(r,r.data.length),this.position=e,this._previous();var o=r.data.length,i=r;if(r==this._boundaryStartParent){var a=this.boundaries.start.offset;i=new c.default(r,a,r.data.length-a),o=i.data.length,e=h.default.createBefore(i)}else e.offset--;return this.position=e,this._formatReturnValue("text",i,t,e,o)}if("string"==typeof r){var l=void 0;if(this.singleCharacters)l=1;else{var f=n===this._boundaryStartParent?this.boundaries.start.offset:0;l=e.offset-f}e.offset-=l;var d=new c.default(n,e.offset,l);return this.position=e,this._formatReturnValue("text",d,t,e,l)}return e=h.default.createBefore(n),this.position=e,this._formatReturnValue("elementStart",n,t,e,1)}},{key:"_formatReturnValue",value:function(e,t,n,r,o){return t instanceof c.default&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=h.default.createAfter(t.textNode):(r=h.default.createAfter(t.textNode),this.position=r)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=h.default.createBefore(t.textNode):(r=h.default.createBefore(t.textNode),this.position=r))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:r,length:o}}}}]),e}();t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]&&arguments[1],n=e.start,r=e.end;if(T(e),e.isCollapsed){var o=g(e.start,t);return new K.default(o,o)}var i=g(r,t),a=i.parent.childCount,u=g(n,t);return i.offset+=i.parent.childCount-a,new K.default(u,i)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.offset,r=e.parent;if(e.parent.is("emptyElement"))throw new J.default("view-writer-cannot-break-empty-element");if(e.parent.is("uiElement"))throw new J.default("view-writer-cannot-break-ui-element");if(!t&&r.is("text")&&E(r.parent))return R.default.createFromPosition(e);if(E(r))return R.default.createFromPosition(e);if(r.is("text"))return g(P(e),t);if(n==r.childCount)return g(new R.default(r.parent,r.index+1),t);if(0===n){return g(new R.default(r.parent,r.index),t)}var o=r.index+1,i=r.clone();r.parent.insertChildren(o,i);var a=r.childCount-n,u=r.removeChildren(n,a);return i.appendChildren(u),g(new R.default(r.parent,o),t)}function w(e,t,n,r){for(var o=t,i=[];othis._items.length||t<0)throw new s.default("collection-add-item-invalid-index");return this._items.splice(t,0,e),this._itemMap.set(n,e),this.fire("add",e,t),this}},{key:"get",value:function(e){var t=void 0;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new s.default("collection-get-invalid-arg: Index or id must be given.");t=this._items[e]}return t||null}},{key:"getIndex",value:function(e){var t=void 0;return t="string"==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}},{key:"remove",value:function(e){var t=void 0,n=void 0,r=void 0,o=!1,i=this._idProperty;if("string"==typeof e?(n=e,r=this._itemMap.get(n),o=!r,r&&(t=this._items.indexOf(r))):"number"==typeof e?(t=e,r=this._items[t],o=!r,r&&(n=r[i])):(r=e,n=r[i],t=this._items.indexOf(r),o=t==-1||!this._itemMap.get(n)),o)throw new s.default("collection-remove-404: Item not found.");return this._items.splice(t,1),this._itemMap.delete(n),this.fire("remove",r),r}},{key:"map",value:function(e,t){return this._items.map(e,t)}},{key:"find",value:function(e,t){return this._items.find(e,t)}},{key:"filter",value:function(e,t){return this._items.filter(e,t)}},{key:"clear",value:function(){for(;this.length;)this.remove(0)}},{key:"bindTo",value:function(e){var t=this,n=function(n){var r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;t.add(n(l))}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}t.listenTo(e,"add",function(e,r,o){t.add(n(r),o)}),t.listenTo(e,"remove",function(e,n){t.remove(t._boundItemsMap.get(n)),t._boundItemsMap.delete(n)})};return{as:function(e){n(function(n){var r=new e(n);return t._boundItemsMap.set(n,r),r})},using:function(e){var r=void 0;r="function"==typeof e?function(n){var r=e(n);return t._boundItemsMap.set(n,r),r}:function(n){var r=n[e];return t._boundItemsMap.set(n,r),r},n(r)}}}},{key:Symbol.iterator,value:function(){return this._items[Symbol.iterator]()}},{key:"length",get:function(){return this._items.length}}]),e}();t.default=p,(0,h.default)(p,u.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return e["data-ck-expando"]||(e["data-ck-expando"]=(0,f.default)())}function a(e){return e&&(0,p.default)(e.addEventListener)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(7),l=r(u),s=n(68),f=r(s),c=n(56),d=r(c),h=n(231),p=r(h),v=(0,d.default)({},l.default,{listenTo:function(){for(var e=arguments.length,t=Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(l.default.on.apply(this,arguments),!this._domListeners||!this._domListeners[e]){var r=this._createDomListener(e);this._domNode.addEventListener(e,r,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=r}},off:function(e){l.default.off.apply(this,arguments);var t=void 0;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener:function(e){var t=this,n=function(n){t.fire(e,n)};return n.removeListener=function(){t._domNode.removeEventListener(e,n),delete t._domListeners[e]},n}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=-1,n=e?e.length:0;for(this.clear();++t>>1,u=e[i];null!==u&&!(0,f.default)(u)&&(n?u<=t:u>>1;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i-1&&e%1==0&&e<=o}Object.defineProperty(t,"__esModule",{value:!0});var o=9007199254740991;t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(!(0,f.default)(e)||y.call(e)!=c||(0,l.default)(e))return!1;var t=(0,a.default)(e);if(null===t)return!0;var n=p.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&h.call(n)==v}Object.defineProperty(t,"__esModule",{value:!0});var i=n(137),a=r(i),u=n(89),l=r(u),s=n(43),f=r(s),c="[object Object]",d=Object.prototype,h=Function.prototype.toString,p=d.hasOwnProperty,v=h.call(Object),y=d.toString;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(!e||!e.length)return[];var t=0;return e=(0,a.default)(e,function(e){if((0,p.default)(e))return t=v(e.length,t),!0}),(0,d.default)(t,function(t){return(0,l.default)(e,(0,f.default)(t))})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(82),a=r(i),u=n(27),l=r(u),s=n(128),f=r(s),c=n(198),d=r(c),h=n(13),p=r(h),v=Math.max;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function o(e){return function(t,n,r,o){var i=e instanceof m.default?e.clone(!0):e(n,r,o);if(i&&r.consume(n.item,"insert")){var a=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(n.item,i),O.default.insert(a,i)}}}function i(){return function(e,t,n,r){if(n.consume(t.item,"insert")){var o=r.mapper.toViewPosition(t.range.start),i=new w.default(t.item.data);O.default.insert(o,i)}}}function a(e){return function(t,n,r,o){var i=void 0,a=void 0;if(e instanceof m.default?(i=e.clone(!0),a=e.clone(!0)):(n.isOpening=!0,i=e(n,r,o),n.isOpening=!1,a=e(n,r,o)),i&&a&&r.consume(n.range,"addMarker")){var u=o.mapper;O.default.insert(u.toViewPosition(n.range.start),i),n.range.isCollapsed||O.default.insert(u.toViewPosition(n.range.end),a)}}}function u(e){return e=e||function(e,t){return{value:e,key:t}},function(t,n,r,o){if(r.consume(n.item,v(t.name))){var i=e(n.attributeNewValue,n.attributeKey,n,r,o),a=i.key,u=i.value;o.mapper.toViewElement(n.item).setAttribute(a,u)}}}function l(e){return e=e||function(e,t){return{key:t}},function(t,n,r,o){if(r.consume(n.item,v(t.name))){var i=e(n.attributeOldValue,n.attributeKey,n,r,o),a=i.key;o.mapper.toViewElement(n.item).removeAttribute(a)}}}function s(e){return function(t,n,r,o){var i=e instanceof m.default?e.clone(!0):e(n.attributeNewValue,n,r,o);if(i&&r.consume(n.item,v(t.name))){var a=o.mapper.toViewRange(n.range);if(null!==n.attributeOldValue&&!(e instanceof m.default)){var u=e(n.attributeOldValue,n,r,o);a=O.default.unwrap(a,u)}O.default.wrap(a,i)}}}function f(e){return function(t,n,r,o){var i=e instanceof m.default?e.clone(!0):e(n.attributeOldValue,n,r,o);if(i&&r.consume(n.item,v(t.name))){var a=o.mapper.toViewRange(n.range);O.default.unwrap(a,i)}}}function c(e){return function(t,n,r,o){var i=e instanceof m.default?e.clone(!0):e(n,r,o);if(i&&r.consume(n.range,"addMarker")){var a=o.mapper.toViewRange(n.range),u=O.default.breakViewRangePerContainer(a),l=!0,s=!1,f=void 0;try{for(var c,d=u[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var h=c.value;O.default.wrap(h,i)}}catch(e){s=!0,f=e}finally{try{!l&&d.return&&d.return()}finally{if(s)throw f}}}}}function d(e){return function(t,n,r,o){var i=e instanceof m.default?e.clone(!0):e(n,r,o);if(i&&r.consume(n.range,"removeMarker")){var a=o.mapper.toViewRange(n.range),u=O.default.breakViewRangePerContainer(a),l=!0,s=!1,f=void 0;try{for(var c,d=u[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var h=c.value;O.default.unwrap(h,i)}}catch(e){s=!0,f=e}finally{try{!l&&d.return&&d.return()}finally{if(s)throw f}}}}}function h(){return function(e,t,n,r){if(n.consume(t.item,"remove")){var o=b.default.createFromPositionAndShift(t.sourcePosition,t.item.offsetSize),i=r.mapper.toViewRange(o);O.default.remove(i.getTrimmed()),r.mapper.unbindModelElement(t.item)}}}function p(e){return function(t,n,r,o){var i=void 0,a=void 0;if(e instanceof m.default?(i=e.clone(!0),a=e.clone(!0)):(n.isOpening=!0,i=e(n,r,o),n.isOpening=!1,a=e(n,r,o)),i&&a&&r.consume(n.range,"removeMarker")){var u=o.mapper.toViewRange(n.range);O.default.clear(u.getEnlarged(),a),i.isSimilar(a)||O.default.clear(u.getEnlarged(),i)}}}function v(e){var t=e.split(":");return t[0]+":"+t[1]}Object.defineProperty(t,"__esModule",{value:!0}),t.insertElement=o,t.insertText=i,t.insertUIElement=a,t.setAttribute=u,t.removeAttribute=l,t.wrapItem=s,t.unwrapItem=f,t.wrapRange=c,t.unwrapRange=d,t.remove=h,t.removeUIElement=p,t.eventNameToConsumableType=v;var y=n(3),b=r(y),_=n(20),m=r(_),g=n(29),w=r(g),k=n(77),O=r(k)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;n0&&(e.operations[1].isSticky=!1),e}},{key:"type",get:function(){return"merge"}},{key:"position",get:function(){return this._removeOperation?this._removeOperation.sourcePosition:null}},{key:"_removeOperation",get:function(){return this.operations[1]||null}},{key:"_reverseDeltaClass",get:function(){return p.default}}],[{key:"className",get:function(){return"engine.model.delta.MergeDelta"}}]),t}(f.default);t.default=x,(0,v.register)("merge",function(e){var t=new x;this.addDelta(t);var n=e.nodeBefore,r=e.nodeAfter;if(!(n instanceof m.default))throw new j.default("batch-merge-no-element-before: Node before merge position must be an element.");if(!(r instanceof m.default))throw new j.default("batch-merge-no-element-after: Node after merge position must be an element.");var o=b.default.createFromParentAndOffset(r,0),i=b.default.createFromParentAndOffset(n,n.maxOffset),a=new O.default(o,r.maxOffset,i,this.document.version);a.isSticky=!0,t.addOperation(a),this.document.applyOperation(a);var u=new w.default(e,1,this.document.version);return t.addOperation(u),this.document.applyOperation(u),this}),d.default.register(x)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t,n,r,o){var i=new v.default(n,r,o,e.document.version);t.addOperation(i),e.document.applyOperation(i)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&(e.operations[0].isSticky=!0),e}},{key:"type",get:function(){return"split"}},{key:"position",get:function(){return this._moveOperation?this._moveOperation.sourcePosition:null}},{key:"_cloneOperation",get:function(){return this.operations[0]||null}},{key:"_moveOperation",get:function(){return this.operations[1]||null}},{key:"_reverseDeltaClass",get:function(){return j.default}}],[{key:"className",get:function(){return"engine.model.delta.SplitDelta"}},{key:"_priority",get:function(){return 5}}]),t}(f.default);t.default=x,(0,h.register)("split",function(e){var t=new x;this.addDelta(t);var n=e.parent;if(!n.parent)throw new O.default("batch-split-root: Root element can not be split.");var r=new b.default(n.name,n.getAttributes()),o=new m.default(v.default.createAfter(n),r,this.document.version);t.addOperation(o),this.document.applyOperation(o);var i=new w.default(e,n.maxOffset-e.offset,v.default.createFromParentAndOffset(r,0),this.document.version);return i.isSticky=!0,t.addOperation(i),this.document.applyOperation(i),this}),d.default.register(x)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tt._priority||!(e._priority0)throw new x.default("batch-wrap-element-not-empty: Element to wrap with is not empty.");if(null!==n.parent)throw new x.default("batch-wrap-element-attached: Element to wrap with is already attached to tree model.");var r=new M;this.addDelta(r);var o=new k.default(e.end,n,this.document.version);r.addOperation(o),this.document.applyOperation(o);var i=y.default.createFromParentAndOffset(n,0),a=new P.default(e.start,e.end.offset-e.start.offset,i,this.document.version);return r.addOperation(a),this.document.applyOperation(a),this}),c.default.register(M)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n1)return null;e=e.parent}return!e||e.childCount>1?null:0}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;return n?"attributeElement"==e&&n==this.name||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e,n):"attributeElement"==e||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e)}},{key:"clone",value:function(e){var n=s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"clone",this).call(this,e);return n.priority=this.priority,n}},{key:"isSimilar",value:function(e){return s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"isSimilar",this).call(this,e)&&this.priority==e.priority}}]),t}(c.default);t.default=h,h.DEFAULT_PRIORITY=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return"string"==typeof e?[new l.default(e)]:((0,d.default)(e)||(e=[e]),Array.from(e).map(function(e){return"string"==typeof e?new l.default(e):e}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1;this._fireChange("children",this);for(var n=e;n-1}Object.defineProperty(t,"__esModule",{value:!0});var i=n(125),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e,t,n){for(var r=-1,o=e.length;++r=120&&v.length>=120)?new a.default(u&&v):void 0}v=e[0];var _=-1,m=s[0];e:for(;++_-1;)s!==e&&p.call(s,c,1),p.call(e,c,1);return e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),a=r(i),u=n(125),l=r(u),s=n(438),f=r(s),c=n(131),d=r(c),h=Array.prototype,p=h.splice;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){t=n(t);for(var o=0,i=e?e.length:0,u=t!==t,c=null===t,d=(0,a.default)(t),h=void 0===t;o=t||n<0||x&&r>=g}function s(){var e=(0,l.default)();if(u(e))return p(e);k=setTimeout(s,i(e))}function p(e){return clearTimeout(k),k=void 0,M&&_?r(e):(_=m=void 0,w)}function v(){void 0!==k&&clearTimeout(k),O=P=0,_=m=k=void 0}function y(){return void 0===k?w:p((0,l.default)())}function b(){var e=(0,l.default)(),n=u(e);if(_=arguments,m=this,O=e,n){if(void 0===k)return o(O);if(x)return clearTimeout(k),k=setTimeout(s,t),r(O)}return void 0===k&&(k=setTimeout(s,t)),w}var _,m,g,w,k,O=0,P=0,j=!1,x=!1,M=!0;if("function"!=typeof e)throw new TypeError(c);return t=(0,f.default)(t)||0,(0,a.default)(n)&&(j=!!n.leading,x="maxWait"in n,g=x?d((0,f.default)(n.maxWait)||0,t):g,M="trailing"in n?!!n.trailing:M),b.cancel=v,b.flush=y,b}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),a=r(i),u=n(513),l=r(u),s=n(255),f=r(s),c="Expected a function",d=Math.max,h=Math.min;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=e?e.length:0;return r?(t=n||void 0===t?1:(0,l.default)(t),(0,a.default)(e,t<0?0:t,r)):[]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(35),a=r(i),u=n(15),l=r(u);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=e?e.length:0;return r?(t=n||void 0===t?1:(0,l.default)(t),t=r-t,(0,a.default)(e,0,t<0?0:t)):[]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(35),a=r(i),u=n(15),l=r(u);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.length?e[0]:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,a.default)(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||f.call(e)==u)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),a=r(i),u="[object Arguments]",l=Object.prototype,s=l.hasOwnProperty,f=l.toString,c=l.propertyIsEnumerable;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(0,a.default)(e)?f.call(e):"";return t==u||t==l}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),a=r(i),u="[object Function]",l="[object GeneratorFunction]",s=Object.prototype,f=s.toString;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return"string"==typeof e||!(0,a.default)(e)&&(0,l.default)(e)&&c.call(e)==s}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),a=r(i),u=n(43),l=r(u),s="[object String]",f=Object.prototype,c=f.toString;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return e&&e.length&&t&&t.length?(0,a.default)(e,t):e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(129),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e||!e.length)return[];var n=(0,f.default)(e);return null==t?n:(0,l.default)(n,function(e){return(0,a.default)(t,void 0,e)})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(191),a=r(i),u=n(27),l=r(u),s=n(98),f=r(s);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function o(e){return(0,a.default)(e)?(0,l.default)(e):new Map(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(97),a=r(i),u=n(270),l=r(u)},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=[],o=!0,i=!1,u=void 0;try{for(var s,c=t[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){for(var d=s.value,h=new a.default({boundaries:d,mergeCharacters:!0}),p=h.next(),v=d.start,y=d.start,b=d.end;!p.done;){var _=p.value.item.name||"$text",m=f.default.createBefore(p.value.item);n.check({name:_,inside:m,attributes:e})||(y.isEqual(v)||r.push(new l.default(y,v)),y=h.position),v=h.position,p=h.next()}y&&!y.isEqual(b)&&r.push(new l.default(y,b))}}catch(e){i=!0,u=e}finally{try{!o&&c.return&&c.return()}finally{if(i)throw u}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(33),a=r(i),u=n(3),l=r(u),s=n(1),f=r(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){if(t.isCollapsed)return n.check({name:"$text",inside:t.getFirstPosition(),attributes:e});var r=t.getRanges(),o=!0,i=!1,u=void 0;try{for(var l,s=r[Symbol.iterator]();!(o=(l=s.next()).done);o=!0)for(var f=l.value,c=new a.default({boundaries:f,mergeCharacters:!0}),d=c.position,h=c.next();!h.done;){var p=h.value.item.name||"$text";if(n.check({name:p,inside:d,attributes:e}))return!0;d=c.position,h=c.next()}}catch(e){i=!0,u=e}finally{try{!o&&s.return&&s.return()}finally{if(i)throw u}}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(33),a=r(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.document,r=n.selection,o=void 0===t.forceValue?!this.value:t.forceValue;n.enqueueChanges(function(){if(r.isCollapsed)o?r.setAttribute(e.attributeKey,!0):r.removeAttribute(e.attributeKey);else{var i=(0,c.default)(e.attributeKey,r.getRanges(),n.schema),a=t.batch||n.batch(),u=!0,l=!1,s=void 0;try{for(var f,d=i[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;o?a.setAttribute(h,e.attributeKey,o):a.removeAttribute(h,e.attributeKey)}}catch(e){l=!0,s=e}finally{try{!u&&d.return&&d.return()}finally{if(l)throw s}}}})}}]),t}(s.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this._modelDocument=t,this.conversionApi=(0,m.default)({dispatcher:this},n)}return i(e,[{key:"convertChange",value:function(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))}},{key:"convertInsertion",value:function(e){var t=this._createInsertConsumable(e),n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,l=u.item,f=s.default.createFromPositionAndShift(u.previousPosition,u.length),c={item:l,range:f};this._testAndFire("insert",c,t);var d=!0,h=!1,p=void 0;try{for(var v,y=l.getAttributeKeys()[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){var b=v.value;c.attributeKey=b,c.attributeOldValue=null,c.attributeNewValue=l.getAttribute(b),this._testAndFire("addAttribute:"+b,c,t)}}catch(e){h=!0,p=e}finally{try{!d&&y.return&&y.return()}finally{if(h)throw p}}}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}var _=!0,m=!1,g=void 0;try{for(var w,k=this._modelDocument.markers[Symbol.iterator]();!(_=(w=k.next()).done);_=!0){var O=w.value,P=O.getRange();P.containsPosition(e.start)&&this.convertMarker("addMarker",O.name,P.getIntersection(e)),(e.containsRange(P)||e.isEqual(P))&&this.convertMarker("addMarker",O.name,P)}}catch(e){m=!0,g=e}finally{try{!_&&k.return&&k.return()}finally{if(m)throw g}}}},{key:"convertMove",value:function(e,t){this.convertRemove(e,t),this.convertInsertion(t)}},{key:"convertRemove",value:function(e,t){var n=this._createConsumableForRange(t,"remove"),r=!0,o=!1,i=void 0;try{for(var a,u=t.getItems({shallow:!0})[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value,s={sourcePosition:e,item:l};this._testAndFire("remove",s,n)}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}}},{key:"convertAttribute",value:function(e,t,n,r,o){var i=this._createConsumableForRange(t,e+":"+n),a=!0,u=!1,l=void 0;try{for(var f,c=t[Symbol.iterator]();!(a=(f=c.next()).done);a=!0){var d=f.value,h=d.item,p=s.default.createFromPositionAndShift(d.previousPosition,d.length),v={item:h,range:p,attributeKey:n,attributeOldValue:r,attributeNewValue:o};this._testAndFire(e+":"+n,v,i)}}catch(e){u=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(u)throw l}}}},{key:"convertRename",value:function(e,t){var n=e.clone(!0);n.name=t,this.conversionApi.mapper.bindElements(n,this.conversionApi.mapper.toViewElement(e)),(new h.default).appendChildren(n),this.convertRemove(c.default.createBefore(e),s.default.createOn(n)),this.convertInsertion(s.default.createOn(e))}},{key:"convertSelection",value:function(e){var t=Array.from(this._modelDocument.markers.getMarkersAtPosition(e.getFirstPosition())),n=this._createSelectionConsumable(e,t);this.fire("selection",{selection:e},n,this.conversionApi);var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value,s={selection:e,name:l.name};n.test(e,"selectionMarker:"+l.name)&&this.fire("selectionMarker:"+l.name,s,n,this.conversionApi)}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}var f=!0,c=!1,d=void 0;try{for(var h,p=e.getAttributeKeys()[Symbol.iterator]();!(f=(h=p.next()).done);f=!0){var v=h.value,y={selection:e,key:v,value:e.getAttribute(v)};n.test(e,"selectionAttribute:"+y.key)&&this.fire("selectionAttribute:"+y.key,y,n,this.conversionApi)}}catch(e){c=!0,d=e}finally{try{!f&&p.return&&p.return()}finally{if(c)throw d}}}},{key:"convertMarker",value:function(e,t,n){if(n.root.document&&"$graveyard"!=n.root.rootName){var r=this._createMarkerConsumable(e,n),o={name:t,range:n};this.fire(e+":"+t,o,r,this.conversionApi)}}},{key:"_createInsertConsumable",value:function(e){var t=new u.default,n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var l=i.value,s=l.item;t.add(s,"insert");var f=!0,c=!1,d=void 0;try{for(var h,p=s.getAttributeKeys()[Symbol.iterator]();!(f=(h=p.next()).done);f=!0){var v=h.value;t.add(s,"addAttribute:"+v)}}catch(e){c=!0,d=e}finally{try{!f&&p.return&&p.return()}finally{if(c)throw d}}}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return t}},{key:"_createConsumableForRange",value:function(e,t){var n=new u.default,r=!0,o=!1,i=void 0;try{for(var a,l=e.getItems()[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value;n.add(s,t)}}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}},{key:"_createSelectionConsumable",value:function(e,t){var n=new u.default;n.add(e,"selection");var r=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value;n.add(e,"selectionMarker:"+s.name)}}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}var f=!0,c=!1,d=void 0;try{for(var h,p=e.getAttributeKeys()[Symbol.iterator]();!(f=(h=p.next()).done);f=!0){var v=h.value;n.add(e,"selectionAttribute:"+v)}}catch(e){c=!0,d=e}finally{try{!f&&p.return&&p.return()}finally{if(c)throw d}}return n}},{key:"_createMarkerConsumable",value:function(e,t){var n=new u.default;return n.add(t,e),n}},{key:"_testAndFire",value:function(e,t,n){if(n.test(t.item,e)){var r=t.item.name||"$text";this.fire(e+":"+r,t,n,this.conversionApi)}}}]),e}();t.default=g,(0,b.default)(g,v.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0;)n.appendChild(r[0]);return n}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t,n,r){r instanceof O.default?s(e,e.document,t,n,r):l(e,e.document,t,n,r)}function l(e,t,n,r,o){var i=o.getAttribute(n),a=void 0,u=void 0,l=o.is("rootElement")?new j:new P;e.addDelta(l),i!=r&&(o.is("rootElement")?u=new m.default(o,n,i,r,t.version):(a=o.is("element")?new O.default(w.default.createBefore(o),w.default.createFromParentAndOffset(o,0)):new O.default(w.default.createBefore(o),w.default.createAfter(o)),u=new b.default(a,n,i,r,t.version)),l.addOperation(u),t.applyOperation(u))}function s(e,t,n,r,o){function i(){var e=new O.default(u,l),o=new b.default(e,n,s,r,t.version);a.addOperation(o),t.applyOperation(o)}var a=new P;e.addDelta(a);var u=o.start,l=void 0,s=void 0,f=void 0,c=!0,d=!1,h=void 0;try{for(var p,v=o[Symbol.iterator]();!(c=(p=v.next()).done);c=!0){var y=p.value;f=y.item.getAttribute(n),l&&s!=f&&(s!=r&&i(),u=l),l=y.nextPosition,s=f}}catch(e){d=!0,h=e}finally{try{!c&&v.return&&v.return()}finally{if(d)throw h}}l instanceof w.default&&l!=u&&s!=r&&i()}Object.defineProperty(t,"__esModule",{value:!0}),t.RootAttributeDelta=void 0;var f=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.blockFiller=t.blockFiller||w.BR_FILLER,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}return a(e,[{key:"bindFakeSelection",value:function(e,t){this._fakeSelectionMapping.set(e,y.default.createFromSelection(t))}},{key:"fakeSelectionToView",value:function(e){return this._fakeSelectionMapping.get(e)}},{key:"bindElements",value:function(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}},{key:"bindDocumentFragments",value:function(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}},{key:"viewToDom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.is("text")){var r=this._processDataFromViewText(e);return t.createTextNode(r)}if(this.getCorrespondingDom(e))return this.getCorrespondingDom(e);var o=void 0;if(e.is("documentFragment"))o=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,e);else{o=t.createElement(e.name),n.bind&&this.bindElements(o,e);var i=!0,a=!1,u=void 0;try{for(var l,s=e.getAttributeKeys()[Symbol.iterator]();!(i=(l=s.next()).done);i=!0){var f=l.value;o.setAttribute(f,e.getAttribute(f))}}catch(e){a=!0,u=e}finally{try{!i&&s.return&&s.return()}finally{if(a)throw u}}}if(n.withChildren||void 0===n.withChildren){var c=!0,d=!1,h=void 0;try{for(var p,v=this.viewChildrenToDom(e,t,n)[Symbol.iterator]();!(c=(p=v.next()).done);c=!0){var y=p.value;o.appendChild(y)}}catch(e){d=!0,h=e}finally{try{!c&&v.return&&v.return()}finally{if(d)throw h}}}return o}},{key:"viewChildrenToDom",value:regeneratorRuntime.mark(function e(t,n){var r,o,i,a,u,l,s,f,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t.getFillerOffset&&t.getFillerOffset(),o=0,i=!0,a=!1,u=void 0,e.prev=5,l=t.getChildren()[Symbol.iterator]();case 7:if(i=(s=l.next()).done){e.next=18;break}if(f=s.value,r!==o){e.next=12;break}return e.next=12,this.blockFiller(n);case 12:return e.next=14,this.viewToDom(f,n,c);case 14:o++;case 15:i=!0,e.next=7;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(5),a=!0,u=e.t0;case 24:e.prev=24,e.prev=25,!i&&l.return&&l.return();case 27:if(e.prev=27,!a){e.next=30;break}throw u;case 30:return e.finish(27);case 31:return e.finish(24);case 32:if(r!==o){e.next=35;break}return e.next=35,this.blockFiller(n);case 35:case"end":return e.stop()}},e,this,[[5,20,24,32],[25,,27,31]])})},{key:"viewRangeToDom",value:function(e){var t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),r=new Range;return r.setStart(t.parent,t.offset),r.setEnd(n.parent,n.offset),r}},{key:"viewPositionToDom",value:function(e){var t=e.parent;if(t.is("text")){var n=this.getCorrespondingDomText(t);if(!n)return null;var r=e.offset;return(0,w.startsWithFiller)(n)&&(r+=w.INLINE_FILLER_LENGTH),{parent:n,offset:r}}var o=void 0,i=void 0,a=void 0;if(0===e.offset){if(!(o=this.getCorrespondingDom(e.parent)))return null;a=o.childNodes[0]}else{if(!(i=this.getCorrespondingDom(e.nodeBefore)))return null;o=i.parentNode,a=i.nextSibling}return this.isText(a)&&(0,w.startsWithFiller)(a)?{parent:a,offset:w.INLINE_FILLER_LENGTH}:{parent:o,offset:i?(0,O.default)(i)+1:0}}},{key:"domToView",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((0,w.isBlockFiller)(e,this.blockFiller))return null;if(this.isText(e)){if((0,w.isInlineFiller)(e))return null;var n=this._processDataFromDomText(e);return""===n?null:new l.default(n)}if(this.getCorrespondingView(e))return this.getCorrespondingView(e);var r=void 0;if(this.isDocumentFragment(e))r=new _.default,t.bind&&this.bindDocumentFragments(e,r);else{var o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();r=new f.default(o),t.bind&&this.bindElements(e,r);for(var i=e.attributes,a=i.length-1;a>=0;a--)r.setAttribute(i[a].name,i[a].value)}if(t.withChildren||void 0===t.withChildren){var u=!0,s=!1,c=void 0;try{for(var d,h=this.domChildrenToView(e,t)[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var p=d.value;r.appendChildren(p)}}catch(e){s=!0,c=e}finally{try{!u&&h.return&&h.return()}finally{if(s)throw c}}}return r}},{key:"domChildrenToView",value:regeneratorRuntime.mark(function e(t){var n,r,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n0){var u=!1;o?" "!=o.data.charAt(0)&&" "!=o.data.charAt(0)||i.length%2==0&&(u=!0):i.length%2&&(u=!0),u&&(i=" "+i.substr(0,i.length-1)),i=i.replace(/ /g,"  ")}return a+i}},{key:"_getTouchingViewTextNode",value:function(e,t){if(!e.parent)return null;var n=new g.default({startPosition:t?d.default.createAfter(e):d.default.createBefore(e),direction:t?"forward":"backward"}),r=!0,o=!1,i=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;if(l.item.is("containerElement"))return null;if(l.item.is("text"))return l.item}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return null}},{key:"_processDataFromDomText",value:function(e){var t=(0,w.getDataWithoutFiller)(e);if(i(e,this.preElements))return t;t=t.replace(/[^\S\u00A0]{2,}/g," ");var n=this._getTouchingDomTextNode(e,!1),r=this._getTouchingDomTextNode(e,!0);return n&&!/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1))||(t=t.replace(/^ /,"")),r||(t=t.replace(/ $/,"")),t=t.replace(/ \u00A0/g," "),n&&!/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1))||(t=t.replace(/^\u00A0/," ")),r&&" "!=r.data.charAt(0)||(t=t.replace(/\u00A0( *)$/," $1")),t}},{key:"_getTouchingDomTextNode",value:function(e,t){if(!e.parentNode)return null;var n=t?"nextNode":"previousNode",r=e.ownerDocument,o=r.createTreeWalker(r.childNodes[0],NodeFilter.SHOW_TEXT);o.currentNode=e;var a=o[n]();if(null!==a){var u=(0,M.default)(e,a);if(u&&!i(e,this.blockElements,u)&&!i(a,this.blockElements,u))return a}return null}}]),e}();t.default=S},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){return null}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;return n?"emptyElement"==e&&n==this.name||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e,n):"emptyElement"==e||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e)}},{key:"insertChildren",value:function(e,t){if(t&&(t instanceof v.default||Array.from(t).length>0))throw new h.default("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.")}}]),t}(c.default);t.default=y},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"==typeof t)return t(e);var n={};return t.name&&(n.name=i(t.name,e.name),!n.name)?null:t.attribute&&(n.attribute=a(t.attribute,e),!n.attribute)?null:!(t.class&&(n.class=u(t.class,e),!n.class))&&(!(t.style&&(n.style=l(t.style,e),!n.style))&&n)}function i(e,t){return e instanceof RegExp?e.test(t):e===t}function a(e,t){var n=[];for(var r in e){var o=e[r];if(!t.hasAttribute(r))return null;var i=t.getAttribute(r);if(o instanceof RegExp){if(!o.test(i))return null;n.push(r)}else{if(i!==o)return null;n.push(r)}}return n}function u(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;if(l instanceof RegExp){var s=t.getClassNames(),f=!0,c=!1,d=void 0;try{for(var h,p=s[Symbol.iterator]();!(f=(h=p.next()).done);f=!0){var v=h.value;l.test(v)&&n.push(v)}}catch(e){c=!0,d=e}finally{try{!f&&p.return&&p.return()}finally{if(c)throw d}}if(0===n.length)return null}else{if(!t.hasClass(l))return null;n.push(l)}}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}function l(e,t){var n=[];for(var r in e){var o=e[r];if(!t.hasStyle(r))return null;var i=t.getStyle(r);if(o instanceof RegExp){if(!o.test(i))return null;n.push(r)}else{if(i!==o)return null;n.push(r)}}return n}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0?e:null}},{key:"getElementName",value:function(){if(1!==this._patterns.length)return null;var e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}]),e}();t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;return n?"rootElement"==e&&n==this.name||l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e,n):"rootElement"==e||l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e)}},{key:"rootName",get:function(){return this.getCustomProperty(c)},set:function(e){this.setCustomProperty(c,e)}}]),t}(f.default);t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){return null}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;return n?"uiElement"==e&&n==this.name||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e,n):"uiElement"==e||s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e)}},{key:"insertChildren",value:function(e,t){if(t&&(t instanceof v.default||Array.from(t).length>0))throw new h.default("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.")}}]),t}(c.default);t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){return new _.default("figure",{class:"image"},new g.default("img"))}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:20;o(this,e),this.document=t,this.size=0,this.limit=r,this.isLocked=!1,this._changeCallback=function(e,t,r,o){n._onBatch(o)},this._selectionChangeCallback=function(){n._reset()},t.on("change",this._changeCallback),t.selection.on("change:range",this._selectionChangeCallback),t.selection.on("change:attribute",this._selectionChangeCallback)}return i(e,[{key:"input",value:function(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}},{key:"lock",value:function(){this.isLocked=!0}},{key:"unlock",value:function(){this.isLocked=!1}},{key:"destroy",value:function(){this.document.off("change",this._changeCallback),this.document.selection.off("change:range",this._selectionChangeCallback),this.document.selection.off("change:attribute",this._selectionChangeCallback)}},{key:"_onBatch",value:function(e){"transparent"!=e.type&&e!==this._batch&&(0,u.default)(e.getOperations())<=1&&this._reset(!0)}},{key:"_reset",value:function(e){this.isLocked&&!e||(this._batch=null,this.size=0)}},{key:"batch",get:function(){return this._batch||(this._batch=this.document.batch()),this._batch}}]),e}();t.default=l},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){var t=e.emitter,n=e.activator,r=e.callback,o=e.contextElement;t.listenTo(document,"mouseup",function(e,t){var i=t.target;n()&&!o.contains(i)&&r()})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){var t=e.view;t.listenTo(t.element,"submit",function(e,n){n.preventDefault(),t.fire("submit")},{useCapture:!0})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0}},{key:"_restoreSelection",value:function(e,t,n){var r=this.editor.document,o=[],i=!0,a=!1,u=void 0;try{for(var s,f=e[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value,d=l(c,n),h=d.find(function(e){return e.start.root!=r.graveyard});h&&o.push(h)}}catch(e){a=!0,u=e}finally{try{!i&&f.return&&f.return()}finally{if(a)throw u}}o.length&&r.selection.setRanges(o,t)}}]),t}(d.default);t.default=h},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){var t=0,n=!0,r=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){i.value;t++}}catch(e){r=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e,t,n){function r(r){var a=(void 0!==c[r-1]?c[r-1]:-1)+1,s=void 0!==c[r+1]?c[r+1]:-1,d=a>s?-1:1;f[r+d]&&(f[r]=f[r+d].slice(0)),f[r]||(f[r]=[]),f[r].push(a>s?o:i);for(var h=Math.max(a,s),p=h-r;ps;h--)c[h]=r(h);c[s]=r(s),d++}while(c[s]!==l);return f[s].slice(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){for(var t=[];e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){return function(t){return t+e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=r(o),a=n(30),u=r(a),l=(0,i.default)(u.default,"Map");t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=r(o),a=n(30),u=r(a),l=(0,i.default)(u.default,"Set");t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),i=r(o),a=i.default.Uint8Array;t.default=a},function(e,t,n){"use strict";function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e,t,n,r){var o=-1,i=e.length;for(r&&i&&(n=e[++o]);++oc))return!1;var h=i.get(e);if(h)return h==t;var p=-1,v=!0,y=o&s?new a.default:void 0;for(i.set(e,t);++p1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,(0,u.default)(e,n)});t.default=l},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){var t=new Map;for(var n in e)t.set(n,e[n]);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function o(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function i(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}function a(e,t){return o(e.charAt(t-1))&&i(e.charAt(t))}function u(e,t){return r(e.charAt(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.isCombiningMark=r,t.isHighSurrogateHalf=o,t.isLowSurrogateHalf=i,t.isInsideSurrogatePair=a,t.isInsideCombinedSymbol=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(310),l=r(u),s=n(377),f=r(s),c=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),t}(l.default);t.default=c,c.build={plugins:[f.default],config:{toolbar:["image","headings"]}}},function(e,t,n){t=e.exports=n(46)(),t.push([e.i,'@charset "UTF-8";\n/**\n * Makes element unselectable.\n */\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n display: none; }\n\n/**\n * Wraps (S)CSS into .ck-editor namespace.\n */\n/**\n * Resets an element, ignoring its children.\n */\n.ck-reset, .ck-reset_all, .ck-reset_all *, .ck-reset_all a, .ck-reset_all textarea {\n box-sizing: border-box;\n width: auto;\n height: auto;\n position: static; }\n\n/**\n * Resets an element AND its children.\n */\n/**\n * Default width/height of an icon.\n */\nsvg.ck-icon {\n min-width: 20px;\n min-height: 20px;\n font-size: 1em;\n vertical-align: middle;\n color: inherit;\n cursor: inherit; }\n svg.ck-icon * {\n cursor: inherit;\n color: inherit;\n fill: currentColor; }\n\n/**\n * Applies styles to the main part of the tooltip.\n */\n/**\n * Applies styles to the arrow part of the tooltip.\n */\n/**\n * Applies styles to both arrow and main part of the tooltip.\n */\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n[data-ck-tooltip]::after {\n visibility: hidden;\n opacity: 0;\n display: none;\n position: absolute;\n z-index: 999;\n pointer-events: none;\n -webkit-backface-visibility: hidden; }\n\n[data-ck-tooltip]::before {\n visibility: hidden;\n opacity: 0;\n display: none;\n position: absolute;\n z-index: 999;\n pointer-events: none;\n -webkit-backface-visibility: hidden; }\n\n[data-ck-tooltip]::after {\n content: attr(data-ck-tooltip); }\n\n[data-ck-tooltip]::before {\n content: "";\n width: 0;\n height: 0; }\n\n.ck-button,\na.ck-button {\n display: inline-block;\n position: relative;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none; }\n .ck-button::after,\n a.ck-button::after {\n display: block; }\n .ck-button::before,\n a.ck-button::before {\n display: block; }\n .ck-button.ck-button_with-text .ck-button__label,\n a.ck-button.ck-button_with-text .ck-button__label {\n display: block; }\n .ck-button:hover::after,\n a.ck-button:hover::after {\n visibility: visible;\n opacity: 1; }\n .ck-button:hover::before,\n a.ck-button:hover::before {\n visibility: visible;\n opacity: 1; }\n .ck-button:focus:not(:hover)::after,\n a.ck-button:focus:not(:hover)::after {\n display: none; }\n .ck-button:focus:not(:hover)::before,\n a.ck-button:focus:not(:hover)::before {\n display: none; }\n .ck-button .ck-button__label,\n a.ck-button .ck-button__label {\n display: none; }\n\n.ck-toolbar {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none; }\n .ck-toolbar__separator {\n display: inline-block; }\n .ck-toolbar__newline {\n display: block;\n clear: left; }\n\n.ck-dropdown {\n display: inline-block;\n position: relative; }\n .ck-dropdown::after {\n content: \'\';\n width: 0;\n height: 0;\n pointer-events: none;\n z-index: 1;\n position: absolute;\n top: 50%;\n transform: translate(0, -50%); }\n\n.ck-dropdown__panel {\n -webkit-backface-visibility: hidden;\n display: none;\n z-index: 999;\n position: absolute;\n left: 0px;\n transform: translateY(100%); }\n .ck-dropdown__panel-visible {\n display: inline-block; }\n\n.ck-list {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none; }\n .ck-list__item {\n display: block; }\n\n.ck-label {\n display: block; }\n\n.cke-voice-label {\n display: none; }\n\n.ck-balloon-panel {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n display: none;\n position: absolute;\n z-index: 999; }\n .ck-balloon-panel:before, .ck-balloon-panel:after {\n content: "";\n position: absolute; }\n .ck-balloon-panel:before {\n z-index: 1; }\n .ck-balloon-panel:after {\n z-index: 2; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\n z-index: 1; }\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\n z-index: 2; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\n z-index: 1; }\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\n z-index: 2; }\n .ck-balloon-panel_visible {\n display: block; }\n\n.ck-floating-panel {\n position: absolute;\n display: none; }\n .ck-floating-panel_active {\n display: block; }\n\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\n position: fixed;\n top: 0; }\n .ck-editor .ck-toolbar.ck-toolbar_sticky.ck-toolbar_sticky_bottom-limit {\n top: auto;\n position: absolute; }\n\n/**\n * Colors configured by the user.\n *\n * @type Map\n * @example\n *\t\t$ck-colors: ( \'foreground\': red );\n * @see $_ck-colors\n */\n/**\n * Internal map with default colors.\n *\n * @type Map\n * @see ck-color-add\n */\n/**\n * Returns a color of given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $_ck-colors\n */\n/**\n * Returns a border–color for a given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $ck-color\n */\n/**\n * Adds a color to internal color map.\n *\n * @example\n *\t\t@include ck-color-add( ( \'special\': yellow, \'hover\': #00FF00 ) );\n * @param {Map} $map - A map with new colors.\n * @see $_ck-colors\n */\n/**\n * Base font size.\n *\n * @see $ck-font-sizes\n */\n/**\n * Base font face.\n *\n */\n/**\n * Base font sizes for scaling.\n *\n * @see ck-font-size\n */\n/**\n * Returns font-size in units for given level.\n *\n * @param {Number} $level [ 0 ] - Size of the font.\n * @return {String}\n * @see $ck-font-sizes\n * @see $ck-font-size-base\n */\n/**\n * Default border-radius value.\n *\n */\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n/**\n * A visual style of focused element\'s outer shadow.\n */\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * A class which indicates that an element holding it is disabled.\n */\n.ck-disabled {\n opacity: .5; }\n\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * Brings visual styling for :focus state.\n */\n/**\n * A visual style of element\'s inner shadow (i.e. input).\n */\n/**\n * A visual style of element\'s drop shadow (i.e. panel).\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n/**\n * Resets an element, ignoring its children.\n */\n.ck-reset, .ck-reset_all, .ck-reset_all *, .ck-reset_all a, .ck-reset_all textarea {\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n text-decoration: none;\n vertical-align: middle;\n transition: none; }\n\n/**\n * Resets an element AND its children.\n */\n.ck-reset_all, .ck-reset_all *, .ck-reset_all a, .ck-reset_all textarea {\n border-collapse: collapse;\n font: normal normal normal 12px Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n color: #333333;\n text-align: left;\n white-space: nowrap;\n cursor: auto;\n float: none; }\n\n.ck-reset_all .ck-rtl * {\n text-align: right; }\n\n.ck-reset_all iframe {\n vertical-align: inherit; }\n\n.ck-reset_all textarea {\n white-space: pre-wrap; }\n\n.ck-reset_all textarea,\n.ck-reset_all input[type="text"],\n.ck-reset_all input[type="password"] {\n cursor: text; }\n\n.ck-reset_all textarea[disabled],\n.ck-reset_all input[type="text"][disabled],\n.ck-reset_all input[type="password"][disabled] {\n cursor: default; }\n\n.ck-reset_all fieldset {\n padding: 10px;\n border: 2px groove #E0DFE3; }\n\n.ck-reset_all button::-moz-focus-inner {\n padding: 0;\n border: 0; }\n\nsvg.ck-icon {\n width: 1.66667em;\n height: 1.66667em; }\n\n[data-ck-tooltip]::after {\n left: 50%;\n transition: opacity .2s ease-in-out .2s; }\n\n[data-ck-tooltip]::before {\n left: 50%;\n transition: opacity .2s ease-in-out .2s; }\n\n[data-ck-tooltip]::after {\n border-radius: 2px;\n color: white;\n font-size: 0.7rem;\n background: #333333;\n padding: 0.4em 0.64em; }\n\n[data-ck-tooltip]::before {\n border-style: solid; }\n\n/**\n * A class once applied displays the tooltip south of the element.\n *\n * [element]\n * ^\n * +-----------+\n * | Tooltip |\n * +-----------+\n */\n.ck-tooltip_s::after {\n bottom: -4px;\n transform: translate(-50%, 100%); }\n\n.ck-tooltip_s::before {\n bottom: 0;\n transform: translate(-50%, 100%);\n border-color: transparent transparent #333333 transparent;\n border-width: 0 5px 5px 5px; }\n\n/**\n * A class once applied displays the tooltip north of the element.\n *\n * +-----------+\n * | Tooltip |\n * +-----------+\n * V\n * [element]\n */\n.ck-tooltip_n::after {\n top: -4px;\n transform: translate(-50%, -100%); }\n\n.ck-tooltip_n::before {\n top: 0;\n transform: translate(-50%, -100%);\n border-color: #333333 transparent transparent transparent;\n border-width: 5px 5px 0 5px; }\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $color - Background color of the button.\n */\n/**\n * Implements button states.\n *\n * @param {String} $color - Background color of the button.\n */\n/**\n * A helper to define button–specific icon styles.\n *\n */\n.ck-button,\na.ck-button {\n background: white;\n border-color: #bfbfbf;\n border-width: 1px;\n border-style: solid;\n white-space: nowrap;\n cursor: default;\n vertical-align: middle;\n padding: 0.4em;\n line-height: 1.66667; }\n .ck-button:not(.ck-disabled):hover, .ck-button:not(.ck-disabled):focus,\n a.ck-button:not(.ck-disabled):hover,\n a.ck-button:not(.ck-disabled):focus {\n background: #e6e6e6;\n border-color: #a6a6a6; }\n .ck-button:not(.ck-disabled):active,\n a.ck-button:not(.ck-disabled):active {\n background: #d9d9d9;\n border-color: #999999;\n box-shadow: inset 0 2px 2px #bfbfbf; }\n .ck-button.ck-rounded-corners,\n .ck-rounded-corners .ck-button,\n a.ck-button.ck-rounded-corners,\n .ck-rounded-corners\n a.ck-button {\n border-radius: 2px; }\n .ck-button:focus,\n a.ck-button:focus {\n outline: none;\n border: 1px solid #6ab5f9;\n box-shadow: 0 0 3px 2px #9bcdfb; }\n .ck-button .ck-icon,\n a.ck-button .ck-icon {\n float: left; }\n .ck-button.ck-button_with-text,\n a.ck-button.ck-button_with-text {\n padding: 0.4em 0.8em; }\n .ck-button.ck-button_with-text .ck-icon,\n a.ck-button.ck-button_with-text .ck-icon {\n margin-left: -0.4em;\n margin-right: 0.4em; }\n .ck-button.ck-button_with-text .ck-button__label,\n a.ck-button.ck-button_with-text .ck-button__label {\n display: block; }\n .ck-button.ck-on,\n a.ck-button.ck-on {\n background: #f7f7f7;\n border-color: #b9b9b9; }\n .ck-button.ck-on:not(.ck-disabled):hover, .ck-button.ck-on:not(.ck-disabled):focus,\n a.ck-button.ck-on:not(.ck-disabled):hover,\n a.ck-button.ck-on:not(.ck-disabled):focus {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-button.ck-on:not(.ck-disabled):active,\n a.ck-button.ck-on:not(.ck-disabled):active {\n background: #d2d2d2;\n border-color: #949494;\n box-shadow: inset 0 2px 2px #b9b9b9; }\n .ck-button-action,\n a.ck-button-action {\n background: #61b145;\n border-color: #498534;\n text-shadow: 0 -1px #4e8e37;\n color: white; }\n .ck-button-action:not(.ck-disabled):hover, .ck-button-action:not(.ck-disabled):focus,\n a.ck-button-action:not(.ck-disabled):hover,\n a.ck-button-action:not(.ck-disabled):focus {\n background: #579f3e;\n border-color: #3f732d; }\n .ck-button-action:not(.ck-disabled):active,\n a.ck-button-action:not(.ck-disabled):active {\n background: #52963b;\n border-color: #3a6a29;\n box-shadow: inset 0 2px 2px #498534; }\n .ck-button-action:hover, .ck-button-action:focus, .ck-button-action:active,\n a.ck-button-action:hover,\n a.ck-button-action:focus,\n a.ck-button-action:active {\n text-shadow: 0 -1px #3a6a29; }\n .ck-button-bold,\n a.ck-button-bold {\n font-weight: bold; }\n .ck-button .ck-icon use,\n .ck-button .ck-icon use *,\n a.ck-button .ck-icon use,\n a.ck-button .ck-icon use * {\n color: inherit; }\n .ck-button .ck-button__label,\n a.ck-button .ck-button__label {\n float: left;\n line-height: inherit;\n font-size: inherit;\n font-weight: inherit;\n color: inherit;\n cursor: inherit; }\n\n.ck-toolbar {\n line-height: 1;\n padding: 0.4em;\n border: 1px solid #bfbfbf;\n white-space: initial;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none; }\n .ck-toolbar.ck-rounded-corners,\n .ck-rounded-corners .ck-toolbar {\n border-radius: 2px; }\n .ck-toolbar__separator {\n width: 1px;\n height: calc( 1em + 2 * 0.64em);\n vertical-align: middle;\n background: #bfbfbf; }\n .ck-toolbar__newline {\n height: 0.4em; }\n .ck-toolbar > * {\n margin-right: 0.4em; }\n .ck-toolbar > *:last-child {\n margin-right: 0; }\n\n.ck-dropdown::after {\n border-style: solid;\n border-width: .4em .4em 0 .4em;\n border-color: #707070 transparent;\n right: 0.8em; }\n\n.ck-dropdown .ck-button.ck-dropdown__button {\n padding-right: 1.6em; }\n .ck-dropdown .ck-button.ck-dropdown__button .ck-button__label {\n width: 7em;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n.ck-dropdown__panel {\n border: 1px solid #b9b9b9;\n bottom: 1px;\n background: white;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2); }\n .ck-dropdown__panel.ck-rounded-corners,\n .ck-rounded-corners .ck-dropdown__panel {\n border-radius: 2px; }\n\n.ck-list {\n list-style-type: none;\n background: white; }\n .ck-list.ck-rounded-corners,\n .ck-rounded-corners .ck-list {\n border-radius: 2px; }\n .ck-list__item {\n padding: 0.64em 0.64em 0.64em 0;\n cursor: pointer;\n min-width: 12em; }\n .ck-list__item::before {\n content: "";\n display: inline-block;\n width: 12px;\n font-weight: normal;\n font-size: 12px;\n text-align: center;\n margin: 0 6px; }\n .ck-list__item:hover, .ck-list__item:focus {\n background: #f7f7f7; }\n .ck-list__item:focus {\n box-shadow: 0 0 3px 2px #9bcdfb;\n position: relative;\n z-index: 1;\n outline: none; }\n .ck-list__item:last-of-type {\n border: none; }\n .ck-list__item_active {\n background: #ebebeb; }\n .ck-list__item_active::before {\n content: "\\2713"; }\n .ck-list__item_active:hover, .ck-list__item_active:focus {\n background: #dedede; }\n\n.ck-label {\n font-weight: bold; }\n\n.ck-input-text {\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n border: 1px solid #b9b9b9;\n padding: 0.64em;\n min-width: 250px; }\n .ck-input-text.ck-rounded-corners,\n .ck-rounded-corners .ck-input-text {\n border-radius: 2px; }\n .ck-input-text:focus {\n outline: none;\n border: 1px solid #6ab5f9;\n box-shadow: 0 0 3px 2px #9bcdfb, 2px 2px 3px #e6e6e6 inset; }\n\n.ck-balloon-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n min-width: 50px;\n min-height: 15px;\n background: white;\n border: 1px solid #b9b9b9; }\n .ck-balloon-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-balloon-panel {\n border-radius: 2px; }\n .ck-balloon-panel:before, .ck-balloon-panel:after {\n width: 0;\n height: 0;\n border-style: solid; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n border-width: 0 10px 15px 10px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\n border-color: transparent transparent #b9b9b9 transparent; }\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\n border-color: transparent transparent white transparent;\n margin-top: 2px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n border-width: 15px 10px 0 10px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\n border-color: #b9b9b9 transparent transparent; }\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\n border-color: white transparent transparent transparent;\n margin-bottom: 2px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after {\n left: 50%;\n margin-left: -10px;\n top: -15px; }\n .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after {\n left: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n right: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after {\n left: 50%;\n margin-left: -10px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after {\n left: 20px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n right: 20px;\n bottom: -15px; }\n\n.ck-floating-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n background: #f7f7f7; }\n .ck-floating-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-floating-panel {\n border-radius: 2px; }\n\n.ck-toolbar__container {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar {\n border-radius: 0;\n border: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-toolbar__container .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-toolbar__container.ck-balloon-panel_arrow_s:after, .ck-toolbar__container.ck-balloon-panel_arrow_se:after, .ck-toolbar__container.ck-balloon-panel_arrow_sw:after {\n border-bottom-color: #f7f7f7; }\n .ck-toolbar__container.ck-balloon-panel_arrow_n:after, .ck-toolbar__container.ck-balloon-panel_arrow_ne:after, .ck-toolbar__container.ck-balloon-panel_arrow_nw:after {\n border-top-color: #f7f7f7; }\n\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n border-width: 0 0 1px;\n background: #f7f7f7; }\n\n.ck-editor {\n position: relative; }\n .ck-editor.ck-rounded-corners,\n .ck-rounded-corners .ck-editor {\n border-radius: 2px; }\n .ck-editor .ck-editor__top .ck-toolbar {\n border-radius: 0;\n border-top: 0;\n border-left: 0;\n border-right: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-editor .ck-editor__main {\n background: white; }\n .ck-editor .ck-editor__bottom {\n border-bottom: 0;\n border-left: 0;\n border-right: 0;\n padding: 0.8em; }\n .ck-editor .ck-editor__editable.ck-focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset; }\n .ck-editor .ck-editor__editable_inline {\n overflow: auto;\n padding: 0 0.8em; }\n\n.ck-editor,\n.ck-editor-bottom {\n background: #f7f7f7;\n border: 1px solid #b9b9b9; }\n',""])},function(e,t,n){t=e.exports=n(46)(),t.push([e.i,'.ck-heading_heading1 {\n font-size: 1.5em; }\n\n.ck-heading_heading2 {\n font-size: 1.3em; }\n\n.ck-heading_heading3 {\n font-size: 1.1em; }\n\n[class*="ck-heading_heading"] {\n font-weight: bold; }\n',""])},function(e,t,n){t=e.exports=n(46)(),t.push([e.i,"@charset \"UTF-8\";\n/**\n * Colors configured by the user.\n *\n * @type Map\n * @example\n *\t\t$ck-colors: ( 'foreground': red );\n * @see $_ck-colors\n */\n/**\n * Internal map with default colors.\n *\n * @type Map\n * @see ck-color-add\n */\n/**\n * Returns a color of given name and lightness offset.\n *\n * @param {String} $name [ 'background' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $_ck-colors\n */\n/**\n * Returns a border–color for a given name and lightness offset.\n *\n * @param {String} $name [ 'background' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $ck-color\n */\n/**\n * Adds a color to internal color map.\n *\n * @example\n *\t\t@include ck-color-add( ( 'special': yellow, 'hover': #00FF00 ) );\n * @param {Map} $map - A map with new colors.\n * @see $_ck-colors\n */\n/**\n * A visual style of element's inner shadow (i.e. input).\n */\n/**\n * A visual style of element's drop shadow (i.e. panel).\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n/**\n * A visual style of focused element's outer shadow.\n */\n/**\n * A visual style of focused element's border or outline.\n */\n/**\n * A class which indicates that an element holding it is disabled.\n */\n.ck-disabled {\n opacity: .5; }\n\n/**\n * A visual style of focused element's border or outline.\n */\n/**\n * Brings visual styling for :focus state.\n */\n.ck-widget.image figcaption {\n background-color: #f7f7f7;\n padding: 10px;\n font-size: .8em;\n color: #858585; }\n .ck-widget.image figcaption:focus {\n outline: none;\n box-shadow: none; }\n .ck-widget.image figcaption.focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n background-color: white; }\n",""])},function(e,t,n){t=e.exports=n(46)(),t.push([e.i,"/**\n * Default spacing value (\"unit\").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ 'standard' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.cke-text-alternative-form {\n padding: 1.2em;\n overflow: hidden; }\n .cke-text-alternative-form .ck-label {\n margin-bottom: 0.4em; }\n .cke-text-alternative-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .cke-text-alternative-form__actions .ck-button {\n float: right; }\n .cke-text-alternative-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .cke-text-alternative-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n",""])},function(e,t,n){t=e.exports=n(46)(),t.push([e.i,".ck-widget {\n margin: 10px 0;\n padding: 0; }\n .ck-widget.ck-widget_selected, .ck-widget.ck-widget_selected:hover {\n outline: 2px solid #ace; }\n .ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected {\n outline: 2px solid #ddd; }\n .ck-widget:hover {\n outline: 2px solid yellow; }\n\n.image {\n text-align: center;\n clear: both; }\n .image.image-style-side {\n float: right;\n margin-left: 0.8em;\n max-width: 50%; }\n\n.image > img {\n display: block;\n margin: 0 auto;\n max-width: 100%; }\n",""])},function(e,t,n){t=e.exports=n(46)(),t.push([e.i,"/**\n * Default spacing value (\"unit\").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ 'standard' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.ck-link-form {\n padding: 1.2em;\n overflow: hidden; }\n .ck-link-form .ck-label {\n margin-bottom: 0.4em; }\n .ck-link-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .ck-link-form__actions .ck-button {\n float: right; }\n .ck-link-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .ck-link-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n",""])},function(e,t){e.exports='\n\n \n bold\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n\n \n italic\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n'},function(e,t){e.exports='\n\n \n link\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n\n \n unlink\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n\n \n bulletedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n\n \n numberedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n\n \n redo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(e,t){e.exports='\n\n \n undo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(e,t,n){var r=n(273);"string"==typeof r&&(r=[[e.i,r,""]]);n(45)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(274);"string"==typeof r&&(r=[[e.i,r,""]]);n(45)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(275);"string"==typeof r&&(r=[[e.i,r,""]]);n(45)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(276);"string"==typeof r&&(r=[[e.i,r,""]]);n(45)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(277);"string"==typeof r&&(r=[[e.i,r,""]]);n(45)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){var r=n(278);"string"==typeof r&&(r=[[e.i,r,""]]);n(45)(r,{});r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n(\s+)<\/span>/g,function(e,t){return 1==t.length?" ":t})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){return e=e.replace(//g,">").replace(/\n\n/g,"

").replace(/\n/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  "),e.indexOf("

")>-1&&(e="

"+e+"

"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];o(this,e),this._editor=t,this._availablePlugins=new Map,this._plugins=new Map;var r=!0,i=!1,a=void 0;try{for(var u,l=n[Symbol.iterator]();!(r=(u=l.next()).done);r=!0){var s=u.value;this._availablePlugins.set(s,s),s.pluginName&&this._availablePlugins.set(s.pluginName,s)}}catch(e){i=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}}return i(e,[{key:Symbol.iterator,value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=!1,r=void 0,e.prev=3,o=this._plugins[Symbol.iterator]();case 5:if(t=(i=o.next()).done){e.next=13;break}if(a=i.value,"function"!=typeof a[0]){e.next=10;break}return e.next=10,a;case 10:t=!0,e.next=5;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(3),n=!0,r=e.t0;case 19:e.prev=19,e.prev=20,!t&&o.return&&o.return();case 22:if(e.prev=22,!n){e.next=25;break}throw r;case 25:return e.finish(22);case 26:return e.finish(19);case 27:case"end":return e.stop()}},e,this,[[3,15,19,27],[20,,22,26]])})},{key:"get",value:function(e){return this._plugins.get(e)}},{key:"load",value:function(e){function t(e){if(!y.includes(e)&&!f.get(e)&&!h.has(e))return n(e).catch(function(t){throw c.default.error("plugincollection-load: It was not possible to load the plugin.",{plugin:e}),t})}function n(e){return new Promise(function(n){h.add(e),o(e),e.requires&&e.requires.forEach(function(n){var o=r(n);if(l.includes(o))throw new s.default("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",{plugin:o,requiredBy:e});t(o)});var i=new e(d);f._add(e,i),p.push(i),n()})}function r(e){return"function"==typeof e?e:f._availablePlugins.get(e)}function o(e){if(!(e.prototype instanceof u.default))throw new s.default("plugincollection-instance: The loaded plugin module is not an instance of Plugin.",{plugin:e})}function i(e){var t=[],n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;r(l)||t.push(l)}}catch(e){o=!0,i=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw i}}return t.length?t:null}function a(e){return e.map(function(e){return r(e)}).filter(function(e){return!!e})}var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],f=this,d=this._editor,h=new Set,p=[],v=a(e),y=a(l),b=i(e);if(b){var _="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return c.default.error(_,{plugins:b}),Promise.reject(new s.default(_,{plugins:b}))}return Promise.all(v.map(t)).then(function(){return p})}},{key:"_add",value:function(e,t){this._plugins.set(e,t),e.pluginName&&this._plugins.set(e.pluginName,t)}}]),e}();t.default=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"main";return this.stringify(this.model.getRoot(e))}},{key:"stringify",value:function(e){var t=this.toView(e);return this.processor.toData(t)}},{key:"toView",value:function(e){var t=w.default.createIn(e),n=new m.default;return this.mapper.bindElements(e,n),this.modelToView.convertInsertion(t),this.mapper.clearBindings(),n}},{key:"set",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main",r=this.model.getRoot(n);this.model.enqueueChanges(function(){t.model.selection.removeAllRanges(),t.model.selection.clearAttributes(),t.model.batch("transparent").remove(w.default.createIn(r)).insert(O.default.createAt(r,0),t.parse(e))})}},{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root",n=this.processor.toView(e);return this.toModel(n,t)}},{key:"toModel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$root";return this.viewToModel.convert(e,{context:[t]})}},{key:"destroy",value:function(){}},{key:"insertContent",value:function(e,t,n){this.fire("insertContent",{content:e,selection:t,batch:n})}},{key:"deleteContent",value:function(e,t,n){this.fire("deleteContent",{batch:t,selection:e,options:n})}},{key:"modifySelection",value:function(e,t){this.fire("modifySelection",{selection:e,options:t})}},{key:"getSelectedContent",value:function(e){var t={selection:e};return this.fire("getSelectedContent",t),t.content}}]),e}();t.default=A,(0,u.default)(A,s.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e.isCollapsed){var r=e.getFirstRange(),o=r.start,u=s.default.createFromPosition(r.end);if(r.start.isTouching(r.end)||t.remove(r),n.merge&&i(t,o,u),e.collapse(o),a(t.document,o)){var l=new h.default("paragraph");t.insert(o,l),e.collapse(l)}u.detach()}}function i(e,t,n){var r=n.path,o=Math.min(t.path.length-1,r.length-1),i=(0,v.default)(t.path,r);if("number"==typeof i)for(;i0?e.merge(l):e.remove(f)}}function a(e,t){var n=e.schema.check({name:"$text",inside:t}),r=e.schema.check({name:"paragraph",inside:t});return!n&&r}function u(e){var t=e.document.schema;return!t.objects.has(e.name)&&!t.limits.has(e.name)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var l=n(161),s=r(l),f=n(1),c=r(f),d=n(5),h=r(d),p=n(51),v=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"main",n=this.view.createRoot(e,t),r=this.model.getRoot(t);return this.mapper.bindElements(r,n),n}},{key:"destroy",value:function(){this.view.destroy(),this._listener.stopListening()}}]),e}();t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=new u.default,n=e.getFirstRange();if(!n||n.isCollapsed)return t;var r=n.start.root,o=n.start.getCommonPath(n.end),a=r.getNodeByPath(o),l=void 0;l=n.start.parent==n.end.parent?n:s.default.createFromParentsAndOffsets(a,n.start.path[o.length],a,n.end.path[o.length]+1);var f=l.end.offset-l.start.offset,d=!0,p=!1,v=void 0;try{for(var y,b=l.getItems({shallow:!0})[Symbol.iterator]();!(d=(y=b.next()).done);d=!0){var _=y.value;_.is("textProxy")?t.appendChildren(new h.default(_.data,_.getAttributes())):t.appendChildren(_.clone(!0))}}catch(e){p=!0,v=e}finally{try{!d&&b.return&&b.return()}finally{if(p)throw v}}if(l!=n){var m=n._getTransformedByMove(l.start,c.default.createAt(t,0),f)[0],g=new s.default(c.default.createAt(t),m.start);i(new s.default(m.end,c.default.createAt(t,"end"))),i(g)}return t}/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function i(e){var t=[];Array.from(e.getItems({direction:"backward"})).map(function(e){return s.default.createOn(e)}).filter(function(t){return(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))}).forEach(function(e){t.push(e.start.parent),(0,p.remove)(e)}),t.forEach(function(e){for(var t=e;t.parent&&t.isEmpty;){var n=s.default.createOn(t);t=t.parent,(0,p.remove)(n)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(49),u=r(a),l=n(3),s=r(l),f=n(1),c=r(f),d=n(23),h=r(d),p=n(24)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n,r){r||(r=e.model.batch()),n.isCollapsed||e.deleteContent(n,r,{merge:!0});var o=new b(e,r,n.anchor);o.handleNodes(t.getChildren(),{isFirst:!0,isLast:!0});var i=o.getSelectionRange();i?n.setRanges([i]):y.default.warn("insertcontent-no-range: Cannot determine a proper selection range after insertion.")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=e.model.schema,o="backward"!=n.direction,a=n.unit?n.unit:"character",l=t.focus,s=new c.default({boundaries:u(l,o),singleCharacters:!0,direction:o?"forward":"backward"}),f={walker:s,schema:r,isForward:o,unit:a},d=void 0;d=s.next();){if(d.done)return;var h=i(f,d.value);if(h)return void t.setFocus(h)}}function i(e,t){if("text"==t.type)return a(e.walker,e.unit);if(t.type==(e.isForward?"elementStart":"elementEnd")){if(e.schema.objects.has(t.item.name))return s.default.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(function(){return!0});if(e.schema.check({name:"$text",inside:t.nextPosition}))return t.nextPosition}}function a(e,t){var n=e.position.textNode;if(n)for(var r=n.data,o=e.position.offset-n.startOffset;(0,p.isInsideSurrogatePair)(r,o)||"character"==t&&(0,p.isInsideCombinedSymbol)(r,o);)e.next(),o=e.position.offset-n.startOffset;return e.position}function u(e,t){var n=e.root,r=s.default.createAt(n,t?"end":0);return t?new h.default(e,r):new h.default(r,e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var l=n(1),s=r(l),f=n(33),c=r(f),d=n(3),h=r(d),p=n(271)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.conversionApi=(0,p.default)({},t),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this)}return a(e,[{key:"convert",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.fire("viewCleanup",e);var n=l.default.createFrom(e),r=this._convertItem(e,n,t);if(!(r instanceof k.default||r instanceof P.default))return r;var o=r;return o.is("documentFragment")||(o=new P.default([o])),o.markers=i(o),o}},{key:"_convertItem",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,p.default)({},n,{input:e,output:null});return e.is("element")?this.fire("element:"+e.name,r,t,this.conversionApi):e.is("text")?this.fire("text",r,t,this.conversionApi):this.fire("documentFragment",r,t,this.conversionApi),r.output}},{key:"_convertChildren",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Array.from(e.getChildren()).map(function(e){return n._convertItem(e,t,r)}).reduce(function(e,t){return t?e.concat(t):e},[])}}]),e}();t.default=x,(0,d.default)(x,f.default)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nt.position.offset;return r&&o?[t.getReversed(),e.clone()]:(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(C.default,j.default,function(e,t,n){return e.position.isEqual(t.position)?[a()]:(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(C.default,T.default,function(e,t,n){var r=e.position.root==t.sourcePosition.root&&"same"===(0,K.default)(e.position.getParentPath(),t.sourcePosition.getParentPath()),o=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return r&&o?[a()]:(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(R.default,R.default,function(e,t,n){var r=e.position.getParentPath(),o=t.position.getParentPath();if("same"==(0,K.default)(r,o)){if(e.position.offset==t.position.offset)return[a()];if(e.position.offsett._cloneOperation.sourcePosition.offset&&i._cloneOperation.sourcePosition.offset--,[i]}var l=e.clone();return l._cloneOperation.position.offset++,l._moveOperation.sourcePosition.path[l._moveOperation.sourcePosition.path.length-2]++,l._moveOperation.targetPosition.path[l._moveOperation.targetPosition.path.length-2]++,l._moveOperation.sourcePosition.offset=e.position.offset-t.position.offset,e._cloneOperation instanceof m.default&&t._cloneOperation instanceof m.default&&e._cloneOperation.sourcePosition.offset>t._cloneOperation.sourcePosition.offset&&l._cloneOperation.sourcePosition.offset--,[l]}return(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(R.default,D.default,function(e,t,n){return"same"===(0,K.default)(t.position.path,e.position.getParentPath())?[a()]:(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(R.default,N.default,function(e,t,n){var r="same"===(0,K.default)(e.position.getParentPath(),t.range.start.getParentPath()),o=t.range.start.offset=e.position.offset;if(r&&o)return[a()];if("same"===(0,K.default)(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){var i=e.clone(),l=c.default.createFromPosition(t.range.start);l.path.push(t.howMany-1);var s=l.getShiftedBy(1);i._cloneOperation.position=s;var f=c.default.createFromPosition(l);f.path.push(e.position.offset),i._moveOperation.sourcePosition=f;var d=c.default.createFromPosition(s);return d.path.push(0),i._moveOperation.targetPosition=d,[i]}return(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(R.default,O.default,function(e,t){e=e.clone();var n=new c.default(e.position.root,e.position.path.slice(0,-1));if(e._cloneOperation instanceof b.default){var r=!0,o=!1,i=void 0;try{for(var a,u=t.operations[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;if(l.range.containsPosition(n)||l.range.start.isEqual(n)){null!==l.newValue?e._cloneOperation.nodes.getNode(0).setAttribute(l.key,l.newValue):e._cloneOperation.nodes.getNode(0).removeAttribute(l.key);break}}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}}return[e]}),(0,u.addTransformationCase)(D.default,R.default,function(e,t,n){if("same"===(0,K.default)(e.position.path,t.position.getParentPath())){var r=[t.getReversed(),e.clone()];return r[1].operations[1].targetPosition.path[0]++,r}return(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(I.default,O.default,function(e,t){var n=[e.clone()];return t.range.containsPosition(e.position)&&n.push(i(e,t)),n}),(0,u.addTransformationCase)(N.default,R.default,function(e,t,n){var r="same"===(0,K.default)(e.range.start.getParentPath(),t.position.getParentPath()),o=e.range.start.offset=t.position.offset;if(r&&o)return[t.getReversed(),e.clone()];if("same"===(0,K.default)(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){var i=e.clone();return i._insertOperation.position.offset++,i._moveOperation.howMany++,i._moveOperation.targetPosition.path[i._moveOperation.targetPosition.path.length-2]++,[i]}return(0,u.defaultTransform)(e,t,n)}),(0,u.addTransformationCase)(q.default,R.default,function(e,t,n){var r=new c.default(t.position.root,t.position.path.slice(0,-1)),o=(0,u.defaultTransform)(e,t,n);if(e.operations[0].position.isEqual(r)){var i=e.clone();i.operations[0].position=e.operations[0].position.getShiftedBy(1),o.push(i)}return o}),(0,u.addTransformationCase)(R.default,q.default,function(e,t){e=e.clone();var n=new c.default(e.position.root,e.position.path.slice(0,-1));return e._cloneOperation instanceof b.default&&t.operations[0].position.isEqual(n)&&(e._cloneOperation.nodes.getNode(0).name=t.operations[0].newName),[e]}),(0,u.addTransformationCase)($.default,R.default,function(e,t,n){var r=(0,u.defaultTransform)(e,t,n),o=t._cloneOperation.position,i=!0,a=!1,l=void 0;try{for(var s,f=r[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value,d=!0,h=!1,p=void 0;try{for(var v,y=c.operations[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){var b=v.value;b.sourcePosition.getShiftedBy(b.howMany).isEqual(o)&&(b.howMany+=1)}}catch(e){h=!0,p=e}finally{try{!d&&y.return&&y.return()}finally{if(h)throw p}}}}catch(e){a=!0,l=e}finally{try{!i&&f.return&&f.return()}finally{if(a)throw l}}return r}),(0,u.addTransformationCase)(R.default,$.default,function(e,t,n){t=t.clone();var r=e._cloneOperation.position,o=!0,i=!1,a=void 0;try{for(var l,s=t.operations[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var f=l.value;f.sourcePosition.getShiftedBy(f.howMany).isEqual(r)&&(f.howMany+=1)}}catch(e){i=!0,a=e}finally{try{!o&&s.return&&s.return()}finally{if(i)throw a}}return(0,u.defaultTransform)(e,t,n)})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t,n,r){var o=e.document,i=new _,a=new v.default(t,n,r,o.markers,o.version);e.addDelta(i),i.addOperation(a),o.applyOperation(a)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"$root",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main";if(this.roots.has(t))throw new R.default("model-document-createRoot-name-exists: Root with specified name already exists.",{name:t});var n=new v.default(this,e,t);return this.roots.set(t,n),n}},{key:"destroy",value:function(){this.selection.destroy(),this.stopListening()}},{key:"enqueueChanges",value:function(e){if(this._pendingChanges.push(e),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire("changesDone")}}},{key:"getRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";if(!this.roots.has(e))throw new R.default("model-document-getRoot-root-not-exist: Root with specified name does not exist.",{name:e});return this.roots.get(e)}},{key:"hasRoot",value:function(e){return this.roots.has(e)}},{key:"getRootNames",value:function(){return Array.from(this.roots.keys()).filter(function(e){return e!=L})}},{key:"getNearestSelectionRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"both";if(this.schema.check({name:"$text",inside:e}))return new c.default(e);var n=void 0,r=void 0;"both"!=t&&"backward"!=t||(n=new j.default({startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(r=new j.default({startPosition:e}));var o=!0,i=!1,u=void 0;try{for(var l,s=a(n,r)[Symbol.iterator]();!(o=(l=s.next()).done);o=!0){var f=l.value,d=f.walker==n?"elementEnd":"elementStart",h=f.value;if(h.type==d&&this.schema.objects.has(h.item.name))return c.default.createOn(h.item);if(this.schema.check({name:"$text",inside:h.nextPosition}))return new c.default(h.nextPosition)}}catch(e){i=!0,u=e}finally{try{!o&&s.return&&s.return()}finally{if(i)throw u}}return null}},{key:"toJSON",value:function(){var e=(0,C.default)(this);return e.selection="[engine.model.LiveSelection]",e}},{key:"_getDefaultRoot",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this.roots.values()[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;if(i!==this.graveyard)return i}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}return this.graveyard}},{key:"_getDefaultRange",value:function(){var e=this._getDefaultRoot(),t=new h.default(e,[0]);return this.getNearestSelectionRange(t)||new c.default(t)}},{key:"_validateSelectionRange",value:function(e){return i(e.start)&&i(e.end)}},{key:"graveyard",get:function(){return this.getRoot(L)}}]),e}();t.default=D,(0,I.default)(D,T.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&!this._historyPoints.has(e.baseVersion)){var t=this._deltas.length;this._deltas[t]=e,this._historyPoints.set(e.baseVersion,t)}}},{key:"getDeltas",value:regeneratorRuntime.mark(function e(){var t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._deltas.length){e.next=2;break}return e.abrupt("return");case 2:if((t=this._getIndex(r))!=-1){e.next=5;break}return e.abrupt("return");case 5:if(!(t=o)){e.next=9;break}return e.abrupt("break",13);case 9:return e.next=11,n;case 11:e.next=5;break;case 13:case"end":return e.stop()}},e,this)})},{key:"getDelta",value:function(e){var t=this._historyPoints.get(e);if(void 0===t)return null;var n=[];for(t;te&&this._historyPoints.set(y,this._historyPoints.get(y)+f)}}catch(e){d=!0,h=e}finally{try{!c&&v.return&&v.return()}finally{if(d)throw h}}}}},{key:"_getIndex",value:function(e){var t=this._historyPoints.get(e);if(void 0===t){var n=this._deltas[this._deltas.length-1],r=n.baseVersion+n.operations.length;if(e<0||e>=r)return-1;throw new l.default("model-history-wrong-version: Given base version points to the middle of a delta.")}return t}}]),e}();t.default=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e instanceof g.default||e instanceof _.default?e.getAttributes():null}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addRange",this).call(this,e,n),this.refreshAttributes()}},{key:"removeAllRanges",value:function(){f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeAllRanges",this).call(this),this.refreshAttributes()}},{key:"setRanges",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setRanges",this).call(this,e,n),this.refreshAttributes()}},{key:"setAttribute",value:function(e,t){if(this.isCollapsed&&0===this.anchor.parent.childCount&&this._storeAttribute(e,t),this._setAttribute(e,t)){var n=[e];this.fire("change:attribute",{attributeKeys:n,directChange:!0})}}},{key:"removeAttribute",value:function(e){if(this.isCollapsed&&0===this.anchor.parent.childCount&&this._removeStoredAttribute(e),this._removeAttribute(e)){var t=[e];this.fire("change:attribute",{attributeKeys:t,directChange:!0})}}},{key:"setAttributesTo",value:function(e){e=(0,k.default)(e),this.isCollapsed&&0===this.anchor.parent.childCount&&this._setStoredAttributesTo(e);var t=this._setAttributesTo(e);if(t.size>0){var n=Array.from(t);this.fire("change:attribute",{attributeKeys:n,directChange:!0})}}},{key:"clearAttributes",value:function(){this.setAttributesTo([])}},{key:"refreshAttributes",value:function(){this._updateAttributes(!0)}},{key:"_popRange",value:function(){this._ranges.pop().detach()}},{key:"_pushRange",value:function(e){var t=this._prepareRange(e);t&&this._ranges.push(t)}},{key:"_prepareRange",value:function(e){var t=this;if(!(e instanceof p.default))throw new P.default("model-selection-added-not-range: Trying to add an object that is not an instance of Range.");if(e.root==this._document.graveyard)return void x.default.warn("model-selection-range-in-graveyard: Trying to add a Range that is in the graveyard root. Range rejected.");this._checkRange(e);var n=y.default.createFromRange(e);return this.listenTo(n,"change",function(e,r){n.root==t._document.graveyard&&t._fixGraveyardSelection(n,r),t.fire("change:range",{directChange:!1})}),n}},{key:"_updateAttributes",value:function(e){var t=(0,k.default)(this._getSurroundingAttributes()),n=(0,k.default)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else{var r=!0,o=!1,i=void 0;try{for(var a,u=this._attributePriority[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=l(a.value,2),f=s[0];"low"==s[1]&&(this._attrs.delete(f),this._attributePriority.delete(f))}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}}this._setAttributesTo(t,!1);var c=[],d=!0,h=!1,p=void 0;try{for(var v,y=this.getAttributes()[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){var b=l(v.value,2),_=b[0],m=b[1];n.has(_)&&n.get(_)===m||c.push(_)}}catch(e){h=!0,p=e}finally{try{!d&&y.return&&y.return()}finally{if(h)throw p}}var g=!0,w=!1,O=void 0;try{for(var P,j=n[Symbol.iterator]();!(g=(P=j.next()).done);g=!0){var x=l(P.value,1),M=x[0];this.hasAttribute(M)||c.push(M)}}catch(e){w=!0,O=e}finally{try{!g&&j.return&&j.return()}finally{if(w)throw O}}c.length>0&&this.fire("change:attribute",{attributeKeys:c,directChange:!1})}},{key:"_setAttribute",value:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=r?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"getAttribute",this).call(this,e)!==n&&(this._attrs.set(e,n),this._attributePriority.set(e,o),!0))}},{key:"_removeAttribute",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n?"normal":"low";return("low"!=r||"normal"!=this._attributePriority.get(e))&&(!!f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"hasAttribute",this).call(this,e)&&(this._attrs.delete(e),this._attributePriority.set(e,r),!0))}},{key:"_setAttributesTo",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=new Set,r=!0,o=!1,i=void 0;try{for(var a,u=this.getAttributes()[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var s=l(a.value,2),f=s[0],c=s[1];e.get(f)!==c&&this._removeAttribute(f,t)&&n.add(f)}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}var d=!0,h=!1,p=void 0;try{for(var v,y=e[Symbol.iterator]();!(d=(v=y.next()).done);d=!0){var b=l(v.value,2),_=b[0],m=b[1];this._setAttribute(_,m,t)&&n.add(_)}}catch(e){h=!0,p=e}finally{try{!d&&y.return&&y.return()}finally{if(h)throw p}}return n}},{key:"_getStoredAttributes",value:regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,u,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getFirstPosition().parent,!this.isCollapsed||0!==t.childCount){e.next=30;break}n=!0,r=!1,o=void 0,e.prev=5,i=t.getAttributeKeys()[Symbol.iterator]();case 7:if(n=(a=i.next()).done){e.next=16;break}if(u=a.value,0!==u.indexOf(C)){e.next=13;break}return l=u.substr(C.length),e.next=13,[l,t.getAttribute(u)];case 13:n=!0,e.next=7;break;case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(5),r=!0,o=e.t0;case 22:e.prev=22,e.prev=23,!n&&i.return&&i.return();case 25:if(e.prev=25,!r){e.next=28;break}throw o;case 28:return e.finish(25);case 29:return e.finish(22);case 30:case"end":return e.stop()}},e,this,[[5,18,22,30],[23,,25,29]])})},{key:"_removeStoredAttribute",value:function(e){var n=t._getStoreAttributeKey(e);this._document.batch().removeAttribute(this.anchor.parent,n)}},{key:"_storeAttribute",value:function(e,n){var r=t._getStoreAttributeKey(e);this._document.batch().setAttribute(this.anchor.parent,r,n)}},{key:"_setStoredAttributesTo",value:function(e){var n=this.anchor.parent,r=this._document.batch(),o=!0,i=!1,a=void 0;try{for(var u,s=this._getStoredAttributes()[Symbol.iterator]();!(o=(u=s.next()).done);o=!0){var f=l(u.value,1),c=f[0],d=t._getStoreAttributeKey(c);r.removeAttribute(n,d)}}catch(e){i=!0,a=e}finally{try{!o&&s.return&&s.return()}finally{if(i)throw a}}var h=!0,p=!1,v=void 0;try{for(var y,b=e[Symbol.iterator]();!(h=(y=b.next()).done);h=!0){var _=l(y.value,2),m=_[0],g=_[1],w=t._getStoreAttributeKey(m);r.setAttribute(n,w,g)}}catch(e){p=!0,v=e}finally{try{!h&&b.return&&b.return()}finally{if(p)throw v}}}},{key:"_getSurroundingAttributes",value:function(){var e=this.getFirstPosition(),t=null;if(this.isCollapsed){var n=e.textNode?e.textNode:e.nodeBefore,r=e.textNode?e.textNode:e.nodeAfter;if(t=u(n),t||(t=u(r)),!t)for(var o=n;o&&!t;)o=o.previousSibling,t=u(o);if(!t)for(var i=r;i&&!t;)i=i.nextSibling,t=u(i);t||(t=this._getStoredAttributes())}else{var a=this.getFirstRange(),l=!0,s=!1,f=void 0;try{for(var c,d=a[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var h=c.value;"text"==h.type&&null===t&&(t=h.item.getAttributes())}}catch(e){s=!0,f=e}finally{try{!l&&d.return&&d.return()}finally{if(s)throw f}}}return t}},{key:"_fixGraveyardSelection",value:function(e,t){var n=e.start.path,r=t.start.path.length-(n.length-2),o=t.start.path.slice(0,r);o[o.length-1]-=n[1];var i=new d.default(t.root,o),a=this._document.getNearestSelectionRange(i);a||(a=new p.default(new d.default(i.root,[0])));var u=this._prepareRange(a),l=this._ranges.indexOf(e);e.detach(),this._ranges.splice(l,1,u)}},{key:"isCollapsed",get:function(){return 0===this._ranges.length||f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"isCollapsed",this)}},{key:"anchor",get:function(){return f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"anchor",this)||this._document._getDefaultRange().start}},{key:"focus",get:function(){return f(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"focus",this)||this._document._getDefaultRange().start}},{key:"rangeCount",get:function(){return this._ranges.length?this._ranges.length:1}}],[{key:"createFromSelection",value:function(e){var t=new this(e._document);return t.setTo(e),t}},{key:"_getStoreAttributeKey",value:function(e){return C+e}}]),t}(S.default);t.default=T},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=t._holderElementOffset&&(e=e.clone(),e.range.start.path[0]++,e.range.end.path[0]++);var o=l(e.range.getDifference(n)),i=e.range.getIntersection(n);return null!==o&&(o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany),r=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()),r.push(i)),r.map(function(t){return new d.default(t,e.key,e.oldValue,e.newValue,e.baseVersion)})}},RootAttributeOperation:{InsertOperation:i,AttributeOperation:i,RootAttributeOperation:function(e,t,n){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||n)&&e.newValue!==t.newValue?[e.clone()]:[new P.default(e.baseVersion)]},RenameOperation:i,MarkerOperation:i,MoveOperation:i},RenameOperation:{InsertOperation:function(e,t){var n=e.clone();return n.position=n.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[n]},AttributeOperation:i,RootAttributeOperation:i,RenameOperation:function(e,t,n){var r=e.clone();if(e.position.isEqual(t.position)){if(!n)return[new P.default(e.baseVersion)];r.oldName=t.newName}return[r]},MarkerOperation:i,MoveOperation:function(e,t){var n=e.clone(),r=n.position.isEqual(t.sourcePosition);return n.position=n.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,r),[n]}},MarkerOperation:{InsertOperation:function(e,t){var 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:i,RootAttributeOperation:i,RenameOperation:i,MarkerOperation:function(e,t,n){var r=e.clone();if(e.name==t.name){if(!n)return[new P.default(e.baseVersion)];r.oldRange=t.newRange}return[r]},MoveOperation:function(e,t){var n=e.clone();if(n.oldRange){var r=n.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.oldRange=x.default.createFromRanges(r)}if(n.newRange){var o=n.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.newRange=x.default.createFromRanges(o)}return[n]}},MoveOperation:{InsertOperation:function(e,t,n){var r=x.default.createFromPositionAndShift(e.sourcePosition,e.howMany);r=r._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,e.isSticky)[0];var o=new e.constructor(r.start,r.end.offset-r.start.offset,e instanceof k.default?e.baseVersion:e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,!n),e instanceof k.default?void 0:e.baseVersion);return o.isSticky=e.isSticky,o._holderElementOffset=e._holderElementOffset,[o]},AttributeOperation:i,RootAttributeOperation:i,RenameOperation:i,MarkerOperation:i,MoveOperation:function(e,t,n){if(u(e,t)&&u(t,e))return[t.getReversed()];if(e instanceof k.default&&t instanceof k.default){e.targetPosition.path[0]>=t.targetPosition.path[0]&&n&&(e=e.clone(),e.targetPosition.path[0]++)}e instanceof k.default&&!(t instanceof k.default)?n=!0:!(e instanceof k.default)&&t instanceof k.default&&(n=!1);var r=x.default.createFromPositionAndShift(e.sourcePosition,e.howMany),o=x.default.createFromPositionAndShift(t.sourcePosition,t.howMany),i=[],a=l(r.getDifference(o));a&&(a.start=a.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!e.isSticky,!1),a.end=a.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,e.isSticky,!1),i.push(a));var s=r.getIntersection(o),f=(0,S.default)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath()),c=r.containsPosition(t.targetPosition)||r.start.isEqual(t.targetPosition)&&e.isSticky||r.end.isEqual(t.targetPosition)&&e.isSticky,d=o.containsRange(r)&&(o.containsPosition(e.targetPosition)||o.start.isEqual(e.targetPosition)||o.end.isEqual(e.targetPosition));if(null!==s&&("extension"===f||"same"===f&&n||d)&&!c&&(s.start=s.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),s.end=s.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),a&&r.start.isBefore(o.start)?i.push(s):i.unshift(s)),0===i.length)return e instanceof k.default?(e=e.clone(),e.howMany=0,e.sourcePosition=t.targetPosition,[e]):[new P.default(e.baseVersion)];var h=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!n,t.isSticky||d);return i.reverse().map(function(t){var n=new e.constructor(t.start,t.end.offset-t.start.offset,e instanceof k.default?e.baseVersion:h,e instanceof k.default?void 0:e.baseVersion);return n.isSticky=e.isSticky,n._holderElementOffset=e._holderElementOffset,n})}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"main";o(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return a._doc=e,a.rootName=r,a}return a(t,e),u(t,[{key:"is",value:function(e,n){return n?"rootElement"==e&&n==this.name||l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e,n):"rootElement"==e||l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"is",this).call(this,e)}},{key:"toJSON",value:function(){return this.rootName}},{key:"document",get:function(){return this._doc}}]),t}(f.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){for(var r=n.length-1,o=t.length-1;r>=0&&o>=0;){var i=t[o];if(!e.hasItem(i))return!1;if(!e._extensionChains.get(i).includes(n[r]))return!1;r--,o--}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaItem=void 0;var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"main",r="string"==typeof e?e:e.tagName,o=new p.default(r.toLowerCase(),n);return o.document=this,this.roots.set(n,o),o.on("change:children",function(e,n){return t.renderer.markToSync("children",n)}),o.on("change:attributes",function(e,n){return t.renderer.markToSync("attributes",n)}),o.on("change:text",function(e,n){return t.renderer.markToSync("text",n)}),this.domConverter.isElement(e)&&this.attachDomRoot(e,n),o}},{key:"attachDomRoot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"main",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);var r=!0,o=!1,i=void 0;try{for(var a,u=this._observers.values()[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){a.value.observe(e,t)}}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}}},{key:"getRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.roots.get(e)}},{key:"getDomRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main";return this.domRoots.get(e)}},{key:"render",value:function(){this.fire("render")}},{key:"focus",value:function(){if(!this.isFocused){var e=this.selection.editableElement;e?(this.domConverter.focus(e),this.render()):b.default.warn("view-focus-no-selection: There is no selection in any editable to focus.")}}},{key:"disableObservers",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this._observers.values()[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){r.value.disable()}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}}},{key:"enableObservers",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this._observers.values()[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){r.value.enable()}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}}},{key:"destroy",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=this._observers.values()[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){r.value.destroy()}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}}}]),e}();t.default=A,(0,C.default)(A,T.default)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n50}},{key:"_clearInfiniteLoop",value:function(){this._lastSelection=null,this._lastButOneSelection=null,this._loopbackCounter=0}}]),t}(f.default);t.default=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;nt.data.length)throw new u.default("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.");if(r<0||n+r>t.data.length)throw new u.default("view-textproxy-wrong-length: Given length value is incorrect.");this.data=t.data.substring(n,n+r),this.offsetInText=n}return i(e,[{key:"is",value:function(e){return"textProxy"==e}},{key:"getAncestors",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeNode:!1,parentFirst:!1},t=[],n=e.includeNode?this.textNode:this.parent;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}},{key:"isPartial",get:function(){return this.data.length!==this.textNode.data.length}},{key:"parent",get:function(){return this.textNode.parent}},{key:"root",get:function(){return this.textNode.root}},{key:"document",get:function(){return this.textNode.document}}]),e}();t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor,r=n.document,o=this.value;r.enqueueChanges(function(){var i=t.batch||r.batch(),a=!0,u=!1,l=void 0;try{for(var f,c=r.selection.getSelectedBlocks()[Symbol.iterator]();!(a=(f=c.next()).done);a=!0){var d=f.value;if(o){if(d.is(e.modelElement)){var p=new h.default;p.addRange(s.default.createIn(d)),n.execute("paragraph",{selection:p,batch:i})}}else d.is(e.modelElement)||i.rename(d,e.modelElement)}}catch(e){u=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(u)throw l}}})}},{key:"_updateValue",value:function(){var e=this.editor.document.selection.getSelectedBlocks().next().value;e&&(this.value=e.is(this.modelElement))}}]),t}(c.default);t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0){if(!r.consume(n.item,"insert"))return;var a=o.mapper.toViewElement(n.range.start.parent);c(e instanceof k.default?e.clone(!0):e(),n.item,a,o.mapper)}}}function f(e){return!(!e.parent||"caption"!=e.parent.name||!e.parent.parent||"image"!=e.parent.parent.name)}function c(e,t,n,r){var o=E.default.createAt(n,"end");x.default.insert(o,e),r.bindElements(t,e)}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(!this.value){var n=this.editor,r=n.document,o=r.selection,i=o.getSelectedElement();r.enqueueChanges(function(){(t.batch||r.batch()).setAttribute(i,"imageStyle",e.style.value)})}}}]),t}(s.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nl)return null;u=u[n]}return null}function y(e,t){e&&t&&("ul"==e.name||"ol"==e.name)&&e.name==t.name&&T.default.mergeContainers(M.default.createAfter(e))}function b(e,t,n){var r=t.parent,o=v(e,{sameIndent:!0,biggerIndent:!0});if(o){var i=n.toViewElement(o),a=M.default.createAfter(i);T.default.breakContainer(a)}var u=v(e,{sameIndent:!0,checkAllSiblings:!0}),l=void 0;if(u){var s=n.toViewElement(u),f=M.default.createAfter(s);l=T.default.breakContainer(f)}else{var c=e.previousSibling;l=c&&"listItem"==c.name?M.default.createAt(n.toViewElement(c),"end"):n.toViewPosition(O.default.createBefore(e))}T.default.insert(l,r);var d=v(e,{getNext:!0,biggerIndent:!0}),h=n.toViewElement(d);if(h){var p=C.default.createOn(h.parent),b=M.default.createAt(t,"end");T.default.move(p,b)}y(r,r.nextSibling),y(r.previousSibling,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.modelViewInsertion=o,t.modelViewChangeType=i,t.modelViewRemove=a,t.modelViewChangeIndent=u,t.modelViewSplitOnInsert=l,t.modelViewMergeAfter=s,t.viewModelConverter=f,t.cleanList=c,t.modelToViewPosition=d,t.viewToModelPosition=h;var _=n(375),m=r(_),g=n(5),w=r(g),k=n(1),O=r(k),P=n(39),j=r(P),x=n(25),M=r(x),S=n(34),C=r(S),E=n(77),T=r(E)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;nt;)o.push(i),i=i.nextSibling;e._indentBy<0&&(o=o.reverse());var a=!0,u=!1,l=void 0;try{for(var s,f=o[Symbol.iterator]();!(a=(s=f.next()).done);a=!0){var c=s.value,d=c.getAttribute("indent")+e._indentBy;d<0?n.rename(c,"paragraph").removeAttribute(c,"indent").removeAttribute(c,"type"):n.setAttribute(c,"indent",d)}}catch(e){u=!0,l=e}finally{try{!a&&f.return&&f.return()}finally{if(u)throw l}}})}},{key:"_checkEnabled",value:function(){var e=(0,f.getClosestListItem)(this.editor.document.selection.getFirstPosition());if(!e)return!1;var t=e.previousSibling,n=e.getAttribute("indent"),r=n+this._indentBy;if(this._indentBy>0){if(!t||"listItem"!=t.name)return!1;if(t.getAttribute("indent")+10&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.document,r=Array.from(n.selection.getSelectedBlocks()),o=this.value===!0;n.enqueueChanges(function(){var i=t.batch||n.batch();if(o){for(var a=r[r.length-1].nextSibling,u=Number.POSITIVE_INFINITY,l=[];a&&"listItem"==a.name&&0!==a.getAttribute("indent");){var s=a.getAttribute("indent");s0&&void 0!==arguments[0]?arguments[0]:{},t=this.editor.document;t.enqueueChanges(function(){var n=e.batch||t.batch(),r=(e.selection||t.selection).getSelectedBlocks(),o=!0,i=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var s=u.value;s.is("paragraph")||n.rename(s,"paragraph")}}catch(e){i=!0,a=e}finally{try{!o&&l.return&&l.return()}finally{if(i)throw a}}})}},{key:"_updateValue",value:function(){var e=this.editor.document.selection.getSelectedBlocks().next().value;e&&(this.value=e.is("paragraph"))}}]),t}(s.default);t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.document,r=this.editor.data;n.enqueueChanges(function(){e._buffer.lock();var o=c.default.createFromSelection(n.selection);if(o.isCollapsed&&r.modifySelection(o,{direction:e.direction,unit:t.unit}),!o.isCollapsed){var i=0;o.getFirstRange().getMinimalFlatRanges().forEach(function(e){i+=(0,v.default)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),r.deleteContent(o,e._buffer.batch,{merge:!0}),e._buffer.input(i),n.selection.setRanges(o.getRanges(),o.isBackward),e._buffer.unlock()}})}}]),t}(s.default);t.default=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n1)){var r=n[0];if(r.values[0]instanceof b.default){var o=new v.default(e.node,r.index),i=this.editing.mapper.toModelPosition(o),a=r.values[0].data;this.editor.execute("input",{text:a.replace(/\u00A0/g," "),range:new h.default(i)})}}}}}]),e}(),M=[(0,k.getCode)("arrowUp"),(0,k.getCode)("arrowRight"),(0,k.getCode)("arrowDown"),(0,k.getCode)("arrowLeft"),9,16,17,18,20,27,33,34,35,36,229],S=112;S<=135;S++)M.push(S)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=this.editor.document,r=t.text||"",o=r.length,i=t.range||n.selection.getFirstRange(),a=t.resultRange;n.enqueueChanges(function(){var t=i.isCollapsed;e._buffer.lock(),t||e._buffer.batch.remove(i),e._buffer.batch.weakInsert(i.start,r),a?e.editor.data.model.selection.setRanges([a]):t&&e.editor.data.model.selection.collapse(i.start.getShiftedBy(o)),e._buffer.unlock(),e._buffer.input(o)})}},{key:"buffer",get:function(){return this._buffer}}]),t}(f.default);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0;)e.element.appendChild(o.childNodes[0])}),e}return a(t,e),t}(l.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(9),l=r(u),s=n(6),f=r(s),c=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.set("text"),n.set("for");var r=n.bindTemplate;return n.template=new f.default({tag:"label",attributes:{class:["ck-label"],for:r.to("for")},children:[{text:r.to("text")}]}),n}return a(t,e),t}(l.default);t.default=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,n=t?this._stack.findIndex(function(e){return e.batch==t}):this._stack.length-1,r=this._stack.splice(n,1)[0];this.editor.document.enqueueChanges(function(){var t=e._undo(r.batch),n=e.editor.document.history.getDeltas(r.batch.baseVersion);e._restoreSelection(r.selection.ranges,r.selection.isBackward,n),e.fire("revert",r.batch,t)}),this.refreshState()}},{key:"_getItemIndexFromBaseVersion",value:function(e){for(var t=0;t3&&void 0!==arguments[3]&&arguments[3];if((0,u.default)(t))return void this._setObjectToTarget(e,t,r);var o=t.split(".");t=o.pop();var i=!0,a=!1,l=void 0;try{for(var s,f=o[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value;(0,u.default)(e[c])||(e[c]={}),e=e[c]}}catch(e){a=!0,l=e}finally{try{!i&&f.return&&f.return()}finally{if(a)throw l}}if((0,u.default)(n))return(0,u.default)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,r);r&&void 0!==e[t]||(e[t]=n)}},{key:"_getFromSource",value:function(e,t){var n=t.split(".");t=n.pop();var r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var s=a.value;if(!(0,u.default)(e[s])){e=null;break}e=e[s]}}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return e?e[t]:void 0}},{key:"_setObjectToTarget",value:function(e,t,n){var r=this;Object.keys(t).forEach(function(o){r._setToTarget(e,o,t[o],n)})}}]),e}();t.default=l},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e,t){function n(){a&&(o.push(a),a=null)}function r(e){return a&&a.type==e}var o=[],i=0,a=void 0;return e.forEach(function(e){"equal"==e?(n(),i++):"insert"==e?(r("insert")?a.values.push(t[i]):(n(),a={type:"insert",index:i,values:[t[i]]}),i++):r("delete")?a.howMany++:(n(),a={type:"delete",index:i,howMany:1})}),n(),o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var n=(0,a.default)(e),r=(0,a.default)(t),o=0;n[o]==r[o]&&n[o];)o++;return 0===o?null:n[o-1]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(186),a=r(i)},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){for(;e&&"html"!=e.tagName.toLowerCase();){if("static"!=a.default.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(62),a=r(i)},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){for(var t=0;e.previousSibling;)e=e.previousSibling,t++;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +function r(e){return"[object Range]"==Object.prototype.toString.apply(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.element,n=e.target,r=e.positions,o=e.limiter,s=e.fitInViewport,f=(0,p.default)(t.parentElement),c=new d.default(t),h=new d.default(n),v=void 0,y=void 0;if(o||s){var b=o&&new d.default(o),_=s&&d.default.getViewportRect(),m=a(r,h,c,b,_)||i(r[0],h,c),g=l(m,2);y=g[0],v=g[1]}else{var w=i(r[0],h,c),k=l(w,2);y=k[0],v=k[1]}var O=u(v),P=O.left,j=O.top;if(f){var x=u(new d.default(f));P-=x.left,j-=x.top}return{left:P,top:j,name:y}}function i(e,t,n){var r=e(t,n),o=r.left,i=r.top;return[r.name,n.clone().moveTo(o,i)]}function a(e,t,n,r,o){var a=0,u=0,s=void 0,f=void 0,c=n.getArea();return e.some(function(e){function d(){u=_,a=b,s=y,f=v}var h=i(e,t,n),p=l(h,2),v=p[0],y=p[1],b=void 0,_=void 0;if(r)if(o){var m=r.getIntersection(o);b=m?m.getIntersectionArea(y):0}else b=r.getIntersectionArea(y);return o&&(_=o.getIntersectionArea(y)),o&&!r?_>u&&d():!o&&r?b>a&&d():_>u&&b>=a?d():_>=u&&b>a&&d(),b===c}),s?[f,s]:null}function u(e){var t=e.left,n=e.top,r=f.default.window;return{left:t+r.scrollX,top:n+r.scrollY}}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +t.getOptimalPosition=o;var s=n(62),f=r(s),c=n(416),d=r(c),h=n(411),p=r(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n-1}Object.defineProperty(t,"__esModule",{value:!0}),t.isMac=r;/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ +var o=navigator.userAgent.toLowerCase(),i={mac:r(o)};t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(523),a=r(i),u=function e(t,n){o(this,e),this.source=t,this.name=n,this.path=[],this.stop=(0,a.default)(),this.off=(0,a.default)()};t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),i=r(o),a=n(30),u=r(a),l=(0,i.default)(u.default,"DataView");t.default=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=-1,n=e?e.length:0;for(this.clear();++t=t?e:t)),e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,a.default)(e)?u(e):{}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),a=r(i),u=Object.create;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){var o=e.length;for(n=(0,a.default)(n),n<0&&(n=-n>o?0:o+n),r=void 0===r||r>o?o:(0,a.default)(r),r<0&&(r+=o),r=n>r?0:(0,l.default)(r);nt||i&&u&&s&&!l&&!f||r&&u&&s||!n&&s||!o)return 1;if(!r&&!i&&!f&&e1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,u&&(0,a.default)(n[0],n[1],u)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=this.__data__,r=(0,a.default)(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Object.defineProperty(t,"__esModule",{value:!0});var i=n(84),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){this.__data__={hash:new a.default,map:new(f.default||l.default),string:new a.default}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(423),a=r(i),u=n(80),l=r(u),s=n(188),f=r(s);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,a.default)(this,e).delete(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(88),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,a.default)(this,e).get(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(88),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,a.default)(this,e).has(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(88),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return(0,a.default)(this,e).set(e,t),this}Object.defineProperty(t,"__esModule",{value:!0});var i=n(88),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return 1==t.length?e:(0,a.default)(e,(0,l.default)(t,0,-1))}Object.defineProperty(t,"__esModule",{value:!0});var i=n(124),a=r(i),u=n(35),l=r(u);t.default=o},function(e,t,n){"use strict";function r(e){return this.__data__.set(e,o),this}Object.defineProperty(t,"__esModule",{value:!0});var o="__lodash_hash_undefined__";t.default=r},function(e,t,n){"use strict";function r(e){return this.__data__.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){this.__data__=new a.default}Object.defineProperty(t,"__esModule",{value:!0});var i=n(80),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return this.__data__.delete(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return this.__data__.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return this.__data__.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=this.__data__;return n instanceof a.default&&n.__data__.length==s&&(n=this.__data__=new l.default(n.__data__)),n.set(e,t),this}Object.defineProperty(t,"__esModule",{value:!0});var i=n(80),a=r(i),u=n(119),l=r(u),s=200;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(511),i=r(o),a=n(519),u=r(a),l=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g,f=(0,i.default)(function(e){var t=[];return(0,u.default)(e).replace(l,function(e,n,r,o){t.push(r?o.replace(s,"$1"):n||e)}),t});t.default=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(208),i=r(o),a=n(209),u=r(a),l=n(210),s=r(l),f=n(211),c=r(f),d=n(212),h=r(d),p=n(213),v=r(p),y=n(141),b=r(y),_=n(142),m=r(_),g=n(214),w=r(g),k=n(215),O=r(k),P=n(216),j=r(P),x=n(217),M=r(x),S=n(218),C=r(S),E=n(219),T=r(E),A=n(220),R=r(A),F=n(221),I=r(F),V=n(222),N=r(V),L=n(223),D=r(L),B=n(143),q=r(B),z=n(226),$=r(z),W=n(227),K=r(W),H=n(228),U=r(H),G=n(229),J=r(G),Z=n(230),Y=r(Z),Q=n(232),X=r(Q),ee=n(18),te=r(ee),ne=n(233),re=r(ne),oe=n(234),ie=r(oe),ae=n(235),ue=r(ae),le=n(147),se=r(le),fe=n(236),ce=r(fe),de=n(237),he=r(de),pe=n(238),ve=r(pe),ye=n(239),be=r(ye),_e=n(240),me=r(_e),ge=n(241),we=r(ge),ke=n(242),Oe=r(ke),Pe=n(243),je=r(Pe),xe=n(244),Me=r(xe),Se=n(245),Ce=r(Se),Ee=n(246),Te=r(Ee),Ae=n(247),Re=r(Ae),Fe=n(248),Ie=r(Fe),Ve=n(249),Ne=r(Ve),Le=n(250),De=r(Le),Be=n(251),qe=r(Be),ze=n(252),$e=r(ze),We=n(253),Ke=r(We),He=n(254),Ue=r(He),Ge=n(256),Je=r(Ge),Ze=n(257),Ye=r(Ze),Qe=n(258),Xe=r(Qe),et=n(259),tt=r(et),nt=n(260),rt=r(nt),ot=n(261),it=r(ot),at=n(98),ut=r(at),lt=n(148),st=r(lt),ft=n(262),ct=r(ft),dt=n(263),ht=r(dt),pt=n(264),vt=r(pt),yt=n(265),bt=r(yt),_t=n(266),mt=r(_t),gt=n(267),wt=r(gt),kt=n(268),Ot=r(kt),Pt=n(269),jt=r(Pt);t.default={chunk:i.default,compact:u.default,concat:s.default,difference:c.default,differenceBy:h.default,differenceWith:v.default,drop:b.default,dropRight:m.default,dropRightWhile:w.default,dropWhile:O.default,fill:j.default,findIndex:M.default,findLastIndex:C.default,first:T.default,flatten:R.default,flattenDeep:I.default,flattenDepth:N.default,fromPairs:D.default,head:q.default,indexOf:$.default,initial:K.default,intersection:U.default,intersectionBy:J.default,intersectionWith:Y.default,join:X.default,last:te.default,lastIndexOf:re.default,nth:ie.default,pull:ue.default,pullAll:se.default,pullAllBy:ce.default,pullAllWith:he.default,pullAt:ve.default,remove:be.default,reverse:me.default,slice:we.default,sortedIndex:Oe.default,sortedIndexBy:je.default,sortedIndexOf:Me.default,sortedLastIndex:Ce.default,sortedLastIndexBy:Te.default,sortedLastIndexOf:Re.default,sortedUniq:Ie.default,sortedUniqBy:Ne.default,tail:De.default,take:qe.default,takeRight:$e.default,takeRightWhile:Ke.default,takeWhile:Ue.default,union:Je.default,unionBy:Ye.default,unionWith:Xe.default,uniq:tt.default,uniqBy:rt.default,uniqWith:it.default,unzip:ut.default,unzipWith:st.default,without:ct.default,xor:ht.default,xorBy:vt.default,xorWith:bt.default,zip:mt.default,zipObject:wt.default,zipObjectDeep:Ot.default,zipWith:jt.default}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(208);Object.defineProperty(t,"chunk",{enumerable:!0,get:function(){return r(o).default}});var i=n(209);Object.defineProperty(t,"compact",{enumerable:!0,get:function(){return r(i).default}});var a=n(210);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return r(a).default}});var u=n(211);Object.defineProperty(t,"difference",{enumerable:!0,get:function(){return r(u).default}});var l=n(212);Object.defineProperty(t,"differenceBy",{enumerable:!0,get:function(){return r(l).default}});var s=n(213);Object.defineProperty(t,"differenceWith",{enumerable:!0,get:function(){return r(s).default}});var f=n(141);Object.defineProperty(t,"drop",{enumerable:!0,get:function(){return r(f).default}});var c=n(142);Object.defineProperty(t,"dropRight",{enumerable:!0,get:function(){return r(c).default}});var d=n(214);Object.defineProperty(t,"dropRightWhile",{enumerable:!0,get:function(){return r(d).default}});var h=n(215);Object.defineProperty(t,"dropWhile",{enumerable:!0,get:function(){return r(h).default}});var p=n(216);Object.defineProperty(t,"fill",{enumerable:!0,get:function(){return r(p).default}});var v=n(217);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return r(v).default}});var y=n(218);Object.defineProperty(t,"findLastIndex",{enumerable:!0,get:function(){return r(y).default}});var b=n(219);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return r(b).default}});var _=n(220);Object.defineProperty(t,"flatten",{enumerable:!0,get:function(){return r(_).default}});var m=n(221);Object.defineProperty(t,"flattenDeep",{enumerable:!0,get:function(){return r(m).default}});var g=n(222);Object.defineProperty(t,"flattenDepth",{enumerable:!0,get:function(){return r(g).default}});var w=n(223);Object.defineProperty(t,"fromPairs",{enumerable:!0,get:function(){return r(w).default}});var k=n(143);Object.defineProperty(t,"head",{enumerable:!0,get:function(){return r(k).default}});var O=n(226);Object.defineProperty(t,"indexOf",{enumerable:!0,get:function(){return r(O).default}});var P=n(227);Object.defineProperty(t,"initial",{enumerable:!0,get:function(){return r(P).default}});var j=n(228);Object.defineProperty(t,"intersection",{enumerable:!0,get:function(){return r(j).default}});var x=n(229);Object.defineProperty(t,"intersectionBy",{enumerable:!0,get:function(){return r(x).default}});var M=n(230);Object.defineProperty(t,"intersectionWith",{enumerable:!0,get:function(){return r(M).default}});var S=n(232);Object.defineProperty(t,"join",{enumerable:!0,get:function(){return r(S).default}});var C=n(18);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return r(C).default}});var E=n(233);Object.defineProperty(t,"lastIndexOf",{enumerable:!0,get:function(){return r(E).default}});var T=n(234);Object.defineProperty(t,"nth",{enumerable:!0,get:function(){return r(T).default}});var A=n(235);Object.defineProperty(t,"pull",{enumerable:!0,get:function(){return r(A).default}});var R=n(147);Object.defineProperty(t,"pullAll",{enumerable:!0,get:function(){return r(R).default}});var F=n(236);Object.defineProperty(t,"pullAllBy",{enumerable:!0,get:function(){return r(F).default}});var I=n(237);Object.defineProperty(t,"pullAllWith",{enumerable:!0,get:function(){return r(I).default}});var V=n(238);Object.defineProperty(t,"pullAt",{enumerable:!0,get:function(){return r(V).default}});var N=n(239);Object.defineProperty(t,"remove",{enumerable:!0,get:function(){return r(N).default}});var L=n(240);Object.defineProperty(t,"reverse",{enumerable:!0,get:function(){return r(L).default}});var D=n(241);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return r(D).default}});var B=n(242);Object.defineProperty(t,"sortedIndex",{enumerable:!0,get:function(){return r(B).default}});var q=n(243);Object.defineProperty(t,"sortedIndexBy",{enumerable:!0,get:function(){return r(q).default}});var z=n(244);Object.defineProperty(t,"sortedIndexOf",{enumerable:!0,get:function(){return r(z).default}});var $=n(245);Object.defineProperty(t,"sortedLastIndex",{enumerable:!0,get:function(){return r($).default}});var W=n(246);Object.defineProperty(t,"sortedLastIndexBy",{enumerable:!0,get:function(){return r(W).default}});var K=n(247);Object.defineProperty(t,"sortedLastIndexOf",{enumerable:!0,get:function(){return r(K).default}});var H=n(248);Object.defineProperty(t,"sortedUniq",{enumerable:!0,get:function(){return r(H).default}});var U=n(249);Object.defineProperty(t,"sortedUniqBy",{enumerable:!0,get:function(){return r(U).default}});var G=n(250);Object.defineProperty(t,"tail",{enumerable:!0,get:function(){return r(G).default}});var J=n(251);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return r(J).default}});var Z=n(252);Object.defineProperty(t,"takeRight",{enumerable:!0,get:function(){return r(Z).default}});var Y=n(253);Object.defineProperty(t,"takeRightWhile",{enumerable:!0,get:function(){return r(Y).default}});var Q=n(254);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return r(Q).default}});var X=n(256);Object.defineProperty(t,"union",{enumerable:!0,get:function(){return r(X).default}});var ee=n(257);Object.defineProperty(t,"unionBy",{enumerable:!0,get:function(){return r(ee).default}});var te=n(258);Object.defineProperty(t,"unionWith",{enumerable:!0,get:function(){return r(te).default}});var ne=n(259);Object.defineProperty(t,"uniq",{enumerable:!0,get:function(){return r(ne).default}});var re=n(260);Object.defineProperty(t,"uniqBy",{enumerable:!0,get:function(){return r(re).default}});var oe=n(261);Object.defineProperty(t,"uniqWith",{enumerable:!0,get:function(){return r(oe).default}});var ie=n(98);Object.defineProperty(t,"unzip",{enumerable:!0,get:function(){return r(ie).default}});var ae=n(148);Object.defineProperty(t,"unzipWith",{enumerable:!0,get:function(){return r(ae).default}});var ue=n(262);Object.defineProperty(t,"without",{enumerable:!0,get:function(){return r(ue).default}});var le=n(263);Object.defineProperty(t,"xor",{enumerable:!0,get:function(){return r(le).default}});var se=n(264);Object.defineProperty(t,"xorBy",{enumerable:!0,get:function(){return r(se).default}});var fe=n(265);Object.defineProperty(t,"xorWith",{enumerable:!0,get:function(){return r(fe).default}});var ce=n(266);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return r(ce).default}});var de=n(267);Object.defineProperty(t,"zipObject",{enumerable:!0,get:function(){return r(de).default}});var he=n(268);Object.defineProperty(t,"zipObjectDeep",{enumerable:!0,get:function(){return r(he).default}});var pe=n(269);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return r(pe).default}});var ve=n(500);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r(ve).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(65),i=r(o),a=n(136),u=r(a),l=n(460),s=r(l),f=n(95),c=r(f),d=n(91),h=r(d),p=n(510),v=r(p),y=Object.prototype,b=y.propertyIsEnumerable,_=!b.call({valueOf:1},"valueOf"),m=(0,s.default)(function(e,t){if(_||(0,h.default)(t)||(0,c.default)(t))return void(0,u.default)(t,(0,v.default)(t),e);for(var n in t)(0,i.default)(e,n,t[n])});t.default=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return(0,a.default)(e,!0,!0,t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(193),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return function(){return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return null!=e&&(0,l.default)(e,t,a.default)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(437),a=r(i),u=n(468),l=r(u);t.default=o},function(e,t,n){"use strict";(function(e){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(504),a=r(i),u=n(30),l=r(u),s={function:!0,object:!0},f=s[o(t)]&&t&&!t.nodeType?t:void 0,c=s[o(e)]&&e&&!e.nodeType?e:void 0,d=c&&c.exports===f?f:void 0,h=d?l.default.Buffer:void 0,p=h?function(e){return e instanceof h}:(0,a.default)(!1);t.default=p}).call(t,n(150)(e))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return!!e&&1===e.nodeType&&(0,a.default)(e)&&!(0,l.default)(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(43),a=r(i),u=n(97),l=r(u);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(127),a=r(i);t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,l.default)(e)&&(0,a.default)(e.length)&&!!s[c.call(e)]}Object.defineProperty(t,"__esModule",{value:!0});var i=n(96),a=r(i),u=n(43),l=r(u),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var f=Object.prototype,c=f.toString;t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){for(var t=-1,n=(0,d.default)(e),r=(0,a.default)(e),o=r.length,i=(0,l.default)(e),u=!!i,s=i||[],c=s.length;++t} path Position path. See {@link module:engine/model/position~Position#path}.\n */\n\tfunction Position(root, path) {\n\t\t_classCallCheck(this, Position);\n\n\t\tif (!root.is('element') && !root.is('documentFragment')) {\n\t\t\t/**\n * Position root invalid.\n *\n * @error position-root-invalid.\n */\n\t\t\tthrow new _ckeditorerror2.default('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 * Position path must be an Array with at least one item.\n *\n * @error position-path-incorrect\n * @param path\n */\n\t\t\tthrow new _ckeditorerror2.default('model-position-path-incorrect: Position path must be an Array with at least one item.', { path: 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 * Root of the position path.\n *\n * @readonly\n * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n * module:engine/model/position~Position#root\n */\n\t\tthis.root = root;\n\n\t\t/**\n * Position of the node it the tree. Path is described through offsets, not indexes.\n *\n * Position can be placed before, after or in a {@link module:engine/model/node~Node node} if that node has\n * {@link module:engine/model/node~Node#offsetSize} greater than `1`. Items in position path are\n * {@link module:engine/model/node~Node#startOffset starting offsets} of position ancestors, starting from direct root children,\n * down to the position offset in it's parent.\n *\n *\t\t ROOT\n *\t\t |- P before: [ 0 ] after: [ 1 ]\n *\t\t |- UL before: [ 1 ] after: [ 2 ]\n *\t\t |- LI before: [ 1, 0 ] after: [ 1, 1 ]\n *\t\t | |- foo before: [ 1, 0, 0 ] after: [ 1, 0, 3 ]\n *\t\t |- LI before: [ 1, 1 ] after: [ 1, 2 ]\n *\t\t |- bar before: [ 1, 1, 0 ] after: [ 1, 1, 3 ]\n *\n * `foo` and `bar` are representing {@link module:engine/model/text~Text text nodes}. Since text nodes has offset size\n * greater than `1` you can place position offset between their start and end:\n *\n *\t\t ROOT\n *\t\t |- P\n *\t\t |- UL\n *\t\t |- LI\n *\t\t | |- f^o|o ^ has path: [ 1, 0, 1 ] | has path: [ 1, 0, 2 ]\n *\t\t |- LI\n *\t\t |- b^a|r ^ has path: [ 1, 1, 1 ] | has path: [ 1, 1, 2 ]\n *\n * @member {Array.} module:engine/model/position~Position#path\n */\n\t\tthis.path = path;\n\t}\n\n\t/**\n * Offset at which this position is located in its {@link module:engine/model/position~Position#parent parent}. It is equal\n * to the last item in position {@link module:engine/model/position~Position#path path}.\n *\n * @type {Number}\n */\n\n\n\t_createClass(Position, [{\n\t\tkey: 'compareWith',\n\n\n\t\t/**\n * Checks whether this position is before or after given position.\n *\n * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n * @returns {module:engine/model/position~PositionRelation}\n */\n\t\tvalue: function compareWith(otherPosition) {\n\t\t\tif (this.root != otherPosition.root) {\n\t\t\t\treturn 'different';\n\t\t\t}\n\n\t\t\tvar result = (0, _comparearrays2.default)(this.path, otherPosition.path);\n\n\t\t\tswitch (result) {\n\t\t\t\tcase 'same':\n\t\t\t\t\treturn 'same';\n\n\t\t\t\tcase 'prefix':\n\t\t\t\t\treturn 'before';\n\n\t\t\t\tcase 'extension':\n\t\t\t\t\treturn 'after';\n\n\t\t\t\tdefault:\n\t\t\t\t\tif (this.path[result] < otherPosition.path[result]) {\n\t\t\t\t\t\treturn 'before';\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 'after';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Gets the farthest position which matches the callback using\n * {@link module:engine/model/treewalker~TreeWalker TreeWalker}.\n *\n * For example:\n *\n * \t\tgetLastMatchingPosition( value => value.type == 'text' );\n * \t\t// []foo -> foo[]\n *\n * \t\tgetLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } );\n * \t\t// foo[] -> []foo\n *\n * \t\tgetLastMatchingPosition( value => false );\n * \t\t// Do not move the position.\n *\n * @param {Function} skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n * return `true` if the value should be skipped or `false` if not.\n * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n *\n * @returns {module:engine/model/position~Position} The position after the last item which matches the `skip` callback test.\n */\n\n\t}, {\n\t\tkey: 'getLastMatchingPosition',\n\t\tvalue: function getLastMatchingPosition(skip) {\n\t\t\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\t\toptions.startPosition = this;\n\n\t\t\tvar treeWalker = new _treewalker2.default(options);\n\t\t\ttreeWalker.skip(skip);\n\n\t\t\treturn treeWalker.position;\n\t\t}\n\n\t\t/**\n * Returns a path to this position's parent. Parent path is equal to position {@link module:engine/model/position~Position#path path}\n * but without the last item.\n *\n * This method returns the parent path even if the parent does not exists.\n *\n * @returns {Array.} Path to the parent.\n */\n\n\t}, {\n\t\tkey: 'getParentPath',\n\t\tvalue: function getParentPath() {\n\t\t\treturn this.path.slice(0, -1);\n\t\t}\n\n\t\t/**\n * Returns ancestors array of this position, that is this position's parent and its ancestors.\n *\n * @returns {Array.} Array with ancestors.\n */\n\n\t}, {\n\t\tkey: 'getAncestors',\n\t\tvalue: function getAncestors() {\n\t\t\tif (this.parent.is('documentFragment')) {\n\t\t\t\treturn [this.parent];\n\t\t\t} else {\n\t\t\t\treturn this.parent.getAncestors({ includeNode: true });\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}\n * of these two paths must be identical.\n *\n * @param {module:engine/model/position~Position} position The second position.\n * @returns {Array.} The common path.\n */\n\n\t}, {\n\t\tkey: 'getCommonPath',\n\t\tvalue: function getCommonPath(position) {\n\t\t\tif (this.root != position.root) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\t// We find on which tree-level start and end have the lowest common ancestor\n\t\t\tvar cmp = (0, _comparearrays2.default)(this.path, position.path);\n\t\t\t// If comparison returned string it means that arrays are same.\n\t\t\tvar diffAt = typeof cmp == 'string' ? Math.min(this.path.length, position.path.length) : cmp;\n\n\t\t\treturn this.path.slice(0, diffAt);\n\t\t}\n\n\t\t/**\n * Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset\n * is shifted by `shift` value (can be a negative value).\n *\n * @param {Number} shift Offset shift. Can be a negative value.\n * @returns {module:engine/model/position~Position} Shifted position.\n */\n\n\t}, {\n\t\tkey: 'getShiftedBy',\n\t\tvalue: function getShiftedBy(shift) {\n\t\t\tvar shifted = Position.createFromPosition(this);\n\n\t\t\tvar offset = shifted.offset + shift;\n\t\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\t\treturn shifted;\n\t\t}\n\n\t\t/**\n * Checks whether this position is after given position.\n *\n * @see module:engine/model/position~Position#isBefore\n *\n * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} True if this position is after given position.\n */\n\n\t}, {\n\t\tkey: 'isAfter',\n\t\tvalue: function isAfter(otherPosition) {\n\t\t\treturn this.compareWith(otherPosition) == 'after';\n\t\t}\n\n\t\t/**\n * Checks whether this position is before given position.\n *\n * **Note:** watch out when using negation of the value returned by this method, because the negation will also\n * be `true` if positions are in different roots and you might not expect this. You should probably use\n * `a.isAfter( b ) || a.isEqual( b )` or `!a.isBefore( p ) && a.root == b.root` in most scenarios. If your\n * condition uses multiple `isAfter` and `isBefore` checks, build them so they do not use negated values, i.e.:\n *\n *\t\tif ( a.isBefore( b ) && c.isAfter( d ) ) {\n *\t\t\t// do A.\n *\t\t} else {\n *\t\t\t// do B.\n *\t\t}\n *\n * or, if you have only one if-branch:\n *\n *\t\tif ( !( a.isBefore( b ) && c.isAfter( d ) ) {\n *\t\t\t// do B.\n *\t\t}\n *\n * rather than:\n *\n *\t\tif ( !a.isBefore( b ) || && !c.isAfter( d ) ) {\n *\t\t\t// do B.\n *\t\t} else {\n *\t\t\t// do A.\n *\t\t}\n *\n * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} True if this position is before given position.\n */\n\n\t}, {\n\t\tkey: 'isBefore',\n\t\tvalue: function isBefore(otherPosition) {\n\t\t\treturn this.compareWith(otherPosition) == 'before';\n\t\t}\n\n\t\t/**\n * Checks whether this position is equal to given position.\n *\n * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} True if positions are same.\n */\n\n\t}, {\n\t\tkey: 'isEqual',\n\t\tvalue: function isEqual(otherPosition) {\n\t\t\treturn this.compareWith(otherPosition) == 'same';\n\t\t}\n\n\t\t/**\n * Checks whether this position is touching given position. Positions touch when there are no text nodes\n * or empty nodes in a range between them. Technically, those positions are not equal but in many cases\n * they are very similar or even indistinguishable.\n *\n * **Note:** this method traverses model document so it can be only used when range is up-to-date with model document.\n *\n * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} True if positions touch.\n */\n\n\t}, {\n\t\tkey: 'isTouching',\n\t\tvalue: function isTouching(otherPosition) {\n\t\t\tvar left = null;\n\t\t\tvar right = null;\n\t\t\tvar compare = this.compareWith(otherPosition);\n\n\t\t\tswitch (compare) {\n\t\t\t\tcase 'same':\n\t\t\t\t\treturn true;\n\n\t\t\t\tcase 'before':\n\t\t\t\t\tleft = Position.createFromPosition(this);\n\t\t\t\t\tright = Position.createFromPosition(otherPosition);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'after':\n\t\t\t\t\tleft = Position.createFromPosition(otherPosition);\n\t\t\t\t\tright = Position.createFromPosition(this);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Cached for optimization purposes.\n\t\t\tvar leftParent = left.parent;\n\n\t\t\twhile (left.path.length + right.path.length) {\n\t\t\t\tif (left.isEqual(right)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif (left.path.length > right.path.length) {\n\t\t\t\t\tif (left.offset !== leftParent.maxOffset) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tleft.path = left.path.slice(0, -1);\n\t\t\t\t\tleftParent = leftParent.parent;\n\t\t\t\t\tleft.offset++;\n\t\t\t\t} else {\n\t\t\t\t\tif (right.offset !== 0) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tright.path = right.path.slice(0, -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Returns a copy of this position that is updated by removing `howMany` nodes starting from `deletePosition`.\n * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.\n *\n * @protected\n * @param {module:engine/model/position~Position} deletePosition Position before the first removed node.\n * @param {Number} howMany How many nodes are removed.\n * @returns {module:engine/model/position~Position|null} Transformed position or `null`.\n */\n\n\t}, {\n\t\tkey: '_getTransformedByDeletion',\n\t\tvalue: function _getTransformedByDeletion(deletePosition, howMany) {\n\t\t\tvar transformed = Position.createFromPosition(this);\n\n\t\t\t// This position can't be affected if deletion was in a different root.\n\t\t\tif (this.root != deletePosition.root) {\n\t\t\t\treturn transformed;\n\t\t\t}\n\n\t\t\tif ((0, _comparearrays2.default)(deletePosition.getParentPath(), this.getParentPath()) == 'same') {\n\t\t\t\t// If nodes are removed from the node that is pointed by this position...\n\t\t\t\tif (deletePosition.offset < this.offset) {\n\t\t\t\t\t// And are removed from before an offset of that position...\n\t\t\t\t\tif (deletePosition.offset + howMany > this.offset) {\n\t\t\t\t\t\t// Position is in removed range, it's no longer in the tree.\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Decrement the offset accordingly.\n\t\t\t\t\t\ttransformed.offset -= howMany;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((0, _comparearrays2.default)(deletePosition.getParentPath(), this.getParentPath()) == 'prefix') {\n\t\t\t\t// If nodes are removed from a node that is on a path to this position...\n\t\t\t\tvar i = deletePosition.path.length - 1;\n\n\t\t\t\tif (deletePosition.offset <= this.path[i]) {\n\t\t\t\t\t// And are removed from before next node of that path...\n\t\t\t\t\tif (deletePosition.offset + howMany > this.path[i]) {\n\t\t\t\t\t\t// If the next node of that path is removed return null\n\t\t\t\t\t\t// because the node containing this position got removed.\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Otherwise, decrement index on that path.\n\t\t\t\t\t\ttransformed.path[i] -= howMany;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn transformed;\n\t\t}\n\n\t\t/**\n * Returns a copy of this position that is updated by inserting `howMany` nodes at `insertPosition`.\n *\n * @protected\n * @param {module:engine/model/position~Position} insertPosition Position where nodes are inserted.\n * @param {Number} howMany How many nodes are inserted.\n * @param {Boolean} insertBefore Flag indicating whether nodes are inserted before or after `insertPosition`.\n * This is important only when `insertPosition` and this position are same. If that is the case and the flag is\n * set to `true`, this position will get transformed. If the flag is set to `false`, it won't.\n * @returns {module:engine/model/position~Position} Transformed position.\n */\n\n\t}, {\n\t\tkey: '_getTransformedByInsertion',\n\t\tvalue: function _getTransformedByInsertion(insertPosition, howMany, insertBefore) {\n\t\t\tvar transformed = Position.createFromPosition(this);\n\n\t\t\t// This position can't be affected if insertion was in a different root.\n\t\t\tif (this.root != insertPosition.root) {\n\t\t\t\treturn transformed;\n\t\t\t}\n\n\t\t\tif ((0, _comparearrays2.default)(insertPosition.getParentPath(), this.getParentPath()) == 'same') {\n\t\t\t\t// If nodes are inserted in the node that is pointed by this position...\n\t\t\t\tif (insertPosition.offset < this.offset || insertPosition.offset == this.offset && insertBefore) {\n\t\t\t\t\t// And are inserted before an offset of that position...\n\t\t\t\t\t// \"Push\" this positions offset.\n\t\t\t\t\ttransformed.offset += howMany;\n\t\t\t\t}\n\t\t\t} else if ((0, _comparearrays2.default)(insertPosition.getParentPath(), this.getParentPath()) == 'prefix') {\n\t\t\t\t// If nodes are inserted in a node that is on a path to this position...\n\t\t\t\tvar i = insertPosition.path.length - 1;\n\n\t\t\t\tif (insertPosition.offset <= this.path[i]) {\n\t\t\t\t\t// And are inserted before next node of that path...\n\t\t\t\t\t// \"Push\" the index on that path.\n\t\t\t\t\ttransformed.path[i] += howMany;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn transformed;\n\t\t}\n\n\t\t/**\n * Returns a copy of this position that is updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n *\n * @protected\n * @param {module:engine/model/position~Position} sourcePosition Position before the first element to move.\n * @param {module:engine/model/position~Position} targetPosition Position where moved elements will be inserted.\n * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.\n * @param {Boolean} insertBefore Flag indicating whether moved nodes are pasted before or after `insertPosition`.\n * This is important only when `targetPosition` and this position are same. If that is the case and the flag is\n * set to `true`, this position will get transformed by range insertion. If the flag is set to `false`, it won't.\n * @param {Boolean} [sticky] Flag indicating whether this position \"sticks\" to range, that is if it should be moved\n * with the moved range if it is equal to one of range's boundaries.\n * @returns {module:engine/model/position~Position} Transformed position.\n */\n\n\t}, {\n\t\tkey: '_getTransformedByMove',\n\t\tvalue: function _getTransformedByMove(sourcePosition, targetPosition, howMany, insertBefore, sticky) {\n\t\t\t// Moving a range removes nodes from their original position. We acknowledge this by proper transformation.\n\t\t\tvar transformed = this._getTransformedByDeletion(sourcePosition, howMany);\n\n\t\t\t// Then we update target position, as it could be affected by nodes removal too.\n\t\t\ttargetPosition = targetPosition._getTransformedByDeletion(sourcePosition, howMany);\n\n\t\t\tif (transformed === null || sticky && transformed.isEqual(sourcePosition)) {\n\t\t\t\t// This position is inside moved range (or sticks to it).\n\t\t\t\t// In this case, we calculate a combination of this position, move source position and target position.\n\t\t\t\ttransformed = this._getCombined(sourcePosition, targetPosition);\n\t\t\t} else {\n\t\t\t\t// This position is not inside a removed range.\n\t\t\t\t// In next step, we simply reflect inserting `howMany` nodes, which might further affect the position.\n\t\t\t\ttransformed = transformed._getTransformedByInsertion(targetPosition, howMany, insertBefore);\n\t\t\t}\n\n\t\t\treturn transformed;\n\t\t}\n\n\t\t/**\n * Returns a new position that is a combination of this position and given positions.\n *\n * The combined position is a copy of this position transformed by moving a range starting at `source` position\n * to the `target` position. It is expected that this position is inside the moved range.\n *\n * Example:\n *\n *\t\tlet original = new Position( root, [ 2, 3, 1 ] );\n *\t\tlet source = new Position( root, [ 2, 2 ] );\n *\t\tlet target = new Position( otherRoot, [ 1, 1, 3 ] );\n *\t\toriginal._getCombined( source, target ); // path is [ 1, 1, 4, 1 ], root is `otherRoot`\n *\n * Explanation:\n *\n * We have a position `[ 2, 3, 1 ]` and move some nodes from `[ 2, 2 ]` to `[ 1, 1, 3 ]`. The original position\n * was inside moved nodes and now should point to the new place. The moved nodes will be after\n * positions `[ 1, 1, 3 ]`, `[ 1, 1, 4 ]`, `[ 1, 1, 5 ]`. Since our position was in the second moved node,\n * the transformed position will be in a sub-tree of a node at `[ 1, 1, 4 ]`. Looking at original path, we\n * took care of `[ 2, 3 ]` part of it. Now we have to add the rest of the original path to the transformed path.\n * Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.\n *\n * @protected\n * @param {module:engine/model/position~Position} source Beginning of the moved range.\n * @param {module:engine/model/position~Position} target Position where the range is moved.\n * @returns {module:engine/model/position~Position} Combined position.\n */\n\n\t}, {\n\t\tkey: '_getCombined',\n\t\tvalue: function _getCombined(source, target) {\n\t\t\tvar i = source.path.length - 1;\n\n\t\t\t// The first part of a path to combined position is a path to the place where nodes were moved.\n\t\t\tvar combined = Position.createFromPosition(target);\n\n\t\t\t// Then we have to update the rest of the path.\n\n\t\t\t// Fix the offset because this position might be after `from` position and we have to reflect that.\n\t\t\tcombined.offset = combined.offset + this.path[i] - source.offset;\n\n\t\t\t// Then, add the rest of the path.\n\t\t\t// If this position is at the same level as `from` position nothing will get added.\n\t\t\tcombined.path = combined.path.concat(this.path.slice(i + 1));\n\n\t\t\treturn combined;\n\t\t}\n\n\t\t/**\n * Creates position at the given location. The location can be specified as:\n *\n * * a {@link module:engine/model/position~Position position},\n * * parent element and offset (offset defaults to `0`),\n * * parent element and `'end'` (sets position at the end of that element),\n * * {@link module:engine/model/item~Item model item} and `'before'` or `'after'` (sets position before or after given model item).\n *\n * This method is a shortcut to other constructors such as:\n *\n * * {@link module:engine/model/position~Position.createBefore},\n * * {@link module:engine/model/position~Position.createAfter},\n * * {@link module:engine/model/position~Position.createFromParentAndOffset},\n * * {@link module:engine/model/position~Position.createFromPosition}.\n *\n * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition\n * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when\n * first parameter is a {@link module:engine/model/item~Item model item}.\n */\n\n\t}, {\n\t\tkey: 'offset',\n\t\tget: function get() {\n\t\t\treturn (0, _last2.default)(this.path);\n\t\t}\n\n\t\t/**\n * @param {Number} newOffset\n */\n\t\t,\n\t\tset: function set(newOffset) {\n\t\t\tthis.path[this.path.length - 1] = newOffset;\n\t\t}\n\n\t\t/**\n * Parent element of this position.\n *\n * Keep in mind that `parent` value is calculated when the property is accessed.\n * If {@link module:engine/model/position~Position#path position path}\n * leads to a non-existing element, `parent` property will throw error.\n *\n * 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 *\n * @readonly\n * @type {module:engine/model/element~Element}\n */\n\n\t}, {\n\t\tkey: 'parent',\n\t\tget: function get() {\n\t\t\tvar parent = this.root;\n\n\t\t\tfor (var i = 0; i < this.path.length - 1; i++) {\n\t\t\t\tparent = parent.getChild(parent.offsetToIndex(this.path[i]));\n\t\t\t}\n\n\t\t\treturn parent;\n\t\t}\n\n\t\t/**\n * Position {@link module:engine/model/position~Position#offset offset} converted to an index in position's parent node. It is\n * equal to the {@link module:engine/model/node~Node#index index} of a node after this position. If position is placed\n * in text node, position index is equal to the index of that text node.\n *\n * @readonly\n * @type {Number}\n */\n\n\t}, {\n\t\tkey: 'index',\n\t\tget: function get() {\n\t\t\treturn this.parent.offsetToIndex(this.offset);\n\t\t}\n\n\t\t/**\n * Returns {@link module:engine/model/text~Text text node} instance in which this position is placed or `null` if this\n * position is not in a text node.\n *\n * @readonly\n * @type {module:engine/model/text~Text|null}\n */\n\n\t}, {\n\t\tkey: 'textNode',\n\t\tget: function get() {\n\t\t\tvar node = this.parent.getChild(this.index);\n\n\t\t\treturn node instanceof _text2.default && node.startOffset < this.offset ? node : null;\n\t\t}\n\n\t\t/**\n * Node directly after this position or `null` if this position is in text node.\n *\n * @readonly\n * @type {module:engine/model/node~Node|null}\n */\n\n\t}, {\n\t\tkey: 'nodeAfter',\n\t\tget: function get() {\n\t\t\treturn this.textNode === null ? this.parent.getChild(this.index) : null;\n\t\t}\n\n\t\t/**\n * Node directly before this position or `null` if this position is in text node.\n *\n * @readonly\n * @type {Node}\n */\n\n\t}, {\n\t\tkey: 'nodeBefore',\n\t\tget: function get() {\n\t\t\treturn this.textNode === null ? this.parent.getChild(this.index - 1) : null;\n\t\t}\n\n\t\t/**\n * Is `true` if position is at the beginning of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n *\n * @readonly\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isAtStart',\n\t\tget: function get() {\n\t\t\treturn this.offset === 0;\n\t\t}\n\n\t\t/**\n * Is `true` if position is at the end of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n *\n * @readonly\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isAtEnd',\n\t\tget: function get() {\n\t\t\treturn this.offset == this.parent.maxOffset;\n\t\t}\n\t}], [{\n\t\tkey: 'createAt',\n\t\tvalue: function createAt(itemOrPosition, offset) {\n\t\t\tif (itemOrPosition instanceof Position) {\n\t\t\t\treturn this.createFromPosition(itemOrPosition);\n\t\t\t} else {\n\t\t\t\tvar node = itemOrPosition;\n\n\t\t\t\tif (offset == 'end') {\n\t\t\t\t\toffset = node.maxOffset;\n\t\t\t\t} else if (offset == 'before') {\n\t\t\t\t\treturn this.createBefore(node);\n\t\t\t\t} else if (offset == 'after') {\n\t\t\t\t\treturn this.createAfter(node);\n\t\t\t\t} else if (!offset) {\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\n\t\t\t\treturn this.createFromParentAndOffset(node, offset);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Creates a new position, after given {@link module:engine/model/item~Item model item}.\n *\n * @param {module:engine/model/item~Item} item Item after which the position should be placed.\n * @returns {module:engine/model/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createAfter',\n\t\tvalue: function createAfter(item) {\n\t\t\tif (!item.parent) {\n\t\t\t\t/**\n * You can not make position after root.\n *\n * @error position-after-root\n * @param {module:engine/model/item~Item} root\n */\n\t\t\t\tthrow new _ckeditorerror2.default('model-position-after-root: You can not make position after root.', { root: item });\n\t\t\t}\n\n\t\t\treturn this.createFromParentAndOffset(item.parent, item.endOffset);\n\t\t}\n\n\t\t/**\n * Creates a new position, before the given {@link module:engine/model/item~Item model item}.\n *\n * @param {module:engine/model/item~Item} item Item before which the position should be placed.\n * @returns {module:engine/model/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createBefore',\n\t\tvalue: function createBefore(item) {\n\t\t\tif (!item.parent) {\n\t\t\t\t/**\n * You can not make position before root.\n *\n * @error position-before-root\n * @param {module:engine/model/item~Item} root\n */\n\t\t\t\tthrow new _ckeditorerror2.default('model-position-before-root: You can not make position before root.', { root: item });\n\t\t\t}\n\n\t\t\treturn this.createFromParentAndOffset(item.parent, item.startOffset);\n\t\t}\n\n\t\t/**\n * Creates a new position from the parent element and an offset in that element.\n *\n * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} parent Position's parent.\n * @param {Number} offset Position's offset.\n * @returns {module:engine/model/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createFromParentAndOffset',\n\t\tvalue: function createFromParentAndOffset(parent, offset) {\n\t\t\tif (!parent.is('element') && !parent.is('documentFragment')) {\n\t\t\t\t/**\n * Position parent have to be a model element or model document fragment.\n *\n * @error position-parent-incorrect\n */\n\t\t\t\tthrow new _ckeditorerror2.default('model-position-parent-incorrect: Position parent have to be a element or document fragment.');\n\t\t\t}\n\n\t\t\tvar path = parent.getPath();\n\n\t\t\tpath.push(offset);\n\n\t\t\treturn new this(parent.root, path);\n\t\t}\n\n\t\t/**\n * Creates a new position, which is equal to passed position.\n *\n * @param {module:engine/model/position~Position} position Position to be cloned.\n * @returns {module:engine/model/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createFromPosition',\n\t\tvalue: function createFromPosition(position) {\n\t\t\treturn new this(position.root, position.path.slice());\n\t\t}\n\n\t\t/**\n * Creates a `Position` instance from given plain object (i.e. parsed JSON string).\n *\n * @param {Object} json Plain object to be converted to `Position`.\n * @returns {module:engine/model/position~Position} `Position` instance created using given plain object.\n */\n\n\t}, {\n\t\tkey: 'fromJSON',\n\t\tvalue: function fromJSON(json, doc) {\n\t\t\tif (json.root === '$graveyard') {\n\t\t\t\treturn new Position(doc.graveyard, json.path);\n\t\t\t}\n\n\t\t\tif (!doc.hasRoot(json.root)) {\n\t\t\t\t/**\n * Cannot create position for document. Root with specified name does not exist.\n *\n * @error position-fromjson-no-root\n * @param {String} rootName\n */\n\t\t\t\tthrow new _ckeditorerror2.default('model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.', { rootName: json.root });\n\t\t\t}\n\n\t\t\treturn new Position(doc.getRoot(json.root), json.path);\n\t\t}\n\t}]);\n\n\treturn Position;\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\nexports.default = Position;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/position.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _observablemixin = require('@ckeditor/ckeditor5-utils/src/observablemixin');\n\nvar _observablemixin2 = _interopRequireDefault(_observablemixin);\n\nvar _mix = require('@ckeditor/ckeditor5-utils/src/mix');\n\nvar _mix2 = _interopRequireDefault(_mix);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * The base class for CKEditor plugin classes.\n *\n * @mixes module:utils/observablemixin~ObservaleMixin\n */\nvar Plugin = function () {\n\t/**\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~Plugin.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~Plugin.requires explicitly require} them).\n *\n * @param {module:core/editor/editor~Editor} editor\n */\n\tfunction Plugin(editor) {\n\t\t_classCallCheck(this, Plugin);\n\n\t\t/**\n * The editor instance.\n *\n * @readonly\n * @member {module:core/editor/editor~Editor} module:core/plugin~Plugin#editor\n */\n\t\tthis.editor = editor;\n\t}\n\n\t/**\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 extends Plugin {\n *\t\t\tstatic get requires() {\n *\t\t\t\treturn [ Image ];\n *\t\t\t}\n *\t\t}\n *\n * @static\n * @member {Array.|undefined} module:core/plugin~Plugin.requires\n */\n\n\t/**\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 package name + path to that module. E.g. `ckeditor5-image/src/image.js` plugin\n * should be named `image/image` (the `ckeditor5-` prefix is stripped during compilation).\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 'image/imagecaption';\n *\t\t\t}\n *\t\t}\n *\n * @static\n * @member {String|undefined} module:core/plugin~Plugin.pluginName\n */\n\n\t/**\n * The second stage (after plugin {@link #constructor}) of plugin initialization.\n * Unlike the plugin constructor this method can perform asynchronous.\n *\n * A plugin's `init()` method is called after its {@link module:core/plugin~Plugin.requires dependencies} are initialized,\n * so in the same order as constructors of these plugins.\n *\n * @returns {null|Promise}\n */\n\n\n\t_createClass(Plugin, [{\n\t\tkey: 'init',\n\t\tvalue: function init() {}\n\n\t\t/**\n * The third (and last) stage of plugin initialization. See also {@link #constructor} and {@link #init}.\n *\n * @returns {null|Promise}\n */\n\n\t}, {\n\t\tkey: 'afterInit',\n\t\tvalue: function afterInit() {}\n\n\t\t/**\n * Destroys the plugin.\n *\n * @returns {null|Promise}\n */\n\n\t}, {\n\t\tkey: 'destroy',\n\t\tvalue: function destroy() {}\n\t}]);\n\n\treturn Plugin;\n}();\n\nexports.default = Plugin;\n\n\n(0, _mix2.default)(Plugin, _observablemixin2.default);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-core/src/plugin.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _position = require('./position');\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _treewalker = require('./treewalker');\n\nvar _treewalker2 = _interopRequireDefault(_treewalker);\n\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Range class. Range is iterable.\n */\nvar Range = function () {\n\t/**\n * Creates a range spanning from `start` position to `end` position.\n *\n * **Note:** Constructor creates it's own {@link module:engine/model/position~Position Position} instances basing on passed values.\n *\n * @param {module:engine/model/position~Position} start Start position.\n * @param {module:engine/model/position~Position} [end] End position. If not set, range will be collapsed at `start` position.\n */\n\tfunction Range(start) {\n\t\tvar end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n\t\t_classCallCheck(this, Range);\n\n\t\t/**\n * Start position.\n *\n * @readonly\n * @member {module:engine/model/position~Position}\n */\n\t\tthis.start = _position2.default.createFromPosition(start);\n\n\t\t/**\n * End position.\n *\n * @readonly\n * @member {module:engine/model/position~Position}\n */\n\t\tthis.end = end ? _position2.default.createFromPosition(end) : _position2.default.createFromPosition(start);\n\t}\n\n\t/**\n * Returns an iterator that iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n * them together with additional information like length or {@link module:engine/model/position~Position positions},\n * grouped as {@link module:engine/model/treewalker~TreeWalkerValue}.\n * It iterates over all {@link module:engine/model/textproxy~TextProxy text contents} that are inside the range\n * and all the {@link module:engine/model/element~Element}s that are entered into when iterating over this range.\n *\n * This iterator uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range\n * and `ignoreElementEnd` option set to `true`.\n *\n * @returns {Iterable.}\n */\n\n\n\t_createClass(Range, [{\n\t\tkey: Symbol.iterator,\n\t\tvalue: regeneratorRuntime.mark(function value() {\n\t\t\treturn regeneratorRuntime.wrap(function value$(_context) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context.prev = _context.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn _context.delegateYield(new _treewalker2.default({ boundaries: this, ignoreElementEnd: true }), 't0', 1);\n\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, value, this);\n\t\t})\n\n\t\t/**\n * Returns whether the range is collapsed, that is if {@link #start start} and\n * {@link #end end} positions are equal.\n *\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'containsPosition',\n\n\n\t\t/**\n * Checks whether this range contains given {@link module:engine/model/position~Position position}.\n *\n * @param {module:engine/model/position~Position} position Position to check.\n * @returns {Boolean} `true` if given {@link module:engine/model/position~Position position} is contained in this range, `false` otherwise.\n */\n\t\tvalue: function containsPosition(position) {\n\t\t\treturn position.isAfter(this.start) && position.isBefore(this.end);\n\t\t}\n\n\t\t/**\n * Checks whether this range contains given {@link ~Range range}.\n *\n * @param {module:engine/model/range~Range} otherRange Range to check.\n * @returns {Boolean} `true` if given {@link ~Range range} boundaries are contained by this range, `false` otherwise.\n */\n\n\t}, {\n\t\tkey: 'containsRange',\n\t\tvalue: function containsRange(otherRange) {\n\t\t\treturn this.containsPosition(otherRange.start) && this.containsPosition(otherRange.end);\n\t\t}\n\n\t\t/**\n * Two ranges are equal if their {@link #start start} and\n * {@link #end end} positions are equal.\n *\n * @param {module:engine/model/range~Range} otherRange Range to compare with.\n * @returns {Boolean} `true` if ranges are equal, `false` otherwise.\n */\n\n\t}, {\n\t\tkey: 'isEqual',\n\t\tvalue: function isEqual(otherRange) {\n\t\t\treturn this.start.isEqual(otherRange.start) && this.end.isEqual(otherRange.end);\n\t\t}\n\n\t\t/**\n * Checks and returns whether this range intersects with given range.\n *\n * @param {module:engine/model/range~Range} otherRange Range to compare with.\n * @returns {Boolean} `true` if ranges intersect, `false` otherwise.\n */\n\n\t}, {\n\t\tkey: 'isIntersecting',\n\t\tvalue: function isIntersecting(otherRange) {\n\t\t\treturn this.start.isBefore(otherRange.end) && this.end.isAfter(otherRange.start);\n\t\t}\n\n\t\t/**\n * Computes which part(s) of this {@link ~Range range} is not a part of given {@link ~Range range}.\n * Returned array contains zero, one or two {@link ~Range ranges}.\n *\n * Examples:\n *\n *\t\tlet range = new Range( new Position( root, [ 2, 7 ] ), new Position( root, [ 4, 0, 1 ] ) );\n *\t\tlet otherRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 5 ] ) );\n *\t\tlet transformed = range.getDifference( otherRange );\n *\t\t// transformed array has no ranges because `otherRange` contains `range`\n *\n *\t\totherRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 3 ] ) );\n *\t\ttransformed = range.getDifference( otherRange );\n *\t\t// transformed array has one range: from [ 3 ] to [ 4, 0, 1 ]\n *\n *\t\totherRange = new Range( new Position( root, [ 3 ] ), new Position( root, [ 4 ] ) );\n *\t\ttransformed = range.getDifference( otherRange );\n *\t\t// transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]\n *\n * @param {module:engine/model/range~Range} otherRange Range to differentiate against.\n * @returns {Array.} The difference between ranges.\n */\n\n\t}, {\n\t\tkey: 'getDifference',\n\t\tvalue: function getDifference(otherRange) {\n\t\t\tvar ranges = [];\n\n\t\t\tif (this.isIntersecting(otherRange)) {\n\t\t\t\t// Ranges intersect.\n\n\t\t\t\tif (this.containsPosition(otherRange.start)) {\n\t\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\t\tranges.push(new Range(this.start, otherRange.start));\n\t\t\t\t}\n\n\t\t\t\tif (this.containsPosition(otherRange.end)) {\n\t\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\t\tranges.push(new Range(otherRange.end, this.end));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Ranges do not intersect, return the original range.\n\t\t\t\tranges.push(Range.createFromRange(this));\n\t\t\t}\n\n\t\t\treturn ranges;\n\t\t}\n\n\t\t/**\n * Returns an intersection of this {@link ~Range range} and given {@link ~Range range}.\n * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n *\n * Examples:\n *\n *\t\tlet range = new Range( new Position( root, [ 2, 7 ] ), new Position( root, [ 4, 0, 1 ] ) );\n *\t\tlet otherRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 2 ] ) );\n *\t\tlet transformed = range.getIntersection( otherRange ); // null - ranges have no common part\n *\n *\t\totherRange = new Range( new Position( root, [ 3 ] ), new Position( root, [ 5 ] ) );\n *\t\ttransformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]\n *\n * @param {module:engine/model/range~Range} otherRange Range to check for intersection.\n * @returns {module:engine/model/range~Range|null} A common part of given ranges or `null` if ranges have no common part.\n */\n\n\t}, {\n\t\tkey: 'getIntersection',\n\t\tvalue: function getIntersection(otherRange) {\n\t\t\tif (this.isIntersecting(otherRange)) {\n\t\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t\t// At most, it will be same as this range.\n\t\t\t\tvar commonRangeStart = this.start;\n\t\t\t\tvar commonRangeEnd = this.end;\n\n\t\t\t\tif (this.containsPosition(otherRange.start)) {\n\t\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t\t// shrink common range to the given range start.\n\t\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t\t}\n\n\t\t\t\tif (this.containsPosition(otherRange.end)) {\n\t\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t\t// shrink common range to the given range end.\n\t\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t\t}\n\n\t\t\t\treturn new Range(commonRangeStart, commonRangeEnd);\n\t\t\t}\n\n\t\t\t// Ranges do not intersect, so they do not have common part.\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n * Computes and returns the smallest set of {@link #isFlat flat} ranges, that covers this range in whole.\n *\n * See an example of a model structure (`[` and `]` are range boundaries):\n *\n *\t\troot root\n *\t\t |- element DIV DIV P2 P3 DIV\n *\t\t | |- element H H P1 f o o b a r H P4\n *\t\t | | |- \"fir[st\" fir[st lorem se]cond ipsum\n *\t\t | |- element P1\n *\t\t | | |- \"lorem\" ||\n *\t\t |- element P2 ||\n *\t\t | |- \"foo\" VV\n *\t\t |- element P3\n *\t\t | |- \"bar\" root\n *\t\t |- element DIV DIV [P2 P3] DIV\n *\t\t | |- element H H [P1] f o o b a r H P4\n *\t\t | | |- \"se]cond\" fir[st] lorem [se]cond ipsum\n *\t\t | |- element P4\n *\t\t | | |- \"ipsum\"\n *\n * As it can be seen, letters contained in the range are: `stloremfoobarse`, spread across different parents.\n * We are looking for minimal set of flat ranges that contains the same nodes.\n *\n * Minimal flat ranges for above range `( [ 0, 0, 3 ], [ 3, 0, 2 ] )` will be:\n *\n *\t\t( [ 0, 0, 3 ], [ 0, 0, 5 ] ) = \"st\"\n *\t\t( [ 0, 1 ], [ 0, 2 ] ) = element P1 (\"lorem\")\n *\t\t( [ 1 ], [ 3 ] ) = element P2, element P3 (\"foobar\")\n *\t\t( [ 3, 0, 0 ], [ 3, 0, 2 ] ) = \"se\"\n *\n * **Note:** if an {@link module:engine/model/element~Element element} is not wholly contained in this range, it won't be returned\n * 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 * were omitted. Only their parts that were wholly in the range were returned.\n *\n * **Note:** this method is not returning flat ranges that contain no nodes.\n *\n * @returns {Array.} Array of flat ranges covering this range.\n */\n\n\t}, {\n\t\tkey: 'getMinimalFlatRanges',\n\t\tvalue: function getMinimalFlatRanges() {\n\t\t\tvar ranges = [];\n\t\t\tvar diffAt = this.start.getCommonPath(this.end).length;\n\n\t\t\tvar pos = _position2.default.createFromPosition(this.start);\n\t\t\tvar posParent = pos.parent;\n\n\t\t\t// Go up.\n\t\t\twhile (pos.path.length > diffAt + 1) {\n\t\t\t\tvar howMany = posParent.maxOffset - pos.offset;\n\n\t\t\t\tif (howMany !== 0) {\n\t\t\t\t\tranges.push(new Range(pos, pos.getShiftedBy(howMany)));\n\t\t\t\t}\n\n\t\t\t\tpos.path = pos.path.slice(0, -1);\n\t\t\t\tpos.offset++;\n\t\t\t\tposParent = posParent.parent;\n\t\t\t}\n\n\t\t\t// Go down.\n\t\t\twhile (pos.path.length <= this.end.path.length) {\n\t\t\t\tvar offset = this.end.path[pos.path.length - 1];\n\t\t\t\tvar _howMany = offset - pos.offset;\n\n\t\t\t\tif (_howMany !== 0) {\n\t\t\t\t\tranges.push(new Range(pos, pos.getShiftedBy(_howMany)));\n\t\t\t\t}\n\n\t\t\t\tpos.offset = offset;\n\t\t\t\tpos.path.push(0);\n\t\t\t}\n\n\t\t\treturn ranges;\n\t\t}\n\n\t\t/**\n * Creates a {@link module:engine/model/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n *\n * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n * @param {module:engine/model/position~Position} [options.startPosition]\n * @param {Boolean} [options.singleCharacters=false]\n * @param {Boolean} [options.shallow=false]\n * @param {Boolean} [options.ignoreElementEnd=false]\n */\n\n\t}, {\n\t\tkey: 'getWalker',\n\t\tvalue: function getWalker() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t\toptions.boundaries = this;\n\n\t\t\treturn new _treewalker2.default(options);\n\t\t}\n\n\t\t/**\n * Returns an iterator that iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n * them.\n *\n * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n * set to `true`. However it returns only {@link module:engine/model/item~Item model items},\n * not {@link module:engine/model/treewalker~TreeWalkerValue}.\n *\n * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n * a full list of available options.\n *\n * @method getItems\n * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n * @returns {Iterable.}\n */\n\n\t}, {\n\t\tkey: 'getItems',\n\t\tvalue: regeneratorRuntime.mark(function getItems() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t\tvar treeWalker, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value;\n\n\t\t\treturn regeneratorRuntime.wrap(function getItems$(_context2) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context2.prev = _context2.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\toptions.boundaries = this;\n\t\t\t\t\t\t\toptions.ignoreElementEnd = true;\n\n\t\t\t\t\t\t\ttreeWalker = new _treewalker2.default(options);\n\t\t\t\t\t\t\t_iteratorNormalCompletion = true;\n\t\t\t\t\t\t\t_didIteratorError = false;\n\t\t\t\t\t\t\t_iteratorError = undefined;\n\t\t\t\t\t\t\t_context2.prev = 6;\n\t\t\t\t\t\t\t_iterator = treeWalker[Symbol.iterator]();\n\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\tif (_iteratorNormalCompletion = (_step = _iterator.next()).done) {\n\t\t\t\t\t\t\t\t_context2.next = 15;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_value = _step.value;\n\t\t\t\t\t\t\t_context2.next = 12;\n\t\t\t\t\t\t\treturn _value.item;\n\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\t_iteratorNormalCompletion = true;\n\t\t\t\t\t\t\t_context2.next = 8;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\t_context2.next = 21;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\t_context2.prev = 17;\n\t\t\t\t\t\t\t_context2.t0 = _context2['catch'](6);\n\t\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t\t_iteratorError = _context2.t0;\n\n\t\t\t\t\t\tcase 21:\n\t\t\t\t\t\t\t_context2.prev = 21;\n\t\t\t\t\t\t\t_context2.prev = 22;\n\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\t_context2.prev = 24;\n\n\t\t\t\t\t\t\tif (!_didIteratorError) {\n\t\t\t\t\t\t\t\t_context2.next = 27;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow _iteratorError;\n\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn _context2.finish(24);\n\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn _context2.finish(21);\n\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context2.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getItems, this, [[6, 17, 21, 29], [22,, 24, 28]]);\n\t\t})\n\n\t\t/**\n * Returns an iterator that iterates over all {@link module:engine/model/position~Position positions} that are boundaries or\n * contained in this range.\n *\n * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n * {@link module:engine/model/position~Position positions}, not {@link module:engine/model/treewalker~TreeWalkerValue}.\n *\n * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n * a full list of available options.\n *\n * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n * @returns {Iterable.}\n */\n\n\t}, {\n\t\tkey: 'getPositions',\n\t\tvalue: regeneratorRuntime.mark(function getPositions() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t\tvar treeWalker, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _value2;\n\n\t\t\treturn regeneratorRuntime.wrap(function getPositions$(_context3) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context3.prev = _context3.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\toptions.boundaries = this;\n\n\t\t\t\t\t\t\ttreeWalker = new _treewalker2.default(options);\n\t\t\t\t\t\t\t_context3.next = 4;\n\t\t\t\t\t\t\treturn treeWalker.position;\n\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t_iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\t_didIteratorError2 = false;\n\t\t\t\t\t\t\t_iteratorError2 = undefined;\n\t\t\t\t\t\t\t_context3.prev = 7;\n\t\t\t\t\t\t\t_iterator2 = treeWalker[Symbol.iterator]();\n\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\tif (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {\n\t\t\t\t\t\t\t\t_context3.next = 16;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_value2 = _step2.value;\n\t\t\t\t\t\t\t_context3.next = 13;\n\t\t\t\t\t\t\treturn _value2.nextPosition;\n\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\t_iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\t_context3.next = 9;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\t_context3.next = 22;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\t_context3.prev = 18;\n\t\t\t\t\t\t\t_context3.t0 = _context3['catch'](7);\n\t\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t\t_iteratorError2 = _context3.t0;\n\n\t\t\t\t\t\tcase 22:\n\t\t\t\t\t\t\t_context3.prev = 22;\n\t\t\t\t\t\t\t_context3.prev = 23;\n\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\t_context3.prev = 25;\n\n\t\t\t\t\t\t\tif (!_didIteratorError2) {\n\t\t\t\t\t\t\t\t_context3.next = 28;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow _iteratorError2;\n\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn _context3.finish(25);\n\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn _context3.finish(22);\n\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context3.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getPositions, this, [[7, 18, 22, 30], [23,, 25, 29]]);\n\t\t})\n\n\t\t/**\n * Returns a range that is a result of transforming this range by given `delta`.\n *\n * **Note:** transformation may break one range into multiple ranges (e.g. when a part of the range is\n * moved to a different part of document tree). For this reason, an array is returned by this method and it\n * may contain one or more `Range` instances.\n *\n * @param {module:engine/model/delta/delta~Delta} delta Delta to transform range by.\n * @returns {Array.} Range which is the result of transformation.\n */\n\n\t}, {\n\t\tkey: 'getTransformedByDelta',\n\t\tvalue: function getTransformedByDelta(delta) {\n\t\t\tvar ranges = [Range.createFromRange(this)];\n\n\t\t\t// Operation types that a range can be transformed by.\n\t\t\tvar supportedTypes = new Set(['insert', 'move', 'remove', 'reinsert']);\n\n\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\tvar _didIteratorError3 = false;\n\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator3 = delta.operations[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\tvar operation = _step3.value;\n\n\t\t\t\t\tif (supportedTypes.has(operation.type)) {\n\t\t\t\t\t\tfor (var i = 0; i < ranges.length; i++) {\n\t\t\t\t\t\t\tvar result = ranges[i]._getTransformedByDocumentChange(operation.type, delta.type, operation.targetPosition || operation.position, operation.howMany || operation.nodes.maxOffset, operation.sourcePosition);\n\n\t\t\t\t\t\t\tranges.splice.apply(ranges, [i, 1].concat(_toConsumableArray(result)));\n\n\t\t\t\t\t\t\ti += result.length - 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t_iteratorError3 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t_iterator3.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\t\tthrow _iteratorError3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn ranges;\n\t\t}\n\n\t\t/**\n * Returns a range that is a result of transforming this range by multiple `deltas`.\n *\n * **Note:** transformation may break one range into multiple ranges (e.g. when a part of the range is\n * moved to a different part of document tree). For this reason, an array is returned by this method and it\n * may contain one or more `Range` instances.\n *\n * @param {Iterable.} deltas Deltas to transform the range by.\n * @returns {Array.} Range which is the result of transformation.\n */\n\n\t}, {\n\t\tkey: 'getTransformedByDeltas',\n\t\tvalue: function getTransformedByDeltas(deltas) {\n\t\t\tvar ranges = [Range.createFromRange(this)];\n\n\t\t\tvar _iteratorNormalCompletion4 = true;\n\t\t\tvar _didIteratorError4 = false;\n\t\t\tvar _iteratorError4 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator4 = deltas[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n\t\t\t\t\tvar delta = _step4.value;\n\n\t\t\t\t\tfor (var _i = 0; _i < ranges.length; _i++) {\n\t\t\t\t\t\tvar result = ranges[_i].getTransformedByDelta(delta);\n\n\t\t\t\t\t\tranges.splice.apply(ranges, [_i, 1].concat(_toConsumableArray(result)));\n\t\t\t\t\t\t_i += result.length - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\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\t\t// \"piece\". In this case we will have incorrect third rage, which should not be included in the result --\n\t\t\t\t// because it is already included in first \"piece\". In this loop we are looking for all such ranges that\n\t\t\t\t// are inside other ranges and we simply remove them.\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError4 = true;\n\t\t\t\t_iteratorError4 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion4 && _iterator4.return) {\n\t\t\t\t\t\t_iterator4.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError4) {\n\t\t\t\t\t\tthrow _iteratorError4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < ranges.length; i++) {\n\t\t\t\tvar range = ranges[i];\n\n\t\t\t\tfor (var j = i + 1; j < ranges.length; j++) {\n\t\t\t\t\tvar next = ranges[j];\n\n\t\t\t\t\tif (range.containsRange(next) || next.containsRange(range) || range.isEqual(next)) {\n\t\t\t\t\t\tranges.splice(j, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn ranges;\n\t\t}\n\n\t\t/**\n * Returns a range that is a result of transforming this range by a change in the model document.\n *\n * @protected\n * @param {'insert'|'move'|'remove'|'reinsert'} type Change type.\n * @param {String} deltaType Type of delta that introduced the change.\n * @param {module:engine/model/position~Position} targetPosition Position before the first changed node.\n * @param {Number} howMany How many nodes has been changed.\n * @param {module:engine/model/position~Position} sourcePosition Source position of changes.\n * @returns {Array.}\n */\n\n\t}, {\n\t\tkey: '_getTransformedByDocumentChange',\n\t\tvalue: function _getTransformedByDocumentChange(type, deltaType, targetPosition, howMany, sourcePosition) {\n\t\t\t// IMPORTANT! Every special case added here has to be reflected in MarkerDelta transformations!\n\t\t\t// Check /src/model/delta/basic-transformations.js.\n\t\t\tif (type == 'insert') {\n\t\t\t\treturn this._getTransformedByInsertion(targetPosition, howMany, false, false);\n\t\t\t} else {\n\t\t\t\tvar ranges = this._getTransformedByMove(sourcePosition, targetPosition, howMany);\n\n\t\t\t\t// Don't ask. Just debug.\n\t\t\t\t// Like this: https://github.com/ckeditor/ckeditor5-engine/issues/841#issuecomment-282706488.\n\t\t\t\t//\n\t\t\t\t// In following cases, in examples, the last step is the fix step.\n\t\t\t\t// When there are multiple ranges in an example, ranges[] array indices are represented as follows:\n\t\t\t\t// * [] is ranges[ 0 ],\n\t\t\t\t// * {} is ranges[ 1 ],\n\t\t\t\t// * () is ranges[ 2 ].\n\t\t\t\tif (type == 'move') {\n\t\t\t\t\tvar sourceRange = Range.createFromPositionAndShift(sourcePosition, howMany);\n\n\t\t\t\t\tif (deltaType == 'split' && this.containsPosition(sourcePosition)) {\n\t\t\t\t\t\t// Range contains a position where an element is split.\n\t\t\t\t\t\t//

f[ooba]r

->

f[ooba]r

->

f[oo]

{ba}r

->

f[oo

ba]r

\n\t\t\t\t\t\treturn [new Range(ranges[0].start, ranges[1].end)];\n\t\t\t\t\t} else if (deltaType == 'merge' && this.isCollapsed && ranges[0].start.isEqual(sourcePosition)) {\n\t\t\t\t\t\t// Collapsed range is in merged element.\n\t\t\t\t\t\t// Without fix, the range would end up in the graveyard, together with removed element.\n\t\t\t\t\t\t//

foo

[]bar

->

foobar

[]

->

foobar

->

foo[]bar

\n\t\t\t\t\t\treturn [new Range(targetPosition.getShiftedBy(this.start.offset))];\n\t\t\t\t\t} else if (deltaType == 'wrap') {\n\t\t\t\t\t\t// Range intersects (at the start) with wrapped element (

ab

).\n\t\t\t\t\t\t//

a[b

c]d

->

a[b

c]d

-> []

a(b

){

c}d

->

a[b

c]d

\n\t\t\t\t\t\tif (sourceRange.containsPosition(this.start) && this.containsPosition(sourceRange.end)) {\n\t\t\t\t\t\t\treturn [new Range(ranges[2].start, ranges[1].end)];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Range intersects (at the end) with wrapped element (

cd

).\n\t\t\t\t\t\t//

a[b

c]d

->

a[b

c]d

->

a[b

]{

c}d

->

a[b

c]d

\n\t\t\t\t\t\telse if (sourceRange.containsPosition(this.end) && this.containsPosition(sourceRange.start)) {\n\t\t\t\t\t\t\t\treturn [new Range(ranges[0].start, ranges[1].end)];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t} else if (deltaType == 'unwrap') {\n\t\t\t\t\t\t// Range intersects (at the beginning) with unwrapped element ().\n\t\t\t\t\t\t//

a[b

c]d

->

a{b

}[

c]d

->

a[b

c]d

\n\t\t\t\t\t\t// is removed in next operation, but the remove does not mess up ranges.\n\t\t\t\t\t\tif (sourceRange.containsPosition(this.start) && this.containsPosition(sourceRange.end)) {\n\t\t\t\t\t\t\treturn [new Range(ranges[1].start, ranges[0].end)];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Range intersects (at the end) with unwrapped element ().\n\t\t\t\t\t\t//

a[b

c]d

->

a[b

](

c)d

{} ->

a[b

c]d

\n\t\t\t\t\t\t// is removed in next operation, but the remove does not mess up ranges.\n\t\t\t\t\t\telse if (sourceRange.containsPosition(this.end) && this.containsPosition(sourceRange.start)) {\n\t\t\t\t\t\t\t\treturn [new Range(ranges[0].start, ranges[2].end)];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn ranges;\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Returns an array containing one or two {@link ~Range ranges} that are a result of transforming this\n * {@link ~Range range} by inserting `howMany` nodes at `insertPosition`. Two {@link ~Range ranges} are\n * returned if the insertion was inside this {@link ~Range range} and `spread` is set to `true`.\n *\n * Examples:\n *\n *\t\tlet range = new Range( new Position( root, [ 2, 7 ] ), new Position( root, [ 4, 0, 1 ] ) );\n *\t\tlet transformed = range._getTransformedByInsertion( new Position( root, [ 1 ] ), 2 );\n *\t\t// transformed array has one range from [ 4, 7 ] to [ 6, 0, 1 ]\n *\n *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 4, 0, 0 ] ), 4 );\n *\t\t// transformed array has one range from [ 2, 7 ] to [ 4, 0, 5 ]\n *\n *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 3, 2 ] ), 4 );\n *\t\t// transformed array has one range, which is equal to original range\n *\n *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 3, 2 ] ), 4, true );\n *\t\t// transformed array has two ranges: from [ 2, 7 ] to [ 3, 2 ] and from [ 3, 6 ] to [ 4, 0, 1 ]\n *\n *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 4, 0, 1 ] ), 4, false, false );\n *\t\t// transformed array has one range which is equal to original range because insertion is after the range boundary\n *\n *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 4, 0, 1 ] ), 4, false, true );\n *\t\t// transformed array has one range: from [ 2, 7 ] to [ 4, 0, 5 ] because range was expanded\n *\n * @protected\n * @param {module:engine/model/position~Position} insertPosition Position where nodes are inserted.\n * @param {Number} howMany How many nodes are inserted.\n * @param {Boolean} [spread] Flag indicating whether this {~Range range} should be spread if insertion\n * was inside the range. Defaults to `false`.\n * @param {Boolean} [isSticky] Flag indicating whether insertion should expand a range if it is in a place of\n * range boundary. Defaults to `false`.\n * @returns {Array.} Result of the transformation.\n */\n\n\t}, {\n\t\tkey: '_getTransformedByInsertion',\n\t\tvalue: function _getTransformedByInsertion(insertPosition, howMany) {\n\t\t\tvar spread = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\t\t\tvar isSticky = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n\t\t\tif (spread && this.containsPosition(insertPosition)) {\n\t\t\t\t// Range has to be spread. The first part is from original start to the spread point.\n\t\t\t\t// The other part is from spread point to the original end, but transformed by\n\t\t\t\t// insertion to reflect insertion changes.\n\n\t\t\t\treturn [new Range(this.start, insertPosition), new Range(insertPosition._getTransformedByInsertion(insertPosition, howMany, true), this.end._getTransformedByInsertion(insertPosition, howMany, this.isCollapsed))];\n\t\t\t} else {\n\t\t\t\tvar range = Range.createFromRange(this);\n\n\t\t\t\tvar insertBeforeStart = range.isCollapsed ? true : !isSticky;\n\t\t\t\tvar insertBeforeEnd = range.isCollapsed ? true : isSticky;\n\n\t\t\t\trange.start = range.start._getTransformedByInsertion(insertPosition, howMany, insertBeforeStart);\n\t\t\t\trange.end = range.end._getTransformedByInsertion(insertPosition, howMany, insertBeforeEnd);\n\n\t\t\t\treturn [range];\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Returns an array containing {@link ~Range ranges} that are a result of transforming this\n * {@link ~Range range} by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n *\n * @protected\n * @param {module:engine/model/position~Position} sourcePosition Position from which nodes are moved.\n * @param {module:engine/model/position~Position} targetPosition Position to where nodes are moved.\n * @param {Number} howMany How many nodes are moved.\n * @returns {Array.} Result of the transformation.\n */\n\n\t}, {\n\t\tkey: '_getTransformedByMove',\n\t\tvalue: function _getTransformedByMove(sourcePosition, targetPosition, howMany) {\n\t\t\tif (this.isCollapsed) {\n\t\t\t\tvar newPos = this.start._getTransformedByMove(sourcePosition, targetPosition, howMany, true, false);\n\n\t\t\t\treturn [new Range(newPos)];\n\t\t\t}\n\n\t\t\tvar result = void 0;\n\n\t\t\tvar moveRange = new Range(sourcePosition, sourcePosition.getShiftedBy(howMany));\n\n\t\t\tvar differenceSet = this.getDifference(moveRange);\n\t\t\tvar difference = null;\n\n\t\t\tvar common = this.getIntersection(moveRange);\n\n\t\t\tif (differenceSet.length == 1) {\n\t\t\t\t// `moveRange` and this range may intersect.\n\t\t\t\tdifference = new Range(differenceSet[0].start._getTransformedByDeletion(sourcePosition, howMany), differenceSet[0].end._getTransformedByDeletion(sourcePosition, howMany));\n\t\t\t} else if (differenceSet.length == 2) {\n\t\t\t\t// `moveRange` is inside this range.\n\t\t\t\tdifference = new Range(this.start, this.end._getTransformedByDeletion(sourcePosition, howMany));\n\t\t\t} // else, `moveRange` contains this range.\n\n\t\t\tvar insertPosition = targetPosition._getTransformedByDeletion(sourcePosition, howMany);\n\n\t\t\tif (difference) {\n\t\t\t\tresult = difference._getTransformedByInsertion(insertPosition, howMany, common !== null);\n\t\t\t} else {\n\t\t\t\tresult = [];\n\t\t\t}\n\n\t\t\tif (common) {\n\t\t\t\tresult.push(new Range(common.start._getCombined(moveRange.start, insertPosition), common.end._getCombined(moveRange.start, insertPosition)));\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t/**\n * Creates a new range, spreading from specified {@link module:engine/model/position~Position position} to a position moved by\n * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n *\n * @param {module:engine/model/position~Position} position Beginning of the range.\n * @param {Number} shift How long the range should be.\n * @returns {module:engine/model/range~Range}\n */\n\n\t}, {\n\t\tkey: 'isCollapsed',\n\t\tget: function get() {\n\t\t\treturn this.start.isEqual(this.end);\n\t\t}\n\n\t\t/**\n * Returns whether this range is flat, that is if {@link #start start} position and\n * {@link #end end} position are in the same {@link module:engine/model/position~Position#parent parent}.\n *\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isFlat',\n\t\tget: function get() {\n\t\t\treturn this.start.parent === this.end.parent;\n\t\t}\n\n\t\t/**\n * Range root element.\n *\n * @type {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n */\n\n\t}, {\n\t\tkey: 'root',\n\t\tget: function get() {\n\t\t\treturn this.start.root;\n\t\t}\n\t}], [{\n\t\tkey: 'createFromPositionAndShift',\n\t\tvalue: function createFromPositionAndShift(position, shift) {\n\t\t\tvar start = position;\n\t\t\tvar end = position.getShiftedBy(shift);\n\n\t\t\treturn shift > 0 ? new this(start, end) : new this(end, start);\n\t\t}\n\n\t\t/**\n * Creates a range from given parents and offsets.\n *\n * @param {module:engine/model/element~Element} startElement Start position parent element.\n * @param {Number} startOffset Start position offset.\n * @param {module:engine/model/element~Element} endElement End position parent element.\n * @param {Number} endOffset End position offset.\n * @returns {module:engine/model/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createFromParentsAndOffsets',\n\t\tvalue: function createFromParentsAndOffsets(startElement, startOffset, endElement, endOffset) {\n\t\t\treturn new this(_position2.default.createFromParentAndOffset(startElement, startOffset), _position2.default.createFromParentAndOffset(endElement, endOffset));\n\t\t}\n\n\t\t/**\n * Creates a new instance of `Range` which is equal to passed range.\n *\n * @param {module:engine/model/range~Range} range Range to clone.\n * @returns {module:engine/model/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createFromRange',\n\t\tvalue: function createFromRange(range) {\n\t\t\treturn new this(range.start, range.end);\n\t\t}\n\n\t\t/**\n * Creates a range inside an {@link module:engine/model/element~Element element} which starts before the first child of\n * that element and ends after the last child of that element.\n *\n * @param {module:engine/model/element~Element} element Element which is a parent for the range.\n * @returns {module:engine/model/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createIn',\n\t\tvalue: function createIn(element) {\n\t\t\treturn this.createFromParentsAndOffsets(element, 0, element, element.maxOffset);\n\t\t}\n\n\t\t/**\n * Creates a range that starts before given {@link module:engine/model/item~Item model item} and ends after it.\n *\n * @param {module:engine/model/item~Item} item\n * @returns {module:engine/model/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createOn',\n\t\tvalue: function createOn(item) {\n\t\t\treturn this.createFromPositionAndShift(_position2.default.createBefore(item), item.offsetSize);\n\t\t}\n\n\t\t/**\n * Combines all ranges from the passed array into a one range. At least one range has to be passed.\n * Passed ranges must not have common parts.\n *\n * The first range from the array is a reference range. If other ranges start or end on the exactly same position where\n * the reference range, they get combined into one range.\n *\n *\t\t[ ][] [ ][ ][ ][ ][] [ ] // Passed ranges, shown sorted\n *\t\t[ ] // The result of the function if the first range was a reference range.\n *\t [ ] // The result of the function if the third-to-seventh range was a reference range.\n *\t [ ] // The result of the function if the last range was a reference range.\n *\n * @param {Array.} ranges Ranges to combine.\n * @returns {module:engine/model/range~Range} Combined range.\n */\n\n\t}, {\n\t\tkey: 'createFromRanges',\n\t\tvalue: function createFromRanges(ranges) {\n\t\t\tif (ranges.length === 0) {\n\t\t\t\t/**\n * At least one range has to be passed.\n *\n * @error range-create-from-ranges-empty-array\n */\n\t\t\t\tthrow new _ckeditorerror2.default('range-create-from-ranges-empty-array: At least one range has to be passed.');\n\t\t\t} else if (ranges.length == 1) {\n\t\t\t\treturn this.createFromRange(ranges[0]);\n\t\t\t}\n\n\t\t\t// 1. Set the first range in `ranges` array as a reference range.\n\t\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\t// Other ranges will be stuck to that range, if possible.\n\t\t\tvar ref = ranges[0];\n\n\t\t\t// 2. Sort all the ranges so it's easier to process them.\n\t\t\tranges.sort(function (a, b) {\n\t\t\t\treturn a.start.isAfter(b.start);\n\t\t\t});\n\n\t\t\t// 3. Check at which index the reference range is now.\n\t\t\tvar refIndex = ranges.indexOf(ref);\n\n\t\t\t// 4. At this moment we don't need the original range.\n\t\t\t// We are going to modify the result and we need to return a new instance of Range.\n\t\t\t// We have to create a copy of the reference range.\n\t\t\tvar result = new this(ref.start, ref.end);\n\n\t\t\t// 5. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\t\tfor (var i = refIndex - 1; i >= 0; i++) {\n\t\t\t\tif (ranges[i].end.isEqual(result.start)) {\n\t\t\t\t\tresult.start = _position2.default.createFromPosition(ranges[i].start);\n\t\t\t\t} else {\n\t\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\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 6. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\t\tfor (var _i2 = refIndex + 1; _i2 < ranges.length; _i2++) {\n\t\t\t\tif (ranges[_i2].start.isEqual(result.end)) {\n\t\t\t\t\tresult.end = _position2.default.createFromPosition(ranges[_i2].end);\n\t\t\t\t} else {\n\t\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\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t/**\n * Creates a `Range` instance from given plain object (i.e. parsed JSON string).\n *\n * @param {Object} json Plain object to be converted to `Range`.\n * @param {module:engine/model/document~Document} doc Document object that will be range owner.\n * @returns {module:engine/model/element~Element} `Range` instance created using given plain object.\n */\n\n\t}, {\n\t\tkey: 'fromJSON',\n\t\tvalue: function fromJSON(json, doc) {\n\t\t\treturn new this(_position2.default.fromJSON(json.start, doc), _position2.default.fromJSON(json.end, doc));\n\t\t}\n\t}]);\n\n\treturn Range;\n}();\n\nexports.default = Range;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/range.js\n// module id = 3\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = mix;\n/**\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 */\nfunction mix(baseClass) {\n for (var _len = arguments.length, mixins = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n mixins[_key - 1] = arguments[_key];\n }\n\n mixins.forEach(function (mixin) {\n Object.getOwnPropertyNames(mixin).concat(Object.getOwnPropertySymbols(mixin)).forEach(function (key) {\n if (key in baseClass.prototype) {\n return;\n }\n\n var sourceDescriptor = Object.getOwnPropertyDescriptor(mixin, key);\n sourceDescriptor.enumerable = false;\n\n Object.defineProperty(baseClass.prototype, key, sourceDescriptor);\n });\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/mix.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _node = require('./node');\n\nvar _node2 = _interopRequireDefault(_node);\n\nvar _nodelist = require('./nodelist');\n\nvar _nodelist2 = _interopRequireDefault(_nodelist);\n\nvar _text = require('./text');\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _isiterable = require('@ckeditor/ckeditor5-utils/src/isiterable');\n\nvar _isiterable2 = _interopRequireDefault(_isiterable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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\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 */\nvar Element = function (_Node) {\n\t_inherits(Element, _Node);\n\n\t/**\n * Creates a model element.\n *\n * @param {String} name Element's name.\n * @param {Object} [attrs] Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n * @param {module:engine/model/node~Node|Iterable.} [children]\n * One or more nodes to be inserted as children of created element.\n */\n\tfunction Element(name, attrs, children) {\n\t\t_classCallCheck(this, Element);\n\n\t\t/**\n * Element name.\n *\n * @member {String} module:engine/model/element~Element#name\n */\n\t\tvar _this = _possibleConstructorReturn(this, (Element.__proto__ || Object.getPrototypeOf(Element)).call(this, attrs));\n\n\t\t_this.name = name;\n\n\t\t/**\n * List of children nodes.\n *\n * @private\n * @member {module:engine/model/nodelist~NodeList} module:engine/model/element~Element#_children\n */\n\t\t_this._children = new _nodelist2.default();\n\n\t\tif (children) {\n\t\t\t_this.insertChildren(0, children);\n\t\t}\n\t\treturn _this;\n\t}\n\n\t/**\n * Number of this element's children.\n *\n * @readonly\n * @type {Number}\n */\n\n\n\t_createClass(Element, [{\n\t\tkey: 'is',\n\n\n\t\t/**\n * Checks whether given model tree object is of given type.\n *\n *\t\tobj.name; // 'listItem'\n *\t\tobj instanceof Element; // true\n *\n *\t\tobj.is( 'element' ); // true\n *\t\tobj.is( 'listItem' ); // true\n *\t\tobj.is( 'element', 'listItem' ); // true\n *\t\tobj.is( 'text' ); // false\n *\t\tobj.is( 'element', 'image' ); // false\n *\n * Read more in {@link module:engine/model/node~Node#is}.\n *\n * @param {String} type Type to check when `name` parameter is present.\n * Otherwise, it acts like the `name` parameter.\n * @param {String} [name] Element name.\n * @returns {Boolean}\n */\n\t\tvalue: function is(type) {\n\t\t\tvar name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n\t\t\tif (!name) {\n\t\t\t\treturn type == 'element' || type == this.name;\n\t\t\t} else {\n\t\t\t\treturn type == 'element' && name == this.name;\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Gets the child at the given index.\n *\n * @param {Number} index Index of child.\n * @returns {module:engine/model/node~Node} Child node.\n */\n\n\t}, {\n\t\tkey: 'getChild',\n\t\tvalue: function getChild(index) {\n\t\t\treturn this._children.getNode(index);\n\t\t}\n\n\t\t/**\n * Returns an iterator that iterates over all of this element's children.\n *\n * @returns {Iterable.}\n */\n\n\t}, {\n\t\tkey: 'getChildren',\n\t\tvalue: function getChildren() {\n\t\t\treturn this._children[Symbol.iterator]();\n\t\t}\n\n\t\t/**\n * Returns an index of the given child node. Returns `null` if given node is not a child of this element.\n *\n * @param {module:engine/model/node~Node} node Child node to look for.\n * @returns {Number} Child node's index in this element.\n */\n\n\t}, {\n\t\tkey: 'getChildIndex',\n\t\tvalue: function getChildIndex(node) {\n\t\t\treturn this._children.getNodeIndex(node);\n\t\t}\n\n\t\t/**\n * Returns the starting offset of given child. Starting offset is equal to the sum of\n * {module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n * given node is not a child of this element.\n *\n * @param {module:engine/model/node~Node} node Child node to look for.\n * @returns {Number} Child node's starting offset.\n */\n\n\t}, {\n\t\tkey: 'getChildStartOffset',\n\t\tvalue: function getChildStartOffset(node) {\n\t\t\treturn this._children.getNodeStartOffset(node);\n\t\t}\n\n\t\t/**\n * Creates a copy of this element and returns it. Created element has same name and attributes as original element.\n * If clone is not deep, children of copied element are references to the same nodes as in original element.\n * If clone is deep, original element's children are also cloned.\n *\n * @param {Boolean} [deep=false] Decides whether children of this element should also be cloned (`true`) or not (`false`).\n */\n\n\t}, {\n\t\tkey: 'clone',\n\t\tvalue: function clone() {\n\t\t\tvar deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n\t\t\tvar children = deep ? Array.from(this._children).map(function (node) {\n\t\t\t\treturn node.clone();\n\t\t\t}) : Array.from(this._children);\n\n\t\t\treturn new Element(this.name, this.getAttributes(), children);\n\t\t}\n\n\t\t/**\n * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n * too high, returns {@link module:engine/model/element~Element#getChildIndex index after last child}.\n *\n *\t\tconst textNode = new Text( 'foo' );\n *\t\tconst pElement = new Element( 'p' );\n *\t\tconst divElement = new Element( [ textNode, pElement ] );\n *\t\tdivElement.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n *\t\tdivElement.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n *\t\tdivElement.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n *\t\tdivElement.offsetToIndex( 2 ); // Returns 0.\n *\t\tdivElement.offsetToIndex( 3 ); // Returns 1.\n *\t\tdivElement.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n *\n * @param {Number} offset Offset to look for.\n * @returns {Number}\n */\n\n\t}, {\n\t\tkey: 'offsetToIndex',\n\t\tvalue: function offsetToIndex(offset) {\n\t\t\treturn this._children.offsetToIndex(offset);\n\t\t}\n\n\t\t/**\n * {@link module:engine/model/element~Element#insertChildren Inserts} one or more nodes at the end of this element.\n *\n * @param {module:engine/model/node~Node|Iterable.} nodes Nodes to be inserted.\n */\n\n\t}, {\n\t\tkey: 'appendChildren',\n\t\tvalue: function appendChildren(nodes) {\n\t\t\tthis.insertChildren(this.childCount, nodes);\n\t\t}\n\n\t\t/**\n * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes\n * to this element.\n *\n * @param {Number} index Index at which nodes should be inserted.\n * @param {module:engine/model/node~Node|Iterable.} nodes Nodes to be inserted.\n */\n\n\t}, {\n\t\tkey: 'insertChildren',\n\t\tvalue: function insertChildren(index, nodes) {\n\t\t\tnodes = normalize(nodes);\n\n\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\tvar _didIteratorError = false;\n\t\t\tvar _iteratorError = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar node = _step.value;\n\n\t\t\t\t\tnode.parent = this;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._children.insertNodes(index, nodes);\n\t\t}\n\n\t\t/**\n * Removes one or more nodes starting at the given index and sets\n * {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.\n *\n * @param {Number} index Index of the first node to remove.\n * @param {Number} [howMany=1] Number of nodes to remove.\n * @returns {Array.} Array containing removed nodes.\n */\n\n\t}, {\n\t\tkey: 'removeChildren',\n\t\tvalue: function removeChildren(index) {\n\t\t\tvar howMany = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n\t\t\tvar nodes = this._children.removeNodes(index, howMany);\n\n\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\tvar _didIteratorError2 = false;\n\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator2 = nodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\tvar node = _step2.value;\n\n\t\t\t\t\tnode.parent = null;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t_iteratorError2 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn nodes;\n\t\t}\n\n\t\t/**\n * Returns a descendant node by its path relative to this element.\n *\n *\t\t// ac\n *\t\tthis.getNodeByPath( [ 0 ] ); // -> \"a\"\n *\t\tthis.getNodeByPath( [ 1 ] ); // -> \n *\t\tthis.getNodeByPath( [ 1, 0 ] ); // -> \"c\"\n *\n * @param {Array.} relativePath Path of the node to find, relative to this element.\n * @returns {module:engine/model/node~Node}\n */\n\n\t}, {\n\t\tkey: 'getNodeByPath',\n\t\tvalue: function getNodeByPath(relativePath) {\n\t\t\tvar node = this;\n\n\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\tvar _didIteratorError3 = false;\n\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator3 = relativePath[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\tvar index = _step3.value;\n\n\t\t\t\t\tnode = node.getChild(index);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t_iteratorError3 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t_iterator3.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\t\tthrow _iteratorError3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn node;\n\t\t}\n\n\t\t/**\n * Converts `Element` instance to plain object and returns it. Takes care of converting all of this element's children.\n *\n * @returns {Object} `Element` instance converted to plain object.\n */\n\n\t}, {\n\t\tkey: 'toJSON',\n\t\tvalue: function toJSON() {\n\t\t\tvar json = _get(Element.prototype.__proto__ || Object.getPrototypeOf(Element.prototype), 'toJSON', this).call(this);\n\n\t\t\tjson.name = this.name;\n\n\t\t\tif (this._children.length > 0) {\n\t\t\t\tjson.children = [];\n\n\t\t\t\tvar _iteratorNormalCompletion4 = true;\n\t\t\t\tvar _didIteratorError4 = false;\n\t\t\t\tvar _iteratorError4 = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator4 = this._children[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n\t\t\t\t\t\tvar node = _step4.value;\n\n\t\t\t\t\t\tjson.children.push(node.toJSON());\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError4 = true;\n\t\t\t\t\t_iteratorError4 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion4 && _iterator4.return) {\n\t\t\t\t\t\t\t_iterator4.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError4) {\n\t\t\t\t\t\t\tthrow _iteratorError4;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn json;\n\t\t}\n\n\t\t/**\n * Creates an `Element` instance from given plain object (i.e. parsed JSON string).\n * Converts `Element` children to proper nodes.\n *\n * @param {Object} json Plain object to be converted to `Element`.\n * @returns {module:engine/model/element~Element} `Element` instance created using given plain object.\n */\n\n\t}, {\n\t\tkey: 'childCount',\n\t\tget: function get() {\n\t\t\treturn this._children.length;\n\t\t}\n\n\t\t/**\n * Sum of {module:engine/model/node~Node#offsetSize offset sizes} of all of this element's children.\n *\n * @readonly\n * @type {Number}\n */\n\n\t}, {\n\t\tkey: 'maxOffset',\n\t\tget: function get() {\n\t\t\treturn this._children.maxOffset;\n\t\t}\n\n\t\t/**\n * Is `true` if there are no nodes inside this element, `false` otherwise.\n *\n * @readonly\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isEmpty',\n\t\tget: function get() {\n\t\t\treturn this.childCount === 0;\n\t\t}\n\t}], [{\n\t\tkey: 'fromJSON',\n\t\tvalue: function fromJSON(json) {\n\t\t\tvar children = null;\n\n\t\t\tif (json.children) {\n\t\t\t\tchildren = [];\n\n\t\t\t\tvar _iteratorNormalCompletion5 = true;\n\t\t\t\tvar _didIteratorError5 = false;\n\t\t\t\tvar _iteratorError5 = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator5 = json.children[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n\t\t\t\t\t\tvar child = _step5.value;\n\n\t\t\t\t\t\tif (child.name) {\n\t\t\t\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\t\t\t\tchildren.push(Element.fromJSON(child));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\t\t\t\tchildren.push(_text2.default.fromJSON(child));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError5 = true;\n\t\t\t\t\t_iteratorError5 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion5 && _iterator5.return) {\n\t\t\t\t\t\t\t_iterator5.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError5) {\n\t\t\t\t\t\t\tthrow _iteratorError5;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new Element(json.name, json.attributes, children);\n\t\t}\n\t}]);\n\n\treturn Element;\n}(_node2.default);\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/model/node~Node|Iterable.}\n// @return {Iterable.}\n\n\nexports.default = Element;\nfunction normalize(nodes) {\n\t// Separate condition because string is iterable.\n\tif (typeof nodes == 'string') {\n\t\treturn [new _text2.default(nodes)];\n\t}\n\n\tif (!(0, _isiterable2.default)(nodes)) {\n\t\tnodes = [nodes];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from(nodes).map(function (node) {\n\t\treturn typeof node == 'string' ? new _text2.default(node) : node;\n\t});\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/element.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.TemplateIfBinding = exports.TemplateToBinding = exports.TemplateBinding = undefined;\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _mix = require('@ckeditor/ckeditor5-utils/src/mix');\n\nvar _mix2 = _interopRequireDefault(_mix);\n\nvar _emittermixin = require('@ckeditor/ckeditor5-utils/src/emittermixin');\n\nvar _emittermixin2 = _interopRequireDefault(_emittermixin);\n\nvar _collection = require('@ckeditor/ckeditor5-utils/src/collection');\n\nvar _collection2 = _interopRequireDefault(_collection);\n\nvar _view = require('./view');\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _viewcollection = require('./viewcollection');\n\nvar _viewcollection2 = _interopRequireDefault(_viewcollection);\n\nvar _cloneDeepWith = require('@ckeditor/ckeditor5-utils/src/lib/lodash/cloneDeepWith');\n\nvar _cloneDeepWith2 = _interopRequireDefault(_cloneDeepWith);\n\nvar _isObject = require('@ckeditor/ckeditor5-utils/src/lib/lodash/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nvar _log = require('@ckeditor/ckeditor5-utils/src/log');\n\nvar _log2 = _interopRequireDefault(_log);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar xhtmlNs = 'http://www.w3.org/1999/xhtml';\n\n/**\n * A basic Template class. It renders DOM HTMLElement or Text from {@link module:ui/template~TemplateDefinition} and supports\n * element attributes, children, bindings to {@link module:utils/observablemixin~ObservableMixin} instances and DOM events\n * propagation. For example:\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\tchildren: [\n *\t\t\t\t'A paragraph.'\n *\t\t\t]\n *\t\t} ).render();\n *\n * will render the following HTMLElement:\n *\n *\t\t

A paragraph.

\n *\n * See {@link module:ui/template~TemplateDefinition} to know more about templates and complex template definitions.\n *\n* @mixes module:utils/emittermixin~EmitterMixin\n */\n\nvar Template = function () {\n\t/**\n * Creates an instance of the {@link ~Template} class.\n *\n * @param {module:ui/template~TemplateDefinition} def The definition of the template.\n */\n\tfunction Template(def) {\n\t\t_classCallCheck(this, Template);\n\n\t\tObject.assign(this, normalize(clone(def)));\n\n\t\t/**\n * Indicates whether this particular Template instance has been\n * {@link #render rendered}.\n *\n * @readonly\n * @protected\n * @member {Boolean}\n */\n\t\tthis._isRendered = false;\n\n\t\t/**\n * Tag of this template, i.e. `div`, indicating that the instance will render\n * to an HTMLElement.\n *\n * @member {String} #tag\n */\n\n\t\t/**\n * Text of this template, indicating that the instance will render to a DOM Text.\n *\n * @member {Array.} #text\n */\n\n\t\t/**\n * Attributes of this template, i.e. `{ id: [ 'ck-id' ] }`, corresponding with\n * HTML attributes on HTMLElement.\n *\n * Note: Only when {@link #tag} is defined.\n *\n * @member {Object} #attributes\n */\n\n\t\t/**\n * Children of this template; sub–templates. Each one is an independent\n * instance of {@link ~Template}.\n *\n * Note: Only when {@link #tag} is defined.\n *\n * @member {module:utils/collection~Collection.} #children\n */\n\n\t\t/**\n * DOM event listeners of this template.\n *\n * @member {Object} #eventListeners\n */\n\n\t\t/**\n * Data used by {@link #revert} method to restore a node\n * to its original state.\n *\n * See: {@link #apply}.\n *\n * @readonly\n * @protected\n * @member {module:ui/template~RenderData}\n */\n\t\tthis._revertData = null;\n\t}\n\n\t/**\n * Renders a DOM Node (`HTMLElement` or `Text`) out of the template.\n *\n * @see #apply\n *\n * @returns {HTMLElement|Text}\n */\n\n\n\t_createClass(Template, [{\n\t\tkey: 'render',\n\t\tvalue: function render() {\n\t\t\tvar node = this._renderNode({\n\t\t\t\tintoFragment: true\n\t\t\t});\n\n\t\t\tthis._isRendered = true;\n\n\t\t\treturn node;\n\t\t}\n\n\t\t/**\n * Applies the template to an existing DOM Node, either `HTMLElement` or `Text`.\n *\n * **Note:** No new DOM nodes (HTMLElement or Text) will be created. Applying extends attributes\n * ({@link module:ui/template~TemplateDefinition attributes}) and listeners ({@link module:ui/template~TemplateDefinition on}) only.\n *\n * **Note:** Existing \"class\" and \"style\" attributes are extended when a template\n * is applied to a Node, while other attributes and `textContent` are overridden.\n *\n * **Note:** The process of applying a template can be easily reverted using\n * {@link module:ui/template~Template#revert} method.\n *\n *\t\tconst element = document.createElement( 'div' );\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\tattrs: {\n *\t\t\t\tid: 'first-div',\n *\t\t\t\tclass: bind.to( 'divClass' )\n *\t\t\t},\n *\t\t\ton: {\n *\t\t\t\tclick: bind( 'elementClicked' ) // Will be fired by the observableInstance.\n *\t\t\t}\n *\t\t\tchildren: [\n *\t\t\t\t'Div text.'\n *\t\t\t]\n *\t\t} ).apply( element );\n *\n *\t\telement.outerHTML == \"
Div text.
\"\n *\n * @see module:ui/template~Template#render\n * @see module:ui/template~Template#revert\n * @param {Node} node Root node for the template to apply.\n */\n\n\t}, {\n\t\tkey: 'apply',\n\t\tvalue: function apply(node) {\n\t\t\tthis._revertData = getEmptyRevertData();\n\n\t\t\tthis._renderNode({\n\t\t\t\tnode: node,\n\t\t\t\tisApplying: true,\n\t\t\t\trevertData: this._revertData\n\t\t\t});\n\n\t\t\treturn node;\n\t\t}\n\n\t\t/**\n * Reverts a template {@link module:ui/template~Template#apply applied} to a DOM Node.\n *\n * @param {Node} node Root node for the template to revert. In most cases, it's the same node\n * that {@link module:ui/template~Template#apply} has used.\n */\n\n\t}, {\n\t\tkey: 'revert',\n\t\tvalue: function revert(node) {\n\t\t\tif (!this._revertData) {\n\t\t\t\t/**\n * Attempting reverting a template which has not been applied yet.\n *\n * @error ui-template-revert-not-applied\n */\n\t\t\t\tthrow new _ckeditorerror2.default('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');\n\t\t\t}\n\n\t\t\tthis._revertTemplateFromNode(node, this._revertData);\n\t\t}\n\n\t\t/**\n * An entry point to the interface which allows binding DOM nodes to {@link module:utils/observablemixin~ObservableMixin}.\n * There are two types of bindings:\n *\n * * `HTMLElement` attributes or Text Node `textContent` can be synchronized with {@link module:utils/observablemixin~ObservableMixin}\n * instance attributes. See {@link module:ui/template~BindChain#to} and {@link module:ui/template~BindChain#if}.\n *\n * * DOM events fired on `HTMLElement` can be propagated through {@link module:utils/observablemixin~ObservableMixin}.\n * See {@link module:ui/template~BindChain#to}.\n *\n * @param {module:utils/observablemixin~ObservableMixin} observable An instance of ObservableMixin class.\n * @param {module:utils/emittermixin~EmitterMixin} emitter An instance of `Emitter` class. It listens\n * to `observable` attribute changes and DOM Events, depending on the binding. Usually {@link module:ui/view~View} instance.\n * @returns {module:ui/template~BindChain}\n */\n\n\t}, {\n\t\tkey: '_renderNode',\n\n\n\t\t/**\n * Renders a DOM Node (either `HTMLElement` or `Text`) out of the template.\n *\n * @protected\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\t\tvalue: function _renderNode(data) {\n\t\t\tvar isInvalid = void 0;\n\n\t\t\tif (data.node) {\n\t\t\t\t// When applying, a definition cannot have \"tag\" and \"text\" at the same time.\n\t\t\t\tisInvalid = this.tag && this.text;\n\t\t\t} else {\n\t\t\t\t// When rendering, a definition must have either \"tag\" or \"text\": XOR( this.tag, this.text ).\n\t\t\t\tisInvalid = this.tag ? this.text : !this.text;\n\t\t\t}\n\n\t\t\tif (isInvalid) {\n\t\t\t\t/**\n * Node definition cannot have \"tag\" and \"text\" properties at the same time.\n * Node definition must have either \"tag\" or \"text\" when rendering new Node.\n *\n * @error ui-template-wrong-syntax\n */\n\t\t\t\tthrow new _ckeditorerror2.default('ui-template-wrong-syntax: Node definition must have either \"tag\" or \"text\" when rendering new Node.');\n\t\t\t}\n\n\t\t\tif (this.text) {\n\t\t\t\treturn this._renderText(data);\n\t\t\t} else {\n\t\t\t\treturn this._renderElement(data);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Renders an `HTMLElement` out of the template.\n *\n * @protected\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_renderElement',\n\t\tvalue: function _renderElement(data) {\n\t\t\tvar node = data.node;\n\n\t\t\tif (!node) {\n\t\t\t\tnode = data.node = document.createElementNS(this.ns || xhtmlNs, this.tag);\n\t\t\t}\n\n\t\t\tthis._renderAttributes(data);\n\t\t\tthis._renderElementChildren(data);\n\t\t\tthis._setUpListeners(data);\n\n\t\t\treturn node;\n\t\t}\n\n\t\t/**\n * Renders a `Text` node out of {@link module:ui/template~Template#text}.\n *\n * @protected\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_renderText',\n\t\tvalue: function _renderText(data) {\n\t\t\tvar node = data.node;\n\n\t\t\t// Save the original textContent to revert it in #revert().\n\t\t\tif (node) {\n\t\t\t\tdata.revertData.text = node.textContent;\n\t\t\t} else {\n\t\t\t\tnode = data.node = document.createTextNode('');\n\t\t\t}\n\n\t\t\t// Check if this Text Node is bound to Observable. Cases:\n\t\t\t//\n\t\t\t//\t\ttext: [ Template.bind( ... ).to( ... ) ]\n\t\t\t//\n\t\t\t//\t\ttext: [\n\t\t\t//\t\t\t'foo',\n\t\t\t//\t\t\tTemplate.bind( ... ).to( ... ),\n\t\t\t//\t\t\t...\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\tif (hasTemplateBinding(this.text)) {\n\t\t\t\tthis._bindToObservable({\n\t\t\t\t\tschema: this.text,\n\t\t\t\t\tupdater: getTextUpdater(node),\n\t\t\t\t\tdata: data\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Simply set text. Cases:\n\t\t\t//\n\t\t\t//\t\ttext: [ 'all', 'are', 'static' ]\n\t\t\t//\n\t\t\t//\t\ttext: [ 'foo' ]\n\t\t\t//\n\t\t\telse {\n\t\t\t\t\tnode.textContent = this.text.join('');\n\t\t\t\t}\n\n\t\t\treturn node;\n\t\t}\n\n\t\t/**\n * Renders an `HTMLElement` attributes out of {@link module:ui/template~Template#attributes}.\n *\n * @protected\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_renderAttributes',\n\t\tvalue: function _renderAttributes(data) {\n\t\t\tvar attrName = void 0,\n\t\t\t attrValue = void 0,\n\t\t\t domAttrValue = void 0,\n\t\t\t attrNs = void 0;\n\n\t\t\tif (!this.attributes) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar node = data.node;\n\t\t\tvar revertData = data.revertData;\n\n\t\t\tfor (attrName in this.attributes) {\n\t\t\t\t// Current attribute value in DOM.\n\t\t\t\tdomAttrValue = node.getAttribute(attrName);\n\n\t\t\t\t// The value to be set.\n\t\t\t\tattrValue = this.attributes[attrName];\n\n\t\t\t\t// Save revert data.\n\t\t\t\tif (revertData) {\n\t\t\t\t\trevertData.attributes[attrName] = domAttrValue;\n\t\t\t\t}\n\n\t\t\t\t// Detect custom 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: Template.bind( ... ).to( ... )\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\tattrNs = (0, _isObject2.default)(attrValue[0]) && attrValue[0].ns ? attrValue[0].ns : null;\n\n\t\t\t\t// Activate binding if one is found. Cases:\n\t\t\t\t//\n\t\t\t\t//\t\tclass: [\n\t\t\t\t//\t\t\tTemplate.bind( ... ).to( ... )\n\t\t\t\t//\t\t]\n\t\t\t\t//\n\t\t\t\t//\t\tclass: [\n\t\t\t\t//\t\t\t'bar',\n\t\t\t\t//\t\t\tTemplate.bind( ... ).to( ... ),\n\t\t\t\t//\t\t\t'baz'\n\t\t\t\t//\t\t]\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: Template.bind( ... ).to( ... )\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\tif (hasTemplateBinding(attrValue)) {\n\t\t\t\t\t// Normalize attributes with additional data like namespace:\n\t\t\t\t\t//\n\t\t\t\t\t//\t\tclass: {\n\t\t\t\t\t//\t\t\tns: 'abc',\n\t\t\t\t\t//\t\t\tvalue: [ ... ]\n\t\t\t\t\t//\t\t}\n\t\t\t\t\t//\n\t\t\t\t\tvar valueToBind = attrNs ? attrValue[0].value : attrValue;\n\n\t\t\t\t\t// Extend the original value of attributes like \"style\" and \"class\",\n\t\t\t\t\t// don't override them.\n\t\t\t\t\tif (revertData && shouldExtend(attrName)) {\n\t\t\t\t\t\tvalueToBind.unshift(domAttrValue);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._bindToObservable({\n\t\t\t\t\t\tschema: valueToBind,\n\t\t\t\t\t\tupdater: getAttributeUpdater(node, attrName, attrNs),\n\t\t\t\t\t\tdata: data\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Style attribute could be an Object so it needs to be parsed in a specific way.\n\t\t\t\t//\n\t\t\t\t//\t\tstyle: {\n\t\t\t\t//\t\t\twidth: '100px',\n\t\t\t\t//\t\t\theight: Template.bind( ... ).to( ... )\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\telse if (attrName == 'style' && typeof attrValue[0] !== 'string') {\n\t\t\t\t\t\tthis._renderStyleAttribute(attrValue[0], data);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise simply set the static attribute:\n\t\t\t\t\t//\n\t\t\t\t\t//\t\tclass: [ 'foo' ]\n\t\t\t\t\t//\n\t\t\t\t\t//\t\tclass: [ 'all', 'are', 'static' ]\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: [ 'foo' ]\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\telse {\n\t\t\t\t\t\t\t// Extend the original value of attributes like \"style\" and \"class\",\n\t\t\t\t\t\t\t// don't override them.\n\t\t\t\t\t\t\tif (revertData && domAttrValue && shouldExtend(attrName)) {\n\t\t\t\t\t\t\t\tattrValue.unshift(domAttrValue);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tattrValue = attrValue\n\t\t\t\t\t\t\t// Retrieve \"values\" from:\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t//\t\tclass: [\n\t\t\t\t\t\t\t//\t\t\t{\n\t\t\t\t\t\t\t//\t\t\t\tns: 'abc',\n\t\t\t\t\t\t\t//\t\t\t\tvalue: [ ... ]\n\t\t\t\t\t\t\t//\t\t\t}\n\t\t\t\t\t\t\t//\t\t]\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t.map(function (val) {\n\t\t\t\t\t\t\t\treturn val ? val.value || val : val;\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t// Flatten the array.\n\t\t\t\t\t\t\t.reduce(function (prev, next) {\n\t\t\t\t\t\t\t\treturn prev.concat(next);\n\t\t\t\t\t\t\t}, [])\n\t\t\t\t\t\t\t// Convert into string.\n\t\t\t\t\t\t\t.reduce(arrayValueReducer, '');\n\n\t\t\t\t\t\t\tif (!isFalsy(attrValue)) {\n\t\t\t\t\t\t\t\tnode.setAttributeNS(attrNs, attrName, attrValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Renders `style` attribute of an `HTMLElement` based on {@link module:ui/template~Template#attributes}.\n *\n * Style attribute is an {Object} with static values:\n *\n *\t\tattributes: {\n *\t\t\tstyle: {\n *\t\t\t\tcolor: 'red'\n *\t\t\t}\n *\t\t}\n *\n * or values bound to {@link module:ui/model~Model} properties:\n *\n *\t\tattributes: {\n *\t\t\tstyle: {\n *\t\t\t\tcolor: bind.to( ... )\n *\t\t\t}\n *\t\t}\n *\n * Note: `style` attribute is rendered without setting the namespace. It does not seem to be\n * needed.\n *\n * @private\n * @param {Object} styles Styles located in `attributes.style` of {@link module:ui/template~TemplateDefinition}.\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_renderStyleAttribute',\n\t\tvalue: function _renderStyleAttribute(styles, data) {\n\t\t\tvar node = data.node;\n\n\t\t\tfor (var styleName in styles) {\n\t\t\t\tvar styleValue = styles[styleName];\n\n\t\t\t\t// Cases:\n\t\t\t\t//\n\t\t\t\t//\t\tstyle: {\n\t\t\t\t//\t\t\tcolor: bind.to( 'attribute' )\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\tif (hasTemplateBinding(styleValue)) {\n\t\t\t\t\tthis._bindToObservable({\n\t\t\t\t\t\tschema: [styleValue],\n\t\t\t\t\t\tupdater: getStyleUpdater(node, styleName),\n\t\t\t\t\t\tdata: data\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// Cases:\n\t\t\t\t//\n\t\t\t\t//\t\tstyle: {\n\t\t\t\t//\t\t\tcolor: 'red'\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\telse {\n\t\t\t\t\t\tnode.style[styleName] = styleValue;\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Recursively renders `HTMLElement` children from {@link module:ui/template~Template#children}.\n *\n * @protected\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_renderElementChildren',\n\t\tvalue: function _renderElementChildren(data) {\n\t\t\tvar node = data.node;\n\t\t\tvar container = data.intoFragment ? document.createDocumentFragment() : node;\n\t\t\tvar isApplying = data.isApplying;\n\t\t\tvar childIndex = 0;\n\n\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\tvar _didIteratorError = false;\n\t\t\tvar _iteratorError = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = this.children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar child = _step.value;\n\n\t\t\t\t\tif (isViewCollection(child)) {\n\t\t\t\t\t\tif (!isApplying) {\n\t\t\t\t\t\t\tchild.setParent(node);\n\n\t\t\t\t\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\tvar _didIteratorError2 = false;\n\t\t\t\t\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (var _iterator2 = child[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\t\t\t\t\tvar view = _step2.value;\n\n\t\t\t\t\t\t\t\t\tcontainer.appendChild(view.element);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t\t\t_iteratorError2 = err;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isView(child)) {\n\t\t\t\t\t\tif (!isApplying) {\n\t\t\t\t\t\t\tcontainer.appendChild(child.element);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (isApplying) {\n\t\t\t\t\t\t\tvar revertData = data.revertData;\n\t\t\t\t\t\t\tvar childRevertData = getEmptyRevertData();\n\n\t\t\t\t\t\t\trevertData.children.push(childRevertData);\n\n\t\t\t\t\t\t\tchild._renderNode({\n\t\t\t\t\t\t\t\tnode: container.childNodes[childIndex++],\n\t\t\t\t\t\t\t\tisApplying: true,\n\t\t\t\t\t\t\t\trevertData: childRevertData\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontainer.appendChild(child.render());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (data.intoFragment) {\n\t\t\t\tnode.appendChild(container);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Activates `on` listeners in the {@link module:ui/template~TemplateDefinition}\n * on a passed `HTMLElement`.\n *\n * @protected\n * @param {module:ui/template~RenderData} data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_setUpListeners',\n\t\tvalue: function _setUpListeners(data) {\n\t\t\tvar _this = this;\n\n\t\t\tif (!this.eventListeners) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar _loop = function _loop(key) {\n\t\t\t\tvar revertBindings = _this.eventListeners[key].map(function (schemaItem) {\n\t\t\t\t\tvar _key$split = key.split('@'),\n\t\t\t\t\t _key$split2 = _slicedToArray(_key$split, 2),\n\t\t\t\t\t domEvtName = _key$split2[0],\n\t\t\t\t\t domSelector = _key$split2[1];\n\n\t\t\t\t\treturn schemaItem.activateDomEventListener(domEvtName, domSelector, data);\n\t\t\t\t});\n\n\t\t\t\tif (data.revertData) {\n\t\t\t\t\tdata.revertData.bindings.push(revertBindings);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor (var key in this.eventListeners) {\n\t\t\t\t_loop(key);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * For given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding} it activates the\n * binding and sets its initial value.\n *\n * Note: {@link module:ui/template~TemplateValueSchema} can be for HTMLElement attributes or Text Node `textContent`.\n *\n * @protected\n * @param {Object} options Binding options.\n * @param {module:ui/template~TemplateValueSchema} options.schema\n * @param {Function} options.updater A function which updates DOM (like attribute or text).\n * @param {module:ui/template~RenderData} options.data Rendering data.\n */\n\n\t}, {\n\t\tkey: '_bindToObservable',\n\t\tvalue: function _bindToObservable(_ref) {\n\t\t\tvar schema = _ref.schema,\n\t\t\t updater = _ref.updater,\n\t\t\t data = _ref.data;\n\n\t\t\tvar revertData = data.revertData;\n\n\t\t\t// Set initial values.\n\t\t\tsyncValueSchemaValue(schema, updater, data);\n\n\t\t\tvar revertBindings = schema\n\t\t\t// Filter \"falsy\" (false, undefined, null, '') value schema components out.\n\t\t\t.filter(function (item) {\n\t\t\t\treturn !isFalsy(item);\n\t\t\t})\n\t\t\t// Filter inactive bindings from schema, like static strings ('foo'), numbers (42), etc.\n\t\t\t.filter(function (item) {\n\t\t\t\treturn item.observable;\n\t\t\t})\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(function (templateBinding) {\n\t\t\t\treturn templateBinding.activateAttributeListener(schema, updater, data);\n\t\t\t});\n\n\t\t\tif (revertData) {\n\t\t\t\trevertData.bindings.push(revertBindings);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Reverts {@link module:ui/template~RenderData#revertData template data} from a node to\n * return it to the the original state.\n *\n * @protected\n * @param {HTMLElement|Text} node A node to be reverted.\n * @param {module:ui/template~RenderData#revertData} revertData Stores information about\n * what changes have been made by {@link #apply} to the node.\n */\n\n\t}, {\n\t\tkey: '_revertTemplateFromNode',\n\t\tvalue: function _revertTemplateFromNode(node, revertData) {\n\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\tvar _didIteratorError3 = false;\n\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator3 = revertData.bindings[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\tvar binding = _step3.value;\n\n\t\t\t\t\t// Each binding may consist of several observable+observable#attribute.\n\t\t\t\t\t// like the following has 2:\n\t\t\t\t\t//\n\t\t\t\t\t//\t\tclass: [\n\t\t\t\t\t//\t\t\t'x',\n\t\t\t\t\t//\t\t\tbind.to( 'foo' ),\n\t\t\t\t\t//\t\t\t'y',\n\t\t\t\t\t//\t\t\tbind.to( 'bar' )\n\t\t\t\t\t//\t\t]\n\t\t\t\t\t//\n\t\t\t\t\tvar _iteratorNormalCompletion4 = true;\n\t\t\t\t\tvar _didIteratorError4 = false;\n\t\t\t\t\tvar _iteratorError4 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator4 = binding[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n\t\t\t\t\t\t\tvar revertBinding = _step4.value;\n\n\t\t\t\t\t\t\trevertBinding();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError4 = true;\n\t\t\t\t\t\t_iteratorError4 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion4 && _iterator4.return) {\n\t\t\t\t\t\t\t\t_iterator4.return();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError4) {\n\t\t\t\t\t\t\t\tthrow _iteratorError4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t_iteratorError3 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t_iterator3.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\t\tthrow _iteratorError3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (revertData.text) {\n\t\t\t\tnode.textContent = revertData.text;\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (var attrName in revertData.attributes) {\n\t\t\t\tvar attrValue = revertData.attributes[attrName];\n\n\t\t\t\t// When the attribute has **not** been set before #apply().\n\t\t\t\tif (attrValue === null) {\n\t\t\t\t\tnode.removeAttribute(attrName);\n\t\t\t\t} else {\n\t\t\t\t\tnode.setAttribute(attrName, attrValue);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < revertData.children.length; ++i) {\n\t\t\t\tthis._revertTemplateFromNode(node.childNodes[i], revertData.children[i]);\n\t\t\t}\n\t\t}\n\t}], [{\n\t\tkey: 'bind',\n\t\tvalue: function bind(observable, emitter) {\n\t\t\treturn {\n\t\t\t\tto: function to(eventNameOrFunctionOrAttribute, callback) {\n\t\t\t\t\treturn new TemplateToBinding({\n\t\t\t\t\t\teventNameOrFunction: eventNameOrFunctionOrAttribute,\n\t\t\t\t\t\tattribute: eventNameOrFunctionOrAttribute,\n\t\t\t\t\t\tobservable: observable, emitter: emitter, callback: callback\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tif: function _if(attribute, valueIfTrue, callback) {\n\t\t\t\t\treturn new TemplateIfBinding({\n\t\t\t\t\t\tobservable: observable, emitter: emitter, attribute: attribute, valueIfTrue: valueIfTrue, callback: callback\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t/**\n * Extends {@link module:ui/template~Template} instance with additional content from {@link module:ui/template~TemplateDefinition}.\n *\n *\t\tconst bind = Template.bind( observable, emitterInstance );\n *\t\tconst instance = new Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\tclass: 'a',\n *\t\t\t\tdata-x: bind.to( 'foo' )\n *\t\t\t},\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\t\tclass: 'b'\n *\t\t\t\t\t},\n *\t\t\t\t\tchildren: [\n *\t\t\t\t\t\t'Span'\n *\t\t\t\t\t]\n *\t\t\t\t}\n *\t\t\t]\n *\t\t } );\n *\n *\t\t// Instance-level extension.\n *\t\tTemplate.extend( instance, {\n *\t\t\tattributes: {\n *\t\t\t\tclass: 'b',\n *\t\t\t\tdata-x: bind.to( 'bar' )\n *\t\t\t},\n *\t\t\tchildren: [\n *\t\t\t\t{\n *\t\t\t\t\tattributes: {\n *\t\t\t\t\t\tclass: 'c'\n *\t\t\t\t\t}\n *\t\t\t\t}\n *\t\t\t]\n *\t\t} );\n *\n *\t\t// Child extension.\n *\t\tTemplate.extend( instance.children.get( 0 ), {\n *\t\t\tattributes: {\n *\t\t\t\tclass: 'd'\n *\t\t\t}\n *\t\t} );\n *\n * the `instance.render().outerHTML` is\n *\n *\t\t

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

\n *\n * @param {module:ui/template~Template} template Existing Template instance to be extended.\n * @param {module:ui/template~TemplateDefinition} def An extension to existing an template instance.\n */\n\n\t}, {\n\t\tkey: 'extend',\n\t\tvalue: function extend(template, def) {\n\t\t\tif (template._isRendered) {\n\t\t\t\t/**\n * Extending a template after rendering may not work as expected. To make sure\n * the {@link #extend extending} works for the rendered element, perform it\n * before {@link #render} is called.\n *\n * @error template-extend-render\n */\n\t\t\t\t_log2.default.warn('template-extend-render: Attempting to extend a template which has already been rendered.');\n\t\t\t}\n\n\t\t\textendTemplate(template, normalize(clone(def)));\n\t\t}\n\t}]);\n\n\treturn Template;\n}();\n\nexports.default = Template;\n\n\n(0, _mix2.default)(Template, _emittermixin2.default);\n\n/**\n * Describes a binding created by {@link module:ui/template~Template.bind} interface.\n *\n * @protected\n */\n\nvar TemplateBinding = exports.TemplateBinding = function () {\n\t/**\n * Creates an instance of the {@link module:ui/template~TemplateBinding} class.\n *\n * @param {module:ui/template~TemplateDefinition} def The definition of the binding.\n */\n\tfunction TemplateBinding(def) {\n\t\t_classCallCheck(this, TemplateBinding);\n\n\t\tObject.assign(this, def);\n\n\t\t/**\n * An observable instance of the binding. It provides the attribute\n * with the value or passes the event when a corresponding DOM event is fired.\n *\n * @member {module:utils/observablemixin~ObservableMixin} module:ui/template~TemplateBinding#observable\n */\n\n\t\t/**\n * An {@link module:utils/emittermixin~EmitterMixin} instance used by the binding\n * to (either):\n *\n * * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n * * listen to the event in the DOM.\n *\n * @member {module:utils/emittermixin~EmitterMixin} module:ui/template~TemplateBinding#emitter\n */\n\n\t\t/**\n * The name of the attribute of {@link module:ui/template~TemplateBinding#observable} which is observed.\n *\n * @member {String} module:ui/template~TemplateBinding#attribute\n */\n\n\t\t/**\n * A custom function to process the value of {@link module:ui/template~TemplateBinding#attribute}.\n *\n * @member {Function} [module:ui/template~TemplateBinding#callback]\n */\n\t}\n\n\t/**\n * Returns the value of the binding, which is the value of {@link module:ui/template~TemplateBinding#attribute} in\n * {@link module:ui/template~TemplateBinding#observable}.\n *\n * @param {Node} [node] A native DOM node, passed to the custom {@link module:ui/template~TemplateBinding#callback}.\n * @returns {*} The value of {@link module:ui/template~TemplateBinding#attribute} in {@link module:ui/template~TemplateBinding#observable}.\n */\n\n\n\t_createClass(TemplateBinding, [{\n\t\tkey: 'getValue',\n\t\tvalue: function getValue(node) {\n\t\t\tvar value = this.observable[this.attribute];\n\n\t\t\treturn this.callback ? this.callback(value, node) : value;\n\t\t}\n\n\t\t/**\n * Activates the listener for the changes of {@link module:ui/template~TemplateBinding#attribute} in\n * {@link module:ui/template~TemplateBinding#observable}, which then updates the DOM with the aggregated\n * value of {@link module:ui/template~TemplateValueSchema}.\n *\n * For instance, the `class` attribute of the `Template` element can be be bound to\n * the observable `foo` attribute in `ObservableMixin` instance.\n *\n * @param {module:ui/template~TemplateValueSchema} schema A full schema to generate an attribute or text in DOM.\n * @param {Function} updater A DOM updater function used to update native DOM attribute or text.\n * @param {module:ui/template~RenderData} data Rendering data.\n * @returns {Function} A function to sever the listener binding.\n */\n\n\t}, {\n\t\tkey: 'activateAttributeListener',\n\t\tvalue: function activateAttributeListener(schema, updater, data) {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar callback = function callback() {\n\t\t\t\treturn syncValueSchemaValue(schema, updater, data);\n\t\t\t};\n\n\t\t\tthis.emitter.listenTo(this.observable, 'change:' + this.attribute, callback);\n\n\t\t\t// Allows revert of the listener.\n\t\t\treturn function () {\n\t\t\t\t_this2.emitter.stopListening(_this2.observable, 'change:' + _this2.attribute, callback);\n\t\t\t};\n\t\t}\n\t}]);\n\n\treturn TemplateBinding;\n}();\n\n/**\n * Describes either:\n *\n * * a binding to {@link module:utils/observablemixin~ObservableMixin}\n * * or a native DOM event binding\n *\n * created by {@link module:ui/template~BindChain#to} method.\n *\n * @protected\n */\n\n\nvar TemplateToBinding = exports.TemplateToBinding = function (_TemplateBinding) {\n\t_inherits(TemplateToBinding, _TemplateBinding);\n\n\tfunction TemplateToBinding() {\n\t\t_classCallCheck(this, TemplateToBinding);\n\n\t\treturn _possibleConstructorReturn(this, (TemplateToBinding.__proto__ || Object.getPrototypeOf(TemplateToBinding)).apply(this, arguments));\n\t}\n\n\t_createClass(TemplateToBinding, [{\n\t\tkey: 'activateDomEventListener',\n\n\t\t/**\n * Activates the listener for the native DOM event, which when fired, is propagated by\n * the {@link module:ui/template~TemplateBinding#emitter}.\n *\n * @param {String} domEvtName A name of the native DOM event.\n * @param {String} domSelector A selector in DOM to filter delegated events.\n * @param {module:ui/template~RenderData} data Rendering data.\n * @returns {Function} A function to sever the listener binding.\n */\n\t\tvalue: function activateDomEventListener(domEvtName, domSelector, data) {\n\t\t\tvar _this4 = this;\n\n\t\t\tvar callback = function callback(evt, domEvt) {\n\t\t\t\tif (!domSelector || domEvt.target.matches(domSelector)) {\n\t\t\t\t\tif (typeof _this4.eventNameOrFunction == 'function') {\n\t\t\t\t\t\t_this4.eventNameOrFunction(domEvt);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_this4.observable.fire(_this4.eventNameOrFunction, domEvt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tthis.emitter.listenTo(data.node, domEvtName, callback);\n\n\t\t\t// Allows revert of the listener.\n\t\t\treturn function () {\n\t\t\t\t_this4.emitter.stopListening(data.node, domEvtName, callback);\n\t\t\t};\n\t\t}\n\t}]);\n\n\treturn TemplateToBinding;\n}(TemplateBinding);\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 */\n\n\nvar TemplateIfBinding = exports.TemplateIfBinding = function (_TemplateBinding2) {\n\t_inherits(TemplateIfBinding, _TemplateBinding2);\n\n\tfunction TemplateIfBinding() {\n\t\t_classCallCheck(this, TemplateIfBinding);\n\n\t\treturn _possibleConstructorReturn(this, (TemplateIfBinding.__proto__ || Object.getPrototypeOf(TemplateIfBinding)).apply(this, arguments));\n\t}\n\n\t_createClass(TemplateIfBinding, [{\n\t\tkey: 'getValue',\n\n\t\t/**\n * @inheritDoc\n */\n\t\tvalue: function getValue(node) {\n\t\t\tvar value = _get(TemplateIfBinding.prototype.__proto__ || Object.getPrototypeOf(TemplateIfBinding.prototype), 'getValue', this).call(this, node);\n\n\t\t\treturn isFalsy(value) ? false : this.valueIfTrue || true;\n\t\t}\n\n\t\t/**\n * The value of the DOM attribute/text to be set if the {@link module:ui/template~TemplateBinding#attribute} in\n * {@link module:ui/template~TemplateBinding#observable} is `true`.\n *\n * @member {String} [module:ui/template~TemplateIfBinding#valueIfTrue]\n */\n\n\t}]);\n\n\treturn TemplateIfBinding;\n}(TemplateBinding);\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}\n\n\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(function (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, _ref2) {\n\tvar node = _ref2.node;\n\n\tvar 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: function set(value) {\n\t\t\tnode.textContent = value;\n\t\t},\n\t\tremove: function remove() {\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: function set(value) {\n\t\t\tel.setAttributeNS(ns, attrName, value);\n\t\t},\n\t\tremove: function remove() {\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: function set(value) {\n\t\t\tel.style[styleName] = value;\n\t\t},\n\t\tremove: function remove() {\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\tvar clone = (0, _cloneDeepWith2.default)(def, function (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\tvar children = new _collection2.default();\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\tvar _iteratorNormalCompletion5 = true;\n\t\t\t\tvar _didIteratorError5 = false;\n\t\t\t\tvar _iteratorError5 = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator5 = def.children[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n\t\t\t\t\t\tvar child = _step5.value;\n\n\t\t\t\t\t\tif (isTemplate(child) || isView(child)) {\n\t\t\t\t\t\t\tchildren.add(child);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchildren.add(new Template(child));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError5 = true;\n\t\t\t\t\t_iteratorError5 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion5 && _iterator5.return) {\n\t\t\t\t\t\t\t_iterator5.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError5) {\n\t\t\t\t\t\t\tthrow _iteratorError5;\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}\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 (var 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 (var 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 (var a in ext) {\n\t\tif (obj[a]) {\n\t\t\tvar _obj$a;\n\n\t\t\t(_obj$a = obj[a]).push.apply(_obj$a, _toConsumableArray(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\tvar _template$text;\n\n\t\t(_template$text = template.text).push.apply(_template$text, _toConsumableArray(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 * The number of children in extended definition does not match.\n *\n * @error ui-template-extend-children-mismatch\n */\n\t\t\tthrow new _ckeditorerror2.default('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');\n\t\t}\n\n\t\tvar childIndex = 0;\n\n\t\tvar _iteratorNormalCompletion6 = true;\n\t\tvar _didIteratorError6 = false;\n\t\tvar _iteratorError6 = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator6 = def.children[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n\t\t\t\tvar childDef = _step6.value;\n\n\t\t\t\textendTemplate(template.children.get(childIndex++), childDef);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError6 = true;\n\t\t\t_iteratorError6 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion6 && _iterator6.return) {\n\t\t\t\t\t_iterator6.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError6) {\n\t\t\t\t\tthrow _iteratorError6;\n\t\t\t\t}\n\t\t\t}\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 _view2.default;\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 _viewcollection2.default;\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 {@link module:ui/template~Template}.\n * See: {@link module:ui/template~TemplateValueSchema}.\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\t...\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\t<{@link module:ui/view~View} instance>\n *\t\t\t\t<{@link module:ui/template~Template} instance>\n *\t\t\t\t...\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 *\t\t\t\t...\n *\t\t\t},\n *\t\t\ton: {\n *\t\t\t\t'click': {@link module:ui/template~TemplateListenerSchema}\n *\t\t\t\t'keyup@.some-class': {@link module:ui/template~TemplateListenerSchema},\n *\t\t\t\t...\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// An entire view collection can be used as a child in the definition.\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tchildren: <{@link module:ui/viewcollection~ViewCollection} instance>\n *\t\t} );\n *\n * @typedef module:ui/template~TemplateDefinition\n * @type Object\n * @property {String} tag\n * @property {Array.} [children]\n * @property {Object.} [attributes]\n * @property {String|module:ui/template~TemplateValueSchema|Array.} [text]\n * @property {Object.} [on]\n */\n\n/**\n * Describes a value of HTMLElement attribute or `textContent`. See:\n * * {@link module:ui/template~TemplateDefinition},\n * * {@link module:ui/template~Template.bind},\n *\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\t// Plain String schema.\n *\t\t\t\tclass: 'static-text'\n *\n *\t\t\t\t// Object schema, an `ObservableMixin` binding.\n *\t\t\t\tclass: bind.to( 'foo' )\n *\n *\t\t\t\t// Array schema, combines the above.\n *\t\t\t\tclass: [\n *\t\t\t\t\t'static-text',\n *\t\t\t\t\tbind.to( 'bar', () => { ... } )\n *\t\t\t\t],\n *\n *\t\t\t\t// Array schema, with custom namespace.\n *\t\t\t\tclass: {\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// Object literal 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 * @typedef module:ui/template~TemplateValueSchema\n * @type {Object|String|Array}\n */\n\n/**\n * Describes a listener attached to HTMLElement. See: {@link module:ui/template~TemplateDefinition}.\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\ton: {\n *\t\t\t\t// Plain String schema.\n *\t\t\t\tclick: 'clicked'\n *\n *\t\t\t\t// Object schema, an `ObservableMixin` binding.\n *\t\t\t\tclick: {@link module:ui/template~TemplateBinding}\n *\n *\t\t\t\t// Array schema, combines the above.\n *\t\t\t\tclick: [\n *\t\t\t\t\t'clicked',\n *\t\t\t\t\t{@link module:ui/template~TemplateBinding}\n *\t\t\t\t],\n *\n *\t\t\t\t// Array schema, with custom callback.\n *\t\t\t\t// Note: It will work for \"click\" event on class=\".foo\" children only.\n *\t\t\t\t'click@.foo': {\n *\t\t\t\t\t'clicked',\n *\t\t\t\t\t{@link module:ui/template~TemplateBinding},\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 type of {@link ~Template.bind}'s return value.\n *\n * @interface module:ui/template~BindChain\n */\n\n/**\n * Binds {@link module:utils/observablemixin~ObservableMixin} instance to:\n *\n * * HTMLElement attribute or Text Node `textContent` so remains in sync with the Observable when it changes:\n * * HTMLElement DOM event, so the DOM events are propagated through Observable.\n *\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\t// class=\"...\" attribute gets bound to `observableInstance#a`\n *\t\t\t\t'class': bind.to( 'a' )\n *\t\t\t},\n *\t\t\tchildren: [\n *\t\t\t\t//

...

gets bound to `observableInstance#b`; always `toUpperCase()`.\n *\t\t\t\t{ text: bind.to( 'b', ( value, node ) => value.toUpperCase() ) }\n *\t\t\t],\n *\t\t\ton: {\n *\t\t\t\tclick: [\n *\t\t\t\t\t// \"clicked\" event will be fired on `observableInstance` when \"click\" fires in DOM.\n *\t\t\t\t\tbind.to( 'clicked' ),\n *\n *\t\t\t\t\t// A custom callback function will be executed when \"click\" fires 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 *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t} ).render();\n *\n * @method #to\n * @param {String|Function} eventNameOrFunctionOrAttribute An attribute name of\n * {@link module:utils/observablemixin~ObservableMixin} 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 {@link module:utils/observablemixin~ObservableMixin} to HTMLElement attribute or Text Node `textContent`\n * so remains in sync with the Model when it changes. Unlike {@link module:ui/template~BindChain#to},\n * it controls the presence of the attribute/`textContent` depending on the \"falseness\" of\n * {@link module:utils/observablemixin~ObservableMixin} attribute.\n *\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'input',\n *\t\t\tattributes: {\n *\t\t\t\t// when `observableInstance#a` is not undefined/null/false/''\n *\t\t\t\t// when `observableInstance#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 `observableInstance#b` is undefined/null/false/''\n *\t\t\t\t\t// when `observableInstance#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 * @method #if\n * @param {String} attribute An attribute name of {@link module:utils/observablemixin~ObservableMixin} used in the binding.\n * @param {String} [valueIfTrue] Value set when {@link module:utils/observablemixin~ObservableMixin} attribute is not\n * undefined/null/false/''.\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// WEBPACK FOOTER\n// ../ckeditor5-ui/src/template.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }(); /**\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\nexports._getEmitterListenedTo = _getEmitterListenedTo;\nexports._setEmitterId = _setEmitterId;\nexports._getEmitterId = _getEmitterId;\n\nvar _eventinfo = require('./eventinfo');\n\nvar _eventinfo2 = _interopRequireDefault(_eventinfo);\n\nvar _uid = require('./uid');\n\nvar _uid2 = _interopRequireDefault(_uid);\n\nvar _priorities = require('./priorities');\n\nvar _priorities2 = _interopRequireDefault(_priorities);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar _listeningTo = Symbol('listeningTo');\nvar _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 */\nvar EmitterMixin = {\n\t/**\n * Registers a callback function to be executed when an event is fired. Events can be grouped in namespaces using `:`.\n * When namespaced event is fired, it additionaly fires all callbacks for that namespace.\n *\n *\t\tmyEmitter.on( 'myGroup', genericCallback );\n *\t\tmyEmitter.on( 'myGroup:myEvent', specificCallback );\n *\t\tmyEmitter.fire( 'myGroup' ); // genericCallback is fired.\n *\t\tmyEmitter.fire( 'myGroup:myEvent' ); // both genericCallback and specificCallback are fired.\n *\t\tmyEmitter.fire( 'myGroup:foo' ); // genericCallback is fired even though there are no callbacks for \"foo\".\n *\n * @method #on\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.\n */\n\ton: function on(event, callback) {\n\t\tvar options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n\t\tcreateEventNamespace(this, event);\n\t\tvar lists = getCallbacksListsForNamespace(this, event);\n\t\tvar priority = _priorities2.default.get(options.priority);\n\n\t\tcallback = {\n\t\t\tcallback: callback,\n\t\t\tcontext: options.context || this,\n\t\t\tpriority: priority\n\t\t};\n\n\t\t// Add the callback to all callbacks list.\n\t\tvar _iteratorNormalCompletion = true;\n\t\tvar _didIteratorError = false;\n\t\tvar _iteratorError = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator = lists[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar callbacks = _step.value;\n\n\t\t\t\t// Add the callback to the list in the right priority position.\n\t\t\t\tvar added = false;\n\n\t\t\t\tfor (var i = 0; i < callbacks.length; i++) {\n\t\t\t\t\tif (callbacks[i].priority < priority) {\n\t\t\t\t\t\tcallbacks.splice(i, 0, callback);\n\t\t\t\t\t\tadded = true;\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Add at the end, if right place was not found.\n\t\t\t\tif (!added) {\n\t\t\t\t\tcallbacks.push(callback);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t_iterator.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t/**\n * Registers a callback function to be executed on the next time the event is fired only. This is similar to\n * calling {@link #on} followed by {@link #off} in the callback.\n *\n * @method #once\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.\n */\n\tonce: function once(event, callback, options) {\n\t\tvar onceCallback = function onceCallback(event) {\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.apply(this, arguments);\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\n\t/**\n * Stops executing the callback on the given event.\n *\n * @method #off\n * @param {String} event The name of the event.\n * @param {Function} callback The function to stop being called.\n * @param {Object} [context] The context object to be removed, pared with the given callback. To handle cases where\n * the same callback is used several times with different contexts.\n */\n\toff: function off(event, callback, context) {\n\t\tvar lists = getCallbacksListsForNamespace(this, event);\n\n\t\tvar _iteratorNormalCompletion2 = true;\n\t\tvar _didIteratorError2 = false;\n\t\tvar _iteratorError2 = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator2 = lists[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\tvar callbacks = _step2.value;\n\n\t\t\t\tfor (var i = 0; i < callbacks.length; i++) {\n\t\t\t\t\tif (callbacks[i].callback == callback) {\n\t\t\t\t\t\tif (!context || context == callbacks[i].context) {\n\t\t\t\t\t\t\t// Remove the callback from the list (fixing the next index).\n\t\t\t\t\t\t\tcallbacks.splice(i, 1);\n\t\t\t\t\t\t\ti--;\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} catch (err) {\n\t\t\t_didIteratorError2 = true;\n\t\t\t_iteratorError2 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t_iterator2.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\n\t/**\n * Registers a callback function to be executed when an event is fired in a specific (emitter) object.\n *\n * @method #listenTo\n * @param {module:utils/emittermixin~Emitter} emitter The object that fires the event.\n * @param {String} event The name of the event.\n * @param {Function} callback The function to be called on event.\n * @param {Object} [options={}] Additional options.\n * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n * order they were added.\n * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.\n */\n\tlistenTo: function listenTo(emitter, event, callback, options) {\n\t\tvar emitters = void 0,\n\t\t emitterId = void 0,\n\t\t emitterInfo = void 0,\n\t\t eventCallbacks = void 0;\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\temitters = this[_listeningTo];\n\n\t\tif (!_getEmitterId(emitter)) {\n\t\t\t_setEmitterId(emitter);\n\t\t}\n\n\t\temitterId = _getEmitterId(emitter);\n\n\t\tif (!(emitterInfo = emitters[emitterId])) {\n\t\t\temitterInfo = emitters[emitterId] = {\n\t\t\t\temitter: emitter,\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\n\t/**\n * Stops listening for events. It can be used at different levels:\n *\n * * To stop listening to a specific callback.\n * * To stop listening to a specific event.\n * * To stop listening to all events fired by a specific object.\n * * To stop listening to all events fired by all object.\n *\n * @method #stopListening\n * @param {module:utils/emittermixin~Emitter} [emitter] The object to stop listening to. If omitted, stops it for all objects.\n * @param {String} [event] (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n * for all events from `emitter`.\n * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given\n * `event`.\n */\n\tstopListening: function stopListening(emitter, event, callback) {\n\t\tvar emitters = this[_listeningTo];\n\t\tvar emitterId = emitter && _getEmitterId(emitter);\n\t\tvar emitterInfo = emitters && emitterId && emitters[emitterId];\n\t\tvar 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\t\twhile (callback = eventCallbacks.pop()) {\n\t\t\t\t\temitter.off(event, callback);\n\t\t\t\t}\n\t\t\t\tdelete emitterInfo.callbacks[event];\n\t\t\t}\n\t\t\t// Only `emitter` provided. off() all events for that emitter.\n\t\t\telse if (emitterInfo) {\n\t\t\t\t\tfor (event in emitterInfo.callbacks) {\n\t\t\t\t\t\tthis.stopListening(emitter, event);\n\t\t\t\t\t}\n\t\t\t\t\tdelete emitters[emitterId];\n\t\t\t\t}\n\t\t\t\t// No params provided. off() all emitters.\n\t\t\t\telse {\n\t\t\t\t\t\tfor (emitterId in emitters) {\n\t\t\t\t\t\t\tthis.stopListening(emitters[emitterId].emitter);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete this[_listeningTo];\n\t\t\t\t\t}\n\t},\n\n\n\t/**\n * Fires an event, executing all callbacks registered for it.\n *\n * The first parameter passed to callbacks is an {@link module:utils/eventinfo~EventInfo} object,\n * followed by the optional `args` provided in the `fire()` method call.\n *\n * @method #fire\n * @param {String|module:utils/eventinfo~EventInfo} eventOrInfo The name of the event or `EventInfo` object if event is delegated.\n * @param {...*} [args] Additional arguments to be passed to the callbacks.\n */\n\tfire: function fire(eventOrInfo) {\n\t\tvar eventInfo = eventOrInfo instanceof _eventinfo2.default ? eventOrInfo : new _eventinfo2.default(this, eventOrInfo);\n\t\tvar event = eventInfo.name;\n\t\tvar 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\n\t\tfor (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t\t\targs[_key - 1] = arguments[_key];\n\t\t}\n\n\t\tif (callbacks) {\n\t\t\t// Arguments passed to each callback.\n\t\t\tvar callbackArgs = [eventInfo].concat(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 (var 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\tvar destinations = this._delegations.get(event);\n\t\t\tvar 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\t},\n\n\n\t/**\n * Delegates selected events to another {@link module:utils/emittermixin~Emitter}. For instance:\n *\n *\t\temitterA.delegate( 'eventX' ).to( emitterB );\n *\t\temitterA.delegate( 'eventX', 'eventY' ).to( emitterC );\n *\n * then `eventX` is delegated (fired by) `emitterB` and `emitterC` along with `data`:\n *\n *\t\temitterA.fire( 'eventX', data );\n *\n * and `eventY` is delegated (fired by) `emitterC` along with `data`:\n *\n *\t\temitterA.fire( 'eventY', data );\n *\n * @method #delegate\n * @param {...String} events Event names that will be delegated to another emitter.\n * @returns {module:utils/emittermixin~EmitterMixinDelegateChain}\n */\n\tdelegate: function delegate() {\n\t\tvar _this = this;\n\n\t\tfor (var _len2 = arguments.length, events = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\tevents[_key2] = arguments[_key2];\n\t\t}\n\n\t\treturn {\n\t\t\tto: function to(emitter, nameOrFunction) {\n\t\t\t\tif (!_this._delegations) {\n\t\t\t\t\t_this._delegations = new Map();\n\t\t\t\t}\n\n\t\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\t\tvar _didIteratorError3 = false;\n\t\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator3 = events[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\t\tvar eventName = _step3.value;\n\n\t\t\t\t\t\tvar destinations = _this._delegations.get(eventName);\n\n\t\t\t\t\t\tif (!destinations) {\n\t\t\t\t\t\t\t_this._delegations.set(eventName, new Map([[emitter, nameOrFunction]]));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdestinations.set(emitter, nameOrFunction);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t\t_iteratorError3 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t\t_iterator3.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\t\t\tthrow _iteratorError3;\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};\n\t},\n\n\n\t/**\n * Stops delegating events. It can be used at different levels:\n *\n * * To stop delegating all events.\n * * To stop delegating a specific event to all emitters.\n * * To stop delegating a specific event to a specific emitter.\n *\n * @method #stopDelegating\n * @param {String} [event] The name of the event to stop delegating. If omitted, stops it all delegations.\n * @param {module:utils/emittermixin~Emitter} [emitter] (requires `event`) The object to stop delegating a particular event to.\n * If omitted, stops delegation of `event` to all emitters.\n */\n\tstopDelegating: function stopDelegating(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\tvar 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\nexports.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 */\n\nfunction _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 */\nfunction _setEmitterId(emitter, id) {\n\tif (!emitter[_emitterId]) {\n\t\temitter[_emitterId] = id || (0, _uid2.default)();\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 */\nfunction _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\tvar 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\tvar name = eventName;\n\t// Name of the event that is a child event for currently processed event.\n\tvar childEventName = null;\n\n\t// Array containing all newly created specific events.\n\tvar 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\tvar _iteratorNormalCompletion4 = true;\n\t\tvar _didIteratorError4 = false;\n\t\tvar _iteratorError4 = undefined;\n\n\t\ttry {\n\t\t\tfor (var _iterator4 = newEventNodes[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n\t\t\t\tvar node = _step4.value;\n\n\t\t\t\tnode.callbacks = events[name].callbacks.slice();\n\t\t\t}\n\n\t\t\t// Add last newly created event to the already registered event.\n\t\t} catch (err) {\n\t\t\t_didIteratorError4 = true;\n\t\t\t_iteratorError4 = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion4 && _iterator4.return) {\n\t\t\t\t\t_iterator4.return();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError4) {\n\t\t\t\t\tthrow _iteratorError4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\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\tvar eventNode = getEvents(source)[eventName];\n\n\tif (!eventNode) {\n\t\treturn [];\n\t}\n\n\tvar callbacksLists = [eventNode.callbacks];\n\n\tfor (var i = 0; i < eventNode.childEvents.length; i++) {\n\t\tvar 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\tvar event = void 0;\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\tvar _iteratorNormalCompletion5 = true;\n\tvar _didIteratorError5 = false;\n\tvar _iteratorError5 = undefined;\n\n\ttry {\n\t\tfor (var _iterator5 = destinations[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n\t\t\tvar _step5$value = _slicedToArray(_step5.value, 2),\n\t\t\t emitter = _step5$value[0],\n\t\t\t name = _step5$value[1];\n\n\t\t\tif (!name) {\n\t\t\t\tname = eventInfo.name;\n\t\t\t} else if (typeof name == 'function') {\n\t\t\t\tname = name(eventInfo.name);\n\t\t\t}\n\n\t\t\tvar delegatedInfo = new _eventinfo2.default(eventInfo.source, name);\n\n\t\t\tdelegatedInfo.path = [].concat(_toConsumableArray(eventInfo.path));\n\n\t\t\temitter.fire.apply(emitter, [delegatedInfo].concat(_toConsumableArray(fireArgs)));\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError5 = true;\n\t\t_iteratorError5 = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion5 && _iterator5.return) {\n\t\t\t\t_iterator5.return();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (_didIteratorError5) {\n\t\t\t\tthrow _iteratorError5;\n\t\t\t}\n\t\t}\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// WEBPACK FOOTER\n// ../ckeditor5-utils/src/emittermixin.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _apply = require('./_apply');\n\nvar _apply2 = _interopRequireDefault(_apply);\n\nvar _toInteger = require('./toInteger');\n\nvar _toInteger2 = _interopRequireDefault(_toInteger);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 : (0, _toInteger2.default)(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:\n return func.call(this, array);\n case 1:\n return func.call(this, args[0], array);\n case 2:\n 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 (0, _apply2.default)(func, this, otherArgs);\n };\n}\n\nexports.default = rest;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/rest.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _viewcollection = require('./viewcollection');\n\nvar _viewcollection2 = _interopRequireDefault(_viewcollection);\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _emittermixin = require('@ckeditor/ckeditor5-utils/src/dom/emittermixin');\n\nvar _emittermixin2 = _interopRequireDefault(_emittermixin);\n\nvar _observablemixin = require('@ckeditor/ckeditor5-utils/src/observablemixin');\n\nvar _observablemixin2 = _interopRequireDefault(_observablemixin);\n\nvar _collection = require('@ckeditor/ckeditor5-utils/src/collection');\n\nvar _collection2 = _interopRequireDefault(_collection);\n\nvar _mix = require('@ckeditor/ckeditor5-utils/src/mix');\n\nvar _mix2 = _interopRequireDefault(_mix);\n\nvar _isiterable = require('@ckeditor/ckeditor5-utils/src/isiterable');\n\nvar _isiterable2 = _interopRequireDefault(_isiterable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Basic View class.\n *\n *\t\tclass SampleView extends View {\n *\t\t\tconstructor( locale ) {\n *\t\t\t\tsuper( locale );\n *\n *\t\t\t\tthis.template = new Template( {\n *\t\t\t\t\ttag: 'p',\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: [\n *\t\t\t\t\t\t\t\t'world!'\n *\t\t\t\t\t\t\t]\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: 'foo'\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\tview.init().then( () => {\n *\t\t\t// Will append

Helloworld

\n *\t\t\tdocument.body.appendChild( view.element );\n *\t\t} );\n *\n * @mixes module:utils/dom/emittermixin~EmmiterMixin\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nvar View = function () {\n\t/**\n * Creates an instance of the {@link module:ui/view~View} class.\n *\n * @param {module:utils/locale~Locale} [locale] The {@link module:core/editor/editor~Editor editor's locale} instance.\n */\n\tfunction View(locale) {\n\t\t_classCallCheck(this, View);\n\n\t\t/**\n * A set of tools to localize the user interface. See {@link module:core/editor/editor~Editor}.\n *\n * @readonly\n * @member {module:utils/locale~Locale}\n */\n\t\tthis.locale = locale;\n\n\t\t/**\n * Shorthand for {@link module:utils/locale~Locale#t}.\n *\n * Note: If locale instance hasn't been passed to the view this method may not be available.\n *\n * @see module:utils/locale~Locale#t\n * @method\n */\n\t\tthis.t = locale && locale.t;\n\n\t\t/**\n * Set `true` after {@link #init}, which can be asynchronous.\n *\n * @readonly\n * @observable\n * @member {Boolean} #ready\n */\n\t\tthis.set('ready', false);\n\n\t\t/**\n * Collections registered with {@link #createCollection}.\n *\n * @protected\n * @member {Set.}\n */\n\t\tthis._viewCollections = new _collection2.default();\n\n\t\t/**\n * A collection of view instances, which have been added directly\n * into the {@link module:ui/template~Template#children}.\n *\n * @protected\n * @member {module:ui/viewcollection~ViewCollection}\n */\n\t\tthis._unboundChildren = this.createCollection();\n\n\t\t// Pass parent locale to its children.\n\t\tthis._viewCollections.on('add', function (evt, collection) {\n\t\t\tcollection.locale = locale;\n\t\t});\n\n\t\t/**\n * Template of this view.\n *\n * @member {module:ui/template~Template} #template\n */\n\n\t\t/**\n * Element of this view.\n *\n * @private\n * @member {HTMLElement} #_element\n */\n\n\t\t/**\n * Cached {@link module:ui/template~Template} binder object specific for this instance.\n * See {@link #bindTemplate}.\n *\n * @private\n * @member {Object} #_bindTemplate\n */\n\t}\n\n\t/**\n * Element of this view. The element is rendered on first reference\n * using {@link #template} definition.\n *\n * @type {HTMLElement}\n */\n\n\n\t_createClass(View, [{\n\t\tkey: 'createCollection',\n\n\n\t\t/**\n * Creates a new collection of views, which can be used in this view instance,\n * e.g. as a member of {@link module:ui/template~TemplateDefinition TemplateDefinition} children.\n *\n *\t\tclass SampleView extends View {\n *\t\t\tconstructor( locale ) {\n *\t\t\t\tsuper( locale );\n *\n *\t\t\t\tthis.items = this.createCollection();\n \t *\n *\t\t\t\tthis.template = new Template( {\n *\t\t\t\t\ttag: 'p',\n *\n *\t\t\t\t\t// `items` collection will render here.\n *\t\t\t\t\tchildren: this.items\n *\t\t\t\t} );\n *\t\t\t}\n *\t\t}\n *\n *\t\tconst view = new SampleView( locale );\n *\t\tconst anotherView = new AnotherSampleView( locale );\n *\n *\t\tview.init().then( () => {\n *\t\t\t// Will append

\n *\t\t\tdocument.body.appendChild( view.element );\n *\n *\t\t\t// `anotherView` becomes a child of the view, which is reflected in DOM\n *\t\t\t//

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

\n *\t\t\tdocument.body.appendChild( view.element );\n *\t\t} );\n *\n * **Note**: There's no need to add child views if they're used in the\n * {@link #template} explicitly:\n *\n *\t\tclass SampleView extends View {\n *\t\t\tconstructor( locale ) {\n *\t\t\t\tsuper( locale );\n *\n *\t\t\t\tthis.childA = new SomeChildView( locale );\n *\t\t\t\tthis.childB = new SomeChildView( locale );\n *\n *\t\t\t\tthis.template = new Template( {\n *\t\t\t\t\ttag: 'p',\n *\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\tchildren: [ this.childA, this.childB ]\n *\t\t\t\t} );\n *\t\t\t}\n *\n *\t\t\t...\n *\t\t}\n *\n * @param {module:ui/view~View|Iterable.} children Children views to be registered.\n */\n\n\t}, {\n\t\tkey: 'addChildren',\n\t\tvalue: function addChildren(children) {\n\t\t\tif (!(0, _isiterable2.default)(children)) {\n\t\t\t\tchildren = [children];\n\t\t\t}\n\n\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\tvar _didIteratorError = false;\n\t\t\tvar _iteratorError = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar child = _step.value;\n\n\t\t\t\t\tthis._unboundChildren.add(child);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Initializes the view and child views located in {@link #_viewCollections}.\n *\n * @returns {Promise} A Promise resolved when the initialization process is finished.\n */\n\n\t}, {\n\t\tkey: 'init',\n\t\tvalue: function init() {\n\t\t\tvar _this = this;\n\n\t\t\tif (this.ready) {\n\t\t\t\t/**\n * This View has already been initialized.\n *\n * @error ui-view-init-reinit\n */\n\t\t\t\tthrow new _ckeditorerror2.default('ui-view-init-reinit: This View has already been initialized.');\n\t\t\t}\n\n\t\t\treturn Promise.resolve()\n\t\t\t// Initialize collections in #_viewCollections.\n\t\t\t.then(function () {\n\t\t\t\treturn Promise.all(_this._viewCollections.map(function (c) {\n\t\t\t\t\treturn c.init();\n\t\t\t\t}));\n\t\t\t})\n\t\t\t// Spread the word that this view is ready!\n\t\t\t.then(function () {\n\t\t\t\t_this.ready = true;\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Destroys the view instance and child views located in {@link #_viewCollections}.\n *\n * @returns {Promise} A Promise resolved when the destruction process is finished.\n */\n\n\t}, {\n\t\tkey: 'destroy',\n\t\tvalue: function destroy() {\n\t\t\tthis.stopListening();\n\n\t\t\tvar promises = this._viewCollections.map(function (c) {\n\t\t\t\treturn c.destroy();\n\t\t\t});\n\n\t\t\tthis._unboundChildren.clear();\n\t\t\tthis._viewCollections.clear();\n\n\t\t\tthis.element = this.template = this.locale = this.t = this._viewCollections = this._unboundChildren = null;\n\n\t\t\treturn Promise.all(promises);\n\t\t}\n\n\t\t/**\n * Recursively traverses {@link #template} in search of {@link module:ui/view~View}\n * instances and automatically registers them using {@link #addChildren} method.\n *\n * @protected\n */\n\n\t}, {\n\t\tkey: '_addTemplateChildren',\n\t\tvalue: function _addTemplateChildren() {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar search = function search(def) {\n\t\t\t\tif (def.children) {\n\t\t\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\t\t\tvar _didIteratorError2 = false;\n\t\t\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator2 = def.children[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\t\t\tvar defOrView = _step2.value;\n\n\t\t\t\t\t\t\tif (defOrView instanceof View) {\n\t\t\t\t\t\t\t\t_this2.addChildren(defOrView);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsearch(defOrView);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t_iteratorError2 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tsearch(this.template);\n\t\t}\n\t}, {\n\t\tkey: 'element',\n\t\tget: function get() {\n\t\t\tif (this._element) {\n\t\t\t\treturn this._element;\n\t\t\t}\n\n\t\t\t// No template means no element (a virtual view).\n\t\t\tif (!this.template) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tthis._addTemplateChildren();\n\n\t\t\treturn this._element = this.template.render();\n\t\t}\n\n\t\t/**\n * @type {HTMLElement}\n */\n\t\t,\n\t\tset: function set(el) {\n\t\t\tthis._element = el;\n\t\t}\n\n\t\t/**\n * Shorthand for {@link module:ui/template~Template.bind}, bound to {@link ~View} on the first access.\n *\n * Cached {@link module:ui/template~Template.bind} object is stored in {@link #_bindTemplate}.\n *\n * @method #bindTemplate\n */\n\n\t}, {\n\t\tkey: 'bindTemplate',\n\t\tget: function get() {\n\t\t\tif (this._bindTemplate) {\n\t\t\t\treturn this._bindTemplate;\n\t\t\t}\n\n\t\t\treturn this._bindTemplate = _template2.default.bind(this, this);\n\t\t}\n\t}]);\n\n\treturn View;\n}();\n\nexports.default = View;\n\n\n(0, _mix2.default)(View, _emittermixin2.default);\n(0, _mix2.default)(View, _observablemixin2.default);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-ui/src/view.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _baseMatches = require('./_baseMatches');\n\nvar _baseMatches2 = _interopRequireDefault(_baseMatches);\n\nvar _baseMatchesProperty = require('./_baseMatchesProperty');\n\nvar _baseMatchesProperty2 = _interopRequireDefault(_baseMatchesProperty);\n\nvar _identity = require('./identity');\n\nvar _identity2 = _interopRequireDefault(_identity);\n\nvar _isArray = require('./isArray');\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _property = require('./property');\n\nvar _property2 = _interopRequireDefault(_property);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 _identity2.default;\n }\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object') {\n return (0, _isArray2.default)(value) ? (0, _baseMatchesProperty2.default)(value[0], value[1]) : (0, _baseMatches2.default)(value);\n }\n return (0, _property2.default)(value);\n}\n\nexports.default = baseIteratee;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_baseIteratee.js\n// module id = 10\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\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\nexports.default = isArray;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isArray.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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/command\n */\n\nvar _observablemixin = require('@ckeditor/ckeditor5-utils/src/observablemixin');\n\nvar _observablemixin2 = _interopRequireDefault(_observablemixin);\n\nvar _mix = require('@ckeditor/ckeditor5-utils/src/mix');\n\nvar _mix2 = _interopRequireDefault(_mix);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * The base class for CKEditor commands.\n *\n * Commands are main way to manipulate editor contents and state. They are mostly used by UI elements (or by other\n * commands) to make changes in Tree Model. Commands are available in every part of code that has access to\n * {@link module:core/editor/editor~Editor} instance, since they are registered in it and executed through\n * {@link module:core/editor/editor~Editor#execute}.\n * Commands instances are available through {@link module:core/editor/editor~Editor#commands}.\n *\n * This is an abstract base class for all commands.\n *\n * @mixes module:utils/observablemixin~ObservaleMixin\n */\nvar Command = function () {\n\t/**\n * Creates a new Command instance.\n *\n * @param {module:core/editor/editor~Editor} editor Editor on which this command will be used.\n */\n\tfunction Command(editor) {\n\t\tvar _this = this;\n\n\t\t_classCallCheck(this, Command);\n\n\t\t/**\n * Editor on which this command will be used.\n *\n * @readonly\n * @member {module:core/editor/editor~Editor} #editor\n */\n\t\tthis.editor = editor;\n\n\t\t/**\n * Flag indicating whether a command is enabled or disabled.\n * A disabled command should do nothing upon it's execution.\n *\n * @observable\n * @member {Boolean} #isEnabled\n */\n\t\tthis.set('isEnabled', true);\n\n\t\t// If schema checking function is specified, add it to the `refreshState` listeners.\n\t\t// Feature will be disabled if it does not apply to schema requirements.\n\t\tif (this._checkEnabled) {\n\t\t\tthis.on('refreshState', function (evt, data) {\n\t\t\t\tdata.isEnabled = _this._checkEnabled();\n\t\t\t});\n\t\t}\n\t}\n\n\t_createClass(Command, [{\n\t\tkey: 'destroy',\n\t\tvalue: function destroy() {\n\t\t\tthis.stopListening();\n\t\t}\n\n\t\t/**\n * Fires `refreshState` event and checks it's resolve value to decide whether command should be enabled or not.\n * Other parts of code might listen to `refreshState` event on this command and add their callbacks. This\n * way the responsibility of deciding whether a command should be enabled is shared.\n *\n * @fires refreshState\n */\n\n\t}, {\n\t\tkey: 'refreshState',\n\t\tvalue: function refreshState() {\n\t\t\tvar data = { isEnabled: true };\n\t\t\tthis.fire('refreshState', data);\n\n\t\t\tthis.isEnabled = data.isEnabled;\n\t\t}\n\n\t\t/**\n * Executes the command if it is enabled.\n *\n * @protected\n * @param {*} param Parameter passed to {@link module:core/editor/editor~Editor#execute execute} method of this command.\n */\n\n\t}, {\n\t\tkey: '_execute',\n\t\tvalue: function _execute(param) {\n\t\t\tif (this.isEnabled) {\n\t\t\t\tthis._doExecute(param);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Disables the command. This should be used only by the command itself. Other parts of code should add\n * listeners to `refreshState` event.\n *\n * @protected\n */\n\n\t}, {\n\t\tkey: '_disable',\n\t\tvalue: function _disable() {\n\t\t\tthis.on('refreshState', disableCallback);\n\t\t\tthis.refreshState();\n\t\t}\n\n\t\t/**\n * Enables the command (internally). This should be used only by the command itself. Command will be enabled if\n * other listeners does not return false on `refreshState` event callbacks. Firing {@link #_enable}\n * does not guarantee that {@link #isEnabled} will be set to true, as it depends on other listeners.\n *\n * @protected\n */\n\n\t}, {\n\t\tkey: '_enable',\n\t\tvalue: function _enable() {\n\t\t\tthis.off('refreshState', disableCallback);\n\t\t\tthis.refreshState();\n\t\t}\n\n\t\t/**\n * Executes command.\n * This is an abstract method that should be overwritten in child classes.\n *\n * @protected\n */\n\n\t}, {\n\t\tkey: '_doExecute',\n\t\tvalue: function _doExecute() {}\n\n\t\t/**\n * Checks if a command should be enabled according to its own rules. Mostly it will check schema to see if the command\n * is allowed to be executed in given position. This method can be defined in child class (but is not obligatory).\n * If it is defined, it will be added as a callback to `refreshState` event.\n *\n * @protected\n * @method #_checkEnabled\n * @returns {Boolean} `true` if command should be enabled according to\n * {@link module:engine/model/document~Document#schema}. `false` otherwise.\n */\n\n\t}]);\n\n\treturn Command;\n}();\n\nexports.default = Command;\n\n\nfunction disableCallback(evt, data) {\n\tdata.isEnabled = false;\n}\n\n(0, _mix2.default)(Command, _observablemixin2.default);\n\n/**\n * Fired whenever command has to have its {@link #isEnabled} property refreshed. Every feature,\n * command or other class which needs to disable command (set `isEnabled` to `false`) should listen to this\n * event.\n *\n * @event refreshState\n * @param {Object} data\n * @param {Boolean} [data.isEnabled=true]\n */\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-core/src/command/command.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _isArrayLike = require('./isArrayLike');\n\nvar _isArrayLike2 = _interopRequireDefault(_isArrayLike);\n\nvar _isObjectLike = require('./isObjectLike');\n\nvar _isObjectLike2 = _interopRequireDefault(_isObjectLike);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 (0, _isObjectLike2.default)(value) && (0, _isArrayLike2.default)(value);\n}\n\nexports.default = isArrayLikeObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\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 === 'undefined' ? 'undefined' : _typeof(value);\n return !!value && (type == 'object' || type == 'function');\n}\n\nexports.default = isObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isObject.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _toFinite = require('./toFinite');\n\nvar _toFinite2 = _interopRequireDefault(_toFinite);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 = (0, _toFinite2.default)(value),\n remainder = result % 1;\n\n return result === result ? remainder ? result - remainder : result : 0;\n}\n\nexports.default = toInteger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/toInteger.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nexports.register = register;\n\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\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 */\nvar Batch = function () {\n\t/**\n * Creates `Batch` instance. Not recommended to use directly, use {@link module:engine/model/document~Document#batch} instead.\n *\n * @param {module:engine/model/document~Document} document Document which this Batch changes.\n * @param {'transparent'|'default'} [type='default'] Type of the batch.\n */\n\tfunction Batch(document) {\n\t\tvar type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';\n\n\t\t_classCallCheck(this, Batch);\n\n\t\t/**\n * Document which this batch changes.\n *\n * @readonly\n * @member {module:engine/model/document~Document} module:engine/model/batch~Batch#document\n */\n\t\tthis.document = document;\n\n\t\t/**\n * Array of deltas which compose this batch.\n *\n * @readonly\n * @member {Array.} module:engine/model/batch~Batch#deltas\n */\n\t\tthis.deltas = [];\n\n\t\t/**\n * Type of the batch.\n *\n * Can be one of the following values:\n * * `'default'` - all \"normal\" batches, most commonly used type.\n * * `'transparent'` - batch that should be ignored by other features, i.e. initial batch or collaborative editing changes.\n *\n * @readonly\n * @member {'transparent'|'default'} module:engine/model/batch~Batch#type\n */\n\t\tthis.type = type;\n\t}\n\n\t/**\n * Returns this batch base version, which is equal to the base version of first delta in the batch.\n * If there are no deltas in the batch, it returns `null`.\n *\n * @readonly\n * @type {Number|null}\n */\n\n\n\t_createClass(Batch, [{\n\t\tkey: 'addDelta',\n\n\n\t\t/**\n * Adds delta to the batch instance. All modification methods (insert, remove, split, etc.) use this method\n * to add created deltas.\n *\n * @param {module:engine/model/delta/delta~Delta} delta Delta to add.\n * @return {module:engine/model/delta/delta~Delta} Added delta.\n */\n\t\tvalue: function addDelta(delta) {\n\t\t\tdelta.batch = this;\n\t\t\tthis.deltas.push(delta);\n\n\t\t\treturn delta;\n\t\t}\n\n\t\t/**\n * Gets an iterable collection of operations.\n *\n * @returns {Iterable.}\n */\n\n\t}, {\n\t\tkey: 'getOperations',\n\t\tvalue: regeneratorRuntime.mark(function getOperations() {\n\t\t\tvar _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, delta;\n\n\t\t\treturn regeneratorRuntime.wrap(function getOperations$(_context) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context.prev = _context.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t_iteratorNormalCompletion = true;\n\t\t\t\t\t\t\t_didIteratorError = false;\n\t\t\t\t\t\t\t_iteratorError = undefined;\n\t\t\t\t\t\t\t_context.prev = 3;\n\t\t\t\t\t\t\t_iterator = this.deltas[Symbol.iterator]();\n\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\tif (_iteratorNormalCompletion = (_step = _iterator.next()).done) {\n\t\t\t\t\t\t\t\t_context.next = 11;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdelta = _step.value;\n\t\t\t\t\t\t\treturn _context.delegateYield(delta.operations, 't0', 8);\n\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\t_iteratorNormalCompletion = true;\n\t\t\t\t\t\t\t_context.next = 5;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\t_context.next = 17;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\t_context.prev = 13;\n\t\t\t\t\t\t\t_context.t1 = _context['catch'](3);\n\t\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t\t_iteratorError = _context.t1;\n\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\t_context.prev = 17;\n\t\t\t\t\t\t\t_context.prev = 18;\n\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 20:\n\t\t\t\t\t\t\t_context.prev = 20;\n\n\t\t\t\t\t\t\tif (!_didIteratorError) {\n\t\t\t\t\t\t\t\t_context.next = 23;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow _iteratorError;\n\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn _context.finish(20);\n\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\treturn _context.finish(17);\n\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getOperations, this, [[3, 13, 17, 25], [18,, 20, 24]]);\n\t\t})\n\t}, {\n\t\tkey: 'baseVersion',\n\t\tget: function get() {\n\t\t\treturn this.deltas.length > 0 ? this.deltas[0].baseVersion : null;\n\t\t}\n\t}]);\n\n\treturn Batch;\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 */\n\n\nexports.default = Batch;\nfunction register(name, creator) {\n\tif (Batch.prototype[name]) {\n\t\t/**\n * This batch method name is already taken.\n *\n * @error batch-register-taken\n * @param {String} name\n */\n\t\tthrow new _ckeditorerror2.default('model-batch-register-taken: This batch method name is already taken.', { name: name });\n\t}\n\n\tBatch.prototype[name] = creator;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/batch.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _operationfactory = require('../operation/operationfactory');\n\nvar _operationfactory2 = _interopRequireDefault(_operationfactory);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar 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 */\n\nvar DeltaFactory = function () {\n\tfunction DeltaFactory() {\n\t\t_classCallCheck(this, DeltaFactory);\n\t}\n\n\t_createClass(DeltaFactory, null, [{\n\t\tkey: 'fromJSON',\n\n\t\t/**\n * Creates InsertDelta from deserialized object, i.e. from parsed JSON string.\n *\n * @param {Object} json\n * @param {module:engine/model/document~Document} doc Document on which this delta will be applied.\n * @returns {module:engine/model/delta/insertdelta~InsertDelta}\n */\n\t\tvalue: function fromJSON(json, doc) {\n\t\t\tif (!deserializers.has(json.__className)) {\n\t\t\t\t/**\n * This delta has no defined deserializer.\n *\n * @error delta-fromjson-no-deserializer\n * @param {String} name\n */\n\t\t\t\tthrow new _ckeditorerror2.default('delta-fromjson-no-deserializer: This delta has no defined deserializer', { name: json.__className });\n\t\t\t}\n\n\t\t\tvar Delta = deserializers.get(json.__className);\n\n\t\t\tvar delta = new Delta();\n\n\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\tvar _didIteratorError = false;\n\t\t\tvar _iteratorError = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = json.operations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar operation = _step.value;\n\n\t\t\t\t\tdelta.addOperation(_operationfactory2.default.fromJSON(operation, doc));\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn delta;\n\t\t}\n\n\t\t/**\n * Registers a class for delta factory.\n *\n * @param {Function} Delta A delta class to register.\n */\n\n\t}, {\n\t\tkey: 'register',\n\t\tvalue: function register(Delta) {\n\t\t\tdeserializers.set(Delta.className, Delta);\n\t\t}\n\t}]);\n\n\treturn DeltaFactory;\n}();\n\nexports.default = DeltaFactory;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/delta/deltafactory.js\n// module id = 17\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\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\nexports.default = last;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/last.js\n// module id = 18\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _clone = require('@ckeditor/ckeditor5-utils/src/lib/lodash/clone');\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nvar _deltafactory = require('./deltafactory');\n\nvar _deltafactory2 = _interopRequireDefault(_deltafactory);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\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 */\nvar Delta = function () {\n\t/**\n * Creates a delta instance.\n */\n\tfunction Delta() {\n\t\t_classCallCheck(this, Delta);\n\n\t\t/**\n * {@link module:engine/model/batch~Batch} which delta is a part of. This property is null by default and set by the\n * {@link module:engine/model/batch~Batch#addDelta} method.\n *\n * @readonly\n * @member {module:engine/model/batch~Batch} module:engine/model/delta/delta~Delta#batch\n */\n\t\tthis.batch = null;\n\n\t\t/**\n * Array of operations which compose delta.\n *\n * @readonly\n * @member {module:engine/model/operation/operation~Operation[]} module:engine/model/delta/delta~Delta#operations\n */\n\t\tthis.operations = [];\n\t}\n\n\t/**\n * Returns delta base version which is equal to the base version of the first operation in delta. If there\n * are no operations in delta, returns `null`.\n *\n * @see module:engine/model/document~Document\n * @type {Number|null}\n */\n\n\n\t_createClass(Delta, [{\n\t\tkey: 'addOperation',\n\n\n\t\t/**\n * Delta type.\n *\n * @readonly\n * @member {String} #type\n */\n\n\t\t/**\n * Add operation to the delta.\n *\n * @param {module:engine/model/operation/operation~Operation} operation Operation instance.\n */\n\t\tvalue: function addOperation(operation) {\n\t\t\toperation.delta = this;\n\t\t\tthis.operations.push(operation);\n\n\t\t\treturn operation;\n\t\t}\n\n\t\t/**\n * Creates and returns a delta that has the same parameters as this delta.\n *\n * @returns {module:engine/model/delta/delta~Delta} Clone of this delta.\n */\n\n\t}, {\n\t\tkey: 'clone',\n\t\tvalue: function clone() {\n\t\t\tvar delta = new this.constructor();\n\n\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\tvar _didIteratorError = false;\n\t\t\tvar _iteratorError = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = this.operations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar op = _step.value;\n\n\t\t\t\t\tdelta.addOperation(op.clone());\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn delta;\n\t\t}\n\n\t\t/**\n * Creates and returns a reverse delta. Reverse delta when executed right after the original delta will bring back\n * tree model state to the point before the original delta execution. In other words, it reverses changes done\n * by the original delta.\n *\n * Keep in mind that tree model state may change since executing the original delta, so reverse delta may be \"outdated\".\n * In that case you will need to {@link module:engine/model/delta/transform~transform} it by all deltas that were executed after\n * the original delta.\n *\n * @returns {module:engine/model/delta/delta~Delta} Reversed delta.\n */\n\n\t}, {\n\t\tkey: 'getReversed',\n\t\tvalue: function getReversed() {\n\t\t\tvar delta = new this._reverseDeltaClass();\n\n\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\tvar _didIteratorError2 = false;\n\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator2 = this.operations[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\tvar op = _step2.value;\n\n\t\t\t\t\tdelta.addOperation(op.getReversed());\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t_iteratorError2 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdelta.operations.reverse();\n\n\t\t\tfor (var i = 0; i < delta.operations.length; i++) {\n\t\t\t\tdelta.operations[i].baseVersion = this.operations[this.operations.length - 1].baseVersion + i + 1;\n\t\t\t}\n\n\t\t\treturn delta;\n\t\t}\n\n\t\t/**\n * Custom toJSON method to make deltas serializable.\n *\n * @returns {Object} Clone of this delta with added class name.\n */\n\n\t}, {\n\t\tkey: 'toJSON',\n\t\tvalue: function toJSON() {\n\t\t\tvar json = (0, _clone2.default)(this);\n\n\t\t\tjson.__className = this.constructor.className;\n\n\t\t\t// Remove parent batch to avoid circular dependencies.\n\t\t\tdelete json.batch;\n\n\t\t\treturn json;\n\t\t}\n\n\t\t/**\n * Delta class name. Used by {@link #toJSON} method for serialization and\n * {@link module:engine/model/delta/deltafactory~DeltaFactory.fromJSON} during deserialization.\n *\n * @type {String}\n * @readonly\n */\n\n\t}, {\n\t\tkey: 'baseVersion',\n\t\tget: function get() {\n\t\t\tif (this.operations.length > 0) {\n\t\t\t\treturn this.operations[0].baseVersion;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n * @param {Number} baseVersion\n */\n\t\t,\n\t\tset: function set(baseVersion) {\n\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\tvar _didIteratorError3 = false;\n\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator3 = this.operations[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\tvar operation = _step3.value;\n\n\t\t\t\t\toperation.baseVersion = baseVersion++;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t_iteratorError3 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t_iterator3.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\t\tthrow _iteratorError3;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * A class that will be used when creating reversed delta.\n *\n * @private\n * @type {Function}\n */\n\n\t}, {\n\t\tkey: '_reverseDeltaClass',\n\t\tget: function get() {\n\t\t\treturn Delta;\n\t\t}\n\t}], [{\n\t\tkey: 'className',\n\t\tget: function get() {\n\t\t\treturn 'engine.model.delta.Delta';\n\t\t}\n\n\t\t/**\n * Delta priority. Used in {@link module:engine/model/delta/transform~transform delta transformations}. Delta with the higher\n * priority will be treated as more important when resolving transformation conflicts. If deltas have same\n * priority, other factors will be used to determine which delta is more important.\n *\n * @private\n * @type {Number}\n */\n\n\t}, {\n\t\tkey: '_priority',\n\t\tget: function get() {\n\t\t\treturn 0;\n\t\t}\n\t}]);\n\n\treturn Delta;\n}();\n\nexports.default = Delta;\n\n\n_deltafactory2.default.register(Delta);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/delta/delta.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _node = require('./node');\n\nvar _node2 = _interopRequireDefault(_node);\n\nvar _text = require('./text');\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _objecttomap = require('@ckeditor/ckeditor5-utils/src/objecttomap');\n\nvar _objecttomap2 = _interopRequireDefault(_objecttomap);\n\nvar _isiterable = require('@ckeditor/ckeditor5-utils/src/isiterable');\n\nvar _isiterable2 = _interopRequireDefault(_isiterable);\n\nvar _isPlainObject = require('@ckeditor/ckeditor5-utils/src/lib/lodash/isPlainObject');\n\nvar _isPlainObject2 = _interopRequireDefault(_isPlainObject);\n\nvar _matcher = require('./matcher');\n\nvar _matcher2 = _interopRequireDefault(_matcher);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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\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 */\nvar Element = function (_Node) {\n\t_inherits(Element, _Node);\n\n\t/**\n * Creates a view element.\n *\n * Attributes can be passed in various formats:\n *\n *\t\tnew Element( 'div', { 'class': 'editor', 'contentEditable': 'true' } ); // object\n *\t\tnew Element( 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n *\t\tnew Element( 'div', mapOfAttributes ); // map\n *\n * @param {String} name Node name.\n * @param {Object|Iterable} [attrs] Collection of attributes.\n * @param {module:engine/view/node~Node|Iterable.} [children]\n * List of nodes to be inserted into created element.\n */\n\tfunction Element(name, attrs, children) {\n\t\t_classCallCheck(this, Element);\n\n\t\t/**\n * Name of the element.\n *\n * @readonly\n * @member {String}\n */\n\t\tvar _this = _possibleConstructorReturn(this, (Element.__proto__ || Object.getPrototypeOf(Element)).call(this));\n\n\t\t_this.name = name;\n\n\t\t/**\n * Map of attributes, where attributes names are keys and attributes values are values.\n *\n * @protected\n * @member {Map} #_attrs\n */\n\t\tif ((0, _isPlainObject2.default)(attrs)) {\n\t\t\t_this._attrs = (0, _objecttomap2.default)(attrs);\n\t\t} else {\n\t\t\t_this._attrs = new Map(attrs);\n\t\t}\n\n\t\t/**\n * Array of child nodes.\n *\n * @protected\n * @member {Array.}\n */\n\t\t_this._children = [];\n\n\t\tif (children) {\n\t\t\t_this.insertChildren(0, children);\n\t\t}\n\n\t\t/**\n * Set of classes associated with element instance.\n *\n * @protected\n * @member {Set}\n */\n\t\t_this._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\tvar classString = _this._attrs.get('class');\n\t\t\tparseClasses(_this._classes, classString);\n\t\t\t_this._attrs.delete('class');\n\t\t}\n\n\t\t/**\n * Map of styles.\n *\n * @protected\n * @member {Set} module:engine/view/element~Element#_styles\n */\n\t\t_this._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\t_this._attrs.delete('style');\n\t\t}\n\n\t\t/**\n * Map of custom properties.\n * Custom properties can be added to element instance, will be cloned but not rendered into DOM.\n *\n * @protected\n * @memeber {Map}\n */\n\t\t_this._customProperties = new Map();\n\t\treturn _this;\n\t}\n\n\t/**\n * Number of element's children.\n *\n * @readonly\n * @type {Number}\n */\n\n\n\t_createClass(Element, [{\n\t\tkey: 'is',\n\n\n\t\t/**\n * Checks whether given view tree object is of given type.\n *\n * Read more in {@link module:engine/view/node~Node#is}.\n *\n * @param {String} type\n * @param {String} [name] Element name.\n * @returns {Boolean}\n */\n\t\tvalue: function is(type) {\n\t\t\tvar name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n\t\t\tif (!name) {\n\t\t\t\treturn type == 'element' || type == this.name;\n\t\t\t} else {\n\t\t\t\treturn type == 'element' && name == this.name;\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Clones provided element.\n *\n * @param {Boolean} deep If set to `true` clones element and all its children recursively. When set to `false`,\n * element will be cloned without any children.\n * @returns {module:engine/view/element~Element} Clone of this element.\n */\n\n\t}, {\n\t\tkey: 'clone',\n\t\tvalue: function clone(deep) {\n\t\t\tvar childrenClone = [];\n\n\t\t\tif (deep) {\n\t\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\t\tvar _didIteratorError = false;\n\t\t\t\tvar _iteratorError = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = this.getChildren()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar child = _step.value;\n\n\t\t\t\t\t\tchildrenClone.push(child.clone(deep));\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ContainerElement and AttributeElement should be also cloned properly.\n\t\t\tvar cloned = new this.constructor(this.name, this._attrs, childrenClone);\n\n\t\t\t// Classes and styles are cloned separately - this solution is faster than adding them back to attributes and\n\t\t\t// parse once again in constructor.\n\t\t\tcloned._classes = new Set(this._classes);\n\t\t\tcloned._styles = new Map(this._styles);\n\n\t\t\t// Clone custom properties.\n\t\t\tcloned._customProperties = new Map(this._customProperties);\n\n\t\t\t// Clone filler offset method.\n\t\t\tcloned.getFillerOffset = this.getFillerOffset;\n\n\t\t\treturn cloned;\n\t\t}\n\n\t\t/**\n * {@link module:engine/view/element~Element#insertChildren Insert} a child node or a list of child nodes at the end of this node and sets\n * the parent of these nodes to this element.\n *\n * @fires module:engine/view/node~Node#change\n * @param {module:engine/view/node~Node|Iterable.} nodes Node or the list of nodes to be inserted.\n * @returns {Number} Number of appended nodes.\n */\n\n\t}, {\n\t\tkey: 'appendChildren',\n\t\tvalue: function appendChildren(nodes) {\n\t\t\treturn this.insertChildren(this.childCount, nodes);\n\t\t}\n\n\t\t/**\n * Gets child at the given index.\n *\n * @param {Number} index Index of child.\n * @returns {module:engine/view/node~Node} Child node.\n */\n\n\t}, {\n\t\tkey: 'getChild',\n\t\tvalue: function getChild(index) {\n\t\t\treturn this._children[index];\n\t\t}\n\n\t\t/**\n * Gets index of the given child node. Returns `-1` if child node is not found.\n *\n * @param {module:engine/view/node~Node} node Child node.\n * @returns {Number} Index of the child node.\n */\n\n\t}, {\n\t\tkey: 'getChildIndex',\n\t\tvalue: function getChildIndex(node) {\n\t\t\treturn this._children.indexOf(node);\n\t\t}\n\n\t\t/**\n * Gets child nodes iterator.\n *\n * @returns {Iterable.} Child nodes iterator.\n */\n\n\t}, {\n\t\tkey: 'getChildren',\n\t\tvalue: function getChildren() {\n\t\t\treturn this._children[Symbol.iterator]();\n\t\t}\n\n\t\t/**\n * Returns an iterator that contains the keys for attributes. Order of inserting attributes is not preserved.\n *\n * @returns {Iterator.} Keys for attributes.\n */\n\n\t}, {\n\t\tkey: 'getAttributeKeys',\n\t\tvalue: regeneratorRuntime.mark(function getAttributeKeys() {\n\t\t\tvar _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, key;\n\n\t\t\treturn regeneratorRuntime.wrap(function getAttributeKeys$(_context) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context.prev = _context.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tif (!(this._classes.size > 0)) {\n\t\t\t\t\t\t\t\t_context.next = 3;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_context.next = 3;\n\t\t\t\t\t\t\treturn 'class';\n\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tif (!(this._styles.size > 0)) {\n\t\t\t\t\t\t\t\t_context.next = 6;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_context.next = 6;\n\t\t\t\t\t\t\treturn 'style';\n\n\t\t\t\t\t\tcase 6:\n\n\t\t\t\t\t\t\t// This is not an optimal solution because of https://github.com/ckeditor/ckeditor5-engine/issues/454.\n\t\t\t\t\t\t\t// It can be simplified to `yield* this._attrs.keys();`.\n\t\t\t\t\t\t\t_iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\t_didIteratorError2 = false;\n\t\t\t\t\t\t\t_iteratorError2 = undefined;\n\t\t\t\t\t\t\t_context.prev = 9;\n\t\t\t\t\t\t\t_iterator2 = this._attrs.keys()[Symbol.iterator]();\n\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\tif (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {\n\t\t\t\t\t\t\t\t_context.next = 18;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tkey = _step2.value;\n\t\t\t\t\t\t\t_context.next = 15;\n\t\t\t\t\t\t\treturn key;\n\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\t_iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\t_context.next = 11;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\t_context.next = 24;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 20:\n\t\t\t\t\t\t\t_context.prev = 20;\n\t\t\t\t\t\t\t_context.t0 = _context['catch'](9);\n\t\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t\t_iteratorError2 = _context.t0;\n\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\t_context.prev = 24;\n\t\t\t\t\t\t\t_context.prev = 25;\n\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\t_context.prev = 27;\n\n\t\t\t\t\t\t\tif (!_didIteratorError2) {\n\t\t\t\t\t\t\t\t_context.next = 30;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow _iteratorError2;\n\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn _context.finish(27);\n\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn _context.finish(24);\n\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getAttributeKeys, this, [[9, 20, 24, 32], [25,, 27, 31]]);\n\t\t})\n\n\t\t/**\n * Returns iterator that iterates over this element's attributes.\n *\n * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n *\n * @returns {Iterable.<*>}\n */\n\n\t}, {\n\t\tkey: 'getAttributes',\n\t\tvalue: regeneratorRuntime.mark(function getAttributes() {\n\t\t\treturn regeneratorRuntime.wrap(function getAttributes$(_context2) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context2.prev = _context2.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn _context2.delegateYield(this._attrs.entries(), 't0', 1);\n\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tif (!(this._classes.size > 0)) {\n\t\t\t\t\t\t\t\t_context2.next = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_context2.next = 4;\n\t\t\t\t\t\t\treturn ['class', this.getAttribute('class')];\n\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tif (!(this._styles.size > 0)) {\n\t\t\t\t\t\t\t\t_context2.next = 7;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_context2.next = 7;\n\t\t\t\t\t\t\treturn ['style', this.getAttribute('style')];\n\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context2.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getAttributes, this);\n\t\t})\n\n\t\t/**\n * Gets attribute by key. If attribute is not present - returns undefined.\n *\n * @param {String} key Attribute key.\n * @returns {String|undefined} Attribute value.\n */\n\n\t}, {\n\t\tkey: 'getAttribute',\n\t\tvalue: function getAttribute(key) {\n\t\t\tif (key == 'class') {\n\t\t\t\tif (this._classes.size > 0) {\n\t\t\t\t\treturn [].concat(_toConsumableArray(this._classes)).join(' ');\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tif (key == 'style') {\n\t\t\t\tif (this._styles.size > 0) {\n\t\t\t\t\tvar styleString = '';\n\n\t\t\t\t\tvar _iteratorNormalCompletion3 = true;\n\t\t\t\t\tvar _didIteratorError3 = false;\n\t\t\t\t\tvar _iteratorError3 = undefined;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (var _iterator3 = this._styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\t\t\t\t\tvar _step3$value = _slicedToArray(_step3.value, 2),\n\t\t\t\t\t\t\t property = _step3$value[0],\n\t\t\t\t\t\t\t value = _step3$value[1];\n\n\t\t\t\t\t\t\tstyleString += property + ':' + value + ';';\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t_didIteratorError3 = true;\n\t\t\t\t\t\t_iteratorError3 = err;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t\t\t\t\t_iterator3.return();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tif (_didIteratorError3) {\n\t\t\t\t\t\t\t\tthrow _iteratorError3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn styleString;\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn this._attrs.get(key);\n\t\t}\n\n\t\t/**\n * Returns a boolean indicating whether an attribute with the specified key exists in the element.\n *\n * @param {String} key Attribute key.\n * @returns {Boolean} `true` if attribute with the specified key exists in the element, false otherwise.\n */\n\n\t}, {\n\t\tkey: 'hasAttribute',\n\t\tvalue: function hasAttribute(key) {\n\t\t\tif (key == 'class') {\n\t\t\t\treturn this._classes.size > 0;\n\t\t\t}\n\n\t\t\tif (key == 'style') {\n\t\t\t\treturn this._styles.size > 0;\n\t\t\t}\n\n\t\t\treturn this._attrs.has(key);\n\t\t}\n\n\t\t/**\n * Adds or overwrite attribute with a specified key and value.\n *\n * @param {String} key Attribute key.\n * @param {String} value Attribute value.\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'setAttribute',\n\t\tvalue: function setAttribute(key, value) {\n\t\t\tthis._fireChange('attributes', this);\n\n\t\t\tif (key == 'class') {\n\t\t\t\tparseClasses(this._classes, value);\n\t\t\t} else if (key == 'style') {\n\t\t\t\tparseInlineStyles(this._styles, value);\n\t\t\t} else {\n\t\t\t\tthis._attrs.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n * this element.\n *\n * @param {Number} index Position where nodes should be inserted.\n * @param {module:engine/view/node~Node|Iterable.} nodes Node or the list of nodes to be inserted.\n * @fires module:engine/view/node~Node#change\n * @returns {Number} Number of inserted nodes.\n */\n\n\t}, {\n\t\tkey: 'insertChildren',\n\t\tvalue: function insertChildren(index, nodes) {\n\t\t\tthis._fireChange('children', this);\n\t\t\tvar count = 0;\n\n\t\t\tnodes = normalize(nodes);\n\n\t\t\tvar _iteratorNormalCompletion4 = true;\n\t\t\tvar _didIteratorError4 = false;\n\t\t\tvar _iteratorError4 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator4 = nodes[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n\t\t\t\t\tvar node = _step4.value;\n\n\t\t\t\t\tnode.parent = this;\n\n\t\t\t\t\tthis._children.splice(index, 0, node);\n\t\t\t\t\tindex++;\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError4 = true;\n\t\t\t\t_iteratorError4 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion4 && _iterator4.return) {\n\t\t\t\t\t\t_iterator4.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError4) {\n\t\t\t\t\t\tthrow _iteratorError4;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn count;\n\t\t}\n\n\t\t/**\n * Removes attribute from the element.\n *\n * @param {String} key Attribute key.\n * @returns {Boolean} Returns true if an attribute existed and has been removed.\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'removeAttribute',\n\t\tvalue: function removeAttribute(key) {\n\t\t\tthis._fireChange('attributes', this);\n\n\t\t\t// Remove class attribute.\n\t\t\tif (key == 'class') {\n\t\t\t\tif (this._classes.size > 0) {\n\t\t\t\t\tthis._classes.clear();\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove style attribute.\n\t\t\tif (key == 'style') {\n\t\t\t\tif (this._styles.size > 0) {\n\t\t\t\t\tthis._styles.clear();\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Remove other attributes.\n\t\t\treturn this._attrs.delete(key);\n\t\t}\n\n\t\t/**\n * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n *\n * @param {Number} index Number of the first node to remove.\n * @param {Number} [howMany=1] Number of nodes to remove.\n * @returns {Array.} The array of removed nodes.\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'removeChildren',\n\t\tvalue: function removeChildren(index) {\n\t\t\tvar howMany = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n\t\t\tthis._fireChange('children', this);\n\n\t\t\tfor (var i = index; i < index + howMany; i++) {\n\t\t\t\tthis._children[i].parent = null;\n\t\t\t}\n\n\t\t\treturn this._children.splice(index, howMany);\n\t\t}\n\n\t\t/**\n * Checks if this element is similar to other element.\n * Both elements should have the same name and attributes to be considered as similar. Two similar elements\n * can contain different set of children nodes.\n *\n * @param {module:engine/view/element~Element} otherElement\n * @returns {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isSimilar',\n\t\tvalue: function isSimilar(otherElement) {\n\t\t\tif (!(otherElement instanceof Element)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If exactly the same Element is provided - return true immediately.\n\t\t\tif (this === otherElement) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Check element name.\n\t\t\tif (this.name != otherElement.name) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check number of attributes, classes and styles.\n\t\t\tif (this._attrs.size !== otherElement._attrs.size || this._classes.size !== otherElement._classes.size || this._styles.size !== otherElement._styles.size) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Check if attributes are the same.\n\t\t\tvar _iteratorNormalCompletion5 = true;\n\t\t\tvar _didIteratorError5 = false;\n\t\t\tvar _iteratorError5 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator5 = this._attrs[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n\t\t\t\t\tvar _step5$value = _slicedToArray(_step5.value, 2),\n\t\t\t\t\t key = _step5$value[0],\n\t\t\t\t\t value = _step5$value[1];\n\n\t\t\t\t\tif (!otherElement._attrs.has(key) || otherElement._attrs.get(key) !== value) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check if classes are the same.\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError5 = true;\n\t\t\t\t_iteratorError5 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion5 && _iterator5.return) {\n\t\t\t\t\t\t_iterator5.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError5) {\n\t\t\t\t\t\tthrow _iteratorError5;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar _iteratorNormalCompletion6 = true;\n\t\t\tvar _didIteratorError6 = false;\n\t\t\tvar _iteratorError6 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator6 = this._classes[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n\t\t\t\t\tvar className = _step6.value;\n\n\t\t\t\t\tif (!otherElement._classes.has(className)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check if styles are the same.\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError6 = true;\n\t\t\t\t_iteratorError6 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion6 && _iterator6.return) {\n\t\t\t\t\t\t_iterator6.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError6) {\n\t\t\t\t\t\tthrow _iteratorError6;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar _iteratorNormalCompletion7 = true;\n\t\t\tvar _didIteratorError7 = false;\n\t\t\tvar _iteratorError7 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator7 = this._styles[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n\t\t\t\t\tvar _step7$value = _slicedToArray(_step7.value, 2),\n\t\t\t\t\t property = _step7$value[0],\n\t\t\t\t\t value = _step7$value[1];\n\n\t\t\t\t\tif (!otherElement._styles.has(property) || otherElement._styles.get(property) !== value) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError7 = true;\n\t\t\t\t_iteratorError7 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion7 && _iterator7.return) {\n\t\t\t\t\t\t_iterator7.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError7) {\n\t\t\t\t\t\tthrow _iteratorError7;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n * Adds specified class.\n *\n *\t\telement.addClass( 'foo' ); // Adds 'foo' class.\n *\t\telement.addClass( 'foo', 'bar' ); // Adds 'foo' and 'bar' classes.\n *\n * @param {...String} className\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'addClass',\n\t\tvalue: function addClass() {\n\t\t\tvar _this2 = this;\n\n\t\t\tthis._fireChange('attributes', this);\n\n\t\t\tfor (var _len = arguments.length, className = Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\t\tclassName[_key] = arguments[_key];\n\t\t\t}\n\n\t\t\tclassName.forEach(function (name) {\n\t\t\t\treturn _this2._classes.add(name);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Removes specified class.\n *\n \t *\t\telement.removeClass( 'foo' ); // Removes 'foo' class.\n *\t\telement.removeClass( 'foo', 'bar' ); // Removes both 'foo' and 'bar' classes.\n *\n * @param {...String} className\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'removeClass',\n\t\tvalue: function removeClass() {\n\t\t\tvar _this3 = this;\n\n\t\t\tthis._fireChange('attributes', this);\n\n\t\t\tfor (var _len2 = arguments.length, className = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\t\tclassName[_key2] = arguments[_key2];\n\t\t\t}\n\n\t\t\tclassName.forEach(function (name) {\n\t\t\t\treturn _this3._classes.delete(name);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Returns true if class is present.\n * If more then one class is provided - returns true only when all classes are present.\n *\n *\t\telement.hasClass( 'foo' ); // Returns true if 'foo' class is present.\n *\t\telement.hasClass( 'foo', 'bar' ); // Returns true if 'foo' and 'bar' classes are both present.\n *\n * @param {...String} className\n */\n\n\t}, {\n\t\tkey: 'hasClass',\n\t\tvalue: function hasClass() {\n\t\t\tfor (var _len3 = arguments.length, className = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t\t\t\tclassName[_key3] = arguments[_key3];\n\t\t\t}\n\n\t\t\tvar _iteratorNormalCompletion8 = true;\n\t\t\tvar _didIteratorError8 = false;\n\t\t\tvar _iteratorError8 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator8 = className[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n\t\t\t\t\tvar name = _step8.value;\n\n\t\t\t\t\tif (!this._classes.has(name)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError8 = true;\n\t\t\t\t_iteratorError8 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion8 && _iterator8.return) {\n\t\t\t\t\t\t_iterator8.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError8) {\n\t\t\t\t\t\tthrow _iteratorError8;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n * Returns iterator that contains all class names.\n *\n * @returns {Iterator.}\n */\n\n\t}, {\n\t\tkey: 'getClassNames',\n\t\tvalue: function getClassNames() {\n\t\t\treturn this._classes.keys();\n\t\t}\n\n\t\t/**\n * Adds style to the element.\n *\n *\t\telement.setStyle( 'color', 'red' );\n *\t\telement.setStyle( {\n *\t\t\tcolor: 'red',\n *\t\t\tposition: 'fixed'\n *\t\t} );\n *\n * @param {String|Object} property Property name or object with key - value pairs.\n * @param {String} [value] Value to set. This parameter is ignored if object is provided as the first parameter.\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'setStyle',\n\t\tvalue: function setStyle(property, value) {\n\t\t\tthis._fireChange('attributes', this);\n\n\t\t\tif ((0, _isPlainObject2.default)(property)) {\n\t\t\t\tvar keys = Object.keys(property);\n\n\t\t\t\tvar _iteratorNormalCompletion9 = true;\n\t\t\t\tvar _didIteratorError9 = false;\n\t\t\t\tvar _iteratorError9 = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator9 = keys[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n\t\t\t\t\t\tvar key = _step9.value;\n\n\t\t\t\t\t\tthis._styles.set(key, property[key]);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError9 = true;\n\t\t\t\t\t_iteratorError9 = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion9 && _iterator9.return) {\n\t\t\t\t\t\t\t_iterator9.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError9) {\n\t\t\t\t\t\t\tthrow _iteratorError9;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._styles.set(property, value);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Returns style value for given property.\n * Undefined is returned if style does not exist.\n *\n * @param {String} property\n * @returns {String|undefined}\n */\n\n\t}, {\n\t\tkey: 'getStyle',\n\t\tvalue: function getStyle(property) {\n\t\t\treturn this._styles.get(property);\n\t\t}\n\n\t\t/**\n * Returns iterator that contains all style names.\n *\n * @returns {Iterator.}\n */\n\n\t}, {\n\t\tkey: 'getStyleNames',\n\t\tvalue: function getStyleNames() {\n\t\t\treturn this._styles.keys();\n\t\t}\n\n\t\t/**\n * Returns true if style keys are present.\n * If more then one style property is provided - returns true only when all properties are present.\n *\n *\t\telement.hasStyle( 'color' ); // Returns true if 'border-top' style is present.\n *\t\telement.hasStyle( 'color', 'border-top' ); // Returns true if 'color' and 'border-top' styles are both present.\n *\n * @param {...String} property\n */\n\n\t}, {\n\t\tkey: 'hasStyle',\n\t\tvalue: function hasStyle() {\n\t\t\tfor (var _len4 = arguments.length, property = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t\t\t\tproperty[_key4] = arguments[_key4];\n\t\t\t}\n\n\t\t\tvar _iteratorNormalCompletion10 = true;\n\t\t\tvar _didIteratorError10 = false;\n\t\t\tvar _iteratorError10 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator10 = property[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n\t\t\t\t\tvar name = _step10.value;\n\n\t\t\t\t\tif (!this._styles.has(name)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError10 = true;\n\t\t\t\t_iteratorError10 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion10 && _iterator10.return) {\n\t\t\t\t\t\t_iterator10.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError10) {\n\t\t\t\t\t\tthrow _iteratorError10;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n * Removes specified style.\n *\n *\t\telement.removeStyle( 'color' ); // Removes 'color' style.\n *\t\telement.removeStyle( 'color', 'border-top' ); // Removes both 'color' and 'border-top' styles.\n *\n * @param {...String} property\n * @fires module:engine/view/node~Node#change\n */\n\n\t}, {\n\t\tkey: 'removeStyle',\n\t\tvalue: function removeStyle() {\n\t\t\tvar _this4 = this;\n\n\t\t\tthis._fireChange('attributes', this);\n\n\t\t\tfor (var _len5 = arguments.length, property = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n\t\t\t\tproperty[_key5] = arguments[_key5];\n\t\t\t}\n\n\t\t\tproperty.forEach(function (name) {\n\t\t\t\treturn _this4._styles.delete(name);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Returns ancestor element that match specified pattern.\n * Provided patterns should be compatible with {@link module:engine/view/matcher~Matcher Matcher} as it is used internally.\n *\n * @see module:engine/view/matcher~Matcher\n * @param {Object|String|RegExp|Function} patterns Patterns used to match correct ancestor.\n * See {@link module:engine/view/matcher~Matcher}.\n * @returns {module:engine/view/element~Element|null} Found element or `null` if no matching ancestor was found.\n */\n\n\t}, {\n\t\tkey: 'findAncestor',\n\t\tvalue: function findAncestor() {\n\t\t\tfor (var _len6 = arguments.length, patterns = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n\t\t\t\tpatterns[_key6] = arguments[_key6];\n\t\t\t}\n\n\t\t\tvar matcher = new (Function.prototype.bind.apply(_matcher2.default, [null].concat(patterns)))();\n\t\t\tvar parent = this.parent;\n\n\t\t\twhile (parent) {\n\t\t\t\tif (matcher.match(parent)) {\n\t\t\t\t\treturn parent;\n\t\t\t\t}\n\n\t\t\t\tparent = parent.parent;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n * Sets a custom property. Unlike attributes, custom properties are not rendered to the DOM,\n * so they can be used to add special data to elements.\n *\n * @param {String|Symbol} key\n * @param {*} value\n */\n\n\t}, {\n\t\tkey: 'setCustomProperty',\n\t\tvalue: function setCustomProperty(key, value) {\n\t\t\tthis._customProperties.set(key, value);\n\t\t}\n\n\t\t/**\n * Returns the custom property value for the given key.\n *\n * @param {String|Symbol} key\n * @returns {*}\n */\n\n\t}, {\n\t\tkey: 'getCustomProperty',\n\t\tvalue: function getCustomProperty(key) {\n\t\t\treturn this._customProperties.get(key);\n\t\t}\n\n\t\t/**\n * Removes the custom property stored under the given key.\n *\n * @param {String|Symbol} key\n * @returns {Boolean} Returns true if property was removed.\n */\n\n\t}, {\n\t\tkey: 'removeCustomProperty',\n\t\tvalue: function removeCustomProperty(key) {\n\t\t\treturn this._customProperties.delete(key);\n\t\t}\n\n\t\t/**\n * Returns an iterator which iterates over this element's custom properties.\n * Iterator provides [key, value] pair for each stored property.\n *\n * @returns {Iterable.<*>}\n */\n\n\t}, {\n\t\tkey: 'getCustomProperties',\n\t\tvalue: regeneratorRuntime.mark(function getCustomProperties() {\n\t\t\treturn regeneratorRuntime.wrap(function getCustomProperties$(_context3) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context3.prev = _context3.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn _context3.delegateYield(this._customProperties.entries(), 't0', 1);\n\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context3.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getCustomProperties, this);\n\t\t})\n\n\t\t/**\n * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n *\n * @abstract\n * @method module:engine/view/element~Element#getFillerOffset\n */\n\n\t}, {\n\t\tkey: 'childCount',\n\t\tget: function get() {\n\t\t\treturn this._children.length;\n\t\t}\n\n\t\t/**\n * Is `true` if there are no nodes inside this element, `false` otherwise.\n *\n * @readonly\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isEmpty',\n\t\tget: function get() {\n\t\t\treturn this._children.length === 0;\n\t\t}\n\t}]);\n\n\treturn Element;\n}(_node2.default);\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.\n\n\nexports.default = Element;\nfunction parseInlineStyles(stylesMap, stylesString) {\n\tvar regex = /\\s*([^:;\\s]+)\\s*:\\s*([^;]+)\\s*(?=;|$)/g;\n\tvar matchStyle = void 0;\n\tstylesMap.clear();\n\n\twhile ((matchStyle = regex.exec(stylesString)) !== null) {\n\t\tstylesMap.set(matchStyle[1], matchStyle[2].trim());\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\tvar classArray = classesString.split(/\\s+/);\n\tclassesSet.clear();\n\tclassArray.forEach(function (name) {\n\t\treturn classesSet.add(name);\n\t});\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 _text2.default(nodes)];\n\t}\n\n\tif (!(0, _isiterable2.default)(nodes)) {\n\t\tnodes = [nodes];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from(nodes).map(function (node) {\n\t\treturn typeof node == 'string' ? new _text2.default(node) : node;\n\t});\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/element.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.keyCodes = undefined;\nexports.getCode = getCode;\nexports.parseKeystroke = parseKeystroke;\nexports.getEnvKeystrokeText = getEnvKeystrokeText;\n\nvar _ckeditorerror = require('./ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _env = require('./env');\n\nvar _env2 = _interopRequireDefault(_env);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 */\n/**\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\nvar keyCodes = exports.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 */\nfunction getCode(key) {\n var keyCode = void 0;\n\n if (typeof key == 'string') {\n keyCode = keyCodes[key.toLowerCase()];\n\n if (!keyCode) {\n /**\n * Unknown key name. Only key names contained by the {@link module:utils/keyboard~keyCodes} can be used.\n *\n * @errror keyboard-unknown-key\n * @param {String} key\n */\n throw new _ckeditorerror2.default('keyboard-unknown-key: Unknown key name.', { key: key });\n }\n } else {\n keyCode = key.keyCode + (key.altKey ? keyCodes.alt : 0) + (key.ctrlKey ? keyCodes.ctrl : 0) + (key.shiftKey ? keyCodes.shift : 0);\n }\n\n return 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 */\nfunction parseKeystroke(keystroke) {\n if (typeof keystroke == 'string') {\n keystroke = splitKeystrokeText(keystroke);\n }\n\n return keystroke.map(function (key) {\n return typeof key == 'string' ? getCode(key) : key;\n }).reduce(function (key, sum) {\n return sum + key;\n }, 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 */\nfunction getEnvKeystrokeText(keystroke) {\n var split = splitKeystrokeText(keystroke);\n\n if (_env2.default.mac) {\n if (split[0].toLowerCase() == 'ctrl') {\n return '⌘' + (split[1] || '');\n }\n }\n\n return keystroke;\n}\n\nfunction generateKnownKeyCodes() {\n var keyCodes = {\n arrowleft: 37,\n arrowup: 38,\n arrowright: 39,\n arrowdown: 40,\n backspace: 8,\n delete: 46,\n enter: 13,\n esc: 27,\n tab: 9,\n\n // The idea about these numbers is that they do not collide with any real key codes, so we can use them\n // like bit masks.\n ctrl: 0x110000,\n // Has the same code as ctrl, because their behaviour should be unified across the editor.\n // See http://ckeditor.github.io/editor-recommendations/general-policies#ctrl-vs-cmd\n cmd: 0x110000,\n shift: 0x220000,\n alt: 0x440000\n };\n\n // a-z\n for (var code = 65; code <= 90; code++) {\n var letter = String.fromCharCode(code);\n\n keyCodes[letter.toLowerCase()] = code;\n }\n\n // 0-9\n for (var _code = 48; _code <= 57; _code++) {\n keyCodes[_code - 48] = _code;\n }\n\n // F1-F12\n for (var _code2 = 112; _code2 <= 123; _code2++) {\n keyCodes['f' + (_code2 - 111)] = _code2;\n }\n\n return keyCodes;\n}\n\nfunction splitKeystrokeText(keystroke) {\n return 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// WEBPACK FOOTER\n// ../ckeditor5-utils/src/keyboard.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _arrayPush = require('./_arrayPush');\n\nvar _arrayPush2 = _interopRequireDefault(_arrayPush);\n\nvar _isFlattenable = require('./_isFlattenable');\n\nvar _isFlattenable2 = _interopRequireDefault(_isFlattenable);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 = _isFlattenable2.default);\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 (0, _arrayPush2.default)(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nexports.default = baseFlatten;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_baseFlatten.js\n// module id = 22\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _node = require('./node');\n\nvar _node2 = _interopRequireDefault(_node);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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\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 */\nvar Text = function (_Node) {\n\t_inherits(Text, _Node);\n\n\t/**\n * Creates a text node.\n *\n * @param {String} data Node's text.\n * @param {Object} [attrs] Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n */\n\tfunction Text(data, attrs) {\n\t\t_classCallCheck(this, Text);\n\n\t\t/**\n * Text data contained in this text node.\n *\n * @type {String}\n */\n\t\tvar _this = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, attrs));\n\n\t\t_this.data = data || '';\n\t\treturn _this;\n\t}\n\n\t/**\n * @inheritDoc\n */\n\n\n\t_createClass(Text, [{\n\t\tkey: 'is',\n\n\n\t\t/**\n * @inheritDoc\n */\n\t\tvalue: function is(type) {\n\t\t\treturn type == 'text';\n\t\t}\n\n\t\t/**\n * Creates a copy of this text node and returns it. Created text node has same text data and attributes as original text node.\n */\n\n\t}, {\n\t\tkey: 'clone',\n\t\tvalue: function clone() {\n\t\t\treturn new Text(this.data, this.getAttributes());\n\t\t}\n\n\t\t/**\n * Converts `Text` instance to plain object and returns it.\n *\n * @returns {Object} `Text` instance converted to plain object.\n */\n\n\t}, {\n\t\tkey: 'toJSON',\n\t\tvalue: function toJSON() {\n\t\t\tvar json = _get(Text.prototype.__proto__ || Object.getPrototypeOf(Text.prototype), 'toJSON', this).call(this);\n\n\t\t\tjson.data = this.data;\n\n\t\t\treturn json;\n\t\t}\n\n\t\t/**\n * Creates a `Text` instance from given plain object (i.e. parsed JSON string).\n *\n * @param {Object} json Plain object to be converted to `Text`.\n * @returns {module:engine/model/text~Text} `Text` instance created using given plain object.\n */\n\n\t}, {\n\t\tkey: 'offsetSize',\n\t\tget: function get() {\n\t\t\treturn this.data.length;\n\t\t}\n\t}], [{\n\t\tkey: 'fromJSON',\n\t\tvalue: function fromJSON(json) {\n\t\t\treturn new Text(json.data, json.attributes);\n\t\t}\n\t}]);\n\n\treturn Text;\n}(_node2.default);\n\nexports.default = Text;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/text.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.insert = insert;\nexports.remove = remove;\nexports.move = move;\nexports.setAttribute = setAttribute;\nexports.removeAttribute = removeAttribute;\nexports.normalizeNodes = normalizeNodes;\n\nvar _node = require('./node');\n\nvar _node2 = _interopRequireDefault(_node);\n\nvar _text = require('./text');\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _textproxy = require('./textproxy');\n\nvar _textproxy2 = _interopRequireDefault(_textproxy);\n\nvar _range = require('./range');\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _documentfragment = require('./documentfragment');\n\nvar _documentfragment2 = _interopRequireDefault(_documentfragment);\n\nvar _nodelist = require('./nodelist');\n\nvar _nodelist2 = _interopRequireDefault(_nodelist);\n\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\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 */\nvar writer = {\n\tinsert: insert,\n\tremove: remove,\n\tmove: move,\n\tsetAttribute: setAttribute,\n\tremoveAttribute: removeAttribute,\n\tnormalizeNodes: normalizeNodes\n}; /**\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\nexports.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 */\n\nfunction 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\tvar offset = nodes.reduce(function (sum, node) {\n\t\treturn sum + node.offsetSize;\n\t}, 0);\n\tvar 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\tvar 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 _range2.default(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 */\nfunction remove(range) {\n\tif (!range.isFlat) {\n\t\t/**\n * Trying to remove a range that starts and ends in different element.\n *\n * @error model-writer-remove-range-not-flat\n */\n\t\tthrow new _ckeditorerror2.default('model-writer-remove-range-not-flat: ' + 'Trying to remove a range that starts and ends in different element.');\n\t}\n\n\tvar 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\tvar 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 */\nfunction move(sourceRange, targetPosition) {\n\t/* jshint validthis:true */\n\tif (!sourceRange.isFlat) {\n\t\t/**\n * Trying to move a range that starts and ends in different element.\n *\n * @error model-writer-move-range-not-flat\n */\n\t\tthrow new _ckeditorerror2.default('model-writer-move-range-not-flat: ' + 'Trying to move a range that starts and ends in different element.');\n\t}\n\n\tvar 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 */\nfunction 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\tvar _iteratorNormalCompletion = true;\n\tvar _didIteratorError = false;\n\tvar _iteratorError = undefined;\n\n\ttry {\n\t\tfor (var _iterator = range.getItems()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar item = _step.value;\n\n\t\t\t// Iterator will return `TextProxy` instances but we know that those text proxies will\n\t\t\t// always represent full text nodes (this is guaranteed thanks to splitting we did before).\n\t\t\t// So, we can operate on those text proxies' text nodes.\n\t\t\tvar node = item.is('textProxy') ? item.textNode : item;\n\n\t\t\tif (value !== null) {\n\t\t\t\tnode.setAttribute(key, value);\n\t\t\t} else {\n\t\t\t\tnode.removeAttribute(key);\n\t\t\t}\n\n\t\t\t// After attributes changing it may happen that some text nodes can be merged. Try to merge with previous node.\n\t\t\t_mergeNodesAtIndex(node.parent, node.index);\n\t\t}\n\n\t\t// Try to merge last changed node with it's previous sibling (not covered by the loop above).\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t_iterator.return();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (_didIteratorError) {\n\t\t\t\tthrow _iteratorError;\n\t\t\t}\n\t\t}\n\t}\n\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 */\nfunction removeAttribute(range, key) {\n\t/* jshint validthis:true */\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 */\nfunction normalizeNodes(nodes) {\n\tvar 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 (var i = 0; i < nodes.length; i++) {\n\t\tif (typeof nodes[i] == 'string') {\n\t\t\tnormalized.push(new _text2.default(nodes[i]));\n\t\t} else if (nodes[i] instanceof _textproxy2.default) {\n\t\t\tnormalized.push(new _text2.default(nodes[i].data, nodes[i].getAttributes()));\n\t\t} else if (nodes[i] instanceof _documentfragment2.default || nodes[i] instanceof _nodelist2.default) {\n\t\t\tvar _iteratorNormalCompletion2 = true;\n\t\t\tvar _didIteratorError2 = false;\n\t\t\tvar _iteratorError2 = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator2 = nodes[i][Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n\t\t\t\t\tvar child = _step2.value;\n\n\t\t\t\t\tnormalized.push(child);\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t_iteratorError2 = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError2) {\n\t\t\t\t\t\tthrow _iteratorError2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (nodes[i] instanceof _node2.default) {\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 (var _i = 1; _i < normalized.length; _i++) {\n\t\tvar node = normalized[_i];\n\t\tvar prev = normalized[_i - 1];\n\n\t\tif (node instanceof _text2.default && prev instanceof _text2.default && _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 _text2.default(prev.data + node.data, prev.getAttributes()));\n\t\t\t_i--;\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\tvar nodeBefore = element.getChild(index - 1);\n\tvar 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\tvar mergedNode = new _text2.default(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\tvar textNode = position.textNode;\n\tvar element = position.parent;\n\n\tif (textNode) {\n\t\tvar offsetDiff = position.offset - textNode.startOffset;\n\t\tvar index = textNode.index;\n\n\t\telement.removeChildren(index, 1);\n\n\t\tvar firstPart = new _text2.default(textNode.data.substr(0, offsetDiff), textNode.getAttributes());\n\t\tvar secondPart = new _text2.default(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\tvar iteratorA = nodeA.getAttributes();\n\tvar iteratorB = nodeB.getAttributes();\n\n\tvar _iteratorNormalCompletion3 = true;\n\tvar _didIteratorError3 = false;\n\tvar _iteratorError3 = undefined;\n\n\ttry {\n\t\tfor (var _iterator3 = iteratorA[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n\t\t\tvar attr = _step3.value;\n\n\t\t\tif (attr[1] !== nodeB.getAttribute(attr[0])) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\titeratorB.next();\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError3 = true;\n\t\t_iteratorError3 = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion3 && _iterator3.return) {\n\t\t\t\t_iterator3.return();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (_didIteratorError3) {\n\t\t\t\tthrow _iteratorError3;\n\t\t\t}\n\t\t}\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// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/writer.js\n// module id = 24\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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\nvar _treewalker = require('./treewalker');\n\nvar _treewalker2 = _interopRequireDefault(_treewalker);\n\nvar _comparearrays = require('@ckeditor/ckeditor5-utils/src/comparearrays');\n\nvar _comparearrays2 = _interopRequireDefault(_comparearrays);\n\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _editableelement = require('./editableelement');\n\nvar _editableelement2 = _interopRequireDefault(_editableelement);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Position in the tree. Position is always located before or after a node.\n */\nvar Position = function () {\n\t/**\n * Creates a position.\n *\n * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} parent Position parent.\n * @param {Number} offset Position offset.\n */\n\tfunction Position(parent, offset) {\n\t\t_classCallCheck(this, Position);\n\n\t\t/**\n * Position parent.\n *\n * @member {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n * module:engine/view/position~Position#parent\n */\n\t\tthis.parent = parent;\n\n\t\t/**\n * Position offset.\n *\n * @member {Number} module:engine/view/position~Position#offset\n */\n\t\tthis.offset = offset;\n\t}\n\n\t/**\n * Node directly after the position. Equals `null` when there is no node after position or position is located\n * inside text node.\n *\n * @readonly\n * @type {module:engine/view/node~Node|null}\n */\n\n\n\t_createClass(Position, [{\n\t\tkey: 'getShiftedBy',\n\n\n\t\t/**\n * Returns a new instance of Position with offset incremented by `shift` value.\n *\n * @param {Number} shift How position offset should get changed. Accepts negative values.\n * @returns {module:engine/view/position~Position} Shifted position.\n */\n\t\tvalue: function getShiftedBy(shift) {\n\t\t\tvar shifted = Position.createFromPosition(this);\n\n\t\t\tvar offset = shifted.offset + shift;\n\t\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\t\treturn shifted;\n\t\t}\n\n\t\t/**\n * Gets the farthest position which matches the callback using\n * {@link module:engine/view/treewalker~TreeWalker TreeWalker}.\n *\n * For example:\n *\n * \t\tgetLastMatchingPosition( value => value.type == 'text' ); //

{}foo

->

foo[]

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

foo[]

->

{}foo

\n * \t\tgetLastMatchingPosition( value => false ); // Do not move the position.\n *\n * @param {Function} skip Callback function. Gets {@link module:engine/view/treewalker~TreeWalkerValue} and should\n * return `true` if the value should be skipped or `false` if not.\n * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n *\n * @returns {module:engine/view/position~Position} The position after the last item which matches the `skip` callback test.\n */\n\n\t}, {\n\t\tkey: 'getLastMatchingPosition',\n\t\tvalue: function getLastMatchingPosition(skip) {\n\t\t\tvar options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\t\toptions.startPosition = this;\n\n\t\t\tvar treeWalker = new _treewalker2.default(options);\n\t\t\ttreeWalker.skip(skip);\n\n\t\t\treturn treeWalker.position;\n\t\t}\n\n\t\t/**\n * Returns ancestors array of this position, that is this position's parent and it's ancestors.\n *\n * @returns {Array} Array with ancestors.\n */\n\n\t}, {\n\t\tkey: 'getAncestors',\n\t\tvalue: function getAncestors() {\n\t\t\tif (this.parent.is('documentFragment')) {\n\t\t\t\treturn [this.parent];\n\t\t\t} else {\n\t\t\t\treturn this.parent.getAncestors({ includeNode: true });\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Checks whether this position equals given position.\n *\n * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} True if positions are same.\n */\n\n\t}, {\n\t\tkey: 'isEqual',\n\t\tvalue: function isEqual(otherPosition) {\n\t\t\treturn this.parent == otherPosition.parent && this.offset == otherPosition.offset;\n\t\t}\n\n\t\t/**\n * Checks whether this position is located before given position. When method returns `false` it does not mean that\n * this position is after give one. Two positions may be located inside separate roots and in that situation this\n * method will still return `false`.\n *\n * @see module:engine/view/position~Position#isAfter\n * @see module:engine/view/position~Position#compareWith\n * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} Returns `true` if this position is before given position.\n */\n\n\t}, {\n\t\tkey: 'isBefore',\n\t\tvalue: function isBefore(otherPosition) {\n\t\t\treturn this.compareWith(otherPosition) == 'before';\n\t\t}\n\n\t\t/**\n * Checks whether this position is located after given position. When method returns `false` it does not mean that\n * this position is before give one. Two positions may be located inside separate roots and in that situation this\n * method will still return `false`.\n *\n * @see module:engine/view/position~Position#isBefore\n * @see module:engine/view/position~Position#compareWith\n * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n * @returns {Boolean} Returns `true` if this position is after given position.\n */\n\n\t}, {\n\t\tkey: 'isAfter',\n\t\tvalue: function isAfter(otherPosition) {\n\t\t\treturn this.compareWith(otherPosition) == 'after';\n\t\t}\n\n\t\t/**\n * Checks whether this position is before, after or in same position that other position. Two positions may be also\n * different when they are located in separate roots.\n *\n * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n * @returns {module:engine/view/position~PositionRelation}\n */\n\n\t}, {\n\t\tkey: 'compareWith',\n\t\tvalue: function compareWith(otherPosition) {\n\t\t\tif (this.isEqual(otherPosition)) {\n\t\t\t\treturn 'same';\n\t\t\t}\n\n\t\t\t// If positions have same parent.\n\t\t\tif (this.parent === otherPosition.parent) {\n\t\t\t\treturn this.offset - otherPosition.offset < 0 ? 'before' : 'after';\n\t\t\t}\n\n\t\t\t// Get path from root to position's parent element.\n\t\t\tvar path = this.getAncestors();\n\t\t\tvar otherPath = otherPosition.getAncestors();\n\n\t\t\t// Compare both path arrays to find common ancestor.\n\t\t\tvar result = (0, _comparearrays2.default)(path, otherPath);\n\n\t\t\tvar commonAncestorIndex = void 0;\n\n\t\t\tswitch (result) {\n\t\t\t\tcase 0:\n\t\t\t\t\t// No common ancestors found.\n\t\t\t\t\treturn 'different';\n\n\t\t\t\tcase 'prefix':\n\t\t\t\t\tcommonAncestorIndex = path.length - 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'extension':\n\t\t\t\t\tcommonAncestorIndex = otherPath.length - 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tcommonAncestorIndex = result - 1;\n\t\t\t}\n\n\t\t\t// Common ancestor of two positions.\n\t\t\tvar commonAncestor = path[commonAncestorIndex];\n\t\t\tvar nextAncestor1 = path[commonAncestorIndex + 1];\n\t\t\tvar nextAncestor2 = otherPath[commonAncestorIndex + 1];\n\n\t\t\t// Check if common ancestor is not one of the parents.\n\t\t\tif (commonAncestor === this.parent) {\n\t\t\t\tvar _index = this.offset - nextAncestor2.index;\n\n\t\t\t\treturn _index <= 0 ? 'before' : 'after';\n\t\t\t} else if (commonAncestor === otherPosition.parent) {\n\t\t\t\tvar _index2 = nextAncestor1.index - otherPosition.offset;\n\n\t\t\t\treturn _index2 < 0 ? 'before' : 'after';\n\t\t\t}\n\n\t\t\tvar index = nextAncestor1.index - nextAncestor2.index;\n\n\t\t\t// Compare indexes of next ancestors inside common one.\n\t\t\treturn index < 0 ? 'before' : 'after';\n\t\t}\n\n\t\t/**\n * Creates position at the given location. The location can be specified as:\n *\n * * a {@link module:engine/view/position~Position position},\n * * parent element and offset (offset defaults to `0`),\n * * parent element and `'end'` (sets position at the end of that element),\n * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n *\n * This method is a shortcut to other constructors such as:\n *\n * * {@link module:engine/view/position~Position.createBefore},\n * * {@link module:engine/view/position~Position.createAfter},\n * * {@link module:engine/view/position~Position.createFromPosition}.\n *\n * @param {module:engine/view/item~Item|module:engine/model/position~Position} itemOrPosition\n * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when\n * first parameter is a {@link module:engine/view/item~Item view item}.\n */\n\n\t}, {\n\t\tkey: 'nodeAfter',\n\t\tget: function get() {\n\t\t\tif (this.parent.is('text')) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn this.parent.getChild(this.offset) || null;\n\t\t}\n\n\t\t/**\n * Node directly before the position. Equals `null` when there is no node before position or position is located\n * inside text node.\n *\n * @readonly\n * @type {module:engine/view/node~Node|null}\n */\n\n\t}, {\n\t\tkey: 'nodeBefore',\n\t\tget: function get() {\n\t\t\tif (this.parent.is('text')) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn this.parent.getChild(this.offset - 1) || null;\n\t\t}\n\n\t\t/**\n * Is `true` if position is at the beginning of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n *\n * @readonly\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isAtStart',\n\t\tget: function get() {\n\t\t\treturn this.offset === 0;\n\t\t}\n\n\t\t/**\n * Is `true` if position is at the end of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n *\n * @readonly\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isAtEnd',\n\t\tget: function get() {\n\t\t\tvar endOffset = this.parent.is('text') ? this.parent.data.length : this.parent.childCount;\n\n\t\t\treturn this.offset === endOffset;\n\t\t}\n\n\t\t/**\n * Position's root, that is the root of the position's parent element.\n *\n * @readonly\n * @type {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n */\n\n\t}, {\n\t\tkey: 'root',\n\t\tget: function get() {\n\t\t\treturn this.parent.root;\n\t\t}\n\n\t\t/**\n * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this position, or `null` if\n * position is not inside an editable element.\n *\n * @type {module:engine/view/editableelement~EditableElement|null}\n */\n\n\t}, {\n\t\tkey: 'editableElement',\n\t\tget: function get() {\n\t\t\tvar editable = this.parent;\n\n\t\t\twhile (!(editable instanceof _editableelement2.default)) {\n\t\t\t\tif (editable.parent) {\n\t\t\t\t\teditable = editable.parent;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn editable;\n\t\t}\n\t}], [{\n\t\tkey: 'createAt',\n\t\tvalue: function createAt(itemOrPosition, offset) {\n\t\t\tif (itemOrPosition instanceof Position) {\n\t\t\t\treturn this.createFromPosition(itemOrPosition);\n\t\t\t} else {\n\t\t\t\tvar node = itemOrPosition;\n\n\t\t\t\tif (offset == 'end') {\n\t\t\t\t\toffset = node.is('text') ? node.data.length : node.childCount;\n\t\t\t\t} else if (offset == 'before') {\n\t\t\t\t\treturn this.createBefore(node);\n\t\t\t\t} else if (offset == 'after') {\n\t\t\t\t\treturn this.createAfter(node);\n\t\t\t\t} else if (!offset) {\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\n\t\t\t\treturn new Position(node, offset);\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Creates a new position after given view item.\n *\n * @param {module:engine/view/item~Item} item View item after which the position should be located.\n * @returns {module:engine/view/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createAfter',\n\t\tvalue: function createAfter(item) {\n\t\t\t// TextProxy is not a instance of Node so we need do handle it in specific way.\n\t\t\tif (item.is('textProxy')) {\n\t\t\t\treturn new Position(item.textNode, item.offsetInText + item.data.length);\n\t\t\t}\n\n\t\t\tif (!item.parent) {\n\t\t\t\t/**\n * You can not make a position after a root.\n *\n * @error position-after-root\n * @param {module:engine/view/node~Node} root\n */\n\t\t\t\tthrow new _ckeditorerror2.default('view-position-after-root: You can not make position after root.', { root: item });\n\t\t\t}\n\n\t\t\treturn new Position(item.parent, item.index + 1);\n\t\t}\n\n\t\t/**\n * Creates a new position before given view item.\n *\n * @param {module:engine/view/item~Item} item View item before which the position should be located.\n * @returns {module:engine/view/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createBefore',\n\t\tvalue: function createBefore(item) {\n\t\t\t// TextProxy is not a instance of Node so we need do handle it in specific way.\n\t\t\tif (item.is('textProxy')) {\n\t\t\t\treturn new Position(item.textNode, item.offsetInText);\n\t\t\t}\n\n\t\t\tif (!item.parent) {\n\t\t\t\t/**\n * You cannot make a position before a root.\n *\n * @error position-before-root\n * @param {module:engine/view/node~Node} root\n */\n\t\t\t\tthrow new _ckeditorerror2.default('view-position-before-root: You can not make position before root.', { root: item });\n\t\t\t}\n\n\t\t\treturn new Position(item.parent, item.index);\n\t\t}\n\n\t\t/**\n * Creates and returns a new instance of `Position`, which is equal to the passed position.\n *\n * @param {module:engine/view/position~Position} position Position to be cloned.\n * @returns {module:engine/view/position~Position}\n */\n\n\t}, {\n\t\tkey: 'createFromPosition',\n\t\tvalue: function createFromPosition(position) {\n\t\t\treturn new this(position.parent, position.offset);\n\t\t}\n\t}]);\n\n\treturn Position;\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\nexports.default = Position;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/position.js\n// module id = 25\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _view = require('../view');\n\nvar _view2 = _interopRequireDefault(_view);\n\nvar _template = require('../template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _iconview = require('../icon/iconview');\n\nvar _iconview2 = _interopRequireDefault(_iconview);\n\nvar _keyboard = require('@ckeditor/ckeditor5-utils/src/keyboard');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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\n/**\n * The button view class.\n *\n * @extends module:ui/view~View\n */\nvar ButtonView = function (_View) {\n\t_inherits(ButtonView, _View);\n\n\t/**\n * @inheritDoc\n */\n\tfunction ButtonView(locale) {\n\t\t_classCallCheck(this, ButtonView);\n\n\t\t/**\n * The label of the button view visible to the user.\n *\n * @observable\n * @member {String} #label\n */\n\t\tvar _this = _possibleConstructorReturn(this, (ButtonView.__proto__ || Object.getPrototypeOf(ButtonView)).call(this, locale));\n\n\t\t_this.set('label');\n\n\t\t/**\n * (Optional) The keystroke associated with the button, i.e. CTRL+B,\n * in the string format compatible with {@link module:utils/keyboard}.\n *\n * @observable\n * @member {Boolean} #keystroke\n */\n\t\t_this.set('keystroke');\n\n\t\t/**\n * (Optional) Tooltip of the button, i.e. displayed when hovering the button with the mouse cursor.\n *\n * * If defined as a `Boolean` (e.g. `true`), then combination of `label` and `keystroke` will be set as a tooltip.\n * * If defined as a `String`, tooltip will equal the exact text of that `String`.\n * * If defined as a `Function`, `label` and `keystroke` will be passed to that function, which is to return\n * a string with the tooltip text.\n *\n *\t\tconst view = new ButtonView( locale );\n *\t\tview.tooltip = ( label, keystroke ) => `A tooltip for ${ label } and ${ keystroke }.`\n *\n * @observable\n * @default false\n * @member {Boolean|String|Function} #tooltip\n */\n\t\t_this.set('tooltip');\n\n\t\t/**\n * The HTML type of the button. Default `button`.\n *\n * @observable\n * @member {'button'|'submit'|'reset'|'menu'} #type\n */\n\t\t_this.set('type', 'button');\n\n\t\t/**\n * Controls whether the button view is \"on\", e.g. some feature which it represents\n * is currently enabled.\n *\n * @observable\n * @member {Boolean} #isOn\n */\n\t\t_this.set('isOn', false);\n\n\t\t/**\n * Controls whether the button view is enabled (can be clicked).\n *\n * @observable\n * @member {Boolean} #isEnabled\n */\n\t\t_this.set('isEnabled', true);\n\n\t\t/**\n * (Optional) Whether the label of the button is hidden (e.g. button with icon only).\n *\n * @observable\n * @member {Boolean} #withText\n */\n\t\t_this.set('withText', false);\n\n\t\t/**\n * (Optional) Source of the icon. See {@link module:ui/icon/iconview~IconView#content}.\n *\n * @observable\n * @member {String} #icon\n */\n\t\t_this.set('icon');\n\n\t\t/**\n * Controls the `tabindex` attribute of the button.\n *\n * @observable\n * @default -1\n * @member {String} #tabindex\n */\n\t\t_this.set('tabindex', -1);\n\n\t\t/**\n * Tooltip of the button bound to the template.\n *\n * @see #tooltip\n * @see #_getTooltipString\n * @private\n * @observable\n * @member {Boolean} #_tooltipString\n */\n\t\t_this.bind('_tooltipString').to(_this, 'tooltip', _this, 'label', _this, 'keystroke', _this._getTooltipString.bind(_this));\n\n\t\t/**\n * Icon of the button view.\n *\n * @readonly\n * @member {module:ui/icon/iconview~IconView} #iconView\n */\n\n\t\tvar bind = _this.bindTemplate;\n\n\t\t_this.template = new _template2.default({\n\t\t\ttag: 'button',\n\n\t\t\tattributes: {\n\t\t\t\tclass: ['ck-button', bind.if('_tooltipString', 'ck-tooltip_s'), bind.to('isEnabled', function (value) {\n\t\t\t\t\treturn value ? 'ck-enabled' : 'ck-disabled';\n\t\t\t\t}), bind.to('isOn', function (value) {\n\t\t\t\t\treturn value ? 'ck-on' : 'ck-off';\n\t\t\t\t}), bind.if('withText', 'ck-button_with-text')],\n\t\t\t\ttype: bind.to('type', function (value) {\n\t\t\t\t\treturn value ? value : 'button';\n\t\t\t\t}),\n\t\t\t\t'data-ck-tooltip': [bind.to('_tooltipString')],\n\t\t\t\ttabindex: bind.to('tabindex')\n\t\t\t},\n\n\t\t\tchildren: [{\n\t\t\t\ttag: 'span',\n\n\t\t\t\tattributes: {\n\t\t\t\t\tclass: ['ck-button__label']\n\t\t\t\t},\n\n\t\t\t\tchildren: [{\n\t\t\t\t\ttext: bind.to('label')\n\t\t\t\t}]\n\t\t\t}],\n\n\t\t\ton: {\n\t\t\t\tmousedown: bind.to(function (evt) {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t}),\n\n\t\t\t\tclick: bind.to(function (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\t_this.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 * Fired when the button view is clicked. It won't be fired when the button is disabled.\n *\n * @event #execute\n */\n\t\treturn _this;\n\t}\n\n\t/**\n * @inheritDoc\n */\n\n\n\t_createClass(ButtonView, [{\n\t\tkey: 'init',\n\t\tvalue: function init() {\n\t\t\tvar _this2 = this;\n\n\t\t\tvar promise = Promise.resolve();\n\n\t\t\tif (this.icon && !this.iconView) {\n\t\t\t\tvar iconView = this.iconView = new _iconview2.default();\n\n\t\t\t\ticonView.bind('content').to(this, 'icon');\n\n\t\t\t\tthis.element.insertBefore(iconView.element, this.element.firstChild);\n\n\t\t\t\t// Make sure the icon view will be destroyed along with button.\n\t\t\t\tpromise = promise.then(function () {\n\t\t\t\t\treturn _this2.addChildren(iconView);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn promise.then(function () {\n\t\t\t\treturn _get(ButtonView.prototype.__proto__ || Object.getPrototypeOf(ButtonView.prototype), 'init', _this2).call(_this2);\n\t\t\t});\n\t\t}\n\n\t\t/**\n * Focuses the button.\n */\n\n\t}, {\n\t\tkey: 'focus',\n\t\tvalue: function focus() {\n\t\t\tthis.element.focus();\n\t\t}\n\n\t\t/**\n * Gets value for the `data-ck-tooltip` attribute from the combination of\n * {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n *\n * @private\n * @see #tooltip\n * @see #_tooltipString\n * @param {Boolean|String|Function} tooltip Button tooltip.\n * @param {String} label Button label.\n * @param {String} keystroke Button keystroke.\n * @returns {String}\n */\n\n\t}, {\n\t\tkey: '_getTooltipString',\n\t\tvalue: function _getTooltipString(tooltip, label, keystroke) {\n\t\t\tif (tooltip) {\n\t\t\t\tif (typeof tooltip == 'string') {\n\t\t\t\t\treturn tooltip;\n\t\t\t\t} else {\n\t\t\t\t\tif (keystroke) {\n\t\t\t\t\t\tkeystroke = (0, _keyboard.getEnvKeystrokeText)(keystroke);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tooltip instanceof Function) {\n\t\t\t\t\t\treturn tooltip(label, keystroke);\n\t\t\t\t\t} else if (tooltip === true) {\n\t\t\t\t\t\treturn '' + label + (keystroke ? ' (' + keystroke + ')' : '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}]);\n\n\treturn ButtonView;\n}(_view2.default);\n\nexports.default = ButtonView;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-ui/src/button/buttonview.js\n// module id = 26\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\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\nexports.default = arrayMap;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_arrayMap.js\n// module id = 27\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _operation = require('./operation');\n\nvar _operation2 = _interopRequireDefault(_operation);\n\nvar _position = require('../position');\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _range = require('../range');\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _comparearrays = require('@ckeditor/ckeditor5-utils/src/comparearrays');\n\nvar _comparearrays2 = _interopRequireDefault(_comparearrays);\n\nvar _writer = require('./../writer');\n\nvar _writer2 = _interopRequireDefault(_writer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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\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 */\nvar MoveOperation = function (_Operation) {\n\t_inherits(MoveOperation, _Operation);\n\n\t/**\n * Creates a move operation.\n *\n * @param {module:engine/model/position~Position} sourcePosition\n * Position before the first {@link module:engine/model/item~Item model item} to move.\n * @param {Number} howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n * `sourcePosition` with offset shifted by `howMany`.\n * @param {module:engine/model/position~Position} targetPosition Position at which moved nodes will be inserted.\n * @param {Number} baseVersion {@link module:engine/model/document~Document#version} on which operation can be applied.\n */\n\tfunction MoveOperation(sourcePosition, howMany, targetPosition, baseVersion) {\n\t\t_classCallCheck(this, MoveOperation);\n\n\t\t/**\n * Position before the first {@link module:engine/model/item~Item model item} to move.\n *\n * @member {module:engine/model/position~Position} module:engine/model/operation/moveoperation~MoveOperation#sourcePosition\n */\n\t\tvar _this = _possibleConstructorReturn(this, (MoveOperation.__proto__ || Object.getPrototypeOf(MoveOperation)).call(this, baseVersion));\n\n\t\t_this.sourcePosition = _position2.default.createFromPosition(sourcePosition);\n\n\t\t/**\n * Offset size of moved range.\n *\n * @member {Number} module:engine/model/operation/moveoperation~MoveOperation#howMany\n */\n\t\t_this.howMany = howMany;\n\n\t\t/**\n * Position at which moved nodes will be inserted.\n *\n * @member {module:engine/model/position~Position} module:engine/model/operation/moveoperation~MoveOperation#targetPosition\n */\n\t\t_this.targetPosition = _position2.default.createFromPosition(targetPosition);\n\n\t\t/**\n * Defines whether `MoveOperation` is sticky. If `MoveOperation` is sticky, during\n * {@link module:engine/model/operation/transform~transform operational transformation} if there will be an operation that\n * inserts some nodes at the position equal to the boundary of this `MoveOperation`, that operation will\n * get their insertion path updated to the position where this `MoveOperation` moves the range.\n *\n * @member {Boolean} module:engine/model/operation/moveoperation~MoveOperation#isSticky\n */\n\t\t_this.isSticky = false;\n\t\treturn _this;\n\t}\n\n\t/**\n * @inheritDoc\n */\n\n\n\t_createClass(MoveOperation, [{\n\t\tkey: 'clone',\n\n\n\t\t/**\n * @inheritDoc\n * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n */\n\t\tvalue: function clone() {\n\t\t\tvar op = new this.constructor(this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion);\n\t\t\top.isSticky = this.isSticky;\n\n\t\t\treturn op;\n\t\t}\n\n\t\t/**\n * Returns the start position of the moved range after it got moved. This may be different than\n * {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved\n * inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}\n * is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.\n *\n *\t\t vv vv\n *\t\tabcdefg ===> adefbcg\n *\t\t ^ ^\n *\t\t targetPos\tmovedRangeStart\n *\t\t offset 6\toffset 4\n *\n * @returns {module:engine/model/position~Position}\n */\n\n\t}, {\n\t\tkey: 'getMovedRangeStart',\n\t\tvalue: function getMovedRangeStart() {\n\t\t\treturn this.targetPosition._getTransformedByDeletion(this.sourcePosition, this.howMany);\n\t\t}\n\n\t\t/**\n * @inheritDoc\n * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n */\n\n\t}, {\n\t\tkey: 'getReversed',\n\t\tvalue: function getReversed() {\n\t\t\tvar newTargetPosition = this.sourcePosition._getTransformedByInsertion(this.targetPosition, this.howMany);\n\n\t\t\tvar op = new this.constructor(this.getMovedRangeStart(), this.howMany, newTargetPosition, this.baseVersion + 1);\n\t\t\top.isSticky = this.isSticky;\n\n\t\t\treturn op;\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: '_execute',\n\t\tvalue: function _execute() {\n\t\t\tvar sourceElement = this.sourcePosition.parent;\n\t\t\tvar targetElement = this.targetPosition.parent;\n\t\t\tvar sourceOffset = this.sourcePosition.offset;\n\t\t\tvar targetOffset = this.targetPosition.offset;\n\n\t\t\t// Validate whether move operation has correct parameters.\n\t\t\t// Validation is pretty complex but move operation is one of the core ways to manipulate the document state.\n\t\t\t// We expect that many errors might be connected with one of scenarios described below.\n\t\t\tif (!sourceElement || !targetElement) {\n\t\t\t\t/**\n * Source position or target position is invalid.\n *\n * @error move-operation-position-invalid\n */\n\t\t\t\tthrow new _ckeditorerror2.default('move-operation-position-invalid: Source position or target position is invalid.');\n\t\t\t} else if (sourceOffset + this.howMany > sourceElement.maxOffset) {\n\t\t\t\t/**\n * The nodes which should be moved do not exist.\n *\n * @error move-operation-nodes-do-not-exist\n */\n\t\t\t\tthrow new _ckeditorerror2.default('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');\n\t\t\t} else if (sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany) {\n\t\t\t\t/**\n * Trying to move a range of nodes into the middle of that range.\n *\n * @error move-operation-range-into-itself\n */\n\t\t\t\tthrow new _ckeditorerror2.default('move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.');\n\t\t\t} else if (this.sourcePosition.root == this.targetPosition.root) {\n\t\t\t\tif ((0, _comparearrays2.default)(this.sourcePosition.getParentPath(), this.targetPosition.getParentPath()) == 'prefix') {\n\t\t\t\t\tvar i = this.sourcePosition.path.length - 1;\n\n\t\t\t\t\tif (this.targetPosition.path[i] >= sourceOffset && this.targetPosition.path[i] < sourceOffset + this.howMany) {\n\t\t\t\t\t\t/**\n * Trying to move a range of nodes into one of nodes from that range.\n *\n * @error move-operation-node-into-itself\n */\n\t\t\t\t\t\tthrow new _ckeditorerror2.default('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\n\t\t\tvar range = _writer2.default.move(_range2.default.createFromPositionAndShift(this.sourcePosition, this.howMany), this.targetPosition);\n\n\t\t\treturn {\n\t\t\t\tsourcePosition: this.sourcePosition,\n\t\t\t\trange: range\n\t\t\t};\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: 'type',\n\t\tget: function get() {\n\t\t\treturn 'move';\n\t\t}\n\t}], [{\n\t\tkey: 'fromJSON',\n\n\n\t\t/**\n * Creates `MoveOperation` object from deserilized object, i.e. from parsed JSON string.\n *\n * @param {Object} json Deserialized JSON object.\n * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n */\n\t\tvalue: function fromJSON(json, document) {\n\t\t\tvar sourcePosition = _position2.default.fromJSON(json.sourcePosition, document);\n\t\t\tvar targetPosition = _position2.default.fromJSON(json.targetPosition, document);\n\n\t\t\tvar move = new this(sourcePosition, json.howMany, targetPosition, json.baseVersion);\n\n\t\t\tif (json.isSticky) {\n\t\t\t\tmove.isSticky = true;\n\t\t\t}\n\n\t\t\treturn move;\n\t\t}\n\t}, {\n\t\tkey: 'className',\n\t\tget: function get() {\n\t\t\treturn 'engine.model.operation.MoveOperation';\n\t\t}\n\t}]);\n\n\treturn MoveOperation;\n}(_operation2.default);\n\nexports.default = MoveOperation;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/operation/moveoperation.js\n// module id = 28\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _node = require('./node');\n\nvar _node2 = _interopRequireDefault(_node);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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/text\n */\n\n/**\n * Tree view text node.\n *\n * @extends module:engine/view/node~Node\n */\nvar Text = function (_Node) {\n\t_inherits(Text, _Node);\n\n\t/**\n * Creates a tree view text node.\n *\n * @param {String} data Text.\n */\n\tfunction Text(data) {\n\t\t_classCallCheck(this, Text);\n\n\t\t/**\n * The text content.\n *\n * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.\n *\n * @private\n * @member {String} module:engine/view/text~Text#_data\n */\n\t\tvar _this = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this));\n\n\t\t_this._data = data;\n\t\treturn _this;\n\t}\n\n\t/**\n * Clones this node.\n *\n * @returns {module:engine/view/text~Text} Text node that is a clone of this node.\n */\n\n\n\t_createClass(Text, [{\n\t\tkey: 'clone',\n\t\tvalue: function clone() {\n\t\t\treturn new Text(this.data);\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: 'is',\n\t\tvalue: function is(type) {\n\t\t\treturn type == 'text';\n\t\t}\n\n\t\t/**\n * The text content.\n *\n * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.\n */\n\n\t}, {\n\t\tkey: 'isSimilar',\n\n\n\t\t/**\n * Checks if this text node is similar to other text node.\n * Both nodes should have the same data to be considered as similar.\n *\n * @param {module:engine/view/text~Text} otherNode Node to check if it is same as this node.\n * @returns {Boolean}\n */\n\t\tvalue: function isSimilar(otherNode) {\n\t\t\tif (!(otherNode instanceof Text)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this === otherNode || this.data === otherNode.data;\n\t\t}\n\t}, {\n\t\tkey: 'data',\n\t\tget: function get() {\n\t\t\treturn this._data;\n\t\t},\n\t\tset: function set(data) {\n\t\t\tthis._fireChange('text', this);\n\n\t\t\tthis._data = data;\n\t\t}\n\t}]);\n\n\treturn Text;\n}(_node2.default);\n\nexports.default = Text;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/text.js\n// module id = 29\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _checkGlobal = require('./_checkGlobal');\n\nvar _checkGlobal2 = _interopRequireDefault(_checkGlobal);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/** Used to determine if values are of the language type `Object`. */\nvar objectTypes = {\n 'function': true,\n 'object': true\n};\n\n/** Detect free variable `exports`. */\nvar freeExports = objectTypes[typeof exports === 'undefined' ? 'undefined' : _typeof(exports)] && exports && !exports.nodeType ? exports : undefined;\n\n/** Detect free variable `module`. */\nvar freeModule = objectTypes[typeof module === 'undefined' ? 'undefined' : _typeof(module)] && module && !module.nodeType ? module : undefined;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (0, _checkGlobal2.default)(freeExports && freeModule && (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global);\n\n/** Detect free variable `self`. */\nvar freeSelf = (0, _checkGlobal2.default)(objectTypes[typeof self === 'undefined' ? 'undefined' : _typeof(self)] && self);\n\n/** Detect free variable `window`. */\nvar freeWindow = (0, _checkGlobal2.default)(objectTypes[typeof window === 'undefined' ? 'undefined' : _typeof(window)] && window);\n\n/** Detect `this` as the global object. */\nvar thisGlobal = (0, _checkGlobal2.default)(objectTypes[_typeof(undefined)] && undefined);\n\n/**\n * Used as a reference to the global object.\n *\n * The `this` value is used if it's the global object to avoid Greasemonkey's\n * restricted `window` object, otherwise the `window` object is used.\n */\nvar root = freeGlobal || freeWindow !== (thisGlobal && thisGlobal.window) && freeWindow || freeSelf || thisGlobal || Function('return this')();\n\nexports.default = root;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_root.js\n// module id = 30\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\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\nvar _emittermixin = require('./emittermixin');\n\nvar _emittermixin2 = _interopRequireDefault(_emittermixin);\n\nvar _ckeditorerror = require('./ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nvar _extend = require('./lib/lodash/extend');\n\nvar _extend2 = _interopRequireDefault(_extend);\n\nvar _isObject = require('./lib/lodash/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar attributesSymbol = Symbol('attributes');\nvar boundObservablesSymbol = Symbol('boundObservables');\nvar 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 */\nvar ObservableMixin = {\n\t/**\n * Creates and sets the value of an observable attribute of this object. Such an attribute becomes a part\n * of the state and is be observable.\n *\n * It accepts also a single object literal containing key/value pairs with attributes to be set.\n *\n * This method throws the observable-set-cannot-override error if the observable instance already\n * have a property with a given attribute name. This prevents from mistakenly overriding existing\n * properties and methods, but means that `foo.set( 'bar', 1 )` may be slightly slower than `foo.bar = 1`.\n *\n * @method #set\n * @param {String} name The attributes name.\n * @param {*} value The attributes value.\n */\n\tset: function set(name, value) {\n\t\tvar _this = this;\n\n\t\t// If the first parameter is an Object, iterate over its properties.\n\t\tif ((0, _isObject2.default)(name)) {\n\t\t\tObject.keys(name).forEach(function (attr) {\n\t\t\t\t_this.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\tvar attributes = this[attributesSymbol];\n\n\t\tif (name in this && !attributes.has(name)) {\n\t\t\t/**\n * Cannot override an existing property.\n *\n * This error is thrown when trying to {@link ~Observable#set set} an attribute with\n * a name of an already existing property. For example:\n *\n *\t\tlet observable = new Model();\n *\t\tobservable.property = 1;\n *\t\tobservable.set( 'property', 2 );\t\t// throws\n *\n *\t\tobservable.set( 'attr', 1 );\n *\t\tobservable.set( 'attr', 2 );\t\t\t// ok, because this is an existing attribute.\n *\n * @error observable-set-cannot-override\n */\n\t\t\tthrow new _ckeditorerror2.default('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: function get() {\n\t\t\t\treturn attributes.get(name);\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tvar 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\n\t/**\n * Binds observable attributes to another objects implementing {@link ~ObservableMixin}\n * interface (like {@link module:ui/model~Model}).\n *\n * Once bound, the observable will immediately share the current state of attributes\n * of the observable it is bound to and react to the changes to these attributes\n * in the future.\n *\n * **Note**: To release the binding use {@link module:utils/observablemixin~ObservableMixin#unbind}.\n *\n *\t\tA.bind( 'a' ).to( B );\n *\t\tA.bind( 'a' ).to( B, 'b' );\n *\t\tA.bind( 'a', 'b' ).to( B, 'c', 'd' );\n *\t\tA.bind( 'a' ).to( B, 'b', C, 'd', ( b, d ) => b + d );\n *\n * @method #bind\n * @param {...String} bindAttrs Observable attributes that will be bound to another observable(s).\n * @returns {module:utils/observablemixin~BindChain}\n */\n\tbind: function bind() {\n\t\tfor (var _len = arguments.length, bindAttrs = Array(_len), _key = 0; _key < _len; _key++) {\n\t\t\tbindAttrs[_key] = arguments[_key];\n\t\t}\n\n\t\tif (!bindAttrs.length || !isStringArray(bindAttrs)) {\n\t\t\t/**\n * All attributes must be strings.\n *\n * @error observable-bind-wrong-attrs\n */\n\t\t\tthrow new _ckeditorerror2.default('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 * Attributes must be unique.\n *\n * @error observable-bind-duplicate-attrs\n */\n\t\t\tthrow new _ckeditorerror2.default('observable-bind-duplicate-attrs: Attributes must be unique.');\n\t\t}\n\n\t\tinitObservable(this);\n\n\t\tvar boundAttributes = this[boundAttributesSymbol];\n\n\t\tbindAttrs.forEach(function (attrName) {\n\t\t\tif (boundAttributes.has(attrName)) {\n\t\t\t\t/**\n * Cannot bind the same attribute more that once.\n *\n * @error observable-bind-rebind\n */\n\t\t\t\tthrow new _ckeditorerror2.default('observable-bind-rebind: Cannot bind the same attribute more that once.');\n\t\t\t}\n\t\t});\n\n\t\tvar bindings = new Map();\n\n\t\t/**\n * @typedef Binding\n * @type Object\n * @property {Array} attr Attribute which is bound.\n * @property {Array} to Array of observable–attribute components of the binding (`{ observable: ..., attr: .. }`).\n * @property {Array} callback A function which processes `to` components.\n */\n\t\tbindAttrs.forEach(function (a) {\n\t\t\tvar 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 * @typedef BindChain\n * @type Object\n * @property {Function} to See {@link ~ObservableMixin#_bindTo}.\n * @property {module:utils/observablemixin~Observable} _observable The observable which initializes the binding.\n * @property {Array} _bindAttrs Array of `_observable` attributes to be bound.\n * @property {Array} _to Array of `to()` observable–attributes (`{ observable: toObservable, attrs: ...toAttrs }`).\n * @property {Map} _bindings Stores bindings to be kept in\n * {@link ~ObservableMixin#_boundAttributes}/{@link ~ObservableMixin#_boundObservables}\n * initiated in this binding chain.\n */\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\n\t/**\n * Removes the binding created with {@link ~ObservableMixin#bind}.\n *\n *\t\tA.unbind( 'a' );\n *\t\tA.unbind();\n *\n * @method #unbind\n * @param {...String} [unbindAttrs] Observable attributes to be unbound. All the bindings will\n * be released if no attributes provided.\n */\n\tunbind: function unbind() {\n\t\tvar _this2 = this;\n\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\tvar boundAttributes = this[boundAttributesSymbol];\n\t\tvar boundObservables = this[boundObservablesSymbol];\n\n\t\tfor (var _len2 = arguments.length, unbindAttrs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t\t\tunbindAttrs[_key2] = arguments[_key2];\n\t\t}\n\n\t\tif (unbindAttrs.length) {\n\t\t\tif (!isStringArray(unbindAttrs)) {\n\t\t\t\t/**\n * Attributes must be strings.\n *\n * @error observable-unbind-wrong-attrs\n */\n\t\t\t\tthrow new _ckeditorerror2.default('observable-unbind-wrong-attrs: Attributes must be strings.');\n\t\t\t}\n\n\t\t\tunbindAttrs.forEach(function (attrName) {\n\t\t\t\tvar binding = boundAttributes.get(attrName);\n\t\t\t\tvar toObservable = void 0,\n\t\t\t\t toAttr = void 0,\n\t\t\t\t toAttrs = void 0,\n\t\t\t\t toAttrBindings = void 0;\n\n\t\t\t\tbinding.to.forEach(function (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\t_this2.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(function (bindings, boundObservable) {\n\t\t\t\t_this2.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 * @private\n * @member ~ObservableMixin#_boundAttributes\n */\n\n\t/**\n * @private\n * @member ~ObservableMixin#_boundObservables\n */\n\n\t/**\n * @private\n * @member ~ObservableMixin#_bindTo\n */\n\n};\n\nexports.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\n\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() {\n\tvar _this3 = this;\n\n\t/* jshint validthis: true */\n\tvar parsedArgs = parseBindToArgs.apply(undefined, arguments);\n\tvar bindingsKeys = Array.from(this._bindings.keys());\n\tvar 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 * Binding multiple observables only possible with callback.\n *\n * @error observable-bind-no-callback\n */\n\t\tthrow new _ckeditorerror2.default('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 * Cannot bind multiple attributes and use a callback in one binding.\n *\n * @error observable-bind-to-extra-callback\n */\n\t\tthrow new _ckeditorerror2.default('observable-bind-to-extra-callback: Cannot bind multiple attributes and use a callback in one binding.');\n\t}\n\n\tparsedArgs.to.forEach(function (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 * The number of attributes must match.\n *\n * @error observable-bind-to-attrs-length\n */\n\t\t\tthrow new _ckeditorerror2.default('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 = _this3._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(function (attrName) {\n\t\tupdateBoundObservableAttr(_this3._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(function (a) {\n\t\treturn typeof a == 'string';\n\t});\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() {\n\tfor (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t\targs[_key3] = arguments[_key3];\n\t}\n\n\t// Eliminate A.bind( 'x' ).to()\n\tif (!args.length) {\n\t\t/**\n * Invalid argument syntax in `to()`.\n *\n * @error observable-bind-to-parse-error\n */\n\t\tthrow new _ckeditorerror2.default('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');\n\t}\n\n\tvar parsed = { to: [] };\n\tvar lastObservable = void 0;\n\n\tif (typeof args[args.length - 1] == 'function') {\n\t\tparsed.callback = args.pop();\n\t}\n\n\targs.forEach(function (a) {\n\t\tif (typeof a == 'string') {\n\t\t\tlastObservable.attrs.push(a);\n\t\t} else if ((typeof a === 'undefined' ? 'undefined' : _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 _ckeditorerror2.default('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\tvar boundObservables = observable[boundObservablesSymbol];\n\tvar bindingsToObservable = boundObservables.get(toObservable);\n\tvar 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\tvar toAttr = void 0;\n\n\tchain._bindings.forEach(function (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(function (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\tvar boundAttributes = observable[boundAttributesSymbol];\n\tvar binding = boundAttributes.get(attrName);\n\tvar attrValue = void 0;\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(function (to) {\n\t\t\treturn to[0][to[1]];\n\t\t}));\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(function (to) {\n\t\tvar boundObservables = observable[boundObservablesSymbol];\n\t\tvar bindings = void 0;\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', function (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(function (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\n(0, _extend2.default)(ObservableMixin, _emittermixin2.default);\n\n/**\n * Fired when an attribute changed value.\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// WEBPACK FOOTER\n// ../ckeditor5-utils/src/observablemixin.js\n// module id = 31\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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/operation\n */\n\nvar _clone = require('@ckeditor/ckeditor5-utils/src/lib/lodash/clone');\n\nvar _clone2 = _interopRequireDefault(_clone);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Abstract base operation class.\n *\n * @abstract\n */\nvar Operation = function () {\n\t/**\n * Base operation constructor.\n * @param {Number} baseVersion {@link module:engine/model/document~Document#version} on which the operation can be applied.\n */\n\tfunction Operation(baseVersion) {\n\t\t_classCallCheck(this, Operation);\n\n\t\t/**\n * {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to\n * {@link module:engine/model/document~Document#applyOperation apply} operation with different base version than the\n * {@link module:engine/model/document~Document#version document version} the\n * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.\n *\n * @member {Number}\n */\n\t\tthis.baseVersion = baseVersion;\n\n\t\t/**\n * Operation type.\n *\n * @readonly\n * @member {String} #type\n */\n\n\t\t/**\n * {@link module:engine/model/delta/delta~Delta Delta} which the operation is a part of. This property is set by the\n * {@link module:engine/model/delta/delta~Delta delta} when the operations is added to it by the\n * {@link module:engine/model/delta/delta~Delta#addOperation} method.\n *\n * @member {module:engine/model/delta/delta~Delta} #delta\n */\n\n\t\t/**\n * Creates and returns an operation that has the same parameters as this operation.\n *\n * @method #clone\n * @returns {module:engine/model/operation/operation~Operation} Clone of this operation.\n */\n\n\t\t/**\n * Creates and returns a reverse operation. Reverse operation when executed right after\n * the original operation will bring back tree model state to the point before the original\n * operation execution. In other words, it reverses changes done by the original operation.\n *\n * Keep in mind that tree model state may change since executing the original operation,\n * so reverse operation will be \"outdated\". In that case you will need to\n * {@link module:engine/model/operation/transform~transform} it by all operations that were executed after the original operation.\n *\n * @method #getReversed\n * @returns {module:engine/model/operation/operation~Operation} Reversed operation.\n */\n\n\t\t/**\n * Executes the operation - modifications described by the operation attributes\n * will be applied to the tree model.\n *\n * @protected\n * @method #_execute\n * @returns {Object} Object with additional information about the applied changes. It properties depends on the\n * operation type.\n */\n\t}\n\n\t/**\n * Custom toJSON method to solve child-parent circular dependencies.\n *\n * @method #toJSON\n * @returns {Object} Clone of this object with the delta property replaced with string.\n */\n\n\n\t_createClass(Operation, [{\n\t\tkey: 'toJSON',\n\t\tvalue: function toJSON() {\n\t\t\tvar json = (0, _clone2.default)(this, true);\n\n\t\t\tjson.__className = this.constructor.className;\n\n\t\t\t// Remove parent delta to avoid circular dependencies.\n\t\t\tdelete json.delta;\n\n\t\t\treturn json;\n\t\t}\n\n\t\t/**\n * Name of the operation class used for serialization.\n *\n * @type {String}\n */\n\n\t}], [{\n\t\tkey: 'fromJSON',\n\n\n\t\t/**\n * Creates Operation object from deserilized object, i.e. from parsed JSON string.\n *\n * @param {Object} json Deserialized JSON object.\n * @param {module:engine/model/document~Document} doc Document on which this operation will be applied.\n * @returns {module:engine/model/operation/operation~Operation}\n */\n\t\tvalue: function fromJSON(json) {\n\t\t\treturn new this(json.baseVersion);\n\t\t}\n\t}, {\n\t\tkey: 'className',\n\t\tget: function get() {\n\t\t\treturn 'engine.model.operation.Operation';\n\t\t}\n\t}]);\n\n\treturn Operation;\n}();\n\nexports.default = Operation;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/operation/operation.js\n// module id = 32\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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/treewalker\n */\n\nvar _text = require('./text');\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _textproxy = require('./textproxy');\n\nvar _textproxy2 = _interopRequireDefault(_textproxy);\n\nvar _element = require('./element');\n\nvar _element2 = _interopRequireDefault(_element);\n\nvar _position = require('./position');\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _ckeditorerror = require('@ckeditor/ckeditor5-utils/src/ckeditorerror');\n\nvar _ckeditorerror2 = _interopRequireDefault(_ckeditorerror);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */\nvar TreeWalker = function () {\n\t/**\n * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n *\n * @constructor\n * @param {Object} [options={}] Object with configuration.\n * @param {'forward'|'backward'} [options.direction='forward'] Walking direction.\n * @param {module:engine/model/range~Range} [options.boundaries=null] Range to define boundaries of the iterator.\n * @param {module:engine/model/position~Position} [options.startPosition] Starting position.\n * @param {Boolean} [options.singleCharacters=false] Flag indicating whether all consecutive characters with the same attributes\n * should be returned one by one as multiple {@link module:engine/model/textproxy~TextProxy} (`true`) objects or as one\n * {@link module:engine/model/textproxy~TextProxy} (`false`).\n * @param {Boolean} [options.shallow=false] Flag indicating whether iterator should enter elements or not. If the\n * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.\n * @param {Boolean} [options.ignoreElementEnd=false] Flag indicating whether iterator should ignore `elementEnd`\n * tags. If the option is true walker will not return a parent node of start position. If this option is `true`\n * each {@link module:engine/model/element~Element} will be returned once, while if the option is `false` they might be returned\n * twice: for `'elementStart'` and `'elementEnd'`.\n */\n\tfunction TreeWalker() {\n\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t_classCallCheck(this, TreeWalker);\n\n\t\tif (!options.boundaries && !options.startPosition) {\n\t\t\t/**\n * Neither boundaries nor starting position have been defined.\n *\n * @error tree-walker-no-start-position\n */\n\t\t\tthrow new _ckeditorerror2.default('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');\n\t\t}\n\n\t\tvar direction = options.direction || 'forward';\n\n\t\tif (direction != 'forward' && direction != 'backward') {\n\t\t\tthrow new _ckeditorerror2.default('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.', { direction: direction });\n\t\t}\n\n\t\t/**\n * Walking direction. Defaults `'forward'`.\n *\n * @readonly\n * @member {'backward'|'forward'} module:engine/model/treewalker~TreeWalker#direction\n */\n\t\tthis.direction = direction;\n\n\t\t/**\n * Iterator boundaries.\n *\n * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n * on the start of boundary, then `{ done: true }` is returned.\n *\n * If boundaries are not defined they are set before first and after last child of the root node.\n *\n * @readonly\n * @member {module:engine/model/range~Range} module:engine/model/treewalker~TreeWalker#boundaries\n */\n\t\tthis.boundaries = options.boundaries || null;\n\n\t\t/**\n * Iterator position. This is always static position, even if the initial position was a\n * {@link module:engine/model/liveposition~LivePosition live position}. If start position is not defined then position depends\n * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n * is `'backward'` position starts from the end.\n *\n * @readonly\n * @member {module:engine/model/position~Position} module:engine/model/treewalker~TreeWalker#position\n */\n\t\tif (options.startPosition) {\n\t\t\tthis.position = _position2.default.createFromPosition(options.startPosition);\n\t\t} else {\n\t\t\tthis.position = _position2.default.createFromPosition(this.boundaries[this.direction == 'backward' ? 'end' : 'start']);\n\t\t}\n\n\t\t/**\n * Flag indicating whether all consecutive characters with the same attributes should be\n * returned as one {@link module:engine/model/textproxy~TextProxy} (`true`) or one by one (`false`).\n *\n * @readonly\n * @member {Boolean} module:engine/model/treewalker~TreeWalker#singleCharacters\n */\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\n\t\t/**\n * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n * iterated node will not be returned along with `elementEnd` tag.\n *\n * @readonly\n * @member {Boolean} module:engine/model/treewalker~TreeWalker#shallow\n */\n\t\tthis.shallow = !!options.shallow;\n\n\t\t/**\n * Flag indicating whether iterator should ignore `elementEnd` tags. If the option is true walker will not\n * return a parent node of the start position. If this option is `true` each {@link module:engine/model/element~Element} will\n * be returned once, while if the option is `false` they might be returned twice:\n * for `'elementStart'` and `'elementEnd'`.\n *\n * @readonly\n * @member {Boolean} module:engine/model/treewalker~TreeWalker#ignoreElementEnd\n */\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\n\t\t/**\n * Start boundary cached for optimization purposes.\n *\n * @private\n * @member {module:engine/model/element~Element} module:engine/model/treewalker~TreeWalker#_boundaryStartParent\n */\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\n\t\t/**\n * End boundary cached for optimization purposes.\n *\n * @private\n * @member {module:engine/model/element~Element} module:engine/model/treewalker~TreeWalker#_boundaryEndParent\n */\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\n\t\t/**\n * Parent of the most recently visited node. Cached for optimization purposes.\n *\n * @private\n * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n * module:engine/model/treewalker~TreeWalker#_visitedParent\n */\n\t\tthis._visitedParent = this.position.parent;\n\t}\n\n\t/**\n * Iterator interface.\n */\n\n\n\t_createClass(TreeWalker, [{\n\t\tkey: Symbol.iterator,\n\t\tvalue: function value() {\n\t\t\treturn this;\n\t\t}\n\n\t\t/**\n * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n *\n * For example:\n *\n * \t\twalker.skip( value => value.type == 'text' ); // []foo -> foo[]\n * \t\twalker.skip( () => true ); // Move the position to the end: []foo -> foo[]\n * \t\twalker.skip( () => false ); // Do not move the position.\n *\n * @param {Function} skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n * return `true` if the value should be skipped or `false` if not.\n */\n\n\t}, {\n\t\tkey: 'skip',\n\t\tvalue: function skip(_skip) {\n\t\t\tvar done = void 0,\n\t\t\t value = void 0,\n\t\t\t prevPosition = void 0,\n\t\t\t prevVisitedParent = void 0;\n\n\t\t\tdo {\n\t\t\t\tprevPosition = this.position;\n\t\t\t\tprevVisitedParent = this._visitedParent;\n\n\t\t\t\tvar _next2 = this.next();\n\n\t\t\t\tdone = _next2.done;\n\t\t\t\tvalue = _next2.value;\n\t\t\t} while (!done && _skip(value));\n\n\t\t\tif (!done) {\n\t\t\t\tthis.position = prevPosition;\n\t\t\t\tthis._visitedParent = prevVisitedParent;\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Iterator interface method.\n * Detects walking direction and makes step forward or backward.\n *\n * @returns {Object} Object implementing iterator interface, returning information about taken step.\n */\n\n\t}, {\n\t\tkey: 'next',\n\t\tvalue: function next() {\n\t\t\tif (this.direction == 'forward') {\n\t\t\t\treturn this._next();\n\t\t\t} else {\n\t\t\t\treturn this._previous();\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Makes a step forward in model. Moves the {@link #position} to the next position and returns the encountered value.\n *\n * @private\n * @returns {Object}\n * @returns {Boolean} return.done True if iterator is done.\n * @returns {module:engine/model/treewalker~TreeWalkerValue} return.value Information about taken step.\n */\n\n\t}, {\n\t\tkey: '_next',\n\t\tvalue: function _next() {\n\t\t\tvar previousPosition = this.position;\n\t\t\tvar position = _position2.default.createFromPosition(this.position);\n\t\t\tvar parent = this._visitedParent;\n\n\t\t\t// We are at the end of the root.\n\t\t\tif (parent.parent === null && position.offset === parent.maxOffset) {\n\t\t\t\treturn { done: true };\n\t\t\t}\n\n\t\t\t// We reached the walker boundary.\n\t\t\tif (parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset) {\n\t\t\t\treturn { done: true };\n\t\t\t}\n\n\t\t\tvar node = position.textNode ? position.textNode : position.nodeAfter;\n\n\t\t\tif (node instanceof _element2.default) {\n\t\t\t\tif (!this.shallow) {\n\t\t\t\t\t// Manual operations on path internals for optimization purposes. Here and in the rest of the method.\n\t\t\t\t\tposition.path.push(0);\n\t\t\t\t\tthis._visitedParent = node;\n\t\t\t\t} else {\n\t\t\t\t\tposition.offset++;\n\t\t\t\t}\n\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn formatReturnValue('elementStart', node, previousPosition, position, 1);\n\t\t\t} else if (node instanceof _text2.default) {\n\t\t\t\tvar charactersCount = void 0,\n\t\t\t\t offsetInTextNode = void 0;\n\n\t\t\t\tif (this.singleCharacters) {\n\t\t\t\t\tcharactersCount = 1;\n\t\t\t\t} else {\n\t\t\t\t\tvar offset = node.endOffset;\n\n\t\t\t\t\tif (this._boundaryEndParent == parent && this.boundaries.end.offset < offset) {\n\t\t\t\t\t\toffset = this.boundaries.end.offset;\n\t\t\t\t\t}\n\n\t\t\t\t\tcharactersCount = offset - position.offset;\n\t\t\t\t}\n\n\t\t\t\toffsetInTextNode = position.offset - node.startOffset;\n\n\t\t\t\tvar item = new _textproxy2.default(node, offsetInTextNode, charactersCount);\n\n\t\t\t\tposition.offset += charactersCount;\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn formatReturnValue('text', item, previousPosition, position, charactersCount);\n\t\t\t} else {\n\t\t\t\t// `node` is not set, we reached the end of current `parent`.\n\t\t\t\tposition.path.pop();\n\t\t\t\tposition.offset++;\n\t\t\t\tthis.position = position;\n\t\t\t\tthis._visitedParent = parent.parent;\n\n\t\t\t\tif (this.ignoreElementEnd) {\n\t\t\t\t\treturn this._next();\n\t\t\t\t} else {\n\t\t\t\t\treturn formatReturnValue('elementEnd', parent, previousPosition, position);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n * Makes a step backward in model. Moves the {@link #position} to the previous position and returns the encountered value.\n *\n * @private\n * @returns {Object}\n * @returns {Boolean} return.done True if iterator is done.\n * @returns {module:engine/model/treewalker~TreeWalkerValue} return.value Information about taken step.\n */\n\n\t}, {\n\t\tkey: '_previous',\n\t\tvalue: function _previous() {\n\t\t\tvar previousPosition = this.position;\n\t\t\tvar position = _position2.default.createFromPosition(this.position);\n\t\t\tvar parent = this._visitedParent;\n\n\t\t\t// We are at the beginning of the root.\n\t\t\tif (parent.parent === null && position.offset === 0) {\n\t\t\t\treturn { done: true };\n\t\t\t}\n\n\t\t\t// We reached the walker boundary.\n\t\t\tif (parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset) {\n\t\t\t\treturn { done: true };\n\t\t\t}\n\n\t\t\t// Get node just before current position\n\t\t\tvar node = position.textNode ? position.textNode : position.nodeBefore;\n\n\t\t\tif (node instanceof _element2.default) {\n\t\t\t\tposition.offset--;\n\n\t\t\t\tif (!this.shallow) {\n\t\t\t\t\tposition.path.push(node.maxOffset);\n\t\t\t\t\tthis.position = position;\n\t\t\t\t\tthis._visitedParent = node;\n\n\t\t\t\t\tif (this.ignoreElementEnd) {\n\t\t\t\t\t\treturn this._previous();\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn formatReturnValue('elementEnd', node, previousPosition, position);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.position = position;\n\n\t\t\t\t\treturn formatReturnValue('elementStart', node, previousPosition, position, 1);\n\t\t\t\t}\n\t\t\t} else if (node instanceof _text2.default) {\n\t\t\t\tvar charactersCount = void 0,\n\t\t\t\t offsetInTextNode = void 0;\n\n\t\t\t\tif (this.singleCharacters) {\n\t\t\t\t\tcharactersCount = 1;\n\t\t\t\t} else {\n\t\t\t\t\tvar offset = node.startOffset;\n\n\t\t\t\t\tif (this._boundaryStartParent == parent && this.boundaries.start.offset > offset) {\n\t\t\t\t\t\toffset = this.boundaries.start.offset;\n\t\t\t\t\t}\n\n\t\t\t\t\tcharactersCount = position.offset - offset;\n\t\t\t\t}\n\n\t\t\t\toffsetInTextNode = position.offset - node.startOffset;\n\n\t\t\t\tvar item = new _textproxy2.default(node, offsetInTextNode - charactersCount, charactersCount);\n\n\t\t\t\tposition.offset -= charactersCount;\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn formatReturnValue('text', item, previousPosition, position, charactersCount);\n\t\t\t} else {\n\t\t\t\t// `node` is not set, we reached the beginning of current `parent`.\n\t\t\t\tposition.path.pop();\n\t\t\t\tthis.position = position;\n\t\t\t\tthis._visitedParent = parent.parent;\n\n\t\t\t\treturn formatReturnValue('elementStart', parent, previousPosition, position, 1);\n\t\t\t}\n\t\t}\n\t}]);\n\n\treturn TreeWalker;\n}();\n\nexports.default = TreeWalker;\n\n\nfunction formatReturnValue(type, item, previousPosition, nextPosition, length) {\n\treturn {\n\t\tdone: false,\n\t\tvalue: {\n\t\t\ttype: type,\n\t\t\titem: item,\n\t\t\tpreviousPosition: previousPosition,\n\t\t\tnextPosition: nextPosition,\n\t\t\tlength: length\n\t\t}\n\t};\n}\n\n/**\n * Type of the step made by {@link module:engine/model/treewalker~TreeWalker}.\n * Possible values: `'elementStart'` if walker is at the beginning of a node, `'elementEnd'` if walker is at the end of node,\n * `'character'` if walker traversed over a character, or `'text'` if walker traversed over multiple characters (available in\n * character merging mode, see {@link module:engine/model/treewalker~TreeWalker#constructor}).\n *\n * @typedef {'elementStart'|'elementEnd'|'character'|'text'} module:engine/model/treewalker~TreeWalkerValueType\n */\n\n/**\n * Object returned by {@link module:engine/model/treewalker~TreeWalker} when traversing tree model.\n *\n * @typedef {Object} module:engine/model/treewalker~TreeWalkerValue\n * @property {module:engine/model/treewalker~TreeWalkerValueType} type\n * @property {module:engine/model/item~Item} item Item between old and new positions of {@link module:engine/model/treewalker~TreeWalker}.\n * @property {module:engine/model/position~Position} previousPosition Previous position of the iterator.\n * * Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the\n * position before the item. Note that it is more efficient to use this position then calculate the position before\n * the node using {@link module:engine/model/position~Position.createBefore}. It is also more efficient to get the\n * position after node by shifting `previousPosition` by `length`, using {@link module:engine/model/position~Position#getShiftedBy},\n * then calculate the position using {@link module:engine/model/position~Position.createAfter}.\n * * Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after item.\n * @property {module:engine/model/position~Position} nextPosition Next position of the iterator.\n * * Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after the item.\n * * Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position\n * before the item.\n * @property {Number} [length] Length of the item. For `'elementStart'` and `'character'` it is 1. For `'text'` it is\n * the length of the text. For `'elementEnd'` it is undefined.\n */\n\n/**\n * Tree walking directions.\n *\n * @typedef {'forward'|'backward'} module:engine/view/treewalker~TreeWalkerDirection\n */\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/treewalker.js\n// module id = 33\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /**\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/range\n */\n\nvar _position = require('./position');\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _treewalker = require('./treewalker');\n\nvar _treewalker2 = _interopRequireDefault(_treewalker);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Tree view range.\n */\nvar Range = function () {\n\t/**\n * Creates a range spanning from `start` position to `end` position.\n *\n * **Note:** Constructor creates it's own {@link module:engine/view/position~Position} instances basing on passed values.\n *\n * @param {module:engine/view/position~Position} start Start position.\n * @param {module:engine/view/position~Position} [end] End position. If not set, range will be collapsed at `start` position.\n */\n\tfunction Range(start) {\n\t\tvar end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n\t\t_classCallCheck(this, Range);\n\n\t\t/**\n * Start position.\n *\n * @member {module:engine/view/position~Position}\n */\n\t\tthis.start = _position2.default.createFromPosition(start);\n\n\t\t/**\n * End position.\n *\n * @member {module:engine/view/position~Position}\n */\n\t\tthis.end = end ? _position2.default.createFromPosition(end) : _position2.default.createFromPosition(start);\n\t}\n\n\t/**\n * Returns an iterator that iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns\n * them together with additional information like length or {@link module:engine/view/position~Position positions},\n * grouped as {@link module:engine/view/treewalker~TreeWalkerValue}.\n *\n * This iterator uses {@link module:engine/view/treewalker~TreeWalker TreeWalker} with `boundaries` set to this range and\n * `ignoreElementEnd` option\n * set to `true`.\n *\n * @returns {Iterable.}\n */\n\n\n\t_createClass(Range, [{\n\t\tkey: Symbol.iterator,\n\t\tvalue: regeneratorRuntime.mark(function value() {\n\t\t\treturn regeneratorRuntime.wrap(function value$(_context) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context.prev = _context.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn _context.delegateYield(new _treewalker2.default({ boundaries: this, ignoreElementEnd: true }), 't0', 1);\n\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, value, this);\n\t\t})\n\n\t\t/**\n * Returns whether the range is collapsed, that is it start and end positions are equal.\n *\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'getEnlarged',\n\n\n\t\t/**\n * Creates a maximal range that has the same content as this range but is expanded in both ways (at the beginning\n * and at the end).\n *\n * For example:\n *\n * \t\t

Foo

{Bar}

->

Foo

[

Bar]

\n * \t\t

foo{bar}

->

foo[bar]

\n *\n * Note that in the sample above:\n * - `

` have type of {@link module:engine/view/containerelement~ContainerElement},\n * - `` have type of {@link module:engine/view/attributeelement~AttributeElement},\n * - `` have type of {@link module:engine/view/uielement~UIElement}.\n *\n * @returns {module:engine/view/range~Range} Enlarged range.\n */\n\t\tvalue: function getEnlarged() {\n\t\t\tvar start = this.start.getLastMatchingPosition(enlargeShrinkSkip, { direction: 'backward' });\n\t\t\tvar end = this.end.getLastMatchingPosition(enlargeShrinkSkip);\n\n\t\t\t// Fix positions, in case if they are in Text node.\n\t\t\tif (start.parent.is('text') && start.isAtStart) {\n\t\t\t\tstart = _position2.default.createBefore(start.parent);\n\t\t\t}\n\n\t\t\tif (end.parent.is('text') && end.isAtEnd) {\n\t\t\t\tend = _position2.default.createAfter(end.parent);\n\t\t\t}\n\n\t\t\treturn new Range(start, end);\n\t\t}\n\n\t\t/**\n * Creates a minimum range that has the same content as this range but is trimmed in both ways (at the beginning\n * and at the end).\n *\n * For example:\n *\n * \t\t

Foo

[

Bar]

->

Foo

{Bar}

\n * \t\t

foo[bar]

->

foo{bar}

\n *\n * Note that in the sample above:\n * - `

` have type of {@link module:engine/view/containerelement~ContainerElement},\n * - `` have type of {@link module:engine/view/attributeelement~AttributeElement},\n * - `` have type of {@link module:engine/view/uielement~UIElement}.\n *\n * @returns {module:engine/view/range~Range} Shrink range.\n */\n\n\t}, {\n\t\tkey: 'getTrimmed',\n\t\tvalue: function getTrimmed() {\n\t\t\tvar start = this.start.getLastMatchingPosition(enlargeShrinkSkip);\n\t\t\tvar end = this.end.getLastMatchingPosition(enlargeShrinkSkip, { direction: 'backward' });\n\t\t\tvar nodeAfterStart = start.nodeAfter;\n\t\t\tvar nodeBeforeEnd = end.nodeBefore;\n\n\t\t\t// Because TreeWalker prefers positions next to text node, we need to move them manually into these text nodes.\n\t\t\tif (nodeAfterStart && nodeAfterStart.is('text')) {\n\t\t\t\tstart = new _position2.default(nodeAfterStart, 0);\n\t\t\t}\n\n\t\t\tif (nodeBeforeEnd && nodeBeforeEnd.is('text')) {\n\t\t\t\tend = new _position2.default(nodeBeforeEnd, nodeBeforeEnd.data.length);\n\t\t\t}\n\n\t\t\treturn new Range(start, end);\n\t\t}\n\n\t\t/**\n * Two ranges are equal if their start and end positions are equal.\n *\n * @param {module:engine/view/range~Range} otherRange Range to compare with.\n * @returns {Boolean} `true` if ranges are equal, `false` otherwise\n */\n\n\t}, {\n\t\tkey: 'isEqual',\n\t\tvalue: function isEqual(otherRange) {\n\t\t\treturn this == otherRange || this.start.isEqual(otherRange.start) && this.end.isEqual(otherRange.end);\n\t\t}\n\n\t\t/**\n * Checks whether this range contains given {@link module:engine/view/position~Position position}.\n *\n * @param {module:engine/view/position~Position} position Position to check.\n * @returns {Boolean} `true` if given {@link module:engine/view/position~Position position} is contained in this range, `false` otherwise.\n */\n\n\t}, {\n\t\tkey: 'containsPosition',\n\t\tvalue: function containsPosition(position) {\n\t\t\treturn position.isAfter(this.start) && position.isBefore(this.end);\n\t\t}\n\n\t\t/**\n * Checks whether this range contains given {@link module:engine/view/range~Range range}.\n *\n * @param {module:engine/view/range~Range} otherRange Range to check.\n * @returns {Boolean} `true` if given {@link module:engine/view/range~Range range} boundaries are contained by this range, `false`\n * otherwise.\n */\n\n\t}, {\n\t\tkey: 'containsRange',\n\t\tvalue: function containsRange(otherRange) {\n\t\t\treturn this.containsPosition(otherRange.start) && this.containsPosition(otherRange.end);\n\t\t}\n\n\t\t/**\n * Computes which part(s) of this {@link module:engine/view/range~Range range} is not a part of given\n * {@link module:engine/view/range~Range range}.\n * Returned array contains zero, one or two {@link module:engine/view/range~Range ranges}.\n *\n * Examples:\n *\n *\t\tlet foo = new Text( 'foo' );\n *\t\tlet img = new ContainerElement( 'img' );\n *\t\tlet bar = new Text( 'bar' );\n *\t\tlet p = new ContainerElement( 'p', null, [ foo, img, bar ] );\n *\n *\t\tlet range = new Range( new Position( foo, 2 ), new Position( bar, 1 ); // \"o\", img, \"b\" are in range.\n *\t\tlet otherRange = new Range( new Position( foo, 1 ), new Position( bar, 2 ); \"oo\", img, \"ba\" are in range.\n *\t\tlet transformed = range.getDifference( otherRange );\n *\t\t// transformed array has no ranges because `otherRange` contains `range`\n *\n *\t\totherRange = new Range( new Position( foo, 1 ), new Position( p, 2 ); // \"oo\", img are in range.\n *\t\ttransformed = range.getDifference( otherRange );\n *\t\t// transformed array has one range: from ( p, 2 ) to ( bar, 1 )\n *\n *\t\totherRange = new Range( new Position( p, 1 ), new Position( p, 2 ) ); // img is in range.\n *\t\ttransformed = range.getDifference( otherRange );\n *\t\t// transformed array has two ranges: from ( foo, 1 ) to ( p, 1 ) and from ( p, 2 ) to ( bar, 1 )\n *\n * @param {module:engine/view/range~Range} otherRange Range to differentiate against.\n * @returns {Array.} The difference between ranges.\n */\n\n\t}, {\n\t\tkey: 'getDifference',\n\t\tvalue: function getDifference(otherRange) {\n\t\t\tvar ranges = [];\n\n\t\t\tif (this.isIntersecting(otherRange)) {\n\t\t\t\t// Ranges intersect.\n\n\t\t\t\tif (this.containsPosition(otherRange.start)) {\n\t\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\t\tranges.push(new Range(this.start, otherRange.start));\n\t\t\t\t}\n\n\t\t\t\tif (this.containsPosition(otherRange.end)) {\n\t\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\t\tranges.push(new Range(otherRange.end, this.end));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Ranges do not intersect, return the original range.\n\t\t\t\tranges.push(Range.createFromRange(this));\n\t\t\t}\n\n\t\t\treturn ranges;\n\t\t}\n\n\t\t/**\n * Returns an intersection of this {@link module:engine/view/range~Range range} and given {@link module:engine/view/range~Range range}.\n * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n *\n * Examples:\n *\n *\t\tlet foo = new Text( 'foo' );\n *\t\tlet img = new ContainerElement( 'img' );\n *\t\tlet bar = new Text( 'bar' );\n *\t\tlet p = new ContainerElement( 'p', null, [ foo, img, bar ] );\n *\n *\t\tlet range = new Range( new Position( foo, 2 ), new Position( bar, 1 ); // \"o\", img, \"b\" are in range.\n *\t\tlet otherRange = new Range( new Position( foo, 1 ), new Position( p, 2 ); // \"oo\", img are in range.\n *\t\tlet transformed = range.getIntersection( otherRange ); // range from ( foo, 1 ) to ( p, 2 ).\n *\n *\t\totherRange = new Range( new Position( bar, 1 ), new Position( bar, 3 ); \"ar\" is in range.\n *\t\ttransformed = range.getIntersection( otherRange ); // null - no common part.\n *\n * @param {module:engine/view/range~Range} otherRange Range to check for intersection.\n * @returns {module:engine/view/range~Range|null} A common part of given ranges or `null` if ranges have no common part.\n */\n\n\t}, {\n\t\tkey: 'getIntersection',\n\t\tvalue: function getIntersection(otherRange) {\n\t\t\tif (this.isIntersecting(otherRange)) {\n\t\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t\t// At most, it will be same as this range.\n\t\t\t\tvar commonRangeStart = this.start;\n\t\t\t\tvar commonRangeEnd = this.end;\n\n\t\t\t\tif (this.containsPosition(otherRange.start)) {\n\t\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t\t// shrink common range to the given range start.\n\t\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t\t}\n\n\t\t\t\tif (this.containsPosition(otherRange.end)) {\n\t\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t\t// shrink common range to the given range end.\n\t\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t\t}\n\n\t\t\t\treturn new Range(commonRangeStart, commonRangeEnd);\n\t\t\t}\n\n\t\t\t// Ranges do not intersect, so they do not have common part.\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n * Creates a {@link module:engine/view/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n *\n * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n * @param {module:engine/view/position~Position} [options.startPosition]\n * @param {Boolean} [options.singleCharacters=false]\n * @param {Boolean} [options.shallow=false]\n * @param {Boolean} [options.ignoreElementEnd=false]\n */\n\n\t}, {\n\t\tkey: 'getWalker',\n\t\tvalue: function getWalker() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t\toptions.boundaries = this;\n\n\t\t\treturn new _treewalker2.default(options);\n\t\t}\n\n\t\t/**\n * Returns an iterator that iterates over all {@link module:engine/view/item~Item view items} that are in this range and returns\n * them.\n *\n * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n * set to `true`. However it returns only {@link module:engine/view/item~Item items},\n * not {@link module:engine/view/treewalker~TreeWalkerValue}.\n *\n * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for\n * a full list of available options.\n *\n * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n * @returns {Iterable.}\n */\n\n\t}, {\n\t\tkey: 'getItems',\n\t\tvalue: regeneratorRuntime.mark(function getItems() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t\tvar treeWalker, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value;\n\n\t\t\treturn regeneratorRuntime.wrap(function getItems$(_context2) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context2.prev = _context2.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\toptions.boundaries = this;\n\t\t\t\t\t\t\toptions.ignoreElementEnd = true;\n\n\t\t\t\t\t\t\ttreeWalker = new _treewalker2.default(options);\n\t\t\t\t\t\t\t_iteratorNormalCompletion = true;\n\t\t\t\t\t\t\t_didIteratorError = false;\n\t\t\t\t\t\t\t_iteratorError = undefined;\n\t\t\t\t\t\t\t_context2.prev = 6;\n\t\t\t\t\t\t\t_iterator = treeWalker[Symbol.iterator]();\n\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\tif (_iteratorNormalCompletion = (_step = _iterator.next()).done) {\n\t\t\t\t\t\t\t\t_context2.next = 15;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_value = _step.value;\n\t\t\t\t\t\t\t_context2.next = 12;\n\t\t\t\t\t\t\treturn _value.item;\n\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\t_iteratorNormalCompletion = true;\n\t\t\t\t\t\t\t_context2.next = 8;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\t_context2.next = 21;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\t_context2.prev = 17;\n\t\t\t\t\t\t\t_context2.t0 = _context2['catch'](6);\n\t\t\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t\t\t_iteratorError = _context2.t0;\n\n\t\t\t\t\t\tcase 21:\n\t\t\t\t\t\t\t_context2.prev = 21;\n\t\t\t\t\t\t\t_context2.prev = 22;\n\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\t_context2.prev = 24;\n\n\t\t\t\t\t\t\tif (!_didIteratorError) {\n\t\t\t\t\t\t\t\t_context2.next = 27;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow _iteratorError;\n\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn _context2.finish(24);\n\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn _context2.finish(21);\n\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context2.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getItems, this, [[6, 17, 21, 29], [22,, 24, 28]]);\n\t\t})\n\n\t\t/**\n * Returns an iterator that iterates over all {@link module:engine/view/position~Position positions} that are boundaries or\n * contained in this range.\n *\n * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n * {@link module:engine/view/position~Position positions}, not {@link module:engine/view/treewalker~TreeWalkerValue}.\n *\n * You may specify additional options for the tree walker. See {@link module:engine/view/treewalker~TreeWalker} for\n * a full list of available options.\n *\n * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n * @returns {Iterable.}\n */\n\n\t}, {\n\t\tkey: 'getPositions',\n\t\tvalue: regeneratorRuntime.mark(function getPositions() {\n\t\t\tvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\t\t\tvar treeWalker, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, _value2;\n\n\t\t\treturn regeneratorRuntime.wrap(function getPositions$(_context3) {\n\t\t\t\twhile (1) {\n\t\t\t\t\tswitch (_context3.prev = _context3.next) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\toptions.boundaries = this;\n\n\t\t\t\t\t\t\ttreeWalker = new _treewalker2.default(options);\n\t\t\t\t\t\t\t_context3.next = 4;\n\t\t\t\t\t\t\treturn treeWalker.position;\n\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t_iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\t_didIteratorError2 = false;\n\t\t\t\t\t\t\t_iteratorError2 = undefined;\n\t\t\t\t\t\t\t_context3.prev = 7;\n\t\t\t\t\t\t\t_iterator2 = treeWalker[Symbol.iterator]();\n\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\tif (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {\n\t\t\t\t\t\t\t\t_context3.next = 16;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t_value2 = _step2.value;\n\t\t\t\t\t\t\t_context3.next = 13;\n\t\t\t\t\t\t\treturn _value2.nextPosition;\n\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\t_iteratorNormalCompletion2 = true;\n\t\t\t\t\t\t\t_context3.next = 9;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\t_context3.next = 22;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\t_context3.prev = 18;\n\t\t\t\t\t\t\t_context3.t0 = _context3['catch'](7);\n\t\t\t\t\t\t\t_didIteratorError2 = true;\n\t\t\t\t\t\t\t_iteratorError2 = _context3.t0;\n\n\t\t\t\t\t\tcase 22:\n\t\t\t\t\t\t\t_context3.prev = 22;\n\t\t\t\t\t\t\t_context3.prev = 23;\n\n\t\t\t\t\t\t\tif (!_iteratorNormalCompletion2 && _iterator2.return) {\n\t\t\t\t\t\t\t\t_iterator2.return();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\t_context3.prev = 25;\n\n\t\t\t\t\t\t\tif (!_didIteratorError2) {\n\t\t\t\t\t\t\t\t_context3.next = 28;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow _iteratorError2;\n\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn _context3.finish(25);\n\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn _context3.finish(22);\n\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\tcase 'end':\n\t\t\t\t\t\t\treturn _context3.stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, getPositions, this, [[7, 18, 22, 30], [23,, 25, 29]]);\n\t\t})\n\n\t\t/**\n * Checks and returns whether this range intersects with given range.\n *\n * @param {module:engine/view/range~Range} otherRange Range to compare with.\n * @returns {Boolean} True if ranges intersect.\n */\n\n\t}, {\n\t\tkey: 'isIntersecting',\n\t\tvalue: function isIntersecting(otherRange) {\n\t\t\treturn this.start.isBefore(otherRange.end) && this.end.isAfter(otherRange.start);\n\t\t}\n\n\t\t/**\n * Creates a range from given parents and offsets.\n *\n * @param {module:engine/view/element~Element} startElement Start position parent element.\n * @param {Number} startOffset Start position offset.\n * @param {module:engine/view/element~Element} endElement End position parent element.\n * @param {Number} endOffset End position offset.\n * @returns {module:engine/view/range~Range} Created range.\n */\n\n\t}, {\n\t\tkey: 'isCollapsed',\n\t\tget: function get() {\n\t\t\treturn this.start.isEqual(this.end);\n\t\t}\n\n\t\t/**\n * Returns whether this range is flat, that is if {@link module:engine/view/range~Range#start start} position and\n * {@link module:engine/view/range~Range#end end} position are in the same {@link module:engine/view/position~Position#parent parent}.\n *\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: 'isFlat',\n\t\tget: function get() {\n\t\t\treturn this.start.parent === this.end.parent;\n\t\t}\n\n\t\t/**\n * Range root element.\n *\n * @type {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment}\n */\n\n\t}, {\n\t\tkey: 'root',\n\t\tget: function get() {\n\t\t\treturn this.start.root;\n\t\t}\n\t}], [{\n\t\tkey: 'createFromParentsAndOffsets',\n\t\tvalue: function createFromParentsAndOffsets(startElement, startOffset, endElement, endOffset) {\n\t\t\treturn new this(new _position2.default(startElement, startOffset), new _position2.default(endElement, endOffset));\n\t\t}\n\n\t\t/**\n * Creates and returns a new instance of Range which is equal to passed range.\n *\n * @param {module:engine/view/range~Range} range Range to clone.\n * @returns {module:engine/view/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createFromRange',\n\t\tvalue: function createFromRange(range) {\n\t\t\treturn new this(range.start, range.end);\n\t\t}\n\n\t\t/**\n * Creates a new range, spreading from specified {@link module:engine/view/position~Position position} to a position moved by\n * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n *\n * @param {module:engine/view/position~Position} position Beginning of the range.\n * @param {Number} shift How long the range should be.\n * @returns {module:engine/view/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createFromPositionAndShift',\n\t\tvalue: function createFromPositionAndShift(position, shift) {\n\t\t\tvar start = position;\n\t\t\tvar end = position.getShiftedBy(shift);\n\n\t\t\treturn shift > 0 ? new this(start, end) : new this(end, start);\n\t\t}\n\n\t\t/**\n * Creates a range inside an {@link module:engine/view/element~Element element} which starts before the first child of\n * that element and ends after the last child of that element.\n *\n * @param {module:engine/view/element~Element} element Element which is a parent for the range.\n * @returns {module:engine/view/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createIn',\n\t\tvalue: function createIn(element) {\n\t\t\treturn this.createFromParentsAndOffsets(element, 0, element, element.childCount);\n\t\t}\n\n\t\t/**\n * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n *\n * @param {module:engine/view/item~Item} item\n * @returns {module:engine/view/range~Range}\n */\n\n\t}, {\n\t\tkey: 'createOn',\n\t\tvalue: function createOn(item) {\n\t\t\treturn this.createFromPositionAndShift(_position2.default.createBefore(item), 1);\n\t\t}\n\t}]);\n\n\treturn Range;\n}();\n\n// Function used by getEnlagred and getShrinked methods.\n\n\nexports.default = Range;\nfunction enlargeShrinkSkip(value) {\n\tif (value.item.is('attributeElement') || value.item.is('uiElement')) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/range.js\n// module id = 34\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : length + start;\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : end - start >>> 0;\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexports.default = baseSlice;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_baseSlice.js\n// module id = 35\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;\n}\n\nexports.default = isIndex;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_isIndex.js\n// module id = 36\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _operation = require('./operation');\n\nvar _operation2 = _interopRequireDefault(_operation);\n\nvar _position = require('../position');\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _nodelist = require('../nodelist');\n\nvar _nodelist2 = _interopRequireDefault(_nodelist);\n\nvar _removeoperation = require('./removeoperation');\n\nvar _removeoperation2 = _interopRequireDefault(_removeoperation);\n\nvar _writer = require('./../writer');\n\nvar _writer2 = _interopRequireDefault(_writer);\n\nvar _text = require('../text');\n\nvar _text2 = _interopRequireDefault(_text);\n\nvar _element = require('../element');\n\nvar _element2 = _interopRequireDefault(_element);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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/insertoperation\n */\n\n/**\n * Operation to insert one or more nodes at given position in the model.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nvar InsertOperation = function (_Operation) {\n\t_inherits(InsertOperation, _Operation);\n\n\t/**\n * Creates an insert operation.\n *\n * @param {module:engine/model/position~Position} position Position of insertion.\n * @param {module:engine/model/node~NodeSet} nodes The list of nodes to be inserted.\n * @param {Number} baseVersion {@link module:engine/model/document~Document#version} on which operation can be applied.\n */\n\tfunction InsertOperation(position, nodes, baseVersion) {\n\t\t_classCallCheck(this, InsertOperation);\n\n\t\t/**\n * Position of insertion.\n *\n * @readonly\n * @member {module:engine/model/position~Position} module:engine/model/operation/insertoperation~InsertOperation#position\n */\n\t\tvar _this = _possibleConstructorReturn(this, (InsertOperation.__proto__ || Object.getPrototypeOf(InsertOperation)).call(this, baseVersion));\n\n\t\t_this.position = _position2.default.createFromPosition(position);\n\n\t\t/**\n * List of nodes to insert.\n *\n * @readonly\n * @member {module:engine/model/nodelist~NodeList} module:engine/model/operation/insertoperation~InsertOperation#nodeList\n */\n\t\t_this.nodes = new _nodelist2.default((0, _writer.normalizeNodes)(nodes));\n\t\treturn _this;\n\t}\n\n\t/**\n * @inheritDoc\n */\n\n\n\t_createClass(InsertOperation, [{\n\t\tkey: 'clone',\n\n\n\t\t/**\n * @inheritDoc\n * @returns {module:engine/model/operation/insertoperation~InsertOperation}\n */\n\t\tvalue: function clone() {\n\t\t\tvar nodes = new _nodelist2.default([].concat(_toConsumableArray(this.nodes)).map(function (node) {\n\t\t\t\treturn node.clone(true);\n\t\t\t}));\n\n\t\t\treturn new InsertOperation(this.position, nodes, this.baseVersion);\n\t\t}\n\n\t\t/**\n * @inheritDoc\n * @returns {module:engine/model/operation/removeoperation~RemoveOperation}\n */\n\n\t}, {\n\t\tkey: 'getReversed',\n\t\tvalue: function getReversed() {\n\t\t\treturn new _removeoperation2.default(this.position, this.nodes.maxOffset, this.baseVersion + 1);\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: '_execute',\n\t\tvalue: function _execute() {\n\t\t\t// What happens here is that we want original nodes be passed to writer because we want original nodes\n\t\t\t// to be inserted to the model. But in InsertOperation, we want to keep those nodes as they were added\n\t\t\t// to the operation, not modified. For example, text nodes can get merged or cropped while Elements can\n\t\t\t// get children. It is important that InsertOperation has the copy of original nodes in intact state.\n\t\t\tvar originalNodes = this.nodes;\n\t\t\tthis.nodes = new _nodelist2.default([].concat(_toConsumableArray(originalNodes)).map(function (node) {\n\t\t\t\treturn node.clone(true);\n\t\t\t}));\n\n\t\t\tvar range = _writer2.default.insert(this.position, originalNodes);\n\n\t\t\treturn { range: range };\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: 'type',\n\t\tget: function get() {\n\t\t\treturn 'insert';\n\t\t}\n\t}], [{\n\t\tkey: 'fromJSON',\n\n\n\t\t/**\n * Creates `InsertOperation` object from deserilized object, i.e. from parsed JSON string.\n *\n * @param {Object} json Deserialized JSON object.\n * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n * @returns {module:engine/model/operation/insertoperation~InsertOperation}\n */\n\t\tvalue: function fromJSON(json, document) {\n\t\t\tvar children = [];\n\n\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\tvar _didIteratorError = false;\n\t\t\tvar _iteratorError = undefined;\n\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = json.nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar child = _step.value;\n\n\t\t\t\t\tif (child.name) {\n\t\t\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\t\t\tchildren.push(_element2.default.fromJSON(child));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\t\t\tchildren.push(_text2.default.fromJSON(child));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new InsertOperation(_position2.default.fromJSON(json.position, document), children, json.baseVersion);\n\t\t}\n\t}, {\n\t\tkey: 'className',\n\t\tget: function get() {\n\t\t\treturn 'engine.model.operation.InsertOperation';\n\t\t}\n\t}]);\n\n\treturn InsertOperation;\n}(_operation2.default);\n\nexports.default = InsertOperation;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/operation/insertoperation.js\n// module id = 37\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _moveoperation = require('./moveoperation');\n\nvar _moveoperation2 = _interopRequireDefault(_moveoperation);\n\nvar _position = require('../position');\n\nvar _position2 = _interopRequireDefault(_position);\n\nvar _element = require('../element');\n\nvar _element2 = _interopRequireDefault(_element);\n\nvar _reinsertoperation = require('./reinsertoperation');\n\nvar _reinsertoperation2 = _interopRequireDefault(_reinsertoperation);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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/removeoperation\n */\n\n/**\n * Operation to remove a range of nodes.\n */\nvar RemoveOperation = function (_MoveOperation) {\n\t_inherits(RemoveOperation, _MoveOperation);\n\n\t/**\n * Creates a remove operation.\n *\n * @param {module:engine/model/position~Position} position Position before the first {@link module:engine/model/item~Item model item} to\n * remove.\n * @param {Number} howMany Offset size of removed range. {@link module:engine/model/item~Item Model items} will be removed starting\n * from `sourcePosition`, up to a `sourcePosition` with offset shifted by `howMany`.\n * @param {Number} baseVersion {@link module:engine/model/document~Document#version} on which operation can be applied.\n */\n\tfunction RemoveOperation(position, howMany, baseVersion) {\n\t\t_classCallCheck(this, RemoveOperation);\n\n\t\tvar graveyard = position.root.document.graveyard;\n\t\tvar graveyardPosition = new _position2.default(graveyard, [graveyard.maxOffset, 0]);\n\n\t\treturn _possibleConstructorReturn(this, (RemoveOperation.__proto__ || Object.getPrototypeOf(RemoveOperation)).call(this, position, howMany, graveyardPosition, baseVersion));\n\t}\n\n\t/**\n * @inheritDoc\n */\n\n\n\t_createClass(RemoveOperation, [{\n\t\tkey: 'getReversed',\n\n\n\t\t/**\n * @inheritDoc\n * @returns {module:engine/model/operation/reinsertoperation~ReinsertOperation}\n */\n\t\tvalue: function getReversed() {\n\t\t\treturn new _reinsertoperation2.default(this.targetPosition, this.howMany, this.sourcePosition, this.baseVersion + 1);\n\t\t}\n\n\t\t/**\n * @inheritDoc\n * @returns {module:engine/model/operation/removeoperation~RemoveOperation}\n */\n\n\t}, {\n\t\tkey: 'clone',\n\t\tvalue: function clone() {\n\t\t\tvar removeOperation = new RemoveOperation(this.sourcePosition, this.howMany, this.baseVersion);\n\t\t\tremoveOperation.targetPosition = _position2.default.createFromPosition(this.targetPosition);\n\n\t\t\treturn removeOperation;\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: '_execute',\n\t\tvalue: function _execute() {\n\t\t\t// Insert \"holder\" element in graveyard root, if the operation needs it.\n\t\t\tif (this._needsHolderElement) {\n\t\t\t\tvar graveyard = this.targetPosition.root;\n\t\t\t\tvar holderElement = new _element2.default('$graveyardHolder');\n\n\t\t\t\tgraveyard.insertChildren(this._holderElementOffset, holderElement);\n\n\t\t\t\t// If the operation removes nodes that are already in graveyard, it may happen that\n\t\t\t\t// the operation's source position is invalidated by inserting new holder element into the graveyard.\n\t\t\t\t// If that's the case, we need to fix source position path.\n\t\t\t\tif (this.sourcePosition.root == graveyard && this.sourcePosition.path[0] >= this._holderElementOffset) {\n\t\t\t\t\tthis.sourcePosition.path[0]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Then, execute as a move operation.\n\t\t\treturn _get(RemoveOperation.prototype.__proto__ || Object.getPrototypeOf(RemoveOperation.prototype), '_execute', this).call(this);\n\t\t}\n\n\t\t/**\n * @inheritDoc\n */\n\n\t}, {\n\t\tkey: 'type',\n\t\tget: function get() {\n\t\t\treturn 'remove';\n\t\t}\n\n\t\t/**\n * Offset of the graveyard \"holder\" element, in which nodes removed by this operation are stored.\n *\n * @protected\n * @type {Number}\n */\n\n\t}, {\n\t\tkey: '_holderElementOffset',\n\t\tget: function get() {\n\t\t\treturn this.targetPosition.path[0];\n\t\t}\n\n\t\t/**\n * Sets {@link module:engine/model/operation/removeoperation~RemoveOperation#_holderElementOffset}.\n *\n * @protected\n * @param {Number} offset\n */\n\t\t,\n\t\tset: function set(offset) {\n\t\t\tthis.targetPosition.path[0] = offset;\n\t\t}\n\n\t\t/**\n * Flag informing whether this operation should insert \"holder\" element (`true`) or should move removed nodes\n * into existing \"holder\" element (`false`).\n *\n * It is `true` for each `RemoveOperation` that is the first `RemoveOperation` in it's delta that points to given holder element.\n * This way only one `RemoveOperation` in given delta will insert \"holder\" element.\n *\n * @protected\n * @type {Boolean}\n */\n\n\t}, {\n\t\tkey: '_needsHolderElement',\n\t\tget: function get() {\n\t\t\tif (this.delta) {\n\t\t\t\t// Let's look up all operations from this delta in the same order as they are in the delta.\n\t\t\t\tvar _iteratorNormalCompletion = true;\n\t\t\t\tvar _didIteratorError = false;\n\t\t\t\tvar _iteratorError = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (var _iterator = this.delta.operations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\t\tvar operation = _step.value;\n\n\t\t\t\t\t\t// We are interested only in `RemoveOperation`s.\n\t\t\t\t\t\tif (operation instanceof RemoveOperation) {\n\t\t\t\t\t\t\t// If the first `RemoveOperation` in the delta is this operation, this operation\n\t\t\t\t\t\t\t// needs to insert holder element in the graveyard.\n\t\t\t\t\t\t\tif (operation == this) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t} else if (operation._holderElementOffset == this._holderElementOffset) {\n\t\t\t\t\t\t\t\t// If there is a `RemoveOperation` in this delta that \"points\" to the same holder element offset,\n\t\t\t\t\t\t\t\t// that operation will already insert holder element at that offset. We should not create another holder.\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\t_didIteratorError = true;\n\t\t\t\t\t_iteratorError = err;\n\t\t\t\t} finally {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return) {\n\t\t\t\t\t\t\t_iterator.return();\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (_didIteratorError) {\n\t\t\t\t\t\t\tthrow _iteratorError;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// By default `RemoveOperation` needs holder element, so set it so, if the operation does not have delta.\n\t\t\treturn true;\n\t\t}\n\t}], [{\n\t\tkey: 'fromJSON',\n\n\n\t\t/**\n * Creates `RemoveOperation` object from deserilized object, i.e. from parsed JSON string.\n *\n * @param {Object} json Deserialized JSON object.\n * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n * @returns {module:engine/model/operation/removeoperation~RemoveOperation}\n */\n\t\tvalue: function fromJSON(json, document) {\n\t\t\tvar sourcePosition = _position2.default.fromJSON(json.sourcePosition, document);\n\n\t\t\tvar removeOp = new RemoveOperation(sourcePosition, json.howMany, json.baseVersion);\n\t\t\tremoveOp.targetPosition = _position2.default.fromJSON(json.targetPosition, document);\n\n\t\t\treturn removeOp;\n\t\t}\n\t}, {\n\t\tkey: 'className',\n\t\tget: function get() {\n\t\t\treturn 'engine.model.operation.RemoveOperation';\n\t\t}\n\t}]);\n\n\treturn RemoveOperation;\n}(_moveoperation2.default);\n\nexports.default = RemoveOperation;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/operation/removeoperation.js\n// module id = 38\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _element = require('./element');\n\nvar _element2 = _interopRequireDefault(_element);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**\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/containerelement\n */\n\n/**\n * Containers are elements which define document structure. They define boundaries for\n * {@link module:engine/view/attributeelement~AttributeElement attributes}. They are mostly use for block elements like `

` or `

`.\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.\n *\n * Creating an element you should use `ContainerElement` class or {@link module:engine/view/attributeelement~AttributeElement}. This is\n * important to define the type of the element because of two reasons:\n *\n * Firstly, {@link module:engine/view/domconverter~DomConverter} needs the information what is an editable block to convert elements to\n * DOM properly. {@link module:engine/view/domconverter~DomConverter} will ensure that `ContainerElement` is editable and it is possible\n * to put caret inside it, even if the container is empty.\n *\n * Secondly, {@link module:engine/view/writer~writer view writer} uses this information.\n * Nodes {@link module:engine/view/writer~writer.breakAttributes breaking} and {@link module:engine/view/writer~writer.mergeAttributes\n * merging}\n * is performed only in a bounds of a container nodes.\n *\n * For instance if `

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

fo^o

\n *\n * {@link module:engine/view/writer~writer.breakAttributes breakAttributes} will create:\n *\n *\t\t

foo

\n *\n * There might be a need to mark `` element as a container node, for example in situation when it will be a\n * container of an inline widget:\n *\n *\t\tfoobar\t\t// attribute\n *\t\tfoobar\t\t// container\n *\n * @extends module:engine/view/element~Element\n */\nvar ContainerElement = function (_Element) {\n _inherits(ContainerElement, _Element);\n\n /**\n * Creates a container element.\n *\n * @see module:engine/view/element~Element\n */\n function ContainerElement(name, attrs, children) {\n _classCallCheck(this, ContainerElement);\n\n /**\n * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n *\n * @method #getFillerOffset\n * @returns {Number|null} Block filler offset or `null` if block filler is not needed.\n */\n var _this = _possibleConstructorReturn(this, (ContainerElement.__proto__ || Object.getPrototypeOf(ContainerElement)).call(this, name, attrs, children));\n\n _this.getFillerOffset = getFillerOffset;\n return _this;\n }\n\n /**\n * @inheritDoc\n */\n\n\n _createClass(ContainerElement, [{\n key: 'is',\n value: function is(type) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (!name) {\n return type == 'containerElement' || _get(ContainerElement.prototype.__proto__ || Object.getPrototypeOf(ContainerElement.prototype), 'is', this).call(this, type);\n } else {\n return type == 'containerElement' && name == this.name || _get(ContainerElement.prototype.__proto__ || Object.getPrototypeOf(ContainerElement.prototype), 'is', this).call(this, type, name);\n }\n }\n }]);\n\n return ContainerElement;\n}(_element2.default);\n\n// Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n//\n// @returns {Number|null} Block filler offset or `null` if block filler is not needed.\n\n\nexports.default = ContainerElement;\nfunction getFillerOffset() {\n /*jshint validthis:true */\n return this.childCount === 0 ? 0 : null;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/containerelement.js\n// module id = 39\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.toImageWidget = toImageWidget;\nexports.isImageWidget = isImageWidget;\nexports.isImage = isImage;\n\nvar _utils = require('../widget/utils');\n\nvar _element = require('@ckeditor/ckeditor5-engine/src/model/element');\n\nvar _element2 = _interopRequireDefault(_element);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module image/image/utils\n */\n\nvar imageSymbol = Symbol('isImage');\n\n/**\n * Converts given {@link module:engine/view/element~Element} to image widget:\n * * adds {@link module:engine/view/element~Element#setCustomProperty custom property} allowing to recognize image widget element,\n * * calls {@link module:image/widget/utils~widgetize widgetize} function with proper element's label creator.\n *\n * @param {module:engine/view/element~Element} viewElement\n * @param {String} label Element's label. It will be concatenated with image's `alt` attribute if one is present.\n * @returns {module:engine/view/element~Element}\n */\nfunction toImageWidget(viewElement, label) {\n viewElement.setCustomProperty(imageSymbol, true);\n\n return (0, _utils.widgetize)(viewElement, { label: labelCreator });\n\n function labelCreator() {\n var imgElement = viewElement.getChild(0);\n var altText = imgElement.getAttribute('alt');\n\n return altText ? altText + ' ' + label : label;\n }\n}\n\n/**\n * Checks if given view element is an image widget.\n *\n * @param {module:engine/view/element~Element} viewElement\n * @returns {Boolean}\n */\nfunction isImageWidget(viewElement) {\n return !!viewElement.getCustomProperty(imageSymbol) && (0, _utils.isWidget)(viewElement);\n}\n\n/**\n * Checks if provided modelElement is an instance of {@link module:engine/model/element~Element Element} and its name\n * is `image`.\n *\n * @param {module:engine/model/element~Element} modelElement\n * @returns {Boolean}\n */\nfunction isImage(modelElement) {\n return modelElement instanceof _element2.default && modelElement.name == 'image';\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-image/src/image/utils.js\n// module id = 40\n// module chunks = 0","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isIterable;\n/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module utils/isiterable\n */\n\n/**\n * Checks if value implements iterator interface.\n *\n * @param {*} value The value to check.\n * @returns {Boolean} True if value implements iterator interface.\n */\nfunction isIterable(value) {\n return !!(value && value[Symbol.iterator]);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/isiterable.js\n// module id = 41\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _SetCache = require('./_SetCache');\n\nvar _SetCache2 = _interopRequireDefault(_SetCache);\n\nvar _arrayIncludes = require('./_arrayIncludes');\n\nvar _arrayIncludes2 = _interopRequireDefault(_arrayIncludes);\n\nvar _arrayIncludesWith = require('./_arrayIncludesWith');\n\nvar _arrayIncludesWith2 = _interopRequireDefault(_arrayIncludesWith);\n\nvar _cacheHas = require('./_cacheHas');\n\nvar _cacheHas2 = _interopRequireDefault(_cacheHas);\n\nvar _createSet = require('./_createSet');\n\nvar _createSet2 = _interopRequireDefault(_createSet);\n\nvar _setToArray = require('./_setToArray');\n\nvar _setToArray2 = _interopRequireDefault(_setToArray);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = _arrayIncludes2.default,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = _arrayIncludesWith2.default;\n } else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : (0, _createSet2.default)(array);\n if (set) {\n return (0, _setToArray2.default)(set);\n }\n isCommon = false;\n includes = _cacheHas2.default;\n seen = new _SetCache2.default();\n } else {\n seen = iteratee ? [] : result;\n }\n outer: while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = comparator || value !== 0 ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n } else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexports.default = baseUniq;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_baseUniq.js\n// module id = 42\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"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 object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object';\n}\n\nexports.default = isObjectLike;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isObjectLike.js\n// module id = 43\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _isObjectLike = require('./isObjectLike');\n\nvar _isObjectLike2 = _interopRequireDefault(_isObjectLike);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or 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 correctly classified,\n * else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'symbol' || (0, _isObjectLike2.default)(value) && objectToString.call(value) == symbolTag;\n}\n\nexports.default = isSymbol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isSymbol.js\n// module id = 44\n// module chunks = 0","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar stylesInDom = {},\n\tmemoize = function(fn) {\n\t\tvar memo;\n\t\treturn function () {\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\treturn memo;\n\t\t};\n\t},\n\tisOldIE = memoize(function() {\n\t\treturn /msie [6-9]\\b/.test(self.navigator.userAgent.toLowerCase());\n\t}),\n\tgetHeadElement = memoize(function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}),\n\tsingletonElement = null,\n\tsingletonCounter = 0,\n\tstyleElementsInsertedAtTop = [];\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\t// Force single-tag solution on IE6-9, which has a hard limit on the # of + + + +
+
+

About CKEditor 5

+ +

This is CKEditor 5. +

+ +
+ Autumn fields +
+ +

After more than 2 years of building the next generation editor from + scratch and closing over 980 tickets, we created a highly extensible + and flexible architecture which consists of an amazing + editing framework and editing + solutions that will be built on top of it.

+ +

Notes

+ +

CKEditor 5 is under + heavy development and this demo is not production-ready + software. For example:

+ + + +

It has bugs that we are aware of — and that we + will be working on in the next few iterations of the project. Stay + tuned for some updates soon!

+
+
+ +
+

+ Copyright © 2003-2017, CKSource – + Frederico Knabben. + All rights reserved. +

+
+ + + + From a232d7b9f0eec3017ff7cbf1bbec85da854aa41a Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Wed, 22 Mar 2017 13:51:18 +0100 Subject: [PATCH 13/30] Added "autoformat" plugin; some improvements in builds. --- build-config.js | 3 ++- ckeditor.js | 8 +++++--- package.json | 1 + sample/index.html | 2 +- tests/ckeditor.js | 4 +++- tests/manual/ckeditor.js | 2 +- tests/manual/ckeditor_es6.js | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/build-config.js b/build-config.js index 326200ba04..b64bb8bd72 100644 --- a/build-config.js +++ b/build-config.js @@ -9,9 +9,10 @@ module.exports = { destinationPath: './build/', editor: '@ckeditor/ckeditor5-editor-classic/src/classic', plugins: [ + '@ckeditor/ckeditor5-autoformat/src/autoformat', + '@ckeditor/ckeditor5-clipboard/src/clipboard', '@ckeditor/ckeditor5-basic-styles/src/bold', '@ckeditor/ckeditor5-basic-styles/src/italic', - '@ckeditor/ckeditor5-clipboard/src/clipboard', '@ckeditor/ckeditor5-enter/src/enter', '@ckeditor/ckeditor5-heading/src/heading', '@ckeditor/ckeditor5-image/src/image', diff --git a/ckeditor.js b/ckeditor.js index f791267681..7425f991ec 100644 --- a/ckeditor.js +++ b/ckeditor.js @@ -4,9 +4,10 @@ */ import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classic'; +import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat'; +import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard'; import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold'; import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic'; -import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard'; import EnterPlugin from '@ckeditor/ckeditor5-enter/src/enter'; import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading'; import ImagePlugin from '@ckeditor/ckeditor5-image/src/image'; @@ -19,13 +20,14 @@ import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph'; import TypingPlugin from '@ckeditor/ckeditor5-typing/src/typing'; import UndoPlugin from '@ckeditor/ckeditor5-undo/src/undo'; -export default class ClassicEditor extends ClassicEditorBase {} +export class ClassicEditor extends ClassicEditorBase {} ClassicEditor.build = { plugins: [ + AutoformatPlugin, + ClipboardPlugin, BoldPlugin, ItalicPlugin, - ClipboardPlugin, EnterPlugin, HeadingPlugin, ImagePlugin, diff --git a/package.json b/package.json index d457d06482..a5d531583f 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "@ckeditor/ckeditor5-dev-utils": "^2.4.2", "@ckeditor/ckeditor5-dev-webpack-utils": "^1.0.0", "@ckeditor/ckeditor5-editor-classic": "*", + "@ckeditor/ckeditor5-autoformat": "*", "@ckeditor/ckeditor5-basic-styles": "*", "@ckeditor/ckeditor5-clipboard": "*", "@ckeditor/ckeditor5-enter": "*", diff --git a/sample/index.html b/sample/index.html index ed0256ad8a..3aeb089734 100644 --- a/sample/index.html +++ b/sample/index.html @@ -163,7 +163,7 @@

Notes

+ + From d46781da999158ed85957cbefbfb9a4aaa64b1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Fri, 31 Mar 2017 10:12:14 +0200 Subject: [PATCH 26/30] Minor improvement in tests. --- sample/index.html | 12 +++++------ tests/ckeditor.js | 37 ++++++++++++++------------------- tests/manual/ckeditor.compat.md | 4 +++- tests/manual/ckeditor.md | 4 +++- 4 files changed, 28 insertions(+), 29 deletions(-) diff --git a/sample/index.html b/sample/index.html index 48e9bac517..b6c630de38 100644 --- a/sample/index.html +++ b/sample/index.html @@ -57,12 +57,12 @@

Notes

diff --git a/tests/ckeditor.js b/tests/ckeditor.js index c5799f25ba..9fd6b7955b 100644 --- a/tests/ckeditor.js +++ b/tests/ckeditor.js @@ -7,21 +7,6 @@ import { ClassicEditor } from '../ckeditor'; import BaseClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classic'; -import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat'; -import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold'; -import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard'; -import ParagraphPlugin from '@ckeditor/ckeditor5-paragraph/src/paragraph'; -import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading'; -import ImagePlugin from '@ckeditor/ckeditor5-image/src/image'; -import ImageCaptionPlugin from '@ckeditor/ckeditor5-image/src/imagecaption'; -import ImageStylePlugin from '@ckeditor/ckeditor5-image/src/imagestyle'; -import ImageToolbarPlugin from '@ckeditor/ckeditor5-image/src/imagetoolbar'; -import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic'; -import LinkPlugin from '@ckeditor/ckeditor5-link/src/link'; -import ListPlugin from '@ckeditor/ckeditor5-list/src/list'; -import EnterPlugin from '@ckeditor/ckeditor5-enter/src/enter'; -import TypingPlugin from '@ckeditor/ckeditor5-typing/src/typing'; -import UndoPlugin from '@ckeditor/ckeditor5-undo/src/undo'; describe( 'ClassicEditor', () => { let editor, editorElement; @@ -37,6 +22,16 @@ describe( 'ClassicEditor', () => { editorElement.remove(); } ); + describe( 'buid', () => { + it( 'contains plugins', () => { + expect( ClassicEditor.build.plugins ).to.not.be.empty; + } ); + + it( 'contains config', () => { + expect( ClassicEditor.build.config.toolbar ).to.not.be.empty; + } ); + } ); + describe( 'create()', () => { beforeEach( () => { return ClassicEditor.create( editorElement ) @@ -87,14 +82,14 @@ describe( 'ClassicEditor', () => { } ); describe( 'plugins', () => { - it( 'paragraph', () => { + it( 'paragraph works', () => { const data = '

Some text inside a paragraph.

'; editor.setData( data ); expect( editor.getData() ).to.equal( data ); } ); - it( 'basic-styles', () => { + it( 'basic-styles work', () => { const data = [ '

', 'Test:strong', @@ -106,7 +101,7 @@ describe( 'ClassicEditor', () => { expect( editor.getData() ).to.equal( data ); } ); - it( 'heading', () => { + it( 'heading works', () => { const data = [ '

Heading 1.

', '

Heading 1.1

', @@ -121,14 +116,14 @@ describe( 'ClassicEditor', () => { expect( editor.getData() ).to.equal( data ); } ); - it( 'image', () => { + it( 'image works', () => { const data = '
'; editor.setData( data ); expect( editor.getData() ).to.equal( data ); } ); - it( 'list', () => { + it( 'list works', () => { const data = [ '
    ', '
  • Item 1.
  • ', @@ -144,7 +139,7 @@ describe( 'ClassicEditor', () => { expect( editor.getData() ).to.equal( data ); } ); - it( 'link', () => { + it( 'link works', () => { const data = '

    CKEditor.com

    '; editor.setData( data ); diff --git a/tests/manual/ckeditor.compat.md b/tests/manual/ckeditor.compat.md index 67a1fc08c7..6909db6eaa 100644 --- a/tests/manual/ckeditor.compat.md +++ b/tests/manual/ckeditor.compat.md @@ -1 +1,3 @@ -# CKEditor 5 Compact Build +# CKEditor 5 classic build – compat (ES5) version + +Just play with it. diff --git a/tests/manual/ckeditor.md b/tests/manual/ckeditor.md index d700b61efc..49c04871f6 100644 --- a/tests/manual/ckeditor.md +++ b/tests/manual/ckeditor.md @@ -1 +1,3 @@ -# CKEditor 5 EcmaScript 6 Build +# CKEditor 5 classic build – standard version + +Just play with it. From eb2ce07e89e87be8e5442c4784e7fe9b80230690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Mon, 3 Apr 2017 13:05:14 +0200 Subject: [PATCH 27/30] The cwd option was removed because the configs don't have to have the module resolution configured - we can use the defaults. --- bin/build.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/build.js b/bin/build.js index ad5ec7c783..afe0ceb05f 100755 --- a/bin/build.js +++ b/bin/build.js @@ -24,9 +24,7 @@ bundler.createEntryFile( entryPoint, './config-editor', { } ); const packageRoot = path.join( __dirname, '..' ); -const ckeditor5Root = path.join( packageRoot, '..', '..' ); const webpackParams = { - cwd: ckeditor5Root, entryPoint: path.join( packageRoot, entryPoint ), destinationPath: path.join( packageRoot, buildConfig.destinationPath ) }; From e9b734bf90661d8f74f58916b76bd1e15039cd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Mon, 3 Apr 2017 15:11:15 +0200 Subject: [PATCH 28/30] Moved Webpack configs to this repository for simpler tinkering with them. --- bin/build-ckeditor-compat.sh | 9 +++++ bin/build-ckeditor.sh | 9 +++++ bin/build.js | 59 ----------------------------- bin/create-entry-file.js | 17 +++++++++ config-build.js | 5 +-- package.json | 15 ++++++-- webpack.compat.config.js | 73 ++++++++++++++++++++++++++++++++++++ webpack.config.js | 47 +++++++++++++++++++++++ 8 files changed, 168 insertions(+), 66 deletions(-) create mode 100755 bin/build-ckeditor-compat.sh create mode 100755 bin/build-ckeditor.sh delete mode 100755 bin/build.js create mode 100755 bin/create-entry-file.js create mode 100644 webpack.compat.config.js create mode 100644 webpack.config.js diff --git a/bin/build-ckeditor-compat.sh b/bin/build-ckeditor-compat.sh new file mode 100755 index 0000000000..16df881778 --- /dev/null +++ b/bin/build-ckeditor-compat.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo "Building 'build/ckeditor.compat.js'..." +echo "" + +webpack --config webpack.compat.config.js + +echo "" +echo "Done." diff --git a/bin/build-ckeditor.sh b/bin/build-ckeditor.sh new file mode 100755 index 0000000000..492e932f31 --- /dev/null +++ b/bin/build-ckeditor.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo "Building 'build/ckeditor.js'..." +echo "" + +webpack + +echo "" +echo "Done." diff --git a/bin/build.js b/bin/build.js deleted file mode 100755 index afe0ceb05f..0000000000 --- a/bin/build.js +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env node - -/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */ - -'use strict'; - -const path = require( 'path' ); -const webpack = require( 'webpack' ); -const { logger, bundler } = require( '@ckeditor/ckeditor5-dev-utils' ); -const webpackUtils = require( '@ckeditor/ckeditor5-dev-webpack-utils' ); -const buildConfig = require( '../config-build' ); -const log = logger(); -const entryPoint = 'ckeditor.js'; - -log.info( 'Creating the entry file...' ); - -bundler.createEntryFile( entryPoint, './config-editor', { - plugins: buildConfig.plugins, - moduleName: buildConfig.moduleName, - editor: buildConfig.editor -} ); - -const packageRoot = path.join( __dirname, '..' ); -const webpackParams = { - entryPoint: path.join( packageRoot, entryPoint ), - destinationPath: path.join( packageRoot, buildConfig.destinationPath ) -}; -const webpackConfig = webpackUtils.getWebpackConfig( webpackParams ); -const webpackCompatConfig = webpackUtils.getWebpackCompatConfig( webpackParams ); - -log.info( `Building...` ); - -Promise.all( [ - runWebpack( webpackConfig ).then( () => log.info( 'Finished building "build/ckeditor.js".' ) ), - runWebpack( webpackCompatConfig ).then( () => log.info( 'Finished building "build/ckeditor.compat.js".' ) ) -] ) -.then( () => { - log.info( 'Done.' ); -} ) -.catch( ( err ) => { - process.exitCode = -1; - - log.error( err ); -} ); - -function runWebpack( config ) { - return new Promise( ( resolve, reject ) => { - webpack( config, ( err ) => { - if ( err ) { - return reject( err ); - } - - return resolve(); - } ); - } ); -} diff --git a/bin/create-entry-file.js b/bin/create-entry-file.js new file mode 100755 index 0000000000..3371c1dccb --- /dev/null +++ b/bin/create-entry-file.js @@ -0,0 +1,17 @@ +#!/usr/bin/env node + +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' ); +const buildConfig = require( '../config-build' ); + +console.log( 'Creating the entry file...' ); + +bundler.createEntryFile( 'ckeditor.js', './config-editor', buildConfig ); + +console.log( 'Done.' ); diff --git a/config-build.js b/config-build.js index b00fc3967a..ed52e2c444 100644 --- a/config-build.js +++ b/config-build.js @@ -6,8 +6,8 @@ 'use strict'; module.exports = { - destinationPath: './build/', editor: '@ckeditor/ckeditor5-editor-classic/src/classic', + moduleName: 'ClassicEditor', plugins: [ '@ckeditor/ckeditor5-autoformat/src/autoformat', '@ckeditor/ckeditor5-clipboard/src/clipboard', @@ -24,6 +24,5 @@ module.exports = { '@ckeditor/ckeditor5-paragraph/src/paragraph', '@ckeditor/ckeditor5-typing/src/typing', '@ckeditor/ckeditor5-undo/src/undo', - ], - moduleName: 'ClassicEditor' + ] }; diff --git a/package.json b/package.json index 2abf0711d2..ed1ca33f46 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "CKEditor 5 classic build.", "keywords": [], - "main": "./build/ckeditor.es6.js", + "main": "./build/ckeditor.js", "dependencies": { "@ckeditor/ckeditor5-editor-classic": "*", "@ckeditor/ckeditor5-autoformat": "*", @@ -20,8 +20,12 @@ }, "devDependencies": { "@ckeditor/ckeditor5-dev-utils": "^2.4.2", - "@ckeditor/ckeditor5-dev-webpack-utils": "^1.0.0", - "webpack": "^2.2.1" + "babel-core": "^6.24.0", + "babel-loader": "^6.4.0", + "babel-preset-env": "^1.2.2", + "babili-webpack-plugin": "^0.0.11", + "regenerator-runtime": "^0.10.3", + "webpack": "^2.3.2" }, "engines": { "node": ">=6.0.0", @@ -36,6 +40,9 @@ "url": "https://github.com/ckeditor/ckeditor5-build-classic.git" }, "scripts": { - "build": "node ./bin/build.js" + "build": "npm run create-entry-file && npm run build-ckeditor && npm run build-ckeditor-compat", + "create-entry-file": "./bin/create-entry-file.js", + "build-ckeditor": "./bin/build-ckeditor.sh", + "build-ckeditor-compat": "./bin/build-ckeditor-compat.sh" } } diff --git a/webpack.compat.config.js b/webpack.compat.config.js new file mode 100644 index 0000000000..8d6777a3e2 --- /dev/null +++ b/webpack.compat.config.js @@ -0,0 +1,73 @@ +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const path = require( 'path' ); +const webpack = require( 'webpack' ); +const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' ); + +const BabiliPlugin = require( 'babili-webpack-plugin' ); + +module.exports = { + devtool: 'source-map', + + entry: [ + require.resolve( 'regenerator-runtime/runtime.js' ), + path.resolve( __dirname, 'ckeditor.js' ) + ], + + output: { + path: path.resolve( __dirname, 'build' ), + filename: 'ckeditor.compat.js', + libraryTarget: 'umd' + }, + + plugins: [ + new BabiliPlugin( null, { + comments: false + } ), + new webpack.BannerPlugin( { + banner: bundler.getLicenseBanner(), + raw: true + } ) + ], + + module: { + rules: [ + { + test: /\.js$/, + use: [ + { + loader: 'babel-loader', + query: { + presets: [ + [ + require( 'babel-preset-env' ), + { + targets: { + browsers: [ + 'last 2 versions', + 'ie >= 11' + ] + } + } + ] + ] + } + } + ] + }, + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.scss$/, + use: [ 'style-loader', 'css-loader', 'sass-loader' ] + } + ] + } +}; diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000000..94722cdba0 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,47 @@ +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +'use strict'; + +const path = require( 'path' ); +const webpack = require( 'webpack' ); +const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' ); + +const BabiliPlugin = require( 'babili-webpack-plugin' ); + +module.exports = { + devtool: 'source-map', + + entry: path.resolve( __dirname, 'ckeditor.js' ), + + output: { + path: path.resolve( __dirname, 'build' ), + filename: 'ckeditor.js', + libraryTarget: 'umd' + }, + + plugins: [ + new BabiliPlugin( null, { + comments: false + } ), + new webpack.BannerPlugin( { + banner: bundler.getLicenseBanner(), + raw: true + } ) + ], + + module: { + rules: [ + { + test: /\.svg$/, + use: [ 'raw-loader' ] + }, + { + test: /\.scss$/, + use: [ 'style-loader', 'css-loader', 'sass-loader' ] + } + ] + } +}; From 64ca3c93e6c16a9c46ffabe3bba8c2813597882b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Mon, 3 Apr 2017 16:27:55 +0200 Subject: [PATCH 29/30] Final cleanup. --- README.md | 68 +++++++++++++++++++++++++- ckeditor.js | 2 +- package.json | 2 +- tests/manual/ckeditor-cjs-version.html | 23 +++++++++ tests/manual/ckeditor-cjs-version.js | 14 ++++++ tests/manual/ckeditor-cjs-version.md | 3 ++ 6 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 tests/manual/ckeditor-cjs-version.html create mode 100644 tests/manual/ckeditor-cjs-version.js create mode 100644 tests/manual/ckeditor-cjs-version.md diff --git a/README.md b/README.md index ba68845736..bc2883f93b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,73 @@ CKEditor 5 classic build [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-build-classic/status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-classic) [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-build-classic/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-build-classic?type=dev) -Classic build of CKEditor 5. More information about the project can be found at the following URL: . +Classic build of CKEditor 5. Features the [classic creator](https://github.com/ckeditor/ckeditor5-editor-classic) and the standard set of article features. + +## Bundles + +The package contain two bundles of the classic editor: + +* `build/ckeditor.js` – minified, ES6 version of the bundle, +* `build/ckeditor.compat.js` – minified, backward-compatible version of the bundle (`babel-preset-env` is configured to support `[ 'last 2 versions', 'ie >= 11' ]`). + +## Usage + +First, install the build from npm: + +``` +npm install --save @ckeditor/ckeditor5-build-classic +``` + +And use it in your website: + +```html +
    +

    This is the editor content.

    +
    + + +``` + +Or in your JavaScript application: + +```js +import { ClassicEditor } from '@ckeditor/ckeditor5-build-classic/build/ckeditor'; + +// or using CommonJS verion: +// const ClassicEditor = require( '@ckeditor/ckeditor5-build-classic/build/ckeditor' ).ClassicEditor; + +ClassicEditor.create( document.querySelector( '#editor' ) ) + .then( editor => { + window.editor = editor; + } ) + .catch( err => { + console.error( err.stack ); + } ); +``` + +**Note:** If you're planning to integrate CKEditor 5 deep into your application it's actually more convenient and recommended to install and import the source modules directly (like it happens in `ckeditor.js`). + +## Rebuilding the bundle + +**Note:** This section assumes that you cloned this package repository and execute the commands inside it. + +You can modify `config-editor.js`, `config-build.js` or any of the Webpack configs and run: + +``` +npm run build +``` + +To rebuild the entry-point (`ckeditor.js`) and both builds (`build/*`). + +You can also modify `ckeditor.js` directly and run one of `npm run build-ckeditor` or `npm run build-ckeditor-compat`. ## License diff --git a/ckeditor.js b/ckeditor.js index 8d017086e1..5ada601d9c 100644 --- a/ckeditor.js +++ b/ckeditor.js @@ -5,9 +5,9 @@ import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classic'; import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat'; -import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard'; import BoldPlugin from '@ckeditor/ckeditor5-basic-styles/src/bold'; import ItalicPlugin from '@ckeditor/ckeditor5-basic-styles/src/italic'; +import ClipboardPlugin from '@ckeditor/ckeditor5-clipboard/src/clipboard'; import EnterPlugin from '@ckeditor/ckeditor5-enter/src/enter'; import HeadingPlugin from '@ckeditor/ckeditor5-heading/src/heading'; import ImagePlugin from '@ckeditor/ckeditor5-image/src/image'; diff --git a/package.json b/package.json index ed1ca33f46..dfbc3a24cf 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@ckeditor/ckeditor5-undo": "*" }, "devDependencies": { - "@ckeditor/ckeditor5-dev-utils": "^2.4.2", + "@ckeditor/ckeditor5-dev-utils": "^2.5.0", "babel-core": "^6.24.0", "babel-loader": "^6.4.0", "babel-preset-env": "^1.2.2", diff --git a/tests/manual/ckeditor-cjs-version.html b/tests/manual/ckeditor-cjs-version.html new file mode 100644 index 0000000000..e7ec02c2bc --- /dev/null +++ b/tests/manual/ckeditor-cjs-version.html @@ -0,0 +1,23 @@ +
    +

    About CKEditor 5

    + +

    This is CKEditor 5.

    + +
    + Autumn fields +
    + +

    After more than 2 years of building the next generation editor from scratch and closing over 980 tickets, we created a highly extensible and flexible architecture which consists of an amazing editing framework and editing solutions that will be built on top of it.

    + +

    Notes

    + +

    CKEditor 5 is under heavy development and this demo is not production-ready software. For example:

    + + + +

    It has bugs that we are aware of — and that we will be working on in the next few iterations of the project. Stay tuned for some updates soon!

    +
    diff --git a/tests/manual/ckeditor-cjs-version.js b/tests/manual/ckeditor-cjs-version.js new file mode 100644 index 0000000000..1e91c2b6b4 --- /dev/null +++ b/tests/manual/ckeditor-cjs-version.js @@ -0,0 +1,14 @@ +/** + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md. + */ + +const ClassicEditor = require( '../../build/ckeditor' ).ClassicEditor; + +ClassicEditor.create( document.querySelector( '#editor' ) ) + .then( editor => { + window.editor = editor; + } ) + .catch( err => { + console.error( err.stack ); + } ); diff --git a/tests/manual/ckeditor-cjs-version.md b/tests/manual/ckeditor-cjs-version.md new file mode 100644 index 0000000000..5c9c460b94 --- /dev/null +++ b/tests/manual/ckeditor-cjs-version.md @@ -0,0 +1,3 @@ +# CKEditor 5 classic build – standard version (CommonJS `require()`) + +Just play with it. From f280a8bc66f6f8ff3b74ff4e93e0fb3c6de79827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Mon, 3 Apr 2017 16:50:14 +0200 Subject: [PATCH 30/30] Note in the manual tests that they need the bundles to be rebuilt. --- build/ckeditor.compat.js | 740 +------------------------- build/ckeditor.compat.js.map | 2 +- build/ckeditor.js | 746 +-------------------------- build/ckeditor.js.map | 2 +- ckeditor.js | 2 +- config-build.js | 2 +- tests/manual/ckeditor-cjs-version.md | 6 + tests/manual/ckeditor.compat.md | 6 + tests/manual/ckeditor.md | 6 + 9 files changed, 28 insertions(+), 1484 deletions(-) diff --git a/build/ckeditor.compat.js b/build/ckeditor.compat.js index c5566aa2e1..e3adf25d4e 100644 --- a/build/ckeditor.compat.js +++ b/build/ckeditor.compat.js @@ -1,740 +1,6 @@ -var _NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor=Math.floor,_Mathmax=Math.max,_Mathmin=Math.min;(function(o,u){if('object'==typeof exports&&'object'==typeof module)module.exports=u();else if('function'==typeof define&&define.amd)define([],u);else{var s=u();for(var d in s)('object'==typeof exports?exports:o)[d]=s[d]}})(this,function(){return function(r){function o(s){if(u[s])return u[s].exports;var d=u[s]={i:s,l:!1,exports:{}};return r[s].call(d.exports,d,d.exports,o),d.l=!0,d.exports}var u={};return o.m=r,o.c=u,o.i=function(s){return s},o.d=function(s,d,f){o.o(s,d)||Object.defineProperty(s,d,{configurable:!1,enumerable:!0,get:f})},o.n=function(s){var d=s&&s.__esModule?function(){return s['default']}:function(){return s};return o.d(d,'a',d),d},o.o=function(s,d){return Object.prototype.hasOwnProperty.call(s,d)},o.p='',o(o.s=529)}([function(r,o){'use strict';function s(w,M){if(!(w instanceof M))throw new TypeError('Cannot call a class as a function')}function d(w,M){if(!w)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return M&&('object'==typeof M||'function'==typeof M)?M:w}function f(w,M){if('function'!=typeof M&&null!==M)throw new TypeError('Super expression must either be null or a function, not '+typeof M);w.prototype=Object.create(M&&M.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(w,M):w.__proto__=M)}/** +/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var h=function(){function w(M,C){for(var O=0,S;OD?0:D,L}},{key:'isAfter',value:function(V){return'after'==this.compareWith(V)}},{key:'isBefore',value:function(V){return'before'==this.compareWith(V)}},{key:'isEqual',value:function(V){return'same'==this.compareWith(V)}},{key:'isTouching',value:function(V){var L=null,D=null,q=this.compareWith(V);switch(q){case'same':return!0;case'before':L=F.createFromPosition(this),D=F.createFromPosition(V);break;case'after':L=F.createFromPosition(V),D=F.createFromPosition(this);break;default:return!1;}for(var z=L.parent;L.path.length+D.path.length;){if(L.isEqual(D))return!0;if(L.path.length>D.path.length){if(L.offset!==z.maxOffset)return!1;L.path=L.path.slice(0,-1),z=z.parent,L.offset++}else{if(0!==D.offset)return!1;D.path=D.path.slice(0,-1)}}}},{key:'_getTransformedByDeletion',value:function(V,L){var D=F.createFromPosition(this);if(this.root!=V.root)return D;if('same'==(0,O.default)(V.getParentPath(),this.getParentPath())){if(V.offsetthis.offset)return null;D.offset-=L}}else if('prefix'==(0,O.default)(V.getParentPath(),this.getParentPath())){var q=V.path.length-1;if(V.offset<=this.path[q]){if(V.offset+L>this.path[q])return null;D.path[q]-=L}}return D}},{key:'_getTransformedByInsertion',value:function(V,L,D){var q=F.createFromPosition(this);if(this.root!=V.root)return q;if('same'==(0,O.default)(V.getParentPath(),this.getParentPath()))(V.offsetF+1;)L=V.maxOffset-N.offset,0!=L&&R.push(new E(N,N.getShiftedBy(L))),N.path=N.path.slice(0,-1),N.offset++,V=V.parent;for(;N.path.length<=this.end.path.length;){var D=this.end.path[N.path.length-1],q=D-N.offset;0!=q&&R.push(new E(N,N.getShiftedBy(q))),N.offset=D,N.path.push(0)}return R}},{key:'getWalker',value:function(){var R=0=I;I++)R=String.fromCharCode(I),E[R.toLowerCase()]=I;for(var F=48;57>=F;F++)E[F-48]=F;for(var N=112;123>=N;N++)E['f'+(N-111)]=N;return E}()},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}function d(M,C,O,S,T){var E=-1,I=M.length;for(O||(O=w.default),T||(T=[]);++EV?0:V,N}},{key:'getLastMatchingPosition',value:function(F){var N=1this.offset-F.offset?'before':'after';var N=this.getAncestors(),V=F.getAncestors(),L=(0,M.default)(N,V),D;switch(L){case 0:return'different';case'prefix':D=N.length-1;break;case'extension':D=V.length-1;break;default:D=L-1;}var q=N[D],z=N[D+1],$=V[D+1];if(q===this.parent){var W=this.offset-$.index;return 0>=W?'before':'after'}if(q===F.parent){var K=z.index-F.offset;return 0>K?'before':'after'}var H=z.index-$.index;return 0>H?'before':'after'}},{key:'nodeAfter',get:function(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}},{key:'nodeBefore',get:function(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}},{key:'isAtStart',get:function(){return 0===this.offset}},{key:'isAtEnd',get:function(){var F=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===F}},{key:'root',get:function(){return this.parent.root}},{key:'editableElement',get:function(){for(var F=this.parent;!(F instanceof T.default);)if(F.parent)F=F.parent;else return null;return F}}],[{key:'createAt',value:function(F,N){if(F instanceof I)return this.createFromPosition(F);var V=F;if('end'==N)N=V.is('text')?V.data.length:V.childCount;else{if('before'==N)return this.createBefore(V);if('after'==N)return this.createAfter(V);N||(N=0)}return new I(V,N)}},{key:'createAfter',value:function(F){if(F.is('textProxy'))return new I(F.textNode,F.offsetInText+F.data.length);if(!F.parent)throw new O.default('view-position-after-root: You can not make position after root.',{root:F});return new I(F.parent,F.index+1)}},{key:'createBefore',value:function(F){if(F.is('textProxy'))return new I(F.textNode,F.offsetInText);if(!F.parent)throw new O.default('view-position-before-root: You can not make position before root.',{root:F});return new I(F.parent,F.index)}},{key:'createFromPosition',value:function(F){return new this(F.parent,F.offset)}}]),I}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.default=E},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F,N){if(!F)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return N&&('object'==typeof N||'function'==typeof N)?N:F}function h(F,N){if('function'!=typeof N&&null!==N)throw new TypeError('Super expression must either be null or a function, not '+typeof N);F.prototype=Object.create(N&&N.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(F,N):F.__proto__=N)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function F(N,V){for(var L=0,D;L$.maxOffset)throw new I.default('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if($===W&&K=K&&this.targetPosition.path[U]K&&(K=this.boundaries.start.offset),$=D.offset-K}W=D.offset-z.startOffset;var H=new C.default(z,W-$,$);return D.offset-=$,this.position=D,f('text',H,L,D,$)}return D.path.pop(),this.position=D,this._visitedParent=q.parent,f('elementStart',q,L,D,1)}}]),N}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.default=F},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h){var P=-1,w=d.length;0>f&&(f=-f>w?0:w+f),h=h>w?w:h,0>h&&(h+=w),w=f>h?0:h-f>>>0,f>>>=0;for(var M=Array(w);++P=this._holderElementOffset&&this.sourcePosition.path[0]++}return w(V.prototype.__proto__||Object.getPrototypeOf(V.prototype),'_execute',this).call(this)}},{key:'type',get:function(){return'remove'}},{key:'_holderElementOffset',get:function(){return this.targetPosition.path[0]},set:function(D){this.targetPosition.path[0]=D}},{key:'_needsHolderElement',get:function(){if(this.delta){var D=!0,q=!1,z;try{for(var $=this.delta.operations[Symbol.iterator](),W,K;!(D=(W=$.next()).done);D=!0)if(K=W.value,K instanceof V){if(K==this)return!0;if(K._holderElementOffset==this._holderElementOffset)return!1}}catch(H){q=!0,z=H}finally{try{!D&&$.return&&$.return()}finally{if(q)throw z}}}return!0}}],[{key:'fromJSON',value:function(D,q){var z=S.default.fromJSON(D.sourcePosition,q),$=new V(z,D.howMany,D.baseVersion);return $.targetPosition=S.default.fromJSON(D.targetPosition,q),$}},{key:'className',get:function(){return'engine.model.operation.RemoveOperation'}}]),V}(C.default);o.default=F},function(r,o,u){'use strict';function d(T,E){if(!(T instanceof E))throw new TypeError('Cannot call a class as a function')}function f(T,E){if(!T)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return E&&('object'==typeof E||'function'==typeof E)?E:T}function h(T,E){if('function'!=typeof E&&null!==E)throw new TypeError('Super expression must either be null or a function, not '+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function P(){return 0===this.childCount?0:null}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function T(E,I){for(var R=0,F;R=200){var H=V?null:(0,E.default)(N);if(H)return(0,R.default)(H);$=!1,q=S.default,K=new h.default}else K=V?[]:W;outer:for(;++DO||O>C.offsetSize)throw new P.default('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>S||O+S>C.offsetSize)throw new P.default('model-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(O,O+S),this.offsetInText=O}return f(M,[{key:'is',value:function(O){return'textProxy'==O}},{key:'getPath',value:function(){var O=this.textNode.getPath();return 0=200&&(z=R.default,$=!1,V=new h.default(V));outer:for(;++qf;f++)d+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return d}},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}function d(S){if(Array.isArray(S)){for(var T=0,E=Array(S.length);T=I&&Ethis._items.length||0>N)throw new M.default('collection-add-item-invalid-index');return this._items.splice(N,0,F),this._itemMap.set(V,F),this.fire('add',F,N),this}},{key:'get',value:function(F){var N;if('string'==typeof F)N=this._itemMap.get(F);else if('number'==typeof F)N=this._items[F];else throw new M.default('collection-get-invalid-arg: Index or id must be given.');return N||null}},{key:'getIndex',value:function(F){var N;return N='string'==typeof F?this._itemMap.get(F):F,this._items.indexOf(N)}},{key:'remove',value:function(F){var D=!1,q=this._idProperty,N,V,L;if('string'==typeof F?(V=F,L=this._itemMap.get(V),D=!L,L&&(N=this._items.indexOf(L))):'number'==typeof F?(N=F,L=this._items[N],D=!L,L&&(V=L[q])):(L=F,V=L[q],N=this._items.indexOf(L),D=-1==N||!this._itemMap.get(V)),D)throw new M.default('collection-remove-404: Item not found.');this._items.splice(N,1),this._itemMap.delete(V);var z=this._bindToInternalToExternalMap.get(L);return this._bindToInternalToExternalMap.delete(L),this._bindToExternalToInternalMap.delete(z),this.fire('remove',L),L}},{key:'map',value:function(F,N){return this._items.map(F,N)}},{key:'find',value:function(F,N){return this._items.find(F,N)}},{key:'filter',value:function(F,N){return this._items.filter(F,N)}},{key:'clear',value:function(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}},{key:'bindTo',value:function(F){var N=this;if(this._bindToCollection)throw new M.default('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=F,{as:function(L){N._setUpBindToBinding(function(D){return new L(D)})},using:function(L){'function'==typeof L?N._setUpBindToBinding(function(D){return L(D)}):N._setUpBindToBinding(function(D){return D[L]})}}}},{key:'_setUpBindToBinding',value:function(F){var N=this,V=this._bindToCollection,L=function(U,G,J){var Z=V._bindToCollection==N,Y=V._bindToInternalToExternalMap.get(G);if(Z&&Y)N._bindToExternalToInternalMap.set(G,Y),N._bindToInternalToExternalMap.set(Y,G);else{var Q=F(G);N._bindToExternalToInternalMap.set(G,Q),N._bindToInternalToExternalMap.set(Q,G),N.add(Q,J)}},D=!0,q=!1,z;try{for(var $=V[Symbol.iterator](),W,K;!(D=(W=$.next()).done);D=!0)K=W.value,L(null,K)}catch(H){q=!0,z=H}finally{try{!D&&$.return&&$.return()}finally{if(q)throw z}}this.listenTo(V,'add',L),this.listenTo(V,'remove',function(H,U){var G=N._bindToExternalToInternalMap.get(U);G&&N.remove(G)})}},{key:Symbol.iterator,value:function(){return this._items[Symbol.iterator]()}},{key:'length',get:function(){return this._items.length}}]),I}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.default=E,(0,T.default)(E,P.default)},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function f(F){return F['data-ck-expando']||(F['data-ck-expando']=(0,C.default)())}function h(F){return F&&(0,E.default)(F.addEventListener)}Object.defineProperty(o,'__esModule',{value:!0});var P=u(7),w=s(P),M=u(70),C=s(M),O=u(56),S=s(O),T=u(236),E=s(T),I=(0,S.default)({},w.default,{listenTo:function(){for(var N=arguments.length,V=Array(N),L=0;L>>1){for(;R>>1,V=T[N];null!==V&&!(0,C.default)(V)&&(I?V<=E:V$._priority)||!(z._priority<$._priority)&&W}function S(z){return z.reduce(function($,W){return $+W.operations.length},0)}function T(z,$){for(var W=z[z.length-1],K=W.operations.length+W.baseVersion,H=new I.default,U=0;U<$;U++)H.addOperation(new V.default(K++));z.push(H)}Object.defineProperty(o,'__esModule',{value:!0}),o.default=f,o.defaultTransform=P,o.addTransformationCase=function(z,$,W){var K=q.get(z);K||(K=new Map,q.set(z,K)),K.set($,W)},o.getTransformationCase=M,o.transformDeltaSets=function(z,$,W){for(var K=Array.from(z),H=Array.from($),U=0,G;U=I||0>re||X&&ae>=U}function D(){var te=(0,w.default)();return L(te)?q(te):void(J=setTimeout(D,V(te)))}function q(te){return(clearTimeout(J),J=void 0,ee&&K)?F(te):(K=H=void 0,G)}function W(){var te=(0,w.default)(),re=L(te);if(K=arguments,H=this,Z=te,re){if(void 0===J)return N(Z);if(X)return clearTimeout(J),J=setTimeout(D,I),F(Z)}return void 0===J&&(J=setTimeout(D,I)),G}var Z=0,Y=0,Q=!1,X=!1,ee=!0,K,H,U,G,J;if('function'!=typeof E)throw new TypeError('Expected a function');return I=(0,C.default)(I)||0,(0,h.default)(R)&&(Q=!!R.leading,X='maxWait'in R,U=X?_Mathmax((0,C.default)(R.maxWait)||0,I):U,ee='trailing'in R?!!R.trailing:ee),W.cancel=function(){void 0!==J&&clearTimeout(J),Z=Y=0,K=H=J=void 0},W.flush=function(){return void 0===J?G:q((0,w.default)())},W}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(35),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),(0,h.default)(M,0>C?0:C,S)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(35),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),C=S-C,(0,h.default)(M,0,0>C?0:C)):[]}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return d&&d.length?d[0]:void 0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(13),h=function(S){return S&&S.__esModule?S:{default:S}}(f),w=Object.prototype,M=w.hasOwnProperty,C=w.toString,O=w.propertyIsEnumerable;o.default=function(S){return(0,h.default)(S)&&M.call(S,'callee')&&(!O.call(S,'callee')||C.call(S)=='[object Arguments]')}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(14),h=function(O){return O&&O.__esModule?O:{default:O}}(f),M=Object.prototype,C=M.toString;o.default=function(O){var S=(0,h.default)(O)?C.call(O):'';return S=='[object Function]'||S=='[object GeneratorFunction]'}},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(11),h=s(f),P=u(43),w=s(P),C=Object.prototype,O=C.toString;o.default=function(S){return'string'==typeof S||!(0,h.default)(S)&&(0,w.default)(S)&&O.call(S)=='[object String]'}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(132),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return P&&P.length&&w&&w.length?(0,h.default)(P,w):P}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(196),h=s(f),P=u(27),w=s(P),M=u(99),C=s(M);o.default=function(O,S){if(!(O&&O.length))return[];var T=(0,C.default)(O);return null==S?T:(0,w.default)(T,function(E){return(0,h.default)(S,void 0,E)})}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(M){return(0,h.default)(M)?(0,w.default)(M):new Map(M)};var f=u(98),h=s(f),P=u(275),w=s(P)},function(r){'use strict';var s='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&'function'==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?'symbol':typeof f},d;d=function(){return this}();try{d=d||Function('return this')()||(1,eval)('this')}catch(f){'object'===('undefined'==typeof window?'undefined':s(window))&&(d=window)}r.exports=d},function(r,o,u){'use strict';function s(N){return N&&N.__esModule?N:{default:N}}function d(N,V){if(!(N instanceof V))throw new TypeError('Cannot call a class as a function')}function f(N,V){if(!N)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return V&&('object'==typeof V||'function'==typeof V)?V:N}function h(N,V){if('function'!=typeof V&&null!==V)throw new TypeError('Super expression must either be null or a function, not '+typeof V);N.prototype=Object.create(V&&V.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(N,V):N.__proto__=V)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function N(V,L){for(var D=0,q;DX?0:X),new S.default(Q,X)):null}if(0===Y){var ee=this.getCorrespondingView(Z);if(ee)return new S.default(ee,0)}else{var te=this.getCorrespondingView(Z.childNodes[Y-1]);if(te&&te.parent)return new S.default(te.parent,te.index+1)}return null}},{key:'getCorrespondingView',value:function(Z){return this.isElement(Z)?this.getCorrespondingViewElement(Z):this.isDocumentFragment(Z)?this.getCorrespondingViewDocumentFragment(Z):this.isText(Z)?this.getCorrespondingViewText(Z):null}},{key:'getCorrespondingViewElement',value:function(Z){return this._domToViewMapping.get(Z)}},{key:'getCorrespondingViewDocumentFragment',value:function(Z){return this._domToViewMapping.get(Z)}},{key:'getCorrespondingViewText',value:function(Z){if((0,D.isInlineFiller)(Z))return null;var Y=Z.previousSibling;if(Y){if(!this.isElement(Y))return null;var Q=this.getCorrespondingViewElement(Y);if(Q){var X=Q.nextSibling;return X instanceof w.default?Q.nextSibling:null}}else{var ee=this.getCorrespondingViewElement(Z.parentNode);if(ee){var te=ee.getChild(0);return te instanceof w.default?te:null}}return null}},{key:'getCorrespondingDom',value:function(Z){return Z instanceof C.default?this.getCorrespondingDomElement(Z):Z instanceof N.default?this.getCorrespondingDomDocumentFragment(Z):Z instanceof w.default?this.getCorrespondingDomText(Z):null}},{key:'getCorrespondingDomElement',value:function(Z){return this._viewToDomMapping.get(Z)}},{key:'getCorrespondingDomDocumentFragment',value:function(Z){return this._viewToDomMapping.get(Z)}},{key:'getCorrespondingDomText',value:function(Z){var Y=Z.previousSibling;return Y&&this.getCorrespondingDom(Y)?this.getCorrespondingDom(Y).nextSibling:!Y&&Z.parent&&this.getCorrespondingDom(Z.parent)?this.getCorrespondingDom(Z.parent).childNodes[0]:null}},{key:'focus',value:function(Z){var Y=this.getCorrespondingDomElement(Z);Y&&Y.ownerDocument.activeElement!==Y&&Y.focus()}},{key:'isText',value:function(Z){return Z&&Z.nodeType==Node.TEXT_NODE}},{key:'isElement',value:function(Z){return Z&&Z.nodeType==Node.ELEMENT_NODE}},{key:'isDocumentFragment',value:function(Z){return Z&&Z.nodeType==Node.DOCUMENT_FRAGMENT_NODE}},{key:'isDomSelectionBackward',value:function(Z){if(Z.isCollapsed)return!1;var Y=new Range;Y.setStart(Z.anchorNode,Z.anchorOffset),Y.setEnd(Z.focusNode,Z.focusOffset);var Q=Y.collapsed;return Y.detach(),Q}},{key:'_processDataFromViewText',value:function(Z){var Y=this,Q=Z.data;if(Z.getAncestors().some(function(oe){return Y.preElements.includes(oe.name)}))return Q;var X=this._getTouchingViewTextNode(Z,!1),ee=this._getTouchingViewTextNode(Z,!0),te=Q.match(/ *$/)[0],re=Q.substr(0,Q.length-te.length);if(X&&' '!=X.data.charAt(X.data.length-1)||(re=re.replace(/^ /,'\xA0')),re=re.replace(/ /g,' \xA0'),0=this.limit&&this._reset(!0)}},{key:'lock',value:function(){this.isLocked=!0}},{key:'unlock',value:function(){this.isLocked=!1}},{key:'destroy',value:function(){this.document.off('change',this._changeCallback),this.document.selection.off('change:range',this._selectionChangeCallback),this.document.selection.off('change:attribute',this._selectionChangeCallback)}},{key:'_onBatch',value:function(O){'transparent'!=O.type&&O!==this._batch&&1>=(0,P.default)(O.getOperations())&&this._reset(!0)}},{key:'_reset',value:function(O){(!this.isLocked||O)&&(this._batch=null,this.size=0)}},{key:'batch',get:function(){return this._batch||(this._batch=this.document.batch()),this._batch}}]),M}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.default=w},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){var f=d.emitter,h=d.activator,P=d.callback,w=d.contextElement;f.listenTo(document,'mouseup',function(M,C){var O=C.target;h()&&!w.contains(O)&&P()})}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){var f=d.view;f.listenTo(f.element,'submit',function(h,P){P.preventDefault(),f.fire('submit')},{useCapture:!0})}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}function d(T,E){if(!(T instanceof E))throw new TypeError('Cannot call a class as a function')}function f(T,E){if(!T)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return E&&('object'==typeof E||'function'==typeof E)?E:T}function h(T,E){if('function'!=typeof E&&null!==E)throw new TypeError('Super expression must either be null or a function, not '+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function T(E,I){for(var R=0,F;RL?-1:1;E[N+D]&&(E[N]=E[N+D].slice(0)),E[N]||(E[N]=[]),E[N].push(V>L?w:M);for(var q=_Mathmax(V,L),z=q-N;zT;F--)I[F]=P(F);I[T]=P(T),R++}while(I[T]!==S);return E[T].slice(1)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){for(var f=[];d&&d.nodeType!=Node.DOCUMENT_NODE;)f.unshift(d),d=d.parentNode;return f}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){return function(f){return f+d}}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){var f=d.next();return f.done?null:f.value}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(52),f=s(d),h=u(31),P=s(h),w=(0,f.default)(P.default,'Map');o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(52),f=s(d),h=u(31),P=s(h),w=(0,f.default)(P.default,'Set');o.default=w},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var d=u(31),f=function(P){return P&&P.__esModule?P:{default:P}}(d),h=f.default.Uint8Array;o.default=h},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h){var P=h.length;return 0===P?d.call(f):1===P?d.call(f,h[0]):2===P?d.call(f,h[0],h[1]):3===P?d.call(f,h[0],h[1],h[2]):d.apply(f,h)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h,P){var w=-1,M=d.length;for(P&&M&&(h=d[++w]);++wN))return!1;var L=R.get(O);if(L)return L==S;var D=-1,q=!0,z=I&1?new h.default:void 0;for(R.set(O,S);++DE)return[];for(var F=0,N=0,V=Array(O(R/E));FS&&(S=_Mathmax(T+S,0)),(0,h.default)(C,O,S)):-1}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(145),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(P,1)}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(129),P=s(h),w=u(137),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){var E=(0,f.default)(T,M.default);return E.length&&E[0]===T[0]?(0,P.default)(E):[]});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(129),P=s(h),w=u(10),M=s(w),C=u(137),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F),V=(0,f.default)(F,O.default);return N===(0,T.default)(V)?N=void 0:V.pop(),V.length&&V[0]===F[0]?(0,P.default)(V,(0,M.default)(N)):[]});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(129),P=s(h),w=u(137),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I),F=(0,f.default)(I,M.default);return R===(0,O.default)(F)?R=void 0:F.pop(),F.length&&F[0]===I[0]?(0,P.default)(F,void 0,R):[]});o.default=E},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(148),h=s(f),P=u(90),w=s(P),M=u(14),C=s(M),O=u(212),S=s(O),T=/[\\^$.*+?()[\]{}|]/g,E=/^\[object .+?Constructor\]$/,I=Object.prototype,R=Function.prototype.toString,F=I.hasOwnProperty,N=RegExp('^'+R.call(F).replace(T,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');o.default=function(V){if(!(0,C.default)(V))return!1;var L=(0,h.default)(V)||(0,w.default)(V)?N:E;return L.test((0,S.default)(V))}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var d=Array.prototype,f=d.join;o.default=function(h,P){return h?f.call(h,P):''}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(209),h=s(f),P=u(15),w=s(P);o.default=function(O,S,T){var E=O?O.length:0;if(!E)return-1;var I=E;if(void 0!==T&&(I=(0,w.default)(T),I=(0>I?_Mathmax(E+I,0):_Mathmin(I,E-1))+1),S!==S)return(0,h.default)(O,I,!0);for(;I--;)if(O[I]===S)return I;return-1}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(426),h=s(f),P=u(15),w=s(P);o.default=function(M,C){return M&&M.length?(0,h.default)(M,(0,w.default)(C)):void 0}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(150),f=s(d),h=u(8),P=s(h),w=(0,P.default)(f.default);o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(132),w=s(P);o.default=function(M,C,O){return M&&M.length&&C&&C.length?(0,w.default)(M,C,(0,h.default)(O)):M}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(132),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w,M){return P&&P.length&&w&&w.length?(0,h.default)(P,w,void 0,M):P}},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(413),P=s(h),w=u(23),M=s(w),C=u(201),O=s(C),S=u(439),T=s(S),E=u(36),I=s(E),R=u(8),F=s(R),N=(0,F.default)(function(V,L){L=(0,M.default)(L,1);var D=V?V.length:0,q=(0,P.default)(V,L);return(0,O.default)(V,(0,f.default)(L,function(z){return(0,I.default)(z,D)?+z:z}).sort(T.default)),q});o.default=N},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(201),w=s(P);o.default=function(M,C){var O=[];if(!(M&&M.length))return O;var S=-1,T=[],E=M.length;for(C=(0,h.default)(C,3);++SC?0:C)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(35),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),C=S-C,(0,h.default)(M,0>C?0:C,S)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(87),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C,3),!1,!0):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(87),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C,3)):[]}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(148),h=s(f),P=u(14),w=s(P),M=u(44),C=s(M),O=0/0,S=/^\s+|\s+$/g,T=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,I=/^0o[0-7]+$/i,R=parseInt;o.default=function(F){if('number'==typeof F)return F;if((0,C.default)(F))return O;if((0,w.default)(F)){var N=(0,h.default)(F.valueOf)?F.valueOf():F;F=(0,w.default)(N)?N+'':N}if('string'!=typeof F)return 0===F?F:+F;F=F.replace(S,'');var V=E.test(F);return V||I.test(F)?R(F.slice(2),V?2:8):T.test(F)?O:+F}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(42),P=s(h),w=u(13),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){return(0,P.default)((0,f.default)(T,1,M.default,!0))});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(10),P=s(h),w=u(42),M=s(w),C=u(13),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F);return(0,O.default)(N)&&(N=void 0),(0,M.default)((0,f.default)(F,1,O.default,!0),(0,P.default)(N))});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(42),P=s(h),w=u(13),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I);return(0,M.default)(R)&&(R=void 0),(0,P.default)((0,f.default)(I,1,M.default,!0),void 0,R)});o.default=E},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(42),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return P&&P.length?(0,h.default)(P):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(42),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C)):[]}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(42),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return P&&P.length?(0,h.default)(P,void 0,w):[]}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(68),f=s(d),h=u(13),P=s(h),w=u(8),M=s(w),C=(0,M.default)(function(O,S){return(0,P.default)(O)?(0,f.default)(O,S):[]});o.default=C},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(83),f=s(d),h=u(135),P=s(h),w=u(13),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){return(0,P.default)((0,f.default)(T,M.default))});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(83),f=s(d),h=u(10),P=s(h),w=u(135),M=s(w),C=u(13),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F);return(0,O.default)(N)&&(N=void 0),(0,M.default)((0,f.default)(F,O.default),(0,P.default)(N))});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(83),f=s(d),h=u(135),P=s(h),w=u(13),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I);return(0,M.default)(R)&&(R=void 0),(0,P.default)((0,f.default)(I,M.default),void 0,R)});o.default=E},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(8),f=s(d),h=u(99),P=s(h),w=(0,f.default)(P.default);o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(67),h=s(f),P=u(204),w=s(P);o.default=function(M,C){return(0,w.default)(M||[],C||[],h.default)}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(428),h=s(f),P=u(204),w=s(P);o.default=function(M,C){return(0,w.default)(M||[],C||[],h.default)}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(8),f=s(d),h=u(151),P=s(h),w=(0,f.default)(function(M){var C=M.length,O=1D.length);){var $=D,W=$.index,K=$[1],H=$[2],U=$[3];W+=D[0].length-(K+H+U).length;var J=[W,W+K.length],Z=[W+K.length+H.length,W+K.length+H.length+U.length];q.push(J),q.push(Z),z.push([W+K.length,W+K.length+H.length])}return{remove:q,format:z}},V=V||function(L,D){var q=!0,z=!1,$;try{for(var W=D[Symbol.iterator](),K,H;!(q=(K=W.next()).done);q=!0)H=K.value,L.setAttribute(H,F,!0)}catch(U){z=!0,$=U}finally{try{!q&&W.return&&W.return()}finally{if(z)throw $}}},S.document.on('change',function(L,D){if('insert'===D){var q=I.editor.document.selection;if(q.isCollapsed&&q.focus&&q.focus.parent){var z=q.focus.parent,$=f(z).slice(0,q.focus.offset),W=N($),K=[];W.format.forEach(function(G){void 0===G[0]||void 0===G[1]||K.push(P.default.createFromParentsAndOffsets(z,G[0],z,G[1]))});var H=[];if(W.remove.slice().reverse().forEach(function(G){void 0===G[0]||void 0===G[1]||H.push(P.default.createFromParentsAndOffsets(z,G[0],z,G[1]))}),!!(K.length&&H.length)){var U=S.document.batch();S.document.enqueueChanges(function(){var G=(0,M.default)(F,K,S.document.schema);V(U,G);var J=!0,Z=!1,Y;try{for(var Q=H[Symbol.iterator](),X,ee;!(J=(X=Q.next()).done);J=!0)ee=X.value,U.remove(ee)}catch(te){Z=!0,Y=te}finally{try{!J&&Q.return&&Q.return()}finally{if(Z)throw Y}}})}}}})}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F,N){if(!F)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return N&&('object'==typeof N||'function'==typeof N)?N:F}function h(F,N){if('function'!=typeof N&&null!==N)throw new TypeError('Super expression must either be null or a function, not '+typeof N);F.prototype=Object.create(N&&N.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(F,N):F.__proto__=N)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function F(N,V){for(var L=0,D;L(\s+)<\/span>/g,function(f,h){return 1==h.length?' ':h})}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){return d=d.replace(//g,'>').replace(/\n\n/g,'

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

    ')&&(d='

    '+d+'

    '),d}},function(r,o,u){'use strict';function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S,T){if(!S)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return T&&('object'==typeof T||'function'==typeof T)?T:S}function h(S,T){if('function'!=typeof T&&null!==T)throw new TypeError('Super expression must either be null or a function, not '+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function S(T,E){for(var I=0,R;Ige.position.offset;return ye&&be?[ge.getReversed(),pe.clone()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(G.default,W.default,function(pe,ge,me){return pe.position.isEqual(ge.position)?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(G.default,Z.default,function(pe,ge,me){var ye=pe.position.root==ge.sourcePosition.root&&'same'===(0,ce.default)(pe.position.getParentPath(),ge.sourcePosition.getParentPath()),be=ge.sourcePosition.offset<=pe.position.offset&&ge.sourcePosition.offset+ge.howMany>pe.position.offset;return ye&&be?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,Q.default,function(pe,ge,me){var ye=pe.position.getParentPath(),be=ge.position.getParentPath();if('same'==(0,ce.default)(ye,be)){if(pe.position.offset==ge.position.offset)return[h()];if(pe.position.offsetge._cloneOperation.sourcePosition.offset&&he._cloneOperation.sourcePosition.offset--,[he]}var ve=pe.clone();return ve._cloneOperation.position.offset++,ve._moveOperation.sourcePosition.path[ve._moveOperation.sourcePosition.path.length-2]++,ve._moveOperation.targetPosition.path[ve._moveOperation.targetPosition.path.length-2]++,ve._moveOperation.sourcePosition.offset=pe.position.offset-ge.position.offset,pe._cloneOperation instanceof V.default&&ge._cloneOperation instanceof V.default&&pe._cloneOperation.sourcePosition.offset>ge._cloneOperation.sourcePosition.offset&&ve._cloneOperation.sourcePosition.offset--,[ve]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,oe.default,function(pe,ge,me){return'same'===(0,ce.default)(ge.position.path,pe.position.getParentPath())?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,re.default,function(pe,ge,me){var ye='same'===(0,ce.default)(pe.position.getParentPath(),ge.range.start.getParentPath()),be=ge.range.start.offset=pe.position.offset;if(ye&&be)return[h()];if('same'===(0,ce.default)(pe.position.getParentPath(),ge.range.end.getShiftedBy(-1).path)){var he=pe.clone(),ve=O.default.createFromPosition(ge.range.start);ve.path.push(ge.howMany-1);var ke=ve.getShiftedBy(1);he._cloneOperation.position=ke;var Pe=O.default.createFromPosition(ve);Pe.path.push(pe.position.offset),he._moveOperation.sourcePosition=Pe;var we=O.default.createFromPosition(ke);return we.path.push(0),he._moveOperation.targetPosition=we,[he]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,z.default,function(pe,ge){pe=pe.clone();var me=new O.default(pe.position.root,pe.position.path.slice(0,-1));if(pe._cloneOperation instanceof F.default){var ye=!0,be=!1,he;try{for(var ve=ge.operations[Symbol.iterator](),ke,Pe;!(ye=(ke=ve.next()).done);ye=!0)if(Pe=ke.value,Pe.range.containsPosition(me)||Pe.range.start.isEqual(me)){null===Pe.newValue?pe._cloneOperation.nodes.getNode(0).removeAttribute(Pe.key):pe._cloneOperation.nodes.getNode(0).setAttribute(Pe.key,Pe.newValue);break}}catch(we){be=!0,he=we}finally{try{!ye&&ve.return&&ve.return()}finally{if(be)throw he}}}return[pe]}),(0,P.addTransformationCase)(oe.default,Q.default,function(pe,ge,me){if('same'===(0,ce.default)(pe.position.path,ge.position.getParentPath())){var ye=[ge.getReversed(),pe.clone()];return ye[1].operations[1].targetPosition.path[0]++,ye}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(ee.default,z.default,function(pe,ge){var me=[pe.clone()];return ge.range.containsPosition(pe.position)&&me.push(f(pe,ge)),me}),(0,P.addTransformationCase)(re.default,Q.default,function(pe,ge,me){var ye='same'===(0,ce.default)(pe.range.start.getParentPath(),ge.position.getParentPath()),be=pe.range.start.offset=ge.position.offset;if(ye&&be)return[ge.getReversed(),pe.clone()];if('same'===(0,ce.default)(ge.position.getParentPath(),pe.range.end.getShiftedBy(-1).path)){var he=pe.clone();return he._insertOperation.position.offset++,he._moveOperation.howMany++,he._moveOperation.targetPosition.path[he._moveOperation.targetPosition.path.length-2]++,[he]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(ue.default,Q.default,function(pe,ge,me){var ye=new O.default(ge.position.root,ge.position.path.slice(0,-1)),be=(0,P.defaultTransform)(pe,ge,me);if(pe.operations[0].position.isEqual(ye)){var he=pe.clone();he.operations[0].position=pe.operations[0].position.getShiftedBy(1),be.push(he)}return be}),(0,P.addTransformationCase)(Q.default,ue.default,function(pe,ge){pe=pe.clone();var me=new O.default(pe.position.root,pe.position.path.slice(0,-1));return pe._cloneOperation instanceof F.default&&ge.operations[0].position.isEqual(me)&&(pe._cloneOperation.nodes.getNode(0).name=ge.operations[0].newName),[pe]}),(0,P.addTransformationCase)(de.default,Q.default,function(pe,ge,me){var ye=(0,P.defaultTransform)(pe,ge,me),be=ge._cloneOperation.position,he=!0,ve=!1,ke;try{for(var Pe=ye[Symbol.iterator](),we;!(he=(we=Pe.next()).done);he=!0){var xe=we.value,Me=!0,Ce=!1,Oe=void 0;try{for(var Se=xe.operations[Symbol.iterator](),Te;!(Me=(Te=Se.next()).done);Me=!0){var Ae=Te.value,Ee=Ae.sourcePosition.getShiftedBy(Ae.howMany);Ee.isEqual(be)&&(Ae.howMany+=1)}}catch(Ie){Ce=!0,Oe=Ie}finally{try{!Me&&Se.return&&Se.return()}finally{if(Ce)throw Oe}}}}catch(Ie){ve=!0,ke=Ie}finally{try{!he&&Pe.return&&Pe.return()}finally{if(ve)throw ke}}return ye}),(0,P.addTransformationCase)(Q.default,de.default,function(pe,ge,me){ge=ge.clone();var ye=pe._cloneOperation.position,be=!0,he=!1,ve;try{for(var ke=ge.operations[Symbol.iterator](),Pe;!(be=(Pe=ke.next()).done);be=!0){var we=Pe.value,xe=we.sourcePosition.getShiftedBy(we.howMany);xe.isEqual(ye)&&(we.howMany+=1)}}catch(Me){he=!0,ve=Me}finally{try{!be&&ke.return&&ke.return()}finally{if(he)throw ve}}return(0,P.defaultTransform)(pe,ge,me)})},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}function d(V,L){if(!(V instanceof L))throw new TypeError('Cannot call a class as a function')}function f(V,L){if(!V)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return L&&('object'==typeof L||'function'==typeof L)?L:V}function h(V,L){if('function'!=typeof L&&null!==L)throw new TypeError('Super expression must either be null or a function, not '+typeof L);V.prototype=Object.create(L&&L.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(V,L):V.__proto__=L)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function P(V,L,D,q){var z=V.document,$=new N,W=new I.default(L,D,q,z.markers,z.version);V.addDelta($),$.addOperation(W),z.applyOperation(W)}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function V(L,D){for(var q=0,z;q=T)){F.next=9;break}return F.abrupt('break',13);case 9:return F.next=11,I;case 11:F.next=5;break;case 13:case'end':return F.stop();}},O,this)})},{key:'getDelta',value:function(S){var T=this._historyPoints.get(S);if(void 0===T)return null;var E=[];for(T;TS&&this._historyPoints.set(U,this._historyPoints.get(U)+q)}catch(G){$=!0,W=G}finally{try{!z&&K.return&&K.return()}finally{if($)throw W}}}}},{key:'_getIndex',value:function(S){var T=this._historyPoints.get(S);if(void 0===T){var E=this._deltas[this._deltas.length-1],I=E.baseVersion+E.operations.length;if(0>S||S>=I)return-1;throw new w.default('model-history-wrong-version: Given base version points to the middle of a delta.')}return T}}]),C}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.default=M},function(r,o,u){'use strict';function s(Y){return Y&&Y.__esModule?Y:{default:Y}}function d(Y,Q){if(!(Y instanceof Q))throw new TypeError('Cannot call a class as a function')}function f(Y,Q){if(!Y)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return Q&&('object'==typeof Q||'function'==typeof Q)?Q:Y}function h(Y,Q){if('function'!=typeof Q&&null!==Q)throw new TypeError('Super expression must either be null or a function, not '+typeof Q);Y.prototype=Object.create(Q&&Q.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(Y,Q):Y.__proto__=Q)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function P(Y){return Y instanceof L.default||Y instanceof N.default?Y.getAttributes():null}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function Y(Q,X){var ee=[],te=!0,re=!1,ae;try{for(var oe=Q[Symbol.iterator](),le;!(te=(le=oe.next()).done)&&(ee.push(le.value),!(X&&ee.length===X));te=!0);}catch(ue){re=!0,ae=ue}finally{try{!te&&oe['return']&&oe['return']()}finally{if(re)throw ae}}return ee}return function(Q,X){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return Y(Q,X);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),M=function(){function Y(Q,X){for(var ee=0,te;ee=Y._holderElementOffset&&(Z=Z.clone(),Z.range.start.path[0]++,Z.range.end.path[0]++);var ee=w(Z.range.getDifference(Q)),te=Z.range.getIntersection(Q);return null!==ee&&(ee.start=ee.start._getTransformedByDeletion(Y.sourcePosition,Y.howMany),ee.end=ee.end._getTransformedByDeletion(Y.sourcePosition,Y.howMany),X=ee._getTransformedByInsertion(Y.getMovedRangeStart(),Y.howMany,!0,!1).reverse()),null!==te&&(te.start=te.start._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),te.end=te.end._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),X.push(te)),X.map(function(re){return new S.default(re,Z.key,Z.oldValue,Z.newValue,Z.baseVersion)})}},RootAttributeOperation:{InsertOperation:f,AttributeOperation:f,RootAttributeOperation:function(Z,Y,Q){return Z.root!==Y.root||Z.key!==Y.key||(Z.newValue===Y.newValue||Q)&&Z.newValue!==Y.newValue?[Z.clone()]:[new $.default(Z.baseVersion)]},RenameOperation:f,MarkerOperation:f,MoveOperation:f},RenameOperation:{InsertOperation:function(Z,Y){var Q=Z.clone();return Q.position=Q.position._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!0),[Q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:function(Z,Y,Q){var X=Z.clone();if(Z.position.isEqual(Y.position))if(Q)X.oldName=Y.newName;else return[new $.default(Z.baseVersion)];return[X]},MarkerOperation:f,MoveOperation:function(Z,Y){var Q=Z.clone(),X=Q.position.isEqual(Y.sourcePosition);return Q.position=Q.position._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!0,X),[Q]}},MarkerOperation:{InsertOperation:function(Z,Y){var Q=Z.clone();return Q.oldRange&&(Q.oldRange=Q.oldRange._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,!1)[0]),Q.newRange&&(Q.newRange=Q.newRange._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,!1)[0]),[Q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:function(Z,Y,Q){var X=Z.clone();if(Z.name==Y.name)if(Q)X.oldRange=Y.newRange;else return[new $.default(Z.baseVersion)];return[X]},MoveOperation:function(Z,Y){var Q=Z.clone();if(Q.oldRange){var X=Q.oldRange._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany);Q.oldRange=K.default.createFromRanges(X)}if(Q.newRange){var ee=Q.newRange._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany);Q.newRange=K.default.createFromRanges(ee)}return[Q]}},MoveOperation:{InsertOperation:function(Z,Y,Q){var X=K.default.createFromPositionAndShift(Z.sourcePosition,Z.howMany);X=X._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,Z.isSticky)[0];var ee=new Z.constructor(X.start,X.end.offset-X.start.offset,Z instanceof q.default?Z.baseVersion:Z.targetPosition._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!Q),Z instanceof q.default?void 0:Z.baseVersion);return ee.isSticky=Z.isSticky,ee._holderElementOffset=Z._holderElementOffset,[ee]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:f,MoveOperation:function(Z,Y,Q){if(P(Z,Y)&&P(Y,Z))return[Y.getReversed()];if(Z instanceof q.default&&Y instanceof q.default){var X=Z.targetPosition.path[0],ee=Y.targetPosition.path[0];X>=ee&&Q&&(Z=Z.clone(),Z.targetPosition.path[0]++)}Z instanceof q.default&&!(Y instanceof q.default)?Q=!0:!(Z instanceof q.default)&&Y instanceof q.default&&(Q=!1);var te=K.default.createFromPositionAndShift(Z.sourcePosition,Z.howMany),re=K.default.createFromPositionAndShift(Y.sourcePosition,Y.howMany),ae=[],oe=w(te.getDifference(re));oe&&(oe.start=oe.start._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!Z.isSticky,!1),oe.end=oe.end._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,Z.isSticky,!1),ae.push(oe));var le=te.getIntersection(re),ue=(0,U.default)(Z.sourcePosition.getParentPath(),Y.sourcePosition.getParentPath()),ie=te.containsPosition(Y.targetPosition)||te.start.isEqual(Y.targetPosition)&&Z.isSticky||te.end.isEqual(Y.targetPosition)&&Z.isSticky,de=re.containsRange(te)&&(re.containsPosition(Z.targetPosition)||re.start.isEqual(Z.targetPosition)||re.end.isEqual(Z.targetPosition));if(null!==le&&('extension'===ue||'same'===ue&&Q||de)&&!ie&&(le.start=le.start._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),le.end=le.end._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),oe&&te.start.isBefore(re.start)?ae.push(le):ae.unshift(le)),0===ae.length)return Z instanceof q.default?(Z=Z.clone(),Z.howMany=0,Z.sourcePosition=Y.targetPosition,[Z]):[new $.default(Z.baseVersion)];var fe=Z.targetPosition._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!Q,Y.isSticky||de);return ae.reverse().map(function(ce){var pe=new Z.constructor(ce.start,ce.end.offset-ce.start.offset,Z instanceof q.default?Z.baseVersion:fe,Z instanceof q.default?void 0:Z.baseVersion);return pe.isSticky=Z.isSticky,pe._holderElementOffset=Z._holderElementOffset,pe})}}}},function(r,o,u){'use strict';function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S,T){if(!S)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return T&&('object'==typeof T||'function'==typeof T)?T:S}function h(S,T){if('function'!=typeof T&&null!==T)throw new TypeError('Super expression must either be null or a function, not '+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function S(T,E){for(var I=0,R;IO||O>C.data.length)throw new P.default('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>S||O+S>C.data.length)throw new P.default('view-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(O,O+S),this.offsetInText=O}return f(M,[{key:'is',value:function(O){return'textProxy'==O}},{key:'getAncestors',value:function(){for(var O=0me;){ye>ge.getAttribute('indent')&&(ye=ge.getAttribute('indent'));var he=ge.getAttribute('indent')-ye;be.push({item:ge,indent:he}),ge=ge.nextSibling}0=ye;)ge.getAttribute('type')!=be&&ge.getAttribute('indent')==ye&&pe.setAttribute(ge,'type',be),ge=ge[fe?'previousSibling':'nextSibling']})}}}function V(de,fe){var ce='numbered'==de.getAttribute('type')?'ol':'ul',pe=new K.default,ge=new X.default(ce,null);return ge.appendChildren(pe),fe.bindElements(de,pe),pe}function L(de,fe){for(var ce=fe.getNext?'nextSibling':'previousSibling',pe=fe.getNext?'nodeAfter':'nodeBefore',ge=!!fe.checkAllSiblings,me=!!fe.sameIndent,ye=!!fe.biggerIndent,be=!!fe.smallerIndent,he=!!fe.isMapped,ve=de instanceof U.default?de.getAttribute('indent'):fe.indent,ke=de instanceof U.default?de[ce]:de[pe],Pe;ke&&'listItem'==ke.name;){if(Pe=ke.getAttribute('indent'),me&&ve==Pe||ye&&vePe){if(!he||fe.mapper.toViewElement(ke))return ke;ke=ke[ce];continue}if(!ge)return null;ke=ke[ce]}return null}function D(de,fe){return de&&fe&&('ul'==de.name||'ol'==de.name)&&de.name==fe.name?ie.default.mergeContainers(te.default.createAfter(de)):null}function q(de,fe,ce,pe){var ge=fe.parent,me,ye=L(de,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0});if(ye&&ye.getAttribute('indent')==de.getAttribute('indent')){var be=ce.toViewElement(ye);me=ie.default.breakContainer(te.default.createAfter(be))}else ye=de.previousSibling,me=ye&&'listItem'==ye.name?ye.getAttribute('indent')=fe;)de=de.nextSibling,de.getAttribute('indent')==fe&&(ce=de);return ce}Object.defineProperty(o,'__esModule',{value:!0}),o.modelViewInsertion=function(de,fe,ce,pe){if(ce.test(fe.item,'insert')&&ce.test(fe.item,'addAttribute:type')&&ce.test(fe.item,'addAttribute:indent')){ce.consume(fe.item,'insert'),ce.consume(fe.item,'addAttribute:type'),ce.consume(fe.item,'addAttribute:indent');var ge=fe.item,me=V(ge,pe.mapper);q(ge,me,pe.mapper)}},o.modelViewChangeType=function(de,fe,ce,pe){if(ce.consume(fe.item,'changeAttribute:type')){var ge=pe.mapper.toViewElement(fe.item);ie.default.breakContainer(te.default.createBefore(ge)),ie.default.breakContainer(te.default.createAfter(ge));var me=ge.parent,ye='numbered'==fe.attributeNewValue?'ol':'ul';me=ie.default.rename(me,ye),D(me,me.nextSibling),D(me.previousSibling,me)}},o.modelViewRemove=function(de,fe,ce,pe){if(ce.consume(fe.item,'remove')){var ge=pe.mapper.toViewPosition(fe.sourcePosition),me=ge.nodeAfter.is('li')?ge.nodeAfter:ge.nodeAfter.getChild(0);ie.default.breakContainer(te.default.createBefore(me)),ie.default.breakContainer(te.default.createAfter(me));var ye=me.parent,be=ye.previousSibling,he=ae.default.createOn(ye);ie.default.remove(he),be&&be.nextSibling&&D(be,be.nextSibling),z(fe.item.getAttribute('indent')+1,fe.sourcePosition,he.start,me,pe.mapper),'$graveyard'==fe.item.root.rootName&&pe.mapper.unbindModelElement(fe.item)}},o.modelViewChangeIndent=function(de,fe,ce,pe){if(ce.consume(fe.item,'changeAttribute:indent')){var ge=pe.mapper.toViewElement(fe.item);ie.default.breakContainer(te.default.createBefore(ge)),ie.default.breakContainer(te.default.createAfter(ge));var me=ge.parent,ye=me.previousSibling,be=ae.default.createOn(me);ie.default.remove(be);var he;ye&&ye.nextSibling&&(he=D(ye,ye.nextSibling)),he||(he=be.start),z(fe.attributeOldValue+1,fe.range.start,be.start,ge,pe.mapper),q(fe.item,ge,pe.mapper,he)}},o.modelViewSplitOnInsert=function(de,fe,ce,pe){if('listItem'!=fe.item.name){for(var ge=pe.mapper.toViewPosition(fe.range.start),me=[];('ul'==ge.parent.name||'ol'==ge.parent.name)&&(ge=ie.default.breakContainer(ge),'li'==ge.parent.name);){var ye=ge,be=te.default.createAt(ge.parent,'end');if(!ye.isEqual(be)){var he=ie.default.remove(new ae.default(ye,be));me.push(he)}ge=te.default.createAfter(ge.parent)}if(0L.getAttribute('indent');)V.push(D),D=D.nextSibling;0>R._indentBy&&(V=V.reverse());var q=!0,z=!1,$;try{for(var W=V[Symbol.iterator](),K;!(q=(K=W.next()).done);q=!0){var H=K.value,U=H.getAttribute('indent')+R._indentBy;if(0>U)N.rename(H,'paragraph');else{if(0R._indentBy){for(var G=H.previousSibling;G.getAttribute('indent')>U;)G=G.previousSibling;G.getAttribute('type')!=H.getAttribute('type')&&N.setAttribute(H,'type',G.getAttribute('type'))}N.setAttribute(H,'indent',U)}}}catch(J){z=!0,$=J}finally{try{!q&&W.return&&W.return()}finally{if(z)throw $}}})}},{key:'_checkEnabled',value:function(){var R=(0,O.default)(this.editor.document.selection.getSelectedBlocks());if(!R||!R.is('listItem'))return!1;var F=R.previousSibling,N=R.getAttribute('indent'),V=N+this._indentBy;if(0=N;)D>L.getAttribute('indent')&&(D=L.getAttribute('indent')),L.getAttribute('indent')==D&&R[F?'unshift':'push'](L),L=L[F?'previousSibling':'nextSibling']}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function R(F,N){for(var V=0,L;V=U;U++)H.push(U)},function(r,o,u){'use strict';function s(E){return E&&E.__esModule?E:{default:E}}function d(E,I){if(!(E instanceof I))throw new TypeError('Cannot call a class as a function')}function f(E,I){if(!E)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return I&&('object'==typeof I||'function'==typeof I)?I:E}function h(E,I){if('function'!=typeof I&&null!==I)throw new TypeError('Super expression must either be null or a function, not '+typeof I);E.prototype=Object.create(I&&I.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(E,I):E.__proto__=I)}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function E(I,R){for(var F=0,N;Fq.top&&this._toolbarRect.height+this.limiterOffsetD&&K():!V&&N?Z>L&&K():Y>D&&Z>=L?K():Y>=D&&Z>L&&K(),Z===$}),q?[z,q]:null}function P(I){var R=I.left,F=I.top,N=C.default.window,V=N.scrollX,L=N.scrollY;return{left:R+V,top:F+L}}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function I(R,F){var N=[],V=!0,L=!1,D;try{for(var q=R[Symbol.iterator](),z;!(V=(z=q.next()).done)&&(N.push(z.value),!(F&&N.length===F));V=!0);}catch($){L=!0,D=$}finally{try{!V&&q['return']&&q['return']()}finally{if(L)throw D}}return N}return function(R,F){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return I(R,F);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.getOptimalPosition=function(I){var R=I.element,F=I.target,N=I.positions,V=I.limiter,L=I.fitInViewport,D=(0,E.default)(R.parentElement),q=new S.default(R),z=new S.default(F),$,W;if(!V&&!L){var K=f(N[0],z,q),H=w(K,2);W=H[0],$=H[1]}else{var U=V&&new S.default(V),G=L&&S.default.getViewportRect(),J=h(N,z,q,U,G)||f(N[0],z,q),Z=w(J,2);W=Z[0],$=Z[1]}var Y=P($),Q=Y.left,X=Y.top;if(D){var ee=P(new S.default(D)),te=C.default.window.getComputedStyle(D);Q-=ee.left,X-=ee.top,Q+=D.scrollLeft,X+=D.scrollTop,Q-=parseInt(te.borderLeftWidth,10),X-=parseInt(te.borderTopWidth,10)}return{left:Q,top:X,name:W}};var M=u(64),C=s(M),O=u(397),S=s(O),T=u(392),E=s(T)},function(r,o,u){'use strict';function s(E){return E&&E.__esModule?E:{default:E}}function d(E,I){if(!(E instanceof I))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var f=function(){function E(I,R){for(var F=0,N;FF.width||0>F.height?null:new E(F)}},{key:'getIntersectionArea',value:function(R){var F=this.getIntersection(R);return F?F.getArea():0}},{key:'getArea',value:function(){return this.width*this.height}}],[{key:'getViewportRect',value:function(){var R=P.default.window,F=R.innerWidth,N=R.innerHeight;return new E({top:0,right:F,bottom:N,left:0,width:F,height:N})}}]),E}();/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */o.default=T},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d){var f=d.parentNode;f&&f.removeChild(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */function(d,f){d instanceof HTMLTextAreaElement&&(d.value=f),d.innerHTML=f}},function(r,o){'use strict';function s(h,P){if(!(h instanceof P))throw new TypeError('Cannot call a class as a function')}/** - * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. - * For licensing, see LICENSE.md. - */Object.defineProperty(o,'__esModule',{value:!0});var d=function(){function h(P,w){for(var M=0,C;M=f?d:f)),d}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(14),h=function(w){return w&&w.__esModule?w:{default:w}}(f),P=Object.create;o.default=function(w){return(0,h.default)(w)?P(w):{}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(15),h=s(f),P=u(498),w=s(P);o.default=function(M,C,O,S){var T=M.length;for(O=(0,h.default)(O),0>O&&(O=-O>T?0:T+O),S=void 0===S||S>T?T:(0,h.default)(S),0>S&&(S+=T),S=O>S?0:(0,w.default)(S);Ow?M:0,(0,h.default)(w,M)?P[w]:void 0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(127),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return function(w){return(0,h.default)(w,P)}}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(67),h=s(f),P=u(88),w=s(P),M=u(36),C=s(M),O=u(53),S=s(O),T=u(14),E=s(T),I=u(54),R=s(I);o.default=function(F,N,V,L){N=(0,S.default)(N,F)?[N]:(0,w.default)(N);for(var D=-1,q=N.length,$=F,W;null!=$&&++Dw||S&&T&&I&&!E&&!R||C&&T&&I||!M&&I||!O)return 1;if(!C&&!S&&!R&&PT?void 0:E,T=1),C=Object(C);++SO)return!1;var S=C.length-1;return O==S?C.pop():w.call(C,O,1),!0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(85),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){var w=this.__data__,M=(0,h.default)(w,P);return 0>M?void 0:w[M][1]}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(85),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return-1<(0,h.default)(this.__data__,P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(85),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){var M=this.__data__,C=(0,h.default)(M,P);return 0>C?M.push([P,w]):M[C][1]=w,this}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(404),h=s(f),P=u(81),w=s(P),M=u(193),C=s(M);o.default=function(){this.__data__={hash:new h.default,map:new(C.default||w.default),string:new h.default}}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P)['delete'](P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P).get(P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P).has(P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(this,P).set(P,w),this}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(127),h=s(f),P=u(35),w=s(P);o.default=function(M,C){return 1==C.length?M:(0,h.default)(M,(0,w.default)(C,0,-1))}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0});o.default=function(f){return this.__data__.set(f,'__lodash_hash_undefined__'),this}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.has(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){var f=-1,h=Array(d.size);return d.forEach(function(P){h[++f]=[P,P]}),h}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(81),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(){this.__data__=new h.default}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__['delete'](d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.get(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.has(d)}},function(r,o,u){'use strict';function s(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(81),h=s(f),P=u(122),w=s(P);o.default=function(C,O){var S=this.__data__;return S instanceof h.default&&S.__data__.length==200&&(S=this.__data__=new w.default(S.__data__)),S.set(C,O),this}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(492),f=s(d),h=u(500),P=s(h),w=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,M=/\\(\\)?/g,C=(0,f.default)(function(O){var S=[];return(0,P.default)(O).replace(w,function(T,E,I,R){S.push(I?R.replace(M,'$1'):E||T)}),S});o.default=C},function(r,o,u){'use strict';function s(Zt){return Zt&&Zt.__esModule?Zt:{default:Zt}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(213),f=s(d),h=u(214),P=s(h),w=u(215),M=s(w),C=u(216),O=s(C),S=u(217),T=s(S),E=u(218),I=s(E),R=u(144),F=s(R),N=u(145),V=s(N),L=u(219),D=s(L),q=u(220),z=s(q),$=u(221),W=s($),K=u(222),H=s(K),U=u(223),G=s(U),J=u(224),Z=s(J),Y=u(225),Q=s(Y),X=u(226),ee=s(X),te=u(227),re=s(te),ae=u(228),oe=s(ae),le=u(146),ue=s(le),ie=u(231),de=s(ie),fe=u(232),ce=s(fe),pe=u(233),ge=s(pe),me=u(234),ye=s(me),be=u(235),he=s(be),ve=u(237),ke=s(ve),Pe=u(19),we=s(Pe),xe=u(238),Me=s(xe),Ce=u(239),Oe=s(Ce),Se=u(240),Te=s(Se),Ae=u(150),Ee=s(Ae),Ie=u(241),Re=s(Ie),Fe=u(242),Ne=s(Fe),Ve=u(243),Le=s(Ve),Be=u(244),De=s(Be),je=u(245),qe=s(je),ze=u(246),$e=s(ze),We=u(247),Ke=s(We),He=u(248),Ue=s(He),Ge=u(249),Je=s(Ge),Ze=u(250),Ye=s(Ze),Qe=u(251),Xe=s(Qe),et=u(252),tt=s(et),rt=u(253),at=s(rt),nt=u(254),lt=s(nt),ut=u(255),it=s(ut),st=u(256),dt=s(st),ft=u(257),ct=s(ft),pt=u(258),gt=s(pt),mt=u(259),yt=s(mt),bt=u(261),ht=s(bt),vt=u(262),kt=s(vt),Pt=u(263),wt=s(Pt),xt=u(264),Mt=s(xt),Ct=u(265),Ot=s(Ct),St=u(266),Tt=s(St),At=u(99),Et=s(At),It=u(151),Rt=s(It),Ft=u(267),Nt=s(Ft),Vt=u(268),Lt=s(Vt),Bt=u(269),Dt=s(Bt),jt=u(270),qt=s(jt),zt=u(271),$t=s(zt),Wt=u(272),Kt=s(Wt),Ht=u(273),Ut=s(Ht),Gt=u(274),Jt=s(Gt);o.default={chunk:f.default,compact:P.default,concat:M.default,difference:O.default,differenceBy:T.default,differenceWith:I.default,drop:F.default,dropRight:V.default,dropRightWhile:D.default,dropWhile:z.default,fill:W.default,findIndex:H.default,findLastIndex:G.default,first:Z.default,flatten:Q.default,flattenDeep:ee.default,flattenDepth:re.default,fromPairs:oe.default,head:ue.default,indexOf:de.default,initial:ce.default,intersection:ge.default,intersectionBy:ye.default,intersectionWith:he.default,join:ke.default,last:we.default,lastIndexOf:Me.default,nth:Oe.default,pull:Te.default,pullAll:Ee.default,pullAllBy:Re.default,pullAllWith:Ne.default,pullAt:Le.default,remove:De.default,reverse:qe.default,slice:$e.default,sortedIndex:Ke.default,sortedIndexBy:Ue.default,sortedIndexOf:Je.default,sortedLastIndex:Ye.default,sortedLastIndexBy:Xe.default,sortedLastIndexOf:tt.default,sortedUniq:at.default,sortedUniqBy:lt.default,tail:it.default,take:dt.default,takeRight:ct.default,takeRightWhile:gt.default,takeWhile:yt.default,union:ht.default,unionBy:kt.default,unionWith:wt.default,uniq:Mt.default,uniqBy:Ot.default,uniqWith:Tt.default,unzip:Et.default,unzipWith:Rt.default,without:Nt.default,xor:Lt.default,xorBy:Dt.default,xorWith:qt.default,zip:$t.default,zipObject:Kt.default,zipObjectDeep:Ut.default,zipWith:Jt.default}},function(r,o,u){'use strict';function s(Be){return Be&&Be.__esModule?Be:{default:Be}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(213);Object.defineProperty(o,'chunk',{enumerable:!0,get:function(){return s(d).default}});var f=u(214);Object.defineProperty(o,'compact',{enumerable:!0,get:function(){return s(f).default}});var h=u(215);Object.defineProperty(o,'concat',{enumerable:!0,get:function(){return s(h).default}});var P=u(216);Object.defineProperty(o,'difference',{enumerable:!0,get:function(){return s(P).default}});var w=u(217);Object.defineProperty(o,'differenceBy',{enumerable:!0,get:function(){return s(w).default}});var M=u(218);Object.defineProperty(o,'differenceWith',{enumerable:!0,get:function(){return s(M).default}});var C=u(144);Object.defineProperty(o,'drop',{enumerable:!0,get:function(){return s(C).default}});var O=u(145);Object.defineProperty(o,'dropRight',{enumerable:!0,get:function(){return s(O).default}});var S=u(219);Object.defineProperty(o,'dropRightWhile',{enumerable:!0,get:function(){return s(S).default}});var T=u(220);Object.defineProperty(o,'dropWhile',{enumerable:!0,get:function(){return s(T).default}});var E=u(221);Object.defineProperty(o,'fill',{enumerable:!0,get:function(){return s(E).default}});var I=u(222);Object.defineProperty(o,'findIndex',{enumerable:!0,get:function(){return s(I).default}});var R=u(223);Object.defineProperty(o,'findLastIndex',{enumerable:!0,get:function(){return s(R).default}});var F=u(224);Object.defineProperty(o,'first',{enumerable:!0,get:function(){return s(F).default}});var N=u(225);Object.defineProperty(o,'flatten',{enumerable:!0,get:function(){return s(N).default}});var V=u(226);Object.defineProperty(o,'flattenDeep',{enumerable:!0,get:function(){return s(V).default}});var L=u(227);Object.defineProperty(o,'flattenDepth',{enumerable:!0,get:function(){return s(L).default}});var D=u(228);Object.defineProperty(o,'fromPairs',{enumerable:!0,get:function(){return s(D).default}});var q=u(146);Object.defineProperty(o,'head',{enumerable:!0,get:function(){return s(q).default}});var z=u(231);Object.defineProperty(o,'indexOf',{enumerable:!0,get:function(){return s(z).default}});var $=u(232);Object.defineProperty(o,'initial',{enumerable:!0,get:function(){return s($).default}});var W=u(233);Object.defineProperty(o,'intersection',{enumerable:!0,get:function(){return s(W).default}});var K=u(234);Object.defineProperty(o,'intersectionBy',{enumerable:!0,get:function(){return s(K).default}});var H=u(235);Object.defineProperty(o,'intersectionWith',{enumerable:!0,get:function(){return s(H).default}});var U=u(237);Object.defineProperty(o,'join',{enumerable:!0,get:function(){return s(U).default}});var G=u(19);Object.defineProperty(o,'last',{enumerable:!0,get:function(){return s(G).default}});var J=u(238);Object.defineProperty(o,'lastIndexOf',{enumerable:!0,get:function(){return s(J).default}});var Z=u(239);Object.defineProperty(o,'nth',{enumerable:!0,get:function(){return s(Z).default}});var Y=u(240);Object.defineProperty(o,'pull',{enumerable:!0,get:function(){return s(Y).default}});var Q=u(150);Object.defineProperty(o,'pullAll',{enumerable:!0,get:function(){return s(Q).default}});var X=u(241);Object.defineProperty(o,'pullAllBy',{enumerable:!0,get:function(){return s(X).default}});var ee=u(242);Object.defineProperty(o,'pullAllWith',{enumerable:!0,get:function(){return s(ee).default}});var te=u(243);Object.defineProperty(o,'pullAt',{enumerable:!0,get:function(){return s(te).default}});var re=u(244);Object.defineProperty(o,'remove',{enumerable:!0,get:function(){return s(re).default}});var ae=u(245);Object.defineProperty(o,'reverse',{enumerable:!0,get:function(){return s(ae).default}});var oe=u(246);Object.defineProperty(o,'slice',{enumerable:!0,get:function(){return s(oe).default}});var le=u(247);Object.defineProperty(o,'sortedIndex',{enumerable:!0,get:function(){return s(le).default}});var ue=u(248);Object.defineProperty(o,'sortedIndexBy',{enumerable:!0,get:function(){return s(ue).default}});var ie=u(249);Object.defineProperty(o,'sortedIndexOf',{enumerable:!0,get:function(){return s(ie).default}});var de=u(250);Object.defineProperty(o,'sortedLastIndex',{enumerable:!0,get:function(){return s(de).default}});var fe=u(251);Object.defineProperty(o,'sortedLastIndexBy',{enumerable:!0,get:function(){return s(fe).default}});var ce=u(252);Object.defineProperty(o,'sortedLastIndexOf',{enumerable:!0,get:function(){return s(ce).default}});var pe=u(253);Object.defineProperty(o,'sortedUniq',{enumerable:!0,get:function(){return s(pe).default}});var ge=u(254);Object.defineProperty(o,'sortedUniqBy',{enumerable:!0,get:function(){return s(ge).default}});var me=u(255);Object.defineProperty(o,'tail',{enumerable:!0,get:function(){return s(me).default}});var ye=u(256);Object.defineProperty(o,'take',{enumerable:!0,get:function(){return s(ye).default}});var be=u(257);Object.defineProperty(o,'takeRight',{enumerable:!0,get:function(){return s(be).default}});var he=u(258);Object.defineProperty(o,'takeRightWhile',{enumerable:!0,get:function(){return s(he).default}});var ve=u(259);Object.defineProperty(o,'takeWhile',{enumerable:!0,get:function(){return s(ve).default}});var ke=u(261);Object.defineProperty(o,'union',{enumerable:!0,get:function(){return s(ke).default}});var Pe=u(262);Object.defineProperty(o,'unionBy',{enumerable:!0,get:function(){return s(Pe).default}});var we=u(263);Object.defineProperty(o,'unionWith',{enumerable:!0,get:function(){return s(we).default}});var xe=u(264);Object.defineProperty(o,'uniq',{enumerable:!0,get:function(){return s(xe).default}});var Me=u(265);Object.defineProperty(o,'uniqBy',{enumerable:!0,get:function(){return s(Me).default}});var Ce=u(266);Object.defineProperty(o,'uniqWith',{enumerable:!0,get:function(){return s(Ce).default}});var Oe=u(99);Object.defineProperty(o,'unzip',{enumerable:!0,get:function(){return s(Oe).default}});var Se=u(151);Object.defineProperty(o,'unzipWith',{enumerable:!0,get:function(){return s(Se).default}});var Te=u(267);Object.defineProperty(o,'without',{enumerable:!0,get:function(){return s(Te).default}});var Ae=u(268);Object.defineProperty(o,'xor',{enumerable:!0,get:function(){return s(Ae).default}});var Ee=u(269);Object.defineProperty(o,'xorBy',{enumerable:!0,get:function(){return s(Ee).default}});var Ie=u(270);Object.defineProperty(o,'xorWith',{enumerable:!0,get:function(){return s(Ie).default}});var Re=u(271);Object.defineProperty(o,'zip',{enumerable:!0,get:function(){return s(Re).default}});var Fe=u(272);Object.defineProperty(o,'zipObject',{enumerable:!0,get:function(){return s(Fe).default}});var Ne=u(273);Object.defineProperty(o,'zipObjectDeep',{enumerable:!0,get:function(){return s(Ne).default}});var Ve=u(274);Object.defineProperty(o,'zipWith',{enumerable:!0,get:function(){return s(Ve).default}});var Le=u(481);Object.defineProperty(o,'default',{enumerable:!0,get:function(){return s(Le).default}})},function(r,o,u){'use strict';function s(L){return L&&L.__esModule?L:{default:L}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(67),f=s(d),h=u(139),P=s(h),w=u(441),M=s(w),C=u(96),O=s(C),S=u(92),T=s(S),E=u(491),I=s(E),R=Object.prototype,F=R.propertyIsEnumerable,N=!F.call({valueOf:1},'valueOf'),V=(0,M.default)(function(L,D){if(N||(0,T.default)(D)||(0,O.default)(D))return void(0,P.default)(D,(0,I.default)(D),L);for(var q in D)(0,f.default)(L,q,D[q])});o.default=V},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(198),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(P,!0,!0,w)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return function(){return d}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(418),h=s(f),P=u(449),w=s(P);o.default=function(M,C){return null!=M&&(0,w.default)(M,C,h.default)}},function(r,o,u){'use strict';(function(s){function d(R){return R&&R.__esModule?R:{default:R}}Object.defineProperty(o,'__esModule',{value:!0});var f='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(R){return typeof R}:function(R){return R&&'function'==typeof Symbol&&R.constructor===Symbol&&R!==Symbol.prototype?'symbol':typeof R},h=u(485),P=d(h),w=u(31),M=d(w),C={'function':!0,object:!0},O=C[f(o)]&&o&&!o.nodeType?o:void 0,S=C[f(s)]&&s&&!s.nodeType?s:void 0,T=S&&S.exports===O?O:void 0,E=T?M.default.Buffer:void 0,I=E?function(R){return R instanceof E}:(0,P.default)(!1);o.default=I}).call(o,u(100)(r))},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(43),h=s(f),P=u(98),w=s(P);o.default=function(M){return!!M&&1===M.nodeType&&(0,h.default)(M)&&!(0,w.default)(M)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(130),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(P,w)}},function(r,o,u){'use strict';function s(te){return te&&te.__esModule?te:{default:te}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(97),h=s(f),P=u(43),w=s(P),Q={};Q['[object Float32Array]']=Q['[object Float64Array]']=Q['[object Int8Array]']=Q['[object Int16Array]']=Q['[object Int32Array]']=Q['[object Uint8Array]']=Q['[object Uint8ClampedArray]']=Q['[object Uint16Array]']=Q['[object Uint32Array]']=!0,Q['[object Arguments]']=Q['[object Array]']=Q['[object ArrayBuffer]']=Q['[object Boolean]']=Q['[object DataView]']=Q['[object Date]']=Q['[object Error]']=Q['[object Function]']=Q['[object Map]']=Q['[object Number]']=Q['[object Object]']=Q['[object RegExp]']=Q['[object Set]']=Q['[object String]']=Q['[object WeakMap]']=!1;var X=Object.prototype,ee=X.toString;o.default=function(te){return(0,w.default)(te)&&(0,h.default)(te.length)&&!!Q[ee.call(te)]}},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(423),h=s(f),P=u(208),w=s(P),M=u(36),C=s(M),O=u(92),S=s(O),T=Object.prototype,E=T.hasOwnProperty;o.default=function(I){for(var R=-1,F=(0,S.default)(I),N=(0,h.default)(I),V=N.length,L=(0,w.default)(I),q=L||[],z=q.length,$;++RM?-1:1;return C*1.7976931348623157e308}return M===M?M:0}},function(r,o,u){'use strict';function s(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(414),h=s(f),P=u(15),w=s(P);o.default=function(C){return C?(0,h.default)((0,w.default)(C),0,4294967295):0}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(443),f=s(d),h=u(69),P=s(h),w=(0,f.default)(P.default);o.default=w},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(430),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return null==P?'':(0,h.default)(P)}},function(r,o,u){'use strict';function s(P,w){if(!(P instanceof w))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var d=function(){function P(w,M){for(var C=0,O;C * {\n margin-right: 0.4em; }\n .ck-toolbar > *:last-child {\n margin-right: 0; }\n\n.ck-dropdown::after {\n border-style: solid;\n border-width: .4em .4em 0 .4em;\n border-color: #707070 transparent;\n right: 0.8em; }\n\n.ck-dropdown .ck-button.ck-dropdown__button {\n padding-right: 1.6em; }\n .ck-dropdown .ck-button.ck-dropdown__button .ck-button__label {\n width: 7em;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n.ck-dropdown__panel {\n border: 1px solid #b9b9b9;\n bottom: 1px;\n background: white;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2); }\n .ck-dropdown__panel.ck-rounded-corners,\n .ck-rounded-corners .ck-dropdown__panel {\n border-radius: 2px; }\n\n.ck-list {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n list-style-type: none;\n background: white; }\n .ck-list.ck-rounded-corners,\n .ck-rounded-corners .ck-list {\n border-radius: 2px; }\n .ck-list__item {\n padding: 0.64em;\n cursor: default;\n min-width: 12em; }\n .ck-list__item:hover, .ck-list__item:focus {\n background: #f7f7f7; }\n .ck-list__item:focus {\n box-shadow: 0 0 3px 2px #9bcdfb;\n position: relative;\n z-index: 1;\n outline: none; }\n .ck-list__item:last-of-type {\n border: none; }\n .ck-list__item_active {\n background: #1a8bf1;\n color: white; }\n .ck-list__item_active:hover, .ck-list__item_active:focus {\n background: #0e7ee2; }\n\n.ck-label {\n font-weight: bold; }\n\n.ck-input-text {\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n border: 1px solid #b9b9b9;\n padding: 0.64em;\n min-width: 250px; }\n .ck-input-text.ck-rounded-corners,\n .ck-rounded-corners .ck-input-text {\n border-radius: 2px; }\n .ck-input-text:focus {\n outline: none;\n border: 1px solid #6ab5f9;\n box-shadow: 0 0 3px 2px #9bcdfb, 2px 2px 3px #e6e6e6 inset; }\n\n.ck-balloon-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n min-width: 50px;\n min-height: 15px;\n background: white;\n border: 1px solid #b9b9b9; }\n .ck-balloon-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-balloon-panel {\n border-radius: 2px; }\n .ck-balloon-panel:before, .ck-balloon-panel:after {\n width: 0;\n height: 0;\n border-style: solid; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n border-width: 0 10px 15px 10px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\n border-color: transparent transparent #b9b9b9 transparent; }\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\n border-color: transparent transparent white transparent;\n margin-top: 2px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n border-width: 15px 10px 0 10px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\n border-color: #b9b9b9 transparent transparent; }\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\n border-color: white transparent transparent transparent;\n margin-bottom: 2px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after {\n left: 50%;\n margin-left: -10px;\n top: -15px; }\n .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after {\n left: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n right: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after {\n left: 50%;\n margin-left: -10px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after {\n left: 20px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n right: 20px;\n bottom: -15px; }\n\n.ck-floating-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n background: #f7f7f7; }\n .ck-floating-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-floating-panel {\n border-radius: 2px; }\n\n.ck-toolbar__container {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar {\n border-radius: 0;\n border: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-toolbar__container .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-toolbar__container.ck-balloon-panel_arrow_s:after, .ck-toolbar__container.ck-balloon-panel_arrow_se:after, .ck-toolbar__container.ck-balloon-panel_arrow_sw:after {\n border-bottom-color: #f7f7f7; }\n .ck-toolbar__container.ck-balloon-panel_arrow_n:after, .ck-toolbar__container.ck-balloon-panel_arrow_ne:after, .ck-toolbar__container.ck-balloon-panel_arrow_nw:after {\n border-top-color: #f7f7f7; }\n\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n border-width: 0 0 1px;\n background: #f7f7f7; }\n\n.ck-editor {\n position: relative; }\n .ck-editor.ck-rounded-corners,\n .ck-rounded-corners .ck-editor {\n border-radius: 2px; }\n .ck-editor .ck-editor__top .ck-toolbar {\n border-radius: 0;\n border-top: 0;\n border-left: 0;\n border-right: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-editor .ck-editor__main {\n background: white; }\n .ck-editor .ck-editor__bottom {\n border-bottom: 0;\n border-left: 0;\n border-right: 0;\n padding: 0.8em; }\n .ck-editor .ck-editor__editable.ck-focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset; }\n .ck-editor .ck-editor__editable_inline {\n overflow: auto;\n padding: 0 0.8em; }\n\n.ck-editor,\n.ck-editor-bottom {\n background: #f7f7f7;\n border: 1px solid #b9b9b9; }\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n/**\n * Base font size.\n *\n * @see $ck-font-sizes\n */\n/**\n * Base font face.\n *\n */\n/**\n * Base font sizes for scaling.\n *\n * @see ck-font-size\n */\n/**\n * Returns font-size in units for given level.\n *\n * @param {Number} $level [ 0 ] - Size of the font.\n * @return {String}\n * @see $ck-font-sizes\n * @see $ck-font-size-base\n */\n.ck-heading_heading1 {\n font-size: 1.5em; }\n\n.ck-heading_heading2 {\n font-size: 1.3em; }\n\n.ck-heading_heading3 {\n font-size: 1.1em; }\n\n[class*="ck-heading_"] {\n line-height: 21.6px;\n padding: 9.6px; }\n\n[class*="ck-heading_heading"] {\n font-weight: bold; }\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'@charset "UTF-8";\n/**\n * Colors configured by the user.\n *\n * @type Map\n * @example\n *\t\t$ck-colors: ( \'foreground\': red );\n * @see $_ck-colors\n */\n/**\n * Internal map with default colors.\n *\n * @type Map\n * @see ck-color-add\n */\n/**\n * Returns a color of given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $_ck-colors\n */\n/**\n * Returns a border\u2013color for a given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $ck-color\n */\n/**\n * Adds a color to internal color map.\n *\n * @example\n *\t\t@include ck-color-add( ( \'special\': yellow, \'hover\': #00FF00 ) );\n * @param {Map} $map - A map with new colors.\n * @see $_ck-colors\n */\n/**\n * A visual style of element\'s inner shadow (i.e. input).\n */\n/**\n * A visual style of element\'s drop shadow (i.e. panel).\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n/**\n * A visual style of focused element\'s outer shadow.\n */\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * A class which indicates that an element holding it is disabled.\n */\n.ck-disabled {\n opacity: .5; }\n\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * Brings visual styling for :focus state.\n */\n.ck-widget.image figcaption {\n background-color: #f7f7f7;\n padding: 10px;\n font-size: .8em;\n color: #858585; }\n .ck-widget.image figcaption:focus {\n outline: none;\n box-shadow: none; }\n .ck-widget.image figcaption.focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n background-color: white; }\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.cke-text-alternative-form {\n padding: 1.2em;\n overflow: hidden; }\n .cke-text-alternative-form .ck-label {\n margin-bottom: 0.4em; }\n .cke-text-alternative-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .cke-text-alternative-form__actions .ck-button {\n float: right; }\n .cke-text-alternative-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .cke-text-alternative-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'.ck-widget {\n margin: 10px 0;\n padding: 0; }\n .ck-widget.ck-widget_selected, .ck-widget.ck-widget_selected:hover {\n outline: 2px solid #ace; }\n .ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected {\n outline: 2px solid #ddd; }\n .ck-widget:hover {\n outline: 2px solid yellow; }\n\n.image {\n text-align: center;\n clear: both; }\n .image.image-style-side {\n float: right;\n margin-left: 0.8em;\n max-width: 50%; }\n\n.image > img {\n display: block;\n margin: 0 auto;\n max-width: 100%; }\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.ck-link-form {\n padding: 1.2em;\n overflow: hidden; }\n .ck-link-form .ck-label {\n margin-bottom: 0.4em; }\n .ck-link-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .ck-link-form__actions .ck-button {\n float: right; }\n .ck-link-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .ck-link-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n',''])},function(r){r.exports='\n\n \n bold\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n italic\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n\n \n link\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n unlink\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n bulletedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n numberedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n redo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n undo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r,o,u){var s=u(506);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(507);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(508);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(509);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(510);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(511);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){u(277),r.exports=u(278)}])}); + */ +var _NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor=Math.floor,_Mathmax=Math.max,_Mathmin=Math.min;(function(o,u){if('object'==typeof exports&&'object'==typeof module)module.exports=u();else if('function'==typeof define&&define.amd)define([],u);else{var s=u();for(var d in s)('object'==typeof exports?exports:o)[d]=s[d]}})(this,function(){return function(r){function o(s){if(u[s])return u[s].exports;var d=u[s]={i:s,l:!1,exports:{}};return r[s].call(d.exports,d,d.exports,o),d.l=!0,d.exports}var u={};return o.m=r,o.c=u,o.i=function(s){return s},o.d=function(s,d,f){o.o(s,d)||Object.defineProperty(s,d,{configurable:!1,enumerable:!0,get:f})},o.n=function(s){var d=s&&s.__esModule?function(){return s['default']}:function(){return s};return o.d(d,'a',d),d},o.o=function(s,d){return Object.prototype.hasOwnProperty.call(s,d)},o.p='',o(o.s=534)}([function(r,o){'use strict';function s(w,M){if(!(w instanceof M))throw new TypeError('Cannot call a class as a function')}function d(w,M){if(!w)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return M&&('object'==typeof M||'function'==typeof M)?M:w}function f(w,M){if('function'!=typeof M&&null!==M)throw new TypeError('Super expression must either be null or a function, not '+typeof M);w.prototype=Object.create(M&&M.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(w,M):w.__proto__=M)}Object.defineProperty(o,'__esModule',{value:!0});var h=function(){function w(M,C){for(var O=0,S;OD?0:D,L}},{key:'isAfter',value:function(V){return'after'==this.compareWith(V)}},{key:'isBefore',value:function(V){return'before'==this.compareWith(V)}},{key:'isEqual',value:function(V){return'same'==this.compareWith(V)}},{key:'isTouching',value:function(V){var L=null,D=null,q=this.compareWith(V);switch(q){case'same':return!0;case'before':L=F.createFromPosition(this),D=F.createFromPosition(V);break;case'after':L=F.createFromPosition(V),D=F.createFromPosition(this);break;default:return!1;}for(var z=L.parent;L.path.length+D.path.length;){if(L.isEqual(D))return!0;if(L.path.length>D.path.length){if(L.offset!==z.maxOffset)return!1;L.path=L.path.slice(0,-1),z=z.parent,L.offset++}else{if(0!==D.offset)return!1;D.path=D.path.slice(0,-1)}}}},{key:'_getTransformedByDeletion',value:function(V,L){var D=F.createFromPosition(this);if(this.root!=V.root)return D;if('same'==(0,O.default)(V.getParentPath(),this.getParentPath())){if(V.offsetthis.offset)return null;D.offset-=L}}else if('prefix'==(0,O.default)(V.getParentPath(),this.getParentPath())){var q=V.path.length-1;if(V.offset<=this.path[q]){if(V.offset+L>this.path[q])return null;D.path[q]-=L}}return D}},{key:'_getTransformedByInsertion',value:function(V,L,D){var q=F.createFromPosition(this);if(this.root!=V.root)return q;if('same'==(0,O.default)(V.getParentPath(),this.getParentPath()))(V.offsetF+1;)L=V.maxOffset-N.offset,0!=L&&R.push(new E(N,N.getShiftedBy(L))),N.path=N.path.slice(0,-1),N.offset++,V=V.parent;for(;N.path.length<=this.end.path.length;){var D=this.end.path[N.path.length-1],q=D-N.offset;0!=q&&R.push(new E(N,N.getShiftedBy(q))),N.offset=D,N.path.push(0)}return R}},{key:'getWalker',value:function(){var R=0=I;I++)R=String.fromCharCode(I),E[R.toLowerCase()]=I;for(var F=48;57>=F;F++)E[F-48]=F;for(var N=112;123>=N;N++)E['f'+(N-111)]=N;return E}()},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}function d(M,C,O,S,T){var E=-1,I=M.length;for(O||(O=w.default),T||(T=[]);++EV?0:V,N}},{key:'getLastMatchingPosition',value:function(F){var N=1this.offset-F.offset?'before':'after';var N=this.getAncestors(),V=F.getAncestors(),L=(0,M.default)(N,V),D;switch(L){case 0:return'different';case'prefix':D=N.length-1;break;case'extension':D=V.length-1;break;default:D=L-1;}var q=N[D],z=N[D+1],$=V[D+1];if(q===this.parent){var W=this.offset-$.index;return 0>=W?'before':'after'}if(q===F.parent){var K=z.index-F.offset;return 0>K?'before':'after'}var H=z.index-$.index;return 0>H?'before':'after'}},{key:'nodeAfter',get:function(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}},{key:'nodeBefore',get:function(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}},{key:'isAtStart',get:function(){return 0===this.offset}},{key:'isAtEnd',get:function(){var F=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===F}},{key:'root',get:function(){return this.parent.root}},{key:'editableElement',get:function(){for(var F=this.parent;!(F instanceof T.default);)if(F.parent)F=F.parent;else return null;return F}}],[{key:'createAt',value:function(F,N){if(F instanceof I)return this.createFromPosition(F);var V=F;if('end'==N)N=V.is('text')?V.data.length:V.childCount;else{if('before'==N)return this.createBefore(V);if('after'==N)return this.createAfter(V);N||(N=0)}return new I(V,N)}},{key:'createAfter',value:function(F){if(F.is('textProxy'))return new I(F.textNode,F.offsetInText+F.data.length);if(!F.parent)throw new O.default('view-position-after-root: You can not make position after root.',{root:F});return new I(F.parent,F.index+1)}},{key:'createBefore',value:function(F){if(F.is('textProxy'))return new I(F.textNode,F.offsetInText);if(!F.parent)throw new O.default('view-position-before-root: You can not make position before root.',{root:F});return new I(F.parent,F.index)}},{key:'createFromPosition',value:function(F){return new this(F.parent,F.offset)}}]),I}();o.default=E},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F,N){if(!F)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return N&&('object'==typeof N||'function'==typeof N)?N:F}function h(F,N){if('function'!=typeof N&&null!==N)throw new TypeError('Super expression must either be null or a function, not '+typeof N);F.prototype=Object.create(N&&N.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(F,N):F.__proto__=N)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function F(N,V){for(var L=0,D;L$.maxOffset)throw new I.default('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if($===W&&K=K&&this.targetPosition.path[U]K&&(K=this.boundaries.start.offset),$=D.offset-K}W=D.offset-z.startOffset;var H=new C.default(z,W-$,$);return D.offset-=$,this.position=D,f('text',H,L,D,$)}return D.path.pop(),this.position=D,this._visitedParent=q.parent,f('elementStart',q,L,D,1)}}]),N}();o.default=F},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S){return S.item.is('attributeElement')||S.item.is('uiElement')}Object.defineProperty(o,'__esModule',{value:!0});var h=function(){function S(T,E){for(var I=0,R;If&&(f=-f>w?0:w+f),h=h>w?w:h,0>h&&(h+=w),w=f>h?0:h-f>>>0,f>>>=0;for(var M=Array(w);++P=this._holderElementOffset&&this.sourcePosition.path[0]++}return w(V.prototype.__proto__||Object.getPrototypeOf(V.prototype),'_execute',this).call(this)}},{key:'type',get:function(){return'remove'}},{key:'_holderElementOffset',get:function(){return this.targetPosition.path[0]},set:function(D){this.targetPosition.path[0]=D}}],[{key:'fromJSON',value:function(D,q){var z=S.default.fromJSON(D.sourcePosition,q),$=new V(z,D.howMany,D.baseVersion);return $.targetPosition=S.default.fromJSON(D.targetPosition,q),$._needsHolderElement=D._needsHolderElement,$}},{key:'className',get:function(){return'engine.model.operation.RemoveOperation'}}]),V}(C.default);o.default=F},function(r,o,u){'use strict';function d(T,E){if(!(T instanceof E))throw new TypeError('Cannot call a class as a function')}function f(T,E){if(!T)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return E&&('object'==typeof E||'function'==typeof E)?E:T}function h(T,E){if('function'!=typeof E&&null!==E)throw new TypeError('Super expression must either be null or a function, not '+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}function P(){return 0===this.childCount?0:null}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function T(E,I){for(var R=0,F;R=200){var H=V?null:(0,E.default)(N);if(H)return(0,R.default)(H);$=!1,q=S.default,K=new h.default}else K=V?[]:W;outer:for(;++DO||O>C.offsetSize)throw new P.default('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>S||O+S>C.offsetSize)throw new P.default('model-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(O,O+S),this.offsetInText=O}return f(M,[{key:'is',value:function(O){return'textProxy'==O}},{key:'getPath',value:function(){var O=this.textNode.getPath();return 0=200&&(z=R.default,$=!1,V=new h.default(V));outer:for(;++qf;f++)d+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return d}},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}function d(S){if(Array.isArray(S)){for(var T=0,E=Array(S.length);T=I&&Ethis._items.length||0>N)throw new M.default('collection-add-item-invalid-index');return this._items.splice(N,0,F),this._itemMap.set(V,F),this.fire('add',F,N),this}},{key:'get',value:function(F){var N;if('string'==typeof F)N=this._itemMap.get(F);else if('number'==typeof F)N=this._items[F];else throw new M.default('collection-get-invalid-arg: Index or id must be given.');return N||null}},{key:'getIndex',value:function(F){var N;return N='string'==typeof F?this._itemMap.get(F):F,this._items.indexOf(N)}},{key:'remove',value:function(F){var D=!1,q=this._idProperty,N,V,L;if('string'==typeof F?(V=F,L=this._itemMap.get(V),D=!L,L&&(N=this._items.indexOf(L))):'number'==typeof F?(N=F,L=this._items[N],D=!L,L&&(V=L[q])):(L=F,V=L[q],N=this._items.indexOf(L),D=-1==N||!this._itemMap.get(V)),D)throw new M.default('collection-remove-404: Item not found.');this._items.splice(N,1),this._itemMap.delete(V);var z=this._bindToInternalToExternalMap.get(L);return this._bindToInternalToExternalMap.delete(L),this._bindToExternalToInternalMap.delete(z),this.fire('remove',L),L}},{key:'map',value:function(F,N){return this._items.map(F,N)}},{key:'find',value:function(F,N){return this._items.find(F,N)}},{key:'filter',value:function(F,N){return this._items.filter(F,N)}},{key:'clear',value:function(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}},{key:'bindTo',value:function(F){var N=this;if(this._bindToCollection)throw new M.default('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=F,{as:function(L){N._setUpBindToBinding(function(D){return new L(D)})},using:function(L){'function'==typeof L?N._setUpBindToBinding(function(D){return L(D)}):N._setUpBindToBinding(function(D){return D[L]})}}}},{key:'_setUpBindToBinding',value:function(F){var N=this,V=this._bindToCollection,L=function(U,G,J){var Z=V._bindToCollection==N,Y=V._bindToInternalToExternalMap.get(G);if(Z&&Y)N._bindToExternalToInternalMap.set(G,Y),N._bindToInternalToExternalMap.set(Y,G);else{var Q=F(G);N._bindToExternalToInternalMap.set(G,Q),N._bindToInternalToExternalMap.set(Q,G),N.add(Q,J)}},D=!0,q=!1,z;try{for(var $=V[Symbol.iterator](),W,K;!(D=(W=$.next()).done);D=!0)K=W.value,L(null,K)}catch(H){q=!0,z=H}finally{try{!D&&$.return&&$.return()}finally{if(q)throw z}}this.listenTo(V,'add',L),this.listenTo(V,'remove',function(H,U){var G=N._bindToExternalToInternalMap.get(U);G&&N.remove(G)})}},{key:Symbol.iterator,value:function(){return this._items[Symbol.iterator]()}},{key:'length',get:function(){return this._items.length}}]),I}();o.default=E,(0,T.default)(E,P.default)},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F){return F['data-ck-expando']||(F['data-ck-expando']=(0,C.default)())}function h(F){return F&&(0,E.default)(F.addEventListener)}Object.defineProperty(o,'__esModule',{value:!0});var P=u(7),w=s(P),M=u(71),C=s(M),O=u(45),S=s(O),T=u(235),E=s(T),I=(0,S.default)({},w.default,{listenTo:function(){for(var N=arguments.length,V=Array(N),L=0;L>>1){for(;R>>1,V=T[N];null!==V&&!(0,C.default)(V)&&(I?V<=E:V$._priority)||!(z._priority<$._priority)&&W}function S(z){return z.reduce(function($,W){return $+W.operations.length},0)}function T(z,$){for(var W=z[z.length-1],K=W.operations.length+W.baseVersion,H=new I.default,U=0;U<$;U++)H.addOperation(new V.default(K++));z.push(H)}Object.defineProperty(o,'__esModule',{value:!0}),o.default=f,o.defaultTransform=P,o.addTransformationCase=function(z,$,W){var K=q.get(z);K||(K=new Map,q.set(z,K)),K.set($,W)},o.getTransformationCase=M,o.transformDeltaSets=function(z,$,W){for(var K=Array.from(z),H=Array.from($),U=0,G;U=I||0>re||X&&ae>=U}function D(){var te=(0,w.default)();return L(te)?q(te):void(J=setTimeout(D,V(te)))}function q(te){return(clearTimeout(J),J=void 0,ee&&K)?F(te):(K=H=void 0,G)}function W(){var te=(0,w.default)(),re=L(te);if(K=arguments,H=this,Z=te,re){if(void 0===J)return N(Z);if(X)return clearTimeout(J),J=setTimeout(D,I),F(Z)}return void 0===J&&(J=setTimeout(D,I)),G}var Z=0,Y=0,Q=!1,X=!1,ee=!0,K,H,U,G,J;if('function'!=typeof E)throw new TypeError('Expected a function');return I=(0,C.default)(I)||0,(0,h.default)(R)&&(Q=!!R.leading,X='maxWait'in R,U=X?_Mathmax((0,C.default)(R.maxWait)||0,I):U,ee='trailing'in R?!!R.trailing:ee),W.cancel=function(){void 0!==J&&clearTimeout(J),Z=Y=0,K=H=J=void 0},W.flush=function(){return void 0===J?G:q((0,w.default)())},W}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(36),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),(0,h.default)(M,0>C?0:C,S)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(36),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),C=S-C,(0,h.default)(M,0,0>C?0:C)):[]}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return d&&d.length?d[0]:void 0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(13),h=function(S){return S&&S.__esModule?S:{default:S}}(f),w=Object.prototype,M=w.hasOwnProperty,C=w.toString,O=w.propertyIsEnumerable;o.default=function(S){return(0,h.default)(S)&&M.call(S,'callee')&&(!O.call(S,'callee')||C.call(S)=='[object Arguments]')}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(14),h=function(O){return O&&O.__esModule?O:{default:O}}(f),M=Object.prototype,C=M.toString;o.default=function(O){var S=(0,h.default)(O)?C.call(O):'';return S=='[object Function]'||S=='[object GeneratorFunction]'}},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(11),h=s(f),P=u(46),w=s(P),C=Object.prototype,O=C.toString;o.default=function(S){return'string'==typeof S||!(0,h.default)(S)&&(0,w.default)(S)&&O.call(S)=='[object String]'}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(133),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return P&&P.length&&w&&w.length?(0,h.default)(P,w):P}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(195),h=s(f),P=u(27),w=s(P),M=u(100),C=s(M);o.default=function(O,S){if(!(O&&O.length))return[];var T=(0,C.default)(O);return null==S?T:(0,w.default)(T,function(E){return(0,h.default)(S,void 0,E)})}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(M){return(0,h.default)(M)?(0,w.default)(M):new Map(M)};var f=u(99),h=s(f),P=u(274),w=s(P)},function(r){'use strict';var s='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&'function'==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?'symbol':typeof f},d;d=function(){return this}();try{d=d||Function('return this')()||(1,eval)('this')}catch(f){'object'===('undefined'==typeof window?'undefined':s(window))&&(d=window)}r.exports=d},function(r,o,u){'use strict';function s(N){return N&&N.__esModule?N:{default:N}}function d(N,V){if(!(N instanceof V))throw new TypeError('Cannot call a class as a function')}function f(N,V){if(!N)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return V&&('object'==typeof V||'function'==typeof V)?V:N}function h(N,V){if('function'!=typeof V&&null!==V)throw new TypeError('Super expression must either be null or a function, not '+typeof V);N.prototype=Object.create(V&&V.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(N,V):N.__proto__=V)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function N(V,L){for(var D=0,q;DX?0:X),new S.default(Q,X)):null}if(0===Y){var ee=this.getCorrespondingView(Z);if(ee)return new S.default(ee,0)}else{var te=this.getCorrespondingView(Z.childNodes[Y-1]);if(te&&te.parent)return new S.default(te.parent,te.index+1)}return null}},{key:'getCorrespondingView',value:function(Z){return this.isElement(Z)?this.getCorrespondingViewElement(Z):this.isDocumentFragment(Z)?this.getCorrespondingViewDocumentFragment(Z):this.isText(Z)?this.getCorrespondingViewText(Z):null}},{key:'getCorrespondingViewElement',value:function(Z){return this._domToViewMapping.get(Z)}},{key:'getCorrespondingViewDocumentFragment',value:function(Z){return this._domToViewMapping.get(Z)}},{key:'getCorrespondingViewText',value:function(Z){if((0,D.isInlineFiller)(Z))return null;var Y=Z.previousSibling;if(Y){if(!this.isElement(Y))return null;var Q=this.getCorrespondingViewElement(Y);if(Q){var X=Q.nextSibling;return X instanceof w.default?Q.nextSibling:null}}else{var ee=this.getCorrespondingViewElement(Z.parentNode);if(ee){var te=ee.getChild(0);return te instanceof w.default?te:null}}return null}},{key:'getCorrespondingDom',value:function(Z){return Z instanceof C.default?this.getCorrespondingDomElement(Z):Z instanceof N.default?this.getCorrespondingDomDocumentFragment(Z):Z instanceof w.default?this.getCorrespondingDomText(Z):null}},{key:'getCorrespondingDomElement',value:function(Z){return this._viewToDomMapping.get(Z)}},{key:'getCorrespondingDomDocumentFragment',value:function(Z){return this._viewToDomMapping.get(Z)}},{key:'getCorrespondingDomText',value:function(Z){var Y=Z.previousSibling;return Y&&this.getCorrespondingDom(Y)?this.getCorrespondingDom(Y).nextSibling:!Y&&Z.parent&&this.getCorrespondingDom(Z.parent)?this.getCorrespondingDom(Z.parent).childNodes[0]:null}},{key:'focus',value:function(Z){var Y=this.getCorrespondingDomElement(Z);Y&&Y.ownerDocument.activeElement!==Y&&Y.focus()}},{key:'isText',value:function(Z){return Z&&Z.nodeType==Node.TEXT_NODE}},{key:'isElement',value:function(Z){return Z&&Z.nodeType==Node.ELEMENT_NODE}},{key:'isDocumentFragment',value:function(Z){return Z&&Z.nodeType==Node.DOCUMENT_FRAGMENT_NODE}},{key:'isDomSelectionBackward',value:function(Z){if(Z.isCollapsed)return!1;var Y=new Range;Y.setStart(Z.anchorNode,Z.anchorOffset),Y.setEnd(Z.focusNode,Z.focusOffset);var Q=Y.collapsed;return Y.detach(),Q}},{key:'_processDataFromViewText',value:function(Z){var Y=this,Q=Z.data;if(Z.getAncestors().some(function(oe){return Y.preElements.includes(oe.name)}))return Q;var X=this._getTouchingViewTextNode(Z,!1),ee=this._getTouchingViewTextNode(Z,!0),te=Q.match(/ *$/)[0],re=Q.substr(0,Q.length-te.length);if(X&&' '!=X.data.charAt(X.data.length-1)||(re=re.replace(/^ /,'\xA0')),re=re.replace(/ /g,' \xA0'),0=this.limit&&this._reset(!0)}},{key:'lock',value:function(){this.isLocked=!0}},{key:'unlock',value:function(){this.isLocked=!1}},{key:'destroy',value:function(){this.document.off('change',this._changeCallback),this.document.selection.off('change:range',this._selectionChangeCallback),this.document.selection.off('change:attribute',this._selectionChangeCallback)}},{key:'_onBatch',value:function(O){'transparent'!=O.type&&O!==this._batch&&1>=(0,P.default)(O.getOperations())&&this._reset(!0)}},{key:'_reset',value:function(O){(!this.isLocked||O)&&(this._batch=null,this.size=0)}},{key:'batch',get:function(){return this._batch||(this._batch=this.document.batch()),this._batch}}]),M}();o.default=w},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){var f=d.emitter,h=d.activator,P=d.callback,w=d.contextElement;f.listenTo(document,'mouseup',function(M,C){var O=C.target;h()&&!w.contains(O)&&P()})}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){var f=d.view;f.listenTo(f.element,'submit',function(h,P){P.preventDefault(),f.fire('submit')},{useCapture:!0})}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}function d(T,E){if(!(T instanceof E))throw new TypeError('Cannot call a class as a function')}function f(T,E){if(!T)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return E&&('object'==typeof E||'function'==typeof E)?E:T}function h(T,E){if('function'!=typeof E&&null!==E)throw new TypeError('Super expression must either be null or a function, not '+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function T(E,I){for(var R=0,F;RL?-1:1;E[N+D]&&(E[N]=E[N+D].slice(0)),E[N]||(E[N]=[]),E[N].push(V>L?w:M);for(var q=_Mathmax(V,L),z=q-N;zT;F--)I[F]=P(F);I[T]=P(T),R++}while(I[T]!==S);return E[T].slice(1)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){for(var f=[];d&&d.nodeType!=Node.DOCUMENT_NODE;)f.unshift(d),d=d.parentNode;return f}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return function(f){return f+d}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(55),f=s(d),h=u(30),P=s(h),w=(0,f.default)(P.default,'Map');o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(55),f=s(d),h=u(30),P=s(h),w=(0,f.default)(P.default,'Set');o.default=w},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var d=u(30),f=function(P){return P&&P.__esModule?P:{default:P}}(d),h=f.default.Uint8Array;o.default=h},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h){var P=h.length;return 0===P?d.call(f):1===P?d.call(f,h[0]):2===P?d.call(f,h[0],h[1]):3===P?d.call(f,h[0],h[1],h[2]):d.apply(f,h)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h,P){var w=-1,M=d.length;for(P&&M&&(h=d[++w]);++wN))return!1;var L=R.get(O);if(L)return L==S;var D=-1,q=!0,z=I&1?new h.default:void 0;for(R.set(O,S);++DE)return[];for(var F=0,N=0,V=Array(O(R/E));FS&&(S=_Mathmax(T+S,0)),(0,h.default)(C,O,S)):-1}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(146),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(P,1)}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(130),P=s(h),w=u(138),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){var E=(0,f.default)(T,M.default);return E.length&&E[0]===T[0]?(0,P.default)(E):[]});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(130),P=s(h),w=u(10),M=s(w),C=u(138),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F),V=(0,f.default)(F,O.default);return N===(0,T.default)(V)?N=void 0:V.pop(),V.length&&V[0]===F[0]?(0,P.default)(V,(0,M.default)(N)):[]});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(130),P=s(h),w=u(138),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I),F=(0,f.default)(I,M.default);return R===(0,O.default)(F)?R=void 0:F.pop(),F.length&&F[0]===I[0]?(0,P.default)(F,void 0,R):[]});o.default=E},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(149),h=s(f),P=u(91),w=s(P),M=u(14),C=s(M),O=u(211),S=s(O),T=/[\\^$.*+?()[\]{}|]/g,E=/^\[object .+?Constructor\]$/,I=Object.prototype,R=Function.prototype.toString,F=I.hasOwnProperty,N=RegExp('^'+R.call(F).replace(T,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');o.default=function(V){if(!(0,C.default)(V))return!1;var L=(0,h.default)(V)||(0,w.default)(V)?N:E;return L.test((0,S.default)(V))}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var d=Array.prototype,f=d.join;o.default=function(h,P){return h?f.call(h,P):''}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(208),h=s(f),P=u(15),w=s(P);o.default=function(O,S,T){var E=O?O.length:0;if(!E)return-1;var I=E;if(void 0!==T&&(I=(0,w.default)(T),I=(0>I?_Mathmax(E+I,0):_Mathmin(I,E-1))+1),S!==S)return(0,h.default)(O,I,!0);for(;I--;)if(O[I]===S)return I;return-1}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(426),h=s(f),P=u(15),w=s(P);o.default=function(M,C){return M&&M.length?(0,h.default)(M,(0,w.default)(C)):void 0}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(151),f=s(d),h=u(8),P=s(h),w=(0,P.default)(f.default);o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(133),w=s(P);o.default=function(M,C,O){return M&&M.length&&C&&C.length?(0,w.default)(M,C,(0,h.default)(O)):M}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(133),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w,M){return P&&P.length&&w&&w.length?(0,h.default)(P,w,void 0,M):P}},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(413),P=s(h),w=u(23),M=s(w),C=u(200),O=s(C),S=u(439),T=s(S),E=u(37),I=s(E),R=u(8),F=s(R),N=(0,F.default)(function(V,L){L=(0,M.default)(L,1);var D=V?V.length:0,q=(0,P.default)(V,L);return(0,O.default)(V,(0,f.default)(L,function(z){return(0,I.default)(z,D)?+z:z}).sort(T.default)),q});o.default=N},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(200),w=s(P);o.default=function(M,C){var O=[];if(!(M&&M.length))return O;var S=-1,T=[],E=M.length;for(C=(0,h.default)(C,3);++SC?0:C)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(36),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),C=S-C,(0,h.default)(M,0>C?0:C,S)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(88),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C,3),!1,!0):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(88),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C,3)):[]}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(149),h=s(f),P=u(14),w=s(P),M=u(47),C=s(M),O=0/0,S=/^\s+|\s+$/g,T=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,I=/^0o[0-7]+$/i,R=parseInt;o.default=function(F){if('number'==typeof F)return F;if((0,C.default)(F))return O;if((0,w.default)(F)){var N=(0,h.default)(F.valueOf)?F.valueOf():F;F=(0,w.default)(N)?N+'':N}if('string'!=typeof F)return 0===F?F:+F;F=F.replace(S,'');var V=E.test(F);return V||I.test(F)?R(F.slice(2),V?2:8):T.test(F)?O:+F}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(44),P=s(h),w=u(13),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){return(0,P.default)((0,f.default)(T,1,M.default,!0))});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(10),P=s(h),w=u(44),M=s(w),C=u(13),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F);return(0,O.default)(N)&&(N=void 0),(0,M.default)((0,f.default)(F,1,O.default,!0),(0,P.default)(N))});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(44),P=s(h),w=u(13),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I);return(0,M.default)(R)&&(R=void 0),(0,P.default)((0,f.default)(I,1,M.default,!0),void 0,R)});o.default=E},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(44),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return P&&P.length?(0,h.default)(P):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(44),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C)):[]}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(44),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return P&&P.length?(0,h.default)(P,void 0,w):[]}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(69),f=s(d),h=u(13),P=s(h),w=u(8),M=s(w),C=(0,M.default)(function(O,S){return(0,P.default)(O)?(0,f.default)(O,S):[]});o.default=C},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(84),f=s(d),h=u(136),P=s(h),w=u(13),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){return(0,P.default)((0,f.default)(T,M.default))});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(84),f=s(d),h=u(10),P=s(h),w=u(136),M=s(w),C=u(13),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F);return(0,O.default)(N)&&(N=void 0),(0,M.default)((0,f.default)(F,O.default),(0,P.default)(N))});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(84),f=s(d),h=u(136),P=s(h),w=u(13),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I);return(0,M.default)(R)&&(R=void 0),(0,P.default)((0,f.default)(I,M.default),void 0,R)});o.default=E},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(8),f=s(d),h=u(100),P=s(h),w=(0,f.default)(P.default);o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(68),h=s(f),P=u(203),w=s(P);o.default=function(M,C){return(0,w.default)(M||[],C||[],h.default)}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(428),h=s(f),P=u(203),w=s(P);o.default=function(M,C){return(0,w.default)(M||[],C||[],h.default)}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(8),f=s(d),h=u(152),P=s(h),w=(0,f.default)(function(M){var C=M.length,O=1D.length);){var $=D,W=$.index,K=$[1],H=$[2],U=$[3];W+=D[0].length-(K+H+U).length;var J=[W,W+K.length],Z=[W+K.length+H.length,W+K.length+H.length+U.length];q.push(J),q.push(Z),z.push([W+K.length,W+K.length+H.length])}return{remove:q,format:z}},V=V||function(L,D){var q=!0,z=!1,$;try{for(var W=D[Symbol.iterator](),K,H;!(q=(K=W.next()).done);q=!0)H=K.value,L.setAttribute(H,F,!0)}catch(U){z=!0,$=U}finally{try{!q&&W.return&&W.return()}finally{if(z)throw $}}},S.document.on('change',function(L,D){if('insert'===D){var q=I.editor.document.selection;if(q.isCollapsed&&q.focus&&q.focus.parent){var z=q.focus.parent,$=f(z).slice(0,q.focus.offset),W=N($),K=[];W.format.forEach(function(G){void 0===G[0]||void 0===G[1]||K.push(P.default.createFromParentsAndOffsets(z,G[0],z,G[1]))});var H=[];if(W.remove.slice().reverse().forEach(function(G){void 0===G[0]||void 0===G[1]||H.push(P.default.createFromParentsAndOffsets(z,G[0],z,G[1]))}),!!(K.length&&H.length)){var U=S.document.batch();S.document.enqueueChanges(function(){var G=(0,M.default)(F,K,S.document.schema);V(U,G);var J=!0,Z=!1,Y;try{for(var Q=H[Symbol.iterator](),X,ee;!(J=(X=Q.next()).done);J=!0)ee=X.value,U.remove(ee)}catch(te){Z=!0,Y=te}finally{try{!J&&Q.return&&Q.return()}finally{if(Z)throw Y}}})}}}})}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F,N){if(!F)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return N&&('object'==typeof N||'function'==typeof N)?N:F}function h(F,N){if('function'!=typeof N&&null!==N)throw new TypeError('Super expression must either be null or a function, not '+typeof N);F.prototype=Object.create(N&&N.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(F,N):F.__proto__=N)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function F(N,V){for(var L=0,D;L(\s+)<\/span>/g,function(f,h){return 1==h.length?' ':h})}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return d=d.replace(//g,'>').replace(/\n\n/g,'

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

    ')&&(d='

    '+d+'

    '),d}},function(r,o,u){'use strict';function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S,T){if(!S)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return T&&('object'==typeof T||'function'==typeof T)?T:S}function h(S,T){if('function'!=typeof T&&null!==T)throw new TypeError('Super expression must either be null or a function, not '+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function S(T,E){for(var I=0,R;Ige.position.offset;return ye&&be?[ge.getReversed(),pe.clone()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(G.default,W.default,function(pe,ge,me){return pe.position.isEqual(ge.position)?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(G.default,Z.default,function(pe,ge,me){var ye=pe.position.root==ge.sourcePosition.root&&'same'===(0,ce.default)(pe.position.getParentPath(),ge.sourcePosition.getParentPath()),be=ge.sourcePosition.offset<=pe.position.offset&&ge.sourcePosition.offset+ge.howMany>pe.position.offset;return ye&&be?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,Q.default,function(pe,ge,me){var ye=pe.position.getParentPath(),be=ge.position.getParentPath();if('same'==(0,ce.default)(ye,be)){if(pe.position.offset==ge.position.offset)return[h()];if(pe.position.offsetge._cloneOperation.sourcePosition.offset&&he._cloneOperation.sourcePosition.offset--,[he]}var ve=pe.clone();return ve._cloneOperation.position.offset++,ve._moveOperation.sourcePosition.path[ve._moveOperation.sourcePosition.path.length-2]++,ve._moveOperation.targetPosition.path[ve._moveOperation.targetPosition.path.length-2]++,ve._moveOperation.sourcePosition.offset=pe.position.offset-ge.position.offset,pe._cloneOperation instanceof V.default&&ge._cloneOperation instanceof V.default&&pe._cloneOperation.sourcePosition.offset>ge._cloneOperation.sourcePosition.offset&&ve._cloneOperation.sourcePosition.offset--,[ve]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,oe.default,function(pe,ge,me){return'same'===(0,ce.default)(ge.position.path,pe.position.getParentPath())?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,re.default,function(pe,ge,me){var ye='same'===(0,ce.default)(pe.position.getParentPath(),ge.range.start.getParentPath()),be=ge.range.start.offset=pe.position.offset;if(ye&&be)return[h()];if('same'===(0,ce.default)(pe.position.getParentPath(),ge.range.end.getShiftedBy(-1).path)){var he=pe.clone(),ve=O.default.createFromPosition(ge.range.start);ve.path.push(ge.howMany-1);var ke=ve.getShiftedBy(1);he._cloneOperation.position=ke;var Pe=O.default.createFromPosition(ve);Pe.path.push(pe.position.offset),he._moveOperation.sourcePosition=Pe;var we=O.default.createFromPosition(ke);return we.path.push(0),he._moveOperation.targetPosition=we,[he]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,z.default,function(pe,ge){pe=pe.clone();var me=new O.default(pe.position.root,pe.position.path.slice(0,-1));if(pe._cloneOperation instanceof F.default){var ye=!0,be=!1,he;try{for(var ve=ge.operations[Symbol.iterator](),ke,Pe;!(ye=(ke=ve.next()).done);ye=!0)if(Pe=ke.value,Pe.range.containsPosition(me)||Pe.range.start.isEqual(me)){null===Pe.newValue?pe._cloneOperation.nodes.getNode(0).removeAttribute(Pe.key):pe._cloneOperation.nodes.getNode(0).setAttribute(Pe.key,Pe.newValue);break}}catch(we){be=!0,he=we}finally{try{!ye&&ve.return&&ve.return()}finally{if(be)throw he}}}return[pe]}),(0,P.addTransformationCase)(oe.default,Q.default,function(pe,ge,me){if('same'===(0,ce.default)(pe.position.path,ge.position.getParentPath())){var ye=[ge.getReversed(),pe.clone()];return ye[1].operations[1].targetPosition.path[0]++,ye}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(ee.default,z.default,function(pe,ge){var me=[pe.clone()];return ge.range.containsPosition(pe.position)&&me.push(f(pe,ge)),me}),(0,P.addTransformationCase)(re.default,Q.default,function(pe,ge,me){var ye='same'===(0,ce.default)(pe.range.start.getParentPath(),ge.position.getParentPath()),be=pe.range.start.offset=ge.position.offset;if(ye&&be)return[ge.getReversed(),pe.clone()];if('same'===(0,ce.default)(ge.position.getParentPath(),pe.range.end.getShiftedBy(-1).path)){var he=pe.clone();return he._insertOperation.position.offset++,he._moveOperation.howMany++,he._moveOperation.targetPosition.path[he._moveOperation.targetPosition.path.length-2]++,[he]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(ue.default,Q.default,function(pe,ge,me){var ye=new O.default(ge.position.root,ge.position.path.slice(0,-1)),be=(0,P.defaultTransform)(pe,ge,me);if(pe.operations[0].position.isEqual(ye)){var he=pe.clone();he.operations[0].position=pe.operations[0].position.getShiftedBy(1),be.push(he)}return be}),(0,P.addTransformationCase)(Q.default,ue.default,function(pe,ge){pe=pe.clone();var me=new O.default(pe.position.root,pe.position.path.slice(0,-1));return pe._cloneOperation instanceof F.default&&ge.operations[0].position.isEqual(me)&&(pe._cloneOperation.nodes.getNode(0).name=ge.operations[0].newName),[pe]}),(0,P.addTransformationCase)(de.default,Q.default,function(pe,ge,me){var ye=(0,P.defaultTransform)(pe,ge,me),be=ge._cloneOperation.position,he=!0,ve=!1,ke;try{for(var Pe=ye[Symbol.iterator](),we;!(he=(we=Pe.next()).done);he=!0){var xe=we.value,Me=!0,Ce=!1,Oe=void 0;try{for(var Se=xe.operations[Symbol.iterator](),Te;!(Me=(Te=Se.next()).done);Me=!0){var Ae=Te.value,Ee=Ae.sourcePosition.getShiftedBy(Ae.howMany);Ee.isEqual(be)&&(Ae.howMany+=1)}}catch(Ie){Ce=!0,Oe=Ie}finally{try{!Me&&Se.return&&Se.return()}finally{if(Ce)throw Oe}}}}catch(Ie){ve=!0,ke=Ie}finally{try{!he&&Pe.return&&Pe.return()}finally{if(ve)throw ke}}return ye}),(0,P.addTransformationCase)(Q.default,de.default,function(pe,ge,me){ge=ge.clone();var ye=pe._cloneOperation.position,be=!0,he=!1,ve;try{for(var ke=ge.operations[Symbol.iterator](),Pe;!(be=(Pe=ke.next()).done);be=!0){var we=Pe.value,xe=we.sourcePosition.getShiftedBy(we.howMany);xe.isEqual(ye)&&(we.howMany+=1)}}catch(Me){he=!0,ve=Me}finally{try{!be&&ke.return&&ke.return()}finally{if(he)throw ve}}return(0,P.defaultTransform)(pe,ge,me)})},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}function d(V,L){if(!(V instanceof L))throw new TypeError('Cannot call a class as a function')}function f(V,L){if(!V)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return L&&('object'==typeof L||'function'==typeof L)?L:V}function h(V,L){if('function'!=typeof L&&null!==L)throw new TypeError('Super expression must either be null or a function, not '+typeof L);V.prototype=Object.create(L&&L.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(V,L):V.__proto__=L)}function P(V,L,D,q){var z=V.document,$=new N,W=new I.default(L,D,q,z.markers,z.version);V.addDelta($),$.addOperation(W),z.applyOperation(W)}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function V(L,D){for(var q=0,z;q=T)){F.next=9;break}return F.abrupt('break',13);case 9:return F.next=11,I;case 11:F.next=5;break;case 13:case'end':return F.stop();}},O,this)})},{key:'getDelta',value:function(S){var T=this._historyPoints.get(S);if(void 0===T)return null;var E=[];for(T;TS&&this._historyPoints.set(U,this._historyPoints.get(U)+q)}catch(G){$=!0,W=G}finally{try{!z&&K.return&&K.return()}finally{if($)throw W}}}}},{key:'_getIndex',value:function(S){var T=this._historyPoints.get(S);if(void 0===T){var E=this._deltas[this._deltas.length-1],I=E.baseVersion+E.operations.length;if(0>S||S>=I)return-1;throw new w.default('model-history-wrong-version: Given base version points to the middle of a delta.')}return T}}]),C}();o.default=M},function(r,o,u){'use strict';function s(Y){return Y&&Y.__esModule?Y:{default:Y}}function d(Y,Q){if(!(Y instanceof Q))throw new TypeError('Cannot call a class as a function')}function f(Y,Q){if(!Y)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return Q&&('object'==typeof Q||'function'==typeof Q)?Q:Y}function h(Y,Q){if('function'!=typeof Q&&null!==Q)throw new TypeError('Super expression must either be null or a function, not '+typeof Q);Y.prototype=Object.create(Q&&Q.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(Y,Q):Y.__proto__=Q)}function P(Y){return Y instanceof L.default||Y instanceof N.default?Y.getAttributes():null}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function Y(Q,X){var ee=[],te=!0,re=!1,ae;try{for(var oe=Q[Symbol.iterator](),le;!(te=(le=oe.next()).done)&&(ee.push(le.value),!(X&&ee.length===X));te=!0);}catch(ue){re=!0,ae=ue}finally{try{!te&&oe['return']&&oe['return']()}finally{if(re)throw ae}}return ee}return function(Q,X){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return Y(Q,X);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),M=function(){function Y(Q,X){for(var ee=0,te;ee=Y._holderElementOffset&&(Z=Z.clone(),Z.range.start.path[0]++,Z.range.end.path[0]++);var ee=w(Z.range.getDifference(Q)),te=Z.range.getIntersection(Q);return null!==ee&&(ee.start=ee.start._getTransformedByDeletion(Y.sourcePosition,Y.howMany),ee.end=ee.end._getTransformedByDeletion(Y.sourcePosition,Y.howMany),X=ee._getTransformedByInsertion(Y.getMovedRangeStart(),Y.howMany,!0,!1).reverse()),null!==te&&(te.start=te.start._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),te.end=te.end._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),X.push(te)),X.map(function(re){return new S.default(re,Z.key,Z.oldValue,Z.newValue,Z.baseVersion)})}},RootAttributeOperation:{InsertOperation:f,AttributeOperation:f,RootAttributeOperation:function(Z,Y,Q){return Z.root!==Y.root||Z.key!==Y.key||(Z.newValue===Y.newValue||Q)&&Z.newValue!==Y.newValue?[Z.clone()]:[new $.default(Z.baseVersion)]},RenameOperation:f,MarkerOperation:f,MoveOperation:f},RenameOperation:{InsertOperation:function(Z,Y){var Q=Z.clone();return Q.position=Q.position._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!0),[Q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:function(Z,Y,Q){var X=Z.clone();if(Z.position.isEqual(Y.position))if(Q)X.oldName=Y.newName;else return[new $.default(Z.baseVersion)];return[X]},MarkerOperation:f,MoveOperation:function(Z,Y){var Q=Z.clone(),X=Q.position.isEqual(Y.sourcePosition);return Q.position=Q.position._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!0,X),[Q]}},MarkerOperation:{InsertOperation:function(Z,Y){var Q=Z.clone();return Q.oldRange&&(Q.oldRange=Q.oldRange._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,!1)[0]),Q.newRange&&(Q.newRange=Q.newRange._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,!1)[0]),[Q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:function(Z,Y,Q){var X=Z.clone();if(Z.name==Y.name)if(Q)X.oldRange=Y.newRange;else return[new $.default(Z.baseVersion)];return[X]},MoveOperation:function(Z,Y){var Q=Z.clone();if(Q.oldRange){var X=Q.oldRange._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany);Q.oldRange=K.default.createFromRanges(X)}if(Q.newRange){var ee=Q.newRange._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany);Q.newRange=K.default.createFromRanges(ee)}return[Q]}},MoveOperation:{InsertOperation:function(Z,Y,Q){var X=K.default.createFromPositionAndShift(Z.sourcePosition,Z.howMany);X=X._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,Z.isSticky)[0];var ee=new Z.constructor(X.start,X.end.offset-X.start.offset,Z instanceof q.default?Z.baseVersion:Z.targetPosition._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!Q),Z instanceof q.default?void 0:Z.baseVersion);return ee.isSticky=Z.isSticky,Z instanceof q.default&&(ee._needsHolderElement=Z._needsHolderElement,ee._holderElementOffset=Z._holderElementOffset),[ee]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:f,MoveOperation:function(Z,Y,Q){if(P(Z,Y)&&P(Y,Z))return[Y.getReversed()];if(Z instanceof q.default&&Y instanceof q.default){var X=Z.targetPosition.path[0],ee=Y.targetPosition.path[0];(X>ee||X==ee&&Q)&&(Z=Z.clone(),Z.targetPosition.path[0]++)}Z instanceof q.default&&!(Y instanceof q.default)?Q=!0:!(Z instanceof q.default)&&Y instanceof q.default&&(Q=!1);var te=K.default.createFromPositionAndShift(Z.sourcePosition,Z.howMany),re=K.default.createFromPositionAndShift(Y.sourcePosition,Y.howMany),ae=[],oe=w(te.getDifference(re));oe&&(oe.start=oe.start._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!Z.isSticky,!1),oe.end=oe.end._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,Z.isSticky,!1),ae.push(oe));var le=te.getIntersection(re),ue=(0,U.default)(Z.sourcePosition.getParentPath(),Y.sourcePosition.getParentPath()),ie=te.containsPosition(Y.targetPosition)||te.start.isEqual(Y.targetPosition)&&Z.isSticky||te.end.isEqual(Y.targetPosition)&&Z.isSticky,de=re.containsRange(te)&&(re.containsPosition(Z.targetPosition)||re.start.isEqual(Z.targetPosition)||re.end.isEqual(Z.targetPosition));if(null!==le&&('extension'===ue||'same'===ue&&Q||de)&&!ie&&(le.start=le.start._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),le.end=le.end._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),oe&&te.start.isBefore(re.start)?ae.push(le):ae.unshift(le)),0===ae.length)return Z instanceof q.default?(Z=Z.clone(),Z.howMany=0,Z.sourcePosition=Y.targetPosition,[Z]):[new $.default(Z.baseVersion)];var fe=Z.targetPosition._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!Q,Y.isSticky||de);return ae.reverse().map(function(ce,pe){var ge=new Z.constructor(ce.start,ce.end.offset-ce.start.offset,Z instanceof q.default?Z.baseVersion:fe,Z instanceof q.default?void 0:Z.baseVersion);return ge.isSticky=Z.isSticky,Z instanceof q.default&&(ge._needsHolderElement=Z._needsHolderElement&&0===pe,ge._holderElementOffset=Z._holderElementOffset),ge})}}}},function(r,o,u){'use strict';function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S,T){if(!S)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return T&&('object'==typeof T||'function'==typeof T)?T:S}function h(S,T){if('function'!=typeof T&&null!==T)throw new TypeError('Super expression must either be null or a function, not '+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function S(T,E){for(var I=0,R;IO||O>C.data.length)throw new P.default('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>S||O+S>C.data.length)throw new P.default('view-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(O,O+S),this.offsetInText=O}return f(M,[{key:'is',value:function(O){return'textProxy'==O}},{key:'getAncestors',value:function(){for(var O=0me;){ye>ge.getAttribute('indent')&&(ye=ge.getAttribute('indent'));var he=ge.getAttribute('indent')-ye;be.push({item:ge,indent:he}),ge=ge.nextSibling}0=ye;)ge.getAttribute('type')!=be&&ge.getAttribute('indent')==ye&&pe.setAttribute(ge,'type',be),ge=ge[fe?'previousSibling':'nextSibling']})}}}function V(de,fe){var ce='numbered'==de.getAttribute('type')?'ol':'ul',pe=new K.default,ge=new X.default(ce,null);return ge.appendChildren(pe),fe.bindElements(de,pe),pe}function L(de,fe){for(var ce=fe.getNext?'nextSibling':'previousSibling',pe=fe.getNext?'nodeAfter':'nodeBefore',ge=!!fe.checkAllSiblings,me=!!fe.sameIndent,ye=!!fe.biggerIndent,be=!!fe.smallerIndent,he=!!fe.isMapped,ve=de instanceof U.default?de.getAttribute('indent'):fe.indent,ke=de instanceof U.default?de[ce]:de[pe],Pe;ke&&'listItem'==ke.name;){if(Pe=ke.getAttribute('indent'),me&&ve==Pe||ye&&vePe){if(!he||fe.mapper.toViewElement(ke))return ke;ke=ke[ce];continue}if(!ge)return null;ke=ke[ce]}return null}function D(de,fe){return de&&fe&&('ul'==de.name||'ol'==de.name)&&de.name==fe.name?ie.default.mergeContainers(te.default.createAfter(de)):null}function q(de,fe,ce,pe){var ge=fe.parent,me,ye=L(de,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0});if(ye&&ye.getAttribute('indent')==de.getAttribute('indent')){var be=ce.toViewElement(ye);me=ie.default.breakContainer(te.default.createAfter(be))}else ye=de.previousSibling,me=ye&&'listItem'==ye.name?ye.getAttribute('indent')=ce;)de=de[pe],de.getAttribute('indent')==ce&&(ge=de);return ge}Object.defineProperty(o,'__esModule',{value:!0}),o.modelViewInsertion=function(de,fe,ce,pe){if(ce.test(fe.item,'insert')&&ce.test(fe.item,'addAttribute:type')&&ce.test(fe.item,'addAttribute:indent')){ce.consume(fe.item,'insert'),ce.consume(fe.item,'addAttribute:type'),ce.consume(fe.item,'addAttribute:indent');var ge=fe.item,me=V(ge,pe.mapper);q(ge,me,pe.mapper)}},o.modelViewChangeType=function(de,fe,ce,pe){if(ce.consume(fe.item,'changeAttribute:type')){var ge=pe.mapper.toViewElement(fe.item);ie.default.breakContainer(te.default.createBefore(ge)),ie.default.breakContainer(te.default.createAfter(ge));var me=ge.parent,ye='numbered'==fe.attributeNewValue?'ol':'ul';me=ie.default.rename(me,ye),D(me,me.nextSibling),D(me.previousSibling,me)}},o.modelViewRemove=function(de,fe,ce,pe){if(ce.consume(fe.item,'remove')){var ge=pe.mapper.toViewPosition(fe.sourcePosition),me=ge.nodeAfter.is('li')?ge.nodeAfter:ge.nodeAfter.getChild(0);ie.default.breakContainer(te.default.createBefore(me)),ie.default.breakContainer(te.default.createAfter(me));var ye=me.parent,be=ye.previousSibling,he=ae.default.createOn(ye);ie.default.remove(he),be&&be.nextSibling&&D(be,be.nextSibling),z(fe.item.getAttribute('indent')+1,fe.sourcePosition,he.start,me,pe.mapper),'$graveyard'==fe.item.root.rootName&&pe.mapper.unbindModelElement(fe.item)}},o.modelViewChangeIndent=function(de,fe,ce,pe){if(ce.consume(fe.item,'changeAttribute:indent')){var ge=pe.mapper.toViewElement(fe.item);ie.default.breakContainer(te.default.createBefore(ge)),ie.default.breakContainer(te.default.createAfter(ge));var me=ge.parent,ye=me.previousSibling,be=ae.default.createOn(me);ie.default.remove(be);var he;ye&&ye.nextSibling&&(he=D(ye,ye.nextSibling)),he||(he=be.start),z(fe.attributeOldValue+1,fe.range.start,be.start,ge,pe.mapper),q(fe.item,ge,pe.mapper,he)}},o.modelViewSplitOnInsert=function(de,fe,ce,pe){if('listItem'!=fe.item.name){for(var ge=pe.mapper.toViewPosition(fe.range.start),me=[];('ul'==ge.parent.name||'ol'==ge.parent.name)&&(ge=ie.default.breakContainer(ge),'li'==ge.parent.name);){var ye=ge,be=te.default.createAt(ge.parent,'end');if(!ye.isEqual(be)){var he=ie.default.remove(new ae.default(ye,be));me.push(he)}ge=te.default.createAfter(ge.parent)}if(0=I.getAttribute('indent');){if(F.getAttribute('indent')==I.getAttribute('indent'))return F;F=F[R?'nextSibling':'previousSibling']}return null}Object.defineProperty(o,'__esModule',{value:!0});var M=function(){function I(R,F){for(var N=0,V;Nq.getAttribute('indent');)D.push(z),z=z.nextSibling;0>N._indentBy&&(D=D.reverse());var $=!0,W=!1,K;try{for(var H=D[Symbol.iterator](),U;!($=(U=H.next()).done);$=!0){var G=U.value,J=G.getAttribute('indent')+N._indentBy;0>J?L.rename(G,'paragraph'):L.setAttribute(G,'indent',J)}}catch(re){W=!0,K=re}finally{try{!$&&H.return&&H.return()}finally{if(W)throw K}}0>N._indentBy&&(D=D.reverse());var Z=!0,Y=!1,Q;try{for(var X=D[Symbol.iterator](),ee,te;!(Z=(ee=X.next()).done);Z=!0)te=ee.value,P(te,L)}catch(re){Y=!0,Q=re}finally{try{!Z&&X.return&&X.return()}finally{if(Y)throw Q}}})}},{key:'_checkEnabled',value:function(){var N=(0,T.default)(this.editor.document.selection.getSelectedBlocks());if(!N||!N.is('listItem'))return!1;if(0=V;){if(D.getAttribute('indent')==V)return D.getAttribute('type')==L;D=D.previousSibling}return!1}return!0}}]),R}(O.default);o.default=E},function(r,o,u){'use strict';function s(L){return L&&L.__esModule?L:{default:L}}function d(L,D){if(!(L instanceof D))throw new TypeError('Cannot call a class as a function')}function f(L,D){if(!L)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return D&&('object'==typeof D||'function'==typeof D)?D:L}function h(L,D){if('function'!=typeof D&&null!==D)throw new TypeError('Super expression must either be null or a function, not '+typeof D);L.prototype=Object.create(D&&D.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(L,D):L.__proto__=D)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function L(D,q){for(var z=0,$;z=N;)D>L.getAttribute('indent')&&(D=L.getAttribute('indent')),L.getAttribute('indent')==D&&R[F?'unshift':'push'](L),L=L[F?'previousSibling':'nextSibling']}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function R(F,N){for(var V=0,L;V=U;U++)H.push(U)},function(r,o,u){'use strict';function s(E){return E&&E.__esModule?E:{default:E}}function d(E,I){if(!(E instanceof I))throw new TypeError('Cannot call a class as a function')}function f(E,I){if(!E)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return I&&('object'==typeof I||'function'==typeof I)?I:E}function h(E,I){if('function'!=typeof I&&null!==I)throw new TypeError('Super expression must either be null or a function, not '+typeof I);E.prototype=Object.create(I&&I.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(E,I):E.__proto__=I)}Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function E(I,R){for(var F=0,N;Fq.top&&this._toolbarRect.height+this.limiterOffsetD&&K():!V&&N?Z>L&&K():Y>D&&Z>=L?K():Y>=D&&Z>L&&K(),Z===$}),q?[z,q]:null}function P(I){var R=I.left,F=I.top,N=C.default.window,V=N.scrollX,L=N.scrollY;return{left:R+V,top:F+L}}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function I(R,F){var N=[],V=!0,L=!1,D;try{for(var q=R[Symbol.iterator](),z;!(V=(z=q.next()).done)&&(N.push(z.value),!(F&&N.length===F));V=!0);}catch($){L=!0,D=$}finally{try{!V&&q['return']&&q['return']()}finally{if(L)throw D}}return N}return function(R,F){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return I(R,F);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}();o.getOptimalPosition=function(I){var R=I.element,F=I.target,N=I.positions,V=I.limiter,L=I.fitInViewport,D=(0,E.default)(R.parentElement),q=new S.default(R),z=new S.default(F),$,W;if(!V&&!L){var K=f(N[0],z,q),H=w(K,2);W=H[0],$=H[1]}else{var U=V&&new S.default(V),G=L&&S.default.getViewportRect(),J=h(N,z,q,U,G)||f(N[0],z,q),Z=w(J,2);W=Z[0],$=Z[1]}var Y=P($),Q=Y.left,X=Y.top;if(D){var ee=P(new S.default(D)),te=C.default.window.getComputedStyle(D);Q-=ee.left,X-=ee.top,Q+=D.scrollLeft,X+=D.scrollTop,Q-=parseInt(te.borderLeftWidth,10),X-=parseInt(te.borderTopWidth,10)}return{left:Q,top:X,name:W}};var M=u(65),C=s(M),O=u(397),S=s(O),T=u(392),E=s(T)},function(r,o,u){'use strict';function s(E){return E&&E.__esModule?E:{default:E}}function d(E,I){if(!(E instanceof I))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var f=function(){function E(I,R){for(var F=0,N;FF.width||0>F.height?null:new E(F)}},{key:'getIntersectionArea',value:function(R){var F=this.getIntersection(R);return F?F.getArea():0}},{key:'getArea',value:function(){return this.width*this.height}}],[{key:'getViewportRect',value:function(){var R=P.default.window,F=R.innerWidth,N=R.innerHeight;return new E({top:0,right:F,bottom:N,left:0,width:F,height:N})}}]),E}();o.default=T},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){var f=d.parentNode;f&&f.removeChild(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f){d instanceof HTMLTextAreaElement&&(d.value=f),d.innerHTML=f}},function(r,o){'use strict';function s(h,P){if(!(h instanceof P))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var d=function(){function h(P,w){for(var M=0,C;M=f?d:f)),d}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(14),h=function(w){return w&&w.__esModule?w:{default:w}}(f),P=Object.create;o.default=function(w){return(0,h.default)(w)?P(w):{}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(15),h=s(f),P=u(498),w=s(P);o.default=function(M,C,O,S){var T=M.length;for(O=(0,h.default)(O),0>O&&(O=-O>T?0:T+O),S=void 0===S||S>T?T:(0,h.default)(S),0>S&&(S+=T),S=O>S?0:(0,w.default)(S);Ow?M:0,(0,h.default)(w,M)?P[w]:void 0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(128),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return function(w){return(0,h.default)(w,P)}}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(68),h=s(f),P=u(89),w=s(P),M=u(37),C=s(M),O=u(56),S=s(O),T=u(14),E=s(T),I=u(57),R=s(I);o.default=function(F,N,V,L){N=(0,S.default)(N,F)?[N]:(0,w.default)(N);for(var D=-1,q=N.length,$=F,W;null!=$&&++Dw||S&&T&&I&&!E&&!R||C&&T&&I||!M&&I||!O)return 1;if(!C&&!S&&!R&&PT?void 0:E,T=1),C=Object(C);++SO)return!1;var S=C.length-1;return O==S?C.pop():w.call(C,O,1),!0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(86),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){var w=this.__data__,M=(0,h.default)(w,P);return 0>M?void 0:w[M][1]}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(86),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return-1<(0,h.default)(this.__data__,P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(86),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){var M=this.__data__,C=(0,h.default)(M,P);return 0>C?M.push([P,w]):M[C][1]=w,this}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(404),h=s(f),P=u(82),w=s(P),M=u(192),C=s(M);o.default=function(){this.__data__={hash:new h.default,map:new(C.default||w.default),string:new h.default}}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(90),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P)['delete'](P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(90),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P).get(P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(90),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P).has(P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(90),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(this,P).set(P,w),this}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(128),h=s(f),P=u(36),w=s(P);o.default=function(M,C){return 1==C.length?M:(0,h.default)(M,(0,w.default)(C,0,-1))}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0});o.default=function(f){return this.__data__.set(f,'__lodash_hash_undefined__'),this}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.has(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){var f=-1,h=Array(d.size);return d.forEach(function(P){h[++f]=[P,P]}),h}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(82),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(){this.__data__=new h.default}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__['delete'](d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.get(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.has(d)}},function(r,o,u){'use strict';function s(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(82),h=s(f),P=u(123),w=s(P);o.default=function(C,O){var S=this.__data__;return S instanceof h.default&&S.__data__.length==200&&(S=this.__data__=new w.default(S.__data__)),S.set(C,O),this}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(492),f=s(d),h=u(500),P=s(h),w=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,M=/\\(\\)?/g,C=(0,f.default)(function(O){var S=[];return(0,P.default)(O).replace(w,function(T,E,I,R){S.push(I?R.replace(M,'$1'):E||T)}),S});o.default=C},function(r,o,u){'use strict';function s(Zt){return Zt&&Zt.__esModule?Zt:{default:Zt}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(212),f=s(d),h=u(213),P=s(h),w=u(214),M=s(w),C=u(215),O=s(C),S=u(216),T=s(S),E=u(217),I=s(E),R=u(145),F=s(R),N=u(146),V=s(N),L=u(218),D=s(L),q=u(219),z=s(q),$=u(220),W=s($),K=u(221),H=s(K),U=u(222),G=s(U),J=u(223),Z=s(J),Y=u(224),Q=s(Y),X=u(225),ee=s(X),te=u(226),re=s(te),ae=u(227),oe=s(ae),le=u(147),ue=s(le),ie=u(230),de=s(ie),fe=u(231),ce=s(fe),pe=u(232),ge=s(pe),me=u(233),ye=s(me),be=u(234),he=s(be),ve=u(236),ke=s(ve),Pe=u(19),we=s(Pe),xe=u(237),Me=s(xe),Ce=u(238),Oe=s(Ce),Se=u(239),Te=s(Se),Ae=u(151),Ee=s(Ae),Ie=u(240),Re=s(Ie),Fe=u(241),Ne=s(Fe),Ve=u(242),Le=s(Ve),Be=u(243),De=s(Be),je=u(244),qe=s(je),ze=u(245),$e=s(ze),We=u(246),Ke=s(We),He=u(247),Ue=s(He),Ge=u(248),Je=s(Ge),Ze=u(249),Ye=s(Ze),Qe=u(250),Xe=s(Qe),et=u(251),tt=s(et),rt=u(252),at=s(rt),nt=u(253),lt=s(nt),ut=u(254),it=s(ut),st=u(255),dt=s(st),ft=u(256),ct=s(ft),pt=u(257),gt=s(pt),mt=u(258),yt=s(mt),bt=u(260),ht=s(bt),vt=u(261),kt=s(vt),Pt=u(262),wt=s(Pt),xt=u(263),Mt=s(xt),Ct=u(264),Ot=s(Ct),St=u(265),Tt=s(St),At=u(100),Et=s(At),It=u(152),Rt=s(It),Ft=u(266),Nt=s(Ft),Vt=u(267),Lt=s(Vt),Bt=u(268),Dt=s(Bt),jt=u(269),qt=s(jt),zt=u(270),$t=s(zt),Wt=u(271),Kt=s(Wt),Ht=u(272),Ut=s(Ht),Gt=u(273),Jt=s(Gt);o.default={chunk:f.default,compact:P.default,concat:M.default,difference:O.default,differenceBy:T.default,differenceWith:I.default,drop:F.default,dropRight:V.default,dropRightWhile:D.default,dropWhile:z.default,fill:W.default,findIndex:H.default,findLastIndex:G.default,first:Z.default,flatten:Q.default,flattenDeep:ee.default,flattenDepth:re.default,fromPairs:oe.default,head:ue.default,indexOf:de.default,initial:ce.default,intersection:ge.default,intersectionBy:ye.default,intersectionWith:he.default,join:ke.default,last:we.default,lastIndexOf:Me.default,nth:Oe.default,pull:Te.default,pullAll:Ee.default,pullAllBy:Re.default,pullAllWith:Ne.default,pullAt:Le.default,remove:De.default,reverse:qe.default,slice:$e.default,sortedIndex:Ke.default,sortedIndexBy:Ue.default,sortedIndexOf:Je.default,sortedLastIndex:Ye.default,sortedLastIndexBy:Xe.default,sortedLastIndexOf:tt.default,sortedUniq:at.default,sortedUniqBy:lt.default,tail:it.default,take:dt.default,takeRight:ct.default,takeRightWhile:gt.default,takeWhile:yt.default,union:ht.default,unionBy:kt.default,unionWith:wt.default,uniq:Mt.default,uniqBy:Ot.default,uniqWith:Tt.default,unzip:Et.default,unzipWith:Rt.default,without:Nt.default,xor:Lt.default,xorBy:Dt.default,xorWith:qt.default,zip:$t.default,zipObject:Kt.default,zipObjectDeep:Ut.default,zipWith:Jt.default}},function(r,o,u){'use strict';function s(Be){return Be&&Be.__esModule?Be:{default:Be}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(212);Object.defineProperty(o,'chunk',{enumerable:!0,get:function(){return s(d).default}});var f=u(213);Object.defineProperty(o,'compact',{enumerable:!0,get:function(){return s(f).default}});var h=u(214);Object.defineProperty(o,'concat',{enumerable:!0,get:function(){return s(h).default}});var P=u(215);Object.defineProperty(o,'difference',{enumerable:!0,get:function(){return s(P).default}});var w=u(216);Object.defineProperty(o,'differenceBy',{enumerable:!0,get:function(){return s(w).default}});var M=u(217);Object.defineProperty(o,'differenceWith',{enumerable:!0,get:function(){return s(M).default}});var C=u(145);Object.defineProperty(o,'drop',{enumerable:!0,get:function(){return s(C).default}});var O=u(146);Object.defineProperty(o,'dropRight',{enumerable:!0,get:function(){return s(O).default}});var S=u(218);Object.defineProperty(o,'dropRightWhile',{enumerable:!0,get:function(){return s(S).default}});var T=u(219);Object.defineProperty(o,'dropWhile',{enumerable:!0,get:function(){return s(T).default}});var E=u(220);Object.defineProperty(o,'fill',{enumerable:!0,get:function(){return s(E).default}});var I=u(221);Object.defineProperty(o,'findIndex',{enumerable:!0,get:function(){return s(I).default}});var R=u(222);Object.defineProperty(o,'findLastIndex',{enumerable:!0,get:function(){return s(R).default}});var F=u(223);Object.defineProperty(o,'first',{enumerable:!0,get:function(){return s(F).default}});var N=u(224);Object.defineProperty(o,'flatten',{enumerable:!0,get:function(){return s(N).default}});var V=u(225);Object.defineProperty(o,'flattenDeep',{enumerable:!0,get:function(){return s(V).default}});var L=u(226);Object.defineProperty(o,'flattenDepth',{enumerable:!0,get:function(){return s(L).default}});var D=u(227);Object.defineProperty(o,'fromPairs',{enumerable:!0,get:function(){return s(D).default}});var q=u(147);Object.defineProperty(o,'head',{enumerable:!0,get:function(){return s(q).default}});var z=u(230);Object.defineProperty(o,'indexOf',{enumerable:!0,get:function(){return s(z).default}});var $=u(231);Object.defineProperty(o,'initial',{enumerable:!0,get:function(){return s($).default}});var W=u(232);Object.defineProperty(o,'intersection',{enumerable:!0,get:function(){return s(W).default}});var K=u(233);Object.defineProperty(o,'intersectionBy',{enumerable:!0,get:function(){return s(K).default}});var H=u(234);Object.defineProperty(o,'intersectionWith',{enumerable:!0,get:function(){return s(H).default}});var U=u(236);Object.defineProperty(o,'join',{enumerable:!0,get:function(){return s(U).default}});var G=u(19);Object.defineProperty(o,'last',{enumerable:!0,get:function(){return s(G).default}});var J=u(237);Object.defineProperty(o,'lastIndexOf',{enumerable:!0,get:function(){return s(J).default}});var Z=u(238);Object.defineProperty(o,'nth',{enumerable:!0,get:function(){return s(Z).default}});var Y=u(239);Object.defineProperty(o,'pull',{enumerable:!0,get:function(){return s(Y).default}});var Q=u(151);Object.defineProperty(o,'pullAll',{enumerable:!0,get:function(){return s(Q).default}});var X=u(240);Object.defineProperty(o,'pullAllBy',{enumerable:!0,get:function(){return s(X).default}});var ee=u(241);Object.defineProperty(o,'pullAllWith',{enumerable:!0,get:function(){return s(ee).default}});var te=u(242);Object.defineProperty(o,'pullAt',{enumerable:!0,get:function(){return s(te).default}});var re=u(243);Object.defineProperty(o,'remove',{enumerable:!0,get:function(){return s(re).default}});var ae=u(244);Object.defineProperty(o,'reverse',{enumerable:!0,get:function(){return s(ae).default}});var oe=u(245);Object.defineProperty(o,'slice',{enumerable:!0,get:function(){return s(oe).default}});var le=u(246);Object.defineProperty(o,'sortedIndex',{enumerable:!0,get:function(){return s(le).default}});var ue=u(247);Object.defineProperty(o,'sortedIndexBy',{enumerable:!0,get:function(){return s(ue).default}});var ie=u(248);Object.defineProperty(o,'sortedIndexOf',{enumerable:!0,get:function(){return s(ie).default}});var de=u(249);Object.defineProperty(o,'sortedLastIndex',{enumerable:!0,get:function(){return s(de).default}});var fe=u(250);Object.defineProperty(o,'sortedLastIndexBy',{enumerable:!0,get:function(){return s(fe).default}});var ce=u(251);Object.defineProperty(o,'sortedLastIndexOf',{enumerable:!0,get:function(){return s(ce).default}});var pe=u(252);Object.defineProperty(o,'sortedUniq',{enumerable:!0,get:function(){return s(pe).default}});var ge=u(253);Object.defineProperty(o,'sortedUniqBy',{enumerable:!0,get:function(){return s(ge).default}});var me=u(254);Object.defineProperty(o,'tail',{enumerable:!0,get:function(){return s(me).default}});var ye=u(255);Object.defineProperty(o,'take',{enumerable:!0,get:function(){return s(ye).default}});var be=u(256);Object.defineProperty(o,'takeRight',{enumerable:!0,get:function(){return s(be).default}});var he=u(257);Object.defineProperty(o,'takeRightWhile',{enumerable:!0,get:function(){return s(he).default}});var ve=u(258);Object.defineProperty(o,'takeWhile',{enumerable:!0,get:function(){return s(ve).default}});var ke=u(260);Object.defineProperty(o,'union',{enumerable:!0,get:function(){return s(ke).default}});var Pe=u(261);Object.defineProperty(o,'unionBy',{enumerable:!0,get:function(){return s(Pe).default}});var we=u(262);Object.defineProperty(o,'unionWith',{enumerable:!0,get:function(){return s(we).default}});var xe=u(263);Object.defineProperty(o,'uniq',{enumerable:!0,get:function(){return s(xe).default}});var Me=u(264);Object.defineProperty(o,'uniqBy',{enumerable:!0,get:function(){return s(Me).default}});var Ce=u(265);Object.defineProperty(o,'uniqWith',{enumerable:!0,get:function(){return s(Ce).default}});var Oe=u(100);Object.defineProperty(o,'unzip',{enumerable:!0,get:function(){return s(Oe).default}});var Se=u(152);Object.defineProperty(o,'unzipWith',{enumerable:!0,get:function(){return s(Se).default}});var Te=u(266);Object.defineProperty(o,'without',{enumerable:!0,get:function(){return s(Te).default}});var Ae=u(267);Object.defineProperty(o,'xor',{enumerable:!0,get:function(){return s(Ae).default}});var Ee=u(268);Object.defineProperty(o,'xorBy',{enumerable:!0,get:function(){return s(Ee).default}});var Ie=u(269);Object.defineProperty(o,'xorWith',{enumerable:!0,get:function(){return s(Ie).default}});var Re=u(270);Object.defineProperty(o,'zip',{enumerable:!0,get:function(){return s(Re).default}});var Fe=u(271);Object.defineProperty(o,'zipObject',{enumerable:!0,get:function(){return s(Fe).default}});var Ne=u(272);Object.defineProperty(o,'zipObjectDeep',{enumerable:!0,get:function(){return s(Ne).default}});var Ve=u(273);Object.defineProperty(o,'zipWith',{enumerable:!0,get:function(){return s(Ve).default}});var Le=u(481);Object.defineProperty(o,'default',{enumerable:!0,get:function(){return s(Le).default}})},function(r,o,u){'use strict';function s(L){return L&&L.__esModule?L:{default:L}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(68),f=s(d),h=u(140),P=s(h),w=u(441),M=s(w),C=u(97),O=s(C),S=u(93),T=s(S),E=u(491),I=s(E),R=Object.prototype,F=R.propertyIsEnumerable,N=!F.call({valueOf:1},'valueOf'),V=(0,M.default)(function(L,D){if(N||(0,T.default)(D)||(0,O.default)(D))return void(0,P.default)(D,(0,I.default)(D),L);for(var q in D)(0,f.default)(L,q,D[q])});o.default=V},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(197),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(P,!0,!0,w)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return function(){return d}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(418),h=s(f),P=u(449),w=s(P);o.default=function(M,C){return null!=M&&(0,w.default)(M,C,h.default)}},function(r,o,u){'use strict';(function(s){function d(R){return R&&R.__esModule?R:{default:R}}Object.defineProperty(o,'__esModule',{value:!0});var f='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(R){return typeof R}:function(R){return R&&'function'==typeof Symbol&&R.constructor===Symbol&&R!==Symbol.prototype?'symbol':typeof R},h=u(485),P=d(h),w=u(30),M=d(w),C={'function':!0,object:!0},O=C[f(o)]&&o&&!o.nodeType?o:void 0,S=C[f(s)]&&s&&!s.nodeType?s:void 0,T=S&&S.exports===O?O:void 0,E=T?M.default.Buffer:void 0,I=E?function(R){return R instanceof E}:(0,P.default)(!1);o.default=I}).call(o,u(102)(r))},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(46),h=s(f),P=u(99),w=s(P);o.default=function(M){return!!M&&1===M.nodeType&&(0,h.default)(M)&&!(0,w.default)(M)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(131),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(P,w)}},function(r,o,u){'use strict';function s(te){return te&&te.__esModule?te:{default:te}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(98),h=s(f),P=u(46),w=s(P),Q={};Q['[object Float32Array]']=Q['[object Float64Array]']=Q['[object Int8Array]']=Q['[object Int16Array]']=Q['[object Int32Array]']=Q['[object Uint8Array]']=Q['[object Uint8ClampedArray]']=Q['[object Uint16Array]']=Q['[object Uint32Array]']=!0,Q['[object Arguments]']=Q['[object Array]']=Q['[object ArrayBuffer]']=Q['[object Boolean]']=Q['[object DataView]']=Q['[object Date]']=Q['[object Error]']=Q['[object Function]']=Q['[object Map]']=Q['[object Number]']=Q['[object Object]']=Q['[object RegExp]']=Q['[object Set]']=Q['[object String]']=Q['[object WeakMap]']=!1;var X=Object.prototype,ee=X.toString;o.default=function(te){return(0,w.default)(te)&&(0,h.default)(te.length)&&!!Q[ee.call(te)]}},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(423),h=s(f),P=u(207),w=s(P),M=u(37),C=s(M),O=u(93),S=s(O),T=Object.prototype,E=T.hasOwnProperty;o.default=function(I){for(var R=-1,F=(0,S.default)(I),N=(0,h.default)(I),V=N.length,L=(0,w.default)(I),q=L||[],z=q.length,$;++RM?-1:1;return C*1.7976931348623157e308}return M===M?M:0}},function(r,o,u){'use strict';function s(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(414),h=s(f),P=u(15),w=s(P);o.default=function(C){return C?(0,h.default)((0,w.default)(C),0,4294967295):0}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(443),f=s(d),h=u(70),P=s(h),w=(0,f.default)(P.default);o.default=w},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(430),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return null==P?'':(0,h.default)(P)}},function(r,o,u){'use strict';function s(P,w){if(!(P instanceof w))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var d=function(){function P(w,M){for(var C=0,O;C * {\n margin-right: 0.4em; }\n .ck-toolbar > *:last-child {\n margin-right: 0; }\n\n.ck-dropdown::after {\n border-style: solid;\n border-width: .4em .4em 0 .4em;\n border-color: #707070 transparent;\n right: 0.8em; }\n\n.ck-dropdown .ck-button.ck-dropdown__button {\n padding-right: 1.6em; }\n .ck-dropdown .ck-button.ck-dropdown__button .ck-button__label {\n width: 7em;\n overflow: hidden;\n text-overflow: ellipsis; }\n\n.ck-dropdown__panel {\n border: 1px solid #b9b9b9;\n bottom: 1px;\n background: white;\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2); }\n .ck-dropdown__panel.ck-rounded-corners,\n .ck-rounded-corners .ck-dropdown__panel {\n border-radius: 2px; }\n\n.ck-list {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n list-style-type: none;\n background: white; }\n .ck-list.ck-rounded-corners,\n .ck-rounded-corners .ck-list {\n border-radius: 2px; }\n .ck-list__item {\n padding: 0.64em;\n cursor: default;\n min-width: 12em; }\n .ck-list__item:hover, .ck-list__item:focus {\n background: #f7f7f7; }\n .ck-list__item:focus {\n box-shadow: 0 0 3px 2px #9bcdfb;\n position: relative;\n z-index: 1;\n outline: none; }\n .ck-list__item:last-of-type {\n border: none; }\n .ck-list__item_active {\n background: #1a8bf1;\n color: white; }\n .ck-list__item_active:hover, .ck-list__item_active:focus {\n background: #0e7ee2; }\n\n.ck-label {\n font-weight: bold; }\n\n.ck-input-text {\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n border: 1px solid #b9b9b9;\n padding: 0.64em;\n min-width: 250px; }\n .ck-input-text.ck-rounded-corners,\n .ck-rounded-corners .ck-input-text {\n border-radius: 2px; }\n .ck-input-text:focus {\n outline: none;\n border: 1px solid #6ab5f9;\n box-shadow: 0 0 3px 2px #9bcdfb, 2px 2px 3px #e6e6e6 inset; }\n\n.ck-balloon-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n min-width: 50px;\n min-height: 15px;\n background: white;\n border: 1px solid #b9b9b9; }\n .ck-balloon-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-balloon-panel {\n border-radius: 2px; }\n .ck-balloon-panel:before, .ck-balloon-panel:after {\n width: 0;\n height: 0;\n border-style: solid; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n border-width: 0 10px 15px 10px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\n border-color: transparent transparent #b9b9b9 transparent; }\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\n border-color: transparent transparent white transparent;\n margin-top: 2px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n border-width: 15px 10px 0 10px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\n border-color: #b9b9b9 transparent transparent; }\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\n border-color: white transparent transparent transparent;\n margin-bottom: 2px; }\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after {\n left: 50%;\n margin-left: -10px;\n top: -15px; }\n .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after {\n left: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\n right: 20px;\n top: -15px; }\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after {\n left: 50%;\n margin-left: -10px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after {\n left: 20px;\n bottom: -15px; }\n .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\n right: 20px;\n bottom: -15px; }\n\n.ck-floating-panel {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n background: #f7f7f7; }\n .ck-floating-panel.ck-rounded-corners,\n .ck-rounded-corners .ck-floating-panel {\n border-radius: 2px; }\n\n.ck-toolbar__container {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar {\n border-radius: 0;\n border: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-toolbar__container .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-toolbar__container .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-toolbar__container.ck-balloon-panel_arrow_s:after, .ck-toolbar__container.ck-balloon-panel_arrow_se:after, .ck-toolbar__container.ck-balloon-panel_arrow_sw:after {\n border-bottom-color: #f7f7f7; }\n .ck-toolbar__container.ck-balloon-panel_arrow_n:after, .ck-toolbar__container.ck-balloon-panel_arrow_ne:after, .ck-toolbar__container.ck-balloon-panel_arrow_nw:after {\n border-top-color: #f7f7f7; }\n\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #bfbfbf;\n border-width: 0 0 1px;\n background: #f7f7f7; }\n\n.ck-editor {\n position: relative; }\n .ck-editor.ck-rounded-corners,\n .ck-rounded-corners .ck-editor {\n border-radius: 2px; }\n .ck-editor .ck-editor__top .ck-toolbar {\n border-radius: 0;\n border-top: 0;\n border-left: 0;\n border-right: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button {\n border-width: 0; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-disabled {\n background: #f7f7f7; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on {\n background: #dedede;\n border-color: #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\n background: #c6c6c6;\n border-color: #888888; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\n background: #b9b9b9;\n border-color: #7c7c7c;\n box-shadow: inset 0 2px 2px #a1a1a1; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button {\n border-width: 1px; }\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\n background: white; }\n .ck-editor .ck-editor__main {\n background: white; }\n .ck-editor .ck-editor__bottom {\n border-bottom: 0;\n border-left: 0;\n border-right: 0;\n padding: 0.8em; }\n .ck-editor .ck-editor__editable.ck-focused {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset; }\n .ck-editor .ck-editor__editable_inline {\n overflow: auto;\n padding: 0 0.8em; }\n\n.ck-editor,\n.ck-editor-bottom {\n background: #f7f7f7;\n border: 1px solid #b9b9b9; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'.ck-placeholder::before {\n content: attr(data-placeholder);\n cursor: text;\n color: #c2c2c2; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n/**\n * Base font size.\n *\n * @see $ck-font-sizes\n */\n/**\n * Base font face.\n *\n */\n/**\n * Base font sizes for scaling.\n *\n * @see ck-font-size\n */\n/**\n * Returns font-size in units for given level.\n *\n * @param {Number} $level [ 0 ] - Size of the font.\n * @return {String}\n * @see $ck-font-sizes\n * @see $ck-font-size-base\n */\n.ck-heading_heading1 {\n font-size: 1.5em; }\n\n.ck-heading_heading2 {\n font-size: 1.3em; }\n\n.ck-heading_heading3 {\n font-size: 1.1em; }\n\n[class*="ck-heading_"] {\n line-height: 21.6px;\n padding: 9.6px; }\n\n[class*="ck-heading_heading"] {\n font-weight: bold; }\n\n.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label {\n width: 8em; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'@charset "UTF-8";\n/**\n * Colors configured by the user.\n *\n * @type Map\n * @example\n *\t\t$ck-colors: ( \'foreground\': red );\n * @see $_ck-colors\n */\n/**\n * Internal map with default colors.\n *\n * @type Map\n * @see ck-color-add\n */\n/**\n * Returns a color of given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $_ck-colors\n */\n/**\n * Returns a border\u2013color for a given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $ck-color\n */\n/**\n * Adds a color to internal color map.\n *\n * @example\n *\t\t@include ck-color-add( ( \'special\': yellow, \'hover\': #00FF00 ) );\n * @param {Map} $map - A map with new colors.\n * @see $_ck-colors\n */\n/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n/**\n * Base font size.\n *\n * @see $ck-font-sizes\n */\n/**\n * Base font face.\n *\n */\n/**\n * Base font sizes for scaling.\n *\n * @see ck-font-size\n */\n/**\n * Returns font-size in units for given level.\n *\n * @param {Number} $level [ 0 ] - Size of the font.\n * @return {String}\n * @see $ck-font-sizes\n * @see $ck-font-size-base\n */\n.ck-editor__editable .image > figcaption {\n background-color: #f7f7f7;\n padding: 0.8em;\n font-size: 0.75rem;\n color: #858585;\n outline-offset: -1px; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.cke-text-alternative-form {\n padding: 1.2em;\n overflow: hidden; }\n .cke-text-alternative-form .ck-label {\n margin-bottom: 0.4em; }\n .cke-text-alternative-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .cke-text-alternative-form__actions .ck-button {\n float: right; }\n .cke-text-alternative-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .cke-text-alternative-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'.ck-editor__editable .image {\n text-align: center;\n clear: both; }\n .ck-editor__editable .image.image-style-side {\n float: right;\n margin-left: 0.8em;\n max-width: 50%; }\n\n.ck-editor__editable .image > img {\n display: block;\n margin: 0 auto;\n max-width: 100%; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.ck-link-form {\n padding: 1.2em;\n overflow: hidden; }\n .ck-link-form .ck-label {\n margin-bottom: 0.4em; }\n .ck-link-form__actions {\n clear: both;\n padding-top: 1.2em; }\n .ck-link-form__actions .ck-button {\n float: right; }\n .ck-link-form__actions .ck-button + .ck-button {\n margin-right: 0.64em; }\n .ck-link-form__actions .ck-button + .ck-button + .ck-button {\n float: left; }\n',''])},function(r,o,u){o=r.exports=u(32)(),o.push([r.i,'@charset "UTF-8";\n/**\n * Colors configured by the user.\n *\n * @type Map\n * @example\n *\t\t$ck-colors: ( \'foreground\': red );\n * @see $_ck-colors\n */\n/**\n * Internal map with default colors.\n *\n * @type Map\n * @see ck-color-add\n */\n/**\n * Returns a color of given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $_ck-colors\n */\n/**\n * Returns a border\u2013color for a given name and lightness offset.\n *\n * @param {String} $name [ \'background\' ] - Name of the color.\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\n * @return {String}\n * @see $ck-color\n */\n/**\n * Adds a color to internal color map.\n *\n * @example\n *\t\t@include ck-color-add( ( \'special\': yellow, \'hover\': #00FF00 ) );\n * @param {Map} $map - A map with new colors.\n * @see $_ck-colors\n */\n/**\n * A visual style of element\'s inner shadow (i.e. input).\n */\n/**\n * A visual style of element\'s drop shadow (i.e. panel).\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n/**\n * A visual style of focused element\'s outer shadow.\n */\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * A class which indicates that an element holding it is disabled.\n */\n.ck-disabled {\n opacity: .5; }\n\n/**\n * A visual style of focused element\'s border or outline.\n */\n/**\n * Brings visual styling for :focus state.\n */\n/**\n * Default spacing value ("unit").\n *\n */\n/**\n * Internal map with default spacings.\n *\n * @type Map\n * @see ck-spacing\n */\n/**\n * Returns a spacing value with units for given name.\n *\n * @param {String} $spacing [ \'standard\' ] - Spacing level.\n * @return {String}\n * @see $ck-def-spacing\n * @see $ck-def-spacings\n */\n.ck-widget {\n margin: 0.8em 0;\n padding: 0; }\n .ck-widget.ck-widget_selected, .ck-widget.ck-widget_selected:hover {\n outline: 3px solid #6ab5f9; }\n .ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected {\n outline: 3px solid #dddddd; }\n .ck-widget:hover {\n outline: 3px solid #ffd25c; }\n .ck-widget .ck-editable.ck-editable_focused, .ck-widget .ck-editable:focus {\n outline: 1px solid #6ab5f9;\n box-shadow: 2px 2px 3px #e6e6e6 inset;\n background-color: white; }\n',''])},function(r){r.exports='\n\n \n bold\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n italic\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n\n \n link\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n unlink\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n bulletedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n numberedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n redo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n undo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r,o,u){var s=u(507);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(508);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(509);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(510);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(511);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(512);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(513);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(514);'string'==typeof s&&(s=[[r.i,s,'']]);u(38)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){u(277),r.exports=u(278)}])}); //# sourceMappingURL=ckeditor.compat.js.map \ No newline at end of file diff --git a/build/ckeditor.compat.js.map b/build/ckeditor.compat.js.map index 4a87bb1b8f..4ff95eb5ab 100644 --- a/build/ckeditor.compat.js.map +++ b/build/ckeditor.compat.js.map @@ -1 +1 @@ -{"version":3,"file":"ckeditor.compat.js","sources":["webpack:///ckeditor.compat.js"],"sourcesContent":["var _NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor=Math.floor,_Mathmax=Math.max,_Mathmin=Math.min;(function(o,u){if('object'==typeof exports&&'object'==typeof module)module.exports=u();else if('function'==typeof define&&define.amd)define([],u);else{var s=u();for(var d in s)('object'==typeof exports?exports:o)[d]=s[d]}})(this,function(){return function(r){function o(s){if(u[s])return u[s].exports;var d=u[s]={i:s,l:!1,exports:{}};return r[s].call(d.exports,d,d.exports,o),d.l=!0,d.exports}var u={};return o.m=r,o.c=u,o.i=function(s){return s},o.d=function(s,d,f){o.o(s,d)||Object.defineProperty(s,d,{configurable:!1,enumerable:!0,get:f})},o.n=function(s){var d=s&&s.__esModule?function(){return s['default']}:function(){return s};return o.d(d,'a',d),d},o.o=function(s,d){return Object.prototype.hasOwnProperty.call(s,d)},o.p='',o(o.s=529)}([function(r,o){'use strict';function s(w,M){if(!(w instanceof M))throw new TypeError('Cannot call a class as a function')}function d(w,M){if(!w)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return M&&('object'==typeof M||'function'==typeof M)?M:w}function f(w,M){if('function'!=typeof M&&null!==M)throw new TypeError('Super expression must either be null or a function, not '+typeof M);w.prototype=Object.create(M&&M.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(w,M):w.__proto__=M)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var h=function(){function w(M,C){for(var O=0,S;OD?0:D,L}},{key:'isAfter',value:function(V){return'after'==this.compareWith(V)}},{key:'isBefore',value:function(V){return'before'==this.compareWith(V)}},{key:'isEqual',value:function(V){return'same'==this.compareWith(V)}},{key:'isTouching',value:function(V){var L=null,D=null,q=this.compareWith(V);switch(q){case'same':return!0;case'before':L=F.createFromPosition(this),D=F.createFromPosition(V);break;case'after':L=F.createFromPosition(V),D=F.createFromPosition(this);break;default:return!1;}for(var z=L.parent;L.path.length+D.path.length;){if(L.isEqual(D))return!0;if(L.path.length>D.path.length){if(L.offset!==z.maxOffset)return!1;L.path=L.path.slice(0,-1),z=z.parent,L.offset++}else{if(0!==D.offset)return!1;D.path=D.path.slice(0,-1)}}}},{key:'_getTransformedByDeletion',value:function(V,L){var D=F.createFromPosition(this);if(this.root!=V.root)return D;if('same'==(0,O.default)(V.getParentPath(),this.getParentPath())){if(V.offsetthis.offset)return null;D.offset-=L}}else if('prefix'==(0,O.default)(V.getParentPath(),this.getParentPath())){var q=V.path.length-1;if(V.offset<=this.path[q]){if(V.offset+L>this.path[q])return null;D.path[q]-=L}}return D}},{key:'_getTransformedByInsertion',value:function(V,L,D){var q=F.createFromPosition(this);if(this.root!=V.root)return q;if('same'==(0,O.default)(V.getParentPath(),this.getParentPath()))(V.offsetF+1;)L=V.maxOffset-N.offset,0!=L&&R.push(new E(N,N.getShiftedBy(L))),N.path=N.path.slice(0,-1),N.offset++,V=V.parent;for(;N.path.length<=this.end.path.length;){var D=this.end.path[N.path.length-1],q=D-N.offset;0!=q&&R.push(new E(N,N.getShiftedBy(q))),N.offset=D,N.path.push(0)}return R}},{key:'getWalker',value:function(){var R=0=I;I++)R=String.fromCharCode(I),E[R.toLowerCase()]=I;for(var F=48;57>=F;F++)E[F-48]=F;for(var N=112;123>=N;N++)E['f'+(N-111)]=N;return E}()},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}function d(M,C,O,S,T){var E=-1,I=M.length;for(O||(O=w.default),T||(T=[]);++EV?0:V,N}},{key:'getLastMatchingPosition',value:function(F){var N=1this.offset-F.offset?'before':'after';var N=this.getAncestors(),V=F.getAncestors(),L=(0,M.default)(N,V),D;switch(L){case 0:return'different';case'prefix':D=N.length-1;break;case'extension':D=V.length-1;break;default:D=L-1;}var q=N[D],z=N[D+1],$=V[D+1];if(q===this.parent){var W=this.offset-$.index;return 0>=W?'before':'after'}if(q===F.parent){var K=z.index-F.offset;return 0>K?'before':'after'}var H=z.index-$.index;return 0>H?'before':'after'}},{key:'nodeAfter',get:function(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}},{key:'nodeBefore',get:function(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}},{key:'isAtStart',get:function(){return 0===this.offset}},{key:'isAtEnd',get:function(){var F=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===F}},{key:'root',get:function(){return this.parent.root}},{key:'editableElement',get:function(){for(var F=this.parent;!(F instanceof T.default);)if(F.parent)F=F.parent;else return null;return F}}],[{key:'createAt',value:function(F,N){if(F instanceof I)return this.createFromPosition(F);var V=F;if('end'==N)N=V.is('text')?V.data.length:V.childCount;else{if('before'==N)return this.createBefore(V);if('after'==N)return this.createAfter(V);N||(N=0)}return new I(V,N)}},{key:'createAfter',value:function(F){if(F.is('textProxy'))return new I(F.textNode,F.offsetInText+F.data.length);if(!F.parent)throw new O.default('view-position-after-root: You can not make position after root.',{root:F});return new I(F.parent,F.index+1)}},{key:'createBefore',value:function(F){if(F.is('textProxy'))return new I(F.textNode,F.offsetInText);if(!F.parent)throw new O.default('view-position-before-root: You can not make position before root.',{root:F});return new I(F.parent,F.index)}},{key:'createFromPosition',value:function(F){return new this(F.parent,F.offset)}}]),I}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.default=E},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F,N){if(!F)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return N&&('object'==typeof N||'function'==typeof N)?N:F}function h(F,N){if('function'!=typeof N&&null!==N)throw new TypeError('Super expression must either be null or a function, not '+typeof N);F.prototype=Object.create(N&&N.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(F,N):F.__proto__=N)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function F(N,V){for(var L=0,D;L$.maxOffset)throw new I.default('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if($===W&&K=K&&this.targetPosition.path[U]K&&(K=this.boundaries.start.offset),$=D.offset-K}W=D.offset-z.startOffset;var H=new C.default(z,W-$,$);return D.offset-=$,this.position=D,f('text',H,L,D,$)}return D.path.pop(),this.position=D,this._visitedParent=q.parent,f('elementStart',q,L,D,1)}}]),N}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.default=F},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h){var P=-1,w=d.length;0>f&&(f=-f>w?0:w+f),h=h>w?w:h,0>h&&(h+=w),w=f>h?0:h-f>>>0,f>>>=0;for(var M=Array(w);++P=this._holderElementOffset&&this.sourcePosition.path[0]++}return w(V.prototype.__proto__||Object.getPrototypeOf(V.prototype),'_execute',this).call(this)}},{key:'type',get:function(){return'remove'}},{key:'_holderElementOffset',get:function(){return this.targetPosition.path[0]},set:function(D){this.targetPosition.path[0]=D}},{key:'_needsHolderElement',get:function(){if(this.delta){var D=!0,q=!1,z;try{for(var $=this.delta.operations[Symbol.iterator](),W,K;!(D=(W=$.next()).done);D=!0)if(K=W.value,K instanceof V){if(K==this)return!0;if(K._holderElementOffset==this._holderElementOffset)return!1}}catch(H){q=!0,z=H}finally{try{!D&&$.return&&$.return()}finally{if(q)throw z}}}return!0}}],[{key:'fromJSON',value:function(D,q){var z=S.default.fromJSON(D.sourcePosition,q),$=new V(z,D.howMany,D.baseVersion);return $.targetPosition=S.default.fromJSON(D.targetPosition,q),$}},{key:'className',get:function(){return'engine.model.operation.RemoveOperation'}}]),V}(C.default);o.default=F},function(r,o,u){'use strict';function d(T,E){if(!(T instanceof E))throw new TypeError('Cannot call a class as a function')}function f(T,E){if(!T)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return E&&('object'==typeof E||'function'==typeof E)?E:T}function h(T,E){if('function'!=typeof E&&null!==E)throw new TypeError('Super expression must either be null or a function, not '+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function P(){return 0===this.childCount?0:null}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function T(E,I){for(var R=0,F;R=200){var H=V?null:(0,E.default)(N);if(H)return(0,R.default)(H);$=!1,q=S.default,K=new h.default}else K=V?[]:W;outer:for(;++DO||O>C.offsetSize)throw new P.default('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>S||O+S>C.offsetSize)throw new P.default('model-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(O,O+S),this.offsetInText=O}return f(M,[{key:'is',value:function(O){return'textProxy'==O}},{key:'getPath',value:function(){var O=this.textNode.getPath();return 0=200&&(z=R.default,$=!1,V=new h.default(V));outer:for(;++qf;f++)d+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return d}},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}function d(S){if(Array.isArray(S)){for(var T=0,E=Array(S.length);T=I&&Ethis._items.length||0>N)throw new M.default('collection-add-item-invalid-index');return this._items.splice(N,0,F),this._itemMap.set(V,F),this.fire('add',F,N),this}},{key:'get',value:function(F){var N;if('string'==typeof F)N=this._itemMap.get(F);else if('number'==typeof F)N=this._items[F];else throw new M.default('collection-get-invalid-arg: Index or id must be given.');return N||null}},{key:'getIndex',value:function(F){var N;return N='string'==typeof F?this._itemMap.get(F):F,this._items.indexOf(N)}},{key:'remove',value:function(F){var D=!1,q=this._idProperty,N,V,L;if('string'==typeof F?(V=F,L=this._itemMap.get(V),D=!L,L&&(N=this._items.indexOf(L))):'number'==typeof F?(N=F,L=this._items[N],D=!L,L&&(V=L[q])):(L=F,V=L[q],N=this._items.indexOf(L),D=-1==N||!this._itemMap.get(V)),D)throw new M.default('collection-remove-404: Item not found.');this._items.splice(N,1),this._itemMap.delete(V);var z=this._bindToInternalToExternalMap.get(L);return this._bindToInternalToExternalMap.delete(L),this._bindToExternalToInternalMap.delete(z),this.fire('remove',L),L}},{key:'map',value:function(F,N){return this._items.map(F,N)}},{key:'find',value:function(F,N){return this._items.find(F,N)}},{key:'filter',value:function(F,N){return this._items.filter(F,N)}},{key:'clear',value:function(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}},{key:'bindTo',value:function(F){var N=this;if(this._bindToCollection)throw new M.default('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=F,{as:function(L){N._setUpBindToBinding(function(D){return new L(D)})},using:function(L){'function'==typeof L?N._setUpBindToBinding(function(D){return L(D)}):N._setUpBindToBinding(function(D){return D[L]})}}}},{key:'_setUpBindToBinding',value:function(F){var N=this,V=this._bindToCollection,L=function(U,G,J){var Z=V._bindToCollection==N,Y=V._bindToInternalToExternalMap.get(G);if(Z&&Y)N._bindToExternalToInternalMap.set(G,Y),N._bindToInternalToExternalMap.set(Y,G);else{var Q=F(G);N._bindToExternalToInternalMap.set(G,Q),N._bindToInternalToExternalMap.set(Q,G),N.add(Q,J)}},D=!0,q=!1,z;try{for(var $=V[Symbol.iterator](),W,K;!(D=(W=$.next()).done);D=!0)K=W.value,L(null,K)}catch(H){q=!0,z=H}finally{try{!D&&$.return&&$.return()}finally{if(q)throw z}}this.listenTo(V,'add',L),this.listenTo(V,'remove',function(H,U){var G=N._bindToExternalToInternalMap.get(U);G&&N.remove(G)})}},{key:Symbol.iterator,value:function(){return this._items[Symbol.iterator]()}},{key:'length',get:function(){return this._items.length}}]),I}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.default=E,(0,T.default)(E,P.default)},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function f(F){return F['data-ck-expando']||(F['data-ck-expando']=(0,C.default)())}function h(F){return F&&(0,E.default)(F.addEventListener)}Object.defineProperty(o,'__esModule',{value:!0});var P=u(7),w=s(P),M=u(70),C=s(M),O=u(56),S=s(O),T=u(236),E=s(T),I=(0,S.default)({},w.default,{listenTo:function(){for(var N=arguments.length,V=Array(N),L=0;L>>1){for(;R>>1,V=T[N];null!==V&&!(0,C.default)(V)&&(I?V<=E:V$._priority)||!(z._priority<$._priority)&&W}function S(z){return z.reduce(function($,W){return $+W.operations.length},0)}function T(z,$){for(var W=z[z.length-1],K=W.operations.length+W.baseVersion,H=new I.default,U=0;U<$;U++)H.addOperation(new V.default(K++));z.push(H)}Object.defineProperty(o,'__esModule',{value:!0}),o.default=f,o.defaultTransform=P,o.addTransformationCase=function(z,$,W){var K=q.get(z);K||(K=new Map,q.set(z,K)),K.set($,W)},o.getTransformationCase=M,o.transformDeltaSets=function(z,$,W){for(var K=Array.from(z),H=Array.from($),U=0,G;U=I||0>re||X&&ae>=U}function D(){var te=(0,w.default)();return L(te)?q(te):void(J=setTimeout(D,V(te)))}function q(te){return(clearTimeout(J),J=void 0,ee&&K)?F(te):(K=H=void 0,G)}function W(){var te=(0,w.default)(),re=L(te);if(K=arguments,H=this,Z=te,re){if(void 0===J)return N(Z);if(X)return clearTimeout(J),J=setTimeout(D,I),F(Z)}return void 0===J&&(J=setTimeout(D,I)),G}var Z=0,Y=0,Q=!1,X=!1,ee=!0,K,H,U,G,J;if('function'!=typeof E)throw new TypeError('Expected a function');return I=(0,C.default)(I)||0,(0,h.default)(R)&&(Q=!!R.leading,X='maxWait'in R,U=X?_Mathmax((0,C.default)(R.maxWait)||0,I):U,ee='trailing'in R?!!R.trailing:ee),W.cancel=function(){void 0!==J&&clearTimeout(J),Z=Y=0,K=H=J=void 0},W.flush=function(){return void 0===J?G:q((0,w.default)())},W}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(35),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),(0,h.default)(M,0>C?0:C,S)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(35),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),C=S-C,(0,h.default)(M,0,0>C?0:C)):[]}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return d&&d.length?d[0]:void 0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(13),h=function(S){return S&&S.__esModule?S:{default:S}}(f),w=Object.prototype,M=w.hasOwnProperty,C=w.toString,O=w.propertyIsEnumerable;o.default=function(S){return(0,h.default)(S)&&M.call(S,'callee')&&(!O.call(S,'callee')||C.call(S)=='[object Arguments]')}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(14),h=function(O){return O&&O.__esModule?O:{default:O}}(f),M=Object.prototype,C=M.toString;o.default=function(O){var S=(0,h.default)(O)?C.call(O):'';return S=='[object Function]'||S=='[object GeneratorFunction]'}},function(r,o,u){'use strict';function s(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(11),h=s(f),P=u(43),w=s(P),C=Object.prototype,O=C.toString;o.default=function(S){return'string'==typeof S||!(0,h.default)(S)&&(0,w.default)(S)&&O.call(S)=='[object String]'}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(132),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return P&&P.length&&w&&w.length?(0,h.default)(P,w):P}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(196),h=s(f),P=u(27),w=s(P),M=u(99),C=s(M);o.default=function(O,S){if(!(O&&O.length))return[];var T=(0,C.default)(O);return null==S?T:(0,w.default)(T,function(E){return(0,h.default)(S,void 0,E)})}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(M){return(0,h.default)(M)?(0,w.default)(M):new Map(M)};var f=u(98),h=s(f),P=u(275),w=s(P)},function(r){'use strict';var s='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&'function'==typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?'symbol':typeof f},d;d=function(){return this}();try{d=d||Function('return this')()||(1,eval)('this')}catch(f){'object'===('undefined'==typeof window?'undefined':s(window))&&(d=window)}r.exports=d},function(r,o,u){'use strict';function s(N){return N&&N.__esModule?N:{default:N}}function d(N,V){if(!(N instanceof V))throw new TypeError('Cannot call a class as a function')}function f(N,V){if(!N)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return V&&('object'==typeof V||'function'==typeof V)?V:N}function h(N,V){if('function'!=typeof V&&null!==V)throw new TypeError('Super expression must either be null or a function, not '+typeof V);N.prototype=Object.create(V&&V.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(N,V):N.__proto__=V)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function N(V,L){for(var D=0,q;DX?0:X),new S.default(Q,X)):null}if(0===Y){var ee=this.getCorrespondingView(Z);if(ee)return new S.default(ee,0)}else{var te=this.getCorrespondingView(Z.childNodes[Y-1]);if(te&&te.parent)return new S.default(te.parent,te.index+1)}return null}},{key:'getCorrespondingView',value:function(Z){return this.isElement(Z)?this.getCorrespondingViewElement(Z):this.isDocumentFragment(Z)?this.getCorrespondingViewDocumentFragment(Z):this.isText(Z)?this.getCorrespondingViewText(Z):null}},{key:'getCorrespondingViewElement',value:function(Z){return this._domToViewMapping.get(Z)}},{key:'getCorrespondingViewDocumentFragment',value:function(Z){return this._domToViewMapping.get(Z)}},{key:'getCorrespondingViewText',value:function(Z){if((0,D.isInlineFiller)(Z))return null;var Y=Z.previousSibling;if(Y){if(!this.isElement(Y))return null;var Q=this.getCorrespondingViewElement(Y);if(Q){var X=Q.nextSibling;return X instanceof w.default?Q.nextSibling:null}}else{var ee=this.getCorrespondingViewElement(Z.parentNode);if(ee){var te=ee.getChild(0);return te instanceof w.default?te:null}}return null}},{key:'getCorrespondingDom',value:function(Z){return Z instanceof C.default?this.getCorrespondingDomElement(Z):Z instanceof N.default?this.getCorrespondingDomDocumentFragment(Z):Z instanceof w.default?this.getCorrespondingDomText(Z):null}},{key:'getCorrespondingDomElement',value:function(Z){return this._viewToDomMapping.get(Z)}},{key:'getCorrespondingDomDocumentFragment',value:function(Z){return this._viewToDomMapping.get(Z)}},{key:'getCorrespondingDomText',value:function(Z){var Y=Z.previousSibling;return Y&&this.getCorrespondingDom(Y)?this.getCorrespondingDom(Y).nextSibling:!Y&&Z.parent&&this.getCorrespondingDom(Z.parent)?this.getCorrespondingDom(Z.parent).childNodes[0]:null}},{key:'focus',value:function(Z){var Y=this.getCorrespondingDomElement(Z);Y&&Y.ownerDocument.activeElement!==Y&&Y.focus()}},{key:'isText',value:function(Z){return Z&&Z.nodeType==Node.TEXT_NODE}},{key:'isElement',value:function(Z){return Z&&Z.nodeType==Node.ELEMENT_NODE}},{key:'isDocumentFragment',value:function(Z){return Z&&Z.nodeType==Node.DOCUMENT_FRAGMENT_NODE}},{key:'isDomSelectionBackward',value:function(Z){if(Z.isCollapsed)return!1;var Y=new Range;Y.setStart(Z.anchorNode,Z.anchorOffset),Y.setEnd(Z.focusNode,Z.focusOffset);var Q=Y.collapsed;return Y.detach(),Q}},{key:'_processDataFromViewText',value:function(Z){var Y=this,Q=Z.data;if(Z.getAncestors().some(function(oe){return Y.preElements.includes(oe.name)}))return Q;var X=this._getTouchingViewTextNode(Z,!1),ee=this._getTouchingViewTextNode(Z,!0),te=Q.match(/ *$/)[0],re=Q.substr(0,Q.length-te.length);if(X&&' '!=X.data.charAt(X.data.length-1)||(re=re.replace(/^ /,'\\xA0')),re=re.replace(/ /g,' \\xA0'),0=this.limit&&this._reset(!0)}},{key:'lock',value:function(){this.isLocked=!0}},{key:'unlock',value:function(){this.isLocked=!1}},{key:'destroy',value:function(){this.document.off('change',this._changeCallback),this.document.selection.off('change:range',this._selectionChangeCallback),this.document.selection.off('change:attribute',this._selectionChangeCallback)}},{key:'_onBatch',value:function(O){'transparent'!=O.type&&O!==this._batch&&1>=(0,P.default)(O.getOperations())&&this._reset(!0)}},{key:'_reset',value:function(O){(!this.isLocked||O)&&(this._batch=null,this.size=0)}},{key:'batch',get:function(){return this._batch||(this._batch=this.document.batch()),this._batch}}]),M}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.default=w},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){var f=d.emitter,h=d.activator,P=d.callback,w=d.contextElement;f.listenTo(document,'mouseup',function(M,C){var O=C.target;h()&&!w.contains(O)&&P()})}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){var f=d.view;f.listenTo(f.element,'submit',function(h,P){P.preventDefault(),f.fire('submit')},{useCapture:!0})}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}function d(T,E){if(!(T instanceof E))throw new TypeError('Cannot call a class as a function')}function f(T,E){if(!T)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return E&&('object'==typeof E||'function'==typeof E)?E:T}function h(T,E){if('function'!=typeof E&&null!==E)throw new TypeError('Super expression must either be null or a function, not '+typeof E);T.prototype=Object.create(E&&E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(T,E):T.__proto__=E)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function T(E,I){for(var R=0,F;RL?-1:1;E[N+D]&&(E[N]=E[N+D].slice(0)),E[N]||(E[N]=[]),E[N].push(V>L?w:M);for(var q=_Mathmax(V,L),z=q-N;zT;F--)I[F]=P(F);I[T]=P(T),R++}while(I[T]!==S);return E[T].slice(1)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){for(var f=[];d&&d.nodeType!=Node.DOCUMENT_NODE;)f.unshift(d),d=d.parentNode;return f}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){return function(f){return f+d}}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){var f=d.next();return f.done?null:f.value}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(52),f=s(d),h=u(31),P=s(h),w=(0,f.default)(P.default,'Map');o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(52),f=s(d),h=u(31),P=s(h),w=(0,f.default)(P.default,'Set');o.default=w},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var d=u(31),f=function(P){return P&&P.__esModule?P:{default:P}}(d),h=f.default.Uint8Array;o.default=h},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h){var P=h.length;return 0===P?d.call(f):1===P?d.call(f,h[0]):2===P?d.call(f,h[0],h[1]):3===P?d.call(f,h[0],h[1],h[2]):d.apply(f,h)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d,f,h,P){var w=-1,M=d.length;for(P&&M&&(h=d[++w]);++wN))return!1;var L=R.get(O);if(L)return L==S;var D=-1,q=!0,z=I&1?new h.default:void 0;for(R.set(O,S);++DE)return[];for(var F=0,N=0,V=Array(O(R/E));FS&&(S=_Mathmax(T+S,0)),(0,h.default)(C,O,S)):-1}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(145),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(P,1)}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(129),P=s(h),w=u(137),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){var E=(0,f.default)(T,M.default);return E.length&&E[0]===T[0]?(0,P.default)(E):[]});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(129),P=s(h),w=u(10),M=s(w),C=u(137),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F),V=(0,f.default)(F,O.default);return N===(0,T.default)(V)?N=void 0:V.pop(),V.length&&V[0]===F[0]?(0,P.default)(V,(0,M.default)(N)):[]});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(129),P=s(h),w=u(137),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I),F=(0,f.default)(I,M.default);return R===(0,O.default)(F)?R=void 0:F.pop(),F.length&&F[0]===I[0]?(0,P.default)(F,void 0,R):[]});o.default=E},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(148),h=s(f),P=u(90),w=s(P),M=u(14),C=s(M),O=u(212),S=s(O),T=/[\\\\^$.*+?()[\\]{}|]/g,E=/^\\[object .+?Constructor\\]$/,I=Object.prototype,R=Function.prototype.toString,F=I.hasOwnProperty,N=RegExp('^'+R.call(F).replace(T,'\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,'$1.*?')+'$');o.default=function(V){if(!(0,C.default)(V))return!1;var L=(0,h.default)(V)||(0,w.default)(V)?N:E;return L.test((0,S.default)(V))}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var d=Array.prototype,f=d.join;o.default=function(h,P){return h?f.call(h,P):''}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(209),h=s(f),P=u(15),w=s(P);o.default=function(O,S,T){var E=O?O.length:0;if(!E)return-1;var I=E;if(void 0!==T&&(I=(0,w.default)(T),I=(0>I?_Mathmax(E+I,0):_Mathmin(I,E-1))+1),S!==S)return(0,h.default)(O,I,!0);for(;I--;)if(O[I]===S)return I;return-1}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(426),h=s(f),P=u(15),w=s(P);o.default=function(M,C){return M&&M.length?(0,h.default)(M,(0,w.default)(C)):void 0}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(150),f=s(d),h=u(8),P=s(h),w=(0,P.default)(f.default);o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(132),w=s(P);o.default=function(M,C,O){return M&&M.length&&C&&C.length?(0,w.default)(M,C,(0,h.default)(O)):M}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(132),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w,M){return P&&P.length&&w&&w.length?(0,h.default)(P,w,void 0,M):P}},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(27),f=s(d),h=u(413),P=s(h),w=u(23),M=s(w),C=u(201),O=s(C),S=u(439),T=s(S),E=u(36),I=s(E),R=u(8),F=s(R),N=(0,F.default)(function(V,L){L=(0,M.default)(L,1);var D=V?V.length:0,q=(0,P.default)(V,L);return(0,O.default)(V,(0,f.default)(L,function(z){return(0,I.default)(z,D)?+z:z}).sort(T.default)),q});o.default=N},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(201),w=s(P);o.default=function(M,C){var O=[];if(!(M&&M.length))return O;var S=-1,T=[],E=M.length;for(C=(0,h.default)(C,3);++SC?0:C)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(35),h=s(f),P=u(15),w=s(P);o.default=function(M,C,O){var S=M?M.length:0;return S?(C=O||void 0===C?1:(0,w.default)(C),C=S-C,(0,h.default)(M,0>C?0:C,S)):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(87),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C,3),!1,!0):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(87),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C,3)):[]}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(148),h=s(f),P=u(14),w=s(P),M=u(44),C=s(M),O=0/0,S=/^\\s+|\\s+$/g,T=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,I=/^0o[0-7]+$/i,R=parseInt;o.default=function(F){if('number'==typeof F)return F;if((0,C.default)(F))return O;if((0,w.default)(F)){var N=(0,h.default)(F.valueOf)?F.valueOf():F;F=(0,w.default)(N)?N+'':N}if('string'!=typeof F)return 0===F?F:+F;F=F.replace(S,'');var V=E.test(F);return V||I.test(F)?R(F.slice(2),V?2:8):T.test(F)?O:+F}},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(42),P=s(h),w=u(13),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){return(0,P.default)((0,f.default)(T,1,M.default,!0))});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(10),P=s(h),w=u(42),M=s(w),C=u(13),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F);return(0,O.default)(N)&&(N=void 0),(0,M.default)((0,f.default)(F,1,O.default,!0),(0,P.default)(N))});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(23),f=s(d),h=u(42),P=s(h),w=u(13),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I);return(0,M.default)(R)&&(R=void 0),(0,P.default)((0,f.default)(I,1,M.default,!0),void 0,R)});o.default=E},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(42),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return P&&P.length?(0,h.default)(P):[]}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(10),h=s(f),P=u(42),w=s(P);o.default=function(M,C){return M&&M.length?(0,w.default)(M,(0,h.default)(C)):[]}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(42),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return P&&P.length?(0,h.default)(P,void 0,w):[]}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(68),f=s(d),h=u(13),P=s(h),w=u(8),M=s(w),C=(0,M.default)(function(O,S){return(0,P.default)(O)?(0,f.default)(O,S):[]});o.default=C},function(r,o,u){'use strict';function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(83),f=s(d),h=u(135),P=s(h),w=u(13),M=s(w),C=u(8),O=s(C),S=(0,O.default)(function(T){return(0,P.default)((0,f.default)(T,M.default))});o.default=S},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(83),f=s(d),h=u(10),P=s(h),w=u(135),M=s(w),C=u(13),O=s(C),S=u(19),T=s(S),E=u(8),I=s(E),R=(0,I.default)(function(F){var N=(0,T.default)(F);return(0,O.default)(N)&&(N=void 0),(0,M.default)((0,f.default)(F,O.default),(0,P.default)(N))});o.default=R},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(83),f=s(d),h=u(135),P=s(h),w=u(13),M=s(w),C=u(19),O=s(C),S=u(8),T=s(S),E=(0,T.default)(function(I){var R=(0,O.default)(I);return(0,M.default)(R)&&(R=void 0),(0,P.default)((0,f.default)(I,M.default),void 0,R)});o.default=E},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(8),f=s(d),h=u(99),P=s(h),w=(0,f.default)(P.default);o.default=w},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(67),h=s(f),P=u(204),w=s(P);o.default=function(M,C){return(0,w.default)(M||[],C||[],h.default)}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(428),h=s(f),P=u(204),w=s(P);o.default=function(M,C){return(0,w.default)(M||[],C||[],h.default)}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(8),f=s(d),h=u(151),P=s(h),w=(0,f.default)(function(M){var C=M.length,O=1D.length);){var $=D,W=$.index,K=$[1],H=$[2],U=$[3];W+=D[0].length-(K+H+U).length;var J=[W,W+K.length],Z=[W+K.length+H.length,W+K.length+H.length+U.length];q.push(J),q.push(Z),z.push([W+K.length,W+K.length+H.length])}return{remove:q,format:z}},V=V||function(L,D){var q=!0,z=!1,$;try{for(var W=D[Symbol.iterator](),K,H;!(q=(K=W.next()).done);q=!0)H=K.value,L.setAttribute(H,F,!0)}catch(U){z=!0,$=U}finally{try{!q&&W.return&&W.return()}finally{if(z)throw $}}},S.document.on('change',function(L,D){if('insert'===D){var q=I.editor.document.selection;if(q.isCollapsed&&q.focus&&q.focus.parent){var z=q.focus.parent,$=f(z).slice(0,q.focus.offset),W=N($),K=[];W.format.forEach(function(G){void 0===G[0]||void 0===G[1]||K.push(P.default.createFromParentsAndOffsets(z,G[0],z,G[1]))});var H=[];if(W.remove.slice().reverse().forEach(function(G){void 0===G[0]||void 0===G[1]||H.push(P.default.createFromParentsAndOffsets(z,G[0],z,G[1]))}),!!(K.length&&H.length)){var U=S.document.batch();S.document.enqueueChanges(function(){var G=(0,M.default)(F,K,S.document.schema);V(U,G);var J=!0,Z=!1,Y;try{for(var Q=H[Symbol.iterator](),X,ee;!(J=(X=Q.next()).done);J=!0)ee=X.value,U.remove(ee)}catch(te){Z=!0,Y=te}finally{try{!J&&Q.return&&Q.return()}finally{if(Z)throw Y}}})}}}})}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}function d(F,N){if(!(F instanceof N))throw new TypeError('Cannot call a class as a function')}function f(F,N){if(!F)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return N&&('object'==typeof N||'function'==typeof N)?N:F}function h(F,N){if('function'!=typeof N&&null!==N)throw new TypeError('Super expression must either be null or a function, not '+typeof N);F.prototype=Object.create(N&&N.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(F,N):F.__proto__=N)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function F(N,V){for(var L=0,D;L(\\s+)<\\/span>/g,function(f,h){return 1==h.length?' ':h})}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){return d=d.replace(//g,'>').replace(/\\n\\n/g,'

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

    ')&&(d='

    '+d+'

    '),d}},function(r,o,u){'use strict';function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S,T){if(!S)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return T&&('object'==typeof T||'function'==typeof T)?T:S}function h(S,T){if('function'!=typeof T&&null!==T)throw new TypeError('Super expression must either be null or a function, not '+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function S(T,E){for(var I=0,R;Ige.position.offset;return ye&&be?[ge.getReversed(),pe.clone()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(G.default,W.default,function(pe,ge,me){return pe.position.isEqual(ge.position)?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(G.default,Z.default,function(pe,ge,me){var ye=pe.position.root==ge.sourcePosition.root&&'same'===(0,ce.default)(pe.position.getParentPath(),ge.sourcePosition.getParentPath()),be=ge.sourcePosition.offset<=pe.position.offset&&ge.sourcePosition.offset+ge.howMany>pe.position.offset;return ye&&be?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,Q.default,function(pe,ge,me){var ye=pe.position.getParentPath(),be=ge.position.getParentPath();if('same'==(0,ce.default)(ye,be)){if(pe.position.offset==ge.position.offset)return[h()];if(pe.position.offsetge._cloneOperation.sourcePosition.offset&&he._cloneOperation.sourcePosition.offset--,[he]}var ve=pe.clone();return ve._cloneOperation.position.offset++,ve._moveOperation.sourcePosition.path[ve._moveOperation.sourcePosition.path.length-2]++,ve._moveOperation.targetPosition.path[ve._moveOperation.targetPosition.path.length-2]++,ve._moveOperation.sourcePosition.offset=pe.position.offset-ge.position.offset,pe._cloneOperation instanceof V.default&&ge._cloneOperation instanceof V.default&&pe._cloneOperation.sourcePosition.offset>ge._cloneOperation.sourcePosition.offset&&ve._cloneOperation.sourcePosition.offset--,[ve]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,oe.default,function(pe,ge,me){return'same'===(0,ce.default)(ge.position.path,pe.position.getParentPath())?[h()]:(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,re.default,function(pe,ge,me){var ye='same'===(0,ce.default)(pe.position.getParentPath(),ge.range.start.getParentPath()),be=ge.range.start.offset=pe.position.offset;if(ye&&be)return[h()];if('same'===(0,ce.default)(pe.position.getParentPath(),ge.range.end.getShiftedBy(-1).path)){var he=pe.clone(),ve=O.default.createFromPosition(ge.range.start);ve.path.push(ge.howMany-1);var ke=ve.getShiftedBy(1);he._cloneOperation.position=ke;var Pe=O.default.createFromPosition(ve);Pe.path.push(pe.position.offset),he._moveOperation.sourcePosition=Pe;var we=O.default.createFromPosition(ke);return we.path.push(0),he._moveOperation.targetPosition=we,[he]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(Q.default,z.default,function(pe,ge){pe=pe.clone();var me=new O.default(pe.position.root,pe.position.path.slice(0,-1));if(pe._cloneOperation instanceof F.default){var ye=!0,be=!1,he;try{for(var ve=ge.operations[Symbol.iterator](),ke,Pe;!(ye=(ke=ve.next()).done);ye=!0)if(Pe=ke.value,Pe.range.containsPosition(me)||Pe.range.start.isEqual(me)){null===Pe.newValue?pe._cloneOperation.nodes.getNode(0).removeAttribute(Pe.key):pe._cloneOperation.nodes.getNode(0).setAttribute(Pe.key,Pe.newValue);break}}catch(we){be=!0,he=we}finally{try{!ye&&ve.return&&ve.return()}finally{if(be)throw he}}}return[pe]}),(0,P.addTransformationCase)(oe.default,Q.default,function(pe,ge,me){if('same'===(0,ce.default)(pe.position.path,ge.position.getParentPath())){var ye=[ge.getReversed(),pe.clone()];return ye[1].operations[1].targetPosition.path[0]++,ye}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(ee.default,z.default,function(pe,ge){var me=[pe.clone()];return ge.range.containsPosition(pe.position)&&me.push(f(pe,ge)),me}),(0,P.addTransformationCase)(re.default,Q.default,function(pe,ge,me){var ye='same'===(0,ce.default)(pe.range.start.getParentPath(),ge.position.getParentPath()),be=pe.range.start.offset=ge.position.offset;if(ye&&be)return[ge.getReversed(),pe.clone()];if('same'===(0,ce.default)(ge.position.getParentPath(),pe.range.end.getShiftedBy(-1).path)){var he=pe.clone();return he._insertOperation.position.offset++,he._moveOperation.howMany++,he._moveOperation.targetPosition.path[he._moveOperation.targetPosition.path.length-2]++,[he]}return(0,P.defaultTransform)(pe,ge,me)}),(0,P.addTransformationCase)(ue.default,Q.default,function(pe,ge,me){var ye=new O.default(ge.position.root,ge.position.path.slice(0,-1)),be=(0,P.defaultTransform)(pe,ge,me);if(pe.operations[0].position.isEqual(ye)){var he=pe.clone();he.operations[0].position=pe.operations[0].position.getShiftedBy(1),be.push(he)}return be}),(0,P.addTransformationCase)(Q.default,ue.default,function(pe,ge){pe=pe.clone();var me=new O.default(pe.position.root,pe.position.path.slice(0,-1));return pe._cloneOperation instanceof F.default&&ge.operations[0].position.isEqual(me)&&(pe._cloneOperation.nodes.getNode(0).name=ge.operations[0].newName),[pe]}),(0,P.addTransformationCase)(de.default,Q.default,function(pe,ge,me){var ye=(0,P.defaultTransform)(pe,ge,me),be=ge._cloneOperation.position,he=!0,ve=!1,ke;try{for(var Pe=ye[Symbol.iterator](),we;!(he=(we=Pe.next()).done);he=!0){var xe=we.value,Me=!0,Ce=!1,Oe=void 0;try{for(var Se=xe.operations[Symbol.iterator](),Te;!(Me=(Te=Se.next()).done);Me=!0){var Ae=Te.value,Ee=Ae.sourcePosition.getShiftedBy(Ae.howMany);Ee.isEqual(be)&&(Ae.howMany+=1)}}catch(Ie){Ce=!0,Oe=Ie}finally{try{!Me&&Se.return&&Se.return()}finally{if(Ce)throw Oe}}}}catch(Ie){ve=!0,ke=Ie}finally{try{!he&&Pe.return&&Pe.return()}finally{if(ve)throw ke}}return ye}),(0,P.addTransformationCase)(Q.default,de.default,function(pe,ge,me){ge=ge.clone();var ye=pe._cloneOperation.position,be=!0,he=!1,ve;try{for(var ke=ge.operations[Symbol.iterator](),Pe;!(be=(Pe=ke.next()).done);be=!0){var we=Pe.value,xe=we.sourcePosition.getShiftedBy(we.howMany);xe.isEqual(ye)&&(we.howMany+=1)}}catch(Me){he=!0,ve=Me}finally{try{!be&&ke.return&&ke.return()}finally{if(he)throw ve}}return(0,P.defaultTransform)(pe,ge,me)})},function(r,o,u){'use strict';function s(V){return V&&V.__esModule?V:{default:V}}function d(V,L){if(!(V instanceof L))throw new TypeError('Cannot call a class as a function')}function f(V,L){if(!V)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return L&&('object'==typeof L||'function'==typeof L)?L:V}function h(V,L){if('function'!=typeof L&&null!==L)throw new TypeError('Super expression must either be null or a function, not '+typeof L);V.prototype=Object.create(L&&L.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(V,L):V.__proto__=L)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function P(V,L,D,q){var z=V.document,$=new N,W=new I.default(L,D,q,z.markers,z.version);V.addDelta($),$.addOperation(W),z.applyOperation(W)}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function V(L,D){for(var q=0,z;q=T)){F.next=9;break}return F.abrupt('break',13);case 9:return F.next=11,I;case 11:F.next=5;break;case 13:case'end':return F.stop();}},O,this)})},{key:'getDelta',value:function(S){var T=this._historyPoints.get(S);if(void 0===T)return null;var E=[];for(T;TS&&this._historyPoints.set(U,this._historyPoints.get(U)+q)}catch(G){$=!0,W=G}finally{try{!z&&K.return&&K.return()}finally{if($)throw W}}}}},{key:'_getIndex',value:function(S){var T=this._historyPoints.get(S);if(void 0===T){var E=this._deltas[this._deltas.length-1],I=E.baseVersion+E.operations.length;if(0>S||S>=I)return-1;throw new w.default('model-history-wrong-version: Given base version points to the middle of a delta.')}return T}}]),C}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.default=M},function(r,o,u){'use strict';function s(Y){return Y&&Y.__esModule?Y:{default:Y}}function d(Y,Q){if(!(Y instanceof Q))throw new TypeError('Cannot call a class as a function')}function f(Y,Q){if(!Y)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return Q&&('object'==typeof Q||'function'==typeof Q)?Q:Y}function h(Y,Q){if('function'!=typeof Q&&null!==Q)throw new TypeError('Super expression must either be null or a function, not '+typeof Q);Y.prototype=Object.create(Q&&Q.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),Q&&(Object.setPrototypeOf?Object.setPrototypeOf(Y,Q):Y.__proto__=Q)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function P(Y){return Y instanceof L.default||Y instanceof N.default?Y.getAttributes():null}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function Y(Q,X){var ee=[],te=!0,re=!1,ae;try{for(var oe=Q[Symbol.iterator](),le;!(te=(le=oe.next()).done)&&(ee.push(le.value),!(X&&ee.length===X));te=!0);}catch(ue){re=!0,ae=ue}finally{try{!te&&oe['return']&&oe['return']()}finally{if(re)throw ae}}return ee}return function(Q,X){if(Array.isArray(Q))return Q;if(Symbol.iterator in Object(Q))return Y(Q,X);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),M=function(){function Y(Q,X){for(var ee=0,te;ee=Y._holderElementOffset&&(Z=Z.clone(),Z.range.start.path[0]++,Z.range.end.path[0]++);var ee=w(Z.range.getDifference(Q)),te=Z.range.getIntersection(Q);return null!==ee&&(ee.start=ee.start._getTransformedByDeletion(Y.sourcePosition,Y.howMany),ee.end=ee.end._getTransformedByDeletion(Y.sourcePosition,Y.howMany),X=ee._getTransformedByInsertion(Y.getMovedRangeStart(),Y.howMany,!0,!1).reverse()),null!==te&&(te.start=te.start._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),te.end=te.end._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),X.push(te)),X.map(function(re){return new S.default(re,Z.key,Z.oldValue,Z.newValue,Z.baseVersion)})}},RootAttributeOperation:{InsertOperation:f,AttributeOperation:f,RootAttributeOperation:function(Z,Y,Q){return Z.root!==Y.root||Z.key!==Y.key||(Z.newValue===Y.newValue||Q)&&Z.newValue!==Y.newValue?[Z.clone()]:[new $.default(Z.baseVersion)]},RenameOperation:f,MarkerOperation:f,MoveOperation:f},RenameOperation:{InsertOperation:function(Z,Y){var Q=Z.clone();return Q.position=Q.position._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!0),[Q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:function(Z,Y,Q){var X=Z.clone();if(Z.position.isEqual(Y.position))if(Q)X.oldName=Y.newName;else return[new $.default(Z.baseVersion)];return[X]},MarkerOperation:f,MoveOperation:function(Z,Y){var Q=Z.clone(),X=Q.position.isEqual(Y.sourcePosition);return Q.position=Q.position._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!0,X),[Q]}},MarkerOperation:{InsertOperation:function(Z,Y){var Q=Z.clone();return Q.oldRange&&(Q.oldRange=Q.oldRange._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,!1)[0]),Q.newRange&&(Q.newRange=Q.newRange._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,!1)[0]),[Q]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:function(Z,Y,Q){var X=Z.clone();if(Z.name==Y.name)if(Q)X.oldRange=Y.newRange;else return[new $.default(Z.baseVersion)];return[X]},MoveOperation:function(Z,Y){var Q=Z.clone();if(Q.oldRange){var X=Q.oldRange._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany);Q.oldRange=K.default.createFromRanges(X)}if(Q.newRange){var ee=Q.newRange._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany);Q.newRange=K.default.createFromRanges(ee)}return[Q]}},MoveOperation:{InsertOperation:function(Z,Y,Q){var X=K.default.createFromPositionAndShift(Z.sourcePosition,Z.howMany);X=X._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!1,Z.isSticky)[0];var ee=new Z.constructor(X.start,X.end.offset-X.start.offset,Z instanceof q.default?Z.baseVersion:Z.targetPosition._getTransformedByInsertion(Y.position,Y.nodes.maxOffset,!Q),Z instanceof q.default?void 0:Z.baseVersion);return ee.isSticky=Z.isSticky,ee._holderElementOffset=Z._holderElementOffset,[ee]},AttributeOperation:f,RootAttributeOperation:f,RenameOperation:f,MarkerOperation:f,MoveOperation:function(Z,Y,Q){if(P(Z,Y)&&P(Y,Z))return[Y.getReversed()];if(Z instanceof q.default&&Y instanceof q.default){var X=Z.targetPosition.path[0],ee=Y.targetPosition.path[0];X>=ee&&Q&&(Z=Z.clone(),Z.targetPosition.path[0]++)}Z instanceof q.default&&!(Y instanceof q.default)?Q=!0:!(Z instanceof q.default)&&Y instanceof q.default&&(Q=!1);var te=K.default.createFromPositionAndShift(Z.sourcePosition,Z.howMany),re=K.default.createFromPositionAndShift(Y.sourcePosition,Y.howMany),ae=[],oe=w(te.getDifference(re));oe&&(oe.start=oe.start._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!Z.isSticky,!1),oe.end=oe.end._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,Z.isSticky,!1),ae.push(oe));var le=te.getIntersection(re),ue=(0,U.default)(Z.sourcePosition.getParentPath(),Y.sourcePosition.getParentPath()),ie=te.containsPosition(Y.targetPosition)||te.start.isEqual(Y.targetPosition)&&Z.isSticky||te.end.isEqual(Y.targetPosition)&&Z.isSticky,de=re.containsRange(te)&&(re.containsPosition(Z.targetPosition)||re.start.isEqual(Z.targetPosition)||re.end.isEqual(Z.targetPosition));if(null!==le&&('extension'===ue||'same'===ue&&Q||de)&&!ie&&(le.start=le.start._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),le.end=le.end._getCombined(Y.sourcePosition,Y.getMovedRangeStart()),oe&&te.start.isBefore(re.start)?ae.push(le):ae.unshift(le)),0===ae.length)return Z instanceof q.default?(Z=Z.clone(),Z.howMany=0,Z.sourcePosition=Y.targetPosition,[Z]):[new $.default(Z.baseVersion)];var fe=Z.targetPosition._getTransformedByMove(Y.sourcePosition,Y.targetPosition,Y.howMany,!Q,Y.isSticky||de);return ae.reverse().map(function(ce){var pe=new Z.constructor(ce.start,ce.end.offset-ce.start.offset,Z instanceof q.default?Z.baseVersion:fe,Z instanceof q.default?void 0:Z.baseVersion);return pe.isSticky=Z.isSticky,pe._holderElementOffset=Z._holderElementOffset,pe})}}}},function(r,o,u){'use strict';function d(S,T){if(!(S instanceof T))throw new TypeError('Cannot call a class as a function')}function f(S,T){if(!S)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return T&&('object'==typeof T||'function'==typeof T)?T:S}function h(S,T){if('function'!=typeof T&&null!==T)throw new TypeError('Super expression must either be null or a function, not '+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function S(T,E){for(var I=0,R;IO||O>C.data.length)throw new P.default('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>S||O+S>C.data.length)throw new P.default('view-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(O,O+S),this.offsetInText=O}return f(M,[{key:'is',value:function(O){return'textProxy'==O}},{key:'getAncestors',value:function(){for(var O=0me;){ye>ge.getAttribute('indent')&&(ye=ge.getAttribute('indent'));var he=ge.getAttribute('indent')-ye;be.push({item:ge,indent:he}),ge=ge.nextSibling}0=ye;)ge.getAttribute('type')!=be&&ge.getAttribute('indent')==ye&&pe.setAttribute(ge,'type',be),ge=ge[fe?'previousSibling':'nextSibling']})}}}function V(de,fe){var ce='numbered'==de.getAttribute('type')?'ol':'ul',pe=new K.default,ge=new X.default(ce,null);return ge.appendChildren(pe),fe.bindElements(de,pe),pe}function L(de,fe){for(var ce=fe.getNext?'nextSibling':'previousSibling',pe=fe.getNext?'nodeAfter':'nodeBefore',ge=!!fe.checkAllSiblings,me=!!fe.sameIndent,ye=!!fe.biggerIndent,be=!!fe.smallerIndent,he=!!fe.isMapped,ve=de instanceof U.default?de.getAttribute('indent'):fe.indent,ke=de instanceof U.default?de[ce]:de[pe],Pe;ke&&'listItem'==ke.name;){if(Pe=ke.getAttribute('indent'),me&&ve==Pe||ye&&vePe){if(!he||fe.mapper.toViewElement(ke))return ke;ke=ke[ce];continue}if(!ge)return null;ke=ke[ce]}return null}function D(de,fe){return de&&fe&&('ul'==de.name||'ol'==de.name)&&de.name==fe.name?ie.default.mergeContainers(te.default.createAfter(de)):null}function q(de,fe,ce,pe){var ge=fe.parent,me,ye=L(de,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0});if(ye&&ye.getAttribute('indent')==de.getAttribute('indent')){var be=ce.toViewElement(ye);me=ie.default.breakContainer(te.default.createAfter(be))}else ye=de.previousSibling,me=ye&&'listItem'==ye.name?ye.getAttribute('indent')=fe;)de=de.nextSibling,de.getAttribute('indent')==fe&&(ce=de);return ce}Object.defineProperty(o,'__esModule',{value:!0}),o.modelViewInsertion=function(de,fe,ce,pe){if(ce.test(fe.item,'insert')&&ce.test(fe.item,'addAttribute:type')&&ce.test(fe.item,'addAttribute:indent')){ce.consume(fe.item,'insert'),ce.consume(fe.item,'addAttribute:type'),ce.consume(fe.item,'addAttribute:indent');var ge=fe.item,me=V(ge,pe.mapper);q(ge,me,pe.mapper)}},o.modelViewChangeType=function(de,fe,ce,pe){if(ce.consume(fe.item,'changeAttribute:type')){var ge=pe.mapper.toViewElement(fe.item);ie.default.breakContainer(te.default.createBefore(ge)),ie.default.breakContainer(te.default.createAfter(ge));var me=ge.parent,ye='numbered'==fe.attributeNewValue?'ol':'ul';me=ie.default.rename(me,ye),D(me,me.nextSibling),D(me.previousSibling,me)}},o.modelViewRemove=function(de,fe,ce,pe){if(ce.consume(fe.item,'remove')){var ge=pe.mapper.toViewPosition(fe.sourcePosition),me=ge.nodeAfter.is('li')?ge.nodeAfter:ge.nodeAfter.getChild(0);ie.default.breakContainer(te.default.createBefore(me)),ie.default.breakContainer(te.default.createAfter(me));var ye=me.parent,be=ye.previousSibling,he=ae.default.createOn(ye);ie.default.remove(he),be&&be.nextSibling&&D(be,be.nextSibling),z(fe.item.getAttribute('indent')+1,fe.sourcePosition,he.start,me,pe.mapper),'$graveyard'==fe.item.root.rootName&&pe.mapper.unbindModelElement(fe.item)}},o.modelViewChangeIndent=function(de,fe,ce,pe){if(ce.consume(fe.item,'changeAttribute:indent')){var ge=pe.mapper.toViewElement(fe.item);ie.default.breakContainer(te.default.createBefore(ge)),ie.default.breakContainer(te.default.createAfter(ge));var me=ge.parent,ye=me.previousSibling,be=ae.default.createOn(me);ie.default.remove(be);var he;ye&&ye.nextSibling&&(he=D(ye,ye.nextSibling)),he||(he=be.start),z(fe.attributeOldValue+1,fe.range.start,be.start,ge,pe.mapper),q(fe.item,ge,pe.mapper,he)}},o.modelViewSplitOnInsert=function(de,fe,ce,pe){if('listItem'!=fe.item.name){for(var ge=pe.mapper.toViewPosition(fe.range.start),me=[];('ul'==ge.parent.name||'ol'==ge.parent.name)&&(ge=ie.default.breakContainer(ge),'li'==ge.parent.name);){var ye=ge,be=te.default.createAt(ge.parent,'end');if(!ye.isEqual(be)){var he=ie.default.remove(new ae.default(ye,be));me.push(he)}ge=te.default.createAfter(ge.parent)}if(0L.getAttribute('indent');)V.push(D),D=D.nextSibling;0>R._indentBy&&(V=V.reverse());var q=!0,z=!1,$;try{for(var W=V[Symbol.iterator](),K;!(q=(K=W.next()).done);q=!0){var H=K.value,U=H.getAttribute('indent')+R._indentBy;if(0>U)N.rename(H,'paragraph');else{if(0R._indentBy){for(var G=H.previousSibling;G.getAttribute('indent')>U;)G=G.previousSibling;G.getAttribute('type')!=H.getAttribute('type')&&N.setAttribute(H,'type',G.getAttribute('type'))}N.setAttribute(H,'indent',U)}}}catch(J){z=!0,$=J}finally{try{!q&&W.return&&W.return()}finally{if(z)throw $}}})}},{key:'_checkEnabled',value:function(){var R=(0,O.default)(this.editor.document.selection.getSelectedBlocks());if(!R||!R.is('listItem'))return!1;var F=R.previousSibling,N=R.getAttribute('indent'),V=N+this._indentBy;if(0=N;)D>L.getAttribute('indent')&&(D=L.getAttribute('indent')),L.getAttribute('indent')==D&&R[F?'unshift':'push'](L),L=L[F?'previousSibling':'nextSibling']}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function R(F,N){for(var V=0,L;V=U;U++)H.push(U)},function(r,o,u){'use strict';function s(E){return E&&E.__esModule?E:{default:E}}function d(E,I){if(!(E instanceof I))throw new TypeError('Cannot call a class as a function')}function f(E,I){if(!E)throw new ReferenceError('this hasn\\'t been initialised - super() hasn\\'t been called');return I&&('object'==typeof I||'function'==typeof I)?I:E}function h(E,I){if('function'!=typeof I&&null!==I)throw new TypeError('Super expression must either be null or a function, not '+typeof I);E.prototype=Object.create(I&&I.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(E,I):E.__proto__=I)}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var P=function(){function E(I,R){for(var F=0,N;Fq.top&&this._toolbarRect.height+this.limiterOffsetD&&K():!V&&N?Z>L&&K():Y>D&&Z>=L?K():Y>=D&&Z>L&&K(),Z===$}),q?[z,q]:null}function P(I){var R=I.left,F=I.top,N=C.default.window,V=N.scrollX,L=N.scrollY;return{left:R+V,top:F+L}}Object.defineProperty(o,'__esModule',{value:!0});var w=function(){function I(R,F){var N=[],V=!0,L=!1,D;try{for(var q=R[Symbol.iterator](),z;!(V=(z=q.next()).done)&&(N.push(z.value),!(F&&N.length===F));V=!0);}catch($){L=!0,D=$}finally{try{!V&&q['return']&&q['return']()}finally{if(L)throw D}}return N}return function(R,F){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return I(R,F);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.getOptimalPosition=function(I){var R=I.element,F=I.target,N=I.positions,V=I.limiter,L=I.fitInViewport,D=(0,E.default)(R.parentElement),q=new S.default(R),z=new S.default(F),$,W;if(!V&&!L){var K=f(N[0],z,q),H=w(K,2);W=H[0],$=H[1]}else{var U=V&&new S.default(V),G=L&&S.default.getViewportRect(),J=h(N,z,q,U,G)||f(N[0],z,q),Z=w(J,2);W=Z[0],$=Z[1]}var Y=P($),Q=Y.left,X=Y.top;if(D){var ee=P(new S.default(D)),te=C.default.window.getComputedStyle(D);Q-=ee.left,X-=ee.top,Q+=D.scrollLeft,X+=D.scrollTop,Q-=parseInt(te.borderLeftWidth,10),X-=parseInt(te.borderTopWidth,10)}return{left:Q,top:X,name:W}};var M=u(64),C=s(M),O=u(397),S=s(O),T=u(392),E=s(T)},function(r,o,u){'use strict';function s(E){return E&&E.__esModule?E:{default:E}}function d(E,I){if(!(E instanceof I))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var f=function(){function E(I,R){for(var F=0,N;FF.width||0>F.height?null:new E(F)}},{key:'getIntersectionArea',value:function(R){var F=this.getIntersection(R);return F?F.getArea():0}},{key:'getArea',value:function(){return this.width*this.height}}],[{key:'getViewportRect',value:function(){var R=P.default.window,F=R.innerWidth,N=R.innerHeight;return new E({top:0,right:F,bottom:N,left:0,width:F,height:N})}}]),E}();/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */o.default=T},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d){var f=d.parentNode;f&&f.removeChild(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */function(d,f){d instanceof HTMLTextAreaElement&&(d.value=f),d.innerHTML=f}},function(r,o){'use strict';function s(h,P){if(!(h instanceof P))throw new TypeError('Cannot call a class as a function')}/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */Object.defineProperty(o,'__esModule',{value:!0});var d=function(){function h(P,w){for(var M=0,C;M=f?d:f)),d}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(14),h=function(w){return w&&w.__esModule?w:{default:w}}(f),P=Object.create;o.default=function(w){return(0,h.default)(w)?P(w):{}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(15),h=s(f),P=u(498),w=s(P);o.default=function(M,C,O,S){var T=M.length;for(O=(0,h.default)(O),0>O&&(O=-O>T?0:T+O),S=void 0===S||S>T?T:(0,h.default)(S),0>S&&(S+=T),S=O>S?0:(0,w.default)(S);Ow?M:0,(0,h.default)(w,M)?P[w]:void 0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(127),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return function(w){return(0,h.default)(w,P)}}},function(r,o,u){'use strict';function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(67),h=s(f),P=u(88),w=s(P),M=u(36),C=s(M),O=u(53),S=s(O),T=u(14),E=s(T),I=u(54),R=s(I);o.default=function(F,N,V,L){N=(0,S.default)(N,F)?[N]:(0,w.default)(N);for(var D=-1,q=N.length,$=F,W;null!=$&&++Dw||S&&T&&I&&!E&&!R||C&&T&&I||!M&&I||!O)return 1;if(!C&&!S&&!R&&PT?void 0:E,T=1),C=Object(C);++SO)return!1;var S=C.length-1;return O==S?C.pop():w.call(C,O,1),!0}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(85),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){var w=this.__data__,M=(0,h.default)(w,P);return 0>M?void 0:w[M][1]}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(85),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return-1<(0,h.default)(this.__data__,P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(85),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){var M=this.__data__,C=(0,h.default)(M,P);return 0>C?M.push([P,w]):M[C][1]=w,this}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(404),h=s(f),P=u(81),w=s(P),M=u(193),C=s(M);o.default=function(){this.__data__={hash:new h.default,map:new(C.default||w.default),string:new h.default}}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P)['delete'](P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P).get(P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return(0,h.default)(this,P).has(P)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(89),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(this,P).set(P,w),this}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(127),h=s(f),P=u(35),w=s(P);o.default=function(M,C){return 1==C.length?M:(0,h.default)(M,(0,w.default)(C,0,-1))}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0});o.default=function(f){return this.__data__.set(f,'__lodash_hash_undefined__'),this}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.has(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){var f=-1,h=Array(d.size);return d.forEach(function(P){h[++f]=[P,P]}),h}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(81),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(){this.__data__=new h.default}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__['delete'](d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.get(d)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return this.__data__.has(d)}},function(r,o,u){'use strict';function s(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(81),h=s(f),P=u(122),w=s(P);o.default=function(C,O){var S=this.__data__;return S instanceof h.default&&S.__data__.length==200&&(S=this.__data__=new w.default(S.__data__)),S.set(C,O),this}},function(r,o,u){'use strict';function s(O){return O&&O.__esModule?O:{default:O}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(492),f=s(d),h=u(500),P=s(h),w=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]/g,M=/\\\\(\\\\)?/g,C=(0,f.default)(function(O){var S=[];return(0,P.default)(O).replace(w,function(T,E,I,R){S.push(I?R.replace(M,'$1'):E||T)}),S});o.default=C},function(r,o,u){'use strict';function s(Zt){return Zt&&Zt.__esModule?Zt:{default:Zt}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(213),f=s(d),h=u(214),P=s(h),w=u(215),M=s(w),C=u(216),O=s(C),S=u(217),T=s(S),E=u(218),I=s(E),R=u(144),F=s(R),N=u(145),V=s(N),L=u(219),D=s(L),q=u(220),z=s(q),$=u(221),W=s($),K=u(222),H=s(K),U=u(223),G=s(U),J=u(224),Z=s(J),Y=u(225),Q=s(Y),X=u(226),ee=s(X),te=u(227),re=s(te),ae=u(228),oe=s(ae),le=u(146),ue=s(le),ie=u(231),de=s(ie),fe=u(232),ce=s(fe),pe=u(233),ge=s(pe),me=u(234),ye=s(me),be=u(235),he=s(be),ve=u(237),ke=s(ve),Pe=u(19),we=s(Pe),xe=u(238),Me=s(xe),Ce=u(239),Oe=s(Ce),Se=u(240),Te=s(Se),Ae=u(150),Ee=s(Ae),Ie=u(241),Re=s(Ie),Fe=u(242),Ne=s(Fe),Ve=u(243),Le=s(Ve),Be=u(244),De=s(Be),je=u(245),qe=s(je),ze=u(246),$e=s(ze),We=u(247),Ke=s(We),He=u(248),Ue=s(He),Ge=u(249),Je=s(Ge),Ze=u(250),Ye=s(Ze),Qe=u(251),Xe=s(Qe),et=u(252),tt=s(et),rt=u(253),at=s(rt),nt=u(254),lt=s(nt),ut=u(255),it=s(ut),st=u(256),dt=s(st),ft=u(257),ct=s(ft),pt=u(258),gt=s(pt),mt=u(259),yt=s(mt),bt=u(261),ht=s(bt),vt=u(262),kt=s(vt),Pt=u(263),wt=s(Pt),xt=u(264),Mt=s(xt),Ct=u(265),Ot=s(Ct),St=u(266),Tt=s(St),At=u(99),Et=s(At),It=u(151),Rt=s(It),Ft=u(267),Nt=s(Ft),Vt=u(268),Lt=s(Vt),Bt=u(269),Dt=s(Bt),jt=u(270),qt=s(jt),zt=u(271),$t=s(zt),Wt=u(272),Kt=s(Wt),Ht=u(273),Ut=s(Ht),Gt=u(274),Jt=s(Gt);o.default={chunk:f.default,compact:P.default,concat:M.default,difference:O.default,differenceBy:T.default,differenceWith:I.default,drop:F.default,dropRight:V.default,dropRightWhile:D.default,dropWhile:z.default,fill:W.default,findIndex:H.default,findLastIndex:G.default,first:Z.default,flatten:Q.default,flattenDeep:ee.default,flattenDepth:re.default,fromPairs:oe.default,head:ue.default,indexOf:de.default,initial:ce.default,intersection:ge.default,intersectionBy:ye.default,intersectionWith:he.default,join:ke.default,last:we.default,lastIndexOf:Me.default,nth:Oe.default,pull:Te.default,pullAll:Ee.default,pullAllBy:Re.default,pullAllWith:Ne.default,pullAt:Le.default,remove:De.default,reverse:qe.default,slice:$e.default,sortedIndex:Ke.default,sortedIndexBy:Ue.default,sortedIndexOf:Je.default,sortedLastIndex:Ye.default,sortedLastIndexBy:Xe.default,sortedLastIndexOf:tt.default,sortedUniq:at.default,sortedUniqBy:lt.default,tail:it.default,take:dt.default,takeRight:ct.default,takeRightWhile:gt.default,takeWhile:yt.default,union:ht.default,unionBy:kt.default,unionWith:wt.default,uniq:Mt.default,uniqBy:Ot.default,uniqWith:Tt.default,unzip:Et.default,unzipWith:Rt.default,without:Nt.default,xor:Lt.default,xorBy:Dt.default,xorWith:qt.default,zip:$t.default,zipObject:Kt.default,zipObjectDeep:Ut.default,zipWith:Jt.default}},function(r,o,u){'use strict';function s(Be){return Be&&Be.__esModule?Be:{default:Be}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(213);Object.defineProperty(o,'chunk',{enumerable:!0,get:function(){return s(d).default}});var f=u(214);Object.defineProperty(o,'compact',{enumerable:!0,get:function(){return s(f).default}});var h=u(215);Object.defineProperty(o,'concat',{enumerable:!0,get:function(){return s(h).default}});var P=u(216);Object.defineProperty(o,'difference',{enumerable:!0,get:function(){return s(P).default}});var w=u(217);Object.defineProperty(o,'differenceBy',{enumerable:!0,get:function(){return s(w).default}});var M=u(218);Object.defineProperty(o,'differenceWith',{enumerable:!0,get:function(){return s(M).default}});var C=u(144);Object.defineProperty(o,'drop',{enumerable:!0,get:function(){return s(C).default}});var O=u(145);Object.defineProperty(o,'dropRight',{enumerable:!0,get:function(){return s(O).default}});var S=u(219);Object.defineProperty(o,'dropRightWhile',{enumerable:!0,get:function(){return s(S).default}});var T=u(220);Object.defineProperty(o,'dropWhile',{enumerable:!0,get:function(){return s(T).default}});var E=u(221);Object.defineProperty(o,'fill',{enumerable:!0,get:function(){return s(E).default}});var I=u(222);Object.defineProperty(o,'findIndex',{enumerable:!0,get:function(){return s(I).default}});var R=u(223);Object.defineProperty(o,'findLastIndex',{enumerable:!0,get:function(){return s(R).default}});var F=u(224);Object.defineProperty(o,'first',{enumerable:!0,get:function(){return s(F).default}});var N=u(225);Object.defineProperty(o,'flatten',{enumerable:!0,get:function(){return s(N).default}});var V=u(226);Object.defineProperty(o,'flattenDeep',{enumerable:!0,get:function(){return s(V).default}});var L=u(227);Object.defineProperty(o,'flattenDepth',{enumerable:!0,get:function(){return s(L).default}});var D=u(228);Object.defineProperty(o,'fromPairs',{enumerable:!0,get:function(){return s(D).default}});var q=u(146);Object.defineProperty(o,'head',{enumerable:!0,get:function(){return s(q).default}});var z=u(231);Object.defineProperty(o,'indexOf',{enumerable:!0,get:function(){return s(z).default}});var $=u(232);Object.defineProperty(o,'initial',{enumerable:!0,get:function(){return s($).default}});var W=u(233);Object.defineProperty(o,'intersection',{enumerable:!0,get:function(){return s(W).default}});var K=u(234);Object.defineProperty(o,'intersectionBy',{enumerable:!0,get:function(){return s(K).default}});var H=u(235);Object.defineProperty(o,'intersectionWith',{enumerable:!0,get:function(){return s(H).default}});var U=u(237);Object.defineProperty(o,'join',{enumerable:!0,get:function(){return s(U).default}});var G=u(19);Object.defineProperty(o,'last',{enumerable:!0,get:function(){return s(G).default}});var J=u(238);Object.defineProperty(o,'lastIndexOf',{enumerable:!0,get:function(){return s(J).default}});var Z=u(239);Object.defineProperty(o,'nth',{enumerable:!0,get:function(){return s(Z).default}});var Y=u(240);Object.defineProperty(o,'pull',{enumerable:!0,get:function(){return s(Y).default}});var Q=u(150);Object.defineProperty(o,'pullAll',{enumerable:!0,get:function(){return s(Q).default}});var X=u(241);Object.defineProperty(o,'pullAllBy',{enumerable:!0,get:function(){return s(X).default}});var ee=u(242);Object.defineProperty(o,'pullAllWith',{enumerable:!0,get:function(){return s(ee).default}});var te=u(243);Object.defineProperty(o,'pullAt',{enumerable:!0,get:function(){return s(te).default}});var re=u(244);Object.defineProperty(o,'remove',{enumerable:!0,get:function(){return s(re).default}});var ae=u(245);Object.defineProperty(o,'reverse',{enumerable:!0,get:function(){return s(ae).default}});var oe=u(246);Object.defineProperty(o,'slice',{enumerable:!0,get:function(){return s(oe).default}});var le=u(247);Object.defineProperty(o,'sortedIndex',{enumerable:!0,get:function(){return s(le).default}});var ue=u(248);Object.defineProperty(o,'sortedIndexBy',{enumerable:!0,get:function(){return s(ue).default}});var ie=u(249);Object.defineProperty(o,'sortedIndexOf',{enumerable:!0,get:function(){return s(ie).default}});var de=u(250);Object.defineProperty(o,'sortedLastIndex',{enumerable:!0,get:function(){return s(de).default}});var fe=u(251);Object.defineProperty(o,'sortedLastIndexBy',{enumerable:!0,get:function(){return s(fe).default}});var ce=u(252);Object.defineProperty(o,'sortedLastIndexOf',{enumerable:!0,get:function(){return s(ce).default}});var pe=u(253);Object.defineProperty(o,'sortedUniq',{enumerable:!0,get:function(){return s(pe).default}});var ge=u(254);Object.defineProperty(o,'sortedUniqBy',{enumerable:!0,get:function(){return s(ge).default}});var me=u(255);Object.defineProperty(o,'tail',{enumerable:!0,get:function(){return s(me).default}});var ye=u(256);Object.defineProperty(o,'take',{enumerable:!0,get:function(){return s(ye).default}});var be=u(257);Object.defineProperty(o,'takeRight',{enumerable:!0,get:function(){return s(be).default}});var he=u(258);Object.defineProperty(o,'takeRightWhile',{enumerable:!0,get:function(){return s(he).default}});var ve=u(259);Object.defineProperty(o,'takeWhile',{enumerable:!0,get:function(){return s(ve).default}});var ke=u(261);Object.defineProperty(o,'union',{enumerable:!0,get:function(){return s(ke).default}});var Pe=u(262);Object.defineProperty(o,'unionBy',{enumerable:!0,get:function(){return s(Pe).default}});var we=u(263);Object.defineProperty(o,'unionWith',{enumerable:!0,get:function(){return s(we).default}});var xe=u(264);Object.defineProperty(o,'uniq',{enumerable:!0,get:function(){return s(xe).default}});var Me=u(265);Object.defineProperty(o,'uniqBy',{enumerable:!0,get:function(){return s(Me).default}});var Ce=u(266);Object.defineProperty(o,'uniqWith',{enumerable:!0,get:function(){return s(Ce).default}});var Oe=u(99);Object.defineProperty(o,'unzip',{enumerable:!0,get:function(){return s(Oe).default}});var Se=u(151);Object.defineProperty(o,'unzipWith',{enumerable:!0,get:function(){return s(Se).default}});var Te=u(267);Object.defineProperty(o,'without',{enumerable:!0,get:function(){return s(Te).default}});var Ae=u(268);Object.defineProperty(o,'xor',{enumerable:!0,get:function(){return s(Ae).default}});var Ee=u(269);Object.defineProperty(o,'xorBy',{enumerable:!0,get:function(){return s(Ee).default}});var Ie=u(270);Object.defineProperty(o,'xorWith',{enumerable:!0,get:function(){return s(Ie).default}});var Re=u(271);Object.defineProperty(o,'zip',{enumerable:!0,get:function(){return s(Re).default}});var Fe=u(272);Object.defineProperty(o,'zipObject',{enumerable:!0,get:function(){return s(Fe).default}});var Ne=u(273);Object.defineProperty(o,'zipObjectDeep',{enumerable:!0,get:function(){return s(Ne).default}});var Ve=u(274);Object.defineProperty(o,'zipWith',{enumerable:!0,get:function(){return s(Ve).default}});var Le=u(481);Object.defineProperty(o,'default',{enumerable:!0,get:function(){return s(Le).default}})},function(r,o,u){'use strict';function s(L){return L&&L.__esModule?L:{default:L}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(67),f=s(d),h=u(139),P=s(h),w=u(441),M=s(w),C=u(96),O=s(C),S=u(92),T=s(S),E=u(491),I=s(E),R=Object.prototype,F=R.propertyIsEnumerable,N=!F.call({valueOf:1},'valueOf'),V=(0,M.default)(function(L,D){if(N||(0,T.default)(D)||(0,O.default)(D))return void(0,P.default)(D,(0,I.default)(D),L);for(var q in D)(0,f.default)(L,q,D[q])});o.default=V},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(198),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(P,!0,!0,w)}},function(r,o){'use strict';Object.defineProperty(o,'__esModule',{value:!0}),o.default=function(d){return function(){return d}}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(418),h=s(f),P=u(449),w=s(P);o.default=function(M,C){return null!=M&&(0,w.default)(M,C,h.default)}},function(r,o,u){'use strict';(function(s){function d(R){return R&&R.__esModule?R:{default:R}}Object.defineProperty(o,'__esModule',{value:!0});var f='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(R){return typeof R}:function(R){return R&&'function'==typeof Symbol&&R.constructor===Symbol&&R!==Symbol.prototype?'symbol':typeof R},h=u(485),P=d(h),w=u(31),M=d(w),C={'function':!0,object:!0},O=C[f(o)]&&o&&!o.nodeType?o:void 0,S=C[f(s)]&&s&&!s.nodeType?s:void 0,T=S&&S.exports===O?O:void 0,E=T?M.default.Buffer:void 0,I=E?function(R){return R instanceof E}:(0,P.default)(!1);o.default=I}).call(o,u(100)(r))},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(43),h=s(f),P=u(98),w=s(P);o.default=function(M){return!!M&&1===M.nodeType&&(0,h.default)(M)&&!(0,w.default)(M)}},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(130),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P,w){return(0,h.default)(P,w)}},function(r,o,u){'use strict';function s(te){return te&&te.__esModule?te:{default:te}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(97),h=s(f),P=u(43),w=s(P),Q={};Q['[object Float32Array]']=Q['[object Float64Array]']=Q['[object Int8Array]']=Q['[object Int16Array]']=Q['[object Int32Array]']=Q['[object Uint8Array]']=Q['[object Uint8ClampedArray]']=Q['[object Uint16Array]']=Q['[object Uint32Array]']=!0,Q['[object Arguments]']=Q['[object Array]']=Q['[object ArrayBuffer]']=Q['[object Boolean]']=Q['[object DataView]']=Q['[object Date]']=Q['[object Error]']=Q['[object Function]']=Q['[object Map]']=Q['[object Number]']=Q['[object Object]']=Q['[object RegExp]']=Q['[object Set]']=Q['[object String]']=Q['[object WeakMap]']=!1;var X=Object.prototype,ee=X.toString;o.default=function(te){return(0,w.default)(te)&&(0,h.default)(te.length)&&!!Q[ee.call(te)]}},function(r,o,u){'use strict';function s(I){return I&&I.__esModule?I:{default:I}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(423),h=s(f),P=u(208),w=s(P),M=u(36),C=s(M),O=u(92),S=s(O),T=Object.prototype,E=T.hasOwnProperty;o.default=function(I){for(var R=-1,F=(0,S.default)(I),N=(0,h.default)(I),V=N.length,L=(0,w.default)(I),q=L||[],z=q.length,$;++RM?-1:1;return C*1.7976931348623157e308}return M===M?M:0}},function(r,o,u){'use strict';function s(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(o,'__esModule',{value:!0});var f=u(414),h=s(f),P=u(15),w=s(P);o.default=function(C){return C?(0,h.default)((0,w.default)(C),0,4294967295):0}},function(r,o,u){'use strict';function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(o,'__esModule',{value:!0});var d=u(443),f=s(d),h=u(69),P=s(h),w=(0,f.default)(P.default);o.default=w},function(r,o,u){'use strict';Object.defineProperty(o,'__esModule',{value:!0});var f=u(430),h=function(P){return P&&P.__esModule?P:{default:P}}(f);o.default=function(P){return null==P?'':(0,h.default)(P)}},function(r,o,u){'use strict';function s(P,w){if(!(P instanceof w))throw new TypeError('Cannot call a class as a function')}Object.defineProperty(o,'__esModule',{value:!0});var d=function(){function P(w,M){for(var C=0,O;C * {\\n margin-right: 0.4em; }\\n .ck-toolbar > *:last-child {\\n margin-right: 0; }\\n\\n.ck-dropdown::after {\\n border-style: solid;\\n border-width: .4em .4em 0 .4em;\\n border-color: #707070 transparent;\\n right: 0.8em; }\\n\\n.ck-dropdown .ck-button.ck-dropdown__button {\\n padding-right: 1.6em; }\\n .ck-dropdown .ck-button.ck-dropdown__button .ck-button__label {\\n width: 7em;\\n overflow: hidden;\\n text-overflow: ellipsis; }\\n\\n.ck-dropdown__panel {\\n border: 1px solid #b9b9b9;\\n bottom: 1px;\\n background: white;\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2); }\\n .ck-dropdown__panel.ck-rounded-corners,\\n .ck-rounded-corners .ck-dropdown__panel {\\n border-radius: 2px; }\\n\\n.ck-list {\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n -ms-user-select: none;\\n list-style-type: none;\\n background: white; }\\n .ck-list.ck-rounded-corners,\\n .ck-rounded-corners .ck-list {\\n border-radius: 2px; }\\n .ck-list__item {\\n padding: 0.64em;\\n cursor: default;\\n min-width: 12em; }\\n .ck-list__item:hover, .ck-list__item:focus {\\n background: #f7f7f7; }\\n .ck-list__item:focus {\\n box-shadow: 0 0 3px 2px #9bcdfb;\\n position: relative;\\n z-index: 1;\\n outline: none; }\\n .ck-list__item:last-of-type {\\n border: none; }\\n .ck-list__item_active {\\n background: #1a8bf1;\\n color: white; }\\n .ck-list__item_active:hover, .ck-list__item_active:focus {\\n background: #0e7ee2; }\\n\\n.ck-label {\\n font-weight: bold; }\\n\\n.ck-input-text {\\n box-shadow: 2px 2px 3px #e6e6e6 inset;\\n border: 1px solid #b9b9b9;\\n padding: 0.64em;\\n min-width: 250px; }\\n .ck-input-text.ck-rounded-corners,\\n .ck-rounded-corners .ck-input-text {\\n border-radius: 2px; }\\n .ck-input-text:focus {\\n outline: none;\\n border: 1px solid #6ab5f9;\\n box-shadow: 0 0 3px 2px #9bcdfb, 2px 2px 3px #e6e6e6 inset; }\\n\\n.ck-balloon-panel {\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\\n min-width: 50px;\\n min-height: 15px;\\n background: white;\\n border: 1px solid #b9b9b9; }\\n .ck-balloon-panel.ck-rounded-corners,\\n .ck-rounded-corners .ck-balloon-panel {\\n border-radius: 2px; }\\n .ck-balloon-panel:before, .ck-balloon-panel:after {\\n width: 0;\\n height: 0;\\n border-style: solid; }\\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\\n border-width: 0 10px 15px 10px; }\\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_sw:before {\\n border-color: transparent transparent #b9b9b9 transparent; }\\n .ck-balloon-panel_arrow_s:after, .ck-balloon-panel_arrow_se:after, .ck-balloon-panel_arrow_sw:after {\\n border-color: transparent transparent white transparent;\\n margin-top: 2px; }\\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\\n border-width: 15px 10px 0 10px; }\\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_nw:before {\\n border-color: #b9b9b9 transparent transparent; }\\n .ck-balloon-panel_arrow_n:after, .ck-balloon-panel_arrow_ne:after, .ck-balloon-panel_arrow_nw:after {\\n border-color: white transparent transparent transparent;\\n margin-bottom: 2px; }\\n .ck-balloon-panel_arrow_s:before, .ck-balloon-panel_arrow_s:after {\\n left: 50%;\\n margin-left: -10px;\\n top: -15px; }\\n .ck-balloon-panel_arrow_se:before, .ck-balloon-panel_arrow_se:after {\\n left: 20px;\\n top: -15px; }\\n .ck-balloon-panel_arrow_sw:before, .ck-balloon-panel_arrow_sw:after {\\n right: 20px;\\n top: -15px; }\\n .ck-balloon-panel_arrow_n:before, .ck-balloon-panel_arrow_n:after {\\n left: 50%;\\n margin-left: -10px;\\n bottom: -15px; }\\n .ck-balloon-panel_arrow_ne:before, .ck-balloon-panel_arrow_ne:after {\\n left: 20px;\\n bottom: -15px; }\\n .ck-balloon-panel_arrow_nw:before, .ck-balloon-panel_arrow_nw:after {\\n right: 20px;\\n bottom: -15px; }\\n\\n.ck-floating-panel {\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\\n border: 1px solid #bfbfbf;\\n background: #f7f7f7; }\\n .ck-floating-panel.ck-rounded-corners,\\n .ck-rounded-corners .ck-floating-panel {\\n border-radius: 2px; }\\n\\n.ck-toolbar__container {\\n background: #f7f7f7; }\\n .ck-toolbar__container .ck-toolbar {\\n border-radius: 0;\\n border: 0; }\\n .ck-toolbar__container .ck-toolbar .ck-button {\\n border-width: 0; }\\n .ck-toolbar__container .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-toolbar__container .ck-toolbar .ck-button.ck-disabled {\\n background: #f7f7f7; }\\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on {\\n background: #dedede;\\n border-color: #a1a1a1; }\\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\\n background: #c6c6c6;\\n border-color: #888888; }\\n .ck-toolbar__container .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\\n background: #b9b9b9;\\n border-color: #7c7c7c;\\n box-shadow: inset 0 2px 2px #a1a1a1; }\\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button {\\n border-width: 1px; }\\n .ck-toolbar__container .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\\n background: white; }\\n .ck-toolbar__container.ck-balloon-panel_arrow_s:after, .ck-toolbar__container.ck-balloon-panel_arrow_se:after, .ck-toolbar__container.ck-balloon-panel_arrow_sw:after {\\n border-bottom-color: #f7f7f7; }\\n .ck-toolbar__container.ck-balloon-panel_arrow_n:after, .ck-toolbar__container.ck-balloon-panel_arrow_ne:after, .ck-toolbar__container.ck-balloon-panel_arrow_nw:after {\\n border-top-color: #f7f7f7; }\\n\\n.ck-editor .ck-toolbar.ck-toolbar_sticky {\\n box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);\\n border: 1px solid #bfbfbf;\\n border-width: 0 0 1px;\\n background: #f7f7f7; }\\n\\n.ck-editor {\\n position: relative; }\\n .ck-editor.ck-rounded-corners,\\n .ck-rounded-corners .ck-editor {\\n border-radius: 2px; }\\n .ck-editor .ck-editor__top .ck-toolbar {\\n border-radius: 0;\\n border-top: 0;\\n border-left: 0;\\n border-right: 0; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button {\\n border-width: 0; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on), .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-disabled {\\n background: #f7f7f7; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on {\\n background: #dedede;\\n border-color: #a1a1a1; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):hover, .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):focus {\\n background: #c6c6c6;\\n border-color: #888888; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-button.ck-on:not(.ck-disabled):active {\\n background: #b9b9b9;\\n border-color: #7c7c7c;\\n box-shadow: inset 0 2px 2px #a1a1a1; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button {\\n border-width: 1px; }\\n .ck-editor .ck-editor__top .ck-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on) {\\n background: white; }\\n .ck-editor .ck-editor__main {\\n background: white; }\\n .ck-editor .ck-editor__bottom {\\n border-bottom: 0;\\n border-left: 0;\\n border-right: 0;\\n padding: 0.8em; }\\n .ck-editor .ck-editor__editable.ck-focused {\\n outline: 1px solid #6ab5f9;\\n box-shadow: 2px 2px 3px #e6e6e6 inset; }\\n .ck-editor .ck-editor__editable_inline {\\n overflow: auto;\\n padding: 0 0.8em; }\\n\\n.ck-editor,\\n.ck-editor-bottom {\\n background: #f7f7f7;\\n border: 1px solid #b9b9b9; }\\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'/**\\n * Default spacing value (\"unit\").\\n *\\n */\\n/**\\n * Internal map with default spacings.\\n *\\n * @type Map\\n * @see ck-spacing\\n */\\n/**\\n * Returns a spacing value with units for given name.\\n *\\n * @param {String} $spacing [ \\'standard\\' ] - Spacing level.\\n * @return {String}\\n * @see $ck-def-spacing\\n * @see $ck-def-spacings\\n */\\n/**\\n * Base font size.\\n *\\n * @see $ck-font-sizes\\n */\\n/**\\n * Base font face.\\n *\\n */\\n/**\\n * Base font sizes for scaling.\\n *\\n * @see ck-font-size\\n */\\n/**\\n * Returns font-size in units for given level.\\n *\\n * @param {Number} $level [ 0 ] - Size of the font.\\n * @return {String}\\n * @see $ck-font-sizes\\n * @see $ck-font-size-base\\n */\\n.ck-heading_heading1 {\\n font-size: 1.5em; }\\n\\n.ck-heading_heading2 {\\n font-size: 1.3em; }\\n\\n.ck-heading_heading3 {\\n font-size: 1.1em; }\\n\\n[class*=\"ck-heading_\"] {\\n line-height: 21.6px;\\n padding: 9.6px; }\\n\\n[class*=\"ck-heading_heading\"] {\\n font-weight: bold; }\\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'@charset \"UTF-8\";\\n/**\\n * Colors configured by the user.\\n *\\n * @type Map\\n * @example\\n *\\t\\t$ck-colors: ( \\'foreground\\': red );\\n * @see $_ck-colors\\n */\\n/**\\n * Internal map with default colors.\\n *\\n * @type Map\\n * @see ck-color-add\\n */\\n/**\\n * Returns a color of given name and lightness offset.\\n *\\n * @param {String} $name [ \\'background\\' ] - Name of the color.\\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\\n * @return {String}\\n * @see $_ck-colors\\n */\\n/**\\n * Returns a border\\u2013color for a given name and lightness offset.\\n *\\n * @param {String} $name [ \\'background\\' ] - Name of the color.\\n * @param {Number} $offset [ 0 ] - Offset of the lightness.\\n * @return {String}\\n * @see $ck-color\\n */\\n/**\\n * Adds a color to internal color map.\\n *\\n * @example\\n *\\t\\t@include ck-color-add( ( \\'special\\': yellow, \\'hover\\': #00FF00 ) );\\n * @param {Map} $map - A map with new colors.\\n * @see $_ck-colors\\n */\\n/**\\n * A visual style of element\\'s inner shadow (i.e. input).\\n */\\n/**\\n * A visual style of element\\'s drop shadow (i.e. panel).\\n */\\n/**\\n * A helper to combine multiple shadows.\\n */\\n/**\\n * Gives an element a drop shadow so it looks like a floating panel.\\n */\\n/**\\n * A visual style of focused element\\'s outer shadow.\\n */\\n/**\\n * A visual style of focused element\\'s border or outline.\\n */\\n/**\\n * A class which indicates that an element holding it is disabled.\\n */\\n.ck-disabled {\\n opacity: .5; }\\n\\n/**\\n * A visual style of focused element\\'s border or outline.\\n */\\n/**\\n * Brings visual styling for :focus state.\\n */\\n.ck-widget.image figcaption {\\n background-color: #f7f7f7;\\n padding: 10px;\\n font-size: .8em;\\n color: #858585; }\\n .ck-widget.image figcaption:focus {\\n outline: none;\\n box-shadow: none; }\\n .ck-widget.image figcaption.focused {\\n outline: 1px solid #6ab5f9;\\n box-shadow: 2px 2px 3px #e6e6e6 inset;\\n background-color: white; }\\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'/**\\n * Default spacing value (\"unit\").\\n *\\n */\\n/**\\n * Internal map with default spacings.\\n *\\n * @type Map\\n * @see ck-spacing\\n */\\n/**\\n * Returns a spacing value with units for given name.\\n *\\n * @param {String} $spacing [ \\'standard\\' ] - Spacing level.\\n * @return {String}\\n * @see $ck-def-spacing\\n * @see $ck-def-spacings\\n */\\n.cke-text-alternative-form {\\n padding: 1.2em;\\n overflow: hidden; }\\n .cke-text-alternative-form .ck-label {\\n margin-bottom: 0.4em; }\\n .cke-text-alternative-form__actions {\\n clear: both;\\n padding-top: 1.2em; }\\n .cke-text-alternative-form__actions .ck-button {\\n float: right; }\\n .cke-text-alternative-form__actions .ck-button + .ck-button {\\n margin-right: 0.64em; }\\n .cke-text-alternative-form__actions .ck-button + .ck-button + .ck-button {\\n float: left; }\\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'.ck-widget {\\n margin: 10px 0;\\n padding: 0; }\\n .ck-widget.ck-widget_selected, .ck-widget.ck-widget_selected:hover {\\n outline: 2px solid #ace; }\\n .ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected {\\n outline: 2px solid #ddd; }\\n .ck-widget:hover {\\n outline: 2px solid yellow; }\\n\\n.image {\\n text-align: center;\\n clear: both; }\\n .image.image-style-side {\\n float: right;\\n margin-left: 0.8em;\\n max-width: 50%; }\\n\\n.image > img {\\n display: block;\\n margin: 0 auto;\\n max-width: 100%; }\\n',''])},function(r,o,u){o=r.exports=u(45)(),o.push([r.i,'/**\\n * Default spacing value (\"unit\").\\n *\\n */\\n/**\\n * Internal map with default spacings.\\n *\\n * @type Map\\n * @see ck-spacing\\n */\\n/**\\n * Returns a spacing value with units for given name.\\n *\\n * @param {String} $spacing [ \\'standard\\' ] - Spacing level.\\n * @return {String}\\n * @see $ck-def-spacing\\n * @see $ck-def-spacings\\n */\\n.ck-link-form {\\n padding: 1.2em;\\n overflow: hidden; }\\n .ck-link-form .ck-label {\\n margin-bottom: 0.4em; }\\n .ck-link-form__actions {\\n clear: both;\\n padding-top: 1.2em; }\\n .ck-link-form__actions .ck-button {\\n float: right; }\\n .ck-link-form__actions .ck-button + .ck-button {\\n margin-right: 0.64em; }\\n .ck-link-form__actions .ck-button + .ck-button + .ck-button {\\n float: left; }\\n',''])},function(r){r.exports='\\n\\n \\n bold\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n\\n \\n italic\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n'},function(r){r.exports='\\n'},function(r){r.exports='\\n'},function(r){r.exports='\\n\\n \\n link\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n\\n \\n unlink\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n\\n \\n bulletedlist\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n\\n \\n numberedlist\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n\\n \\n redo\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r){r.exports='\\n\\n \\n undo\\n Created with Sketch.\\n \\n \\n \\n \\n \\n \\n \\n \\n'},function(r,o,u){var s=u(506);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(507);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(508);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(509);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(510);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){var s=u(511);'string'==typeof s&&(s=[[r.i,s,'']]);u(58)(s,{});s.locals&&(r.exports=s.locals),!1},function(r,o,u){u(277),r.exports=u(278)}])});\n\n\n// WEBPACK FOOTER //\n// ckeditor.compat.js"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///../ckeditor5-engine/src/view/writer.js","webpack:///../ckeditor5-utils/src/uid.js","webpack:///../ckeditor5-utils/src/lib/lodash/rest.js","webpack:///../ckeditor5-engine/src/model/position.js","webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 643aff2caba87d8c5a39","webpack:///../ckeditor5-utils/src/ckeditorerror.js","webpack:///../ckeditor5-engine/src/model/range.js","webpack:///../ckeditor5-core/src/plugin.js","webpack:///../ckeditor5-utils/src/mix.js","webpack:///../ckeditor5-engine/src/model/element.js","webpack:///../ckeditor5-ui/src/template.js","webpack:///../ckeditor5-utils/src/emittermixin.js","webpack:///../ckeditor5-ui/src/view.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIteratee.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArray.js","webpack:///../ckeditor5-core/src/command/command.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/isObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/toInteger.js","webpack:///../ckeditor5-engine/src/model/batch.js","webpack:///../ckeditor5-engine/src/model/delta/deltafactory.js","webpack:///../ckeditor5-engine/src/model/writer.js","webpack:///../ckeditor5-utils/src/lib/lodash/last.js","webpack:///../ckeditor5-engine/src/model/delta/delta.js","webpack:///../ckeditor5-engine/src/view/element.js","webpack:///../ckeditor5-utils/src/keyboard.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseFlatten.js","webpack:///../ckeditor5-engine/src/model/text.js","webpack:///../ckeditor5-engine/src/view/position.js","webpack:///../ckeditor5-ui/src/button/buttonview.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayMap.js","webpack:///../ckeditor5-engine/src/model/operation/moveoperation.js","webpack:///../ckeditor5-engine/src/view/text.js","webpack:///../ckeditor5-utils/src/lib/lodash/_root.js","webpack:///../ckeditor5-utils/src/observablemixin.js","webpack:////workspace/ckeditor5/~/css-loader/lib/css-base.js","webpack:///../ckeditor5-engine/src/model/operation/operation.js","webpack:///../ckeditor5-engine/src/model/treewalker.js","webpack:///../ckeditor5-engine/src/view/range.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSlice.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isIndex.js","webpack:////workspace/ckeditor5/~/style-loader/addStyles.js","webpack:///../ckeditor5-engine/src/model/operation/insertoperation.js","webpack:///../ckeditor5-engine/src/model/operation/removeoperation.js","webpack:///../ckeditor5-engine/src/view/containerelement.js","webpack:///../ckeditor5-image/src/image/utils.js","webpack:///../ckeditor5-utils/src/isiterable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseUniq.js","webpack:///../ckeditor5-utils/src/lib/lodash/extend.js","webpack:///../ckeditor5-utils/src/lib/lodash/isObjectLike.js","webpack:///../ckeditor5-utils/src/lib/lodash/isSymbol.js","webpack:///../ckeditor5-utils/src/log.js","webpack:///../ckeditor5-engine/src/conversion/buildmodelconverter.js","webpack:///../ckeditor5-engine/src/conversion/buildviewconverter.js","webpack:///../ckeditor5-engine/src/model/documentfragment.js","webpack:///../ckeditor5-engine/src/view/observer/observer.js","webpack:///../ckeditor5-engine/src/view/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-utils/src/lib/lodash/eq.js","webpack:///../ckeditor5-engine/src/model/node.js","webpack:///../ckeditor5-engine/src/model/selection.js","webpack:///../ckeditor5-engine/src/model/textproxy.js","webpack:///../ckeditor5-engine/src/view/filler.js","webpack:///../ckeditor5-engine/src/view/observer/domeventobserver.js","webpack:///../ckeditor5-engine/src/view/selection.js","webpack:///../ckeditor5-utils/src/dom/global.js","webpack:///../ckeditor5-utils/src/focustracker.js","webpack:///../ckeditor5-utils/src/keystrokehandler.js","webpack:///../ckeditor5-utils/src/lib/lodash/_assignValue.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseDifference.js","webpack:///../ckeditor5-utils/src/lib/lodash/keys.js","webpack:///../ckeditor5-engine/src/model/nodelist.js","webpack:///../ckeditor5-engine/src/model/operation/attributeoperation.js","webpack:///../ckeditor5-engine/src/model/operation/nooperation.js","webpack:///../ckeditor5-engine/src/view/editableelement.js","webpack:///../ckeditor5-engine/src/view/node.js","webpack:///../ckeditor5-paragraph/src/paragraph.js","webpack:///../ckeditor5-utils/src/collection.js","webpack:///../ckeditor5-utils/src/dom/emittermixin.js","webpack:///../ckeditor5-utils/src/first.js","webpack:///../ckeditor5-utils/src/lib/lodash/_ListCache.js","webpack:///../ckeditor5-utils/src/lib/lodash/_SetCache.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayFilter.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayPush.js","webpack:///../ckeditor5-utils/src/lib/lodash/_assocIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSortedIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseWhile.js","webpack:///../ckeditor5-utils/src/lib/lodash/_castPath.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getMapData.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isHostObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isIterateeCall.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isPrototype.js","webpack:///../ckeditor5-utils/src/lib/lodash/_nativeCreate.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setToArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/clone.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArrayLike.js","webpack:///../ckeditor5-utils/src/lib/lodash/isLength.js","webpack:///../ckeditor5-utils/src/lib/lodash/isPlainObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/unzip.js","webpack:///../ckeditor5-widget/src/utils.js","webpack:///(webpack)/buildin/module.js","webpack:///../ckeditor5-core/src/command/helpers/getschemavalidranges.js","webpack:///../ckeditor5-engine/src/conversion/model-to-view-converters.js","webpack:///../ckeditor5-engine/src/model/delta/insertdelta.js","webpack:///../ckeditor5-engine/src/model/delta/mergedelta.js","webpack:///../ckeditor5-engine/src/model/delta/movedelta.js","webpack:///../ckeditor5-engine/src/model/delta/removedelta.js","webpack:///../ckeditor5-engine/src/model/delta/splitdelta.js","webpack:///../ckeditor5-engine/src/model/delta/transform.js","webpack:///../ckeditor5-engine/src/model/delta/unwrapdelta.js","webpack:///../ckeditor5-engine/src/model/delta/wrapdelta.js","webpack:///../ckeditor5-engine/src/model/liverange.js","webpack:///../ckeditor5-engine/src/model/operation/markeroperation.js","webpack:///../ckeditor5-engine/src/model/operation/reinsertoperation.js","webpack:///../ckeditor5-engine/src/model/operation/renameoperation.js","webpack:///../ckeditor5-engine/src/model/operation/rootattributeoperation.js","webpack:///../ckeditor5-engine/src/view/attributeelement.js","webpack:///../ckeditor5-engine/src/view/documentfragment.js","webpack:///../ckeditor5-engine/src/view/observer/domeventdata.js","webpack:///../ckeditor5-ui/src/focuscycler.js","webpack:///../ckeditor5-ui/src/viewcollection.js","webpack:///../ckeditor5-utils/src/lib/lodash/_MapCache.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Stack.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Symbol.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayIncludes.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayIncludesWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseGet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIntersection.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIsEqual.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseProperty.js","webpack:///../ckeditor5-utils/src/lib/lodash/_basePullAll.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSortedIndexBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseUnary.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseXor.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cacheHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_castArrayLikeObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneArrayBuffer.js","webpack:///../ckeditor5-utils/src/lib/lodash/_copyObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getPrototype.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getTag.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapToArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/debounce.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/isArguments.js","webpack:///../ckeditor5-utils/src/lib/lodash/isFunction.js","webpack:///../ckeditor5-utils/src/lib/lodash/isString.js","webpack:///../ckeditor5-utils/src/lib/lodash/pullAll.js","webpack:///../ckeditor5-utils/src/lib/lodash/unzipWith.js","webpack:///../ckeditor5-utils/src/tomap.js","webpack:///(webpack)/buildin/global.js","webpack:///../ckeditor5-basic-styles/src/boldengine.js","webpack:///../ckeditor5-basic-styles/src/italicengine.js","webpack:///../ckeditor5-core/src/command/helpers/isattributeallowedinselection.js","webpack:///../ckeditor5-core/src/command/toggleattributecommand.js","webpack:///../ckeditor5-engine/src/conversion/mapper.js","webpack:///../ckeditor5-engine/src/conversion/model-selection-to-view-converters.js","webpack:///../ckeditor5-engine/src/conversion/modelconversiondispatcher.js","webpack:///../ckeditor5-engine/src/dataprocessor/htmldataprocessor.js","webpack:///../ckeditor5-engine/src/model/delta/attributedelta.js","webpack:///../ckeditor5-engine/src/model/delta/renamedelta.js","webpack:///../ckeditor5-engine/src/model/delta/weakinsertdelta.js","webpack:///../ckeditor5-engine/src/model/liveposition.js","webpack:///../ckeditor5-engine/src/view/domconverter.js","webpack:///../ckeditor5-engine/src/view/emptyelement.js","webpack:///../ckeditor5-engine/src/view/matcher.js","webpack:///../ckeditor5-engine/src/view/observer/mutationobserver.js","webpack:///../ckeditor5-engine/src/view/rooteditableelement.js","webpack:///../ckeditor5-engine/src/view/uielement.js","webpack:///../ckeditor5-heading/src/headingengine.js","webpack:///../ckeditor5-image/src/image/imageengine.js","webpack:///../ckeditor5-image/src/image/ui/imageballoonpanelview.js","webpack:///../ckeditor5-image/src/imagetoolbar.js","webpack:///../ckeditor5-link/src/findlinkrange.js","webpack:///../ckeditor5-link/src/linkelement.js","webpack:///../ckeditor5-list/src/listengine.js","webpack:///../ckeditor5-typing/src/changebuffer.js","webpack:///../ckeditor5-ui/src/bindings/clickoutsidehandler.js","webpack:///../ckeditor5-ui/src/bindings/submithandler.js","webpack:///../ckeditor5-ui/src/inputtext/inputtextview.js","webpack:///../ckeditor5-ui/src/labeledinput/labeledinputview.js","webpack:///../ckeditor5-ui/src/panel/balloon/balloonpanelview.js","webpack:///../ckeditor5-ui/src/toolbar/toolbarview.js","webpack:///../ckeditor5-undo/src/basecommand.js","webpack:///../ckeditor5-utils/src/count.js","webpack:///../ckeditor5-utils/src/diff.js","webpack:///../ckeditor5-utils/src/dom/getancestors.js","webpack:///../ckeditor5-utils/src/dom/tounit.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Map.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Set.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Uint8Array.js","webpack:///../ckeditor5-utils/src/lib/lodash/_apply.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayReduce.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseClone.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseFindIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_basePullAt.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSortedUniq.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseTimes.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseZipObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_copyArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_equalArrays.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getSymbols.js","webpack:///../ckeditor5-utils/src/lib/lodash/_indexKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_indexOfNaN.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isStrictComparable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_matchesStrictComparable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_toSource.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/differenceBy.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/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/get.js","webpack:///../ckeditor5-utils/src/lib/lodash/identity.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/isNative.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/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/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/toNumber.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/zipObjectDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/zipWith.js","webpack:///../ckeditor5-utils/src/objecttomap.js","webpack:///../ckeditor5-utils/src/unicode.js","webpack:///../ckeditor5-widget/src/widgetengine.js","webpack:////workspace/ckeditor5/~/regenerator-runtime/runtime.js","webpack:///./ckeditor.js","webpack:////workspace/ckeditor5/~/process/browser.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/italic.js","webpack:///./config-editor.js","webpack:///../ckeditor5-clipboard/src/clipboard.js","webpack:///../ckeditor5-clipboard/src/clipboardobserver.js","webpack:///../ckeditor5-clipboard/src/datatransfer.js","webpack:///../ckeditor5-clipboard/src/utils/normalizeclipboarddata.js","webpack:///../ckeditor5-clipboard/src/utils/plaintexttohtml.js","webpack:///../ckeditor5-core/src/editingkeystrokehandler.js","webpack:///../ckeditor5-core/src/editor/editor.js","webpack:///../ckeditor5-core/src/editor/standardeditor.js","webpack:///../ckeditor5-core/src/plugincollection.js","webpack:///../ckeditor5-editor-classic/src/classic.js","webpack:///../ckeditor5-editor-classic/src/classiceditorui.js","webpack:///../ckeditor5-editor-classic/src/classiceditoruiview.js","webpack:///../ckeditor5-engine/src/controller/datacontroller.js","webpack:///../ckeditor5-engine/src/controller/deletecontent.js","webpack:///../ckeditor5-engine/src/controller/editingcontroller.js","webpack:///../ckeditor5-engine/src/controller/getselectedcontent.js","webpack:///../ckeditor5-engine/src/controller/insertcontent.js","webpack:///../ckeditor5-engine/src/controller/modifyselection.js","webpack:///../ckeditor5-engine/src/conversion/modelconsumable.js","webpack:///../ckeditor5-engine/src/conversion/view-selection-to-model-converters.js","webpack:///../ckeditor5-engine/src/conversion/view-to-model-converters.js","webpack:///../ckeditor5-engine/src/conversion/viewconsumable.js","webpack:///../ckeditor5-engine/src/conversion/viewconversiondispatcher.js","webpack:///../ckeditor5-engine/src/dataprocessor/basichtmlwriter.js","webpack:///../ckeditor5-engine/src/model/delta/basic-deltas.js","webpack:///../ckeditor5-engine/src/model/delta/basic-transformations.js","webpack:///../ckeditor5-engine/src/model/delta/markerdelta.js","webpack:///../ckeditor5-engine/src/model/document.js","webpack:///../ckeditor5-engine/src/model/history.js","webpack:///../ckeditor5-engine/src/model/liveselection.js","webpack:///../ckeditor5-engine/src/model/markercollection.js","webpack:///../ckeditor5-engine/src/model/operation/operationfactory.js","webpack:///../ckeditor5-engine/src/model/operation/transform.js","webpack:///../ckeditor5-engine/src/model/rootelement.js","webpack:///../ckeditor5-engine/src/model/schema.js","webpack:///../ckeditor5-engine/src/view/document.js","webpack:///../ckeditor5-engine/src/view/observer/clickobserver.js","webpack:///../ckeditor5-engine/src/view/observer/fakeselectionobserver.js","webpack:///../ckeditor5-engine/src/view/observer/focusobserver.js","webpack:///../ckeditor5-engine/src/view/observer/keyobserver.js","webpack:///../ckeditor5-engine/src/view/observer/mouseobserver.js","webpack:///../ckeditor5-engine/src/view/observer/selectionobserver.js","webpack:///../ckeditor5-engine/src/view/placeholder.js","webpack:///../ckeditor5-engine/src/view/renderer.js","webpack:///../ckeditor5-engine/src/view/textproxy.js","webpack:///../ckeditor5-enter/src/enter.js","webpack:///../ckeditor5-enter/src/entercommand.js","webpack:///../ckeditor5-enter/src/enterobserver.js","webpack:///../ckeditor5-heading/src/heading.js","webpack:///../ckeditor5-heading/src/headingcommand.js","webpack:///../ckeditor5-image/src/image.js","webpack:///../ckeditor5-image/src/image/converters.js","webpack:///../ckeditor5-image/src/imagecaption.js","webpack:///../ckeditor5-image/src/imagecaption/imagecaptionengine.js","webpack:///../ckeditor5-image/src/imagecaption/utils.js","webpack:///../ckeditor5-image/src/imagestyle.js","webpack:///../ckeditor5-image/src/imagestyle/converters.js","webpack:///../ckeditor5-image/src/imagestyle/imagestylecommand.js","webpack:///../ckeditor5-image/src/imagestyle/imagestyleengine.js","webpack:///../ckeditor5-image/src/imagetextalternative.js","webpack:///../ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js","webpack:///../ckeditor5-image/src/imagetextalternative/imagetextalternativeengine.js","webpack:///../ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js","webpack:///../ckeditor5-link/src/link.js","webpack:///../ckeditor5-link/src/linkcommand.js","webpack:///../ckeditor5-link/src/linkengine.js","webpack:///../ckeditor5-link/src/ui/linkformview.js","webpack:///../ckeditor5-link/src/unlinkcommand.js","webpack:///../ckeditor5-list/src/converters.js","webpack:///../ckeditor5-list/src/indentcommand.js","webpack:///../ckeditor5-list/src/list.js","webpack:///../ckeditor5-list/src/listcommand.js","webpack:///../ckeditor5-list/src/viewlistitemelement.js","webpack:///../ckeditor5-paragraph/src/paragraphcommand.js","webpack:///../ckeditor5-typing/src/delete.js","webpack:///../ckeditor5-typing/src/deletecommand.js","webpack:///../ckeditor5-typing/src/deleteobserver.js","webpack:///../ckeditor5-typing/src/input.js","webpack:///../ckeditor5-typing/src/inputcommand.js","webpack:///../ckeditor5-typing/src/typing.js","webpack:///../ckeditor5-ui/src/bindings/escpresshandler.js","webpack:///../ckeditor5-ui/src/componentfactory.js","webpack:///../ckeditor5-ui/src/dropdown/createdropdown.js","webpack:///../ckeditor5-ui/src/dropdown/dropdownpanelview.js","webpack:///../ckeditor5-ui/src/dropdown/dropdownview.js","webpack:///../ckeditor5-ui/src/dropdown/list/createlistdropdown.js","webpack:///../ckeditor5-ui/src/editableui/editableuiview.js","webpack:///../ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js","webpack:///../ckeditor5-ui/src/editorui/boxed/boxededitoruiview.js","webpack:///../ckeditor5-ui/src/editorui/editoruiview.js","webpack:///../ckeditor5-ui/src/icon/iconview.js","webpack:///../ckeditor5-ui/src/label/labelview.js","webpack:///../ckeditor5-ui/src/list/listitemview.js","webpack:///../ckeditor5-ui/src/list/listview.js","webpack:///../ckeditor5-ui/src/model.js","webpack:///../ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus.js","webpack:///../ckeditor5-ui/src/toolbar/sticky/stickytoolbarview.js","webpack:///../ckeditor5-ui/src/toolbar/toolbarseparatorview.js","webpack:///../ckeditor5-undo/src/redocommand.js","webpack:///../ckeditor5-undo/src/undo.js","webpack:///../ckeditor5-undo/src/undocommand.js","webpack:///../ckeditor5-undo/src/undoengine.js","webpack:///../ckeditor5-utils/src/config.js","webpack:///../ckeditor5-utils/src/difftochanges.js","webpack:///../ckeditor5-utils/src/dom/getcommonancestor.js","webpack:///../ckeditor5-utils/src/dom/getdatafromelement.js","webpack:///../ckeditor5-utils/src/dom/getpositionedancestor.js","webpack:///../ckeditor5-utils/src/dom/indexof.js","webpack:///../ckeditor5-utils/src/dom/insertat.js","webpack:///../ckeditor5-utils/src/dom/isrange.js","webpack:///../ckeditor5-utils/src/dom/position.js","webpack:///../ckeditor5-utils/src/dom/rect.js","webpack:///../ckeditor5-utils/src/dom/remove.js","webpack:///../ckeditor5-utils/src/dom/setdatainelement.js","webpack:///../ckeditor5-utils/src/elementreplacer.js","webpack:///../ckeditor5-utils/src/env.js","webpack:///../ckeditor5-utils/src/eventinfo.js","webpack:///../ckeditor5-utils/src/lib/lodash/_DataView.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Hash.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Promise.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Reflect.js","webpack:///../ckeditor5-utils/src/lib/lodash/_WeakMap.js","webpack:///../ckeditor5-utils/src/lib/lodash/_addMapEntry.js","webpack:///../ckeditor5-utils/src/lib/lodash/_addSetEntry.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayEach.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arraySome.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseAssign.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseAt.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseClamp.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseCreate.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseFill.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseGetAllKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseHasIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIndexOfWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIsEqualDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIsMatch.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseKeysIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseMatches.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseMatchesProperty.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseNth.js","webpack:///../ckeditor5-utils/src/lib/lodash/_basePropertyDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseToPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseToString.js","webpack:///../ckeditor5-utils/src/lib/lodash/_checkGlobal.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneBuffer.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneDataView.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneMap.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneRegExp.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneSymbol.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneTypedArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_compareAscending.js","webpack:///../ckeditor5-utils/src/lib/lodash/_copySymbols.js","webpack:///../ckeditor5-utils/src/lib/lodash/_createAssigner.js","webpack:///../ckeditor5-utils/src/lib/lodash/_createSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_createToPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/_equalByTag.js","webpack:///../ckeditor5-utils/src/lib/lodash/_equalObjects.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getAllKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getLength.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getMatchData.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hasPath.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/_initCloneArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_initCloneByTag.js","webpack:///../ckeditor5-utils/src/lib/lodash/_initCloneObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isFlattenable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isKeyable.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/_mapCacheClear.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapCacheDelete.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/_parent.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setCacheAdd.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setCacheHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setToPairs.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/_stringToPath.js","webpack:///../ckeditor5-utils/src/lib/lodash/array.default.js","webpack:///../ckeditor5-utils/src/lib/lodash/array.js","webpack:///../ckeditor5-utils/src/lib/lodash/assignIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/cloneDeepWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/constant.js","webpack:///../ckeditor5-utils/src/lib/lodash/hasIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/isBuffer.js","webpack:///../ckeditor5-utils/src/lib/lodash/isElement.js","webpack:///../ckeditor5-utils/src/lib/lodash/isEqual.js","webpack:///../ckeditor5-utils/src/lib/lodash/isTypedArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/keysIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/memoize.js","webpack:///../ckeditor5-utils/src/lib/lodash/noop.js","webpack:///../ckeditor5-utils/src/lib/lodash/now.js","webpack:///../ckeditor5-utils/src/lib/lodash/property.js","webpack:///../ckeditor5-utils/src/lib/lodash/throttle.js","webpack:///../ckeditor5-utils/src/lib/lodash/toFinite.js","webpack:///../ckeditor5-utils/src/lib/lodash/toLength.js","webpack:///../ckeditor5-utils/src/lib/lodash/toPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/toString.js","webpack:///../ckeditor5-utils/src/locale.js","webpack:///../ckeditor5-utils/src/mapsequal.js","webpack:///../ckeditor5-utils/src/priorities.js","webpack:///../ckeditor5-utils/src/spy.js","webpack:///../ckeditor5-utils/src/translation-service.js","webpack:///../ckeditor5-widget/src/widget.js","webpack:///../ckeditor5-editor-classic/theme/theme.scss","webpack:///../ckeditor5-engine/theme/placeholder.scss","webpack:///../ckeditor5-heading/theme/theme.scss","webpack:///../ckeditor5-image/theme/imagecaption/theme.scss","webpack:///../ckeditor5-image/theme/imagetextalternative/theme.scss","webpack:///../ckeditor5-image/theme/theme.scss","webpack:///../ckeditor5-link/theme/theme.scss","webpack:///../ckeditor5-widget/theme/theme.scss","webpack:///../ckeditor5-basic-styles/theme/icons/bold.svg","webpack:///../ckeditor5-basic-styles/theme/icons/italic.svg","webpack:///../ckeditor5-core/theme/icons/low-vision.svg","webpack:///../ckeditor5-core/theme/icons/object-center.svg","webpack:///../ckeditor5-core/theme/icons/object-right.svg","webpack:///../ckeditor5-link/theme/icons/link.svg","webpack:///../ckeditor5-link/theme/icons/unlink.svg","webpack:///../ckeditor5-list/theme/icons/bulletedlist.svg","webpack:///../ckeditor5-list/theme/icons/numberedlist.svg","webpack:///../ckeditor5-undo/theme/icons/redo.svg","webpack:///../ckeditor5-undo/theme/icons/undo.svg","webpack:///../ckeditor5-editor-classic/theme/theme.scss?d6ac","webpack:///../ckeditor5-engine/theme/placeholder.scss?16ad","webpack:///../ckeditor5-heading/theme/theme.scss?e0d9","webpack:///../ckeditor5-image/theme/imagecaption/theme.scss?17a3","webpack:///../ckeditor5-image/theme/imagetextalternative/theme.scss?d601","webpack:///../ckeditor5-image/theme/theme.scss?5c99","webpack:///../ckeditor5-link/theme/theme.scss?f520","webpack:///../ckeditor5-widget/theme/theme.scss?a6fb"],"names":[],"mappings":";;;;6BAglByB,OACxB,6BC9jBS,KAAK,eCZC,KAEhB,aCkT4C,KAAK,IC3TjD,cACA,8BACA,uCACA,8CACA,cACA,OACA,OACA,6DACA,EACA,CAAC,mBACD,kBCTA,cAMA,MACA,eAGA,mBACA,GACA,EACA,KAIA,mDAGA,KAGA,OACA,OAIA,IAzBA,iBA4BA,MAGA,iBAA2C,OAAc,EAGzD,qBACA,OACA,8BACA,CACA,gBACA,kBAGA,GAGA,iBACA,YACA,qBAA2B,UAA0B,UACrD,YAAiC,OAAe,EAChD,mBACA,GACA,CAGA,mBAAsD,+CAA+D,EAGrH,MAGA,0mBCvDA,uSAUqB,cAaE,eAAO,QAC5B,GACC,OAAW,IAAM,KAAK,UAKvB,mEAGA,aAAK,KAOL,kBAAK,KAAO,EACZ,CAED,YApBA,0CA0BwB,WACvB,OAAO,aACP,UAzCyC,iBAAtB,gLHJrB,mSANA,gBACA,eACA,eACA,cACA,kBAwBqB,YAOpB,CAAmB,eAAO,WACzB,GAAK,CAAC,EAAK,GAAI,YAAe,CAAC,EAAK,GAMnC,yBAAM,eAGP,0DAAK,EAAG,YAAgB,SAOvB,CAPkC,KAAK,YAOjC,eAAmB,wFAAyF,CAAE,KAIrH,MAAO,EAAK,UAAU,OACtB,KAAO,E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e,MAAiB,WAChC,SACA,OACA,OACA,OACA,OACA,MAAc,wBACd,KACA,mBAGA,gBAHgC,YAEhC,IAEA,OACA,GAEA,eACA,OACA,iBACA,MACA,mBACA,IAEA,+BAEA,2BAEA,sBALG,mBAMD,WACF,oCAEA,wBAEA,4EAEA,aACA,0BACA,mBACA,GACA,iBAEA,GAEA,aACA,8BACA,uBACA,eACA,GACA,EAEA,aACA,8BACA,qBACA,iBACA,GACA,EAEA,eACA,SAEA,iBACA,OACA,cACA,oBACA,sBACA,KAAE,QACF,WACA,wBACA,wCACA,wCACA,yBACA,6BACA,iBACA,eACA,GACA,KACA,4BACA,KAEA,QACA,iBACA,eACA,GACA,EAGA,YAEA,cACA,MACA,sDACA,UACA,WACA,EACA,KAEA,IACA,EAWA,mBACA,cAEA,SACA,oCACE,OACF,+BACA,OACA,iCACA,MACA,0BAEA,kBAEA,EACA,EAEA,eACA,SACA,QAEA,SACA,0BAGA,KACA,gCACE,MACF,QACA,4BAEA,kDACA,GACA,EAEA,eACA,SACA,QAEA,UAEA,OAAuD,6GAGvD,0BAA6B,MAE7B,iBAEA,gCAEA,GACA,uBACA,GAjPA,GACA,mBACA,IACA,oBACA,8CACA,YACA,CACA,CACA,gBACA,qDACA,cACA,iBACA,6DACA,EACA,KACA,OACA,OAEA,uBACA,+BACA,iDAGA,kEAGA,oDAGA,iDAEA,kBACA,cAEA,cACA,QACA,QAAgB,MAAmB,WACnC,SACA,SACA,MACA,cACA,EACA,MACA,SACA,OACA,EACA,WAAgB,QAAsB,OACtC,WACA,cACA,WAAkB,YAA2B,OAC7C,YACA,gBACA,GAEA,CACA,GA6HA,gBACA,IAEA,0BACA,aACA,yBACA,KACA,CAAC,4wBC7KD,mSATA,gBACA,cACA,eACA,eACA,eAEA,eACA,iBAOqB,cAQU,iBAAc,QAG3C,kEAMA,aAAK,SAAW,UAAS,mBAQzB,KAAK,MAAQ,cAAc,qBAAgB,IAC3C,CAED,YApBA,aA2BA,wBAKC,IAAM,GAAQ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AAQ,EAAc,MAAS,GAC3D,EACD,GACD,CANkB,aAQJ,yICxBf,iBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,iBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,iCAGE,SADa,QACN,UADM,QACG,SADH,QACW,aADX,QACuB,eACpC,yBAFa,QAEG,OAFH,QAES,YAFT,QAEoB,iBAFpB,QAEoC,YACjD,eAHa,QAGP,YAHO,QAGI,gBAHJ,QAGmB,QAHnB,QAG0B,UACvC,uBAJa,QAIA,gBAJA,QAIc,aAJd,QAIyB,QAJzB,QAI+B,WAC5C,mBALa,QAKJ,gBALI,QAKU,kBALV,QAK0B,oBAL1B,QAK4C,QACzD,gBANa,QAMP,eANO,QAMM,OANN,QAMW,QANX,QAMiB,WAC9B,qBAPa,QAOF,eAPE,QAOW,UAPX,QAOmB,UAPnB,QAO2B,WACxC,iBARa,QAQN,eARM,QAQO,iBARP,QAQsB,iBARtB,QAQqC,mBAClD,6BATa,QASM,qBATN,QASyB,cATzB,QASqC,gBATrC,QASmD,QAChE,gBAVa,QAUP,aAVO,QAUI,kBAVJ,QAUoB,aAVpB,QAU+B,SAC5C,mBAXa,QAWJ,aAXI,QAWO,QAXP,QAWa,UAXb,QAWqB,YAClC,iBAZa,QAYN,aAZM,QAYK,WAZL,QAYc,OAZd,QAYmB,SAChC,mBAba,QAaJ,OAbI,QAaC,aAbD,QAaY,iBAbZ,QAa2B,WAb3B,uOClEN,oGACA,mGACA,uGACA,yGACA,2GACA,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,cApMD,yBAIC,OAAO,GACP,kBAqMF,mBA3MqB,mBC5BrB,cAIA,MACA,YAA+5qB,u5qBAE/5qB,sBCPA,cAIA,MACA,YAA6H,wGAE7H,sBCPA,cAIA,MACA,YAAkkC,yiCAElkC,sBCPA,cAIA,MACA,YAAuxD,+wDAEvxD,sBCPA,cAIA,MACA,YAAo3B,+1BAEp3B,sBCPA,cAIA,MACA,YAAwT,mSAExT,sBCPA,cAIA,MACA,YAAsyB,ixBAEtyB,sBCPA,cAIA,MACA,YAAi5E,84EAEj5E,kBCPA,U,u+GCAA,U,4zECAA,UAA07H,06HCA17H,UAA+Y,iYCA/Y,UAA+gB,+fCA/gB,U,4rECAA,U,gqFCAA,U,29CCAA,U,o+ECAA,U,0yBCAA,U,uxBCEA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA,2BClBA,CACA,QACA,oCAEA,YACA,6BAaA","file":"ckeditor.compat.js","sourcesContent":["/**\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 TreeWalker from './treewalker';\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\tbreakViewRangePerContainer\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 * Breaks given `range` on a set of {@link module:engine/view/range~Range ranges}, that each are contained within a\n * {@link module:engine/view/containerelement~ContainerElement container element}. After `range` is broken, it's \"pieces\" can\n * be used by other {@link module:engine/view/writer~writer} methods (which expect that passed ranges are contained within\n * one container element).\n *\n * @function module:engine/view/writer~writer.breakViewRangePerContainer\n * @param {module:engine/view/range~Range} range Range to break.\n * @returns {Array.} Ranges that combine into passed `viewRange`.\n */\nexport function breakViewRangePerContainer( range ) {\n\tconst ranges = [];\n\tconst walker = new TreeWalker( { boundaries: range } );\n\n\tlet start = range.start;\n\n\tfor ( let value of walker ) {\n\t\tif ( value.item.is( 'containerElement' ) ) {\n\t\t\tif ( !start.isEqual( value.previousPosition ) ) {\n\t\t\t\tranges.push( new Range( start, value.previousPosition ) );\n\t\t\t}\n\n\t\t\tstart = value.nextPosition;\n\t\t}\n\t}\n\n\tranges.push( new Range( start, range.end ) );\n\n\treturn ranges;\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\t/**\n\t\t * Attribute element need to be instance of attribute element.\n\t\t *\n\t\t * @error view-writer-wrap-invalid-attribute\n\t\t */\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\t/**\n\t\t * Attribute element need to be instance of attribute element.\n\t\t *\n\t\t * @error view-writer-wrap-invalid-attribute\n\t\t */\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// 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 ( let 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 && attribute.priority <= child.priority ) ) {\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 ( let 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// 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// Two AttributeElements can be merged when there is no attribute or style conflicts between them.\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 ( let 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 ( let 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 ( let 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 ( let 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 ( let 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 ( let 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 ( let 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 ( let 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 ( let node of nodes ) {\n\t\tif ( !validNodesToInsert.some( ( validNode => node instanceof validNode ) ) ) {\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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/view/writer.js","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module utils/uid\n */\n\n/**\n * Returns a unique id. This id is a number (starting from 1) which will never get repeated on successive calls\n * to this method.\n *\n * @returns {String} A number representing the id.\n */\nexport default function uid() {\n\tlet uuid = 'e'; // Make sure that id does not start with number.\n\n\tfor ( let i = 0; i < 8; i++ ) {\n\t\tuuid += Math.floor( ( 1 + Math.random() ) * 0x10000 ).toString( 16 ).substring( 1 );\n\t}\n\n\treturn uuid;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/uid.js","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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/rest.js","/**\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 invalid.\n\t\t\t *\n\t\t\t * @error 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 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: 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 it the tree. Path is described through 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\tlet 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( { includeNode: 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\tlet cmp = compareArrays( this.path, position.path );\n\t\t// If comparison returned string it means that arrays are same.\n\t\tlet 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 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\tlet shifted = Position.createFromPosition( this );\n\n\t\tlet 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\tlet 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\tlet 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\tlet 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\tlet 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 position after root.\n\t\t\t *\n\t\t\t * @error 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 can not make 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 position before root.\n\t\t\t *\n\t\t\t * @error 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 can not make 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 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 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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/position.js","(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 {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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\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// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\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 = 534);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 643aff2caba87d8c5a39","/**\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 * 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\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\n// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/ckeditorerror.js","/**\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 start} and\n\t * {@link #end 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 start} position and\n\t * {@link #end end} position are in the same {@link module:engine/model/position~Position#parent 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 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 * @returns {Boolean} `true` if given {@link ~Range range} boundaries are contained by this range, `false` otherwise.\n\t */\n\tcontainsRange( otherRange ) {\n\t\treturn this.containsPosition( otherRange.start ) && this.containsPosition( otherRange.end );\n\t}\n\n\t/**\n\t * Two ranges are equal if their {@link #start start} and\n\t * {@link #end 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\tlet 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\tlet 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\tlet offset = this.end.path[ pos.path.length - 1 ];\n\t\t\tlet 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 ( let 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 ( let 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\tlet 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 ( let 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\tlet ranges = [ Range.createFromRange( this ) ];\n\n\t\tfor ( let delta of deltas ) {\n\t\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\t\tlet 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 rage, which should not be included in the result --\n\t\t// because it is already included in 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 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\tif ( deltaType == 'merge' && this.isCollapsed && ( this.start.isEqual( sourceRange.start ) || this.start.isEqual( sourceRange.end ) ) ) {\n\t\t\t\t// Collapsed range is in merged element.\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\treturn [ new Range( targetPosition.getShiftedBy( this.start.offset ) ) ];\n\t\t\t} else if ( type == 'move' ) {\n\t\t\t\t// In all examples `[]` is `this` and `{}` is `sourceRange`, while `^` is move target position.\n\t\t\t\t//\n\t\t\t\t// Example:\n\t\t\t\t//

    xx

    ^{

    a[b

    }

    c]d

    -->

    xx

    a[b

    c]d

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

    xx

    {

    a[b

    }

    c]d

    -->

    a[b

    xx

    c]d

    // Note

    xx

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

    a[b

    }
    ^

    c]d

    -->

    a[b

    c]d

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

    c[d

    {

    a]b

    }
    ^

    xx

    -->

    c[d

    a]b

    xx

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

    c[d

    {

    a]b

    }

    xx

    ^ -->

    c[d

    xx

    a]b

    // Note

    xx

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

    c[d

    ^{

    a]b

    }
    -->

    c[d

    a]b

    \n\t\t\t\tif ( sourceRange.containsPosition( this.end ) && this.containsPosition( sourceRange.start ) && this.start.isBefore( targetPosition ) ) {\n\t\t\t\t\tconst start = this.start._getTransformedByMove( sourcePosition, targetPosition, howMany, true, false );\n\t\t\t\t\tlet end = this.end._getCombined( sourcePosition, targetPosition._getTransformedByDeletion( sourcePosition, howMany ) );\n\n\t\t\t\t\treturn [ new Range( start, end ) ];\n\t\t\t\t}\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\tlet insertBeforeStart = range.isCollapsed ? true : !isSticky;\n\t\t\tlet 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 * 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.\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 ) => a.start.isAfter( b.start ) );\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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/range.js","/**\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 * @mixes module:utils/observablemixin~ObservaleMixin\n */\nexport default class Plugin {\n\t/**\n\t * Creates a new Plugin instance. This is the first step of a plugin initialization.\n\t * See also {@link #init} and {@link #afterInit}.\n\t *\n\t * A plugin is always instantiated after its {@link module:core/plugin~Plugin.requires dependencies} and the\n\t * {@link #init} and {@link #afterInit} methods are called in the same order.\n\t *\n\t * Usually, you'll want to put your plugin's initialization code in the {@link #init} method.\n\t * The constructor can be understood as \"before init\" and used in special cases, just like\n\t * {@link #afterInit} servers for the special \"after init\" scenarios (e.g. code which depends on other\n\t * plugins, but which doesn't {@link module:core/plugin~Plugin.requires explicitly require} them).\n\t *\n\t * @param {module:core/editor/editor~Editor} editor\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} module:core/plugin~Plugin#editor\n\t\t */\n\t\tthis.editor = editor;\n\t}\n\n\t/**\n\t * An array of plugins required by this plugin.\n\t *\n\t * To keep a plugin class definition tight it's recommended to define this property as a static getter:\n\t *\n\t *\t\timport Image from './image.js';\n\t *\n\t *\t\texport default class ImageCaption extends Plugin {\n *\t\t\tstatic get requires() {\n *\t\t\t\treturn [ Image ];\n *\t\t\t}\n\t *\t\t}\n\t *\n\t * @static\n\t * @member {Array.|undefined} module:core/plugin~Plugin.requires\n\t */\n\n\t/**\n\t * Optional name of the plugin. If set, the plugin will be available in\n\t * {@link module:core/plugincollection~PluginCollection#get} by its\n\t * name and its constructor. If not, then only by its constructor.\n\t *\n\t * The name should reflect the package name + path to that module. E.g. `ckeditor5-image/src/image.js` plugin\n\t * should be named `image/image` (the `ckeditor5-` prefix is stripped during compilation).\n\t *\n\t * To keep a plugin class definition tight it's recommended to define this property as a static getter:\n\t *\n\t *\t\texport default class ImageCaption {\n *\t\t\tstatic get pluginName() {\n *\t\t\t\treturn 'image/imagecaption';\n *\t\t\t}\n\t *\t\t}\n\t *\n\t * @static\n\t * @member {String|undefined} module:core/plugin~Plugin.pluginName\n\t */\n\n\t/**\n\t * The second stage (after plugin {@link #constructor}) of plugin initialization.\n\t * Unlike the plugin constructor this method can perform asynchronous.\n\t *\n\t * A plugin's `init()` method is called after its {@link module:core/plugin~Plugin.requires dependencies} are initialized,\n\t * so in the same order as constructors of these plugins.\n\t *\n\t * @returns {null|Promise}\n\t */\n\tinit() {}\n\n\t/**\n\t * The third (and last) stage of plugin initialization. See also {@link #constructor} and {@link #init}.\n\t *\n\t * @returns {null|Promise}\n\t */\n\tafterInit() {}\n\n\t/**\n\t * Destroys the plugin.\n\t *\n\t * @returns {null|Promise}\n\t */\n\tdestroy() {}\n}\n\nmix( Plugin, ObservableMixin );\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-core/src/plugin.js","/**\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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/mix.js","/**\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 same name and attributes as original element.\n\t * If clone is not deep, children of copied element are references to the same nodes as in original element.\n\t * If clone is deep, original element's children are also cloned.\n\t *\n\t * @param {Boolean} [deep=false] Decides whether children of this element should also be cloned (`true`) or not (`false`).\n\t */\n\tclone( deep = false ) {\n\t\tconst children = deep ?\n\t\t\tArray.from( this._children ).map( ( node ) => node.clone() ) :\n\t\t\tArray.from( this._children );\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 ( let node of nodes ) {\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 ( let 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;\n\n\t\tfor ( const index of relativePath ) {\n\t\t\tnode = node.getChild( 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\tlet 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 ( let 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 ( let 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 ).map( ( node ) => typeof node == 'string' ? new Text( node ) : node );\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/element.js","/**\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 Collection from '@ckeditor/ckeditor5-utils/src/collection';\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 DOM HTMLElement or Text from {@link module:ui/template~TemplateDefinition} and supports\n * element attributes, children, bindings to {@link module:utils/observablemixin~ObservableMixin} instances and DOM events\n * propagation. For example:\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\tchildren: [\n *\t\t\t\t'A paragraph.'\n *\t\t\t]\n *\t\t} ).render();\n *\n * will render the following HTMLElement:\n *\n *\t\t

    A paragraph.

    \n *\n * See {@link module:ui/template~TemplateDefinition} to know more about templates and complex 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 * Tag of this template, i.e. `div`, indicating that the instance will render\n\t\t * to an HTMLElement.\n\t\t *\n\t\t * @member {String} #tag\n\t\t */\n\n\t\t/**\n\t\t * Text of this template, indicating that the instance will render to a DOM Text.\n\t\t *\n\t\t * @member {Array.} #text\n\t\t */\n\n\t\t/**\n\t\t * Attributes of this template, i.e. `{ id: [ 'ck-id' ] }`, corresponding with\n\t\t * HTML attributes on HTMLElement.\n\t\t *\n\t\t * Note: Only 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 this template; sub–templates. Each one is an independent\n\t\t * instance of {@link ~Template}.\n\t\t *\n\t\t * Note: Only 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 this template.\n\t\t *\n\t\t * @member {Object} #eventListeners\n\t\t */\n\n\t\t/**\n\t\t * Data used by {@link #revert} method to restore a node\n\t\t * 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 (`HTMLElement` or `Text`) out of the template.\n\t *\n\t * @see #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 `HTMLElement` or `Text`.\n\t *\n\t * **Note:** No new DOM nodes (HTMLElement or Text) will be created. Applying extends attributes\n\t * ({@link module:ui/template~TemplateDefinition attributes}) and listeners ({@link module:ui/template~TemplateDefinition on}) only.\n\t *\n\t * **Note:** Existing \"class\" and \"style\" attributes are extended when a template\n\t * is applied to a Node, 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( observableInstance, emitterInstance );\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 observableInstance.\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: node,\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 cases, it's the same node\n\t * that {@link module:ui/template~Template#apply} has used.\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 allows binding DOM nodes to {@link module:utils/observablemixin~ObservableMixin}.\n\t * There are two types of bindings:\n\t *\n\t * * `HTMLElement` attributes or Text Node `textContent` can be synchronized with {@link module:utils/observablemixin~ObservableMixin}\n\t * instance attributes. See {@link module:ui/template~BindChain#to} and {@link module:ui/template~BindChain#if}.\n\t *\n\t * * DOM events fired on `HTMLElement` can be propagated through {@link module:utils/observablemixin~ObservableMixin}.\n\t * See {@link module:ui/template~BindChain#to}.\n\t *\n\t * @param {module:utils/observablemixin~ObservableMixin} observable An instance of ObservableMixin class.\n\t * @param {module:utils/emittermixin~EmitterMixin} emitter An instance of `Emitter` class. It listens\n\t * to `observable` attribute changes and DOM Events, depending on the binding. Usually {@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 {@link module:ui/template~Template} instance with additional content from {@link module:ui/template~TemplateDefinition}.\n\t *\n\t *\t\tconst bind = Template.bind( observable, emitterInstance );\n\t *\t\tconst instance = 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( instance, {\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( instance.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 `instance.render().outerHTML` 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 Existing Template instance to be extended.\n\t * @param {module:ui/template~TemplateDefinition} def An extension to existing an template instance.\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 #extend extending} works for the rendered element, perform it\n\t\t\t * 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 `HTMLElement` 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( 'ui-template-wrong-syntax: Node definition must have either \"tag\" or \"text\" when rendering new Node.' );\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 `HTMLElement` 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 `HTMLElement` 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 `style` attribute of an `HTMLElement` based on {@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 ( let 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 `HTMLElement` 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 ( let 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 ( let 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` listeners in the {@link module:ui/template~TemplateDefinition}\n\t * on a passed `HTMLElement`.\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 ( let 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 given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding} it activates the\n\t * binding and sets its initial value.\n\t *\n\t * Note: {@link module:ui/template~TemplateValueSchema} can be for HTMLElement attributes or 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 ( let 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 ( let 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 ( let 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 provides the attribute\n\t\t * with the value 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~EmitterMixin} instance used by the binding\n\t\t * to (either):\n\t\t *\n\t\t * * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n\t\t * * 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 attribute of {@link module:ui/template~TemplateBinding#observable} which is observed.\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 {@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, which is the value of {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}.\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 {@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 for the changes of {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}, which then updates the DOM with the aggregated\n\t * value of {@link module:ui/template~TemplateValueSchema}.\n\t *\n\t * For instance, the `class` attribute of the `Template` element can be be bound to\n\t * the observable `foo` attribute in `ObservableMixin` instance.\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 {@link module:utils/observablemixin~ObservableMixin}\n * * or a native DOM event binding\n *\n * created by {@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 Collection();\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 ( let 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 ( let 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 ( let 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 ( let 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( 'ui-template-extend-children-mismatch: The number of children in extended definition does not match.' );\n\t\t}\n\n\t\tlet childIndex = 0;\n\n\t\tfor ( let 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 {@link module:ui/template~Template}.\n * See: {@link module:ui/template~TemplateValueSchema}.\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\t...\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\t<{@link module:ui/view~View} instance>\n *\t\t\t\t<{@link module:ui/template~Template} instance>\n *\t\t\t\t...\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 *\t\t\t\t...\n *\t\t\t},\n *\t\t\ton: {\n *\t\t\t\t'click': {@link module:ui/template~TemplateListenerSchema}\n *\t\t\t\t'keyup@.some-class': {@link module:ui/template~TemplateListenerSchema},\n *\t\t\t\t...\n *\t\t\t}\n *\t\t} );\n *\n *\t\t// An entire view collection can be used as a child in the definition.\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tchildren: <{@link module:ui/viewcollection~ViewCollection} instance>\n *\t\t} );\n *\n * @typedef module:ui/template~TemplateDefinition\n * @type Object\n * @property {String} tag\n * @property {Array.} [children]\n * @property {Object.} [attributes]\n * @property {String|module:ui/template~TemplateValueSchema|Array.} [text]\n * @property {Object.} [on]\n */\n\n/**\n * Describes a value of HTMLElement attribute or `textContent`. See:\n * * {@link module:ui/template~TemplateDefinition},\n * * {@link module:ui/template~Template.bind},\n *\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\t// Plain String schema.\n *\t\t\t\tclass: 'static-text'\n *\n *\t\t\t\t// Object schema, an `ObservableMixin` binding.\n *\t\t\t\tclass: bind.to( 'foo' )\n *\n *\t\t\t\t// Array schema, combines the above.\n *\t\t\t\tclass: [\n *\t\t\t\t\t'static-text',\n *\t\t\t\t\tbind.to( 'bar', () => { ... } )\n *\t\t\t\t],\n *\n *\t\t\t\t// Array schema, with custom namespace.\n *\t\t\t\tclass: {\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// Object literal 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 * @typedef module:ui/template~TemplateValueSchema\n * @type {Object|String|Array}\n */\n\n/**\n * Describes a listener attached to HTMLElement. See: {@link module:ui/template~TemplateDefinition}.\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\ton: {\n *\t\t\t\t// Plain String schema.\n *\t\t\t\tclick: 'clicked'\n *\n *\t\t\t\t// Object schema, an `ObservableMixin` binding.\n *\t\t\t\tclick: {@link module:ui/template~TemplateBinding}\n *\n *\t\t\t\t// Array schema, combines the above.\n *\t\t\t\tclick: [\n *\t\t\t\t\t'clicked',\n *\t\t\t\t\t{@link module:ui/template~TemplateBinding}\n *\t\t\t\t],\n *\n *\t\t\t\t// Array schema, with custom callback.\n *\t\t\t\t// Note: It will work for \"click\" event on class=\".foo\" children only.\n *\t\t\t\t'click@.foo': {\n *\t\t\t\t\t'clicked',\n *\t\t\t\t\t{@link module:ui/template~TemplateBinding},\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 type of {@link ~Template.bind}'s return value.\n *\n * @interface module:ui/template~BindChain\n */\n\n/**\n * Binds {@link module:utils/observablemixin~ObservableMixin} instance to:\n *\n * * HTMLElement attribute or Text Node `textContent` so remains in sync with the Observable when it changes:\n * * HTMLElement DOM event, so the DOM events are propagated through Observable.\n *\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\t// class=\"...\" attribute gets bound to `observableInstance#a`\n *\t\t\t\t'class': bind.to( 'a' )\n *\t\t\t},\n *\t\t\tchildren: [\n *\t\t\t\t//

    ...

    gets bound to `observableInstance#b`; always `toUpperCase()`.\n *\t\t\t\t{ text: bind.to( 'b', ( value, node ) => value.toUpperCase() ) }\n *\t\t\t],\n *\t\t\ton: {\n *\t\t\t\tclick: [\n *\t\t\t\t\t// \"clicked\" event will be fired on `observableInstance` when \"click\" fires in DOM.\n *\t\t\t\t\tbind.to( 'clicked' ),\n *\n *\t\t\t\t\t// A custom callback function will be executed when \"click\" fires 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 *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t} ).render();\n *\n * @method #to\n * @param {String|Function} eventNameOrFunctionOrAttribute An attribute name of\n * {@link module:utils/observablemixin~ObservableMixin} 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 {@link module:utils/observablemixin~ObservableMixin} to HTMLElement attribute or Text Node `textContent`\n * so remains in sync with the Model when it changes. Unlike {@link module:ui/template~BindChain#to},\n * it controls the presence of the attribute/`textContent` depending on the \"falseness\" of\n * {@link module:utils/observablemixin~ObservableMixin} attribute.\n *\n *\t\tconst bind = Template.bind( observableInstance, emitterInstance );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'input',\n *\t\t\tattributes: {\n *\t\t\t\t// when `observableInstance#a` is not undefined/null/false/''\n *\t\t\t\t// when `observableInstance#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 `observableInstance#b` is undefined/null/false/''\n *\t\t\t\t\t// when `observableInstance#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 * @method #if\n * @param {String} attribute An attribute name of {@link module:utils/observablemixin~ObservableMixin} used in the binding.\n * @param {String} [valueIfTrue] Value set when {@link module:utils/observablemixin~ObservableMixin} attribute is not\n * undefined/null/false/''.\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// WEBPACK FOOTER //\n// ../ckeditor5-ui/src/template.js","/**\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. 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 *\t\tmyEmitter.fire( 'myGroup' ); // genericCallback is fired.\n\t *\t\tmyEmitter.fire( 'myGroup:myEvent' ); // both genericCallback and specificCallback are fired.\n\t *\t\tmyEmitter.fire( 'myGroup:foo' ); // genericCallback is fired even though there are no callbacks for \"foo\".\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: callback,\n\t\t\tcontext: options.context || this,\n\t\t\tpriority: priority\n\t\t};\n\n\t\t// Add the callback to all callbacks list.\n\t\tfor ( let 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 ) {\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.apply( this, arguments );\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 ( let 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 emitters, emitterId, 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\temitters = this[ _listeningTo ];\n\n\t\tif ( !_getEmitterId( emitter ) ) {\n\t\t\t_setEmitterId( emitter );\n\t\t}\n\n\t\temitterId = _getEmitterId( emitter );\n\n\t\tif ( !( emitterInfo = emitters[ emitterId ] ) ) {\n\t\t\temitterInfo = emitters[ emitterId ] = {\n\t\t\t\temitter: emitter,\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\tlet emitters = this[ _listeningTo ];\n\t\tlet emitterId = emitter && _getEmitterId( emitter );\n\t\tlet emitterInfo = emitters && emitterId && emitters[ emitterId ];\n\t\tlet 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 */\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\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 ( let eventName of events ) {\n\t\t\t\t\tlet 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 ( let 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\tlet 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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/emittermixin.js","/**\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 DomEmmiterMixin 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 * Basic View class.\n *\n *\t\tclass SampleView extends View {\n *\t\t\tconstructor( locale ) {\n *\t\t\t\tsuper( locale );\n *\n *\t\t\t\tthis.template = new Template( {\n *\t\t\t\t\ttag: 'p',\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: [\n *\t\t\t\t\t\t\t\t'world!'\n *\t\t\t\t\t\t\t]\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: 'foo'\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\tview.init().then( () => {\n *\t\t\t// Will append

    Helloworld

    \n *\t\t\tdocument.body.appendChild( view.element );\n *\t\t} );\n *\n * @mixes module:utils/dom/emittermixin~EmmiterMixin\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 * @param {module:utils/locale~Locale} [locale] The {@link module:core/editor/editor~Editor editor's locale} instance.\n\t */\n\tconstructor( locale ) {\n\t\t/**\n\t\t * A set of tools to localize the user interface. See {@link module:core/editor/editor~Editor}.\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 locale instance hasn't been passed to the view this method may not 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 * Set `true` after {@link #init}, which can be asynchronous.\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.\n\t\t *\n\t\t * @member {module:ui/template~Template} #template\n\t\t */\n\n\t\t/**\n\t\t * Element of this view.\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 module:ui/template~Template} binder object specific for this instance.\n\t\t * 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 * Element of this view. The element is rendered on first reference\n\t * using {@link #template} definition.\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\t/**\n\t * @type {HTMLElement}\n\t */\n\tset element( el ) {\n\t\tthis._element = el;\n\t}\n\n\t/**\n\t * Shorthand for {@link module:ui/template~Template.bind}, bound to {@link ~View} on the first access.\n\t *\n\t * Cached {@link module:ui/template~Template.bind} object is stored in {@link #_bindTemplate}.\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 in this view instance,\n\t * e.g. as a member of {@link module:ui/template~TemplateDefinition TemplateDefinition} children.\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 anotherView = new AnotherSampleView( locale );\n\t *\n\t *\t\tview.init().then( () => {\n\t *\t\t\t// Will append

    \n\t *\t\t\tdocument.body.appendChild( view.element );\n\t *\n\t *\t\t\t// `anotherView` becomes a child of the view, which is reflected in DOM\n\t *\t\t\t//

    \n\t *\t\t\tview.items.add( anotherView );\n\t *\t\t} );\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 this view instance. Once registered, a child\n\t * view is managed by its parent, including initialization ({@link #init})\n\t * and destruction ({@link #destroy}).\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 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().then( () => {\n\t *\t\t\t// Will append

    \n\t *\t\t\tdocument.body.appendChild( view.element );\n\t *\t\t} );\n\t *\n\t * **Note**: There's no need to add child views if they're used in the\n\t * {@link #template} explicitly:\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\tfor ( let child of children ) {\n\t\t\tthis._unboundChildren.add( child );\n\t\t}\n\t}\n\n\t/**\n\t * Initializes the view and child views located in {@link #_viewCollections}.\n\t *\n\t * @returns {Promise} A Promise resolved when the initialization process is finished.\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\treturn Promise.resolve()\n\t\t\t// Initialize collections in #_viewCollections.\n\t\t\t.then( () => {\n\t\t\t\treturn Promise.all( this._viewCollections.map( c => c.init() ) );\n\t\t\t} )\n\t\t\t// Spread the word that this view is ready!\n\t\t\t.then( () => {\n\t\t\t\tthis.ready = true;\n\t\t\t} );\n\t}\n\n\t/**\n\t * Destroys the view instance and child views located in {@link #_viewCollections}.\n\t *\n\t * @returns {Promise} A Promise resolved when the destruction process is finished.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\n\t\tconst promises = this._viewCollections.map( c => c.destroy() );\n\n\t\tthis._unboundChildren.clear();\n\t\tthis._viewCollections.clear();\n\n\t\tthis.element = this.template = this.locale = this.t =\n\t\t\tthis._viewCollections = this._unboundChildren = null;\n\n\t\treturn Promise.all( promises );\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 ( let 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, DomEmmiterMixin );\nmix( View, ObservableMixin );\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-ui/src/view.js","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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/_baseIteratee.js","/**\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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/isArray.js","/**\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/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 main way to manipulate editor contents and state. They are mostly used by UI elements (or by other\n * commands) to make changes in Tree Model. Commands are available in every part of code that has access to\n * {@link module:core/editor/editor~Editor} instance, since they are registered in it and executed through\n * {@link module:core/editor/editor~Editor#execute}.\n * Commands instances are available through {@link module:core/editor/editor~Editor#commands}.\n *\n * This is an abstract base class for all commands.\n *\n * @mixes module:utils/observablemixin~ObservaleMixin\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 * Editor on which this command will be used.\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\n\t\t/**\n\t\t * Flag indicating whether a command is enabled or disabled.\n\t\t * A disabled command should do nothing upon it's execution.\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// If schema checking function is specified, add it to the `refreshState` listeners.\n\t\t// Feature will be disabled if it does not apply to schema requirements.\n\t\tif ( this._checkEnabled ) {\n\t\t\tthis.on( 'refreshState', ( evt, data ) => {\n\t\t\t\tdata.isEnabled = this._checkEnabled();\n\t\t\t} );\n\t\t}\n\t}\n\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Fires `refreshState` event and checks it's resolve value to decide whether command should be enabled or not.\n\t * Other parts of code might listen to `refreshState` event on this command and add their callbacks. This\n\t * way the responsibility of deciding whether a command should be enabled is shared.\n\t *\n\t * @fires refreshState\n\t */\n\trefreshState() {\n\t\tconst data = { isEnabled: true };\n\t\tthis.fire( 'refreshState', data );\n\n\t\tthis.isEnabled = data.isEnabled;\n\t}\n\n\t/**\n\t * Executes the command if it is enabled.\n\t *\n\t * @protected\n\t * @param {*} param Parameter passed to {@link module:core/editor/editor~Editor#execute execute} method of this command.\n\t */\n\t_execute( param ) {\n\t\tif ( this.isEnabled ) {\n\t\t\tthis._doExecute( param );\n\t\t}\n\t}\n\n\t/**\n\t * Disables the command. This should be used only by the command itself. Other parts of code should add\n\t * listeners to `refreshState` event.\n\t *\n\t * @protected\n\t */\n\t_disable() {\n\t\tthis.on( 'refreshState', disableCallback );\n\t\tthis.refreshState();\n\t}\n\n\t/**\n\t * Enables the command (internally). This should be used only by the command itself. Command will be enabled if\n\t * other listeners does not return false on `refreshState` event callbacks. Firing {@link #_enable}\n\t * does not guarantee that {@link #isEnabled} will be set to true, as it depends on other listeners.\n\t *\n\t * @protected\n\t */\n\t_enable() {\n\t\tthis.off( 'refreshState', disableCallback );\n\t\tthis.refreshState();\n\t}\n\n\t/**\n\t * Executes command.\n\t * This is an abstract method that should be overwritten in child classes.\n\t *\n\t * @protected\n\t */\n\t_doExecute() {}\n\n\t/**\n\t * Checks if a command should be enabled according to its own rules. Mostly it will check schema to see if the command\n\t * is allowed to be executed in given position. This method can be defined in child class (but is not obligatory).\n\t * If it is defined, it will be added as a callback to `refreshState` event.\n\t *\n\t * @protected\n\t * @method #_checkEnabled\n\t * @returns {Boolean} `true` if command should be enabled according to\n\t * {@link module:engine/model/document~Document#schema}. `false` otherwise.\n\t */\n}\n\nfunction disableCallback( evt, data ) {\n\tdata.isEnabled = false;\n}\n\nmix( Command, ObservableMixin );\n\n/**\n * Fired whenever command has to have its {@link #isEnabled} property refreshed. Every feature,\n * command or other class which needs to disable command (set `isEnabled` to `false`) should listen to this\n * event.\n *\n * @event refreshState\n * @param {Object} data\n * @param {Boolean} [data.isEnabled=true]\n */\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-core/src/command/command.js","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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js","/**\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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/isObject.js","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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/toInteger.js","/**\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 ( let 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: name } );\n\t}\n\n\tBatch.prototype[ name ] = creator;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/batch.js","/**\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\tlet Delta = deserializers.get( json.__className );\n\n\t\tlet delta = new Delta();\n\n\t\tfor ( let operation of json.operations ) {\n\t\t\tdelta.addOperation( OperationFactory.fromJSON( operation, doc ) );\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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/delta/deltafactory.js","/**\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 that 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 that 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\t/* jshint validthis:true */\n\tif ( !sourceRange.isFlat ) {\n\t\t/**\n\t\t * Trying to move a range that 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 that 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 ( let 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\tlet 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\t/* jshint validthis:true */\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 ( let 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 ( let 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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/writer.js","/**\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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/last.js","/**\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 ( let 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\tlet delta = new this.constructor();\n\n\t\tfor ( let 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\tlet delta = new this._reverseDeltaClass();\n\n\t\tfor ( let 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\tlet 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\t/**\n\t * Delta priority. Used in {@link module:engine/model/delta/transform~transform delta transformations}. Delta with the higher\n\t * priority will be treated as more important when resolving transformation conflicts. If deltas have same\n\t * priority, other factors will be used to determine which delta is more important.\n\t *\n\t * @private\n\t * @type {Number}\n\t */\n\tstatic get _priority() {\n\t\treturn 0;\n\t}\n}\n\nDeltaFactory.register( Delta );\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/delta/delta.js","/**\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 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 ) {\n\t\tconst childrenClone = [];\n\n\t\tif ( deep ) {\n\t\t\tfor ( let 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\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 and sets\n\t * 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 ( let 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 ( let [ 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 ( let node of nodes ) {\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 ( let [ 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 ( let 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 ( let [ 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 ( let 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 ( let 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 ( let 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 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\tconst regex = /\\s*([^:;\\s]+)\\s*:\\s*([^;]+)\\s*(?=;|$)/g;\n\tlet matchStyle;\n\tstylesMap.clear();\n\n\twhile ( ( matchStyle = regex.exec( stylesString ) ) !== null ) {\n\t\tstylesMap.set( matchStyle[ 1 ], matchStyle[ 2 ].trim() );\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 ).map( ( node ) => typeof node == 'string' ? new Text( node ) : node );\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/view/element.js","/**\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\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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/keyboard.js","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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/_baseFlatten.js","/**\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\tlet 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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/text.js","/**\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\tlet shifted = Position.createFromPosition( this );\n\n\t\tlet 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( { includeNode: true } );\n\t\t}\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\tlet 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 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 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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/view/position.js","/**\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';\n\nimport { getEnvKeystrokeText } from '@ckeditor/ckeditor5-utils/src/keyboard';\n\n/**\n * The button view class.\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.\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 * 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\", e.g. some feature which it represents\n\t\t * is currently enabled.\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 (can be clicked).\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 * (Optional) Whether the label of the button is hidden (e.g. button with icon only).\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) Source of the icon. See {@link module:ui/icon/iconview~IconView#content}.\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 * Controls the `tabindex` attribute of the button.\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 * Icon of the button view.\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.if( '_tooltipString', 'ck-tooltip_s' ),\n\t\t\t\t\tbind.to( 'isEnabled', value => value ? 'ck-enabled' : 'ck-disabled' ),\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\t'data-ck-tooltip': [\n\t\t\t\t\tbind.to( '_tooltipString' )\n\t\t\t\t],\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],\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 is disabled.\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\tlet promise = Promise.resolve();\n\n\t\tif ( this.icon && !this.iconView ) {\n\t\t\tconst iconView = this.iconView = new IconView();\n\n\t\t\ticonView.bind( 'content' ).to( this, 'icon' );\n\n\t\t\tthis.element.insertBefore( iconView.element, this.element.firstChild );\n\n\t\t\t// Make sure the icon view will be destroyed along with button.\n\t\t\tpromise = promise.then( () => this.addChildren( iconView ) );\n\t\t}\n\n\t\treturn promise.then( () => super.init() );\n\t}\n\n\t/**\n\t * Focuses the button.\n\t */\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\n\t/**\n\t * Gets value for the `data-ck-tooltip` attribute 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 if ( tooltip === true ) {\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 false;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-ui/src/button/buttonview.js","/**\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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/_arrayMap.js","/**\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 */\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 * @inheritDoc\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\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 * @inheritDoc\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n\t */\n\tgetReversed() {\n\t\tlet 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\tlet sourceElement = this.sourcePosition.parent;\n\t\tlet targetElement = this.targetPosition.parent;\n\t\tlet sourceOffset = this.sourcePosition.offset;\n\t\tlet 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\tlet 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: range\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\tlet sourcePosition = Position.fromJSON( json.sourcePosition, document );\n\t\tlet 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// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/operation/moveoperation.js","/**\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/text\n */\n\nimport Node from './node';\n\n/**\n * Tree view text node.\n *\n * @extends module:engine/view/node~Node\n */\nexport default class Text extends Node {\n\t/**\n\t * Creates a tree view text node.\n\t *\n\t * @param {String} data Text.\n\t */\n\tconstructor( data ) {\n\t\tsuper();\n\n\t\t/**\n\t\t * The text content.\n\t\t *\n\t\t * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.\n\t\t *\n\t\t * @private\n\t\t * @member {String} module:engine/view/text~Text#_data\n\t\t */\n\t\tthis._data = data;\n\t}\n\n\t/**\n\t * Clones this node.\n\t *\n\t * @returns {module:engine/view/text~Text} Text node that is a clone of this node.\n\t */\n\tclone() {\n\t\treturn new Text( this.data );\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 * The text content.\n\t *\n\t * Setting the data fires the {@link module:engine/view/node~Node#event:change:text change event}.\n\t */\n\tget data() {\n\t\treturn this._data;\n\t}\n\n\tset data( data ) {\n\t\tthis._fireChange( 'text', this );\n\n\t\tthis._data = data;\n\t}\n\n\t/**\n\t * Checks if this text node is similar to other text node.\n\t * Both nodes should have the same data to be considered as similar.\n\t *\n\t * @param {module:engine/view/text~Text} otherNode Node to check if it is same as this node.\n\t * @returns {Boolean}\n\t */\n\tisSimilar( otherNode ) {\n\t\tif ( !( otherNode instanceof Text ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this === otherNode || this.data === otherNode.data;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/view/text.js","import checkGlobal from './_checkGlobal';\n\n/** Used to determine if values are of the language type `Object`. */\nvar objectTypes = {\n 'function': true,\n 'object': true\n};\n\n/** Detect free variable `exports`. */\nvar freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)\n ? exports\n : undefined;\n\n/** Detect free variable `module`. */\nvar freeModule = (objectTypes[typeof module] && module && !module.nodeType)\n ? module\n : undefined;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);\n\n/** Detect free variable `self`. */\nvar freeSelf = checkGlobal(objectTypes[typeof self] && self);\n\n/** Detect free variable `window`. */\nvar freeWindow = checkGlobal(objectTypes[typeof window] && window);\n\n/** Detect `this` as the global object. */\nvar thisGlobal = checkGlobal(objectTypes[typeof this] && this);\n\n/**\n * Used as a reference to the global object.\n *\n * The `this` value is used if it's the global object to avoid Greasemonkey's\n * restricted `window` object, otherwise the `window` object is used.\n */\nvar root = freeGlobal ||\n ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||\n freeSelf || thisGlobal || Function('return this')();\n\nexport default root;\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/_root.js","/**\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 * @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\t/* jshint validthis: true */\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 * @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// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/observablemixin.js","/*\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() {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\tvar result = [];\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar item = this[i];\n\t\t\tif(item[2]) {\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\n\t\t\t} else {\n\t\t\t\tresult.push(item[1]);\n\t\t\t}\n\t\t}\n\t\treturn result.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\n\n\n// WEBPACK FOOTER //\n// /workspace/ckeditor5/~/css-loader/lib/css-base.js","/**\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/operation\n */\n\nimport clone from '@ckeditor/ckeditor5-utils/src/lib/lodash/clone';\n\n/**\n * Abstract base operation class.\n *\n * @abstract\n */\nexport default class Operation {\n\t/**\n\t * Base operation constructor.\n\t * @param {Number} baseVersion {@link module:engine/model/document~Document#version} on which the operation can be applied.\n\t */\n\tconstructor( baseVersion ) {\n\t\t/**\n\t\t * {@link module:engine/model/document~Document#version} on which operation can be applied. If you try to\n\t\t * {@link module:engine/model/document~Document#applyOperation apply} operation with different base version than the\n\t\t * {@link module:engine/model/document~Document#version document version} the\n\t\t * {@link module:utils/ckeditorerror~CKEditorError model-document-applyOperation-wrong-version} error is thrown.\n\t\t *\n\t\t * @member {Number}\n\t\t */\n\t\tthis.baseVersion = baseVersion;\n\n\t\t/**\n\t\t * Operation type.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String} #type\n\t\t */\n\n\t\t/**\n\t\t * {@link module:engine/model/delta/delta~Delta Delta} which the operation is a part of. This property is set by the\n\t\t * {@link module:engine/model/delta/delta~Delta delta} when the operations is added to it by the\n\t\t * {@link module:engine/model/delta/delta~Delta#addOperation} method.\n\t\t *\n\t\t * @member {module:engine/model/delta/delta~Delta} #delta\n\t\t */\n\n\t\t/**\n\t\t * Creates and returns an operation that has the same parameters as this operation.\n\t\t *\n\t\t * @method #clone\n\t\t * @returns {module:engine/model/operation/operation~Operation} Clone of this operation.\n\t\t */\n\n\t\t/**\n\t\t * Creates and returns a reverse operation. Reverse operation when executed right after\n\t\t * the original operation will bring back tree model state to the point before the original\n\t\t * operation execution. In other words, it reverses changes done by the original operation.\n\t\t *\n\t\t * Keep in mind that tree model state may change since executing the original operation,\n\t\t * so reverse operation will be \"outdated\". In that case you will need to\n\t\t * {@link module:engine/model/operation/transform~transform} it by all operations that were executed after the original operation.\n\t\t *\n\t\t * @method #getReversed\n\t\t * @returns {module:engine/model/operation/operation~Operation} Reversed operation.\n\t\t */\n\n\t\t/**\n\t\t * Executes the operation - modifications described by the operation attributes\n\t\t * will be applied to the tree model.\n\t\t *\n\t\t * @protected\n\t\t * @method #_execute\n\t\t * @returns {Object} Object with additional information about the applied changes. It properties depends on the\n\t\t * operation type.\n\t\t */\n\t}\n\n\t/**\n\t * Custom toJSON method to solve child-parent circular dependencies.\n\t *\n\t * @method #toJSON\n\t * @returns {Object} Clone of this object with the delta property replaced with string.\n\t */\n\ttoJSON() {\n\t\tconst json = clone( this, true );\n\n\t\tjson.__className = this.constructor.className;\n\n\t\t// Remove parent delta to avoid circular dependencies.\n\t\tdelete json.delta;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Name of the operation class used for serialization.\n\t *\n\t * @type {String}\n\t */\n\tstatic get className() {\n\t\treturn 'engine.model.operation.Operation';\n\t}\n\n\t/**\n\t * Creates Operation 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} doc Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/operation~Operation}\n\t */\n\tstatic fromJSON( json ) {\n\t\treturn new this( json.baseVersion );\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/operation/operation.js","/**\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/treewalker\n */\n\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport Element from './element';\nimport Position from './position';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Position iterator class. It allows to iterate forward and backward over the document.\n */\nexport default class TreeWalker {\n\t/**\n\t * Creates a range iterator. All parameters are optional, but you have to specify either `boundaries` or `startPosition`.\n\t *\n\t * @constructor\n\t * @param {Object} [options={}] Object with configuration.\n\t * @param {'forward'|'backward'} [options.direction='forward'] Walking direction.\n\t * @param {module:engine/model/range~Range} [options.boundaries=null] Range to define boundaries of the iterator.\n\t * @param {module:engine/model/position~Position} [options.startPosition] Starting position.\n\t * @param {Boolean} [options.singleCharacters=false] Flag indicating whether all consecutive characters with the same attributes\n\t * should be returned one by one as multiple {@link module:engine/model/textproxy~TextProxy} (`true`) objects or as one\n\t * {@link module:engine/model/textproxy~TextProxy} (`false`).\n\t * @param {Boolean} [options.shallow=false] Flag indicating whether iterator should enter elements or not. If the\n\t * iterator is shallow child nodes of any iterated node will not be returned along with `elementEnd` tag.\n\t * @param {Boolean} [options.ignoreElementEnd=false] Flag indicating whether iterator should ignore `elementEnd`\n\t * tags. If the option is true walker will not return a parent node of start position. If this option is `true`\n\t * each {@link module:engine/model/element~Element} will be returned once, while if the option is `false` they might be returned\n\t * twice: for `'elementStart'` and `'elementEnd'`.\n\t */\n\tconstructor( options = {} ) {\n\t\tif ( !options.boundaries && !options.startPosition ) {\n\t\t\t/**\n\t\t\t * Neither boundaries nor starting position have been defined.\n\t\t\t *\n\t\t\t * @error tree-walker-no-start-position\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.' );\n\t\t}\n\n\t\tconst direction = options.direction || 'forward';\n\n\t\tif ( direction != 'forward' && direction != 'backward' ) {\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',\n\t\t\t\t{ direction }\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Walking direction. Defaults `'forward'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {'backward'|'forward'} module:engine/model/treewalker~TreeWalker#direction\n\t\t */\n\t\tthis.direction = direction;\n\n\t\t/**\n\t\t * Iterator boundaries.\n\t\t *\n\t\t * When the iterator is walking `'forward'` on the end of boundary or is walking `'backward'`\n\t\t * on the start of boundary, then `{ done: true }` is returned.\n\t\t *\n\t\t * If boundaries are not defined they are set before first and after last child of the root node.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/range~Range} module:engine/model/treewalker~TreeWalker#boundaries\n\t\t */\n\t\tthis.boundaries = options.boundaries || null;\n\n\t\t/**\n\t\t * Iterator position. This is always static position, even if the initial position was a\n\t\t * {@link module:engine/model/liveposition~LivePosition live position}. If start position is not defined then position depends\n\t\t * on {@link #direction}. If direction is `'forward'` position starts form the beginning, when direction\n\t\t * is `'backward'` position starts from the end.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position} module:engine/model/treewalker~TreeWalker#position\n\t\t */\n\t\tif ( options.startPosition ) {\n\t\t\tthis.position = Position.createFromPosition( options.startPosition );\n\t\t} else {\n\t\t\tthis.position = Position.createFromPosition( this.boundaries[ this.direction == 'backward' ? 'end' : 'start' ] );\n\t\t}\n\n\t\t/**\n\t\t * Flag indicating whether all consecutive characters with the same attributes should be\n\t\t * returned as one {@link module:engine/model/textproxy~TextProxy} (`true`) or one by one (`false`).\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/model/treewalker~TreeWalker#singleCharacters\n\t\t */\n\t\tthis.singleCharacters = !!options.singleCharacters;\n\n\t\t/**\n\t\t * Flag indicating whether iterator should enter elements or not. If the iterator is shallow child nodes of any\n\t\t * iterated node will not be returned along with `elementEnd` tag.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/model/treewalker~TreeWalker#shallow\n\t\t */\n\t\tthis.shallow = !!options.shallow;\n\n\t\t/**\n\t\t * Flag indicating whether iterator should ignore `elementEnd` tags. If the option is true walker will not\n\t\t * return a parent node of the start position. If this option is `true` each {@link module:engine/model/element~Element} will\n\t\t * be returned once, while if the option is `false` they might be returned twice:\n\t\t * for `'elementStart'` and `'elementEnd'`.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Boolean} module:engine/model/treewalker~TreeWalker#ignoreElementEnd\n\t\t */\n\t\tthis.ignoreElementEnd = !!options.ignoreElementEnd;\n\n\t\t/**\n\t\t * Start boundary cached for optimization purposes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/element~Element} module:engine/model/treewalker~TreeWalker#_boundaryStartParent\n\t\t */\n\t\tthis._boundaryStartParent = this.boundaries ? this.boundaries.start.parent : null;\n\n\t\t/**\n\t\t * End boundary cached for optimization purposes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/element~Element} module:engine/model/treewalker~TreeWalker#_boundaryEndParent\n\t\t */\n\t\tthis._boundaryEndParent = this.boundaries ? this.boundaries.end.parent : null;\n\n\t\t/**\n\t\t * Parent of the most recently visited node. Cached for optimization purposes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t\t * module:engine/model/treewalker~TreeWalker#_visitedParent\n\t\t */\n\t\tthis._visitedParent = this.position.parent;\n\t}\n\n\t/**\n\t * Iterator interface.\n\t */\n\t[ Symbol.iterator ]() {\n\t\treturn this;\n\t}\n\n\t/**\n\t * Moves {@link #position} in the {@link #direction} skipping values as long as the callback function returns `true`.\n\t *\n\t * For example:\n\t *\n\t * \t\twalker.skip( value => value.type == 'text' ); // []foo -> foo[]\n\t * \t\twalker.skip( () => true ); // Move the position to the end: []foo -> foo[]\n\t * \t\twalker.skip( () => false ); // 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 */\n\tskip( skip ) {\n\t\tlet done, value, prevPosition, prevVisitedParent;\n\n\t\tdo {\n\t\t\tprevPosition = this.position;\n\t\t\tprevVisitedParent = this._visitedParent;\n\n\t\t\t( { done, value } = this.next() );\n\t\t} while ( !done && skip( value ) );\n\n\t\tif ( !done ) {\n\t\t\tthis.position = prevPosition;\n\t\t\tthis._visitedParent = prevVisitedParent;\n\t\t}\n\t}\n\n\t/**\n\t * Iterator interface method.\n\t * Detects walking direction and makes step forward or backward.\n\t *\n\t * @returns {Object} Object implementing iterator interface, returning information about taken step.\n\t */\n\tnext() {\n\t\tif ( this.direction == 'forward' ) {\n\t\t\treturn this._next();\n\t\t} else {\n\t\t\treturn this._previous();\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step forward in model. Moves the {@link #position} to the next position and returns the encountered value.\n\t *\n\t * @private\n\t * @returns {Object}\n\t * @returns {Boolean} return.done True if iterator is done.\n\t * @returns {module:engine/model/treewalker~TreeWalkerValue} return.value Information about taken step.\n\t */\n\t_next() {\n\t\tconst previousPosition = this.position;\n\t\tconst position = Position.createFromPosition( this.position );\n\t\tconst parent = this._visitedParent;\n\n\t\t// We are at the end of the root.\n\t\tif ( parent.parent === null && position.offset === parent.maxOffset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent === this._boundaryEndParent && position.offset == this.boundaries.end.offset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\tconst node = position.textNode ? position.textNode : position.nodeAfter;\n\n\t\tif ( node instanceof Element ) {\n\t\t\tif ( !this.shallow ) {\n\t\t\t\t// Manual operations on path internals for optimization purposes. Here and in the rest of the method.\n\t\t\t\tposition.path.push( 0 );\n\t\t\t\tthis._visitedParent = node;\n\t\t\t} else {\n\t\t\t\tposition.offset++;\n\t\t\t}\n\n\t\t\tthis.position = position;\n\n\t\t\treturn formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t} else if ( node instanceof Text ) {\n\t\t\tlet charactersCount, offsetInTextNode;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tcharactersCount = 1;\n\t\t\t} else {\n\t\t\t\tlet offset = node.endOffset;\n\n\t\t\t\tif ( this._boundaryEndParent == parent && this.boundaries.end.offset < offset ) {\n\t\t\t\t\toffset = this.boundaries.end.offset;\n\t\t\t\t}\n\n\t\t\t\tcharactersCount = offset - position.offset;\n\t\t\t}\n\n\t\t\toffsetInTextNode = position.offset - node.startOffset;\n\n\t\t\tconst item = new TextProxy( node, offsetInTextNode, charactersCount );\n\n\t\t\tposition.offset += charactersCount;\n\t\t\tthis.position = position;\n\n\t\t\treturn formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t} else {\n\t\t\t// `node` is not set, we reached the end of current `parent`.\n\t\t\tposition.path.pop();\n\t\t\tposition.offset++;\n\t\t\tthis.position = position;\n\t\t\tthis._visitedParent = parent.parent;\n\n\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\treturn this._next();\n\t\t\t} else {\n\t\t\t\treturn formatReturnValue( 'elementEnd', parent, previousPosition, position );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Makes a step backward in model. Moves the {@link #position} to the previous position and returns the encountered value.\n\t *\n\t * @private\n\t * @returns {Object}\n\t * @returns {Boolean} return.done True if iterator is done.\n\t * @returns {module:engine/model/treewalker~TreeWalkerValue} return.value Information about taken step.\n\t */\n\t_previous() {\n\t\tconst previousPosition = this.position;\n\t\tconst position = Position.createFromPosition( this.position );\n\t\tconst parent = this._visitedParent;\n\n\t\t// We are at the beginning of the root.\n\t\tif ( parent.parent === null && position.offset === 0 ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// We reached the walker boundary.\n\t\tif ( parent == this._boundaryStartParent && position.offset == this.boundaries.start.offset ) {\n\t\t\treturn { done: true };\n\t\t}\n\n\t\t// Get node just before current position\n\t\tconst node = position.textNode ? position.textNode : position.nodeBefore;\n\n\t\tif ( node instanceof Element ) {\n\t\t\tposition.offset--;\n\n\t\t\tif ( !this.shallow ) {\n\t\t\t\tposition.path.push( node.maxOffset );\n\t\t\t\tthis.position = position;\n\t\t\t\tthis._visitedParent = node;\n\n\t\t\t\tif ( this.ignoreElementEnd ) {\n\t\t\t\t\treturn this._previous();\n\t\t\t\t} else {\n\t\t\t\t\treturn formatReturnValue( 'elementEnd', node, previousPosition, position );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.position = position;\n\n\t\t\t\treturn formatReturnValue( 'elementStart', node, previousPosition, position, 1 );\n\t\t\t}\n\t\t} else if ( node instanceof Text ) {\n\t\t\tlet charactersCount, offsetInTextNode;\n\n\t\t\tif ( this.singleCharacters ) {\n\t\t\t\tcharactersCount = 1;\n\t\t\t} else {\n\t\t\t\tlet offset = node.startOffset;\n\n\t\t\t\tif ( this._boundaryStartParent == parent && this.boundaries.start.offset > offset ) {\n\t\t\t\t\toffset = this.boundaries.start.offset;\n\t\t\t\t}\n\n\t\t\t\tcharactersCount = position.offset - offset;\n\t\t\t}\n\n\t\t\toffsetInTextNode = position.offset - node.startOffset;\n\n\t\t\tconst item = new TextProxy( node, offsetInTextNode - charactersCount, charactersCount );\n\n\t\t\tposition.offset -= charactersCount;\n\t\t\tthis.position = position;\n\n\t\t\treturn formatReturnValue( 'text', item, previousPosition, position, charactersCount );\n\t\t} else {\n\t\t\t// `node` is not set, we reached the beginning of current `parent`.\n\t\t\tposition.path.pop();\n\t\t\tthis.position = position;\n\t\t\tthis._visitedParent = parent.parent;\n\n\t\t\treturn formatReturnValue( 'elementStart', parent, previousPosition, position, 1 );\n\t\t}\n\t}\n}\n\nfunction formatReturnValue( type, item, previousPosition, nextPosition, length ) {\n\treturn {\n\t\tdone: false,\n\t\tvalue: {\n\t\t\ttype: type,\n\t\t\titem: item,\n\t\t\tpreviousPosition: previousPosition,\n\t\t\tnextPosition: nextPosition,\n\t\t\tlength: length\n\t\t}\n\t};\n}\n\n/**\n * Type of the step made by {@link module:engine/model/treewalker~TreeWalker}.\n * Possible values: `'elementStart'` if walker is at the beginning of a node, `'elementEnd'` if walker is at the end of node,\n * `'character'` if walker traversed over a character, or `'text'` if walker traversed over multiple characters (available in\n * character merging mode, see {@link module:engine/model/treewalker~TreeWalker#constructor}).\n *\n * @typedef {'elementStart'|'elementEnd'|'character'|'text'} module:engine/model/treewalker~TreeWalkerValueType\n */\n\n/**\n * Object returned by {@link module:engine/model/treewalker~TreeWalker} when traversing tree model.\n *\n * @typedef {Object} module:engine/model/treewalker~TreeWalkerValue\n * @property {module:engine/model/treewalker~TreeWalkerValueType} type\n * @property {module:engine/model/item~Item} item Item between old and new positions of {@link module:engine/model/treewalker~TreeWalker}.\n * @property {module:engine/model/position~Position} previousPosition Previous position of the iterator.\n * * Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the\n * position before the item. Note that it is more efficient to use this position then calculate the position before\n * the node using {@link module:engine/model/position~Position.createBefore}. It is also more efficient to get the\n * position after node by shifting `previousPosition` by `length`, using {@link module:engine/model/position~Position#getShiftedBy},\n * then calculate the position using {@link module:engine/model/position~Position.createAfter}.\n * * Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after item.\n * @property {module:engine/model/position~Position} nextPosition Next position of the iterator.\n * * Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is\n * the position after the item.\n * * Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position\n * before the item.\n * @property {Number} [length] Length of the item. For `'elementStart'` and `'character'` it is 1. For `'text'` it is\n * the length of the text. For `'elementEnd'` it is undefined.\n */\n\n/**\n * Tree walking directions.\n *\n * @typedef {'forward'|'backward'} module:engine/view/treewalker~TreeWalkerDirection\n */\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/model/treewalker.js","/**\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/range\n */\n\nimport Position from './position';\nimport TreeWalker from './treewalker';\n\n/**\n * Tree view range.\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/view/position~Position} instances basing on passed values.\n\t *\n\t * @param {module:engine/view/position~Position} start Start position.\n\t * @param {module:engine/view/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 * @member {module:engine/view/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 * @member {module:engine/view/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/view/item~Item view items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/view/position~Position positions},\n\t * grouped as {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * This iterator uses {@link module:engine/view/treewalker~TreeWalker TreeWalker} with `boundaries` set to this range and\n\t * `ignoreElementEnd` option\n\t * 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 it start and 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 module:engine/view/range~Range#start start} position and\n\t * {@link module:engine/view/range~Range#end end} position are in the same {@link module:engine/view/position~Position#parent 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/view/element~Element|module:engine/view/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.start.root;\n\t}\n\n\t/**\n\t * Creates a maximal range that has the same content as this range but is expanded in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t * \t\t

    Foo

    {Bar}

    ->

    Foo

    [

    Bar]

    \n\t * \t\t

    foo{bar}

    ->

    foo[bar]

    \n\t *\n\t * Note that in the sample above:\n\t * - `

    ` have type of {@link module:engine/view/containerelement~ContainerElement},\n\t * - `` have type of {@link module:engine/view/attributeelement~AttributeElement},\n\t * - `` have type of {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * @returns {module:engine/view/range~Range} Enlarged range.\n\t */\n\tgetEnlarged() {\n\t\tlet start = this.start.getLastMatchingPosition( enlargeShrinkSkip, { direction: 'backward' } );\n\t\tlet end = this.end.getLastMatchingPosition( enlargeShrinkSkip );\n\n\t\t// Fix positions, in case if they are in Text node.\n\t\tif ( start.parent.is( 'text' ) && start.isAtStart ) {\n\t\t\tstart = Position.createBefore( start.parent );\n\t\t}\n\n\t\tif ( end.parent.is( 'text' ) && end.isAtEnd ) {\n\t\t\tend = Position.createAfter( end.parent );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Creates a minimum range that has the same content as this range but is trimmed in both ways (at the beginning\n\t * and at the end).\n\t *\n\t * For example:\n\t *\n\t * \t\t

    Foo

    [

    Bar]

    ->

    Foo

    {Bar}

    \n\t * \t\t

    foo[bar]

    ->

    foo{bar}

    \n\t *\n\t * Note that in the sample above:\n\t * - `

    ` have type of {@link module:engine/view/containerelement~ContainerElement},\n\t * - `` have type of {@link module:engine/view/attributeelement~AttributeElement},\n\t * - `` have type of {@link module:engine/view/uielement~UIElement}.\n\t *\n\t * @returns {module:engine/view/range~Range} Shrink range.\n\t */\n\tgetTrimmed() {\n\t\tlet start = this.start.getLastMatchingPosition( enlargeShrinkSkip );\n\t\tlet end = this.end.getLastMatchingPosition( enlargeShrinkSkip, { direction: 'backward' } );\n\t\tlet nodeAfterStart = start.nodeAfter;\n\t\tlet nodeBeforeEnd = end.nodeBefore;\n\n\t\t// Because TreeWalker prefers positions next to text node, we need to move them manually into these text nodes.\n\t\tif ( nodeAfterStart && nodeAfterStart.is( 'text' ) ) {\n\t\t\tstart = new Position( nodeAfterStart, 0 );\n\t\t}\n\n\t\tif ( nodeBeforeEnd && nodeBeforeEnd.is( 'text' ) ) {\n\t\t\tend = new Position( nodeBeforeEnd, nodeBeforeEnd.data.length );\n\t\t}\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Two ranges are equal if their start and end positions are equal.\n\t *\n\t * @param {module:engine/view/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 == otherRange || ( this.start.isEqual( otherRange.start ) && this.end.isEqual( otherRange.end ) );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/view/position~Position position}.\n\t *\n\t * @param {module:engine/view/position~Position} position Position to check.\n\t * @returns {Boolean} `true` if given {@link module:engine/view/position~Position position} is contained 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 module:engine/view/range~Range range}.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to check.\n\t * @returns {Boolean} `true` if given {@link module:engine/view/range~Range range} boundaries are contained by this range, `false`\n\t * otherwise.\n\t */\n\tcontainsRange( otherRange ) {\n\t\treturn this.containsPosition( otherRange.start ) && this.containsPosition( otherRange.end );\n\t}\n\n\t/**\n\t * Computes which part(s) of this {@link module:engine/view/range~Range range} is not a part of given\n\t * {@link module:engine/view/range~Range range}.\n\t * Returned array contains zero, one or two {@link module:engine/view/range~Range ranges}.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet foo = new Text( 'foo' );\n\t *\t\tlet img = new ContainerElement( 'img' );\n\t *\t\tlet bar = new Text( 'bar' );\n\t *\t\tlet p = new ContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t *\t\tlet range = new Range( new Position( foo, 2 ), new Position( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t *\t\tlet otherRange = new Range( new Position( foo, 1 ), new Position( bar, 2 ); \"oo\", img, \"ba\" are in range.\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( foo, 1 ), new Position( p, 2 ); // \"oo\", img are in range.\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has one range: from ( p, 2 ) to ( bar, 1 )\n\t *\n\t *\t\totherRange = new Range( new Position( p, 1 ), new Position( p, 2 ) ); // img is in range.\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has two ranges: from ( foo, 1 ) to ( p, 1 ) and from ( p, 2 ) to ( bar, 1 )\n\t *\n\t * @param {module:engine/view/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 module:engine/view/range~Range range} and given {@link module:engine/view/range~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 foo = new Text( 'foo' );\n\t *\t\tlet img = new ContainerElement( 'img' );\n\t *\t\tlet bar = new Text( 'bar' );\n\t *\t\tlet p = new ContainerElement( 'p', null, [ foo, img, bar ] );\n\t *\n\t *\t\tlet range = new Range( new Position( foo, 2 ), new Position( bar, 1 ); // \"o\", img, \"b\" are in range.\n\t *\t\tlet otherRange = new Range( new Position( foo, 1 ), new Position( p, 2 ); // \"oo\", img are in range.\n\t *\t\tlet transformed = range.getIntersection( otherRange ); // range from ( foo, 1 ) to ( p, 2 ).\n\t *\n\t *\t\totherRange = new Range( new Position( bar, 1 ), new Position( bar, 3 ); \"ar\" is in range.\n\t *\t\ttransformed = range.getIntersection( otherRange ); // null - no common part.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to check for intersection.\n\t * @returns {module:engine/view/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 * Creates a {@link module:engine/view/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/view/treewalker~TreeWalker}.\n\t * @param {module:engine/view/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/view/item~Item view items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n\t * set to `true`. However it returns only {@link module:engine/view/item~Item items},\n\t * not {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/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/view/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 ( let 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/view/position~Position positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/view/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/view/position~Position positions}, not {@link module:engine/view/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/view/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/view/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 ( let value of treeWalker ) {\n\t\t\tyield value.nextPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Checks and returns whether this range intersects with given range.\n\t *\n\t * @param {module:engine/view/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} True if ranges intersect.\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 * Creates a range from given parents and offsets.\n\t *\n\t * @param {module:engine/view/element~Element} startElement Start position parent element.\n\t * @param {Number} startOffset Start position offset.\n\t * @param {module:engine/view/element~Element} endElement End position parent element.\n\t * @param {Number} endOffset End position offset.\n\t * @returns {module:engine/view/range~Range} Created range.\n\t */\n\tstatic createFromParentsAndOffsets( startElement, startOffset, endElement, endOffset ) {\n\t\treturn new this(\n\t\t\tnew Position( startElement, startOffset ),\n\t\t\tnew Position( endElement, endOffset )\n\t\t);\n\t}\n\n\t/**\n\t * Creates and returns a new instance of Range which is equal to passed range.\n\t *\n\t * @param {module:engine/view/range~Range} range Range to clone.\n\t * @returns {module:engine/view/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 new range, spreading from specified {@link module:engine/view/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/view/position~Position} position Beginning of the range.\n\t * @param {Number} shift How long the range should be.\n\t * @returns {module:engine/view/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 inside an {@link module:engine/view/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/view/element~Element} element Element which is a parent for the range.\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tstatic createIn( element ) {\n\t\treturn this.createFromParentsAndOffsets( element, 0, element, element.childCount );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/view/item~Item view item} and ends after it.\n\t *\n\t * @param {module:engine/view/item~Item} item\n\t * @returns {module:engine/view/range~Range}\n\t */\n\tstatic createOn( item ) {\n\t\treturn this.createFromPositionAndShift( Position.createBefore( item ), 1 );\n\t}\n}\n\n// Function used by getEnlagred and getShrinked methods.\nfunction enlargeShrinkSkip( value ) {\n\tif ( value.item.is( 'attributeElement' ) || value.item.is( 'uiElement' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-engine/src/view/range.js","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nexport default baseSlice;\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/_baseSlice.js","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n\n\n\n// WEBPACK FOOTER //\n// ../ckeditor5-utils/src/lib/lodash/_isIndex.js","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nvar stylesInDom = {},\n\tmemoize = function(fn) {\n\t\tvar memo;\n\t\treturn function () {\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\t\treturn memo;\n\t\t};\n\t},\n\tisOldIE = memoize(function() {\n\t\treturn /msie [6-9]\\b/.test(self.navigator.userAgent.toLowerCase());\n\t}),\n\tgetHeadElement = memoize(function () {\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\n\t}),\n\tsingletonElement = null,\n\tsingletonCounter = 0,\n\tstyleElementsInsertedAtTop = [];\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\t// Force single-tag solution on IE6-9, which has a hard limit on the # of