(window.webpackJsonp=window.webpackJsonp||[]).push([[118,5,6,7,8,10,16],{"+NIl":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(d,T){"use strict";function D(c,m){c.cmdState.push(m)}function u(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function p(c){var m=c.cmdState.pop();m&&m.closeBracket()}function C(c){for(var m=c.cmdState,_=m.length-1;_>=0;_--){var y=m[_];if(y.name=="DEFAULT")continue;return y}return{styleIdentifier:function(){return null}}}function E(c,m,_){return function(){this.name=c,this.bracketNo=0,this.style=m,this.styles=_,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=E("importmodule","tag",["string","builtin"]),l.documentclass=E("documentclass","tag",["","atom"]),l.usepackage=E("usepackage","tag",["atom"]),l.begin=E("begin","tag",["atom"]),l.end=E("end","tag",["atom"]),l.label=E("label","tag",["atom"]),l.ref=E("ref","tag",["atom"]),l.eqref=E("eqref","tag",["atom"]),l.cite=E("cite","tag",["atom"]),l.bibitem=E("bibitem","tag",["atom"]),l.Bibitem=E("Bibitem","tag",["atom"]),l.RBibitem=E("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function s(c,m){c.f=m}function n(c,m){var _;if(c.match(/^\\[a-zA-Z@]+/)){var y=c.current().slice(1);return _=l.hasOwnProperty(y)?l[y]:l.DEFAULT,_=new _,D(m,_),s(m,f),_.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return s(m,function(a,t){return h(a,t,"\\]")}),"keyword";if(c.match("\\("))return s(m,function(a,t){return h(a,t,"\\)")}),"keyword";if(c.match("$$"))return s(m,function(a,t){return h(a,t,"$$")}),"keyword";if(c.match("$"))return s(m,function(a,t){return h(a,t,"$")}),"keyword";var i=c.next();if(i=="%")return c.skipToEnd(),"comment";if(i=="}"||i=="]"){if(_=u(m),_)_.closeBracket(i),s(m,f);else return"error";return"bracket"}else return i=="{"||i=="["?(_=l.DEFAULT,_=new _,D(m,_),"bracket"):/\d/.test(i)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),_=C(m),_.name=="begin"&&(_.argument=c.current()),_.styleIdentifier())}function h(c,m,_){if(c.eatSpace())return null;if(_&&c.match(_))return s(m,n),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var y=c.next();return y=="{"||y=="}"||y=="["||y=="]"||y=="("||y==")"?"bracket":y=="%"?(c.skipToEnd(),"comment"):"error"}function f(c,m){var _=c.peek(),y;return _=="{"||_=="["?(y=u(m),y.openBracket(_),c.eat(_),s(m,n),"bracket"):/[ \t\r]/.test(_)?(c.eat(_),null):(s(m,n),p(m),n(c,m))}return{startState:function(){var c=T.inMathMode?function(m,_){return h(m,_)}:n;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,m){return m.f(c,m)},blankLine:function(c){c.f=n,c.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){P.defineOption("placeholder","",function(E,l,s){var n=s&&s!=P.Init;if(l&&!n)E.on("blur",u),E.on("change",p),E.on("swapDoc",p),P.on(E.getInputField(),"compositionupdate",E.state.placeholderCompose=function(){D(E)}),p(E);else if(!l&&n){E.off("blur",u),E.off("change",p),E.off("swapDoc",p),P.off(E.getInputField(),"compositionupdate",E.state.placeholderCompose),d(E);var h=E.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}l&&!E.hasFocus()&&u(E)});function d(E){E.state.placeholder&&(E.state.placeholder.parentNode.removeChild(E.state.placeholder),E.state.placeholder=null)}function T(E){d(E);var l=E.state.placeholder=document.createElement("pre");l.style.cssText="height: 0; overflow: visible",l.style.direction=E.getOption("direction"),l.className="CodeMirror-placeholder CodeMirror-line-like";var s=E.getOption("placeholder");typeof s=="string"&&(s=document.createTextNode(s)),l.appendChild(s),E.display.lineSpace.insertBefore(l,E.display.lineSpace.firstChild)}function D(E){setTimeout(function(){var l=!1,s=E.getInputField();s.nodeName=="TEXTAREA"?l=!s.value:E.lineCount()==1&&(l=!/[^\u200b]/.test(s.querySelector(".CodeMirror-line").textContent)),l?T(E):d(E)},20)}function u(E){C(E)&&T(E)}function p(E){var l=E.getWrapperElement(),s=C(E);l.className=l.className.replace(" CodeMirror-empty","")+(s?" CodeMirror-empty":""),s?T(E):d(E)}function C(E){return E.lineCount()===1&&E.getLine(0)===""}})},"1ZF9":function(j,Z,L){j.exports=L.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){"use strict";var d={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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(D,u){var p=D.indentUnit,C={},E=u.htmlMode?d:T;for(var l in E)C[l]=E[l];for(var l in u)C[l]=u[l];var s,n;function h(w,M){function N(z){return M.tokenize=z,z(w,M)}var I=w.next();if(I=="<")return w.eat("!")?w.eat("[")?w.match("CDATA[")?N(m("atom","]]>")):null:w.match("--")?N(m("comment","-->")):w.match("DOCTYPE",!0,!0)?(w.eatWhile(/[\w\._\-]/),N(_(1))):null:w.eat("?")?(w.eatWhile(/[\w\._\-]/),M.tokenize=m("meta","?>"),"meta"):(s=w.eat("/")?"closeTag":"openTag",M.tokenize=f,"tag bracket");if(I=="&"){var G;return w.eat("#")?w.eat("x")?G=w.eatWhile(/[a-fA-F\d]/)&&w.eat(";"):G=w.eatWhile(/[\d]/)&&w.eat(";"):G=w.eatWhile(/[\w\.\-:]/)&&w.eat(";"),G?"atom":"error"}else return w.eatWhile(/[^&<]/),null}h.isInText=!0;function f(w,M){var N=w.next();if(N==">"||N=="/"&&w.eat(">"))return M.tokenize=h,s=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return s="equals",null;if(N=="<"){M.tokenize=h,M.state=t,M.tagName=M.tagStart=null;var I=M.tokenize(w,M);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=c(N),M.stringStartCol=w.column(),M.tokenize(w,M)):(w.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(w){var M=function(N,I){for(;!N.eol();)if(N.next()==w){I.tokenize=f;break}return"string"};return M.isInAttribute=!0,M}function m(w,M){return function(N,I){for(;!N.eol();){if(N.match(M)){I.tokenize=h;break}N.next()}return w}}function _(w){return function(M,N){for(var I;(I=M.next())!=null;){if(I=="<")return N.tokenize=_(w+1),N.tokenize(M,N);if(I==">")if(w==1){N.tokenize=h;break}else return N.tokenize=_(w-1),N.tokenize(M,N)}return"meta"}}function y(w,M,N){this.prev=w.context,this.tagName=M,this.indent=w.indented,this.startOfLine=N,(C.doNotIndent.hasOwnProperty(M)||w.context&&w.context.noIndent)&&(this.noIndent=!0)}function i(w){w.context&&(w.context=w.context.prev)}function a(w,M){for(var N;;){if(!w.context)return;if(N=w.context.tagName,!C.contextGrabbers.hasOwnProperty(N)||!C.contextGrabbers[N].hasOwnProperty(M))return;i(w)}}function t(w,M,N){return w=="openTag"?(N.tagStart=M.column(),S):w=="closeTag"?x:t}function S(w,M,N){return w=="word"?(N.tagName=M.current(),n="tag",O):C.allowMissingTagName&&w=="endTag"?(n="tag bracket",O(w,M,N)):(n="error",S)}function x(w,M,N){if(w=="word"){var I=M.current();return N.context&&N.context.tagName!=I&&C.implicitlyClosed.hasOwnProperty(N.context.tagName)&&i(N),N.context&&N.context.tagName==I||C.matchClosing===!1?(n="tag",o):(n="tag error",k)}else return C.allowMissingTagName&&w=="endTag"?(n="tag bracket",o(w,M,N)):(n="error",k)}function o(w,M,N){return w!="endTag"?(n="error",o):(i(N),t)}function k(w,M,N){return n="error",o(w,M,N)}function O(w,M,N){if(w=="word")return n="attribute",b;if(w=="endTag"||w=="selfcloseTag"){var I=N.tagName,G=N.tagStart;return N.tagName=N.tagStart=null,w=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(I)?a(N,I):(a(N,I),N.context=new y(N,I,G==N.indented)),t}return n="error",O}function b(w,M,N){return w=="equals"?v:(C.allowMissing||(n="error"),O(w,M,N))}function v(w,M,N){return w=="string"?g:w=="word"&&C.allowUnquoted?(n="string",O):(n="error",O(w,M,N))}function g(w,M,N){return w=="string"?g:O(w,M,N)}return{startState:function(w){var M={tokenize:h,state:t,indented:w||0,tagName:null,tagStart:null,context:null};return w!=null&&(M.baseIndent=w),M},token:function(w,M){if(!M.tagName&&w.sol()&&(M.indented=w.indentation()),w.eatSpace())return null;s=null;var N=M.tokenize(w,M);return(N||s)&&N!="comment"&&(n=null,M.state=M.state(s||N,w,M),n&&(N=n=="error"?N+" error":n)),N},indent:function(w,M,N){var I=w.context;if(w.tokenize.isInAttribute)return w.tagStart==w.indented?w.stringStartCol+1:w.indented+p;if(I&&I.noIndent)return P.Pass;if(w.tokenize!=f&&w.tokenize!=h)return N?N.match(/^(\s*)/)[0].length:0;if(w.tagName)return C.multilineTagIndentPastTag!==!1?w.tagStart+w.tagName.length+2:w.tagStart+p*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(w){w.state==v&&(w.state=O)},xmlCurrentTag:function(w){return w.tagName?{name:w.tagName,close:w.type=="closeTag"}:null},xmlCurrentContext:function(w){for(var M=[],N=w.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.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(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("MlIO"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.Hasher,u=d.x64,p=u.Word,C=u.WordArray,E=d.algo;function l(){return p.create.apply(p,arguments)}var s=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],n=[];(function(){for(var f=0;f<80;f++)n[f]=l()})();var h=E.SHA512=D.extend({_doReset:function(){this._hash=new C.init([new p.init(1779033703,4089235720),new p.init(3144134277,2227873595),new p.init(1013904242,4271175723),new p.init(2773480762,1595750129),new p.init(1359893119,2917565137),new p.init(2600822924,725511199),new p.init(528734635,4215389547),new p.init(1541459225,327033209)])},_doProcessBlock:function(f,c){for(var m=this._hash.words,_=m[0],y=m[1],i=m[2],a=m[3],t=m[4],S=m[5],x=m[6],o=m[7],k=_.high,O=_.low,b=y.high,v=y.low,g=i.high,w=i.low,M=a.high,N=a.low,I=t.high,G=t.low,z=S.high,H=S.low,K=x.high,U=x.low,B=o.high,V=o.low,ae=k,he=O,pe=b,Re=v,ke=g,ve=w,Te=M,be=N,ue=I,le=G,re=z,fe=H,q=K,ee=U,Ce=B,te=V,J=0;J<80;J++){var X,Q,Ee=n[J];if(J<16)Q=Ee.high=f[c+J*2]|0,X=Ee.low=f[c+J*2+1]|0;else{var ge=n[J-15],Oe=ge.high,Qe=ge.low,rt=(Oe>>>1|Qe<<31)^(Oe>>>8|Qe<<24)^Oe>>>7,nt=(Qe>>>1|Oe<<31)^(Qe>>>8|Oe<<24)^(Qe>>>7|Oe<<25),ut=n[J-2],dt=ut.high,mt=ut.low,He=(dt>>>19|mt<<13)^(dt<<3|mt>>>29)^dt>>>6,De=(mt>>>19|dt<<13)^(mt<<3|dt>>>29)^(mt>>>6|dt<<26),at=n[J-7],ht=at.high,Ze=at.low,st=n[J-16],Ue=st.high,Me=st.low;X=nt+Ze,Q=rt+ht+(X>>>0>>0?1:0),X=X+De,Q=Q+He+(X>>>0>>0?1:0),X=X+Me,Q=Q+Ue+(X>>>0>>0?1:0),Ee.high=Q,Ee.low=X}var Ne=ue&re^~ue&q,xe=le&fe^~le&ee,Se=ae&pe^ae&ke^pe&ke,Ae=he&Re^he&ve^Re&ve,Le=(ae>>>28|he<<4)^(ae<<30|he>>>2)^(ae<<25|he>>>7),Je=(he>>>28|ae<<4)^(he<<30|ae>>>2)^(he<<25|ae>>>7),Ve=(ue>>>14|le<<18)^(ue>>>18|le<<14)^(ue<<23|le>>>9),gt=(le>>>14|ue<<18)^(le>>>18|ue<<14)^(le<<23|ue>>>9),yt=s[J],Bt=yt.high,Nt=yt.low,mr=te+gt,hr=Ce+Ve+(mr>>>0>>0?1:0),mr=mr+xe,hr=hr+Ne+(mr>>>0>>0?1:0),mr=mr+Nt,hr=hr+Bt+(mr>>>0>>0?1:0),mr=mr+X,hr=hr+Q+(mr>>>0>>0?1:0),St=Je+Ae,$r=Le+Se+(St>>>0>>0?1:0);Ce=q,te=ee,q=re,ee=fe,re=ue,fe=le,le=be+mr|0,ue=Te+hr+(le>>>0>>0?1:0)|0,Te=ke,be=ve,ke=pe,ve=Re,pe=ae,Re=he,he=mr+St|0,ae=hr+$r+(he>>>0>>0?1:0)|0}O=_.low=O+he,_.high=k+ae+(O>>>0>>0?1:0),v=y.low=v+Re,y.high=b+pe+(v>>>0>>0?1:0),w=i.low=w+ve,i.high=g+ke+(w>>>0>>0?1:0),N=a.low=N+be,a.high=M+Te+(N>>>0>>0?1:0),G=t.low=G+le,t.high=I+ue+(G>>>0>>0?1:0),H=S.low=H+fe,S.high=z+re+(H>>>0>>0?1:0),U=x.low=U+ee,x.high=K+q+(U>>>0>>0?1:0),V=o.low=V+te,o.high=B+Ce+(V>>>0>>0?1:0)},_doFinalize:function(){var f=this._data,c=f.words,m=this._nDataBytes*8,_=f.sigBytes*8;c[_>>>5]|=128<<24-_%32,c[(_+128>>>10<<5)+30]=Math.floor(m/4294967296),c[(_+128>>>10<<5)+31]=m,f.sigBytes=c.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=D.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});d.SHA512=D._createHelper(h),d.HmacSHA512=D._createHmacHelper(h)}(),P.SHA512})},"3y9D":function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=T.Hasher,p=d.algo,C=[],E=p.SHA1=u.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,s){for(var n=this._hash.words,h=n[0],f=n[1],c=n[2],m=n[3],_=n[4],y=0;y<80;y++){if(y<16)C[y]=l[s+y]|0;else{var i=C[y-3]^C[y-8]^C[y-14]^C[y-16];C[y]=i<<1|i>>>31}var a=(h<<5|h>>>27)+_+C[y];y<20?a+=(f&c|~f&m)+1518500249:y<40?a+=(f^c^m)+1859775393:y<60?a+=(f&c|f&m|c&m)-1894007588:a+=(f^c^m)-899497514,_=m,m=c,c=f<<30|f>>>2,f=h,h=a}n[0]=n[0]+h|0,n[1]=n[1]+f|0,n[2]=n[2]+c|0,n[3]=n[3]+m|0,n[4]=n[4]+_|0},_doFinalize:function(){var l=this._data,s=l.words,n=this._nDataBytes*8,h=l.sigBytes*8;return s[h>>>5]|=128<<24-h%32,s[(h+64>>>9<<4)+14]=Math.floor(n/4294967296),s[(h+64>>>9<<4)+15]=n,l.sigBytes=s.length*4,this._process(),this._hash},clone:function(){var l=u.clone.call(this);return l._hash=this._hash.clone(),l}});d.SHA1=u._createHelper(E),d.HmacSHA1=u._createHmacHelper(E)}(),P.SHA1})},4:function(j,Z){},"55Ip":function(j,Z,L){"use strict";L.d(Z,"a",function(){return a}),L.d(Z,"b",function(){return O});var P=L("Ty5D"),d=L("dI71"),T=L("q1tI"),D=L.n(T),u=L("YS25"),p=L("17x9"),C=L.n(p),E=L("wx14"),l=L("zLVn"),s=L("9R94"),n=function(v){Object(d.a)(g,v);function g(){for(var M,N=arguments.length,I=new Array(N),G=0;G>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var x=y[a];x.high^=S,x.low^=t}for(var o=0;o<24;o++){for(var k=0;k<5;k++){for(var O=0,b=0,v=0;v<5;v++){var x=y[k+5*v];O^=x.high,b^=x.low}var g=f[k];g.high=O,g.low=b}for(var k=0;k<5;k++)for(var w=f[(k+4)%5],M=f[(k+1)%5],N=M.high,I=M.low,O=w.high^(N<<1|I>>>31),b=w.low^(I<<1|N>>>31),v=0;v<5;v++){var x=y[k+5*v];x.high^=O,x.low^=b}for(var G=1;G<25;G++){var O,b,x=y[G],z=x.high,H=x.low,K=s[G];K<32?(O=z<>>32-K,b=H<>>32-K):(O=H<>>64-K,b=z<>>64-K);var U=f[n[G]];U.high=O,U.low=b}var B=f[0],V=y[0];B.high=V.high,B.low=V.low;for(var k=0;k<5;k++)for(var v=0;v<5;v++){var G=k+5*v,x=y[G],ae=f[G],he=f[(k+1)%5+5*v],pe=f[(k+2)%5+5*v];x.high=ae.high^~he.high&pe.high,x.low=ae.low^~he.low&pe.low}var x=y[0],Re=h[o];x.high^=Re.high,x.low^=Re.low}},_doFinalize:function(){var m=this._data,_=m.words,y=this._nDataBytes*8,i=m.sigBytes*8,a=this.blockSize*32;_[i>>>5]|=1<<24-i%32,_[(d.ceil((i+1)/a)*a>>>5)-1]|=128,m.sigBytes=_.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,x=S/8,o=[],k=0;k>>24)&16711935|(b<<24|b>>>8)&4278255360,v=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,o.push(v),o.push(b)}return new u.init(o,S)},clone:function(){for(var m=p.clone.call(this),_=m._state=this._state.slice(0),y=0;y<25;y++)_[y]=_[y].clone();return m}});T.SHA3=p._createHelper(c),T.HmacSHA3=p._createHmacHelper(c)}(Math),P.SHA3})},"6+eU":function(j,Z,L){"use strict";L.d(Z,"a",function(){return o});var P=L("wx14"),d=L("rePB"),T=L("VTBJ"),D=L("1OyB"),u=L("vuIU"),p=L("Ji7U"),C=L("LK+K"),E=L("q1tI"),l=L.n(E),s=L("TSYQ"),n=L.n(s),h=function(O){var b,v="".concat(O.rootPrefixCls,"-item"),g=n()(v,"".concat(v,"-").concat(O.page),(b={},Object(d.a)(b,"".concat(v,"-active"),O.active),Object(d.a)(b,O.className,!!O.className),Object(d.a)(b,"".concat(v,"-disabled"),!O.page),b)),w=function(){O.onClick(O.page)},M=function(I){O.onKeyPress(I,O.onClick,O.page)};return l.a.createElement("li",{title:O.showTitle?O.page:null,className:g,onClick:w,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",l.a.createElement("a",{rel:"nofollow"},O.page)))},f=h,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},m=function(k){Object(p.a)(b,k);var O=Object(C.a)(b);function b(){var v;Object(D.a)(this,b);for(var g=arguments.length,w=new Array(g),M=0;M=0||N.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;v.setState({goInputText:""}),z(v.getValidValue())},v.go=function(N){var I=v.state.goInputText;if(I==="")return;(N.keyCode===c.ENTER||N.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(u.a)(b,[{key:"getValidValue",value:function(){var g=this.state,w=g.goInputText,M=g.current;return!w||isNaN(w)?M:Number(w)}},{key:"getPageSizeOptions",value:function(){var g=this.props,w=g.pageSize,M=g.pageSizeOptions;return M.some(function(N){return N.toString()===w.toString()})?M:M.concat([w.toString()]).sort(function(N,I){var G=isNaN(Number(N))?0:Number(N),z=isNaN(Number(I))?0:Number(I);return G-z})}},{key:"render",value:function(){var g=this,w=this.props,M=w.pageSize,N=w.locale,I=w.rootPrefixCls,G=w.changeSize,z=w.quickGo,H=w.goButton,K=w.selectComponentClass,U=w.buildOptionText,B=w.selectPrefixCls,V=w.disabled,ae=this.state.goInputText,he="".concat(I,"-options"),pe=K,Re=null,ke=null,ve=null;if(!G&&!z)return null;var Te=this.getPageSizeOptions();if(G&&pe){var be=Te.map(function(ue,le){return l.a.createElement(pe.Option,{key:le,value:ue.toString()},(U||g.buildOptionText)(ue))});Re=l.a.createElement(pe,{disabled:V,prefixCls:B,showSearch:!1,className:"".concat(he,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||Te[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},be)}return z&&(H&&(ve=typeof H=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:V,className:"".concat(he,"-quick-jumper-button")},N.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),ke=l.a.createElement("div",{className:"".concat(he,"-quick-jumper")},N.jump_to,l.a.createElement("input",{disabled:V,type:"text",value:ae,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,ve)),l.a.createElement("li",{className:"".concat(he)},Re,ke)}}]),b}(l.a.Component);m.defaultProps={pageSizeOptions:["10","20","50","100"]};var _=m,y=L("N2Kk");function i(){}function a(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k}function t(k,O,b){return b}function S(k,O,b){var v=typeof k=="undefined"?O.pageSize:k;return Math.floor((b.total-1)/v)+1}var x=function(k){Object(p.a)(b,k);var O=Object(C.a)(b);function b(v){var g;Object(D.a)(this,b),g=O.call(this,v),g.getJumpPrevPage=function(){return Math.max(1,g.state.current-(g.props.showLessItems?3:5))},g.getJumpNextPage=function(){return Math.min(S(void 0,g.state,g.props),g.state.current+(g.props.showLessItems?3:5))},g.getItemIcon=function(G,z){var H=g.props.prefixCls,K=G||l.a.createElement("button",{type:"button","aria-label":z,className:"".concat(H,"-item-link")});return typeof G=="function"&&(K=l.a.createElement(G,Object(T.a)({},g.props))),K},g.savePaginationNode=function(G){g.paginationNode=G},g.isValid=function(G){return a(G)&&G!==g.state.current},g.shouldDisplayQuickJumper=function(){var G=g.props,z=G.showQuickJumper,H=G.pageSize,K=G.total;return K<=H?!1:z},g.handleKeyDown=function(G){(G.keyCode===c.ARROW_UP||G.keyCode===c.ARROW_DOWN)&&G.preventDefault()},g.handleKeyUp=function(G){var z=g.getValidValue(G),H=g.state.currentInputValue;z!==H&&g.setState({currentInputValue:z}),G.keyCode===c.ENTER?g.handleChange(z):G.keyCode===c.ARROW_UP?g.handleChange(z-1):G.keyCode===c.ARROW_DOWN&&g.handleChange(z+1)},g.changePageSize=function(G){var z=g.state.current,H=S(G,g.state,g.props);z=z>H?H:z,H===0&&(z=g.state.current),typeof G=="number"&&("pageSize"in g.props||g.setState({pageSize:G}),"current"in g.props||g.setState({current:z,currentInputValue:z})),g.props.onShowSizeChange(z,G),"onChange"in g.props&&g.props.onChange&&g.props.onChange(z,G)},g.handleChange=function(G){var z=g.props.disabled,H=G;if(g.isValid(H)&&!z){var K=S(void 0,g.state,g.props);H>K?H=K:H<1&&(H=1),"current"in g.props||g.setState({current:H,currentInputValue:H});var U=g.state.pageSize;return g.props.onChange(H,U),H}return g.state.current},g.prev=function(){g.hasPrev()&&g.handleChange(g.state.current-1)},g.next=function(){g.hasNext()&&g.handleChange(g.state.current+1)},g.jumpPrev=function(){g.handleChange(g.getJumpPrevPage())},g.jumpNext=function(){g.handleChange(g.getJumpNextPage())},g.hasPrev=function(){return g.state.current>1},g.hasNext=function(){return g.state.current2?H-2:0),U=2;U=M?I=M:I=Number(w),I}},{key:"getShowSizeChanger",value:function(){var g=this.props,w=g.showSizeChanger,M=g.total,N=g.totalBoundaryShowSizeChanger;return typeof w!="undefined"?w:M>N}},{key:"renderPrev",value:function(g){var w=this.props,M=w.prevIcon,N=w.itemRender,I=N(g,"prev",this.getItemIcon(M,"prev page")),G=!this.hasPrev();return Object(E.isValidElement)(I)?Object(E.cloneElement)(I,{disabled:G}):I}},{key:"renderNext",value:function(g){var w=this.props,M=w.nextIcon,N=w.itemRender,I=N(g,"next",this.getItemIcon(M,"next page")),G=!this.hasNext();return Object(E.isValidElement)(I)?Object(E.cloneElement)(I,{disabled:G}):I}},{key:"render",value:function(){var g=this,w=this.props,M=w.prefixCls,N=w.className,I=w.style,G=w.disabled,z=w.hideOnSinglePage,H=w.total,K=w.locale,U=w.showQuickJumper,B=w.showLessItems,V=w.showTitle,ae=w.showTotal,he=w.simple,pe=w.itemRender,Re=w.showPrevNextJumpers,ke=w.jumpPrevIcon,ve=w.jumpNextIcon,Te=w.selectComponentClass,be=w.selectPrefixCls,ue=w.pageSizeOptions,le=this.state,re=le.current,fe=le.pageSize,q=le.currentInputValue;if(z===!0&&H<=fe)return null;var ee=S(void 0,this.state,this.props),Ce=[],te=null,J=null,X=null,Q=null,Ee=null,ge=U&&U.goButton,Oe=B?1:2,Qe=re-1>0?re-1:0,rt=re+1=Oe*2&&re!==1+2&&(Ce[0]=Object(E.cloneElement)(Ce[0],{className:"".concat(M,"-item-after-jump-prev")}),Ce.unshift(te)),ee-re>=Oe*2&&re!==ee-2&&(Ce[Ce.length-1]=Object(E.cloneElement)(Ce[Ce.length-1],{className:"".concat(M,"-item-before-jump-next")}),Ce.push(J)),at!==1&&Ce.unshift(X),ht!==ee&&Ce.push(Q)}var Ue=null;ae&&(Ue=l.a.createElement("li",{className:"".concat(M,"-total-text")},ae(H,[H===0?0:(re-1)*fe+1,re*fe>H?H:re*fe])));var Me=!this.hasPrev()||!ee,Ne=!this.hasNext()||!ee;return l.a.createElement("ul",Object(P.a)({className:n()(M,N,Object(d.a)({},"".concat(M,"-disabled"),G)),style:I,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,l.a.createElement("li",{title:V?K.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(M,"-prev"),Object(d.a)({},"".concat(M,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(Qe)),Ce,l.a.createElement("li",{title:V?K.next_page:null,onClick:this.next,tabIndex:Ne?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(M,"-next"),Object(d.a)({},"".concat(M,"-disabled"),Ne)),"aria-disabled":Ne},this.renderNext(rt)),l.a.createElement(_,{disabled:G,locale:K,rootPrefixCls:M,selectComponentClass:Te,selectPrefixCls:be,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:fe,pageSizeOptions:ue,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(g,w){var M={};if("current"in g&&(M.current=g.current,g.current!==w.current&&(M.currentInputValue=M.current)),"pageSize"in g&&g.pageSize!==w.pageSize){var N=w.current,I=S(g.pageSize,w,g);N=N>I?I:N,"current"in g||(M.current=N,M.currentInputValue=N),M.pageSize=g.pageSize}return M}}]),b}(l.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:i,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:i,locale:y.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var o=x},"6RRn":function(j,Z,L){"use strict";var P=L("wCXF"),d=L("n6Qo");L.d(Z,"b",function(){return d.a});var T=L("IBYe"),D=L("6eGT"),u=L("hW8S");L.d(Z,"a",function(){return u.a}),Z.c=P.b},"6eGT":function(j,Z,L){"use strict";function P(d){return null}Z.a=P},"7Cbv":function(j,Z,L){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),d=new Uint8Array(16);function T(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(d)}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function u(f){return typeof f=="string"&&D.test(f)}for(var p=u,C=[],E=0;E<256;++E)C.push((E+256).toString(16).substr(1));function l(f){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,m=(C[f[c+0]]+C[f[c+1]]+C[f[c+2]]+C[f[c+3]]+"-"+C[f[c+4]]+C[f[c+5]]+"-"+C[f[c+6]]+C[f[c+7]]+"-"+C[f[c+8]]+C[f[c+9]]+"-"+C[f[c+10]]+C[f[c+11]]+C[f[c+12]]+C[f[c+13]]+C[f[c+14]]+C[f[c+15]]).toLowerCase();if(!p(m))throw TypeError("Stringified UUID is invalid");return m}var s=l;function n(f,c,m){f=f||{};var _=f.random||(f.rng||T)();if(_[6]=_[6]&15|64,_[8]=_[8]&63|128,c){m=m||0;for(var y=0;y<16;++y)c[m+y]=_[y];return c}return s(_)}var h=Z.a=n},"7ahc":function(j,Z,L){"use strict";L.d(Z,"a",function(){return S});var P=L("k1fw"),d=L("0Owb"),T=L("+L6B"),D=L("2/Rp"),u=L("y8nQ"),p=L("Vl3Y"),C=L("tJVT"),E=L("OaEy"),l=L("2fM7"),s=L("q1tI"),n=L.n(s),h=L("VrN/"),f=L.n(h),c=L("p77/"),m=L.n(c),_=L("c5Ni"),y=L.n(_),i=l.a.Option,a={labelCol:{span:4},wrapperCol:{span:20}},t={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"]};Z.b=function(x){var o=x.callback,k=x.onCancel,O=Object(s.useState)("python"),b=Object(C.a)(O,2),v=b[0],g=b[1];function w(N){g(t[N][1])}function M(N){o(N)}return n.a.createElement(p.a,Object(d.a)({},a,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),n.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(l.a,{onChange:w},Object.keys(t).map(function(N){return n.a.createElement(i,{key:N,value:N},t[N][0])}))),n.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(S,{mode:v})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(D.a,{type:"ghost",onClick:k},"\u53D6\u6D88")))};function S(x){var o=x.value,k=x.onChange,O=x.mode,b=x.options,v=b===void 0?{}:b,g=Object(s.useRef)(),w=Object(s.useState)(),M=Object(C.a)(w,2),N=M[0],I=M[1];return Object(s.useEffect)(function(){if(N){function G(z){var H=z.getValue();k&&k(H)}return N.on("change",G),function(){N.off("change",G)}}},[N,k]),Object(s.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(s.useEffect)(function(){N&&((o!==N.getValue()||o==="")&&setTimeout(function(){N.setValue(o||" ")},300))},[N,o]),Object(s.useEffect)(function(){if(g.current&&!N){var G=f.a.fromTextArea(g.current,Object(P.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},v));I(G)}},[g.current,N]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:g}))}},"815F":function(j,Z,L){"use strict";L.d(Z,"e",function(){return C}),L.d(Z,"c",function(){return l}),L.d(Z,"d",function(){return s}),L.d(Z,"a",function(){return h}),L.d(Z,"f",function(){return f}),L.d(Z,"b",function(){return c});var P=L("KQm4"),d=L("VTBJ"),T=L("Ff2n"),D=L("Zm9Q"),u=L("Kwbf"),p=L("OZM5");function C(m,_){return m!=null?m:_}function E(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=new Map;function y(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(i||[]).forEach(function(t){var S=t.key,x=t.children;Object(u.a)(S!=null,"Tree node must have a certain key: [".concat(a).concat(S,"]"));var o=String(S);Object(u.a)(!_.has(o)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(o)),_.set(o,!0),y(x,"".concat(a).concat(o," > "))})}y(m)}function l(m){function _(y){var i=Object(D.a)(y);return i.map(function(a){if(!Object(p.i)(a))return Object(u.a)(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var t=a.key,S=a.props,x=S.children,o=Object(T.a)(S,["children"]),k=Object(d.a)({key:t},o),O=_(x);return O.length&&(k.children=O),k}).filter(function(a){return a})}return _(m)}function s(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],y=new Set(_===!0?[]:_),i=[];function a(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(x,o){var k=Object(p.h)(S?S.pos:"0",o),O=C(x.key,k),b=Object(d.a)(Object(d.a)({},x),{},{parent:S,pos:k,children:null,data:x,isStart:[].concat(Object(P.a)(S?S.isStart:[]),[o===0]),isEnd:[].concat(Object(P.a)(S?S.isEnd:[]),[o===t.length-1])});return i.push(b),_===!0||y.has(O)?b.children=a(x.children||[],b):b.children=[],b})}return a(m),i}function n(m,_,y){var i;y?typeof y=="string"?i=function(S){return S[y]}:typeof y=="function"&&(i=function(S){return y(S)}):i=function(S,x){return C(S.key,x)};function a(t,S,x){var o=t?t.children:m,k=t?Object(p.h)(x.pos,S):"0";if(t){var O=i(t,k),b={node:t,index:S,pos:k,key:O,parentPos:x.node?x.pos:null,level:x.level+1};_(b)}o&&o.forEach(function(v,g){a(v,g,{node:t,pos:k,level:x?x.level+1:-1})})}a(null)}function h(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=_.initWrapper,i=_.processEntity,a=_.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},x={},o={posEntities:S,keyEntities:x};return y&&(o=y(o)||o),n(m,function(k){var O=k.node,b=k.index,v=k.pos,g=k.key,w=k.parentPos,M=k.level,N={node:O,index:b,key:g,pos:v,level:M},I=C(g,v);S[v]=N,x[I]=N,N.parent=S[w],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),i&&i(N,o)},t),a&&a(o),o}function f(m,_){var y=_.expandedKeys,i=_.selectedKeys,a=_.loadedKeys,t=_.loadingKeys,S=_.checkedKeys,x=_.halfCheckedKeys,o=_.dragOverNodeKey,k=_.dropPosition,O=_.keyEntities,b=O[m],v={eventKey:m,expanded:y.indexOf(m)!==-1,selected:i.indexOf(m)!==-1,loaded:a.indexOf(m)!==-1,loading:t.indexOf(m)!==-1,checked:S.indexOf(m)!==-1,halfChecked:x.indexOf(m)!==-1,pos:String(b?b.pos:""),dragOver:o===m&&k===0,dragOverGapTop:o===m&&k===-1,dragOverGapBottom:o===m&&k===1};return v}function c(m){var _=m.data,y=m.expanded,i=m.selected,a=m.checked,t=m.loaded,S=m.loading,x=m.halfChecked,o=m.dragOver,k=m.dragOverGapTop,O=m.dragOverGapBottom,b=m.pos,v=m.active,g=Object(d.a)(Object(d.a)({},_),{},{expanded:y,selected:i,checked:a,loaded:t,loading:S,halfChecked:x,dragOver:o,dragOverGapTop:k,dragOverGapBottom:O,pos:b,active:v});return"props"in g||Object.defineProperty(g,"props",{get:function(){return Object(u.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),m}}),g}},"8EBN":function(j,Z,L){(function(P){P(L("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 d=0;d-1&&D.substring(C+1,D.length);if(E)return P.findModeByExtension(E)},P.findModeByName=function(D){D=D.toLowerCase();for(var u=0;u=ne.length?ce.slice(ne.length):ce}).join(`
`)}var y=[],i=[""],a=new c.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){y.length=0,i=[""]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function o(se,W,$,ne){if(W>=se.length||se[W].level<=$)return W;var ce=se[W];ne.push("- "+ce.text+""),W++;var oe=[];return W=o(se,W,ce.level,oe),oe.length>0&&(ne.push("
"),oe.forEach(function(Ke){ne.push(Ke)}),ne.push("
")),ne.push(" "),W=o(se,W,$,ne),W}function k(){return o(y,0,0,i),i.push("
"),i.join("")}var O={heading:function(W){var $=t.exec(W);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(W){var $=this.rules.block.fences.exec(W);if($){var ne=$[0],ce=_(ne,$[3]||""),oe=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ke=g(),At=ce;ce=Ke,w[Ke]={type:"block",expression:At}}return{type:"code",raw:ne,lang:oe,text:ce}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,v=0,g=function(){return"__special_katext_id_".concat(v++,"__")},w={};function M(){return w}function N(){v=0,w={}}function I(se){return se=se.replace(b,function(W,$){var ne=g();return w[ne]={type:"inline",expression:$},ne}),se}var G=a.listitem;a.listitem=function(se){return G(I(se))};var z=a.paragraph;a.paragraph=function(se){return z(I(se))};var H=a.tablecell;a.tablecell=function(se,W){return H(I(se),W)},a.code=function(se,W,$){var ne=(W||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"".concat(se,"
"):'
').concat($?se:Object(m.escape)(se,!0),`
`):''+($?se:Object(m.escape)(se,!0))+"
"},a.heading=function(se,W,$){var ne=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return y.push({anchor:ne,level:W,text:se}),"'+se+""},c.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),c.a.use({tokenizer:O,renderer:a});var K=c.a,U=L("SJMd"),B=L("ulZh"),V=L.n(B),ae=L("m3rI"),he=L("Oy/b"),pe=L("p5ED"),Re=L("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 ke=function(se,W){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ce in ne)Object.prototype.hasOwnProperty.call(ne,ce)&&($[ce]=ne[ce])})(se,W)};function ve(se,W){function $(){this.constructor=se}ke(se,W),se.prototype=W===null?Object.create(W):($.prototype=W.prototype,new $)}function Te(se,W,$,ne){return new($||($=Promise))(function(ce,oe){function Ke(vr){try{Vt(ne.next(vr))}catch(Pt){oe(Pt)}}function At(vr){try{Vt(ne.throw(vr))}catch(Pt){oe(Pt)}}function Vt(vr){var Pt;vr.done?ce(vr.value):(Pt=vr.value,Pt instanceof $?Pt:new $(function(Br){Br(Pt)})).then(Ke,At)}Vt((ne=ne.apply(se,W||[])).next())})}function be(se,W){var $,ne,ce,oe,Ke={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return oe={next:At(0),throw:At(1),return:At(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function At(Vt){return function(vr){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ce=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ce=ne.return)&&ce.call(ne),0):ne.next)&&!(ce=ce.call(ne,Pt[1])).done)return ce;switch(ne=0,ce&&(Pt=[2&Pt[0],ce.value]),Pt[0]){case 0:case 1:ce=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ne=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ce=Ke.trys,(ce=ce.length>0&&ce[ce.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ce||Pt[1]>ce[0]&&Pt[1]',"select"),this.addActionButton(ne,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ne,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ne,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ne,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ne,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ne,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ne,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(oe){var Ke=document.createElement("div");Ke.className=""+$.toolbarButtonStyleClass.name,Ke.setAttribute("data-type-name",oe.typeName),Ke.innerHTML=oe.icon,Ke.addEventListener("click",function(){$.markerToolbarButtonClicked(Ke,oe)}),$.buttons.push(Ke),$.markerButtons.push(Ke)}),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 ce=document.createElement("div");ce.className=this.toolbarBlockStyleClass.name,ce.style.whiteSpace="nowrap",ce.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ce),this.addActionButton(ce,'',"render"),this.addActionButton(ce,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},se.prototype.addButtonClickListener=function(W){this.buttonClickListeners.push(W)},se.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},se.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},se.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var $=0;$0&&this.buttonClickListeners.forEach(function(ne){return ne("marker",$)}),this.markerButtonOverflowBlock.style.display="none"},se.prototype.actionToolbarButtonClicked=function(W,$){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ne){return ne("action",$)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},se.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},se.prototype.setActiveMarkerButton=function(W){var $=this.markerButtons.find(function(ne){return ne.getAttribute("data-type-name")===W});$&&this.setActiveButton($)},se.prototype.setCurrentMarker=function(W){var $=this;this.currentMarker=W,this.buttons.filter(function(ne){return/delete|notes/.test(ne.getAttribute("data-action"))}).forEach(function(ne){$.currentMarker===void 0?(ne.style.fillOpacity="0.4",ne.style.pointerEvents="none"):(ne.style.fillOpacity="1",ne.style.pointerEvents="all")})},se}(),X=function(){function se(W,$,ne,ce){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=$,this.uiStyleSettings=ne,this.styles=ce,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return se.prototype.addStyles=function(){var W;this.toolboxStyleClass=this.styles.addClass(new te("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 te("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var $=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new te("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new te("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new te("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 te("toolbox-panel-row_colors",`
background-color: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new te("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*$)+`px;
padding: `+$+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new te("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new te("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},se.prototype.show=function(W){var $;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+(($=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},se.prototype.setPanelButtons=function(W){var $,ne,ce=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(($=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&$!==void 0?$:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ne!==void 0?ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(oe){var Ke;oe.uiStyleSettings=ce.uiStyleSettings;var At=document.createElement("div");At.className=ce.toolboxButtonStyleClass.name+" "+((Ke=ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ke!==void 0?Ke:ce.toolboxButtonStyleColorsClass.name),At.innerHTML=oe.icon,At.title=oe.title,At.addEventListener("click",function(){ce.panelButtonClick(oe)}),ce.panelButtons.push(At),ce.buttonRow.appendChild(At)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},se.prototype.panelButtonClick=function(W){var $=this,ne=-1;if(W!==this.activePanel){ne=this.panels.indexOf(W),this.panelRow.innerHTML="";var ce=W.getUi();ce.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ce),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=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){$.displayMode==="inline"?$.panelRow.style.display="none":$.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(oe,Ke){var At,Vt;oe.className=$.toolboxButtonStyleClass.name+" "+(Ke===ne?""+((At=$.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&At!==void 0?At:$.toolboxActiveButtonStyleColorsClass.name):""+((Vt=$.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Vt!==void 0?Vt:$.toolboxButtonStyleColorsClass.name))})},se}(),Q=function(se,W){this.title=se,this.icon=W},Ee=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.colors=[],Ke.addTransparent=!1,Ke.colorBoxes=[],Ke.colors=ne,Ke.currentColor=ce,Ke.setCurrentColor=Ke.setCurrentColor.bind(Ke),Ke.getColorBox=Ke.getColorBox.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.whiteSpace="nowrap",this.colors.forEach(function(ce){var oe=$.getColorBox(ce);ne.appendChild(oe),$.colorBoxes.push(oe)}),ne},W.prototype.getColorBox=function($){var ne=this,ce=this.uiStyleSettings.toolbarHeight/4,oe=this.uiStyleSettings.toolbarHeight-ce,Ke=document.createElement("div");Ke.style.display="inline-block",Ke.style.boxSizing="content-box",Ke.style.width=oe-2+"px",Ke.style.height=oe-2+"px",Ke.style.padding="1px",Ke.style.marginRight="2px",Ke.style.marginBottom="2px",Ke.style.borderWidth="2px",Ke.style.borderStyle="solid",Ke.style.borderRadius=(oe+2)/2+"px",Ke.style.borderColor=$===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ke.addEventListener("click",function(){ne.setCurrentColor($,Ke)});var At=document.createElement("div");return At.style.display="inline-block",At.style.width=oe-2+"px",At.style.height=oe-2+"px",At.style.backgroundColor=$,At.style.borderRadius=oe/2+"px",$==="transparent"&&(At.style.fill=this.uiStyleSettings.toolboxAccentColor,At.innerHTML=``),Ke.appendChild(At),Ke},W.prototype.setCurrentColor=function($,ne){var ce=this;this.currentColor=$,this.colorBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged($)},W}(Q),ge=function(){function se(W,$,ne){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=$,this.globalSettings=ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(se.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),se.prototype.ownsTarget=function(W){return!1},Object.defineProperty(se.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),se.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},se.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},se.prototype.pointerDown=function(W,$){},se.prototype.dblClick=function(W,$){},se.prototype.manipulate=function(W){},se.prototype.pointerUp=function(W){this.stateChanged()},se.prototype.dispose=function(){},se.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},se.prototype.getState=function(){return{typeName:se.typeName,state:this.state,notes:this.notes}},se.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},se.prototype.scale=function(W,$){},se.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},se.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},se.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},se.typeName="MarkerBase",se}(),Oe=function(){function se(){this.findGripByVisual=this.findGripByVisual.bind(this)}return se.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},se}(),Qe=function(){function se(){this.GRIP_SIZE=10,this.visual=le.createGroup(),this.visual.appendChild(le.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(le.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},se}(),rt=function(){function se(){}return se.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},se.toSVGMatrix=function(W,$){return W.a=$.a,W.b=$.b,W.c=$.c,W.d=$.d,W.e=$.e,W.f=$.f,W},se}(),nt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.left=0,oe.top=0,oe.width=0,oe.height=0,oe.defaultSize={x:50,y:20},oe.offsetX=0,oe.offsetY=0,oe.rotationAngle=0,oe.CB_DISTANCE=10,oe._suppressMarkerCreateEvent=!1,oe.container.transform.baseVal.appendItem(le.createTransform()),oe.setupControlBox(),oe}return ve(W,se),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function($){this._visual=$;var ne=le.createTransform();this._visual.transform.baseVal.appendItem(ne)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!!(this.controlGrips.findGripByVisual($)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget($))},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.left=$.x,this.top=$.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var ce=this.unrotatePoint($);if(this.manipulationStartX=ce.x,this.manipulationStartY=ce.y,this.offsetX=ce.x-this.left,this.offsetY=ce.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ne)){this.activeGrip=this.rotatorGrip;var oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=oe.x-this.width/2,this.top=oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ke=this.container.transform.baseVal.getItem(0);Ke.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ke,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},W.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function($){this.visual.style.transform="translate("+$.x+"px, "+$.y+"px)"},W.prototype.manipulate=function($){var ne=this.unrotatePoint($);this.state==="creating"?this.resize($):this.state==="move"?(this.left=this.manipulationStartLeft+(ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ne):this.state==="rotate"&&this.rotate($)},W.prototype.resize=function($){var ne=this.manipulationStartLeft,ce=this.manipulationStartWidth,oe=this.manipulationStartTop,Ke=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ne=this.manipulationStartLeft+$.x-this.manipulationStartX,ce=this.manipulationStartWidth+this.manipulationStartLeft-ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ce=this.manipulationStartWidth+$.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:oe=this.manipulationStartTop+$.y-this.manipulationStartY,Ke=this.manipulationStartHeight+this.manipulationStartTop-oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ke=this.manipulationStartHeight+$.y-this.manipulationStartY}ce>=0?(this.left=ne,this.width=ce):(this.left=ne+ce,this.width=-ce),Ke>=0?(this.top=oe,this.height=Ke):(this.top=oe+Ke,this.height=-Ke),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function($){if(Math.abs($.x-this.centerX)>.1){var ne=Math.sign($.x-this.centerX);this.rotationAngle=180*Math.atan(($.y-this.centerY)/($.x-this.centerX))/Math.PI+90*ne,this.applyRotation()}},W.prototype.applyRotation=function(){var $=this.container.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem($,0)},W.prototype.rotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM(),ce=le.createPoint($.x,$.y);return{x:(ce=ce.matrixTransform(ne)).x,y:ce.y}},W.prototype.unrotatePoint=function($){if(this.rotationAngle===0)return $;var ne=this.container.getCTM();ne=ne.inverse();var ce=le.createPoint($.x,$.y);return{x:(ce=ce.matrixTransform(ne)).x,y:ce.y}},W.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=le.createGroup();var $=le.createTransform();$.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem($),this.container.appendChild(this.controlBox),this.controlRect=le.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=le.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 Oe,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var $=this.controlBox.transform.baseVal.getItem(0);$.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem($,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()},W.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()},W.prototype.createGrip=function(){var $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},W.prototype.positionGrips=function(){var $=this.controlGrips.topLeft.GRIP_SIZE,ne=-$/2,ce=ne,oe=(this.width+this.CB_DISTANCE)/2-$/2,Ke=(this.height+this.CB_DISTANCE)/2-$/2,At=this.height+this.CB_DISTANCE-$/2,Vt=this.width+this.CB_DISTANCE-$/2;this.positionGrip(this.controlGrips.topLeft.visual,ne,ce),this.positionGrip(this.controlGrips.topCenter.visual,oe,ce),this.positionGrip(this.controlGrips.topRight.visual,Vt,ce),this.positionGrip(this.controlGrips.centerLeft.visual,ne,Ke),this.positionGrip(this.controlGrips.centerRight.visual,Vt,Ke),this.positionGrip(this.controlGrips.bottomLeft.visual,ne,At),this.positionGrip(this.controlGrips.bottomCenter.visual,oe,At),this.positionGrip(this.controlGrips.bottomRight.visual,Vt,At),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,oe,ce-3*this.CB_DISTANCE)},W.prototype.positionGrip=function($,ne,ce){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ce),$.transform.baseVal.replaceItem(oe,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:rt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:rt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},se.prototype.getState.call(this))},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.left=ne.left,this.top=ne.top,this.width=ne.width,this.height=ne.height,this.rotationAngle=ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(rt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ne.containerTransformMatrix))},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne);var ce=this.rotatePoint({x:this.left,y:this.top}),oe=this.unrotatePoint({x:ce.x*$,y:ce.y*ne});this.left=oe.x,this.top=oe.y,this.width=this.width*$,this.height=this.height*ne,this.adjustControlBox()},W}(ge),ut=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},W.prototype.createVisual=function(){this.visual=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},W.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},W.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this))},W.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize()},W.title="Rectangle marker",W}(nt),dt=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.widths=[],Ke.widthBoxes=[],Ke.widths=ne,Ke.currentWidth=ce,Ke.setCurrentWidth=Ke.setCurrentWidth.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.widths.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.flexGrow="2",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ce===$.currentWidth?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentWidth(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=ce.toString(),Ke.style.marginRight="5px",oe.appendChild(Ke);var At=document.createElement("div");At.style.minHeight="20px",At.style.flexGrow="2",At.style.display="flex",At.style.alignItems="center";var Vt=document.createElement("hr");Vt.style.minWidth="20px",Vt.style.border="0px",Vt.style.borderTop=ce+"px solid "+$.uiStyleSettings.toolboxColor,Vt.style.flexGrow="2",At.appendChild(Vt),oe.appendChild(At),$.widthBoxes.push(oe)}),ne},W.prototype.setCurrentWidth=function($,ne){var ce=this;this.currentWidth=$,this.widthBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(Q),mt=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.styles=[],Ke.styleBoxes=[],Ke.styles=ne,Ke.currentStyle=ce,Ke.setCurrentStyle=Ke.setCurrentStyle.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",this.styles.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.styles.length-5+"%",oe.style.borderColor=ce===$.currentStyle?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentStyle(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.overflow="hidden";var At=``;Ke.innerHTML=At,oe.appendChild(Ke),$.styleBoxes.push(oe)}),ne},W.prototype.setCurrentStyle=function($,ne){var ce=this;this.currentStyle=$,this.styleBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(Q),He=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="FrameMarker",W.title="Frame marker",W.icon='',W}(ut),De=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},at=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.x1=0,oe.y1=0,oe.x2=0,oe.y2=0,oe.defaultLength=50,oe.manipulationStartX=0,oe.manipulationStartY=0,oe.manipulationStartX1=0,oe.manipulationStartY1=0,oe.manipulationStartX2=0,oe.manipulationStartY2=0,oe.setupControlBox(),oe}return ve(W,se),W.prototype.ownsTarget=function($){return!!se.prototype.ownsTarget.call(this,$)||!(!this.grip1.ownsTarget($)&&!this.grip2.ownsTarget($))},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartX=$.x,this.manipulationStartY=$.y,this.state==="new"&&(this.x1=$.x,this.y1=$.y,this.x2=$.x,this.y2=$.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},W.prototype.pointerUp=function($){var ne=this.state;se.prototype.pointerUp.call(this,$),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($),this._state="select",ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function($){this.state==="creating"?this.resize($):this.state==="move"?(this.x1=this.manipulationStartX1+$.x-this.manipulationStartX,this.y1=this.manipulationStartY1+$.y-this.manipulationStartY,this.x2=this.manipulationStartX2+$.x-this.manipulationStartX,this.y2=this.manipulationStartY2+$.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize($)},W.prototype.resize=function($){switch(this.activeGrip){case this.grip1:this.x1=$.x,this.y1=$.y;break;case this.grip2:case void 0:this.x2=$.x,this.y2=$.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){se.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){se.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=le.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var $=new Qe;return $.visual.transform.baseVal.appendItem(le.createTransform()),this.controlBox.appendChild($.visual),$},W.prototype.positionGrips=function(){var $=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-$/2,this.y1-$/2),this.positionGrip(this.grip2.visual,this.x2-$/2,this.y2-$/2)},W.prototype.positionGrip=function($,ne,ce){var oe=$.transform.baseVal.getItem(0);oe.setTranslate(ne,ce),$.transform.baseVal.replaceItem(oe,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},se.prototype.getState.call(this))},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.x1=ne.x1,this.y1=ne.y1,this.x2=ne.x2,this.y2=ne.y2},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.x1=this.x1*$,this.y1=this.y1*ne,this.x2=this.x2*$,this.y2=this.y2*ne,this.adjustVisual(),this.adjustControlBox()},W}(ge),ht=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorLine&&$!==this.visibleLine)},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorLine=le.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.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()),le.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='',W}(at),Ze=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.fonts=[],Ke.fontBoxes=[],Ke.fonts=ne,Ke.currentFont=ce,Ke.setCurrentFont=Ke.setCurrentFont.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.overflow="hidden",ne.style.flexGrow="2",this.fonts.forEach(function(ce){var oe=document.createElement("div");oe.style.display="inline-block",oe.style.alignItems="center",oe.style.justifyContent="space-between",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.overflow="hidden",oe.style.maxWidth=100/$.fonts.length-5+"%",oe.style.borderColor=ce===$.currentFont?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentFont(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.minHeight="20px",Ke.style.flexGrow="2",Ke.style.fontFamily=ce,Ke.style.overflow="hidden";var At=document.createElement("div");At.style.whiteSpace="nowrap",At.style.overflow="hidden",At.style.textOverflow="ellipsis",At.innerHTML="The quick brown fox jumps over the lazy dog",Ke.appendChild(At),oe.appendChild(Ke),$.fontBoxes.push(oe)}),ne},W.prototype.setCurrentFont=function($,ne){var ce=this;this.currentFont=$,this.fontBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(Q),st=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.color="transparent",oe.padding=5,oe.DEFAULT_TEXT="your text here",oe.text=oe.DEFAULT_TEXT,oe.isMoved=!1,oe.color=ce.defaultColor,oe.fontFamily=ce.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setColor=oe.setColor.bind(oe),oe.setFont=oe.setFont.bind(oe),oe.renderText=oe.renderText.bind(oe),oe.sizeText=oe.sizeText.bind(oe),oe.textEditDivClicked=oe.textEditDivClicked.bind(oe),oe.showTextEditor=oe.showTextEditor.bind(oe),oe.setSize=oe.setSize.bind(oe),oe.positionTextEditor=oe.positionTextEditor.bind(oe),oe.colorPanel=new Ee("Color",ce.defaultColorSet,ce.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.fontFamilyPanel=new Ze("Font",ce.defaultFontFamilies,ce.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe}return ve(W,se),W.prototype.ownsTarget=function($){if(se.prototype.ownsTarget.call(this,$)||$===this.visual||$===this.textElement||$===this.bgRectangle)return!0;var ne=!1;return this.textElement.childNodes.forEach(function(ce){ce===$&&(ne=!0)}),ne},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.bgRectangle=le.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=le.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.textElement.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.isMoved=!1,this.pointerDownPoint=$,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.renderText=function(){var $=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(ne){$.textElement.appendChild(le.createTSpan(ne.trim()===""?" ":ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var $=this.textElement.getBBox(),ne=1;if($.width>0&&$.height>0){var ce=(1*this.width-this.width*this.padding*2/100)/$.width,oe=(1*this.height-this.height*this.padding*2/100)/$.height;ne=Math.min(ce,oe)}return ne},W.prototype.getTextPosition=function($){var ne=this.textElement.getBBox(),ce=0,oe=0;return ne.width>0&&ne.height>0&&(ce=(this.width-ne.width*$)/2,oe=this.height/2-ne.height*$/2),{x:ce,y:oe}},W.prototype.sizeText=function(){var $=this.textElement.getBBox(),ne=this.getTextScale(),ce=this.getTextPosition(ne);ce.y-=$.y*ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ce.x+"px, "+ce.y+"px) scale("+ne+", "+ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ce.x,ce.y),this.textElement.transform.baseVal.getItem(1).setScale(ne,ne))},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs($.x-this.pointerDownPoint.x)>5||Math.abs($.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){se.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},W.prototype.pointerUp=function($){var ne=this.state;ne==="creating"&&(this._suppressMarkerCreateEvent=!0),se.prototype.pointerUp.call(this,$),this.setSize(),(ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var $=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(ne){ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ne=Number.parseFloat($.textEditor.style.fontSize);$.textEditor.clientWidth>=Number.parseInt($.textEditor.style.maxWidth)&&ne>.9;)ne-=.1,$.textEditor.style.fontSize=Math.max(ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ne){ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ne){if(ne.clipboardData){var ce=ne.clipboardData.getData("text"),oe=window.getSelection();if(!oe.rangeCount)return!1;oe.deleteFromDocument(),oe.getRangeAt(0).insertNode(document.createTextNode(ce)),ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){$.textEditDivClicked($.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var $=this.getTextScale(),ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),ce=this.textElement.getBBox(),oe={x:ce.width*$,y:ce.height*$};ne.x-=oe.x/2,ne.y-=oe.y/2,this.textEditor.style.top=ne.y+"px",this.textEditor.style.left=ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ne.x+"px",this.textEditor.style.fontSize=Math.max(16*$,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function($){this.text=$.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){se.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),se.prototype.deselect.call(this)},W.prototype.dblClick=function($,ne){se.prototype.dblClick.call(this,$,ne),this.showTextEditor()},W.prototype.setColor=function($){this.textElement&&le.setAttributes(this.textElement,[["fill",$]]),this.color=$,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged($)},W.prototype.setFont=function($){this.textElement&&le.setAttributes(this.textElement,[["font-family",$]]),this.fontFamily=$,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){var ne=$;this.color=ne.color,this.fontFamily=ne.fontFamily,this.padding=ne.padding,this.text=ne.text,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.icon='',W}(nt),Ue=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.color="transparent",oe.lineWidth=3,oe.drawing=!1,oe.pixelRatio=1,oe.color=ce.defaultColor,oe.lineWidth=ce.defaultStrokeWidth,oe.pixelRatio=ce.freehandPixelRatio,oe.setColor=oe.setColor.bind(oe),oe.addCanvas=oe.addCanvas.bind(oe),oe.finishCreation=oe.finishCreation.bind(oe),oe.setLineWidth=oe.setLineWidth.bind(oe),oe.colorPanel=new Ee("Color",ce.defaultColorSet,ce.defaultColor),oe.colorPanel.onColorChanged=oe.setColor,oe.lineWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.lineWidthPanel.onWidthChanged=oe.setLineWidth,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.drawingImage=le.createImage(),this.visual.appendChild(this.drawingImage);var $=le.createTransform();this.visual.transform.baseVal.appendItem($),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function($,ne){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo($.x,$.y),this.drawing=!0):se.prototype.pointerDown.call(this,$,ne)},W.prototype.manipulate=function($){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo($.x,$.y),this.canvasContext.stroke()):se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),le.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function($){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):se.prototype.pointerUp.call(this,$)},W.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)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),se.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),se.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var $=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],ce=ne[0],oe=ne[1],Ke=ne[2],At=ne[3],Vt=!1,vr=0;vr0&&(Vt=!0,vrAt&&(At=vr),Pt>Ke&&(Ke=Pt));if(Vt){this.left=ce/this.pixelRatio,this.top=oe/this.pixelRatio,this.width=(Ke-ce)/this.pixelRatio,this.height=(At-oe)/this.pixelRatio;var Br=document.createElement("canvas");Br.width=Ke-ce,Br.height=At-oe,Br.getContext("2d").putImageData(this.canvasContext.getImageData(ce,oe,Ke-ce,At-oe),0,0),this.drawingImgUrl=Br.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.prototype.setDrawingImage=function(){le.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),le.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},W.prototype.setColor=function($){this.color=$,this.colorChanged($)},W.prototype.setLineWidth=function($){this.lineWidth=$},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({drawingImgUrl:this.drawingImgUrl},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){this.createVisual(),se.prototype.restoreState.call(this,$),this.drawingImgUrl=$.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.icon='',W}(nt),Me=function(se){function W($,ne,ce){var oe=se.call(this,$,ce||'')||this;return oe.typeBoxes=[],oe.currentType=ne,oe.setCurrentType=oe.setCurrentType.bind(oe),oe}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2";for(var ce=function(At){var Vt="both";switch(At){case 0:Vt="both";break;case 1:Vt="start";break;case 2:Vt="end";break;case 3:Vt="none"}var vr=document.createElement("div");if(vr.style.display="flex",vr.style.flexGrow="2",vr.style.alignItems="center",vr.style.justifyContent="space-between",vr.style.padding="5px",vr.style.borderWidth="2px",vr.style.borderStyle="solid",vr.style.borderColor=Vt===oe.currentType?oe.uiStyleSettings.toolboxAccentColor:"transparent",vr.addEventListener("click",function(){$.setCurrentType(Vt,vr)}),ne.appendChild(vr),Vt==="both"||Vt==="start"){var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.innerHTML=``,Pt.style.marginLeft="5px",vr.appendChild(Pt)}var Br=document.createElement("div");Br.style.display="flex",Br.style.alignItems="center",Br.style.minHeight="20px",Br.style.flexGrow="2";var jr=document.createElement("hr");if(jr.style.minWidth="20px",jr.style.border="0px",jr.style.borderTop="3px solid "+(oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxColor:"#eeeeee"),jr.style.flexGrow="2",Br.appendChild(jr),vr.appendChild(Br),Vt==="both"||Vt==="end"){var fn=document.createElement("div");fn.style.display="flex",fn.style.alignItems="center",fn.style.minHeight="20px",fn.innerHTML=``,fn.style.marginRight="5px",vr.appendChild(fn)}oe.typeBoxes.push(vr)},oe=this,Ke=0;Ke<4;Ke++)ce(Ke);return ne},W.prototype.setCurrentType=function($,ne){var ce=this;this.currentType=$,this.typeBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings!==void 0?ce.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(Q),Ne=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.arrowType="end",oe.arrowBaseHeight=10,oe.arrowBaseWidth=10,oe.getArrowPoints=oe.getArrowPoints.bind(oe),oe.setArrowType=oe.setArrowType.bind(oe),oe.arrowTypePanel=new Me("Arrow type","end"),oe.arrowTypePanel.onArrowTypeChanged=oe.setArrowType,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.arrow1&&$!==this.arrow2)},W.prototype.getArrowPoints=function($,ne){var ce=this.arrowBaseWidth+2*this.strokeWidth,oe=this.arrowBaseHeight+2*this.strokeWidth;return $-ce/2+","+(ne+oe/2)+" "+$+","+(ne-oe/2)+" "+($+ce/2)+","+(ne+oe/2)},W.prototype.createTips=function(){this.arrow1=le.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=le.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(le.createTransform()),this.visual.appendChild(this.arrow2)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",le.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),le.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.arrow1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ne,0);var ce=this.arrow2.transform.baseVal.getItem(0);ce.setRotate($+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ce,0)}},W.prototype.setArrowType=function($){this.arrowType=$,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({arrowType:this.arrowType},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.arrowType=ne.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='',W}(ht),xe=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor=ce.defaultFillColor,oe.strokeWidth=0,oe.fillPanel=new Ee("Color",ce.defaultColorSet,ce.defaultFillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="CoverMarker",W.title="Cover marker",W.icon='',W}(ut),Se=function(se){function W($,ne,ce,oe){var Ke=se.call(this,$,oe||'')||this;return Ke.opacities=[],Ke.opacityBoxes=[],Ke.opacities=ne,Ke.currentOpacity=ce,Ke.setCurrentOpacity=Ke.setCurrentOpacity.bind(Ke),Ke}return ve(W,se),W.prototype.getUi=function(){var $=this,ne=document.createElement("div");return ne.style.display="flex",ne.style.overflow="hidden",ne.style.flexGrow="2",ne.style.justifyContent="space-between",this.opacities.forEach(function(ce){var oe=document.createElement("div");oe.style.display="flex",oe.style.alignItems="center",oe.style.justifyContent="center",oe.style.padding="5px",oe.style.borderWidth="2px",oe.style.borderStyle="solid",oe.style.borderColor=ce===$.currentOpacity?$.uiStyleSettings.toolboxAccentColor:"transparent",oe.addEventListener("click",function(){$.setCurrentOpacity(ce,oe)}),ne.appendChild(oe);var Ke=document.createElement("div");Ke.innerText=100*ce+"%",oe.appendChild(Ke),$.opacityBoxes.push(oe)}),ne},W.prototype.setCurrentOpacity=function($,ne){var ce=this;this.currentOpacity=$,this.opacityBoxes.forEach(function(oe){oe.style.borderColor=oe===ne?ce.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(Q),Ae=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.setOpacity=oe.setOpacity.bind(oe),oe.fillColor=ce.defaultHighlightColor,oe.strokeWidth=0,oe.opacity=ce.defaultHighlightOpacity,oe.fillPanel=new Ee("Color",ce.defaultColorSet,oe.fillColor),oe.fillPanel.onColorChanged=oe.setFillColor,oe.opacityPanel=new Se("Opacity",ce.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ve(W,se),W.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="HighlightMarker",W.title="Highlight marker",W.icon='',W}(xe),Le='',Je=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.bgColor="transparent",oe.tipPosition={x:0,y:0},oe.tipBase1Position={x:0,y:0},oe.tipBase2Position={x:0,y:0},oe.tipMoving=!1,oe.color=ce.defaultStrokeColor,oe.bgColor=ce.defaultFillColor,oe.fontFamily=ce.defaultFontFamily,oe.defaultSize={x:100,y:30},oe.setBgColor=oe.setBgColor.bind(oe),oe.getTipPoints=oe.getTipPoints.bind(oe),oe.positionTip=oe.positionTip.bind(oe),oe.setTipPoints=oe.setTipPoints.bind(oe),oe.colorPanel=new Ee("Text color",ce.defaultColorSet,oe.color,''),oe.colorPanel.onColorChanged=oe.setColor,oe.bgColorPanel=new Ee("Fill color",ce.defaultColorSet,oe.bgColor,Le),oe.bgColorPanel.onColorChanged=oe.setBgColor,oe.fontFamilyPanel=new Ze("Font",ce.defaultFontFamilies,ce.defaultFontFamily),oe.fontFamilyPanel.onFontChanged=oe.setFont,oe.tipGrip=new Qe,oe.tipGrip.visual.transform.baseVal.appendItem(le.createTransform()),oe.controlBox.appendChild(oe.tipGrip.visual),oe}return ve(W,se),W.prototype.ownsTarget=function($){return se.prototype.ownsTarget.call(this,$)||this.tipGrip.ownsTarget($)||this.tip===$},W.prototype.createTip=function(){le.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=le.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},W.prototype.pointerDown=function($,ne){this.state==="new"&&se.prototype.pointerDown.call(this,$,ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):se.prototype.pointerDown.call(this,$,ne)},W.prototype.pointerUp=function($){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,se.prototype.pointerUp.call(this,$);else{var ne=this.state==="creating";se.prototype.pointerUp.call(this,$),this.setTipPoints(ne),this.positionTip()}},W.prototype.manipulate=function($){if(this.tipMoving){var ne=this.unrotatePoint($);this.tipPosition={x:ne.x-this.manipulationStartLeft,y:ne.y-this.manipulationStartTop},this.positionTip()}else se.prototype.manipulate.call(this,$)},W.prototype.setBgColor=function($){this.bgRectangle&&this.tip&&(le.setAttributes(this.bgRectangle,[["fill",$]]),le.setAttributes(this.tip,[["fill",$]])),this.bgColor=$,this.fillColorChanged($)},W.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},W.prototype.setTipPoints=function($){$===void 0&&($=!1);var ne=Math.min(this.height/2,15),ce=this.height/5;$&&(this.tipPosition={x:ne+ce/2,y:this.height+20});var oe=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?oe',W}(st),Ve=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.fillColor="transparent",oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.opacity=1,oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.fillColor=ce.defaultFillColor,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setFillColor=oe.setFillColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.setOpacity=oe.setOpacity.bind(oe),oe.createVisual=oe.createVisual.bind(oe),oe.strokePanel=new Ee("Line color",ue(ce.defaultColorSet,["transparent"]),ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.fillPanel=new Ee("Fill color",ue(ce.defaultColorSet,["transparent"]),oe.fillColor,Le),oe.fillPanel.onColorChanged=oe.setFillColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe.opacityPanel=new Se("Opacity",ce.defaultOpacitySteps,oe.opacity),oe.opacityPanel.onOpacityChanged=oe.setOpacity,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual)},W.prototype.createVisual=function(){this.visual=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="new"&&(this.createVisual(),this.moveVisual($),this._state="creating")},W.prototype.manipulate=function($){se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){se.prototype.resize.call(this,$),this.setSize()},W.prototype.setSize=function(){se.prototype.setSize.call(this),le.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},W.prototype.pointerUp=function($){se.prototype.pointerUp.call(this,$),this.setSize()},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.visual&&le.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged($),this.stateChanged()},W.prototype.setFillColor=function($){this.fillColor=$,this.visual&&le.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged($),this.stateChanged()},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.visual&&le.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.visual&&le.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.setOpacity=function($){this.opacity=$,this.visual&&le.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){var ne=$;this.fillColor=ne.fillColor,this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.opacity=ne.opacity,this.createVisual(),se.prototype.restoreState.call(this,$),this.setSize()},W.prototype.scale=function($,ne){se.prototype.scale.call(this,$,ne),this.setSize()},W.typeName="EllipseMarker",W.title="Ellipse marker",W.icon='',W}(nt),gt=function(se){function W($,ne,ce){return se.call(this,$,ne,ce)||this}return ve(W,se),Object.defineProperty(W.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.tip1&&$!==this.tip2)},W.prototype.createTips=function(){this.tip1=le.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(le.createTransform()),this.visual.appendChild(this.tip1),this.tip2=le.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(le.createTransform()),this.visual.appendChild(this.tip2)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(se.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(le.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()]]),le.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 $=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ne=this.tip1.transform.baseVal.getItem(0);ne.setRotate($,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ne,0);var ce=this.tip2.transform.baseVal.getItem(0);ce.setRotate($+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ce,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.icon='',W}(ht),yt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokePanel.colors=ce.defaultColorSet,oe.fillColor="transparent",oe}return ve(W,se),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=se.prototype.getState.call(this);return $.typeName=W.typeName,$},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.icon='',W}(Ve),Bt=function(){function se(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),se.prototype.addUndoStep=function(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},se.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},se.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},se.prototype.undo=function(){if(this.undoStack.length>1){var W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},se.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},se}(),Nt=function(se){function W($,ne,ce){var oe=se.call(this,$,ne,ce)||this;return oe.strokeColor="transparent",oe.strokeWidth=0,oe.strokeDasharray="",oe.curveX=0,oe.curveY=0,oe.manipulationStartCurveX=0,oe.manipulationStartCurveY=0,oe.setStrokeColor=oe.setStrokeColor.bind(oe),oe.setStrokeWidth=oe.setStrokeWidth.bind(oe),oe.setStrokeDasharray=oe.setStrokeDasharray.bind(oe),oe.positionGrips=oe.positionGrips.bind(oe),oe.addControlGrips=oe.addControlGrips.bind(oe),oe.adjustVisual=oe.adjustVisual.bind(oe),oe.setupControlBox=oe.setupControlBox.bind(oe),oe.resize=oe.resize.bind(oe),oe.strokeColor=ce.defaultColor,oe.strokeWidth=ce.defaultStrokeWidth,oe.strokeDasharray=ce.defaultStrokeDasharray,oe.strokePanel=new Ee("Line color",ce.defaultColorSet,ce.defaultColor),oe.strokePanel.onColorChanged=oe.setStrokeColor,oe.strokeWidthPanel=new dt("Line width",ce.defaultStrokeWidths,ce.defaultStrokeWidth),oe.strokeWidthPanel.onWidthChanged=oe.setStrokeWidth,oe.strokeStylePanel=new mt("Line style",ce.defaultStrokeDasharrays,ce.defaultStrokeDasharray),oe.strokeStylePanel.onStyleChanged=oe.setStrokeDasharray,oe}return ve(W,se),W.prototype.ownsTarget=function($){return!(!se.prototype.ownsTarget.call(this,$)&&$!==this.visual&&$!==this.selectorCurve&&$!==this.visibleCurve&&!this.curveGrip.ownsTarget($))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=le.createGroup(),this.selectorCurve=le.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=le.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)},W.prototype.pointerDown=function($,ne){se.prototype.pointerDown.call(this,$,ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=$.x,this.curveY=$.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),le.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),le.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),le.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setupControlBox=function(){se.prototype.setupControlBox.call(this),this.curveControlLine1=le.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=le.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)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,se.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){se.prototype.positionGrips.call(this);var $=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-$/2,this.curveY-$/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()))},W.prototype.manipulate=function($){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+$.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+$.y-this.manipulationStartY),se.prototype.manipulate.call(this,$)},W.prototype.resize=function($){this.activeGrip===this.curveGrip&&(this.curveX=$.x,this.curveY=$.y),se.prototype.resize.call(this,$),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function($){this.strokeColor=$,this.adjustVisual(),this.colorChanged($)},W.prototype.setStrokeWidth=function($){this.strokeWidth=$,this.adjustVisual()},W.prototype.setStrokeDasharray=function($){this.strokeDasharray=$,this.adjustVisual()},W.prototype.scale=function($,ne){this.curveX=this.curveX*$,this.curveY=this.curveY*ne,se.prototype.scale.call(this,$,ne)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var $=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},se.prototype.getState.call(this));return $.typeName=W.typeName,$},W.prototype.restoreState=function($){se.prototype.restoreState.call(this,$);var ne=$;this.strokeColor=ne.strokeColor,this.strokeWidth=ne.strokeWidth,this.strokeDasharray=ne.strokeDasharray,this.curveX=ne.curveX,this.curveY=ne.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.icon='',W}(at),mr=function(){function se(W,$){$===void 0&&($=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=$}return Object.defineProperty(se.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),se.prototype.preventDefault=function(){this._defaultPrevented=!0},se}(),hr=function(se){function W($,ne,ce){var oe=se.call(this,$,!1)||this;return oe.dataUrl=ne,oe.state=ce,oe}return ve(W,se),W}(mr),St=function(se){function W($,ne,ce){ce===void 0&&(ce=!1);var oe=se.call(this,$,ce)||this;return oe.marker=ne,oe}return ve(W,se),W}(mr),$r=function(){function se(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return se.prototype.addEventListener=function(W,$){this[W].push($)},se.prototype.removeEventListener=function(W,$){var ne=this[W].indexOf($);ne>-1&&this[W].splice(ne,1)},se}(),Xr=function(){function se(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new Bt,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 $r,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=se.instanceCounter++,this.styles=new ee(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(se.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,yt,Ve,Ae,Je,gt,xe,ht,Nt]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Ve,Ae,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,Ue,Ne,st,Ae]},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var $=this;this._availableMarkerTypes.splice(0),W.forEach(function(ne){if(typeof ne=="string"){var ce=$.ALL_MARKER_TYPES.find(function(oe){return oe.typeName===ne});ce!==void 0&&$._availableMarkerTypes.push(ce)}else $._availableMarkerTypes.push(ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(W){this._zoomLevel=W,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},se.prototype.show=function(){var W=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($){return $(new mr(W))})},se.prototype.render=function(){return Te(this,void 0,void 0,function(){var W;return be(this,function($){switch($.label){case 0:return this.setCurrentMarker(),(W=new fe).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return $.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,$.sent()]}})})},se.prototype.close=function(W){var $=this;if(W===void 0&&(W=!1),this.isOpen){var ne=!1;W||this.eventListeners.beforeclose.forEach(function(ce){var oe=new mr($,!0);ce(oe),oe.defaultPrevented&&(ne=!0)}),ne||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(ce){return ce(new mr($))}),this.detachEvents(),this._isOpen=!1)}},se.prototype.addMarkersToToolbar=function(){for(var W,$=[],ne=0;nethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,ne=$',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},se.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},se.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},se.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},se.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"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(W),1),W.dispose()},se.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},se.prototype.toolbarButtonClicked=function(W,$){if(W==="marker"&&$!==void 0)this.createNewMarker($);else if(W==="action")switch($){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},se.prototype.deleteSelectedMarker=function(){var W=this;if(this._currentMarker!==void 0){var $=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ce){var oe=new St(W,W._currentMarker,!0);ce(oe),oe.defaultPrevented&&($=!0)}),!$){var ne=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(ce){return ce(new St(W,ne))})}}},se.prototype.clear=function(){var W=this,$=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ke){var At=new St(W,void 0,!0);Ke(At),At.defaultPrevented&&($=!0)}),!$)){this.setCurrentMarker();for(var ne=function(Ke){var At=ce.markers[Ke];ce.setCurrentMarker(ce.markers[Ke]),ce._currentMarker.dispose(),ce.markerImage.removeChild(ce._currentMarker.container),ce.markers.splice(ce.markers.indexOf(ce._currentMarker),1),ce.eventListeners.markerdelete.forEach(function(Vt){return Vt(new St(W,At))})},ce=this,oe=this.markers.length-1;oe>=0;oe--)ne(oe);this.addUndoStep()}},Object.defineProperty(se.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),se.prototype.showNotesEditor=function(){var W;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=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",this.overlayContainer.appendChild(this.notesArea))},se.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},se.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},se.prototype.addUndoStep=function(){var W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var $=this.getState(),ne=this.undoRedoManager.getLastUndoStep();if(!ne||ne.width===$.width&&ne.height===$.height){var ce=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep($),ce1&&this.panTo({x:W.clientX,y:W.clientY}))},se.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},se.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},se.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.markerImage.getBoundingClientRect();return{x:(W-ne.left)/this.zoomLevel,y:($-ne.top)/this.zoomLevel}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},se.prototype.addLicenseKey=function(W){re.addKey(W)},se.prototype.addEventListener=function(W,$){this.eventListeners.addEventListener(W,$)},se.prototype.removeEventListener=function(W,$){this.eventListeners.removeEventListener(W,$)},se.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(se.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),se.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function($){return $(new mr(W))}))},se.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function($){return $(new mr(W))}))},se.instanceCounter=0,se}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ur=function(se,W){return(Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,ne){$.__proto__=ne}||function($,ne){for(var ce in ne)Object.prototype.hasOwnProperty.call(ne,ce)&&($[ce]=ne[ce])})(se,W)};function sn(se,W){if(typeof W!="function"&&W!==null)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function $(){this.constructor=se}Ur(se,W),se.prototype=W===null?Object.create(W):($.prototype=W.prototype,new $)}function Rr(se,W,$,ne){return new($||($=Promise))(function(ce,oe){function Ke(vr){try{Vt(ne.next(vr))}catch(Pt){oe(Pt)}}function At(vr){try{Vt(ne.throw(vr))}catch(Pt){oe(Pt)}}function Vt(vr){var Pt;vr.done?ce(vr.value):(Pt=vr.value,Pt instanceof $?Pt:new $(function(Br){Br(Pt)})).then(Ke,At)}Vt((ne=ne.apply(se,W||[])).next())})}function mn(se,W){var $,ne,ce,oe,Ke={label:0,sent:function(){if(1&ce[0])throw ce[1];return ce[1]},trys:[],ops:[]};return oe={next:At(0),throw:At(1),return:At(2)},typeof Symbol=="function"&&(oe[Symbol.iterator]=function(){return this}),oe;function At(Vt){return function(vr){return function(Pt){if($)throw new TypeError("Generator is already executing.");for(;Ke;)try{if($=1,ne&&(ce=2&Pt[0]?ne.return:Pt[0]?ne.throw||((ce=ne.return)&&ce.call(ne),0):ne.next)&&!(ce=ce.call(ne,Pt[1])).done)return ce;switch(ne=0,ce&&(Pt=[2&Pt[0],ce.value]),Pt[0]){case 0:case 1:ce=Pt;break;case 4:return Ke.label++,{value:Pt[1],done:!1};case 5:Ke.label++,ne=Pt[1],Pt=[0];continue;case 7:Pt=Ke.ops.pop(),Ke.trys.pop();continue;default:if(!(ce=Ke.trys,(ce=ce.length>0&&ce[ce.length-1])||Pt[0]!==6&&Pt[0]!==2)){Ke=0;continue}if(Pt[0]===3&&(!ce||Pt[1]>ce[0]&&Pt[1]0&&$>0){var ne=new Gn(W,$),ce=ne.ratio>=1?20:ne.getHorizontalLength(20),oe=ne.ratio<1?20:ne.getVerticalLength(20),Ke=document.createElementNS("http://www.w3.org/2000/svg","svg");Ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ke.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ke);var At=Gt.createDefs();Ke.appendChild(At);var Vt=Gt.createElement("clipPath",[["id","text-bg-clip"]]);At.appendChild(Vt);var vr=Gt.createPath(Gt.getHollowRectanglePath((24-ce)/2,(24-oe)/2,ce,oe,(24-ce)/2+2,(24-oe)/2+2,ce-4,oe-4));Ke.appendChild(vr);var Pt=Gt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Pt.appendChild(Gt.createTSpan(W+":"+$)),Ke.appendChild(Pt);var Br=Pt.getBBox();Gt.setAttributes(Pt,[["x",((24-Br.width)/2).toString()],["y",((24-Br.height)/2-Br.y).toString()]]);var jr=Gt.createPath(Gt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Br.width))/2,(24-Math.ceil(Br.height))/2,Math.ceil(Br.width),Math.ceil(Br.height)));return Vt.appendChild(jr),Gt.setAttributes(vr,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ke),Ke.outerHTML}return''},se}(),Vn=function(se){function W($,ne,ce){var oe=se.call(this,$,ne)||this;return oe.isDropdownOpen=!1,oe.onClick=oe.dropdownButtonClicked,oe.dropdownButtons=ce,oe}return sn(W,se),W.prototype.setupDropdown=function(){var $=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ne){ne.className=$.className,ne.colorsClassName=$.colorsClassName,$.dropdownBlock.appendChild(ne.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},W.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},W.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},W.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},W.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},W.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},W}(hn),Yr=function(){function se(W,$){this.GRIP_SIZE=10,this.color=W,this.fillColor=$,this.visual=Gt.createGroup(),this.visual.appendChild(Gt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Gt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return se.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},se.prototype.setCenter=function(W,$){this.visual.childNodes.forEach(function(ne){return Gt.setAttributes(ne,[["cx",W.toString()],["cy",$.toString()]])})},se}(),Un=function(){function se(W,$,ne,ce){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=W,this.canvasHeight=$,this.margin=ne,this.container=ce,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(se.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(W){this._aspectRatio=W,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.gridContainer&&Gt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(W){this._zoomFactor=W,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),se.prototype.open=function(){var W=this;this.cropShadeElement=Gt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Gt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var $=0;$this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-$.height/2),Gt.setAttributes(this.cropRectElement,[["x",$.x.toString()],["y",$.y.toString()],["width",$.width.toString()],["height",$.height.toString()]]);var ne=$.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(oe,Ke){var At=$.y+ne*(Ke+1);Gt.setAttributes(oe,[["x1",""+$.x],["y1",""+At],["x2",""+($.x+$.width)],["y2",""+At]])});var ce=$.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(oe,Ke){var At=$.x+ce*(Ke+1);Gt.setAttributes(oe,[["x1",""+At],["y1",""+$.y],["x2",""+At],["y2",""+($.y+$.height)]])}),Gt.setAttributes(this.cropShadeElement,[["d",Gt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,$.x,$.y,$.width,$.height)]]),this.topLeftGrip.setCenter($.x,$.y),this.topRightGrip.setCenter($.x+$.width,$.y),this.bottomLeftGrip.setCenter($.x,$.y+$.height),this.bottomRightGrip.setCenter($.x+$.width,$.y+$.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},se.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.container.getBoundingClientRect();return{x:W-ne.left+this.margin,y:$-ne.top+this.margin}},se.prototype.onPointerDown=function(W){this.container.setPointerCapture(W.pointerId),this.previousPoint=this.clientToLocalCoordinates(W.clientX,W.clientY),this.cropRectElement===W.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(W.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(W.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(W.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(W.target)&&(this.activeGrip=this.bottomRightGrip)},se.prototype.onPointerMove=function(W){if(this.isMoving)this.move(this.clientToLocalCoordinates(W.clientX,W.clientY));else if(this.activeGrip){var $=this.clientToLocalCoordinates(W.clientX,W.clientY);this.resize($)}W.preventDefault()},se.prototype.onPointerUp=function(W){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(W.pointerId)},se.prototype.move=function(W){var $=W.x-this.previousPoint.x,ne=W.y-this.previousPoint.y;this.zoomFactor!==1&&($=-$/this.zoomFactor,ne=-ne/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+$),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ne),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=W},se.prototype.resize=function(W){var $=Object.assign({},this.cropRect),ne=W.x-this.previousPoint.x,ce=W.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:$.x+nethis.canvasWidth*this.zoomFactor&&(ne=this.canvasWidth*this.zoomFactor-$.width),$.width+=ne}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?($.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ne),$.height=this.aspectRatio.getVerticalLength($.width)):($.y+=ce,$.height=this.cropRect.y+this.cropRect.height-$.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?$.height=this.aspectRatio.getVerticalLength($.width):$.height+=ce}$.width<10&&($.x=this.cropRect.x,$.width=10),$.height<10&&($.y=this.cropRect.y,$.height=10),this.previousPoint=W,$.x>=this.margin&&$.y>=this.margin&&$.x-this.margin+$.width<=this.canvasWidth&&$.y-this.margin+$.height<=this.canvasHeight&&(this.cropRect=$,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},se.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var W=this.cropRect.x+this.cropRect.width/2,$=this.cropRect.y+this.cropRect.height/2,ne=this.aspectRatio.getHorizontalLength(this.cropRect.height),ce=this.aspectRatio.getVerticalLength(this.cropRect.width);ne/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=W-this.cropRect.width/2,this.cropRect.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)}},se.prototype.getRescaledRect=function(W,$,ne,ce,oe,Ke){var At=ne/W,Vt=ce/$;return{x:(oe.x-Ke)*At+Ke,y:(oe.y-Ke)*Vt+Ke,width:oe.width*At,height:oe.height*Vt}},se.prototype.scaleCanvas=function(W,$){var ne=this.getRescaledRect(this.canvasWidth,this.canvasHeight,W,$,this.cropRect,this.margin);this.canvasWidth=W,this.canvasHeight=$,this.onCropChange&&this.onCropChange(ne),this.setCropRectangle(ne)},se}(),ui=function(){function se(W){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=W,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(se.prototype,"angle",{get:function(){return this._angle},set:function(W){this._angle=W,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),se.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},se.prototype.onPointerDown=function(W){this.controlContainer.setPointerCapture(W.pointerId),this.isDragging=!0,this.previousPoint={x:W.clientX,y:W.clientY}},se.prototype.onPointerMove=function(W){this.isDragging&&(this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.previousPoint.x=W.clientX)},se.prototype.onPointerUp=function(W){this.isDragging&&this.onAngleChange&&this.onAngleChange((W.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(W.pointerId)},se.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var W=this.angleLabelText.getBBox();Gt.setAttributes(this.angleLabelElement,[["x",((this.width-W.width)/2).toString()],["y",(this.height/2).toString()]])}},se.prototype.positionScaleShape=function(){if(this.scaleShape){var W=this.scaleShape.transform.baseVal.getItem(0);W.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(W,0)}},se.prototype.getVisual=function(){var W=document.createElementNS("http://www.w3.org/2000/svg","svg");W.setAttribute("xmlns","http://www.w3.org/2000/svg"),W.setAttribute("width",this.width+"px"),W.setAttribute("height",this.height+"px"),W.setAttribute("viewBox","0 0 "+this.width+" "+this.height),W.style.flexShrink="0",document.body.appendChild(W);for(var $="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ne=1;ne<=this.width/5+10;ne++){var ce=ne%5==0?this.height/3:this.height/6;$+="h4v"+-ce+"h1v"+ce}$+="v1H0Z",this.scaleShape=Gt.createPath($);var oe=Gt.createTransform();this.scaleShape.transform.baseVal.appendItem(oe),W.appendChild(this.scaleShape),this.angleLabelElement=Gt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Gt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ke=Gt.createTSpan("");return Ke.innerHTML="°",this.angleLabelElement.appendChild(Ke),W.appendChild(this.angleLabelElement),document.body.removeChild(W),W},se}(),ci=function(){function se(){this.naturalSize=!1,this.imageType="image/png"}return se.prototype.rasterize=function(W,$,ne,ce,oe,Ke,At){var Vt=this;return new Promise(function(vr){var Pt=document.createElement("canvas");Pt.width=W.width.baseVal.value-2*ce,Pt.height=W.height.baseVal.value-2*ce;var Br=1,jr=1;Vt.naturalSize===!0?(Br=$.naturalWidth/(W.width.baseVal.value-2*ce)/Ke,jr=$.naturalHeight/(W.height.baseVal.value-2*ce)/At,Pt.width=$.naturalWidth/Ke,Pt.height=$.naturalHeight/At):Vt.width!==void 0&&Vt.height!==void 0&&(Br=Vt.width/ne.width,jr=Vt.height/ne.height,Pt.width*=Br,Pt.height*=jr);var fn=Pt.getContext("2d");fn.translate(Pt.width/2,Pt.height/2),fn.rotate(oe*Math.PI/180),fn.scale(Ke,At),fn.translate(-Pt.width/2,-Pt.height/2),fn.drawImage($,0,0,Pt.width,Pt.height);var ti=document.createElement("canvas");ti.width=ne.width*Br,ti.height=ne.height*jr,ti.getContext("2d").putImageData(fn.getImageData((ne.x-ce)*Br,(ne.y-ce)*jr,ne.width*Br,ne.height*jr),0,0),vr(ti.toDataURL(Vt.imageType,Vt.imageQuality))})},se}(),jt=function(){function se(W){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=se.instanceCounter++,this.styles=new Cn(this.instanceNo),this.target=W,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(se.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(W){this._zoomToCropEnabled=W,W?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(W){this._isGridVisible=W,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"gridLines",{get:function(){return this._gridLines},set:function(W){this._gridLines=W,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(W){this._rotationAngle=W,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"aspectRatio",{get:function(){var W;return(W=this._aspectRatio)!==null&&W!==void 0?W:this.aspectRatios[0]},set:function(W){this._aspectRatio=W},enumerable:!1,configurable:!0}),se.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},se.prototype.show=function(){this.showUI(),this.open()},se.prototype.close=function(W){W===void 0&&(W=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),W||this.closeEventListeners.forEach(function($){return $()}),this._isOpen=!1)},se.prototype.addRenderEventListener=function(W){this.renderEventListeners.push(W)},se.prototype.removeRenderEventListener=function(W){this.renderEventListeners.indexOf(W)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(W),1)},se.prototype.addCloseEventListener=function(W){this.closeEventListeners.push(W)},se.prototype.removeCloseEventListener=function(W){this.closeEventListeners.indexOf(W)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(W),1)},se.prototype.setupResizeObserver=function(){var W=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},se.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var W=1*this.target.clientWidth/this.target.clientHeight,$=this.contentDiv.clientWidth/W>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*W:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ne=$+2*this.CANVAS_MARGINW+this.CANVAS_MARGIN?this.target.offsetTop-(W+this.CANVAS_MARGIN):0;this.coverDiv.style.top=$+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},se.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},se.prototype.addTopToolbar=function(){var W=this;this.topToolbar=new xn,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 $=new Ti;$.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock($);var ne=[];this.aspectRatios.forEach(function(jr){var fn=new hn(pi.getIcon(jr.horizontal,jr.vertical),jr.horizontal===0&&jr.vertical===0?"FREE":jr.horizontal+":"+jr.vertical);fn.onClick=function(){return W.ratioButtonClicked(jr)},ne.push(fn)}),this.aspectRatioButton=new Vn(pi.getIcon(0,0),"Aspect ratio",ne),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,$.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ce=new hn('',"Toggle grid");ce.isActive=this.isGridVisible,ce.onClick=function(){W.isGridVisible=!W.isGridVisible,ce.isActive=W.isGridVisible},$.addButton(ce);var oe=new hn('',"Zoom to selection");if(oe.isActive=this.zoomToCropEnabled,oe.onClick=function(){W.zoomToCropEnabled=!W.zoomToCropEnabled,oe.isActive=W.zoomToCropEnabled},$.addButton(oe),!vn.isLicensed){var Ke=new cr;this.topToolbar.addElementBlock(Ke);var At=document.createElement("div");At.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Vt=document.createElement("a");Vt.style.color="currentColor",Vt.href="https://markerjs.com/products/cropro",Vt.target="_blank",Vt.innerHTML='',At.appendChild(Vt),Ke.addElement(At)}var vr=new Ti;vr.minWidth=3*this.toolbarHeight+"px",vr.contentAlign="end",this.topToolbar.addButtonBlock(vr);var Pt=new hn('',"OK");Pt.onClick=this.startRenderAndClose,vr.addButton(Pt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Br=new hn('',"Close");Br.onClick=this.close,vr.addButton(Br),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Br.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},se.prototype.addBottomToolbar=function(){var W=this;this.bottomToolbar=new xn,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 $=new Ti;$.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock($);var ne=new hn('',"Rotate left");ne.onClick=this.rotateLeftButtonClicked,$.addButton(ne);var ce=new hn('',"Rotate right");ce.onClick=this.rotateRightButtonClicked,$.addButton(ce);var oe=new cr;oe.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(oe),this.straightener=new ui("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(vr){W.rotateBy(vr),W.straightener.angle=W.rotationAngle},oe.addElement(this.straightener.getUI());var Ke=new Ti;Ke.minWidth=2*this.toolbarHeight+"px",Ke.contentAlign="end",this.bottomToolbar.addButtonBlock(Ke);var At=new hn('',"Flip horizontal");At.onClick=this.flipHorizontallyButtonClicked,Ke.addButton(At);var Vt=new hn('',"Flip vertical");Vt.onClick=this.flipVerticallyButtonClicked,Ke.addButton(Vt)},se.prototype.ratioButtonClicked=function(W){this.aspectRatio=W,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},se.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=pi.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},se.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Gn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},se.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},se.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},se.prototype.restoreState=function(W){if(W){var $=this.cropLayer.getRescaledRect(W.width,W.height,this.imageWidth,this.imageHeight,W.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle($),this.cropRectChanged($),this.flippedHorizontally=W.flippedHorizontally,this.flippedVertically=W.flippedVertically,this.applyFlip(),this.rotationAngle=W.rotationAngle,this.applyRotation()}},se.prototype.clientToLocalCoordinates=function(W,$){var ne=this.cropImage.getBoundingClientRect();return{x:W-ne.left,y:$-ne.top}},se.prototype.onWindowResize=function(){this.positionUI()},se.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var W=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},se.prototype.rotateLeftButtonClicked=function(){var W=this.rotationAngle-90;this.rotationAngle%90!=0&&(W+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(W)},se.prototype.rotateRightButtonClicked=function(){var W=this.rotationAngle+90;this.rotationAngle%90!=0&&(W-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(W)},se.prototype.rotateTo=function(W){W=(W=W>180?W-360:W)<=-180?W+360:W,this.rotationAngle=W,this.applyRotation()},se.prototype.rotateBy=function(W){this.rotateTo((this.rotationAngle+W)%360)},se.prototype.applyRotation=function(){var W=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var $=this.editingTargetRotationContainer.transform.baseVal.getItem(0);$.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem($,0);var ne=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ne.width,this.imageHeight/ne.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=W},se.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},se.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},se.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},se.prototype.startRenderAndClose=function(){return Rr(this,void 0,void 0,function(){var W,$;return mn(this,function(ne){switch(ne.label){case 0:return[4,this.render()];case 1:return W=ne.sent(),$=this.getState(),this.renderEventListeners.forEach(function(ce){return ce(W,$)}),this.close(!0),[2]}})})},se.prototype.render=function(){return Rr(this,void 0,void 0,function(){var W;return mn(this,function($){switch($.label){case 0:return(W=new ci).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.width=this.renderWidth,W.height=this.renderHeight,this.unzoomFromCrop(),Gt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,W.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 $.sent(),[4,W.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,$.sent()]}})})},se.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Sn("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var W=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Sn("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*W)+`px;
height: `+(this.toolbarHeight-2*W)+`px;
padding: `+W+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Sn("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new yn("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new yn("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Sn("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 Sn("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*W)+`px;
padding: `+W+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Sn("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},se.instanceCounter=0,se}(),_r=L("8hTe"),ai=L.n(_r),Oi=/]*>/g;function Ai(se){var W=document.createElement("div");return W.innerHTML=se,W.childNodes.length===0?"":W.childNodes[0].nodeValue}var Ri=Z.a=function(se){var W=se.value,$=W===void 0?"":W,ne=se.edit,ce=ne===void 0?!1:ne,oe=se.className,Ke=se.showTextOnly,At=se.showLines,Vt=se.replaces,vr=se.zoomImg,Pt=se.hasMask,Br=se.style,jr=Br===void 0?{}:Br,fn=se.stylesPrev,ti=fn===void 0?{}:fn,mi=String($),Rn=Object(s.useRef)(),Li=Object(s.useRef)(),qi=Object(s.useState)(""),Qn=Object(C.a)(qi,2),_i=Qn[0],vi=Qn[1],Fi=Object(s.useState)("office"),gi=Object(C.a)(Fi,2),Gi=gi[0],Mi=gi[1],oa=function(){var pt=new jt(Li.current);pt.displayMode="popup",pt.addRenderEventListener(function(){var _t=Object(p.a)(l.a.mark(function Mt(Dt){var Ht;return l.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return Rn.current.style.display="none",ct.next=3,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt}});case 3:Ht=ct.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 5:case"end":return ct.stop()}},Mt)}));return function(Mt){return _t.apply(this,arguments)}}()),pt.show()},sa=function(){var pt=new Xr(Li.current);pt.settings.displayMode="popup",pt.addEventListener("render",function(){var _t=Object(p.a)(l.a.mark(function Mt(Dt){var Ht;return l.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(Rn.current.style.display="none",!Li.current){ct.next=6;break}return ct.next=4,Object(Re.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Dt.dataUrl}});case 4:Ht=ct.sent,Ht!=null&&Ht.id&&Vt(Li.current.getAttribute("src").replace(ae.a.API_SERVER,""),"/api/attachments/".concat(Ht==null?void 0:Ht.id,"?type=").concat(Ht.content_type));case 6:case"end":return ct.stop()}},Mt)}));return function(Mt){return _t.apply(this,arguments)}}()),pt.show(),window.markerArea=pt},Ii=Object(s.useMemo)(function(){try{var tt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_t=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;mi=mi.replace(tt,"("+ae.a.API_SERVER+"/api/attachments/").replace(pt,'"'+ae.a.API_SERVER+"/api/attachments/").replace(_t,'"'+ae.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,`
`),mi=mi.replace(new RegExp("(?[TOC]
",k()),S()),Mt=Mt.replace(/(__special_katext_id_\d+__)/g,function(Wt,ct){var Ot=Dt[ct],Rt=Ot.type,fr=Ot.expression;return Object(he.renderToString)(Ai(fr)||"",{displayMode:Rt==="block",throwOnError:!1,output:"html"})}),Mt=Mt.replace(/▁/g,"\u2581\u2581\u2581"),N(),Ke){var Ht=document.createElement("div");return Ht.innerHTML=Mt,Ht.innerText}return setTimeout(function(){return ta()},500),Mt},[mi]),Xn=Object(s.useRef)();x.WebkitLineClamp=At,At&&(jr=Object(u.a)(Object(u.a)({},jr),x));function Vi(tt){var pt=tt.target;if(pt.tagName.toUpperCase()==="IMG"){if(vr){var _t=pt.getAttribute("src");vi(_t),Mi("image")}}else if(pt.tagName.toUpperCase()==="A"){var Mt=pt.getAttribute("href");if(Mt.indexOf("office")>-1)tt.preventDefault(),vi(Mt),Mi("office");else if(Mt.indexOf("application/pdf")>-1)tt.preventDefault(),vi(Mt),Mi("pdf");else if(Mt.indexOf("type=text")>-1)tt.preventDefault(),vi(Mt),Mi("html");else if(Mt.startsWith("#")){tt.preventDefault();var Dt=document.getElementById(Mt.replace("#",""));Dt&&Dt.scrollIntoView(!0)}}}var ta=function(){var pt,_t=(pt=Xn.current)===null||pt===void 0?void 0:pt.querySelectorAll("video");_t==null||_t.forEach(function(Mt){if(Mt.oncontextmenu=function(){return!1},Mt.src.indexOf(".m3u8")>-1&&!Mt.canPlayType("application/vnd.apple.mpegurl")){if(V.a.isSupported()){var Dt=new V.a;Dt.loadSource(Mt.src),Dt.attachMedia(Mt)}}})};Object(s.useEffect)(function(){if(Xn.current&&Ii&&(Ii.match(Oi)&&window.PR.prettyPrint()),Xn.current)return Xn.current.addEventListener("click",Vi),function(){Xn.current.removeEventListener("click",Vi),N(),S()}},[Ii,Xn.current,Vi]);var Ct=function(pt){if(!ce)return;pt.target.nodeName==="IMG"?(Rn.current.style.display="flex",Rn.current.style.width=pt.target.clientWidth+"px",Rn.current.style.height=pt.target.clientHeight+"px",Rn.current.style.top=pt.target.offsetTop+"px",Rn.current.style.left=pt.target.offsetLeft+"px",Li.current.src=pt.target.getAttribute("src")):Rn.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Xn,style:Object(u.a)({},jr),className:"".concat(oe||""," markdown-body ").concat(ai.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:Ii}}),n.a.createElement("div",{ref:Rn,className:ai.a.button},n.a.createElement(d.a,null,n.a.createElement(D.a,{onClick:function(){return oa()}},"\u88C1\u526A"),n.a.createElement(D.a,{onClick:function(){return sa()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:Li,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(pe.a,{close:!0,data:_i,hasMask:Pt,type:_i!=null&&_i.length?Gi:"",style:Object(u.a)({},ti),onClose:function(){return vi("")}}))}},"9OqN":function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.CTR=function(){var d=P.lib.BlockCipherMode.extend(),T=d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=this._iv,l=this._counter;E&&(l=this._counter=E.slice(0),this._iv=void 0);var s=l.slice(0);p.encryptBlock(s,0),l[C-1]=l[C-1]+1|0;for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var s=document.createElement("style");if((E=l.csp)===null||E===void 0?void 0:E.nonce){var n;s.nonce=(n=l.csp)===null||n===void 0?void 0:n.nonce}s.innerHTML=C;var h=T(l),f=h.firstChild;return l.prepend&&h.prepend?h.prepend(s):l.prepend&&f?h.insertBefore(s,f):h.appendChild(s),s}var u=new Map;function p(C,E){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=T(l);if(!u.has(s)){var n=D("",l),h=n.parentNode;u.set(s,h),h.removeChild(n)}var f=Array.from(u.get(s).children).find(function(i){return i.tagName==="STYLE"&&i[d]===E});if(f){var c,m;if(((c=l.csp)===null||c===void 0?void 0:c.nonce)&&f.nonce!==((m=l.csp)===null||m===void 0?void 0:m.nonce)){var _;f.nonce=(_=l.csp)===null||_===void 0?void 0:_.nonce}return f.innerHTML!==C&&(f.innerHTML=C),f}var y=D(C,l);return y[d]=E,y}},Bd2K:function(j,Z,L){(function(P){P(L("VrN/"),L("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(l,s,n){if(n!=P.Init&&n&&l.removeKeyMap("autoCloseTags"),!s)return;var h={name:"autoCloseTags"};(typeof s!="object"||s.whenClosing!==!1)&&(h["'/'"]=function(f){return p(f)}),(typeof s!="object"||s.whenOpening!==!1)&&(h["'>'"]=function(f){return D(f)}),l.addKeyMap(h)});var d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function D(l){if(l.getOption("disableInput"))return P.Pass;for(var s=l.listSelections(),n=[],h=l.getOption("autoCloseTags"),f=0;fc.ch&&(a=a.slice(0,a.length-m.end+c.ch));var o=a.toLowerCase();if(!a||m.type=="string"&&(m.end!=c.ch||!/[\"\']/.test(m.string.charAt(m.string.length-1))||m.string.length==1)||m.type=="tag"&&i.close||m.string.indexOf("/")==c.ch-m.start-1||S&&C(S,o)>-1||E(l,_.mode.xmlCurrentContext&&_.mode.xmlCurrentContext(y)||[],a,c,!0))return P.Pass;var k=typeof h=="object"&&h.emptyTags;if(k&&C(k,a)>-1){n[f]={text:"/>",newPos:P.Pos(c.line,c.ch+2)};continue}var O=x&&C(x,o)>-1;n[f]={indent:O,text:">"+(O?`
`:"")+""+a+">",newPos:O?P.Pos(c.line+1,0):P.Pos(c.line,c.ch+1)}}for(var b=typeof h=="object"&&h.dontIndentOnAutoClose,f=s.length-1;f>=0;f--){var v=n[f];l.replaceRange(v.text,s[f].head,s[f].anchor,"+insert");var g=l.listSelections().slice(0);g[f]={head:v.newPos,anchor:v.newPos},l.setSelections(g),!b&&v.indent&&(l.indentLine(v.newPos.line,null,!0),l.indentLine(v.newPos.line+1,null,!0))}}function u(l,s){for(var n=l.listSelections(),h=[],f=s?"/":"",c=l.getOption("autoCloseTags"),m=typeof c=="object"&&c.dontIndentOnSlash,_=0;_"&&(S+=">"),h[_]=S}if(l.replaceSelections(h),n=l.listSelections(),!m)for(var _=0;_=0&&s[y]==n;y--)++_;h=m.to;for(var y=1;y<_;y++){var i=P.scanForClosingTag(l,h,null,c);if(!i||i.tag!=n)return!1;h=i.to}return!0}})},BjJ7:function(j,Z,L){"use strict";L.d(Z,"d",function(){return d}),L.d(Z,"c",function(){return T}),L.d(Z,"e",function(){return D}),L.d(Z,"b",function(){return u}),L.d(Z,"a",function(){return C});var P=L("m3rI");function d(E){var l=!0;if(E.length>0){for(var s=0;s1&&arguments[1]!==void 0?arguments[1]:"",s=[],n=0;nUe.length)&&(Me=Ue.length);for(var Ne=0,xe=new Array(Me);Ne=Ue.length?{done:!0}:{done:!1,value:Ue[xe++]}}}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 Ne=Ue[Symbol.iterator](),Ne.next.bind(Ne)}function p(Ue,Me){return Me={exports:{}},Ue(Me,Me.exports),Me.exports}var C=p(function(Ue){function Me(){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 Ne(xe){Ue.exports.defaults=xe}Ue.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ne}}),E=C.defaults,l=C.getDefaults,s=C.changeDefaults,n=/[&<>"']/,h=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,m={"&":"&","<":"<",">":">",'"':""","'":"'"},_=function(Me){return m[Me]};function y(Ue,Me){if(Me){if(n.test(Ue))return Ue.replace(h,_)}else if(f.test(Ue))return Ue.replace(c,_);return Ue}var i=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(Ue){return Ue.replace(i,function(Me,Ne){return Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(Ue,Me){Ue=Ue.source||Ue,Me=Me||"";var Ne={replace:function(Se,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(t,"$1"),Ue=Ue.replace(Se,Ae),Ne},getRegex:function(){return new RegExp(Ue,Me)}};return Ne}var x=/[^\w:]/g,o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ue,Me,Ne){if(Ue){var xe;try{xe=decodeURIComponent(a(Ne)).replace(x,"").toLowerCase()}catch(Se){return null}if(xe.indexOf("javascript:")===0||xe.indexOf("vbscript:")===0||xe.indexOf("data:")===0)return null}Me&&!o.test(Ne)&&(Ne=w(Me,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Se){return null}return Ne}var O={},b=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(Ue,Me){O[" "+Ue]||(b.test(Ue)?O[" "+Ue]=Ue+"/":O[" "+Ue]=G(Ue,"/",!0)),Ue=O[" "+Ue];var Ne=Ue.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ne?Me:Ue.replace(v,"$1")+Me:Me.charAt(0)==="/"?Ne?Me:Ue.replace(g,"$1")+Me:Ue+Me}var M={exec:function(){}};function N(Ue){for(var Me=1,Ne,xe;Me=0&&Je[gt]==="\\";)Ve=!Ve;return Ve?"|":" |"}),xe=Ne.split(/ \|/),Se=0;if(xe.length>Me)xe.splice(Me);else for(;xe.length=xe.length?Se.slice(xe.length):Se}).join(`
`)}var ke=function(){function Ue(Ne){this.options=Ne||U}var Me=Ue.prototype;return Me.space=function(xe){var Se=this.rules.block.newline.exec(xe);if(Se)return Se[0].length>1?{type:"space",raw:Se[0]}:{raw:`
`}},Me.code=function(xe,Se){var Ae=this.rules.block.code.exec(xe);if(Ae){var Le=Se[Se.length-1];if(Le&&Le.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Je=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Je:B(Je,`
`)}}},Me.fences=function(xe){var Se=this.rules.block.fences.exec(xe);if(Se){var Ae=Se[0],Le=Re(Ae,Se[3]||"");return{type:"code",raw:Ae,lang:Se[2]?Se[2].trim():Se[2],text:Le}}},Me.heading=function(xe){var Se=this.rules.block.heading.exec(xe);if(Se)return{type:"heading",raw:Se[0],depth:Se[1].length,text:Se[2]}},Me.nptable=function(xe){var Se=this.rules.block.nptable.exec(xe);if(Se){var Ae={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
`):[],raw:Se[0]};if(Ae.header.length===Ae.align.length){var Le=Ae.align.length,Je;for(Je=0;Je ?/gm,"");return{type:"blockquote",raw:Se[0],text:Ae}}},Me.list=function(xe){var Se=this.rules.block.list.exec(xe);if(Se){for(var Ae=Se[0],Le=Se[2],Je=Le.length>1,Ve=Le[Le.length-1]===")",gt={type:"list",raw:Ae,ordered:Je,start:Je?+Le.slice(0,-1):"",loose:!1,items:[]},yt=Se[0].match(this.rules.block.item),Bt=!1,Nt,mr,hr,St,$r,Xr,Ur,sn=yt.length,Rr=0;Rr1||this.options.smartLists&&hr!==Le)&&(St=yt.slice(Rr+1).join(`
`),gt.raw=gt.raw.substring(0,gt.raw.length-St.length),Rr=sn-1)),$r=Bt||/\n\n(?!\s*$)/.test(Nt),Rr!==sn-1&&(Bt=Nt.charAt(Nt.length-1)===`
`,$r||($r=Bt)),$r&&(gt.loose=!0),Xr=/^\[[ xX]\] /.test(Nt),Ur=void 0,Xr&&(Ur=Nt[1]!==" ",Nt=Nt.replace(/^\[[ xX]\] +/,"")),gt.items.push({type:"list_item",raw:Ae,task:Xr,checked:Ur,loose:$r,text:Nt});return gt}},Me.html=function(xe){var Se=this.rules.block.html.exec(xe);if(Se)return{type:this.options.sanitize?"paragraph":"html",raw:Se[0],pre:!this.options.sanitizer&&(Se[1]==="pre"||Se[1]==="script"||Se[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):ae(Se[0]):Se[0]}},Me.def=function(xe){var Se=this.rules.block.def.exec(xe);if(Se){Se[3]&&(Se[3]=Se[3].substring(1,Se[3].length-1));var Ae=Se[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Se[0],href:Se[2],title:Se[3]}}},Me.table=function(xe){var Se=this.rules.block.table.exec(xe);if(Se){var Ae={type:"table",header:V(Se[1].replace(/^ *| *\| *$/g,"")),align:Se[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Se[3]?Se[3].replace(/\n$/,"").split(`
`):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Se[0];var Le=Ae.align.length,Je;for(Je=0;Je/i.test(Le[0])&&(Se=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:Se,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ae(Le[0]):Le[0]}},Me.link=function(xe){var Se=this.rules.inline.link.exec(xe);if(Se){var Ae=he(Se[2],"()");if(Ae>-1){var Le=Se[0].indexOf("!")===0?5:4,Je=Le+Se[1].length+Ae;Se[2]=Se[2].substring(0,Ae),Se[0]=Se[0].substring(0,Je).trim(),Se[3]=""}var Ve=Se[2],gt="";if(this.options.pedantic){var yt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ve);yt?(Ve=yt[1],gt=yt[3]):gt=""}else gt=Se[3]?Se[3].slice(1,-1):"";Ve=Ve.trim().replace(/^<([\s\S]*)>$/,"$1");var Bt=pe(Se,{href:Ve&&Ve.replace(this.rules.inline._escapes,"$1"),title:gt&>.replace(this.rules.inline._escapes,"$1")},Se[0]);return Bt}},Me.reflink=function(xe,Se){var Ae;if((Ae=this.rules.inline.reflink.exec(xe))||(Ae=this.rules.inline.nolink.exec(xe))){var Le=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(Le=Se[Le.toLowerCase()],!Le||!Le.href){var Je=Ae[0].charAt(0);return{type:"text",raw:Je,text:Je}}var Ve=pe(Ae,Le,Ae[0]);return Ve}},Me.strong=function(xe,Se,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.strong.start.exec(xe);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Se=Se.slice(-1*xe.length);var Je=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Je.lastIndex=0;for(var Ve;(Le=Je.exec(Se))!=null;)if(Ve=this.rules.inline.strong.middle.exec(Se.slice(0,Le.index+3)),Ve)return{type:"strong",raw:xe.slice(0,Ve[0].length),text:xe.slice(2,Ve[0].length-2)}}},Me.em=function(xe,Se,Ae){Ae===void 0&&(Ae="");var Le=this.rules.inline.em.start.exec(xe);if(Le&&(!Le[1]||Le[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Se=Se.slice(-1*xe.length);var Je=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Je.lastIndex=0;for(var Ve;(Le=Je.exec(Se))!=null;)if(Ve=this.rules.inline.em.middle.exec(Se.slice(0,Le.index+2)),Ve)return{type:"em",raw:xe.slice(0,Ve[0].length),text:xe.slice(1,Ve[0].length-1)}}},Me.codespan=function(xe){var Se=this.rules.inline.code.exec(xe);if(Se){var Ae=Se[2].replace(/\n/g," "),Le=/[^ ]/.test(Ae),Je=Ae.startsWith(" ")&&Ae.endsWith(" ");return Le&&Je&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ae(Ae,!0),{type:"codespan",raw:Se[0],text:Ae}}},Me.br=function(xe){var Se=this.rules.inline.br.exec(xe);if(Se)return{type:"br",raw:Se[0]}},Me.del=function(xe){var Se=this.rules.inline.del.exec(xe);if(Se)return{type:"del",raw:Se[0],text:Se[1]}},Me.autolink=function(xe,Se){var Ae=this.rules.inline.autolink.exec(xe);if(Ae){var Le,Je;return Ae[2]==="@"?(Le=ae(this.options.mangle?Se(Ae[1]):Ae[1]),Je="mailto:"+Le):(Le=ae(Ae[1]),Je=Le),{type:"link",raw:Ae[0],text:Le,href:Je,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.url=function(xe,Se){var Ae;if(Ae=this.rules.inline.url.exec(xe)){var Le,Je;if(Ae[2]==="@")Le=ae(this.options.mangle?Se(Ae[0]):Ae[0]),Je="mailto:"+Le;else{var Ve;do Ve=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(Ve!==Ae[0]);Le=ae(Ae[0]),Ae[1]==="www."?Je="http://"+Le:Je=Le}return{type:"link",raw:Ae[0],text:Le,href:Je,tokens:[{type:"text",raw:Le,text:Le}]}}},Me.inlineText=function(xe,Se,Ae){var Le=this.rules.inline.text.exec(xe);if(Le){var Je;return Se?Je=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):ae(Le[0]):Le[0]:Je=ae(this.options.smartypants?Ae(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Je}}},Ue}(),ve=K.noopTest,Te=K.edit,be=K.merge,ue={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:ve,table:ve,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ue._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ue._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ue.def=Te(ue.def).replace("label",ue._label).replace("title",ue._title).getRegex(),ue.bullet=/(?:[*+-]|\d{1,9}[.)])/,ue.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ue.item=Te(ue.item,"gm").replace(/bull/g,ue.bullet).getRegex(),ue.list=Te(ue.list).replace(/bull/g,ue.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ue.def.source+")").getRegex(),ue._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",ue._comment=//,ue.html=Te(ue.html,"i").replace("comment",ue._comment).replace("tag",ue._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ue.paragraph=Te(ue._paragraph).replace("hr",ue.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",ue._tag).getRegex(),ue.blockquote=Te(ue.blockquote).replace("paragraph",ue.paragraph).getRegex(),ue.normal=be({},ue),ue.gfm=be({},ue.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*|$)"}),ue.gfm.nptable=Te(ue.gfm.nptable).replace("hr",ue.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",ue._tag).getRegex(),ue.gfm.table=Te(ue.gfm.table).replace("hr",ue.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",ue._tag).getRegex(),ue.pedantic=be({},ue.normal,{html:Te(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ue._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:ve,paragraph:Te(ue.normal._paragraph).replace("hr",ue.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ue.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ve,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:ve,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",le.punctuation=Te(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Te(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Te(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Te(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Te(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Te(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Te(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Te(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Te(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Te(le._blockSkip,"g").getRegex(),le.overlapSkip=Te(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._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])?)+(?![-_])/,le.autolink=Te(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Te(le.tag).replace("comment",ue._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Te(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Te(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Te(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=be({},le),le.pedantic=be({},le.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:Te(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Te(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=be({},le.normal,{escape:Te(le.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&&(xe="x"+xe.toString(16)),Me+=""+xe+";";return Me}var J=function(){function Ue(Ne){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ne||fe,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var xe={block:q.normal,inline:ee.normal};this.options.pedantic?(xe.block=q.pedantic,xe.inline=ee.pedantic):this.options.gfm&&(xe.block=q.gfm,this.options.breaks?xe.inline=ee.breaks:xe.inline=ee.gfm),this.tokenizer.rules=xe}Ue.lex=function(xe,Se){var Ae=new Ue(Se);return Ae.lex(xe)};var Me=Ue.prototype;return Me.lex=function(xe){return xe=xe.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(xe,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(xe,Se,Ae){Se===void 0&&(Se=[]),Ae===void 0&&(Ae=!0),xe=xe.replace(/^ +$/gm,"");for(var Le,Je,Ve,gt;xe;){if(Le=this.tokenizer.space(xe)){xe=xe.substring(Le.raw.length),Le.type&&Se.push(Le);continue}if(Le=this.tokenizer.code(xe,Se)){xe=xe.substring(Le.raw.length),Le.type?Se.push(Le):(gt=Se[Se.length-1],gt.raw+=`
`+Le.raw,gt.text+=`
`+Le.text);continue}if(Le=this.tokenizer.fences(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.heading(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.nptable(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.hr(xe)){xe=xe.substring(Le.raw.length),Se.push(Le);continue}if(Le=this.tokenizer.blockquote(xe)){xe=xe.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],Ae),Se.push(Le);continue}if(Le=this.tokenizer.list(xe)){for(xe=xe.substring(Le.raw.length),Ve=Le.items.length,Je=0;Je0)for(;(yt=this.tokenizer.rules.inline.reflinkSearch.exec(gt))!=null;)Bt.includes(yt[0].slice(yt[0].lastIndexOf("[")+1,-1))&&(gt=gt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(yt=this.tokenizer.rules.inline.blockSkip.exec(gt))!=null;)gt=gt.slice(0,yt.index)+"["+"a".repeat(yt[0].length-2)+"]"+gt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;xe;){if(Ve=this.tokenizer.escape(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.tag(xe,Ae,Le)){xe=xe.substring(Ve.raw.length),Ae=Ve.inLink,Le=Ve.inRawBlock,Se.push(Ve);continue}if(Ve=this.tokenizer.link(xe)){xe=xe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Le)),Se.push(Ve);continue}if(Ve=this.tokenizer.reflink(xe,this.tokens.links)){xe=xe.substring(Ve.raw.length),Ve.type==="link"&&(Ve.tokens=this.inlineTokens(Ve.text,[],!0,Le)),Se.push(Ve);continue}if(Ve=this.tokenizer.strong(xe,gt,Je)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.em(xe,gt,Je)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.codespan(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.br(xe)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.del(xe)){xe=xe.substring(Ve.raw.length),Ve.tokens=this.inlineTokens(Ve.text,[],Ae,Le),Se.push(Ve);continue}if(Ve=this.tokenizer.autolink(xe,te)){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(!Ae&&(Ve=this.tokenizer.url(xe,te))){xe=xe.substring(Ve.raw.length),Se.push(Ve);continue}if(Ve=this.tokenizer.inlineText(xe,Le,Ce)){xe=xe.substring(Ve.raw.length),Je=Ve.raw.slice(-1),Se.push(Ve);continue}if(xe){var Nt="Infinite loop on byte: "+xe.charCodeAt(0);if(this.options.silent){console.error(Nt);break}else throw new Error(Nt)}}return Se},d(Ue,null,[{key:"rules",get:function(){return{block:q,inline:ee}}}]),Ue}(),X=C.defaults,Q=K.cleanUrl,Ee=K.escape,ge=function(){function Ue(Ne){this.options=Ne||X}var Me=Ue.prototype;return Me.code=function(xe,Se,Ae){var Le=(Se||"").match(/\S*/)[0];if(this.options.highlight){var Je=this.options.highlight(xe,Le);Je!=null&&Je!==xe&&(Ae=!0,xe=Je)}return Le?''+(Ae?xe:Ee(xe,!0))+`
`:""+(Ae?xe:Ee(xe,!0))+`
`},Me.blockquote=function(xe){return`
`+xe+`
`},Me.html=function(xe){return xe},Me.heading=function(xe,Se,Ae,Le){return this.options.headerIds?"
`:""+xe+"
`},Me.hr=function(){return this.options.xhtml?`
`:`
`},Me.list=function(xe,Se,Ae){var Le=Se?"ol":"ul",Je=Se&&Ae!==1?' start="'+Ae+'"':"";return"<"+Le+Je+`>
`+xe+""+Le+`>
`},Me.listitem=function(xe){return""+xe+`
`},Me.checkbox=function(xe){return" "},Me.paragraph=function(xe){return""+xe+`
`},Me.table=function(xe,Se){return Se&&(Se=""+Se+""),`
`},Me.tablerow=function(xe){return`
`+xe+`
`},Me.tablecell=function(xe,Se){var Ae=Se.header?"th":"td",Le=Se.align?"<"+Ae+' align="'+Se.align+'">':"<"+Ae+">";return Le+xe+""+Ae+`>
`},Me.strong=function(xe){return""+xe+""},Me.em=function(xe){return""+xe+""},Me.codespan=function(xe){return""+xe+""},Me.br=function(){return this.options.xhtml?"
":"
"},Me.del=function(xe){return""+xe+""},Me.link=function(xe,Se,Ae){if(xe=Q(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Ae;var Le='"+Ae+"",Le},Me.image=function(xe,Se,Ae){if(xe=Q(this.options.sanitize,this.options.baseUrl,xe),xe===null)return Ae;var Le='
":">",Le},Me.text=function(xe){return xe},Ue}(),Oe=function(){function Ue(){}var Me=Ue.prototype;return Me.strong=function(xe){return xe},Me.em=function(xe){return xe},Me.codespan=function(xe){return xe},Me.del=function(xe){return xe},Me.html=function(xe){return xe},Me.text=function(xe){return xe},Me.link=function(xe,Se,Ae){return""+Ae},Me.image=function(xe,Se,Ae){return""+Ae},Me.br=function(){return""},Ue}(),Qe=function(){function Ue(){this.seen={}}var Me=Ue.prototype;return Me.slug=function(xe){var Se=xe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Se)){var Ae=Se;do this.seen[Ae]++,Se=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Se))}return this.seen[Se]=0,Se},Ue}(),rt=C.defaults,nt=K.unescape,ut=function(){function Ue(Ne){this.options=Ne||rt,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Qe}Ue.parse=function(xe,Se){var Ae=new Ue(Se);return Ae.parse(xe)};var Me=Ue.prototype;return Me.parse=function(xe,Se){Se===void 0&&(Se=!0);var Ae="",Le,Je,Ve,gt,yt,Bt,Nt,mr,hr,St,$r,Xr,Ur,sn,Rr,mn,vn,Gt,Cn=xe.length;for(Le=0;Le0&&Rr.tokens[0].type==="text"?(Rr.tokens[0].text=Gt+" "+Rr.tokens[0].text,Rr.tokens[0].tokens&&Rr.tokens[0].tokens.length>0&&Rr.tokens[0].tokens[0].type==="text"&&(Rr.tokens[0].tokens[0].text=Gt+" "+Rr.tokens[0].tokens[0].text)):Rr.tokens.unshift({type:"text",text:Gt}):sn+=Gt),sn+=this.parse(Rr.tokens,Ur),hr+=this.renderer.listitem(sn,vn,mn);Ae+=this.renderer.list(hr,$r,Xr);continue}case"html":{Ae+=this.renderer.html(St.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(St.tokens));continue}case"text":{for(hr=St.tokens?this.parseInline(St.tokens):St.text;Le+1An error occurred:"+He(Ve.message+"",!0)+"
";throw Ve}}Ze.options=Ze.setOptions=function(Ue){return dt(Ze.defaults,Ue),at(Ze.defaults),Ze},Ze.getDefaults=De,Ze.defaults=ht,Ze.use=function(Ue){var Me=dt({},Ue);if(Ue.renderer&&function(){var xe=Ze.defaults.renderer||new ge,Se=function(Je){var Ve=xe[Je];xe[Je]=function(){for(var gt=arguments.length,yt=new Array(gt),Bt=0;Bt>>24)&16711935|(n[f]<<24|n[f]>>>8)&4278255360;var c=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],m=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var f=0;f<4;f++)s.call(this);for(var f=0;f<8;f++)m[f]^=c[f+4&7];if(h){var _=h.words,y=_[0],i=_[1],a=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S=a>>>16|t&4294901760,x=t<<16|a&65535;m[0]^=a,m[1]^=S,m[2]^=t,m[3]^=x,m[4]^=a,m[5]^=S,m[6]^=t,m[7]^=x;for(var f=0;f<4;f++)s.call(this)}},_doProcessBlock:function(n,h){var f=this._X;s.call(this),p[0]=f[0]^f[5]>>>16^f[3]<<16,p[1]=f[2]^f[7]>>>16^f[5]<<16,p[2]=f[4]^f[1]>>>16^f[7]<<16,p[3]=f[6]^f[3]>>>16^f[1]<<16;for(var c=0;c<4;c++)p[c]=(p[c]<<8|p[c]>>>24)&16711935|(p[c]<<24|p[c]>>>8)&4278255360,n[h+c]^=p[c]},blockSize:128/32,ivSize:64/32});function s(){for(var n=this._X,h=this._C,f=0;f<8;f++)C[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var f=0;f<8;f++){var c=n[f]+h[f],m=c&65535,_=c>>>16,y=((m*m>>>17)+m*_>>>15)+_*_,i=((c&4294901760)*c|0)+((c&65535)*c|0);E[f]=y^i}n[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,n[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,n[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,n[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,n[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,n[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,n[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,n[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}d.Rabbit=D._createHelper(l)}(),P.Rabbit})},ELLl:function(j,Z,L){(function(P){P(L("VrN/"))})(function(P){var d={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=P.Pos;P.defineOption("autoCloseBrackets",!1,function(m,_,y){y&&y!=P.Init&&(m.removeKeyMap(u),m.state.closeBrackets=null),_&&(p(D(_,"pairs")),m.state.closeBrackets=_,m.addKeyMap(u))});function D(m,_){return _=="pairs"&&typeof m=="string"?m:typeof m=="object"&&m[_]!=null?m[_]:d[_]}var u={Backspace:l,Enter:s};function p(m){for(var _=0;_=0;a--){var S=i[a].head;m.replaceRange("",T(S.line,S.ch-1),T(S.line,S.ch+1),"+delete")}}function s(m){var _=E(m),y=_&&D(_,"explode");if(!y||m.getOption("disableInput"))return P.Pass;for(var i=m.listSelections(),a=0;a0;return{anchor:new T(m.anchor.line,m.anchor.ch+(_?-1:1)),head:new T(m.head.line,m.head.ch+(_?1:-1))}}function h(m,_){var y=E(m);if(!y||m.getOption("disableInput"))return P.Pass;var i=D(y,"pairs"),a=i.indexOf(_);if(a==-1)return P.Pass;for(var t=D(y,"closeBefore"),S=D(y,"triples"),x=i.charAt(a+1)==_,o=m.listSelections(),k=a%2==0,O,b=0;b=0&&m.getRange(g,T(g.line,g.ch+3))==_+_+_?w="skipThree":w="skip";else if(x&&g.ch>1&&S.indexOf(_)>=0&&m.getRange(T(g.line,g.ch-2),g)==_+_){if(g.ch>2&&/\bstring/.test(m.getTokenTypeAt(T(g.line,g.ch-2))))return P.Pass;w="addFour"}else if(x){var N=g.ch==0?" ":m.getRange(T(g.line,g.ch-1),g);if(!P.isWordChar(M)&&N!=_&&!P.isWordChar(N))w="both";else return P.Pass}else if(k&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))w="both";else return P.Pass;if(!O)O=w;else if(O!=w)return P.Pass}var I=a%2?i.charAt(a-1):_,G=a%2?_:i.charAt(a+1);m.operation(function(){if(O=="skip")m.execCommand("goCharRight");else if(O=="skipThree")for(var z=0;z<3;z++)m.execCommand("goCharRight");else if(O=="surround"){for(var H=m.getSelections(),z=0;z>>24)&16711935|(O<<24|O>>>8)&4278255360}var b=this._hash.words,v=h.words,g=f.words,w=E.words,M=l.words,N=s.words,I=n.words,G,z,H,K,U,B,V,ae,he,pe;B=G=b[0],V=z=b[1],ae=H=b[2],he=K=b[3],pe=U=b[4];for(var Re,o=0;o<80;o+=1)Re=G+S[x+w[o]]|0,o<16?Re+=m(z,H,K)+v[0]:o<32?Re+=_(z,H,K)+v[1]:o<48?Re+=y(z,H,K)+v[2]:o<64?Re+=i(z,H,K)+v[3]:Re+=a(z,H,K)+v[4],Re=Re|0,Re=t(Re,N[o]),Re=Re+U|0,G=U,U=K,K=t(H,10),H=z,z=Re,Re=B+S[x+M[o]]|0,o<16?Re+=a(V,ae,he)+g[0]:o<32?Re+=i(V,ae,he)+g[1]:o<48?Re+=y(V,ae,he)+g[2]:o<64?Re+=_(V,ae,he)+g[3]:Re+=m(V,ae,he)+g[4],Re=Re|0,Re=t(Re,I[o]),Re=Re+pe|0,B=pe,pe=he,he=t(ae,10),ae=V,V=Re;Re=b[1]+H+he|0,b[1]=b[2]+K+pe|0,b[2]=b[3]+U+B|0,b[3]=b[4]+G+V|0,b[4]=b[0]+z+ae|0,b[0]=Re},_doFinalize:function(){var S=this._data,x=S.words,o=this._nDataBytes*8,k=S.sigBytes*8;x[k>>>5]|=128<<24-k%32,x[(k+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,S.sigBytes=(x.length+1)*4,this._process();for(var O=this._hash,b=O.words,v=0;v<5;v++){var g=b[v];b[v]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}return O},clone:function(){var S=p.clone.call(this);return S._hash=this._hash.clone(),S}});function m(S,x,o){return S^x^o}function _(S,x,o){return S&x|~S&o}function y(S,x,o){return(S|~x)^o}function i(S,x,o){return S&o|x&~o}function a(S,x,o){return S^(x|~o)}function t(S,x){return S<>>32-x}T.RIPEMD160=p._createHelper(c),T.HmacRIPEMD160=p._createHmacHelper(c)}(Math),P.RIPEMD160})},ETIr:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.enc,p=u.Base64={stringify:function(E){var l=E.words,s=E.sigBytes,n=this._map;E.clamp();for(var h=[],f=0;f>>2]>>>24-f%4*8&255,m=l[f+1>>>2]>>>24-(f+1)%4*8&255,_=l[f+2>>>2]>>>24-(f+2)%4*8&255,y=c<<16|m<<8|_,i=0;i<4&&f+i*.75>>6*(3-i)&63));var a=n.charAt(64);if(a)for(;h.length%4;)h.push(a);return h.join("")},parse:function(E){var l=E.length,s=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var h=0;h>>6-f%4*2,_=c|m;n[h>>>2]|=_<<24-h%4*8,h++}return D.create(n,h)}}(),P.enc.Base64})},"F+F2":function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var d=P,T=d.lib,D=T.WordArray,u=D.init,p=D.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var E=C.byteLength,l=[],s=0;s>>2]|=C[s]<<24-s%4*8;u.call(this,l,E)}else u.apply(this,arguments)};p.prototype=D}(),P.lib.WordArray})},GRO8:function(j,Z,L){"use strict";L.r(Z);var P=L("k1fw"),d=L("2qtc"),T=L("kLXV"),D=L("lUTK"),u=L("BvKs"),p=L("+L6B"),C=L("2/Rp"),E=L("T2oS"),l=L("W9HT"),s=L("sPJy"),n=L("bE4q"),h=L("miYZ"),f=L("tsqr"),c=L("9og8"),m=L("tJVT"),_=L("PpiC"),y=L("WmNS"),i=L.n(y),a=L("q1tI"),t=L.n(a),S=L("Ty5D"),x=L("55Ip"),o=L("9kvl"),k=L("KeDT"),O=L.n(k),b=L("zrhs"),v=L("DZo9"),g=L("8z0m"),w=L("LtfV"),M=L("KhGG"),N=g.a.Dragger,I=function(tt){var pt=tt.user,_t=tt.dispatch,Mt=tt.classroomList,Dt=tt.shixunsDetail,Ht=tt.getResults,Wt=Object(S.i)(),ct=Object(a.useState)(),Ot=Object(m.a)(ct,2),Rt=Ot[0],fr=Ot[1],qt=Object(a.useState)([]),Qt=Object(m.a)(qt,2),Kt=Qt[0],tr=Qt[1],or=Object(a.useState)(!1),ot=Object(m.a)(or,2),Dr=ot[0],Ir=ot[1],yr={onRemove:function(){tr([])},beforeUpload:function(Et){if(console.log(Et),(Et==null?void 0:Et.size)>1024*1024*500)return f.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var wt=[];return wt.push(Et),tr([].concat(wt)),!1},fileList:Kt};return t.a.createElement(T.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:Dt.actionTabs.key==="md-tab",confirmLoading:Dr,onOk:Object(c.a)(i.a.mark(function er(){var Et,wt,xt;return i.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(!((Kt==null?void 0:Kt.length)<=0)){ur.next=3;break}return f.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),ur.abrupt("return");case 3:return Ir(!0),ur.next=6,Object(M.c)(Kt[0],{login:(Et=pt.userInfo)===null||Et===void 0?void 0:Et.login,container_type:"Competition",container_id:Dt.actionTabs.params.id,stage_type:Dt.actionTabs.params.value,file_name:(wt=Kt[0])===null||wt===void 0?void 0:wt.name});case 6:xt=ur.sent,(xt==null?void 0:xt.status)===0?(f.b.info("\u63D0\u4EA4\u6210\u529F"),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Ir(!1),tr([]),Ht(Dt.actionTabs.params.value)):(Ir(!1),f.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return ur.stop()}},er)})),onCancel:function(){tr([]),_t({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(N,yr,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(w.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.classroomList,_t=Ct.shixunsDetail;return{user:tt,classroomList:pt,shixunsDetail:_t}})(I),z=L("14J3"),H=L("BMrR"),K=L("5NDa"),U=L("5rEg"),B=L("9Bee"),V=L("m3rI"),ae=L("ErOA"),he=L("NLgs"),pe=L("fV52"),Re=L("3I+P"),ke=L("OaEy"),ve=L("2fM7"),Te=L("5bA4"),be=L("UESt"),ue=ve.a.Option;function le(Ct){var tt=Ct.rewarddata,pt=Ct.getlistdatas,_t=Ct.is_signed,Mt=Ct.dispatch,Dt=Ct.userlist,Ht=Object(a.useRef)(null),Wt=Object(a.useState)(!1),ct=Object(m.a)(Wt,2),Ot=ct[0],Rt=ct[1],fr=Object(a.useState)(void 0),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)(""),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(void 0),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(void 0),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(void 0),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1];function et(gr){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(i.a.mark(function gr(pr){var Or;return i.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(!pr.user_received){Jt.next=3;break}return window.open(pr.click_info),Jt.abrupt("return");case 3:if(Object(he.f)(Mt)){Jt.next=5;break}return Jt.abrupt("return");case 5:if(!(_t===!1)){Jt.next=8;break}return f.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Jt.abrupt("return");case 8:if(!(pr.click_event==="Pop")){Jt.next=14;break}return Dr(pr.id),Rt(!0),Jt.abrupt("return");case 14:Kt(void 0);case 15:return Jt.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:pr.id}});case 17:Or=Jt.sent,Or&&Or.status===0&&(pt(),pr.click_event==="Link"?(f.b.info("\u9886\u53D6\u6210\u529F"),window.open(pr.click_info)):f.b.info(pr.click_info));case 19:case"end":return Jt.stop()}},gr)})),ir.apply(this,arguments)}function Lr(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(!(Dt&&!Dt.real_name)){Ft.next=4;break}if(er){Ft.next=4;break}return f.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 4:if(!(Dt&&!Dt.email)){Ft.next=8;break}if($t){Ft.next=8;break}return f.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 8:if(!(Dt&&!Dt.phone)){Ft.next=12;break}if(Tr){Ft.next=12;break}return f.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 12:if(Qt){Ft.next=15;break}return f.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),Ft.abrupt("return");case 15:return Ft.next=17,Mt({type:"competitions/Reward",payload:{competition_module_setting_id:ot,className:Qt,name:er,mail:$t,phone:Tr}});case 17:pr=Ft.sent,pr&&pr.status===0&&(Rt(!1),pt(),f.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return Ft.stop()}},gr)})),Jr.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(T.a,{visible:Ot,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return Rt(!1)},onOk:function(){Lr()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.real_name||er,disabled:Dt&&Dt.real_name||!1,onChange:function(pr){return Et(pr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:Dt&&Dt.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:Dt&&Dt.phone?"":"#ffffff!important"},value:Dt&&Dt.email||$t,disabled:Dt&&Dt.email||!1,onChange:function(pr){return ur(pr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:Dt&&Dt.phone?"":"bkfff",value:Dt&&Dt.phone||Tr,disabled:Dt&&Dt.phone||!1,onChange:function(pr){return Zr(pr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(ve.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(pr){Kt(pr)}},t.a.createElement(ue,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ue,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ue,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ue,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ue,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ue,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ue,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ue,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ue,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ue,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ue,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ue,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ue,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),tt&&tt.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Ht.current.prev()}},t.a.createElement(Te.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(Re.a,{ref:Ht,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},tt&&tt.map(function(gr,pr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(gr.image_url)}),gr.user_received===!1||gr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return et(gr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Ht.current.next()}},t.a.createElement(be.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},tt&&tt.map(function(gr,pr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/".concat(gr.image_url)}),gr.user_received===!1||gr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return et(gr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var re=le,fe=function(tt,pt){var _t=tt.StaffDetail,Mt=tt.HeaderDetail,Dt=tt.ItemData,Ht=tt.setIssee,Wt=tt.ModelType,ct=tt.dispatch,Ot=tt.userinfo,Rt=tt.Editable,fr=Object(a.useState)(!1),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)([]),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(""),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(""),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(!1),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(S.i)(),ir=et.identifier,Lr=Object(a.useRef)(null),Jr=Object(a.useRef)(null);Lr.current=_t==null?void 0:_t.enrolled,Object(a.useEffect)(function(){var Ft;return(Ft=Jr.current)===null||Ft===void 0||Ft.addEventListener("click",gr),function(){var Jt;(Jt=Jr.current)===null||Jt===void 0||Jt.removeEventListener("click",gr)}},[]);var gr=function(Jt){var br;if((Jt==null||((br=Jt.target)===null||br===void 0)?void 0:br.id)==="modal-upload"){if(!Object(he.e)(ct))return;if(!Lr.current){T.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Kt(!0)}};Object(a.useEffect)(function(){if(Mt!=null&&Mt.upload_file){var Ft,Jt,br;Dr([{name:Mt==null||((Ft=Mt.upload_file)===null||Ft===void 0)?void 0:Ft.title,status:"done",uid:"123456789"}]),ur(Mt==null?void 0:Mt.upload_file_url),Et(Mt==null||((Jt=Mt.upload_file)===null||Jt===void 0||((br=Jt.url)===null||br===void 0))?void 0:br.split("/")[3])}},[Mt==null?void 0:Mt.upload_file]);var pr={name:"file",multiple:!1,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:ot,onChange:function(Jt){var br=Jt.file.status,Zt=[Object(P.a)({},Jt.file)];if(Dr(Zt),Jt.file.status==="uploading"&&Zr(!0),br==="done"){var vt,bt;Et((vt=Zt[0])===null||vt===void 0||((bt=vt.response)===null||bt===void 0)?void 0:bt.id),Zr(!1)}br==="error"&&(Dr([]),Zr(!1))},beforeUpload:function(Jt){var br=Jt.size/1024/1024<1e3;return br?Promise.resolve():(f.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},Or=function(){Kt(!0)};return Object(a.useImperativeHandle)(pt,function(){return{handleVisible:Or}}),t.a.createElement("div",{ref:Jr},Wt==="reward"?t.a.createElement(re,{userlist:Ot,dispatch:ct,rewarddata:Dt.reward_setting,is_signed:Dt.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((Ot==null?void 0:Ot.admin)||(Ot==null?void 0:Ot.business)||Rt)&&t.a.createElement(C.a,{onClick:function(){return Ht(!1)}},"\u7F16\u8F91")),t.a.createElement(B.a,{value:Dt.md_content}),Dt&&Dt.attachments&&Dt.attachments.map(function(Ft,Jt){return t.a.createElement("div",null,t.a.createElement("a",{href:(V.a===null||V.a===void 0?void 0:V.a.API_SERVER)+Ft.url,target:"_self",download:Ft.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},Ft.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},Ft.filesize)))}),t.a.createElement(T.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Qt,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Tr,onCancel:function(){return Kt(!1)},onOk:Object(c.a)(i.a.mark(function Ft(){var Jt;return i.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(!(!er&&!$t)){Zt.next=3;break}return Kt(!1),Zt.abrupt("return");case 3:return Zr(!0),Zt.next=6,Object(ae.a)("/api/competitions/".concat(ir,"/upload_file.json"),{method:"post",body:{attachment_id:er,upload_file_url:$t}});case 6:Jt=Zt.sent,Jt.status===0&&(Kt(!1),Zr(!1));case 8:case"end":return Zt.stop()}},Ft)}))},t.a.createElement("div",null,t.a.createElement(H.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:$t,onChange:function(Jt){var br;return ur((br=Jt.target)===null||br===void 0?void 0:br.value)}})),t.a.createElement(H.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(g.a,pr,t.a.createElement(C.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},q=Object(a.forwardRef)(fe),ee=L("Ot1p"),Ce=L("hJwl");function te(Ct){var tt=Ct.ItemData,pt=Ct.setIssee,_t=Ct.MenuItem,Mt=Ct.dispatch,Dt=Ct.identifier,Ht=Ct.ModelType,Wt=Ct.userinfo,ct=Ct.getrightdatas,Ot=Object(a.useState)([]),Rt=Object(m.a)(Ot,2),fr=Rt[0],qt=Rt[1],Qt=Object(a.useState)(tt.md_content),Kt=Object(m.a)(Qt,2),tr=Kt[0],or=Kt[1];Object(a.useEffect)(function(){var Et,wt=[];tt==null||((Et=tt.attachments)===null||Et===void 0)||Et.map(function(xt){var $t={uid:xt.id,name:xt.title,response:{id:xt.id}};wt.push($t)}),qt(wt)},[tt==null?void 0:tt.attachments]);function ot(){var Et,wt=[];return tt==null||((Et=tt.attachments)===null||Et===void 0)||Et.map(function(xt){var $t={uid:xt==null?void 0:xt.id,name:xt.title,response:{id:xt.id}};wt.push($t)}),wt}var Dr={name:"file",multiple:!0,withCredentials:!0,action:V.a.API_SERVER+"/api/attachments.json",defaultFileList:ot(),onRemove:function(wt){Object(Ce.t)({id:wt.uid})},onChange:function(wt){var xt=wt.file.status;xt!=="uploading",xt==="removed"&&qt(wt.fileList),xt==="done"?(qt(wt.fileList),f.b.success("".concat(wt.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):xt==="error"&&f.b.error("".concat(wt.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(wt){var xt=wt.size/1024/1024<150;return xt||f.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),xt}};console.log(Dr);function Ir(){return yr.apply(this,arguments)}function yr(){return yr=Object(c.a)(i.a.mark(function Et(){var wt;return i.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.next=2,Mt({type:"competitions/updateMdContent",payload:{attachment_ids:er(fr),competition_module_id:tt.id,md_content_id:tt.md_id,content:tr,identifier:Dt}});case 2:wt=$t.sent,wt&&(f.b.info("\u63D0\u4EA4\u6210\u529F"),pt(!0),ct(_t));case 4:case"end":return $t.stop()}},Et)})),yr.apply(this,arguments)}function er(Et){var wt=[];return Et&&Et.map(function(xt){wt.push(xt.response.id)}),wt}return t.a.createElement("div",null,Ht==="reward"?t.a.createElement(re,{userlist:Wt,dispatch:Mt,rewarddata:tt.reward_setting,is_signed:tt.is_signed}):null,t.a.createElement(ee.a,{defaultValue:tr,onChange:function(wt){return or(wt)}}),t.a.createElement(g.a,Dr,t.a.createElement(C.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Ir()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return pt(!0)}},"\u53D6\u6D88")))}var J=te,X=L("g9YV"),Q=L("wCAj"),Ee=L("Znn+"),ge=L("ZTPi");function Oe(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Qe=Oe,rt=L("5Dmo"),nt=L("3S7+"),ut=L("jCWc"),dt=L("kPKH"),mt=L("IzEo"),He=L("bx4M");function De(Ct){var tt=Ct.oneItem,pt=Ct.towItem,_t=Ct.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(H.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(dt.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(pt==null?void 0:pt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(pt==null?void 0:pt.user_image)}),(pt==null?void 0:pt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},pt==null?void 0:pt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},pt==null?void 0:pt.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},pt==null?void 0:pt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},pt==null?void 0:pt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(pt==null?void 0:pt.extra_score)+parseFloat(pt==null?void 0:pt.score),"\u5206"))),t.a.createElement(dt.a,{span:6},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(tt==null?void 0:tt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(tt==null?void 0:tt.user_image)}),(tt==null?void 0:tt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},tt==null?void 0:tt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},tt==null?void 0:tt.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},tt==null?void 0:tt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},tt==null?void 0:tt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(tt==null?void 0:tt.extra_score)+parseFloat(tt==null?void 0:tt.score),"\u5206"))),t.a.createElement(dt.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(He.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:V.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(_t==null?void 0:_t.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(_t==null?void 0:_t.user_image)}),(_t==null?void 0:_t.competition_prize)&&t.a.createElement("p",{className:O.a.prize},_t==null?void 0:_t.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},_t==null?void 0:_t.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},_t==null?void 0:_t.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},_t==null?void 0:_t.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(_t==null?void 0:_t.extra_score)+parseFloat(_t==null?void 0:_t.score),"\u5206")))))}var at=De;function ht(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct,Ot,Rt,fr,qt,Qt,Kt,tr,or,ot,Dr,Ir,yr,er,Et,wt,xt,$t,ur,sr,lr,Tr,Zr,et=Ct.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(at,{oneItem:et==null?void 0:et.teams[0],towItem:et==null?void 0:et.teams[1],threeItem:et==null?void 0:et.teams[2]}),(et==null||((tt=et.user_ranks)===null||tt===void 0)?void 0:tt.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(et==null||((pt=et.user_ranks)===null||pt===void 0||((_t=pt[0])===null||_t===void 0))?void 0:_t.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(et==null||((Mt=et.user_ranks)===null||Mt===void 0||((Dt=Mt[0])===null||Dt===void 0))?void 0:Dt.success)===!1?"red":"green"}},(et==null||((Ht=et.user_ranks)===null||Ht===void 0||((Wt=Ht[0])===null||Wt===void 0))?void 0:Wt.success)===!1?"\u5426":et!=null&&(ct=et.user_ranks)!==null&&ct!==void 0&&(Ot=ct[0])!==null&&Ot!==void 0&&Ot.success?"\u662F":"")),(et==null||((Rt=et.user_ranks)===null||Rt===void 0||((fr=Rt[0])===null||fr===void 0))?void 0:fr.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(et==null||((qt=et.user_ranks)===null||qt===void 0||((Qt=qt[0])===null||Qt===void 0))?void 0:Qt.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(et==null||((Kt=et.user_ranks)===null||Kt===void 0||((tr=Kt[0])===null||tr===void 0))?void 0:tr.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",et==null||((or=et.user_ranks)===null||or===void 0||((ot=or[0])===null||ot===void 0))?void 0:ot.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},et==null||((Dr=et.user_ranks)===null||Dr===void 0||((Ir=Dr[0])===null||Ir===void 0))?void 0:Ir.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u65F6\u95F4"},et==null||((yr=et.user_ranks)===null||yr===void 0||((er=yr[0])===null||er===void 0))?void 0:er.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},et==null||((Et=et.user_ranks)===null||Et===void 0||((wt=Et[0])===null||wt===void 0))?void 0:wt.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},et==null||((xt=et.user_ranks)===null||xt===void 0||(($t=xt[0])===null||$t===void 0))?void 0:$t.score)),t.a.createElement("span",null,t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(et==null||((ur=et.user_ranks)===null||ur===void 0||((sr=ur[0])===null||sr===void 0))?void 0:sr.extra_score)+parseFloat(et==null||((lr=et.user_ranks)===null||lr===void 0||((Tr=lr[0])===null||Tr===void 0))?void 0:Tr.score)||0))),et==null||((Zr=et.teams)===null||Zr===void 0)?void 0:Zr.map(function(ir,Lr){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},Lr+1),t.a.createElement(x.a,{to:"/users/".concat(ir==null?void 0:ir.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(ir==null?void 0:ir.user_image)}),(ir==null?void 0:ir.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},ir==null?void 0:ir.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6218\u961F\u540D"},ir==null?void 0:ir.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},ir.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(nt.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},ir.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(nt.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},ir.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(nt.a,{title:"\u603B\u5206"},parseFloat(ir.extra_score)+parseFloat(ir.score))))}))}var Ze=ht,st=ge.a.TabPane;function Ue(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.ChartRules,ct=Ct.ItemData,Ot=Ct.getCharts,Rt=Ct.Selectkey,fr=Ct.getChartRules,qt=Ct.userinfo,Qt=Ct.Editable,Kt=Ct.HeaderDetail,tr=Object(a.useState)(!1),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(""),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(!0),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(a.useState)(),ir=Object(m.a)(et,2),Lr=ir[0],Jr=ir[1],gr=Object(S.i)(),pr=gr.identifier;Object(a.useEffect)(function(){if($t){var br,Zt=Wt==null||((br=Wt.stages)===null||br===void 0)?void 0:br[0];if(Zr(Zt),Zt!=null&&Zt.id){var vt,bt,zt;((Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog")&&Ot(Zt==null?void 0:Zt.id),Et(((vt=Wt.rule_contents)===null||vt===void 0||((bt=vt.filter(function(an){return parseInt(an.competition_stage_id)===parseInt(Zt==null?void 0:Zt.id)}))===null||bt===void 0||((zt=bt[0])===null||zt===void 0))?void 0:zt.content)||"")}else{var Lt,kr,rn;(Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog",Et(((Lt=Wt.rule_contents)===null||Lt===void 0||((kr=Lt.filter(function(an){return parseInt(an.competition_stage_id)===0}))===null||kr===void 0||((rn=kr[0])===null||rn===void 0))?void 0:rn.content)||"")}}},[Wt]);function Or(){return Ft.apply(this,arguments)}function Ft(){return Ft=Object(c.a)(i.a.mark(function br(){var Zt,vt,bt,zt,Lt,kr,rn,an,Ar;return i.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(er){Nr.next=3;break}return f.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Nr.abrupt("return");case 3:if(ur(!1),Zt=Tr==null?void 0:Tr.id,!Zt){Nr.next=12;break}return Nr.next=8,Object(ae.a)("/api/competitions/".concat(pr,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:er,md_content_id:(vt=Wt.rule_contents)===null||vt===void 0||((bt=vt.filter(function(un){return parseInt(un.competition_stage_id)===parseInt(Zt)}))===null||bt===void 0||((zt=bt[0])===null||zt===void 0))?void 0:zt.id,stage_id:Tr==null?void 0:Tr.id}});case 8:Lt=Nr.sent,Lt.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),Dr(!1),fr()),Nr.next=16;break;case 12:return Nr.next=14,Object(ae.a)("/api/competitions/".concat(pr,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:er,md_content_id:(kr=Wt.rule_contents)===null||kr===void 0||((rn=kr.filter(function(un){return parseInt(un.competition_stage_id)===0}))===null||rn===void 0||((an=rn[0])===null||an===void 0))?void 0:an.id,stage_id:Tr==null?void 0:Tr.id}});case 14:Ar=Nr.sent,Ar.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),Dr(!1),fr());case 16:case"end":return Nr.stop()}},br)})),Ft.apply(this,arguments)}var Jt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Zt,vt,bt){return t.a.createElement("span",null,bt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Zt){return t.a.createElement("img",{className:O.a.imgradius,src:V.a.IMG_SERVER+"/images/".concat(Zt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Zt){return t.a.createElement("span",{title:Zt},Zt&&(Zt==null?void 0:Zt.length)>=15?(Zt==null?void 0:Zt.substr(0,15))+"...":Zt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Zt){return t.a.createElement("span",null,Zt||"--")}},{title:(Kt==null?void 0:Kt.task)==="mAP"?"mAP\u6307\u6807":(Kt==null?void 0:Kt.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(Zt){return t.a.createElement("span",null,Zt||"--")}}];return t.a.createElement("div",null,(Wt==null||((tt=Wt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:t.a.createElement(Qe,null),(Wt==null||((pt=Wt.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:((qt==null?void 0:qt.admin)||(qt==null?void 0:qt.business)||Qt)&&t.a.createElement(C.a,{onClick:function(){Dr(!0)}},"\u7F16\u8F91"),onChange:function(Zt){var vt,bt,zt,Lt,kr;Dr(!1);var rn=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt.filter(function(Ar){return parseInt(Zt)===parseInt(Ar==null?void 0:Ar.id)})[0];Zr(rn);var an=rn==null||((bt=rn.children)===null||bt===void 0)?void 0:bt[0];Jr(an),Et(((zt=Wt.rule_contents)===null||zt===void 0||((Lt=zt.filter(function(Ar){return parseInt(Ar.competition_stage_id)===parseInt(rn==null?void 0:rn.id)}))===null||Lt===void 0||((kr=Lt[0])===null||kr===void 0))?void 0:kr.content)||""),Ot((an==null?void 0:an.id)||Zt)}},Wt&&Wt.stages.map(function(br,Zt){return t.a.createElement(st,{tab:br.name,key:br.id===null?0:br.id},ot===!1&&Wt&&Wt.rule_contents.map(function(vt,bt){if(br.id===vt.competition_stage_id)return t.a.createElement(B.a,{key:bt,value:vt.content===void 0||vt.content===null?"":vt.content});if(br.id===null&&vt.competition_stage_id===0)return t.a.createElement(B.a,{key:bt,value:vt.content===void 0||vt.content===null?"":vt.content})}))})),(Tr==null||((_t=Tr.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{activeKey:(Lr==null?void 0:Lr.id)+"",onChange:function(Zt){var vt,bt=Tr==null||((vt=Tr.children)===null||vt===void 0)?void 0:vt.filter(function(zt){return parseInt(Zt)===parseInt(zt==null?void 0:zt.id)})[0];Jr(bt),Ot(Zt)}},Tr==null||((Mt=Tr.children)===null||Mt===void 0)?void 0:Mt.map(function(br,Zt){return t.a.createElement(st,{tab:br.name,key:br.id===null?0:br.id})})),ot&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:er,onChange:function(Zt){Et(Zt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Or()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Dr(!1)}},"\u53D6\u6D88"))),(ct==null||((Dt=ct.teams)===null||Dt===void 0)?void 0:Dt.length)>0&&((Kt==null?void 0:Kt.task)==="mAP"||(Kt==null?void 0:Kt.task)==="dog"||(Kt==null?void 0:Kt.task)==="Jittor-3")?t.a.createElement(Q.a,{dataSource:ct==null?void 0:ct.teams,columns:Jt,pagination:!1}):(ct==null||((Ht=ct.teams)===null||Ht===void 0)?void 0:Ht.length)>0&&t.a.createElement(Ze,{ItemData:ct}))}var Me=Ue,Ne=L("/zsF"),xe=L("PArb");function Se(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct=Ct.Prize,Ot=Object(S.i)(),Rt=Object(a.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),fr=Object(m.a)(Rt,2),qt=fr[0],Qt=fr[1],Kt=function(){var tr=Object(c.a)(i.a.mark(function or(ot){var Dr;return i.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(Ce.u)({type:ot.type,id:Ot.identifier});case 2:Dr=yr.sent,(Dr==null?void 0:Dr.status)===0&&(location.href="/competitions/exports?id=".concat(Ot.identifier,"&type=").concat(ot.type));case 4:case"end":return yr.stop()}},or)}));return function(ot){return tr.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ct==null||((tt=ct.personal_certifications)===null||tt===void 0)?void 0:tt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ct==null||((pt=ct.personal_certifications[0])===null||pt===void 0)?void 0:pt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ct==null||((_t=ct.team_certifications)===null||_t===void 0)?void 0:_t.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:V.a.API_SERVER+"".concat(ct==null||((Mt=ct.team_certifications[0])===null||Mt===void 0)?void 0:Mt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(xe.a,null),(ct==null||((Dt=ct.teams)===null||Dt===void 0)?void 0:Dt.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ct==null?void 0:ct.teams)&&(ct==null||((Ht=ct.teams[0])===null||Ht===void 0)?void 0:Ht.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ct==null?void 0:ct.teams)&&(ct==null||((Wt=ct.teams[0])===null||Wt===void 0)?void 0:Wt.team_members.map(function(tr,or){var ot,Dr,Ir,yr,er,Et;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},tr==null?void 0:tr.role),t.a.createElement("span",{style:{width:"5%"}},tr==null?void 0:tr.name),t.a.createElement("span",{style:{width:"10%"}},(tr==null?void 0:tr.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(tr==null?void 0:tr.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(tr==null?void 0:tr.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(tr==null?void 0:tr.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},tr!=null&&tr.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},tr!=null&&tr.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(tr==null?void 0:tr.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ct==null?void 0:ct.teams)&&(ct==null||((ot=ct.teams[0])===null||ot===void 0||((Dr=ot.bank_account)===null||Dr===void 0))?void 0:Dr.bank),(ct==null?void 0:ct.teams)&&(ct==null||((Ir=ct.teams[0])===null||Ir===void 0||((yr=Ir.bank_account)===null||yr===void 0))?void 0:yr.second_bank),(ct==null?void 0:ct.teams)&&(ct==null||((er=ct.teams[0])===null||er===void 0||((Et=er.bank_account)===null||Et===void 0))?void 0:Et.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(H.a,{gutter:[20,20]},qt.map(function(tr,or){return t.a.createElement(dt.a,{key:or},t.a.createElement(C.a,{type:"primary",onClick:function(){return Kt(tr)}},tr.name))})))}var Ae=Se,Le=L("0Owb"),Je=L("7Kak"),Ve=L("9yH6"),gt=L("y8nQ"),yt=L("Vl3Y"),Bt=L("1vsH"),Nt=L("Dgm7"),mr=L.n(Nt),hr=L("NnUe"),St=L.n(hr),$r=g.a.Dragger,Xr=10,Ur=function(tt){var pt=tt.user,_t=tt.account,Mt=tt.globalSetting,Dt=tt.loading,Ht=tt.dispatch,Wt=Object(_.a)(tt,["user","account","globalSetting","loading","dispatch"]),ct=yt.a.useForm(),Ot=Object(m.a)(ct,1),Rt=Ot[0],fr=Object(a.useState)({}),qt=Object(m.a)(fr,2),Qt=qt[0],Kt=qt[1],tr=Object(a.useState)(!0),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)(),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(a.useState)(),xt=Object(m.a)(wt,2),$t=xt[0],ur=xt[1],sr=Object(a.useState)(),lr=Object(m.a)(sr,2),Tr=lr[0],Zr=lr[1],et=Object(a.useState)(),ir=Object(m.a)(et,2),Lr=ir[0],Jr=ir[1];Object(a.useEffect)(function(){if(!_t.basicInfo)return;var Zt=_t.basicInfo,vt={name:Zt.show_realname?Zt.name:Object(Bt.F)(Zt.name),gender:Zt.gender};Et(Zt.name),Dr(Zt.show_realname),Rt.setFieldsValue(vt),Kt(vt)},[_t.basicInfo]);var gr=function(vt){if(vt.file.status==="uploading"){Jr(!0);return}if(vt.file.status==="done"){var bt;console.log(vt.file,vt.file.response),Zr((bt=vt.file.response)===null||bt===void 0?void 0:bt.id),Object(Bt.C)(vt.file.originFileObj,function(zt){ur(zt),Jr(!1)})}},pr=function(vt){Kt(Object(P.a)({},Rt.getFieldsValue())),"name"in vt&&Et(vt.name)},Or=function(){var vt=!ot;Dr(vt);var bt=vt?er:Object(Bt.F)(er);Rt.setFieldsValue({name:bt})},Ft=function(){var Zt=Object(c.a)(i.a.mark(function vt(bt){var zt,Lt,kr,rn,an,Ar,qr,Nr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(kr=bt||{},rn=kr.name,an=kr.gender,Ar=kr.idNumber,$t){zr.next=4;break}return f.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),zr.abrupt("return");case 4:return zr.next=6,Ht({type:"account/applyRealNameAuth",payload:{id:((zt=_t.basicInfo)===null||zt===void 0?void 0:zt.id)||((Lt=pt.userInfo)===null||Lt===void 0?void 0:Lt.login),name:rn,gender:an,id_number:Ar,show_realname:ot,attachment_ids:[Tr]}});case 6:qr=zr.sent,Jt(),qr&&(f.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Ht({type:"account/getBasicInfo",payload:{login:(Nr=pt.userInfo)===null||Nr===void 0?void 0:Nr.login}}));case 9:case"end":return zr.stop()}},vt)}));return function(bt){return Zt.apply(this,arguments)}}(),Jt=function(){Ht({type:"account/setActionTabs",payload:{}})},br={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:gr,beforeUpload:function(vt){var bt=vt.type==="image/jpeg"||vt.type==="image/png"||vt.type==="image/jpg"||vt.type==="image/bmp";return bt||f.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),bt}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:_t.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(l.a,{spinning:!!Lr},t.a.createElement(yt.a,{className:St.a.formWrap,form:Rt,layout:"horizontal",onValuesChange:pr,onFinish:Ft},t.a.createElement(yt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Xr,"\u4E2A\u5B57\u7B26")},{validator:Bt.I}],extra:t.a.createElement("span",null,ot?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(U.a,{disabled:!ot,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(Xr,"\u4E2A\u5B57\u7B26"),maxLength:Xr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(ot?"icon-xianshi":"icon-yincang"," font18 ").concat(St.a.color0152d9),onClick:Or})})),t.a.createElement(yt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(Ve.a.Group,null,t.a.createElement(Ve.a,{value:0},"\u7537"),t.a.createElement(Ve.a,{value:1},"\u5973"))),t.a.createElement(yt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(yt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:mr.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement($r,Object(Le.a)({},br,{accept:".png,.jpg,.bmp,.jpeg"}),$t?t.a.createElement("img",{src:$t,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:Jt},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Dt["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},sn=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.account,_t=Ct.loading,Mt=Ct.globalSetting;return{user:tt,account:pt,globalSetting:Mt,loading:_t.effects}})(Ur),Rr=L("O3gP"),mn=L("lrIw"),vn=L("KXlV"),Gt=L.n(vn),Cn=L("Sjjz"),yn=L.n(Cn),Sn=U.a.TextArea,xn=function(tt){var pt=tt.account,_t=tt.globalSetting,Mt=tt.loading,Dt=tt.dispatch,Ht=tt.schoolName,Wt=tt.departmentName,ct=tt.visible,Ot=tt.onClose,Rt=Ot===void 0?function(){}:Ot,fr=tt.onSuccess,qt=fr===void 0?function(){}:fr,Qt=Object(_.a)(tt,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Kt=yt.a.useForm(),tr=Object(m.a)(Kt,1),or=tr[0],ot=Object(a.useRef)();Object(a.useEffect)(function(){ot.current=Qt.schoolId},[Qt.schoolId]),Object(a.useEffect)(function(){or.setFieldsValue({department:Wt})},[Wt]);var Dr=function(){var Ir=Object(c.a)(i.a.mark(function yr(er){var Et,wt,xt,$t;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return Et=er||{},wt=Et.department,xt=Et.remarks,sr.next=3,Dt({type:"account/appplyDepartment",payload:{school_id:ot.current,name:wt,remarks:xt}});case 3:$t=sr.sent,Rt(),$t&&(f.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),qt(wt));case 6:case"end":return sr.stop()}},yr)}));return function(er){return Ir.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ct,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:yn.a.formWrap,form:or,labelCol:{span:4},wrapperCol:{span:20},onFinish:Dr},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Ht),t.a.createElement(yt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Sn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:yn.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:function(){Rt()}},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},xi=Object(o.a)(function(Ct){var tt=Ct.account,pt=Ct.loading,_t=Ct.globalSetting;return{account:tt,globalSetting:_t,loading:pt.effects}})(xn),Ti=L("6UJt"),hn=L("DFOY"),cr=L("jO45"),Gn=L("jN4g"),pi=L("gJ3r"),Vn=L("jwmR"),Yr=L.n(Vn),Un=function(tt,pt){return pt.some(function(_t){return _t.label.toLowerCase().indexOf(tt.toLowerCase())>-1})},ui=U.a.TextArea,ci=function(tt){var pt=tt.account,_t=tt.globalSetting,Mt=tt.loading,Dt=tt.dispatch,Ht=tt.schoolName,Wt=tt.visible,ct=tt.onClose,Ot=ct===void 0?function(){}:ct,Rt=tt.onSuccess,fr=Rt===void 0?function(){}:Rt,qt=Object(_.a)(tt,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Qt=yt.a.useForm(),Kt=Object(m.a)(Qt,1),tr=Kt[0];Object(a.useEffect)(function(){tr.setFieldsValue({name:Ht})},[Ht]);var or=function(){var ot=Object(c.a)(i.a.mark(function Dr(Ir){var yr,er,Et,wt,xt,$t,ur;return i.a.wrap(function(lr){for(;;)switch(lr.prev=lr.next){case 0:return yr=Ir||{},er=yr.name,Et=yr.city,wt=Et===void 0?[]:Et,xt=yr.address,$t=yr.remarks,lr.next=3,Dt({type:"account/appplySchool",payload:{name:er,province:wt[0],city:wt[1],address:xt,remarks:$t}});case 3:ur=lr.sent,Ot(),ur&&(f.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),fr(er));case 6:case"end":return lr.stop()}},Dr)}));return function(Ir){return ot.apply(this,arguments)}}();return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Wt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(yt.a,{className:Yr.a.formWrap,form:tr,labelCol:{span:4},wrapperCol:{span:20},onFinish:or},t.a.createElement(yt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Yr.a.flexRow," ").concat(Yr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Yr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(cr.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Gn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(yt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(hn.a,{allowClear:!0,size:"large",options:pi.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:Un}})),t.a.createElement(yt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(yt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(ui,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Yr.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:function(){Ot()}},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Mt["account/appplySchool"]},"\u4FDD\u5B58")))))},jt=Object(o.a)(function(Ct){var tt=Ct.account,pt=Ct.loading,_t=Ct.globalSetting;return{account:tt,globalSetting:_t,loading:pt.effects}})(ci),_r=ve.a.Option,ai=g.a.Dragger,Oi=function(tt){var pt,_t,Mt=tt.user,Dt=tt.account,Ht=tt.globalSetting,Wt=tt.loading,ct=tt.dispatch,Ot=tt.Scoid,Rt=Object(_.a)(tt,["user","account","globalSetting","loading","dispatch","Scoid"]),fr=yt.a.useForm(),qt=Object(m.a)(fr,1),Qt=qt[0],Kt=Object(a.useState)({}),tr=Object(m.a)(Kt,2),or=tr[0],ot=tr[1],Dr=Object(a.useState)([]),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)([]),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)([]),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)([]),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(a.useState)(),Jt=Object(m.a)(Ft,2),br=Jt[0],Zt=Jt[1],vt=Object(a.useState)(),bt=Object(m.a)(vt,2),zt=bt[0],Lt=bt[1],kr=Object(a.useState)(),rn=Object(m.a)(kr,2),an=rn[0],Ar=rn[1],qr=Object(a.useState)(),Nr=Object(m.a)(qr,2),un=Nr[0],zr=Nr[1];Object(a.useEffect)(function(){cn()},[]),Object(a.useEffect)(function(){Object(c.a)(i.a.mark(function Xe(){var We;return i.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(Ot){ft.next=2;break}return ft.abrupt("return");case 2:return ft.next=4,$n(Ot);case 4:We=ft.sent,Tr(We==null?void 0:We.departments);case 6:case"end":return ft.stop()}},Xe)}))()},[Ot]);var cn=function(){var Xe=Object(c.a)(i.a.mark(function We(){var qe;return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,ct({type:"account/getSchoolOption"});case 2:qe=kt.sent,er(qe==null?void 0:qe.schools);case 4:case"end":return kt.stop()}},We)}));return function(){return Xe.apply(this,arguments)}}(),$n=function(We){return ct({type:"account/getDepartmentOption",payload:{id:We}})};Object(a.useEffect)(function(){if(!Dt.basicInfo)return;var Xe=Dt.basicInfo,We={identity:Xe.identity,school:Xe.school_name,department:Xe.department_name,studentNo:Xe.student_id,jobTitle:Xe.identity=="teacher"?Xe.technical_title:"\u6559\u6388",manager:Xe.identity=="professional"?Xe.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Qt.setFieldsValue(We),ot(We)},[Dt.basicInfo]);var Ie=function(){Ar(!0)},Ge=function(){if(!yr.find(function(We){return We.name===or.school})){f.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}zr(!0)},Ye=function(We){if(ot(Object(P.a)({},Qt.getFieldsValue())),"school"in We){$t(yr.filter(function(ft){return ft.name.includes(We.school)}));var qe=(yr.find(function(ft){return ft.name===We.school})||{}).id;qe?Fe(We.school):(Qt.setFieldsValue({department:""}),ot(Object(P.a)(Object(P.a)({},or),{school:We.school,department:""})))}},Fe=function(){var Xe=Object(c.a)(i.a.mark(function We(qe,ft){var kt,It,Xt,Pr,Gr,Kr;return i.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return Pr=(kt=yr.find(function(en){return en.name===qe}))===null||kt===void 0?void 0:kt.id,Wr.next=3,$n(Pr);case 3:if(Wr.t0=Wr.sent,Wr.t0){Wr.next=6;break}Wr.t0={};case 6:Gr=Wr.t0,Tr(Gr==null?void 0:Gr.departments),Kr=ft||(Gr==null||((It=Gr.departments)===null||It===void 0||((Xt=It[0])===null||Xt===void 0))?void 0:Xt.name),Qt.setFieldsValue({department:Kr}),ot(Object(P.a)(Object(P.a)({},or),{school:qe,department:Kr}));case 11:case"end":return Wr.stop()}},We)}));return function(qe,ft){return Xe.apply(this,arguments)}}(),ye=function(){var Xe=Object(c.a)(i.a.mark(function We(qe){return i.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:return kt.next=2,cn();case 2:Qt.setFieldsValue({school:qe,department:""}),ot(Object(P.a)(Object(P.a)({},or),{school:qe,department:""}));case 4:case"end":return kt.stop()}},We)}));return function(qe){return Xe.apply(this,arguments)}}(),Pe=function(We){if(We.file.status==="uploading"){Lt(!0);return}if(We.file.status==="done"){var qe;console.log(We.file,We.file.response),Zt((qe=We.file.response)===null||qe===void 0?void 0:qe.id),Object(Bt.C)(We.file.originFileObj,function(ft){Or(ft),Lt(!1)})}},we=function(){var Xe=Object(c.a)(i.a.mark(function We(qe){var ft,kt,It,Xt,Pr,Gr,Kr,Qr,Wr,en,tn,pn,on,kn,ln,Mr;return i.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(Pr=qe||{},Gr=Pr.school,Kr=Pr.department,Qr=Pr.identity,Wr=Pr.studentNo,en=Pr.jobTitle,tn=Pr.manager,pr){nn.next=4;break}return f.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),nn.abrupt("return");case 4:return pn=(ft=yr.find(function(dn){return dn.name===Gr}))===null||ft===void 0?void 0:ft.id,on=(kt=lr.find(function(dn){return dn.name===Kr}))===null||kt===void 0?void 0:kt.id,Qr==="student"?kn=Wr:Qr==="teacher"?kn=en:kn=tn,nn.next=9,ct({type:"account/applyProfessionalAuth",payload:{id:((It=Dt.basicInfo)===null||It===void 0?void 0:It.id)||((Xt=Mt.userInfo)===null||Xt===void 0?void 0:Xt.login),school_id:pn,department_id:on,identity:Qr,extra:kn,attachment_ids:[br]}});case 9:ln=nn.sent,je(),ln&&(f.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ct({type:"account/getBasicInfo",payload:{login:(Mr=Mt.userInfo)===null||Mr===void 0?void 0:Mr.login}}));case 12:case"end":return nn.stop()}},We)}));return function(qe){return Xe.apply(this,arguments)}}(),je=function(){ct({type:"account/setActionTabs",payload:{}})},ze={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(V.a.API_SERVER,"/api/attachments.json"),className:St.a.uploader,onChange:Pe,beforeUpload:function(We){var qe=We.type==="image/jpeg"||We.type==="image/png"||We.type==="image/jpg"||We.type==="image/bmp";return qe||f.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),qe}};return t.a.createElement(T.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:St.a.modal,visible:Dt.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(St.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(l.a,{spinning:!!zt},t.a.createElement(yt.a,{className:St.a.formWrap,form:Qt,layout:"horizontal",onValuesChange:Ye,onFinish:we},t.a.createElement(H.a,{gutter:[10,0]},t.a.createElement(dt.a,{flex:"300px"},t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(_r,{value:"student"},"\u5B66\u751F"),t.a.createElement(_r,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),or.identity==="student"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),or.identity==="teacher"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(_r,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(_r,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(_r,{value:"\u52A9\u6559"},"\u52A9\u6559")))),or.identity==="professional"&&t.a.createElement(dt.a,{flex:"200px"},t.a.createElement(yt.a.Item,{initialValue:or.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(ve.a,null,t.a.createElement(_r,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(_r,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(_r,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(yt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:or.school&&!(yr!=null&&yr.find(function(Xe){return Xe.name===or.school}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",or.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ie},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(mn.a,{showSearch:!0,options:xt==null?void 0:xt.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:or.department&&!(lr!=null&&lr.find(function(Xe){return Xe.name===or.department}))&&t.a.createElement("div",{className:St.a.schoolHintWrap},t.a.createElement("span",{className:St.a.colorCDCDCD},or.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(or.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(St.a.color0152d9," current"),onClick:Ge},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(mn.a,{showSearch:!0,onChange:function(We){return Lr(lr.filter(function(qe){return qe.name.includes(We)}))},options:ir==null?void 0:ir.map(function(Xe){return{value:Xe.name}})})),t.a.createElement(yt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:St.a.flexRow},t.a.createElement("div",{className:"".concat(St.a.flexColumn," ").concat(St.a.example)},t.a.createElement("span",{className:St.a.exampleImg},t.a.createElement("img",{src:Gt.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(St.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:St.a.flexColumn},t.a.createElement(ai,Object(Le.a)({},ze,{accept:".png,.jpg,.bmp,.jpeg"}),pr?t.a.createElement("img",{src:pr,className:St.a.uploadImg}):t.a.createElement("div",{className:St.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(St.a.uploadTipIcon)})),t.a.createElement("p",{className:St.a.uploadTip},t.a.createElement("a",{className:St.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:St.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:St.a.footerWrap},t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{className:"mr5",size:"large",onClick:je},"\u53D6\u6D88"),t.a.createElement(C.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:St.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Ht!=null&&(pt=Ht.setting)!==null&&pt!==void 0&&pt.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(jt,{visible:an,onClose:function(){return Ar(!1)},schoolName:or.school,onSuccess:ye}),t.a.createElement(xi,{visible:un,onClose:function(){return zr(!1)},schoolId:(_t=yr.find(function(Xe){return Xe.name===or.school}))===null||_t===void 0?void 0:_t.id,schoolName:or.school,departmentName:or.department,onSuccess:function(We){return Fe(or.school,We)}}))},Ai=Object(o.a)(function(Ct){var tt=Ct.user,pt=Ct.account,_t=Ct.loading,Mt=Ct.globalSetting;return{user:tt,account:pt,globalSetting:Mt,loading:_t.effects}})(Oi),Ri=L("aCH8"),se=L.n(Ri);function W(Ct){var tt=Ct.type,pt=Ct.dispatch,_t=Ct.userid,Mt=Ct.isshow,Dt=Ct.setPhoneshow,Ht=Ct.setEmailshow,Wt="79e33abd4b6588941ab7622aed1e67e8",ct=Object(a.useState)(""),Ot=Object(m.a)(ct,2),Rt=Ot[0],fr=Ot[1],qt=Object(a.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Qt=Object(m.a)(qt,2),Kt=Qt[0],tr=Qt[1],or=Object(a.useState)(60),ot=Object(m.a)(or,2),Dr=ot[0],Ir=ot[1],yr=Object(a.useState)(!1),er=Object(m.a)(yr,2),Et=er[0],wt=er[1],xt=Object(a.useState)(""),$t=Object(m.a)(xt,2),ur=$t[0],sr=$t[1];function lr(){return Tr.apply(this,arguments)}function Tr(){return Tr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(Rt){Ft.next=3;break}return tt===3?f.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):f.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),Ft.abrupt("return");case 3:return Ft.next=5,pt({type:"competitions/getVerification",payload:{type:tt,login:Rt,smscode:se()(Wt+Rt)}});case 5:pr=Ft.sent,pr.status===1&&(f.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),Zr(),wt(!0));case 7:case"end":return Ft.stop()}},gr)})),Tr.apply(this,arguments)}function Zr(){Ir(60);var gr=setInterval(function(){--Dr,Dr>-1?Ir(Dr):(clearInterval(gr),wt(!1))},1e3)}function et(){return ir.apply(this,arguments)}function ir(){return ir=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,pt({type:"competitions/PhoneBind",payload:{userid:_t,code:ur,phone:Rt}});case 2:pr=Ft.sent,pr.status===0&&(f.b.info("\u7ED1\u5B9A\u6210\u529F"),Dt("none"));case 4:case"end":return Ft.stop()}},gr)})),ir.apply(this,arguments)}function Lr(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(c.a)(i.a.mark(function gr(){var pr;return i.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:return Ft.next=2,pt({type:"competitions/EmailBind",payload:{userid:_t,code:ur,email:Rt}});case 2:pr=Ft.sent,pr.status===0&&(f.b.info("\u7ED1\u5B9A\u6210\u529F"),Ht("none"));case 4:case"end":return Ft.stop()}},gr)})),Jr.apply(this,arguments)}return t.a.createElement("div",{style:{display:Mt}},t.a.createElement("p",null,t.a.createElement(U.a,{value:Rt,onChange:function(pr){return fr(pr.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(U.a,{value:ur,onChange:function(pr){return sr(pr.target.value)},placeholder:tt===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(C.a,{disabled:Et,onClick:function(){return lr()},type:"primary",style:{marginLeft:"20px",width:"100px"}},Et?"\u91CD\u65B0\u53D1\u9001".concat(Dr,"s"):Kt),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(C.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!ur){f.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}tt===3?et():Lr()}},"\u786E\u8BA4"),t.a.createElement(C.a,{style:{marginLeft:"20px"},onClick:function(){tt===3?Dt("none"):Ht("none")}},"\u53D6\u6D88")))}var $=W;function ne(Ct){var tt=Ct.dispatch,pt=Ct.userid,_t={wrapperCol:{offset:3,span:21}},Mt=yt.a.useForm(),Dt=Object(m.a)(Mt,1),Ht=Dt[0],Wt=Object(S.i)(),ct=Wt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(yt.a,{form:Ht,name:"basic"},t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,Object(Le.a)({},_t,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(U.a,null)),t.a.createElement(yt.a.Item,null,t.a.createElement(C.a,{type:"primary",htmlType:"submit",onClick:Object(c.a)(i.a.mark(function Ot(){return i.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:Ht.validateFields().then(function(){var qt=Object(c.a)(i.a.mark(function Qt(Kt){var tr;return i.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,tt({type:"competitions/setleader",payload:Object(P.a)({identifier:ct,user_id:pt},Kt)});case 2:tr=ot.sent,tr.status===0&&f.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return ot.stop()}},Qt)}));return function(Qt){return qt.apply(this,arguments)}}());case 1:case"end":return fr.stop()}},Ot)}))},"\u63D0\u4EA4"))))}var ce=ne,oe={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ke(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt,ct,Ot=Ct.Prize,Rt=Ct.Accounts,fr=Ct.dispatch,qt=Ct.userid,Qt=Object(a.useState)("none"),Kt=Object(m.a)(Qt,2),tr=Kt[0],or=Kt[1],ot=Object(a.useState)("none"),Dr=Object(m.a)(ot,2),Ir=Dr[0],yr=Dr[1];function er(wt){return Et.apply(this,arguments)}function Et(){return Et=Object(c.a)(i.a.mark(function wt(xt){var $t;return i.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(!(xt==="1")){sr.next=6;break}return sr.next=3,fr({type:"competitions/Authentication"});case 3:$t=sr.sent,sr.next=9;break;case 6:return sr.next=8,fr({type:"competitions/Professional"});case 8:$t=sr.sent;case 9:$t.status===0&&f.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return sr.stop()}},wt)})),Et.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){fr({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,Rt==null?void 0:Rt.name),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(C.a,{type:"primary",onClick:function(){return er("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(Rt==null?void 0:Rt.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){fr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,Rt&&Rt.identity&&oe[Rt.identity]),(Rt==null?void 0:Rt.authentication)==="uncertified"?null:(Rt==null?void 0:Rt.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(C.a,{type:"primary",onClick:function(){return er("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(C.a,{type:"primary",onClick:function(){fr({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(Rt==null?void 0:Rt.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.phone)||"--"),tr==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){or("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:3,dispatch:fr,userid:Rt==null?void 0:Rt.id,isshow:tr,setPhoneshow:or,setEmailshow:yr}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(Rt==null?void 0:Rt.mail)||"--"),Ir==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){yr("block")}},"\u66F4\u6362"):null),t.a.createElement($,{type:4,dispatch:fr,userid:Rt==null?void 0:Rt.id,isshow:Ir,setEmailshow:yr,setPhoneshow:or})),Ot!=null&&Ot.leader&&Ot!==null&&Ot!==void 0&&Ot.teams&&Ot!==null&&Ot!==void 0&&(tt=Ot.teams[0])!==null&&tt!==void 0&&(pt=tt.bank_account)!==null&&pt!==void 0&&pt.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(ce,{dispatch:fr,userid:qt})),Ot!=null&&Ot.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((_t=Ot.teams[0])===null||_t===void 0||((Mt=_t.bank_account)===null||Mt===void 0))?void 0:Mt.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Dt=Ot.teams[0])===null||Dt===void 0||((Ht=Dt.bank_account)===null||Ht===void 0))?void 0:Ht.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(Ot==null?void 0:Ot.teams)&&(Ot==null||((Wt=Ot.teams[0])===null||Wt===void 0||((ct=Wt.bank_account)===null||ct===void 0))?void 0:ct.card_no)||"--"))):null,t.a.createElement(Ai,{Scoid:Rt==null?void 0:Rt.school_id}),t.a.createElement(sn,null))}var At=Ke,Vt=ge.a.TabPane;function vr(Ct){var tt=Ct.Prize,pt=Ct.Accounts,_t=Ct.getAccounts,Mt=Ct.dispatch,Dt=Ct.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ge.a,{defaultActiveKey:"1",onChange:function(Wt){Wt==="2"&&_t()}},t.a.createElement(Vt,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(Ae,{Prize:tt})),t.a.createElement(Vt,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(At,{userid:Dt,dispatch:Mt,Prize:tt,Accounts:pt})))))}var Pt=vr,Br=L("xKgJ"),jr=L("wd/R"),fn=L.n(jr),ti=ge.a.TabPane;function mi(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.ChartRules,ct=Ct.ItemData,Ot=Ct.getCharts,Rt=Ct.Selectkey,fr=Ct.HeaderDetail,qt=Ct.getChartRules,Qt=Ct.userinfo,Kt=Ct.Editable,tr=Ct.dispatch,or=Ct.StaffDetail,ot=Object(a.useState)(!1),Dr=Object(m.a)(ot,2),Ir=Dr[0],yr=Dr[1],er=Object(a.useState)(""),Et=Object(m.a)(er,2),wt=Et[0],xt=Et[1],$t=Object(a.useState)(!0),ur=Object(m.a)($t,2),sr=ur[0],lr=ur[1],Tr=Object(a.useState)(),Zr=Object(m.a)(Tr,2),et=Zr[0],ir=Zr[1],Lr=Object(a.useState)(),Jr=Object(m.a)(Lr,2),gr=Jr[0],pr=Jr[1],Or=Object(S.i)(),Ft=Or.identifier;Object(a.useEffect)(function(){if(sr){var vt,bt,zt,Lt,kr=Wt==null||((vt=Wt.stages)===null||vt===void 0)?void 0:vt[0];ir(kr);var rn=Wt==null||((bt=Wt.stages)===null||bt===void 0||((zt=bt[0])===null||zt===void 0||((Lt=zt.children)===null||Lt===void 0)))?void 0:Lt[0];if(pr(rn),kr!=null&&kr.id){var an,Ar,qr;Ot(kr==null?void 0:kr.id),xt(((an=Wt.rule_contents)===null||an===void 0||((Ar=an.filter(function(cn){return parseInt(cn.competition_stage_id)===parseInt(kr==null?void 0:kr.id)}))===null||Ar===void 0||((qr=Ar[0])===null||qr===void 0))?void 0:qr.content)||"")}else{var Nr,un,zr;Ot(0),xt(((Nr=Wt.rule_contents)===null||Nr===void 0||((un=Nr.filter(function(cn){return parseInt(cn.competition_stage_id)===0}))===null||un===void 0||((zr=un[0])===null||zr===void 0))?void 0:zr.content)||"")}}},[Wt]);function Jt(){return br.apply(this,arguments)}function br(){return br=Object(c.a)(i.a.mark(function vt(){var bt,zt,Lt,kr,rn,an,Ar,qr,Nr;return i.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(wt){zr.next=3;break}return f.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),zr.abrupt("return");case 3:if(lr(!1),bt=et==null?void 0:et.id,!bt){zr.next=12;break}return zr.next=8,Object(ae.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:wt,md_content_id:(zt=Wt.rule_contents)===null||zt===void 0||((Lt=zt.filter(function(cn){return parseInt(cn.competition_stage_id)===parseInt(bt)}))===null||Lt===void 0||((kr=Lt[0])===null||kr===void 0))?void 0:kr.id,stage_id:et==null?void 0:et.id}});case 8:rn=zr.sent,rn.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),qt()),zr.next=16;break;case 12:return zr.next=14,Object(ae.a)("/api/competitions/".concat(Ft,"/update_md_content.json"),{method:"post",body:{competition_module_id:Rt,content:wt,md_content_id:(an=Wt.rule_contents)===null||an===void 0||((Ar=an.filter(function(cn){return parseInt(cn.competition_stage_id)===0}))===null||Ar===void 0||((qr=Ar[0])===null||qr===void 0))?void 0:qr.id,stage_id:et==null?void 0:et.id}});case 14:Nr=zr.sent,Nr.status===0&&(f.b.info("\u66F4\u65B0\u6210\u529F"),yr(!1),qt());case 16:case"end":return zr.stop()}},vt)})),br.apply(this,arguments)}var Zt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(bt,zt,Lt){return t.a.createElement("span",null,bt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(bt){return t.a.createElement(nt.a,{title:bt},t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=10?(bt==null?void 0:bt.substr(0,10))+"...":bt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(bt){return t.a.createElement("span",{title:bt},bt&&(bt==null?void 0:bt.length)>=6?(bt==null?void 0:bt.substr(0,6))+"...":bt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(bt){return t.a.createElement("span",null,bt===1?"\u8BA1\u7B97\u4E2D":bt===2?"\u5B8C\u6210":bt===0?"\u5F85\u8BA1\u7B97":bt===3&&"\u9519\u8BEF")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){return(bt==null?void 0:bt.length)>0?bt==null?void 0:bt.map(function(zt,Lt){return t.a.createElement("span",null,zt==null?void 0:zt.name,"\uFF1A",zt==null?void 0:zt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(bt){return t.a.createElement("span",null,bt||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="fid"}))===null||zt===void 0)?void 0:zt.value)||"--")}},(et==null?void 0:et.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="total_score"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(bt){return t.a.createElement("span",null,bt||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Coffee"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Easyship"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Scar"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Scarf"}))===null||zt===void 0)?void 0:zt.value)||"--")}},!(et!=null&&et.display_four_indicators)&&(et==null?void 0:et.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(bt){var zt;return t.a.createElement("span",null,(bt==null||((zt=bt.find(function(Lt){return(Lt==null?void 0:Lt.name)==="Total"}))===null||zt===void 0)?void 0:zt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(bt){return t.a.createElement("a",{href:bt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(vt){return!!vt});return t.a.createElement("div",null,(Wt==null||((tt=Wt.stages)===null||tt===void 0)?void 0:tt.length)>0?null:t.a.createElement(Qe,null),(Wt==null||((pt=Wt.stages)===null||pt===void 0)?void 0:pt.length)>0&&t.a.createElement(ge.a,{animated:!0,tabBarExtraContent:Qt!=null&&Qt.admin||Qt!=null&&Qt.business||Kt?t.a.createElement(C.a,{onClick:function(){yr(!0)}},"\u7F16\u8F91"):or.enrolled&&(et==null?void 0:et.start_time)&&(et==null?void 0:et.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",fn()(et==null?void 0:et.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",fn()(et==null?void 0:et.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(C.a,{style:{marginLeft:"20px"},disabled:fn()(et==null?void 0:et.start_time).unix()>fn()(fn()().format("YYYY-MM-DD HH:mm:s")).unix()||fn()(fn()().format("YYYY-MM-DD HH:mm:s")).unix()>fn()(et==null?void 0:et.end_time).unix(),onClick:function(){tr({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(gr==null?void 0:gr.id)||(et==null?void 0:et.id),id:fr==null?void 0:fr.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(bt){var zt,Lt,kr,rn,an;yr(!1);var Ar=Wt==null||((zt=Wt.stages)===null||zt===void 0)?void 0:zt.filter(function(Nr){return parseInt(bt)===parseInt(Nr==null?void 0:Nr.id)})[0],qr=Ar==null||((Lt=Ar.children)===null||Lt===void 0)?void 0:Lt[0];pr(qr),ir(Ar),xt(((kr=Wt.rule_contents)===null||kr===void 0||((rn=kr.filter(function(Nr){return parseInt(Nr.competition_stage_id)===parseInt(Ar==null?void 0:Ar.id)}))===null||rn===void 0||((an=rn[0])===null||an===void 0))?void 0:an.content)||""),Ot((qr==null?void 0:qr.id)||bt)}},Wt&&Wt.stages.map(function(vt,bt){return t.a.createElement(ti,{tab:vt.name,key:vt.id===null?0:vt.id},Ir===!1&&Wt&&Wt.rule_contents.map(function(zt,Lt){if(vt.id===zt.competition_stage_id)return t.a.createElement(B.a,{key:Lt,value:zt.content===void 0||zt.content===null?"":zt.content});if(vt.id===null&&zt.competition_stage_id===0)return t.a.createElement(B.a,{key:Lt,value:zt.content===void 0||zt.content===null?"":zt.content})}))})),(et==null||((_t=et.children)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{activeKey:(gr==null?void 0:gr.id)+"",onChange:function(bt){var zt,Lt=et==null||((zt=et.children)===null||zt===void 0)?void 0:zt.filter(function(kr){return parseInt(bt)===parseInt(kr==null?void 0:kr.id)})[0];pr(Lt),Ot(bt)}},et==null||((Mt=et.children)===null||Mt===void 0)?void 0:Mt.map(function(vt,bt){return t.a.createElement(ti,{tab:vt.name,key:vt.id===null?0:vt.id})})),Ir&&t.a.createElement("div",null,t.a.createElement(ee.a,{defaultValue:wt,onChange:function(bt){xt(bt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(C.a,{style:{width:"90px"},type:"primary",onClick:function(){return Jt()}},"\u63D0\u4EA4"),t.a.createElement(C.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return yr(!1)}},"\u53D6\u6D88"))),((Dt=fr.competition_modules.filter(function(vt){return vt.id===Rt}))===null||Dt===void 0||((Ht=Dt[0])===null||Ht===void 0)?void 0:Ht.show_leaderboard)&&t.a.createElement(Q.a,{dataSource:ct==null?void 0:ct.results,columns:Zt}))}var Rn=mi,Li=L("DjyN"),qi=L("NUBc"),Qn=ge.a.TabPane;function _i(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.loading,ct=Ct.ChartRules,Ot=Ct.ItemData,Rt=Ct.getCharts,fr=Ct.Selectkey,qt=Ct.HeaderDetail,Qt=Ct.getChartRules,Kt=Ct.userinfo,tr=Ct.Editable,or=Ct.dispatch,ot=Ct.StaffDetail,Dr=Object(a.useState)(!1),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)(""),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)(!0),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)(),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(S.i)(),Jt=Ft.identifier,br=Object(a.useState)({page:1,limit:10,sort:"desc"}),Zt=Object(m.a)(br,2),vt=Zt[0],bt=Zt[1];Object(a.useEffect)(function(){var Lt;lr&&ct!==null&&ct!==void 0&&(Lt=ct.stages)!==null&&Lt!==void 0&&Lt[0]&&zt()},[ct==null||((tt=ct.stages)===null||tt===void 0)?void 0:tt[0]]);var zt=function(){var Lt=Object(c.a)(i.a.mark(function kr(){var rn,an,Ar,qr,Nr,un;return i.a.wrap(function(cn){for(;;)switch(cn.prev=cn.next){case 0:return Nr=ct==null||((rn=ct.stages)===null||rn===void 0)?void 0:rn[0],Lr(Nr),un=ct==null||((an=ct.stages)===null||an===void 0||((Ar=an[0])===null||Ar===void 0||((qr=Ar.children)===null||qr===void 0)))?void 0:qr[0],Or(un),vt.id=(un==null?void 0:un.id)||(Nr==null?void 0:Nr.id),bt(Object(P.a)({},vt)),cn.next=7,Rt(Object(P.a)(Object(P.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return cn.stop()}},kr)}));return function(){return Lt.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((pt=ct.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Qe,null),(ct==null||((_t=ct.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Lt=Object(c.a)(i.a.mark(function kr(rn){var an,Ar,qr,Nr,un,zr,cn;return i.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return er(!1),zr=ct==null||((an=ct.stages)===null||an===void 0)?void 0:an.filter(function(Ge){return parseInt(rn)===parseInt(Ge==null?void 0:Ge.id)})[0],cn=zr==null||((Ar=zr.children)===null||Ar===void 0)?void 0:Ar[0],Or(cn),Lr(zr),$t(((qr=ct.rule_contents)===null||qr===void 0||((Nr=qr.filter(function(Ge){return parseInt(Ge.competition_stage_id)===parseInt(zr==null?void 0:zr.id)}))===null||Nr===void 0||((un=Nr[0])===null||un===void 0))?void 0:un.content)||""),vt.page=1,vt.limit=10,vt.id=(cn==null?void 0:cn.id)||rn,bt(Object(P.a)({},vt)),Ie.next=9,Rt(Object(P.a)({},vt));case 9:case"end":return Ie.stop()}},kr)}));return function(kr){return Lt.apply(this,arguments)}}()},ct&&ct.stages.map(function(Lt,kr){return t.a.createElement(Qn,{tab:Lt.name,key:Lt.id===null?0:Lt.id})})),(ir==null||((Mt=ir.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ge.a,{activeKey:(pr==null?void 0:pr.id)+"",onChange:function(){var Lt=Object(c.a)(i.a.mark(function kr(rn){var an,Ar;return i.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:return Ar=ir==null||((an=ir.children)===null||an===void 0)?void 0:an.filter(function(un){return parseInt(rn)===parseInt(un==null?void 0:un.id)})[0],Or(Ar),vt.page=1,vt.limit=10,vt.id=rn,bt(Object(P.a)({},vt)),Nr.next=5,Rt(Object(P.a)({},vt));case 5:case"end":return Nr.stop()}},kr)}));return function(kr){return Lt.apply(this,arguments)}}()},ir==null||((Dt=ir.children)===null||Dt===void 0)?void 0:Dt.map(function(Lt,kr){return t.a.createElement(Qn,{tab:Lt.name,key:Lt.id===null?0:Lt.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){vt.page=1,vt.sort=vt.sort==="desc"?"asc":"desc",bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",vt.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(vt.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(kr){vt.page=1,vt.search=kr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(l.a,{spinning:Wt},Ot==null||((Ht=Ot.results)===null||Ht===void 0)?void 0:Ht.map(function(Lt,kr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:kr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/images/"+(Lt==null?void 0:Lt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},Lt==null?void 0:Lt.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Lt==null?void 0:Lt.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(Lt==null?void 0:Lt.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Lt==null?void 0:Lt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(Lt==null?void 0:Lt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(Lt==null?void 0:Lt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(Lt==null?void 0:Lt.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(qi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(kr,rn){vt.page=kr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}})))}var vi=_i,Fi=function(tt){var pt=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],_t=["","\u5341","\u767E","\u5343","\u4E07"];tt=parseInt(tt);var Mt=function(ct){for(var Ot=ct.toString().split("").reverse(),Rt="",fr=0;fr0&&Ot[fr]==0&&Ot[fr-1]==0?"":pt[Ot[fr]]+(Ot[fr]==0?_t[0]:_t[fr]))+Rt;return Rt},Dt=Math.floor(tt/1e4),Ht=tt%1e4;return Ht.toString().length<4&&(Ht="0"+Ht),Dt?Mt(Dt)+"\u4E07"+Mt(Ht):Mt(tt)};function gi(Ct){var tt,pt=Ct.item,_t=Ct.index,Mt=Ct.StaffDetail,Dt=Object(a.useState)(!0),Ht=Object(m.a)(Dt,2),Wt=Ht[0],ct=Ht[1],Ot=Object(a.useState)(!0),Rt=Object(m.a)(Ot,2),fr=Rt[0],qt=Rt[1],Qt=Object(a.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:V.a.IMG_SERVER+"/"+(pt==null?void 0:pt.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Fi(_t+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},pt==null?void 0:pt.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},pt==null?void 0:pt.challenges_count)," ")),t.a.createElement("div",{ref:Qt},t.a.createElement(B.a,{style:{maxHeight:Wt&&100},value:pt==null?void 0:pt.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ct(!Wt)}},Wt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Wt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:fr&&58,overflow:"hidden"}},pt==null||((tt=pt.challenges)===null||tt===void 0)?void 0:tt.map(function(Kt,tr){return t.a.createElement("div",{style:{marginTop:tr===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",tr+1,"\u5173",Kt==null?void 0:Kt.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){qt(!fr)}},fr?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(fr?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Mt==null?void 0:Mt.enrolled)&&t.a.createElement(C.a,{onClick:function(){window.open("/shixuns/".concat(pt==null?void 0:pt.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Gi=gi,Mi=ge.a.TabPane;function oa(Ct){var tt,pt,_t,Mt,Dt,Ht,Wt=Ct.loading,ct=Ct.ChartRules,Ot=Ct.ItemData,Rt=Ct.getCharts,fr=Ct.Selectkey,qt=Ct.HeaderDetail,Qt=Ct.getChartRules,Kt=Ct.userinfo,tr=Ct.Editable,or=Ct.dispatch,ot=Ct.StaffDetail,Dr=Object(a.useState)(!1),Ir=Object(m.a)(Dr,2),yr=Ir[0],er=Ir[1],Et=Object(a.useState)(""),wt=Object(m.a)(Et,2),xt=wt[0],$t=wt[1],ur=Object(a.useState)(!0),sr=Object(m.a)(ur,2),lr=sr[0],Tr=sr[1],Zr=Object(a.useState)(),et=Object(m.a)(Zr,2),ir=et[0],Lr=et[1],Jr=Object(a.useState)(),gr=Object(m.a)(Jr,2),pr=gr[0],Or=gr[1],Ft=Object(S.i)(),Jt=Ft.identifier,br=Object(a.useState)({page:1,limit:10}),Zt=Object(m.a)(br,2),vt=Zt[0],bt=Zt[1],zt=Object(a.useState)(),Lt=Object(m.a)(zt,2),kr=Lt[0],rn=Lt[1];Object(a.useEffect)(function(){var Ar;lr&&ct!==null&&ct!==void 0&&(Ar=ct.stages)!==null&&Ar!==void 0&&Ar[0]&&an()},[ct==null||((tt=ct.stages)===null||tt===void 0)?void 0:tt[0]]);var an=function(){var Ar=Object(c.a)(i.a.mark(function qr(){var Nr,un,zr,cn,$n,Ie;return i.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return $n=ct==null||((Nr=ct.stages)===null||Nr===void 0)?void 0:Nr[0],Lr($n),Ie=ct==null||((un=ct.stages)===null||un===void 0||((zr=un[0])===null||zr===void 0||((cn=zr.children)===null||cn===void 0)))?void 0:cn[0],Or(Ie),vt.id=(Ie==null?void 0:Ie.id)||($n==null?void 0:$n.id),bt(Object(P.a)({},vt)),Ye.next=7,Rt(Object(P.a)(Object(P.a)({},vt),{},{stage_id:vt.id}));case 7:case"end":return Ye.stop()}},qr)}));return function(){return Ar.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((pt=ct.stages)===null||pt===void 0)?void 0:pt.length)>0?null:t.a.createElement(Qe,null),(ct==null||((_t=ct.stages)===null||_t===void 0)?void 0:_t.length)>0&&t.a.createElement(ge.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var Ar=Object(c.a)(i.a.mark(function qr(Nr){var un,zr,cn,$n,Ie,Ge,Ye;return i.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return er(!1),Ge=ct==null||((un=ct.stages)===null||un===void 0)?void 0:un.filter(function(Pe){return parseInt(Nr)===parseInt(Pe==null?void 0:Pe.id)})[0],Ye=Ge==null||((zr=Ge.children)===null||zr===void 0)?void 0:zr[0],Or(Ye),Lr(Ge),$t(((cn=ct.rule_contents)===null||cn===void 0||(($n=cn.filter(function(Pe){return parseInt(Pe.competition_stage_id)===parseInt(Ge==null?void 0:Ge.id)}))===null||$n===void 0||((Ie=$n[0])===null||Ie===void 0))?void 0:Ie.content)||""),vt.page=1,vt.limit=10,vt.id=(Ye==null?void 0:Ye.id)||Nr,bt(Object(P.a)({},vt)),ye.next=9,Rt(Object(P.a)({},vt));case 9:case"end":return ye.stop()}},qr)}));return function(qr){return Ar.apply(this,arguments)}}()},ct&&ct.stages.map(function(Ar,qr){return t.a.createElement(Mi,{tab:Ar.name,key:Ar.id===null?0:Ar.id})})),(ir==null||((Mt=ir.children)===null||Mt===void 0)?void 0:Mt.length)>0&&t.a.createElement(ge.a,{activeKey:(pr==null?void 0:pr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var Ar=Object(c.a)(i.a.mark(function qr(Nr){var un,zr;return i.a.wrap(function($n){for(;;)switch($n.prev=$n.next){case 0:return zr=ir==null||((un=ir.children)===null||un===void 0)?void 0:un.filter(function(Ie){return parseInt(Nr)===parseInt(Ie==null?void 0:Ie.id)})[0],Or(zr),vt.page=1,vt.limit=10,vt.id=Nr,bt(Object(P.a)({},vt)),$n.next=5,Rt(Object(P.a)({},vt));case 5:case"end":return $n.stop()}},qr)}));return function(qr){return Ar.apply(this,arguments)}}()},ir==null||((Dt=ir.children)===null||Dt===void 0)?void 0:Dt.map(function(Ar,qr){return t.a.createElement(Mi,{tab:Ar.name,key:Ar.id===null?0:Ar.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},Ot==null?void 0:Ot.start_time,"~",Ot==null?void 0:Ot.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(Ot==null?void 0:Ot.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(l.a,{spinning:Wt},Ot==null||((Ht=Ot.results)===null||Ht===void 0)?void 0:Ht.map(function(Ar,qr){return t.a.createElement(Gi,{StaffDetail:ot,item:Ar,index:qr})})),t.a.createElement(qi.a,{total:Ot==null?void 0:Ot.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:vt.page,onChange:function(qr,Nr){vt.page=qr,bt(Object(P.a)({},vt)),Rt(Object(P.a)({},vt))}})))}var sa=oa,Ii=L("UfjD"),Xn=L("qHvr"),Vi=function(tt){var pt,_t,Mt,Dt,Ht,Wt,ct,Ot,Rt=tt.globalSetting,fr=tt.loading,qt=tt.dispatch,Qt=tt.user,Kt=Object(_.a)(tt,["globalSetting","loading","dispatch","user"]),tr=Object(a.useState)({avatar_url:""}),or=Object(m.a)(tr,2),ot=or[0],Dr=or[1],Ir=Object(a.useState)([]),yr=Object(m.a)(Ir,2),er=yr[0],Et=yr[1],wt=Object(S.i)(),xt=wt.identifier,$t=Object(a.useState)([]),ur=Object(m.a)($t,2),sr=ur[0],lr=ur[1],Tr=Object(a.useState)(!0),Zr=Object(m.a)(Tr,2),et=Zr[0],ir=Zr[1],Lr=Object(a.useState)([]),Jr=Object(m.a)(Lr,2),gr=Jr[0],pr=Jr[1],Or=Object(a.useState)([]),Ft=Object(m.a)(Or,2),Jt=Ft[0],br=Ft[1],Zt=Object(a.useState)(!1),vt=Object(m.a)(Zt,2),bt=vt[0],zt=vt[1],Lt=Object(a.useState)(!1),kr=Object(m.a)(Lt,2),rn=kr[0],an=kr[1],Ar=Object(a.useState)(!1),qr=Object(m.a)(Ar,2),Nr=qr[0],un=qr[1],zr=Object(a.useState)([]),cn=Object(m.a)(zr,2),$n=cn[0],Ie=cn[1],Ge=Object(a.useState)([]),Ye=Object(m.a)(Ge,2),Fe=Ye[0],ye=Ye[1],Pe=Object(a.useState)([]),we=Object(m.a)(Pe,2),je=we[0],ze=we[1],Xe=Object(a.useState)(!1),We=Object(m.a)(Xe,2),qe=We[0],ft=We[1],kt=Object(a.useState)([]),It=Object(m.a)(kt,2),Xt=It[0],Pr=It[1],Gr=Object(a.useState)(),Kr=Object(m.a)(Gr,2),Qr=Kr[0],Wr=Kr[1],en=Object(a.useState)(!0),tn=Object(m.a)(en,2),pn=tn[0],on=tn[1],kn=Object(a.useState)(!1),ln=Object(m.a)(kn,2),Mr=ln[0],Fr=ln[1],nn=Object(a.useState)(!1),dn=Object(m.a)(nn,2),wr=dn[0],bn=dn[1],Wn=Object(a.useState)(!1),wn=Object(m.a)(Wn,2),Mn=wn[0],Tn=wn[1],Yn=Object(a.useState)(!1),ri=Object(m.a)(Yn,2),Hn=ri[0],di=ri[1],Xi=Object(a.useState)(!1),wi=Object(m.a)(Xi,2),ni=wi[0],In=wi[1],Nn=Object(a.useState)(!0),zn=Object(m.a)(Nn,2),Bn=zn[0],Zn=zn[1],Di=Object(S.h)(),ra=Object(a.useRef)(null);Object(a.useEffect)(function(){xt&&An(),Object(Bt.V)("\u7ADE\u8D5B")},[xt]);function An(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(c.a)(i.a.mark(function xr(){var Cr;return i.a.wrap(function(En){for(;;)switch(En.prev=En.next){case 0:return En.t0=Et,En.next=3,qt({type:"competitions/getStaff",payload:{identifier:xt}});case 3:return En.t1=En.sent,(0,En.t0)(En.t1),En.next=7,qt({type:"competitions/getHeader",payload:{identifier:xt}});case 7:Cr=En.sent,Dr(Cr),Object(Bt.V)((Cr==null?void 0:Cr.name)||"\u7ADE\u8D5B");case 10:case"end":return En.stop()}},xr)})),Ui.apply(this,arguments)}Object(a.useEffect)(function(){var xr;Wr(parseInt(Di==null||((xr=Di.query)===null||xr===void 0)?void 0:xr.type)===1)},[Di]),Object(a.useEffect)(function(){var xr;if((ot==null||((xr=ot.competition_modules)===null||xr===void 0)?void 0:xr.length)>0){var Cr,ar;if((Di==null||((Cr=Di.query)===null||Cr===void 0)?void 0:Cr.active)==="\u8D5B\u9898\u53D1\u5E03"){var En,dr=ot==null||((En=ot.competition_modules)===null||En===void 0)?void 0:En.find(function(pa){return pa.name==="\u8D5B\u9898\u53D1\u5E03"});if(dr){Bi(dr);return}}Bi(ot==null||((ar=ot.competition_modules)===null||ar===void 0)?void 0:ar[0])}},[ot]);function Bi(xr){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(ze(Cr.id),je=Cr.id,pr(Cr),!(Cr.module_type==="entrance")){dr.next=9;break}return dr.next=6,qt({type:"competitions/getItem",payload:{url:Cr.module_url,module_type:"entrance"}});case 6:ar=dr.sent,dr.next=12;break;case 9:return dr.next=11,qt({type:"competitions/getItem",payload:{url:Cr.module_url}});case 11:ar=dr.sent;case 12:zt(!1),un(!1),ft(!1),lr(ar),Fr(!1),bn(!1),br(Cr.module_type),Cr.module_type==="chart"?(zt(!0),ir(!1),Ba()):Cr.module_type==="certificate"?(un(!0),zt(!1),ir(!1),ba()):Cr.module_type==="md_tab"?(ft(!0),ir(!1),localStorage.setItem("issee","2"),zt(!1),un(!1),ca()):Cr.module_type==="md_shixun"?(Fr(!0),ir(!1),ca()):Cr.module_type==="entrance"?(bn(!0),ir(!1),ca()):(ir(!0),localStorage.setItem("issee","1"));case 20:case"end":return dr.stop()}},xr)})),Pn.apply(this,arguments)}function On(xr,Cr,ar){return qn.apply(this,arguments)}function qn(){return qn=Object(c.a)(i.a.mark(function xr(Cr,ar,En){var dr,pa;return i.a.wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:if(Cr.stopPropagation(),Object(he.e)(qt)){jn.next=3;break}return jn.abrupt("return");case 3:if(!(ot!=null&&ot.is_authentication&&!(Qt!=null&&(dr=Qt.userInfo)!==null&&dr!==void 0&&dr.authentication))){jn.next=6;break}return qt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),jn.abrupt("return");case 6:if(!(ot!=null&&ot.enroll_url)){jn.next=9;break}return Object(Bt.Q)(ot==null?void 0:ot.enroll_url),jn.abrupt("return");case 9:if(!(En==="ismodel")){jn.next=23;break}if(!(ar.member_of_course===!0)){jn.next=14;break}Object(Bt.Q)("/classrooms/".concat(ar.course_id)),jn.next=21;break;case 14:if(ar.invite_code){jn.next=17;break}return f.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),jn.abrupt("return");case 17:return jn.next=19,qt({type:"competitions/addApplytojoincourse",payload:{invite_code:ar.invite_code,student:1}});case 19:pa=jn.sent,pa.status===0&&Object(Bt.Q)("/classrooms/".concat(ar.course_id));case 21:jn.next=27;break;case 23:if(!(er.enrolled===!0)){jn.next=26;break}return Object(Bt.Q)(En),jn.abrupt("return");case 26:Tn(!0);case 27:case"end":return jn.stop()}},xr)})),qn.apply(this,arguments)}function Ba(){return wa.apply(this,arguments)}function wa(){return wa=Object(c.a)(i.a.mark(function xr(){return i.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.t0=an,ar.next=3,qt({type:"competitions/ChartRules",payload:{identifier:xt}});case 3:return ar.t1=ar.sent,ar.next=6,(0,ar.t0)(ar.t1);case 6:case"end":return ar.stop()}},xr)})),wa.apply(this,arguments)}function la(xr){return ua.apply(this,arguments)}function ua(){return ua=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Charts",payload:{identifier:xt,stage_id:Cr}});case 2:ar=dr.sent,lr(ar);case 4:case"end":return dr.stop()}},xr)})),ua.apply(this,arguments)}function Pa(xr){return Ca.apply(this,arguments)}function Ca(){return Ca=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return on(!0),dr.next=3,qt({type:"competitions/Results",payload:Object(P.a)({identifier:xt,stage_id:Cr==null?void 0:Cr.id},Cr)});case 3:ar=dr.sent,lr(ar),on(!1);case 6:case"end":return dr.stop()}},xr)})),Ca.apply(this,arguments)}function La(xr){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return on(!0),dr.next=3,qt({type:"competitions/Results",payload:Object(P.a)({identifier:xt,stage_id:Cr==null?void 0:Cr.id,module_type:"entrance"},Cr)});case 3:ar=dr.sent,lr(ar),on(!1);case 6:case"end":return dr.stop()}},xr)})),Wa.apply(this,arguments)}function Xa(xr){return Ma.apply(this,arguments)}function Ma(){return Ma=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Results",payload:{identifier:xt,stage_id:Cr}});case 2:if(ar=dr.sent,!(localStorage.getItem("issee")==="1")){dr.next=5;break}return dr.abrupt("return");case 5:lr(ar);case 6:case"end":return dr.stop()}},xr)})),Ma.apply(this,arguments)}function ca(){return Sa.apply(this,arguments)}function Sa(){return Sa=Object(c.a)(i.a.mark(function xr(){return i.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:return ar.t0=Pr,ar.next=3,qt({type:"competitions/TabResults",payload:{identifier:xt,competition_module_id:je}});case 3:ar.t1=ar.sent,(0,ar.t0)(ar.t1);case 5:case"end":return ar.stop()}},xr)})),Sa.apply(this,arguments)}function ba(){return da.apply(this,arguments)}function da(){return da=Object(c.a)(i.a.mark(function xr(){var Cr,ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Prize",payload:{identifier:xt,user_id:Qt==null||((Cr=Qt.userInfo)===null||Cr===void 0)?void 0:Cr.user_id}});case 2:ar=dr.sent,Ie(ar);case 4:case"end":return dr.stop()}},xr)})),da.apply(this,arguments)}function co(){return Ea.apply(this,arguments)}function Ea(){return Ea=Object(c.a)(i.a.mark(function xr(){var Cr,ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:return dr.next=2,qt({type:"competitions/Accounts",payload:{id:Qt==null||((Cr=Qt.userInfo)===null||Cr===void 0)?void 0:Cr.user_id}});case 2:ar=dr.sent,ye(ar);case 4:case"end":return dr.stop()}},xr)})),Ea.apply(this,arguments)}function Ta(xr){return ha.apply(this,arguments)}function ha(){return ha=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(Bn){dr.next=2;break}return dr.abrupt("return");case 2:if(Zn(!1),!fa()){dr.next=5;break}return dr.abrupt("return");case 5:return dr.next=7,qt({type:"competitions/AddTeam",payload:{identifier:xt,name:Cr}});case 7:ar=dr.sent,ar&&ar.status===0?(f.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),An(),di(!1)):Zn(!0);case 9:case"end":return dr.stop()}},xr)})),ha.apply(this,arguments)}function fa(){var xr,Cr;if(Qt!=null&&(xr=Qt.userInfo)!==null&&xr!==void 0&&xr.is_teacher){var ar;if(er!=null&&(ar=er.teacher_staff)!==null&&ar!==void 0&&ar.mutiple_limited&&(er!=null&&er.enrolled))return f.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}else{var En;if(er!=null&&(En=er.member_staff)!==null&&En!==void 0&&En.mutiple_limited&&(er!=null&&er.enrolled))return f.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Zn(!0),!0}if(er!=null&&er.enroll_ended)return f.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Zn(!0),!0;if(Qt!=null&&(Cr=Qt.userInfo)!==null&&Cr!==void 0&&Cr.is_teacher){if(!er.teacher_staff)return f.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Zn(!0),!0}else if(!(er!=null&&er.member_staff))return f.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Zn(!0),!0}function $i(xr){return na.apply(this,arguments)}function na(){return na=Object(c.a)(i.a.mark(function xr(Cr){var ar;return i.a.wrap(function(dr){for(;;)switch(dr.prev=dr.next){case 0:if(Bn){dr.next=2;break}return dr.abrupt("return");case 2:if(!fa()){dr.next=4;break}return dr.abrupt("return");case 4:return Zn(!1),dr.next=7,qt({type:"competitions/JoinTeam",payload:{identifier:xt,invite_code:Cr}});case 7:ar=dr.sent,ar&&ar.status===0?(f.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),In(!1),Zn(!0),An()):Zn(!0);case 9:case"end":return dr.stop()}},xr)})),na.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(n.a,{className:"mt10",separator:">"},t.a.createElement(n.a.Item,null,t.a.createElement(x.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(n.a.Item,null,ot.name,ot.sub_title?"-"+ot.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(l.a,{spinning:fr.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(ot==null?void 0:ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:V.a.IMG_SERVER+"/"+(ot==null?void 0:ot.avatar_url)}),!(ot!=null&&ot.avatar_url)&&(ot==null?void 0:ot.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:V.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(O.a.titlesize)},ot.name,ot.sub_title?"-"+ot.sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u5956\u91D1"),ot!=null&&ot.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(ot&&ot.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(ot&&ot.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),ot.start_time,"~",ot.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),ot.enroll_end_time),ot.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,ot.competition_status==="progressing"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(ot==null?void 0:ot.mode)<=2&&er.enrolled&&t.a.createElement(C.a,{onClick:function(Cr){if((ot==null?void 0:ot.mode)===1){var ar;Bi((ar=ot.competition_modules)===null||ar===void 0?void 0:ar.find(function(En){return En.module_type==="entrance"}))}else On(Cr,ot,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(ot==null?void 0:ot.mode)===2||(ot==null?void 0:ot.mode)===1&&((pt=ot.competition_modules)===null||pt===void 0||((_t=pt.filter(function(xr){return xr.module_type==="entrance"}))===null||_t===void 0)?void 0:_t.length)>0?"":"none"},className:O.a.buttonsize},(ot==null?void 0:ot.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(ot==null?void 0:ot.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),ot.competition_status==="ended"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,ot.competition_status==="nearly_published"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,ot.competition_status!=="nearly_published"&&ot.enroll_end&&ot.competition_status!=="ended"?t.a.createElement(C.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,ot.competition_status==="progressing"&&ot.enroll_end!=!0?t.a.createElement(C.a,{type:"primary",disabled:er.enrolled&&!ot.need_attachment,className:O.a.buttonsize,onClick:function(Cr){if(er.enrolled&&ot.need_attachment){var ar;(ar=ra.current)===null||ar===void 0||ar.handleVisible();return}On(Cr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))}},er.enrolled?ot.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":ot!=null&&ot.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Qt.userInfo.real_name!="\u6E38\u5BA2"&&!(ot!=null&&ot.enroll_url)&&t.a.createElement("span",{onClick:function(Cr){return On(Cr,ot,ot.mode===2?"ismodel":ot.personal?"personal":"/competitions/index/".concat(ot.identifier,"/enroll"))},className:O.a.myteam},Object(Br.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(u.a,{selectedKeys:["".concat(je)]},ot&&ot.competition_modules&&ot.competition_modules.map(function(xr,Cr){if(xr.module_type!="enroll")return t.a.createElement(u.a.Item,{className:O.a.menuItem,onClick:function(){if(xr!=null&&xr.is_authentication){if(!Object(he.e)(qt))return;f.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Bi(xr)},key:xr.id},xr.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(Mr||wr)&&0}},Nr?t.a.createElement(Pt,{dispatch:qt,userid:Qt==null||((Mt=Qt.userInfo)===null||Mt===void 0)?void 0:Mt.user_id,Prize:$n,Accounts:Fe,getAccounts:co}):null,bt?t.a.createElement(Me,{HeaderDetail:ot,userinfo:Qt.userInfo,Editable:ot==null||((Dt=ot.permission)===null||Dt===void 0)?void 0:Dt.editable,getCharts:la,getChartRules:Ba,Selectkey:je,ChartRules:rn,ItemData:sr}):null,et?t.a.createElement(q,{ref:ra,StaffDetail:er,HeaderDetail:ot,userinfo:Qt.userInfo,Editable:ot==null||((Ht=ot.permission)===null||Ht===void 0)?void 0:Ht.editable,ItemData:sr,setIssee:ir,ModelType:Jt,dispatch:qt}):null,!et&&!Mr&&!wr&&!bt&&!Nr&&!qe?t.a.createElement(J,{userinfo:Qt.userInfo,ModelType:Jt,getrightdatas:Bi,dispatch:qt,MenuItem:gr,setIssee:ir,identifier:xt,ItemData:sr}):null,qe&&t.a.createElement(Rn,{dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((Wt=ot.permission)===null||Wt===void 0)?void 0:Wt.editable,getCharts:Xa,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}),Mr&&t.a.createElement(vi,{loading:pn,dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((ct=ot.permission)===null||ct===void 0)?void 0:ct.editable,getCharts:Pa,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}),wr&&t.a.createElement(sa,{loading:pn,dispatch:qt,StaffDetail:er,userinfo:Qt.userInfo,HeaderDetail:ot,Editable:ot==null||((Ot=ot.permission)===null||Ot===void 0)?void 0:Ot.editable,getCharts:La,getChartRules:ca,Selectkey:je,ChartRules:Xt,ItemData:sr}))),t.a.createElement(b.a,null),t.a.createElement(G,{getResults:Xa}),t.a.createElement(T.a,{visible:Qr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return Wr(!1)}},t.a.createElement("div",{className:O.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(C.a,{type:"primary",onClick:function(){return Object(Bt.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(T.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:Mn,onCancel:function(){Tn(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(C.a,{type:"primary",style:{height:40},onClick:function(){In(!0),Tn(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(C.a,{style:{height:40},onClick:function(){di(!0),Tn(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),ni?t.a.createElement(Ii.a,{isjoin:ni,setJoin:In,JoinTeams:$i}):null,Hn?t.a.createElement(Xn.a,{isAddmodle:Hn,setIsAdd:di,createTeam:Ta}):null)},ta=Z.default=Object(o.a)(function(Ct){var tt=Ct.loading,pt=Ct.globalSetting,_t=Ct.user;return{globalSetting:pt,loading:tt,user:_t}})(Vi)},GRuw:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("lPiR"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.WordArray,u=d.algo,p=u.SHA256,C=u.SHA224=p.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var E=p._doFinalize.call(this);return E.sigBytes-=4,E}});d.SHA224=p._createHelper(C),d.HmacSHA224=p._createHmacHelper(C)}(),P.SHA224})},GfqC:function(j,Z,L){"use strict";var P=L("q1tI"),d=L.n(P),T=L("TSYQ"),D=L.n(T);function u(K,U){var B="cannot "+K.method+" "+K.action+" "+U.status+"'",V=new Error(B);return V.status=U.status,V.method=K.method,V.url=K.action,V}function p(K){var U=K.responseText||K.response;if(!U)return U;try{return JSON.parse(U)}catch(B){return U}}function C(K){var U=new XMLHttpRequest;K.onProgress&&U.upload&&(U.upload.onprogress=function(he){he.total>0&&(he.percent=he.loaded/he.total*100),K.onProgress(he)});var B=new FormData;K.data&&Object.keys(K.data).forEach(function(ae){var he=K.data[ae];if(Array.isArray(he)){he.forEach(function(pe){B.append(ae+"[]",pe)});return}B.append(ae,K.data[ae])}),K.file instanceof Blob?B.append(K.filename,K.file,K.file.name):B.append(K.filename,K.file),U.onerror=function(he){K.onError(he)},U.onload=function(){return U.status<200||U.status>=300?K.onError(u(K,U),p(U)):K.onSuccess(p(U),U)},U.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var V=K.headers||{};return V["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(V).forEach(function(ae){V[ae]!==null&&U.setRequestHeader(ae,V[ae])}),U.send(B),{abort:function(){U.abort()}}}var E=+new Date,l=0;function s(){return"rc-upload-"+E+"-"+ ++l}function n(K,U){return K.indexOf(U,K.length-U.length)!==-1}var h=function(K,U){if(K&&U){var B=Array.isArray(U)?U:U.split(","),V=K.name||"",ae=K.type||"",he=ae.replace(/\/.*$/,"");return B.some(function(pe){var Re=pe.trim();return Re.charAt(0)==="."?n(V.toLowerCase(),Re.toLowerCase()):/\/\*$/.test(Re)?he===Re.replace(/\/.*$/,""):ae===Re})}return!0};function f(K,U){var B=K.createReader(),V=[];function ae(){B.readEntries(function(he){var pe=Array.prototype.slice.apply(he);V=V.concat(pe);var Re=!pe.length;Re?U(V):ae()})}ae()}var c=function(U,B,V){var ae=function he(pe,Re){Re=Re||"",pe.isFile?pe.file(function(ke){V(ke)&&(pe.fullPath&&!ke.webkitRelativePath&&(Object.defineProperties(ke,{webkitRelativePath:{writable:!0}}),ke.webkitRelativePath=pe.fullPath.replace(/^\//,""),Object.defineProperties(ke,{webkitRelativePath:{writable:!1}})),B([ke]))}):pe.isDirectory&&f(pe,function(ke){ke.forEach(function(ve){he(ve,""+Re+pe.name+"/")})})};U.forEach(function(he){ae(he.webkitGetAsEntry())})},m=c,_=Object.assign||function(K){for(var U=1;U=0)continue;if(!Object.prototype.hasOwnProperty.call(K,V))continue;B[V]=K[V]}return B}function S(K,U){if(!(K instanceof U))throw new TypeError("Cannot call a class as a function")}function x(K,U){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:K}function o(K,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);K.prototype=Object.create(U&&U.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(K,U):K.__proto__=U)}var k=function(U){return Object.keys(U).reduce(function(B,V){return(V.substr(0,5)==="data-"||V.substr(0,5)==="aria-"||V==="role")&&(B[V]=U[V]),B},{})},O=function(K){o(U,K);function U(){var B,V,ae,he;S(this,U);for(var pe=arguments.length,Re=Array(pe),ke=0;ke>>2]>>>24-k%4*8&255;t[x+k>>>2]|=O<<24-(x+k)%4*8}else for(var b=0;b>>2]=S[b>>>2];return this.sigBytes+=o,this},clamp:function(){var a=this.words,t=this.sigBytes;a[t>>>2]&=4294967295<<32-t%4*8,a.length=T.ceil(t/4)},clone:function(){var a=s.clone.call(this);return a.words=this.words.slice(0),a},random:function(a){for(var t=[],S=0;S>>2]>>>24-o%4*8&255;x.push((k>>>4).toString(16)),x.push((k&15).toString(16))}return x.join("")},parse:function(a){for(var t=a.length,S=[],x=0;x>>3]|=parseInt(a.substr(x,2),16)<<24-x%8*4;return new n.init(S,t/2)}},c=h.Latin1={stringify:function(a){for(var t=a.words,S=a.sigBytes,x=[],o=0;o>>2]>>>24-o%4*8&255;x.push(String.fromCharCode(k))}return x.join("")},parse:function(a){for(var t=a.length,S=[],x=0;x>>2]|=(a.charCodeAt(x)&255)<<24-x%4*8;return new n.init(S,t)}},m=h.Utf8={stringify:function(a){try{return decodeURIComponent(escape(c.stringify(a)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(a){return c.parse(unescape(encodeURIComponent(a)))}},_=l.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(a){typeof a=="string"&&(a=m.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(a){var t,S=this._data,x=S.words,o=S.sigBytes,k=this.blockSize,O=k*4,b=o/O;a?b=T.ceil(b):b=T.max((b|0)-this._minBufferSize,0);var v=b*k,g=T.min(v*4,o);if(v){for(var w=0;wTe)){ue.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Te/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ue.abrupt("return",!1);case 7:return z.push({name:ve.name,file:ve}),H(Object(D.a)(z)),N.onChange(z),ue.abrupt("return",!1);case 11:case"end":return ue.stop()}},ke)}));function Re(ke){return pe.apply(this,arguments)}return Re}()},he=function(){var pe=Object(E.a)(h.a.mark(function Re(ke,ve){var Te,be,ue,le,re,fe,q,ee,Ce;return h.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return ve.file_name=ke.name,q=ke.name,J.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ee=J.sent,ee.data=JSON.parse(o(ee.data)),!((ee==null?void 0:ee.status)!==0)){J.next=12;break}return z[z.findIndex(function(X){return X.name===q})].status="error",z[z.findIndex(function(X){return X.name===q})].file.status="error",N.onChange(z),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return B=new S.a({endpoint:ee==null||((Te=ee.data)===null||Te===void 0)?void 0:Te.end_point,region:ee==null||((be=ee.data)===null||be===void 0)?void 0:be.region,accessKeyId:ee==null||((ue=ee.data)===null||ue===void 0)?void 0:ue.access_key_id,accessKeySecret:ee==null||((le=ee.data)===null||le===void 0)?void 0:le.access_key_secret,bucket:ee==null||((re=ee.data)===null||re===void 0)?void 0:re.bucket,stsToken:ee==null||((fe=ee.data)===null||fe===void 0)?void 0:fe.security_token}),console.log(ke,"file"),V(B),Ce=Object(i.a)(),J.abrupt("return",new Promise(function(X,Q){try{var Ee;B.multipartUpload("".concat(N.identifier,"/").concat(Ce).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([ke.file],{type:ke.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Oe,Qe,rt){try{console.log("\u8FDB\u5EA6",Oe,Qe,rt);var nt=z.findIndex(function(ut){return ut.name===q});z[nt].file.percent=Oe*100,z[nt].tempCheckpoint=Qe,H(Object(D.a)(z))}catch(ut){}},checkpoint:z[z.findIndex(function(ge){return ge.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:ee==null||((Ee=ee.data)===null||Ee===void 0)?void 0:Ee.callback_url,host:ee==null?void 0:ee.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(ve)}}).then(function(ge){var Oe,Qe=z.findIndex(function(mt){return mt.name===q}),rt="done";if(((Oe=ge.data)===null||Oe===void 0?void 0:Oe.status)===0){var nt;ke.response=(nt=ge.data)===null||nt===void 0?void 0:nt.data;var ut=z.findIndex(function(mt){return mt.name===q});z[ut].status="done",z[ut].file.status="done"}else{var dt;T.b.warn((dt=ge.data)===null||dt===void 0?void 0:dt.message),rt="error"}z[Qe].status=rt,z[Qe].file.status=rt,N.onChange(z),X(ge==null?void 0:ge.data)}).catch(function(ge){z[z.findIndex(function(Oe){return Oe.name===q})].status="error",z[z.findIndex(function(Oe){return Oe.name===q})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(D.a)(z)),N.onChange(z),Q(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return J.stop()}},Re)}));return function(ke,ve){return pe.apply(this,arguments)}}();return Object(f.useEffect)(function(){z.every(function(pe){return pe==="done"||pe==="error"})&&N.onComplete(z)},[z]),Object(f.useEffect)(function(){if(M){var pe;(pe=B)===null||pe===void 0||pe.cancel()}},[M]),Object(f.useEffect)(function(){N.uploading&&z.map(function(){var pe=Object(E.a)(h.a.mark(function Re(ke){var ve,Te;return h.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!((!ke.status||ke.status==="error")&&!M)){ue.next=6;break}return ke.status="uploading",ke.file.status="uploading",ue.next=5,he(ke,{login:w==null||((ve=w.userInfo)===null||ve===void 0)?void 0:ve.login,container_type:N.container_type,container_id:N.container_id,description:N.description});case 5:Te=ue.sent;case 6:case"end":return ue.stop()}},Re)}));return function(Re){return pe.apply(this,arguments)}}())},[N.uploading]),c.a.createElement(x,Object(P.a)({},ae,{height:N.height,className:N.className}),c.a.createElement("p",{className:"ant-upload-hint"},N.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(a.a)(function(v){var g=v.loading,w=v.globalSetting,M=v.user;return{globalSetting:w,loading:g.models.competitions,user:M}})(b)},KmYQ:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(d,T){var D=T*4;d.clamp(),d.sigBytes+=D-(d.sigBytes%D||D)},unpad:function(d){for(var T=d.words,D=d.sigBytes-1,D=d.sigBytes-1;D>=0;D--)if(T[D>>>2]>>>24-D%4*8&255){d.sigBytes=D+1;break}}},P.pad.ZeroPadding})},LdHM:function(j,Z,L){"use strict";L.d(Z,"b",function(){return t}),L.d(Z,"a",function(){return x});var P=L("1OyB"),d=L("vuIU"),T=L("Ji7U"),D=L("LK+K"),u=L("q1tI"),p=L("rePB"),C=L("Ff2n"),E=L("ODXe"),l=L("4IlW"),s=L("bX4T"),n=L("YrtM"),h=L("TSYQ"),f=L.n(h),c=L("+nKL"),m=L("8OUc"),_=function(V,ae){var he=V.prefixCls,pe=V.id,Re=V.flattenOptions,ke=V.childrenAsData,ve=V.values,Te=V.searchValue,be=V.multiple,ue=V.defaultActiveFirstOption,le=V.height,re=V.itemHeight,fe=V.notFoundContent,q=V.open,ee=V.menuItemSelectedIcon,Ce=V.virtual,te=V.onSelect,J=V.onToggleOpen,X=V.onActiveValue,Q=V.onScroll,Ee=V.onMouseEnter,ge="".concat(he,"-item"),Oe=Object(n.a)(function(){return Re},[q,Re],function(st,Ue){return Ue[0]&&st[1]!==Ue[1]}),Qe=u.useRef(null),rt=function(Ue){Ue.preventDefault()},nt=function(Ue){Qe.current&&Qe.current.scrollTo({index:Ue})},ut=function(Ue){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ne=Oe.length,xe=0;xe1&&arguments[1]!==void 0?arguments[1]:!1;return Object(k.a)(B).map(function(ae,he){if(!u.isValidElement(ae)||!ae.type)return null;var pe=ae.type.isSelectOptGroup,Re=ae.key,ke=ae.props,ve=ke.children,Te=Object(C.a)(ke,["children"]);return V||!pe?O(ae):Object(o.a)(Object(o.a)({key:"__RC_SELECT_GRP__".concat(Re===null?he:Re,"__"),label:Re},Te),{},{options:b(ve)})}).filter(function(ae){return ae})}var v=L("2Qr1"),g=L("qNPg"),w=L("U8pU"),M=L("Kwbf"),N=L("WKfj");function I(B){var V=B.mode,ae=B.options,he=B.children,pe=B.backfill,Re=B.allowClear,ke=B.placeholder,ve=B.getInputElement,Te=B.showSearch,be=B.onSearch,ue=B.defaultOpen,le=B.autoFocus,re=B.labelInValue,fe=B.value,q=B.inputValue,ee=B.optionLabelProp,Ce=V==="multiple"||V==="tags",te=Te!==void 0?Te:Ce||V==="combobox",J=ae||b(he);if(Object(M.a)(V!=="tags"||J.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),V==="tags"||V==="combobox"){var X=J.some(function(ge){return ge.options?ge.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(M.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(V!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(V==="combobox"||!pe,"`backfill` only works with `combobox` mode."),Object(M.a)(V==="combobox"||!ve,"`getInputElement` only work with `combobox` mode."),Object(M.b)(V!=="combobox"||!ve||!Re||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),be&&!te&&V!=="combobox"&&V!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ue||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),fe!=null){var Q=Object(N.d)(fe);Object(M.a)(!re||Q.every(function(ge){return Object(w.a)(ge)==="object"&&("key"in ge||"value"in ge)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!Ce||Array.isArray(fe),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Ee=null;Object(k.a)(he).some(function(ge){if(!u.isValidElement(ge)||!ge.type)return!1;var Oe=ge.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Qe=Object(k.a)(ge.props.children).every(function(rt){return!u.isValidElement(rt)||!ge.type||rt.type.isSelectOption?!0:(Ee=rt.type,!1)});return!Qe}return Ee=Oe,!0}),Ee&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ee.displayName||Ee.name||Ee,"`.")),Object(M.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=I,z=Object(g.a)({prefixCls:"rc-select",components:{optionList:i},convertChildrenToData:b,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:G,fillOptionsWithMissingValue:v.a}),H=function(B){Object(T.a)(ae,B);var V=Object(D.a)(ae);function ae(){var he;return Object(P.a)(this,ae),he=V.apply(this,arguments),he.selectRef=u.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(d.a)(ae,[{key:"render",value:function(){return u.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),ae}(u.Component);H.Option=t,H.OptGroup=x;var K=H,U=Z.c=K},M8RZ:function(j,Z,L){"use strict";L.d(Z,"a",function(){return l});var P=L("fWQN"),d=L("mtLc"),T=L("yKVA"),D=L("879j"),u=L("q1tI"),p=L.n(u),C=L("i8i4"),E=L.n(C),l=function(s){Object(T.a)(h,s);var n=Object(D.a)(h);function h(f){var c;Object(P.a)(this,h),c=n.call(this,f);var m=window.document;return c.node=m.createElement("div"),m.body.appendChild(c.node),c}return Object(d.a)(h,[{key:"render",value:function(){var c=this.props.children;return Object(C.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(p.a.Component)},MlIO:function(j,Z,L){(function(P,d){j.exports=Z=d(L("Ib8C"))})(this,function(P){return function(d){var T=P,D=T.lib,u=D.Base,p=D.WordArray,C=T.x64={},E=C.Word=u.extend({init:function(s,n){this.high=s,this.low=n}}),l=C.WordArray=u.extend({init:function(s,n){s=this.words=s||[],n!=d?this.sigBytes=n:this.sigBytes=s.length*8},toX32:function(){for(var s=this.words,n=s.length,h=[],f=0;f1&&arguments[1]!==void 0?arguments[1]:!1;return!!(x(w)&&o(M))},x=function(w){return Object(n.p)()?!0:(w({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},o=function(){var w,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=Object(s.c)()._store.getState(),I=N.user;return(w=I.userInfo)!==null&&w!==void 0&&w.profile_completed?!0:(u.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:M?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){s.d.push("/account/profile/edit")}}),!1)},k=function(){var w,M=Object(s.c)()._store.getState(),N=M.user;return(w=N.userInfo)!==null&&w!==void 0&&w.professional_certification?!0:(u.a.confirm({title:"\u63D0\u793A",centered:!0,content:l.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(h.Q)("/account/certification")}}),!1)},O=function(){return Object(n.a)()?!0:(u.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc",style:{marginLeft:-38}},l.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),l.a.createElement("img",{src:Object(n.t)()?a.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},b=function(w,M){return w?!0:(u.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:l.a.createElement("div",null,l.a.createElement("p",null,M||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),l.a.createElement("div",{style:{marginLeft:"110px"}},l.a.createElement("img",{src:y.a,width:200}),l.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(h.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},v=function(w){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=Object(s.c)()._store.getState(),I=N.shixunsDetail.detail;return(I==null?void 0:I.public)===2||(I==null?void 0:I.public)===1||(I==null?void 0:I.shixun_status)===3?(u.a.info({centered:!0,icon:l.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc",style:{marginLeft:-38}},l.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},l.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(I==null?void 0:I.public)===2?"\u5DF2\u516C\u5F00":(I==null?void 0:I.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",M,"\u3002"),l.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),l.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(I==null?void 0:I.shixun_status)===2?(u.a.confirm({centered:!0,icon:l.a.createElement(f.a,null),title:"\u63D0\u793A",content:l.a.createElement("div",null,l.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",M,"\u3002"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){u.a.confirm({width:440,centered:!0,icon:l.a.createElement(f.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var z=Object(T.a)(C.a.mark(function K(){var U;return C.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,w({type:"shixunsDetail/cancelRelease",payload:{id:I==null?void 0:I.identifier}});case 2:U=V.sent,U.status!==401&&(d.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),w({type:"shixunsDetail/getShixunsDetail",payload:{id:I==null?void 0:I.identifier}}),w({type:"practiceSetting/getCommonData",payload:{id:I==null?void 0:I.identifier}}));case 4:case"end":return V.stop()}},K)}));function H(){return z.apply(this,arguments)}return H}()})}}),!0):!1}},NnUe:function(j,Z,L){j.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(j,Z,L){"use strict";L.d(Z,"a",function(){return p});var P=L("Kwbf");function d(C,E){var l=new Set;return C.forEach(function(s){E.has(s)||l.add(s)}),l}function T(C){var E=C||{},l=E.disabled,s=E.disableCheckbox,n=E.checkable;return!!(l||s)||n===!1}function D(C,E,l,s){for(var n=new Set(C),h=new Set,f=0;f<=l;f+=1){var c=E.get(f)||new Set;c.forEach(function(i){var a=i.key,t=i.node,S=i.children,x=S===void 0?[]:S;n.has(a)&&!s(t)&&x.filter(function(o){return!s(o.node)}).forEach(function(o){n.add(o.key)})})}for(var m=new Set,_=l;_>=0;_-=1){var y=E.get(_)||new Set;y.forEach(function(i){var a=i.parent,t=i.node;if(s(t)||!i.parent||m.has(i.parent.key))return;if(s(i.parent.node)){m.add(a.key);return}var S=!0,x=!1;(a.children||[]).filter(function(o){return!s(o.node)}).forEach(function(o){var k=o.key,O=n.has(k);S&&!O&&(S=!1),!x&&(O||h.has(k))&&(x=!0)}),S&&n.add(a.key),x&&h.add(a.key),m.add(a.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(d(h,n))}}function u(C,E,l,s,n){for(var h=new Set(C),f=new Set(E),c=0;c<=s;c+=1){var m=l.get(c)||new Set;m.forEach(function(a){var t=a.key,S=a.node,x=a.children,o=x===void 0?[]:x;!h.has(t)&&!f.has(t)&&!n(S)&&o.filter(function(k){return!n(k.node)}).forEach(function(k){h.delete(k.key)})})}f=new Set;for(var _=new Set,y=s;y>=0;y-=1){var i=l.get(y)||new Set;i.forEach(function(a){var t=a.parent,S=a.node;if(n(S)||!a.parent||_.has(a.parent.key))return;if(n(a.parent.node)){_.add(t.key);return}var x=!0,o=!1;(t.children||[]).filter(function(k){return!n(k.node)}).forEach(function(k){var O=k.key,b=h.has(O);x&&!b&&(x=!1),!o&&(b||f.has(O))&&(o=!0)}),x||h.delete(t.key),o&&f.add(t.key),_.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(d(f,h))}}function p(C,E,l,s){var n=[],h;s?h=s:h=T;var f=new Set(C.filter(function(y){var i=!!l[y];return i||n.push(y),i})),c=new Map,m=0;Object.keys(l).forEach(function(y){var i=l[y],a=i.level,t=c.get(a);t||(t=new Set,c.set(a,t)),t.add(i),m=Math.max(m,a)}),Object(P.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(y){return"'".concat(y,"'")}).join(", ")));var _;return E===!0?_=D(f,c,m,h):_=u(f,E.halfCheckedKeys,c,m,h),_}},OLod:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("K3mO"))})(this,function(P){P.lib.Cipher||function(d){var T=P,D=T.lib,u=D.Base,p=D.WordArray,C=D.BufferedBlockAlgorithm,E=T.enc,l=E.Utf8,s=E.Base64,n=T.algo,h=n.EvpKDF,f=D.Cipher=C.extend({cfg:u.extend(),createEncryptor:function(g,w){return this.create(this._ENC_XFORM_MODE,g,w)},createDecryptor:function(g,w){return this.create(this._DEC_XFORM_MODE,g,w)},init:function(g,w,M){this.cfg=this.cfg.extend(M),this._xformMode=g,this._key=w,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(g){return this._append(g),this._process()},finalize:function(g){g&&this._append(g);var w=this._doFinalize();return w},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function g(w){return typeof w=="string"?v:k}return function(w){return{encrypt:function(M,N,I){return g(N).encrypt(w,M,N,I)},decrypt:function(M,N,I){return g(N).decrypt(w,M,N,I)}}}}()}),c=D.StreamCipher=f.extend({_doFinalize:function(){var g=this._process(!0);return g},blockSize:1}),m=T.mode={},_=D.BlockCipherMode=u.extend({createEncryptor:function(g,w){return this.Encryptor.create(g,w)},createDecryptor:function(g,w){return this.Decryptor.create(g,w)},init:function(g,w){this._cipher=g,this._iv=w}}),y=m.CBC=function(){var g=_.extend();g.Encryptor=g.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize;w.call(this,M,N,G),I.encryptBlock(M,N),this._prevBlock=M.slice(N,N+G)}}),g.Decryptor=g.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize,z=M.slice(N,N+G);I.decryptBlock(M,N),w.call(this,M,N,G),this._prevBlock=z}});function w(M,N,I){var G,z=this._iv;z?(G=z,this._iv=d):G=this._prevBlock;for(var H=0;H>>2]&255;g.sigBytes-=w}},t=D.BlockCipher=f.extend({cfg:f.cfg.extend({mode:y,padding:a}),reset:function(){var g;f.reset.call(this);var w=this.cfg,M=w.iv,N=w.mode;this._xformMode==this._ENC_XFORM_MODE?g=N.createEncryptor:(g=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==g?this._mode.init(this,M&&M.words):(this._mode=g.call(N,this,M&&M.words),this._mode.__creator=g)},_doProcessBlock:function(g,w){this._mode.processBlock(g,w)},_doFinalize:function(){var g,w=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(w.pad(this._data,this.blockSize),g=this._process(!0)):(g=this._process(!0),w.unpad(g)),g},blockSize:128/32}),S=D.CipherParams=u.extend({init:function(g){this.mixIn(g)},toString:function(g){return(g||this.formatter).stringify(this)}}),x=T.format={},o=x.OpenSSL={stringify:function(g){var w,M=g.ciphertext,N=g.salt;return N?w=p.create([1398893684,1701076831]).concat(N).concat(M):w=M,w.toString(s)},parse:function(g){var w,M=s.parse(g),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(w=p.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),S.create({ciphertext:M,salt:w})}},k=D.SerializableCipher=u.extend({cfg:u.extend({format:o}),encrypt:function(g,w,M,N){N=this.cfg.extend(N);var I=g.createEncryptor(M,N),G=I.finalize(w),z=I.cfg;return S.create({ciphertext:G,key:M,iv:z.iv,algorithm:g,mode:z.mode,padding:z.padding,blockSize:g.blockSize,formatter:N.format})},decrypt:function(g,w,M,N){N=this.cfg.extend(N),w=this._parse(w,N.format);var I=g.createDecryptor(M,N).finalize(w.ciphertext);return I},_parse:function(g,w){return typeof g=="string"?w.parse(g,this):g}}),O=T.kdf={},b=O.OpenSSL={execute:function(g,w,M,N){N||(N=p.random(64/8));var I=h.create({keySize:w+M}).compute(g,N),G=p.create(I.words.slice(w),M*4);return I.sigBytes=w*4,S.create({key:I,iv:G,salt:N})}},v=D.PasswordBasedCipher=k.extend({cfg:k.cfg.extend({kdf:b}),encrypt:function(g,w,M,N){N=this.cfg.extend(N);var I=N.kdf.execute(M,g.keySize,g.ivSize);N.iv=I.iv;var G=k.encrypt.call(this,g,w,I.key,N);return G.mixIn(I),G},decrypt:function(g,w,M,N){N=this.cfg.extend(N),w=this._parse(w,N.format);var I=N.kdf.execute(M,g.keySize,g.ivSize,w.salt);N.iv=I.iv;var G=k.decrypt.call(this,g,w,I.key,N);return G}})}()})},OZM5:function(j,Z,L){"use strict";L.d(Z,"b",function(){return s}),L.d(Z,"a",function(){return n}),L.d(Z,"k",function(){return h}),L.d(Z,"h",function(){return f}),L.d(Z,"i",function(){return c}),L.d(Z,"g",function(){return m}),L.d(Z,"c",function(){return _}),L.d(Z,"d",function(){return y}),L.d(Z,"j",function(){return t}),L.d(Z,"e",function(){return S}),L.d(Z,"f",function(){return x});var P=L("KQm4"),d=L("U8pU"),T=L("Ff2n"),D=L("q1tI"),u=L.n(D),p=L("Kwbf"),C=L("WaYH"),E=.25,l=2;function s(o,k){var O=o.slice(),b=O.indexOf(k);return b>=0&&O.splice(b,1),O}function n(o,k){var O=o.slice();return O.indexOf(k)===-1&&O.push(k),O}function h(o){return o.split("-")}function f(o,k){return"".concat(o,"-").concat(k)}function c(o){return o&&o.type&&o.type.isTreeNode}function m(o,k){var O=[o],b=k[o];function v(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];g.forEach(function(w){var M=w.key,N=w.children;O.push(M),v(N)})}return v(b.children),O}function _(o,k){var O=o.clientY,b=k.selectHandle.getBoundingClientRect(),v=b.top,g=b.bottom,w=b.height,M=Math.max(w*E,l);return O<=v+M?-1:O>=g-M?1:0}function y(o,k){if(!o)return;var O=k.multiple;return O?o.slice():o.length?[o[0]]:o}var i=function(k){return k};function a(o,k){if(!o)return[];var O=k||{},b=O.processProps,v=b===void 0?i:b,g=Array.isArray(o)?o:[o];return g.map(function(w){var M=w.children,N=Object(T.a)(w,["children"]),I=a(M,k);return u.a.createElement(C.a,Object.assign({},v(N)),I)})}function t(o){if(!o)return null;var k;if(Array.isArray(o))k={checkedKeys:o,halfCheckedKeys:void 0};else if(Object(d.a)(o)==="object")k={checkedKeys:o.checked||void 0,halfCheckedKeys:o.halfChecked||void 0};else return Object(p.a)(!1,"`checkedKeys` is not an array or an object"),null;return k}function S(o,k){var O=new Set;function b(v){if(O.has(v))return;var g=k[v];if(!g)return;O.add(v);var w=g.parent,M=g.node;if(M.disabled)return;w&&b(w.key)}return(o||[]).forEach(function(v){b(v)}),Object(P.a)(O)}function x(o){var k={};return Object.keys(o).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(k[O]=o[O])}),k}},Ot1p:function(j,Z,L){"use strict";var P=L("2qtc"),d=L("kLXV"),T=L("rAM+"),D=L("miYZ"),u=L("tsqr"),p=L("9og8"),C=L("tJVT"),E=L("jrin"),l=L("WmNS"),s=L.n(l),n=L("q1tI"),h=L.n(n),f=L("VrN/"),c=L.n(f),m=L("bdgK"),_=L("p77/"),y=L("Bd2K"),i=L("ELLl"),a=L("19Vz"),t=L("lZu9"),S=L("+NIl"),x=L("kSUc"),o=L("9Bee"),k=function(Ve){var gt=Ve.value,yt=gt===void 0?"":gt,Bt=Ve.className,Nt=Ve.showTextOnly,mr=Ve.showLines,hr=Ve.style,St=hr===void 0?{}:hr,$r=Object(n.useMemo)(function(){return""},[yt]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:$r}}))},O=L("0Owb"),b=L("dejd"),v=L("C+DQ"),g=L("1vsH"),w=L("m3rI"),M=[{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 N(Ve){var gt=Ve.onActionCallback,yt=Ve.title,Bt=Ve.icon,Nt=Ve.actionName,mr=Ve.className,hr=mr===void 0?"":mr,St=Ve.children;function $r(){gt(Nt)}return h.a.createElement("a",{title:yt,className:hr,onClick:$r},h.a.createElement("i",{className:"md-iconfont ".concat(Bt)}),St)}var I=function(Ve){var gt=Ve.watch,yt=Ve.showNullButton,Bt=Ve.onActionCallback,Nt=Ve.fullScreen,mr=Ve.insertTemp,hr=Ve.hidetoolBar,St=Ve.uuid,$r=Ve.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(g.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(g.E)("_educoder_session"),"&key=").concat(St,"&api=").concat(encodeURIComponent(w.a.PROXY_SERVER)));var Xr=[].concat(M,[{title:"".concat(gt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(gt?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!hr&&Xr.map(function(Ur,sn){return h.a.createElement("li",{key:sn},Ur.actionName?h.a.createElement(N,Object(O.a)({},Ur,{onActionCallback:Bt})):h.a.createElement("span",{className:"v-line"}))}),yt?h.a.createElement("li",null,h.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Bt},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,mr&&h.a.createElement("li",null,h.a.createElement(N,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(mr),onActionCallback:Bt},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(N,{icon:"".concat(Nt?"icon-shrink":"icon-enlarge"),title:Nt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Bt})))},G=L("M8RZ"),z=L("+L6B"),H=L("2/Rp"),K=L("y8nQ"),U=L("Vl3Y"),B=L("5NDa"),V=L("5rEg"),ae={labelCol:{span:4},wrapperCol:{span:20}},he=function(Ve){var gt=Ve.callback,yt=Ve.onCancel;function Bt(Nt){gt(Nt)}return h.a.createElement(U.a,Object(O.a)({},ae,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Bt}),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(V.a,null)),h.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(V.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},pe=L("7ahc"),Re=L("k1fw"),ke=L("HmJG"),ve=L("BjJ7"),Te=U.a.useForm,be={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},le=function(Ve){var gt=Ve.callback,yt=Ve.onCancel,Bt=Te(),Nt=Object(C.a)(Bt,1),mr=Nt[0],hr=Object(n.useRef)();function St(Ur){gt(Object(Re.a)(Object(Re.a)({},Ur),{},{name:hr.current}))}function $r(Ur,sn){mr.setFieldsValue({src:"/api/attachments/".concat(Ur.id,"?type=").concat(Ur.content_type),type:sn.type})}function Xr(Ur){var sn=Ur.target.files[0];hr.current=sn.name,fe(sn,$r)}return h.a.createElement(U.a,Object(O.a)({form:mr},ue,{className:"upload-image-panel",onFinish:St}),h.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},h.a.createElement(V.a,{style:be})),h.a.createElement(re,{onFileChange:Xr}))),h.a.createElement(U.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},h.a.createElement(V.a,{style:{width:264}})),h.a.createElement(U.a.Item,{style:{textAlign:"right"}},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))};function re(Ve){var gt=Ve.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:gt}))}function fe(Ve,gt){if(!Ve)throw new String("\u6CA1\u6709\u6587\u4EF6");var yt=new FormData;yt.append("editormd-image-file",Ve),yt.append("file_param_name","editormd-image-file"),yt.append("byxhr","true");var Bt=new window.XMLHttpRequest;Bt.withCredentials=!0,Bt.addEventListener("load",function(Nt){gt(JSON.parse(Nt.target.responseText),Ve)},!1),Bt.addEventListener("error",function(Nt){console.error(Nt)},!1),Bt.open("POST","".concat(ve.a,"/api/attachments.json")),Bt.send(yt)}var q=L("giR+"),ee=L("fyUT"),Ce=L("7Kak"),te=L("9yH6"),J=te.a.Group,X={margin:"0 8px"},Q=function(Ve){var gt=Ve.callback,yt=Ve.onCancel;function Bt(Nt){gt(Nt)}return h.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Bt},h.a.createElement("div",{className:"flex-container"},h.a.createElement("span",{style:X},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:X},"\u884C\u6570"),h.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(ee.a,null)),h.a.createElement("span",{style:X},"\u5217\u6570"),h.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(ee.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12}},h.a.createElement("span",{style:X},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(U.a.Item,{name:"align"},h.a.createElement(J,null,h.a.createElement(te.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(te.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(te.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(te.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(H.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(H.a,{type:"ghost",onClick:yt},"\u53D6\u6D88")))},Ee=L("ErOA"),ge=L("7Cbv"),Oe="link",Qe="upload-image",rt="code-block",nt="add-table",ut="------------",dt={default:ut,left:":".concat(ut),center:":".concat(ut,":"),right:"".concat(ut,":")},mt=L("9VGf"),He,De;function at(){}var ht=0,Ze=1e4,st="\u2581",Ue=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Me(Ve){return/^\d+$/.test(Ve)?"".concat(Ve,"px"):Ve}var Ne=navigator.platform.toUpperCase().indexOf("MAC")>=0,xe=Ne?"Cmd":"Ctrl",Se=["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=(He={},Object(E.a)(He,xe+"-B","bold"),Object(E.a)(He,xe+"-I","italic"),He),Le=(De={},Object(E.a)(De,Oe,"\u6DFB\u52A0\u94FE\u63A5"),Object(E.a)(De,rt,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(E.a)(De,Qe,"\u6DFB\u52A0\u6587\u4EF6"),Object(E.a)(De,nt,"\u6DFB\u52A0\u8868\u683C"),De),Je=Z.a=function(Ve){var gt=Ve.defaultValue,yt=gt===void 0?"":gt,Bt=Ve.onChange,Nt=Ve.width,mr=Nt===void 0?"100%":Nt,hr=Ve.height,St=hr===void 0?400:hr,$r=Ve.miniToolbar,Xr=$r===void 0?!1:$r,Ur=Ve.isFocus,sn=Ur===void 0?!1:Ur,Rr=Ve.watch,mn=Ve.insertTemp,vn=Ve.mode,Gt=vn===void 0?"markdown":vn,Cn=Ve.id,yn=Cn===void 0?"markdown-editor-id":Cn,Sn=Ve.showResizeBar,xn=Sn===void 0?!1:Sn,xi=Ve.noStorage,Ti=xi===void 0?!1:xi,hn=Ve.showNullButton,cr=hn===void 0?!1:hn,Gn=Ve.hidetoolBar,pi=Gn===void 0?!1:Gn,Vn=Ve.fullScreen,Yr=Vn===void 0?!1:Vn,Un=Ve.onBlur,ui=Ve.onCMBeforeChange,ci=Ve.onFullScreen,jt=Ve.className,_r=jt===void 0?"":jt,ai=Ve.disablePaste,Oi=ai===void 0?!1:ai,Ai=Ve.placeholder,Ri=Ai===void 0?"":Ai,se=Ve.values,W=se===void 0?"":se,$=Object(n.useState)(null),ne=Object(C.a)($,2),ce=ne[0],oe=ne[1],Ke=Object(n.useState)(yt),At=Object(C.a)(Ke,2),Vt=At[0],vr=At[1],Pt=Object(n.useState)(Rr),Br=Object(C.a)(Pt,2),jr=Br[0],fn=Br[1],ti=Object(n.useState)(Yr),mi=Object(C.a)(ti,2),Rn=mi[0],Li=mi[1],qi=Object(n.useState)(""),Qn=Object(C.a)(qi,2),_i=Qn[0],vi=Qn[1],Fi=Object(n.useState)(0),gi=Object(C.a)(Fi,2),Gi=gi[0],Mi=gi[1],oa=Object(n.useState)(St),sa=Object(C.a)(oa,2),Ii=sa[0],Xn=sa[1],Vi=Object(n.useState)(!1),ta=Object(C.a)(Vi,2),Ct=ta[0],tt=ta[1],pt=Object(n.useRef)(Object(ge.a)()),_t=Object(n.useRef)(!1),Mt=Object(n.useRef)(),Dt=Object(n.useRef)(),Ht=Object(n.useRef)(),Wt=Object(n.useRef)(),ct=Object(n.useRef)(),Ot=function(){var Et=Object(p.a)(s.a.mark(function wt(){var xt,$t;return s.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return sr.next=2,Object(Ee.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:pt.current}});case 2:$t=sr.sent,$t!=null&&(xt=$t.attachments)!==null&&xt!==void 0&&xt.length&&(console.log("cm:",ce,Dt),$t.attachments.map(function(lr){lr.content_type.indexOf("image")>-1?ce.replaceSelection(".concat(lr.content_type,")")):lr.content_type.indexOf("video")>-1?ce.replaceSelection('')):lr.content_type.indexOf("pdf")>-1?ce.replaceSelection('').concat(lr.name,"")):ce.replaceSelection("[".concat(lr.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(lr.id,"?type=").concat(lr.content_type,")"))}));case 4:case"end":return sr.stop()}},wt)}));return function(){return Et.apply(this,arguments)}}();Object(n.useEffect)(function(){vr(W),ce==null||ce.setValue(W)},[W]),Object(n.useEffect)(function(){ci==null||ci(Rn)},[Rn]),Object(n.useEffect)(function(){if(Dt.current){var Et=c.a.fromTextArea(Dt.current,{mode:Gt,lineNumbers:!Xr,lineWrapping:!0,value:yt,autoCloseTags:!0,autoCloseBrackets:!0});sn&&Et.focus();function wt(xt,$t){if(Oi){$t.preventDefault();return}var ur=$t.clipboardData;if(ur){var sr=ur.types.toString(),lr=ur.items;if(sr==="Files"||ur.types.indexOf("Files")>-1){if($t.preventDefault(),Gt=="stex")return;try{var Tr,Zr=lr[1];((Tr=lr[0])===null||Tr===void 0?void 0:Tr.kind)==="file"&&(Zr=lr[0]);var et=Zr.getAsFile(),ir=et.name.split(".").pop();fe(et,function(Lr){if(Lr.id){var Jr,gr,pr;(et==null||((Jr=et.type)===null||Jr===void 0)?void 0:Jr.indexOf("image"))>-1?Et.replaceSelection(".concat(Lr.content_type,")")):(et==null||((gr=et.type)===null||gr===void 0)?void 0:gr.indexOf("video"))>-1?Et.replaceSelection('')):(et==null||((pr=et.type)===null||pr===void 0)?void 0:pr.indexOf("pdf"))>-1?Et.replaceSelection('').concat(et.name,"")):Se.includes(ir)?Et.replaceSelection('').concat(et.name,"")):Et.replaceSelection("[".concat(et.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}else(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})}catch(Lr){u.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",wt),Et.on("dragleave",function(xt,$t){Ht.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(xt,$t){Ht.current.classList.add("mouse-hover-md")}),Et.on("drop",function(xt,$t){Ht.current.classList.add("mouse-hover-md");var ur;if(ur=$t.dataTransfer.files,ur.length>0){$t.preventDefault(),$t.stopPropagation();for(var sr=function(Zr){var et=ur[Zr],ir=et.name.split(".").pop();fe(et,function(Lr){if(Lr.id){var Jr,gr,pr;(et==null||((Jr=et.type)===null||Jr===void 0)?void 0:Jr.indexOf("image"))>-1?Et.replaceSelection(".concat(Lr.content_type,")")):(et==null||((gr=et.type)===null||gr===void 0)?void 0:gr.indexOf("video"))>-1?Et.replaceSelection('')):(et==null||((pr=et.type)===null||pr===void 0)?void 0:pr.indexOf("pdf"))>-1?Et.replaceSelection('').concat(et.name,"")):Se.includes(ir)?Et.replaceSelection('').concat(et.name,"")):Et.replaceSelection("[".concat(et.name,"](").concat(w.a.API_SERVER,"/api/attachments/").concat(Lr.id,"?type=").concat(Lr.content_type,")"))}else(Lr==null?void 0:Lr.status)===401&&(document.location.href="/user/login")})},lr=0;lr0||lr.target.offsetWidth>0)&&(Rt(),ce.setSize("100%","100%"),ce.refresh())}}catch(Tr){ur.e(Tr)}finally{ur.f()}});return xt.observe(Dt.current.parentElement),xt}if(ce){var wt=Et();return function(){wt.unobserve(Dt.current.parentElement)}}},[ce,Rt]),Object(n.useEffect)(function(){if(ce){for(var Et=[],wt=function(){var lr=$t[xt];ur=Object(C.a)(lr,2);var Tr=ur[0],Zr=ur[1],et=Object(E.a)({},Tr,function(){fr(Zr)});Et.push(et),ce.addKeyMap(et)},xt=0,$t=Object.entries(Ae);xt<$t.length;xt++){var ur;wt()}return Mt.current=setInterval(function(){_t.current&&Ot()},4e3),function(){clearInterval(Mt.current);var sr=Object(T.a)(Et),lr;try{for(sr.s();!(lr=sr.n()).done;){var Tr=lr.value;ce.removeKeyMap(Tr)}}catch(Zr){sr.e(Zr)}finally{sr.f()}}}},[ce]),Object(n.useEffect)(function(){Yr!==Rn&&Li(Yr)},[Yr]),Object(mt.a)(function(){if(!Ti&&Gi>0){var Et=new Date().getTime(),wt=window.sessionStorage.getItem(yn);Et>=Gi+Ze&&(!wt||wt!==Vt)&&(window.sessionStorage.setItem(yn,Vt),tt(!0))}},Ze),Object(n.useEffect)(function(){fn(Rr)},[ce,Rr]),Object(n.useEffect)(function(){ce&&(sn&&ce.focus())},[ce,sn]),Object(n.useEffect)(function(){if(jr&&ce){var Et=ce.getScrollerElement();function wt(xt){var $t=xt.target;if(ct.current){var ur=$t.scrollTop/$t.scrollHeight;ct.current.scrollTop=ct.current.scrollHeight*ur}}return Et.addEventListener("scroll",wt),function(){Et.removeEventListener("scroll",wt)}}},[ce,jr]),Object(n.useEffect)(function(){if(ce&&ui){function Et(wt,xt){ui(wt,xt)}return ce.on("beforeChange",Et),function(){ce.off("beforeChange",Et)}}},[ce,ui]),Object(n.useEffect)(function(){if(ce&&Un){function Et(){Un(ce.getValue())}return ce.on("blur",Et),function(){ce.off("blur",Et)}}},[ce,Un]),Object(n.useEffect)(function(){if(ce){function Et(wt){var xt=wt.getValue();vr(xt),Mi(new Date().getTime()),wt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Bt&&Bt(xt)}return ce.on("change",Et),function(){ce.off("change",Et)}}},[ce,Bt]),Object(n.useEffect)(function(){ce&&(yt==null?(ce.setValue(""),vr("")):yt!==ce.getValue()&&(ce.setValue(yt),vr(yt),ce.setCursor(ce.lineCount(),0)))},[ce,yt]);var fr=Object(n.useCallback)(function(Et){var wt=ce.getCursor(),xt=ce.getSelection(),$t=xt.split(`
`);switch(Et){case"bold":return ce.replaceSelection("**"+xt+"**"),xt===""&&ce.setCursor(wt.line,wt.ch+2),ce.focus();case"italic":return ce.replaceSelection("*"+xt+"*"),xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.focus();case"code":return ce.replaceSelection("`"+xt+"`"),xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.focus();case"inline-latex":return ce.replaceSelection("`$$"+xt+"$$`"),xt===""&&ce.setCursor(wt.line,wt.ch+3),ce.focus();case"latex":return ce.replaceSelection("```latex\n"+xt+"\n```"),ce.setCursor(wt.line+1,xt.length+1),ce.focus();case"line-break":return ce.replaceSelection(`
`),ce.focus();case"list-ul":return xt===""?ce.replaceSelection("- "+xt):ce.replaceSelection($t.map(function(ur){return ur===""?"":"- ".concat(ur)}).join(`
`)),ce.focus();case"list-ol":return xt===""?ce.replaceSelection("1. "+xt):ce.replaceSelection($t.map(function(ur,sr){return ur===""?"":"".concat(sr+1,". ").concat(ur)}).join(`
`)),ce.focus();case"add-null-ch":return xt===""&&ce.setCursor(wt.line,wt.ch+1),ce.replaceSelection(st),ce.focus();case"inster-template-1":return xt===""&&ce.setCursor(wt.line,wt.ch),ce.replaceSelection(Ue),ce.focus();case"eraser":return ce.setValue(""),ce.focus();case"trigger-watch":return fn(!jr),ce.focus();case"trigger-full-screen":return Li(!Rn),ce.focus();case Oe:vi(Oe);return;case rt:vi(rt);return;case Qe:vi(Qe);return;case nt:vi(nt);return;default:throw new Error}},[ce,jr,Rn]),qt=Object(n.useCallback)(function(Et){vi("");switch(_i){case Oe:var wt=Et.title,xt=Et.link;return ce.replaceSelection("[".concat(wt,"](").concat(xt,")")),ce.focus();case rt:var $t=Et.language,ur=Et.content;return ce.replaceSelection(["```"+$t,ur,"```"].join(`
`)),ce.focus();case Qe:var sr=Et.src,lr=Et.alt,Tr=Et.name;return sr.indexOf("type=image")>-1?ce.replaceSelection(".concat(sr,' "').concat(lr||"",'" )')):sr.indexOf("type=application/pdf")>-1?ce.replaceSelection('').concat(Tr,"")):ce.replaceSelection('').concat(Tr,"")),ce.focus();case nt:for(var Zr=Et.row,et=Et.col,ir=Et.align,Lr=`
`,Jr=0;Jr300&&(Tr=300);var Zr=St+Tr+"px";Xn(Zr)}}return Et.addEventListener("mousedown",$t),document.addEventListener("mousemove",sr),document.addEventListener("mouseup",ur),function(){Et.removeEventListener("mousedown",$t),document.removeEventListener("mousemove",sr),document.removeEventListener("mouseup",ur)}}},[ce,Wt]),Object(n.useEffect)(function(){Xn(St)},[St]);var tr=Me(mr),or=Me(Ii),ot={width:tr,height:or},Dr=Object(n.useMemo)(function(){if(Gi){var Et=new Date(Gi),wt=Et.getHours(),xt=Et.getMinutes(),$t=Et.getSeconds();return wt=wt<10?"0"+wt:wt,xt=xt<10?"0"+xt:xt,$t=$t<10?"0"+$t:$t,"".concat(wt,":").concat(xt,":").concat($t)}return 0},[Gi]);function Ir(){window.sessionStorage.removeItem(yn),tt(!1),Mi(0)}function yr(){tt(!1),Mi(0),ce.setValue(window.sessionStorage.getItem(yn))}function er(Et,wt){var xt=ce.getValue();xt=xt.replace(Et,wt),vr(xt),ce==null||ce.setValue(xt)}return h.a.createElement(n.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ht},h.a.createElement("div",{className:"markdown-editor-container ".concat(_r," ").concat(jr?"on-preview":""," ").concat(Xr?"mini":""," ").concat(Rn?"full-screen":""),style:ot},h.a.createElement(I,{insertTemp:mn,watch:jr,fullScreen:Rn,showNullButton:cr,onActionCallback:fr,hidetoolBar:pi,uuid:pt.current,setOpenPhones:function(){_t.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:Dt,placeholder:Ri})),jr?h.a.createElement("div",{ref:ct,className:"preview-container"},Gt==="stex"&&h.a.createElement(k,{value:Vt}),Gt!=="stex"&&h.a.createElement(o.a,{edit:!0,value:Vt,replaces:er})):null))),xn?h.a.createElement("a",{ref:Wt,className:"editor-resize"}):null,h.a.createElement(G.a,null,Le[_i]?h.a.createElement(d.a,{centered:!0,title:Le[_i],visible:!0,onCancel:Kt,footer:null},Qt):null))}},PVpz:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("ETIr"),L("cv67"),L("K3mO"),L("OLod"))})(this,function(P){return function(){var d=P,T=d.lib,D=T.StreamCipher,u=d.algo,p=[],C=[],E=[],l=u.RabbitLegacy=D.extend({_doReset:function(){var n=this._key.words,h=this.cfg.iv,f=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],c=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var m=0;m<4;m++)s.call(this);for(var m=0;m<8;m++)c[m]^=f[m+4&7];if(h){var _=h.words,y=_[0],i=_[1],a=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,t=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,S=a>>>16|t&4294901760,x=t<<16|a&65535;c[0]^=a,c[1]^=S,c[2]^=t,c[3]^=x,c[4]^=a,c[5]^=S,c[6]^=t,c[7]^=x;for(var m=0;m<4;m++)s.call(this)}},_doProcessBlock:function(n,h){var f=this._X;s.call(this),p[0]=f[0]^f[5]>>>16^f[3]<<16,p[1]=f[2]^f[7]>>>16^f[5]<<16,p[2]=f[4]^f[1]>>>16^f[7]<<16,p[3]=f[6]^f[3]>>>16^f[1]<<16;for(var c=0;c<4;c++)p[c]=(p[c]<<8|p[c]>>>24)&16711935|(p[c]<<24|p[c]>>>8)&4278255360,n[h+c]^=p[c]},blockSize:128/32,ivSize:64/32});function s(){for(var n=this._X,h=this._C,f=0;f<8;f++)C[f]=h[f];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0>>0?1:0)|0,this._b=h[7]>>>0>>0?1:0;for(var f=0;f<8;f++){var c=n[f]+h[f],m=c&65535,_=c>>>16,y=((m*m>>>17)+m*_>>>15)+_*_,i=((c&4294901760)*c|0)+((c&65535)*c|0);E[f]=y^i}n[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,n[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,n[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,n[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,n[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,n[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,n[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,n[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}d.RabbitLegacy=D._createHelper(l)}(),P.RabbitLegacy})},RxwV:function(j,Z,L){"use strict";var P=L("q1tI"),d=L("uciX"),T=L("2W6z"),D=L.n(T),u=L("4IlW"),p=L("uK0f"),C=L.n(p);function E(Te,be){if(Te===be)return!0;if(!Te||!be)return!1;var ue=Te.length;if(be.length!==ue)return!1;for(var le=0;le0;(rt||fe.isLeaf===!1)&&(Oe+=" ".concat(Ce,"-menu-item-expand"),fe.loading||(Qe=P.createElement("span",{className:"".concat(Ce,"-menu-item-expand-icon")},J))),te==="hover"&&(rt||fe.isLeaf===!1)&&(ge={onMouseEnter:this.delayOnSelect.bind(this,Q),onMouseLeave:this.delayOnSelect.bind(this),onClick:Q}),this.isActiveOption(fe,q)&&(Oe+=" ".concat(Ce,"-menu-item-active"),ge.ref=this.saveMenuItem(q)),fe.disabled&&(Oe+=" ".concat(Ce,"-menu-item-disabled"));var nt=null;fe.loading&&(Oe+=" ".concat(Ce,"-menu-item-loading"),nt=X||null);var ut="";return"title"in fe?ut=fe.title:typeof fe[this.getFieldName("label")]=="string"&&(ut=fe[this.getFieldName("label")]),P.createElement("li",Object.assign({key:fe[this.getFieldName("value")],className:Oe,title:ut},ge,{role:"menuitem",onMouseDown:function(mt){return mt.preventDefault()}}),fe[this.getFieldName("label")],Qe,nt)}},{key:"getActiveOptions",value:function(fe){var q=this,ee=this.props.options,Ce=fe||this.props.activeValue;return C()(ee,function(te,J){return te[q.getFieldName("value")]===Ce[J]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var fe=this,q=this.props.options,ee=this.getActiveOptions().map(function(Ce){return Ce[fe.getFieldName("children")]}).filter(function(Ce){return!!Ce});return ee.unshift(q),ee}},{key:"delayOnSelect",value:function(fe){for(var q=this,ee=arguments.length,Ce=new Array(ee>1?ee-1:0),te=1;te=0)continue;if(!Object.prototype.propertyIsEnumerable.call(Te,le))continue;ue[le]=Te[le]}}return ue}function b(Te,be){if(Te==null)return{};var ue={},le=Object.keys(Te),re,fe;for(fe=0;fe=0)continue;ue[re]=Te[re]}return ue}function v(Te){return N(Te)||M(Te)||w(Te)||g()}function g(){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 w(Te,be){if(!Te)return;if(typeof Te=="string")return I(Te,be);var ue=Object.prototype.toString.call(Te).slice(8,-1);if(ue==="Object"&&Te.constructor&&(ue=Te.constructor.name),ue==="Map"||ue==="Set")return Array.from(Te);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return I(Te,be)}function M(Te){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(Te))return Array.from(Te)}function N(Te){if(Array.isArray(Te))return I(Te)}function I(Te,be){(be==null||be>Te.length)&&(be=Te.length);for(var ue=0,le=new Array(be);ue=X.length?0:Ee):(Ee-=1,Ee=Ee<0?X.length-1:Ee):Ee=0,te[J]=X[Ee][fe.getFieldName("value")]}else if(ee.keyCode===u.a.LEFT||ee.keyCode===u.a.BACKSPACE)ee.preventDefault(),te.splice(te.length-1,1);else if(ee.keyCode===u.a.RIGHT)ee.preventDefault(),X[Q]&&X[Q][fe.getFieldName("children")]&&te.push(X[Q][fe.getFieldName("children")][0][fe.getFieldName("value")]);else if(ee.keyCode===u.a.ESC||ee.keyCode===u.a.TAB){fe.setPopupVisible(!1);return}(!te||te.length===0)&&fe.setPopupVisible(!1);var ge=fe.getActiveOptions(te),Oe=ge[ge.length-1];fe.handleMenuSelect(Oe,ge.length-1,ee),fe.props.onKeyDown&&fe.props.onKeyDown(ee)},fe.saveTrigger=function(ee){fe.trigger=ee};var q=[];return"value"in re?q=re.value||[]:"defaultValue"in re&&(q=re.defaultValue||[]),D()(!("filedNames"in re),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),fe.state={popupVisible:re.popupVisible,activeValue:q,value:q,prevProps:re},fe.defaultFieldNames={label:"label",value:"value",children:"children"},fe}return H(le,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(fe){var q=this.defaultFieldNames,ee=this.props,Ce=ee.fieldNames,te=ee.filedNames;return"filedNames"in this.props?te[fe]||q[fe]:Ce[fe]||q[fe]}},{key:"getFieldNames",value:function(){var fe=this.props,q=fe.fieldNames,ee=fe.filedNames;return"filedNames"in this.props?ee:q}},{key:"getCurrentLevelOptions",value:function(){var fe=this,q=this.props.options,ee=q===void 0?[]:q,Ce=this.state.activeValue,te=Ce===void 0?[]:Ce,J=C()(ee,function(X,Q){return X[fe.getFieldName("value")]===te[Q]},{childrenKeyName:this.getFieldName("children")});return J[J.length-2]?J[J.length-2][this.getFieldName("children")]:v(ee).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(fe){var q=this;return C()(this.props.options||[],function(ee,Ce){return ee[q.getFieldName("value")]===fe[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var fe=this.props,q=fe.prefixCls,ee=fe.transitionName,Ce=fe.popupClassName,te=fe.options,J=te===void 0?[]:te,X=fe.disabled,Q=fe.builtinPlacements,Ee=fe.popupPlacement,ge=fe.children,Oe=fe.dropdownRender,Qe=O(fe,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),rt=P.createElement("div",null),nt="";J&&J.length>0?rt=P.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):nt=" ".concat(q,"-menus-empty");var ut=rt;return Oe&&(ut=Oe(rt)),P.createElement(d.a,Object.assign({ref:this.saveTrigger},Qe,{popupPlacement:Ee,builtinPlacements:Q,popupTransitionName:ee,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(q,"-menus"),popupClassName:Ce+nt,popup:ut}),P.cloneElement(ge,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(fe,q){var ee=q.prevProps,Ce=ee===void 0?{}:ee,te={prevProps:fe};return"value"in fe&&!E(Ce.value,fe.value)&&(te.value=fe.value||[],"loadData"in fe||(te.activeValue=fe.value||[])),"popupVisible"in fe&&(te.popupVisible=fe.popupVisible),te}}]),le}(P.Component);return Te.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:o,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},Te}(),ke=Re,ve=Z.a=ke},S6kV:function(j,Z,L){(function(P,d,T){j.exports=Z=d(L("Ib8C"),L("OLod"))})(this,function(P){return P.mode.OFB=function(){var d=P.lib.BlockCipherMode.extend(),T=d.Encryptor=d.extend({processBlock:function(D,u){var p=this._cipher,C=p.blockSize,E=this._iv,l=this._keystream;E&&(l=this._keystream=E.slice(0),this._iv=void 0),p.encryptBlock(l,0);for(var s=0;s|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(te){for(var J=0,X=!1,Q=!1,Ee=0,ge=te.length;Ee122||(xe<65||Ne>90||at.push([Math.max(65,Ne)|32,Math.min(xe,90)|32]),xe<97||Ne>122||at.push([Math.max(97,Ne)&~32,Math.min(xe,122)&~32]))}}at.sort(function(Je,Ve){return Je[0]-Ve[0]||Ve[1]-Je[1]});for(var Se=[],Ae=[],st=0;stLe[0]&&(Le[1]+1>Le[0]&&Ze.push("-"),Ze.push(nt(Le[1])))}return Ze.push("]"),Ze.join("")}function dt(He){for(var De=He.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")),at=De.length,ht=[],Ze=0,st=0;Ze=2&&Ne==="["?De[Ze]=ut(Ue):Ne!=="\\"&&(De[Ze]=Ue.replace(/[a-zA-Z]/g,function(Ae){var Le=Ae.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return De.join("")}for(var mt=[],Ee=0,ge=te.length;Ee=0;)X[mt.charAt(He)]=dt;var De=dt[1],at=""+De;rt.hasOwnProperty(at)||(Qe.push(De),rt[at]=null)}Qe.push(/[\0-\uffff]/),Q=U(Qe)})();var Ee=J.length,ge=function(Oe){for(var Qe=Oe.sourceCode,rt=Oe.basePos,nt=Oe.sourceNode,ut=[rt,w],dt=0,mt=Qe.match(Q)||[],He={},De=0,at=mt.length;De=5&&Ze.substring(0,5)==="lang-",Ue&&!(st&&typeof st[1]=="string")&&(Ue=!1,Ze=I),Ue||(He[ht]=Ze)}var xe=dt;if(dt+=ht.length,!Ue)ut.push(rt+xe,Ze);else{var Se=st[1],Ae=ht.indexOf(Se),Le=Ae+Se.length;st[2]&&(Le=ht.length-st[2].length,Ae=Le-Se.length);var Je=Ze.substring(5);V(nt,rt+xe,ht.substring(0,Ae),ge,ut),V(nt,rt+xe+Ae,Se,le(Je,Se),ut),V(nt,rt+xe+Le,ht.substring(Le),ge,ut)}}Oe.decorations=ut};return ge}function Re(te){var J=[],X=[];te.tripleQuotedStrings?J.push([o,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):te.multiLineStrings?J.push([o,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([o,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),te.verbatimStrings&&X.push([o,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=te.hashComments;Q&&(te.cStyleComments?(Q>1?J.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([o,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([O,/^#[^\r\n]*/,null,"#"])),te.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ee=te.regexLiterals;if(Ee){var ge=Ee>1?"":`
\r`,Oe=ge?".":"[\\S\\s]",Qe="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+K+"("+Qe+")")])}var rt=te.types;rt&&X.push([b,rt]);var nt=(""+te.keywords).replace(/^ | $/g,"");nt.length&&X.push([k,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([w,/^\s+/,null,` \r
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return te.regexLiterals&&(ut+="(?!s*/)"),X.push([v,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[w,/^[a-z_$][a-z_$@0-9]*/i,null],[v,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[w,/^\\[\s\S]?/,null],[g,new RegExp(ut),null]),pe(J,X)}var ke=Re({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ve(te,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,Ee=/\r\n?|\n/,ge=te.ownerDocument,Oe=ge.createElement("li");te.firstChild;)Oe.appendChild(te.firstChild);var Qe=[Oe];function rt(De){var at=De.nodeType;if(at==1&&!Q.test(De.className))if(De.nodeName==="br")nt(De),De.parentNode&&De.parentNode.removeChild(De);else for(var ht=De.firstChild;ht;ht=ht.nextSibling)rt(ht);else if((at==3||at==4)&&X){var Ze=De.nodeValue,st=Ze.match(Ee);if(st){var Ue=Ze.substring(0,st.index);De.nodeValue=Ue;var Me=Ze.substring(st.index+st[0].length);if(Me){var Ne=De.parentNode;Ne.insertBefore(ge.createTextNode(Me),De.nextSibling)}nt(De),Ue||De.parentNode.removeChild(De)}}}function nt(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function at(st,Ue){var Me=Ue?st.cloneNode(!1):st,Ne=st.parentNode;if(Ne){var xe=at(Ne,1),Se=st.nextSibling;xe.appendChild(Me);for(var Ae=Se;Ae;Ae=Se)Se=Ae.nextSibling,xe.appendChild(Ae)}return Me}for(var ht=at(De.nextSibling,0),Ze;(Ze=ht.parentNode)&&Ze.nodeType===1;)ht=Ze;Qe.push(ht)}for(var ut=0;ut=Ne&&(rt+=2),ge>=xe&&(dt+=2)}}finally{Ze&&(Ze.style.display=st)}}var be={};function ue(te,J){for(var X=J.length;--X>=0;){var Q=J[X];be.hasOwnProperty(Q)?E.console&&console.warn("cannot override language handler %s",Q):be[Q]=te}}function le(te,J){return te&&be.hasOwnProperty(te)||(te=/^\s*]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^