/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
(function(e){e.en=Object.assign(e.en||{},{a:'Cannot upload file:',b:'Italic',c:'Bold',d:'Code',e:'Enter image caption',f:'image widget',g:'Block quote',h:'Full size image',i:'Side image',j:'Left aligned image',k:'Centered image',l:'Right aligned image',m:'Choose heading',n:'Heading',o:'Link',p:'Insert table',q:'Header column',r:'Insert column before',s:'Insert column after',t:'Delete column',u:'Column',v:'Header row',w:'Insert row below',x:'Insert row above',y:'Delete row',z:'Row',aa:'Merge cell up',ab:'Merge cell right',ac:'Merge cell down',ad:'Merge cell left',ae:'Split cell vertically',af:'Split cell horizontally',ag:'Merge cells',ah:'Numbered List',ai:'Bulleted List',aj:'Upload in progress',ak:'Change image text alternative',al:'Upload failed',am:'Undo',an:'Redo',ao:'Save',ap:'Cancel',aq:'Text alternative',ar:'Insert image',as:'Paragraph',at:'Heading 1',au:'Heading 2',av:'Heading 3',aw:'Unlink',ax:'Edit link',ay:'Open link in new tab',az:'This link has no URL',ba:'Link URL',bb:'Rich Text Editor, %0',bc:'Rich Text Editor'})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.BalloonEditor=t():e.BalloonEditor=t()}('undefined'==typeof self?this:self,function(){var e=String.fromCharCode;return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=8)}([function(e,t,n){function o(e,t){for(var n=0;nn;m--)c[m]=i(m);c[n]=i(n),u++}while(c[n]!==l);return d[n].slice(1)}function Ee(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function Se(e){const t=e.parentNode;t&&t.removeChild(e)}function Oe(e){return'[object Text]'==Object.prototype.toString.call(e)}function Re(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Ie(e,t){if(e===t)return[];const n=Ve(e,t);return De(t,n)}function Ve(e,t){const n=Fe(e,t),o=Ne(e,n),i=Ne(t,n),r=Fe(o,i),a=e.length-r,s=t.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:s}}function Fe(e,t){for(let n=0;n<_d(e.length,t.length);n++)if(e[n]!==t[n])return n}function Ne(e,t){return e.substring(t).split('').reverse().join('')}function De(e,t){const n=[],{firstIndex:o,lastIndexOld:i,lastIndexNew:r}=t;return 0
').replace(/\n/g,' ')&&(e=` ${e} ${e}
').replace(/^\s/,' ').replace(/\s$/,' ').replace(/\s\s/g,' '),-1{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new ng(this.view,t,n))}}class ig extends og{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return ne(this)}})}}var rg=Date.now,ag=rg,sg='Expected a function',lg=_d,dg=wd,cg=Qe;class ug extends Nm{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=cg((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,n)=>{const o=e.selection;o.isFake&&Ye(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new am(t.getRanges(),{backward:t.isBackward,fake:!1});(e==km.arrowleft||e==km.arrowup)&&n.setTo(n.getFirstPosition()),(e==km.arrowright||e==km.arrowdown)&&n.setTo(n.getLastPosition());const o={oldSelection:t,newSelection:n,domSelection:null};this.document.fire('selectionChange',o),this._fireSelectionChangeDoneDebounced(o)}}const pg={error(e,t){console.error(i(e),t)},warn(e,t){console.warn(i(e),t)}};var mg=pg;class gg extends Nm{constructor(e){super(e),this.mutationObserver=e.getObserver(tg),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=cg((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void mg.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(n))this.view.render();else{const e={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}class fg extends og{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0;const t=this.document;t.on('focus',()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),50)}),t.on('blur',(n,o)=>{const i=t.selection.editableElement;(null===i||i===o.target)&&(t.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class hg extends og{constructor(e){super(e),this.domEventType=['compositionstart','compositionupdate','compositionend'];const t=this.document;t.on('compositionstart',()=>{t.isComposing=!0}),t.on('compositionend',()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class bg{constructor(e){const t=Xe(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),Om(e)||t){const n=t?e.startContainer:e;n.ownerDocument&&n.ownerDocument.body.contains(n)||mg.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?et(this,bg.getDomRangeRects(e)[0]):et(this,e.getBoundingClientRect())}else if(Ue(e)){const{innerWidth:t,innerHeight:n}=e;et(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else et(this,e)}clone(){return new bg(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:_d(this.top,e.top),right:wd(this.right,e.right),bottom:wd(this.bottom,e.bottom),left:_d(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,0>t.width||0>t.height?null:new bg(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!tt(e))for(let n=e.parentNode||e.commonAncestorContainer;n&&!tt(n);){const e=new bg(n),o=t.getIntersection(e);if(o)o.getArea()t?0:t,o)):[]},bh=function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:Op(t),t=o-t,ot(e,0,0>t?0:t)):[]},kh=function(e,t,n,o){for(var i=e.length,r=o?i:-1;(o?r--:++r=t?e:t)),e},wh=function(e){return e?_h(Op(e),0,4294967295):0},vh=function(e,t,n,o){var i=e.length;for(n=Op(n),0>n&&(n=-n>i?0:i+n),o=void 0===o||o>i?i:Op(o),0>o&&(o+=i),o=n>o?0:wh(o);n
`;const o=this.options.langPrefix+Pl(t,!0);return`${n?e:Pl(e,!0)}
`},Tl.prototype.blockquote=function(e){return`${n?e:Pl(e,!0)}
${e}
`},Tl.prototype.html=function(e){return e},Tl.prototype.heading=function(e,t){return`
':'
'},Tl.prototype.list=function(e,t){const n=t?'ol':'ul';return`<${n}>${e}${n}>`},Tl.prototype.listitem=function(e){return`${e}${t}
`},Tl.prototype.tablerow=function(e){return''+e+' '},Tl.prototype.tablecell=function(e,t){const n=t.header?'th':'td',o=t.align?`<${n} align="${t.align}">`:`<${n}>`;return o+e+`${n}>`},Tl.prototype.strong=function(e){return`${e}`},Tl.prototype.em=function(e){return`${e}`},Tl.prototype.codespan=function(e){return`${e.trim()}
`},Tl.prototype.br=function(){return this.options.xhtml?'
':'
'},Tl.prototype.del=function(e){return`${e}`},Tl.prototype.link=function(e,t,n){if(this.options.sanitize){let t;try{t=decodeURIComponent(El(e)).replace(/[^\w:]/g,'').toLowerCase()}catch(t){return''}if(0===t.indexOf('javascript:')||0===t.indexOf('vbscript:'))return''}let o=''+n+'',o},Tl.prototype.image=function(e,t,n){let o='':'>',o},Tl.prototype.text=function(e){return e};class Bx{constructor(){this._htmlDP=new wx,this._domConverter=new _x}toView(e){const t=Dx.a.parse(e,{gfm:!0,breaks:!0,tables:!0,xhtml:!0,renderer:new Tl});return this._htmlDP.toView(t)}toData(e){const t=this._domConverter.viewToDom(e,document),n=new _l({headingStyle:'atx'});return n.use(tl),n.keep(['macro']),n.turndown(t).replace(/(
'+a(n.message+'',!0)+'';throw n}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:d,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,'gm')(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)('hr','\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')('def','\\n+(?='+p.def.source+')')(),p.blockquote=l(p.blockquote)('def',p.def)(),p._tag='(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b',p.html=l(p.html)('comment',//)('closed',/<(tag)[\s\S]+?<\/\1>/)('closing',/
'+(n?e:a(e,!0))+'\n
\n':''+(n?e:a(e,!0))+'\n
'},i.prototype.blockquote=function(e){return'\n'+e+'\n'},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){return'
'+e+'
\n'},i.prototype.table=function(e,t){return''+e+'
'},i.prototype.br=function(){return this.options.xhtml?'