(window.webpackJsonp=window.webpackJsonp||[]).push([[191,5,6,7,8,10],{"+NIl":function(I,J,P){(function(M){M(P("VrN/"))})(function(M){"use strict";M.defineMode("stex",function(u,_){"use strict";function D(p,w){p.cmdState.push(w)}function f(p){return p.cmdState.length>0?p.cmdState[p.cmdState.length-1]:null}function l(p){var w=p.cmdState.pop();w&&w.closeBracket()}function C(p){for(var w=p.cmdState,g=w.length-1;g>=0;g--){var c=w[g];if(c.name=="DEFAULT")continue;return c}return{styleIdentifier:function(){return null}}}function v(p,w,g){return function(){this.name=p,this.bracketNo=0,this.style=w,this.styles=g,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};o.importmodule=v("importmodule","tag",["string","builtin"]),o.documentclass=v("documentclass","tag",["","atom"]),o.usepackage=v("usepackage","tag",["atom"]),o.begin=v("begin","tag",["atom"]),o.end=v("end","tag",["atom"]),o.label=v("label","tag",["atom"]),o.ref=v("ref","tag",["atom"]),o.eqref=v("eqref","tag",["atom"]),o.cite=v("cite","tag",["atom"]),o.bibitem=v("bibitem","tag",["atom"]),o.Bibitem=v("Bibitem","tag",["atom"]),o.RBibitem=v("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function a(p,w){p.f=w}function r(p,w){var g;if(p.match(/^\\[a-zA-Z@]+/)){var c=p.current().slice(1);return g=o.hasOwnProperty(c)?o[c]:o.DEFAULT,g=new g,D(w,g),a(w,m),g.style}if(p.match(/^\\[$&%#{}_]/))return"tag";if(p.match(/^\\[,;!\/\\]/))return"tag";if(p.match("\\["))return a(w,function(s,d){return h(s,d,"\\]")}),"keyword";if(p.match("\\("))return a(w,function(s,d){return h(s,d,"\\)")}),"keyword";if(p.match("$$"))return a(w,function(s,d){return h(s,d,"$$")}),"keyword";if(p.match("$"))return a(w,function(s,d){return h(s,d,"$")}),"keyword";var n=p.next();if(n=="%")return p.skipToEnd(),"comment";if(n=="}"||n=="]"){if(g=f(w),g)g.closeBracket(n),a(w,m);else return"error";return"bracket"}else return n=="{"||n=="["?(g=o.DEFAULT,g=new g,D(w,g),"bracket"):/\d/.test(n)?(p.eatWhile(/[\w.%]/),"atom"):(p.eatWhile(/[\w\-_]/),g=C(w),g.name=="begin"&&(g.argument=p.current()),g.styleIdentifier())}function h(p,w,g){if(p.eatSpace())return null;if(g&&p.match(g))return a(w,r),"keyword";if(p.match(/^\\[a-zA-Z@]+/))return"tag";if(p.match(/^[a-zA-Z]+/))return"variable-2";if(p.match(/^\\[$&%#{}_]/))return"tag";if(p.match(/^\\[,;!\/]/))return"tag";if(p.match(/^[\^_&]/))return"tag";if(p.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(p.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var c=p.next();return c=="{"||c=="}"||c=="["||c=="]"||c=="("||c==")"?"bracket":c=="%"?(p.skipToEnd(),"comment"):"error"}function m(p,w){var g=p.peek(),c;return g=="{"||g=="["?(c=f(w),c.openBracket(g),p.eat(g),a(w,r),"bracket"):/[ \t\r]/.test(g)?(p.eat(g),null):(a(w,r),l(w),r(p,w))}return{startState:function(){var p=_.inMathMode?function(w,g){return h(w,g)}:r;return{cmdState:[],f:p}},copyState:function(p){return{cmdState:p.cmdState.slice(),f:p.f}},token:function(p,w){return w.f(p,w)},blankLine:function(p){p.f=r,p.cmdState.length=0},lineComment:"%"}}),M.defineMIME("text/x-stex","stex"),M.defineMIME("text/x-latex","stex")})},"19Vz":function(I,J,P){(function(M){M(P("VrN/"))})(function(M){M.defineOption("placeholder","",function(v,o,a){var r=a&&a!=M.Init;if(o&&!r)v.on("blur",f),v.on("change",l),v.on("swapDoc",l),M.on(v.getInputField(),"compositionupdate",v.state.placeholderCompose=function(){D(v)}),l(v);else if(!o&&r){v.off("blur",f),v.off("change",l),v.off("swapDoc",l),M.off(v.getInputField(),"compositionupdate",v.state.placeholderCompose),u(v);var h=v.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}o&&!v.hasFocus()&&f(v)});function u(v){v.state.placeholder&&(v.state.placeholder.parentNode.removeChild(v.state.placeholder),v.state.placeholder=null)}function _(v){u(v);var o=v.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=v.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var a=v.getOption("placeholder");typeof a=="string"&&(a=document.createTextNode(a)),o.appendChild(a),v.display.lineSpace.insertBefore(o,v.display.lineSpace.firstChild)}function D(v){setTimeout(function(){var o=!1,a=v.getInputField();a.nodeName=="TEXTAREA"?o=!a.value:v.lineCount()==1&&(o=!/[^\u200b]/.test(a.querySelector(".CodeMirror-line").textContent)),o?_(v):u(v)},20)}function f(v){C(v)&&_(v)}function l(v){var o=v.getWrapperElement(),a=C(v);o.className=o.className.replace(" CodeMirror-empty","")+(a?" CodeMirror-empty":""),a?_(v):u(v)}function C(v){return v.lineCount()===1&&v.getLine(0)===""}})},"1T2W":function(I,J,P){I.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(I,J,P){(function(M){M(P("VrN/"))})(function(M){"use strict";var u={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};M.defineMode("xml",function(D,f){var l=D.indentUnit,C={},v=f.htmlMode?u:_;for(var o in v)C[o]=v[o];for(var o in f)C[o]=f[o];var a,r;function h(T,N){function j(K){return N.tokenize=K,K(T,N)}var L=T.next();if(L=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?j(w("atom","]]>")):null:T.match("--")?j(w("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),j(g(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),N.tokenize=w("meta","?>"),"meta"):(a=T.eat("/")?"closeTag":"openTag",N.tokenize=m,"tag bracket");if(L=="&"){var V;return T.eat("#")?T.eat("x")?V=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):V=T.eatWhile(/[\d]/)&&T.eat(";"):V=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),V?"atom":"error"}else return T.eatWhile(/[^&<]/),null}h.isInText=!0;function m(T,N){var j=T.next();if(j==">"||j=="/"&&T.eat(">"))return N.tokenize=h,a=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return a="equals",null;if(j=="<"){N.tokenize=h,N.state=d,N.tagName=N.tagStart=null;var L=N.tokenize(T,N);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(j)?(N.tokenize=p(j),N.stringStartCol=T.column(),N.tokenize(T,N)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(T){var N=function(j,L){for(;!j.eol();)if(j.next()==T){L.tokenize=m;break}return"string"};return N.isInAttribute=!0,N}function w(T,N){return function(j,L){for(;!j.eol();){if(j.match(N)){L.tokenize=h;break}j.next()}return T}}function g(T){return function(N,j){for(var L;(L=N.next())!=null;){if(L=="<")return j.tokenize=g(T+1),j.tokenize(N,j);if(L==">")if(T==1){j.tokenize=h;break}else return j.tokenize=g(T-1),j.tokenize(N,j)}return"meta"}}function c(T,N,j){this.prev=T.context,this.tagName=N,this.indent=T.indented,this.startOfLine=j,(C.doNotIndent.hasOwnProperty(N)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function n(T){T.context&&(T.context=T.context.prev)}function s(T,N){for(var j;;){if(!T.context)return;if(j=T.context.tagName,!C.contextGrabbers.hasOwnProperty(j)||!C.contextGrabbers[j].hasOwnProperty(N))return;n(T)}}function d(T,N,j){return T=="openTag"?(j.tagStart=N.column(),S):T=="closeTag"?y:d}function S(T,N,j){return T=="word"?(j.tagName=N.current(),r="tag",O):C.allowMissingTagName&&T=="endTag"?(r="tag bracket",O(T,N,j)):(r="error",S)}function y(T,N,j){if(T=="word"){var L=N.current();return j.context&&j.context.tagName!=L&&C.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==L||C.matchClosing===!1?(r="tag",i):(r="tag error",k)}else return C.allowMissingTagName&&T=="endTag"?(r="tag bracket",i(T,N,j)):(r="error",k)}function i(T,N,j){return T!="endTag"?(r="error",i):(n(j),d)}function k(T,N,j){return r="error",i(T,N,j)}function O(T,N,j){if(T=="word")return r="attribute",b;if(T=="endTag"||T=="selfcloseTag"){var L=j.tagName,V=j.tagStart;return j.tagName=j.tagStart=null,T=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(L)?s(j,L):(s(j,L),j.context=new c(j,L,V==j.indented)),d}return r="error",O}function b(T,N,j){return T=="equals"?E:(C.allowMissing||(r="error"),O(T,N,j))}function E(T,N,j){return T=="string"?x:T=="word"&&C.allowUnquoted?(r="string",O):(r="error",O(T,N,j))}function x(T,N,j){return T=="string"?x:O(T,N,j)}return{startState:function(T){var N={tokenize:h,state:d,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(N.baseIndent=T),N},token:function(T,N){if(!N.tagName&&T.sol()&&(N.indented=T.indentation()),T.eatSpace())return null;a=null;var j=N.tokenize(T,N);return(j||a)&&j!="comment"&&(r=null,N.state=N.state(a||j,T,N),r&&(j=r=="error"?j+" error":r)),j},indent:function(T,N,j){var L=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+l;if(L&&L.noIndent)return M.Pass;if(T.tokenize!=m&&T.tokenize!=h)return j?j.match(/^(\s*)/)[0].length:0;if(T.tagName)return C.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+l*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(T){T.state==E&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var N=[],j=T.context;j;j=j.prev)j.tagName&&N.push(j.tagName);return N.reverse()}}}),M.defineMIME("text/xml","xml"),M.defineMIME("application/xml","xml"),M.mimeModes.hasOwnProperty("text/html")||M.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("MlIO"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.Hasher,f=u.x64,l=f.Word,C=f.WordArray,v=u.algo;function o(){return l.create.apply(l,arguments)}var a=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],r=[];(function(){for(var m=0;m<80;m++)r[m]=o()})();var h=v.SHA512=D.extend({_doReset:function(){this._hash=new C.init([new l.init(1779033703,4089235720),new l.init(3144134277,2227873595),new l.init(1013904242,4271175723),new l.init(2773480762,1595750129),new l.init(1359893119,2917565137),new l.init(2600822924,725511199),new l.init(528734635,4215389547),new l.init(1541459225,327033209)])},_doProcessBlock:function(m,p){for(var w=this._hash.words,g=w[0],c=w[1],n=w[2],s=w[3],d=w[4],S=w[5],y=w[6],i=w[7],k=g.high,O=g.low,b=c.high,E=c.low,x=n.high,T=n.low,N=s.high,j=s.low,L=d.high,V=d.low,K=S.high,W=S.low,G=y.high,F=y.low,B=i.high,H=i.low,q=k,re=O,ee=b,Ce=E,Ee=x,pe=T,Me=N,_e=j,he=L,ce=V,oe=K,Se=W,te=G,ue=F,Oe=B,le=H,Q=0;Q<80;Q++){var Y,Z,be=r[Q];if(Q<16)Z=be.high=m[p+Q*2]|0,Y=be.low=m[p+Q*2+1]|0;else{var ge=r[Q-15],Re=ge.high,Ze=ge.low,qe=(Re>>>1|Ze<<31)^(Re>>>8|Ze<<24)^Re>>>7,et=(Ze>>>1|Re<<31)^(Ze>>>8|Re<<24)^(Ze>>>7|Re<<25),nt=r[Q-2],ut=nt.high,ot=nt.low,je=(ut>>>19|ot<<13)^(ut<<3|ot>>>29)^ut>>>6,De=(ot>>>19|ut<<13)^(ot<<3|ut>>>29)^(ot>>>6|ut<<26),rt=r[Q-7],lt=rt.high,Je=rt.low,tt=r[Q-16],Ue=tt.high,ke=tt.low;Y=et+Je,Z=qe+lt+(Y>>>0>>0?1:0),Y=Y+De,Z=Z+je+(Y>>>0>>0?1:0),Y=Y+ke,Z=Z+Ue+(Y>>>0>>0?1:0),be.high=Z,be.low=Y}var Ie=he&oe^~he&te,ye=ce&Se^~ce&ue,Te=q&ee^q&Ee^ee&Ee,Ae=re&Ce^re&pe^Ce&pe,Pe=(q>>>28|re<<4)^(q<<30|re>>>2)^(q<<25|re>>>7),$e=(re>>>28|q<<4)^(re<<30|q>>>2)^(re<<25|q>>>7),Ke=(he>>>14|ce<<18)^(he>>>18|ce<<14)^(he<<23|ce>>>9),ct=(ce>>>14|he<<18)^(ce>>>18|he<<14)^(ce<<23|he>>>9),gt=a[Q],wt=gt.high,vt=gt.low,It=le+ct,Lt=Oe+Ke+(It>>>0>>0?1:0),It=It+ye,Lt=Lt+Ie+(It>>>0>>0?1:0),It=It+vt,Lt=Lt+wt+(It>>>0>>0?1:0),It=It+Y,Lt=Lt+Z+(It>>>0>>0?1:0),_t=$e+Ae,rr=Pe+Te+(_t>>>0<$e>>>0?1:0);Oe=te,le=ue,te=oe,ue=Se,oe=he,Se=ce,ce=_e+It|0,he=Me+Lt+(ce>>>0<_e>>>0?1:0)|0,Me=Ee,_e=pe,Ee=ee,pe=Ce,ee=q,Ce=re,re=It+_t|0,q=Lt+rr+(re>>>0>>0?1:0)|0}O=g.low=O+re,g.high=k+q+(O>>>0>>0?1:0),E=c.low=E+Ce,c.high=b+ee+(E>>>0>>0?1:0),T=n.low=T+pe,n.high=x+Ee+(T>>>0>>0?1:0),j=s.low=j+_e,s.high=N+Me+(j>>>0<_e>>>0?1:0),V=d.low=V+ce,d.high=L+he+(V>>>0>>0?1:0),W=S.low=W+Se,S.high=K+oe+(W>>>0>>0?1:0),F=y.low=F+ue,y.high=G+te+(F>>>0>>0?1:0),H=i.low=H+le,i.high=B+Oe+(H>>>0>>0?1:0)},_doFinalize:function(){var m=this._data,p=m.words,w=this._nDataBytes*8,g=m.sigBytes*8;p[g>>>5]|=128<<24-g%32,p[(g+128>>>10<<5)+30]=Math.floor(w/4294967296),p[(g+128>>>10<<5)+31]=w,m.sigBytes=p.length*4,this._process();var c=this._hash.toX32();return c},clone:function(){var m=D.clone.call(this);return m._hash=this._hash.clone(),m},blockSize:1024/32});u.SHA512=D._createHelper(h),u.HmacSHA512=D._createHmacHelper(h)}(),M.SHA512})},"3y9D":function(I,J,P){(function(M,u){I.exports=J=u(P("Ib8C"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.WordArray,f=_.Hasher,l=u.algo,C=[],v=l.SHA1=f.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,a){for(var r=this._hash.words,h=r[0],m=r[1],p=r[2],w=r[3],g=r[4],c=0;c<80;c++){if(c<16)C[c]=o[a+c]|0;else{var n=C[c-3]^C[c-8]^C[c-14]^C[c-16];C[c]=n<<1|n>>>31}var s=(h<<5|h>>>27)+g+C[c];c<20?s+=(m&p|~m&w)+1518500249:c<40?s+=(m^p^w)+1859775393:c<60?s+=(m&p|m&w|p&w)-1894007588:s+=(m^p^w)-899497514,g=w,w=p,p=m<<30|m>>>2,m=h,h=s}r[0]=r[0]+h|0,r[1]=r[1]+m|0,r[2]=r[2]+p|0,r[3]=r[3]+w|0,r[4]=r[4]+g|0},_doFinalize:function(){var o=this._data,a=o.words,r=this._nDataBytes*8,h=o.sigBytes*8;return a[h>>>5]|=128<<24-h%32,a[(h+64>>>9<<4)+14]=Math.floor(r/4294967296),a[(h+64>>>9<<4)+15]=r,o.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var o=f.clone.call(this);return o._hash=this._hash.clone(),o}});u.SHA1=f._createHelper(v),u.HmacSHA1=f._createHmacHelper(v)}(),M.SHA1})},4:function(I,J){},"5hvy":function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("MlIO"))})(this,function(M){return function(u){var _=M,D=_.lib,f=D.WordArray,l=D.Hasher,C=_.x64,v=C.Word,o=_.algo,a=[],r=[],h=[];(function(){for(var w=1,g=0,c=0;c<24;c++){a[w+5*g]=(c+1)*(c+2)/2%64;var n=g%5,s=(2*w+3*g)%5;w=n,g=s}for(var w=0;w<5;w++)for(var g=0;g<5;g++)r[w+5*g]=g+(2*w+3*g)%5*5;for(var d=1,S=0;S<24;S++){for(var y=0,i=0,k=0;k<7;k++){if(d&1){var O=(1<>>24)&16711935|(d<<24|d>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var y=c[s];y.high^=S,y.low^=d}for(var i=0;i<24;i++){for(var k=0;k<5;k++){for(var O=0,b=0,E=0;E<5;E++){var y=c[k+5*E];O^=y.high,b^=y.low}var x=m[k];x.high=O,x.low=b}for(var k=0;k<5;k++)for(var T=m[(k+4)%5],N=m[(k+1)%5],j=N.high,L=N.low,O=T.high^(j<<1|L>>>31),b=T.low^(L<<1|j>>>31),E=0;E<5;E++){var y=c[k+5*E];y.high^=O,y.low^=b}for(var V=1;V<25;V++){var O,b,y=c[V],K=y.high,W=y.low,G=a[V];G<32?(O=K<>>32-G,b=W<>>32-G):(O=W<>>64-G,b=K<>>64-G);var F=m[r[V]];F.high=O,F.low=b}var B=m[0],H=c[0];B.high=H.high,B.low=H.low;for(var k=0;k<5;k++)for(var E=0;E<5;E++){var V=k+5*E,y=c[V],q=m[V],re=m[(k+1)%5+5*E],ee=m[(k+2)%5+5*E];y.high=q.high^~re.high&ee.high,y.low=q.low^~re.low&ee.low}var y=c[0],Ce=h[i];y.high^=Ce.high,y.low^=Ce.low}},_doFinalize:function(){var w=this._data,g=w.words,c=this._nDataBytes*8,n=w.sigBytes*8,s=this.blockSize*32;g[n>>>5]|=1<<24-n%32,g[(u.ceil((n+1)/s)*s>>>5)-1]|=128,w.sigBytes=g.length*4,this._process();for(var d=this._state,S=this.cfg.outputLength/8,y=S/8,i=[],k=0;k>>24)&16711935|(b<<24|b>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,i.push(E),i.push(b)}return new f.init(i,S)},clone:function(){for(var w=l.clone.call(this),g=w._state=this._state.slice(0),c=0;c<25;c++)g[c]=g[c].clone();return w}});_.SHA3=l._createHelper(p),_.HmacSHA3=l._createHmacHelper(p)}(Math),M.SHA3})},"5nXd":function(I,J,P){var M=P("MFOe"),u=M.slice,_=M.pluck,D=M.each,f=M.bind,l=M.create,C=M.isList,v=M.isFunction,o=M.isObject;I.exports={createStore:h};var a={version:"2.0.12",enabled:!1,get:function(m,p){var w=this.storage.read(this._namespacePrefix+m);return this._deserialize(w,p)},set:function(m,p){return p===void 0?this.remove(m):(this.storage.write(this._namespacePrefix+m,this._serialize(p)),p)},remove:function(m){this.storage.remove(this._namespacePrefix+m)},each:function(m){var p=this;this.storage.each(function(w,g){m.call(p,p._deserialize(w),(g||"").replace(p._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(m){return this._namespacePrefix=="__storejs_"+m+"_"},createStore:function(){return h.apply(this,arguments)},addPlugin:function(m){this._addPlugin(m)},namespace:function(m){return h(this.storage,this.plugins,m)}};function r(){var m=typeof console=="undefined"?null:console;if(!m)return;var p=m.warn?m.warn:m.log;p.apply(m,arguments)}function h(m,p,w){w||(w=""),m&&!C(m)&&(m=[m]),p&&!C(p)&&(p=[p]);var g=w?"__storejs_"+w+"_":"",c=w?new RegExp("^"+g):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(w))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var s={_namespacePrefix:g,_namespaceRegexp:c,_testStorage:function(S){try{var y="__storejs__test__";S.write(y,y);var i=S.read(y)===y;return S.remove(y),i}catch(k){return!1}},_assignPluginFnProp:function(S,y){var i=this[y];this[y]=function(){var O=u(arguments,0),b=this;function E(){return i?(D(arguments,function(T,N){O[N]=T}),i.apply(b,O)):void 0}var x=[E].concat(O);return S.apply(b,x)}},_serialize:function(S){return JSON.stringify(S)},_deserialize:function(S,y){if(!S)return y;var i="";try{i=JSON.parse(S)}catch(k){i=S}return i!==void 0?i:y},_addStorage:function(S){if(this.enabled)return;this._testStorage(S)&&(this.storage=S,this.enabled=!0)},_addPlugin:function(S){var y=this;if(C(S)){D(S,function(O){y._addPlugin(O)});return}var i=_(this.plugins,function(O){return S===O});if(i)return;if(this.plugins.push(S),!v(S))throw new Error("Plugins must be function values that return objects");var k=S.call(this);if(!o(k))throw new Error("Plugins must return an object of function properties");D(k,function(O,b){if(!v(O))throw new Error("Bad plugin property: "+b+" from plugin "+S.name+". Plugins should only return functions.");y._assignPluginFnProp(O,b)})},addStorage:function(S){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(S)}},d=l(s,a,{plugins:[]});return d.raw={},D(d,function(S,y){v(S)&&(d.raw[y]=f(d,S))}),D(m,function(S){d._addStorage(S)}),D(p,function(S){d._addPlugin(S)}),d}},"6+eU":function(I,J,P){"use strict";P.d(J,"a",function(){return i});var M=P("wx14"),u=P("rePB"),_=P("VTBJ"),D=P("1OyB"),f=P("vuIU"),l=P("Ji7U"),C=P("LK+K"),v=P("q1tI"),o=P.n(v),a=P("TSYQ"),r=P.n(a),h=function(O){var b,E="".concat(O.rootPrefixCls,"-item"),x=r()(E,"".concat(E,"-").concat(O.page),(b={},Object(u.a)(b,"".concat(E,"-active"),O.active),Object(u.a)(b,O.className,!!O.className),Object(u.a)(b,"".concat(E,"-disabled"),!O.page),b)),T=function(){O.onClick(O.page)},N=function(L){O.onKeyPress(L,O.onClick,O.page)};return o.a.createElement("li",{title:O.showTitle?O.page:null,className:x,onClick:T,onKeyPress:N,tabIndex:"0"},O.itemRender(O.page,"page",o.a.createElement("a",{rel:"nofollow"},O.page)))},m=h,p={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},w=function(k){Object(l.a)(b,k);var O=Object(C.a)(b);function b(){var E;Object(D.a)(this,b);for(var x=arguments.length,T=new Array(x),N=0;N=0||j.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;E.setState({goInputText:""}),K(E.getValidValue())},E.go=function(j){var L=E.state.goInputText;if(L==="")return;(j.keyCode===p.ENTER||j.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(f.a)(b,[{key:"getValidValue",value:function(){var x=this.state,T=x.goInputText,N=x.current;return!T||isNaN(T)?N:Number(T)}},{key:"getPageSizeOptions",value:function(){var x=this.props,T=x.pageSize,N=x.pageSizeOptions;return N.some(function(j){return j.toString()===T.toString()})?N:N.concat([T.toString()]).sort(function(j,L){var V=isNaN(Number(j))?0:Number(j),K=isNaN(Number(L))?0:Number(L);return V-K})}},{key:"render",value:function(){var x=this,T=this.props,N=T.pageSize,j=T.locale,L=T.rootPrefixCls,V=T.changeSize,K=T.quickGo,W=T.goButton,G=T.selectComponentClass,F=T.buildOptionText,B=T.selectPrefixCls,H=T.disabled,q=this.state.goInputText,re="".concat(L,"-options"),ee=G,Ce=null,Ee=null,pe=null;if(!V&&!K)return null;var Me=this.getPageSizeOptions();if(V&&ee){var _e=Me.map(function(he,ce){return o.a.createElement(ee.Option,{key:ce,value:he.toString()},(F||x.buildOptionText)(he))});Ce=o.a.createElement(ee,{disabled:H,prefixCls:B,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(N||Me[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ce){return ce.parentNode}},_e)}return K&&(W&&(pe=typeof W=="boolean"?o.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:H,className:"".concat(re,"-quick-jumper-button")},j.jump_to_confirm):o.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),Ee=o.a.createElement("div",{className:"".concat(re,"-quick-jumper")},j.jump_to,o.a.createElement("input",{disabled:H,type:"text",value:q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,pe)),o.a.createElement("li",{className:"".concat(re)},Ce,Ee)}}]),b}(o.a.Component);w.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=w,c=P("N2Kk");function n(){}function s(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function d(k,O,b){return b}function S(k,O,b){var E=typeof k=="undefined"?O.pageSize:k;return Math.floor((b.total-1)/E)+1}var y=function(k){Object(l.a)(b,k);var O=Object(C.a)(b);function b(E){var x;Object(D.a)(this,b),x=O.call(this,E),x.getJumpPrevPage=function(){return Math.max(1,x.state.current-(x.props.showLessItems?3:5))},x.getJumpNextPage=function(){return Math.min(S(void 0,x.state,x.props),x.state.current+(x.props.showLessItems?3:5))},x.getItemIcon=function(V,K){var W=x.props.prefixCls,G=V||o.a.createElement("button",{type:"button","aria-label":K,className:"".concat(W,"-item-link")});return typeof V=="function"&&(G=o.a.createElement(V,Object(_.a)({},x.props))),G},x.savePaginationNode=function(V){x.paginationNode=V},x.isValid=function(V){return s(V)&&V!==x.state.current},x.shouldDisplayQuickJumper=function(){var V=x.props,K=V.showQuickJumper,W=V.pageSize,G=V.total;return G<=W?!1:K},x.handleKeyDown=function(V){(V.keyCode===p.ARROW_UP||V.keyCode===p.ARROW_DOWN)&&V.preventDefault()},x.handleKeyUp=function(V){var K=x.getValidValue(V),W=x.state.currentInputValue;K!==W&&x.setState({currentInputValue:K}),V.keyCode===p.ENTER?x.handleChange(K):V.keyCode===p.ARROW_UP?x.handleChange(K-1):V.keyCode===p.ARROW_DOWN&&x.handleChange(K+1)},x.changePageSize=function(V){var K=x.state.current,W=S(V,x.state,x.props);K=K>W?W:K,W===0&&(K=x.state.current),typeof V=="number"&&("pageSize"in x.props||x.setState({pageSize:V}),"current"in x.props||x.setState({current:K,currentInputValue:K})),x.props.onShowSizeChange(K,V),"onChange"in x.props&&x.props.onChange&&x.props.onChange(K,V)},x.handleChange=function(V){var K=x.props.disabled,W=V;if(x.isValid(W)&&!K){var G=S(void 0,x.state,x.props);W>G?W=G:W<1&&(W=1),"current"in x.props||x.setState({current:W,currentInputValue:W});var F=x.state.pageSize;return x.props.onChange(W,F),W}return x.state.current},x.prev=function(){x.hasPrev()&&x.handleChange(x.state.current-1)},x.next=function(){x.hasNext()&&x.handleChange(x.state.current+1)},x.jumpPrev=function(){x.handleChange(x.getJumpPrevPage())},x.jumpNext=function(){x.handleChange(x.getJumpNextPage())},x.hasPrev=function(){return x.state.current>1},x.hasNext=function(){return x.state.current2?W-2:0),F=2;F=N?L=N:L=Number(T),L}},{key:"getShowSizeChanger",value:function(){var x=this.props,T=x.showSizeChanger,N=x.total,j=x.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:N>j}},{key:"renderPrev",value:function(x){var T=this.props,N=T.prevIcon,j=T.itemRender,L=j(x,"prev",this.getItemIcon(N,"prev page")),V=!this.hasPrev();return Object(v.isValidElement)(L)?Object(v.cloneElement)(L,{disabled:V}):L}},{key:"renderNext",value:function(x){var T=this.props,N=T.nextIcon,j=T.itemRender,L=j(x,"next",this.getItemIcon(N,"next page")),V=!this.hasNext();return Object(v.isValidElement)(L)?Object(v.cloneElement)(L,{disabled:V}):L}},{key:"render",value:function(){var x=this,T=this.props,N=T.prefixCls,j=T.className,L=T.style,V=T.disabled,K=T.hideOnSinglePage,W=T.total,G=T.locale,F=T.showQuickJumper,B=T.showLessItems,H=T.showTitle,q=T.showTotal,re=T.simple,ee=T.itemRender,Ce=T.showPrevNextJumpers,Ee=T.jumpPrevIcon,pe=T.jumpNextIcon,Me=T.selectComponentClass,_e=T.selectPrefixCls,he=T.pageSizeOptions,ce=this.state,oe=ce.current,Se=ce.pageSize,te=ce.currentInputValue;if(K===!0&&W<=Se)return null;var ue=S(void 0,this.state,this.props),Oe=[],le=null,Q=null,Y=null,Z=null,be=null,ge=F&&F.goButton,Re=B?1:2,Ze=oe-1>0?oe-1:0,qe=oe+1=Re*2&&oe!==1+2&&(Oe[0]=Object(v.cloneElement)(Oe[0],{className:"".concat(N,"-item-after-jump-prev")}),Oe.unshift(le)),ue-oe>=Re*2&&oe!==ue-2&&(Oe[Oe.length-1]=Object(v.cloneElement)(Oe[Oe.length-1],{className:"".concat(N,"-item-before-jump-next")}),Oe.push(Q)),rt!==1&&Oe.unshift(Y),lt!==ue&&Oe.push(Z)}var Ue=null;q&&(Ue=o.a.createElement("li",{className:"".concat(N,"-total-text")},q(W,[W===0?0:(oe-1)*Se+1,oe*Se>W?W:oe*Se])));var ke=!this.hasPrev()||!ue,Ie=!this.hasNext()||!ue;return o.a.createElement("ul",Object(M.a)({className:r()(N,j,Object(u.a)({},"".concat(N,"-disabled"),V)),style:L,unselectable:"unselectable",ref:this.savePaginationNode},et),Ue,o.a.createElement("li",{title:H?G.prev_page:null,onClick:this.prev,tabIndex:ke?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(N,"-prev"),Object(u.a)({},"".concat(N,"-disabled"),ke)),"aria-disabled":ke},this.renderPrev(Ze)),Oe,o.a.createElement("li",{title:H?G.next_page:null,onClick:this.next,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(N,"-next"),Object(u.a)({},"".concat(N,"-disabled"),Ie)),"aria-disabled":Ie},this.renderNext(qe)),o.a.createElement(g,{disabled:V,locale:G,rootPrefixCls:N,selectComponentClass:Me,selectPrefixCls:_e,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:oe,pageSize:Se,pageSizeOptions:he,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(x,T){var N={};if("current"in x&&(N.current=x.current,x.current!==T.current&&(N.currentInputValue=N.current)),"pageSize"in x&&x.pageSize!==T.pageSize){var j=T.current,L=S(x.pageSize,T,x);j=j>L?L:j,"current"in x||(N.current=j,N.currentInputValue=j),N.pageSize=x.pageSize}return N}}]),b}(o.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:c.a,style:{},itemRender:d,totalBoundaryShowSizeChanger:50};var i=y},"6RRn":function(I,J,P){"use strict";var M=P("wCXF"),u=P("n6Qo");P.d(J,"b",function(){return u.a});var _=P("IBYe"),D=P("6eGT"),f=P("hW8S");P.d(J,"a",function(){return f.a}),J.c=M.b},"6eGT":function(I,J,P){"use strict";function M(u){return null}J.a=M},"7Cbv":function(I,J,P){"use strict";var M=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),u=new Uint8Array(16);function _(){if(!M)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return M(u)}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function f(m){return typeof m=="string"&&D.test(m)}for(var l=f,C=[],v=0;v<256;++v)C.push((v+256).toString(16).substr(1));function o(m){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(C[m[p+0]]+C[m[p+1]]+C[m[p+2]]+C[m[p+3]]+"-"+C[m[p+4]]+C[m[p+5]]+"-"+C[m[p+6]]+C[m[p+7]]+"-"+C[m[p+8]]+C[m[p+9]]+"-"+C[m[p+10]]+C[m[p+11]]+C[m[p+12]]+C[m[p+13]]+C[m[p+14]]+C[m[p+15]]).toLowerCase();if(!l(w))throw TypeError("Stringified UUID is invalid");return w}var a=o;function r(m,p,w){m=m||{};var g=m.random||(m.rng||_)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,p){w=w||0;for(var c=0;c<16;++c)p[w+c]=g[c];return p}return a(g)}var h=J.a=r},"7ahc":function(I,J,P){"use strict";P.d(J,"a",function(){return S});var M=P("k1fw"),u=P("0Owb"),_=P("+L6B"),D=P("2/Rp"),f=P("y8nQ"),l=P("Vl3Y"),C=P("tJVT"),v=P("OaEy"),o=P("2fM7"),a=P("q1tI"),r=P.n(a),h=P("VrN/"),m=P.n(h),p=P("p77/"),w=P.n(p),g=P("c5Ni"),c=P.n(g),n=o.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},d={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};J.b=function(y){var i=y.callback,k=y.onCancel,O=Object(a.useState)("python"),b=Object(C.a)(O,2),E=b[0],x=b[1];function T(j){x(d[j][1])}function N(j){i(j)}return r.a.createElement(l.a,Object(u.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:N}),r.a.createElement(l.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(o.a,{onChange:T},Object.keys(d).map(function(j){return r.a.createElement(n,{key:j,value:j},d[j][0])}))),r.a.createElement(l.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(S,{mode:E})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(D.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function S(y){var i=y.value,k=y.onChange,O=y.mode,b=y.options,E=b===void 0?{}:b,x=Object(a.useRef)(),T=Object(a.useState)(),N=Object(C.a)(T,2),j=N[0],L=N[1];return Object(a.useEffect)(function(){if(j){function V(K){var W=K.getValue();k&&k(W)}return j.on("change",V),function(){j.off("change",V)}}},[j,k]),Object(a.useEffect)(function(){j&&j.setOption("mode",O)},[j,O]),Object(a.useEffect)(function(){j&&((i!==j.getValue()||i==="")&&setTimeout(function(){j.setValue(i||" ")},300))},[j,i]),Object(a.useEffect)(function(){if(x.current&&!j){var V=m.a.fromTextArea(x.current,Object(M.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));L(V)}},[x.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:x}))}},"815F":function(I,J,P){"use strict";P.d(J,"e",function(){return C}),P.d(J,"c",function(){return o}),P.d(J,"d",function(){return a}),P.d(J,"a",function(){return h}),P.d(J,"f",function(){return m}),P.d(J,"b",function(){return p});var M=P("KQm4"),u=P("VTBJ"),_=P("Ff2n"),D=P("Zm9Q"),f=P("Kwbf"),l=P("OZM5");function C(w,g){return w!=null?w:g}function v(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=new Map;function c(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(d){var S=d.key,y=d.children;Object(f.a)(S!=null,"Tree node must have a certain key: [".concat(s).concat(S,"]"));var i=String(S);Object(f.a)(!g.has(i)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(i)),g.set(i,!0),c(y,"".concat(s).concat(i," > "))})}c(w)}function o(w){function g(c){var n=Object(D.a)(c);return n.map(function(s){if(!Object(l.i)(s))return Object(f.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var d=s.key,S=s.props,y=S.children,i=Object(_.a)(S,["children"]),k=Object(u.a)({key:d},i),O=g(y);return O.length&&(k.children=O),k}).filter(function(s){return s})}return g(w)}function a(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(g===!0?[]:g),n=[];function s(d){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return d.map(function(y,i){var k=Object(l.h)(S?S.pos:"0",i),O=C(y.key,k),b=Object(u.a)(Object(u.a)({},y),{},{parent:S,pos:k,children:null,data:y,isStart:[].concat(Object(M.a)(S?S.isStart:[]),[i===0]),isEnd:[].concat(Object(M.a)(S?S.isEnd:[]),[i===d.length-1])});return n.push(b),g===!0||c.has(O)?b.children=s(y.children||[],b):b.children=[],b})}return s(w),n}function r(w,g,c){var n;c?typeof c=="string"?n=function(S){return S[c]}:typeof c=="function"&&(n=function(S){return c(S)}):n=function(S,y){return C(S.key,y)};function s(d,S,y){var i=d?d.children:w,k=d?Object(l.h)(y.pos,S):"0";if(d){var O=n(d,k),b={node:d,index:S,pos:k,key:O,parentPos:y.node?y.pos:null,level:y.level+1};g(b)}i&&i.forEach(function(E,x){s(E,x,{node:d,pos:k,level:y?y.level+1:-1})})}s(null)}function h(w){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=g.initWrapper,n=g.processEntity,s=g.onProcessFinished,d=arguments.length>2?arguments[2]:void 0,S={},y={},i={posEntities:S,keyEntities:y};return c&&(i=c(i)||i),r(w,function(k){var O=k.node,b=k.index,E=k.pos,x=k.key,T=k.parentPos,N=k.level,j={node:O,index:b,key:x,pos:E,level:N},L=C(x,E);S[E]=j,y[L]=j,j.parent=S[T],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,i)},d),s&&s(i),i}function m(w,g){var c=g.expandedKeys,n=g.selectedKeys,s=g.loadedKeys,d=g.loadingKeys,S=g.checkedKeys,y=g.halfCheckedKeys,i=g.dragOverNodeKey,k=g.dropPosition,O=g.keyEntities,b=O[w],E={eventKey:w,expanded:c.indexOf(w)!==-1,selected:n.indexOf(w)!==-1,loaded:s.indexOf(w)!==-1,loading:d.indexOf(w)!==-1,checked:S.indexOf(w)!==-1,halfChecked:y.indexOf(w)!==-1,pos:String(b?b.pos:""),dragOver:i===w&&k===0,dragOverGapTop:i===w&&k===-1,dragOverGapBottom:i===w&&k===1};return E}function p(w){var g=w.data,c=w.expanded,n=w.selected,s=w.checked,d=w.loaded,S=w.loading,y=w.halfChecked,i=w.dragOver,k=w.dragOverGapTop,O=w.dragOverGapBottom,b=w.pos,E=w.active,x=Object(u.a)(Object(u.a)({},g),{},{expanded:c,selected:n,checked:s,loaded:d,loading:S,halfChecked:y,dragOver:i,dragOverGapTop:k,dragOverGapBottom:O,pos:b,active:E});return"props"in x||Object.defineProperty(x,"props",{get:function(){return Object(f.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),w}}),x}},"8EBN":function(I,J,P){(function(M){M(P("VrN/"))})(function(M){"use strict";M.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var u=0;u-1&&D.substring(C+1,D.length);if(v)return M.findModeByExtension(v)},M.findModeByName=function(D){D=D.toLowerCase();for(var f=0;f=ne.length?de.slice(ne.length):de}).join(`
`)}var c=[],n=[""],s=new p.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){c.length=0,n=[""]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function i(se,z,X,ne){if(z>=se.length||se[z].level<=X)return z;var de=se[z];ne.push("- "+de.text+""),z++;var ie=[];return z=i(se,z,de.level,ie),ie.length>0&&(ne.push("
"),ie.forEach(function(ze){ne.push(ze)}),ne.push("
")),ne.push(" "),z=i(se,z,X,ne),z}function k(){return i(c,0,0,n),n.push("
"),n.join("")}var O={heading:function(z){var X=d.exec(z);if(X)return{type:"heading",raw:X[0],depth:X[1].length,text:X[2]}},fences:function(z){var X=this.rules.block.fences.exec(z);if(X){var ne=X[0],de=g(ne,X[3]||""),ie=X[2]?X[2].trim():X[2];if(["latex","katex","math"].indexOf(ie)>=0){var ze=x(),ht=de;de=ze,T[ze]={type:"block",expression:ht}}return{type:"code",raw:ne,lang:ie,text:de}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,E=0,x=function(){return"__special_katext_id_".concat(E++,"__")},T={};function N(){return T}function j(){E=0,T={}}function L(se){return se=se.replace(b,function(z,X){var ne=x();return T[ne]={type:"inline",expression:X},ne}),se}var V=s.listitem;s.listitem=function(se){return V(L(se))};var K=s.paragraph;s.paragraph=function(se){return K(L(se))};var W=s.tablecell;s.tablecell=function(se,z){return W(L(se),z)},s.code=function(se,z,X){var ne=(z||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"".concat(se,"
"):'
').concat(X?se:Object(w.escape)(se,!0),`
`):''+(X?se:Object(w.escape)(se,!0))+"
"},s.heading=function(se,z,X){var ne=this.options.headerPrefix+X.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ne,level:z,text:se}),"'+se+""},p.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),p.a.use({tokenizer:O,renderer:s});var G=p.a,F=P("SJMd"),B=P("ulZh"),H=P.n(B),q=P("m3rI"),re=P("Oy/b"),ee=P("p5ED"),Ce=P("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ee=function(se,z){return(Ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,ne){X.__proto__=ne}||function(X,ne){for(var de in ne)Object.prototype.hasOwnProperty.call(ne,de)&&(X[de]=ne[de])})(se,z)};function pe(se,z){function X(){this.constructor=se}Ee(se,z),se.prototype=z===null?Object.create(z):(X.prototype=z.prototype,new X)}function Me(se,z,X,ne){return new(X||(X=Promise))(function(de,ie){function ze(Pt){try{St(ne.next(Pt))}catch(pt){ie(pt)}}function ht(Pt){try{St(ne.throw(Pt))}catch(pt){ie(pt)}}function St(Pt){var pt;Pt.done?de(Pt.value):(pt=Pt.value,pt instanceof X?pt:new X(function(Ht){Ht(pt)})).then(ze,ht)}St((ne=ne.apply(se,z||[])).next())})}function _e(se,z){var X,ne,de,ie,ze={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return ie={next:ht(0),throw:ht(1),return:ht(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function ht(St){return function(Pt){return function(pt){if(X)throw new TypeError("Generator is already executing.");for(;ze;)try{if(X=1,ne&&(de=2&pt[0]?ne.return:pt[0]?ne.throw||((de=ne.return)&&de.call(ne),0):ne.next)&&!(de=de.call(ne,pt[1])).done)return de;switch(ne=0,de&&(pt=[2&pt[0],de.value]),pt[0]){case 0:case 1:de=pt;break;case 4:return ze.label++,{value:pt[1],done:!1};case 5:ze.label++,ne=pt[1],pt=[0];continue;case 7:pt=ze.ops.pop(),ze.trys.pop();continue;default:if(!(de=ze.trys,(de=de.length>0&&de[de.length-1])||pt[0]!==6&&pt[0]!==2)){ze=0;continue}if(pt[0]===3&&(!de||pt[1]>de[0]&&pt[1]',"select"),this.addActionButton(ne,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ne,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ne,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ne,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ne,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ne,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ne,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(ie){var ze=document.createElement("div");ze.className=""+X.toolbarButtonStyleClass.name,ze.setAttribute("data-type-name",ie.typeName),ze.innerHTML=ie.icon,ze.addEventListener("click",function(){X.markerToolbarButtonClicked(ze,ie)}),X.buttons.push(ze),X.markerButtons.push(ze)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var de=document.createElement("div");de.className=this.toolbarBlockStyleClass.name,de.style.whiteSpace="nowrap",de.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(de),this.addActionButton(de,'',"render"),this.addActionButton(de,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(z){this.buttonClickListeners.push(z)},se.prototype.removeButtonClickListener=function(z){this.buttonClickListeners.indexOf(z)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(z),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var z=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var X=0;X0&&this.buttonClickListeners.forEach(function(ne){return ne("marker",X)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(z,X){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("action",X)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.prototype.setActiveButton=function(z){this.resetButtonStyles(),z.className=z.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),z.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},se.prototype.setActiveMarkerButton=function(z){var X=this.markerButtons.find(function(ne){return ne.getAttribute("data-type-name")===z});X&&this.setActiveButton(X)},se.prototype.setCurrentMarker=function(z){var X=this;this.currentMarker=z,this.buttons.filter(function(ne){return/delete|notes/.test(ne.getAttribute("data-action"))}).forEach(function(ne){X.currentMarker===void 0?(ne.style.fillOpacity="0.4",ne.style.pointerEvents="none"):(ne.style.fillOpacity="1",ne.style.pointerEvents="all")})},se}(),Y=function(){function se(z,X,ne,de){this.panels=[],this.panelButtons=[],this.markerjsContainer=z,this.displayMode=X,this.uiStyleSettings=ne,this.styles=de,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var z;this.toolboxStyleClass=this.styles.addClass(new le("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new le("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var X=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new le("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new le("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new le("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new le("toolbox-panel-row_colors",`
background-color: `+((z=this.uiStyleSettings.toolboxBackgroundColor)!==null&&z!==void 0?z:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new le("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*X)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*X)+`px;
padding: `+X+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new le("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new le("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Oe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(z){var X;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=z,this.uiContainer.className=this.toolboxStyleClass.name+" "+((X=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(z){var X,ne,de=this;this.panels=z,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((X=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&X!==void 0?X:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ne!==void 0?ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ie){var ze;ie.uiStyleSettings=de.uiStyleSettings;var ht=document.createElement("div");ht.className=de.toolboxButtonStyleClass.name+" "+((ze=de.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:de.toolboxButtonStyleColorsClass.name),ht.innerHTML=ie.icon,ht.title=ie.title,ht.addEventListener("click",function(){de.panelButtonClick(ie)}),de.panelButtons.push(ht),de.buttonRow.appendChild(ht)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(z){var X=this,ne=-1;if(z!==this.activePanel){ne=this.panels.indexOf(z),this.panelRow.innerHTML="";var de=z.getUi();de.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(de),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=z}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){X.displayMode==="inline"?X.panelRow.style.display="none":X.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ie,ze){var ht,St;ie.className=X.toolboxButtonStyleClass.name+" "+(ze===ne?""+((ht=X.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ht!==void 0?ht:X.toolboxActiveButtonStyleColorsClass.name):""+((St=X.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&St!==void 0?St:X.toolboxButtonStyleColorsClass.name))})},se}(),Z=function(se,z){this.title=se,this.icon=z},be=function(se){function z(X,ne,de,ie){var ze=se.call(this,X,ie||'')||this;return ze.colors=[],ze.addTransparent=!1,ze.colorBoxes=[],ze.colors=ne,ze.currentColor=de,ze.setCurrentColor=ze.setCurrentColor.bind(ze),ze.getColorBox=ze.getColorBox.bind(ze),ze}return pe(z,se),z.prototype.getUi=function(){var X=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.whiteSpace="nowrap",this.colors.forEach(function(de){var ie=X.getColorBox(de);ne.appendChild(ie),X.colorBoxes.push(ie)}),ne},z.prototype.getColorBox=function(X){var ne=this,de=this.uiStyleSettings.toolbarHeight/4,ie=this.uiStyleSettings.toolbarHeight-de,ze=document.createElement("div");ze.style.display="inline-block",ze.style.boxSizing="content-box",ze.style.width=ie-2+"px",ze.style.height=ie-2+"px",ze.style.padding="1px",ze.style.marginRight="2px",ze.style.marginBottom="2px",ze.style.borderWidth="2px",ze.style.borderStyle="solid",ze.style.borderRadius=(ie+2)/2+"px",ze.style.borderColor=X===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ze.addEventListener("click",function(){ne.setCurrentColor(X,ze)});var ht=document.createElement("div");return ht.style.display="inline-block",ht.style.width=ie-2+"px",ht.style.height=ie-2+"px",ht.style.backgroundColor=X,ht.style.borderRadius=ie/2+"px",X==="transparent"&&(ht.style.fill=this.uiStyleSettings.toolboxAccentColor,ht.innerHTML=``),ze.appendChild(ht),ze},z.prototype.setCurrentColor=function(X,ne){var de=this;this.currentColor=X,this.colorBoxes.forEach(function(ie){ie.style.borderColor=ie===ne?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(X)},z}(Z),ge=function(){function se(z,X,ne){this._state="new",this._isSelected=!1,this._container=z,this._overlayContainer=X,this.globalSettings=ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(z){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(z,X){},se.prototype.dblClick=function(z,X){},se.prototype.manipulate=function(z){},se.prototype.pointerUp=function(z){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(z){this.container.childNodes.length>0?this.container.insertBefore(z,this.container.childNodes[0]):this.container.appendChild(z)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(z){this._state=z.state,this.notes=z.notes},se.prototype.scale=function(z,X){},se.prototype.colorChanged=function(z){this.onColorChanged&&this.onColorChanged(z),this.stateChanged()},se.prototype.fillColorChanged=function(z){this.onFillColorChanged&&this.onFillColorChanged(z),this.stateChanged()},se.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var z=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),z.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(z)&&this.onStateChanged(this)}},se.typeName="MarkerBase",se}(),Re=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.prototype.findGripByVisual=function(z){return this.topLeft.ownsTarget(z)?this.topLeft:this.topCenter.ownsTarget(z)?this.topCenter:this.topRight.ownsTarget(z)?this.topRight:this.centerLeft.ownsTarget(z)?this.centerLeft:this.centerRight.ownsTarget(z)?this.centerRight:this.bottomLeft.ownsTarget(z)?this.bottomLeft:this.bottomCenter.ownsTarget(z)?this.bottomCenter:this.bottomRight.ownsTarget(z)?this.bottomRight:void 0},se}(),Ze=function(){function se(){this.GRIP_SIZE=10,this.visual=ce.createGroup(),this.visual.appendChild(ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},se}(),qe=function(){function se(){}return se.toITransformMatrix=function(z){return{a:z.a,b:z.b,c:z.c,d:z.d,e:z.e,f:z.f}},se.toSVGMatrix=function(z,X){return z.a=X.a,z.b=X.b,z.c=X.c,z.d=X.d,z.e=X.e,z.f=X.f,z},se}(),et=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.left=0,ie.top=0,ie.width=0,ie.height=0,ie.defaultSize={x:50,y:20},ie.offsetX=0,ie.offsetY=0,ie.rotationAngle=0,ie.CB_DISTANCE=10,ie._suppressMarkerCreateEvent=!1,ie.container.transform.baseVal.appendItem(ce.createTransform()),ie.setupControlBox(),ie}return pe(z,se),Object.defineProperty(z.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"visual",{get:function(){return this._visual},set:function(X){this._visual=X;var ne=ce.createTransform();this._visual.transform.baseVal.appendItem(ne)},enumerable:!1,configurable:!0}),z.prototype.ownsTarget=function(X){return!!se.prototype.ownsTarget.call(this,X)||!!(this.controlGrips.findGripByVisual(X)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(X))},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.state==="new"&&(this.left=X.x,this.top=X.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var de=this.unrotatePoint(X);if(this.manipulationStartX=de.x,this.manipulationStartY=de.y,this.offsetX=de.x-this.left,this.offsetY=de.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ne)){this.activeGrip=this.rotatorGrip;var ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ie.x-this.width/2,this.top=ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ze=this.container.transform.baseVal.getItem(0);ze.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ze,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},z.prototype.pointerUp=function(X){var ne=this.state;se.prototype.pointerUp.call(this,X),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(X),this._state="select",ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},z.prototype.moveVisual=function(X){this.visual.style.transform="translate("+X.x+"px, "+X.y+"px)"},z.prototype.manipulate=function(X){var ne=this.unrotatePoint(X);this.state==="creating"?this.resize(X):this.state==="move"?(this.left=this.manipulationStartLeft+(ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ne):this.state==="rotate"&&this.rotate(X)},z.prototype.resize=function(X){var ne=this.manipulationStartLeft,de=this.manipulationStartWidth,ie=this.manipulationStartTop,ze=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ne=this.manipulationStartLeft+X.x-this.manipulationStartX,de=this.manipulationStartWidth+this.manipulationStartLeft-ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:de=this.manipulationStartWidth+X.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ie=this.manipulationStartTop+X.y-this.manipulationStartY,ze=this.manipulationStartHeight+this.manipulationStartTop-ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ze=this.manipulationStartHeight+X.y-this.manipulationStartY}de>=0?(this.left=ne,this.width=de):(this.left=ne+de,this.width=-de),ze>=0?(this.top=ie,this.height=ze):(this.top=ie+ze,this.height=-ze),this.setSize()},z.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},z.prototype.rotate=function(X){if(Math.abs(X.x-this.centerX)>.1){var ne=Math.sign(X.x-this.centerX);this.rotationAngle=180*Math.atan((X.y-this.centerY)/(X.x-this.centerX))/Math.PI+90*ne,this.applyRotation()}},z.prototype.applyRotation=function(){var X=this.container.transform.baseVal.getItem(0);X.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(X,0)},z.prototype.rotatePoint=function(X){if(this.rotationAngle===0)return X;var ne=this.container.getCTM(),de=ce.createPoint(X.x,X.y);return{x:(de=de.matrixTransform(ne)).x,y:de.y}},z.prototype.unrotatePoint=function(X){if(this.rotationAngle===0)return X;var ne=this.container.getCTM();ne=ne.inverse();var de=ce.createPoint(X.x,X.y);return{x:(de=de.matrixTransform(ne)).x,y:de.y}},z.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=ce.createGroup();var X=ce.createTransform();X.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(X),this.container.appendChild(this.controlBox),this.controlRect=ce.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ce.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Re,this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){var X=this.controlBox.transform.baseVal.getItem(0);X.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(X,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},z.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},z.prototype.createGrip=function(){var X=new Ze;return X.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(X.visual),X},z.prototype.positionGrips=function(){var X=this.controlGrips.topLeft.GRIP_SIZE,ne=-X/2,de=ne,ie=(this.width+this.CB_DISTANCE)/2-X/2,ze=(this.height+this.CB_DISTANCE)/2-X/2,ht=this.height+this.CB_DISTANCE-X/2,St=this.width+this.CB_DISTANCE-X/2;this.positionGrip(this.controlGrips.topLeft.visual,ne,de),this.positionGrip(this.controlGrips.topCenter.visual,ie,de),this.positionGrip(this.controlGrips.topRight.visual,St,de),this.positionGrip(this.controlGrips.centerLeft.visual,ne,ze),this.positionGrip(this.controlGrips.centerRight.visual,St,ze),this.positionGrip(this.controlGrips.bottomLeft.visual,ne,ht),this.positionGrip(this.controlGrips.bottomCenter.visual,ie,ht),this.positionGrip(this.controlGrips.bottomRight.visual,St,ht),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ie,de-3*this.CB_DISTANCE)},z.prototype.positionGrip=function(X,ne,de){var ie=X.transform.baseVal.getItem(0);ie.setTranslate(ne,de),X.transform.baseVal.replaceItem(ie,0)},z.prototype.hideControlBox=function(){this.controlBox.style.display="none"},z.prototype.showControlBox=function(){this.controlBox.style.display=""},z.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},z.prototype.restoreState=function(X){se.prototype.restoreState.call(this,X);var ne=X;this.left=ne.left,this.top=ne.top,this.width=ne.width,this.height=ne.height,this.rotationAngle=ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ne.containerTransformMatrix))},z.prototype.scale=function(X,ne){se.prototype.scale.call(this,X,ne);var de=this.rotatePoint({x:this.left,y:this.top}),ie=this.unrotatePoint({x:de.x*X,y:de.y*ne});this.left=ie.x,this.top=ie.y,this.width=this.width*X,this.height=this.height*ne,this.adjustControlBox()},z}(ge),nt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.visual)},z.prototype.createVisual=function(){this.visual=ce.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},z.prototype.manipulate=function(X){se.prototype.manipulate.call(this,X)},z.prototype.resize=function(X){se.prototype.resize.call(this,X),this.setSize()},z.prototype.setSize=function(){se.prototype.setSize.call(this),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function(X){se.prototype.pointerUp.call(this,X),this.setSize()},z.prototype.setStrokeColor=function(X){this.strokeColor=X,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(X),this.stateChanged()},z.prototype.setFillColor=function(X){this.fillColor=X,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},z.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},z.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this))},z.prototype.restoreState=function(X){var ne=X;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,X),this.setSize()},z.prototype.scale=function(X,ne){se.prototype.scale.call(this,X,ne),this.setSize()},z.title="Rectangle marker",z}(et),ut=function(se){function z(X,ne,de,ie){var ze=se.call(this,X,ie||'')||this;return ze.widths=[],ze.widthBoxes=[],ze.widths=ne,ze.currentWidth=de,ze.setCurrentWidth=ze.setCurrentWidth.bind(ze),ze}return pe(z,se),z.prototype.getUi=function(){var X=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.widths.forEach(function(de){var ie=document.createElement("div");ie.style.display="flex",ie.style.flexGrow="2",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=de===X.currentWidth?X.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){X.setCurrentWidth(de,ie)}),ne.appendChild(ie);var ze=document.createElement("div");ze.innerText=de.toString(),ze.style.marginRight="5px",ie.appendChild(ze);var ht=document.createElement("div");ht.style.minHeight="20px",ht.style.flexGrow="2",ht.style.display="flex",ht.style.alignItems="center";var St=document.createElement("hr");St.style.minWidth="20px",St.style.border="0px",St.style.borderTop=de+"px solid "+X.uiStyleSettings.toolboxColor,St.style.flexGrow="2",ht.appendChild(St),ie.appendChild(ht),X.widthBoxes.push(ie)}),ne},z.prototype.setCurrentWidth=function(X,ne){var de=this;this.currentWidth=X,this.widthBoxes.forEach(function(ie){ie.style.borderColor=ie===ne?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},z}(Z),ot=function(se){function z(X,ne,de,ie){var ze=se.call(this,X,ie||'')||this;return ze.styles=[],ze.styleBoxes=[],ze.styles=ne,ze.currentStyle=de,ze.setCurrentStyle=ze.setCurrentStyle.bind(ze),ze}return pe(z,se),z.prototype.getUi=function(){var X=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.styles.forEach(function(de){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/X.styles.length-5+"%",ie.style.borderColor=de===X.currentStyle?X.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){X.setCurrentStyle(de,ie)}),ne.appendChild(ie);var ze=document.createElement("div");ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.overflow="hidden";var ht=``;ze.innerHTML=ht,ie.appendChild(ze),X.styleBoxes.push(ie)}),ne},z.prototype.setCurrentStyle=function(X,ne){var de=this;this.currentStyle=X,this.styleBoxes.forEach(function(ie){ie.style.borderColor=ie===ne?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},z}(Z),je=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.strokeColor=de.defaultColor,ie.strokeWidth=de.defaultStrokeWidth,ie.strokeDasharray=de.defaultStrokeDasharray,ie.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ut("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ot("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return pe(z,se),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=se.prototype.getState.call(this);return X.typeName=z.typeName,X},z.typeName="FrameMarker",z.title="Frame marker",z.icon='',z}(nt),De=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},rt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.x1=0,ie.y1=0,ie.x2=0,ie.y2=0,ie.defaultLength=50,ie.manipulationStartX=0,ie.manipulationStartY=0,ie.manipulationStartX1=0,ie.manipulationStartY1=0,ie.manipulationStartX2=0,ie.manipulationStartY2=0,ie.setupControlBox(),ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!!se.prototype.ownsTarget.call(this,X)||!(!this.grip1.ownsTarget(X)&&!this.grip2.ownsTarget(X))},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.manipulationStartX=X.x,this.manipulationStartY=X.y,this.state==="new"&&(this.x1=X.x,this.y1=X.y,this.x2=X.x,this.y2=X.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},z.prototype.pointerUp=function(X){var ne=this.state;se.prototype.pointerUp.call(this,X),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(X),this._state="select",ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},z.prototype.adjustVisual=function(){},z.prototype.manipulate=function(X){this.state==="creating"?this.resize(X):this.state==="move"?(this.x1=this.manipulationStartX1+X.x-this.manipulationStartX,this.y1=this.manipulationStartY1+X.y-this.manipulationStartY,this.x2=this.manipulationStartX2+X.x-this.manipulationStartX,this.y2=this.manipulationStartY2+X.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(X)},z.prototype.resize=function(X){switch(this.activeGrip){case this.grip1:this.x1=X.x,this.y1=X.y;break;case this.grip2:case void 0:this.x2=X.x,this.y2=X.y}this.adjustVisual(),this.adjustControlBox()},z.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},z.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},z.prototype.setupControlBox=function(){this.controlBox=ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},z.prototype.adjustControlBox=function(){this.positionGrips()},z.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},z.prototype.createGrip=function(){var X=new Ze;return X.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(X.visual),X},z.prototype.positionGrips=function(){var X=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-X/2,this.y1-X/2),this.positionGrip(this.grip2.visual,this.x2-X/2,this.y2-X/2)},z.prototype.positionGrip=function(X,ne,de){var ie=X.transform.baseVal.getItem(0);ie.setTranslate(ne,de),X.transform.baseVal.replaceItem(ie,0)},z.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},z.prototype.restoreState=function(X){se.prototype.restoreState.call(this,X);var ne=X;this.x1=ne.x1,this.y1=ne.y1,this.x2=ne.x2,this.y2=ne.y2},z.prototype.scale=function(X,ne){se.prototype.scale.call(this,X,ne),this.x1=this.x1*X,this.y1=this.y1*ne,this.x2=this.x2*X,this.y2=this.y2*ne,this.adjustVisual(),this.adjustControlBox()},z}(ge),lt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.strokeColor=de.defaultColor,ie.strokeWidth=de.defaultStrokeWidth,ie.strokeDasharray=de.defaultStrokeDasharray,ie.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ut("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ot("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.selectorLine&&X!==this.visibleLine)},z.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},z.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setStrokeColor=function(X){this.strokeColor=X,this.adjustVisual(),this.colorChanged(X)},z.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.adjustVisual()},z.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){se.prototype.restoreState.call(this,X);var ne=X;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.createVisual(),this.adjustVisual()},z.typeName="LineMarker",z.title="Line marker",z.icon='',z}(rt),Je=function(se){function z(X,ne,de,ie){var ze=se.call(this,X,ie||'')||this;return ze.fonts=[],ze.fontBoxes=[],ze.fonts=ne,ze.currentFont=de,ze.setCurrentFont=ze.setCurrentFont.bind(ze),ze}return pe(z,se),z.prototype.getUi=function(){var X=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.flexGrow="2",this.fonts.forEach(function(de){var ie=document.createElement("div");ie.style.display="inline-block",ie.style.alignItems="center",ie.style.justifyContent="space-between",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.overflow="hidden",ie.style.maxWidth=100/X.fonts.length-5+"%",ie.style.borderColor=de===X.currentFont?X.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){X.setCurrentFont(de,ie)}),ne.appendChild(ie);var ze=document.createElement("div");ze.style.display="flex",ze.style.minHeight="20px",ze.style.flexGrow="2",ze.style.fontFamily=de,ze.style.overflow="hidden";var ht=document.createElement("div");ht.style.whiteSpace="nowrap",ht.style.overflow="hidden",ht.style.textOverflow="ellipsis",ht.innerHTML="The quick brown fox jumps over the lazy dog",ze.appendChild(ht),ie.appendChild(ze),X.fontBoxes.push(ie)}),ne},z.prototype.setCurrentFont=function(X,ne){var de=this;this.currentFont=X,this.fontBoxes.forEach(function(ie){ie.style.borderColor=ie===ne?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},z}(Z),tt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.color="transparent",ie.padding=5,ie.DEFAULT_TEXT="your text here",ie.text=ie.DEFAULT_TEXT,ie.isMoved=!1,ie.color=de.defaultColor,ie.fontFamily=de.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setColor=ie.setColor.bind(ie),ie.setFont=ie.setFont.bind(ie),ie.renderText=ie.renderText.bind(ie),ie.sizeText=ie.sizeText.bind(ie),ie.textEditDivClicked=ie.textEditDivClicked.bind(ie),ie.showTextEditor=ie.showTextEditor.bind(ie),ie.setSize=ie.setSize.bind(ie),ie.positionTextEditor=ie.positionTextEditor.bind(ie),ie.colorPanel=new be("Color",de.defaultColorSet,de.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.fontFamilyPanel=new Je("Font",de.defaultFontFamilies,de.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie}return pe(z,se),z.prototype.ownsTarget=function(X){if(se.prototype.ownsTarget.call(this,X)||X===this.visual||X===this.textElement||X===this.bgRectangle)return!0;var ne=!1;return this.textElement.childNodes.forEach(function(de){de===X&&(ne=!0)}),ne},z.prototype.createVisual=function(){this.visual=ce.createGroup(),this.bgRectangle=ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.isMoved=!1,this.pointerDownPoint=X,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},z.prototype.renderText=function(){var X=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ne){X.textElement.appendChild(ce.createTSpan(ne.trim()===""?" ":ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},z.prototype.getTextScale=function(){var X=this.textElement.getBBox(),ne=1;if(X.width>0&&X.height>0){var de=(1*this.width-this.width*this.padding*2/100)/X.width,ie=(1*this.height-this.height*this.padding*2/100)/X.height;ne=Math.min(de,ie)}return ne},z.prototype.getTextPosition=function(X){var ne=this.textElement.getBBox(),de=0,ie=0;return ne.width>0&&ne.height>0&&(de=(this.width-ne.width*X)/2,ie=this.height/2-ne.height*X/2),{x:de,y:ie}},z.prototype.sizeText=function(){var X=this.textElement.getBBox(),ne=this.getTextScale(),de=this.getTextPosition(ne);de.y-=X.y*ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+de.x+"px, "+de.y+"px) scale("+ne+", "+ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(de.x,de.y),this.textElement.transform.baseVal.getItem(1).setScale(ne,ne))},z.prototype.manipulate=function(X){se.prototype.manipulate.call(this,X),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(X.x-this.pointerDownPoint.x)>5||Math.abs(X.y-this.pointerDownPoint.y)>5)},z.prototype.resize=function(X){se.prototype.resize.call(this,X),this.isMoved=!0,this.setSize(),this.sizeText()},z.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},z.prototype.pointerUp=function(X){var ne=this.state;ne==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,X),this.setSize(),(ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},z.prototype.showTextEditor=function(){var X=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ne){ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ne=Number.parseFloat(X.textEditor.style.fontSize);X.textEditor.clientWidth>=Number.parseInt(X.textEditor.style.maxWidth)&&ne>.9;)ne-=.1,X.textEditor.style.fontSize=Math.max(ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ne){ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ne){if(ne.clipboardData){var de=ne.clipboardData.getData("text"),ie=window.getSelection();if(!ie.rangeCount)return!1;ie.deleteFromDocument(),ie.getRangeAt(0).insertNode(document.createTextNode(de)),ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){X.textEditDivClicked(X.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},z.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var X=this.getTextScale(),ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),de=this.textElement.getBBox(),ie={x:de.width*X,y:de.height*X};ne.x-=ie.x/2,ne.y-=ie.y/2,this.textEditor.style.top=ne.y+"px",this.textEditor.style.left=ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ne.x+"px",this.textEditor.style.fontSize=Math.max(16*X,12)+"px",this.textElement.style.display="none"}},z.prototype.textEditDivClicked=function(X){this.text=X.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},z.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},z.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},z.prototype.dblClick=function(X,ne){se.prototype.dblClick.call(this,X,ne),this.showTextEditor()},z.prototype.setColor=function(X){this.textElement&&ce.setAttributes(this.textElement,[["fill",X]]),this.color=X,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(X)},z.prototype.setFont=function(X){this.textElement&&ce.setAttributes(this.textElement,[["font-family",X]]),this.fontFamily=X,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},z.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},z.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){var ne=X;this.color=ne.color,this.fontFamily=ne.fontFamily,this.padding=ne.padding,this.text=ne.text,this.createVisual(),se.prototype.restoreState.call(this,X),this.setSize()},z.prototype.scale=function(X,ne){se.prototype.scale.call(this,X,ne),this.setSize(),this.sizeText(),this.positionTextEditor()},z.typeName="TextMarker",z.title="Text marker",z.icon='',z}(et),Ue=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.color="transparent",ie.lineWidth=3,ie.drawing=!1,ie.pixelRatio=1,ie.color=de.defaultColor,ie.lineWidth=de.defaultStrokeWidth,ie.pixelRatio=de.freehandPixelRatio,ie.setColor=ie.setColor.bind(ie),ie.addCanvas=ie.addCanvas.bind(ie),ie.finishCreation=ie.finishCreation.bind(ie),ie.setLineWidth=ie.setLineWidth.bind(ie),ie.colorPanel=new be("Color",de.defaultColorSet,de.defaultColor),ie.colorPanel.onColorChanged=ie.setColor,ie.lineWidthPanel=new ut("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),ie.lineWidthPanel.onWidthChanged=ie.setLineWidth,ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.drawingImage)},z.prototype.createVisual=function(){this.visual=ce.createGroup(),this.drawingImage=ce.createImage(),this.visual.appendChild(this.drawingImage);var X=ce.createTransform();this.visual.transform.baseVal.appendItem(X),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function(X,ne){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(X.x,X.y),this.drawing=!0):se.prototype.pointerDown.call(this,X,ne)},z.prototype.manipulate=function(X){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(X.x,X.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,X)},z.prototype.resize=function(X){se.prototype.resize.call(this,X),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},z.prototype.pointerUp=function(X){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,X)},z.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},z.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},z.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},z.prototype.finishCreation=function(){for(var X=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],de=ne[0],ie=ne[1],ze=ne[2],ht=ne[3],St=!1,Pt=0;Pt0&&(St=!0,Ptht&&(ht=Pt),pt>ze&&(ze=pt));if(St){this.left=de/this.pixelRatio,this.top=ie/this.pixelRatio,this.width=(ze-de)/this.pixelRatio,this.height=(ht-ie)/this.pixelRatio;var Ht=document.createElement("canvas");Ht.width=ze-de,Ht.height=ht-ie,Ht.getContext("2d").putImageData(this.canvasContext.getImageData(de,ie,ze-de,ht-ie),0,0),this.drawingImgUrl=Ht.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},z.prototype.setDrawingImage=function(){ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},z.prototype.setColor=function(X){this.color=X,this.colorChanged(X)},z.prototype.setLineWidth=function(X){this.lineWidth=X},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){this.createVisual(),se.prototype.restoreState.call(this,X),this.drawingImgUrl=X.drawingImgUrl,this.setDrawingImage()},z.prototype.scale=function(X,ne){se.prototype.scale.call(this,X,ne),this.setDrawingImage()},z.typeName="FreehandMarker",z.title="Freehand marker",z.icon='',z}(et),ke=function(se){function z(X,ne,de){var ie=se.call(this,X,de||'')||this;return ie.typeBoxes=[],ie.currentType=ne,ie.setCurrentType=ie.setCurrentType.bind(ie),ie}return pe(z,se),z.prototype.getUi=function(){var X=this,ne=document.createElement("div");ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2";for(var de=function(ht){var St="both";switch(ht){case 0:St="both";break;case 1:St="start";break;case 2:St="end";break;case 3:St="none"}var Pt=document.createElement("div");if(Pt.style.display="flex",Pt.style.flexGrow="2",Pt.style.alignItems="center",Pt.style.justifyContent="space-between",Pt.style.padding="5px",Pt.style.borderWidth="2px",Pt.style.borderStyle="solid",Pt.style.borderColor=St===ie.currentType?ie.uiStyleSettings.toolboxAccentColor:"transparent",Pt.addEventListener("click",function(){X.setCurrentType(St,Pt)}),ne.appendChild(Pt),St==="both"||St==="start"){var pt=document.createElement("div");pt.style.display="flex",pt.style.alignItems="center",pt.style.minHeight="20px",pt.innerHTML=``,pt.style.marginLeft="5px",Pt.appendChild(pt)}var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.style.flexGrow="2";var zt=document.createElement("hr");if(zt.style.minWidth="20px",zt.style.border="0px",zt.style.borderTop="3px solid "+(ie.uiStyleSettings!==void 0?ie.uiStyleSettings.toolboxColor:"#eeeeee"),zt.style.flexGrow="2",Ht.appendChild(zt),Pt.appendChild(Ht),St==="both"||St==="end"){var Mr=document.createElement("div");Mr.style.display="flex",Mr.style.alignItems="center",Mr.style.minHeight="20px",Mr.innerHTML=``,Mr.style.marginRight="5px",Pt.appendChild(Mr)}ie.typeBoxes.push(Pt)},ie=this,ze=0;ze<4;ze++)de(ze);return ne},z.prototype.setCurrentType=function(X,ne){var de=this;this.currentType=X,this.typeBoxes.forEach(function(ie){ie.style.borderColor=ie===ne?de.uiStyleSettings!==void 0?de.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},z}(Z),Ie=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.arrowType="end",ie.arrowBaseHeight=10,ie.arrowBaseWidth=10,ie.getArrowPoints=ie.getArrowPoints.bind(ie),ie.setArrowType=ie.setArrowType.bind(ie),ie.arrowTypePanel=new ke("Arrow type","end"),ie.arrowTypePanel.onArrowTypeChanged=ie.setArrowType,ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.arrow1&&X!==this.arrow2)},z.prototype.getArrowPoints=function(X,ne){var de=this.arrowBaseWidth+2*this.strokeWidth,ie=this.arrowBaseHeight+2*this.strokeWidth;return X-de/2+","+(ne+ie/2)+" "+X+","+(ne-ie/2)+" "+(X+de/2)+","+(ne+ie/2)},z.prototype.createTips=function(){this.arrow1=ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow2)},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.state==="creating"&&this.createTips()},z.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ce.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var X=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.arrow1.transform.baseVal.getItem(0);ne.setRotate(X,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ne,0);var de=this.arrow2.transform.baseVal.getItem(0);de.setRotate(X+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(de,0)}},z.prototype.setArrowType=function(X){this.arrowType=X,this.adjustVisual(),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){se.prototype.restoreState.call(this,X);var ne=X;this.arrowType=ne.arrowType,this.createTips(),this.adjustVisual()},z.typeName="ArrowMarker",z.title="Arrow marker",z.icon='',z}(lt),ye=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.fillColor=de.defaultFillColor,ie.strokeWidth=0,ie.fillPanel=new be("Color",de.defaultColorSet,de.defaultFillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie}return pe(z,se),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=se.prototype.getState.call(this);return X.typeName=z.typeName,X},z.typeName="CoverMarker",z.title="Cover marker",z.icon='',z}(nt),Te=function(se){function z(X,ne,de,ie){var ze=se.call(this,X,ie||'')||this;return ze.opacities=[],ze.opacityBoxes=[],ze.opacities=ne,ze.currentOpacity=de,ze.setCurrentOpacity=ze.setCurrentOpacity.bind(ze),ze}return pe(z,se),z.prototype.getUi=function(){var X=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",ne.style.justifyContent="space-between",this.opacities.forEach(function(de){var ie=document.createElement("div");ie.style.display="flex",ie.style.alignItems="center",ie.style.justifyContent="center",ie.style.padding="5px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderColor=de===X.currentOpacity?X.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){X.setCurrentOpacity(de,ie)}),ne.appendChild(ie);var ze=document.createElement("div");ze.innerText=100*de+"%",ie.appendChild(ze),X.opacityBoxes.push(ie)}),ne},z.prototype.setCurrentOpacity=function(X,ne){var de=this;this.currentOpacity=X,this.opacityBoxes.forEach(function(ie){ie.style.borderColor=ie===ne?de.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},z}(Z),Ae=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.setOpacity=ie.setOpacity.bind(ie),ie.fillColor=de.defaultHighlightColor,ie.strokeWidth=0,ie.opacity=de.defaultHighlightOpacity,ie.fillPanel=new be("Color",de.defaultColorSet,ie.fillColor),ie.fillPanel.onColorChanged=ie.setFillColor,ie.opacityPanel=new Te("Opacity",de.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return pe(z,se),z.prototype.setOpacity=function(X){this.opacity=X,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=se.prototype.getState.call(this);return X.typeName=z.typeName,X},z.typeName="HighlightMarker",z.title="Highlight marker",z.icon='',z}(ye),Pe='',$e=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.bgColor="transparent",ie.tipPosition={x:0,y:0},ie.tipBase1Position={x:0,y:0},ie.tipBase2Position={x:0,y:0},ie.tipMoving=!1,ie.color=de.defaultStrokeColor,ie.bgColor=de.defaultFillColor,ie.fontFamily=de.defaultFontFamily,ie.defaultSize={x:100,y:30},ie.setBgColor=ie.setBgColor.bind(ie),ie.getTipPoints=ie.getTipPoints.bind(ie),ie.positionTip=ie.positionTip.bind(ie),ie.setTipPoints=ie.setTipPoints.bind(ie),ie.colorPanel=new be("Text color",de.defaultColorSet,ie.color,''),ie.colorPanel.onColorChanged=ie.setColor,ie.bgColorPanel=new be("Fill color",de.defaultColorSet,ie.bgColor,Pe),ie.bgColorPanel.onColorChanged=ie.setBgColor,ie.fontFamilyPanel=new Je("Font",de.defaultFontFamilies,de.defaultFontFamily),ie.fontFamilyPanel.onFontChanged=ie.setFont,ie.tipGrip=new Ze,ie.tipGrip.visual.transform.baseVal.appendItem(ce.createTransform()),ie.controlBox.appendChild(ie.tipGrip.visual),ie}return pe(z,se),z.prototype.ownsTarget=function(X){return se.prototype.ownsTarget.call(this,X)||this.tipGrip.ownsTarget(X)||this.tip===X},z.prototype.createTip=function(){ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},z.prototype.pointerDown=function(X,ne){this.state==="new"&&se.prototype.pointerDown.call(this,X,ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,X,ne)},z.prototype.pointerUp=function(X){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,X);else{var ne=this.state==="creating";se.prototype.pointerUp.call(this,X),this.setTipPoints(ne),this.positionTip()}},z.prototype.manipulate=function(X){if(this.tipMoving){var ne=this.unrotatePoint(X);this.tipPosition={x:ne.x-this.manipulationStartLeft,y:ne.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,X)},z.prototype.setBgColor=function(X){this.bgRectangle&&this.tip&&(ce.setAttributes(this.bgRectangle,[["fill",X]]),ce.setAttributes(this.tip,[["fill",X]])),this.bgColor=X,this.fillColorChanged(X)},z.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},z.prototype.setTipPoints=function(X){X===void 0&&(X=!1);var ne=Math.min(this.height/2,15),de=this.height/5;X&&(this.tipPosition={x:ne+de/2,y:this.height+20});var ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?ie',z}(tt),Ke=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.fillColor="transparent",ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.opacity=1,ie.strokeColor=de.defaultColor,ie.strokeWidth=de.defaultStrokeWidth,ie.strokeDasharray=de.defaultStrokeDasharray,ie.fillColor=de.defaultFillColor,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setFillColor=ie.setFillColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.setOpacity=ie.setOpacity.bind(ie),ie.createVisual=ie.createVisual.bind(ie),ie.strokePanel=new be("Line color",he(de.defaultColorSet,["transparent"]),de.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.fillPanel=new be("Fill color",he(de.defaultColorSet,["transparent"]),ie.fillColor,Pe),ie.fillPanel.onColorChanged=ie.setFillColor,ie.strokeWidthPanel=new ut("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ot("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie.opacityPanel=new Te("Opacity",de.defaultOpacitySteps,ie.opacity),ie.opacityPanel.onOpacityChanged=ie.setOpacity,ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.visual)},z.prototype.createVisual=function(){this.visual=ce.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.state==="new"&&(this.createVisual(),this.moveVisual(X),this._state="creating")},z.prototype.manipulate=function(X){se.prototype.manipulate.call(this,X)},z.prototype.resize=function(X){se.prototype.resize.call(this,X),this.setSize()},z.prototype.setSize=function(){se.prototype.setSize.call(this),ce.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},z.prototype.pointerUp=function(X){se.prototype.pointerUp.call(this,X),this.setSize()},z.prototype.setStrokeColor=function(X){this.strokeColor=X,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(X),this.stateChanged()},z.prototype.setFillColor=function(X){this.fillColor=X,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(X),this.stateChanged()},z.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},z.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},z.prototype.setOpacity=function(X){this.opacity=X,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){var ne=X;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,X),this.setSize()},z.prototype.scale=function(X,ne){se.prototype.scale.call(this,X,ne),this.setSize()},z.typeName="EllipseMarker",z.title="Ellipse marker",z.icon='',z}(et),ct=function(se){function z(X,ne,de){return se.call(this,X,ne,de)||this}return pe(z,se),Object.defineProperty(z.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.tip1&&X!==this.tip2)},z.prototype.createTips=function(){this.tip1=ce.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ce.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.tip2)},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.state==="creating"&&this.createTips()},z.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ce.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var X=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.tip1.transform.baseVal.getItem(0);ne.setRotate(X,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ne,0);var de=this.tip2.transform.baseVal.getItem(0);de.setRotate(X+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(de,0)}},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=se.prototype.getState.call(this);return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){se.prototype.restoreState.call(this,X),this.createTips(),this.adjustVisual()},z.typeName="MeasurementMarker",z.title="Measurement marker",z.icon='',z}(lt),gt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.strokePanel.colors=de.defaultColorSet,ie.fillColor="transparent",ie}return pe(z,se),Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=se.prototype.getState.call(this);return X.typeName=z.typeName,X},z.typeName="EllipseFrameMarker",z.title="Ellipse frame marker",z.icon='',z}(Ke),wt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(z){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(z)||(this.undoStack.push(z),JSON.stringify(this.lastRedoStep)!==JSON.stringify(z)&&this.redoStack.splice(0,this.redoStack.length))},se.prototype.replaceLastUndoStep=function(z){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=z)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var z=this.undoStack.pop();return z!==void 0&&this.redoStack.push(z),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),vt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne,de)||this;return ie.strokeColor="transparent",ie.strokeWidth=0,ie.strokeDasharray="",ie.curveX=0,ie.curveY=0,ie.manipulationStartCurveX=0,ie.manipulationStartCurveY=0,ie.setStrokeColor=ie.setStrokeColor.bind(ie),ie.setStrokeWidth=ie.setStrokeWidth.bind(ie),ie.setStrokeDasharray=ie.setStrokeDasharray.bind(ie),ie.positionGrips=ie.positionGrips.bind(ie),ie.addControlGrips=ie.addControlGrips.bind(ie),ie.adjustVisual=ie.adjustVisual.bind(ie),ie.setupControlBox=ie.setupControlBox.bind(ie),ie.resize=ie.resize.bind(ie),ie.strokeColor=de.defaultColor,ie.strokeWidth=de.defaultStrokeWidth,ie.strokeDasharray=de.defaultStrokeDasharray,ie.strokePanel=new be("Line color",de.defaultColorSet,de.defaultColor),ie.strokePanel.onColorChanged=ie.setStrokeColor,ie.strokeWidthPanel=new ut("Line width",de.defaultStrokeWidths,de.defaultStrokeWidth),ie.strokeWidthPanel.onWidthChanged=ie.setStrokeWidth,ie.strokeStylePanel=new ot("Line style",de.defaultStrokeDasharrays,de.defaultStrokeDasharray),ie.strokeStylePanel.onStyleChanged=ie.setStrokeDasharray,ie}return pe(z,se),z.prototype.ownsTarget=function(X){return!(!se.prototype.ownsTarget.call(this,X)&&X!==this.visual&&X!==this.selectorCurve&&X!==this.visibleCurve&&!this.curveGrip.ownsTarget(X))},z.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},z.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorCurve=ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ce.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},z.prototype.pointerDown=function(X,ne){se.prototype.pointerDown.call(this,X,ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=X.x,this.curveY=X.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},z.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},z.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ce.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},z.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},z.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var X=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-X/2,this.curveY-X/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},z.prototype.manipulate=function(X){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+X.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+X.y-this.manipulationStartY),se.prototype.manipulate.call(this,X)},z.prototype.resize=function(X){this.activeGrip===this.curveGrip&&(this.curveX=X.x,this.curveY=X.y),se.prototype.resize.call(this,X),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},z.prototype.setStrokeColor=function(X){this.strokeColor=X,this.adjustVisual(),this.colorChanged(X)},z.prototype.setStrokeWidth=function(X){this.strokeWidth=X,this.adjustVisual()},z.prototype.setStrokeDasharray=function(X){this.strokeDasharray=X,this.adjustVisual()},z.prototype.scale=function(X,ne){this.curveX=this.curveX*X,this.curveY=this.curveY*ne,se.prototype.scale.call(this,X,ne)},Object.defineProperty(z.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),z.prototype.getState=function(){var X=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return X.typeName=z.typeName,X},z.prototype.restoreState=function(X){se.prototype.restoreState.call(this,X);var ne=X;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.curveX=ne.curveX,this.curveY=ne.curveY,this.createVisual(),this.adjustVisual()},z.typeName="CurveMarker",z.title="Curve marker",z.icon='',z}(rt),It=function(){function se(z,X){X===void 0&&(X=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=z,this.cancelable=X}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),Lt=function(se){function z(X,ne,de){var ie=se.call(this,X,!1)||this;return ie.dataUrl=ne,ie.state=de,ie}return pe(z,se),z}(It),_t=function(se){function z(X,ne,de){de===void 0&&(de=!1);var ie=se.call(this,X,de)||this;return ie.marker=ne,ie}return pe(z,se),z}(It),rr=function(){function se(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return se.prototype.addEventListener=function(z,X){this[z].push(X)},se.prototype.removeEventListener=function(z,X){var ne=this[z].indexOf(X);ne>-1&&this[z].splice(ne,1)},se}(),sr=function(){function se(z){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new wt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new rr,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new ue(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=z,this.targetRoot=document.body,this.width=z.clientWidth,this.height=z.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,Ue,Ie,tt,gt,Ke,Ae,$e,ct,ye,lt,vt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,Ue,Ie,tt,Ke,Ae,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,Ue,Ie,tt,Ae]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(z){var X=this;this._availableMarkerTypes.splice(0),z.forEach(function(ne){if(typeof ne=="string"){var de=X.ALL_MARKER_TYPES.find(function(ie){return ie.typeName===ne});de!==void 0&&X._availableMarkerTypes.push(de)}else X._availableMarkerTypes.push(ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(z){this._zoomLevel=z,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),oe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var z=this;this.styles.styleSheetRoot===void 0&&te.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=te.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(X){return X(new It(z))})},se.prototype.render=function(){return Me(this,void 0,void 0,function(){var z;return _e(this,function(X){switch(X.label){case 0:return this.setCurrentMarker(),(z=new Se).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.markersOnly=this.renderMarkersOnly,z.width=this.renderWidth,z.height=this.renderHeight,[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return X.sent(),[4,z.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,X.sent()]}})})},se.prototype.close=function(z){var X=this;if(z===void 0&&(z=!1),this.isOpen){var ne=!1;z||this.eventListeners.beforeclose.forEach(function(de){var ie=new It(X,!0);de(ie),ie.defaultPrevented&&(ne=!0)}),ne||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(de){return de(new It(X))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var z,X=[],ne=0;nethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*z:this.editorCanvas.clientWidth,ne=X',z.title="Powered by marker.js",z.style.display="grid",z.style.alignItems="center",z.style.justifyItems="center",z.style.padding="3px",z.style.width="20px",z.style.height="20px",this.logoUI.appendChild(z),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},se.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y-1&&this.markers.splice(this.markers.indexOf(z),1),z.dispose()},se.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},se.prototype.toolbarButtonClicked=function(z,X){if(z==="marker"&&X!==void 0)this.createNewMarker(X);else if(z==="action")switch(X){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var z=this;if(this._currentMarker!==void 0){var X=!1;if(this.eventListeners.markerbeforedelete.forEach(function(de){var ie=new _t(z,z._currentMarker,!0);de(ie),ie.defaultPrevented&&(X=!0)}),!X){var ne=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(de){return de(new _t(z,ne))})}}},se.prototype.clear=function(){var z=this,X=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ze){var ht=new _t(z,void 0,!0);ze(ht),ht.defaultPrevented&&(X=!0)}),!X)){this.setCurrentMarker();for(var ne=function(ze){var ht=de.markers[ze];de.setCurrentMarker(de.markers[ze]),de._currentMarker.dispose(),de.markerImage.removeChild(de._currentMarker.container),de.markers.splice(de.markers.indexOf(de._currentMarker),1),de.eventListeners.markerdelete.forEach(function(St){return St(new _t(z,ht))})},de=this,ie=this.markers.length-1;ie>=0;ie--)ne(ie);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.prototype.showNotesEditor=function(){var z;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(z=this._currentMarker.notes)!==null&&z!==void 0?z:"",this.overlayContainer.appendChild(this.notesArea))},se.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var z=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var X=this.getState(),ne=this.undoRedoManager.getLastUndoStep();if(!ne||ne.width===X.width&&ne.height===X.height){var de=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(X),de1&&this.panTo({x:z.clientX,y:z.clientY}))},se.prototype.onPointerUp=function(z){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(z.clientX,z.clientY)),this.isDragging=!1,this.addUndoStep()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(z){this._currentMarker===void 0||this.notesArea!==void 0||z.key!=="Delete"&&z.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(z,X){var ne=this.markerImage.getBoundingClientRect();return{x:(z-ne.left)/this.zoomLevel,y:(X-ne.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var z=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},se.prototype.addLicenseKey=function(z){oe.addKey(z)},se.prototype.addEventListener=function(z,X){this.eventListeners.addEventListener(z,X)},se.prototype.removeEventListener=function(z,X){this.eventListeners.removeEventListener(z,X)},se.prototype.renderState=function(z){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(z),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var z=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(X){return X(new It(z))}))},se.prototype.blur=function(){var z=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(X){return X(new It(z))}))},se.instanceCounter=0,se}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var $t=function(se,z){return($t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,ne){X.__proto__=ne}||function(X,ne){for(var de in ne)Object.prototype.hasOwnProperty.call(ne,de)&&(X[de]=ne[de])})(se,z)};function cr(se,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");function X(){this.constructor=se}$t(se,z),se.prototype=z===null?Object.create(z):(X.prototype=z.prototype,new X)}function Wt(se,z,X,ne){return new(X||(X=Promise))(function(de,ie){function ze(Pt){try{St(ne.next(Pt))}catch(pt){ie(pt)}}function ht(Pt){try{St(ne.throw(Pt))}catch(pt){ie(pt)}}function St(Pt){var pt;Pt.done?de(Pt.value):(pt=Pt.value,pt instanceof X?pt:new X(function(Ht){Ht(pt)})).then(ze,ht)}St((ne=ne.apply(se,z||[])).next())})}function Lr(se,z){var X,ne,de,ie,ze={label:0,sent:function(){if(1&de[0])throw de[1];return de[1]},trys:[],ops:[]};return ie={next:ht(0),throw:ht(1),return:ht(2)},typeof Symbol=="function"&&(ie[Symbol.iterator]=function(){return this}),ie;function ht(St){return function(Pt){return function(pt){if(X)throw new TypeError("Generator is already executing.");for(;ze;)try{if(X=1,ne&&(de=2&pt[0]?ne.return:pt[0]?ne.throw||((de=ne.return)&&de.call(ne),0):ne.next)&&!(de=de.call(ne,pt[1])).done)return de;switch(ne=0,de&&(pt=[2&pt[0],de.value]),pt[0]){case 0:case 1:de=pt;break;case 4:return ze.label++,{value:pt[1],done:!1};case 5:ze.label++,ne=pt[1],pt=[0];continue;case 7:pt=ze.ops.pop(),ze.trys.pop();continue;default:if(!(de=ze.trys,(de=de.length>0&&de[de.length-1])||pt[0]!==6&&pt[0]!==2)){ze=0;continue}if(pt[0]===3&&(!de||pt[1]>de[0]&&pt[1]0&&X>0){var ne=new Ar(z,X),de=ne.ratio>=1?20:ne.getHorizontalLength(20),ie=ne.ratio<1?20:ne.getVerticalLength(20),ze=document.createElementNS("http://www.w3.org/2000/svg","svg");ze.setAttribute("xmlns","http://www.w3.org/2000/svg"),ze.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ze);var ht=Ct.createDefs();ze.appendChild(ht);var St=Ct.createElement("clipPath",[["id","text-bg-clip"]]);ht.appendChild(St);var Pt=Ct.createPath(Ct.getHollowRectanglePath((24-de)/2,(24-ie)/2,de,ie,(24-de)/2+2,(24-ie)/2+2,de-4,ie-4));ze.appendChild(Pt);var pt=Ct.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);pt.appendChild(Ct.createTSpan(z+":"+X)),ze.appendChild(pt);var Ht=pt.getBBox();Ct.setAttributes(pt,[["x",((24-Ht.width)/2).toString()],["y",((24-Ht.height)/2-Ht.y).toString()]]);var zt=Ct.createPath(Ct.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ht.width))/2,(24-Math.ceil(Ht.height))/2,Math.ceil(Ht.width),Math.ceil(Ht.height)));return St.appendChild(zt),Ct.setAttributes(Pt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ze),ze.outerHTML}return''},se}(),Xt=function(se){function z(X,ne,de){var ie=se.call(this,X,ne)||this;return ie.isDropdownOpen=!1,ie.onClick=ie.dropdownButtonClicked,ie.dropdownButtons=de,ie}return cr(z,se),z.prototype.setupDropdown=function(){var X=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=X.className,ne.colorsClassName=X.colorsClassName,X.dropdownBlock.appendChild(ne.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},z.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},z.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},z.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},z.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},z.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},z}(Rt),Nt=function(){function se(z,X){this.GRIP_SIZE=10,this.color=z,this.fillColor=X,this.visual=Ct.createGroup(),this.visual.appendChild(Ct.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ct.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(z){return z===this.visual||z===this.visual.childNodes[0]||z===this.visual.childNodes[1]},se.prototype.setCenter=function(z,X){this.visual.childNodes.forEach(function(ne){return Ct.setAttributes(ne,[["cx",z.toString()],["cy",X.toString()]])})},se}(),jr=function(){function se(z,X,ne,de){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=z,this.canvasHeight=X,this.margin=ne,this.container=de,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(z){this._aspectRatio=z,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(z){this._isGridVisible=z,this.gridContainer&&Ct.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(z){this._zoomFactor=z,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var z=this;this.cropShadeElement=Ct.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ct.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var X=0;Xthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-X.height/2),Ct.setAttributes(this.cropRectElement,[["x",X.x.toString()],["y",X.y.toString()],["width",X.width.toString()],["height",X.height.toString()]]);var ne=X.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ie,ze){var ht=X.y+ne*(ze+1);Ct.setAttributes(ie,[["x1",""+X.x],["y1",""+ht],["x2",""+(X.x+X.width)],["y2",""+ht]])});var de=X.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ie,ze){var ht=X.x+de*(ze+1);Ct.setAttributes(ie,[["x1",""+ht],["y1",""+X.y],["x2",""+ht],["y2",""+(X.y+X.height)]])}),Ct.setAttributes(this.cropShadeElement,[["d",Ct.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,X.x,X.y,X.width,X.height)]]),this.topLeftGrip.setCenter(X.x,X.y),this.topRightGrip.setCenter(X.x+X.width,X.y),this.bottomLeftGrip.setCenter(X.x,X.y+X.height),this.bottomRightGrip.setCenter(X.x+X.width,X.y+X.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},se.prototype.clientToLocalCoordinates=function(z,X){var ne=this.container.getBoundingClientRect();return{x:z-ne.left+this.margin,y:X-ne.top+this.margin}},se.prototype.onPointerDown=function(z){this.container.setPointerCapture(z.pointerId),this.previousPoint=this.clientToLocalCoordinates(z.clientX,z.clientY),this.cropRectElement===z.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(z.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(z.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(z.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(z.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(z){if(this.isMoving)this.move(this.clientToLocalCoordinates(z.clientX,z.clientY));else if(this.activeGrip){var X=this.clientToLocalCoordinates(z.clientX,z.clientY);this.resize(X)}z.preventDefault()},se.prototype.onPointerUp=function(z){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(z.pointerId)},se.prototype.move=function(z){var X=z.x-this.previousPoint.x,ne=z.y-this.previousPoint.y;this.zoomFactor!==1&&(X=-X/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+X),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=z},se.prototype.resize=function(z){var X=Object.assign({},this.cropRect),ne=z.x-this.previousPoint.x,de=z.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:X.x+nethis.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-X.width),X.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(X.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),X.height=this.aspectRatio.getVerticalLength(X.width)):(X.y+=de,X.height=this.cropRect.y+this.cropRect.height-X.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?X.height=this.aspectRatio.getVerticalLength(X.width):X.height+=de}X.width<10&&(X.x=this.cropRect.x,X.width=10),X.height<10&&(X.y=this.cropRect.y,X.height=10),this.previousPoint=z,X.x>=this.margin&&X.y>=this.margin&&X.x-this.margin+X.width<=this.canvasWidth&&X.y-this.margin+X.height<=this.canvasHeight&&(this.cropRect=X,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var z=this.cropRect.x+this.cropRect.width/2,X=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),de=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=z-this.cropRect.width/2,this.cropRect.y=X-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},se.prototype.getRescaledRect=function(z,X,ne,de,ie,ze){var ht=ne/z,St=de/X;return{x:(ie.x-ze)*ht+ze,y:(ie.y-ze)*St+ze,width:ie.width*ht,height:ie.height*St}},se.prototype.scaleCanvas=function(z,X){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,z,X,this.cropRect,this.margin);this.canvasWidth=z,this.canvasHeight=X,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},se}(),bn=function(){function se(z){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=z,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(se.prototype,"angle",{get:function(){return this._angle},set:function(z){this._angle=z,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},se.prototype.onPointerDown=function(z){this.controlContainer.setPointerCapture(z.pointerId),this.isDragging=!0,this.previousPoint={x:z.clientX,y:z.clientY}},se.prototype.onPointerMove=function(z){this.isDragging&&(this.onAngleChange&&this.onAngleChange((z.clientX-this.previousPoint.x)/5),this.previousPoint.x=z.clientX)},se.prototype.onPointerUp=function(z){this.isDragging&&this.onAngleChange&&this.onAngleChange((z.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(z.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var z=this.angleLabelText.getBBox();Ct.setAttributes(this.angleLabelElement,[["x",((this.width-z.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var z=this.scaleShape.transform.baseVal.getItem(0);z.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(z,0)}},se.prototype.getVisual=function(){var z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.setAttribute("xmlns","http://www.w3.org/2000/svg"),z.setAttribute("width",this.width+"px"),z.setAttribute("height",this.height+"px"),z.setAttribute("viewBox","0 0 "+this.width+" "+this.height),z.style.flexShrink="0",document.body.appendChild(z);for(var X="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var de=ne%5==0?this.height/3:this.height/6;X+="h4v"+-de+"h1v"+de}X+="v1H0Z",this.scaleShape=Ct.createPath(X);var ie=Ct.createTransform();this.scaleShape.transform.baseVal.appendItem(ie),z.appendChild(this.scaleShape),this.angleLabelElement=Ct.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ct.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ze=Ct.createTSpan("");return ze.innerHTML="°",this.angleLabelElement.appendChild(ze),z.appendChild(this.angleLabelElement),document.body.removeChild(z),z},se}(),zr=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(z,X,ne,de,ie,ze,ht){var St=this;return new Promise(function(Pt){var pt=document.createElement("canvas");pt.width=z.width.baseVal.value-2*de,pt.height=z.height.baseVal.value-2*de;var Ht=1,zt=1;St.naturalSize===!0?(Ht=X.naturalWidth/(z.width.baseVal.value-2*de)/ze,zt=X.naturalHeight/(z.height.baseVal.value-2*de)/ht,pt.width=X.naturalWidth/ze,pt.height=X.naturalHeight/ht):St.width!==void 0&&St.height!==void 0&&(Ht=St.width/ne.width,zt=St.height/ne.height,pt.width*=Ht,pt.height*=zt);var Mr=pt.getContext("2d");Mr.translate(pt.width/2,pt.height/2),Mr.rotate(ie*Math.PI/180),Mr.scale(ze,ht),Mr.translate(-pt.width/2,-pt.height/2),Mr.drawImage(X,0,0,pt.width,pt.height);var on=document.createElement("canvas");on.width=ne.width*Ht,on.height=ne.height*zt,on.getContext("2d").putImageData(Mr.getImageData((ne.x-de)*Ht,(ne.y-de)*zt,ne.width*Ht,ne.height*zt),0,0),Pt(on.toDataURL(St.imageType,St.imageQuality))})},se}(),mt=function(){function se(z){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=se.instanceCounter++,this.styles=new lr(this.instanceNo),this.target=z,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(z){this._zoomToCropEnabled=z,z?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(z){this._isGridVisible=z,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(z){this._gridLines=z,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(z){this._rotationAngle=z,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var z;return(z=this._aspectRatio)!==null&&z!==void 0?z:this.aspectRatios[0]},set:function(z){this._aspectRatio=z},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(z){z===void 0&&(z=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),z||this.closeEventListeners.forEach(function(X){return X()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(z){this.renderEventListeners.push(z)},se.prototype.removeRenderEventListener=function(z){this.renderEventListeners.indexOf(z)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(z),1)},se.prototype.addCloseEventListener=function(z){this.closeEventListeners.push(z)},se.prototype.removeCloseEventListener=function(z){this.closeEventListeners.indexOf(z)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(z),1)},se.prototype.setupResizeObserver=function(){var z=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){z.resize(z.target.clientWidth,z.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var z=1*this.target.clientWidth/this.target.clientHeight,X=this.contentDiv.clientWidth/z>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*z:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=X+2*this.CANVAS_MARGINz+this.CANVAS_MARGIN?this.target.offsetTop-(z+this.CANVAS_MARGIN):0;this.coverDiv.style.top=X+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var z=this;this.topToolbar=new Hr,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var X=new Tt;X.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(X);var ne=[];this.aspectRatios.forEach(function(zt){var Mr=new Rt(Br.getIcon(zt.horizontal,zt.vertical),zt.horizontal===0&&zt.vertical===0?"FREE":zt.horizontal+":"+zt.vertical);Mr.onClick=function(){return z.ratioButtonClicked(zt)},ne.push(Mr)}),this.aspectRatioButton=new Xt(Br.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,X.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var de=new Rt('',"Toggle grid");de.isActive=this.isGridVisible,de.onClick=function(){z.isGridVisible=!z.isGridVisible,de.isActive=z.isGridVisible},X.addButton(de);var ie=new Rt('',"Zoom to selection");if(ie.isActive=this.zoomToCropEnabled,ie.onClick=function(){z.zoomToCropEnabled=!z.zoomToCropEnabled,ie.isActive=z.zoomToCropEnabled},X.addButton(ie),!Cr.isLicensed){var ze=new Et;this.topToolbar.addElementBlock(ze);var ht=document.createElement("div");ht.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var St=document.createElement("a");St.style.color="currentColor",St.href="https://markerjs.com/products/cropro",St.target="_blank",St.innerHTML='',ht.appendChild(St),ze.addElement(ht)}var Pt=new Tt;Pt.minWidth=3*this.toolbarHeight+"px",Pt.contentAlign="end",this.topToolbar.addButtonBlock(Pt);var pt=new Rt('',"OK");pt.onClick=this.startRenderAndClose,Pt.addButton(pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ht=new Rt('',"Close");Ht.onClick=this.close,Pt.addButton(Ht),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ht.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var z=this;this.bottomToolbar=new Hr,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var X=new Tt;X.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(X);var ne=new Rt('',"Rotate left");ne.onClick=this.rotateLeftButtonClicked,X.addButton(ne);var de=new Rt('',"Rotate right");de.onClick=this.rotateRightButtonClicked,X.addButton(de);var ie=new Et;ie.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ie),this.straightener=new bn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Pt){z.rotateBy(Pt),z.straightener.angle=z.rotationAngle},ie.addElement(this.straightener.getUI());var ze=new Tt;ze.minWidth=2*this.toolbarHeight+"px",ze.contentAlign="end",this.bottomToolbar.addButtonBlock(ze);var ht=new Rt('',"Flip horizontal");ht.onClick=this.flipHorizontallyButtonClicked,ze.addButton(ht);var St=new Rt('',"Flip vertical");St.onClick=this.flipVerticallyButtonClicked,ze.addButton(St)},se.prototype.ratioButtonClicked=function(z){this.aspectRatio=z,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Br.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Ar(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(z){if(z){var X=this.cropLayer.getRescaledRect(z.width,z.height,this.imageWidth,this.imageHeight,z.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(X),this.cropRectChanged(X),this.flippedHorizontally=z.flippedHorizontally,this.flippedVertically=z.flippedVertically,this.applyFlip(),this.rotationAngle=z.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(z,X){var ne=this.cropImage.getBoundingClientRect();return{x:z-ne.left,y:X-ne.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var z=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=z+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},se.prototype.rotateLeftButtonClicked=function(){var z=this.rotationAngle-90;this.rotationAngle%90!=0&&(z+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(z)},se.prototype.rotateRightButtonClicked=function(){var z=this.rotationAngle+90;this.rotationAngle%90!=0&&(z-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(z)},se.prototype.rotateTo=function(z){z=(z=z>180?z-360:z)<=-180?z+360:z,this.rotationAngle=z,this.applyRotation()},se.prototype.rotateBy=function(z){this.rotateTo((this.rotationAngle+z)%360)},se.prototype.applyRotation=function(){var z=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var X=this.editingTargetRotationContainer.transform.baseVal.getItem(0);X.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(X,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=z},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Wt(this,void 0,void 0,function(){var z,X;return Lr(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return z=ne.sent(),X=this.getState(),this.renderEventListeners.forEach(function(de){return de(z,X)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Wt(this,void 0,void 0,function(){var z;return Lr(this,function(X){switch(X.label){case 0:return(z=new zr).naturalSize=this.renderAtNaturalSize,z.imageType=this.renderImageType,z.imageQuality=this.renderImageQuality,z.width=this.renderWidth,z.height=this.renderHeight,this.unzoomFromCrop(),Ct.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,z.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return X.sent(),[4,z.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,X.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new $r("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new $r("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new $r("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var z=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new $r("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*z)+`px;
height: `+(this.toolbarHeight-2*z)+`px;
padding: `+z+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new $r("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new $r("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Fr("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Fr("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new $r("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new $r("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new $r("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new $r("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*z)+`px;
padding: `+z+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new $r("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},se.instanceCounter=0,se}(),Ut=P("8hTe"),an=P.n(Ut),xn=/]*>/g;function On(se){var z=document.createElement("div");return z.innerHTML=se,z.childNodes.length===0?"":z.childNodes[0].nodeValue}var An=J.a=function(se){var z=se.value,X=z===void 0?"":z,ne=se.edit,de=ne===void 0?!1:ne,ie=se.className,ze=se.showTextOnly,ht=se.showLines,St=se.replaces,Pt=se.zoomImg,pt=se.hasMask,Ht=se.style,zt=Ht===void 0?{}:Ht,Mr=se.stylesPrev,on=Mr===void 0?{}:Mr,Zr=String(X),Qt=Object(a.useRef)(),Kr=Object(a.useRef)(),or=Object(a.useState)(""),Yt=Object(C.a)(or,2),nr=Yt[0],dr=Yt[1],Jr=Object(a.useState)("office"),un=Object(C.a)(Jr,2),En=un[0],wi=un[1],Vi=function(){var ir=new mt(Kr.current);ir.displayMode="popup",ir.addRenderEventListener(function(){var qr=Object(l.a)(o.a.mark(function Tr(dn){var _r;return o.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:return Qt.current.style.display="none",hn.next=3,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:dn}});case 3:_r=hn.sent,_r!=null&&_r.id&&St(Kr.current.getAttribute("src").replace(q.a.API_SERVER,""),"/api/attachments/".concat(_r==null?void 0:_r.id,"?type=").concat(_r.content_type));case 5:case"end":return hn.stop()}},Tr)}));return function(Tr){return qr.apply(this,arguments)}}()),ir.show()},Fi=function(){var ir=new sr(Kr.current);ir.settings.displayMode="popup",ir.addEventListener("render",function(){var qr=Object(l.a)(o.a.mark(function Tr(dn){var _r;return o.a.wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:if(Qt.current.style.display="none",!Kr.current){hn.next=6;break}return hn.next=4,Object(Ce.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:dn.dataUrl}});case 4:_r=hn.sent,_r!=null&&_r.id&&St(Kr.current.getAttribute("src").replace(q.a.API_SERVER,""),"/api/attachments/".concat(_r==null?void 0:_r.id,"?type=").concat(_r.content_type));case 6:case"end":return hn.stop()}},Tr)}));return function(Tr){return qr.apply(this,arguments)}}()),ir.show(),window.markerArea=ir},Qn=Object(a.useMemo)(function(){try{var Gr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ir=/\"\/api\/attachments\/|\"\/attachments\/download\//g,qr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Zr=Zr.replace(Gr,"("+q.a.API_SERVER+"/api/attachments/").replace(ir,'"'+q.a.API_SERVER+"/api/attachments/").replace(qr,'"'+q.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Zr=Zr.replace(new RegExp("(?[TOC]
",k()),S()),Tr=Tr.replace(/(__special_katext_id_\d+__)/g,function(fi,hn){var Hn=dn[hn],Di=Hn.type,yi=Hn.expression;return Object(re.renderToString)(On(yi)||"",{displayMode:Di==="block",throwOnError:!1,output:"html"})}),Tr=Tr.replace(/▁/g,"\u2581\u2581\u2581"),j(),ze){var _r=document.createElement("div");return _r.innerHTML=Tr,_r.innerText}return setTimeout(function(){return sn()},500),Tr},[Zr]),rn=Object(a.useRef)();y.WebkitLineClamp=ht,ht&&(zt=Object(f.a)(Object(f.a)({},zt),y));function Ri(Gr){var ir=Gr.target;if(ir.tagName.toUpperCase()==="IMG"){if(Pt){var qr=ir.getAttribute("src");dr(qr),wi("image")}}else if(ir.tagName.toUpperCase()==="A"){var Tr=ir.getAttribute("href");if(Tr.indexOf("office")>-1)Gr.preventDefault(),dr(Tr),wi("office");else if(Tr.indexOf("application/pdf")>-1)Gr.preventDefault(),dr(Tr),wi("pdf");else if(Tr.indexOf("type=text")>-1)Gr.preventDefault(),dr(Tr),wi("html");else if(Tr.startsWith("#")){Gr.preventDefault();var dn=document.getElementById(Tr.replace("#",""));dn&&dn.scrollIntoView(!0)}}}var sn=function(){var ir,qr=(ir=rn.current)===null||ir===void 0?void 0:ir.querySelectorAll("video");qr==null||qr.forEach(function(Tr){if(Tr.oncontextmenu=function(){return!1},Tr.src.indexOf(".m3u8")>-1&&!Tr.canPlayType("application/vnd.apple.mpegurl")){if(H.a.isSupported()){var dn=new H.a;dn.loadSource(Tr.src),dn.attachMedia(Tr)}}})};Object(a.useEffect)(function(){if(rn.current&&Qn&&(Qn.match(xn)&&window.PR.prettyPrint()),rn.current)return rn.current.addEventListener("click",Ri),function(){rn.current.removeEventListener("click",Ri),j(),S()}},[Qn,rn.current,Ri]);var hi=function(ir){if(!de)return;ir.target.nodeName==="IMG"?(Qt.current.style.display="flex",Qt.current.style.width=ir.target.clientWidth+"px",Qt.current.style.height=ir.target.clientHeight+"px",Qt.current.style.top=ir.target.offsetTop+"px",Qt.current.style.left=ir.target.offsetLeft+"px",Kr.current.src=ir.target.getAttribute("src")):Qt.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:rn,style:Object(f.a)({},zt),className:"".concat(ie||""," markdown-body ").concat(an.a.mdBody),onMouseOver:hi,dangerouslySetInnerHTML:{__html:Qn}}),r.a.createElement("div",{ref:Qt,className:an.a.button},r.a.createElement(u.a,null,r.a.createElement(D.a,{onClick:function(){return Vi()}},"\u88C1\u526A"),r.a.createElement(D.a,{onClick:function(){return Fi()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:Kr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(ee.a,{close:!0,data:nr,hasMask:pt,type:nr!=null&&nr.length?En:"",style:Object(f.a)({},on),onClose:function(){return dr("")}}))}},"9OqN":function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(M){return M.mode.CTR=function(){var u=M.lib.BlockCipherMode.extend(),_=u.Encryptor=u.extend({processBlock:function(D,f){var l=this._cipher,C=l.blockSize,v=this._iv,o=this._counter;v&&(o=this._counter=v.slice(0),this._iv=void 0);var a=o.slice(0);l.encryptBlock(a,0),o[C-1]=o[C-1]+1|0;for(var r=0;r-1?"."+nt.split(".").pop():"");H===null&&(je="testsets/".concat(ot).concat(nt.indexOf(".")>-1?"."+nt.split(".").pop():"")),et.multipartUpload(je,new Blob([qe.file],{type:qe.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:nt+""},url:Me==null?void 0:Me.callback_url,host:Me==null?void 0:Me.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(b.e)(ut)}}).then(function(De){if(De.data.status===0){ue.current=ue.current+1;var rt=te.current.map(function(Je){var tt,Ue;if(Je.name===((tt=De.data)===null||tt===void 0||((Ue=tt.data)===null||Ue===void 0)?void 0:Ue.file_name)){var ke,Ie,ye,Te=Object(C.a)({},Je);if((ke=De.data)!==null&&ke!==void 0&&(Ie=ke.data)!==null&&Ie!==void 0&&(ye=Ie.file_name)!==null&&ye!==void 0&&ye.includes(".in")){var Ae,Pe,$e,Ke,ct,gt;Te.in_object_key=(Ae=De.data)===null||Ae===void 0||((Pe=Ae.data)===null||Pe===void 0)?void 0:Pe.object,Te.in_object_size=($e=De.data)===null||$e===void 0||((Ke=$e.data)===null||Ke===void 0)?void 0:Ke.size,Te.input=(ct=De.data)===null||ct===void 0||((gt=ct.data)===null||gt===void 0)?void 0:gt.file_name,Te.in_file=qe}else{var wt,vt,It,Lt,_t,rr;Te.out_object_key=(wt=De.data)===null||wt===void 0||((vt=wt.data)===null||vt===void 0)?void 0:vt.object,Te.out_object_size=(It=De.data)===null||It===void 0||((Lt=It.data)===null||Lt===void 0)?void 0:Lt.size,Te.output=(_t=De.data)===null||_t===void 0||((rr=_t.data)===null||rr===void 0)?void 0:rr.file_name,Te.out_file=qe}return Te}return Je});if(te.current=Object(h.a)(rt),Ce(Object(h.a)(rt)),ue.current>0&&ue.current===ee.length){Se(!1);var lt=N(rt);lt=lt.filter(function(Je){var tt,Ue;return!!((tt=Je[0])!==null&&tt!==void 0&&tt.name&&(Ue=Je[1])!==null&&Ue!==void 0&&Ue.name)}),lt=lt.map(function(Je){return Object(C.a)(Object(C.a)(Object(C.a)({},Je[0]),Je[1]),{},{is_file:!0})}),G(lt),W()}}})},be=function(){if(ee.length===0){o.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}Se(!0);var qe=N(ee);if(qe.some(function(et){var nt,ut;return!((nt=et[0])!==null&&nt!==void 0&&nt.name&&(ut=et[1])!==null&&ut!==void 0&&ut.name)})){l.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var et=Object(a.a)(g.a.mark(function ut(){return g.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:ee.map(function(){var De=Object(a.a)(g.a.mark(function rt(lt){return g.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:Z(lt);case 1:case"end":return tt.stop()}},rt)}));return function(rt){return De.apply(this,arguments)}}());case 1:case"end":return je.stop()}},ut)}));function nt(){return et.apply(this,arguments)}return nt}(),onCancel:function(){Se(!1)}});return}ee.map(function(){var et=Object(a.a)(g.a.mark(function nt(ut){return g.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Z(ut);case 1:case"end":return je.stop()}},nt)}));return function(nt){return et.apply(this,arguments)}}())},ge={name:"file",fileList:ee,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(qe){if(ee!=null&&ee.some(function(nt){return nt.name===qe.name}))return o.b.info("".concat(qe.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(qe.size/1024/1024>100)return o.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(qe.name))return o.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var et={name:qe.name,uid:qe.uid,file:qe,percent:0};return ee.push(et),te.current=Object(h.a)(ee),Ce(Object(h.a)(ee)),!1}},Re=N(ee);return console.log(ee,Re,"fileList"),n.a.createElement(l.a,{visible:F,wrapClassName:B,onOk:be,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:oe},onCancel:Oe,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},n.a.createElement("div",{className:d.a.wrap},ee.length?n.a.createElement("div",null,n.a.createElement(p.a,ge,n.a.createElement(D.a,{className:d.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),n.a.createElement(L,{data:Re,onRemove:Y})):n.a.createElement("div",{className:d.a.noData},n.a.createElement("img",{src:y.a,alt:""}),n.a.createElement(p.a,ge,n.a.createElement(D.a,{className:d.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),n.a.createElement("div",{className:d.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",n.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",n.a.createElement("br",null),"2\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",n.a.createElement("br",null),"3\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002")))},L=function(K){var W=K.data,G=W===void 0?[]:W,F=K.onRemove,B=K.width,H=B===void 0?"auto":B,q=K.showScore,re=q===void 0?!1:q,ee=K.disabled,Ce=ee===void 0?!1:ee,Ee=K.inputChange,pe=function(ce){var oe=document.createElement("a");document.body.appendChild(oe);var Se=URL.createObjectURL(ce.file);oe.href=Se,oe.download=ce.name,oe.click(),URL.revokeObjectURL(Se),document.body.removeChild(oe)},Me=function(ce,oe){Object(x.w)(ce,oe)},_e=function(ce,oe){l.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){F(ce,oe)},onCancel:function(){}})};return G.length?n.a.createElement("div",{style:{width:H}},n.a.createElement("div",{className:d.a.head},n.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),n.a.createElement("div",{style:{width:re?"25%":"35%"}},"\u8F93\u5165"),n.a.createElement("div",{style:{width:re?"25%":"35%"}},"\u8F93\u51FA"),re&&n.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),n.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),G.map(function(he,ce){var oe,Se,te,ue;return n.a.createElement("div",{key:ce,className:d.a.list},n.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",ce+1),n.a.createElement("div",{className:d.a.info,style:{width:re?"25%":"35%"}},n.a.createElement("span",{title:he.input||((oe=he[0])===null||oe===void 0?void 0:oe.name),onClick:function(){he.input?he.input_file_url?Me(he.input_file_url,he.input):pe(he.in_file):pe(he[0])}},he.input||((Se=he[0])===null||Se===void 0?void 0:Se.name))),n.a.createElement("div",{className:d.a.info,style:{width:re?"25%":"35%"}},n.a.createElement("span",{title:he.output||((te=he[1])===null||te===void 0?void 0:te.name),onClick:function(){he.input?he.output_file_url?Me(he.output_file_url,he.output):pe(he.out_file):pe(he[1])}},he.output||((ue=he[1])===null||ue===void 0?void 0:ue.name))),re&&n.a.createElement("div",{style:{width:"20%"}},n.a.createElement(u.a,{disabled:Ce,style:{width:"70%"},onChange:function(le){return Ee(le,ce)},value:he.score}),n.a.createElement("span",null,"\xA0%")),n.a.createElement("div",{onClick:function(){return _e(he,ce)},style:{width:"10%"}},n.a.createElement("span",{className:d.a.del},"\u5220\u9664")))})):n.a.createElement(n.a.Fragment,null)};J.b=j},BU3w:function(I,J,P){"use strict";P.d(J,"a",function(){return l});var M=P("MNnm"),u="rc-util-key";function _(C){if(C.attachTo)return C.attachTo;var v=document.querySelector("head");return v||document.body}function D(C){var v,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(M.a)())return null;var a=document.createElement("style");if((v=o.csp)===null||v===void 0?void 0:v.nonce){var r;a.nonce=(r=o.csp)===null||r===void 0?void 0:r.nonce}a.innerHTML=C;var h=_(o),m=h.firstChild;return o.prepend&&h.prepend?h.prepend(a):o.prepend&&m?h.insertBefore(a,m):h.appendChild(a),a}var f=new Map;function l(C,v){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=_(o);if(!f.has(a)){var r=D("",o),h=r.parentNode;f.set(a,h),h.removeChild(r)}var m=Array.from(f.get(a).children).find(function(n){return n.tagName==="STYLE"&&n[u]===v});if(m){var p,w;if(((p=o.csp)===null||p===void 0?void 0:p.nonce)&&m.nonce!==((w=o.csp)===null||w===void 0?void 0:w.nonce)){var g;m.nonce=(g=o.csp)===null||g===void 0?void 0:g.nonce}return m.innerHTML!==C&&(m.innerHTML=C),m}var c=D(C,o);return c[u]=v,c}},Bd2K:function(I,J,P){(function(M){M(P("VrN/"),P("osHv"))})(function(M){M.defineOption("autoCloseTags",!1,function(o,a,r){if(r!=M.Init&&r&&o.removeKeyMap("autoCloseTags"),!a)return;var h={name:"autoCloseTags"};(typeof a!="object"||a.whenClosing!==!1)&&(h["'/'"]=function(m){return l(m)}),(typeof a!="object"||a.whenOpening!==!1)&&(h["'>'"]=function(m){return D(m)}),o.addKeyMap(h)});var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function D(o){if(o.getOption("disableInput"))return M.Pass;for(var a=o.listSelections(),r=[],h=o.getOption("autoCloseTags"),m=0;mp.ch&&(s=s.slice(0,s.length-w.end+p.ch));var i=s.toLowerCase();if(!s||w.type=="string"&&(w.end!=p.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&n.close||w.string.indexOf("/")==p.ch-w.start-1||S&&C(S,i)>-1||v(o,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(c)||[],s,p,!0))return M.Pass;var k=typeof h=="object"&&h.emptyTags;if(k&&C(k,s)>-1){r[m]={text:"/>",newPos:M.Pos(p.line,p.ch+2)};continue}var O=y&&C(y,i)>-1;r[m]={indent:O,text:">"+(O?`
`:"")+""+s+">",newPos:O?M.Pos(p.line+1,0):M.Pos(p.line,p.ch+1)}}for(var b=typeof h=="object"&&h.dontIndentOnAutoClose,m=a.length-1;m>=0;m--){var E=r[m];o.replaceRange(E.text,a[m].head,a[m].anchor,"+insert");var x=o.listSelections().slice(0);x[m]={head:E.newPos,anchor:E.newPos},o.setSelections(x),!b&&E.indent&&(o.indentLine(E.newPos.line,null,!0),o.indentLine(E.newPos.line+1,null,!0))}}function f(o,a){for(var r=o.listSelections(),h=[],m=a?"/":"",p=o.getOption("autoCloseTags"),w=typeof p=="object"&&p.dontIndentOnSlash,g=0;g"&&(S+=">"),h[g]=S}if(o.replaceSelections(h),r=o.listSelections(),!w)for(var g=0;g=0&&a[c]==r;c--)++g;h=w.to;for(var c=1;c0){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:"",a=[],r=0;r=0;a--){var r=_().key(a);o(D(r),r)}}function C(o){return _().removeItem(o)}function v(){return _().clear()}},DlQD:function(I,J,P){(function(M,u){I.exports=u()})(this,function(){"use strict";function M(Ue,ke){for(var Ie=0;IeUe.length)&&(ke=Ue.length);for(var Ie=0,ye=new Array(ke);Ie=Ue.length?{done:!0}:{done:!1,value:Ue[ye++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ie=Ue[Symbol.iterator](),Ie.next.bind(Ie)}function l(Ue,ke){return ke={exports:{}},Ue(ke,ke.exports),ke.exports}var C=l(function(Ue){function ke(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Ie(ye){Ue.exports.defaults=ye}Ue.exports={defaults:ke(),getDefaults:ke,changeDefaults:Ie}}),v=C.defaults,o=C.getDefaults,a=C.changeDefaults,r=/[&<>"']/,h=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,p=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(ke){return w[ke]};function c(Ue,ke){if(ke){if(r.test(Ue))return Ue.replace(h,g)}else if(m.test(Ue))return Ue.replace(p,g);return Ue}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Ue){return Ue.replace(n,function(ke,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var d=/(^|[^\[])\^/g;function S(Ue,ke){Ue=Ue.source||Ue,ke=ke||"";var Ie={replace:function(Te,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(d,"$1"),Ue=Ue.replace(Te,Ae),Ie},getRegex:function(){return new RegExp(Ue,ke)}};return Ie}var y=/[^\w:]/g,i=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,ke,Ie){if(Ue){var ye;try{ye=decodeURIComponent(s(Ie)).replace(y,"").toLowerCase()}catch(Te){return null}if(ye.indexOf("javascript:")===0||ye.indexOf("vbscript:")===0||ye.indexOf("data:")===0)return null}ke&&!i.test(Ie)&&(Ie=T(ke,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(Te){return null}return Ie}var O={},b=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Ue,ke){O[" "+Ue]||(b.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=V(Ue,"/",!0)),Ue=O[" "+Ue];var Ie=Ue.indexOf(":")===-1;return ke.substring(0,2)==="//"?Ie?ke:Ue.replace(E,"$1")+ke:ke.charAt(0)==="/"?Ie?ke:Ue.replace(x,"$1")+ke:Ue+ke}var N={exec:function(){}};function j(Ue){for(var ke=1,Ie,ye;ke=0&&$e[ct]==="\\";)Ke=!Ke;return Ke?"|":" |"}),ye=Ie.split(/ \|/),Te=0;if(ye.length>ke)ye.splice(ke);else for(;ye.length=ye.length?Te.slice(ye.length):Te}).join(`
`)}var Ee=function(){function Ue(Ie){this.options=Ie||F}var ke=Ue.prototype;return ke.space=function(ye){var Te=this.rules.block.newline.exec(ye);if(Te)return Te[0].length>1?{type:"space",raw:Te[0]}:{raw:`
`}},ke.code=function(ye,Te){var Ae=this.rules.block.code.exec(ye);if(Ae){var Pe=Te[Te.length-1];if(Pe&&Pe.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var $e=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?$e:B($e,`
`)}}},ke.fences=function(ye){var Te=this.rules.block.fences.exec(ye);if(Te){var Ae=Te[0],Pe=Ce(Ae,Te[3]||"");return{type:"code",raw:Ae,lang:Te[2]?Te[2].trim():Te[2],text:Pe}}},ke.heading=function(ye){var Te=this.rules.block.heading.exec(ye);if(Te)return{type:"heading",raw:Te[0],depth:Te[1].length,text:Te[2]}},ke.nptable=function(ye){var Te=this.rules.block.nptable.exec(ye);if(Te){var Ae={type:"table",header:H(Te[1].replace(/^ *| *\| *$/g,"")),align:Te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Te[3]?Te[3].replace(/\n$/,"").split(`
`):[],raw:Te[0]};if(Ae.header.length===Ae.align.length){var Pe=Ae.align.length,$e;for($e=0;$e ?/gm,"");return{type:"blockquote",raw:Te[0],text:Ae}}},ke.list=function(ye){var Te=this.rules.block.list.exec(ye);if(Te){for(var Ae=Te[0],Pe=Te[2],$e=Pe.length>1,Ke=Pe[Pe.length-1]===")",ct={type:"list",raw:Ae,ordered:$e,start:$e?+Pe.slice(0,-1):"",loose:!1,items:[]},gt=Te[0].match(this.rules.block.item),wt=!1,vt,It,Lt,_t,rr,sr,$t,cr=gt.length,Wt=0;Wt1||this.options.smartLists&&Lt!==Pe)&&(_t=gt.slice(Wt+1).join(`
`),ct.raw=ct.raw.substring(0,ct.raw.length-_t.length),Wt=cr-1)),rr=wt||/\n\n(?!\s*$)/.test(vt),Wt!==cr-1&&(wt=vt.charAt(vt.length-1)===`
`,rr||(rr=wt)),rr&&(ct.loose=!0),sr=/^\[[ xX]\] /.test(vt),$t=void 0,sr&&($t=vt[1]!==" ",vt=vt.replace(/^\[[ xX]\] +/,"")),ct.items.push({type:"list_item",raw:Ae,task:sr,checked:$t,loose:rr,text:vt});return ct}},ke.html=function(ye){var Te=this.rules.block.html.exec(ye);if(Te)return{type:this.options.sanitize?"paragraph":"html",raw:Te[0],pre:!this.options.sanitizer&&(Te[1]==="pre"||Te[1]==="script"||Te[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Te[0]):q(Te[0]):Te[0]}},ke.def=function(ye){var Te=this.rules.block.def.exec(ye);if(Te){Te[3]&&(Te[3]=Te[3].substring(1,Te[3].length-1));var Ae=Te[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Te[0],href:Te[2],title:Te[3]}}},ke.table=function(ye){var Te=this.rules.block.table.exec(ye);if(Te){var Ae={type:"table",header:H(Te[1].replace(/^ *| *\| *$/g,"")),align:Te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Te[3]?Te[3].replace(/\n$/,"").split(`
`):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Te[0];var Pe=Ae.align.length,$e;for($e=0;$e/i.test(Pe[0])&&(Te=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(Pe[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Pe[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:Pe[0],inLink:Te,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):q(Pe[0]):Pe[0]}},ke.link=function(ye){var Te=this.rules.inline.link.exec(ye);if(Te){var Ae=re(Te[2],"()");if(Ae>-1){var Pe=Te[0].indexOf("!")===0?5:4,$e=Pe+Te[1].length+Ae;Te[2]=Te[2].substring(0,Ae),Te[0]=Te[0].substring(0,$e).trim(),Te[3]=""}var Ke=Te[2],ct="";if(this.options.pedantic){var gt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ke);gt?(Ke=gt[1],ct=gt[3]):ct=""}else ct=Te[3]?Te[3].slice(1,-1):"";Ke=Ke.trim().replace(/^<([\s\S]*)>$/,"$1");var wt=ee(Te,{href:Ke&&Ke.replace(this.rules.inline._escapes,"$1"),title:ct&&ct.replace(this.rules.inline._escapes,"$1")},Te[0]);return wt}},ke.reflink=function(ye,Te){var Ae;if((Ae=this.rules.inline.reflink.exec(ye))||(Ae=this.rules.inline.nolink.exec(ye))){var Pe=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(Pe=Te[Pe.toLowerCase()],!Pe||!Pe.href){var $e=Ae[0].charAt(0);return{type:"text",raw:$e,text:$e}}var Ke=ee(Ae,Pe,Ae[0]);return Ke}},ke.strong=function(ye,Te,Ae){Ae===void 0&&(Ae="");var Pe=this.rules.inline.strong.start.exec(ye);if(Pe&&(!Pe[1]||Pe[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Te=Te.slice(-1*ye.length);var $e=Pe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;$e.lastIndex=0;for(var Ke;(Pe=$e.exec(Te))!=null;)if(Ke=this.rules.inline.strong.middle.exec(Te.slice(0,Pe.index+3)),Ke)return{type:"strong",raw:ye.slice(0,Ke[0].length),text:ye.slice(2,Ke[0].length-2)}}},ke.em=function(ye,Te,Ae){Ae===void 0&&(Ae="");var Pe=this.rules.inline.em.start.exec(ye);if(Pe&&(!Pe[1]||Pe[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Te=Te.slice(-1*ye.length);var $e=Pe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;$e.lastIndex=0;for(var Ke;(Pe=$e.exec(Te))!=null;)if(Ke=this.rules.inline.em.middle.exec(Te.slice(0,Pe.index+2)),Ke)return{type:"em",raw:ye.slice(0,Ke[0].length),text:ye.slice(1,Ke[0].length-1)}}},ke.codespan=function(ye){var Te=this.rules.inline.code.exec(ye);if(Te){var Ae=Te[2].replace(/\n/g," "),Pe=/[^ ]/.test(Ae),$e=Ae.startsWith(" ")&&Ae.endsWith(" ");return Pe&&$e&&(Ae=Ae.substring(1,Ae.length-1)),Ae=q(Ae,!0),{type:"codespan",raw:Te[0],text:Ae}}},ke.br=function(ye){var Te=this.rules.inline.br.exec(ye);if(Te)return{type:"br",raw:Te[0]}},ke.del=function(ye){var Te=this.rules.inline.del.exec(ye);if(Te)return{type:"del",raw:Te[0],text:Te[1]}},ke.autolink=function(ye,Te){var Ae=this.rules.inline.autolink.exec(ye);if(Ae){var Pe,$e;return Ae[2]==="@"?(Pe=q(this.options.mangle?Te(Ae[1]):Ae[1]),$e="mailto:"+Pe):(Pe=q(Ae[1]),$e=Pe),{type:"link",raw:Ae[0],text:Pe,href:$e,tokens:[{type:"text",raw:Pe,text:Pe}]}}},ke.url=function(ye,Te){var Ae;if(Ae=this.rules.inline.url.exec(ye)){var Pe,$e;if(Ae[2]==="@")Pe=q(this.options.mangle?Te(Ae[0]):Ae[0]),$e="mailto:"+Pe;else{var Ke;do Ke=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(Ke!==Ae[0]);Pe=q(Ae[0]),Ae[1]==="www."?$e="http://"+Pe:$e=Pe}return{type:"link",raw:Ae[0],text:Pe,href:$e,tokens:[{type:"text",raw:Pe,text:Pe}]}}},ke.inlineText=function(ye,Te,Ae){var Pe=this.rules.inline.text.exec(ye);if(Pe){var $e;return Te?$e=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):q(Pe[0]):Pe[0]:$e=q(this.options.smartypants?Ae(Pe[0]):Pe[0]),{type:"text",raw:Pe[0],text:$e}}},Ue}(),pe=G.noopTest,Me=G.edit,_e=G.merge,he={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:pe,table:pe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};he._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,he._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,he.def=Me(he.def).replace("label",he._label).replace("title",he._title).getRegex(),he.bullet=/(?:[*+-]|\d{1,9}[.)])/,he.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,he.item=Me(he.item,"gm").replace(/bull/g,he.bullet).getRegex(),he.list=Me(he.list).replace(/bull/g,he.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+he.def.source+")").getRegex(),he._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",he._comment=//,he.html=Me(he.html,"i").replace("comment",he._comment).replace("tag",he._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he.paragraph=Me(he._paragraph).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",he._tag).getRegex(),he.blockquote=Me(he.blockquote).replace("paragraph",he.paragraph).getRegex(),he.normal=_e({},he),he.gfm=_e({},he.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),he.gfm.nptable=Me(he.gfm.nptable).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",he._tag).getRegex(),he.gfm.table=Me(he.gfm.table).replace("hr",he.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",he._tag).getRegex(),he.pedantic=_e({},he.normal,{html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he._comment).replace(/tag/g,"(?!(?: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").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:pe,paragraph:Me(he.normal._paragraph).replace("hr",he.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",he.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:pe,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:pe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ce.punctuation=Me(ce.punctuation).replace(/punctuation/g,ce._punctuation).getRegex(),ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ce.em.start=Me(ce.em.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.middle=Me(ce.em.middle).replace(/punctuation/g,ce._punctuation).replace(/overlapSkip/g,ce._overlapSkip).getRegex(),ce.em.endAst=Me(ce.em.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.endUnd=Me(ce.em.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.start=Me(ce.strong.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.middle=Me(ce.strong.middle).replace(/punctuation/g,ce._punctuation).replace(/blockSkip/g,ce._blockSkip).getRegex(),ce.strong.endAst=Me(ce.strong.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.endUnd=Me(ce.strong.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.blockSkip=Me(ce._blockSkip,"g").getRegex(),ce.overlapSkip=Me(ce._overlapSkip,"g").getRegex(),ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ce._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ce.autolink=Me(ce.autolink).replace("scheme",ce._scheme).replace("email",ce._email).getRegex(),ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ce.tag=Me(ce.tag).replace("comment",he._comment).replace("attribute",ce._attribute).getRegex(),ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ce.link=Me(ce.link).replace("label",ce._label).replace("href",ce._href).replace("title",ce._title).getRegex(),ce.reflink=Me(ce.reflink).replace("label",ce._label).getRegex(),ce.reflinkSearch=Me(ce.reflinkSearch,"g").replace("reflink",ce.reflink).replace("nolink",ce.nolink).getRegex(),ce.normal=_e({},ce),ce.pedantic=_e({},ce.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",ce._label).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce._label).getRegex()}),ce.gfm=_e({},ce.normal,{escape:Me(ce.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ye="x"+ye.toString(16)),ke+=""+ye+";";return ke}var Q=function(){function Ue(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||Se,this.options.tokenizer=this.options.tokenizer||new Ee,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ye={block:te.normal,inline:ue.normal};this.options.pedantic?(ye.block=te.pedantic,ye.inline=ue.pedantic):this.options.gfm&&(ye.block=te.gfm,this.options.breaks?ye.inline=ue.breaks:ye.inline=ue.gfm),this.tokenizer.rules=ye}Ue.lex=function(ye,Te){var Ae=new Ue(Te);return Ae.lex(ye)};var ke=Ue.prototype;return ke.lex=function(ye){return ye=ye.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ye,this.tokens,!0),this.inline(this.tokens),this.tokens},ke.blockTokens=function(ye,Te,Ae){Te===void 0&&(Te=[]),Ae===void 0&&(Ae=!0),ye=ye.replace(/^ +$/gm,"");for(var Pe,$e,Ke,ct;ye;){if(Pe=this.tokenizer.space(ye)){ye=ye.substring(Pe.raw.length),Pe.type&&Te.push(Pe);continue}if(Pe=this.tokenizer.code(ye,Te)){ye=ye.substring(Pe.raw.length),Pe.type?Te.push(Pe):(ct=Te[Te.length-1],ct.raw+=`
`+Pe.raw,ct.text+=`
`+Pe.text);continue}if(Pe=this.tokenizer.fences(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.heading(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.nptable(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.hr(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.blockquote(ye)){ye=ye.substring(Pe.raw.length),Pe.tokens=this.blockTokens(Pe.text,[],Ae),Te.push(Pe);continue}if(Pe=this.tokenizer.list(ye)){for(ye=ye.substring(Pe.raw.length),Ke=Pe.items.length,$e=0;$e0)for(;(gt=this.tokenizer.rules.inline.reflinkSearch.exec(ct))!=null;)wt.includes(gt[0].slice(gt[0].lastIndexOf("[")+1,-1))&&(ct=ct.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+ct.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(gt=this.tokenizer.rules.inline.blockSkip.exec(ct))!=null;)ct=ct.slice(0,gt.index)+"["+"a".repeat(gt[0].length-2)+"]"+ct.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ye;){if(Ke=this.tokenizer.escape(ye)){ye=ye.substring(Ke.raw.length),Te.push(Ke);continue}if(Ke=this.tokenizer.tag(ye,Ae,Pe)){ye=ye.substring(Ke.raw.length),Ae=Ke.inLink,Pe=Ke.inRawBlock,Te.push(Ke);continue}if(Ke=this.tokenizer.link(ye)){ye=ye.substring(Ke.raw.length),Ke.type==="link"&&(Ke.tokens=this.inlineTokens(Ke.text,[],!0,Pe)),Te.push(Ke);continue}if(Ke=this.tokenizer.reflink(ye,this.tokens.links)){ye=ye.substring(Ke.raw.length),Ke.type==="link"&&(Ke.tokens=this.inlineTokens(Ke.text,[],!0,Pe)),Te.push(Ke);continue}if(Ke=this.tokenizer.strong(ye,ct,$e)){ye=ye.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],Ae,Pe),Te.push(Ke);continue}if(Ke=this.tokenizer.em(ye,ct,$e)){ye=ye.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],Ae,Pe),Te.push(Ke);continue}if(Ke=this.tokenizer.codespan(ye)){ye=ye.substring(Ke.raw.length),Te.push(Ke);continue}if(Ke=this.tokenizer.br(ye)){ye=ye.substring(Ke.raw.length),Te.push(Ke);continue}if(Ke=this.tokenizer.del(ye)){ye=ye.substring(Ke.raw.length),Ke.tokens=this.inlineTokens(Ke.text,[],Ae,Pe),Te.push(Ke);continue}if(Ke=this.tokenizer.autolink(ye,le)){ye=ye.substring(Ke.raw.length),Te.push(Ke);continue}if(!Ae&&(Ke=this.tokenizer.url(ye,le))){ye=ye.substring(Ke.raw.length),Te.push(Ke);continue}if(Ke=this.tokenizer.inlineText(ye,Pe,Oe)){ye=ye.substring(Ke.raw.length),$e=Ke.raw.slice(-1),Te.push(Ke);continue}if(ye){var vt="Infinite loop on byte: "+ye.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return Te},u(Ue,null,[{key:"rules",get:function(){return{block:te,inline:ue}}}]),Ue}(),Y=C.defaults,Z=G.cleanUrl,be=G.escape,ge=function(){function Ue(Ie){this.options=Ie||Y}var ke=Ue.prototype;return ke.code=function(ye,Te,Ae){var Pe=(Te||"").match(/\S*/)[0];if(this.options.highlight){var $e=this.options.highlight(ye,Pe);$e!=null&&$e!==ye&&(Ae=!0,ye=$e)}return Pe?''+(Ae?ye:be(ye,!0))+`
`:""+(Ae?ye:be(ye,!0))+`
`},ke.blockquote=function(ye){return`
`+ye+`
`},ke.html=function(ye){return ye},ke.heading=function(ye,Te,Ae,Pe){return this.options.headerIds?"
`:""+ye+"
`},ke.hr=function(){return this.options.xhtml?`
`:`
`},ke.list=function(ye,Te,Ae){var Pe=Te?"ol":"ul",$e=Te&&Ae!==1?' start="'+Ae+'"':"";return"<"+Pe+$e+`>
`+ye+""+Pe+`>
`},ke.listitem=function(ye){return""+ye+`
`},ke.checkbox=function(ye){return" "},ke.paragraph=function(ye){return""+ye+`
`},ke.table=function(ye,Te){return Te&&(Te=""+Te+""),`
`},ke.tablerow=function(ye){return`
`+ye+`
`},ke.tablecell=function(ye,Te){var Ae=Te.header?"th":"td",Pe=Te.align?"<"+Ae+' align="'+Te.align+'">':"<"+Ae+">";return Pe+ye+""+Ae+`>
`},ke.strong=function(ye){return""+ye+""},ke.em=function(ye){return""+ye+""},ke.codespan=function(ye){return""+ye+""},ke.br=function(){return this.options.xhtml?"
":"
"},ke.del=function(ye){return""+ye+""},ke.link=function(ye,Te,Ae){if(ye=Z(this.options.sanitize,this.options.baseUrl,ye),ye===null)return Ae;var Pe='"+Ae+"",Pe},ke.image=function(ye,Te,Ae){if(ye=Z(this.options.sanitize,this.options.baseUrl,ye),ye===null)return Ae;var Pe='
":">",Pe},ke.text=function(ye){return ye},Ue}(),Re=function(){function Ue(){}var ke=Ue.prototype;return ke.strong=function(ye){return ye},ke.em=function(ye){return ye},ke.codespan=function(ye){return ye},ke.del=function(ye){return ye},ke.html=function(ye){return ye},ke.text=function(ye){return ye},ke.link=function(ye,Te,Ae){return""+Ae},ke.image=function(ye,Te,Ae){return""+Ae},ke.br=function(){return""},Ue}(),Ze=function(){function Ue(){this.seen={}}var ke=Ue.prototype;return ke.slug=function(ye){var Te=ye.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Te)){var Ae=Te;do this.seen[Ae]++,Te=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Te))}return this.seen[Te]=0,Te},Ue}(),qe=C.defaults,et=G.unescape,nt=function(){function Ue(Ie){this.options=Ie||qe,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Re,this.slugger=new Ze}Ue.parse=function(ye,Te){var Ae=new Ue(Te);return Ae.parse(ye)};var ke=Ue.prototype;return ke.parse=function(ye,Te){Te===void 0&&(Te=!0);var Ae="",Pe,$e,Ke,ct,gt,wt,vt,It,Lt,_t,rr,sr,$t,cr,Wt,Lr,Cr,Ct,lr=ye.length;for(Pe=0;Pe0&&Wt.tokens[0].type==="text"?(Wt.tokens[0].text=Ct+" "+Wt.tokens[0].text,Wt.tokens[0].tokens&&Wt.tokens[0].tokens.length>0&&Wt.tokens[0].tokens[0].type==="text"&&(Wt.tokens[0].tokens[0].text=Ct+" "+Wt.tokens[0].tokens[0].text)):Wt.tokens.unshift({type:"text",text:Ct}):cr+=Ct),cr+=this.parse(Wt.tokens,$t),Lt+=this.renderer.listitem(cr,Cr,Lr);Ae+=this.renderer.list(Lt,rr,sr);continue}case"html":{Ae+=this.renderer.html(_t.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(_t.tokens));continue}case"text":{for(Lt=_t.tokens?this.parseInline(_t.tokens):_t.text;Pe+1An error occurred:"+je(Ke.message+"",!0)+"
";throw Ke}}Je.options=Je.setOptions=function(Ue){return ut(Je.defaults,Ue),rt(Je.defaults),Je},Je.getDefaults=De,Je.defaults=lt,Je.use=function(Ue){var ke=ut({},Ue);if(Ue.renderer&&function(){var ye=Je.defaults.renderer||new ge,Te=function($e){var Ke=ye[$e];ye[$e]=function(){for(var ct=arguments.length,gt=new Array(ct),wt=0;wt=0;m--){if(!_(h[m]))continue;var p=h[m].split("="),w=unescape(p[0]),g=unescape(p[1]);r(g,w)}}function C(r,h){if(!r)return;D.cookie=escape(r)+"="+escape(h)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function v(r){if(!r||!a(r))return;D.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function o(){l(function(r,h){v(h)})}function a(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(D.cookie)}},E4JC:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.StreamCipher,f=u.algo,l=[],C=[],v=[],o=f.Rabbit=D.extend({_doReset:function(){for(var r=this._key.words,h=this.cfg.iv,m=0;m<4;m++)r[m]=(r[m]<<8|r[m]>>>24)&16711935|(r[m]<<24|r[m]>>>8)&4278255360;var p=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],w=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var m=0;m<4;m++)a.call(this);for(var m=0;m<8;m++)w[m]^=p[m+4&7];if(h){var g=h.words,c=g[0],n=g[1],s=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,d=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=s>>>16|d&4294901760,y=d<<16|s&65535;w[0]^=s,w[1]^=S,w[2]^=d,w[3]^=y,w[4]^=s,w[5]^=S,w[6]^=d,w[7]^=y;for(var m=0;m<4;m++)a.call(this)}},_doProcessBlock:function(r,h){var m=this._X;a.call(this),l[0]=m[0]^m[5]>>>16^m[3]<<16,l[1]=m[2]^m[7]>>>16^m[5]<<16,l[2]=m[4]^m[1]>>>16^m[7]<<16,l[3]=m[6]^m[3]>>>16^m[1]<<16;for(var p=0;p<4;p++)l[p]=(l[p]<<8|l[p]>>>24)&16711935|(l[p]<<24|l[p]>>>8)&4278255360,r[h+p]^=l[p]},blockSize:128/32,ivSize:64/32});function a(){for(var r=this._X,h=this._C,m=0;m<8;m++)C[m]=h[m];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var m=0;m<8;m++){var p=r[m]+h[m],w=p&65535,g=p>>>16,c=((w*w>>>17)+w*g>>>15)+g*g,n=((p&4294901760)*p|0)+((p&65535)*p|0);v[m]=c^n}r[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,r[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,r[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,r[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,r[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,r[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,r[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,r[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}u.Rabbit=D._createHelper(o)}(),M.Rabbit})},ELLl:function(I,J,P){(function(M){M(P("VrN/"))})(function(M){var u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},_=M.Pos;M.defineOption("autoCloseBrackets",!1,function(w,g,c){c&&c!=M.Init&&(w.removeKeyMap(f),w.state.closeBrackets=null),g&&(l(D(g,"pairs")),w.state.closeBrackets=g,w.addKeyMap(f))});function D(w,g){return g=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[g]!=null?w[g]:u[g]}var f={Backspace:o,Enter:a};function l(w){for(var g=0;g=0;s--){var S=n[s].head;w.replaceRange("",_(S.line,S.ch-1),_(S.line,S.ch+1),"+delete")}}function a(w){var g=v(w),c=g&&D(g,"explode");if(!c||w.getOption("disableInput"))return M.Pass;for(var n=w.listSelections(),s=0;s0;return{anchor:new _(w.anchor.line,w.anchor.ch+(g?-1:1)),head:new _(w.head.line,w.head.ch+(g?1:-1))}}function h(w,g){var c=v(w);if(!c||w.getOption("disableInput"))return M.Pass;var n=D(c,"pairs"),s=n.indexOf(g);if(s==-1)return M.Pass;for(var d=D(c,"closeBefore"),S=D(c,"triples"),y=n.charAt(s+1)==g,i=w.listSelections(),k=s%2==0,O,b=0;b=0&&w.getRange(x,_(x.line,x.ch+3))==g+g+g?T="skipThree":T="skip";else if(y&&x.ch>1&&S.indexOf(g)>=0&&w.getRange(_(x.line,x.ch-2),x)==g+g){if(x.ch>2&&/\bstring/.test(w.getTokenTypeAt(_(x.line,x.ch-2))))return M.Pass;T="addFour"}else if(y){var j=x.ch==0?" ":w.getRange(_(x.line,x.ch-1),x);if(!M.isWordChar(N)&&j!=g&&!M.isWordChar(j))T="both";else return M.Pass}else if(k&&(N.length===0||/\s/.test(N)||d.indexOf(N)>-1))T="both";else return M.Pass;if(!O)O=T;else if(O!=T)return M.Pass}var L=s%2?n.charAt(s-1):g,V=s%2?g:n.charAt(s+1);w.operation(function(){if(O=="skip")w.execCommand("goCharRight");else if(O=="skipThree")for(var K=0;K<3;K++)w.execCommand("goCharRight");else if(O=="surround"){for(var W=w.getSelections(),K=0;K>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,E=h.words,x=m.words,T=v.words,N=o.words,j=a.words,L=r.words,V,K,W,G,F,B,H,q,re,ee;B=V=b[0],H=K=b[1],q=W=b[2],re=G=b[3],ee=F=b[4];for(var Ce,i=0;i<80;i+=1)Ce=V+S[y+T[i]]|0,i<16?Ce+=w(K,W,G)+E[0]:i<32?Ce+=g(K,W,G)+E[1]:i<48?Ce+=c(K,W,G)+E[2]:i<64?Ce+=n(K,W,G)+E[3]:Ce+=s(K,W,G)+E[4],Ce=Ce|0,Ce=d(Ce,j[i]),Ce=Ce+F|0,V=F,F=G,G=d(W,10),W=K,K=Ce,Ce=B+S[y+N[i]]|0,i<16?Ce+=s(H,q,re)+x[0]:i<32?Ce+=n(H,q,re)+x[1]:i<48?Ce+=c(H,q,re)+x[2]:i<64?Ce+=g(H,q,re)+x[3]:Ce+=w(H,q,re)+x[4],Ce=Ce|0,Ce=d(Ce,L[i]),Ce=Ce+ee|0,B=ee,ee=re,re=d(q,10),q=H,H=Ce;Ce=b[1]+W+re|0,b[1]=b[2]+G+ee|0,b[2]=b[3]+F+B|0,b[3]=b[4]+V+H|0,b[4]=b[0]+K+q|0,b[0]=Ce},_doFinalize:function(){var S=this._data,y=S.words,i=this._nDataBytes*8,k=S.sigBytes*8;y[k>>>5]|=128<<24-k%32,y[(k+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S.sigBytes=(y.length+1)*4,this._process();for(var O=this._hash,b=O.words,E=0;E<5;E++){var x=b[E];b[E]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return O},clone:function(){var S=l.clone.call(this);return S._hash=this._hash.clone(),S}});function w(S,y,i){return S^y^i}function g(S,y,i){return S&y|~S&i}function c(S,y,i){return(S|~y)^i}function n(S,y,i){return S&i|y&~i}function s(S,y,i){return S^(y|~i)}function d(S,y){return S<>>32-y}_.RIPEMD160=l._createHelper(p),_.HmacRIPEMD160=l._createHmacHelper(p)}(Math),M.RIPEMD160})},ETIr:function(I,J,P){(function(M,u){I.exports=J=u(P("Ib8C"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.WordArray,f=u.enc,l=f.Base64={stringify:function(v){var o=v.words,a=v.sigBytes,r=this._map;v.clamp();for(var h=[],m=0;m>>2]>>>24-m%4*8&255,w=o[m+1>>>2]>>>24-(m+1)%4*8&255,g=o[m+2>>>2]>>>24-(m+2)%4*8&255,c=p<<16|w<<8|g,n=0;n<4&&m+n*.75>>6*(3-n)&63));var s=r.charAt(64);if(s)for(;h.length%4;)h.push(s);return h.join("")},parse:function(v){var o=v.length,a=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var h=0;h>>6-m%4*2,g=p|w;r[h>>>2]|=g<<24-h%4*8,h++}return D.create(r,h)}}(),M.enc.Base64})},"F+F2":function(I,J,P){(function(M,u){I.exports=J=u(P("Ib8C"))})(this,function(M){return function(){if(typeof ArrayBuffer!="function")return;var u=M,_=u.lib,D=_.WordArray,f=D.init,l=D.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var v=C.byteLength,o=[],a=0;a>>2]|=C[a]<<24-a%4*8;f.call(this,o,v)}else f.apply(this,arguments)};l.prototype=D}(),M.lib.WordArray})},GRuw:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("lPiR"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.WordArray,f=u.algo,l=f.SHA256,C=f.SHA224=l.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var v=l._doFinalize.call(this);return v.sigBytes-=4,v}});u.SHA224=l._createHelper(C),u.HmacSHA224=l._createHmacHelper(C)}(),M.SHA224})},GfqC:function(I,J,P){"use strict";var M=P("q1tI"),u=P.n(M),_=P("TSYQ"),D=P.n(_);function f(G,F){var B="cannot "+G.method+" "+G.action+" "+F.status+"'",H=new Error(B);return H.status=F.status,H.method=G.method,H.url=G.action,H}function l(G){var F=G.responseText||G.response;if(!F)return F;try{return JSON.parse(F)}catch(B){return F}}function C(G){var F=new XMLHttpRequest;G.onProgress&&F.upload&&(F.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),G.onProgress(re)});var B=new FormData;G.data&&Object.keys(G.data).forEach(function(q){var re=G.data[q];if(Array.isArray(re)){re.forEach(function(ee){B.append(q+"[]",ee)});return}B.append(q,G.data[q])}),G.file instanceof Blob?B.append(G.filename,G.file,G.file.name):B.append(G.filename,G.file),F.onerror=function(re){G.onError(re)},F.onload=function(){return F.status<200||F.status>=300?G.onError(f(G,F),l(F)):G.onSuccess(l(F),F)},F.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in F&&(F.withCredentials=!0);var H=G.headers||{};return H["X-Requested-With"]!==null&&F.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(q){H[q]!==null&&F.setRequestHeader(q,H[q])}),F.send(B),{abort:function(){F.abort()}}}var v=+new Date,o=0;function a(){return"rc-upload-"+v+"-"+ ++o}function r(G,F){return G.indexOf(F,G.length-F.length)!==-1}var h=function(G,F){if(G&&F){var B=Array.isArray(F)?F:F.split(","),H=G.name||"",q=G.type||"",re=q.replace(/\/.*$/,"");return B.some(function(ee){var Ce=ee.trim();return Ce.charAt(0)==="."?r(H.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?re===Ce.replace(/\/.*$/,""):q===Ce})}return!0};function m(G,F){var B=G.createReader(),H=[];function q(){B.readEntries(function(re){var ee=Array.prototype.slice.apply(re);H=H.concat(ee);var Ce=!ee.length;Ce?F(H):q()})}q()}var p=function(F,B,H){var q=function re(ee,Ce){Ce=Ce||"",ee.isFile?ee.file(function(Ee){H(Ee)&&(ee.fullPath&&!Ee.webkitRelativePath&&(Object.defineProperties(Ee,{webkitRelativePath:{writable:!0}}),Ee.webkitRelativePath=ee.fullPath.replace(/^\//,""),Object.defineProperties(Ee,{webkitRelativePath:{writable:!1}})),B([Ee]))}):ee.isDirectory&&m(ee,function(Ee){Ee.forEach(function(pe){re(pe,""+Ce+ee.name+"/")})})};F.forEach(function(re){q(re.webkitGetAsEntry())})},w=p,g=Object.assign||function(G){for(var F=1;F=0)continue;if(!Object.prototype.hasOwnProperty.call(G,H))continue;B[H]=G[H]}return B}function S(G,F){if(!(G instanceof F))throw new TypeError("Cannot call a class as a function")}function y(G,F){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:G}function i(G,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);G.prototype=Object.create(F&&F.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(G,F):G.__proto__=F)}var k=function(F){return Object.keys(F).reduce(function(B,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(B[H]=F[H]),B},{})},O=function(G){i(F,G);function F(){var B,H,q,re;S(this,F);for(var ee=arguments.length,Ce=Array(ee),Ee=0;Ee>>2]>>>24-k%4*8&255;d[y+k>>>2]|=O<<24-(y+k)%4*8}else for(var b=0;b>>2]=S[b>>>2];return this.sigBytes+=i,this},clamp:function(){var s=this.words,d=this.sigBytes;s[d>>>2]&=4294967295<<32-d%4*8,s.length=_.ceil(d/4)},clone:function(){var s=a.clone.call(this);return s.words=this.words.slice(0),s},random:function(s){for(var d=[],S=0;S>>2]>>>24-i%4*8&255;y.push((k>>>4).toString(16)),y.push((k&15).toString(16))}return y.join("")},parse:function(s){for(var d=s.length,S=[],y=0;y>>3]|=parseInt(s.substr(y,2),16)<<24-y%8*4;return new r.init(S,d/2)}},p=h.Latin1={stringify:function(s){for(var d=s.words,S=s.sigBytes,y=[],i=0;i>>2]>>>24-i%4*8&255;y.push(String.fromCharCode(k))}return y.join("")},parse:function(s){for(var d=s.length,S=[],y=0;y>>2]|=(s.charCodeAt(y)&255)<<24-y%4*8;return new r.init(S,d)}},w=h.Utf8={stringify:function(s){try{return decodeURIComponent(escape(p.stringify(s)))}catch(d){throw new Error("Malformed UTF-8 data")}},parse:function(s){return p.parse(unescape(encodeURIComponent(s)))}},g=o.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(s){typeof s=="string"&&(s=w.parse(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes},_process:function(s){var d,S=this._data,y=S.words,i=S.sigBytes,k=this.blockSize,O=k*4,b=i/O;s?b=_.ceil(b):b=_.max((b|0)-this._minBufferSize,0);var E=b*k,x=_.min(E*4,i);if(E){for(var T=0;T>>6)+o(128|V&63):o(224|V>>>12&15)+o(128|V>>>6&63)+o(128|V&63)}else{var V=65536+(L.charCodeAt(0)-55296)*1024+(L.charCodeAt(1)-56320);return o(240|V>>>18&7)+o(128|V>>>12&63)+o(128|V>>>6&63)+o(128|V&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(L){return L.replace(r,a)},m=function(L){var V=[0,2,1][L.length%3],K=L.charCodeAt(0)<<16|(L.length>1?L.charCodeAt(1):0)<<8|(L.length>2?L.charCodeAt(2):0),W=[C.charAt(K>>>18),C.charAt(K>>>12&63),V>=2?"=":C.charAt(K>>>6&63),V>=1?"=":C.charAt(K&63)];return W.join("")},p=D.btoa&&typeof D.btoa=="function"?function(L){return D.btoa(L)}:function(L){if(L.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return L.replace(/[\s\S]{1,3}/g,m)},w=function(L){return p(h(String(L)))},g=function(L){return L.replace(/[+\/]/g,function(V){return V=="+"?"-":"_"}).replace(/=/g,"")},c=function(L,V){return V?g(w(L)):w(L)},n=function(L){return c(L,!0)},s;D.Uint8Array&&(s=function(L,V){for(var K="",W=0,G=L.length;W>>18)+C.charAt(q>>>12&63)+(typeof B!="undefined"?C.charAt(q>>>6&63):"=")+(typeof H!="undefined"?C.charAt(q&63):"=")}return V?g(K):K});var d=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(L){switch(L.length){case 4:var V=(7&L.charCodeAt(0))<<18|(63&L.charCodeAt(1))<<12|(63&L.charCodeAt(2))<<6|63&L.charCodeAt(3),K=V-65536;return o((K>>>10)+55296)+o((K&1023)+56320);case 3:return o((15&L.charCodeAt(0))<<12|(63&L.charCodeAt(1))<<6|63&L.charCodeAt(2));default:return o((31&L.charCodeAt(0))<<6|63&L.charCodeAt(1))}},y=function(L){return L.replace(d,S)},i=function(L){var V=L.length,K=V%4,W=(V>0?v[L.charAt(0)]<<18:0)|(V>1?v[L.charAt(1)]<<12:0)|(V>2?v[L.charAt(2)]<<6:0)|(V>3?v[L.charAt(3)]:0),G=[o(W>>>16),o(W>>>8&255),o(W&255)];return G.length-=[0,0,2,1][K],G.join("")},k=D.atob&&typeof D.atob=="function"?function(L){return D.atob(L)}:function(L){return L.replace(/\S{1,4}/g,i)},O=function(L){return k(String(L).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(L){return y(k(L))},E=function(L){return String(L).replace(/[-_]/g,function(V){return V=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},x=function(L){return b(E(L))},T;D.Uint8Array&&(T=function(L){return Uint8Array.from(O(E(L)),function(V){return V.charCodeAt(0)})});var N=function(){var L=D.Base64;return D.Base64=f,L};if(D.Base64={VERSION:l,atob:O,btoa:p,fromBase64:x,toBase64:c,utob:h,encode:c,encodeURI:n,btou:y,decode:x,noConflict:N,fromUint8Array:s,toUint8Array:T},typeof Object.defineProperty=="function"){var j=function(L){return{value:L,enumerable:!1,writable:!0,configurable:!0}};D.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return x(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(L){return c(this,L)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return c(this,!0)}))}}return D.Meteor&&(Base64=D.Base64),I.exports?I.exports.Base64=D.Base64:!(u=[],_=function(){return D.Base64}.apply(J,u),_!==void 0&&(I.exports=_)),{Base64:D.Base64}})}).call(this,P("IyRk"))},K3mO:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("3y9D"),P("WYAk"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.Base,f=_.WordArray,l=u.algo,C=l.MD5,v=l.EvpKDF=D.extend({cfg:D.extend({keySize:128/32,hasher:C,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,a){for(var r,h=this.cfg,m=h.hasher.create(),p=f.create(),w=p.words,g=h.keySize,c=h.iterations;w.lengthMe)){he.next=7;break}return _.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Me/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),he.abrupt("return",!1);case 7:return K.push({name:pe.name,file:pe}),W(Object(D.a)(K)),j.onChange(K),he.abrupt("return",!1);case 11:case"end":return he.stop()}},Ee)}));function Ce(Ee){return ee.apply(this,arguments)}return Ce}()},re=function(){var ee=Object(v.a)(h.a.mark(function Ce(Ee,pe){var Me,_e,he,ce,oe,Se,te,ue,Oe;return h.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return pe.file_name=Ee.name,te=Ee.name,Q.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ue=Q.sent,ue.data=JSON.parse(i(ue.data)),!((ue==null?void 0:ue.status)!==0)){Q.next=12;break}return K[K.findIndex(function(Y){return Y.name===te})].status="error",K[K.findIndex(function(Y){return Y.name===te})].file.status="error",j.onChange(K),_.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return B=new S.a({endpoint:ue==null||((Me=ue.data)===null||Me===void 0)?void 0:Me.end_point,region:ue==null||((_e=ue.data)===null||_e===void 0)?void 0:_e.region,accessKeyId:ue==null||((he=ue.data)===null||he===void 0)?void 0:he.access_key_id,accessKeySecret:ue==null||((ce=ue.data)===null||ce===void 0)?void 0:ce.access_key_secret,bucket:ue==null||((oe=ue.data)===null||oe===void 0)?void 0:oe.bucket,stsToken:ue==null||((Se=ue.data)===null||Se===void 0)?void 0:Se.security_token}),console.log(Ee,"file"),H(B),Oe=Object(n.a)(),Q.abrupt("return",new Promise(function(Y,Z){try{var be;B.multipartUpload("".concat(j.identifier,"/").concat(Oe).concat(te.indexOf(".")>-1?"."+te.split(".").pop():""),new Blob([Ee.file],{type:Ee.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Re,Ze,qe){try{console.log("\u8FDB\u5EA6",Re,Ze,qe);var et=K.findIndex(function(nt){return nt.name===te});K[et].file.percent=Re*100,K[et].tempCheckpoint=Ze,W(Object(D.a)(K))}catch(nt){}},checkpoint:K[K.findIndex(function(ge){return ge.name===te})].tempCheckpoint,callback:{customValue:{id:te+""},url:ue==null||((be=ue.data)===null||be===void 0)?void 0:be.callback_url,host:ue==null?void 0:ue.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(pe)}}).then(function(ge){var Re,Ze=K.findIndex(function(ot){return ot.name===te}),qe="done";if(((Re=ge.data)===null||Re===void 0?void 0:Re.status)===0){var et;Ee.response=(et=ge.data)===null||et===void 0?void 0:et.data;var nt=K.findIndex(function(ot){return ot.name===te});K[nt].status="done",K[nt].file.status="done"}else{var ut;_.b.warn((ut=ge.data)===null||ut===void 0?void 0:ut.message),qe="error"}K[Ze].status=qe,K[Ze].file.status=qe,j.onChange(K),Y(ge==null?void 0:ge.data)}).catch(function(ge){K[K.findIndex(function(Re){return Re.name===te})].status="error",K[K.findIndex(function(Re){return Re.name===te})].file.status="error",_.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),W(Object(D.a)(K)),j.onChange(K),Z(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return Q.stop()}},Ce)}));return function(Ee,pe){return ee.apply(this,arguments)}}();return Object(m.useEffect)(function(){K.every(function(ee){return ee==="done"||ee==="error"})&&j.onComplete(K)},[K]),Object(m.useEffect)(function(){if(N){var ee;(ee=B)===null||ee===void 0||ee.cancel()}},[N]),Object(m.useEffect)(function(){j.uploading&&K.map(function(){var ee=Object(v.a)(h.a.mark(function Ce(Ee){var pe,Me;return h.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!((!Ee.status||Ee.status==="error")&&!N)){he.next=6;break}return Ee.status="uploading",Ee.file.status="uploading",he.next=5,re(Ee,{login:T==null||((pe=T.userInfo)===null||pe===void 0)?void 0:pe.login,container_type:j.container_type,container_id:j.container_id,description:j.description});case 5:Me=he.sent;case 6:case"end":return he.stop()}},Ce)}));return function(Ce){return ee.apply(this,arguments)}}())},[j.uploading]),p.a.createElement(y,Object(M.a)({},q,{height:j.height,className:j.className}),p.a.createElement("p",{className:"ant-upload-hint"},j.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(s.a)(function(E){var x=E.loading,T=E.globalSetting,N=E.user;return{globalSetting:T,loading:x.models.competitions,user:N}})(b)},KmYQ:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(M){return M.pad.ZeroPadding={pad:function(u,_){var D=_*4;u.clamp(),u.sigBytes+=D-(u.sigBytes%D||D)},unpad:function(u){for(var _=u.words,D=u.sigBytes-1,D=u.sigBytes-1;D>=0;D--)if(_[D>>>2]>>>24-D%4*8&255){u.sigBytes=D+1;break}}},M.pad.ZeroPadding})},L9qf:function(I,J,P){I.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(I,J,P){"use strict";P.d(J,"b",function(){return d}),P.d(J,"a",function(){return y});var M=P("1OyB"),u=P("vuIU"),_=P("Ji7U"),D=P("LK+K"),f=P("q1tI"),l=P("rePB"),C=P("Ff2n"),v=P("ODXe"),o=P("4IlW"),a=P("bX4T"),r=P("YrtM"),h=P("TSYQ"),m=P.n(h),p=P("+nKL"),w=P("8OUc"),g=function(H,q){var re=H.prefixCls,ee=H.id,Ce=H.flattenOptions,Ee=H.childrenAsData,pe=H.values,Me=H.searchValue,_e=H.multiple,he=H.defaultActiveFirstOption,ce=H.height,oe=H.itemHeight,Se=H.notFoundContent,te=H.open,ue=H.menuItemSelectedIcon,Oe=H.virtual,le=H.onSelect,Q=H.onToggleOpen,Y=H.onActiveValue,Z=H.onScroll,be=H.onMouseEnter,ge="".concat(re,"-item"),Re=Object(r.a)(function(){return Ce},[te,Ce],function(tt,Ue){return Ue[0]&&tt[1]!==Ue[1]}),Ze=f.useRef(null),qe=function(Ue){Ue.preventDefault()},et=function(Ue){Ze.current&&Ze.current.scrollTo({index:Ue})},nt=function(Ue){for(var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ie=Re.length,ye=0;ye1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(B).map(function(q,re){if(!f.isValidElement(q)||!q.type)return null;var ee=q.type.isSelectOptGroup,Ce=q.key,Ee=q.props,pe=Ee.children,Me=Object(C.a)(Ee,["children"]);return H||!ee?O(q):Object(i.a)(Object(i.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?re:Ce,"__"),label:Ce},Me),{},{options:b(pe)})}).filter(function(q){return q})}var E=P("2Qr1"),x=P("qNPg"),T=P("U8pU"),N=P("Kwbf"),j=P("WKfj");function L(B){var H=B.mode,q=B.options,re=B.children,ee=B.backfill,Ce=B.allowClear,Ee=B.placeholder,pe=B.getInputElement,Me=B.showSearch,_e=B.onSearch,he=B.defaultOpen,ce=B.autoFocus,oe=B.labelInValue,Se=B.value,te=B.inputValue,ue=B.optionLabelProp,Oe=H==="multiple"||H==="tags",le=Me!==void 0?Me:Oe||H==="combobox",Q=q||b(re);if(Object(N.a)(H!=="tags"||Q.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var Y=Q.some(function(ge){return ge.options?ge.options.some(function(Re){return typeof("value"in Re?Re.value:Re.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(N.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(N.a)(H!=="combobox"||!ue,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(N.a)(H==="combobox"||!ee,"`backfill` only works with `combobox` mode."),Object(N.a)(H==="combobox"||!pe,"`getInputElement` only work with `combobox` mode."),Object(N.b)(H!=="combobox"||!pe||!Ce||!Ee,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_e&&!le&&H!=="combobox"&&H!=="tags"&&Object(N.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(N.b)(!he||ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Se!=null){var Z=Object(j.d)(Se);Object(N.a)(!oe||Z.every(function(ge){return Object(T.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(N.a)(!Oe||Array.isArray(Se),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var be=null;Object(k.a)(re).some(function(ge){if(!f.isValidElement(ge)||!ge.type)return!1;var Re=ge.type;if(Re.isSelectOption)return!1;if(Re.isSelectOptGroup){var Ze=Object(k.a)(ge.props.children).every(function(qe){return!f.isValidElement(qe)||!ge.type||qe.type.isSelectOption?!0:(be=qe.type,!1)});return!Ze}return be=Re,!0}),be&&Object(N.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(be.displayName||be.name||be,"`.")),Object(N.a)(te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var V=L,K=Object(x.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:b,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:V,fillOptionsWithMissingValue:E.a}),W=function(B){Object(_.a)(q,B);var H=Object(D.a)(q);function q(){var re;return Object(M.a)(this,q),re=H.apply(this,arguments),re.selectRef=f.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(u.a)(q,[{key:"render",value:function(){return f.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),q}(f.Component);W.Option=d,W.OptGroup=y;var G=W,F=J.c=G},M8RZ:function(I,J,P){"use strict";P.d(J,"a",function(){return o});var M=P("fWQN"),u=P("mtLc"),_=P("yKVA"),D=P("879j"),f=P("q1tI"),l=P.n(f),C=P("i8i4"),v=P.n(C),o=function(a){Object(_.a)(h,a);var r=Object(D.a)(h);function h(m){var p;Object(M.a)(this,h),p=r.call(this,m);var w=window.document;return p.node=w.createElement("div"),w.body.appendChild(p.node),p}return Object(u.a)(h,[{key:"render",value:function(){var p=this.props.children;return Object(C.createPortal)(p,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(l.a.Component)},MFOe:function(I,J,P){(function(M){var u=l(),_=C(),D=v(),f=typeof window!="undefined"?window:M;I.exports={assign:u,create:_,trim:D,bind:o,slice:a,each:r,map:h,pluck:m,isList:p,isFunction:w,isObject:g,Global:f};function l(){return Object.assign?Object.assign:function(n,s,d,S){for(var y=1;y=0;g-=1){var c=v.get(g)||new Set;c.forEach(function(n){var s=n.parent,d=n.node;if(a(d)||!n.parent||w.has(n.parent.key))return;if(a(n.parent.node)){w.add(s.key);return}var S=!0,y=!1;(s.children||[]).filter(function(i){return!a(i.node)}).forEach(function(i){var k=i.key,O=r.has(k);S&&!O&&(S=!1),!y&&(O||h.has(k))&&(y=!0)}),S&&r.add(s.key),y&&h.add(s.key),w.add(s.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(u(h,r))}}function f(C,v,o,a,r){for(var h=new Set(C),m=new Set(v),p=0;p<=a;p+=1){var w=o.get(p)||new Set;w.forEach(function(s){var d=s.key,S=s.node,y=s.children,i=y===void 0?[]:y;!h.has(d)&&!m.has(d)&&!r(S)&&i.filter(function(k){return!r(k.node)}).forEach(function(k){h.delete(k.key)})})}m=new Set;for(var g=new Set,c=a;c>=0;c-=1){var n=o.get(c)||new Set;n.forEach(function(s){var d=s.parent,S=s.node;if(r(S)||!s.parent||g.has(s.parent.key))return;if(r(s.parent.node)){g.add(d.key);return}var y=!0,i=!1;(d.children||[]).filter(function(k){return!r(k.node)}).forEach(function(k){var O=k.key,b=h.has(O);y&&!b&&(y=!1),!i&&(b||m.has(O))&&(i=!0)}),y||h.delete(d.key),i&&m.add(d.key),g.add(d.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(u(m,h))}}function l(C,v,o,a){var r=[],h;a?h=a:h=_;var m=new Set(C.filter(function(c){var n=!!o[c];return n||r.push(c),n})),p=new Map,w=0;Object.keys(o).forEach(function(c){var n=o[c],s=n.level,d=p.get(s);d||(d=new Set,p.set(s,d)),d.add(n),w=Math.max(w,s)}),Object(M.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var g;return v===!0?g=D(m,p,w,h):g=f(m,v.halfCheckedKeys,p,w,h),g}},OLod:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("K3mO"))})(this,function(M){M.lib.Cipher||function(u){var _=M,D=_.lib,f=D.Base,l=D.WordArray,C=D.BufferedBlockAlgorithm,v=_.enc,o=v.Utf8,a=v.Base64,r=_.algo,h=r.EvpKDF,m=D.Cipher=C.extend({cfg:f.extend(),createEncryptor:function(x,T){return this.create(this._ENC_XFORM_MODE,x,T)},createDecryptor:function(x,T){return this.create(this._DEC_XFORM_MODE,x,T)},init:function(x,T,N){this.cfg=this.cfg.extend(N),this._xformMode=x,this._key=T,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(x){return this._append(x),this._process()},finalize:function(x){x&&this._append(x);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function x(T){return typeof T=="string"?E:k}return function(T){return{encrypt:function(N,j,L){return x(j).encrypt(T,N,j,L)},decrypt:function(N,j,L){return x(j).decrypt(T,N,j,L)}}}}()}),p=D.StreamCipher=m.extend({_doFinalize:function(){var x=this._process(!0);return x},blockSize:1}),w=_.mode={},g=D.BlockCipherMode=f.extend({createEncryptor:function(x,T){return this.Encryptor.create(x,T)},createDecryptor:function(x,T){return this.Decryptor.create(x,T)},init:function(x,T){this._cipher=x,this._iv=T}}),c=w.CBC=function(){var x=g.extend();x.Encryptor=x.extend({processBlock:function(N,j){var L=this._cipher,V=L.blockSize;T.call(this,N,j,V),L.encryptBlock(N,j),this._prevBlock=N.slice(j,j+V)}}),x.Decryptor=x.extend({processBlock:function(N,j){var L=this._cipher,V=L.blockSize,K=N.slice(j,j+V);L.decryptBlock(N,j),T.call(this,N,j,V),this._prevBlock=K}});function T(N,j,L){var V,K=this._iv;K?(V=K,this._iv=u):V=this._prevBlock;for(var W=0;W>>2]&255;x.sigBytes-=T}},d=D.BlockCipher=m.extend({cfg:m.cfg.extend({mode:c,padding:s}),reset:function(){var x;m.reset.call(this);var T=this.cfg,N=T.iv,j=T.mode;this._xformMode==this._ENC_XFORM_MODE?x=j.createEncryptor:(x=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==x?this._mode.init(this,N&&N.words):(this._mode=x.call(j,this,N&&N.words),this._mode.__creator=x)},_doProcessBlock:function(x,T){this._mode.processBlock(x,T)},_doFinalize:function(){var x,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),x=this._process(!0)):(x=this._process(!0),T.unpad(x)),x},blockSize:128/32}),S=D.CipherParams=f.extend({init:function(x){this.mixIn(x)},toString:function(x){return(x||this.formatter).stringify(this)}}),y=_.format={},i=y.OpenSSL={stringify:function(x){var T,N=x.ciphertext,j=x.salt;return j?T=l.create([1398893684,1701076831]).concat(j).concat(N):T=N,T.toString(a)},parse:function(x){var T,N=a.parse(x),j=N.words;return j[0]==1398893684&&j[1]==1701076831&&(T=l.create(j.slice(2,4)),j.splice(0,4),N.sigBytes-=16),S.create({ciphertext:N,salt:T})}},k=D.SerializableCipher=f.extend({cfg:f.extend({format:i}),encrypt:function(x,T,N,j){j=this.cfg.extend(j);var L=x.createEncryptor(N,j),V=L.finalize(T),K=L.cfg;return S.create({ciphertext:V,key:N,iv:K.iv,algorithm:x,mode:K.mode,padding:K.padding,blockSize:x.blockSize,formatter:j.format})},decrypt:function(x,T,N,j){j=this.cfg.extend(j),T=this._parse(T,j.format);var L=x.createDecryptor(N,j).finalize(T.ciphertext);return L},_parse:function(x,T){return typeof x=="string"?T.parse(x,this):x}}),O=_.kdf={},b=O.OpenSSL={execute:function(x,T,N,j){j||(j=l.random(64/8));var L=h.create({keySize:T+N}).compute(x,j),V=l.create(L.words.slice(T),N*4);return L.sigBytes=T*4,S.create({key:L,iv:V,salt:j})}},E=D.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:b}),encrypt:function(x,T,N,j){j=this.cfg.extend(j);var L=j.kdf.execute(N,x.keySize,x.ivSize);j.iv=L.iv;var V=k.encrypt.call(this,x,T,L.key,j);return V.mixIn(L),V},decrypt:function(x,T,N,j){j=this.cfg.extend(j),T=this._parse(T,j.format);var L=j.kdf.execute(N,x.keySize,x.ivSize,T.salt);j.iv=L.iv;var V=k.decrypt.call(this,x,T,L.key,j);return V}})}()})},OZM5:function(I,J,P){"use strict";P.d(J,"b",function(){return a}),P.d(J,"a",function(){return r}),P.d(J,"k",function(){return h}),P.d(J,"h",function(){return m}),P.d(J,"i",function(){return p}),P.d(J,"g",function(){return w}),P.d(J,"c",function(){return g}),P.d(J,"d",function(){return c}),P.d(J,"j",function(){return d}),P.d(J,"e",function(){return S}),P.d(J,"f",function(){return y});var M=P("KQm4"),u=P("U8pU"),_=P("Ff2n"),D=P("q1tI"),f=P.n(D),l=P("Kwbf"),C=P("WaYH"),v=.25,o=2;function a(i,k){var O=i.slice(),b=O.indexOf(k);return b>=0&&O.splice(b,1),O}function r(i,k){var O=i.slice();return O.indexOf(k)===-1&&O.push(k),O}function h(i){return i.split("-")}function m(i,k){return"".concat(i,"-").concat(k)}function p(i){return i&&i.type&&i.type.isTreeNode}function w(i,k){var O=[i],b=k[i];function E(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];x.forEach(function(T){var N=T.key,j=T.children;O.push(N),E(j)})}return E(b.children),O}function g(i,k){var O=i.clientY,b=k.selectHandle.getBoundingClientRect(),E=b.top,x=b.bottom,T=b.height,N=Math.max(T*v,o);return O<=E+N?-1:O>=x-N?1:0}function c(i,k){if(!i)return;var O=k.multiple;return O?i.slice():i.length?[i[0]]:i}var n=function(k){return k};function s(i,k){if(!i)return[];var O=k||{},b=O.processProps,E=b===void 0?n:b,x=Array.isArray(i)?i:[i];return x.map(function(T){var N=T.children,j=Object(_.a)(T,["children"]),L=s(N,k);return f.a.createElement(C.a,Object.assign({},E(j)),L)})}function d(i){if(!i)return null;var k;if(Array.isArray(i))k={checkedKeys:i,halfCheckedKeys:void 0};else if(Object(u.a)(i)==="object")k={checkedKeys:i.checked||void 0,halfCheckedKeys:i.halfChecked||void 0};else return Object(l.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function S(i,k){var O=new Set;function b(E){if(O.has(E))return;var x=k[E];if(!x)return;O.add(E);var T=x.parent,N=x.node;if(N.disabled)return;T&&b(T.key)}return(i||[]).forEach(function(E){b(E)}),Object(M.a)(O)}function y(i){var k={};return Object.keys(i).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=i[O])}),k}},Ot1p:function(I,J,P){"use strict";var M=P("2qtc"),u=P("kLXV"),_=P("rAM+"),D=P("miYZ"),f=P("tsqr"),l=P("9og8"),C=P("tJVT"),v=P("jrin"),o=P("WmNS"),a=P.n(o),r=P("q1tI"),h=P.n(r),m=P("VrN/"),p=P.n(m),w=P("bdgK"),g=P("p77/"),c=P("Bd2K"),n=P("ELLl"),s=P("19Vz"),d=P("lZu9"),S=P("+NIl"),y=P("kSUc"),i=P("9Bee"),k=function(Ke){var ct=Ke.value,gt=ct===void 0?"":ct,wt=Ke.className,vt=Ke.showTextOnly,It=Ke.showLines,Lt=Ke.style,_t=Lt===void 0?{}:Lt,rr=Object(r.useMemo)(function(){return""},[gt]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:rr}}))},O=P("0Owb"),b=P("dejd"),E=P("C+DQ"),x=P("1vsH"),T=P("m3rI"),N=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function j(Ke){var ct=Ke.onActionCallback,gt=Ke.title,wt=Ke.icon,vt=Ke.actionName,It=Ke.className,Lt=It===void 0?"":It,_t=Ke.children;function rr(){ct(vt)}return h.a.createElement("a",{title:gt,className:Lt,onClick:rr},h.a.createElement("i",{className:"md-iconfont ".concat(wt)}),_t)}var L=function(Ke){var ct=Ke.watch,gt=Ke.showNullButton,wt=Ke.onActionCallback,vt=Ke.fullScreen,It=Ke.insertTemp,Lt=Ke.hidetoolBar,_t=Ke.uuid,rr=Ke.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.E)("_educoder_session"),"&key=").concat(_t,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var sr=[].concat(N,[{title:"".concat(ct?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ct?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!Lt&&sr.map(function($t,cr){return h.a.createElement("li",{key:cr},$t.actionName?h.a.createElement(j,Object(O.a)({},$t,{onActionCallback:wt})):h.a.createElement("span",{className:"v-line"}))}),gt?h.a.createElement("li",null,h.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:wt},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,It&&h.a.createElement("li",null,h.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(It),onActionCallback:wt},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(j,{icon:"".concat(vt?"icon-shrink":"icon-enlarge"),title:vt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:wt})))},V=P("M8RZ"),K=P("+L6B"),W=P("2/Rp"),G=P("y8nQ"),F=P("Vl3Y"),B=P("5NDa"),H=P("5rEg"),q={labelCol:{span:4},wrapperCol:{span:20}},re=function(Ke){var ct=Ke.callback,gt=Ke.onCancel;function wt(vt){ct(vt)}return h.a.createElement(F.a,Object(O.a)({},q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:wt}),h.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(H.a,null)),h.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(H.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(W.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},ee=P("7ahc"),Ce=P("k1fw"),Ee=P("HmJG"),pe=P("BjJ7"),Me=F.a.useForm,_e={width:280,marginRight:10},he={labelCol:{span:5},wrapperCol:{span:19}},ce=function(Ke){var ct=Ke.callback,gt=Ke.onCancel,wt=Me(),vt=Object(C.a)(wt,1),It=vt[0],Lt=Object(r.useRef)();function _t($t){ct(Object(Ce.a)(Object(Ce.a)({},$t),{},{name:Lt.current}))}function rr($t,cr){It.setFieldsValue({src:"/api/attachments/".concat($t.id,"?type=").concat($t.content_type),type:cr.type})}function sr($t){var cr=$t.target.files[0];Lt.current=cr.name,Se(cr,rr)}return h.a.createElement(F.a,Object(O.a)({form:It},he,{className:"upload-image-panel",onFinish:_t}),h.a.createElement(F.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},h.a.createElement(H.a,{style:_e})),h.a.createElement(oe,{onFileChange:sr}))),h.a.createElement(F.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},h.a.createElement(H.a,{style:{width:264}})),h.a.createElement(F.a.Item,{style:{textAlign:"right"}},h.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(W.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))};function oe(Ke){var ct=Ke.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:ct}))}function Se(Ke,ct){if(!Ke)throw new String("\u6CA1\u6709\u6587\u4EF6");var gt=new FormData;gt.append("editormd-image-file",Ke),gt.append("file_param_name","editormd-image-file"),gt.append("byxhr","true");var wt=new window.XMLHttpRequest;wt.withCredentials=!0,wt.addEventListener("load",function(vt){ct(JSON.parse(vt.target.responseText),Ke)},!1),wt.addEventListener("error",function(vt){console.error(vt)},!1),wt.open("POST","".concat(pe.a,"/api/attachments.json")),wt.send(gt)}var te=P("giR+"),ue=P("fyUT"),Oe=P("7Kak"),le=P("9yH6"),Q=le.a.Group,Y={margin:"0 8px"},Z=function(Ke){var ct=Ke.callback,gt=Ke.onCancel;function wt(vt){ct(vt)}return h.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:wt},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:Y},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:Y},"\u884C\u6570"),h.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(ue.a,null)),h.a.createElement("span",{style:Y},"\u5217\u6570"),h.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(ue.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:Y},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(F.a.Item,{name:"align"},h.a.createElement(Q,null,h.a.createElement(le.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(le.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(le.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(le.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(W.a,{type:"ghost",onClick:gt},"\u53D6\u6D88")))},be=P("ErOA"),ge=P("7Cbv"),Re="link",Ze="upload-image",qe="code-block",et="add-table",nt="------------",ut={default:nt,left:":".concat(nt),center:":".concat(nt,":"),right:"".concat(nt,":")},ot=P("9VGf"),je,De;function rt(){}var lt=0,Je=1e4,tt="\u2581",Ue=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function ke(Ke){return/^\d+$/.test(Ke)?"".concat(Ke,"px"):Ke}var Ie=navigator.platform.toUpperCase().indexOf("MAC")>=0,ye=Ie?"Cmd":"Ctrl",Te=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],Ae=(je={},Object(v.a)(je,ye+"-B","bold"),Object(v.a)(je,ye+"-I","italic"),je),Pe=(De={},Object(v.a)(De,Re,"\u6DFB\u52A0\u94FE\u63A5"),Object(v.a)(De,qe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(v.a)(De,Ze,"\u6DFB\u52A0\u6587\u4EF6"),Object(v.a)(De,et,"\u6DFB\u52A0\u8868\u683C"),De),$e=J.a=function(Ke){var ct=Ke.defaultValue,gt=ct===void 0?"":ct,wt=Ke.onChange,vt=Ke.width,It=vt===void 0?"100%":vt,Lt=Ke.height,_t=Lt===void 0?400:Lt,rr=Ke.miniToolbar,sr=rr===void 0?!1:rr,$t=Ke.isFocus,cr=$t===void 0?!1:$t,Wt=Ke.watch,Lr=Ke.insertTemp,Cr=Ke.mode,Ct=Cr===void 0?"markdown":Cr,lr=Ke.id,Fr=lr===void 0?"markdown-editor-id":lr,$r=Ke.showResizeBar,Hr=$r===void 0?!1:$r,oi=Ke.noStorage,Tt=oi===void 0?!1:oi,Rt=Ke.showNullButton,Et=Rt===void 0?!1:Rt,Ar=Ke.hidetoolBar,Br=Ar===void 0?!1:Ar,Xt=Ke.fullScreen,Nt=Xt===void 0?!1:Xt,jr=Ke.onBlur,bn=Ke.onCMBeforeChange,zr=Ke.onFullScreen,mt=Ke.className,Ut=mt===void 0?"":mt,an=Ke.disablePaste,xn=an===void 0?!1:an,On=Ke.placeholder,An=On===void 0?"":On,se=Ke.values,z=se===void 0?"":se,X=Object(r.useState)(null),ne=Object(C.a)(X,2),de=ne[0],ie=ne[1],ze=Object(r.useState)(gt),ht=Object(C.a)(ze,2),St=ht[0],Pt=ht[1],pt=Object(r.useState)(Wt),Ht=Object(C.a)(pt,2),zt=Ht[0],Mr=Ht[1],on=Object(r.useState)(Nt),Zr=Object(C.a)(on,2),Qt=Zr[0],Kr=Zr[1],or=Object(r.useState)(""),Yt=Object(C.a)(or,2),nr=Yt[0],dr=Yt[1],Jr=Object(r.useState)(0),un=Object(C.a)(Jr,2),En=un[0],wi=un[1],Vi=Object(r.useState)(_t),Fi=Object(C.a)(Vi,2),Qn=Fi[0],rn=Fi[1],Ri=Object(r.useState)(!1),sn=Object(C.a)(Ri,2),hi=sn[0],Gr=sn[1],ir=Object(r.useRef)(Object(ge.a)()),qr=Object(r.useRef)(!1),Tr=Object(r.useRef)(),dn=Object(r.useRef)(),_r=Object(r.useRef)(),fi=Object(r.useRef)(),hn=Object(r.useRef)(),Hn=function(){var Ft=Object(l.a)(a.a.mark(function Jt(){var Gt,hr;return a.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:return Vr.next=2,Object(be.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ir.current}});case 2:hr=Vr.sent,hr!=null&&(Gt=hr.attachments)!==null&&Gt!==void 0&&Gt.length&&(console.log("cm:",de,dn),hr.attachments.map(function(vr){vr.content_type.indexOf("image")>-1?de.replaceSelection(".concat(vr.content_type,")")):vr.content_type.indexOf("video")>-1?de.replaceSelection('')):vr.content_type.indexOf("pdf")>-1?de.replaceSelection('').concat(vr.name,"")):de.replaceSelection("[".concat(vr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(vr.id,"?type=").concat(vr.content_type,")"))}));case 4:case"end":return Vr.stop()}},Jt)}));return function(){return Ft.apply(this,arguments)}}();Object(r.useEffect)(function(){Pt(z),de==null||de.setValue(z)},[z]),Object(r.useEffect)(function(){zr==null||zr(Qt)},[Qt]),Object(r.useEffect)(function(){if(dn.current){var Ft=p.a.fromTextArea(dn.current,{mode:Ct,lineNumbers:!sr,lineWrapping:!0,value:gt,autoCloseTags:!0,autoCloseBrackets:!0});cr&&Ft.focus();function Jt(Gt,hr){if(xn){hr.preventDefault();return}var xr=hr.clipboardData;if(xr){var Vr=xr.types.toString(),vr=xr.items;if(Vr==="Files"||xr.types.indexOf("Files")>-1){if(hr.preventDefault(),Ct=="stex")return;try{var _n,zn=vr[1];((_n=vr[0])===null||_n===void 0?void 0:_n.kind)==="file"&&(zn=vr[0]);var mr=zn.getAsFile(),ji=mr.name.split(".").pop();Se(mr,function(Rr){if(Rr.id){var Mn,mi,qn;(mr==null||((Mn=mr.type)===null||Mn===void 0)?void 0:Mn.indexOf("image"))>-1?Ft.replaceSelection(".concat(Rr.content_type,")")):(mr==null||((mi=mr.type)===null||mi===void 0)?void 0:mi.indexOf("video"))>-1?Ft.replaceSelection('')):(mr==null||((qn=mr.type)===null||qn===void 0)?void 0:qn.indexOf("pdf"))>-1?Ft.replaceSelection('').concat(mr.name,"")):Te.includes(ji)?Ft.replaceSelection('').concat(mr.name,"")):Ft.replaceSelection("[".concat(mr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Rr.id,"?type=").concat(Rr.content_type,")"))}else(Rr==null?void 0:Rr.status)===401&&(document.location.href="/user/login")})}catch(Rr){f.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ft.on("paste",Jt),Ft.on("dragleave",function(Gt,hr){_r.current.classList.remove("mouse-hover-md")}),Ft.on("dragover",function(Gt,hr){_r.current.classList.add("mouse-hover-md")}),Ft.on("drop",function(Gt,hr){_r.current.classList.add("mouse-hover-md");var xr;if(xr=hr.dataTransfer.files,xr.length>0){hr.preventDefault(),hr.stopPropagation();for(var Vr=function(zn){var mr=xr[zn],ji=mr.name.split(".").pop();Se(mr,function(Rr){if(Rr.id){var Mn,mi,qn;(mr==null||((Mn=mr.type)===null||Mn===void 0)?void 0:Mn.indexOf("image"))>-1?Ft.replaceSelection(".concat(Rr.content_type,")")):(mr==null||((mi=mr.type)===null||mi===void 0)?void 0:mi.indexOf("video"))>-1?Ft.replaceSelection('')):(mr==null||((qn=mr.type)===null||qn===void 0)?void 0:qn.indexOf("pdf"))>-1?Ft.replaceSelection('').concat(mr.name,"")):Te.includes(ji)?Ft.replaceSelection('').concat(mr.name,"")):Ft.replaceSelection("[".concat(mr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Rr.id,"?type=").concat(Rr.content_type,")"))}else(Rr==null?void 0:Rr.status)===401&&(document.location.href="/user/login")})},vr=0;vr0||vr.target.offsetWidth>0)&&(Di(),de.setSize("100%","100%"),de.refresh())}}catch(_n){xr.e(_n)}finally{xr.f()}});return Gt.observe(dn.current.parentElement),Gt}if(de){var Jt=Ft();return function(){Jt.unobserve(dn.current.parentElement)}}},[de,Di]),Object(r.useEffect)(function(){if(de){for(var Ft=[],Jt=function(){var vr=hr[Gt];xr=Object(C.a)(vr,2);var _n=xr[0],zn=xr[1],mr=Object(v.a)({},_n,function(){yi(zn)});Ft.push(mr),de.addKeyMap(mr)},Gt=0,hr=Object.entries(Ae);Gt0){var Ft=new Date().getTime(),Jt=window.sessionStorage.getItem(Fr);Ft>=En+Je&&(!Jt||Jt!==St)&&(window.sessionStorage.setItem(Fr,St),Gr(!0))}},Je),Object(r.useEffect)(function(){Mr(Wt)},[de,Wt]),Object(r.useEffect)(function(){de&&(cr&&de.focus())},[de,cr]),Object(r.useEffect)(function(){if(zt&&de){var Ft=de.getScrollerElement();function Jt(Gt){var hr=Gt.target;if(hn.current){var xr=hr.scrollTop/hr.scrollHeight;hn.current.scrollTop=hn.current.scrollHeight*xr}}return Ft.addEventListener("scroll",Jt),function(){Ft.removeEventListener("scroll",Jt)}}},[de,zt]),Object(r.useEffect)(function(){if(de&&bn){function Ft(Jt,Gt){bn(Jt,Gt)}return de.on("beforeChange",Ft),function(){de.off("beforeChange",Ft)}}},[de,bn]),Object(r.useEffect)(function(){if(de&&jr){function Ft(){jr(de.getValue())}return de.on("blur",Ft),function(){de.off("blur",Ft)}}},[de,jr]),Object(r.useEffect)(function(){if(de){function Ft(Jt){var Gt=Jt.getValue();Pt(Gt),wi(new Date().getTime()),Jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),wt&&wt(Gt)}return de.on("change",Ft),function(){de.off("change",Ft)}}},[de,wt]),Object(r.useEffect)(function(){de&&(gt==null?(de.setValue(""),Pt("")):gt!==de.getValue()&&(de.setValue(gt),Pt(gt),de.setCursor(de.lineCount(),0)))},[de,gt]);var yi=Object(r.useCallback)(function(Ft){var Jt=de.getCursor(),Gt=de.getSelection(),hr=Gt.split(`
`);switch(Ft){case"bold":return de.replaceSelection("**"+Gt+"**"),Gt===""&&de.setCursor(Jt.line,Jt.ch+2),de.focus();case"italic":return de.replaceSelection("*"+Gt+"*"),Gt===""&&de.setCursor(Jt.line,Jt.ch+1),de.focus();case"code":return de.replaceSelection("`"+Gt+"`"),Gt===""&&de.setCursor(Jt.line,Jt.ch+1),de.focus();case"inline-latex":return de.replaceSelection("`$$"+Gt+"$$`"),Gt===""&&de.setCursor(Jt.line,Jt.ch+3),de.focus();case"latex":return de.replaceSelection("```latex\n"+Gt+"\n```"),de.setCursor(Jt.line+1,Gt.length+1),de.focus();case"line-break":return de.replaceSelection(`
`),de.focus();case"list-ul":return Gt===""?de.replaceSelection("- "+Gt):de.replaceSelection(hr.map(function(xr){return xr===""?"":"- ".concat(xr)}).join(`
`)),de.focus();case"list-ol":return Gt===""?de.replaceSelection("1. "+Gt):de.replaceSelection(hr.map(function(xr,Vr){return xr===""?"":"".concat(Vr+1,". ").concat(xr)}).join(`
`)),de.focus();case"add-null-ch":return Gt===""&&de.setCursor(Jt.line,Jt.ch+1),de.replaceSelection(tt),de.focus();case"inster-template-1":return Gt===""&&de.setCursor(Jt.line,Jt.ch),de.replaceSelection(Ue),de.focus();case"eraser":return de.setValue(""),de.focus();case"trigger-watch":return Mr(!zt),de.focus();case"trigger-full-screen":return Kr(!Qt),de.focus();case Re:dr(Re);return;case qe:dr(qe);return;case Ze:dr(Ze);return;case et:dr(et);return;default:throw new Error}},[de,zt,Qt]),Zn=Object(r.useCallback)(function(Ft){dr("");switch(nr){case Re:var Jt=Ft.title,Gt=Ft.link;return de.replaceSelection("[".concat(Jt,"](").concat(Gt,")")),de.focus();case qe:var hr=Ft.language,xr=Ft.content;return de.replaceSelection(["```"+hr,xr,"```"].join(`
`)),de.focus();case Ze:var Vr=Ft.src,vr=Ft.alt,_n=Ft.name;return Vr.indexOf("type=image")>-1?de.replaceSelection(".concat(Vr,' "').concat(vr||"",'" )')):Vr.indexOf("type=application/pdf")>-1?de.replaceSelection('').concat(_n,"")):de.replaceSelection('').concat(_n,"")),de.focus();case et:for(var zn=Ft.row,mr=Ft.col,ji=Ft.align,Rr=`
`,Mn=0;Mn300&&(_n=300);var zn=_t+_n+"px";rn(zn)}}return Ft.addEventListener("mousedown",hr),document.addEventListener("mousemove",Vr),document.addEventListener("mouseup",xr),function(){Ft.removeEventListener("mousedown",hr),document.removeEventListener("mousemove",Vr),document.removeEventListener("mouseup",xr)}}},[de,fi]),Object(r.useEffect)(function(){rn(_t)},[_t]);var Ni=ke(It),si=ke(Qn),pi={width:Ni,height:si},Bi=Object(r.useMemo)(function(){if(En){var Ft=new Date(En),Jt=Ft.getHours(),Gt=Ft.getMinutes(),hr=Ft.getSeconds();return Jt=Jt<10?"0"+Jt:Jt,Gt=Gt<10?"0"+Gt:Gt,hr=hr<10?"0"+hr:hr,"".concat(Jt,":").concat(Gt,":").concat(hr)}return 0},[En]);function li(){window.sessionStorage.removeItem(Fr),Gr(!1),wi(0)}function en(){Gr(!1),wi(0),de.setValue(window.sessionStorage.getItem(Fr))}function Qi(Ft,Jt){var Gt=de.getValue();Gt=Gt.replace(Ft,Jt),Pt(Gt),de==null||de.setValue(Gt)}return h.a.createElement(r.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:_r},h.a.createElement("div",{className:"markdown-editor-container ".concat(Ut," ").concat(zt?"on-preview":""," ").concat(sr?"mini":""," ").concat(Qt?"full-screen":""),style:pi},h.a.createElement(L,{insertTemp:Lr,watch:zt,fullScreen:Qt,showNullButton:Et,onActionCallback:yi,hidetoolBar:Br,uuid:ir.current,setOpenPhones:function(){qr.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:dn,placeholder:An})),zt?h.a.createElement("div",{ref:hn,className:"preview-container"},Ct==="stex"&&h.a.createElement(k,{value:St}),Ct!=="stex"&&h.a.createElement(i.a,{edit:!0,value:St,replaces:Qi})):null))),Hr?h.a.createElement("a",{ref:fi,className:"editor-resize"}):null,h.a.createElement(V.a,null,Pe[nr]?h.a.createElement(u.a,{centered:!0,title:Pe[nr],visible:!0,onCancel:jn,footer:null},Si):null))}},PD8m:function(I,J){I.exports={name:"memoryStorage",read:M,write:u,each:_,remove:D,clearAll:f};var P={};function M(l){return P[l]}function u(l,C){P[l]=C}function _(l){for(var C in P)P.hasOwnProperty(C)&&l(P[C],C)}function D(l){delete P[l]}function f(l){P={}}},PVpz:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(M){return function(){var u=M,_=u.lib,D=_.StreamCipher,f=u.algo,l=[],C=[],v=[],o=f.RabbitLegacy=D.extend({_doReset:function(){var r=this._key.words,h=this.cfg.iv,m=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],p=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var w=0;w<4;w++)a.call(this);for(var w=0;w<8;w++)p[w]^=m[w+4&7];if(h){var g=h.words,c=g[0],n=g[1],s=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,d=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=s>>>16|d&4294901760,y=d<<16|s&65535;p[0]^=s,p[1]^=S,p[2]^=d,p[3]^=y,p[4]^=s,p[5]^=S,p[6]^=d,p[7]^=y;for(var w=0;w<4;w++)a.call(this)}},_doProcessBlock:function(r,h){var m=this._X;a.call(this),l[0]=m[0]^m[5]>>>16^m[3]<<16,l[1]=m[2]^m[7]>>>16^m[5]<<16,l[2]=m[4]^m[1]>>>16^m[7]<<16,l[3]=m[6]^m[3]>>>16^m[1]<<16;for(var p=0;p<4;p++)l[p]=(l[p]<<8|l[p]>>>24)&16711935|(l[p]<<24|l[p]>>>8)&4278255360,r[h+p]^=l[p]},blockSize:128/32,ivSize:64/32});function a(){for(var r=this._X,h=this._C,m=0;m<8;m++)C[m]=h[m];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var m=0;m<8;m++){var p=r[m]+h[m],w=p&65535,g=p>>>16,c=((w*w>>>17)+w*g>>>15)+g*g,n=((p&4294901760)*p|0)+((p&65535)*p|0);v[m]=c^n}r[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,r[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,r[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,r[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,r[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,r[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,r[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,r[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}u.RabbitLegacy=D._createHelper(o)}(),M.RabbitLegacy})},RELg:function(I,J,P){var M=P("MFOe"),u=M.Global;I.exports={name:"oldIE-userDataStorage",write:C,read:v,each:o,remove:a,clearAll:r};var _="storejs",D=u.document,f=p(),l=(u.navigator?u.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(w,g){if(l)return;var c=m(w);f(function(n){n.setAttribute(c,g),n.save(_)})}function v(w){if(l)return;var g=m(w),c=null;return f(function(n){c=n.getAttribute(g)}),c}function o(w){f(function(g){for(var c=g.XMLDocument.documentElement.attributes,n=c.length-1;n>=0;n--){var s=c[n];w(g.getAttribute(s.name),s.name)}})}function a(w){var g=m(w);f(function(c){c.removeAttribute(g),c.save(_)})}function r(){f(function(w){var g=w.XMLDocument.documentElement.attributes;w.load(_);for(var c=g.length-1;c>=0;c--)w.removeAttribute(g[c].name);w.save(_)})}var h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function m(w){return w.replace(/^\d/,"___$&").replace(h,"___")}function p(){if(!D||!D.documentElement||!D.documentElement.addBehavior)return null;var w="script",g,c,n;try{c=new ActiveXObject("htmlfile"),c.open(),c.write("<"+w+">document.w=window"+w+'>'),c.close(),g=c.w.frames[0].document,n=g.createElement("div")}catch(s){n=D.createElement("div"),g=D.body}return function(s){var d=[].slice.call(arguments,0);d.unshift(n),g.appendChild(n),n.addBehavior("#default#userData"),n.load(_),s.apply(this,d),g.removeChild(n);return}}},S6kV:function(I,J,P){(function(M,u,_){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(M){return M.mode.OFB=function(){var u=M.lib.BlockCipherMode.extend(),_=u.Encryptor=u.extend({processBlock:function(D,f){var l=this._cipher,C=l.blockSize,v=this._iv,o=this._keystream;v&&(o=this._keystream=v.slice(0),this._iv=void 0),l.encryptBlock(o,0);for(var a=0;a|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(le){for(var Q=0,Y=!1,Z=!1,be=0,ge=le.length;be122||(ye<65||Ie>90||rt.push([Math.max(65,Ie)|32,Math.min(ye,90)|32]),ye<97||Ie>122||rt.push([Math.max(97,Ie)&~32,Math.min(ye,122)&~32]))}}rt.sort(function($e,Ke){return $e[0]-Ke[0]||Ke[1]-$e[1]});for(var Te=[],Ae=[],tt=0;ttPe[0]&&(Pe[1]+1>Pe[0]&&Je.push("-"),Je.push(et(Pe[1])))}return Je.push("]"),Je.join("")}function ut(je){for(var De=je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),rt=De.length,lt=[],Je=0,tt=0;Je