=n)return a;if(l=e.charCodeAt(t),34!==l&&39!==l&&40!==l)return a;for(t++,40===l&&(l=41);t'+s(e[t].content)+''},i.code_block=function(e,t,n,o,r){var i=e[t];return''+s(e[t].content)+'
\n'},i.fence=function(e,t,n,o,r){var l=e[t],d=l.info?a(l.info).trim():'',c='',p,u,i,m;return d&&(c=d.split(/\s+/g)[0]),p=n.highlight?n.highlight(l.content,c)||s(l.content):s(l.content),0===p.indexOf('u?i.push(['class',n.langPrefix+c]):i[u][1]+=' '+n.langPrefix+c,m={attrs:i},''+p+'
\n'):''+p+'
\n'},i.image=function(e,t,n,o,r){var i=e[t];return i.attrs[i.attrIndex('alt')][1]=r.renderInlineAsText(i.children,n,o),r.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?'
\n':'
\n'},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?'
\n':'
\n':'\n'},i.text=function(e,t){return s(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},o.prototype.renderAttrs=function(e){var t,n,o;if(!e.attrs)return'';for(o='',t=0,n=e.attrs.length;t\n':'>',o)},o.prototype.renderInline=function(e,t,n){for(var o='',r=this.rules,a=0,i=e.length,s;a\s]/i.test(e)}function r(e){return /^<\/a\s*>/i.test(e)}var a=n(0).arrayReplaceAt;e.exports=function(e){var t=e.tokens,n,i,s,l,d,c,p,u,m,g,h,f,b,_,k,w,y;if(e.md.options.linkify)for(i=0,s=t.length;ih&&(d=new e.Token('text','',0),d.content=m.slice(h,g),d.level=f,p.push(d)),d=new e.Token('link_open','a',1),d.attrs=[['href',k]],d.level=f++,d.markup='linkify',d.info='auto',p.push(d),d=new e.Token('text','',0),d.content=w,d.level=f,p.push(d),d=new e.Token('link_close','a',-1),d.level=--f,d.markup='linkify',d.info='auto',p.push(d),h=y[u].lastIndex);h=k&&(T=A=!1),A&&T&&(A=!1,T=v),!A&&!T){P&&(u.content=r(u.content,g.index,p));continue}if(T)for(E=S.length-1;0<=E&&(_=S[E],!(S[E].level=n))&&!(e.sCount[a]=l){e.line=n;break}for(c=0;ca)return!1;if(u=n+1,e.sCount[u]=e.eMarks[u])return!1;if(l=e.src.charCodeAt(c++),124!==l&&45!==l&&58!==l)return!1;for(;cf.length)return!1;if(s)return!0;for(h=e.push('table_open','table',1),h.map=_=[n,0],h=e.push('thead_open','thead',1),h.map=[n,n+1],h=e.push('tr_open','tr',1),h.map=[n,n+1],p=0;pe.sCount[t]-e.blkIndent)return!1;for(r=o=t+1;os)return!1;if(l=e.src.charCodeAt(a),126!==l&&96!==l)return!1;if(u=a,a=e.skipChars(a,l),d=a-u,3>d)return!1;if(g=e.src.slice(u,a),c=e.src.slice(a,s),0<=c.indexOf(n(l)))return!1;if(r)return!0;for(p=t;;){if(p++,p>=o)break;if(a=u=e.bMarks[p]+e.tShift[p],s=e.eMarks[p],a=d,y=[e.sCount[t]],e.sCount[t]=f-i,v=[e.tShift[t]],e.tShift[t]=s-e.bMarks[t],A=e.md.block.ruler.getRules('blockquote'),w=e.parentType,e.parentType='blockquote',E=!1,h=t+1;h=d));h++){if(62===e.src.charCodeAt(s++)&&!E){for(i=f=e.sCount[h]+s-(e.bMarks[h]+e.tShift[h]),32===e.src.charCodeAt(s)?(s++,i++,f++,c=!1,x=!0):9===e.src.charCodeAt(s)?(x=!0,3==(e.bsCount[h]+f)%4?(s++,i++,f++,c=!1):c=!0):x=!1,b.push(e.bMarks[h]),e.bMarks[h]=s;s=d,_.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(x?1:0),y.push(e.sCount[h]),e.sCount[h]=f-i,v.push(e.tShift[h]),e.tShift[h]=s-e.bMarks[h];continue}if(l)break;for(C=!1,u=0,m=A.length;u',T.map=g=[t,0],e.md.block.tokenize(e,t,h),T=e.push('blockquote_close','blockquote',-1),T.markup='>',e.lineMax=a,e.parentType=w,g[1]=e.line,u=0;ud)&&(!!i||(e.line=t+1,p=e.push('hr','hr',0),p.map=[t,e.line],p.markup=Array(d+1).join(n(l)),!0))}},function(t,o,r){'use strict';function a(e,t){var n,o,r,a;return o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],n=e.src.charCodeAt(o++),42!==n&&45!==n&&43!==n?-1:o=r)return-1;if(a=e.src.charCodeAt(o++),48>a||57=r)return-1;if(a=e.src.charCodeAt(o++),48<=a&&57>=a){if(10<=o-n)return-1;continue}if(41===a||46===a)break;return-1}return o=t.blkIndent&&(p=!0),0<=(N=s(t,o))){if(_=!0,L=t.bMarks[o]+t.tShift[o],x=+t.src.substr(L,N-L-1),p&&1!==x)return!1;}else if(0<=(N=a(t,o)))_=!1;else return!1;if(p&&t.skipSpaces(N)>=t.eMarks[o])return!1;if(v=t.src.charCodeAt(N-1),c)return!0;for(y=t.tokens.length,_?(M=t.push('ordered_list_open','ol',1),1!==x&&(M.attrs=[['start',x]])):M=t.push('bullet_list_open','ul',1),M.map=l=[o,0],M.markup=n(v),A=o,V=!1,F=t.md.block.ruler.getRules('list'),S=t.parentType,t.parentType='list';A=C?1:T-b,4=C&&t.isEmpty(o+1)?t.line=e(t.line+2,r):t.md.block.tokenize(t,o,r,!0),(!t.tight||V)&&(u=!1),V=1=r)break;if(t.sCount[A]N)break;}else if(N=a(t,A),0>N)break;if(v!==t.src.charCodeAt(N-1))break}return M=_?t.push('ordered_list_close','ol',-1):t.push('bullet_list_close','ul',-1),M.markup=n(v),l[1]=A,t.line=A,t.parentType=S,u&&d(t,y),!0}},function(e,t,n){'use strict';var o=n(0).normalizeReference,r=n(0).isSpace;e.exports=function(e,t,n,a){var s=0,d=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],p=t+1,u,m,g,h,f,b,i,l,_,k,w,y,v,x,C,A;if(4<=e.sCount[t]-e.blkIndent)return!1;if(91!==e.src.charCodeAt(d))return!1;for(;++de.sCount[p])){for(x=!1,b=0,i=C.length;b_||58!==v.charCodeAt(_+1))return!1;for(d=_+2;d=a)return!1;for(l=1,s=e.src.charCodeAt(++i);35===s&&i=l;)l++,s=e.src.charCodeAt(++i);return!(6i&&o(e.src.charCodeAt(d-1))&&(a=d),e.line=t+1,c=e.push('heading_open','h'+(l+''),1),c.markup='########'.slice(0,l),c.map=[t,e.line],c=e.push('inline','',0),c.content=e.src.slice(i,a).trim(),c.map=[t,e.line],c.children=[],c=e.push('heading_close','h'+(l+''),-1),c.markup='########'.slice(0,l),!0))}},function(e){'use strict';e.exports=function(e,t,o){var r=t+1,a=e.md.block.ruler.getRules('paragraph'),s,d,c,i,l,p,u,m,g,h;if(4<=e.sCount[t]-e.blkIndent)return!1;for(h=e.parentType,e.parentType='paragraph';r=e.blkIndent&&(p=e.bMarks[r]+e.tShift[r],u=e.eMarks[r],p=u)))){m=61===g?1:2;break}if(!(0>e.sCount[r])){for(d=!1,c=0,i=a.length;c|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp('^?('+o.join('|')+')(?=(\\s|/?>|$))','i'),/^$/,!0],[new RegExp(r.source+'\\s*$'),/^$/,!1]];e.exports=function(e,t,n,o){var r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l,i,d,c;if(4<=e.sCount[t]-e.blkIndent)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(r))return!1;for(c=e.src.slice(r,s),l=0;le.sCount[n])){for(s=!1,d=0,i=o.length;dn&&this.level--,o.level=this.level,0=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;et;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,o){var r=e,a,s,l,d,c,p,u;if(e>=t)return'';for(p=Array(t-e),a=0;rn?Array(s-n+1).join(' ')+this.src.slice(d,c):this.src.slice(d,c)}return p.join('')},o.prototype.Token=r,e.exports=o},function(e,t,n){'use strict';function o(){var e;for(this.ruler=new r,e=0;e=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,n,o){var r=new this.State(e,t,n,o),a,i,s;for(this.tokenize(r),i=this.ruler2.getRules(''),s=i.length,a=0;aa;a++)r.push(0);['\\','!','"','#','$','%','&','\'','(',')','*','+',',','.','/',':',';','<','=','>','?','@','[',']','^','_','`','{','|','}','~','-'].forEach(function(e){r[e.charCodeAt(0)]=1}),e.exports=function(e,t){var n=e.pos,i=e.posMax,a;if(92!==e.src.charCodeAt(n))return!1;if(n++,na&&0!==r[a])return t||(e.pending+=e.src[n]),e.pos+=2,!0;if(10===a){for(t||e.push('hardbreak','br',0),n++;nu)return!1;if(g=u+1,g=a)return!1;for(s=g,h=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?g=h.pos:n=''),s=g;g=a||41!==e.src.charCodeAt(g))&&(l=!0),g++}if(l){if('undefined'==typeof e.env.references)return!1;if(gp)return!1;if(m=p+1,m=a)return!1;for(k=m,h=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?m=h.pos:n=''),k=m;m=a||41!==e.src.charCodeAt(m))return e.pos=i,!1;m++}else{if('undefined'==typeof e.env.references)return!1;if(m/,n=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,o){var r=e.pos,i,a,s,l,d,c;return!(60!==e.src.charCodeAt(r))&&(i=e.src.slice(r),!(0>i.indexOf('>'))&&(n.test(i)?(a=i.match(n),l=a[0].slice(1,-1),d=e.md.normalizeLink(l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=a[0].length,!0):!!t.test(i)&&(s=i.match(t),l=s[0].slice(1,-1),d=e.md.normalizeLink('mailto:'+l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=s[0].length,!0)))}},function(e,t,n){'use strict';function o(e){var t=32|e;return 97<=t&&122>=t}var r=n(20).HTML_TAG_RE;e.exports=function(e,t){var n=e.pos,i,a,s,l;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(n)||n+2>=s))&&(i=e.src.charCodeAt(n+1),33===i||63===i||47===i||o(i))&&(a=e.src.slice(n).match(r),!!a)&&(t||(l=e.push('html_inline','',0),l.content=e.src.slice(n,n+a[0].length)),e.pos+=a[0].length,!0)}},function(e,t,n){'use strict';var o=n(15),r=n(0).has,i=n(0).isValidEntityCode,a=n(0).fromCodePoint,s=/^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n=e.pos,d=e.posMax,c,p,u;if(38!==e.src.charCodeAt(n))return!1;if(n+1a.end&&a.level===i.level){var s=(a.close||i.open)&&'undefined'!=typeof a.length&&'undefined'!=typeof i.length&&0==(a.length+i.length)%3;if(!s){i.jump=o-r,i.open=!1,a.end=o,a.jump=0;break}}r-=a.jump+1}}},function(e){'use strict';e.exports=function(e){var t=0,n=e.tokens,o=e.tokens.length,r,i;for(r=i=0;rn&&this.level--,o.level=this.level,0<\uFF5C]|'+r.src_ZPCc+'))('+h+')','i'),e.re.schema_search=RegExp('(^|(?!_)(?:[><\uFF5C]|'+r.src_ZPCc+'))('+h+')','ig'),e.re.pretest=RegExp('('+e.re.schema_test.source+')|('+e.re.host_fuzzy_test.source+')|@','i'),p(e)}function h(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function f(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function b(e,t){return this instanceof b?void(!t&&c(e)&&(t=e,e={}),this.__opts__=o({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__='',this.__text_cache__='',this.__schemas__=o({},k,e),this.__compiled__={},this.__tlds__=y,this.__tlds_replaced__=!1,this.re={},g(this)):new b(e,t)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp('^\\/\\/'+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,'i')),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":'http:',"ftp:":'http:',"//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp('^'+n.re.src_auth+'(?:localhost|(?:(?:'+n.re.src_domain+')\\.)+'+n.re.src_domain_root+')'+n.re.src_port+n.re.src_host_terminator+n.re.src_path,'i')),n.re.no_http.test(o)?3<=t&&':'===e[t-3]?0:3<=t&&'/'===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp('^'+n.re.src_email_name+'@'+n.re.src_host_strict,'i')),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},w='a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]',y=['biz','com','edu','gov','net','org','pro','web','xxx','aero','asia','coop','info','museum','name','shop','\u0440\u0444'];b.prototype.add=function(e,t){return this.__schemas__[e]=t,g(this),this},b.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},b.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,s,l,d;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex),r){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__['http:']&&(l=e.search(this.re.host_fuzzy_test),0<=l&&(0>this.__index__||lthis.__index__||ithis.__index__||ithis.__last_index__)&&(this.__schema__='mailto:',this.__index__=i,this.__last_index__=a))),0<=this.__index__},b.prototype.pretest=function(e){return this.re.pretest.test(e)},b.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},b.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(f(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},b.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],!t)?(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,g(this),this):(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),g(this),this)},b.prototype.normalize=function(e){e.schema||(e.url='http://'+e.url),'mailto:'!==e.schema||/^mailto:/i.test(e.url)||(e.url='mailto:'+e.url)},b.prototype.onCompile=function(){},e.exports=b},function(e,t,n){'use strict';e.exports=function(e){var t={};t.src_Any=n(17).source,t.src_Cc=n(18).source,t.src_Z=n(19).source,t.src_P=n(6).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join('|'),t.src_ZCc=[t.src_Z,t.src_Cc].join('|');var o='[><\uFF5C]';return t.src_pseudo_letter='(?:(?!'+o+'|'+t.src_ZPCc+')'+t.src_Any+')',t.src_ip4='(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',t.src_auth='(?:(?:(?!'+t.src_ZCc+'|[@/\\[\\]()]).)+@)?',t.src_port='(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?',t.src_host_terminator='(?=$|'+o+'|'+t.src_ZPCc+')(?!-|_|:\\d|\\.-|\\.(?!$|'+t.src_ZPCc+'))',t.src_path='(?:[/?#](?:(?!'+t.src_ZCc+'|'+o+'|[()[\\]{}.,"\'?!\\-]).|\\[(?:(?!'+t.src_ZCc+'|\\]).)*\\]|\\((?:(?!'+t.src_ZCc+'|[)]).)*\\)|\\{(?:(?!'+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+'|[\']).)+\\\'|\\\'(?='+t.src_pseudo_letter+'|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!'+t.src_ZCc+'|[.]).|'+(e&&e['---']?'\\-(?!--(?:[^-]|$))(?:-*)|':'\\-+|')+'\\,(?!'+t.src_ZCc+').|\\!(?!'+t.src_ZCc+'|[!]).|\\?(?!'+t.src_ZCc+'|[?]).)+|\\/)?',t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn='xn--[a-z0-9\\-]{1,59}',t.src_domain_root='(?:'+t.src_xn+'|'+t.src_pseudo_letter+'{1,63})',t.src_domain='(?:'+t.src_xn+'|(?:'+t.src_pseudo_letter+')|(?:'+t.src_pseudo_letter+'(?:-(?!-)|'+t.src_pseudo_letter+'){0,61}'+t.src_pseudo_letter+'))',t.src_host='(?:(?:(?:(?:'+t.src_domain+')\\.)*'+t.src_domain+'))',t.tpl_host_fuzzy='(?:'+t.src_ip4+'|(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%)))',t.tpl_host_no_ip_fuzzy='(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%))',t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test='localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:'+t.src_ZPCc+'|>|$))',t.tpl_email_fuzzy='(^|'+o+'|\\(|'+t.src_ZCc+')('+t.src_email_name+'@'+t.tpl_host_fuzzy_strict+')',t.tpl_link_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_fuzzy_strict+t.src_path+')',t.tpl_link_no_ip_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+')',t}},function(e,o,r){(function(e,i){var a;(function(s){function l(e){throw new RangeError(N[e])}function d(e,t){for(var n=e.length,o=[];n--;)o[n]=t(e[n]);return o}function c(e,t){var n=e.split('@'),o='';1=r&&n>>10),e=56320|1023&e),t+=D(e),t}).join('')}function m(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:v}function g(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function h(e,t,n){var o=0;for(e=n?L(e/T):e>>1,e+=L(e/t);e>V*C>>1;o+=v)e=L(e/V);return L(o+(V+1)*e/(e+A))}function f(e){var o=[],r=e.length,a=0,i=P,n=E,s,d,c,p,g,f,b,_,k,t;for(d=e.lastIndexOf(S),0>d&&(d=0),c=0;c=r&&l('invalid-input'),_=m(e.charCodeAt(p++)),(_>=v||_>L((y-a)/f))&&l('overflow'),a+=_*f,k=b<=n?x:b>=n+C?C:b-n,_L(y/t)&&l('overflow'),f*=t}s=o.length+1,n=h(a-g,s,0==g),L(a/s)>y-i&&l('overflow'),i+=L(a/s),a%=s,o.splice(a++,0,i)}return u(o)}function b(e){var o=[],r,n,i,a,s,d,c,u,m,f,t,b,_,k,w;for(e=p(e),b=e.length,r=P,n=0,s=E,d=0;dt&&o.push(D(t));for(i=a=o.length,a&&o.push(S);i=r&&tL((y-n)/_)&&l('overflow'),n+=(c-r)*_,r=c,d=0;dy&&l('overflow'),t==r){for(u=n,m=v;;m+=v){if(f=m<=s?x:m>=s+C?C:m-s,u= 0x80 (not a basic code point)',"invalid-input":'Invalid input'},V=v-x,L=t,D=n,F;F={version:'1.4.1',ucs2:{decode:p,encode:u},decode:f,encode:b,toASCII:function(e){return c(e,function(e){return O.test(e)?'xn--'+b(e):e})},toUnicode:function(e){return c(e,function(e){return R.test(e)?f(e.slice(4).toLowerCase()):e})}};a=function(){return F}.call(o,r,o,e),!(void 0!==a&&(e.exports=a))})(this)}).call(o,r(156)(e),r(5))},function(e){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){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['paragraph']},inline:{rules:['text'],rules2:['balance_pairs','text_collapse']}}}},function(e){'use strict';e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['blockquote','code','fence','heading','hr','html_block','lheading','list','reference','paragraph']},inline:{rules:['autolink','backticks','emphasis','entity','escape','html_inline','image','link','newline','text'],rules2:['balance_pairs','emphasis','text_collapse']}}}}])['default']});
\ No newline at end of file
+(function(e){e.en=Object.assign(e.en||{},{a:'Cannot upload file:',b:'Bold',c:'Italic',d:'Block quote',e:'Choose heading',f:'Heading',g:'image widget',h:'Full size image',i:'Side image',j:'Left aligned image',k:'Centered image',l:'Right aligned image',m:'Insert image',n:'Upload failed',o:'Numbered List',p:'Bulleted List',q:'Insert table',r:'Header column',s:'Insert column before',t:'Insert column after',u:'Delete column',v:'Column',w:'Header row',x:'Insert row below',y:'Insert row above',z:'Delete row',aa:'Row',ab:'Merge cell up',ac:'Merge cell right',ad:'Merge cell down',ae:'Merge cell left',af:'Split cell vertically',ag:'Split cell horizontally',ah:'Merge cells',ai:'Enter image caption',aj:'Link',ak:'Upload in progress',al:'Rich Text Editor',am:'Rich Text Editor, %0',an:'Undo',ao:'Redo',ap:'Unlink',aq:'Edit link',ar:'Open link in new tab',as:'This link has no URL',at:'Save',au:'Cancel',av:'Link URL',aw:'Change image text alternative',ax:'Paragraph',ay:'Heading 1',az:'Heading 2',ba:'Heading 3',bb:'Text alternative'})})(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=7)}([function(e,t,n){function o(e,t){for(var n=0;n'},function(e){e.exports=''},function(e,t,n){var o=n(63);'string'==typeof o&&(o=[[e.i,o,'']]);var i={singleton:!0,hmr:!0},r;i.transform=r,i.insertInto=void 0;n(0)(o,i);o.locals&&(e.exports=o.locals),!1},function(t,n,o){'use strict';function i(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: ${al}#error-${t[1]}\n`:e}function r(){let e='e';for(let t=0;8>t;t++)e+=$s(65536*(1+Math.random())).toString(16).substring(1);return e}function a(e,t){return e[ul]&&e[ul][t]?e[ul][t].emitter:null}function s(e,t){e[ml]||(e[ml]=t||r())}function l(e){return e[ml]}function d(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function c(){return{callbacks:[],childEvents:[]}}function p(e,t){const n=d(e);if(n[t])return;let o=t,i=null;const r=[];for(;''!==o&&!n[o];)n[o]=c(),r.push(n[o]),i&&n[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of r)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(i)}}function u(e,t){const n=d(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function b(e){var t=-1,n=e?e.length:0;for(this.clear();++te.add(t))}function M(e){return'string'==typeof e?[new Bc(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Bc(e):e instanceof Lc?new Bc(e.data):e))}function B(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is('element','br'))return this.childCount;for(const t of e)if(!t.is('uiElement'))return null;return this.childCount}function L(e,t,n){if(!vl(n))return!1;var o=typeof t;return!('number'==o?!(dd(n)&&xd(t,n.length)):!('string'==o&&t in n))&&fl(n[t],e)}function z(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function j(e){vp in e||(Object.defineProperty(e,vp,{value:new Map}),Object.defineProperty(e,yp,{value:new Map}),Object.defineProperty(e,xp,{value:new Map}))}function q(...e){const t=K(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1{if(e.properties.length&&e.properties.length!==o)throw new sl('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),Q(this._observable,this._to),$(this),this._bindProperties.forEach((e)=>{J(this._observable,e)})}function H(e,t,n){if(1[e,t]);return Array.prototype.concat.apply([],n)}function U(e){return e.every((e)=>'string'==typeof e)}function K(...e){if(!e.length)throw new sl('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new sl('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function G(e,t,n,o){const i=e[yp],r=i.get(n),a=r||{};a[o]||(a[o]=new Set),a[o].add(t),r||i.set(n,a)}function $(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((i)=>{t=i.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([i.observable,t]),G(e._observable,n,i.observable,t)})})}function J(e,t){const n=e[xp],o=n.get(t);let i;o.callback?i=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(i=o.to[0],i=i[0][i[1]]),e.hasOwnProperty(t)?e[t]=i:e.set(t,i)}function Q(e,t){t.forEach((t)=>{const n=e[yp];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(i,r)=>{o=n.get(t.observable)[r],o&&o.forEach((t)=>{J(e,t.property)})})})}function Y(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function X(e){let t=0;for(const n of e)t++;return t}function Z(){if(ee(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1!e.is('uiElement')).length}function te(){return null}function ne(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?Up.alt:0)+(e.ctrlKey?Up.ctrl:0)+(e.shiftKey?Up.shift:0);else if(t=Up[e.toLowerCase()],!t)throw new sl('keyboard-unknown-key: Unknown key name.',{key:e});return t}function oe(e){return'string'==typeof e&&(e=re(e)),e.map((e)=>'string'==typeof e?ne(e):e).reduce((e,t)=>t+e,0)}function ie(e){return qp.isMac?re(e).map((e)=>Wp[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in Hp?e+t:e+'+'+t):e}function re(e){return e.split(/\s*\+\s*/)}function ae(e){e.document.on('keydown',(t,n)=>le(t,n,e.domConverter))}function se(){return null}function le(e,t,n){if(t.keyCode==Up.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,i=e.focusOffset,r=n.domPositionToView(t,i);if(null===r)return;let a=!1;const s=r.getLastMatchingPosition((e)=>(e.item.is('uiElement')&&(a=!0),!!(e.item.is('uiElement')||e.item.is('attributeElement'))));if(a){const t=n.viewPositionToDom(s);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}function de(e){return'string'==typeof e?[new Bc(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Bc(e):e instanceof Lc?new Bc(e.data):e))}function ce(e){return Array.from(e.getChildren()).some((e)=>!e.is('uiElement'))}function pe(e){let t=e.parent;for(;!ke(t);){if(!t)return;t=t.parent}return t}function ue(e,t){if(e.priorityt.priority)&&e.getIdentity()t instanceof e))throw new sl('view-writer-insert-invalid-node');t.is('text')||be(t.getChildren())}}function ke(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function _e(e){const t=pe(e.start),n=pe(e.end);if(!t||!n||t!==n)throw new sl('view-writer-invalid-range-container')}function we(e,t){return null===e.id&&null===t.id}function ve(e){return e instanceof Text&&e.data.substr(0,Xp)===Zp}function ye(e){return e.data.length==Xp&&ve(e)}function xe(e){return ve(e)?e.data.slice(Xp):e.data}function Ce(e,t){let n=eu.get(t);return n||(n=t(window.document),eu.set(t,n)),e.isEqualNode(n)}function Ae(e){e.document.on('keydown',Te)}function Te(e,t){if(t.keyCode==Up.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;ve(t)&&n<=Xp&&e.collapse(t,0)}}}function Pe(e,t,o){function i(n){const i=(c[n-1]===void 0?-1:c[n-1])+1,p=c[n+1]===void 0?-1:c[n+1],u=i>p?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(i>p?r:a);let m=Ks(i,p),g=m-n;for(;gn;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=Ne(e,t),o=Fe(e,n),i=Fe(t,n),r=Ne(o,i),a=e.length-r,s=t.length-r;return{firstIndex:n,lastIndexOld:a,lastIndexNew:s}}function Ne(e,t){for(let n=0;ne.hasAttribute('contenteditable'));return!t||'true'==t.getAttribute('contenteditable')}function Be(e,t){return Re(e)&&Re(t)&&!Oe(e)&&!Oe(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Le(e,t,n){if(t===n)return!0;return Oe(t)&&Oe(n)?t.data===n.data:!!(Ce(t,e)&&Ce(n,e))}function ze(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function je(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function qe(e,t){const n=je(e),o=je(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function He(e,t,n){let o=je(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function We(e,t){for(;e&&e!=nu.document;)t(e),e=e.parentNode}function Ue(e){return'[object Window]'==Object.prototype.toString.apply(e)}function Ke(e){return e['data-ck-expando']||(e['data-ck-expando']=r())}function Ge(e){var t=-1,n=e?e.length:0;for(this.__data__=new Gl;++t=t||0>n||h&&o>=_}function s(){var e=Vu();return a(e)?l(e):void(v=setTimeout(s,r(e)))}function l(e){return(clearTimeout(v),v=void 0,f&&b)?o(e):(b=k=void 0,w)}function d(){void 0!==v&&clearTimeout(v),u=m=0,b=k=v=void 0}function c(){return void 0===v?w:l(Vu())}function p(){var e=Vu(),n=a(e);if(b=arguments,k=this,u=e,n){if(void 0===v)return i(u);if(h)return clearTimeout(v),v=setTimeout(s,t),o(u)}return void 0===v&&(v=setTimeout(s,t)),w}var u=0,m=0,g=!1,h=!1,f=!0,b,k,_,w,v;if('function'!=typeof e)throw new TypeError(Nu);return t=ep(t)||0,vl(n)&&(g=!!n.leading,h='maxWait'in n,_=h?Fu(ep(n.maxWait)||0,t):_,f='trailing'in n?!!n.trailing:f),p.cancel=d,p.flush=c,p}function Ye(e){return e==Up.arrowright||e==Up.arrowleft||e==Up.arrowup||e==Up.arrowdown}function Xe(e){return'[object Range]'==Object.prototype.toString.apply(e)}function Ze(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function et(e,t){for(const n of Uu)e[n]=t[n]}function tt(e){return!!ou(e)&&e===e.ownerDocument.body}function nt({target:e,viewportOffset:t=0}){const n=ct(e);for(let o=n,i=null;o;){let r;r=o==n?pt(e):pt(i),rt(r,()=>ut(e,o));const a=ut(e,o);if(it(o,a,t),o.parent==o)o=null;else if(i=o.frameElement,o=o.parent,!i)return}}function it(e,t,n){const o=t.clone().moveBy(0,n),i=t.clone().moveBy(0,-n),r=new Wu(e).excludeScrollbarsAndBorders();if(![i,o].every((e)=>r.contains(e))){let{scrollX:a,scrollY:s}=e;st(i,r)?s-=r.top-t.top+n:at(o,r)&&(s+=t.bottom-r.bottom+n),lt(t,r)?a-=r.left-t.left+n:dt(t,r)&&(a+=t.right-r.right+n),e.scrollTo(a,s)}}function rt(e,t){const n=ct(e);for(let o,i;e!=n.document.body;)i=t(),o=new Wu(e).excludeScrollbarsAndBorders(),o.contains(i)||(st(i,o)?e.scrollTop-=o.top-i.top:at(i,o)&&(e.scrollTop+=i.bottom-o.bottom),lt(i,o)?e.scrollLeft-=o.left-i.left:dt(i,o)&&(e.scrollLeft+=i.right-o.right)),e=e.parentNode}function at(e,t){return e.bottom>t.bottom}function st(e,t){return e.topt.right}function ct(e){return Xe(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function pt(e){if(Xe(e)){let t=e.commonAncestorContainer;return Oe(t)&&(t=t.parentNode),t}return e.parentNode}function ut(e,t){const n=ct(e),o=new Wu(e);if(n===t)return o;for(let i=n;i!=t;){const e=i.frameElement,t=new Wu(e).excludeScrollbarsAndBorders();o.moveBy(t.left,t.top),i=i.parent}return o}function mt(e){return il(e)?P(e):new Map(e)}function gt(e){return'string'==typeof e?[new $u(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new $u(e):e instanceof Ju?new $u(e.data,e.getAttributes()):e))}function ht(e,t,n,o,i){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:i}}}function ft(e){const t=e.split(':');return 1{if(o.containsItem(e)){const t=n.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!r}function kt(e,t){return!t.has(e)&&(t.add(e),e.document.model.schema.isBlock(e)&&e.parent)}function _t(e,t){const n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),o=n.find((e)=>kt(e,t));return n.forEach((e)=>t.add(e)),o}function wt(){const e=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document.model,'applyOperation',(t,n)=>{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&vt.call(this,o)},{priority:'low'})}function vt(e){const t=e.type,n=e.delta.batch;let o,i;'insert'==t?o=tm.createFromPositionAndShift(e.position,e.nodes.maxOffset):(o=tm.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),i=e.sourcePosition);const r=o.end.offset-o.start.offset;let a=o.start;('move'==t||'remove'==t||'reinsert'==t)&&(a=a._getTransformedByInsertion(i,r));const s=this._getTransformedByDocumentChange(t,e.delta.type,a,r,i);('move'==t||'remove'==t||'reinsert'==t)&&3==s.length&&(s[2]=o);const l=tm.createFromRanges(s),d=!l.isEqual(this),c=this.containsPosition(a),p=i&&(this.containsPosition(i)||this.start.isEqual(i));if(d){const e=tm.createFromRange(this);this.start=l.start,this.end=l.end,this.fire('change:range',e,{type:t,batch:n,range:o,sourcePosition:i})}else(c||p)&&this.fire('change:content',tm.createFromRange(this),{type:t,batch:n,range:o,sourcePosition:i})}function yt(e){return e instanceof Ju||e instanceof $u?e.getAttributes():null}function xt(e,t){const n=e.document.differ;for(const o of n.getChanges()){if('insert'!=o.type)continue;const n=o.position.parent,i=o.length===n.maxOffset;i&&e.enqueueChange(t,(e)=>{const t=Array.from(n.getAttributeKeys()).filter((e)=>e.startsWith(sm));for(const o of t)e.removeAttribute(o,n)})}}function Ct(e){return e=cm(e),e.view=Pt(e.view,'container'),(t)=>{t.on('insert:'+e.model,Rt(e.view),{priority:e.converterPriority||'normal'})}}function At(e){e=cm(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=Pt(e.view[t],'attribute');else e.view=Pt(e.view,'attribute');const o=St(e);return(t)=>{t.on(n,Ft(o),{priority:e.converterPriority||'normal'})}}function Tt(e){e=cm(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=Ot(e.view[t]);else e.view=Ot(e.view);const o=St(e);return(t)=>{t.on(n,Nt(o),{priority:e.converterPriority||'normal'})}}function Pt(e,t){return'function'==typeof e?e:(n,o)=>Et(e,o,t)}function Et(e,t,n){'string'==typeof e&&(e={name:e});let o;const i=Object.assign({},e.attributes);if('container'==n)o=t.createContainerElement(e.name,i);else if('attribute'==n){const n={priority:e.priority||Bp.DEFAULT_PRIORITY};o=t.createAttributeElement(e.name,i,n)}else o=t.createUIElement(e.name,i);if(e.styles){const n=Object.keys(e.styles);for(const i of n)t.setStyle(i,e.styles[i],o)}if(e.classes){const n=e.classes;if('string'==typeof n)t.addClass(n,o);else for(const e of n)t.addClass(e,o)}return o}function St(e){return e.model.values?(t,n)=>{const o=e.view[t];return o?o(t,n):null}:e.view}function Ot(e){return'string'==typeof e?(t)=>({key:e,value:t}):'object'==typeof e?e.value?()=>e:(t)=>({key:e.key,value:t}):e}function Rt(e){return(t,n,o)=>{const i=e(n.item,o.writer);if(i&&o.consumable.consume(n.item,'insert')){const e=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(n.item,i),o.writer.insert(e,i)}}}function It(){return(e,t,n)=>{if(n.consumable.consume(t.item,'insert')){const e=n.writer,o=n.mapper.toViewPosition(t.range.start),i=e.createText(t.item.data);e.insert(o,i)}}}function Vt(){return(e,t,n)=>{const o=n.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),r=n.mapper.toViewPosition(i,{isPhantom:!0}),a=new Ip(o,r),s=n.writer.remove(a.getTrimmed());for(const o of Ip.createIn(s).getItems())n.mapper.unbindViewElement(o)}}function Nt(e){return e=e||((e,t)=>({value:e,key:t.attributeKey})),(t,n,o)=>{const i=e(n.attributeOldValue,n),r=e(n.attributeNewValue,n);if((i||r)&&o.consumable.consume(n.item,t.name)){const e=o.mapper.toViewElement(n.item),t=o.writer;if(null!==n.attributeOldValue&&i)if('class'==i.key){const n=Array.isArray(i.value)?i.value:[i.value];for(const o of n)t.removeClass(o,e)}else if('style'==i.key){const n=Object.keys(i.value);for(const o of n)t.removeStyle(o,e)}else t.removeAttribute(i.key,e);if(null!==n.attributeNewValue&&r)if('class'==r.key){const n=Array.isArray(r.value)?r.value:[r.value];for(const o of n)t.addClass(o,e)}else if('style'==r.key){const n=Object.keys(r.value);for(const o of n)t.setStyle(o,r.value[o],e)}else t.setAttribute(r.key,r.value,e)}}}function Ft(e){return(t,n,o)=>{const i=e(n.attributeOldValue,o.writer),r=e(n.attributeNewValue,o.writer);if((i||r)&&o.consumable.consume(n.item,t.name)){const e=o.writer,t=e.document.selection;if(n.item instanceof rm||n.item instanceof lm)e.wrap(t.getFirstRange(),r);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&i&&(t=e.unwrap(t,i)),null!==n.attributeNewValue&&r&&e.wrap(t,r)}}}}function Dt(e,t){return(n,o)=>{const i=o.newSelection,r=new rm,a=[];for(const e of i.getRanges())a.push(t.toModelRange(e));r.setTo(a,{backward:i.isBackward}),r.isEqual(e.document.selection)||e.change((e)=>{e.setSelection(r)})}}function Mt(){return(e,t,n)=>{const o=t.selection;if(!o.isCollapsed&&n.consumable.consume(o,'selection')){const e=[];for(const t of o.getRanges()){const o=n.mapper.toViewRange(t);e.push(o)}n.writer.setSelection(e,{backward:o.isBackward})}}}function Bt(){return(e,t,n)=>{const o=t.selection;if(o.isCollapsed&&n.consumable.consume(o,'selection')){const e=n.writer,t=o.getFirstPosition(),i=n.mapper.toViewPosition(t),r=e.breakAttributes(i);e.setSelection(r)}}}function Lt(){return(e,t,n)=>{const o=n.writer,i=o.document.selection;for(const o of i.getRanges())o.isCollapsed&&o.end.parent.document&&n.writer.mergeAttributes(o.start);o.setSelection(null)}}function zt(e,t){const n=qt();if(1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0===n||!jt(e,t))return t.replace(/ \[context: [^\]]+\]$/,'');const o=window.CKEDITOR_TRANSLATIONS[e];return o[t].replace(/ \[context: [^\]]+\]$/,'')}function jt(e,t){return e in window.CKEDITOR_TRANSLATIONS&&t in window.CKEDITOR_TRANSLATIONS[e]}function qt(){return Object.keys(window.CKEDITOR_TRANSLATIONS).length}function Ht(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return Qt(e,n),Yt(e,n,'allowIn'),Yt(e,n,'allowContentOf'),Yt(e,n,'allowWhere'),Yt(e,n,'allowAttributes'),Yt(e,n,'allowAttributesOf'),Yt(e,n,'inheritTypesFrom'),Xt(e,n),n}function Wt(e,t){for(const n of e[t].allowContentOf)if(e[n]){const o=Zt(e,n);o.forEach((e)=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function Ut(e,t){for(const n of e[t].allowWhere){const o=e[n];if(o){const n=o.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function Kt(e,t){for(const n of e[t].allowAttributesOf){const o=e[n];if(o){const n=o.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function Gt(e,t){const n=e[t];for(const o of n.inheritTypesFrom){const t=e[o];if(t){const e=Object.keys(t).filter((e)=>e.startsWith('is'));for(const o of e)o in n||(n[o]=t[o])}}delete n.inheritTypesFrom}function $t(e,t){const n=e[t],o=n.allowIn.filter((t)=>e[t]);n.allowIn=Array.from(new Set(o))}function Jt(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Qt(e,t){for(const n of e){const e=Object.keys(n).filter((e)=>e.startsWith('is'));for(const o of e)t[o]=n[o]}}function Yt(e,t,n){for(const o of e)'string'==typeof o[n]?t[n].push(o[n]):Array.isArray(o[n])&&t[n].push(...o[n])}function Xt(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}function Zt(e,t){const n=e[t];return en(e).filter((e)=>e.allowIn.includes(n.name))}function en(e){return Object.keys(e).map((t)=>e[t])}function tn(e){return'string'==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is('element')?e.name:'$text',*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute(t){return e.getAttribute(t)}}}function*nn(e,t){for(let n=!1;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}function on(e,t){const n=new Set,o=new Map,i=tm.createIn(e).getItems();for(const o of i)'$marker'==o.name&&n.add(o);for(const i of n){const e=i.getAttribute('data-name'),n=em.createBefore(i);o.has(e)?o.get(e).end=em.createFromPosition(n):o.set(e,new tm(em.createFromPosition(n))),t.remove(i)}return o}function rn(e,t){let n;for(const o of new km(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const i=t.createElement(o.name,e);n&&t.append(i,n),n=em.createAt(i)}return n}function an(e){e=cm(e);const t=cn(e),n=dn(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.converterPriority||'normal'})}}function sn(e){e=cm(e),mn(e);const t=gn(e),n=dn(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.converterPriority||'normal'})}}function ln(e){e=cm(e);let t=null;('string'==typeof e.view||e.view.key)&&(t=un(e)),mn(e,t);const n=gn(e);return(t)=>{t.on('element',n,{priority:e.converterPriority||'low'})}}function dn(e){return'string'==typeof e.view?e.view:'object'==typeof e.view&&'string'==typeof e.view.name?e.view.name:null}function cn(e){const t=new zc(e.view);return(n,o,i)=>{const r=t.match(o.viewItem);if(r){r.match.name=!0;const t=pn(e.model,o.viewItem,i.writer);if(t&&i.consumable.test(o.viewItem,r.match)){const e=i.splitToAllowedParent(t,o.modelCursor);if(e){i.writer.insert(t,e.position);const n=i.convertChildren(o.viewItem,em.createAt(t));i.consumable.consume(o.viewItem,r.match),o.modelRange=new tm(em.createBefore(t),em.createAfter(n.modelCursor.parent)),o.modelCursor=e.cursorParent?em.createAt(e.cursorParent):o.modelRange.end}}}}}function pn(e,t,n){return e instanceof Function?e(t,n):n.createElement(e)}function un(e){'string'==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if('class'==t||'style'==t){const o='class'==t?'classes':'styles';n={[o]:e.view.value}}else{const o='undefined'==typeof e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:o}}}return e.view.name&&(n.name=e.view.name),e.view=n,t}function mn(e,t=null){const n='object'==typeof e.model?e.model.key:e.model,o='object'!=typeof e.model||'undefined'==typeof e.model.value?!(null!==t)||((e)=>e.getAttribute(t)):e.model.value;e.model={key:n,value:o}}function gn(e){const t=new zc(e.view);return(n,o,i)=>{const r=t.match(o.viewItem);if(r){const t=e.model.key,n='function'==typeof e.model.value?e.model.value(o.viewItem):e.model.value;if(null!==n&&(hn(e)?r.match.name=!0:delete r.match.name,!!i.consumable.test(o.viewItem,r.match))){o.modelRange||(o=Object.assign(o,i.convertChildren(o.viewItem,o.modelCursor)));const e=fn(o.modelRange,{key:t,value:n},i);e&&i.consumable.consume(o.viewItem,r.match)}}}}function hn(e){return!!('object'!=typeof e.view||dn(e))&&!e.view.classes&&!e.view.attributes&&!e.view.styles}function fn(e,t,n){let o=!1;for(const i of Array.from(e.getItems()))n.schema.checkAttribute(i,t.key)&&(n.writer.setAttribute(t.key,t.value,i),o=!0);return o}function bn(){return(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}}function kn(){return(e,t,n)=>{if(n.schema.checkChild(t.modelCursor,'$text')&&n.consumable.consume(t.viewItem)){const e=n.writer.createText(t.viewItem.data);n.writer.insert(e,t.modelCursor),t.modelRange=tm.createFromPositionAndShift(t.modelCursor,e.offsetSize),t.modelCursor=t.modelRange.end}}}function _n(e){const t=[],n=e.root.document;if(!n)return[];const o=tm.createIn(e);for(const i of n.model.markers){const e=o.getIntersection(i.getRange());e&&t.push([i.name,e])}return t}function wn(e,t){for(const n of e)t(n)}function*vn(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},o=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*yn(n,o,i)}else yield*yn(e.model,e.view,e.upcastAlso)}function*yn(e,t,n){if(yield{model:e,view:t},n){n=Array.isArray(n)?n:[n];for(const t of n)yield{model:e,view:t}}}function xn(e){return'string'==typeof e?[new $u(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new $u(e):e instanceof Ju?new $u(e.data,e.getAttributes()):e))}function Cn(e,t){t=En(t);const n=t.reduce((e,t)=>e+t.offsetSize,0),o=e.parent;On(e);const i=e.index;return o._insertChild(i,t),Sn(o,i+t.length),Sn(o,i),new tm(e,e.getShiftedBy(n))}function An(e){if(!e.isFlat)throw new sl('operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.');const t=e.start.parent;On(e.start),On(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return Sn(t,e.start.index),n}function Tn(e,t){if(!e.isFlat)throw new sl('operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.');const n=An(e);return t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),Cn(t,n)}function Pn(e,t,n){On(e.start),On(e.end);for(const o of e.getItems()){const e=o.is('textProxy')?o.textNode:o;null===n?e._removeAttribute(t):e._setAttribute(t,n),Sn(e.parent,e.index)}Sn(e.end.parent,e.end.index)}function En(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;ne+t.operations.length,0)}function Un(e,t){const n=e[e.length-1];let o=n.operations.length+n.baseVersion;const r=new Bm;for(let n=0;no&&(n.push(...'e'.repeat(r.offset-o).split('')),i+=r.offset-o),'insert'==r.type?(n.push(...'i'.repeat(r.howMany).split('')),o=r.offset+r.howMany):'remove'==r.type?(n.push(...'r'.repeat(r.howMany).split('')),o=r.offset,i+=r.howMany):(n.push(...'a'.repeat(r.howMany).split('')),o=r.offset+r.howMany,i+=r.howMany);return i{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&_o.call(this,o)},{priority:'low'})}function _o(e){let t,n;'insert'==e.type?t=tm.createFromPositionAndShift(e.position,e.nodes.maxOffset):(t=tm.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),n=e.sourcePosition);const o=t.end.offset-t.start.offset;let i;switch(e.type){case'insert':const r='sticksToNext'==this.stickiness;i=this._getTransformedByInsertion(t.start,o,r);break;case'move':case'remove':case'reinsert':const a=tm.createFromPositionAndShift(n,o),s=a.containsPosition(this)||a.start.isEqual(this)&&'sticksToNext'==this.stickiness||a.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(s)i=this._getCombined(n,t.start);else{const e='sticksToNext'==this.stickiness,r=t.start._getTransformedByInsertion(n,o);i=this._getTransformedByMove(n,r,o,e)}}if(!this.isEqual(i)){const e=em.createFromPosition(this);this.path=i.path,this.root=i.root,this.fire('change',e)}}function wo(e,t,n){e.change((o)=>{n.isCollapsed||e.deleteContent(n);const i=new rf(e,o,n.anchor);let r;r=t.is('documentFragment')?t.getChildren():[t],i.handleNodes(r,{isFirst:!0,isLast:!0});const a=i.getSelectionRange();a?n instanceof lm?o.setSelection(a):n.setTo(a):zu.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')})}function vo(e,t,n={}){if(t.isCollapsed)return;const o=e.schema;e.change((e)=>{if(!n.doNotResetEntireContent&&Po(o,t))return void To(e,t,o);const i=t.getFirstRange(),r=i.start,a=of.createFromPosition(i.end);i.start.isTouching(i.end)||e.remove(i),n.leaveUnmerged||(yo(e,r,a),o.removeDisallowedAttributes(r.parent.getChildren(),e)),t instanceof lm?e.setSelection(r):t.setTo(r),xo(o,r)&&Ao(e,r,t),a.detach()})}function yo(e,t,n){const o=t.parent,i=n.parent;if(o!=i&&o.parent&&i.parent&&Co(t,n,e.model.schema)){for(t=em.createAfter(o),n=em.createBefore(i),n.isEqual(t)||e.insert(i,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=em.createBefore(t),e.remove(t)}yo(e,t,n)}}function xo(e,t){const n=e.checkChild(t,'$text'),o=e.checkChild(t,'paragraph');return!n&&o}function Co(e,t,n){const o=new tm(e,t);for(const i of o.getWalker())if(n.isLimit(i.item))return!1;return!0}function Ao(e,t,n){const o=e.createElement('paragraph');e.insert(o,t),n instanceof lm?e.setSelection(o,0):n.setTo(o,0)}function To(e,t){const n=e.model.schema.getLimitElement(t);e.remove(tm.createIn(n)),Ao(e,em.createAt(n),t)}function Po(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.checkChild(n,'paragraph')}function Eo(e,t,n={}){const o=e.schema,i='backward'!=n.direction,r=n.unit?n.unit:'character',a=t.focus,s=new Xu({boundaries:Io(a,i),singleCharacters:!0,direction:i?'forward':'backward'}),l={walker:s,schema:o,isForward:i,unit:r};for(let o;o=s.next();){if(o.done)return;const n=So(l,o.value);if(n)return void(t instanceof lm?e.change((e)=>{e.setSelectionFocus(n)}):t.setFocus(n))}}function So(e,t){if('text'==t.type)return'word'===e.unit?Ro(e.walker,e.isForward):Oo(e.walker,e.unit,e.isForward);if(t.type==(e.isForward?'elementStart':'elementEnd')){if(e.schema.isObject(t.item))return em.createAt(t.item,e.isForward?'after':'before');if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}else{if(e.schema.isLimit(t.item))return void e.walker.skip(()=>!0);if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}}function Oo(e,t){const n=e.position.textNode;if(n){const o=n.data;for(let i=e.position.offset-n.startOffset;ho(o,i)||'character'==t&&fo(o,i);)e.next(),i=e.position.offset-n.startOffset}return e.position}function Ro(e,t){let n=e.position.textNode;if(n)for(let o=e.position.offset-n.startOffset;!Vo(n.data,o,t)&&!No(n,o,t);){e.next();const i=t?e.position.nodeAfter:e.position.nodeBefore;if(i){const o=i.data.charAt(t?0:i.data.length-1);af.includes(o)||(e.next(),n=e.position.textNode)}o=e.position.offset-n.startOffset}return e.position}function Io(e,t){const n=e.root,o=em.createAt(n,t?'end':0);return t?new tm(e,o):new tm(o,e)}function Vo(e,t,n){const o=t+(n?0:-1);return af.includes(e.charAt(o))}function No(e,t,n){return t===(n?e.endOffset:0)}function Fo(e,t){return e.change((e)=>{const n=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return n;const i=o.start.root,r=o.start.getCommonPath(o.end),a=i.getNodeByPath(r);let s=o.start.parent==o.end.parent?o:tm.createFromParentsAndOffsets(a,o.start.path[r.length],a,o.end.path[r.length]+1);const l=s.end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is('textProxy')?e.appendText(t.data,t.getAttributes(),n):e.append(t._clone(!0),n);if(s!=o){const t=o._getTransformedByMove(s.start,em.createAt(n,0),l)[0],i=new tm(em.createAt(n),t.start),r=new tm(t.end,em.createAt(n,'end'));Do(r,e),Do(i,e)}return n})}function Do(e,t){const n=[];Array.from(e.getItems({direction:'backward'})).map((e)=>tm.createOn(e)).filter((t)=>{const n=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return n}).forEach((e)=>{n.push(e.start.parent),t.remove(e)}),n.forEach((e)=>{for(let n=e;n.parent&&n.isEmpty;){const e=tm.createOn(n);n=n.parent,t.remove(e)}})}function Mo(e){e.document.registerPostFixer((t)=>Bo(t,e))}function Bo(e,t){const n=t.document.selection,o=t.schema,i=[];let r=!1;for(const a of n.getRanges()){const e=Lo(a,o);e?(i.push(e),r=!0):i.push(a)}if(r){const t=Ho(i);e.setSelection(t,{backward:n.isBackward})}}function Lo(e,t){return e.isCollapsed?zo(e,t):jo(e,t)}function zo(e,t){const n=e.start,o=t.getNearestSelectionRange(n);if(!o)return null;const i=o.start;return n.isEqual(i)?null:i.nodeAfter&&t.isLimit(i.nodeAfter)?new tm(i,em.createAfter(i.nodeAfter)):new tm(i)}function jo(e,t){if(e.isFlat)return null;const n=e.start,o=e.end,i=qo(n,t,'start'),r=qo(o,t,'end');return n.isEqual(i)&&o.isEqual(r)?null:new tm(i,r)}function qo(e,t,n){let o=e.parent,i=o;for(;t.isLimit(i)&&i.parent;)o=i,i=i.parent;return o===i?e:'start'===n?em.createBefore(o):em.createAfter(o)}function Ho(e){const t=[];let n=e[0];t.push(n);for(const o of e)if(!o.isEqual(n)){if(o.isIntersecting(n)){const e=n.start.isBefore(o.start)?n.start:o.start,i=o.end.isAfter(n.end)?o.end:n.end,r=new tm(e,i);t.splice(t.indexOf(n),1,r),n=r;continue}n=o,t.push(o)}return t}function Wo(e){return e.every((e)=>'string'==typeof e)}function Uo(e){return!!e&&((e.value&&(e=e.value),Array.isArray(e))?e.some(Uo):!!(e instanceof bf))}function Ko(e,t){return e.map((e)=>e instanceof bf?e.getValue(t):e)}function Go(e,t,{node:n}){let o=Ko(e,n);o=1==e.length&&e[0]instanceof _f?o[0]:o.reduce(ii,''),si(o)?t.remove():t.set(o)}function $o(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function Jo(e,t,n){return{set(o){e.setAttributeNS(n,t,o)},remove(){e.removeAttributeNS(n,t)}}}function Qo(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Yo(e){const t=hf(e,(e)=>{if(e&&(e instanceof bf||di(e)||li(e)||ci(e)))return e});return t}function Xo(e){if('string'==typeof e?e=ti(e):e.text&&ni(e),e.on&&(e.eventListeners=ei(e.on),delete e.on),!e.text){e.attributes&&Zo(e.attributes);const t=[];if(e.children)if(ci(e.children))t.push(e.children);else for(const n of e.children)di(n)||li(n)||Re(n)?t.push(n):t.push(new ff(n));e.children=t}return e}function Zo(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),oi(e,t)}function ei(e){for(const t in e)oi(e,t);return e}function ti(e){return{text:[e]}}function ni(e){Array.isArray(e.text)||(e.text=[e.text])}function oi(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function ii(e,t){return si(t)?e:si(e)?t:`${e} ${t}`}function ri(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function ai(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),ri(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),ri(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new sl('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let n=0;for(const o of t.children)ai(e.children[n++],o)}}function si(e){return!e&&0!==e}function li(e){return e instanceof yf}function di(e){return e instanceof ff}function ci(e){return e instanceof gf}function pi(){return{children:[],bindings:[],attributes:{}}}function ui(e){return'class'==e||'style'==e}function mi(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=nu.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}function gi({element:e,target:t,positions:n,limiter:o,fitInViewport:i}){Cl(t)&&(t=t()),Cl(o)&&(o=o());const r=mi(e.parentElement),a=new Wu(e),s=new Wu(t);let l,d;if(!o&&!i)[d,l]=hi(n[0],s,a);else{const e=o&&new Wu(o).getVisible(),t=i&&new Wu(nu.window);[d,l]=fi(n,s,a,e,t)||hi(n[0],s,a)}let{left:c,top:p}=bi(l);if(r){const e=bi(new Wu(r)),t=Ze(r);c-=e.left,p-=e.top,c+=r.scrollLeft,p+=r.scrollTop,c-=t.left,p-=t.top}return{left:c,top:p,name:d}}function hi(e,t,n){const{left:o,top:i,name:r}=e(t,n);return[r,n.clone().moveTo(o,i)]}function fi(e,t,n,o,i){let r=0,a=0,s,l;const d=n.getArea();return e.some((e)=>{function c(){a=g,r=m,s=u,l=p}const[p,u]=hi(e,t,n);let m,g;if(o)if(i){const e=o.getIntersection(i);m=e?e.getIntersectionArea(u):0}else m=o.getIntersectionArea(u);return i&&(g=i.getIntersectionArea(u)),i&&!o?g>a&&c():!i&&o?m>r&&c():g>a&&m>=r?c():g>=a&&m>r&&c(),m===d}),s?[l,s]:null}function bi({left:e,top:t}){const{scrollX:n,scrollY:o}=nu.window;return{left:e+n,top:t+o}}function ki(e){return(t)=>t+e}function _i(e){return ou(e)?e:Xe(e)?e.commonAncestorContainer:'function'==typeof e?_i(e()):null}function wi(e,t){return e.top-t.height-Pf.arrowVerticalOffset}function vi(e){return e.bottom+Pf.arrowVerticalOffset}function yi(e){return!!(e.focus&&'none'!=nu.window.getComputedStyle(e.element).display)}function xi(e){return e.bindTemplate.to((t)=>{t.target===e.element&&t.preventDefault()})}function Ci(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}function Ai(e){const t=Pf.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest]}function Ti(e){return(e+'').toLowerCase()}function Pi({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:o,beforeFocus:i,afterBlur:r}){n.add(o.element),t.set('Alt+F10',(e,t)=>{n.isFocused&&!o.focusTracker.isFocused&&(i&&i(),o.focus(),t())}),o.keystrokes.set('Esc',(t,n)=>{o.focusTracker.isFocused&&(e.focus(),r&&r(),n())})}function Ei(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Si(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Oi(e){if(!Cl(e.updateElement))throw new sl('attachtoform-missing-elementapi-interface: ElementApi interface is required.');const t=e.element;if(t&&'textarea'===t.tagName.toLowerCase()&&t.form){let n;const o=t.form,i=()=>e.updateElement();Cl(o.submit)&&(n=o.submit,o.submit=()=>{i(),n.apply(o)}),o.addEventListener('submit',i),e.on('destroy',()=>{o.removeEventListener('submit',i),n&&(o.submit=n)})}}function Ri(e){const t=e.files?Array.from(e.files):[],n=e.items?Array.from(e.items):[];return t.length?t:n.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}function Ii(e,t){const n=t.target.ownerDocument,o=t.clientX,i=t.clientY;let r;return n.caretRangeFromPoint&&n.caretRangeFromPoint(o,i)?r=n.caretRangeFromPoint(o,i):t.rangeParent&&(r=n.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0)),r?e.domConverter.domRangeToView(r):e.document.selection.getFirstRange()}function Vi(e){return e=e.replace(//g,'>').replace(/\n\n/g,'