(window.webpackJsonp=window.webpackJsonp||[]).push([[206,6,7,19,20],{"+NIl":function(I,q,N){(function(P){P(N("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(m,S){"use strict";function R(d,E){d.cmdState.push(E)}function T(d){return d.cmdState.length>0?d.cmdState[d.cmdState.length-1]:null}function g(d){var E=d.cmdState.pop();E&&E.closeBracket()}function C(d){for(var E=d.cmdState,y=E.length-1;y>=0;y--){var l=E[y];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function h(d,E,y){return function(){this.name=d,this.bracketNo=0,this.style=E,this.styles=y,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};s.importmodule=h("importmodule","tag",["string","builtin"]),s.documentclass=h("documentclass","tag",["","atom"]),s.usepackage=h("usepackage","tag",["atom"]),s.begin=h("begin","tag",["atom"]),s.end=h("end","tag",["atom"]),s.label=h("label","tag",["atom"]),s.ref=h("ref","tag",["atom"]),s.eqref=h("eqref","tag",["atom"]),s.cite=h("cite","tag",["atom"]),s.bibitem=h("bibitem","tag",["atom"]),s.Bibitem=h("Bibitem","tag",["atom"]),s.RBibitem=h("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function a(d,E){d.f=E}function r(d,E){var y;if(d.match(/^\\[a-zA-Z@]+/)){var l=d.current().slice(1);return y=s.hasOwnProperty(l)?s[l]:s.DEFAULT,y=new y,R(E,y),a(E,p),y.style}if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/\\]/))return"tag";if(d.match("\\["))return a(E,function(o,u){return f(o,u,"\\]")}),"keyword";if(d.match("\\("))return a(E,function(o,u){return f(o,u,"\\)")}),"keyword";if(d.match("$$"))return a(E,function(o,u){return f(o,u,"$$")}),"keyword";if(d.match("$"))return a(E,function(o,u){return f(o,u,"$")}),"keyword";var n=d.next();if(n=="%")return d.skipToEnd(),"comment";if(n=="}"||n=="]"){if(y=T(E),y)y.closeBracket(n),a(E,p);else return"error";return"bracket"}else return n=="{"||n=="["?(y=s.DEFAULT,y=new y,R(E,y),"bracket"):/\d/.test(n)?(d.eatWhile(/[\w.%]/),"atom"):(d.eatWhile(/[\w\-_]/),y=C(E),y.name=="begin"&&(y.argument=d.current()),y.styleIdentifier())}function f(d,E,y){if(d.eatSpace())return null;if(y&&d.match(y))return a(E,r),"keyword";if(d.match(/^\\[a-zA-Z@]+/))return"tag";if(d.match(/^[a-zA-Z]+/))return"variable-2";if(d.match(/^\\[$&%#{}_]/))return"tag";if(d.match(/^\\[,;!\/]/))return"tag";if(d.match(/^[\^_&]/))return"tag";if(d.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(d.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=d.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(d.skipToEnd(),"comment"):"error"}function p(d,E){var y=d.peek(),l;return y=="{"||y=="["?(l=T(E),l.openBracket(y),d.eat(y),a(E,r),"bracket"):/[ \t\r]/.test(y)?(d.eat(y),null):(a(E,r),g(E),r(d,E))}return{startState:function(){var d=S.inMathMode?function(E,y){return f(E,y)}:r;return{cmdState:[],f:d}},copyState:function(d){return{cmdState:d.cmdState.slice(),f:d.f}},token:function(d,E){return E.f(d,E)},blankLine:function(d){d.f=r,d.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(I,q,N){(function(P){P(N("VrN/"))})(function(P){P.defineOption("placeholder","",function(h,s,a){var r=a&&a!=P.Init;if(s&&!r)h.on("blur",T),h.on("change",g),h.on("swapDoc",g),P.on(h.getInputField(),"compositionupdate",h.state.placeholderCompose=function(){R(h)}),g(h);else if(!s&&r){h.off("blur",T),h.off("change",g),h.off("swapDoc",g),P.off(h.getInputField(),"compositionupdate",h.state.placeholderCompose),m(h);var f=h.getWrapperElement();f.className=f.className.replace(" CodeMirror-empty","")}s&&!h.hasFocus()&&T(h)});function m(h){h.state.placeholder&&(h.state.placeholder.parentNode.removeChild(h.state.placeholder),h.state.placeholder=null)}function S(h){m(h);var s=h.state.placeholder=document.createElement("pre");s.style.cssText="height: 0; overflow: visible",s.style.direction=h.getOption("direction"),s.className="CodeMirror-placeholder CodeMirror-line-like";var a=h.getOption("placeholder");typeof a=="string"&&(a=document.createTextNode(a)),s.appendChild(a),h.display.lineSpace.insertBefore(s,h.display.lineSpace.firstChild)}function R(h){setTimeout(function(){var s=!1,a=h.getInputField();a.nodeName=="TEXTAREA"?s=!a.value:h.lineCount()==1&&(s=!/[^\u200b]/.test(a.querySelector(".CodeMirror-line").textContent)),s?S(h):m(h)},20)}function T(h){C(h)&&S(h)}function g(h){var s=h.getWrapperElement(),a=C(h);s.className=s.className.replace(" CodeMirror-empty","")+(a?" CodeMirror-empty":""),a?S(h):m(h)}function C(h){return h.lineCount()===1&&h.getLine(0)===""}})},"1eCo":function(I,q,N){(function(P){P(N("VrN/"))})(function(P){"use strict";var m={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},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(R,T){var g=R.indentUnit,C={},h=T.htmlMode?m:S;for(var s in h)C[s]=h[s];for(var s in T)C[s]=T[s];var a,r;function f(_,j){function F(z){return j.tokenize=z,z(_,j)}var L=_.next();if(L=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?F(E("atom","]]>")):null:_.match("--")?F(E("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),F(y(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),j.tokenize=E("meta","?>"),"meta"):(a=_.eat("/")?"closeTag":"openTag",j.tokenize=p,"tag bracket");if(L=="&"){var X;return _.eat("#")?_.eat("x")?X=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):X=_.eatWhile(/[\d]/)&&_.eat(";"):X=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),X?"atom":"error"}else return _.eatWhile(/[^&<]/),null}f.isInText=!0;function p(_,j){var F=_.next();if(F==">"||F=="/"&&_.eat(">"))return j.tokenize=f,a=F==">"?"endTag":"selfcloseTag","tag bracket";if(F=="=")return a="equals",null;if(F=="<"){j.tokenize=f,j.state=u,j.tagName=j.tagStart=null;var L=j.tokenize(_,j);return L?L+" tag error":"tag error"}else return/[\'\"]/.test(F)?(j.tokenize=d(F),j.stringStartCol=_.column(),j.tokenize(_,j)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(_){var j=function(F,L){for(;!F.eol();)if(F.next()==_){L.tokenize=p;break}return"string"};return j.isInAttribute=!0,j}function E(_,j){return function(F,L){for(;!F.eol();){if(F.match(j)){L.tokenize=f;break}F.next()}return _}}function y(_){return function(j,F){for(var L;(L=j.next())!=null;){if(L=="<")return F.tokenize=y(_+1),F.tokenize(j,F);if(L==">")if(_==1){F.tokenize=f;break}else return F.tokenize=y(_-1),F.tokenize(j,F)}return"meta"}}function l(_,j,F){this.prev=_.context,this.tagName=j,this.indent=_.indented,this.startOfLine=F,(C.doNotIndent.hasOwnProperty(j)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function n(_){_.context&&(_.context=_.context.prev)}function o(_,j){for(var F;;){if(!_.context)return;if(F=_.context.tagName,!C.contextGrabbers.hasOwnProperty(F)||!C.contextGrabbers[F].hasOwnProperty(j))return;n(_)}}function u(_,j,F){return _=="openTag"?(F.tagStart=j.column(),w):_=="closeTag"?v:u}function w(_,j,F){return _=="word"?(F.tagName=j.current(),r="tag",k):C.allowMissingTagName&&_=="endTag"?(r="tag bracket",k(_,j,F)):(r="error",w)}function v(_,j,F){if(_=="word"){var L=j.current();return F.context&&F.context.tagName!=L&&C.implicitlyClosed.hasOwnProperty(F.context.tagName)&&n(F),F.context&&F.context.tagName==L||C.matchClosing===!1?(r="tag",i):(r="tag error",D)}else return C.allowMissingTagName&&_=="endTag"?(r="tag bracket",i(_,j,F)):(r="error",D)}function i(_,j,F){return _!="endTag"?(r="error",i):(n(F),u)}function D(_,j,F){return r="error",i(_,j,F)}function k(_,j,F){if(_=="word")return r="attribute",c;if(_=="endTag"||_=="selfcloseTag"){var L=F.tagName,X=F.tagStart;return F.tagName=F.tagStart=null,_=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(L)?o(F,L):(o(F,L),F.context=new l(F,L,X==F.indented)),u}return r="error",k}function c(_,j,F){return _=="equals"?b:(C.allowMissing||(r="error"),k(_,j,F))}function b(_,j,F){return _=="string"?x:_=="word"&&C.allowUnquoted?(r="string",k):(r="error",k(_,j,F))}function x(_,j,F){return _=="string"?x:k(_,j,F)}return{startState:function(_){var j={tokenize:f,state:u,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(j.baseIndent=_),j},token:function(_,j){if(!j.tagName&&_.sol()&&(j.indented=_.indentation()),_.eatSpace())return null;a=null;var F=j.tokenize(_,j);return(F||a)&&F!="comment"&&(r=null,j.state=j.state(a||F,_,j),r&&(F=r=="error"?F+" error":r)),F},indent:function(_,j,F){var L=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+g;if(L&&L.noIndent)return P.Pass;if(_.tokenize!=p&&_.tokenize!=f)return F?F.match(/^(\s*)/)[0].length:0;if(_.tagName)return C.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+g*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(_){_.state==b&&(_.state=k)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var j=[],F=_.context;F;F=F.prev)F.tagName&&j.push(F.tagName);return j.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("MlIO"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.Hasher,T=m.x64,g=T.Word,C=T.WordArray,h=m.algo;function s(){return g.create.apply(g,arguments)}var a=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],r=[];(function(){for(var p=0;p<80;p++)r[p]=s()})();var f=h.SHA512=R.extend({_doReset:function(){this._hash=new C.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(p,d){for(var E=this._hash.words,y=E[0],l=E[1],n=E[2],o=E[3],u=E[4],w=E[5],v=E[6],i=E[7],D=y.high,k=y.low,c=l.high,b=l.low,x=n.high,_=n.low,j=o.high,F=o.low,L=u.high,X=u.low,z=w.high,H=w.low,G=v.high,U=v.low,B=i.high,W=i.low,te=D,de=k,fe=c,be=b,Ce=x,ue=_,ge=j,pe=F,oe=L,ae=X,re=z,he=H,Q=G,ie=U,we=B,ne=W,J=0;J<80;J++){var V,Z,Ee=r[J];if(J<16)Z=Ee.high=p[d+J*2]|0,V=Ee.low=p[d+J*2+1]|0;else{var xe=r[J-15],_e=xe.high,je=xe.low,Be=(_e>>>1|je<<31)^(_e>>>8|je<<24)^_e>>>7,He=(je>>>1|_e<<31)^(je>>>8|_e<<24)^(je>>>7|_e<<25),Ue=r[J-2],ze=Ue.high,Ge=Ue.low,Ye=(ze>>>19|Ge<<13)^(ze<<3|Ge>>>29)^ze>>>6,Re=(Ge>>>19|ze<<13)^(Ge<<3|ze>>>29)^(Ge>>>6|ze<<26),tt=r[J-7],rt=tt.high,We=tt.low,$e=r[J-16],Ie=$e.high,Oe=$e.low;V=He+We,Z=Be+rt+(V>>>0>>0?1:0),V=V+Re,Z=Z+Ye+(V>>>0>>0?1:0),V=V+Oe,Z=Z+Ie+(V>>>0>>0?1:0),Ee.high=Z,Ee.low=V}var Le=oe&re^~oe&Q,Te=ae&he^~ae&ie,Ae=te&fe^te&Ce^fe&Ce,ke=de&be^de&ue^be&ue,Me=(te>>>28|de<<4)^(te<<30|de>>>2)^(te<<25|de>>>7),Fe=(de>>>28|te<<4)^(de<<30|te>>>2)^(de<<25|te>>>7),Xe=(oe>>>14|ae<<18)^(oe>>>18|ae<<14)^(oe<<23|ae>>>9),qe=(ae>>>14|oe<<18)^(ae>>>18|oe<<14)^(ae<<23|oe>>>9),pt=a[J],at=pt.high,ft=pt.low,Et=ne+qe,xt=we+Xe+(Et>>>0>>0?1:0),Et=Et+Te,xt=xt+Le+(Et>>>0>>0?1:0),Et=Et+ft,xt=xt+at+(Et>>>0>>0?1:0),Et=Et+V,xt=xt+Z+(Et>>>0>>0?1:0),lt=Fe+ke,Wt=Me+Ae+(lt>>>0>>0?1:0);we=Q,ne=ie,Q=re,ie=he,re=oe,he=ae,ae=pe+Et|0,oe=ge+xt+(ae>>>0>>0?1:0)|0,ge=Ce,pe=ue,Ce=fe,ue=be,fe=te,be=de,de=Et+lt|0,te=xt+Wt+(de>>>0>>0?1:0)|0}k=y.low=k+de,y.high=D+te+(k>>>0>>0?1:0),b=l.low=b+be,l.high=c+fe+(b>>>0>>0?1:0),_=n.low=_+ue,n.high=x+Ce+(_>>>0>>0?1:0),F=o.low=F+pe,o.high=j+ge+(F>>>0>>0?1:0),X=u.low=X+ae,u.high=L+oe+(X>>>0>>0?1:0),H=w.low=H+he,w.high=z+re+(H>>>0>>0?1:0),U=v.low=U+ie,v.high=G+Q+(U>>>0>>0?1:0),W=i.low=W+ne,i.high=B+we+(W>>>0>>0?1:0)},_doFinalize:function(){var p=this._data,d=p.words,E=this._nDataBytes*8,y=p.sigBytes*8;d[y>>>5]|=128<<24-y%32,d[(y+128>>>10<<5)+30]=Math.floor(E/4294967296),d[(y+128>>>10<<5)+31]=E,p.sigBytes=d.length*4,this._process();var l=this._hash.toX32();return l},clone:function(){var p=R.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});m.SHA512=R._createHelper(f),m.HmacSHA512=R._createHmacHelper(f)}(),P.SHA512})},"3y9D":function(I,q,N){(function(P,m){I.exports=q=m(N("Ib8C"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.WordArray,T=S.Hasher,g=m.algo,C=[],h=g.SHA1=T.extend({_doReset:function(){this._hash=new R.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,a){for(var r=this._hash.words,f=r[0],p=r[1],d=r[2],E=r[3],y=r[4],l=0;l<80;l++){if(l<16)C[l]=s[a+l]|0;else{var n=C[l-3]^C[l-8]^C[l-14]^C[l-16];C[l]=n<<1|n>>>31}var o=(f<<5|f>>>27)+y+C[l];l<20?o+=(p&d|~p&E)+1518500249:l<40?o+=(p^d^E)+1859775393:l<60?o+=(p&d|p&E|d&E)-1894007588:o+=(p^d^E)-899497514,y=E,E=d,d=p<<30|p>>>2,p=f,f=o}r[0]=r[0]+f|0,r[1]=r[1]+p|0,r[2]=r[2]+d|0,r[3]=r[3]+E|0,r[4]=r[4]+y|0},_doFinalize:function(){var s=this._data,a=s.words,r=this._nDataBytes*8,f=s.sigBytes*8;return a[f>>>5]|=128<<24-f%32,a[(f+64>>>9<<4)+14]=Math.floor(r/4294967296),a[(f+64>>>9<<4)+15]=r,s.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var s=T.clone.call(this);return s._hash=this._hash.clone(),s}});m.SHA1=T._createHelper(h),m.HmacSHA1=T._createHmacHelper(h)}(),P.SHA1})},4:function(I,q){},"5hvy":function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("MlIO"))})(this,function(P){return function(m){var S=P,R=S.lib,T=R.WordArray,g=R.Hasher,C=S.x64,h=C.Word,s=S.algo,a=[],r=[],f=[];(function(){for(var E=1,y=0,l=0;l<24;l++){a[E+5*y]=(l+1)*(l+2)/2%64;var n=y%5,o=(2*E+3*y)%5;E=n,y=o}for(var E=0;E<5;E++)for(var y=0;y<5;y++)r[E+5*y]=y+(2*E+3*y)%5*5;for(var u=1,w=0;w<24;w++){for(var v=0,i=0,D=0;D<7;D++){if(u&1){var k=(1<>>24)&16711935|(u<<24|u>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var v=l[o];v.high^=w,v.low^=u}for(var i=0;i<24;i++){for(var D=0;D<5;D++){for(var k=0,c=0,b=0;b<5;b++){var v=l[D+5*b];k^=v.high,c^=v.low}var x=p[D];x.high=k,x.low=c}for(var D=0;D<5;D++)for(var _=p[(D+4)%5],j=p[(D+1)%5],F=j.high,L=j.low,k=_.high^(F<<1|L>>>31),c=_.low^(L<<1|F>>>31),b=0;b<5;b++){var v=l[D+5*b];v.high^=k,v.low^=c}for(var X=1;X<25;X++){var k,c,v=l[X],z=v.high,H=v.low,G=a[X];G<32?(k=z<>>32-G,c=H<>>32-G):(k=H<>>64-G,c=z<>>64-G);var U=p[r[X]];U.high=k,U.low=c}var B=p[0],W=l[0];B.high=W.high,B.low=W.low;for(var D=0;D<5;D++)for(var b=0;b<5;b++){var X=D+5*b,v=l[X],te=p[X],de=p[(D+1)%5+5*b],fe=p[(D+2)%5+5*b];v.high=te.high^~de.high&fe.high,v.low=te.low^~de.low&fe.low}var v=l[0],be=f[i];v.high^=be.high,v.low^=be.low}},_doFinalize:function(){var E=this._data,y=E.words,l=this._nDataBytes*8,n=E.sigBytes*8,o=this.blockSize*32;y[n>>>5]|=1<<24-n%32,y[(m.ceil((n+1)/o)*o>>>5)-1]|=128,E.sigBytes=y.length*4,this._process();for(var u=this._state,w=this.cfg.outputLength/8,v=w/8,i=[],D=0;D>>24)&16711935|(c<<24|c>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,i.push(b),i.push(c)}return new T.init(i,w)},clone:function(){for(var E=g.clone.call(this),y=E._state=this._state.slice(0),l=0;l<25;l++)y[l]=y[l].clone();return E}});S.SHA3=g._createHelper(d),S.HmacSHA3=g._createHmacHelper(d)}(Math),P.SHA3})},"5nXd":function(I,q,N){var P=N("MFOe"),m=P.slice,S=P.pluck,R=P.each,T=P.bind,g=P.create,C=P.isList,h=P.isFunction,s=P.isObject;I.exports={createStore:f};var a={version:"2.0.12",enabled:!1,get:function(p,d){var E=this.storage.read(this._namespacePrefix+p);return this._deserialize(E,d)},set:function(p,d){return d===void 0?this.remove(p):(this.storage.write(this._namespacePrefix+p,this._serialize(d)),d)},remove:function(p){this.storage.remove(this._namespacePrefix+p)},each:function(p){var d=this;this.storage.each(function(E,y){p.call(d,d._deserialize(E),(y||"").replace(d._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(p){return this._namespacePrefix=="__storejs_"+p+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(p){this._addPlugin(p)},namespace:function(p){return f(this.storage,this.plugins,p)}};function r(){var p=typeof console=="undefined"?null:console;if(!p)return;var d=p.warn?p.warn:p.log;d.apply(p,arguments)}function f(p,d,E){E||(E=""),p&&!C(p)&&(p=[p]),d&&!C(d)&&(d=[d]);var y=E?"__storejs_"+E+"_":"",l=E?new RegExp("^"+y):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(E))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var o={_namespacePrefix:y,_namespaceRegexp:l,_testStorage:function(w){try{var v="__storejs__test__";w.write(v,v);var i=w.read(v)===v;return w.remove(v),i}catch(D){return!1}},_assignPluginFnProp:function(w,v){var i=this[v];this[v]=function(){var k=m(arguments,0),c=this;function b(){return i?(R(arguments,function(_,j){k[j]=_}),i.apply(c,k)):void 0}var x=[b].concat(k);return w.apply(c,x)}},_serialize:function(w){return JSON.stringify(w)},_deserialize:function(w,v){if(!w)return v;var i="";try{i=JSON.parse(w)}catch(D){i=w}return i!==void 0?i:v},_addStorage:function(w){if(this.enabled)return;this._testStorage(w)&&(this.storage=w,this.enabled=!0)},_addPlugin:function(w){var v=this;if(C(w)){R(w,function(k){v._addPlugin(k)});return}var i=S(this.plugins,function(k){return w===k});if(i)return;if(this.plugins.push(w),!h(w))throw new Error("Plugins must be function values that return objects");var D=w.call(this);if(!s(D))throw new Error("Plugins must return an object of function properties");R(D,function(k,c){if(!h(k))throw new Error("Bad plugin property: "+c+" from plugin "+w.name+". Plugins should only return functions.");v._assignPluginFnProp(k,c)})},addStorage:function(w){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(w)}},u=g(o,a,{plugins:[]});return u.raw={},R(u,function(w,v){h(w)&&(u.raw[v]=T(u,w))}),R(p,function(w){u._addStorage(w)}),R(d,function(w){u._addPlugin(w)}),u}},"7Cbv":function(I,q,N){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),m=new Uint8Array(16);function S(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(m)}var R=/^(?:[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 T(p){return typeof p=="string"&&R.test(p)}for(var g=T,C=[],h=0;h<256;++h)C.push((h+256).toString(16).substr(1));function s(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=(C[p[d+0]]+C[p[d+1]]+C[p[d+2]]+C[p[d+3]]+"-"+C[p[d+4]]+C[p[d+5]]+"-"+C[p[d+6]]+C[p[d+7]]+"-"+C[p[d+8]]+C[p[d+9]]+"-"+C[p[d+10]]+C[p[d+11]]+C[p[d+12]]+C[p[d+13]]+C[p[d+14]]+C[p[d+15]]).toLowerCase();if(!g(E))throw TypeError("Stringified UUID is invalid");return E}var a=s;function r(p,d,E){p=p||{};var y=p.random||(p.rng||S)();if(y[6]=y[6]&15|64,y[8]=y[8]&63|128,d){E=E||0;for(var l=0;l<16;++l)d[E+l]=y[l];return d}return a(y)}var f=q.a=r},"7ahc":function(I,q,N){"use strict";N.d(q,"a",function(){return w});var P=N("k1fw"),m=N("0Owb"),S=N("+L6B"),R=N("2/Rp"),T=N("y8nQ"),g=N("Vl3Y"),C=N("tJVT"),h=N("OaEy"),s=N("2fM7"),a=N("q1tI"),r=N.n(a),f=N("VrN/"),p=N.n(f),d=N("p77/"),E=N.n(d),y=N("c5Ni"),l=N.n(y),n=s.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};q.b=function(v){var i=v.callback,D=v.onCancel,k=Object(a.useState)("python"),c=Object(C.a)(k,2),b=c[0],x=c[1];function _(F){x(u[F][1])}function j(F){i(F)}return r.a.createElement(g.a,Object(m.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:j}),r.a.createElement(g.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(s.a,{onChange:_},Object.keys(u).map(function(F){return r.a.createElement(n,{key:F,value:F},u[F][0])}))),r.a.createElement(g.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(w,{mode:b})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(R.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function w(v){var i=v.value,D=v.onChange,k=v.mode,c=v.options,b=c===void 0?{}:c,x=Object(a.useRef)(),_=Object(a.useState)(),j=Object(C.a)(_,2),F=j[0],L=j[1];return Object(a.useEffect)(function(){if(F){function X(z){var H=z.getValue();D&&D(H)}return F.on("change",X),function(){F.off("change",X)}}},[F,D]),Object(a.useEffect)(function(){F&&F.setOption("mode",k)},[F,k]),Object(a.useEffect)(function(){F&&((i!==F.getValue()||i==="")&&setTimeout(function(){F.setValue(i||" ")},300))},[F,i]),Object(a.useEffect)(function(){if(x.current&&!F){var X=p.a.fromTextArea(x.current,Object(P.a)({mode:k,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));L(X)}},[x.current,F]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:x}))}},"7ixt":function(I,q,N){"use strict";N.d(q,"a",function(){return S});var P={adjustX:1,adjustY:1},m=[0,0],S={left:{points:["cr","cl"],overflow:P,offset:[-4,0],targetOffset:m},right:{points:["cl","cr"],overflow:P,offset:[4,0],targetOffset:m},top:{points:["bc","tc"],overflow:P,offset:[0,-4],targetOffset:m},bottom:{points:["tc","bc"],overflow:P,offset:[0,4],targetOffset:m},topLeft:{points:["bl","tl"],overflow:P,offset:[0,-4],targetOffset:m},leftTop:{points:["tr","tl"],overflow:P,offset:[-4,0],targetOffset:m},topRight:{points:["br","tr"],overflow:P,offset:[0,-4],targetOffset:m},rightTop:{points:["tl","tr"],overflow:P,offset:[4,0],targetOffset:m},bottomRight:{points:["tr","br"],overflow:P,offset:[0,4],targetOffset:m},rightBottom:{points:["bl","br"],overflow:P,offset:[4,0],targetOffset:m},bottomLeft:{points:["tl","bl"],overflow:P,offset:[0,4],targetOffset:m},leftBottom:{points:["br","bl"],overflow:P,offset:[-4,0],targetOffset:m}},R=S},"815F":function(I,q,N){"use strict";N.d(q,"e",function(){return C}),N.d(q,"c",function(){return s}),N.d(q,"d",function(){return a}),N.d(q,"a",function(){return f}),N.d(q,"f",function(){return p}),N.d(q,"b",function(){return d});var P=N("KQm4"),m=N("VTBJ"),S=N("Ff2n"),R=N("Zm9Q"),T=N("Kwbf"),g=N("OZM5");function C(E,y){return E!=null?E:y}function h(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=new Map;function l(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(u){var w=u.key,v=u.children;Object(T.a)(w!=null,"Tree node must have a certain key: [".concat(o).concat(w,"]"));var i=String(w);Object(T.a)(!y.has(i)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(i)),y.set(i,!0),l(v,"".concat(o).concat(i," > "))})}l(E)}function s(E){function y(l){var n=Object(R.a)(l);return n.map(function(o){if(!Object(g.i)(o))return Object(T.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var u=o.key,w=o.props,v=w.children,i=Object(S.a)(w,["children"]),D=Object(m.a)({key:u},i),k=y(v);return k.length&&(D.children=k),D}).filter(function(o){return o})}return y(E)}function a(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(y===!0?[]:y),n=[];function o(u){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(v,i){var D=Object(g.h)(w?w.pos:"0",i),k=C(v.key,D),c=Object(m.a)(Object(m.a)({},v),{},{parent:w,pos:D,children:null,data:v,isStart:[].concat(Object(P.a)(w?w.isStart:[]),[i===0]),isEnd:[].concat(Object(P.a)(w?w.isEnd:[]),[i===u.length-1])});return n.push(c),y===!0||l.has(k)?c.children=o(v.children||[],c):c.children=[],c})}return o(E),n}function r(E,y,l){var n;l?typeof l=="string"?n=function(w){return w[l]}:typeof l=="function"&&(n=function(w){return l(w)}):n=function(w,v){return C(w.key,v)};function o(u,w,v){var i=u?u.children:E,D=u?Object(g.h)(v.pos,w):"0";if(u){var k=n(u,D),c={node:u,index:w,pos:D,key:k,parentPos:v.node?v.pos:null,level:v.level+1};y(c)}i&&i.forEach(function(b,x){o(b,x,{node:u,pos:D,level:v?v.level+1:-1})})}o(null)}function f(E){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=y.initWrapper,n=y.processEntity,o=y.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,w={},v={},i={posEntities:w,keyEntities:v};return l&&(i=l(i)||i),r(E,function(D){var k=D.node,c=D.index,b=D.pos,x=D.key,_=D.parentPos,j=D.level,F={node:k,index:c,key:x,pos:b,level:j},L=C(x,b);w[b]=F,v[L]=F,F.parent=w[_],F.parent&&(F.parent.children=F.parent.children||[],F.parent.children.push(F)),n&&n(F,i)},u),o&&o(i),i}function p(E,y){var l=y.expandedKeys,n=y.selectedKeys,o=y.loadedKeys,u=y.loadingKeys,w=y.checkedKeys,v=y.halfCheckedKeys,i=y.dragOverNodeKey,D=y.dropPosition,k=y.keyEntities,c=k[E],b={eventKey:E,expanded:l.indexOf(E)!==-1,selected:n.indexOf(E)!==-1,loaded:o.indexOf(E)!==-1,loading:u.indexOf(E)!==-1,checked:w.indexOf(E)!==-1,halfChecked:v.indexOf(E)!==-1,pos:String(c?c.pos:""),dragOver:i===E&&D===0,dragOverGapTop:i===E&&D===-1,dragOverGapBottom:i===E&&D===1};return b}function d(E){var y=E.data,l=E.expanded,n=E.selected,o=E.checked,u=E.loaded,w=E.loading,v=E.halfChecked,i=E.dragOver,D=E.dragOverGapTop,k=E.dragOverGapBottom,c=E.pos,b=E.active,x=Object(m.a)(Object(m.a)({},y),{},{expanded:l,selected:n,checked:o,loaded:u,loading:w,halfChecked:v,dragOver:i,dragOverGapTop:D,dragOverGapBottom:k,pos:c,active:b});return"props"in x||Object.defineProperty(x,"props",{get:function(){return Object(T.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),E}}),x}},"8EBN":function(I,q,N){(function(P){P(N("VrN/"))})(function(P){"use strict";P.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 m=0;m-1&&R.substring(C+1,R.length);if(h)return P.findModeByExtension(h)},P.findModeByName=function(R){R=R.toLowerCase();for(var T=0;T=ee.length?ye.slice(ee.length):ye}).join(`
`)}var l=[],n=[""],o=new d.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function w(){l.length=0,n=[""]}var v={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function i(ce,K,Y,ee){if(K>=ce.length||ce[K].level<=Y)return K;var ye=ce[K];ee.push("- "+ye.text+""),K++;var se=[];return K=i(ce,K,ye.level,se),se.length>0&&(ee.push("
"),se.forEach(function(Pe){ee.push(Pe)}),ee.push("
")),ee.push(" "),K=i(ce,K,Y,ee),K}function D(){return i(l,0,0,n),n.push("
"),n.join("")}var k={heading:function(K){var Y=u.exec(K);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},fences:function(K){var Y=this.rules.block.fences.exec(K);if(Y){var ee=Y[0],ye=y(ee,Y[3]||""),se=Y[2]?Y[2].trim():Y[2];if(["latex","katex","math"].indexOf(se)>=0){var Pe=x(),Ze=ye;ye=Pe,_[Pe]={type:"block",expression:Ze}}return{type:"code",raw:ee,lang:se,text:ye}}}},c=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,x=function(){return"__special_katext_id_".concat(b++,"__")},_={};function j(){return _}function F(){b=0,_={}}function L(ce){return ce=ce.replace(c,function(K,Y){var ee=x();return _[ee]={type:"inline",expression:Y},ee}),ce}var X=o.listitem;o.listitem=function(ce){return X(L(ce))};var z=o.paragraph;o.paragraph=function(ce){return z(L(ce))};var H=o.tablecell;o.tablecell=function(ce,K){return H(L(ce),K)},o.code=function(ce,K,Y){var ee=(K||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"".concat(ce,"
"):'
').concat(Y?ce:Object(E.escape)(ce,!0),`
`):''+(Y?ce:Object(E.escape)(ce,!0))+"
"},o.heading=function(ce,K,Y){var ee=this.options.headerPrefix+Y.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:ee,level:K,text:ce}),"'+ce+""},d.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),d.a.use({tokenizer:k,renderer:o});var G=d.a,U=N("SJMd"),B=N("ulZh"),W=N.n(B),te=N("m3rI"),de=N("Oy/b"),fe=N("p5ED"),be=N("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 Ce=function(ce,K){return(Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ee){Y.__proto__=ee}||function(Y,ee){for(var ye in ee)Object.prototype.hasOwnProperty.call(ee,ye)&&(Y[ye]=ee[ye])})(ce,K)};function ue(ce,K){function Y(){this.constructor=ce}Ce(ce,K),ce.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}function ge(ce,K,Y,ee){return new(Y||(Y=Promise))(function(ye,se){function Pe(Tt){try{mt(ee.next(Tt))}catch(et){se(et)}}function Ze(Tt){try{mt(ee.throw(Tt))}catch(et){se(et)}}function mt(Tt){var et;Tt.done?ye(Tt.value):(et=Tt.value,et instanceof Y?et:new Y(function(kt){kt(et)})).then(Pe,Ze)}mt((ee=ee.apply(ce,K||[])).next())})}function pe(ce,K){var Y,ee,ye,se,Pe={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return se={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ze(mt){return function(Tt){return function(et){if(Y)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(Y=1,ee&&(ye=2&et[0]?ee.return:et[0]?ee.throw||((ye=ee.return)&&ye.call(ee),0):ee.next)&&!(ye=ye.call(ee,et[1])).done)return ye;switch(ee=0,ye&&(et=[2&et[0],ye.value]),et[0]){case 0:case 1:ye=et;break;case 4:return Pe.label++,{value:et[1],done:!1};case 5:Pe.label++,ee=et[1],et=[0];continue;case 7:et=Pe.ops.pop(),Pe.trys.pop();continue;default:if(!(ye=Pe.trys,(ye=ye.length>0&&ye[ye.length-1])||et[0]!==6&&et[0]!==2)){Pe=0;continue}if(et[0]===3&&(!ye||et[1]>ye[0]&&et[1]',"select"),this.addActionButton(ee,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ee,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ee,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ee,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ee,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ee,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ee,'',"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(se){var Pe=document.createElement("div");Pe.className=""+Y.toolbarButtonStyleClass.name,Pe.setAttribute("data-type-name",se.typeName),Pe.innerHTML=se.icon,Pe.addEventListener("click",function(){Y.markerToolbarButtonClicked(Pe,se)}),Y.buttons.push(Pe),Y.markerButtons.push(Pe)}),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 ye=document.createElement("div");ye.className=this.toolbarBlockStyleClass.name,ye.style.whiteSpace="nowrap",ye.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ye),this.addActionButton(ye,'',"render"),this.addActionButton(ye,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ce.prototype.addButtonClickListener=function(K){this.buttonClickListeners.push(K)},ce.prototype.removeButtonClickListener=function(K){this.buttonClickListeners.indexOf(K)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(K),1)},ce.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ce.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var K=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Y=0;Y0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},ce.prototype.actionToolbarButtonClicked=function(K,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ce.prototype.setActiveButton=function(K){this.resetButtonStyles(),K.className=K.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),K.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ce.prototype.setActiveMarkerButton=function(K){var Y=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===K});Y&&this.setActiveButton(Y)},ce.prototype.setCurrentMarker=function(K){var Y=this;this.currentMarker=K,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){Y.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},ce}(),V=function(){function ce(K,Y,ee,ye){this.panels=[],this.panelButtons=[],this.markerjsContainer=K,this.displayMode=Y,this.uiStyleSettings=ee,this.styles=ye,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ce.prototype.addStyles=function(){var K;this.toolboxStyleClass=this.styles.addClass(new ne("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 ne("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ne("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ne("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ne("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 ne("toolbox-panel-row_colors",`
background-color: `+((K=this.uiStyleSettings.toolboxBackgroundColor)!==null&&K!==void 0?K:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ne("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
padding: `+Y+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ne("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ne("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new we("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new we("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ce.prototype.show=function(K){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=K,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ce.prototype.setPanelButtons=function(K){var Y,ee,ye=this;this.panels=K,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(se){var Pe;se.uiStyleSettings=ye.uiStyleSettings;var Ze=document.createElement("div");Ze.className=ye.toolboxButtonStyleClass.name+" "+((Pe=ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Pe!==void 0?Pe:ye.toolboxButtonStyleColorsClass.name),Ze.innerHTML=se.icon,Ze.title=se.title,Ze.addEventListener("click",function(){ye.panelButtonClick(se)}),ye.panelButtons.push(Ze),ye.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ce.prototype.panelButtonClick=function(K){var Y=this,ee=-1;if(K!==this.activePanel){ee=this.panels.indexOf(K),this.panelRow.innerHTML="";var ye=K.getUi();ye.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ye),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=K}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(se,Pe){var Ze,mt;se.className=Y.toolboxButtonStyleClass.name+" "+(Pe===ee?""+((Ze=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:Y.toolboxActiveButtonStyleColorsClass.name):""+((mt=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&mt!==void 0?mt:Y.toolboxButtonStyleColorsClass.name))})},ce}(),Z=function(ce,K){this.title=ce,this.icon=K},Ee=function(ce){function K(Y,ee,ye,se){var Pe=ce.call(this,Y,se||'')||this;return Pe.colors=[],Pe.addTransparent=!1,Pe.colorBoxes=[],Pe.colors=ee,Pe.currentColor=ye,Pe.setCurrentColor=Pe.setCurrentColor.bind(Pe),Pe.getColorBox=Pe.getColorBox.bind(Pe),Pe}return ue(K,ce),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(ye){var se=Y.getColorBox(ye);ee.appendChild(se),Y.colorBoxes.push(se)}),ee},K.prototype.getColorBox=function(Y){var ee=this,ye=this.uiStyleSettings.toolbarHeight/4,se=this.uiStyleSettings.toolbarHeight-ye,Pe=document.createElement("div");Pe.style.display="inline-block",Pe.style.boxSizing="content-box",Pe.style.width=se-2+"px",Pe.style.height=se-2+"px",Pe.style.padding="1px",Pe.style.marginRight="2px",Pe.style.marginBottom="2px",Pe.style.borderWidth="2px",Pe.style.borderStyle="solid",Pe.style.borderRadius=(se+2)/2+"px",Pe.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Pe.addEventListener("click",function(){ee.setCurrentColor(Y,Pe)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=se-2+"px",Ze.style.height=se-2+"px",Ze.style.backgroundColor=Y,Ze.style.borderRadius=se/2+"px",Y==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.innerHTML=``),Pe.appendChild(Ze),Pe},K.prototype.setCurrentColor=function(Y,ee){var ye=this;this.currentColor=Y,this.colorBoxes.forEach(function(se){se.style.borderColor=se===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},K}(Z),xe=function(){function ce(K,Y,ee){this._state="new",this._isSelected=!1,this._container=K,this._overlayContainer=Y,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ce.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ce.prototype.ownsTarget=function(K){return!1},Object.defineProperty(ce.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ce.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ce.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ce.prototype.pointerDown=function(K,Y){},ce.prototype.dblClick=function(K,Y){},ce.prototype.manipulate=function(K){},ce.prototype.pointerUp=function(K){this.stateChanged()},ce.prototype.dispose=function(){},ce.prototype.addMarkerVisualToContainer=function(K){this.container.childNodes.length>0?this.container.insertBefore(K,this.container.childNodes[0]):this.container.appendChild(K)},ce.prototype.getState=function(){return{typeName:ce.typeName,state:this.state,notes:this.notes}},ce.prototype.restoreState=function(K){this._state=K.state,this.notes=K.notes},ce.prototype.scale=function(K,Y){},ce.prototype.colorChanged=function(K){this.onColorChanged&&this.onColorChanged(K),this.stateChanged()},ce.prototype.fillColorChanged=function(K){this.onFillColorChanged&&this.onFillColorChanged(K),this.stateChanged()},ce.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var K=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),K.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(K)&&this.onStateChanged(this)}},ce.typeName="MarkerBase",ce}(),_e=function(){function ce(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ce.prototype.findGripByVisual=function(K){return this.topLeft.ownsTarget(K)?this.topLeft:this.topCenter.ownsTarget(K)?this.topCenter:this.topRight.ownsTarget(K)?this.topRight:this.centerLeft.ownsTarget(K)?this.centerLeft:this.centerRight.ownsTarget(K)?this.centerRight:this.bottomLeft.ownsTarget(K)?this.bottomLeft:this.bottomCenter.ownsTarget(K)?this.bottomCenter:this.bottomRight.ownsTarget(K)?this.bottomRight:void 0},ce}(),je=function(){function ce(){this.GRIP_SIZE=10,this.visual=ae.createGroup(),this.visual.appendChild(ae.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ae.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},ce}(),Be=function(){function ce(){}return ce.toITransformMatrix=function(K){return{a:K.a,b:K.b,c:K.c,d:K.d,e:K.e,f:K.f}},ce.toSVGMatrix=function(K,Y){return K.a=Y.a,K.b=Y.b,K.c=Y.c,K.d=Y.d,K.e=Y.e,K.f=Y.f,K},ce}(),He=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.left=0,se.top=0,se.width=0,se.height=0,se.defaultSize={x:50,y:20},se.offsetX=0,se.offsetY=0,se.rotationAngle=0,se.CB_DISTANCE=10,se._suppressMarkerCreateEvent=!1,se.container.transform.baseVal.appendItem(ae.createTransform()),se.setupControlBox(),se}return ue(K,ce),Object.defineProperty(K.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var ee=ae.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(Y){return!!ce.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ye=this.unrotatePoint(Y);if(this.manipulationStartX=ye.x,this.manipulationStartY=ye.y,this.offsetX=ye.x-this.left,this.offsetY=ye.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var se=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=se.x-this.width/2,this.top=se.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},K.prototype.pointerUp=function(Y){var ee=this.state;ce.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},K.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},K.prototype.manipulate=function(Y){var ee=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(Y)},K.prototype.resize=function(Y){var ee=this.manipulationStartLeft,ye=this.manipulationStartWidth,se=this.manipulationStartTop,Pe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+Y.x-this.manipulationStartX,ye=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ye=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:se=this.manipulationStartTop+Y.y-this.manipulationStartY,Pe=this.manipulationStartHeight+this.manipulationStartTop-se;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Pe=this.manipulationStartHeight+Y.y-this.manipulationStartY}ye>=0?(this.left=ee,this.width=ye):(this.left=ee+ye,this.width=-ye),Pe>=0?(this.top=se,this.height=Pe):(this.top=se+Pe,this.height=-Pe),this.setSize()},K.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},K.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var ee=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},K.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},K.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ee=this.container.getCTM(),ye=ae.createPoint(Y.x,Y.y);return{x:(ye=ye.matrixTransform(ee)).x,y:ye.y}},K.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var ee=this.container.getCTM();ee=ee.inverse();var ye=ae.createPoint(Y.x,Y.y);return{x:(ye=ye.matrixTransform(ee)).x,y:ye.y}},K.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=ae.createGroup();var Y=ae.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=ae.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=ae.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 _e,this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){var Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,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()},K.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()},K.prototype.createGrip=function(){var Y=new je;return Y.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(Y.visual),Y},K.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,ee=-Y/2,ye=ee,se=(this.width+this.CB_DISTANCE)/2-Y/2,Pe=(this.height+this.CB_DISTANCE)/2-Y/2,Ze=this.height+this.CB_DISTANCE-Y/2,mt=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,ye),this.positionGrip(this.controlGrips.topCenter.visual,se,ye),this.positionGrip(this.controlGrips.topRight.visual,mt,ye),this.positionGrip(this.controlGrips.centerLeft.visual,ee,Pe),this.positionGrip(this.controlGrips.centerRight.visual,mt,Pe),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,se,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,mt,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,se,ye-3*this.CB_DISTANCE)},K.prototype.positionGrip=function(Y,ee,ye){var se=Y.transform.baseVal.getItem(0);se.setTranslate(ee,ye),Y.transform.baseVal.replaceItem(se,0)},K.prototype.hideControlBox=function(){this.controlBox.style.display="none"},K.prototype.showControlBox=function(){this.controlBox.style.display=""},K.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Be.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Be.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ce.prototype.getState.call(this))},K.prototype.restoreState=function(Y){ce.prototype.restoreState.call(this,Y);var ee=Y;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Be.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Be.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},K.prototype.scale=function(Y,ee){ce.prototype.scale.call(this,Y,ee);var ye=this.rotatePoint({x:this.left,y:this.top}),se=this.unrotatePoint({x:ye.x*Y,y:ye.y*ee});this.left=se.x,this.top=se.y,this.width=this.width*Y,this.height=this.height*ee,this.adjustControlBox()},K}(xe),Ue=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.createVisual=se.createVisual.bind(se),se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},K.prototype.createVisual=function(){this.visual=ae.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)},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.manipulate=function(Y){ce.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){ce.prototype.resize.call(this,Y),this.setSize()},K.prototype.setSize=function(){ce.prototype.setSize.call(this),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(Y){ce.prototype.pointerUp.call(this,Y),this.setSize()},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},K.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ce.prototype.getState.call(this))},K.prototype.restoreState=function(Y){var ee=Y;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ce.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){ce.prototype.scale.call(this,Y,ee),this.setSize()},K.title="Rectangle marker",K}(He),ze=function(ce){function K(Y,ee,ye,se){var Pe=ce.call(this,Y,se||'')||this;return Pe.widths=[],Pe.widthBoxes=[],Pe.widths=ee,Pe.currentWidth=ye,Pe.setCurrentWidth=Pe.setCurrentWidth.bind(Pe),Pe}return ue(K,ce),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(ye){var se=document.createElement("div");se.style.display="flex",se.style.flexGrow="2",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=ye===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentWidth(ye,se)}),ee.appendChild(se);var Pe=document.createElement("div");Pe.innerText=ye.toString(),Pe.style.marginRight="5px",se.appendChild(Pe);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var mt=document.createElement("hr");mt.style.minWidth="20px",mt.style.border="0px",mt.style.borderTop=ye+"px solid "+Y.uiStyleSettings.toolboxColor,mt.style.flexGrow="2",Ze.appendChild(mt),se.appendChild(Ze),Y.widthBoxes.push(se)}),ee},K.prototype.setCurrentWidth=function(Y,ee){var ye=this;this.currentWidth=Y,this.widthBoxes.forEach(function(se){se.style.borderColor=se===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},K}(Z),Ge=function(ce){function K(Y,ee,ye,se){var Pe=ce.call(this,Y,se||'')||this;return Pe.styles=[],Pe.styleBoxes=[],Pe.styles=ee,Pe.currentStyle=ye,Pe.setCurrentStyle=Pe.setCurrentStyle.bind(Pe),Pe}return ue(K,ce),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(ye){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/Y.styles.length-5+"%",se.style.borderColor=ye===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentStyle(ye,se)}),ee.appendChild(se);var Pe=document.createElement("div");Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.overflow="hidden";var Ze=``;Pe.innerHTML=Ze,se.appendChild(Pe),Y.styleBoxes.push(se)}),ee},K.prototype.setCurrentStyle=function(Y,ee){var ye=this;this.currentStyle=Y,this.styleBoxes.forEach(function(se){se.style.borderColor=se===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},K}(Z),Ye=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.strokeColor=ye.defaultColor,se.strokeWidth=ye.defaultStrokeWidth,se.strokeDasharray=ye.defaultStrokeDasharray,se.strokePanel=new Ee("Line color",ye.defaultColorSet,ye.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ze("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ge("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ue(K,ce),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=ce.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="FrameMarker",K.title="Frame marker",K.icon='',K}(Ue),Re=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},tt=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.x1=0,se.y1=0,se.x2=0,se.y2=0,se.defaultLength=50,se.manipulationStartX=0,se.manipulationStartY=0,se.manipulationStartX1=0,se.manipulationStartY1=0,se.manipulationStartX2=0,se.manipulationStartY2=0,se.setupControlBox(),se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!!ce.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.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(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},K.prototype.pointerUp=function(Y){var ee=this.state;ce.prototype.pointerUp.call(this,Y),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(Y),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},K.prototype.adjustVisual=function(){},K.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},K.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.y}this.adjustVisual(),this.adjustControlBox()},K.prototype.select=function(){ce.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},K.prototype.deselect=function(){ce.prototype.deselect.call(this),this.controlBox.style.display="none"},K.prototype.setupControlBox=function(){this.controlBox=ae.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},K.prototype.adjustControlBox=function(){this.positionGrips()},K.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},K.prototype.createGrip=function(){var Y=new je;return Y.visual.transform.baseVal.appendItem(ae.createTransform()),this.controlBox.appendChild(Y.visual),Y},K.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},K.prototype.positionGrip=function(Y,ee,ye){var se=Y.transform.baseVal.getItem(0);se.setTranslate(ee,ye),Y.transform.baseVal.replaceItem(se,0)},K.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ce.prototype.getState.call(this))},K.prototype.restoreState=function(Y){ce.prototype.restoreState.call(this,Y);var ee=Y;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},K.prototype.scale=function(Y,ee){ce.prototype.scale.call(this,Y,ee),this.x1=this.x1*Y,this.y1=this.y1*ee,this.x2=this.x2*Y,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},K}(xe),rt=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.strokeColor=ye.defaultColor,se.strokeWidth=ye.defaultStrokeWidth,se.strokeDasharray=ye.defaultStrokeDasharray,se.strokePanel=new Ee("Line color",ye.defaultColorSet,ye.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ze("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ge("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorLine=ae.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ae.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)},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},K.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()),ae.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ce.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){ce.prototype.restoreState.call(this,Y);var ee=Y;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},K.typeName="LineMarker",K.title="Line marker",K.icon='',K}(tt),We=function(ce){function K(Y,ee,ye,se){var Pe=ce.call(this,Y,se||'')||this;return Pe.fonts=[],Pe.fontBoxes=[],Pe.fonts=ee,Pe.currentFont=ye,Pe.setCurrentFont=Pe.setCurrentFont.bind(Pe),Pe}return ue(K,ce),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(ye){var se=document.createElement("div");se.style.display="inline-block",se.style.alignItems="center",se.style.justifyContent="space-between",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.overflow="hidden",se.style.maxWidth=100/Y.fonts.length-5+"%",se.style.borderColor=ye===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentFont(ye,se)}),ee.appendChild(se);var Pe=document.createElement("div");Pe.style.display="flex",Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.fontFamily=ye,Pe.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",Pe.appendChild(Ze),se.appendChild(Pe),Y.fontBoxes.push(se)}),ee},K.prototype.setCurrentFont=function(Y,ee){var ye=this;this.currentFont=Y,this.fontBoxes.forEach(function(se){se.style.borderColor=se===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},K}(Z),$e=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.color="transparent",se.padding=5,se.DEFAULT_TEXT="your text here",se.text=se.DEFAULT_TEXT,se.isMoved=!1,se.color=ye.defaultColor,se.fontFamily=ye.defaultFontFamily,se.defaultSize={x:100,y:30},se.setColor=se.setColor.bind(se),se.setFont=se.setFont.bind(se),se.renderText=se.renderText.bind(se),se.sizeText=se.sizeText.bind(se),se.textEditDivClicked=se.textEditDivClicked.bind(se),se.showTextEditor=se.showTextEditor.bind(se),se.setSize=se.setSize.bind(se),se.positionTextEditor=se.positionTextEditor.bind(se),se.colorPanel=new Ee("Color",ye.defaultColorSet,ye.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.fontFamilyPanel=new We("Font",ye.defaultFontFamilies,ye.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se}return ue(K,ce),K.prototype.ownsTarget=function(Y){if(ce.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(ye){ye===Y&&(ee=!0)}),ee},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.bgRectangle=ae.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ae.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.textElement.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.renderText=function(){var Y=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(ee){Y.textElement.appendChild(ae.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},K.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),ee=1;if(Y.width>0&&Y.height>0){var ye=(1*this.width-this.width*this.padding*2/100)/Y.width,se=(1*this.height-this.height*this.padding*2/100)/Y.height;ee=Math.min(ye,se)}return ee},K.prototype.getTextPosition=function(Y){var ee=this.textElement.getBBox(),ye=0,se=0;return ee.width>0&&ee.height>0&&(ye=(this.width-ee.width*Y)/2,se=this.height/2-ee.height*Y/2),{x:ye,y:se}},K.prototype.sizeText=function(){var Y=this.textElement.getBBox(),ee=this.getTextScale(),ye=this.getTextPosition(ee);ye.y-=Y.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ye.x+"px, "+ye.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ye.x,ye.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},K.prototype.manipulate=function(Y){ce.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},K.prototype.resize=function(Y){ce.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},K.prototype.setSize=function(){ce.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},K.prototype.pointerUp=function(Y){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),ce.prototype.pointerUp.call(this,Y),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},K.prototype.showTextEditor=function(){var Y=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(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,Y.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var ye=ee.clipboardData.getData("text"),se=window.getSelection();if(!se.rangeCount)return!1;se.deleteFromDocument(),se.getRangeAt(0).insertNode(document.createTextNode(ye)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},K.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Y=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ye=this.textElement.getBBox(),se={x:ye.width*Y,y:ye.height*Y};ee.x-=se.x/2,ee.y-=se.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*Y,12)+"px",this.textElement.style.display="none"}},K.prototype.textEditDivClicked=function(Y){this.text=Y.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},K.prototype.select=function(){ce.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},K.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ce.prototype.deselect.call(this)},K.prototype.dblClick=function(Y,ee){ce.prototype.dblClick.call(this,Y,ee),this.showTextEditor()},K.prototype.setColor=function(Y){this.textElement&&ae.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},K.prototype.setFont=function(Y){this.textElement&&ae.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},K.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},K.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ce.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){var ee=Y;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),ce.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){ce.prototype.scale.call(this,Y,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},K.typeName="TextMarker",K.title="Text marker",K.icon='',K}(He),Ie=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.color="transparent",se.lineWidth=3,se.drawing=!1,se.pixelRatio=1,se.color=ye.defaultColor,se.lineWidth=ye.defaultStrokeWidth,se.pixelRatio=ye.freehandPixelRatio,se.setColor=se.setColor.bind(se),se.addCanvas=se.addCanvas.bind(se),se.finishCreation=se.finishCreation.bind(se),se.setLineWidth=se.setLineWidth.bind(se),se.colorPanel=new Ee("Color",ye.defaultColorSet,ye.defaultColor),se.colorPanel.onColorChanged=se.setColor,se.lineWidthPanel=new ze("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),se.lineWidthPanel.onWidthChanged=se.setLineWidth,se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.drawingImage=ae.createImage(),this.visual.appendChild(this.drawingImage);var Y=ae.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},K.prototype.pointerDown=function(Y,ee){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(Y.x,Y.y),this.drawing=!0):ce.prototype.pointerDown.call(this,Y,ee)},K.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):ce.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){ce.prototype.resize.call(this,Y),ae.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},K.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ce.prototype.pointerUp.call(this,Y)},K.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)},K.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.select.call(this)},K.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ce.prototype.deselect.call(this)},K.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ye=ee[0],se=ee[1],Pe=ee[2],Ze=ee[3],mt=!1,Tt=0;Tt0&&(mt=!0,TtZe&&(Ze=Tt),et>Pe&&(Pe=et));if(mt){this.left=ye/this.pixelRatio,this.top=se/this.pixelRatio,this.width=(Pe-ye)/this.pixelRatio,this.height=(Ze-se)/this.pixelRatio;var kt=document.createElement("canvas");kt.width=Pe-ye,kt.height=Ze-se,kt.getContext("2d").putImageData(this.canvasContext.getImageData(ye,se,Pe-ye,Ze-se),0,0),this.drawingImgUrl=kt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},K.prototype.setDrawingImage=function(){ae.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ae.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},K.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},K.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},ce.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){this.createVisual(),ce.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},K.prototype.scale=function(Y,ee){ce.prototype.scale.call(this,Y,ee),this.setDrawingImage()},K.typeName="FreehandMarker",K.title="Freehand marker",K.icon='',K}(He),Oe=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ye||'')||this;return se.typeBoxes=[],se.currentType=ee,se.setCurrentType=se.setCurrentType.bind(se),se}return ue(K,ce),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var ye=function(Ze){var mt="both";switch(Ze){case 0:mt="both";break;case 1:mt="start";break;case 2:mt="end";break;case 3:mt="none"}var Tt=document.createElement("div");if(Tt.style.display="flex",Tt.style.flexGrow="2",Tt.style.alignItems="center",Tt.style.justifyContent="space-between",Tt.style.padding="5px",Tt.style.borderWidth="2px",Tt.style.borderStyle="solid",Tt.style.borderColor=mt===se.currentType?se.uiStyleSettings.toolboxAccentColor:"transparent",Tt.addEventListener("click",function(){Y.setCurrentType(mt,Tt)}),ee.appendChild(Tt),mt==="both"||mt==="start"){var et=document.createElement("div");et.style.display="flex",et.style.alignItems="center",et.style.minHeight="20px",et.innerHTML=``,et.style.marginLeft="5px",Tt.appendChild(et)}var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.minHeight="20px",kt.style.flexGrow="2";var Zt=document.createElement("hr");if(Zt.style.minWidth="20px",Zt.style.border="0px",Zt.style.borderTop="3px solid "+(se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxColor:"#eeeeee"),Zt.style.flexGrow="2",kt.appendChild(Zt),Tt.appendChild(kt),mt==="both"||mt==="end"){var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.alignItems="center",Yt.style.minHeight="20px",Yt.innerHTML=``,Yt.style.marginRight="5px",Tt.appendChild(Yt)}se.typeBoxes.push(Tt)},se=this,Pe=0;Pe<4;Pe++)ye(Pe);return ee},K.prototype.setCurrentType=function(Y,ee){var ye=this;this.currentType=Y,this.typeBoxes.forEach(function(se){se.style.borderColor=se===ee?ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},K}(Z),Le=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.arrowType="end",se.arrowBaseHeight=10,se.arrowBaseWidth=10,se.getArrowPoints=se.getArrowPoints.bind(se),se.setArrowType=se.setArrowType.bind(se),se.arrowTypePanel=new Oe("Arrow type","end"),se.arrowTypePanel.onArrowTypeChanged=se.setArrowType,se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},K.prototype.getArrowPoints=function(Y,ee){var ye=this.arrowBaseWidth+2*this.strokeWidth,se=this.arrowBaseHeight+2*this.strokeWidth;return Y-ye/2+","+(ee+se/2)+" "+Y+","+(ee-se/2)+" "+(Y+ye/2)+","+(ee+se/2)},K.prototype.createTips=function(){this.arrow1=ae.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ae.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ae.createTransform()),this.visual.appendChild(this.arrow2)},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(ce.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",ae.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ae.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var ye=this.arrow2.transform.baseVal.getItem(0);ye.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ye,0)}},K.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},ce.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){ce.prototype.restoreState.call(this,Y);var ee=Y;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},K.typeName="ArrowMarker",K.title="Arrow marker",K.icon='',K}(rt),Te=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.fillColor=ye.defaultFillColor,se.strokeWidth=0,se.fillPanel=new Ee("Color",ye.defaultColorSet,ye.defaultFillColor),se.fillPanel.onColorChanged=se.setFillColor,se}return ue(K,ce),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=ce.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="CoverMarker",K.title="Cover marker",K.icon='',K}(Ue),Ae=function(ce){function K(Y,ee,ye,se){var Pe=ce.call(this,Y,se||'')||this;return Pe.opacities=[],Pe.opacityBoxes=[],Pe.opacities=ee,Pe.currentOpacity=ye,Pe.setCurrentOpacity=Pe.setCurrentOpacity.bind(Pe),Pe}return ue(K,ce),K.prototype.getUi=function(){var Y=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(ye){var se=document.createElement("div");se.style.display="flex",se.style.alignItems="center",se.style.justifyContent="center",se.style.padding="5px",se.style.borderWidth="2px",se.style.borderStyle="solid",se.style.borderColor=ye===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",se.addEventListener("click",function(){Y.setCurrentOpacity(ye,se)}),ee.appendChild(se);var Pe=document.createElement("div");Pe.innerText=100*ye+"%",se.appendChild(Pe),Y.opacityBoxes.push(se)}),ee},K.prototype.setCurrentOpacity=function(Y,ee){var ye=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(se){se.style.borderColor=se===ee?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},K}(Z),ke=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.setOpacity=se.setOpacity.bind(se),se.fillColor=ye.defaultHighlightColor,se.strokeWidth=0,se.opacity=ye.defaultHighlightOpacity,se.fillPanel=new Ee("Color",ye.defaultColorSet,se.fillColor),se.fillPanel.onColorChanged=se.setFillColor,se.opacityPanel=new Ae("Opacity",ye.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return ue(K,ce),K.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=ce.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="HighlightMarker",K.title="Highlight marker",K.icon='',K}(Te),Me='',Fe=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.bgColor="transparent",se.tipPosition={x:0,y:0},se.tipBase1Position={x:0,y:0},se.tipBase2Position={x:0,y:0},se.tipMoving=!1,se.color=ye.defaultStrokeColor,se.bgColor=ye.defaultFillColor,se.fontFamily=ye.defaultFontFamily,se.defaultSize={x:100,y:30},se.setBgColor=se.setBgColor.bind(se),se.getTipPoints=se.getTipPoints.bind(se),se.positionTip=se.positionTip.bind(se),se.setTipPoints=se.setTipPoints.bind(se),se.colorPanel=new Ee("Text color",ye.defaultColorSet,se.color,''),se.colorPanel.onColorChanged=se.setColor,se.bgColorPanel=new Ee("Fill color",ye.defaultColorSet,se.bgColor,Me),se.bgColorPanel.onColorChanged=se.setBgColor,se.fontFamilyPanel=new We("Font",ye.defaultFontFamilies,ye.defaultFontFamily),se.fontFamilyPanel.onFontChanged=se.setFont,se.tipGrip=new je,se.tipGrip.visual.transform.baseVal.appendItem(ae.createTransform()),se.controlBox.appendChild(se.tipGrip.visual),se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return ce.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},K.prototype.createTip=function(){ae.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ae.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},K.prototype.pointerDown=function(Y,ee){this.state==="new"&&ce.prototype.pointerDown.call(this,Y,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ce.prototype.pointerDown.call(this,Y,ee)},K.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ce.prototype.pointerUp.call(this,Y);else{var ee=this.state==="creating";ce.prototype.pointerUp.call(this,Y),this.setTipPoints(ee),this.positionTip()}},K.prototype.manipulate=function(Y){if(this.tipMoving){var ee=this.unrotatePoint(Y);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else ce.prototype.manipulate.call(this,Y)},K.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(ae.setAttributes(this.bgRectangle,[["fill",Y]]),ae.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},K.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},K.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var ee=Math.min(this.height/2,15),ye=this.height/5;Y&&(this.tipPosition={x:ee+ye/2,y:this.height+20});var se=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?se',K}($e),Xe=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.fillColor="transparent",se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.opacity=1,se.strokeColor=ye.defaultColor,se.strokeWidth=ye.defaultStrokeWidth,se.strokeDasharray=ye.defaultStrokeDasharray,se.fillColor=ye.defaultFillColor,se.setStrokeColor=se.setStrokeColor.bind(se),se.setFillColor=se.setFillColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.setOpacity=se.setOpacity.bind(se),se.createVisual=se.createVisual.bind(se),se.strokePanel=new Ee("Line color",oe(ye.defaultColorSet,["transparent"]),ye.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.fillPanel=new Ee("Fill color",oe(ye.defaultColorSet,["transparent"]),se.fillColor,Me),se.fillPanel.onColorChanged=se.setFillColor,se.strokeWidthPanel=new ze("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ge("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se.opacityPanel=new Ae("Opacity",ye.defaultOpacitySteps,se.opacity),se.opacityPanel.onOpacityChanged=se.setOpacity,se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},K.prototype.createVisual=function(){this.visual=ae.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)},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},K.prototype.manipulate=function(Y){ce.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){ce.prototype.resize.call(this,Y),this.setSize()},K.prototype.setSize=function(){ce.prototype.setSize.call(this),ae.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},K.prototype.pointerUp=function(Y){ce.prototype.pointerUp.call(this,Y),this.setSize()},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&ae.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},K.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&ae.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&ae.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},K.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&ae.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ce.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){var ee=Y;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ce.prototype.restoreState.call(this,Y),this.setSize()},K.prototype.scale=function(Y,ee){ce.prototype.scale.call(this,Y,ee),this.setSize()},K.typeName="EllipseMarker",K.title="Ellipse marker",K.icon='',K}(He),qe=function(ce){function K(Y,ee,ye){return ce.call(this,Y,ee,ye)||this}return ue(K,ce),Object.defineProperty(K.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.tip1&&Y!==this.tip2)},K.prototype.createTips=function(){this.tip1=ae.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(ae.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ae.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(ae.createTransform()),this.visual.appendChild(this.tip2)},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.state==="creating"&&this.createTips()},K.prototype.adjustVisual=function(){if(ce.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ae.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()]]),ae.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 Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var ye=this.tip2.transform.baseVal.getItem(0);ye.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ye,0)}},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=ce.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){ce.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},K.typeName="MeasurementMarker",K.title="Measurement marker",K.icon='',K}(rt),pt=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.strokePanel.colors=ye.defaultColorSet,se.fillColor="transparent",se}return ue(K,ce),Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=ce.prototype.getState.call(this);return Y.typeName=K.typeName,Y},K.typeName="EllipseFrameMarker",K.title="Ellipse frame marker",K.icon='',K}(Xe),at=function(){function ce(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ce.prototype.addUndoStep=function(K){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(K)||(this.undoStack.push(K),JSON.stringify(this.lastRedoStep)!==JSON.stringify(K)&&this.redoStack.splice(0,this.redoStack.length))},ce.prototype.replaceLastUndoStep=function(K){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=K)},ce.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ce.prototype.undo=function(){if(this.undoStack.length>1){var K=this.undoStack.pop();return K!==void 0&&this.redoStack.push(K),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ce.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ce}(),ft=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee,ye)||this;return se.strokeColor="transparent",se.strokeWidth=0,se.strokeDasharray="",se.curveX=0,se.curveY=0,se.manipulationStartCurveX=0,se.manipulationStartCurveY=0,se.setStrokeColor=se.setStrokeColor.bind(se),se.setStrokeWidth=se.setStrokeWidth.bind(se),se.setStrokeDasharray=se.setStrokeDasharray.bind(se),se.positionGrips=se.positionGrips.bind(se),se.addControlGrips=se.addControlGrips.bind(se),se.adjustVisual=se.adjustVisual.bind(se),se.setupControlBox=se.setupControlBox.bind(se),se.resize=se.resize.bind(se),se.strokeColor=ye.defaultColor,se.strokeWidth=ye.defaultStrokeWidth,se.strokeDasharray=ye.defaultStrokeDasharray,se.strokePanel=new Ee("Line color",ye.defaultColorSet,ye.defaultColor),se.strokePanel.onColorChanged=se.setStrokeColor,se.strokeWidthPanel=new ze("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),se.strokeWidthPanel.onWidthChanged=se.setStrokeWidth,se.strokeStylePanel=new Ge("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),se.strokeStylePanel.onStyleChanged=se.setStrokeDasharray,se}return ue(K,ce),K.prototype.ownsTarget=function(Y){return!(!ce.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},K.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},K.prototype.createVisual=function(){this.visual=ae.createGroup(),this.selectorCurve=ae.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ae.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)},K.prototype.pointerDown=function(Y,ee){ce.prototype.pointerDown.call(this,Y,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},K.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ae.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ae.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ae.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},K.prototype.setupControlBox=function(){ce.prototype.setupControlBox.call(this),this.curveControlLine1=ae.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ae.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)},K.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ce.prototype.addControlGrips.call(this)},K.prototype.positionGrips=function(){ce.prototype.positionGrips.call(this);var Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/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()))},K.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),ce.prototype.manipulate.call(this,Y)},K.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),ce.prototype.resize.call(this,Y),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},K.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},K.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},K.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},K.prototype.scale=function(Y,ee){this.curveX=this.curveX*Y,this.curveY=this.curveY*ee,ce.prototype.scale.call(this,Y,ee)},Object.defineProperty(K.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),K.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ce.prototype.getState.call(this));return Y.typeName=K.typeName,Y},K.prototype.restoreState=function(Y){ce.prototype.restoreState.call(this,Y);var ee=Y;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},K.typeName="CurveMarker",K.title="Curve marker",K.icon='',K}(tt),Et=function(){function ce(K,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=K,this.cancelable=Y}return Object.defineProperty(ce.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ce.prototype.preventDefault=function(){this._defaultPrevented=!0},ce}(),xt=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,!1)||this;return se.dataUrl=ee,se.state=ye,se}return ue(K,ce),K}(Et),lt=function(ce){function K(Y,ee,ye){ye===void 0&&(ye=!1);var se=ce.call(this,Y,ye)||this;return se.marker=ee,se}return ue(K,ce),K}(Et),Wt=function(){function ce(){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 ce.prototype.addEventListener=function(K,Y){this[K].push(Y)},ce.prototype.removeEventListener=function(K,Y){var ee=this[K].indexOf(Y);ee>-1&&this[K].splice(ee,1)},ce}(),It=function(){function ce(K){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Re,this._isOpen=!1,this.undoRedoManager=new at,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 Wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ce.instanceCounter++,this.styles=new ie(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=K,this.targetRoot=document.body,this.width=K.clientWidth,this.height=K.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(ce.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ye,Ie,Le,$e,pt,Xe,ke,Fe,qe,Te,rt,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ye,Ie,Le,$e,Xe,ke,Fe]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ye,Ie,Le,$e,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(K){var Y=this;this._availableMarkerTypes.splice(0),K.forEach(function(ee){if(typeof ee=="string"){var ye=Y.ALL_MARKER_TYPES.find(function(se){return se.typeName===ee});ye!==void 0&&Y._availableMarkerTypes.push(ye)}else Y._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(K){this._zoomLevel=K,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(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ce.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ce.prototype.show=function(){var K=this;this.styles.styleSheetRoot===void 0&&Q.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new Et(K))})},ce.prototype.render=function(){return ge(this,void 0,void 0,function(){var K;return pe(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(K=new he).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.markersOnly=this.renderMarkersOnly,K.width=this.renderWidth,K.height=this.renderHeight,[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,K.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},ce.prototype.close=function(K){var Y=this;if(K===void 0&&(K=!1),this.isOpen){var ee=!1;K||this.eventListeners.beforeclose.forEach(function(ye){var se=new Et(Y,!0);ye(se),se.defaultPrevented&&(ee=!0)}),ee||(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(ye){return ye(new Et(Y))}),this.detachEvents(),this._isOpen=!1)}},ce.prototype.addMarkersToToolbar=function(){for(var K,Y=[],ee=0;eethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*K:this.editorCanvas.clientWidth,ee=Y',K.title="Powered by marker.js",K.style.display="grid",K.style.alignItems="center",K.style.justifyItems="center",K.style.padding="3px",K.style.width="20px",K.style.height="20px",this.logoUI.appendChild(K),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ce.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")},ce.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"},ce.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ce.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 K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"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 J(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(K),1),K.dispose()},ce.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())},ce.prototype.toolbarButtonClicked=function(K,Y){if(K==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(K==="action")switch(Y){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()}},ce.prototype.deleteSelectedMarker=function(){var K=this;if(this._currentMarker!==void 0){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ye){var se=new lt(K,K._currentMarker,!0);ye(se),se.defaultPrevented&&(Y=!0)}),!Y){var ee=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(ye){return ye(new lt(K,ee))})}}},ce.prototype.clear=function(){var K=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Pe){var Ze=new lt(K,void 0,!0);Pe(Ze),Ze.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var ee=function(Pe){var Ze=ye.markers[Pe];ye.setCurrentMarker(ye.markers[Pe]),ye._currentMarker.dispose(),ye.markerImage.removeChild(ye._currentMarker.container),ye.markers.splice(ye.markers.indexOf(ye._currentMarker),1),ye.eventListeners.markerdelete.forEach(function(mt){return mt(new lt(K,Ze))})},ye=this,se=this.markers.length-1;se>=0;se--)ee(se);this.addUndoStep()}},Object.defineProperty(ce.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ce.prototype.showNotesEditor=function(){var K;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=(K=this._currentMarker.notes)!==null&&K!==void 0?K:"",this.overlayContainer.appendChild(this.notesArea))},ce.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)},ce.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ce.prototype.addUndoStep=function(){var K=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===Y.width&&ee.height===Y.height){var ye=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),ye1&&this.panTo({x:K.clientX,y:K.clientY}))},ce.prototype.onPointerUp=function(K){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(K.clientX,K.clientY)),this.isDragging=!1,this.addUndoStep()},ce.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ce.prototype.onKeyUp=function(K){this._currentMarker===void 0||this.notesArea!==void 0||K.key!=="Delete"&&K.key!=="Backspace"||this.deleteSelectedMarker()},ce.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.markerImage.getBoundingClientRect();return{x:(K-ee.left)/this.zoomLevel,y:(Y-ee.top)/this.zoomLevel}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var K=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=K+"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()},ce.prototype.addLicenseKey=function(K){re.addKey(K)},ce.prototype.addEventListener=function(K,Y){this.eventListeners.addEventListener(K,Y)},ce.prototype.removeEventListener=function(K,Y){this.eventListeners.removeEventListener(K,Y)},ce.prototype.renderState=function(K){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(K),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ce.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ce.prototype.focus=function(){var K=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Y){return Y(new Et(K))}))},ce.prototype.blur=function(){var K=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new Et(K))}))},ce.instanceCounter=0,ce}();/* **********************************
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 ir=function(ce,K){return(ir=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,ee){Y.__proto__=ee}||function(Y,ee){for(var ye in ee)Object.prototype.hasOwnProperty.call(ee,ye)&&(Y[ye]=ee[ye])})(ce,K)};function $t(ce,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function Y(){this.constructor=ce}ir(ce,K),ce.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y)}function At(ce,K,Y,ee){return new(Y||(Y=Promise))(function(ye,se){function Pe(Tt){try{mt(ee.next(Tt))}catch(et){se(et)}}function Ze(Tt){try{mt(ee.throw(Tt))}catch(et){se(et)}}function mt(Tt){var et;Tt.done?ye(Tt.value):(et=Tt.value,et instanceof Y?et:new Y(function(kt){kt(et)})).then(Pe,Ze)}mt((ee=ee.apply(ce,K||[])).next())})}function Rt(ce,K){var Y,ee,ye,se,Pe={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return se={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ze(mt){return function(Tt){return function(et){if(Y)throw new TypeError("Generator is already executing.");for(;Pe;)try{if(Y=1,ee&&(ye=2&et[0]?ee.return:et[0]?ee.throw||((ye=ee.return)&&ye.call(ee),0):ee.next)&&!(ye=ye.call(ee,et[1])).done)return ye;switch(ee=0,ye&&(et=[2&et[0],ye.value]),et[0]){case 0:case 1:ye=et;break;case 4:return Pe.label++,{value:et[1],done:!1};case 5:Pe.label++,ee=et[1],et=[0];continue;case 7:et=Pe.ops.pop(),Pe.trys.pop();continue;default:if(!(ye=Pe.trys,(ye=ye.length>0&&ye[ye.length-1])||et[0]!==6&&et[0]!==2)){Pe=0;continue}if(et[0]===3&&(!ye||et[1]>ye[0]&&et[1]0&&Y>0){var ee=new Bt(K,Y),ye=ee.ratio>=1?20:ee.getHorizontalLength(20),se=ee.ratio<1?20:ee.getVerticalLength(20),Pe=document.createElementNS("http://www.w3.org/2000/svg","svg");Pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Pe);var Ze=St.createDefs();Pe.appendChild(Ze);var mt=St.createElement("clipPath",[["id","text-bg-clip"]]);Ze.appendChild(mt);var Tt=St.createPath(St.getHollowRectanglePath((24-ye)/2,(24-se)/2,ye,se,(24-ye)/2+2,(24-se)/2+2,ye-4,se-4));Pe.appendChild(Tt);var et=St.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);et.appendChild(St.createTSpan(K+":"+Y)),Pe.appendChild(et);var kt=et.getBBox();St.setAttributes(et,[["x",((24-kt.width)/2).toString()],["y",((24-kt.height)/2-kt.y).toString()]]);var Zt=St.createPath(St.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(kt.width))/2,(24-Math.ceil(kt.height))/2,Math.ceil(kt.width),Math.ceil(kt.height)));return mt.appendChild(Zt),St.setAttributes(Tt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Pe),Pe.outerHTML}return''},ce}(),ar=function(ce){function K(Y,ee,ye){var se=ce.call(this,Y,ee)||this;return se.isDropdownOpen=!1,se.onClick=se.dropdownButtonClicked,se.dropdownButtons=ye,se}return $t(K,ce),K.prototype.setupDropdown=function(){var Y=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=Y.className,ee.colorsClassName=Y.colorsClassName,Y.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},K.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},K.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},K.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},K.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},K.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},K}(Pt),Gt=function(){function ce(K,Y){this.GRIP_SIZE=10,this.color=K,this.fillColor=Y,this.visual=St.createGroup(),this.visual.appendChild(St.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(St.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ce.prototype.ownsTarget=function(K){return K===this.visual||K===this.visual.childNodes[0]||K===this.visual.childNodes[1]},ce.prototype.setCenter=function(K,Y){this.visual.childNodes.forEach(function(ee){return St.setAttributes(ee,[["cx",K.toString()],["cy",Y.toString()]])})},ce}(),mr=function(){function ce(K,Y,ee,ye){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=K,this.canvasHeight=Y,this.margin=ee,this.container=ye,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(ce.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(K){this._aspectRatio=K,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.gridContainer&&St.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(K){this._zoomFactor=K,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ce.prototype.open=function(){var K=this;this.cropShadeElement=St.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=St.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Y=0;Ythis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Y.height/2),St.setAttributes(this.cropRectElement,[["x",Y.x.toString()],["y",Y.y.toString()],["width",Y.width.toString()],["height",Y.height.toString()]]);var ee=Y.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(se,Pe){var Ze=Y.y+ee*(Pe+1);St.setAttributes(se,[["x1",""+Y.x],["y1",""+Ze],["x2",""+(Y.x+Y.width)],["y2",""+Ze]])});var ye=Y.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(se,Pe){var Ze=Y.x+ye*(Pe+1);St.setAttributes(se,[["x1",""+Ze],["y1",""+Y.y],["x2",""+Ze],["y2",""+(Y.y+Y.height)]])}),St.setAttributes(this.cropShadeElement,[["d",St.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Y.x,Y.y,Y.width,Y.height)]]),this.topLeftGrip.setCenter(Y.x,Y.y),this.topRightGrip.setCenter(Y.x+Y.width,Y.y),this.bottomLeftGrip.setCenter(Y.x,Y.y+Y.height),this.bottomRightGrip.setCenter(Y.x+Y.width,Y.y+Y.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ce.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)},ce.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.container.getBoundingClientRect();return{x:K-ee.left+this.margin,y:Y-ee.top+this.margin}},ce.prototype.onPointerDown=function(K){this.container.setPointerCapture(K.pointerId),this.previousPoint=this.clientToLocalCoordinates(K.clientX,K.clientY),this.cropRectElement===K.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(K.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(K.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(K.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(K.target)&&(this.activeGrip=this.bottomRightGrip)},ce.prototype.onPointerMove=function(K){if(this.isMoving)this.move(this.clientToLocalCoordinates(K.clientX,K.clientY));else if(this.activeGrip){var Y=this.clientToLocalCoordinates(K.clientX,K.clientY);this.resize(Y)}K.preventDefault()},ce.prototype.onPointerUp=function(K){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(K.pointerId)},ce.prototype.move=function(K){var Y=K.x-this.previousPoint.x,ee=K.y-this.previousPoint.y;this.zoomFactor!==1&&(Y=-Y/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Y),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=K},ce.prototype.resize=function(K){var Y=Object.assign({},this.cropRect),ee=K.x-this.previousPoint.x,ye=K.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Y.x+eethis.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-Y.width),Y.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Y.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),Y.height=this.aspectRatio.getVerticalLength(Y.width)):(Y.y+=ye,Y.height=this.cropRect.y+this.cropRect.height-Y.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Y.height=this.aspectRatio.getVerticalLength(Y.width):Y.height+=ye}Y.width<10&&(Y.x=this.cropRect.x,Y.width=10),Y.height<10&&(Y.y=this.cropRect.y,Y.height=10),this.previousPoint=K,Y.x>=this.margin&&Y.y>=this.margin&&Y.x-this.margin+Y.width<=this.canvasWidth&&Y.y-this.margin+Y.height<=this.canvasHeight&&(this.cropRect=Y,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ce.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var K=this.cropRect.x+this.cropRect.width/2,Y=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),ye=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/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=K-this.cropRect.width/2,this.cropRect.y=Y-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)}},ce.prototype.getRescaledRect=function(K,Y,ee,ye,se,Pe){var Ze=ee/K,mt=ye/Y;return{x:(se.x-Pe)*Ze+Pe,y:(se.y-Pe)*mt+Pe,width:se.width*Ze,height:se.height*mt}},ce.prototype.scaleCanvas=function(K,Y){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,K,Y,this.cropRect,this.margin);this.canvasWidth=K,this.canvasHeight=Y,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},ce}(),zt=function(){function ce(K){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=K,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(ce.prototype,"angle",{get:function(){return this._angle},set:function(K){this._angle=K,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ce.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},ce.prototype.onPointerDown=function(K){this.controlContainer.setPointerCapture(K.pointerId),this.isDragging=!0,this.previousPoint={x:K.clientX,y:K.clientY}},ce.prototype.onPointerMove=function(K){this.isDragging&&(this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.previousPoint.x=K.clientX)},ce.prototype.onPointerUp=function(K){this.isDragging&&this.onAngleChange&&this.onAngleChange((K.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(K.pointerId)},ce.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var K=this.angleLabelText.getBBox();St.setAttributes(this.angleLabelElement,[["x",((this.width-K.width)/2).toString()],["y",(this.height/2).toString()]])}},ce.prototype.positionScaleShape=function(){if(this.scaleShape){var K=this.scaleShape.transform.baseVal.getItem(0);K.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(K,0)}},ce.prototype.getVisual=function(){var K=document.createElementNS("http://www.w3.org/2000/svg","svg");K.setAttribute("xmlns","http://www.w3.org/2000/svg"),K.setAttribute("width",this.width+"px"),K.setAttribute("height",this.height+"px"),K.setAttribute("viewBox","0 0 "+this.width+" "+this.height),K.style.flexShrink="0",document.body.appendChild(K);for(var Y="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var ye=ee%5==0?this.height/3:this.height/6;Y+="h4v"+-ye+"h1v"+ye}Y+="v1H0Z",this.scaleShape=St.createPath(Y);var se=St.createTransform();this.scaleShape.transform.baseVal.appendItem(se),K.appendChild(this.scaleShape),this.angleLabelElement=St.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=St.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Pe=St.createTSpan("");return Pe.innerHTML="°",this.angleLabelElement.appendChild(Pe),K.appendChild(this.angleLabelElement),document.body.removeChild(K),K},ce}(),Ur=function(){function ce(){this.naturalSize=!1,this.imageType="image/png"}return ce.prototype.rasterize=function(K,Y,ee,ye,se,Pe,Ze){var mt=this;return new Promise(function(Tt){var et=document.createElement("canvas");et.width=K.width.baseVal.value-2*ye,et.height=K.height.baseVal.value-2*ye;var kt=1,Zt=1;mt.naturalSize===!0?(kt=Y.naturalWidth/(K.width.baseVal.value-2*ye)/Pe,Zt=Y.naturalHeight/(K.height.baseVal.value-2*ye)/Ze,et.width=Y.naturalWidth/Pe,et.height=Y.naturalHeight/Ze):mt.width!==void 0&&mt.height!==void 0&&(kt=mt.width/ee.width,Zt=mt.height/ee.height,et.width*=kt,et.height*=Zt);var Yt=et.getContext("2d");Yt.translate(et.width/2,et.height/2),Yt.rotate(se*Math.PI/180),Yt.scale(Pe,Ze),Yt.translate(-et.width/2,-et.height/2),Yt.drawImage(Y,0,0,et.width,et.height);var Cr=document.createElement("canvas");Cr.width=ee.width*kt,Cr.height=ee.height*Zt,Cr.getContext("2d").putImageData(Yt.getImageData((ee.x-ye)*kt,(ee.y-ye)*Zt,ee.width*kt,ee.height*Zt),0,0),Tt(Cr.toDataURL(mt.imageType,mt.imageQuality))})},ce}(),nt=function(){function ce(K){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=ce.instanceCounter++,this.styles=new Je(this.instanceNo),this.target=K,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(ce.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(K){this._zoomToCropEnabled=K,K?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(K){this._isGridVisible=K,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"gridLines",{get:function(){return this._gridLines},set:function(K){this._gridLines=K,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(K){this._rotationAngle=K,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"aspectRatio",{get:function(){var K;return(K=this._aspectRatio)!==null&&K!==void 0?K:this.aspectRatios[0]},set:function(K){this._aspectRatio=K},enumerable:!1,configurable:!0}),ce.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},ce.prototype.show=function(){this.showUI(),this.open()},ce.prototype.close=function(K){K===void 0&&(K=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),K||this.closeEventListeners.forEach(function(Y){return Y()}),this._isOpen=!1)},ce.prototype.addRenderEventListener=function(K){this.renderEventListeners.push(K)},ce.prototype.removeRenderEventListener=function(K){this.renderEventListeners.indexOf(K)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(K),1)},ce.prototype.addCloseEventListener=function(K){this.closeEventListeners.push(K)},ce.prototype.removeCloseEventListener=function(K){this.closeEventListeners.indexOf(K)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(K),1)},ce.prototype.setupResizeObserver=function(){var K=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){K.resize(K.target.clientWidth,K.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))},ce.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var K=1*this.target.clientWidth/this.target.clientHeight,Y=this.contentDiv.clientWidth/K>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*K:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=Y+2*this.CANVAS_MARGINK+this.CANVAS_MARGIN?this.target.offsetTop-(K+this.CANVAS_MARGIN):0;this.coverDiv.style.top=Y+"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},ce.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ce.prototype.addTopToolbar=function(){var K=this;this.topToolbar=new Xt,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 Y=new Mt;Y.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Y);var ee=[];this.aspectRatios.forEach(function(Zt){var Yt=new Pt(fr.getIcon(Zt.horizontal,Zt.vertical),Zt.horizontal===0&&Zt.vertical===0?"FREE":Zt.horizontal+":"+Zt.vertical);Yt.onClick=function(){return K.ratioButtonClicked(Zt)},ee.push(Yt)}),this.aspectRatioButton=new ar(fr.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,Y.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ye=new Pt('',"Toggle grid");ye.isActive=this.isGridVisible,ye.onClick=function(){K.isGridVisible=!K.isGridVisible,ye.isActive=K.isGridVisible},Y.addButton(ye);var se=new Pt('',"Zoom to selection");if(se.isActive=this.zoomToCropEnabled,se.onClick=function(){K.zoomToCropEnabled=!K.zoomToCropEnabled,se.isActive=K.zoomToCropEnabled},Y.addButton(se),!hr.isLicensed){var Pe=new gt;this.topToolbar.addElementBlock(Pe);var Ze=document.createElement("div");Ze.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var mt=document.createElement("a");mt.style.color="currentColor",mt.href="https://markerjs.com/products/cropro",mt.target="_blank",mt.innerHTML='',Ze.appendChild(mt),Pe.addElement(Ze)}var Tt=new Mt;Tt.minWidth=3*this.toolbarHeight+"px",Tt.contentAlign="end",this.topToolbar.addButtonBlock(Tt);var et=new Pt('',"OK");et.onClick=this.startRenderAndClose,Tt.addButton(et),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(et.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var kt=new Pt('',"Close");kt.onClick=this.close,Tt.addButton(kt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(kt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ce.prototype.addBottomToolbar=function(){var K=this;this.bottomToolbar=new Xt,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 Y=new Mt;Y.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Y);var ee=new Pt('',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,Y.addButton(ee);var ye=new Pt('',"Rotate right");ye.onClick=this.rotateRightButtonClicked,Y.addButton(ye);var se=new gt;se.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(se),this.straightener=new zt("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(Tt){K.rotateBy(Tt),K.straightener.angle=K.rotationAngle},se.addElement(this.straightener.getUI());var Pe=new Mt;Pe.minWidth=2*this.toolbarHeight+"px",Pe.contentAlign="end",this.bottomToolbar.addButtonBlock(Pe);var Ze=new Pt('',"Flip horizontal");Ze.onClick=this.flipHorizontallyButtonClicked,Pe.addButton(Ze);var mt=new Pt('',"Flip vertical");mt.onClick=this.flipVerticallyButtonClicked,Pe.addButton(mt)},ce.prototype.ratioButtonClicked=function(K){this.aspectRatio=K,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ce.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=fr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ce.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Bt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ce.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ce.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ce.prototype.restoreState=function(K){if(K){var Y=this.cropLayer.getRescaledRect(K.width,K.height,this.imageWidth,this.imageHeight,K.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Y),this.cropRectChanged(Y),this.flippedHorizontally=K.flippedHorizontally,this.flippedVertically=K.flippedVertically,this.applyFlip(),this.rotationAngle=K.rotationAngle,this.applyRotation()}},ce.prototype.clientToLocalCoordinates=function(K,Y){var ee=this.cropImage.getBoundingClientRect();return{x:K-ee.left,y:Y-ee.top}},ce.prototype.onWindowResize=function(){this.positionUI()},ce.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var K=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=K+"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()},ce.prototype.rotateLeftButtonClicked=function(){var K=this.rotationAngle-90;this.rotationAngle%90!=0&&(K+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(K)},ce.prototype.rotateRightButtonClicked=function(){var K=this.rotationAngle+90;this.rotationAngle%90!=0&&(K-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(K)},ce.prototype.rotateTo=function(K){K=(K=K>180?K-360:K)<=-180?K+360:K,this.rotationAngle=K,this.applyRotation()},ce.prototype.rotateBy=function(K){this.rotateTo((this.rotationAngle+K)%360)},ce.prototype.applyRotation=function(){var K=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var Y=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Y,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=K},ce.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ce.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ce.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ce.prototype.startRenderAndClose=function(){return At(this,void 0,void 0,function(){var K,Y;return Rt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return K=ee.sent(),Y=this.getState(),this.renderEventListeners.forEach(function(ye){return ye(K,Y)}),this.close(!0),[2]}})})},ce.prototype.render=function(){return At(this,void 0,void 0,function(){var K;return Rt(this,function(Y){switch(Y.label){case 0:return(K=new Ur).naturalSize=this.renderAtNaturalSize,K.imageType=this.renderImageType,K.imageQuality=this.renderImageQuality,K.width=this.renderWidth,K.height=this.renderHeight,this.unzoomFromCrop(),St.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,K.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 Y.sent(),[4,K.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,Y.sent()]}})})},ce.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ct("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 Ct("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ct("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var K=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ct("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*K)+`px;
height: `+(this.toolbarHeight-2*K)+`px;
padding: `+K+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ct("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ct("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new dt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new dt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ct("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 Ct("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ct("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 Ct("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*K)+`px;
padding: `+K+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ct("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},ce.instanceCounter=0,ce}(),Dt=N("8hTe"),zr=N.n(Dt),Pr=/]*>/g;function Xr(ce){var K=document.createElement("div");return K.innerHTML=ce,K.childNodes.length===0?"":K.childNodes[0].nodeValue}var Yr=q.a=function(ce){var K=ce.value,Y=K===void 0?"":K,ee=ce.edit,ye=ee===void 0?!1:ee,se=ce.className,Pe=ce.showTextOnly,Ze=ce.showLines,mt=ce.replaces,Tt=ce.zoomImg,et=ce.hasMask,kt=ce.style,Zt=kt===void 0?{}:kt,Yt=ce.stylesPrev,Cr=Yt===void 0?{}:Yt,Tr=String(Y),_r=Object(a.useRef)(),en=Object(a.useRef)(),Rn=Object(a.useState)(""),gr=Object(C.a)(Rn,2),$r=gr[0],mn=gr[1],gn=Object(a.useState)("office"),jr=Object(C.a)(gn,2),Ar=jr[0],rr=jr[1],br=function(){var tr=new nt(en.current);tr.displayMode="popup",tr.addRenderEventListener(function(){var kr=Object(g.a)(s.a.mark(function er(wr){var nr;return s.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return _r.current.style.display="none",Ir.next=3,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wr}});case 3:nr=Ir.sent,nr!=null&&nr.id&&mt(en.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(nr==null?void 0:nr.id,"?type=").concat(nr.content_type));case 5:case"end":return Ir.stop()}},er)}));return function(er){return kr.apply(this,arguments)}}()),tr.show()},Or=function(){var tr=new It(en.current);tr.settings.displayMode="popup",tr.addEventListener("render",function(){var kr=Object(g.a)(s.a.mark(function er(wr){var nr;return s.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:if(_r.current.style.display="none",!en.current){Ir.next=6;break}return Ir.next=4,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wr.dataUrl}});case 4:nr=Ir.sent,nr!=null&&nr.id&&mt(en.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(nr==null?void 0:nr.id,"?type=").concat(nr.content_type));case 6:case"end":return Ir.stop()}},er)}));return function(er){return kr.apply(this,arguments)}}()),tr.show(),window.markerArea=tr},Jr=Object(a.useMemo)(function(){_r.current&&(_r.current.style.zIndex=-1);try{var vr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,tr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,kr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Tr=Tr.replace(vr,"("+te.a.API_SERVER+"/api/attachments/").replace(tr,'"'+te.a.API_SERVER+"/api/attachments/").replace(kr,'"'+te.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,`
`)}catch(Cn){}var er=G(Tr),wr=j();if(Tr.match(/\[TOC\]/)&&(er=er.replace("[TOC]
",D()),w()),er=er.replace(/(__special_katext_id_\d+__)/g,function(Cn,Ir){var Fr=wr[Ir],Bn=Fr.type,Tn=Fr.expression;return Object(de.renderToString)(Xr(Tn)||"",{displayMode:Bn==="block",throwOnError:!1,output:"html"})}),er=er.replace(/▁/g,"\u2581\u2581\u2581"),F(),Pe){var nr=document.createElement("div");return nr.innerHTML=er,nr.innerText}return setTimeout(function(){return li()},500),er},[Tr]),tn=Object(a.useRef)();v.WebkitLineClamp=Ze,Ze&&(Zt=Object(T.a)(Object(T.a)({},Zt),v));function rn(vr){var tr=vr.target;if(tr.tagName.toUpperCase()==="IMG"){if(Tt){var kr=tr.getAttribute("src");mn(kr),rr("image")}}else if(tr.tagName.toUpperCase()==="A"){var er=tr.getAttribute("href");if(er.indexOf("office")>-1)vr.preventDefault(),mn(er),rr("office");else if(er.indexOf("application/pdf")>-1)vr.preventDefault(),mn(er),rr("pdf");else if(er.indexOf("text/html")>-1)vr.preventDefault(),mn(er),rr("html");else if(er.startsWith("#")){vr.preventDefault();var wr=document.getElementById(er.replace("#",""));wr&&wr.scrollIntoView(!0)}}}var li=function(){var tr,kr=(tr=tn.current)===null||tr===void 0?void 0:tr.querySelectorAll("video");kr==null||kr.forEach(function(er){if(er.oncontextmenu=function(){return!1},er.src.indexOf(".m3u8")>-1&&!er.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var wr=new W.a;wr.loadSource(er.src),wr.attachMedia(er)}}})};Object(a.useEffect)(function(){if(tn.current&&Jr&&(Jr.match(Pr)&&window.PR.prettyPrint()),tn.current)return tn.current.addEventListener("click",rn),function(){tn.current.removeEventListener("click",rn),F(),w()}},[Jr,tn.current,rn]);var Ln=function(tr){if(!ye)return;tr.target.nodeName==="IMG"?(_r.current.style.zIndex=1,_r.current.style.display="flex",_r.current.style.width=tr.target.clientWidth+"px",_r.current.style.height=tr.target.clientHeight+"px",_r.current.style.top=tr.target.offsetTop+"px",_r.current.style.left=tr.target.offsetLeft+"px",en.current.src=tr.target.getAttribute("src")):_r.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:tn,style:Object(T.a)({},Zt),className:"".concat(se||""," markdown-body ").concat(zr.a.mdBody),onMouseOver:Ln,dangerouslySetInnerHTML:{__html:Jr}}),r.a.createElement("div",{ref:_r,className:zr.a.button},r.a.createElement(m.a,null,r.a.createElement(R.a,{onClick:function(){return br()}},"\u88C1\u526A"),r.a.createElement(R.a,{onClick:function(){return Or()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:en,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(fe.a,{close:!0,data:$r,type:$r!=null&&$r.length?Ar:"",style:Object(T.a)({},Cr),onClose:function(){return mn("")}}))}},"9OqN":function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.CTR=function(){var m=P.lib.BlockCipherMode.extend(),S=m.Encryptor=m.extend({processBlock:function(R,T){var g=this._cipher,C=g.blockSize,h=this._iv,s=this._counter;h&&(s=this._counter=h.slice(0),this._iv=void 0);var a=s.slice(0);g.encryptBlock(a,0),s[C-1]=s[C-1]+1|0;for(var r=0;r0&&Ie.current===ne.length){He(!1);var St=W(hr);St=St.filter(function(Je){var dt,Ct;return!!((dt=Je[0])!==null&&dt!==void 0&&dt.name&&(Ct=Je[1])!==null&&Ct!==void 0&&Ct.name)}),St=St.map(function(Je){return Object(l.a)(Object(l.a)(Object(l.a)({},Je[0]),Je[1]),{},{is_file:!1})}),ue(St),Ce()}}else He(!1),Ce()});return}if(rt){var xt=new FormData;xt.append("file",at.file),xt.append("identifier",oe);var lt=Object(z.a)("/api/attachments.json",{method:"post",body:xt},!0);lt.then(function(Rt){if(Rt.filename){Ie.current=Ie.current+1;var hr=$e.current.map(function(Je){if(Je.name===(Rt==null?void 0:Rt.filename)){var dt,Ct=Object(l.a)(Object(l.a)({},Je),{},{is_oss:!rt});return Rt!=null&&(dt=Rt.filename)!==null&&dt!==void 0&&dt.includes(".in")?(Ct.in_object_key=Rt==null?void 0:Rt.object,Ct.in_object_size=Rt==null?void 0:Rt.size,Ct.input=Rt==null?void 0:Rt.filename,Ct.in_file=at):(Ct.out_object_key=Rt==null?void 0:Rt.object,Ct.out_object_size=Rt==null?void 0:Rt.size,Ct.output=Rt==null?void 0:Rt.filename,Ct.out_file=at),Ct}return Je});if($e.current=Object(u.a)(hr),J(Object(u.a)(hr)),Ie.current>0&&Ie.current===ne.length){He(!1);var St=W(hr);St=St.filter(function(Je){var dt,Ct;return!!((dt=Je[0])!==null&&dt!==void 0&&dt.name&&(Ct=Je[1])!==null&&Ct!==void 0&&Ct.name)}),St=St.map(function(Je){return Object(l.a)(Object(l.a)(Object(l.a)({},Je[0]),Je[1]),{},{is_file:!0})}),ue(St),Ce()}}else He(!1),Ce()});return}var Wt=new L.a({endpoint:Ee.end_point,region:Ee.region,accessKeyId:Ee.access_key_id,accessKeySecret:Ee.access_key_secret,bucket:Ee.bucket,stsToken:Ee.security_token}),It=at.name,ir={container_type:"TestSet",file_name:It},$t=Object(H.a)(),At="testsets/".concat(oe,"/").concat($t).concat(It.indexOf(".")>-1?"."+It.split(".").pop():"");oe===null&&(At="testsets/".concat($t).concat(It.indexOf(".")>-1?"."+It.split(".").pop():"")),Wt.multipartUpload(At,new Blob([at.file],{type:at.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:It+""},url:Ee==null?void 0:Ee.callback_url,host:Ee==null?void 0:Ee.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(z.e)(ir)}}).then(function(Rt){if(Rt.data.status===0){Ie.current=Ie.current+1;var hr=$e.current.map(function(Je){var dt,Ct;if(Je.name===((dt=Rt.data)===null||dt===void 0||((Ct=dt.data)===null||Ct===void 0)?void 0:Ct.file_name)){var Xt,Jt,Mt,Pt=Object(l.a)(Object(l.a)({},Je),{},{is_oss:!rt});if((Xt=Rt.data)!==null&&Xt!==void 0&&(Jt=Xt.data)!==null&&Jt!==void 0&&(Mt=Jt.file_name)!==null&&Mt!==void 0&&Mt.includes(".in")){var gt,Bt,fr,ar,Gt,mr;Pt.in_object_key=(gt=Rt.data)===null||gt===void 0||((Bt=gt.data)===null||Bt===void 0)?void 0:Bt.object,Pt.in_object_size=(fr=Rt.data)===null||fr===void 0||((ar=fr.data)===null||ar===void 0)?void 0:ar.size,Pt.input=(Gt=Rt.data)===null||Gt===void 0||((mr=Gt.data)===null||mr===void 0)?void 0:mr.file_name,Pt.in_file=at}else{var zt,Ur,nt,Dt,zr,Pr;Pt.out_object_key=(zt=Rt.data)===null||zt===void 0||((Ur=zt.data)===null||Ur===void 0)?void 0:Ur.object,Pt.out_object_size=(nt=Rt.data)===null||nt===void 0||((Dt=nt.data)===null||Dt===void 0)?void 0:Dt.size,Pt.output=(zr=Rt.data)===null||zr===void 0||((Pr=zr.data)===null||Pr===void 0)?void 0:Pr.file_name,Pt.out_file=at}return Pt}return Je});if($e.current=Object(u.a)(hr),J(Object(u.a)(hr)),Ie.current>0&&Ie.current===ne.length){He(!1);var St=W(hr);St=St.filter(function(Je){var dt,Ct;return!!((dt=Je[0])!==null&&dt!==void 0&&dt.name&&(Ct=Je[1])!==null&&Ct!==void 0&&Ct.name)}),St=St.map(function(Je){return Object(l.a)(Object(l.a)(Object(l.a)({},Je[0]),Je[1]),{},{is_file:!0})}),ue(St),Ce()}}})},Me=function(at){return new Promise(function(ft,Et){for(var xt=0,lt=[],Wt=function($t){at[$t].file.slice(0,1).arrayBuffer().then(function(){xt++,xt===at.length&&(lt.length?(y.b.warn("".concat(lt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Et()):ft(at))}).catch(function(At){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",At),xt++,lt.push(at[$t].name),xt===at.length&&(lt.length?(y.b.warn("".concat(lt.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Et()):ft(at))})},It=0;It100)return y.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(at.name))return y.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var ft={name:at.name,uid:at.uid,file:at,percent:0};return ne.push(ft),$e.current=Object(u.a)(ne),J(Object(u.a)(ne)),!1}},qe=W(ne);return console.log(ne,qe,"fileList"),c.a.createElement(d.a,{visible:ge,wrapClassName:pe,onOk:Fe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Be},onCancel:Oe,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},c.a.createElement("div",{className:x.a.wrap},ne.length?c.a.createElement("div",null,c.a.createElement(h.a,{justify:"space-between",align:"middle",className:"mb20"},c.a.createElement("div",{style:{visibility:re?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",c.a.createElement(a.a.Group,{className:"ml10",value:Ge,onChange:function(at){return Ye(at.target.value)}},c.a.createElement(a.a,{value:!1},"\u6587\u672C"),c.a.createElement(a.a,{value:!0},"\u6587\u4EF6"))),c.a.createElement(v.a,Xe,c.a.createElement(f.a,{className:x.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),c.a.createElement(de,{data:qe,onRemove:Ae})):c.a.createElement("div",{className:x.a.noData},c.a.createElement("img",{src:j.a,alt:""}),c.a.createElement(v.a,Xe,c.a.createElement(f.a,{className:x.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),c.a.createElement("div",{className:x.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",c.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",c.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",c.a.createElement("br",null),"3\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",c.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",c.a.createElement("br",null))))},de=function(be){var Ce=be.data,ue=Ce===void 0?[]:Ce,ge=be.onRemove,pe=be.width,oe=pe===void 0?"auto":pe,ae=be.showScore,re=ae===void 0?!1:ae,he=be.disabled,Q=he===void 0?!1:he,ie=be.inputChange,we=be.onEvaluatingChange,ne=be.showEvaluatingSetting,J=ne===void 0?!1:ne,V={value:"",filename:"",dataUrl:""},Z=Object(k.useState)(Object(l.a)({},V)),Ee=Object(o.a)(Z,2),xe=Ee[0],_e=Ee[1],je=function(ze){var Ge=document.createElement("a");document.body.appendChild(Ge);var Ye=URL.createObjectURL(ze.file);Ge.href=Ye,Ge.download=ze.name,Ge.click(),URL.revokeObjectURL(Ye),document.body.removeChild(Ge)},Be=function(ze,Ge){Object(G.y)(ze,Ge)},He=function(ze,Ge){d.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:c.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){ge(ze,Ge)},onCancel:function(){}})};return ue.length?c.a.createElement("div",{style:{width:oe}},c.a.createElement("div",{className:x.a.head},J&&c.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",c.a.createElement(g.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),c.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),c.a.createElement("div",{style:{width:re?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),c.a.createElement("div",{style:{width:re?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),re&&c.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),J&&c.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",c.a.createElement(g.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),J&&c.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",c.a.createElement(g.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),c.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ue.map(function(Ue,ze){var Ge,Ye,Re,tt;return c.a.createElement("div",{key:ze,className:x.a.list},J&&c.a.createElement("div",{style:{width:"10%"}},c.a.createElement(R.a,{checked:!!Ue.hidden,onChange:function(We){we(We.target.checked?1:0,ze,"hidden")}})),c.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",ze+1),c.a.createElement("div",{className:x.a.info,style:{width:re?"25%":"35%"}},c.a.createElement("span",{title:Ue.input||((Ge=Ue[0])===null||Ge===void 0?void 0:Ge.name),onClick:Object(n.a)(D.a.mark(function rt(){var We,$e;return D.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(Ue.input?Ue.input_file_url?We=Ue.input_file_url:We=Ue.in_file:We=Ue[0],!(typeof We=="string")){Oe.next=14;break}return Oe.next=4,fetch(We,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return $e=Oe.sent,Oe.t0=_e,Oe.next=8,$e.text();case 8:Oe.t1=Oe.sent,Oe.t2=We,Oe.t3={value:Oe.t1,filename:"",dataUrl:Oe.t2},(0,Oe.t0)(Oe.t3),Oe.next=18;break;case 14:return Oe.next=16,Object(G.G)(We.file);case 16:$e=Oe.sent,_e({value:$e.text,filename:We.name,dataUrl:$e.link});case 18:case"end":return Oe.stop()}},rt)}))},Ue.input||((Ye=Ue[0])===null||Ye===void 0?void 0:Ye.name))),c.a.createElement("div",{className:x.a.info,style:{width:re?"25%":"35%"}},c.a.createElement("span",{title:Ue.output||((Re=Ue[1])===null||Re===void 0?void 0:Re.name),onClick:Object(n.a)(D.a.mark(function rt(){var We,$e;return D.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(Ue.input?Ue.output_file_url?We=Ue.output_file_url:We=Ue.out_file:We=Ue[1],!(typeof We=="string")){Oe.next=14;break}return Oe.next=4,fetch(We,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return $e=Oe.sent,Oe.t0=_e,Oe.next=8,$e.text();case 8:Oe.t1=Oe.sent,Oe.t2=We,Oe.t3={value:Oe.t1,filename:"",dataUrl:Oe.t2},(0,Oe.t0)(Oe.t3),Oe.next=18;break;case 14:return Oe.next=16,Object(G.G)(We.file);case 16:$e=Oe.sent,_e({value:$e.text,filename:We.name,dataUrl:$e.link});case 18:case"end":return Oe.stop()}},rt)}))},Ue.output||((tt=Ue[1])===null||tt===void 0?void 0:tt.name))),re&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(m.a,{disabled:Q,style:{width:"70%"},onChange:function(We){return ie(We,ze)},value:Ue.score}),c.a.createElement("span",null,"\xA0%")),J&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(R.a,{checked:Ue.is_invisible||!1,onChange:function(We){we(We.target.checked,ze,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),J&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(R.a,{checked:Ue.last_match_rule||!1,onChange:function(We){we(We.target.checked,ze,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),c.a.createElement("div",{onClick:function(){return He(Ue,ze)},style:{width:"10%"}},c.a.createElement("span",{className:x.a.del},"\u5220\u9664")))}),c.a.createElement(U.a,{close:!0,data:xe.dataUrl,filename:xe.filename,type:xe.dataUrl.length?"txt":"",onClose:function(){return _e(Object(l.a)({},V))},monacoEditor:{value:xe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):c.a.createElement(c.a.Fragment,null)};q.b=te},Bd2K:function(I,q,N){(function(P){P(N("VrN/"),N("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(s,a,r){if(r!=P.Init&&r&&s.removeKeyMap("autoCloseTags"),!a)return;var f={name:"autoCloseTags"};(typeof a!="object"||a.whenClosing!==!1)&&(f["'/'"]=function(p){return g(p)}),(typeof a!="object"||a.whenOpening!==!1)&&(f["'>'"]=function(p){return R(p)}),s.addKeyMap(f)});var m=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["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 R(s){if(s.getOption("disableInput"))return P.Pass;for(var a=s.listSelections(),r=[],f=s.getOption("autoCloseTags"),p=0;pd.ch&&(o=o.slice(0,o.length-E.end+d.ch));var i=o.toLowerCase();if(!o||E.type=="string"&&(E.end!=d.ch||!/[\"\']/.test(E.string.charAt(E.string.length-1))||E.string.length==1)||E.type=="tag"&&n.close||E.string.indexOf("/")==d.ch-E.start-1||w&&C(w,i)>-1||h(s,y.mode.xmlCurrentContext&&y.mode.xmlCurrentContext(l)||[],o,d,!0))return P.Pass;var D=typeof f=="object"&&f.emptyTags;if(D&&C(D,o)>-1){r[p]={text:"/>",newPos:P.Pos(d.line,d.ch+2)};continue}var k=v&&C(v,i)>-1;r[p]={indent:k,text:">"+(k?`
`:"")+""+o+">",newPos:k?P.Pos(d.line+1,0):P.Pos(d.line,d.ch+1)}}for(var c=typeof f=="object"&&f.dontIndentOnAutoClose,p=a.length-1;p>=0;p--){var b=r[p];s.replaceRange(b.text,a[p].head,a[p].anchor,"+insert");var x=s.listSelections().slice(0);x[p]={head:b.newPos,anchor:b.newPos},s.setSelections(x),!c&&b.indent&&(s.indentLine(b.newPos.line,null,!0),s.indentLine(b.newPos.line+1,null,!0))}}function T(s,a){for(var r=s.listSelections(),f=[],p=a?"/":"",d=s.getOption("autoCloseTags"),E=typeof d=="object"&&d.dontIndentOnSlash,y=0;y"&&(w+=">"),f[y]=w}if(s.replaceSelections(f),r=s.listSelections(),!E)for(var y=0;y=0&&a[l]==r;l--)++y;f=E.to;for(var l=1;l0){for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:"",a=[],r=0;r=0;a--){var r=S().key(a);s(R(r),r)}}function C(s){return S().removeItem(s)}function h(){return S().clear()}},DlQD:function(I,q,N){(function(P,m){I.exports=m()})(this,function(){"use strict";function P(Ie,Oe){for(var Le=0;LeIe.length)&&(Oe=Ie.length);for(var Le=0,Te=new Array(Oe);Le=Ie.length?{done:!0}:{done:!1,value:Ie[Te++]}}}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 Le=Ie[Symbol.iterator](),Le.next.bind(Le)}function g(Ie,Oe){return Oe={exports:{}},Ie(Oe,Oe.exports),Oe.exports}var C=g(function(Ie){function Oe(){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 Le(Te){Ie.exports.defaults=Te}Ie.exports={defaults:Oe(),getDefaults:Oe,changeDefaults:Le}}),h=C.defaults,s=C.getDefaults,a=C.changeDefaults,r=/[&<>"']/,f=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,E={"&":"&","<":"<",">":">",'"':""","'":"'"},y=function(Oe){return E[Oe]};function l(Ie,Oe){if(Oe){if(r.test(Ie))return Ie.replace(f,y)}else if(p.test(Ie))return Ie.replace(d,y);return Ie}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(Ie){return Ie.replace(n,function(Oe,Le){return Le=Le.toLowerCase(),Le==="colon"?":":Le.charAt(0)==="#"?Le.charAt(1)==="x"?String.fromCharCode(parseInt(Le.substring(2),16)):String.fromCharCode(+Le.substring(1)):""})}var u=/(^|[^\[])\^/g;function w(Ie,Oe){Ie=Ie.source||Ie,Oe=Oe||"";var Le={replace:function(Ae,ke){return ke=ke.source||ke,ke=ke.replace(u,"$1"),Ie=Ie.replace(Ae,ke),Le},getRegex:function(){return new RegExp(Ie,Oe)}};return Le}var v=/[^\w:]/g,i=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Ie,Oe,Le){if(Ie){var Te;try{Te=decodeURIComponent(o(Le)).replace(v,"").toLowerCase()}catch(Ae){return null}if(Te.indexOf("javascript:")===0||Te.indexOf("vbscript:")===0||Te.indexOf("data:")===0)return null}Oe&&!i.test(Le)&&(Le=_(Oe,Le));try{Le=encodeURI(Le).replace(/%25/g,"%")}catch(Ae){return null}return Le}var k={},c=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(Ie,Oe){k[" "+Ie]||(c.test(Ie)?k[" "+Ie]=Ie+"/":k[" "+Ie]=X(Ie,"/",!0)),Ie=k[" "+Ie];var Le=Ie.indexOf(":")===-1;return Oe.substring(0,2)==="//"?Le?Oe:Ie.replace(b,"$1")+Oe:Oe.charAt(0)==="/"?Le?Oe:Ie.replace(x,"$1")+Oe:Ie+Oe}var j={exec:function(){}};function F(Ie){for(var Oe=1,Le,Te;Oe=0&&Fe[qe]==="\\";)Xe=!Xe;return Xe?"|":" |"}),Te=Le.split(/ \|/),Ae=0;if(Te.length>Oe)Te.splice(Oe);else for(;Te.length=Te.length?Ae.slice(Te.length):Ae}).join(`
`)}var Ce=function(){function Ie(Le){this.options=Le||U}var Oe=Ie.prototype;return Oe.space=function(Te){var Ae=this.rules.block.newline.exec(Te);if(Ae)return Ae[0].length>1?{type:"space",raw:Ae[0]}:{raw:`
`}},Oe.code=function(Te,Ae){var ke=this.rules.block.code.exec(Te);if(ke){var Me=Ae[Ae.length-1];if(Me&&Me.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var Fe=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?Fe:B(Fe,`
`)}}},Oe.fences=function(Te){var Ae=this.rules.block.fences.exec(Te);if(Ae){var ke=Ae[0],Me=be(ke,Ae[3]||"");return{type:"code",raw:ke,lang:Ae[2]?Ae[2].trim():Ae[2],text:Me}}},Oe.heading=function(Te){var Ae=this.rules.block.heading.exec(Te);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},Oe.nptable=function(Te){var Ae=this.rules.block.nptable.exec(Te);if(Ae){var ke={type:"table",header:W(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
`):[],raw:Ae[0]};if(ke.header.length===ke.align.length){var Me=ke.align.length,Fe;for(Fe=0;Fe ?/gm,"");return{type:"blockquote",raw:Ae[0],text:ke}}},Oe.list=function(Te){var Ae=this.rules.block.list.exec(Te);if(Ae){for(var ke=Ae[0],Me=Ae[2],Fe=Me.length>1,Xe=Me[Me.length-1]===")",qe={type:"list",raw:ke,ordered:Fe,start:Fe?+Me.slice(0,-1):"",loose:!1,items:[]},pt=Ae[0].match(this.rules.block.item),at=!1,ft,Et,xt,lt,Wt,It,ir,$t=pt.length,At=0;At<$t;At++)ft=pt[At],ke=ft,Et=ft.length,ft=ft.replace(/^ *([*+-]|\d+[.)]) */,""),~ft.indexOf(`
`)&&(Et-=ft.length,ft=this.options.pedantic?ft.replace(/^ {1,4}/gm,""):ft.replace(new RegExp("^ {1,"+Et+"}","gm"),"")),At!==$t-1&&(xt=this.rules.block.bullet.exec(pt[At+1])[0],(Fe?xt.length===1||!Xe&&xt[xt.length-1]===")":xt.length>1||this.options.smartLists&&xt!==Me)&&(lt=pt.slice(At+1).join(`
`),qe.raw=qe.raw.substring(0,qe.raw.length-lt.length),At=$t-1)),Wt=at||/\n\n(?!\s*$)/.test(ft),At!==$t-1&&(at=ft.charAt(ft.length-1)===`
`,Wt||(Wt=at)),Wt&&(qe.loose=!0),It=/^\[[ xX]\] /.test(ft),ir=void 0,It&&(ir=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:ke,task:It,checked:ir,loose:Wt,text:ft});return qe}},Oe.html=function(Te){var Ae=this.rules.block.html.exec(Te);if(Ae)return{type:this.options.sanitize?"paragraph":"html",raw:Ae[0],pre:!this.options.sanitizer&&(Ae[1]==="pre"||Ae[1]==="script"||Ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):te(Ae[0]):Ae[0]}},Oe.def=function(Te){var Ae=this.rules.block.def.exec(Te);if(Ae){Ae[3]&&(Ae[3]=Ae[3].substring(1,Ae[3].length-1));var ke=Ae[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Ae[0],href:Ae[2],title:Ae[3]}}},Oe.table=function(Te){var Ae=this.rules.block.table.exec(Te);if(Ae){var ke={type:"table",header:W(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
`):[]};if(ke.header.length===ke.align.length){ke.raw=Ae[0];var Me=ke.align.length,Fe;for(Fe=0;Fe/i.test(Me[0])&&(Ae=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Me[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Me[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Me[0],inLink:Ae,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Me[0]):te(Me[0]):Me[0]}},Oe.link=function(Te){var Ae=this.rules.inline.link.exec(Te);if(Ae){var ke=de(Ae[2],"()");if(ke>-1){var Me=Ae[0].indexOf("!")===0?5:4,Fe=Me+Ae[1].length+ke;Ae[2]=Ae[2].substring(0,ke),Ae[0]=Ae[0].substring(0,Fe).trim(),Ae[3]=""}var Xe=Ae[2],qe="";if(this.options.pedantic){var pt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Xe);pt?(Xe=pt[1],qe=pt[3]):qe=""}else qe=Ae[3]?Ae[3].slice(1,-1):"";Xe=Xe.trim().replace(/^<([\s\S]*)>$/,"$1");var at=fe(Ae,{href:Xe&&Xe.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},Ae[0]);return at}},Oe.reflink=function(Te,Ae){var ke;if((ke=this.rules.inline.reflink.exec(Te))||(ke=this.rules.inline.nolink.exec(Te))){var Me=(ke[2]||ke[1]).replace(/\s+/g," ");if(Me=Ae[Me.toLowerCase()],!Me||!Me.href){var Fe=ke[0].charAt(0);return{type:"text",raw:Fe,text:Fe}}var Xe=fe(ke,Me,ke[0]);return Xe}},Oe.strong=function(Te,Ae,ke){ke===void 0&&(ke="");var Me=this.rules.inline.strong.start.exec(Te);if(Me&&(!Me[1]||Me[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ae=Ae.slice(-1*Te.length);var Fe=Me[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Fe.lastIndex=0;for(var Xe;(Me=Fe.exec(Ae))!=null;)if(Xe=this.rules.inline.strong.middle.exec(Ae.slice(0,Me.index+3)),Xe)return{type:"strong",raw:Te.slice(0,Xe[0].length),text:Te.slice(2,Xe[0].length-2)}}},Oe.em=function(Te,Ae,ke){ke===void 0&&(ke="");var Me=this.rules.inline.em.start.exec(Te);if(Me&&(!Me[1]||Me[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Ae=Ae.slice(-1*Te.length);var Fe=Me[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Fe.lastIndex=0;for(var Xe;(Me=Fe.exec(Ae))!=null;)if(Xe=this.rules.inline.em.middle.exec(Ae.slice(0,Me.index+2)),Xe)return{type:"em",raw:Te.slice(0,Xe[0].length),text:Te.slice(1,Xe[0].length-1)}}},Oe.codespan=function(Te){var Ae=this.rules.inline.code.exec(Te);if(Ae){var ke=Ae[2].replace(/\n/g," "),Me=/[^ ]/.test(ke),Fe=ke.startsWith(" ")&&ke.endsWith(" ");return Me&&Fe&&(ke=ke.substring(1,ke.length-1)),ke=te(ke,!0),{type:"codespan",raw:Ae[0],text:ke}}},Oe.br=function(Te){var Ae=this.rules.inline.br.exec(Te);if(Ae)return{type:"br",raw:Ae[0]}},Oe.del=function(Te){var Ae=this.rules.inline.del.exec(Te);if(Ae)return{type:"del",raw:Ae[0],text:Ae[1]}},Oe.autolink=function(Te,Ae){var ke=this.rules.inline.autolink.exec(Te);if(ke){var Me,Fe;return ke[2]==="@"?(Me=te(this.options.mangle?Ae(ke[1]):ke[1]),Fe="mailto:"+Me):(Me=te(ke[1]),Fe=Me),{type:"link",raw:ke[0],text:Me,href:Fe,tokens:[{type:"text",raw:Me,text:Me}]}}},Oe.url=function(Te,Ae){var ke;if(ke=this.rules.inline.url.exec(Te)){var Me,Fe;if(ke[2]==="@")Me=te(this.options.mangle?Ae(ke[0]):ke[0]),Fe="mailto:"+Me;else{var Xe;do Xe=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(Xe!==ke[0]);Me=te(ke[0]),ke[1]==="www."?Fe="http://"+Me:Fe=Me}return{type:"link",raw:ke[0],text:Me,href:Fe,tokens:[{type:"text",raw:Me,text:Me}]}}},Oe.inlineText=function(Te,Ae,ke){var Me=this.rules.inline.text.exec(Te);if(Me){var Fe;return Ae?Fe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Me[0]):te(Me[0]):Me[0]:Fe=te(this.options.smartypants?ke(Me[0]):Me[0]),{type:"text",raw:Me[0],text:Fe}}},Ie}(),ue=G.noopTest,ge=G.edit,pe=G.merge,oe={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:ue,table:ue,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=ge(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,oe.item=ge(oe.item,"gm").replace(/bull/g,oe.bullet).getRegex(),oe.list=ge(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._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",oe._comment=//,oe.html=ge(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=ge(oe._paragraph).replace("hr",oe.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",oe._tag).getRegex(),oe.blockquote=ge(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=pe({},oe),oe.gfm=pe({},oe.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*|$)"}),oe.gfm.nptable=ge(oe.gfm.nptable).replace("hr",oe.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",oe._tag).getRegex(),oe.gfm.table=ge(oe.gfm.table).replace("hr",oe.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",oe._tag).getRegex(),oe.pedantic=pe({},oe.normal,{html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._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:ue,paragraph:ge(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ae={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ue,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:ue,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ae.punctuation=ge(ae.punctuation).replace(/punctuation/g,ae._punctuation).getRegex(),ae._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ae._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ae.em.start=ge(ae.em.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.middle=ge(ae.em.middle).replace(/punctuation/g,ae._punctuation).replace(/overlapSkip/g,ae._overlapSkip).getRegex(),ae.em.endAst=ge(ae.em.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.em.endUnd=ge(ae.em.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.start=ge(ae.strong.start).replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.middle=ge(ae.strong.middle).replace(/punctuation/g,ae._punctuation).replace(/blockSkip/g,ae._blockSkip).getRegex(),ae.strong.endAst=ge(ae.strong.endAst,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.strong.endUnd=ge(ae.strong.endUnd,"g").replace(/punctuation/g,ae._punctuation).getRegex(),ae.blockSkip=ge(ae._blockSkip,"g").getRegex(),ae.overlapSkip=ge(ae._overlapSkip,"g").getRegex(),ae._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ae._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ae._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])?)+(?![-_])/,ae.autolink=ge(ae.autolink).replace("scheme",ae._scheme).replace("email",ae._email).getRegex(),ae._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ae.tag=ge(ae.tag).replace("comment",oe._comment).replace("attribute",ae._attribute).getRegex(),ae._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ae._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ae._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ae.link=ge(ae.link).replace("label",ae._label).replace("href",ae._href).replace("title",ae._title).getRegex(),ae.reflink=ge(ae.reflink).replace("label",ae._label).getRegex(),ae.reflinkSearch=ge(ae.reflinkSearch,"g").replace("reflink",ae.reflink).replace("nolink",ae.nolink).getRegex(),ae.normal=pe({},ae),ae.pedantic=pe({},ae.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:ge(/^!?\[(label)\]\((.*?)\)/).replace("label",ae._label).getRegex(),reflink:ge(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae._label).getRegex()}),ae.gfm=pe({},ae.normal,{escape:ge(ae.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&&(Te="x"+Te.toString(16)),Oe+=""+Te+";";return Oe}var J=function(){function Ie(Le){this.tokens=[],this.tokens.links=Object.create(null),this.options=Le||he,this.options.tokenizer=this.options.tokenizer||new Ce,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Te={block:Q.normal,inline:ie.normal};this.options.pedantic?(Te.block=Q.pedantic,Te.inline=ie.pedantic):this.options.gfm&&(Te.block=Q.gfm,this.options.breaks?Te.inline=ie.breaks:Te.inline=ie.gfm),this.tokenizer.rules=Te}Ie.lex=function(Te,Ae){var ke=new Ie(Ae);return ke.lex(Te)};var Oe=Ie.prototype;return Oe.lex=function(Te){return Te=Te.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(Te,this.tokens,!0),this.inline(this.tokens),this.tokens},Oe.blockTokens=function(Te,Ae,ke){Ae===void 0&&(Ae=[]),ke===void 0&&(ke=!0),Te=Te.replace(/^ +$/gm,"");for(var Me,Fe,Xe,qe;Te;){if(Me=this.tokenizer.space(Te)){Te=Te.substring(Me.raw.length),Me.type&&Ae.push(Me);continue}if(Me=this.tokenizer.code(Te,Ae)){Te=Te.substring(Me.raw.length),Me.type?Ae.push(Me):(qe=Ae[Ae.length-1],qe.raw+=`
`+Me.raw,qe.text+=`
`+Me.text);continue}if(Me=this.tokenizer.fences(Te)){Te=Te.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.heading(Te)){Te=Te.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.nptable(Te)){Te=Te.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.hr(Te)){Te=Te.substring(Me.raw.length),Ae.push(Me);continue}if(Me=this.tokenizer.blockquote(Te)){Te=Te.substring(Me.raw.length),Me.tokens=this.blockTokens(Me.text,[],ke),Ae.push(Me);continue}if(Me=this.tokenizer.list(Te)){for(Te=Te.substring(Me.raw.length),Xe=Me.items.length,Fe=0;Fe0)for(;(pt=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)at.includes(pt[0].slice(pt[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,pt.index)+"["+"a".repeat(pt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(pt=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,pt.index)+"["+"a".repeat(pt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;Te;){if(Xe=this.tokenizer.escape(Te)){Te=Te.substring(Xe.raw.length),Ae.push(Xe);continue}if(Xe=this.tokenizer.tag(Te,ke,Me)){Te=Te.substring(Xe.raw.length),ke=Xe.inLink,Me=Xe.inRawBlock,Ae.push(Xe);continue}if(Xe=this.tokenizer.link(Te)){Te=Te.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,Me)),Ae.push(Xe);continue}if(Xe=this.tokenizer.reflink(Te,this.tokens.links)){Te=Te.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,Me)),Ae.push(Xe);continue}if(Xe=this.tokenizer.strong(Te,qe,Fe)){Te=Te.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],ke,Me),Ae.push(Xe);continue}if(Xe=this.tokenizer.em(Te,qe,Fe)){Te=Te.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],ke,Me),Ae.push(Xe);continue}if(Xe=this.tokenizer.codespan(Te)){Te=Te.substring(Xe.raw.length),Ae.push(Xe);continue}if(Xe=this.tokenizer.br(Te)){Te=Te.substring(Xe.raw.length),Ae.push(Xe);continue}if(Xe=this.tokenizer.del(Te)){Te=Te.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],ke,Me),Ae.push(Xe);continue}if(Xe=this.tokenizer.autolink(Te,ne)){Te=Te.substring(Xe.raw.length),Ae.push(Xe);continue}if(!ke&&(Xe=this.tokenizer.url(Te,ne))){Te=Te.substring(Xe.raw.length),Ae.push(Xe);continue}if(Xe=this.tokenizer.inlineText(Te,Me,we)){Te=Te.substring(Xe.raw.length),Fe=Xe.raw.slice(-1),Ae.push(Xe);continue}if(Te){var ft="Infinite loop on byte: "+Te.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return Ae},m(Ie,null,[{key:"rules",get:function(){return{block:Q,inline:ie}}}]),Ie}(),V=C.defaults,Z=G.cleanUrl,Ee=G.escape,xe=function(){function Ie(Le){this.options=Le||V}var Oe=Ie.prototype;return Oe.code=function(Te,Ae,ke){var Me=(Ae||"").match(/\S*/)[0];if(this.options.highlight){var Fe=this.options.highlight(Te,Me);Fe!=null&&Fe!==Te&&(ke=!0,Te=Fe)}return Me?''+(ke?Te:Ee(Te,!0))+`
`:""+(ke?Te:Ee(Te,!0))+`
`},Oe.blockquote=function(Te){return`
`+Te+`
`},Oe.html=function(Te){return Te},Oe.heading=function(Te,Ae,ke,Me){return this.options.headerIds?"
`:""+Te+"
`},Oe.hr=function(){return this.options.xhtml?`
`:`
`},Oe.list=function(Te,Ae,ke){var Me=Ae?"ol":"ul",Fe=Ae&&ke!==1?' start="'+ke+'"':"";return"<"+Me+Fe+`>
`+Te+""+Me+`>
`},Oe.listitem=function(Te){return""+Te+`
`},Oe.checkbox=function(Te){return" "},Oe.paragraph=function(Te){return""+Te+`
`},Oe.table=function(Te,Ae){return Ae&&(Ae=""+Ae+""),`
`},Oe.tablerow=function(Te){return`
`+Te+`
`},Oe.tablecell=function(Te,Ae){var ke=Ae.header?"th":"td",Me=Ae.align?"<"+ke+' align="'+Ae.align+'">':"<"+ke+">";return Me+Te+""+ke+`>
`},Oe.strong=function(Te){return""+Te+""},Oe.em=function(Te){return""+Te+""},Oe.codespan=function(Te){return""+Te+""},Oe.br=function(){return this.options.xhtml?"
":"
"},Oe.del=function(Te){return""+Te+""},Oe.link=function(Te,Ae,ke){if(Te=Z(this.options.sanitize,this.options.baseUrl,Te),Te===null)return ke;var Me='"+ke+"",Me},Oe.image=function(Te,Ae,ke){if(Te=Z(this.options.sanitize,this.options.baseUrl,Te),Te===null)return ke;var Me='
":">",Me},Oe.text=function(Te){return Te},Ie}(),_e=function(){function Ie(){}var Oe=Ie.prototype;return Oe.strong=function(Te){return Te},Oe.em=function(Te){return Te},Oe.codespan=function(Te){return Te},Oe.del=function(Te){return Te},Oe.html=function(Te){return Te},Oe.text=function(Te){return Te},Oe.link=function(Te,Ae,ke){return""+ke},Oe.image=function(Te,Ae,ke){return""+ke},Oe.br=function(){return""},Ie}(),je=function(){function Ie(){this.seen={}}var Oe=Ie.prototype;return Oe.slug=function(Te){var Ae=Te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ae)){var ke=Ae;do this.seen[ke]++,Ae=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Ae))}return this.seen[Ae]=0,Ae},Ie}(),Be=C.defaults,He=G.unescape,Ue=function(){function Ie(Le){this.options=Le||Be,this.options.renderer=this.options.renderer||new xe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _e,this.slugger=new je}Ie.parse=function(Te,Ae){var ke=new Ie(Ae);return ke.parse(Te)};var Oe=Ie.prototype;return Oe.parse=function(Te,Ae){Ae===void 0&&(Ae=!0);var ke="",Me,Fe,Xe,qe,pt,at,ft,Et,xt,lt,Wt,It,ir,$t,At,Rt,hr,St,Je=Te.length;for(Me=0;Me0&&At.tokens[0].type==="text"?(At.tokens[0].text=St+" "+At.tokens[0].text,At.tokens[0].tokens&&At.tokens[0].tokens.length>0&&At.tokens[0].tokens[0].type==="text"&&(At.tokens[0].tokens[0].text=St+" "+At.tokens[0].tokens[0].text)):At.tokens.unshift({type:"text",text:St}):$t+=St),$t+=this.parse(At.tokens,ir),xt+=this.renderer.listitem($t,hr,Rt);ke+=this.renderer.list(xt,Wt,It);continue}case"html":{ke+=this.renderer.html(lt.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(xt=lt.tokens?this.parseInline(lt.tokens):lt.text;Me+1An error occurred:
"+Ye(Xe.message+"",!0)+"
";throw Xe}}We.options=We.setOptions=function(Ie){return ze(We.defaults,Ie),tt(We.defaults),We},We.getDefaults=Re,We.defaults=rt,We.use=function(Ie){var Oe=ze({},Ie);if(Ie.renderer&&function(){var Te=We.defaults.renderer||new xe,Ae=function(Fe){var Xe=Te[Fe];Te[Fe]=function(){for(var qe=arguments.length,pt=new Array(qe),at=0;at=0;p--){if(!S(f[p]))continue;var d=f[p].split("="),E=unescape(d[0]),y=unescape(d[1]);r(y,E)}}function C(r,f){if(!r)return;R.cookie=escape(r)+"="+escape(f)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function h(r){if(!r||!a(r))return;R.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function s(){g(function(r,f){h(f)})}function a(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(R.cookie)}},E4JC:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.StreamCipher,T=m.algo,g=[],C=[],h=[],s=T.Rabbit=R.extend({_doReset:function(){for(var r=this._key.words,f=this.cfg.iv,p=0;p<4;p++)r[p]=(r[p]<<8|r[p]>>>24)&16711935|(r[p]<<24|r[p]>>>8)&4278255360;var d=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],E=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 p=0;p<4;p++)a.call(this);for(var p=0;p<8;p++)E[p]^=d[p+4&7];if(f){var y=f.words,l=y[0],n=y[1],o=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w=o>>>16|u&4294901760,v=u<<16|o&65535;E[0]^=o,E[1]^=w,E[2]^=u,E[3]^=v,E[4]^=o,E[5]^=w,E[6]^=u,E[7]^=v;for(var p=0;p<4;p++)a.call(this)}},_doProcessBlock:function(r,f){var p=this._X;a.call(this),g[0]=p[0]^p[5]>>>16^p[3]<<16,g[1]=p[2]^p[7]>>>16^p[5]<<16,g[2]=p[4]^p[1]>>>16^p[7]<<16,g[3]=p[6]^p[3]>>>16^p[1]<<16;for(var d=0;d<4;d++)g[d]=(g[d]<<8|g[d]>>>24)&16711935|(g[d]<<24|g[d]>>>8)&4278255360,r[f+d]^=g[d]},blockSize:128/32,ivSize:64/32});function a(){for(var r=this._X,f=this._C,p=0;p<8;p++)C[p]=f[p];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0;for(var p=0;p<8;p++){var d=r[p]+f[p],E=d&65535,y=d>>>16,l=((E*E>>>17)+E*y>>>15)+y*y,n=((d&4294901760)*d|0)+((d&65535)*d|0);h[p]=l^n}r[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,r[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,r[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,r[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,r[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,r[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,r[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,r[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}m.Rabbit=R._createHelper(s)}(),P.Rabbit})},EHPI:function(I,q,N){"use strict";var P=N("bbsP"),m=N("/wGt"),S=N("tJVT"),R=N("k1fw"),T=N("q1tI"),g=N.n(T),C=N("ZW9T"),h=N("ZD9Y"),s=N("M8RZ"),a=N("bCnd"),r=N("fcyK"),f=N.n(r),p={theme:Object(a.a)("cmCodeMode","vs-dark"),fontSize:Object(a.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(a.a)("cmTabToSpace",!0)},d;(function(l){l[l.set_font_size=0]="set_font_size",l[l.set_theme=1]="set_theme",l[l.on_tab_to_space=2]="on_tab_to_space",l[l.set_show_editor_setting=3]="set_show_editor_setting"})(d||(d={}));function E(l,n){switch(n.type){case d.set_show_editor_setting:return Object(R.a)(Object(R.a)({},l),{},{showEditorSetting:n.payload});case d.set_theme:return Object(R.a)(Object(R.a)({},l),{},{theme:n.payload});case d.set_font_size:return Object(R.a)(Object(R.a)({},l),{},{fontSize:n.payload});case d.on_tab_to_space:return Object(R.a)(Object(R.a)({},l),{},{tabToSpace:n.payload});default:throw new Error}}q.a=function(l){var n=l.isLoading,o=l.value,u=l.onChange,w=l.language,v=l.ActionBarRender,i=v===void 0?function(G){return g.a.createElement(y,{onShowCodeSetting:G})}:v,D=Object(T.useReducer)(E,p),k=Object(S.a)(D,2),c=k[0],b=k[1],x=c.theme,_=c.fontSize,j=c.showEditorSetting,F=c.tabToSpace,L={onFontSizeChange:function(U){b({type:d.set_font_size,payload:U}),Object(a.b)("cmFontSize",U)},tabToSpace:F,cmFontSize:_,className:"oj",cmCodeMode:x,onTabToSpace:function(U){b({type:d.on_tab_to_space,payload:U}),Object(a.b)("cmTabToSpace",U)},onCodeModeChange:function(U){b({type:d.set_theme,payload:U}),Object(a.b)("cmCodeMode",U)}};function X(){b({type:d.set_show_editor_setting,payload:!1})}function z(){b({type:d.set_show_editor_setting,payload:!0})}var H={value:o,language:w,onChange:u,theme:x,height:"calc(100% - 56px)",options:{fontSize:_,insertSpaces:F}};return g.a.createElement(T.Fragment,null,g.a.createElement("div",{className:"code-panel-container"},i(z),!n&&g.a.createElement(C.b,H)),g.a.createElement(s.a,null,g.a.createElement(m.a,{className:"oj",title:null,placement:"right",closable:!1,visible:j,onClose:X},g.a.createElement(h.a,L))))};function y(l){var n=l.onShowCodeSetting;return g.a.createElement("div",{className:"action-bar"},g.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),g.a.createElement("a",{onClick:n},g.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(I,q,N){(function(P){P(N("VrN/"))})(function(P){var m={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=P.Pos;P.defineOption("autoCloseBrackets",!1,function(E,y,l){l&&l!=P.Init&&(E.removeKeyMap(T),E.state.closeBrackets=null),y&&(g(R(y,"pairs")),E.state.closeBrackets=y,E.addKeyMap(T))});function R(E,y){return y=="pairs"&&typeof E=="string"?E:typeof E=="object"&&E[y]!=null?E[y]:m[y]}var T={Backspace:s,Enter:a};function g(E){for(var y=0;y=0;o--){var w=n[o].head;E.replaceRange("",S(w.line,w.ch-1),S(w.line,w.ch+1),"+delete")}}function a(E){var y=h(E),l=y&&R(y,"explode");if(!l||E.getOption("disableInput"))return P.Pass;for(var n=E.listSelections(),o=0;o0;return{anchor:new S(E.anchor.line,E.anchor.ch+(y?-1:1)),head:new S(E.head.line,E.head.ch+(y?1:-1))}}function f(E,y){var l=h(E);if(!l||E.getOption("disableInput"))return P.Pass;var n=R(l,"pairs"),o=n.indexOf(y);if(o==-1)return P.Pass;for(var u=R(l,"closeBefore"),w=R(l,"triples"),v=n.charAt(o+1)==y,i=E.listSelections(),D=o%2==0,k,c=0;c=0&&E.getRange(x,S(x.line,x.ch+3))==y+y+y?_="skipThree":_="skip";else if(v&&x.ch>1&&w.indexOf(y)>=0&&E.getRange(S(x.line,x.ch-2),x)==y+y){if(x.ch>2&&/\bstring/.test(E.getTokenTypeAt(S(x.line,x.ch-2))))return P.Pass;_="addFour"}else if(v){var F=x.ch==0?" ":E.getRange(S(x.line,x.ch-1),x);if(!P.isWordChar(j)&&F!=y&&!P.isWordChar(F))_="both";else return P.Pass}else if(D&&(j.length===0||/\s/.test(j)||u.indexOf(j)>-1))_="both";else return P.Pass;if(!k)k=_;else if(k!=_)return P.Pass}var L=o%2?n.charAt(o-1):y,X=o%2?y:n.charAt(o+1);E.operation(function(){if(k=="skip")E.execCommand("goCharRight");else if(k=="skipThree")for(var z=0;z<3;z++)E.execCommand("goCharRight");else if(k=="surround"){for(var H=E.getSelections(),z=0;z>>24)&16711935|(k<<24|k>>>8)&4278255360}var c=this._hash.words,b=f.words,x=p.words,_=h.words,j=s.words,F=a.words,L=r.words,X,z,H,G,U,B,W,te,de,fe;B=X=c[0],W=z=c[1],te=H=c[2],de=G=c[3],fe=U=c[4];for(var be,i=0;i<80;i+=1)be=X+w[v+_[i]]|0,i<16?be+=E(z,H,G)+b[0]:i<32?be+=y(z,H,G)+b[1]:i<48?be+=l(z,H,G)+b[2]:i<64?be+=n(z,H,G)+b[3]:be+=o(z,H,G)+b[4],be=be|0,be=u(be,F[i]),be=be+U|0,X=U,U=G,G=u(H,10),H=z,z=be,be=B+w[v+j[i]]|0,i<16?be+=o(W,te,de)+x[0]:i<32?be+=n(W,te,de)+x[1]:i<48?be+=l(W,te,de)+x[2]:i<64?be+=y(W,te,de)+x[3]:be+=E(W,te,de)+x[4],be=be|0,be=u(be,L[i]),be=be+fe|0,B=fe,fe=de,de=u(te,10),te=W,W=be;be=c[1]+H+de|0,c[1]=c[2]+G+fe|0,c[2]=c[3]+U+B|0,c[3]=c[4]+X+W|0,c[4]=c[0]+z+te|0,c[0]=be},_doFinalize:function(){var w=this._data,v=w.words,i=this._nDataBytes*8,D=w.sigBytes*8;v[D>>>5]|=128<<24-D%32,v[(D+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,w.sigBytes=(v.length+1)*4,this._process();for(var k=this._hash,c=k.words,b=0;b<5;b++){var x=c[b];c[b]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return k},clone:function(){var w=g.clone.call(this);return w._hash=this._hash.clone(),w}});function E(w,v,i){return w^v^i}function y(w,v,i){return w&v|~w&i}function l(w,v,i){return(w|~v)^i}function n(w,v,i){return w&i|v&~i}function o(w,v,i){return w^(v|~i)}function u(w,v){return w<>>32-v}S.RIPEMD160=g._createHelper(d),S.HmacRIPEMD160=g._createHmacHelper(d)}(Math),P.RIPEMD160})},ETIr:function(I,q,N){(function(P,m){I.exports=q=m(N("Ib8C"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.WordArray,T=m.enc,g=T.Base64={stringify:function(h){var s=h.words,a=h.sigBytes,r=this._map;h.clamp();for(var f=[],p=0;p>>2]>>>24-p%4*8&255,E=s[p+1>>>2]>>>24-(p+1)%4*8&255,y=s[p+2>>>2]>>>24-(p+2)%4*8&255,l=d<<16|E<<8|y,n=0;n<4&&p+n*.75>>6*(3-n)&63));var o=r.charAt(64);if(o)for(;f.length%4;)f.push(o);return f.join("")},parse:function(h){var s=h.length,a=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var f=0;f>>6-p%4*2,y=d|E;r[f>>>2]|=y<<24-f%4*8,f++}return R.create(r,f)}}(),P.enc.Base64})},"F+F2":function(I,q,N){(function(P,m){I.exports=q=m(N("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var m=P,S=m.lib,R=S.WordArray,T=R.init,g=R.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 h=C.byteLength,s=[],a=0;a>>2]|=C[a]<<24-a%4*8;T.call(this,s,h)}else T.apply(this,arguments)};g.prototype=R}(),P.lib.WordArray})},GRuw:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("lPiR"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.WordArray,T=m.algo,g=T.SHA256,C=T.SHA224=g.extend({_doReset:function(){this._hash=new R.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var h=g._doFinalize.call(this);return h.sigBytes-=4,h}});m.SHA224=g._createHelper(C),m.HmacSHA224=g._createHmacHelper(C)}(),P.SHA224})},GfqC:function(I,q,N){"use strict";var P=N("q1tI"),m=N.n(P),S=N("TSYQ"),R=N.n(S);function T(G,U){var B="cannot "+G.method+" "+G.action+" "+U.status+"'",W=new Error(B);return W.status=U.status,W.method=G.method,W.url=G.action,W}function g(G){var U=G.responseText||G.response;if(!U)return U;try{return JSON.parse(U)}catch(B){return U}}function C(G){var U=new XMLHttpRequest;G.onProgress&&U.upload&&(U.upload.onprogress=function(de){de.total>0&&(de.percent=de.loaded/de.total*100),G.onProgress(de)});var B=new FormData;G.data&&Object.keys(G.data).forEach(function(te){var de=G.data[te];if(Array.isArray(de)){de.forEach(function(fe){B.append(te+"[]",fe)});return}B.append(te,G.data[te])}),G.file instanceof Blob?B.append(G.filename,G.file,G.file.name):B.append(G.filename,G.file),U.onerror=function(de){G.onError(de)},U.onload=function(){return U.status<200||U.status>=300?G.onError(T(G,U),g(U)):G.onSuccess(g(U),U)},U.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var W=G.headers||{};return W["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(W).forEach(function(te){W[te]!==null&&U.setRequestHeader(te,W[te])}),U.send(B),{abort:function(){U.abort()}}}var h=+new Date,s=0;function a(){return"rc-upload-"+h+"-"+ ++s}function r(G,U){return G.indexOf(U,G.length-U.length)!==-1}var f=function(G,U){if(G&&U){var B=Array.isArray(U)?U:U.split(","),W=G.name||"",te=G.type||"",de=te.replace(/\/.*$/,"");return B.some(function(fe){var be=fe.trim();return be.charAt(0)==="."?r(W.toLowerCase(),be.toLowerCase()):/\/\*$/.test(be)?de===be.replace(/\/.*$/,""):te===be})}return!0};function p(G,U){var B=G.createReader(),W=[];function te(){B.readEntries(function(de){var fe=Array.prototype.slice.apply(de);W=W.concat(fe);var be=!fe.length;be?U(W):te()})}te()}var d=function(U,B,W){var te=function de(fe,be){be=be||"",fe.isFile?fe.file(function(Ce){W(Ce)&&(fe.fullPath&&!Ce.webkitRelativePath&&(Object.defineProperties(Ce,{webkitRelativePath:{writable:!0}}),Ce.webkitRelativePath=fe.fullPath.replace(/^\//,""),Object.defineProperties(Ce,{webkitRelativePath:{writable:!1}})),B([Ce]))}):fe.isDirectory&&p(fe,function(Ce){Ce.forEach(function(ue){de(ue,""+be+fe.name+"/")})})};U.forEach(function(de){te(de.webkitGetAsEntry())})},E=d,y=Object.assign||function(G){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(G,W))continue;B[W]=G[W]}return B}function w(G,U){if(!(G instanceof U))throw new TypeError("Cannot call a class as a function")}function v(G,U){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:G}function i(G,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);G.prototype=Object.create(U&&U.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(G,U):G.__proto__=U)}var D=function(U){return Object.keys(U).reduce(function(B,W){return(W.substr(0,5)==="data-"||W.substr(0,5)==="aria-"||W==="role")&&(B[W]=U[W]),B},{})},k=function(G){i(U,G);function U(){var B,W,te,de;w(this,U);for(var fe=arguments.length,be=Array(fe),Ce=0;Ce>>2]>>>24-D%4*8&255;u[v+D>>>2]|=k<<24-(v+D)%4*8}else for(var c=0;c>>2]=w[c>>>2];return this.sigBytes+=i,this},clamp:function(){var o=this.words,u=this.sigBytes;o[u>>>2]&=4294967295<<32-u%4*8,o.length=S.ceil(u/4)},clone:function(){var o=a.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var u=[],w=0;w>>2]>>>24-i%4*8&255;v.push((D>>>4).toString(16)),v.push((D&15).toString(16))}return v.join("")},parse:function(o){for(var u=o.length,w=[],v=0;v>>3]|=parseInt(o.substr(v,2),16)<<24-v%8*4;return new r.init(w,u/2)}},d=f.Latin1={stringify:function(o){for(var u=o.words,w=o.sigBytes,v=[],i=0;i>>2]>>>24-i%4*8&255;v.push(String.fromCharCode(D))}return v.join("")},parse:function(o){for(var u=o.length,w=[],v=0;v>>2]|=(o.charCodeAt(v)&255)<<24-v%4*8;return new r.init(w,u)}},E=f.Utf8={stringify:function(o){try{return decodeURIComponent(escape(d.stringify(o)))}catch(u){throw new Error("Malformed UTF-8 data")}},parse:function(o){return d.parse(unescape(encodeURIComponent(o)))}},y=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=E.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var u,w=this._data,v=w.words,i=w.sigBytes,D=this.blockSize,k=D*4,c=i/k;o?c=S.ceil(c):c=S.max((c|0)-this._minBufferSize,0);var b=c*D,x=S.min(b*4,i);if(b){for(var _=0;_>>6)+s(128|X&63):s(224|X>>>12&15)+s(128|X>>>6&63)+s(128|X&63)}else{var X=65536+(L.charCodeAt(0)-55296)*1024+(L.charCodeAt(1)-56320);return s(240|X>>>18&7)+s(128|X>>>12&63)+s(128|X>>>6&63)+s(128|X&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function(L){return L.replace(r,a)},p=function(L){var X=[0,2,1][L.length%3],z=L.charCodeAt(0)<<16|(L.length>1?L.charCodeAt(1):0)<<8|(L.length>2?L.charCodeAt(2):0),H=[C.charAt(z>>>18),C.charAt(z>>>12&63),X>=2?"=":C.charAt(z>>>6&63),X>=1?"=":C.charAt(z&63)];return H.join("")},d=R.btoa&&typeof R.btoa=="function"?function(L){return R.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,p)},E=function(L){return d(f(String(L)))},y=function(L){return L.replace(/[+\/]/g,function(X){return X=="+"?"-":"_"}).replace(/=/g,"")},l=function(L,X){return X?y(E(L)):E(L)},n=function(L){return l(L,!0)},o;R.Uint8Array&&(o=function(L,X){for(var z="",H=0,G=L.length;H>>18)+C.charAt(te>>>12&63)+(typeof B!="undefined"?C.charAt(te>>>6&63):"=")+(typeof W!="undefined"?C.charAt(te&63):"=")}return X?y(z):z});var u=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(L){switch(L.length){case 4:var X=(7&L.charCodeAt(0))<<18|(63&L.charCodeAt(1))<<12|(63&L.charCodeAt(2))<<6|63&L.charCodeAt(3),z=X-65536;return s((z>>>10)+55296)+s((z&1023)+56320);case 3:return s((15&L.charCodeAt(0))<<12|(63&L.charCodeAt(1))<<6|63&L.charCodeAt(2));default:return s((31&L.charCodeAt(0))<<6|63&L.charCodeAt(1))}},v=function(L){return L.replace(u,w)},i=function(L){var X=L.length,z=X%4,H=(X>0?h[L.charAt(0)]<<18:0)|(X>1?h[L.charAt(1)]<<12:0)|(X>2?h[L.charAt(2)]<<6:0)|(X>3?h[L.charAt(3)]:0),G=[s(H>>>16),s(H>>>8&255),s(H&255)];return G.length-=[0,0,2,1][z],G.join("")},D=R.atob&&typeof R.atob=="function"?function(L){return R.atob(L)}:function(L){return L.replace(/\S{1,4}/g,i)},k=function(L){return D(String(L).replace(/[^A-Za-z0-9\+\/]/g,""))},c=function(L){return v(D(L))},b=function(L){return String(L).replace(/[-_]/g,function(X){return X=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},x=function(L){return c(b(L))},_;R.Uint8Array&&(_=function(L){return Uint8Array.from(k(b(L)),function(X){return X.charCodeAt(0)})});var j=function(){var L=R.Base64;return R.Base64=T,L};if(R.Base64={VERSION:g,atob:k,btoa:d,fromBase64:x,toBase64:l,utob:f,encode:l,encodeURI:n,btou:v,decode:x,noConflict:j,fromUint8Array:o,toUint8Array:_},typeof Object.defineProperty=="function"){var F=function(L){return{value:L,enumerable:!1,writable:!0,configurable:!0}};R.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",F(function(){return x(this)})),Object.defineProperty(String.prototype,"toBase64",F(function(L){return l(this,L)})),Object.defineProperty(String.prototype,"toBase64URI",F(function(){return l(this,!0)}))}}return R.Meteor&&(Base64=R.Base64),I.exports?I.exports.Base64=R.Base64:!(m=[],S=function(){return R.Base64}.apply(q,m),S!==void 0&&(I.exports=S)),{Base64:R.Base64}})}).call(this,N("IyRk"))},K3mO:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("3y9D"),N("WYAk"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.Base,T=S.WordArray,g=m.algo,C=g.MD5,h=g.EvpKDF=R.extend({cfg:R.extend({keySize:128/32,hasher:C,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,a){for(var r,f=this.cfg,p=f.hasher.create(),d=T.create(),E=d.words,y=f.keySize,l=f.iterations;E.lengthpe)){ae.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(pe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ae.abrupt("return",!1);case 7:return H.push({name:ge.name,file:ge}),G(Object(R.a)(H)),L.onChange(H),ae.abrupt("return",!1);case 11:case"end":return ae.stop()}},ue)}));function Ce(ue){return be.apply(this,arguments)}return Ce}()},fe=function(){var be=Object(h.a)(f.a.mark(function Ce(ue,ge){var pe,oe,ae,re,he,Q,ie,we,ne,J;return f.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return ge.file_name=ue.name,ie=ue.name,Z.next=4,Object(E.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(we=Z.sent,we.data=JSON.parse(i(we.data)),!((we==null?void 0:we.status)!==0)){Z.next=12;break}return H[H.findIndex(function(Ee){return Ee.name===ie})].status="error",H[H.findIndex(function(Ee){return Ee.name===ie})].file.status="error",L.onChange(H),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Z.abrupt("return");case 12:return W=new w.a({endpoint:we==null||((pe=we.data)===null||pe===void 0)?void 0:pe.end_point,region:we==null||((oe=we.data)===null||oe===void 0)?void 0:oe.region,accessKeyId:we==null||((ae=we.data)===null||ae===void 0)?void 0:ae.access_key_id,accessKeySecret:we==null||((re=we.data)===null||re===void 0)?void 0:re.access_key_secret,bucket:we==null||((he=we.data)===null||he===void 0)?void 0:he.bucket,stsToken:we==null||((Q=we.data)===null||Q===void 0)?void 0:Q.security_token}),console.log(ue,"file"),te(W),ne=ue.name.split("."),ne.pop(),J=ge.realFileName?ne:Object(n.a)(),Z.abrupt("return",new Promise(function(Ee,xe){try{var _e;W.multipartUpload("".concat(L.identifier,"/").concat(J).concat(ie.indexOf(".")>-1?"."+ie.split(".").pop():""),new Blob([ue.file],{type:ue.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Be,He,Ue){try{console.log("\u8FDB\u5EA6",Be,He,Ue);var ze=H.findIndex(function(Ge){return Ge.name===ie});H[ze].file.percent=Be*100,H[ze].tempCheckpoint=He,G(Object(R.a)(H))}catch(Ge){}},checkpoint:H[H.findIndex(function(je){return je.name===ie})].tempCheckpoint,callback:{customValue:{id:ie+""},url:we==null||((_e=we.data)===null||_e===void 0)?void 0:_e.callback_url,host:we==null?void 0:we.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(E.e)(ge)}}).then(function(je){var Be,He=H.findIndex(function(Re){return Re.name===ie}),Ue="done";if(((Be=je.data)===null||Be===void 0?void 0:Be.status)===0){var ze;ue.response=(ze=je.data)===null||ze===void 0?void 0:ze.data;var Ge=H.findIndex(function(Re){return Re.name===ie});H[Ge].status="done",H[Ge].file.status="done"}else{var Ye;S.b.warn((Ye=je.data)===null||Ye===void 0?void 0:Ye.message),Ue="error"}H[He].status=Ue,H[He].file.status=Ue,L.onChange(H),Ee(je==null?void 0:je.data)}).catch(function(je){H[H.findIndex(function(Be){return Be.name===ie})].status="error",H[H.findIndex(function(Be){return Be.name===ie})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),G(Object(R.a)(H)),L.onChange(H),xe(je),console.log("err:",je)})}catch(je){}}));case 19:case"end":return Z.stop()}},Ce)}));return function(ue,ge){return be.apply(this,arguments)}}();return Object(p.useEffect)(function(){H.every(function(be){return be==="done"||be==="error"})&&L.onComplete(H)},[H]),Object(p.useEffect)(function(){if(F){var be;(be=W)===null||be===void 0||be.cancel()}},[F]),Object(p.useEffect)(function(){L.uploading&&H.map(function(){var be=Object(h.a)(f.a.mark(function Ce(ue){var ge,pe;return f.a.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!((!ue.status||ue.status==="error")&&!F)){ae.next=6;break}return ue.status="uploading",ue.file.status="uploading",ae.next=5,fe(ue,{login:j==null||((ge=j.userInfo)===null||ge===void 0)?void 0:ge.login,container_type:L.container_type,container_id:L.container_id,description:L.description,realFileName:L.realFileName});case 5:pe=ae.sent;case 6:case"end":return ae.stop()}},Ce)}));return function(Ce){return be.apply(this,arguments)}}())},[L.uploading]),d.a.createElement(v,Object(P.a)({},de,{height:L.height,className:L.className}),d.a.createElement("p",{className:"ant-upload-hint"},L.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};q.b=Object(o.a)(function(x){var _=x.loading,j=x.globalSetting,F=x.user;return{globalSetting:j,loading:_.models.competitions,user:F}})(b)},KmYQ:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(m,S){var R=S*4;m.clamp(),m.sigBytes+=R-(m.sigBytes%R||R)},unpad:function(m){for(var S=m.words,R=m.sigBytes-1,R=m.sigBytes-1;R>=0;R--)if(S[R>>>2]>>>24-R%4*8&255){m.sigBytes=R+1;break}}},P.pad.ZeroPadding})},LdHM:function(I,q,N){"use strict";N.d(q,"b",function(){return u}),N.d(q,"a",function(){return v});var P=N("1OyB"),m=N("vuIU"),S=N("Ji7U"),R=N("LK+K"),T=N("q1tI"),g=N("rePB"),C=N("Ff2n"),h=N("ODXe"),s=N("4IlW"),a=N("bX4T"),r=N("YrtM"),f=N("TSYQ"),p=N.n(f),d=N("+nKL"),E=N("8OUc"),y=function(W,te){var de=W.prefixCls,fe=W.id,be=W.flattenOptions,Ce=W.childrenAsData,ue=W.values,ge=W.searchValue,pe=W.multiple,oe=W.defaultActiveFirstOption,ae=W.height,re=W.itemHeight,he=W.notFoundContent,Q=W.open,ie=W.menuItemSelectedIcon,we=W.virtual,ne=W.onSelect,J=W.onToggleOpen,V=W.onActiveValue,Z=W.onScroll,Ee=W.onMouseEnter,xe="".concat(de,"-item"),_e=Object(r.a)(function(){return be},[Q,be],function($e,Ie){return Ie[0]&&$e[1]!==Ie[1]}),je=T.useRef(null),Be=function(Ie){Ie.preventDefault()},He=function(Ie){je.current&&je.current.scrollTo({index:Ie})},Ue=function(Ie){for(var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Le=_e.length,Te=0;Te1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(B).map(function(te,de){if(!T.isValidElement(te)||!te.type)return null;var fe=te.type.isSelectOptGroup,be=te.key,Ce=te.props,ue=Ce.children,ge=Object(C.a)(Ce,["children"]);return W||!fe?k(te):Object(i.a)(Object(i.a)({key:"__RC_SELECT_GRP__".concat(be===null?de:be,"__"),label:be},ge),{},{options:c(ue)})}).filter(function(te){return te})}var b=N("2Qr1"),x=N("qNPg"),_=N("U8pU"),j=N("Kwbf"),F=N("WKfj");function L(B){var W=B.mode,te=B.options,de=B.children,fe=B.backfill,be=B.allowClear,Ce=B.placeholder,ue=B.getInputElement,ge=B.showSearch,pe=B.onSearch,oe=B.defaultOpen,ae=B.autoFocus,re=B.labelInValue,he=B.value,Q=B.inputValue,ie=B.optionLabelProp,we=W==="multiple"||W==="tags",ne=ge!==void 0?ge:we||W==="combobox",J=te||c(de);if(Object(j.a)(W!=="tags"||J.every(function(xe){return!xe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var V=J.some(function(xe){return xe.options?xe.options.some(function(_e){return typeof("value"in _e?_e.value:_e.key)=="number"}):typeof("value"in xe?xe.value:xe.key)=="number"});Object(j.a)(!V,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(j.a)(W!=="combobox"||!ie,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(j.a)(W==="combobox"||!fe,"`backfill` only works with `combobox` mode."),Object(j.a)(W==="combobox"||!ue,"`getInputElement` only work with `combobox` mode."),Object(j.b)(W!=="combobox"||!ue||!be||!Ce,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pe&&!ne&&W!=="combobox"&&W!=="tags"&&Object(j.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(j.b)(!oe||ae,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),he!=null){var Z=Object(F.d)(he);Object(j.a)(!re||Z.every(function(xe){return Object(_.a)(xe)==="object"&&("key"in xe||"value"in xe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(j.a)(!we||Array.isArray(he),"`value` should be array when `mode` is `multiple` or `tags`")}if(de){var Ee=null;Object(D.a)(de).some(function(xe){if(!T.isValidElement(xe)||!xe.type)return!1;var _e=xe.type;if(_e.isSelectOption)return!1;if(_e.isSelectOptGroup){var je=Object(D.a)(xe.props.children).every(function(Be){return!T.isValidElement(Be)||!xe.type||Be.type.isSelectOption?!0:(Ee=Be.type,!1)});return!je}return Ee=_e,!0}),Ee&&Object(j.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ee.displayName||Ee.name||Ee,"`.")),Object(j.a)(Q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var X=L,z=Object(x.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:c,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:X,fillOptionsWithMissingValue:b.a}),H=function(B){Object(S.a)(te,B);var W=Object(R.a)(te);function te(){var de;return Object(P.a)(this,te),de=W.apply(this,arguments),de.selectRef=T.createRef(),de.focus=function(){de.selectRef.current.focus()},de.blur=function(){de.selectRef.current.blur()},de}return Object(m.a)(te,[{key:"render",value:function(){return T.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),te}(T.Component);H.Option=u,H.OptGroup=v;var G=H,U=q.c=G},M8RZ:function(I,q,N){"use strict";N.d(q,"a",function(){return s});var P=N("fWQN"),m=N("mtLc"),S=N("yKVA"),R=N("879j"),T=N("q1tI"),g=N.n(T),C=N("i8i4"),h=N.n(C),s=function(a){Object(S.a)(f,a);var r=Object(R.a)(f);function f(p){var d;Object(P.a)(this,f),d=r.call(this,p);var E=window.document;return d.node=E.createElement("div"),E.body.appendChild(d.node),d}return Object(m.a)(f,[{key:"render",value:function(){var d=this.props.children;return Object(C.createPortal)(d,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),f}(g.a.Component)},MFOe:function(I,q,N){(function(P){var m=g(),S=C(),R=h(),T=typeof window!="undefined"?window:P;I.exports={assign:m,create:S,trim:R,bind:s,slice:a,each:r,map:f,pluck:p,isList:d,isFunction:E,isObject:y,Global:T};function g(){return Object.assign?Object.assign:function(n,o,u,w){for(var v=1;v=0;y-=1){var l=h.get(y)||new Set;l.forEach(function(n){var o=n.parent,u=n.node;if(a(u)||!n.parent||E.has(n.parent.key))return;if(a(n.parent.node)){E.add(o.key);return}var w=!0,v=!1;(o.children||[]).filter(function(i){return!a(i.node)}).forEach(function(i){var D=i.key,k=r.has(D);w&&!k&&(w=!1),!v&&(k||f.has(D))&&(v=!0)}),w&&r.add(o.key),v&&f.add(o.key),E.add(o.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(m(f,r))}}function T(C,h,s,a,r){for(var f=new Set(C),p=new Set(h),d=0;d<=a;d+=1){var E=s.get(d)||new Set;E.forEach(function(o){var u=o.key,w=o.node,v=o.children,i=v===void 0?[]:v;!f.has(u)&&!p.has(u)&&!r(w)&&i.filter(function(D){return!r(D.node)}).forEach(function(D){f.delete(D.key)})})}p=new Set;for(var y=new Set,l=a;l>=0;l-=1){var n=s.get(l)||new Set;n.forEach(function(o){var u=o.parent,w=o.node;if(r(w)||!o.parent||y.has(o.parent.key))return;if(r(o.parent.node)){y.add(u.key);return}var v=!0,i=!1;(u.children||[]).filter(function(D){return!r(D.node)}).forEach(function(D){var k=D.key,c=f.has(k);v&&!c&&(v=!1),!i&&(c||p.has(k))&&(i=!0)}),v||f.delete(u.key),i&&p.add(u.key),y.add(u.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(m(p,f))}}function g(C,h,s,a){var r=[],f;a?f=a:f=S;var p=new Set(C.filter(function(l){var n=!!s[l];return n||r.push(l),n})),d=new Map,E=0;Object.keys(s).forEach(function(l){var n=s[l],o=n.level,u=d.get(o);u||(u=new Set,d.set(o,u)),u.add(n),E=Math.max(E,o)}),Object(P.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var y;return h===!0?y=R(p,d,E,f):y=T(p,h.halfCheckedKeys,d,E,f),y}},OLES:function(I,q,N){"use strict";var P=N("U8pU"),m=N("VTBJ"),S=N("Ff2n"),R=N("q1tI"),T=N("uciX"),g=N("7ixt"),C=function(p){var d=p.overlay,E=p.prefixCls,y=p.id,l=p.overlayInnerStyle;return R.createElement("div",{className:"".concat(E,"-inner"),id:y,role:"tooltip",style:l},typeof d=="function"?d():d)},h=C,s=function(p,d){var E=p.overlayClassName,y=p.trigger,l=y===void 0?["hover"]:y,n=p.mouseEnterDelay,o=n===void 0?0:n,u=p.mouseLeaveDelay,w=u===void 0?.1:u,v=p.overlayStyle,i=p.prefixCls,D=i===void 0?"rc-tooltip":i,k=p.children,c=p.onVisibleChange,b=p.afterVisibleChange,x=p.transitionName,_=p.animation,j=p.placement,F=j===void 0?"right":j,L=p.align,X=L===void 0?{}:L,z=p.destroyTooltipOnHide,H=z===void 0?!1:z,G=p.defaultVisible,U=p.getTooltipContainer,B=p.overlayInnerStyle,W=Object(S.a)(p,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),te=Object(R.useRef)(null);Object(R.useImperativeHandle)(d,function(){return te.current});var de=Object(m.a)({},W);"visible"in p&&(de.popupVisible=p.visible);var fe=function(){var pe=p.arrowContent,oe=pe===void 0?null:pe,ae=p.overlay,re=p.id;return[R.createElement("div",{className:"".concat(D,"-arrow"),key:"arrow"},oe),R.createElement(h,{key:"content",prefixCls:D,id:re,overlay:ae,overlayInnerStyle:B})]},be=!1,Ce=!1;if(typeof H=="boolean")be=H;else if(H&&Object(P.a)(H)==="object"){var ue=H.keepParent;be=ue===!0,Ce=ue===!1}return R.createElement(T.a,Object.assign({popupClassName:E,prefixCls:D,popup:fe,action:l,builtinPlacements:g.a,popupPlacement:F,ref:te,popupAlign:X,getPopupContainer:U,onPopupVisibleChange:c,afterPopupVisibleChange:b,popupTransitionName:x,popupAnimation:_,defaultPopupVisible:G,destroyPopupOnHide:be,autoDestroy:Ce,mouseLeaveDelay:w,popupStyle:v,mouseEnterDelay:o},de),k)},a=Object(R.forwardRef)(s),r=q.a=a},OLod:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("K3mO"))})(this,function(P){P.lib.Cipher||function(m){var S=P,R=S.lib,T=R.Base,g=R.WordArray,C=R.BufferedBlockAlgorithm,h=S.enc,s=h.Utf8,a=h.Base64,r=S.algo,f=r.EvpKDF,p=R.Cipher=C.extend({cfg:T.extend(),createEncryptor:function(x,_){return this.create(this._ENC_XFORM_MODE,x,_)},createDecryptor:function(x,_){return this.create(this._DEC_XFORM_MODE,x,_)},init:function(x,_,j){this.cfg=this.cfg.extend(j),this._xformMode=x,this._key=_,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 _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function x(_){return typeof _=="string"?b:D}return function(_){return{encrypt:function(j,F,L){return x(F).encrypt(_,j,F,L)},decrypt:function(j,F,L){return x(F).decrypt(_,j,F,L)}}}}()}),d=R.StreamCipher=p.extend({_doFinalize:function(){var x=this._process(!0);return x},blockSize:1}),E=S.mode={},y=R.BlockCipherMode=T.extend({createEncryptor:function(x,_){return this.Encryptor.create(x,_)},createDecryptor:function(x,_){return this.Decryptor.create(x,_)},init:function(x,_){this._cipher=x,this._iv=_}}),l=E.CBC=function(){var x=y.extend();x.Encryptor=x.extend({processBlock:function(j,F){var L=this._cipher,X=L.blockSize;_.call(this,j,F,X),L.encryptBlock(j,F),this._prevBlock=j.slice(F,F+X)}}),x.Decryptor=x.extend({processBlock:function(j,F){var L=this._cipher,X=L.blockSize,z=j.slice(F,F+X);L.decryptBlock(j,F),_.call(this,j,F,X),this._prevBlock=z}});function _(j,F,L){var X,z=this._iv;z?(X=z,this._iv=m):X=this._prevBlock;for(var H=0;H>>2]&255;x.sigBytes-=_}},u=R.BlockCipher=p.extend({cfg:p.cfg.extend({mode:l,padding:o}),reset:function(){var x;p.reset.call(this);var _=this.cfg,j=_.iv,F=_.mode;this._xformMode==this._ENC_XFORM_MODE?x=F.createEncryptor:(x=F.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==x?this._mode.init(this,j&&j.words):(this._mode=x.call(F,this,j&&j.words),this._mode.__creator=x)},_doProcessBlock:function(x,_){this._mode.processBlock(x,_)},_doFinalize:function(){var x,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),x=this._process(!0)):(x=this._process(!0),_.unpad(x)),x},blockSize:128/32}),w=R.CipherParams=T.extend({init:function(x){this.mixIn(x)},toString:function(x){return(x||this.formatter).stringify(this)}}),v=S.format={},i=v.OpenSSL={stringify:function(x){var _,j=x.ciphertext,F=x.salt;return F?_=g.create([1398893684,1701076831]).concat(F).concat(j):_=j,_.toString(a)},parse:function(x){var _,j=a.parse(x),F=j.words;return F[0]==1398893684&&F[1]==1701076831&&(_=g.create(F.slice(2,4)),F.splice(0,4),j.sigBytes-=16),w.create({ciphertext:j,salt:_})}},D=R.SerializableCipher=T.extend({cfg:T.extend({format:i}),encrypt:function(x,_,j,F){F=this.cfg.extend(F);var L=x.createEncryptor(j,F),X=L.finalize(_),z=L.cfg;return w.create({ciphertext:X,key:j,iv:z.iv,algorithm:x,mode:z.mode,padding:z.padding,blockSize:x.blockSize,formatter:F.format})},decrypt:function(x,_,j,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var L=x.createDecryptor(j,F).finalize(_.ciphertext);return L},_parse:function(x,_){return typeof x=="string"?_.parse(x,this):x}}),k=S.kdf={},c=k.OpenSSL={execute:function(x,_,j,F){F||(F=g.random(64/8));var L=f.create({keySize:_+j}).compute(x,F),X=g.create(L.words.slice(_),j*4);return L.sigBytes=_*4,w.create({key:L,iv:X,salt:F})}},b=R.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:c}),encrypt:function(x,_,j,F){F=this.cfg.extend(F);var L=F.kdf.execute(j,x.keySize,x.ivSize);F.iv=L.iv;var X=D.encrypt.call(this,x,_,L.key,F);return X.mixIn(L),X},decrypt:function(x,_,j,F){F=this.cfg.extend(F),_=this._parse(_,F.format);var L=F.kdf.execute(j,x.keySize,x.ivSize,_.salt);F.iv=L.iv;var X=D.decrypt.call(this,x,_,L.key,F);return X}})}()})},OZM5:function(I,q,N){"use strict";N.d(q,"b",function(){return a}),N.d(q,"a",function(){return r}),N.d(q,"k",function(){return f}),N.d(q,"h",function(){return p}),N.d(q,"i",function(){return d}),N.d(q,"g",function(){return E}),N.d(q,"c",function(){return y}),N.d(q,"d",function(){return l}),N.d(q,"j",function(){return u}),N.d(q,"e",function(){return w}),N.d(q,"f",function(){return v});var P=N("KQm4"),m=N("U8pU"),S=N("Ff2n"),R=N("q1tI"),T=N.n(R),g=N("Kwbf"),C=N("WaYH"),h=.25,s=2;function a(i,D){var k=i.slice(),c=k.indexOf(D);return c>=0&&k.splice(c,1),k}function r(i,D){var k=i.slice();return k.indexOf(D)===-1&&k.push(D),k}function f(i){return i.split("-")}function p(i,D){return"".concat(i,"-").concat(D)}function d(i){return i&&i.type&&i.type.isTreeNode}function E(i,D){var k=[i],c=D[i];function b(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];x.forEach(function(_){var j=_.key,F=_.children;k.push(j),b(F)})}return b(c.children),k}function y(i,D){var k=i.clientY,c=D.selectHandle.getBoundingClientRect(),b=c.top,x=c.bottom,_=c.height,j=Math.max(_*h,s);return k<=b+j?-1:k>=x-j?1:0}function l(i,D){if(!i)return;var k=D.multiple;return k?i.slice():i.length?[i[0]]:i}var n=function(D){return D};function o(i,D){if(!i)return[];var k=D||{},c=k.processProps,b=c===void 0?n:c,x=Array.isArray(i)?i:[i];return x.map(function(_){var j=_.children,F=Object(S.a)(_,["children"]),L=o(j,D);return T.a.createElement(C.a,Object.assign({},b(F)),L)})}function u(i){if(!i)return null;var D;if(Array.isArray(i))D={checkedKeys:i,halfCheckedKeys:void 0};else if(Object(m.a)(i)==="object")D={checkedKeys:i.checked||void 0,halfCheckedKeys:i.halfChecked||void 0};else return Object(g.a)(!1,"`checkedKeys` is not an array or an object"),null;return D}function w(i,D){var k=new Set;function c(b){if(k.has(b))return;var x=D[b];if(!x)return;k.add(b);var _=x.parent,j=x.node;if(j.disabled)return;_&&c(_.key)}return(i||[]).forEach(function(b){c(b)}),Object(P.a)(k)}function v(i){var D={};return Object.keys(i).forEach(function(k){(k.startsWith("data-")||k.startsWith("aria-"))&&(D[k]=i[k])}),D}},Ot1p:function(I,q,N){"use strict";var P=N("2qtc"),m=N("kLXV"),S=N("rAM+"),R=N("miYZ"),T=N("tsqr"),g=N("9og8"),C=N("tJVT"),h=N("jrin"),s=N("WmNS"),a=N.n(s),r=N("q1tI"),f=N.n(r),p=N("VrN/"),d=N.n(p),E=N("bdgK"),y=N("p77/"),l=N("Bd2K"),n=N("ELLl"),o=N("19Vz"),u=N("lZu9"),w=N("+NIl"),v=N("kSUc"),i=N("9Bee"),D=function(Fe){var Xe=Fe.value,qe=Xe===void 0?"":Xe,pt=Fe.className,at=Fe.showTextOnly,ft=Fe.showLines,Et=Fe.style,xt=Et===void 0?{}:Et,lt=Object(r.useMemo)(function(){return""},[qe]);return f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{dangerouslySetInnerHTML:{__html:lt}}))},k=N("0Owb"),c=N("dejd"),b=N("C+DQ"),x=N("1vsH"),_=N("m3rI"),j=[{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 F(Fe){var Xe=Fe.onActionCallback,qe=Fe.title,pt=Fe.icon,at=Fe.actionName,ft=Fe.className,Et=ft===void 0?"":ft,xt=Fe.children;function lt(){Xe(at)}return f.a.createElement("a",{title:qe,className:Et,onClick:lt},f.a.createElement("i",{className:"md-iconfont ".concat(pt)}),xt)}var L=function(Fe){var Xe=Fe.watch,qe=Fe.showNullButton,pt=Fe.onActionCallback,at=Fe.fullScreen,ft=Fe.insertTemp,Et=Fe.hidetoolBar,xt=Fe.uuid,lt=Fe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.F)("_educoder_session"),"&key=").concat(xt,"&api=").concat(encodeURIComponent(_.a.PROXY_SERVER)));var Wt=[].concat(j,[{title:"".concat(Xe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Xe?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return f.a.createElement("ul",{className:"markdown-toolbar-container"},!Et&&Wt.map(function(It,ir){return f.a.createElement("li",{key:ir},It.actionName?f.a.createElement(F,Object(k.a)({},It,{onActionCallback:pt})):f.a.createElement("span",{className:"v-line"}))}),qe?f.a.createElement("li",null,f.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:pt},f.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ft&&f.a.createElement("li",null,f.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ft),onActionCallback:pt},f.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),f.a.createElement("li",{className:"btn-full-screen"},f.a.createElement(F,{icon:"".concat(at?"icon-shrink":"icon-enlarge"),title:at?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:pt})))},X=N("M8RZ"),z=N("+L6B"),H=N("2/Rp"),G=N("y8nQ"),U=N("Vl3Y"),B=N("5NDa"),W=N("5rEg"),te={labelCol:{span:4},wrapperCol:{span:20}},de=function(Fe){var Xe=Fe.callback,qe=Fe.onCancel;function pt(at){Xe(at)}return f.a.createElement(U.a,Object(k.a)({},te,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:pt}),f.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},f.a.createElement(W.a,null)),f.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},f.a.createElement(W.a,null)),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(H.a,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},fe=N("7ahc"),be=N("HmJG"),Ce=N("BjJ7"),ue=U.a.useForm,ge={width:280,marginRight:10},pe={labelCol:{span:5},wrapperCol:{span:19}},oe=function(Fe){var Xe=Fe.callback,qe=Fe.onCancel,pt=ue(),at=Object(C.a)(pt,1),ft=at[0];function Et(Wt){Xe(Wt)}function xt(Wt,It){if(Wt.status===-1){T.b.error(Wt.message);return}ft.setFieldsValue({src:"/api/attachments/".concat(Wt.id),type:It.type})}function lt(Wt){var It=Wt.target.files[0];re(It,xt)}return f.a.createElement(U.a,Object(k.a)({form:ft},pe,{className:"upload-image-panel",onFinish:Et}),f.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},f.a.createElement("div",{className:"flex-container"},f.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},f.a.createElement(W.a,{style:ge})),f.a.createElement(ae,{onFileChange:lt}))),f.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},f.a.createElement(W.a,{style:{width:264}})),f.a.createElement(U.a.Item,{style:{textAlign:"right"}},f.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(H.a,{type:"ghost",onClick:qe},"\u53D6\u6D88")))};function ae(Fe){var Xe=Fe.onFileChange;return f.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",f.a.createElement("input",{type:"file",onChange:Xe}))}function re(Fe,Xe){if(!Fe)throw new String("\u6CA1\u6709\u6587\u4EF6");var qe=new FormData;qe.append("editormd-image-file",Fe),qe.append("file_param_name","editormd-image-file"),qe.append("byxhr","true");var pt=new window.XMLHttpRequest;pt.withCredentials=!0,pt.addEventListener("load",function(at){Xe(JSON.parse(at.target.responseText),Fe)},!1),pt.addEventListener("error",function(at){console.error(at)},!1),pt.open("POST","".concat(Ce.a,"/api/attachments.json")),pt.send(qe)}var he=N("giR+"),Q=N("fyUT"),ie=N("7Kak"),we=N("9yH6"),ne=we.a.Group,J={margin:"0 8px"},V=function(Fe){var Xe=Fe.callback,qe=Fe.onCancel;function pt(at){Xe(at)}return f.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:pt},f.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},f.a.createElement("span",{style:J},"\u5355\u5143\u683C\u6570\uFF1A"),f.a.createElement("span",{style:J},"\u884C\u6570"),f.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},f.a.createElement(Q.a,null)),f.a.createElement("span",{style:J},"\u5217\u6570"),f.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},f.a.createElement(Q.a,null))),f.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},f.a.createElement("span",{style:J},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),f.a.createElement(U.a.Item,{name:"align"},f.a.createElement(ne,null,f.a.createElement(we.a,{value:"default"},f.a.createElement("i",{className:"fa fa-align-justify"})),f.a.createElement(we.a,{value:"left"},f.a.createElement("i",{className:"fa fa-align-left"})),f.a.createElement(we.a,{value:"center"},f.a.createElement("i",{className:"fa fa-align-center"})),f.a.createElement(we.a,{value:"right"},f.a.createElement("i",{className:"fa fa-align-right"}))))),f.a.createElement("div",{className:"flex-container flex-end"},f.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),f.a.createElement(H.a,{type:"ghost",onClick:qe},"\u53D6\u6D88")))},Z=N("ErOA"),Ee=N("7Cbv"),xe="link",_e="upload-image",je="code-block",Be="add-table",He="------------",Ue={default:He,left:":".concat(He),center:":".concat(He,":"),right:"".concat(He,":")},ze=N("9VGf"),Ge,Ye;function Re(){}var tt=0,rt=1e4,We="\u2581",$e=`
**\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 Ie(Fe){return/^\d+$/.test(Fe)?"".concat(Fe,"px"):Fe}var Oe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Le=Oe?"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=(Ge={},Object(h.a)(Ge,Le+"-B","bold"),Object(h.a)(Ge,Le+"-I","italic"),Ge),ke=(Ye={},Object(h.a)(Ye,xe,"\u6DFB\u52A0\u94FE\u63A5"),Object(h.a)(Ye,je,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(h.a)(Ye,_e,"\u6DFB\u52A0\u6587\u4EF6"),Object(h.a)(Ye,Be,"\u6DFB\u52A0\u8868\u683C"),Ye),Me=q.a=function(Fe){var Xe=Fe.defaultValue,qe=Xe===void 0?"":Xe,pt=Fe.onChange,at=Fe.width,ft=at===void 0?"100%":at,Et=Fe.height,xt=Et===void 0?400:Et,lt=Fe.miniToolbar,Wt=lt===void 0?!1:lt,It=Fe.isFocus,ir=It===void 0?!1:It,$t=Fe.watch,At=Fe.insertTemp,Rt=Fe.mode,hr=Rt===void 0?"markdown":Rt,St=Fe.id,Je=St===void 0?"markdown-editor-id":St,dt=Fe.showResizeBar,Ct=dt===void 0?!1:dt,Xt=Fe.noStorage,Jt=Xt===void 0?!1:Xt,Mt=Fe.showNullButton,Pt=Mt===void 0?!1:Mt,gt=Fe.hidetoolBar,Bt=gt===void 0?!1:gt,fr=Fe.fullScreen,ar=fr===void 0?!1:fr,Gt=Fe.onBlur,mr=Fe.onCMBeforeChange,zt=Fe.onFullScreen,Ur=Fe.className,nt=Ur===void 0?"":Ur,Dt=Fe.disablePaste,zr=Dt===void 0?!1:Dt,Pr=Fe.placeholder,Xr=Pr===void 0?"":Pr,Yr=Fe.values,ce=Yr===void 0?"":Yr,K=Object(r.useState)(null),Y=Object(C.a)(K,2),ee=Y[0],ye=Y[1],se=Object(r.useState)(qe),Pe=Object(C.a)(se,2),Ze=Pe[0],mt=Pe[1],Tt=Object(r.useState)($t),et=Object(C.a)(Tt,2),kt=et[0],Zt=et[1],Yt=Object(r.useState)(ar),Cr=Object(C.a)(Yt,2),Tr=Cr[0],_r=Cr[1],en=Object(r.useState)(""),Rn=Object(C.a)(en,2),gr=Rn[0],$r=Rn[1],mn=Object(r.useState)(0),gn=Object(C.a)(mn,2),jr=gn[0],Ar=gn[1],rr=Object(r.useState)(xt),br=Object(C.a)(rr,2),Or=br[0],Jr=br[1],tn=Object(r.useState)(!1),rn=Object(C.a)(tn,2),li=rn[0],Ln=rn[1],vr=Object(r.useRef)(Object(Ee.a)()),tr=Object(r.useRef)(!1),kr=Object(r.useRef)(),er=Object(r.useRef)(),wr=Object(r.useRef)(),nr=Object(r.useRef)(),Cn=Object(r.useRef)(),Ir=function(){var Lt=Object(g.a)(a.a.mark(function Ht(){var Ft,Qt;return a.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,Object(Z.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:vr.current}});case 2:Qt=ot.sent,Qt!=null&&(Ft=Qt.attachments)!==null&&Ft!==void 0&&Ft.length&&(console.log("cm:",ee,er),Qt.attachments.map(function(ut){ut.content_type.indexOf("image")>-1?ee.replaceSelection(".concat(ut.content_type,")")):ut.content_type.indexOf("video")>-1?ee.replaceSelection('')):ut.content_type.indexOf("pdf")>-1?ee.replaceSelection('').concat(ut.name,"")):ee.replaceSelection("[".concat(ut.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(ut.id,"?type=").concat(ut.content_type,")"))}));case 4:case"end":return ot.stop()}},Ht)}));return function(){return Lt.apply(this,arguments)}}();Object(r.useEffect)(function(){mt(ce),ee==null||ee.setValue(ce)},[ce]),Object(r.useEffect)(function(){zt==null||zt(Tr)},[Tr]),Object(r.useEffect)(function(){if(er.current){var Lt=d.a.fromTextArea(er.current,{mode:hr,lineNumbers:!Wt,lineWrapping:!0,value:qe,autoCloseTags:!0,autoCloseBrackets:!0});ir&&Lt.focus();function Ht(Ft,Qt){if(zr){Qt.preventDefault();return}var ct=Qt.clipboardData;if(ct){var ot=ct.types.toString(),ut=ct.items;if(ot==="Files"||ct.types.indexOf("Files")>-1){if(Qt.preventDefault(),hr=="stex")return;try{var wt,Nt=ut[1];((wt=ut[0])===null||wt===void 0?void 0:wt.kind)==="file"&&(Nt=ut[0]);var st=Nt.getAsFile(),Kt=st.name.split(".").pop();re(st,function(vt){if(vt.id){var or,ur,xr;(st==null||((or=st.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?Lt.replaceSelection(".concat(vt.content_type,")")):(st==null||((ur=st.type)===null||ur===void 0)?void 0:ur.indexOf("video"))>-1?Lt.replaceSelection('')):(st==null||((xr=st.type)===null||xr===void 0)?void 0:xr.indexOf("pdf"))>-1?Lt.replaceSelection('').concat(st.name,"")):Te.includes(Kt)?Lt.replaceSelection('').concat(st.name,"")):Lt.replaceSelection("[".concat(st.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(vt.id,"?type=").concat(vt.content_type,")"))}else(vt==null?void 0:vt.status)===401&&(document.location.href="/user/login")})}catch(vt){T.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Lt.on("paste",Ht),Lt.on("dragleave",function(Ft,Qt){wr.current.classList.remove("mouse-hover-md")}),Lt.on("dragover",function(Ft,Qt){wr.current.classList.add("mouse-hover-md")}),Lt.on("drop",function(Ft,Qt){wr.current.classList.add("mouse-hover-md");var ct;if(ct=Qt.dataTransfer.files,ct.length>0){Qt.preventDefault(),Qt.stopPropagation();for(var ot=function(Nt){var st=ct[Nt],Kt=st.name.split(".").pop();re(st,function(vt){if(vt.id){var or,ur,xr;(st==null||((or=st.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?Lt.replaceSelection(".concat(vt.content_type,")")):(st==null||((ur=st.type)===null||ur===void 0)?void 0:ur.indexOf("video"))>-1?Lt.replaceSelection('')):(st==null||((xr=st.type)===null||xr===void 0)?void 0:xr.indexOf("pdf"))>-1?Lt.replaceSelection('').concat(st.name,"")):Te.includes(Kt)?Lt.replaceSelection('').concat(st.name,"")):Lt.replaceSelection("[".concat(st.name,"](").concat(_.a.API_SERVER,"/api/attachments/").concat(vt.id,"?type=").concat(vt.content_type,")"))}else(vt==null?void 0:vt.status)===401&&(document.location.href="/user/login")})},ut=0;ut0||ut.target.offsetWidth>0)&&(Fr(),ee.setSize("100%","100%"),ee.refresh())}}catch(wt){ct.e(wt)}finally{ct.f()}});return Ft.observe(er.current.parentElement),Ft}if(ee){var Ht=Lt();return function(){Ht.unobserve(er.current.parentElement)}}},[ee,Fr]),Object(r.useEffect)(function(){if(ee){for(var Lt=[],Ht=function(){var ut=Qt[Ft];ct=Object(C.a)(ut,2);var wt=ct[0],Nt=ct[1],st=Object(h.a)({},wt,function(){Bn(Nt)});Lt.push(st),ee.addKeyMap(st)},Ft=0,Qt=Object.entries(Ae);Ft0){var Lt=new Date().getTime(),Ht=window.sessionStorage.getItem(Je);Lt>=jr+rt&&(!Ht||Ht!==Ze)&&(window.sessionStorage.setItem(Je,Ze),Ln(!0))}},rt),Object(r.useEffect)(function(){Zt($t)},[ee,$t]),Object(r.useEffect)(function(){ee&&(ir&&ee.focus())},[ee,ir]),Object(r.useEffect)(function(){if(kt&&ee){var Lt=ee.getScrollerElement();function Ht(Ft){var Qt=Ft.target;if(Cn.current){var ct=Qt.scrollTop/Qt.scrollHeight;Cn.current.scrollTop=Cn.current.scrollHeight*ct}}return Lt.addEventListener("scroll",Ht),function(){Lt.removeEventListener("scroll",Ht)}}},[ee,kt]),Object(r.useEffect)(function(){if(ee&&mr){function Lt(Ht,Ft){mr(Ht,Ft)}return ee.on("beforeChange",Lt),function(){ee.off("beforeChange",Lt)}}},[ee,mr]),Object(r.useEffect)(function(){if(ee&&Gt){function Lt(){Gt(ee.getValue())}return ee.on("blur",Lt),function(){ee.off("blur",Lt)}}},[ee,Gt]),Object(r.useEffect)(function(){if(ee){function Lt(Ht){var Ft=Ht.getValue();mt(Ft),Ar(new Date().getTime()),Ht.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),pt&&pt(Ft)}return ee.on("change",Lt),function(){ee.off("change",Lt)}}},[ee,pt]),Object(r.useEffect)(function(){ee&&(qe==null?(ee.setValue(""),mt("")):qe!==ee.getValue()&&(ee.setValue(qe),mt(qe),ee.setCursor(ee.lineCount(),0)))},[ee,qe]);var Bn=Object(r.useCallback)(function(Lt){var Ht=ee.getCursor(),Ft=ee.getSelection(),Qt=Ft.split(`
`);switch(Lt){case"bold":return ee.replaceSelection("**"+Ft+"**"),Ft===""&&ee.setCursor(Ht.line,Ht.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Ft+"*"),Ft===""&&ee.setCursor(Ht.line,Ht.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Ft+"`"),Ft===""&&ee.setCursor(Ht.line,Ht.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Ft+"$$`"),Ft===""&&ee.setCursor(Ht.line,Ht.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Ft+"\n```"),ee.setCursor(Ht.line+1,Ft.length+1),ee.focus();case"line-break":return ee.replaceSelection(`
`),ee.focus();case"list-ul":return Ft===""?ee.replaceSelection("- "+Ft):ee.replaceSelection(Qt.map(function(ct){return ct===""?"":"- ".concat(ct)}).join(`
`)),ee.focus();case"list-ol":return Ft===""?ee.replaceSelection("1. "+Ft):ee.replaceSelection(Qt.map(function(ct,ot){return ct===""?"":"".concat(ot+1,". ").concat(ct)}).join(`
`)),ee.focus();case"add-null-ch":return Ft===""&&ee.setCursor(Ht.line,Ht.ch+1),ee.replaceSelection(We),ee.focus();case"inster-template-1":return Ft===""&&ee.setCursor(Ht.line,Ht.ch),ee.replaceSelection($e),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Zt(!kt),ee.focus();case"trigger-full-screen":return _r(!Tr),ee.focus();case xe:$r(xe);return;case je:$r(je);return;case _e:$r(_e);return;case Be:$r(Be);return;default:throw new Error}},[ee,kt,Tr]),Tn=Object(r.useCallback)(function(Lt){$r("");switch(gr){case xe:var Ht=Lt.title,Ft=Lt.link;return ee.replaceSelection("[".concat(Ht,"](").concat(Ft,")")),ee.focus();case je:var Qt=Lt.language,ct=Lt.content;return ee.replaceSelection(["```"+Qt,ct,"```"].join(`
`)),ee.focus();case _e:var ot=Lt.src,ut=Lt.alt;return ut?ee.replaceSelection(".concat(ot,' "').concat(ut,'" )')):ee.replaceSelection("")),ee.focus();case Be:for(var wt=Lt.row,Nt=Lt.col,st=Lt.align,Kt=`
`,vt=0;vt300&&(wt=300);var Nt=xt+wt+"px";Jr(Nt)}}return Lt.addEventListener("mousedown",Qt),document.addEventListener("mousemove",ot),document.addEventListener("mouseup",ct),function(){Lt.removeEventListener("mousedown",Qt),document.removeEventListener("mousemove",ot),document.removeEventListener("mouseup",ct)}}},[ee,nr]),Object(r.useEffect)(function(){Jr(xt)},[xt]);var _n=Ie(ft),ci=Ie(Or),vn={width:_n,height:ci},di=Object(r.useMemo)(function(){if(jr){var Lt=new Date(jr),Ht=Lt.getHours(),Ft=Lt.getMinutes(),Qt=Lt.getSeconds();return Ht=Ht<10?"0"+Ht:Ht,Ft=Ft<10?"0"+Ft:Ft,Qt=Qt<10?"0"+Qt:Qt,"".concat(Ht,":").concat(Ft,":").concat(Qt)}return 0},[jr]);function Ti(){window.sessionStorage.removeItem(Je),Ln(!1),Ar(0)}function Kn(){Ln(!1),Ar(0),ee.setValue(window.sessionStorage.getItem(Je))}function Xi(Lt,Ht){var Ft=ee.getValue();Ft=Ft.replace(Lt,Ht),mt(Ft),ee==null||ee.setValue(Ft)}return f.a.createElement(r.Fragment,null,f.a.createElement("div",{className:"markdown-editor-wrapper",ref:wr},f.a.createElement("div",{className:"markdown-editor-container ".concat(nt," ").concat(kt?"on-preview":""," ").concat(Wt?"mini":""," ").concat(Tr?"full-screen":""),style:vn},f.a.createElement(L,{insertTemp:At,watch:kt,fullScreen:Tr,showNullButton:Pt,onActionCallback:Bn,hidetoolBar:Bt,uuid:vr.current,setOpenPhones:function(){tr.current=!0}}),f.a.createElement("div",{className:"markdown-editor-body"},f.a.createElement("div",{className:"codemirror-container"},f.a.createElement("textarea",{ref:er,placeholder:Xr})),kt?f.a.createElement("div",{ref:Cn,className:"preview-container"},hr==="stex"&&f.a.createElement(D,{value:Ze}),hr!=="stex"&&f.a.createElement(i.a,{edit:!0,value:Ze,replaces:Xi})):null))),Ct?f.a.createElement("a",{ref:nr,className:"editor-resize"}):null,f.a.createElement(X.a,null,ke[gr]?f.a.createElement(m.a,{centered:!0,title:ke[gr],visible:!0,onCancel:Un,footer:null,className:"markdown-popup-form"},ui):null))}},"P/tu":function(I,q,N){"use strict";var P=N("ozfa"),m=N("MJZm"),S=N("0Owb"),R=N("9og8"),T=N("tJVT"),g=N("PpiC"),C=N("WmNS"),h=N.n(C),s=N("q1tI"),a=N.n(s),r=N("WCUW"),f=N("spXi"),p=N.n(f),d=function(y){var l=y.value,n=y.onChange,o=y.defaultValue,u=y.disabled,w=Object(g.a)(y,["value","onChange","defaultValue","disabled"]),v=Object(s.useState)([]),i=Object(T.a)(v,2),D=i[0],k=i[1],c=Object(s.useState)("1"),b=Object(T.a)(c,2),x=b[0],_=b[1];Object(s.useEffect)(function(){j()},[]);var j=function(){var X=Object(R.a)(h.a.mark(function z(){var H,G;return h.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,Object(r.A)({});case 2:H=B.sent,H!=null&&H.data&&(G=[{title:a.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:p.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:a.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:F(H.data||[])}],k(G),_("2"));case 4:case"end":return B.stop()}},z)}));return function(){return X.apply(this,arguments)}}(),F=function(z){function H(G){var U=G.children,B=Array.isArray(U)&&U.length>0,W=G==null?void 0:G.group_id;return{title:a.a.createElement("div",{title:G==null?void 0:G.name,className:p.a.name},G==null?void 0:G.name),value:W,key:W,icon:a.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:B?U==null?void 0:U.map(function(te){return H(te)}):[]}}return z==null?void 0:z.map(function(G){return H(G)})},L=o?{defaultExpandedKeys:[0]}:{selectedKeys:l,defaultExpandedKeys:l};return a.a.createElement("div",{className:p.a.customTree},a.a.createElement(m.a,Object(S.a)({key:x},L,{showIcon:!0,treeData:D,onSelect:n,disabled:u},w)))};q.a=d},PD8m:function(I,q){I.exports={name:"memoryStorage",read:P,write:m,each:S,remove:R,clearAll:T};var N={};function P(g){return N[g]}function m(g,C){N[g]=C}function S(g){for(var C in N)N.hasOwnProperty(C)&&g(N[C],C)}function R(g){delete N[g]}function T(g){N={}}},PHyj:function(I,q,N){"use strict";N.r(q),N.d(q,"Types",function(){return At});var P=N("P2fV"),m=N("NJEC"),S=N("CiB2"),R=N("DYRE"),T=N("zeV3"),g=N("7Kak"),C=N("9yH6"),h=N("sRBo"),s=N("kaz8"),a=N("giR+"),r=N("fyUT"),f=N("6UJt"),p=N("DFOY"),d=N("OaEy"),E=N("2fM7"),y=N("rAM+"),l=N("T2oS"),n=N("W9HT"),o=N("+L6B"),u=N("2/Rp"),w=N("oBTY"),v=N("miYZ"),i=N("tsqr"),D=N("9og8"),k=N("y8nQ"),c=N("Vl3Y"),b=N("tJVT"),x=N("k1fw"),_=N("fu2T"),j=N("gK9i"),F=N("2qtc"),L=N("kLXV"),X=N("5NDa"),z=N("5rEg"),H=N("WmNS"),G=N.n(H),U=N("q1tI"),B=N.n(U),W=N("uMZB"),te=N.n(W),de=N("jrin"),fe,be=E.a.Option,Ce;(function(Je){Je[Je.language=0]="language",Je[Je.difficult=1]="difficult",Je[Je.category=2]="category",Je[Je.openOrNot=3]="openOrNot"})(Ce||(Ce={}));var ue=(fe={},Object(de.a)(fe,Ce.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(de.a)(fe,Ce.difficult,[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}]),Object(de.a)(fe,Ce.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(de.a)(fe,Ce.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),fe);function ge(Je){return ue[Je].map(function(dt){return B.a.createElement(be,{key:dt.title,value:dt.key}," ",dt.title," ")})}function pe(Je,dt){Je.map(function(Ct){var Xt=Ct.id,Jt=Ct.name,Mt=Ct.sub_disciplines,Pt={value:Xt,label:Jt};dt.push(Pt),Mt&&Mt.length>0&&(Pt.children=[],pe(Mt,Pt.children))})}function oe(Je,dt){for(var Ct=[],Xt=0;Xt0){Ct[0]=Mt.id;for(var Pt=0;Pt0&&arguments[0]!==void 0?arguments[0]:"question";return Object(we.c)("disciplines.json",{source:Je})}function V(Je){return Object(we.c)("problems/".concat(Je,"/edit.json"))}function Z(Je,dt){return Object(we.g)("problems/".concat(Je,".json"),dt)}function Ee(Je){return Object(we.f)("problems.json",Je)}function xe(Je,dt){return Object(we.f)("exercises/".concat(Je,"/exercise_questions.json"),dt)}function _e(Je,dt){return Object(we.g)("exercise_questions/".concat(Je,".json"),dt)}function je(Je){return Object(we.f)("problems/".concat(Je,"/publish.json"))}function Be(Je){return Object(we.f)("problems/".concat(Je,"/cancel_publish.json"))}function He(Je){return Object(we.c)("problems/".concat(Je,"/start.json"))}function Ue(Je,dt){return Object(we.f)("tag_disciplines.json",{name:dt,sub_discipline_id:Je})}var ze=N("V0Rq"),Ge=N("cDPC"),Ye=N("EHPI"),Re=N("bbsP"),tt=N("/wGt"),rt=N("ZW9T"),We=N("ZD9Y"),$e=N("M8RZ"),Ie=N("bCnd"),Oe=N("b8wu"),Le=N.n(Oe),Te=N("LvDl"),Ae={theme:Object(Ie.a)("cmCodeMode","vs-dark"),fontSize:Object(Ie.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Ie.a)("cmTabToSpace",!0)},ke;(function(Je){Je[Je.set_font_size=0]="set_font_size",Je[Je.set_theme=1]="set_theme",Je[Je.on_tab_to_space=2]="on_tab_to_space",Je[Je.set_show_editor_setting=3]="set_show_editor_setting"})(ke||(ke={}));function Me(Je,dt){switch(dt.type){case ke.set_show_editor_setting:return Object(x.a)(Object(x.a)({},Je),{},{showEditorSetting:dt.payload});case ke.set_theme:return Object(x.a)(Object(x.a)({},Je),{},{theme:dt.payload});case ke.set_font_size:return Object(x.a)(Object(x.a)({},Je),{},{fontSize:dt.payload});case ke.on_tab_to_space:return Object(x.a)(Object(x.a)({},Je),{},{tabToSpace:dt.payload});default:throw new Error}}var Fe=function(Je){var dt,Ct=Je.isLoading,Xt=Je.value,Jt=Xt===void 0?[]:Xt,Mt=Je.onChange,Pt=Object(U.useReducer)(Me,Ae),gt=Object(b.a)(Pt,2),Bt=gt[0],fr=gt[1],ar=Bt.theme,Gt=Bt.fontSize,mr=Bt.showEditorSetting,zt=Bt.tabToSpace,Ur=Object(U.useState)("c"),nt=Object(b.a)(Ur,2),Dt=nt[0],zr=nt[1],Pr=Object(U.useRef)([]);Object(U.useEffect)(function(){Jt!=null&&Jt.length&&(Pr.current=Object(Te.cloneDeep)(Jt))},[Jt]);var Xr={onFontSizeChange:function(ye){fr({type:ke.set_font_size,payload:ye}),Object(Ie.b)("cmFontSize",ye)},tabToSpace:zt,cmFontSize:Gt,className:"oj",cmCodeMode:ar,onTabToSpace:function(ye){fr({type:ke.on_tab_to_space,payload:ye}),Object(Ie.b)("cmTabToSpace",ye)},onCodeModeChange:function(ye){fr({type:ke.set_theme,payload:ye}),Object(Ie.b)("cmCodeMode",ye)}};function Yr(){fr({type:ke.set_show_editor_setting,payload:!1})}function ce(){fr({type:ke.set_show_editor_setting,payload:!0})}function K(ee){var ye,se=(ye=Pr.current)===null||ye===void 0?void 0:ye.map(function(Pe){return Pe.language===Dt&&(Pe.code=ee),Pe});Pr.current=Object(Te.cloneDeep)(se),Mt(se)}var Y={key:Dt,value:Jt==null||((dt=Jt.find(function(ee){return ee.language===Dt}))===null||dt===void 0)?void 0:dt.code,language:Dt,onChange:K,theme:ar,height:"calc(100% - 56px)",options:{fontSize:Gt,insertSpaces:zt}};return B.a.createElement(U.Fragment,null,B.a.createElement("div",{className:Le.a["code-panel-container"]},B.a.createElement(Xe,{languageItems:Jt,onLanguage:function(ye){return zr(ye)},language:Dt,onShowCodeSetting:ce}),!Ct&&B.a.createElement(rt.b,Y)),B.a.createElement($e.a,null,B.a.createElement(tt.a,{className:"oj",title:null,placement:"right",closable:!1,visible:mr,onClose:Yr},B.a.createElement(We.a,Xr))))};function Xe(Je){var dt=Je.languageItems,Ct=Je.language,Xt=Je.onShowCodeSetting,Jt=Je.onLanguage;return B.a.createElement("div",{className:Le.a["action-oj-bar"]},B.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),dt==null?void 0:dt.map(function(Mt){return B.a.createElement("div",{className:Ct===(Mt==null?void 0:Mt.language)?Le.a.active:"",onClick:function(){return Jt(Mt==null?void 0:Mt.language)},key:Mt==null?void 0:Mt.language},Mt==null?void 0:Mt.language)}),B.a.createElement("a",{onClick:Xt},B.a.createElement("i",{className:"iconfont icon-shezhi"})))}var qe=N("m3rI"),pt=N("u2Z1"),at=N("P/tu"),ft=N("B7Ph"),Et=N("vCeJ"),xt=N("hQp1"),lt=z.a.TextArea,Wt=L.a.confirm,It=j.a.Panel;function ir(){return new Date().getTime()}var $t={loading:!0,user:null,disciplines:[],dicts:null,status:0,data:void 0,lastedUpdateTime:0},At;(function(Je){Je[Je.SET_INITAL_DATA=0]="SET_INITAL_DATA",Je[Je.SET_LOADING=1]="SET_LOADING",Je[Je.SET_STATUS=2]="SET_STATUS"})(At||(At={}));function Rt(Je,dt){switch(dt.type){case At.SET_INITAL_DATA:return Object(x.a)(Object(x.a)({},Je),dt.payload);case At.SET_LOADING:return Object(x.a)(Object(x.a)({},Je),{},{loading:dt.payload});case At.SET_STATUS:return Object(x.a)(Object(x.a)({},Je),{},{status:dt.payload});default:throw new Error}}var hr=q.default=function(){var Je,dt,Ct=Object(ae.h)(),Xt=Object(ae.g)(),Jt=Object(ae.i)(),Mt=Jt.id,Pt=c.a.useForm(),gt=Object(b.a)(Pt,1),Bt=gt[0],fr=Object(U.useState)(),ar=Object(b.a)(fr,2),Gt=ar[0],mr=ar[1],zt=Object(U.useState)([]),Ur=Object(b.a)(zt,2),nt=Ur[0],Dt=Ur[1],zr=Object(U.useState)([]),Pr=Object(b.a)(zr,2),Xr=Pr[0],Yr=Pr[1],ce=Object(U.useReducer)(Rt,$t),K=Object(b.a)(ce,2),Y=K[0],ee=K[1],ye=Y.loading,se=Y.data,Pe=Y.user,Ze=Y.disciplines,mt=Y.dicts,Tt=Y.status,et=se==null?void 0:se.hack_sets,kt=se==null||((Je=se.hack)===null||Je===void 0)?void 0:Je.test_set_average,Zt=Ct.query,Yt=Zt.callback_url,Cr=Zt.express_id,Tr=Zt.score,_r=Zt.question_id,en=Zt.type,Rn=Object(U.useState)([]),gr=Object(b.a)(Rn,2),$r=gr[0],mn=gr[1],gn=Object(U.useState)(!1),jr=Object(b.a)(gn,2),Ar=jr[0],rr=jr[1],br=Object(U.useState)(!1),Or=Object(b.a)(br,2),Jr=Or[0],tn=Or[1],rn=en==="1",li=Object(U.useMemo)(function(){var ct=[];return Ze&&pe(Ze,ct),ct},[Ze]),Ln=Object(U.useCallback)(Object(D.a)(G.a.mark(function ct(){var ot,ut,wt,Nt,st,Kt,vt,or,ur,xr,Dr,dn,Rr,sr,hi,Pn,yn,$n,Gn,fi,An,On,Jn,Wn,Zn,zn,Yi,Vt,cr,Vn,pi,kn,bn,In,mi,$i,_i,Ji,Zi,Ai,xn,hn,Qi,Qn,Mn,xa,Ea,Oi,Dn,qn,ki,Di=arguments;return G.a.wrap(function(Zr){for(;;)switch(Zr.prev=Zr.next){case 0:if(ot=Di.length>0&&Di[0]!==void 0?Di[0]:0,ut=Ze,!(ut.length===0)){Zr.next=7;break}return Zr.next=5,J("new_question");case 5:wt=Zr.sent,ut=wt.disciplines;case 7:if(!Mt){Zr.next=15;break}return Nt={disciplines:ut},Zr.next=11,V(Mt);case 11:st=Zr.sent,st.message?st.status==="401"&&(document.location.href="/user/login"):(Kt=st.category,vt=st.user,or=st.code,ur=st.language,xr=st.hack_sets,Dr=st.description,dn=st.difficult,Rr=st.name,sr=st.open_or_not,hi=st.sub_discipline_id,Pn=st.tag_discipline_id,yn=st.time_limit,$n=st.test_set_average,Gn=st.test_set_score,fi=st.status,An=st.tag_discipline_ids,On=st.item_banks_group_id,Jn=st.is_file,Wn=Jn===void 0?!1:Jn,Zn=st.hide_actual_output,zn=st.code_compile_score,Yi=st.languages,Vt=st.is_my,cr=st.codes,Vn=oe(ut,hi),pi=Object(b.a)(Vn,2),kn=pi[0],bn=pi[1],rr(Zn),In=Wn?[{input:"",output:"",score:100,position:1}]:xr,Wn?(Yr(xr),Bt.setFieldsValue({hack_sets:In})):Yr([]),mi=Ct.query.lastedUpdateTime,$i=cr==null?void 0:cr.map(function(En){return Object(x.a)(Object(x.a)({},En),{},{code:re.Base64.decode(En==null?void 0:En.code)})}),Nt=Object(x.a)(Object(x.a)({},Nt),{},{loading:!1,user:vt,dicts:bn,status:fi,lastedUpdateTime:ot||(mi||0),data:{hack_codes:{language:ur,code:re.Base64.decode(or)},hack:{category:Kt,difficult:dn,name:Rr,description:Dr,open_or_not:sr,time_limit:yn,test_set_average:$n,test_set_score:Gn,sub_discipline_id:kn,tag_discipline_ids:An,languages:Yi,score:Tr||1,item_banks_group_ids:On,is_file:Wn,is_my:Vt,code_compile_score:zn},hack_sets:In,tags:An,codes:$i}}),parseInt(zn)>0&&tn(!0),ee({type:At.SET_INITAL_DATA,payload:Nt}),mr({hack:{category:Kt,difficult:dn,name:Rr,description:Dr,open_or_not:sr,time_limit:yn,test_set_average:$n,test_set_score:Gn,sub_discipline_id:kn,tag_discipline_ids:An,score:Tr||1,item_banks_group_ids:On,is_file:Wn},codes:$i}),vr(kn==null?void 0:kn[0],kn==null?void 0:kn[1],ut)),Zr.next=25;break;case 15:return Zr.next=17,ne();case 17:Zi=Zr.sent,Ai=Zi.user,xn=Ct.query,hn=xn.difficult,Qi=xn.sub_discipline_id,Qn=xn.tag_discipline_id,Mn=xn.tagIds,xa=xn.banksIds,Ea=oe(ut,parseInt(Qi,10)),Oi=Object(b.a)(Ea,2),Dn=Oi[0],qn=Oi[1],ki=[Number(xa)],ee({type:At.SET_INITAL_DATA,payload:{loading:!1,user:Ai,disciplines:ut,status:0,dicts:qn,data:{hack_codes:{language:"C",code:""},hack:{category:null,difficult:parseInt(hn,10),time_limit:3,description:"",test_set_score:!0,test_set_average:!0,open_or_not:!0,sub_discipline_id:Dn,tag_discipline_id:Mn&&(Mn==null||((_i=Mn.split(","))===null||_i===void 0)?void 0:_i.map(function(En){return Number(En)})),name:"",item_banks_group_ids:ki,is_file:!1},tags:Qn?Qn==null?void 0:Qn.split(",").map(function(En){return parseInt(En,10)}):[],hack_sets:[{input:"",output:"",score:100,position:1}]}}}),mr({hack:{category:null,difficult:parseInt(hn,10),time_limit:3,description:"",test_set_average:!0,open_or_not:!0,sub_discipline_id:Dn,tag_discipline_id:Mn&&(Mn==null||((Ji=Mn.split(","))===null||Ji===void 0)?void 0:Ji.map(function(En){return Number(En)})),name:"",item_banks_group_id:ki,is_file:!1}}),vr(Dn==null?void 0:Dn[0],Dn==null?void 0:Dn[1],ut);case 25:case"end":return Zr.stop()}},ct)})),[Mt,Ze]);Object(U.useEffect)(function(){try{Ln()}catch(ct){console.log(ct,"----")}},[]),Object(U.useEffect)(function(){function ct(){return ot.apply(this,arguments)}function ot(){return ot=Object(D.a)(G.a.mark(function ut(){var wt;return G.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return st.next=2,Object(we.c)("item_banks_groups/mine.json");case 2:wt=st.sent,mn(wt);case 4:case"end":return st.stop()}},ut)})),ot.apply(this,arguments)}ct()},[]);var vr=function(ot,ut,wt){var Nt,st,Kt,vt=wt==null||((Nt=wt.find(function(or){return or.id===ot}))===null||Nt===void 0||((st=Nt.sub_disciplines)===null||st===void 0||((Kt=st.find(function(or){return or.id===ut}))===null||Kt===void 0)))?void 0:Kt.tag_disciplines};function tr(ct,ot,ut){return kr.apply(this,arguments)}function kr(){return kr=Object(D.a)(G.a.mark(function ct(ot,ut,wt){var Nt,st,Kt,vt,or,ur,xr,Dr,dn,Rr,sr,hi,Pn,yn,$n,Gn,fi,An,On,Jn,Wn,Zn,zn;return G.a.wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:Nt=Object(x.a)({},ot),st=Nt.hack_sets,Kt=Nt.hack_codes,vt=Nt.hack,or=Nt.tags,ur=Nt.codes,vt.hide_actual_output=Ar,xr=[],Dr=[],dn=0,Rr=vt!=null&&vt.is_file?Xr.map(function(cr,Vn){return Object(x.a)(Object(x.a)({},cr),{},{position:Vn+1})}):st.map(function(cr){return Object(x.a)(Object(x.a)({},cr),{},{is_file:!1})}),sr=Object(y.a)(Rr);try{for(sr.s();!(hi=sr.n()).done;)Pn=hi.value,dn+=Pn.score,Pn.id&&Pn.id>=0?xr.push(Pn):Dr.push(Pn)}catch(cr){sr.e(cr)}finally{sr.f()}if(Rr!=null&&Rr.length){Vt.next=11;break}return i.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),Vt.abrupt("return");case 11:if(dn+=parseInt(vt.code_compile_score||0),!(dn!==100&&!vt.test_set_score)){Vt.next=15;break}return i.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),Vt.abrupt("return");case 15:if(!(Rr!=null&&Rr.some(function(cr){return!cr.output}))){Vt.next=18;break}return i.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),Vt.abrupt("return");case 18:if(yn={},rn?ur==null||ur.forEach(function(cr){yn[cr.language]=cr!=null&&cr.code?re.Base64.encode(cr==null?void 0:cr.code):""}):Kt.code=re.Base64.encode(Kt==null?void 0:Kt.code),vt.sub_discipline_id=vt.sub_discipline_id[1],ee({type:At.SET_LOADING,payload:!0}),Yt||(vt.score=vt.difficult*100),!Mt){Vt.next=49;break}return Vt.next=26,Z(Mt,{hack:vt,hack_codes:Kt,hack_sets:Dr,update_hack_sets:xr,tags:or,is_cover:wt,languages:vt.languages,codes:yn});case 26:if(!Yt){Vt.next=45;break}return Vt.next=29,je(Mt);case 29:if(!Yt.includes("paperlibrary")){Vt.next=35;break}return Vt.next=32,Object(Et.f)({id:Cr,question_id:_r,item_type:xt.a.Program,name:vt.name,question_score:vt.score,difficulty:vt.difficult,sub_discipline_id:vt.sub_discipline_id,tag_discipline_ids:vt.tag_discipline_ids,item_banks_group_ids:vt.item_banks_group_ids});case 32:return $n=Vt.sent,$n.status===0&&Xt.replace(Yt),Vt.abrupt("return");case 35:return Vt.next=37,_e(_r,{question_type:6,question_score:vt.score,question_title:vt.name,description:vt.description,sub_discipline_id:vt.sub_discipline_id,tag_discipline_ids:vt.tag_discipline_ids,item_banks_group_ids:vt.item_banks_group_ids,identifier:Mt});case 37:if(Gn=Vt.sent,fi=Gn.status,!(fi===0)){Vt.next=43;break}if(!(ut==="start")){Vt.next=42;break}return Vt.abrupt("return");case 42:Xt.replace(Yt);case 43:Vt.next=46;break;case 45:Ln(ir());case 46:ee({type:At.SET_LOADING,payload:!1}),Vt.next=79;break;case 49:return Vt.next=51,Ee({hack:vt,hack_codes:Kt,hack_sets:Rr,tags:or,examination_bank_id:Cr||null});case 51:if(An=Vt.sent,On=An.identifier,Jn=An.exam_identifier,ee({type:At.SET_LOADING,payload:!1}),!(ut==="start")){Vt.next=57;break}return Vt.abrupt("return");case 57:if(!On){Vt.next=79;break}if(Yt){Vt.next=62;break}Xt.replace("/problems/".concat(On,"/edit?lastedUpdateTime=").concat(ir())),Vt.next=79;break;case 62:return Vt.next=64,je(On);case 64:if(Mt){Vt.next=78;break}if(!Yt.includes("paperlibrary")){Vt.next=71;break}return Vt.next=68,Object(Et.f)({id:Cr,item_type:xt.a.Program,name:vt.name,question_score:vt.score,difficulty:vt.difficult,sub_discipline_id:vt.sub_discipline_id,tag_discipline_ids:vt.tag_discipline_ids,identifier:Jn});case 68:return Wn=Vt.sent,Wn.status===0&&Xt.replace(Yt),Vt.abrupt("return");case 71:return Vt.next=73,xe(parseInt(Cr,10),{question_type:6,question_score:vt.score,question_title:vt.name,identifier:On,tag_discipline_ids:vt.tag_discipline_ids});case 73:Zn=Vt.sent,zn=Zn.status,zn===0&&Xt.replace(Yt),Vt.next=79;break;case 78:Xt.replace(Yt);case 79:case"end":return Vt.stop()}},ct)})),kr.apply(this,arguments)}function er(){Bt.submit(),setTimeout(Object(D.a)(G.a.mark(function ct(){var ot;return G.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,je(Mt);case 2:ot=wt.sent,ot.status===0?(i.b.success("\u53D1\u5E03\u6210\u529F"),ee({type:At.SET_STATUS,payload:1})):i.b.info(ot.message);case 4:case"end":return wt.stop()}},ct)})),400)}function wr(){return nr.apply(this,arguments)}function nr(){return nr=Object(D.a)(G.a.mark(function ct(){var ot;return G.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,Be(Mt);case 2:ot=wt.sent,ot.status===0?(i.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),ee({type:At.SET_STATUS,payload:0})):i.b.info(ot.message);case 4:case"end":return wt.stop()}},ct)})),nr.apply(this,arguments)}function Cn(){Tt===0?Wt({title:"\u63D0\u793A",content:B.a.createElement(U.Fragment,null," ",B.a.createElement("div",null,"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802")," ",B.a.createElement("div",null," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")," "),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){er()}}):Wt({title:"\u63D0\u793A",content:B.a.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){wr()}})}function Ir(){return Fr.apply(this,arguments)}function Fr(){return Fr=Object(D.a)(G.a.mark(function ct(){return G.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return ut.t0=tr,ut.next=3,Bt.getFieldValue();case 3:ut.t1=ut.sent,(0,ut.t0)(ut.t1,"start"),setTimeout(Object(D.a)(G.a.mark(function wt(){var Nt,st;return G.a.wrap(function(vt){for(;;)switch(vt.prev=vt.next){case 0:return vt.next=2,He(Mt);case 2:Nt=vt.sent,st=Nt.identifier,rn?window.location.href="/myproblems/".concat(st,"?type=1"):window.location.href="/myproblems/".concat(st);case 5:case"end":return vt.stop()}},wt)})),400);case 6:case"end":return ut.stop()}},ct)})),Fr.apply(this,arguments)}function Bn(){if(Yt)Xt.replace(Yt);else if(rn){var ct,ot=(ct=localStorage.getItem("program_homework"))===null||ct===void 0?void 0:ct.split(",");Xt.push("/classrooms/".concat(ot==null?void 0:ot[0],"/program_homework/").concat(ot==null?void 0:ot[1],"/detail"))}else Xt.replace("/problemset")}var Tn=function(ot){var ut=parseInt(Bt.getFieldValue("hack").code_compile_score)||0,wt=Math.floor((100-ut)/ot.length),Nt=wt+(100-ut)%ot.length;ot=ot.map(function(st,Kt){return Kt===ot.length-1?Object(x.a)(Object(x.a)({},st),{},{score:Nt}):Object(x.a)(Object(x.a)({},st),{},{score:wt})}),Yr(ot)};function ui(ct){ct.target.value||Tn(Xr),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack:Object(x.a)(Object(x.a)({},se.hack),{},{test_set_score:ct.target.value})})}})}function Un(ct){ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack:Object(x.a)(Object(x.a)({},se.hack),{},{is_file:ct.target.value})})}})}function _n(ct){rr(ct.target.checked)}function ci(ct){var ot=ct.target.value;ot&&Tn(Xr),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack:Object(x.a)(Object(x.a)({},se.hack),{},{test_set_average:ot})})}})}function vn(){var ct=Bt.getFieldValue("hack_sets"),ot=parseInt(Bt.getFieldValue("hack").code_compile_score)||0,ut=ct.length+1,wt=Math.floor((100-ot)/ut),Nt=(100-ot)%ut;ct.map(function(st,Kt){return kt&&(st.score=wt),st.position=Kt+1,st}),ct.push({input:"",output:"",position:ut,score:kt?wt+Nt:0}),Bt.setFieldsValue({hack_sets:ct}),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack_sets:ct})}})}function di(){var ct=Bt.getFieldValue("hack_sets"),ot=parseInt(Bt.getFieldValue("hack").code_compile_score)||0,ut=ct.length,wt=Math.floor((100-ot)/ut),Nt=(100-ot)%ut;ct.map(function(st,Kt){return kt&&(st.score=wt,Kt===ct.length-1&&(st.score=wt+Nt)),st.position=Kt+1,st}),Bt.setFieldsValue({hack_sets:ct}),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack_sets:ct})}})}Object(U.useEffect)(function(){if(kt){var ct=parseInt(Bt.getFieldValue("hack").code_compile_score)||0,ot=et==null?void 0:et.length,ut=Math.floor((100-ct)/ot),wt=(100-ct)%ot;et==null||et.map(function(Nt,st){return Nt.score=ut,Nt.position=st+1,st===ot-1&&(Nt.score=ut+wt),Nt}),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack_sets:et})}}),Bt.setFieldsValue({hack_sets:et})}},[kt]);function Ti(ct){var ot=Bt.getFieldValue("hack_sets"),ut=parseInt(Bt.getFieldValue("hack").code_compile_score)||0,wt=(ot==null?void 0:ot.length)-1,Nt=Math.floor((100-ut)/wt),st=(100-ut)%wt;ot.splice(ct,1),ot==null||ot.map(function(Kt,vt){return kt&&(Kt.score=Nt,vt===wt-1&&(Kt.score=Nt+st)),Kt.position=vt+1,Kt}),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack_sets:ot})}}),Bt.setFieldsValue({hack_sets:ot})}function Kn(ct){ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack_codes:Object(x.a)(Object(x.a)({},se.hack_codes),{},{language:ct})})}})}var Xi=function(ot){var ut;if(ot!=null&&(ut=ot.hack)!==null&&ut!==void 0&&ut.sub_discipline_id){var wt,Nt,st,Kt,vt,or=ot==null||((wt=ot.hack)===null||wt===void 0)?void 0:wt.sub_discipline_id,ur=Object(b.a)(or,2),xr=ur[0],Dr=ur[1],dn=Ze==null||((Nt=Ze.find(function(sr){return sr.id===xr}))===null||Nt===void 0||((st=Nt.sub_disciplines)===null||st===void 0||((Kt=st.find(function(sr){return sr.id===Dr}))===null||Kt===void 0)))?void 0:Kt.tag_disciplines,Rr=Object(x.a)(Object(x.a)({},Bt.getFieldsValue()),{},{hack:Object(x.a)(Object(x.a)({},(vt=Bt.getFieldsValue())===null||vt===void 0?void 0:vt.hack),{},{tag_discipline_ids:[]})});Bt.setFieldsValue(Rr),mr(Rr)}else mr(Object(x.a)({},Bt.getFieldsValue()))},Lt=function(ot){Dt([].concat(Object(w.a)(nt),[Object(x.a)({},ot)]))};Object(U.useEffect)(function(){var ct,ot;if(se!=null&&(ct=se.hack)!==null&&ct!==void 0&&(ot=ct.sub_discipline_id)!==null&&ot!==void 0&&ot[1]){var ut,wt;Ht(se==null||((ut=se.hack)===null||ut===void 0||((wt=ut.sub_discipline_id)===null||wt===void 0))?void 0:wt[1])}},[se==null||((dt=se.hack)===null||dt===void 0)?void 0:dt.sub_discipline_id]);var Ht=function(){var ct=Object(D.a)(G.a.mark(function ot(ut){var wt;return G.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return st.next=2,Object(ze.I)({sub_discipline_id:ut});case 2:wt=st.sent,Dt(wt.tag_disciplines);case 4:case"end":return st.stop()}},ot)}));return function(ut){return ct.apply(this,arguments)}}();function Ft(ct){var ot=ct[1],ut=oe(Ze,ot),wt=Object(b.a)(ut,2),Nt=wt[1];Bt.setFieldsValue({tags:[]}),ee({type:At.SET_INITAL_DATA,payload:{dicts:Nt,data:Object(x.a)(Object(x.a)({},se),{},{hack:Object(x.a)(Object(x.a)({},se.hack),{},{sub_discipline_id:ct}),tags:[]})}})}var Qt=function(ot){var ut,wt,Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Nt)return function(){ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack:Object(x.a)(Object(x.a)({},se.hack),{},{is_file:!0})})}}),Bt.setFieldsValue({hack:{is_file:!0}})};var st=ot==null?void 0:ot.map(function(Dr){return{input:Dr.input,output:Dr.output,score:0,position:1}}),Kt=(ut=Bt.getFieldValue("hack_sets"))===null||ut===void 0||((wt=ut.filter(function(Dr){return Dr.input||Dr.output}))===null||wt===void 0)?void 0:wt.concat(st),vt=parseInt(Bt.getFieldValue("hack").code_compile_score)||0,or=Kt==null?void 0:Kt.length,ur=Math.floor((100-vt)/or),xr=(100-vt)%or;Kt==null||Kt.map(function(Dr,dn){return kt&&(Dr.score=ur,dn===or-1&&(Dr.score=ur+xr)),Dr.position=dn+1,Dr}),ee({type:At.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},se),{},{hack_sets:Kt,hack:Object(x.a)(Object(x.a)({},se.hack),{},{is_file:!1})})}}),Bt.setFieldsValue({hack_sets:Kt,hack:{is_file:!1}})};return B.a.createElement(n.a,{spinning:ye,delay:500},se?B.a.createElement(U.Fragment,null,B.a.createElement("header",{className:te.a.header},B.a.createElement("div",null,B.a.createElement("img",{src:"".concat(qe.a.IMG_SERVER,"/images/").concat(Pe==null?void 0:Pe.image_url),alt:"user",width:30}),B.a.createElement("span",null,Pe==null?void 0:Pe.name)),B.a.createElement("h2",null," ",se==null?void 0:se.hack.name," "),Mt?B.a.createElement("a",{className:te.a.btn_back,onClick:Bn}," ",B.a.createElement(he.a,null),"\u9000\u51FA"):null),B.a.createElement(c.a,{form:Bt,initialValues:se,layout:"vertical",className:te.a["oj-form-container"],onValuesChange:Xi,onFinish:function(ot,ut){var wt;if(Ct!=null&&(wt=Ct.query)!==null&&wt!==void 0&&wt.exercise&&!Yt.includes("paperlibrary")){L.a.confirm({title:"\u4FDD\u5B58\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u8BD5\u9898\u5E93\u4E2D\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u8BD5\u9898\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",onOk:function(){return tr(ot,ut,1)},onCancel:function(){return tr(ot,ut,0)}});return}tr(ot,ut)}},B.a.createElement(Ge.a,{leftChild:B.a.createElement(St,{onAddTestCases:di,form:Bt,handleAddKnowledgeFinish:Lt,MyGroup:$r,formValue:Gt,knowledgeOptions:nt,onChangeLanguage:Kn,onChangeSubDiscipline:Ft,onRemoveTestCase:Ti,onAddTestCase:vn,dicts:mt,categorys:li,callback_url:Yt,hack:se.hack,onChangeScore:ui,onChangehide:_n,onChangeAverage:ci,onChangeFile:Un,uploadData:Xr,setUploadData:Yr,handleUploadRatio:Tn,ischecked:Ar,isshows:Jr,isProgram:rn,addUploadFnc:Qt,id:Mt}),rightChild:rn?B.a.createElement(c.a.Item,{name:"codes",style:{marginBottom:0}},B.a.createElement(Fe,null)):B.a.createElement(c.a.Item,{name:["hack_codes","code"],style:{marginBottom:0}},B.a.createElement(Ye.a,{language:se.hack_codes.language}))}),B.a.createElement("div",{className:te.a.footer},Mt?B.a.createElement(U.Fragment,null,rn&&B.a.createElement(u.a,{onClick:Bn,type:"primary",ghost:!0},"\u9000\u51FA\u7F16\u8F91"),Yt||rn?null:B.a.createElement(u.a,{type:Tt?"default":"primary",onClick:Cn},Tt?"\u64A4\u9500\u53D1\u5E03":"\u7ACB\u5373\u53D1\u5E03"),B.a.createElement(u.a,{loading:ye,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"),B.a.createElement(u.a,{type:"primary",onClick:Ir},Tt?"\u5F00\u59CB\u6311\u6218":"\u6A21\u62DF\u6311\u6218")):B.a.createElement(U.Fragment,null,B.a.createElement(u.a,{onClick:Bn},"\u53D6\u6D88"),B.a.createElement(u.a,{loading:ye,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"))))):null)};function St(Je){var dt,Ct,Xt,Jt,Mt=Je.form,Pt=Je.onAddTestCases,gt=Je.handleAddKnowledgeFinish,Bt=Je.ischecked,fr=Je.MyGroup,ar=Je.formValue,Gt=Je.knowledgeOptions,mr=Je.categorys,zt=Je.hack,Ur=Je.callback_url,nt=Je.onChangeAverage,Dt=Je.onChangeScore,zr=Je.onChangehide,Pr=Je.onChangeFile,Xr=Je.onAddTestCase,Yr=Je.onRemoveTestCase,ce=Je.onChangeSubDiscipline,K=Je.onChangeLanguage,Y=Je.uploadData,ee=Je.setUploadData,ye=Je.handleUploadRatio,se=Je.isshows,Pe=Je.isProgram,Ze=Je.addUploadFnc,mt=Je.id,Tt=((dt=location)===null||dt===void 0||((Ct=dt.search)===null||Ct===void 0)?void 0:Ct.includes("select"))||!1,et=Object(U.useState)(se),kt=Object(b.a)(et,2),Zt=kt[0],Yt=kt[1],Cr=zt.test_set_average,Tr=zt.test_set_score,_r=Object(U.useState)(!1),en=Object(b.a)(_r,2),Rn=en[0],gr=en[1],$r=function(rr,br){var Or=Object(w.a)(Y);Or.splice(br,1),Cr?ye(Or):ee(Or)},mn=function(rr,br){console.log(rr,br);var Or=Y.map(function(Jr,tn){return tn===br?Object(x.a)(Object(x.a)({},Jr),{},{score:rr.target.value?Number(rr.target.value):0}):Jr});ee(Or)},gn=function(rr){if(!(rr!=null&&rr.length))return;if(rr!=null&&rr[0].is_file){Ze(rr,!0)();var br=Y.concat(rr);zt.test_set_average?ye(br):ee(br)}rr!=null&&rr[0].is_file||Ze(rr)};function jr(Ar){Ar.stopPropagation()}return B.a.createElement("div",{className:te.a["oj-left-panel"]},B.a.createElement("div",{className:te.a["oj-form-info"]},B.a.createElement("div",{className:te.a.field},B.a.createElement(c.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficult"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},B.a.createElement(E.a,{disabled:Tt},ge(Ce.difficult))),B.a.createElement(c.a.Item,{label:"\u8BFE\u7A0B(\u5408\u7406\u7684\u8BFE\u7A0B\u5206\u7C7B\u6709\u5229\u4E8E\u5FEB\u901F\u68C0\u7D22)",name:["hack","sub_discipline_id"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},B.a.createElement(p.a,{disabled:Tt,allowClear:!1,options:mr,placeholder:"\u8BF7\u9009\u62E9",onChange:ce}))),B.a.createElement("div",{className:te.a.field},Ur&&B.a.createElement(c.a.Item,{label:"\u5206\u6570",name:["hack","score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}],extra:B.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u5206")},B.a.createElement(r.a,{disabled:Tt,min:1,max:100})),B.a.createElement(c.a.Item,{label:B.a.createElement("div",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236 ",B.a.createElement("span",{className:"c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)")),name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],extra:B.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u79D2")},B.a.createElement(r.a,{min:3})),Pe?B.a.createElement(c.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack","languages"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},B.a.createElement(s.a.Group,null,B.a.createElement(s.a,{value:"c"},"C"),B.a.createElement(s.a,{value:"c++"},"C++"),B.a.createElement(s.a,{value:"java"},"Java"),B.a.createElement(s.a,{value:"python"},"Python"))):B.a.createElement(c.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack_codes","language"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},B.a.createElement(E.a,{onChange:K},ge(Ce.language)))),B.a.createElement(c.a.Item,{label:B.a.createElement("span",null,"\u77E5\u8BC6\u70B9\uFF1A",B.a.createElement("span",{className:"c-grey-999"},"\uFF08\u6240\u6709\u81EA\u5EFA\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u88ABEduCoder\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u4E3A\u5B98\u65B9\u77E5\u8BC6\u70B9\u540E\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),name:["hack","tag_discipline_ids"]},B.a.createElement(pt.a,{selectvalues:(zt==null?void 0:zt.tag_discipline_id)||(zt==null?void 0:zt.tag_discipline_ids),disabled:Tt,subId:ar==null||((Xt=ar.hack)===null||Xt===void 0||((Jt=Xt.sub_discipline_id)===null||Jt===void 0))?void 0:Jt[1],knowledgeOptions:Gt,onAddKnowledgeFinish:gt})),B.a.createElement(c.a.Item,{label:"\u52A0\u5165\u6587\u4EF6\u5939\u76EE\u5F55",name:["hack","item_banks_group_ids"],labelCol:{span:24},wrapperCol:{span:24}},B.a.createElement(at.a,{disabled:Tt})),B.a.createElement(c.a.Item,{label:"\u4EFB\u52A1\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},B.a.createElement(z.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",suffix:B.a.createElement("span",null,60-zt.name.length)})),B.a.createElement(c.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},B.a.createElement(ie.a,{miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),B.a.createElement("div",{className:"tst-case-info"},B.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," \u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!zt.is_file&&B.a.createElement(u.a,{type:"primary",ghost:!0,onClick:Xr},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),B.a.createElement(c.a.Item,{name:["hack","test_set_score"]},B.a.createElement(C.a.Group,{onChange:Dt},B.a.createElement(C.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",B.a.createElement("span",{className:"tip"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),B.a.createElement(C.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",B.a.createElement("span",{className:"tip"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),B.a.createElement(s.a,{style:{marginBottom:"5px"},checked:Bt,onChange:zr},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),B.a.createElement(c.a.Item,{className:te.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},B.a.createElement(C.a.Group,{onChange:Pr},B.a.createElement(T.a,{direction:"horizontal"},B.a.createElement(C.a,{value:!1},"\u6587\u672C"),B.a.createElement(C.a,{value:!0},"\u6587\u4EF6")))),!zt.test_set_score&&B.a.createElement(c.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},B.a.createElement(C.a.Group,{onChange:nt},B.a.createElement(C.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),B.a.createElement(C.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),!zt.test_set_score&&B.a.createElement("div",{style:{marginBottom:"20px",marginTop:"-10px"}},B.a.createElement("div",{style:{display:"flex",height:"30px",marginBottom:"10px"}},B.a.createElement(s.a,{checked:Zt,style:{display:"flex",alignItems:"center"},className:te.a.checkboxs,onChange:function(rr){Yt(rr.target.checked),Mt.setFieldsValue({hack:{code_compile_score:0}}),zt.test_set_average&&(zt.is_file?ye(Y):Pt())}},"\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"),Zt&&B.a.createElement("span",{style:{display:"flex"}},B.a.createElement(c.a.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7F16\u8BD1\u5F97\u5206"}],name:["hack","code_compile_score"]},B.a.createElement(r.a,{onChange:function(){zt.test_set_average&&(zt.is_file?ye(Y):Pt())},parser:function(rr){return isNaN(parseInt(rr))?"":parseInt(rr)},min:0,max:100,style:{width:"90px",margin:"5px 0px"}}))," ",B.a.createElement("span",{style:{display:"flex",alignItems:"center",marginLeft:"5px"}},"%"))),B.a.createElement("span",{style:{color:"#999",fontSize:"12px",marginLeft:"-8px"}},"\uFF08\u8BF7\u6CE8\u610F\u8BE5\u5B9E\u8BAD\u9898\u662F\u5426\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u82E5\u6CA1\u6709\u5219\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09")),B.a.createElement("div",{className:te.a.upBtn},B.a.createElement(u.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return gr(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),(zt==null?void 0:zt.is_file)&&B.a.createElement(ft.a,{disabled:zt==null?void 0:zt.test_set_average,inputChange:mn,showScore:!zt.test_set_score,data:Y,onRemove:$r})),!zt.is_file&&B.a.createElement(c.a.List,{name:"hack_sets"},function(Ar,rr){return Object(S.a)(rr),B.a.createElement(j.a,{accordion:!0},Ar.map(function(br,Or){return B.a.createElement(It,{key:"".concat(br.key,"--").concat(Or),header:B.a.createElement("a",{className:te.a["test-case-name"]},B.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Or+1,"\b"),Tr?null:B.a.createElement(B.a.Fragment,null,B.a.createElement(c.a.Item,{name:[br.name,"score"],fieldKey:[br.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Or+1,"\u8BC4\u5206")}]},B.a.createElement(r.a,{onClick:jr,min:0,max:100,disabled:Cr})),B.a.createElement("span",null,"%"))),extra:Or>0?B.a.createElement("div",{onClick:jr},B.a.createElement(m.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Or+1),onConfirm:function(){Yr(Or)}},B.a.createElement(Q.a,{className:te.a["btn-remove-case"]}))):null},B.a.createElement(c.a.Item,{label:"\u8F93\u5165",name:[br.name,"input"],fieldKey:[br.fieldKey,"input"]},B.a.createElement(lt,null)),B.a.createElement(c.a.Item,{label:"\u8F93\u51FA",name:[br.name,"output"],fieldKey:[br.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},B.a.createElement(lt,null)))}))}))),B.a.createElement(ft.b,{rootIdentifier:mt,visible:Rn,onClose:function(){return gr(!1)},onOK:gn,multiple:!0,defaultMultipleValue:zt==null?void 0:zt.is_file}))}},PVpz:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,S=m.lib,R=S.StreamCipher,T=m.algo,g=[],C=[],h=[],s=T.RabbitLegacy=R.extend({_doReset:function(){var r=this._key.words,f=this.cfg.iv,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],d=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 E=0;E<4;E++)a.call(this);for(var E=0;E<8;E++)d[E]^=p[E+4&7];if(f){var y=f.words,l=y[0],n=y[1],o=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w=o>>>16|u&4294901760,v=u<<16|o&65535;d[0]^=o,d[1]^=w,d[2]^=u,d[3]^=v,d[4]^=o,d[5]^=w,d[6]^=u,d[7]^=v;for(var E=0;E<4;E++)a.call(this)}},_doProcessBlock:function(r,f){var p=this._X;a.call(this),g[0]=p[0]^p[5]>>>16^p[3]<<16,g[1]=p[2]^p[7]>>>16^p[5]<<16,g[2]=p[4]^p[1]>>>16^p[7]<<16,g[3]=p[6]^p[3]>>>16^p[1]<<16;for(var d=0;d<4;d++)g[d]=(g[d]<<8|g[d]>>>24)&16711935|(g[d]<<24|g[d]>>>8)&4278255360,r[f+d]^=g[d]},blockSize:128/32,ivSize:64/32});function a(){for(var r=this._X,f=this._C,p=0;p<8;p++)C[p]=f[p];f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0;for(var p=0;p<8;p++){var d=r[p]+f[p],E=d&65535,y=d>>>16,l=((E*E>>>17)+E*y>>>15)+y*y,n=((d&4294901760)*d|0)+((d&65535)*d|0);h[p]=l^n}r[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,r[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,r[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,r[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,r[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,r[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,r[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,r[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}m.RabbitLegacy=R._createHelper(s)}(),P.RabbitLegacy})},RELg:function(I,q,N){var P=N("MFOe"),m=P.Global;I.exports={name:"oldIE-userDataStorage",write:C,read:h,each:s,remove:a,clearAll:r};var S="storejs",R=m.document,T=d(),g=(m.navigator?m.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(E,y){if(g)return;var l=p(E);T(function(n){n.setAttribute(l,y),n.save(S)})}function h(E){if(g)return;var y=p(E),l=null;return T(function(n){l=n.getAttribute(y)}),l}function s(E){T(function(y){for(var l=y.XMLDocument.documentElement.attributes,n=l.length-1;n>=0;n--){var o=l[n];E(y.getAttribute(o.name),o.name)}})}function a(E){var y=p(E);T(function(l){l.removeAttribute(y),l.save(S)})}function r(){T(function(E){var y=E.XMLDocument.documentElement.attributes;E.load(S);for(var l=y.length-1;l>=0;l--)E.removeAttribute(y[l].name);E.save(S)})}var f=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(E){return E.replace(/^\d/,"___$&").replace(f,"___")}function d(){if(!R||!R.documentElement||!R.documentElement.addBehavior)return null;var E="script",y,l,n;try{l=new ActiveXObject("htmlfile"),l.open(),l.write("<"+E+">document.w=window"+E+'>'),l.close(),y=l.w.frames[0].document,n=y.createElement("div")}catch(o){n=R.createElement("div"),y=R.body}return function(o){var u=[].slice.call(arguments,0);u.unshift(n),y.appendChild(n),n.addBehavior("#default#userData"),n.load(S),o.apply(this,u),y.removeChild(n);return}}},RxwV:function(I,q,N){"use strict";var P=N("q1tI"),m=N("uciX"),S=N("2W6z"),R=N.n(S),T=N("4IlW"),g=N("uK0f"),C=N.n(g);function h(ge,pe){if(ge===pe)return!0;if(!ge||!pe)return!1;var oe=ge.length;if(pe.length!==oe)return!1;for(var ae=0;ae0;(Be||he.isLeaf===!1)&&(_e+=" ".concat(we,"-menu-item-expand"),he.loading||(je=P.createElement("span",{className:"".concat(we,"-menu-item-expand-icon")},J))),ne==="hover"&&(Be||he.isLeaf===!1)&&(xe={onMouseEnter:this.delayOnSelect.bind(this,Z),onMouseLeave:this.delayOnSelect.bind(this),onClick:Z}),this.isActiveOption(he,Q)&&(_e+=" ".concat(we,"-menu-item-active"),xe.ref=this.saveMenuItem(Q)),he.disabled&&(_e+=" ".concat(we,"-menu-item-disabled"));var He=null;he.loading&&(_e+=" ".concat(we,"-menu-item-loading"),He=V||null);var Ue="";return"title"in he?Ue=he.title:typeof he[this.getFieldName("label")]=="string"&&(Ue=he[this.getFieldName("label")]),P.createElement("li",Object.assign({key:he[this.getFieldName("value")],className:_e,title:Ue},xe,{role:"menuitem",onMouseDown:function(Ge){return Ge.preventDefault()}}),he[this.getFieldName("label")],je,He)}},{key:"getActiveOptions",value:function(he){var Q=this,ie=this.props.options,we=he||this.props.activeValue;return C()(ie,function(ne,J){return ne[Q.getFieldName("value")]===we[J]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var he=this,Q=this.props.options,ie=this.getActiveOptions().map(function(we){return we[he.getFieldName("children")]}).filter(function(we){return!!we});return ie.unshift(Q),ie}},{key:"delayOnSelect",value:function(he){for(var Q=this,ie=arguments.length,we=new Array(ie>1?ie-1:0),ne=1;ne=0)continue;if(!Object.prototype.propertyIsEnumerable.call(ge,ae))continue;oe[ae]=ge[ae]}}return oe}function c(ge,pe){if(ge==null)return{};var oe={},ae=Object.keys(ge),re,he;for(he=0;he=0)continue;oe[re]=ge[re]}return oe}function b(ge){return F(ge)||j(ge)||_(ge)||x()}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(ge,pe){if(!ge)return;if(typeof ge=="string")return L(ge,pe);var oe=Object.prototype.toString.call(ge).slice(8,-1);if(oe==="Object"&&ge.constructor&&(oe=ge.constructor.name),oe==="Map"||oe==="Set")return Array.from(ge);if(oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(oe))return L(ge,pe)}function j(ge){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(ge))return Array.from(ge)}function F(ge){if(Array.isArray(ge))return L(ge)}function L(ge,pe){(pe==null||pe>ge.length)&&(pe=ge.length);for(var oe=0,ae=new Array(pe);oe=V.length?0:Ee):(Ee-=1,Ee=Ee<0?V.length-1:Ee):Ee=0,ne[J]=V[Ee][he.getFieldName("value")]}else if(ie.keyCode===T.a.LEFT||ie.keyCode===T.a.BACKSPACE)ie.preventDefault(),ne.splice(ne.length-1,1);else if(ie.keyCode===T.a.RIGHT)ie.preventDefault(),V[Z]&&V[Z][he.getFieldName("children")]&&ne.push(V[Z][he.getFieldName("children")][0][he.getFieldName("value")]);else if(ie.keyCode===T.a.ESC||ie.keyCode===T.a.TAB){he.setPopupVisible(!1);return}(!ne||ne.length===0)&&he.setPopupVisible(!1);var xe=he.getActiveOptions(ne),_e=xe[xe.length-1];he.handleMenuSelect(_e,xe.length-1,ie),he.props.onKeyDown&&he.props.onKeyDown(ie)},he.saveTrigger=function(ie){he.trigger=ie};var Q=[];return"value"in re?Q=re.value||[]:"defaultValue"in re&&(Q=re.defaultValue||[]),R()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),he.state={popupVisible:re.popupVisible,activeValue:Q,value:Q,prevProps:re},he.defaultFieldNames={label:"label",value:"value",children:"children"},he}return H(ae,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(he){var Q=this.defaultFieldNames,ie=this.props,we=ie.fieldNames,ne=ie.filedNames;return"filedNames"in this.props?ne[he]||Q[he]:we[he]||Q[he]}},{key:"getFieldNames",value:function(){var he=this.props,Q=he.fieldNames,ie=he.filedNames;return"filedNames"in this.props?ie:Q}},{key:"getCurrentLevelOptions",value:function(){var he=this,Q=this.props.options,ie=Q===void 0?[]:Q,we=this.state.activeValue,ne=we===void 0?[]:we,J=C()(ie,function(V,Z){return V[he.getFieldName("value")]===ne[Z]},{childrenKeyName:this.getFieldName("children")});return J[J.length-2]?J[J.length-2][this.getFieldName("children")]:b(ie).filter(function(V){return!V.disabled})}},{key:"getActiveOptions",value:function(he){var Q=this;return C()(this.props.options||[],function(ie,we){return ie[Q.getFieldName("value")]===he[we]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var he=this.props,Q=he.prefixCls,ie=he.transitionName,we=he.popupClassName,ne=he.options,J=ne===void 0?[]:ne,V=he.disabled,Z=he.builtinPlacements,Ee=he.popupPlacement,xe=he.children,_e=he.dropdownRender,je=k(he,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Be=P.createElement("div",null),He="";J&&J.length>0?Be=P.createElement(w,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):He=" ".concat(Q,"-menus-empty");var Ue=Be;return _e&&(Ue=_e(Be)),P.createElement(m.a,Object.assign({ref:this.saveTrigger},je,{popupPlacement:Ee,builtinPlacements:Z,popupTransitionName:ie,action:V?[]:["click"],popupVisible:V?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(Q,"-menus"),popupClassName:we+He,popup:Ue}),P.cloneElement(xe,{onKeyDown:this.handleKeyDown,tabIndex:V?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(he,Q){var ie=Q.prevProps,we=ie===void 0?{}:ie,ne={prevProps:he};return"value"in he&&!h(we.value,he.value)&&(ne.value=he.value||[],"loadData"in he||(ne.activeValue=he.value||[])),"popupVisible"in he&&(ne.popupVisible=he.popupVisible),ne}}]),ae}(P.Component);return ge.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:i,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},ge}(),Ce=be,ue=q.a=Ce},S6kV:function(I,q,N){(function(P,m,S){I.exports=q=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.OFB=function(){var m=P.lib.BlockCipherMode.extend(),S=m.Encryptor=m.extend({processBlock:function(R,T){var g=this._cipher,C=g.blockSize,h=this._iv,s=this._keystream;h&&(s=this._keystream=h.slice(0),this._iv=void 0),g.encryptBlock(s,0);for(var a=0;a|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ne){for(var J=0,V=!1,Z=!1,Ee=0,xe=ne.length;Ee122||(Te<65||Le>90||tt.push([Math.max(65,Le)|32,Math.min(Te,90)|32]),Te<97||Le>122||tt.push([Math.max(97,Le)&~32,Math.min(Te,122)&~32]))}}tt.sort(function(Fe,Xe){return Fe[0]-Xe[0]||Xe[1]-Fe[1]});for(var Ae=[],ke=[],$e=0;$eMe[0]&&(Me[1]+1>Me[0]&&We.push("-"),We.push(He(Me[1])))}return We.push("]"),We.join("")}function ze(Ye){for(var Re=Ye.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")),tt=Re.length,rt=[],We=0,$e=0;We=2&&Le==="["?Re[We]=Ue(Ie):Le!=="\\"&&(Re[We]=Ie.replace(/[a-zA-Z]/g,function(ke){var Me=ke.charCodeAt(0);return"["+String.fromCharCode(Me&~32,Me|32)+"]"}))}return Re.join("")}for(var Ge=[],Ee=0,xe=ne.length;Ee=0;)V[Ge.charAt(Ye)]=ze;var Re=ze[1],tt=""+Re;Be.hasOwnProperty(tt)||(je.push(Re),Be[tt]=null)}je.push(/[\0-\uffff]/),Z=U(je)})();var Ee=J.length,xe=function(_e){for(var je=_e.sourceCode,Be=_e.basePos,He=_e.sourceNode,Ue=[Be,_],ze=0,Ge=je.match(Z)||[],Ye={},Re=0,tt=Ge.length;Re=5&&We.substring(0,5)==="lang-",Ie&&!($e&&typeof $e[1]=="string")&&(Ie=!1,We=L),Ie||(Ye[rt]=We)}var Te=ze;if(ze+=rt.length,!Ie)Ue.push(Be+Te,We);else{var Ae=$e[1],ke=rt.indexOf(Ae),Me=ke+Ae.length;$e[2]&&(Me=rt.length-$e[2].length,ke=Me-Ae.length);var Fe=We.substring(5);W(He,Be+Te,rt.substring(0,ke),xe,Ue),W(He,Be+Te+ke,Ae,ae(Fe,Ae),Ue),W(He,Be+Te+Me,rt.substring(Me),xe,Ue)}}_e.decorations=Ue};return xe}function be(ne){var J=[],V=[];ne.tripleQuotedStrings?J.push([i,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?J.push([i,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([i,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&V.push([i,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=ne.hashComments;Z&&(ne.cStyleComments?(Z>1?J.push([k,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([k,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),V.push([i,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([k,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(V.push([k,/^\/\/[^\r\n]*/,null]),V.push([k,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ee=ne.regexLiterals;if(Ee){var xe=Ee>1?"":`
\r`,_e=xe?".":"[\\S\\s]",je="/(?=[^/*"+xe+"])(?:[^/\\x5B\\x5C"+xe+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+xe+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";V.push(["lang-regex",RegExp("^"+G+"("+je+")")])}var Be=ne.types;Be&&V.push([c,Be]);var He=(""+ne.keywords).replace(/^ | $/g,"");He.length&&V.push([D,new RegExp("^(?:"+He.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([_,/^\s+/,null,` \r
\xA0`]);var Ue="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(Ue+="(?!s*/)"),V.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[_,/^\\[\s\S]?/,null],[x,new RegExp(Ue),null]),fe(J,V)}var Ce=be({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ue(ne,J,V){for(var Z=/(?:^|\s)nocode(?:\s|$)/,Ee=/\r\n?|\n/,xe=ne.ownerDocument,_e=xe.createElement("li");ne.firstChild;)_e.appendChild(ne.firstChild);var je=[_e];function Be(Re){var tt=Re.nodeType;if(tt==1&&!Z.test(Re.className))if(Re.nodeName==="br")He(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var rt=Re.firstChild;rt;rt=rt.nextSibling)Be(rt);else if((tt==3||tt==4)&&V){var We=Re.nodeValue,$e=We.match(Ee);if($e){var Ie=We.substring(0,$e.index);Re.nodeValue=Ie;var Oe=We.substring($e.index+$e[0].length);if(Oe){var Le=Re.parentNode;Le.insertBefore(xe.createTextNode(Oe),Re.nextSibling)}He(Re),Ie||Re.parentNode.removeChild(Re)}}}function He(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function tt($e,Ie){var Oe=Ie?$e.cloneNode(!1):$e,Le=$e.parentNode;if(Le){var Te=tt(Le,1),Ae=$e.nextSibling;Te.appendChild(Oe);for(var ke=Ae;ke;ke=Ae)Ae=ke.nextSibling,Te.appendChild(ke)}return Oe}for(var rt=tt(Re.nextSibling,0),We;(We=rt.parentNode)&&We.nodeType===1;)rt=We;je.push(rt)}for(var Ue=0;Ue=Le&&(Be+=2),xe>=Te&&(ze+=2)}}finally{We&&(We.style.display=$e)}}var pe={};function oe(ne,J){for(var V=J.length;--V>=0;){var Z=J[V];pe.hasOwnProperty(Z)?h.console&&console.warn("cannot override language handler %s",Z):pe[Z]=ne}}function ae(ne,J){return ne&&pe.hasOwnProperty(ne)||(ne=/^\s*]*(?:>|$)/],[k,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[x,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^