(window.webpackJsonp=window.webpackJsonp||[]).push([[120,5,6,7,8,10,16,17],{"+NIl": /*!***************************************************!*\ !*** ./node_modules/codemirror/mode/stex/stex.js ***! \***************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};function a(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=o.hasOwnProperty(s)?o[s]:o.DEFAULT)),a(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return a(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return a(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return a(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return a(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),a(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=o.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return a(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),a(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(a(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return o.importmodule=i("importmodule","tag",["string","builtin"]),o.documentclass=i("documentclass","tag",["","atom"]),o.usepackage=i("usepackage","tag",["atom"]),o.begin=i("begin","tag",["atom"]),o.end=i("end","tag",["atom"]),o.label=i("label","tag",["atom"]),o.ref=i("ref","tag",["atom"]),o.eqref=i("eqref","tag",["atom"]),o.cite=i("cite","tag",["atom"]),o.bibitem=i("bibitem","tag",["atom"]),o.Bibitem=i("Bibitem","tag",["atom"]),o.RBibitem=i("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"19Vz": /*!**************************************************************!*\ !*** ./node_modules/codemirror/addon/display/placeholder.js ***! \**************************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){o(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(o,a,s){var l=s&&s!=e.Init;if(a&&!l)o.on("blur",r),o.on("change",i),o.on("swapDoc",i),e.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(o)}),i(o);else if(!a&&l){o.off("blur",r),o.off("change",i),o.off("swapDoc",i),e.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),t(o);var c=o.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&r(o)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1ZF9": /*!*****************************************!*\ !*** ./src/assets/images/Authorize.png ***! \*****************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/Authorize.cc9c212f.png"},"1eCo": /*!*************************************************!*\ !*** ./node_modules/codemirror/mode/xml/xml.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function h(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=h;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=h,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=h,t.state=v,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=h;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function g(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function v(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:v}function y(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",E):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",E(e,0,n)):(a="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",x):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",x(e,0,n)):(a="error",w)}function x(e,t,n){return"endTag"!=e?(a="error",x):(m(n),v)}function w(e,t,n){return a="error",x(e,0,n)}function E(e,t,n){if("word"==e)return a="attribute",S;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?g(n,r):(g(n,r),n.context=new p(n,r,i==n.indented)),v}return a="error",E}function S(e,t,n){return"equals"==e?C:(l.allowMissing||(a="error"),E(e,0,n))}function C(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(a="string",E):(a="error",E(e,0,n))}function k(e,t,n){return"string"==e?k:E(e,0,n)}return h.isInText=!0,{startState:function(e){var t={tokenize:h,state:v,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=E)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1uat": /*!******************************************!*\ !*** ./node_modules/crypto-js/sha512.js ***! \******************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./x64-core */"MlIO"),function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],h=n[6],d=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,b=a.high,x=a.low,w=s.high,E=s.low,S=u.high,C=u.low,k=h.high,_=h.low,T=d.high,O=d.low,A=f,L=p,D=m,I=g,R=v,M=y,N=b,j=x,P=w,B=E,F=S,U=C,H=k,z=_,G=T,V=O,W=0;W<80;W++){var K,q,X=c[W];if(W<16)q=X.high=0|e[t+2*W],K=X.low=0|e[t+2*W+1];else{var Y=c[W-15],$=Y.high,J=Y.low,Z=($>>>1|J<<31)^($>>>8|J<<24)^$>>>7,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^(J>>>7|$<<25),ee=c[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[W-7],ae=oe.high,se=oe.low,le=c[W-16],ce=le.high,ue=le.low;q=(q=(q=Z+ae+((K=Q+se)>>>0>>0?1:0))+re+((K+=ie)>>>0>>0?1:0))+ce+((K+=ue)>>>0>>0?1:0),X.high=q,X.low=K}var he,de=P&F^~P&H,fe=B&U^~B&z,pe=A&D^A&R^D&R,me=L&I^L&M^I&M,ge=(A>>>28|L<<4)^(A<<30|L>>>2)^(A<<25|L>>>7),ve=(L>>>28|A<<4)^(L<<30|A>>>2)^(L<<25|A>>>7),ye=(P>>>14|B<<18)^(P>>>18|B<<14)^(P<<23|B>>>9),be=(B>>>14|P<<18)^(B>>>18|P<<14)^(B<<23|P>>>9),xe=l[W],we=xe.high,Ee=xe.low,Se=G+ye+((he=V+be)>>>0>>0?1:0),Ce=ve+me;G=H,V=z,H=F,z=U,F=P,U=B,P=N+(Se=(Se=(Se=Se+de+((he+=fe)>>>0>>0?1:0))+we+((he+=Ee)>>>0>>0?1:0))+q+((he+=K)>>>0>>0?1:0))+((B=j+he|0)>>>0>>0?1:0)|0,N=R,j=M,R=D,M=I,D=A,I=L,A=Se+(ge+pe+(Ce>>>0>>0?1:0))+((L=he+Ce|0)>>>0>>0?1:0)|0}p=r.low=p+L,r.high=f+A+(p>>>0>>0?1:0),g=i.low=g+I,i.high=m+D+(g>>>0>>0?1:0),y=o.low=y+M,o.high=v+R+(y>>>0>>0?1:0),x=a.low=x+j,a.high=b+N+(x>>>0>>0?1:0),E=s.low=E+B,s.high=w+P+(E>>>0>>0?1:0),C=u.low=C+U,u.high=S+F+(C>>>0>>0?1:0),_=h.low=_+z,h.high=k+H+(_>>>0>>0?1:0),O=d.low=O+V,d.high=T+G+(O>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)},"3y9D": /*!****************************************!*\ !*** ./node_modules/crypto-js/sha1.js ***! \****************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u;e.exports=(u=n(/*! ./core */"Ib8C"),i=(r=u).lib,o=i.WordArray,a=i.Hasher,s=r.algo,l=[],c=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var u=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=u<<1|u>>>31}var h=(r<<5|r>>>27)+s+l[c];h+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,s=a,a=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=a._createHelper(c),r.HmacSHA1=a._createHmacHelper(c),u.SHA1)},4: /*!************************!*\ !*** crypto (ignored) ***! \************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){},"55Ip": /*!***************************************************************!*\ !*** ./node_modules/react-router-dom/esm/react-router-dom.js ***! \***************************************************************/ /*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */ /*! exports used: Link, NavLink */function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),o=n(/*! react */"q1tI"),a=n.n(o),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");a.a.Component;a.a.Component;var h=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},f=function(e){return e},p=a.a.forwardRef;void 0===p&&(p=f);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,o=Object(c.a)(e,["innerRef","navigate","onClick"]),s=o.target,u=Object(l.a)({},o,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=f!==p&&t||n,a.a.createElement("a",u)}));var g=p((function(e,t){var n=e.component,i=void 0===n?m:n,o=e.replace,s=e.to,g=e.innerRef,v=Object(c.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=d(h(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},v,{href:c,navigate:function(){var t=h(s,e.location);(o?n.replace:n.push)(t)}});return f!==p?m.ref=t||g:m.innerRef=g,a.a.createElement(i,m)}))})),v=function(e){return e},y=a.a.forwardRef;void 0===y&&(y=v);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,o=e.activeClassName,s=void 0===o?"active":o,f=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,x=e.location,w=e.sensitive,E=e.strict,S=e.style,C=e.to,k=e.innerRef,_=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=x||e.location,o=d(h(C,n),n),c=o.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),O=T?Object(r.f)(n.pathname,{path:T,exact:m,sensitive:w,strict:E}):null,A=!!(b?b(O,n):O),L=A?function(){for(var e=arguments.length,t=new Array(e),n=0;n>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(O=n[i]).high^=a,O.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(O=n[d+5*m]).high,p^=O.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],b=y.high,x=y.low;for(f=v.high^(b<<1|x>>>31),p=v.low^(x<<1|b>>>31),m=0;m<5;m++)(O=n[d+5*m]).high^=f,O.low^=p}for(var w=1;w<25;w++){var E=(O=n[w]).high,S=O.low,C=l[w];C<32?(f=E<>>32-C,p=S<>>32-C):(f=S<>>64-C,p=E<>>64-C);var k=h[c[w]];k.high=f,k.low=p}var _=h[0],T=n[0];for(_.high=T.high,_.low=T.low,d=0;d<5;d++)for(m=0;m<5;m++){var O=n[w=d+5*m],A=h[w],L=h[(d+1)%5+5*m],D=h[(d+2)%5+5*m];O.high=A.high^~L.high&D.high,O.low=A.low^~L.low&D.low}O=n[0];var I=u[s];O.high^=I.high,O.low^=I.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)},"6+eU": /*!************************************************************!*\ !*** ./node_modules/rc-pagination/es/index.js + 4 modules ***! \************************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n("wx14"),i=n("rePB"),o=n("VTBJ"),a=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),h=n.n(u),d=n("TSYQ"),f=n.n(d),p=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=f()(n,"".concat(n,"-").concat(e.page),(t={},Object(i.a)(t,"".concat(n,"-active"),e.active),Object(i.a)(t,e.className,!!e.className),Object(i.a)(t,"".concat(n,"-disabled"),!e.page),t));return h.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",h.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,g=38,v=40,y=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o=0||t.relatedTarget.className.indexOf("".concat(o,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,o=t.changeSize,a=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,d=t.disabled,f=this.state.goInputText,p="".concat(i,"-options"),m=l,g=null,v=null,y=null;if(!o&&!a)return null;var b=this.getPageSizeOptions();if(o&&m){var x=b.map((function(t,n){return h.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));g=h.a.createElement(m,{disabled:d,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},x)}return a&&(s&&(y="boolean"==typeof s?h.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:d,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):h.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),v=h.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,h.a.createElement("input",{disabled:d,type:"text",value:f,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),h.a.createElement("li",{className:"".concat(p)},g,v)}}]),n}(h.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,x=n("N2Kk");function w(){}function E(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var S=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(E(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||h.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=h.a.createElement(e,Object(o.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==g&&e.keyCode!==v||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===g?r.handleChange(t-1):e.keyCode===v&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=E(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=E(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var o=r.state.pageSize;return r.props.onChange(n,o),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current2?n-2:0),i=2;i=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,o=t.className,a=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,d=t.locale,m=t.showQuickJumper,g=t.showLessItems,v=t.showTitle,y=t.showTotal,x=t.simple,w=t.itemRender,S=t.showPrevNextJumpers,C=t.jumpPrevIcon,k=t.jumpNextIcon,_=t.selectComponentClass,T=t.selectPrefixCls,O=t.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,I=A.currentInputValue;if(!0===l&&c<=D)return null;var R=E(void 0,this.state,this.props),M=[],N=null,j=null,P=null,B=null,F=null,U=m&&m.goButton,H=g?1:2,z=L-1>0?L-1:0,G=L+1=2*H&&3!==L&&(M[0]=Object(u.cloneElement)(M[0],{className:"".concat(n,"-item-after-jump-prev")}),M.unshift(N)),R-L>=2*H&&L!==R-2&&(M[M.length-1]=Object(u.cloneElement)(M[M.length-1],{className:"".concat(n,"-item-before-jump-next")}),M.push(j)),1!==$&&M.unshift(P),J!==R&&M.push(B)}var ee=null;y&&(ee=h.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return h.a.createElement("ul",Object(r.a)({className:f()(n,o,Object(i.a)({},"".concat(n,"-disabled"),s)),style:a,unselectable:"unselectable",ref:this.savePaginationNode},V),ee,h.a.createElement("li",{title:v?d.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),M,h.a.createElement("li",{title:v?d.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(G)),h.a.createElement(b,{disabled:s,locale:d,rootPrefixCls:n,selectComponentClass:_,selectPrefixCls:T,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:O,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:U}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=E(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(h.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:w,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:w,locale:x.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var C=S},"6RRn": /*!*******************************************!*\ !*** ./node_modules/rc-table/es/index.js ***! \*******************************************/ /*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ /*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var o=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return o.a})),t.c=r.b},"6eGT": /*!*******************************************************!*\ !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! \*******************************************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"7Cbv": /*!**************************************************************!*\ !*** ./node_modules/uuid/dist/esm-browser/v4.js + 4 modules ***! \**************************************************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var a=/^(?:[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;for(var s=function(e){return"string"==typeof e&&a.test(e)},l=[],c=0;c<256;++c)l.push((c+256).toString(16).substr(1));var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};t.a=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},"7ahc": /*!*************************************************************!*\ !*** ./src/components/markdown-editor/code-block/index.tsx ***! \*************************************************************/ /*! exports provided: default, MyCodeMirror */ /*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),o=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),a=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),h=n(/*! codemirror */"VrN/"),d=n.n(h),f=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={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"]};function g(e){var t=e.value,n=e.onChange,i=e.mode,o=e.options,a=void 0===o?{}:o,l=Object(c.useRef)(),h=Object(c.useState)(),f=Object(s.a)(h,2),p=f[0],m=f[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=d.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},a));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),h=Object(s.a)(r,2),d=h[0],v=h[1];return u.a.createElement(a.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(a.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){v(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(f,{key:e,value:e},m[e][0])})))),u.a.createElement(a.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(g,{mode:d})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(o.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(o.a,{type:"ghost",onClick:n},"取消")))}},"815F": /*!***************************************************!*\ !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! \***************************************************/ /*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ /*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(a.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,a=r.children,c=Object(o.a)(r,["children"]),u=Object(i.a)({key:n},c),h=e(a);return h.length&&(u.children=h),u})).filter((function(e){return e}))}(e)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),o=[];function a(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,h){var d=Object(l.h)(s?s.pos:"0",h),f=c(u.key,d),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:d,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===h]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[h===e.length-1])});return o.push(p),!0===t||n.has(f)?p.children=a(u.children||[],p):p.children=[],p}))}return a(e),o}function d(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,o,a){var s=i?i.children:e,c=i?Object(l.h)(a.pos,o):"0";if(i){var u=r(i,c),h={node:i,index:o,pos:c,key:u,parentPos:a.node?a.pos:null,level:a.level+1};t(h)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:a?a.level+1:-1})}))}(null)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=arguments.length>2?arguments[2]:void 0,a={},s={},l={posEntities:a,keyEntities:s};return n&&(l=n(l)||l),d(e,(function(e){var t=e.node,n=e.index,i=e.pos,o=e.key,u=e.parentPos,h={node:t,index:n,key:o,pos:i,level:e.level},d=c(o,i);a[i]=h,s[d]=h,h.parent=a[u],h.parent&&(h.parent.children=h.parent.children||[],h.parent.children.push(h)),r&&r(h,l)}),o),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,a=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,o=e.checked,a=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,h=e.dragOverGapTop,d=e.dragOverGapBottom,f=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:o,loaded:a,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:h,dragOverGapBottom:d,pos:f,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN": /*!**********************************************!*\ !*** ./node_modules/codemirror/mode/meta.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n"],v=new f.a.Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){m.length=0,g=["
    "]}var x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var o=t[n];i.push("
  • "+o.text+"");var a=[];return n=e(t,++n,o.level,a),a.length>0&&(i.push("
      "),a.forEach((function(e){i.push(e)})),i.push("
    ")),i.push("
  • "),n=e(t,n,r,i)}(m,0,0,g),g.push("
"),g.join("")}var E={heading:function(e){var t=y.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(s.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),i=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(i)>=0){var o=k(),a=r;r=o,_[o]={type:"block",expression:a}}return{type:"code",raw:n,lang:i,text:r}}}},S=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,k=function(){return"__special_katext_id_".concat(C++,"__")},_={};function T(){C=0,_={}}function O(e){return e=e.replace(S,(function(e,t){var n=k();return _[n]={type:"inline",expression:t},n}))}var A=v.listitem;v.listitem=function(e){return A(O(e))};var L=v.paragraph;v.paragraph=function(e){return L(O(e))};var D=v.tablecell;v.tablecell=function(e,t){return D(O(e),t)},v.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"

".concat(e,"

"):'
').concat(n?e:Object(p.escape)(e,!0),"
\n"):'
'+(n?e:Object(p.escape)(e,!0))+"
"},v.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:r,level:t,text:e}),"'+e+""},f.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),f.a.use({tokenizer:E,renderer:v});var I=f.a,R=(n("SJMd"),n("ulZh")),M=n.n(R),N=n("m3rI"),j=n("Oy/b"),P=n("p5ED"),B=n("ErOA"),F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function U(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function H(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function z(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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 r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'',"render"),this.addActionButton(r,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),Z=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new $("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new $("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new $("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new $("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new $("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new $("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new $("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new $("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new $("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new Y("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,o;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:t.toolboxButtonStyleColorsClass.name))}))},e}(),Q=function(e,t){this.title=e,this.icon=t},ee=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=r,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=r-2+"px",o.style.height=r-2+"px",o.style.backgroundColor=e,o.style.borderRadius=r/2+"px","transparent"===e&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='\n \n '),i.appendChild(o),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(Q),te=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),ne=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),re=function(){function e(){this.GRIP_SIZE=10,this.visual=V.createGroup(),this.visual.appendChild(V.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(V.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),ie=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),oe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(V.createTransform()),i.setupControlBox(),i}return U(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=V.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=V.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup();var e=V.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=V.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=V.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 ne,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},t.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,o=this.height+this.CB_DISTANCE-e/2,a=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,a,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,o),this.positionGrip(this.controlGrips.bottomCenter.visual,r,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ie.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ie.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ie.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(te),ae=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&V.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&V.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&V.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&V.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(oe),se=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=r,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),r.appendChild(o),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(Q),le=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=r,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var o='\n \n ";i.innerHTML=o,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(Q),ce=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='',t}(ae),ue=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},he=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return U(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=V.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new re;return e.visual.transform.baseVal.appendItem(V.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(te),de=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorLine=V.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()),V.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='',t}(he),fe=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=r,o.setCurrentFont=o.setCurrentFont.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(o),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(Q),pe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="your text here",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return U(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.bgRectangle=V.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=V.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.textElement.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=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(t){e.textElement.appendChild(V.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=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(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&V.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&V.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='',t}(oe),me=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new ee("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.drawingImage=V.createImage(),this.visual.appendChild(this.drawingImage);var e=V.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),V.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],o=t[3],a=!1,s=0;s0&&(a=!0,so&&(o=s),l>i&&(i=l));if(a){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(o-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=o-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,o-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){V.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),V.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='',t}(oe),ge=function(e){function t(t,n,r){var i=e.call(this,t,r||'')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){e.setCurrentType(i,o)})),t.appendChild(o),"both"===i||"start"===i){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='\n \n ',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",o.appendChild(c)}r.typeBoxes.push(o)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(Q),ve=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new ge("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.prototype.createTips=function(){this.arrow1=V.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=V.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(V.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",V.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),V.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='',t}(de),ye=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new ee("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='',t}(ae),be=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=r,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return U(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(Q),xe=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new ee("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new be("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return U(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&V.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='',t}(ye),we='',Ee=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new ee("Text color",r.defaultColorSet,i.color,''),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new ee("Fill color",r.defaultColorSet,i.bgColor,we),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new fe("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new re,i.tipGrip.visual.transform.baseVal.appendItem(V.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return U(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){V.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=V.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(V.setAttributes(this.bgRectangle,[["fill",e]]),V.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var r=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?r.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='',t}(de),ke=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return U(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='',t}(Se),_e=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),Te=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new ee("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new se("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new le("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return U(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=V.createGroup(),this.selectorCurve=V.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=V.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),V.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),V.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),V.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=V.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=V.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='',t}(he),Oe=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Ae=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return U(t,e),t}(Oe),Le=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return U(t,e),t}(Oe),De=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Ie=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ue,this._isOpen=!1,this.undoRedoManager=new _e,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 De,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new X(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,ke,Se,xe,Ee,Ce,ye,de,Te]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,Se,xe,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,me,ve,pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),W.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==q.styleSheetRoot&&(this.styles.styleSheetRoot=q.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new Oe(e))}))},e.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new K).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new Oe(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new Oe(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new Le(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new Le(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new Le(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(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=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){W.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new Oe(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new Oe(e))})))},e.instanceCounter=0,e}(),Re=function(e,t){return(Re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; /* ********************************** 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. ***************************************************************************** */function Me(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Re(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ne(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function je(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t>0){var n=new qe(e,t),r=n.ratio>=1?20:n.getHorizontalLength(20),i=n.ratio<1?20:n.getVerticalLength(20),o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(o);var a=Be.createDefs();o.appendChild(a);var s=Be.createElement("clipPath",[["id","text-bg-clip"]]);a.appendChild(s);var l=Be.createPath(Be.getHollowRectanglePath((24-r)/2,(24-i)/2,r,i,(24-r)/2+2,(24-i)/2+2,r-4,i-4));o.appendChild(l);var c=Be.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);c.appendChild(Be.createTSpan(e+":"+t)),o.appendChild(c);var u=c.getBBox();Be.setAttributes(c,[["x",((24-u.width)/2).toString()],["y",((24-u.height)/2-u.y).toString()]]);var h=Be.createPath(Be.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(u.width))/2,(24-Math.ceil(u.height))/2,Math.ceil(u.width),Math.ceil(u.height)));return s.appendChild(h),Be.setAttributes(l,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(o),o.outerHTML}return''},e}(),Ye=function(e){function t(t,n,r){var i=e.call(this,t,n)||this;return i.isDropdownOpen=!1,i.onClick=i.dropdownButtonClicked,i.dropdownButtons=r,i}return Me(t,e),t.prototype.setupDropdown=function(){var e=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach((function(t){t.className=e.className,t.colorsClassName=e.colorsClassName,e.dropdownBlock.appendChild(t.getUI())})),this.uiContainer.appendChild(this.dropdownBlock)},t.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},t.prototype.dropdownButtonClicked=function(){void 0===this.dropdownBlock&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},t.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},t.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},t.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},t}(We),$e=function(){function e(e,t){this.GRIP_SIZE=10,this.color=e,this.fillColor=t,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e.prototype.setCenter=function(e,t){this.visual.childNodes.forEach((function(n){return Be.setAttributes(n,[["cx",e.toString()],["cy",t.toString()]])}))},e}(),Je=function(){function e(e,t,n,r){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=e,this.canvasHeight=t,this.margin=n,this.container=r,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(e.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(e){this._aspectRatio=e,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.gridContainer&&Be.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),e.prototype.open=function(){var e=this;this.cropShadeElement=Be.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Be.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var t=0;tthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-t.height/2),Be.setAttributes(this.cropRectElement,[["x",t.x.toString()],["y",t.y.toString()],["width",t.width.toString()],["height",t.height.toString()]]);var n=t.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach((function(e,r){var i=t.y+n*(r+1);Be.setAttributes(e,[["x1",""+t.x],["y1",""+i],["x2",""+(t.x+t.width)],["y2",""+i]])}));var r=t.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach((function(e,n){var i=t.x+r*(n+1);Be.setAttributes(e,[["x1",""+i],["y1",""+t.y],["x2",""+i],["y2",""+(t.y+t.height)]])})),Be.setAttributes(this.cropShadeElement,[["d",Be.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,t.x,t.y,t.width,t.height)]]),this.topLeftGrip.setCenter(t.x,t.y),this.topRightGrip.setCenter(t.x+t.width,t.y),this.bottomLeftGrip.setCenter(t.x,t.y+t.height),this.bottomRightGrip.setCenter(t.x+t.width,t.y+t.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},e.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)},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.container.getBoundingClientRect();return{x:e-n.left+this.margin,y:t-n.top+this.margin}},e.prototype.onPointerDown=function(e){this.container.setPointerCapture(e.pointerId),this.previousPoint=this.clientToLocalCoordinates(e.clientX,e.clientY),this.cropRectElement===e.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(e.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(e.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(e.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(e.target)&&(this.activeGrip=this.bottomRightGrip)},e.prototype.onPointerMove=function(e){if(this.isMoving)this.move(this.clientToLocalCoordinates(e.clientX,e.clientY));else if(this.activeGrip){var t=this.clientToLocalCoordinates(e.clientX,e.clientY);this.resize(t)}e.preventDefault()},e.prototype.onPointerUp=function(e){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(e.pointerId)},e.prototype.move=function(e){var t=e.x-this.previousPoint.x,n=e.y-this.previousPoint.y;1!==this.zoomFactor&&(t=-t/this.zoomFactor,n=-n/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+t),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+n),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=e},e.prototype.resize=function(e){var t=Object.assign({},this.cropRect),n=e.x-this.previousPoint.x,r=e.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:t.x+nthis.canvasWidth*this.zoomFactor&&(n=this.canvasWidth*this.zoomFactor-t.width),t.width+=n}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(t.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(n),t.height=this.aspectRatio.getVerticalLength(t.width)):(t.y+=r,t.height=this.cropRect.y+this.cropRect.height-t.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?t.height=this.aspectRatio.getVerticalLength(t.width):t.height+=r}t.width<10&&(t.x=this.cropRect.x,t.width=10),t.height<10&&(t.y=this.cropRect.y,t.height=10),this.previousPoint=e,t.x>=this.margin&&t.y>=this.margin&&t.x-this.margin+t.width<=this.canvasWidth&&t.y-this.margin+t.height<=this.canvasHeight&&(this.cropRect=t,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},e.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var e=this.cropRect.x+this.cropRect.width/2,t=this.cropRect.y+this.cropRect.height/2,n=this.aspectRatio.getHorizontalLength(this.cropRect.height),r=this.aspectRatio.getVerticalLength(this.cropRect.width);n/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=e-this.cropRect.width/2,this.cropRect.y=t-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)}},e.prototype.getRescaledRect=function(e,t,n,r,i,o){var a=n/e,s=r/t;return{x:(i.x-o)*a+o,y:(i.y-o)*s+o,width:i.width*a,height:i.height*s}},e.prototype.scaleCanvas=function(e,t){var n=this.getRescaledRect(this.canvasWidth,this.canvasHeight,e,t,this.cropRect,this.margin);this.canvasWidth=e,this.canvasHeight=t,this.onCropChange&&this.onCropChange(n),this.setCropRectangle(n)},e}(),Ze=function(){function e(e){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=e,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(e.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),e.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},e.prototype.onPointerDown=function(e){this.controlContainer.setPointerCapture(e.pointerId),this.isDragging=!0,this.previousPoint={x:e.clientX,y:e.clientY}},e.prototype.onPointerMove=function(e){this.isDragging&&(this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.previousPoint.x=e.clientX)},e.prototype.onPointerUp=function(e){this.isDragging&&this.onAngleChange&&this.onAngleChange((e.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(e.pointerId)},e.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var e=this.angleLabelText.getBBox();Be.setAttributes(this.angleLabelElement,[["x",((this.width-e.width)/2).toString()],["y",(this.height/2).toString()]])}},e.prototype.positionScaleShape=function(){if(this.scaleShape){var e=this.scaleShape.transform.baseVal.getItem(0);e.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(e,0)}},e.prototype.getVisual=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("width",this.width+"px"),e.setAttribute("height",this.height+"px"),e.setAttribute("viewBox","0 0 "+this.width+" "+this.height),e.style.flexShrink="0",document.body.appendChild(e);for(var t="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,n=1;n<=this.width/5+10;n++){var r=n%5==0?this.height/3:this.height/6;t+="h4v"+-r+"h1v"+r}t+="v1H0Z",this.scaleShape=Be.createPath(t);var i=Be.createTransform();this.scaleShape.transform.baseVal.appendItem(i),e.appendChild(this.scaleShape),this.angleLabelElement=Be.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Be.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var o=Be.createTSpan("");return o.innerHTML="°",this.angleLabelElement.appendChild(o),e.appendChild(this.angleLabelElement),document.body.removeChild(e),e},e}(),Qe=function(){function e(){this.naturalSize=!1,this.imageType="image/png"}return e.prototype.rasterize=function(e,t,n,r,i,o,a){var s=this;return new Promise((function(l){var c=document.createElement("canvas");c.width=e.width.baseVal.value-2*r,c.height=e.height.baseVal.value-2*r;var u=1,h=1;!0===s.naturalSize?(u=t.naturalWidth/(e.width.baseVal.value-2*r)/o,h=t.naturalHeight/(e.height.baseVal.value-2*r)/a,c.width=t.naturalWidth/o,c.height=t.naturalHeight/a):void 0!==s.width&&void 0!==s.height&&(u=s.width/n.width,h=s.height/n.height,c.width*=u,c.height*=h);var d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(i*Math.PI/180),d.scale(o,a),d.translate(-c.width/2,-c.height/2),d.drawImage(t,0,0,c.width,c.height);var f=document.createElement("canvas");f.width=n.width*u,f.height=n.height*h,f.getContext("2d").putImageData(d.getImageData((n.x-r)*u,(n.y-r)*h,n.width*u,n.height*h),0,0),l(f.toDataURL(s.imageType,s.imageQuality))}))},e}(),et=function(){function e(t){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=e.instanceCounter++,this.styles=new Fe(this.instanceNo),this.target=t,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(e){this._zoomToCropEnabled=e,e?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(e){this._isGridVisible=e,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gridLines",{get:function(){return this._gridLines},set:function(e){this._gridLines=e,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(e){this._rotationAngle=e,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"aspectRatio",{get:function(){var e;return null!==(e=this._aspectRatio)&&void 0!==e?e:this.aspectRatios[0]},set:function(e){this._aspectRatio=e},enumerable:!1,configurable:!0}),e.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(),"popup"===this.displayMode&&this.onPopupResize(),this._isOpen=!0},e.prototype.show=function(){this.showUI(),this.open()},e.prototype.close=function(e){void 0===e&&(e=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),"popup"===this.displayMode&&window.removeEventListener("resize",this.setWindowHeight),e||this.closeEventListeners.forEach((function(e){return e()})),this._isOpen=!1)},e.prototype.addRenderEventListener=function(e){this.renderEventListeners.push(e)},e.prototype.removeRenderEventListener=function(e){this.renderEventListeners.indexOf(e)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(e),1)},e.prototype.addCloseEventListener=function(e){this.closeEventListeners.push(e)},e.prototype.removeCloseEventListener=function(e){this.closeEventListeners.indexOf(e)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(e),1)},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.contentDiv.clientWidth/e>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*e:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,n=t+2*this.CANVAS_MARGINe+this.CANVAS_MARGIN?this.target.offsetTop-(e+this.CANVAS_MARGIN):0;this.coverDiv.style.top=t+"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=void 0!==this.styles.settings.zIndex?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=void 0!==this.styles.settings.zIndex?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="popup"===this.displayMode?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,"popup"===this.displayMode&&(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","popup"===this.displayMode&&(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},e.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},e.prototype.addTopToolbar=function(){var e=this;this.topToolbar=new ze,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 t=new Ve;t.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(t);var n=[];this.aspectRatios.forEach((function(t){var r=new We(Xe.getIcon(t.horizontal,t.vertical),0===t.horizontal&&0===t.vertical?"FREE":t.horizontal+":"+t.vertical);r.onClick=function(){return e.ratioButtonClicked(t)},n.push(r)})),this.aspectRatioButton=new Ye(Xe.getIcon(0,0),"Aspect ratio",n),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,t.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var r=new We('',"Toggle grid");r.isActive=this.isGridVisible,r.onClick=function(){e.isGridVisible=!e.isGridVisible,r.isActive=e.isGridVisible},t.addButton(r);var i=new We('',"Zoom to selection");if(i.isActive=this.zoomToCropEnabled,i.onClick=function(){e.zoomToCropEnabled=!e.zoomToCropEnabled,i.isActive=e.zoomToCropEnabled},t.addButton(i),!Pe.isLicensed){var o=new Ke;this.topToolbar.addElementBlock(o);var a=document.createElement("div");a.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var s=document.createElement("a");s.style.color="currentColor",s.href="https://markerjs.com/products/cropro",s.target="_blank",s.innerHTML='',a.appendChild(s),o.addElement(a)}var l=new Ve;l.minWidth=3*this.toolbarHeight+"px",l.contentAlign="end",this.topToolbar.addButtonBlock(l);var c=new We('',"OK");c.onClick=this.startRenderAndClose,l.addButton(c),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(c.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var u=new We('',"Close");u.onClick=this.close,l.addButton(u),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(u.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},e.prototype.addBottomToolbar=function(){var e=this;this.bottomToolbar=new ze,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 t=new Ve;t.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(t);var n=new We('',"Rotate left");n.onClick=this.rotateLeftButtonClicked,t.addButton(n);var r=new We('',"Rotate right");r.onClick=this.rotateRightButtonClicked,t.addButton(r);var i=new Ke;i.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(i),this.straightener=new Ze("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(t){e.rotateBy(t),e.straightener.angle=e.rotationAngle},i.addElement(this.straightener.getUI());var o=new Ve;o.minWidth=2*this.toolbarHeight+"px",o.contentAlign="end",this.bottomToolbar.addButtonBlock(o);var a=new We('',"Flip horizontal");a.onClick=this.flipHorizontallyButtonClicked,o.addButton(a);var s=new We('',"Flip vertical");s.onClick=this.flipVerticallyButtonClicked,o.addButton(s)},e.prototype.ratioButtonClicked=function(e){this.aspectRatio=e,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},e.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Xe.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},e.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&0!==this.aspectRatio.horizontal&&0!==this.aspectRatio.vertical?this.cropLayer.aspectRatio=new qe(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},e.prototype.closeUI=function(){"popup"===this.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},e.prototype.restoreState=function(e){if(e){var t=this.cropLayer.getRescaledRect(e.width,e.height,this.imageWidth,this.imageHeight,e.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(t),this.cropRectChanged(t),this.flippedHorizontally=e.flippedHorizontally,this.flippedVertically=e.flippedVertically,this.applyFlip(),this.rotationAngle=e.rotationAngle,this.applyRotation()}},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.cropImage.getBoundingClientRect();return{x:e-n.left,y:t-n.top}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var e=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.rotateLeftButtonClicked=function(){var e=this.rotationAngle-90;this.rotationAngle%90!=0&&(e+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateRightButtonClicked=function(){var e=this.rotationAngle+90;this.rotationAngle%90!=0&&(e-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(e)},e.prototype.rotateTo=function(e){e=(e=e>180?e-360:e)<=-180?e+360:e,this.rotationAngle=e,this.applyRotation()},e.prototype.rotateBy=function(e){this.rotateTo((this.rotationAngle+e)%360)},e.prototype.applyRotation=function(){var e=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var t=this.editingTargetRotationContainer.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(t,0);var n=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/n.width,this.imageHeight/n.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=e},e.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},e.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},e.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},e.prototype.startRenderAndClose=function(){return Ne(this,void 0,void 0,(function(){var e,t;return je(this,(function(n){switch(n.label){case 0:return[4,this.render()];case 1:return e=n.sent(),t=this.getState(),this.renderEventListeners.forEach((function(n){return n(e,t)})),this.close(!0),[2]}}))}))},e.prototype.render=function(){return Ne(this,void 0,void 0,(function(){var e;return je(this,(function(t){switch(t.label){case 0:return(e=new Qe).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.width=this.renderWidth,e.height=this.renderHeight,this.unzoomFromCrop(),Be.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,e.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 t.sent(),[4,e.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,t.sent()]}}))}))},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new He("toolbar","\n width: "+("inline"===this.displayMode?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+";\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.toolbarHeight+"px;\n box-sizing: content-box;\n overflow: hidden;\n line-height: 0px;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new He("toolbar_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new He("toolbar-block","\n display: flex;\n align-items: center;\n box-sizing: content-box;\n "));var e=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new He("toolbar_button","\n display: inline-block;\n width: "+(this.toolbarHeight-2*e)+"px;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new He("toolbar_button_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new He("toolbar_active_button","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n background-color: "+this.styles.settings.toolbarBackgroundActiveColor+"\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.toolbarHeight/2+"px;\n ")),this.styles.addRule(new Ue("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.styles.settings.toolbarBackgroundHoverColor+"\n ")),this.toolbarDropdownStyleClass=this.styles.addClass(new He("toolbar_dropdown","\n position: absolute;\n max-width: "+4*this.toolbarHeight+"px;\n z-index: 20;\n white-space: normal;\n box-sizing: content-box;\n box-shadow: 3px 3px rgba(33, 33, 33, 0.1);\n margin: "+("inline"===this.displayMode?"0":this.popupMargin)+"px;\n line-height: 0px;\n ")),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new He("toolbar_dropdown_colors","\n background-color: "+this.styles.settings.toolbarBackgroundColor+";\n ")),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new He("toolbar_straightener_block","\n display: flex;\n overflow: hidden;\n justify-content: center;\n -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%);\n ")),this.toolbarStraightenerStyleClass=this.styles.addClass(new He("toolbar_straightener","\n display: flex;\n overflow: hidden;\n justify-content: center;\n height: "+(this.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n cursor: default;\n user-select: none;\n box-sizing: content-box;\n ")),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new He("toolbar_straightener_colors","\n color: "+this.styles.settings.toolbarColor+";\n fill: currentColor;\n "))},e.instanceCounter=0,e}(),tt=n("8hTe"),nt=n.n(tt),rt=/]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,l=e.edit,d=void 0!==l&&l,f=e.className,p=e.showTextOnly,m=e.showLines,g=e.replaces,v=e.zoomImg,y=e.hasMask,E=e.style,S=void 0===E?{}:E,C=e.stylesPrev,k=void 0===C?{}:C,O=String(n),A=Object(u.useRef)(),L=Object(u.useRef)(),D=Object(u.useState)(""),R=Object(s.a)(D,2),F=R[0],U=R[1],H=Object(u.useState)("office"),z=Object(s.a)(H,2),G=z[0],V=z[1],W=Object(u.useMemo)((function(){try{O=(O=O.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+N.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+N.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+N.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,"\n")).replace(new RegExp("(?[TOC]

",w()),b()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,o=r.expression;return Object(j.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),T(),p){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return X()}),500),e}),[O]),K=Object(u.useRef)();function q(e){var t=e.target;if("IMG"===t.tagName.toUpperCase()){if(v){var n=t.getAttribute("src");U(n),V("image")}}else if("A"===t.tagName.toUpperCase()){var r=t.getAttribute("href");if(r.indexOf("office")>-1)e.preventDefault(),U(r),V("office");else if(r.indexOf("application/pdf")>-1)e.preventDefault(),U(r),V("pdf");else if(r.indexOf("type=text")>-1)e.preventDefault(),U(r),V("html");else if(r.startsWith("#")){e.preventDefault();var i=document.getElementById(r.replace("#",""));i&&i.scrollIntoView(!0)}}}x.WebkitLineClamp=m,m&&(S=Object(o.a)(Object(o.a)({},S),x));var X=function(){var e,t=null===(e=K.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(M.a.isSupported()){var t=new M.a;t.loadSource(e.src),t.attachMedia(e)}}))};Object(u.useEffect)((function(){if(K.current&&W&&W.match(rt)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",q),function(){K.current.removeEventListener("click",q),T(),b()}}),[W,K.current,q]);return h.a.createElement("div",{style:{position:"relative"}},h.a.createElement("div",{ref:K,style:Object(o.a)({},S),className:"".concat(f||""," markdown-body ").concat(nt.a.mdBody),onMouseOver:function(e){d&&("IMG"===e.target.nodeName?(A.current.style.display="flex",A.current.style.width=e.target.clientWidth+"px",A.current.style.height=e.target.clientHeight+"px",A.current.style.top=e.target.offsetTop+"px",A.current.style.left=e.target.offsetLeft+"px",L.current.src=e.target.getAttribute("src")):A.current.style.display="none")},dangerouslySetInnerHTML:{__html:W}}),h.a.createElement("div",{ref:A,className:nt.a.button},h.a.createElement(r.a,null,h.a.createElement(i.a,{onClick:function(){return(e=new et(L.current)).displayMode="popup",e.addRenderEventListener(function(){var e=Object(a.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A.current.style.display="none",e.next=3,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t}});case 3:null!=(n=e.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),void e.show();var e}},"裁剪"),h.a.createElement(i.a,{onClick:function(){return(e=new Ie(L.current)).settings.displayMode="popup",e.addEventListener("render",function(){var e=Object(a.a)(c.a.mark((function e(t){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A.current.style.display="none",!L.current){e.next=6;break}return e.next=4,Object(B.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:t.dataUrl}});case 4:null!=(n=e.sent)&&n.id&&g(L.current.getAttribute("src").replace(N.a.API_SERVER,""),"/api/attachments/".concat(null==n?void 0:n.id,"?type=").concat(n.content_type));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.show(),void(window.markerArea=e);var e}},"编辑"))),h.a.createElement("img",{ref:L,src:"https://ali-cdn.educoder.net/images/avatars/PortalImage/170?t=1659681136",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),h.a.createElement(P.a,{close:!0,data:F,hasMask:y,type:null!=F&&F.length?G:"",style:Object(o.a)({},k),onClose:function(){return U("")}}))}},"9OqN": /*!********************************************!*\ !*** ./node_modules/crypto-js/mode-ctr.js ***! \********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var o,a=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(a.nonce=null===(o=n.csp)||void 0===o?void 0:o.nonce);a.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(a):n.prepend&&l?s.insertBefore(a,l):s.appendChild(a),a}var a=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!a.has(r)){var s=o("",n),l=s.parentNode;a.set(r,l),l.removeChild(s)}var c=Array.from(a.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,h,d;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(h=n.csp)||void 0===h?void 0:h.nonce))c.nonce=null===(d=n.csp)||void 0===d?void 0:d.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var f=o(e,n);return f["rc-util-key"]=t,f}},Bd2K: /*!********************************************************!*\ !*** ./node_modules/codemirror/addon/edit/closetag.js ***! \********************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(a,s,l){if(l!=e.Init&&l&&a.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var a=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cu.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&p.close||h.string.indexOf("/")==u.ch-h.start-1||v&&i(v,b)>-1||o(r,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&i(x,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var w=y&&i(y,b)>-1;s[c]={indent:w,text:">"+(w?"\n\n":"")+"",newPos:w?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var E="object"==typeof l&&l.dontIndentOnAutoClose;for(c=a.length-1;c>=0;c--){var S=s[c];r.replaceRange(S.text,a[c].head,a[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:S.newPos,anchor:S.newPos},r.setSelections(C),!E&&S.indent&&(r.indentLine(S.newPos.line,null,!0),r.indentLine(S.newPos.line+1,null,!0))}}(r)}),a.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(t,n){for(var r=t.listSelections(),i=[],a=n?"/":""!=t.getLine(u.line).charAt(h.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var i=null;e.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+t," ").concat(r+t,"h").concat(a-i,"v1H").concat(i+t,"z")),void(i=null);if(a!==e.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(i+t,",").concat(r+t," h").concat(a+1-i,"v1H").concat(i+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n=t.y+t.h?e:e.map((function(e,n){return(n=t.x+t.w)&&e}))}))}function C(e,t){var n=e.imageSettings,r=e.size,i=e.includeMargin;if(null==n)return null;var o=i?4:0,a=t.length+2*o,s=Math.floor(.1*r),l=a/r,c=(n.width||s)*l,u=(n.height||s)*l,h=null==n.x?t.length/2-c/2:n.x*l,d=null==n.y?t.length/2-u/2:n.y*l,f=null;if(n.excavate){var p=Math.floor(h),m=Math.floor(d);f={x:p,y:m,w:Math.ceil(c+h-p),h:Math.ceil(u+d-m)}}return{x:h,y:d,h:u,w:c,excavation:f}}var k=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),_=function(e){function t(){var e,n;l(this,t);for(var r=arguments.length,i=new Array(r),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.exports={defaults:{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},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g,f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=x(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function x(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,o,a,s,l,c=t[0],u=t[2],h=u.length>1,d=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,g=p.length,v=0;v1||this.options.smartLists&&i!==u)&&(o=p.slice(v+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),v=g-1)),a=m||/\n\n(?!\s*$)/.test(n),v!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):M(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):M(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=N(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return j(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return j(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=M(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=M(this.options.mangle?t(i[1]):i[1])):n=M(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=M(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=M(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):M(i[0]):i[0]:M(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),B=k,F=S,U=_,H={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]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=F(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,H.item=F(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.list=F(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=//,H.html=F(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=F(H._paragraph).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=F(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.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*|$)"}),H.gfm.nptable=F(H.gfm.nptable).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=F(H.gfm.table).replace("hr",H.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",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:F("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:F(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^|^<[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:B,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};z.punctuation=F(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=F(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=F(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=F(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=F(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=F(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=F(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=F(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=F(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=F(z._blockSkip,"g").getRegex(),z.overlapSkip=F(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._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])?)+(?![-_])/,z.autolink=F(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=F(z.tag).replace("comment",H._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=F(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=F(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=F(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=U({},z),z.pedantic=U({},z.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:F(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:F(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=U({},z.normal,{escape:F(z.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&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Y=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||V,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:W.normal,inline:K.normal};this.options.pedantic?(t.block=W.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=W.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,r))e=e.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.autolink(e,X))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,X))){if(o=this.tokenizer.inlineText(e,r,q))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,i=[{key:"rules",get:function(){return{block:W,inline:K}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),$=r.defaults,J=C,Z=w,Q=function(){function e(e){this.options=e||$}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
'+(n?e:Z(e,!0))+"
\n":"
"+(n?e:Z(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=E,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,b,x="",w=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,p),u+=this.renderer.listitem(m,y,v);x+=this.renderer.list(u,d,f);continue;case"html":x+=this.renderer.html(h.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+se(e.message+"",!0)+"
    ";throw e}}return he.options=he.setOptions=function(e){return oe(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=oe({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Q,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)},ELLl: /*!*************************************************************!*\ !*** ./node_modules/codemirror/addon/edit/closebrackets.js ***! \*************************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),a=t.listSelections(),c=0;c=0;c--){var h=a[c].head;t.replaceRange("",n(h.line,h.ch-1),n(h.line,h.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a1&&d.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;v="addFour"}else if(f){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;v="both"}else{if(!m||!(0===x.length||/\s/.test(x)||h.indexOf(x)>-1))return e.Pass;v="both"}else v=f&&c(t,b)?"both":d.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=v)return e.Pass}else u=v}var E=l%2?a.charAt(l-1):i,S=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r0,{anchor:new n(o.anchor.line,o.anchor.ch+(a?-1:1)),head:new n(o.head.line,o.head.ch+(a?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(E+S,null),t.triggerElectric(E+S),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(E+E+E+E,"before"),t.execCommand("goCharRight"));var o,a}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},ELcG: /*!*********************************************!*\ !*** ./node_modules/crypto-js/ripemd160.js ***! \*********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"), /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,f,x,w,E,S,C,k,_,T,O=this._hash.words,A=h.words,L=d.words,D=s.words,I=l.words,R=c.words,M=u.words;for(E=o=O[0],S=a=O[1],C=f=O[2],k=x=O[3],_=w=O[4],n=0;n<80;n+=1)T=o+e[t+D[n]]|0,T+=n<16?p(a,f,x)+A[0]:n<32?m(a,f,x)+A[1]:n<48?g(a,f,x)+A[2]:n<64?v(a,f,x)+A[3]:y(a,f,x)+A[4],T=(T=b(T|=0,R[n]))+w|0,o=w,w=x,x=b(f,10),f=a,a=T,T=E+e[t+I[n]]|0,T+=n<16?y(S,C,k)+L[0]:n<32?v(S,C,k)+L[1]:n<48?g(S,C,k)+L[2]:n<64?m(S,C,k)+L[3]:p(S,C,k)+L[4],T=(T=b(T|=0,M[n]))+_|0,E=_,_=k,k=b(C,10),C=S,S=T;T=O[1]+f+k|0,O[1]=O[2]+x+_|0,O[2]=O[3]+w+E|0,O[3]=O[4]+o+S|0,O[4]=O[0]+a+C|0,O[0]=T},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function m(e,t,n){return e&t|~e&n}function g(e,t,n){return(e|~t)^n}function v(e,t,n){return e&n|t&~n}function y(e,t,n){return e^(t|~n)}function b(e,t){return e<>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(Math),r.RIPEMD160)},ETIr: /*!**********************************************!*\ !*** ./node_modules/crypto-js/enc-base64.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-a%4*2,c=s|l;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"F+F2": /*!***************************************************!*\ !*** ./node_modules/crypto-js/lib-typedarrays.js ***! \***************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),r.lib.WordArray)},GRO8: /*!**************************************************************!*\ !*** ./src/pages/Competitions/Detail/index.tsx + 21 modules ***! \**************************************************************/ /*! exports provided: default */ /*! all exports used */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/InboxOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/LeftOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/RightOutlined.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/component/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Detail/index.less?modules (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/AuthenticationModel/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/UploadFile/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/service/competitions.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/cityData.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/verifyLogin.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/account/auth.png (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/account/job.png (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/auto-complete/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/breadcrumb/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/card/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/card/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/carousel/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/carousel/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/cascader/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/divider/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/menu/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tabs/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/upload/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/md5/md5.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var r=n("k1fw"),i=(n("2qtc"),n("kLXV")),o=(n("lUTK"),n("BvKs")),a=(n("+L6B"),n("2/Rp")),s=(n("T2oS"),n("W9HT")),l=(n("sPJy"),n("bE4q")),c=(n("miYZ"),n("tsqr")),u=n("9og8"),h=n("tJVT"),d=n("PpiC"),f=n("WmNS"),p=n.n(f),m=n("q1tI"),g=n.n(m),v=n("Ty5D"),y=n("55Ip"),b=n("9kvl"),x=n("KeDT"),w=n.n(x),E=n("zrhs"),S=(n("DZo9"),n("8z0m")),C=n("LtfV"),k=n("KhGG"),_=S.a.Dragger,T=Object(b.a)((function(e){return{user:e.user,classroomList:e.classroomList,shixunsDetail:e.shixunsDetail}}))((function(e){var t=e.user,n=e.dispatch,r=(e.classroomList,e.shixunsDetail),o=e.getResults,a=(Object(v.i)(),Object(m.useState)()),s=Object(h.a)(a,2),l=(s[0],s[1],Object(m.useState)([])),d=Object(h.a)(l,2),f=d[0],y=d[1],b=Object(m.useState)(!1),x=Object(h.a)(b,2),w=x[0],E=x[1],S={onRemove:function(){y([])},beforeUpload:function(e){if(console.log(e),(null==e?void 0:e.size)>524288e3)return c.b.info("文件超过500M,不符合上传要求"),!1;var t=[];return t.push(e),y([].concat(t)),!1},fileList:f};return g.a.createElement(i.a,{title:"提交文件",visible:"md-tab"===r.actionTabs.key,confirmLoading:w,onOk:Object(u.a)(p.a.mark((function e(){var i,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==f?void 0:f.length)<=0)){e.next=3;break}return c.b.info("请先选择文件"),e.abrupt("return");case 3:return E(!0),e.next=6,Object(k.c)(f[0],{login:null===(i=t.userInfo)||void 0===i?void 0:i.login,container_type:"Competition",container_id:r.actionTabs.params.id,stage_type:r.actionTabs.params.value,file_name:null===(a=f[0])||void 0===a?void 0:a.name});case 6:0===(null==(s=e.sent)?void 0:s.status)?(c.b.info("提交成功"),n({type:"shixunsDetail/setActionTabs",payload:{key:""}}),E(!1),y([]),o(r.actionTabs.params.value)):(E(!1),c.b.info("提交失败"));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){y([]),n({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},g.a.createElement(_,S,g.a.createElement("p",{className:"ant-upload-drag-icon"},g.a.createElement(C.a,null)),g.a.createElement("p",{className:"ant-upload-hint"},"拖拽文件或者点击上传")))})),O=(n("14J3"),n("BMrR")),A=(n("5NDa"),n("5rEg")),L=n("9Bee"),D=n("m3rI"),I=n("ErOA"),R=n("NLgs"),M=(n("fV52"),n("3I+P")),N=(n("OaEy"),n("2fM7")),j=n("5bA4"),P=n("UESt"),B=N.a.Option;var F=function(e){var t=e.rewarddata,n=e.getlistdatas,r=e.is_signed,o=e.dispatch,a=e.userlist,s=Object(m.useRef)(null),l=Object(m.useState)(!1),d=Object(h.a)(l,2),f=d[0],v=d[1],y=Object(m.useState)(void 0),b=Object(h.a)(y,2),x=b[0],E=b[1],S=Object(m.useState)(""),C=Object(h.a)(S,2),k=C[0],_=C[1],T=Object(m.useState)(void 0),O=Object(h.a)(T,2),L=O[0],I=O[1],F=Object(m.useState)(void 0),U=Object(h.a)(F,2),H=U[0],z=U[1],G=Object(m.useState)(void 0),V=Object(h.a)(G,2),W=V[0],K=V[1];function q(e){return X.apply(this,arguments)}function X(){return(X=Object(u.a)(p.a.mark((function e(t){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.user_received){e.next=3;break}return window.open(t.click_info),e.abrupt("return");case 3:if(Object(R.f)(o)){e.next=5;break}return e.abrupt("return");case 5:if(!1!==r){e.next=8;break}return c.b.info("您尚未报名参赛,请报名参赛后领取"),e.abrupt("return");case 8:if("Pop"!==t.click_event){e.next=14;break}return _(t.id),v(!0),e.abrupt("return");case 14:E(void 0);case 15:return e.next=17,o({type:"competitions/Reward",payload:{competition_module_setting_id:t.id}});case 17:(i=e.sent)&&0===i.status&&(n(),"Link"===t.click_event?(c.b.info("领取成功"),window.open(t.click_info)):c.b.info(t.click_info));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(){return(Y=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a||a.real_name){e.next=4;break}if(L){e.next=4;break}return c.b.info("姓名不能为空"),e.abrupt("return");case 4:if(!a||a.email){e.next=8;break}if(H){e.next=8;break}return c.b.info("邮箱不能为空"),e.abrupt("return");case 8:if(!a||a.phone){e.next=12;break}if(W){e.next=12;break}return c.b.info("手机号码不能为空"),e.abrupt("return");case 12:if(x){e.next=15;break}return c.b.info("请选择你的年级"),e.abrupt("return");case 15:return e.next=17,o({type:"competitions/Reward",payload:{competition_module_setting_id:k,className:x,name:L,mail:H,phone:W}});case 17:(t=e.sent)&&0===t.status&&(v(!1),n(),c.b.info("HCIA认证考试代金劵将由Educoder平台统一发放,请及时关注邮箱或站内短信查收"));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",null,g.a.createElement(i.a,{visible:f,title:"完善信息",onCancel:function(){return v(!1)},onOk:function(){!function(){Y.apply(this,arguments)}()}},g.a.createElement("p",null,"您的姓名:",g.a.createElement(A.a,{className:a&&a.real_name?"":w.a.bkfff,style:{width:"300px",marginLeft:"14px",background:a&&a.phone?"":"#ffffff!important"},value:a&&a.real_name||L,disabled:a&&a.real_name||!1,onChange:function(e){return I(e.target.value)}})),g.a.createElement("p",{style:{marginTop:"1em"}},"您的邮箱:",g.a.createElement(A.a,{className:a&&a.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:a&&a.phone?"":"#ffffff!important"},value:a&&a.email||H,disabled:a&&a.email||!1,onChange:function(e){return z(e.target.value)}})),g.a.createElement("p",{style:{marginTop:"1em"}},"您的手机号:",g.a.createElement(A.a,{style:{width:"300px"},className:a&&a.phone?"":"bkfff",value:a&&a.phone||W,disabled:a&&a.phone||!1,onChange:function(e){return K(e.target.value)}})),"您的年级:",g.a.createElement(N.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(e){E(e)}},g.a.createElement(B,{value:"大一"},"大一"),g.a.createElement(B,{value:"大二"},"大二"),g.a.createElement(B,{value:"大三"},"大三"),g.a.createElement(B,{value:"大四"},"大四"),g.a.createElement(B,{value:"大五"},"大五"),g.a.createElement(B,{value:"硕一"},"硕一"),g.a.createElement(B,{value:"硕二"},"硕二"),g.a.createElement(B,{value:"硕三"},"硕三"),g.a.createElement(B,{value:"博一"},"博一"),g.a.createElement(B,{value:"博二"},"博二"),g.a.createElement(B,{value:"博三"},"博三"),g.a.createElement(B,{value:"博四"},"博四"),g.a.createElement(B,{value:"博五"},"博五")),g.a.createElement("p",{style:{marginTop:"1em"}},"提醒:如无华为云账号,请尽快注册华为云!")),t&&t.length>3?g.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},g.a.createElement("span",{className:w.a.spanprev,onClick:function(){s.current.prev()}},g.a.createElement(j.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),g.a.createElement(M.a,{ref:s,className:w.a.divwidth,slidesToShow:3,slidesToScroll:1},t&&t.map((function(e,t){return g.a.createElement("div",{style:{textAlign:"center",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/".concat(e.image_url)}),!1===e.user_received||"Link"===e.click_event?g.a.createElement("p",{className:w.a.receiveclick,onClick:function(){return q(e)}},"点击领取"):g.a.createElement("p",{className:w.a.receivealready},"已经领取"))}))),g.a.createElement("span",{className:w.a.spannext,onClick:function(){s.current.next()}},g.a.createElement(P.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):g.a.createElement("div",{className:w.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},t&&t.map((function(e,t){return g.a.createElement("div",{style:{textAlign:"center",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/".concat(e.image_url)}),!1===e.user_received||"Link"===e.click_event?g.a.createElement("p",{className:w.a.receiveclick,onClick:function(){return q(e)}},"点击领取"):g.a.createElement("p",{className:w.a.receivealready},"已经领取"))}))))},U=function(e,t){var n=e.StaffDetail,o=e.HeaderDetail,s=e.ItemData,l=e.setIssee,d=e.ModelType,f=e.dispatch,y=e.userinfo,b=e.Editable,x=Object(m.useState)(!1),w=Object(h.a)(x,2),E=w[0],C=w[1],k=Object(m.useState)([]),_=Object(h.a)(k,2),T=_[0],M=_[1],N=Object(m.useState)(""),j=Object(h.a)(N,2),P=j[0],B=j[1],U=Object(m.useState)(""),H=Object(h.a)(U,2),z=H[0],G=H[1],V=Object(m.useState)(!1),W=Object(h.a)(V,2),K=W[0],q=W[1],X=Object(v.i)().identifier,Y=Object(m.useRef)(null),$=Object(m.useRef)(null);Y.current=null==n?void 0:n.enrolled,Object(m.useEffect)((function(){var e;return null===(e=$.current)||void 0===e||e.addEventListener("click",J),function(){var e;null===(e=$.current)||void 0===e||e.removeEventListener("click",J)}}),[]);var J=function(e){var t;if("modal-upload"===(null==e||null===(t=e.target)||void 0===t?void 0:t.id)){if(!Object(R.e)(f))return;if(!Y.current)return void i.a.info({title:"提示",centered:!0,okText:"我知道了",content:"请先报名,再提交作品"});C(!0)}};Object(m.useEffect)((function(){var e,t,n;null!=o&&o.upload_file&&(M([{name:null==o||null===(e=o.upload_file)||void 0===e?void 0:e.title,status:"done",uid:"123456789"}]),G(null==o?void 0:o.upload_file_url),B(null==o||null===(t=o.upload_file)||void 0===t||null===(n=t.url)||void 0===n?void 0:n.split("/")[3]))}),[null==o?void 0:o.upload_file]);var Z={name:"file",multiple:!1,withCredentials:!0,action:D.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:T,onChange:function(e){var t,n,i=e.file.status,o=[Object(r.a)({},e.file)];(M(o),"uploading"===e.file.status&&q(!0),"done"===i)&&(B(null===(t=o[0])||void 0===t||null===(n=t.response)||void 0===n?void 0:n.id),q(!1));"error"===i&&(M([]),q(!1))},beforeUpload:function(e){return e.size/1024/1024<1e3?Promise.resolve():(c.b.info("文件大小必须小于1000MB"),Promise.reject())}},Q=function(){C(!0)};return Object(m.useImperativeHandle)(t,(function(){return{handleVisible:Q}})),g.a.createElement("div",{ref:$},"reward"===d?g.a.createElement(F,{userlist:y,dispatch:f,rewarddata:s.reward_setting,is_signed:s.is_signed}):null,g.a.createElement("div",{style:{textAlign:"right"}},((null==y?void 0:y.admin)||(null==y?void 0:y.business)||b)&&g.a.createElement(a.a,{onClick:function(){return l(!1)}},"编辑")),g.a.createElement(L.a,{value:s.md_content}),s&&s.attachments&&s.attachments.map((function(e,t){return g.a.createElement("div",null,g.a.createElement("a",{href:(null===D.a||void 0===D.a?void 0:D.a.API_SERVER)+e.url,target:"_self",download:e.title},g.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),g.a.createElement("span",{style:{color:"#000000"}},e.title),g.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},e.filesize)))})),g.a.createElement(i.a,{centered:!0,title:"上传作品",visible:E,okText:"提交作品",cancelText:"取消",confirmLoading:K,onCancel:function(){return C(!1)},onOk:Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P||z){e.next=3;break}return C(!1),e.abrupt("return");case 3:return q(!0),e.next=6,Object(I.a)("/api/competitions/".concat(X,"/upload_file.json"),{method:"post",body:{attachment_id:P,upload_file_url:z}});case 6:0===e.sent.status&&(C(!1),q(!1));case 8:case"end":return e.stop()}}),e)})))},g.a.createElement("div",null,g.a.createElement(O.a,{align:"middle",className:"mb20"},g.a.createElement("span",null,"作品链接:"),g.a.createElement(A.a,{style:{width:416},value:z,onChange:function(e){var t;return G(null===(t=e.target)||void 0===t?void 0:t.value)}})),g.a.createElement(O.a,{align:"top"},g.a.createElement("span",{style:{lineHeight:"28px"}},"作品文件:"),g.a.createElement(S.a,Z,g.a.createElement(a.a,{type:"primary",className:"mb10"},"上传作品"))))))},H=Object(m.forwardRef)(U),z=n("Ot1p"),G=n("hJwl");var V=function(e){var t=e.ItemData,n=e.setIssee,r=e.MenuItem,i=e.dispatch,o=e.identifier,s=e.ModelType,l=e.userinfo,d=e.getrightdatas,f=Object(m.useState)([]),v=Object(h.a)(f,2),y=v[0],b=v[1],x=Object(m.useState)(t.md_content),w=Object(h.a)(x,2),E=w[0],C=w[1];Object(m.useEffect)((function(){var e,n=[];null==t||null===(e=t.attachments)||void 0===e||e.map((function(e){var t={uid:e.id,name:e.title,response:{id:e.id}};n.push(t)})),b(n)}),[null==t?void 0:t.attachments]);var k={name:"file",multiple:!0,withCredentials:!0,action:D.a.API_SERVER+"/api/attachments.json",defaultFileList:function(){var e,n=[];return null==t||null===(e=t.attachments)||void 0===e||e.map((function(e){var t={uid:null==e?void 0:e.id,name:e.title,response:{id:e.id}};n.push(t)})),n}(),onRemove:function(e){Object(G.t)({id:e.uid})},onChange:function(e){var t=e.file.status;"removed"===t&&b(e.fileList),"done"===t?(b(e.fileList),c.b.success("".concat(e.file.name," 文件上传成功"))):"error"===t&&c.b.error("".concat(e.file.name," 文件上传失败"))},beforeUpload:function(e){var t=e.size/1024/1024<150;return t||c.b.info("文件大小必须小于150MB"),t}};function _(){return(_=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"competitions/updateMdContent",payload:{attachment_ids:T(y),competition_module_id:t.id,md_content_id:t.md_id,content:E,identifier:o}});case 2:e.sent&&(c.b.info("提交成功"),n(!0),d(r));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){var t=[];return e&&e.map((function(e){t.push(e.response.id)})),t}return console.log(k),g.a.createElement("div",null,"reward"===s?g.a.createElement(F,{userlist:l,dispatch:i,rewarddata:t.reward_setting,is_signed:t.is_signed}):null,g.a.createElement(z.a,{defaultValue:E,onChange:function(e){return C(e)}}),g.a.createElement(S.a,k,g.a.createElement(a.a,{className:"uploadBtn"},"上传附件"),"(单个文件150M以内)"),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return _.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return n(!0)}},"取消")))},W=(n("g9YV"),n("wCAj")),K=(n("Znn+"),n("ZTPi"));var q=function(){return g.a.createElement("div",null,g.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"总排行"),g.a.createElement("div",{style:{textAlign:"center"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),g.a.createElement("p",null,"要抓住一切机会,向所有人证明自己,证明你能够迎接荣耀")))},X=(n("5Dmo"),n("3S7+")),Y=(n("jCWc"),n("kPKH")),$=(n("IzEo"),n("bx4M"));var J=function(e){var t=e.oneItem,n=e.towItem,r=e.threeItem;return g.a.createElement("div",{style:{textAlign:"center"}},g.a.createElement(O.a,{gutter:16,style:{justifyContent:"center"}},g.a.createElement(Y.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.towtop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==n?void 0:n.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==n?void 0:n.user_image)}),(null==n?void 0:n.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==n?void 0:n.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==n?void 0:n.record_user_name)))),className:w.a.towdiv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==n?void 0:n.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==n?void 0:n.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==n?void 0:n.extra_score)+parseFloat(null==n?void 0:n.score),"分"))),g.a.createElement(Y.a,{span:6},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.onetop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==t?void 0:t.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==t?void 0:t.user_image)}),(null==t?void 0:t.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==t?void 0:t.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==t?void 0:t.record_user_name)))),className:w.a.onediv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==t?void 0:t.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==t?void 0:t.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==t?void 0:t.extra_score)+parseFloat(null==t?void 0:t.score),"分"))),g.a.createElement(Y.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},g.a.createElement($.a,{title:g.a.createElement("div",{className:w.a.threetop},g.a.createElement("img",{style:{marginTop:"20px"},src:D.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(y.a,{to:"/users/".concat(null==r?void 0:r.user_login,"/classrooms")},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==r?void 0:r.user_image)}),(null==r?void 0:r.competition_prize)&&g.a.createElement("p",{className:w.a.prize},null==r?void 0:r.competition_prize),g.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},null==r?void 0:r.record_user_name)))),className:w.a.threediv,bordered:!1},g.a.createElement("p",{style:{fontSize:"14px"}},null==r?void 0:r.school_name),g.a.createElement("p",{style:{fontSize:"18px"}},null==r?void 0:r.spend_time),g.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(null==r?void 0:r.extra_score)+parseFloat(null==r?void 0:r.score),"分")))))};var Z=function(e){var t,n,r,i,o,a,s,l,c,u,h,d,f,p,m,v,b,x,E,S,C,k,_,T,O,A,L,I,R,M,N=e.ItemData;return g.a.createElement("div",null,g.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"总排行"),g.a.createElement(J,{oneItem:null==N?void 0:N.teams[0],towItem:null==N?void 0:N.teams[1],threeItem:null==N?void 0:N.teams[2]}),(null==N||null===(t=N.user_ranks)||void 0===t?void 0:t.length)>0&&g.a.createElement("div",{className:w.a.myTeam},!1===(null==N||null===(n=N.user_ranks)||void 0===n||null===(r=n[0])||void 0===r?void 0:r.success)?g.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},g.a.createElement("p",{style:{marginBottom:"0px"}}," 是否晋级:",g.a.createElement("span",{style:{color:!1===(null==N||null===(i=N.user_ranks)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.success)?"red":"green"}},!1===(null==N||null===(a=N.user_ranks)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.success)?"否":null!=N&&null!==(l=N.user_ranks)&&void 0!==l&&null!==(c=l[0])&&void 0!==c&&c.success?"是":"")),(null==N||null===(u=N.user_ranks)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.awards)&&g.a.createElement("p",{style:{marginBottom:"0px"}}," 是否获奖:",g.a.createElement("span",null,"percent_20"===(null==N||null===(d=N.user_ranks)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.awards)?"二等奖":"percent_30"===(null==N||null===(p=N.user_ranks)||void 0===p||null===(m=p[0])||void 0===m?void 0:m.awards)?"三等奖":"没有获得奖项"))):g.a.createElement("span",{style:{marginRight:"70px"}},"我的排名:",null==N||null===(v=N.user_ranks)||void 0===v||null===(b=v[0])||void 0===b?void 0:b.rank),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"战队名"},null==N||null===(x=N.user_ranks)||void 0===x||null===(E=x[0])||void 0===E?void 0:E.team_name)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"时间"},null==N||null===(S=N.user_ranks)||void 0===S||null===(C=S[0])||void 0===C?void 0:C.cost_time)),g.a.createElement("span",{style:{flex:1,textAlign:"center"}},g.a.createElement(X.a,{title:"赋能赛加分"},null==N||null===(k=N.user_ranks)||void 0===k||null===(_=k[0])||void 0===_?void 0:_.extra_score)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"比赛成绩"},null==N||null===(T=N.user_ranks)||void 0===T||null===(O=T[0])||void 0===O?void 0:O.score)),g.a.createElement("span",null,g.a.createElement(X.a,{title:"总分"},parseFloat(null==N||null===(A=N.user_ranks)||void 0===A||null===(L=A[0])||void 0===L?void 0:L.extra_score)+parseFloat(null==N||null===(I=N.user_ranks)||void 0===I||null===(R=I[0])||void 0===R?void 0:R.score)||0))),null==N||null===(M=N.teams)||void 0===M?void 0:M.map((function(e,t){return g.a.createElement("div",{className:w.a.bottomItem},g.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},t+1),g.a.createElement(y.a,{to:"/users/".concat(null==e?void 0:e.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(null==e?void 0:e.user_image)}),(null==e?void 0:e.competition_prize)&&g.a.createElement("span",{className:w.a.spanrightradius},null==e?void 0:e.competition_prize)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"战队名"},null==e?void 0:e.team_name)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"单位/学校名"},e.school_name)),g.a.createElement("span",{style:{flex:1,textAlign:"center"}},g.a.createElement(X.a,{title:"赋能赛加分"},e.extra_score)),g.a.createElement("span",{style:{flex:1}},g.a.createElement(X.a,{title:"比赛成绩"},e.score)),g.a.createElement("span",{style:{color:"#0152d9"}},g.a.createElement(X.a,{title:"总分"},parseFloat(e.extra_score)+parseFloat(e.score))))})))},Q=K.a.TabPane;var ee=function(e){var t,n,r,i,o,s,l=e.ChartRules,d=e.ItemData,f=e.getCharts,y=e.Selectkey,b=e.getChartRules,x=e.userinfo,E=e.Editable,S=e.HeaderDetail,C=Object(m.useState)(!1),k=Object(h.a)(C,2),_=k[0],T=k[1],O=Object(m.useState)(""),A=Object(h.a)(O,2),R=A[0],M=A[1],N=Object(m.useState)(!0),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],G=U[1],V=Object(m.useState)(),X=Object(h.a)(V,2),Y=X[0],$=X[1],J=Object(v.i)().identifier;function ee(){return(ee=Object(u.a)(p.a.mark((function e(){var t,n,r,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=3;break}return c.b.info("内容不能为空"),e.abrupt("return");case 3:if(B(!1),!(t=null==H?void 0:H.id)){e.next=12;break}return e.next=8,Object(I.a)("/api/competitions/".concat(J,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(n=l.rule_contents)||void 0===n||null===(r=n.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(t)})))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id,stage_id:null==H?void 0:H.id}});case 8:0===e.sent.status&&(c.b.info("更新成功"),T(!1),b()),e.next=16;break;case 12:return e.next=14,Object(I.a)("/api/competitions/".concat(J,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.id,stage_id:null==H?void 0:H.id}});case 14:0===e.sent.status&&(c.b.info("更新成功"),T(!1),b());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(m.useEffect)((function(){if(P){var e,t,n,r,i,o,a,s=null==l||null===(e=l.stages)||void 0===e?void 0:e[0];if(G(s),null!=s&&s.id)"mAP"!==(null==S?void 0:S.task)&&"dog"!==(null==S?void 0:S.task)||f(null==s?void 0:s.id),M((null===(t=l.rule_contents)||void 0===t||null===(n=t.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==s?void 0:s.id)})))||void 0===n||null===(r=n[0])||void 0===r?void 0:r.content)||"");else"mAP"===(null==S?void 0:S.task)||null==S||S.task,M((null===(i=l.rule_contents)||void 0===i||null===(o=i.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===o||null===(a=o[0])||void 0===a?void 0:a.content)||"")}}),[l]);var te=[{title:"排名",dataIndex:"name",align:"center",key:"name",render:function(e,t,n){return g.a.createElement("span",null,n+1)}},{title:"头像",dataIndex:"user_image",align:"center",key:"user_image",render:function(e){return g.a.createElement("img",{className:w.a.imgradius,src:D.a.IMG_SERVER+"/images/".concat(e)})}},{title:"战队名称",dataIndex:"team_name",key:"team_name",render:function(e){return g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=15?(null==e?void 0:e.substr(0,15))+"...":e||"--")}},{title:"单位",dataIndex:"school_name",key:"school_name",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},{title:"mAP"===(null==S?void 0:S.task)?"mAP指标":"Jittor-3"===(null==S?void 0:S.task)?"总分":"top1指标",dataIndex:"score",key:"score",render:function(e){return g.a.createElement("span",null,e||"--")}}];return g.a.createElement("div",null,(null==l||null===(t=l.stages)||void 0===t?void 0:t.length)>0?null:g.a.createElement(q,null),(null==l||null===(n=l.stages)||void 0===n?void 0:n.length)>0&&g.a.createElement(K.a,{animated:!0,tabBarExtraContent:((null==x?void 0:x.admin)||(null==x?void 0:x.business)||E)&&g.a.createElement(a.a,{onClick:function(){T(!0)}},"编辑"),onChange:function(e){var t,n,r,i,o;T(!1);var a=null==l||null===(t=l.stages)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];G(a);var s=null==a||null===(n=a.children)||void 0===n?void 0:n[0];$(s),M((null===(r=l.rule_contents)||void 0===r||null===(i=r.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==a?void 0:a.id)})))||void 0===i||null===(o=i[0])||void 0===o?void 0:o.content)||""),f((null==s?void 0:s.id)||e)}},l&&l.stages.map((function(e,t){return g.a.createElement(Q,{tab:e.name,key:null===e.id?0:e.id},!1===_&&l&&l.rule_contents.map((function(t,n){return e.id===t.competition_stage_id||null===e.id&&0===t.competition_stage_id?g.a.createElement(L.a,{key:n,value:void 0===t.content||null===t.content?"":t.content}):void 0})))}))),(null==H||null===(r=H.children)||void 0===r?void 0:r.length)>0&&g.a.createElement(K.a,{activeKey:(null==Y?void 0:Y.id)+"",onChange:function(e){var t,n=null==H||null===(t=H.children)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];$(n),f(e)}},null==H||null===(i=H.children)||void 0===i?void 0:i.map((function(e,t){return g.a.createElement(Q,{tab:e.name,key:null===e.id?0:e.id})}))),_&&g.a.createElement("div",null,g.a.createElement(z.a,{defaultValue:R,onChange:function(e){M(e)}}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return ee.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return T(!1)}},"取消"))),(null==d||null===(o=d.teams)||void 0===o?void 0:o.length)>0&&("mAP"===(null==S?void 0:S.task)||"dog"===(null==S?void 0:S.task)||"Jittor-3"===(null==S?void 0:S.task))?g.a.createElement(W.a,{dataSource:null==d?void 0:d.teams,columns:te,pagination:!1}):(null==d||null===(s=d.teams)||void 0===s?void 0:s.length)>0&&g.a.createElement(Z,{ItemData:d}))},te=(n("/zsF"),n("PArb"));var ne=function(e){var t,n,r,i,o,s,l,c=e.Prize,d=Object(v.i)(),f=Object(m.useState)([{type:1,name:"团体奖证书"},{type:2,name:"个人奖证书"},{type:3,name:"优秀指导教师证书"}]),y=Object(h.a)(f,2),b=y[0],x=(y[1],function(){var e=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.u)({type:t.type,id:d.identifier});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(location.href="/competitions/exports?id=".concat(d.identifier,"&type=").concat(t.type));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());return g.a.createElement("div",null,g.a.createElement("p",{className:w.a.downloadpdf},"温馨提示:填写的个人信息经审批后,将提供个人获奖证书下载;团队队员信息全部审批后,将提供团队获奖证书下载。"),g.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"证书情况"),(null==c||null===(t=c.personal_certifications)||void 0===t?void 0:t.length)>0?g.a.createElement("p",null,g.a.createElement("span",null,"个人证书:"),g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/pdfs.png"}),g.a.createElement("a",{style:{marginLeft:"5px"},href:D.a.API_SERVER+"".concat(null==c||null===(n=c.personal_certifications[0])||void 0===n?void 0:n.url)},"立即下载")):g.a.createElement("p",null,g.a.createElement("span",null,"个人证书:")," ",g.a.createElement("span",{style:{color:"#000"}},"暂未生成"),g.a.createElement("span",{style:{marginLeft:"20px"}},"原因:")," ",g.a.createElement("span",{style:{color:"#000"}},"组委会未完成证书审批,请稍后")),(null==c||null===(r=c.team_certifications)||void 0===r?void 0:r.length)>0?g.a.createElement("p",null,g.a.createElement("span",null,"团队证书:"),g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/educoder/pdfs.png"}),g.a.createElement("a",{style:{marginLeft:"5px"},href:D.a.API_SERVER+"".concat(null==c||null===(i=c.team_certifications[0])||void 0===i?void 0:i.url)},"立即下载")):g.a.createElement("p",null,g.a.createElement("span",null,"团队证书:")," ",g.a.createElement("span",{style:{color:"#000"}},"暂未生成")),g.a.createElement(te.a,null),(null==c||null===(o=c.teams)||void 0===o?void 0:o.length)>0?g.a.createElement("div",null,g.a.createElement("p",null,(null==c?void 0:c.teams)&&(null==c||null===(s=c.teams[0])||void 0===s?void 0:s.name),"战队信息填报概况"),g.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},g.a.createElement("span",{style:{width:"5%"}},"角色"),g.a.createElement("span",{style:{width:"5%"}},"姓名"),g.a.createElement("span",{style:{width:"10%"}},"实名认证"),g.a.createElement("span",{style:{width:"10%"}},"职业认证"),g.a.createElement("span",{style:{width:"10%"}},"手机绑定"),g.a.createElement("span",{style:{width:"10%"}},"邮箱绑定"),g.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"开户行及银行卡号信息(队长填写)")),(null==c?void 0:c.teams)&&(null==c||null===(l=c.teams[0])||void 0===l?void 0:l.team_members.map((function(e,t){var n,r,i,o,a,s;return g.a.createElement("p",{className:w.a.teamItem},g.a.createElement("span",{style:{width:"5%"}},null==e?void 0:e.role),g.a.createElement("span",{style:{width:"5%"}},null==e?void 0:e.name),g.a.createElement("span",{style:{width:"10%"}},"authed"===(null==e?void 0:e.real_name_auth)?"已认证":"authing"===(null==e?void 0:e.real_name_auth)?"待审核":"未认证"),g.a.createElement("span",{style:{width:"10%"}},"authed"===(null==e?void 0:e.professional_auth)?"已认证":"authing"===(null==e?void 0:e.professional_auth)?"待审核":"未认证"),g.a.createElement("span",{style:{width:"10%"}},null!=e&&e.phone_binded?"已绑定":"未绑定"),g.a.createElement("span",{style:{width:"10%"}},null!=e&&e.email_binded?"已绑定":"未绑定"),"队长"===(null==e?void 0:e.role)?g.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(null==c?void 0:c.teams)&&(null==c||null===(n=c.teams[0])||void 0===n||null===(r=n.bank_account)||void 0===r?void 0:r.bank),(null==c?void 0:c.teams)&&(null==c||null===(i=c.teams[0])||void 0===i||null===(o=i.bank_account)||void 0===o?void 0:o.second_bank),(null==c?void 0:c.teams)&&(null==c||null===(a=c.teams[0])||void 0===a||null===(s=a.bank_account)||void 0===s?void 0:s.card_no)):g.a.createElement("span",{style:{width:"50%"}}))})))):null,g.a.createElement(O.a,{gutter:[20,20]},b.map((function(e,t){return g.a.createElement(Y.a,{key:t},g.a.createElement(a.a,{type:"primary",onClick:function(){return x(e)}},e.name))}))))},re=n("0Owb"),ie=(n("7Kak"),n("9yH6")),oe=(n("y8nQ"),n("Vl3Y")),ae=n("1vsH"),se=n("Dgm7"),le=n.n(se),ce=n("NnUe"),ue=n.n(ce),he=S.a.Dragger,de=Object(b.a)((function(e){var t=e.user,n=e.account,r=e.loading;return{user:t,account:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t=e.user,n=e.account,o=(e.globalSetting,e.loading),l=e.dispatch,f=(Object(d.a)(e,["user","account","globalSetting","loading","dispatch"]),oe.a.useForm()),v=Object(h.a)(f,1)[0],y=Object(m.useState)({}),b=Object(h.a)(y,2),x=(b[0],b[1]),w=Object(m.useState)(!0),E=Object(h.a)(w,2),S=E[0],C=E[1],k=Object(m.useState)(),_=Object(h.a)(k,2),T=_[0],O=_[1],L=Object(m.useState)(),I=Object(h.a)(L,2),R=I[0],M=I[1],N=Object(m.useState)(),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],z=U[1];Object(m.useEffect)((function(){if(n.basicInfo){var e=n.basicInfo,t={name:e.show_realname?e.name:Object(ae.F)(e.name),gender:e.gender};O(e.name),C(e.show_realname),v.setFieldsValue(t),x(t)}}),[n.basicInfo]);var G=function(){var e=Object(u.a)(p.a.mark((function e(r){var i,o,a,s,u,h,d,f;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=(a=r||{}).name,u=a.gender,h=a.idNumber,R){e.next=4;break}return c.b.info("请先上传照片!"),e.abrupt("return");case 4:return e.next=6,l({type:"account/applyRealNameAuth",payload:{id:(null===(i=n.basicInfo)||void 0===i?void 0:i.id)||(null===(o=t.userInfo)||void 0===o?void 0:o.login),name:s,gender:u,id_number:h,show_realname:S,attachment_ids:[P]}});case 6:d=e.sent,V(),d&&(c.b.info("申请已提交,请等待审核!"),l({type:"account/getBasicInfo",payload:{login:null===(f=t.userInfo)||void 0===f?void 0:f.login}}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){l({type:"account/setActionTabs",payload:{}})},W={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(D.a.API_SERVER,"/api/attachments.json"),className:ue.a.uploader,onChange:function(e){var t;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),B(null===(t=e.file.response)||void 0===t?void 0:t.id),Object(ae.C)(e.file.originFileObj,(function(e){M(e),z(!1)}))):z(!0)},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return t||c.b.info("请上传正确文件格式"),t}};return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:"Account-RealNameAuth"===n.actionTabs.key,title:"修改实名信息",width:"600px",footer:null},g.a.createElement(s.a,{spinning:!!H},g.a.createElement(oe.a,{className:ue.a.formWrap,form:v,layout:"horizontal",onValuesChange:function(e){x(Object(r.a)({},v.getFieldsValue())),"name"in e&&O(e.name)},onFinish:G},g.a.createElement(oe.a.Item,{label:"姓名",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请输入真实姓名,最大限制".concat(10,"个字符")},{validator:ae.I}],extra:g.a.createElement("span",null,S?"(显示:平台将显示您的真实姓名)":"(隐藏:平台将显示你的昵称)")},g.a.createElement(A.a,{disabled:!S,placeholder:"请输入真实姓名,最大限制".concat(10,"个字符"),maxLength:10,addonAfter:g.a.createElement("i",{className:"iconfont ".concat(S?"icon-xianshi":"icon-yincang"," font18 ").concat(ue.a.color0152d9),onClick:function(){var e=!S;C(e);var t=e?T:Object(ae.F)(T);v.setFieldsValue({name:t})}})})),g.a.createElement(oe.a.Item,{label:"性别:",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"请选择性别"}]},g.a.createElement(ie.a.Group,null,g.a.createElement(ie.a,{value:0},"男"),g.a.createElement(ie.a,{value:1},"女"))),g.a.createElement(oe.a.Item,{label:"证件号:",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"请输入证件号"}]},g.a.createElement(A.a,{placeholder:"请输入证件号"})),g.a.createElement(oe.a.Item,{label:"身份证上传",labelCol:{span:3}},g.a.createElement("div",{className:ue.a.flexRow},g.a.createElement("div",{className:"".concat(ue.a.flexColumn," ").concat(ue.a.example)},g.a.createElement("span",{className:ue.a.exampleImg},g.a.createElement("img",{src:le.a})),g.a.createElement("span",{className:"tc"},g.a.createElement("p",null,"示例图片"),g.a.createElement("p",{className:"".concat(ue.a.colorOrange," font12")},"(png/jpg/bmp格式,不超过2MB)"))),g.a.createElement("div",{className:ue.a.flexColumn},g.a.createElement(he,Object(re.a)({},W,{accept:".png,.jpg,.bmp,.jpeg"}),R?g.a.createElement("img",{src:R,className:ue.a.uploadImg}):g.a.createElement("div",{className:ue.a.imageTip},g.a.createElement("p",null,g.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(ue.a.uploadTipIcon)})),g.a.createElement("p",{className:ue.a.uploadTip},g.a.createElement("a",{className:ue.a.color05101a},"点击或拖拽上传图片")))),g.a.createElement("span",{className:"tc"},g.a.createElement("p",{className:ue.a.viewLargerImg},"查看大图"))))),g.a.createElement("div",{className:ue.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:V},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:o["account/applyRealNameAuth"]},"保存"))),g.a.createElement("div",{className:ue.a.note},g.a.createElement("p",null,"认证须知:"),g.a.createElement("p",null,"1.你需要准备有效的身份证正面(人像面)的证件照照片,请确保证件照片清晰可见,严禁PS;"),g.a.createElement("p",null,"2.我们将在你提交认证信息后的24小时(不包含节假日)内完成审核,审核结果将会以系统消息的形式发送给你;"),g.a.createElement("p",null,"3.实名认证审核完成后,无法删除,请谨慎填写;"),g.a.createElement("p",null,"4.实名认证审核完成后,系统将自动发放500个金币作为奖励;"),g.a.createElement("p",null,"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"),g.a.createElement("p",null,"6.如存在恶意乱填写姓名,证件号,及上传与实名认证证件无关图片者,一经发现将冻结EduCoder账号。"),g.a.createElement("p",null,"7.提交实名认证后系统会自动将状态改为已认证,你将可以体验平台需要实名认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。")))))})),fe=(n("O3gP"),n("lrIw")),pe=n("KXlV"),me=n.n(pe),ge=n("Sjjz"),ve=n.n(ge),ye=A.a.TextArea,be=Object(b.a)((function(e){var t=e.account,n=e.loading;return{account:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){e.account,e.globalSetting;var t=e.loading,n=e.dispatch,r=e.schoolName,o=e.departmentName,s=e.visible,l=e.onClose,f=void 0===l?function(){}:l,v=e.onSuccess,y=void 0===v?function(){}:v,b=Object(d.a)(e,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),x=oe.a.useForm(),w=Object(h.a)(x,1)[0],E=Object(m.useRef)();Object(m.useEffect)((function(){E.current=b.schoolId}),[b.schoolId]),Object(m.useEffect)((function(){w.setFieldsValue({department:o})}),[o]);var S=function(){var e=Object(u.a)(p.a.mark((function e(t){var r,i,o,a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=t||{}).department,o=r.remarks,e.next=3,n({type:"account/appplyDepartment",payload:{school_id:E.current,name:i,remarks:o}});case 3:a=e.sent,f(),a&&(c.b.success("新增院系/部门成功!"),y(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:s,title:"申请添加子单位名称",width:"600px",footer:null},g.a.createElement(oe.a,{className:ve.a.formWrap,form:w,labelCol:{span:4},wrapperCol:{span:20},onFinish:S},g.a.createElement(oe.a.Item,{label:"单位名称:"},r),g.a.createElement(oe.a.Item,{label:"部门名称:",name:"department",rules:[{required:!0,message:"请输入部门或者学院名称"}]},g.a.createElement(A.a,{placeholder:"请输入部门或者学院名称"})),g.a.createElement(oe.a.Item,{label:"说明:",name:"remarks"},g.a.createElement(ye,{placeholder:"再次说明特别情况(选填)"})),g.a.createElement("div",{className:ve.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){f()}},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:t["account/appplyDepartment"]},"保存")))))})),xe=(n("6UJt"),n("DFOY")),we=n("jO45"),Ee=n("jN4g"),Se=n("gJ3r"),Ce=n("jwmR"),ke=n.n(Ce),_e=function(e,t){return t.some((function(t){return t.label.toLowerCase().indexOf(e.toLowerCase())>-1}))},Te=A.a.TextArea,Oe=Object(b.a)((function(e){var t=e.account,n=e.loading;return{account:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){e.account,e.globalSetting;var t=e.loading,n=e.dispatch,r=e.schoolName,o=e.visible,s=e.onClose,l=void 0===s?function(){}:s,f=e.onSuccess,v=void 0===f?function(){}:f,y=(Object(d.a)(e,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),oe.a.useForm()),b=Object(h.a)(y,1)[0];Object(m.useEffect)((function(){b.setFieldsValue({name:r})}),[r]);var x=function(){var e=Object(u.a)(p.a.mark((function e(t){var r,i,o,a,s,u,h;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=t||{}).name,o=r.city,a=void 0===o?[]:o,s=r.address,u=r.remarks,e.next=3,n({type:"account/appplySchool",payload:{name:i,province:a[0],city:a[1],address:s,remarks:u}});case 3:h=e.sent,l(),h&&(c.b.success("新增学校/单位成功!"),v(i));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:o,title:"申请添加单位名称",width:"600px",footer:null},g.a.createElement(oe.a,{className:ke.a.formWrap,form:b,labelCol:{span:4},wrapperCol:{span:20},onFinish:x},g.a.createElement(oe.a.Item,{label:"单位全称:",name:"name",rules:[{required:!0,message:"请输入学校或工作单位"}]},g.a.createElement(A.a,{placeholder:"学校或工作单位"})),g.a.createElement("div",{className:"".concat(ke.a.flexRow," ").concat(ke.a.example)},g.a.createElement("div",null,"示例:"),g.a.createElement("div",{className:ke.a.flexColumn},g.a.createElement("div",null,g.a.createElement(we.a,{style:{color:"rgb(82, 196, 26)"}}),g.a.createElement("span",{className:"font14 ml5"},"正确示例:数据结构")),g.a.createElement("div",null,g.a.createElement(Ee.a,{style:{color:"red"}}),g.a.createElement("span",{className:"font14 ml5"},"错误示例:数据结构2019春")))),g.a.createElement(oe.a.Item,{label:"地区:",name:"city"},g.a.createElement(xe.a,{allowClear:!0,size:"large",options:Se.a,placeholder:"请选择所在地",showSearch:{matchInputWidth:!0,filter:_e}})),g.a.createElement(oe.a.Item,{label:"详细地址:",name:"address"},g.a.createElement(A.a,{placeholder:"请填写完整的地址信息"})),g.a.createElement(oe.a.Item,{label:"说明:",name:"remarks"},g.a.createElement(Te,{placeholder:"再次说明特别情况(选填)"})),g.a.createElement("div",{className:ke.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:function(){l()}},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:t["account/appplySchool"]},"保存")))))})),Ae=N.a.Option,Le=S.a.Dragger,De=Object(b.a)((function(e){var t=e.user,n=e.account,r=e.loading;return{user:t,account:n,globalSetting:e.globalSetting,loading:r.effects}}))((function(e){var t,n,o=e.user,l=e.account,f=e.globalSetting,v=e.loading,y=e.dispatch,b=e.Scoid,x=(Object(d.a)(e,["user","account","globalSetting","loading","dispatch","Scoid"]),oe.a.useForm()),w=Object(h.a)(x,1)[0],E=Object(m.useState)({}),S=Object(h.a)(E,2),C=S[0],k=S[1],_=Object(m.useState)([]),T=Object(h.a)(_,2),L=T[0],I=T[1],R=Object(m.useState)([]),M=Object(h.a)(R,2),j=M[0],P=M[1],B=Object(m.useState)([]),F=Object(h.a)(B,2),U=F[0],H=F[1],z=Object(m.useState)([]),G=Object(h.a)(z,2),V=G[0],W=G[1],K=Object(m.useState)(),q=Object(h.a)(K,2),X=q[0],$=q[1],J=Object(m.useState)(),Z=Object(h.a)(J,2),Q=Z[0],ee=Z[1],te=Object(m.useState)(),ne=Object(h.a)(te,2),ie=ne[0],se=ne[1],le=Object(m.useState)(),ce=Object(h.a)(le,2),he=ce[0],de=ce[1],pe=Object(m.useState)(),ge=Object(h.a)(pe,2),ve=ge[0],ye=ge[1];Object(m.useEffect)((function(){xe()}),[]),Object(m.useEffect)((function(){Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,we(b);case 4:t=e.sent,H(null==t?void 0:t.departments);case 6:case"end":return e.stop()}}),e)})))()}),[b]);var xe=function(){var e=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y({type:"account/getSchoolOption"});case 2:t=e.sent,I(null==t?void 0:t.schools);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(e){return y({type:"account/getDepartmentOption",payload:{id:e}})};Object(m.useEffect)((function(){if(l.basicInfo){var e=l.basicInfo,t={identity:e.identity,school:e.school_name,department:e.department_name,studentNo:e.student_id,jobTitle:"teacher"==e.identity?e.technical_title:"教授",manager:"professional"==e.identity?e.technical_title:"企业管理者"};w.setFieldsValue(t),k(t)}}),[l.basicInfo]);var Ee=function(){var e=Object(u.a)(p.a.mark((function e(t,n){var i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(i=L.find((function(e){return e.name===t})))||void 0===i?void 0:i.id,e.next=3,we(s);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:l=e.t0,H(null==l?void 0:l.departments),c=n||(null==l||null===(o=l.departments)||void 0===o||null===(a=o[0])||void 0===a?void 0:a.name),w.setFieldsValue({department:c}),k(Object(r.a)(Object(r.a)({},C),{school:t,department:c}));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Se=function(){var e=Object(u.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xe();case 2:w.setFieldsValue({school:t,department:""}),k(Object(r.a)(Object(r.a)({},C),{school:t,department:""}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ce=function(){var e=Object(u.a)(p.a.mark((function e(t){var n,r,i,a,s,u,h,d,f,m,g,v,b,x,w,E;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(s=t||{}).school,h=s.department,d=s.identity,f=s.studentNo,m=s.jobTitle,g=s.manager,X){e.next=4;break}return c.b.info("请先上传照片!"),e.abrupt("return");case 4:return v=null===(n=L.find((function(e){return e.name===u})))||void 0===n?void 0:n.id,b=null===(r=U.find((function(e){return e.name===h})))||void 0===r?void 0:r.id,x="student"===d?f:"teacher"===d?m:g,e.next=9,y({type:"account/applyProfessionalAuth",payload:{id:(null===(i=l.basicInfo)||void 0===i?void 0:i.id)||(null===(a=o.userInfo)||void 0===a?void 0:a.login),school_id:v,department_id:b,identity:d,extra:x,attachment_ids:[Q]}});case 9:w=e.sent,ke(),w&&(c.b.info("申请已提交,请等待审核!"),y({type:"account/getBasicInfo",payload:{login:null===(E=o.userInfo)||void 0===E?void 0:E.login}}));case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ke=function(){y({type:"account/setActionTabs",payload:{}})},_e={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(D.a.API_SERVER,"/api/attachments.json"),className:ue.a.uploader,onChange:function(e){var t;"uploading"!==e.file.status?"done"===e.file.status&&(console.log(e.file,e.file.response),ee(null===(t=e.file.response)||void 0===t?void 0:t.id),Object(ae.C)(e.file.originFileObj,(function(e){$(e),se(!1)}))):se(!0)},beforeUpload:function(e){var t="image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type||"image/bmp"===e.type;return t||c.b.info("请上传正确文件格式"),t}};return g.a.createElement(i.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:ue.a.modal,visible:"Account-ProfessionalAuth"===l.actionTabs.key,title:g.a.createElement("div",null,g.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(ue.a.colorBlue)}),"职业认证"),width:"660px",footer:null},g.a.createElement(s.a,{spinning:!!ie},g.a.createElement(oe.a,{className:ue.a.formWrap,form:w,layout:"horizontal",onValuesChange:function(e){(k(Object(r.a)({},w.getFieldsValue())),"school"in e)&&(P(L.filter((function(t){return t.name.includes(e.school)}))),(L.find((function(t){return t.name===e.school}))||{}).id?Ee(e.school):(w.setFieldsValue({department:""}),k(Object(r.a)(Object(r.a)({},C),{school:e.school,department:""}))))},onFinish:Ce},g.a.createElement(O.a,{gutter:[10,0]},g.a.createElement(Y.a,{flex:"300px"},g.a.createElement(oe.a.Item,{label:"职业",name:"identity",rules:[{required:!0,message:"请先选择职业"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"teacher"},"教师"),g.a.createElement(Ae,{value:"student"},"学生"),g.a.createElement(Ae,{value:"professional"},"专业人士")))),"student"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.studentNo,name:"studentNo",rules:[{required:!0,message:"请先输入学号"}]},g.a.createElement(A.a,{type:"text",placeholder:"请输入学号"}))),"teacher"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.jobTitle,name:"jobTitle",rules:[{required:!0,message:"请先选择职称"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"教授"},"教授"),g.a.createElement(Ae,{value:"副教授"},"副教授"),g.a.createElement(Ae,{value:"讲师"},"讲师"),g.a.createElement(Ae,{value:"助教"},"助教")))),"professional"===C.identity&&g.a.createElement(Y.a,{flex:"200px"},g.a.createElement(oe.a.Item,{initialValue:C.manager,name:"manager",rules:[{required:!0,message:"请先选择职称"}]},g.a.createElement(N.a,null,g.a.createElement(Ae,{value:"企业管理者"},"企业管理者"),g.a.createElement(Ae,{value:"部门管理者"},"部门管理者"),g.a.createElement(Ae,{value:"高级工程师"},"高级工程师"),g.a.createElement(Ae,{value:"工程师"},"工程师"),g.a.createElement(Ae,{value:"助理工程师"},"助理工程师"))))),g.a.createElement(oe.a.Item,{label:"学校/单位",name:"school",extra:C.school&&!(null!=L&&L.find((function(e){return e.name===C.school})))&&g.a.createElement("div",{className:ue.a.schoolHintWrap},g.a.createElement("span",{className:ue.a.colorCDCDCD},"未找到包含“",C.school,"”的高校,"),g.a.createElement("span",{className:"".concat(ue.a.color0152d9," current"),onClick:function(){de(!0)}},"申请新增")),rules:[{required:!0,message:"请先选择学校/单位"}]},g.a.createElement(fe.a,{showSearch:!0,options:null==j?void 0:j.map((function(e){return{value:e.name}}))})),g.a.createElement(oe.a.Item,{label:"院系/部门",name:"department",extra:C.department&&!(null!=U&&U.find((function(e){return e.name===C.department})))&&g.a.createElement("div",{className:ue.a.schoolHintWrap},g.a.createElement("span",{className:ue.a.colorCDCDCD},C.department?"未找到包含“".concat(C.department,"”的高校,"):"未找到院系,"),g.a.createElement("span",{className:"".concat(ue.a.color0152d9," current"),onClick:function(){L.find((function(e){return e.name===C.school}))?ye(!0):c.b.info("请先选择正确的单位或者学校!")}},"申请新增")),rules:[{required:!0,message:"请先选择院系/部门"}]},g.a.createElement(fe.a,{showSearch:!0,onChange:function(e){return W(U.filter((function(t){return t.name.includes(e)})))},options:null==V?void 0:V.map((function(e){return{value:e.name}}))})),g.a.createElement(oe.a.Item,{label:"职业证上传"},g.a.createElement("div",{className:ue.a.flexRow},g.a.createElement("div",{className:"".concat(ue.a.flexColumn," ").concat(ue.a.example)},g.a.createElement("span",{className:ue.a.exampleImg},g.a.createElement("img",{src:me.a})),g.a.createElement("span",{className:"tc"},g.a.createElement("p",null,"示例图片"),g.a.createElement("p",{className:"".concat(ue.a.colorOrange," font12")},"(png/jpg/bmp格式,不超过2MB)"))),g.a.createElement("div",{className:ue.a.flexColumn},g.a.createElement(Le,Object(re.a)({},_e,{accept:".png,.jpg,.bmp,.jpeg"}),X?g.a.createElement("img",{src:X,className:ue.a.uploadImg}):g.a.createElement("div",{className:ue.a.imageTip},g.a.createElement("p",null,g.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(ue.a.uploadTipIcon)})),g.a.createElement("p",{className:ue.a.uploadTip},g.a.createElement("a",{className:ue.a.color05101a},"点击或拖拽上传图片")))),g.a.createElement("span",{className:"tc"},g.a.createElement("p",{className:ue.a.viewLargerImg},"查看大图"))))),g.a.createElement("div",{className:ue.a.footerWrap},g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{className:"mr5",size:"large",onClick:ke},"取消"),g.a.createElement(a.a,{size:"large",type:"primary",htmlType:"submit",loading:v["account/applyProfessionalAuth"]},"保存"))),g.a.createElement("div",{className:ue.a.note},g.a.createElement("p",null,"认证须知:"),g.a.createElement("p",null,"1.根据职业上传相应的证件照:教师(教师证),专业人士(员工证)、学生(学生证),请确保证件照内容完整并且清晰可见,严禁PS;"),g.a.createElement("p",null,"2.我们将在你提交职业证信息后的24小时(不包含节假日)内完成审核,审核结果将会以系统消息的形式发送给你;"),g.a.createElement("p",null,"3.职业认证审核完成后,无法删除,请谨慎填写;职业变更请选择重新认证;"),g.a.createElement("p",null,"4.职业认证审核完成后,系统将自动发放500个金币作为奖励;"),g.a.createElement("p",null,"5.我们会确保你所提供的信息均处于严格的保密状态,不会泄露;"),g.a.createElement("p",null,"6.如存在恶意乱填写姓名,学号,及上传与职业证件无关图片者,一经发现将冻结",!(null!=f&&null!==(t=f.setting)&&void 0!==t&&t.is_local)&&"EduCoder","账号。"),g.a.createElement("p",null,"7.非老师身份提交职业认证后系统会自动将状态改为已认证,你将可以体验平台需要职业认证的功能;如果在认证后的使用过程中未通过审核,你将不能继续体验需要认证的功能。")))),g.a.createElement(Oe,{visible:he,onClose:function(){return de(!1)},schoolName:C.school,onSuccess:Se}),g.a.createElement(be,{visible:ve,onClose:function(){return ye(!1)},schoolId:null===(n=L.find((function(e){return e.name===C.school})))||void 0===n?void 0:n.id,schoolName:C.school,departmentName:C.department,onSuccess:function(e){return Ee(C.school,e)}}))})),Ie=n("aCH8"),Re=n.n(Ie);var Me=function(e){var t=e.type,n=e.dispatch,r=e.userid,i=e.isshow,o=e.setPhoneshow,s=e.setEmailshow,l="79e33abd4b6588941ab7622aed1e67e8",d=Object(m.useState)(""),f=Object(h.a)(d,2),v=f[0],y=f[1],b=Object(m.useState)("获取验证码"),x=Object(h.a)(b,2),w=x[0],E=(x[1],Object(m.useState)(60)),S=Object(h.a)(E,2),C=S[0],k=S[1],_=Object(m.useState)(!1),T=Object(h.a)(_,2),O=T[0],L=T[1],D=Object(m.useState)(""),I=Object(h.a)(D,2),R=I[0],M=I[1];function N(){return(N=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v){e.next=3;break}return 3===t?c.b.info("手机号不能为空"):c.b.info("邮箱地址不能为空"),e.abrupt("return");case 3:return e.next=5,n({type:"competitions/getVerification",payload:{type:t,login:v,smscode:Re()(l+v)}});case 5:1===e.sent.status&&(c.b.info("获取验证码成功"),j(),L(!0));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(){k(60);var e=setInterval((function(){--C>-1?k(C):(clearInterval(e),L(!1))}),1e3)}function P(){return(P=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"competitions/PhoneBind",payload:{userid:r,code:R,phone:v}});case 2:0===e.sent.status&&(c.b.info("绑定成功"),o("none"));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){return(B=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"competitions/EmailBind",payload:{userid:r,code:R,email:v}});case 2:0===e.sent.status&&(c.b.info("绑定成功"),s("none"));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",{style:{display:i}},g.a.createElement("p",null,g.a.createElement(A.a,{value:v,onChange:function(e){return y(e.target.value)},placeholder:3===t?"请输入手机号":"请输入邮箱地址",style:{width:"370px"}})),g.a.createElement("span",null,g.a.createElement(A.a,{value:R,onChange:function(e){return M(e.target.value)},placeholder:3===t?"请输入手机获取的验证码":"请输入邮箱获取的验证码",style:{width:"250px"}}))," ",g.a.createElement(a.a,{disabled:O,onClick:function(){return function(){return N.apply(this,arguments)}()},type:"primary",style:{marginLeft:"20px",width:"100px"}},O?"重新发送".concat(C,"s"):w),g.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},g.a.createElement(a.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){R?3===t?function(){P.apply(this,arguments)}():function(){B.apply(this,arguments)}():c.b.info("验证码不能为空")}},"确认"),g.a.createElement(a.a,{style:{marginLeft:"20px"},onClick:function(){3===t?o("none"):s("none")}},"取消")))};var Ne=function(e){var t=e.dispatch,n=e.userid,i={wrapperCol:{offset:3,span:21}},o=oe.a.useForm(),s=Object(h.a)(o,1)[0],l=Object(v.i)().identifier;return g.a.createElement("div",{style:{width:"500px"}},g.a.createElement(oe.a,{form:s,name:"basic"},g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"开户行"),name:"bank",rules:[{required:!0,message:"请输入开户行"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"支行"),name:"second_bank",rules:[{required:!0,message:"请输入支行"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,Object(re.a)({},i,{label:g.a.createElement("div",{style:{width:"30px"}},"账号"),name:"card_no",rules:[{required:!0,message:"请输入账号"}]}),g.a.createElement(A.a,null)),g.a.createElement(oe.a.Item,null,g.a.createElement(a.a,{type:"primary",htmlType:"submit",onClick:Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.validateFields().then(function(){var e=Object(u.a)(p.a.mark((function e(i){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"competitions/setleader",payload:Object(r.a)({identifier:l,user_id:n},i)});case 2:0===e.sent.status&&c.b.info("提交成功");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)})))},"提交"))))},je={teacher:"教师",student:"学生",professional:"专业人士"};var Pe=function(e){var t,n,r,i,o,s,l,d,f=e.Prize,v=e.Accounts,y=e.dispatch,b=e.userid,x=Object(m.useState)("none"),w=Object(h.a)(x,2),E=w[0],S=w[1],C=Object(m.useState)("none"),k=Object(h.a)(C,2),_=k[0],T=k[1];function O(e){return A.apply(this,arguments)}function A(){return(A=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("1"!==t){e.next=6;break}return e.next=3,y({type:"competitions/Authentication"});case 3:n=e.sent,e.next=9;break;case 6:return e.next=8,y({type:"competitions/Professional"});case 8:n=e.sent;case 9:0===n.status&&c.b.info("撤销成功");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return g.a.createElement("div",null,g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"实名信息"),"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"通过实名认证后才能获得证书"):null,"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"立即认证"):null),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",null,"姓名:",g.a.createElement("span",null,null==v?void 0:v.name),"uncertified"===(null==v?void 0:v.authentication)?null:"applying"===(null==v?void 0:v.authentication)?g.a.createElement("span",null,g.a.createElement("span",null,"待审核"),g.a.createElement(a.a,{type:"primary",onClick:function(){return O("1")},ghost:!0,style:{marginLeft:"20px"}},"撤销认证")):g.a.createElement("span",{style:{color:"#6ec76e"}},g.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," 已认证")),g.a.createElement("p",null,"性别:",g.a.createElement("span",null,0===(null==v?void 0:v.gender)?"男":"女"))),g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"职业信息"),"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"通过实名认证后才能获得证书"):null,"uncertified"===(null==v?void 0:v.authentication)?g.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"立即认证"):null),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",null,"职业:",g.a.createElement("span",null,v&&v.identity&&je[v.identity]),"uncertified"===(null==v?void 0:v.authentication)?null:"applying"===(null==v?void 0:v.authentication)?g.a.createElement("span",null,g.a.createElement("span",null,"待审核"),g.a.createElement(a.a,{type:"primary",onClick:function(){return O("2")},ghost:!0,style:{marginLeft:"20px"}},"撤销认证")):g.a.createElement("span",{style:{color:"#6ec76e"}},g.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),g.a.createElement("span",null,"已认证"),g.a.createElement(a.a,{type:"primary",onClick:function(){y({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"重新认证"))),g.a.createElement("p",null,"学号:",g.a.createElement("span",null,(null==v?void 0:v.student_id)||"--")),g.a.createElement("p",null,"学校:",g.a.createElement("span",null,(null==v?void 0:v.school_name)||"--")),g.a.createElement("p",null,"院系:",g.a.createElement("span",null,(null==v?void 0:v.department_name)||"--"))),g.a.createElement("p",null,g.a.createElement("span",{style:{color:"red"}},"*"),g.a.createElement("span",{style:{fontSize:"16px"}},"联系方式")),g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"手机号:"),g.a.createElement("span",{style:{width:"150px"}},(null==v?void 0:v.phone)||"--"),"none"===E?g.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){S("block")}},"更换"):null),g.a.createElement(Me,{type:3,dispatch:y,userid:null==v?void 0:v.id,isshow:E,setPhoneshow:S,setEmailshow:T}),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email:"),g.a.createElement("span",{style:{width:"150px"}},(null==v?void 0:v.mail)||"--"),"none"===_?g.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){T("block")}},"更换"):null),g.a.createElement(Me,{type:4,dispatch:y,userid:null==v?void 0:v.id,isshow:_,setEmailshow:T,setPhoneshow:S})),null!=f&&f.leader&&null!=f&&f.teams&&null!=f&&null!==(t=f.teams[0])&&void 0!==t&&null!==(n=t.bank_account)&&void 0!==n&&n.bank?g.a.createElement("p",null,g.a.createElement("span",{style:{fontSize:"16px"}},"签/领/开户行及银行卡号"),g.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"为保障奖金的及时发放,请队长如实填写你名下的银行卡信息")):g.a.createElement("div",null,g.a.createElement("p",null,g.a.createElement("span",{style:{fontSize:"16px"}},"签/领/开户行及银行卡号"),g.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"为保障奖金的及时发放,请队长如实填写你名下的银行卡信息")),g.a.createElement(Ne,{dispatch:y,userid:b})),null!=f&&f.leader?g.a.createElement("div",{style:{padding:"20px"}},g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"开户行:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(r=f.teams[0])||void 0===r||null===(i=r.bank_account)||void 0===i?void 0:i.bank)||"--")),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"支行:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(o=f.teams[0])||void 0===o||null===(s=o.bank_account)||void 0===s?void 0:s.second_bank)||"--")),g.a.createElement("p",{style:{display:"flex"}},g.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"账号:"),g.a.createElement("span",null,(null==f?void 0:f.teams)&&(null==f||null===(l=f.teams[0])||void 0===l||null===(d=l.bank_account)||void 0===d?void 0:d.card_no)||"--"))):null,g.a.createElement(De,{Scoid:null==v?void 0:v.school_id}),g.a.createElement(de,null))},Be=K.a.TabPane;var Fe=function(e){var t=e.Prize,n=e.Accounts,r=e.getAccounts,i=e.dispatch,o=e.userid;return g.a.createElement("div",{className:"fr"},g.a.createElement("div",{className:"mb100 "},g.a.createElement(K.a,{defaultActiveKey:"1",onChange:function(e){"2"===e&&r()}},g.a.createElement(Be,{tab:"获奖证书下载",key:"1"},g.a.createElement(ne,{Prize:t})),g.a.createElement(Be,{tab:"完善个人信息",key:"2"},g.a.createElement(Pe,{userid:o,dispatch:i,Prize:t,Accounts:n})))))},Ue=n("xKgJ"),He=n("wd/R"),ze=n.n(He),Ge=K.a.TabPane;var Ve=function(e){var t,n,r,i,o,s,l=e.ChartRules,d=e.ItemData,f=e.getCharts,y=e.Selectkey,b=e.HeaderDetail,x=e.getChartRules,w=e.userinfo,E=e.Editable,S=e.dispatch,C=e.StaffDetail,k=Object(m.useState)(!1),_=Object(h.a)(k,2),T=_[0],O=_[1],A=Object(m.useState)(""),D=Object(h.a)(A,2),R=D[0],M=D[1],N=Object(m.useState)(!0),j=Object(h.a)(N,2),P=j[0],B=j[1],F=Object(m.useState)(),U=Object(h.a)(F,2),H=U[0],G=U[1],V=Object(m.useState)(),Y=Object(h.a)(V,2),$=Y[0],J=Y[1],Z=Object(v.i)().identifier;function Q(){return(Q=Object(u.a)(p.a.mark((function e(){var t,n,r,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=3;break}return c.b.info("内容不能为空"),e.abrupt("return");case 3:if(B(!1),!(t=null==H?void 0:H.id)){e.next=12;break}return e.next=8,Object(I.a)("/api/competitions/".concat(Z,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(n=l.rule_contents)||void 0===n||null===(r=n.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(t)})))||void 0===r||null===(i=r[0])||void 0===i?void 0:i.id,stage_id:null==H?void 0:H.id}});case 8:0===e.sent.status&&(c.b.info("更新成功"),O(!1),x()),e.next=16;break;case 12:return e.next=14,Object(I.a)("/api/competitions/".concat(Z,"/update_md_content.json"),{method:"post",body:{competition_module_id:y,content:R,md_content_id:null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.id,stage_id:null==H?void 0:H.id}});case 14:0===e.sent.status&&(c.b.info("更新成功"),O(!1),x());case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Object(m.useEffect)((function(){if(P){var e,t,n,r,i=null==l||null===(e=l.stages)||void 0===e?void 0:e[0];G(i);var o,a,s,c,u,h,d=null==l||null===(t=l.stages)||void 0===t||null===(n=t[0])||void 0===n||null===(r=n.children)||void 0===r?void 0:r[0];if(J(d),null!=i&&i.id)f(null==i?void 0:i.id),M((null===(o=l.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==i?void 0:i.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||"");else f(0),M((null===(c=l.rule_contents)||void 0===c||null===(u=c.filter((function(e){return 0===parseInt(e.competition_stage_id)})))||void 0===u||null===(h=u[0])||void 0===h?void 0:h.content)||"")}}),[l]);var ee=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(e,t,n){return g.a.createElement("span",null,e)}},{title:"附件",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(e){return g.a.createElement(X.a,{title:e},g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=10?(null==e?void 0:e.substr(0,10))+"...":e||"--"))}},{title:"提交人",dataIndex:"user_name",key:"user_name",width:100,render:function(e){return g.a.createElement("span",{title:e},e&&(null==e?void 0:e.length)>=6?(null==e?void 0:e.substr(0,6))+"...":e||"--")}},{title:"提交时间",dataIndex:"created_at",key:"created_at",align:"center"},{title:"状态",dataIndex:"status",key:"status",width:50,render:function(e){return g.a.createElement("span",null,1===e?"计算中":2===e?"完成":0===e?"待计算":3===e&&"错误")}},!(null!=H&&H.display_four_indicators)&&"计图挑战热身赛"===(null==H?void 0:H.name)&&{title:"数据指标1",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},!(null!=H&&H.display_four_indicators)&&"计图挑战热身赛"===(null==H?void 0:H.name)&&{title:"数据指标2",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){return(null==e?void 0:e.length)>0?null==e?void 0:e.map((function(e,t){return g.a.createElement("span",null,null==e?void 0:e.name,":",null==e?void 0:e.value," ",g.a.createElement("br",null))})):g.a.createElement("span",null,"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(e){return g.a.createElement("span",null,e||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"美学评分",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"score"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"fid"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},(null==H?void 0:H.display_four_indicators)&&{title:"总分",dataIndex:"data_other",key:"data_other",align:"left",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"total_score"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(e){return g.a.createElement("span",null,e||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Coffee"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Easyship"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Scar"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Scarf"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},!(null!=H&&H.display_four_indicators)&&(null==H?void 0:H.name.includes("可微渲染新视角生成赛题"))&&{title:"总分",dataIndex:"data_other",key:"data_other",align:"center",render:function(e){var t;return g.a.createElement("span",null,(null==e||null===(t=e.find((function(e){return"Total"===(null==e?void 0:e.name)})))||void 0===t?void 0:t.value)||"--")}},{title:"操作",dataIndex:"result_url",width:50,key:"result_url",render:function(e){return g.a.createElement("a",{href:e,target:"_blank",download:"附件"},"下载")}}].filter((function(e){return!!e}));return g.a.createElement("div",null,(null==l||null===(t=l.stages)||void 0===t?void 0:t.length)>0?null:g.a.createElement(q,null),(null==l||null===(n=l.stages)||void 0===n?void 0:n.length)>0&&g.a.createElement(K.a,{animated:!0,tabBarExtraContent:null!=w&&w.admin||null!=w&&w.business||E?g.a.createElement(a.a,{onClick:function(){O(!0)}},"编辑"):C.enrolled&&(null==H?void 0:H.start_time)&&(null==H?void 0:H.end_time)&&g.a.createElement("span",null,"提交时间:",ze()(null==H?void 0:H.start_time).format("YYYY-MM-DD HH:mm:ss"),"至",ze()(null==H?void 0:H.end_time).format("YYYY-MM-DD HH:mm:ss"),g.a.createElement(a.a,{style:{marginLeft:"20px"},disabled:ze()(null==H?void 0:H.start_time).unix()>ze()(ze()().format("YYYY-MM-DD HH:mm:s")).unix()||ze()(ze()().format("YYYY-MM-DD HH:mm:s")).unix()>ze()(null==H?void 0:H.end_time).unix(),onClick:function(){S({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(null==$?void 0:$.id)||(null==H?void 0:H.id),id:null==b?void 0:b.id}}})}},"提交结果")),onChange:function(e){var t,n,r,i,o;O(!1);var a=null==l||null===(t=l.stages)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0],s=null==a||null===(n=a.children)||void 0===n?void 0:n[0];J(s),G(a),M((null===(r=l.rule_contents)||void 0===r||null===(i=r.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==a?void 0:a.id)})))||void 0===i||null===(o=i[0])||void 0===o?void 0:o.content)||""),f((null==s?void 0:s.id)||e)}},l&&l.stages.map((function(e,t){return g.a.createElement(Ge,{tab:e.name,key:null===e.id?0:e.id},!1===T&&l&&l.rule_contents.map((function(t,n){return e.id===t.competition_stage_id||null===e.id&&0===t.competition_stage_id?g.a.createElement(L.a,{key:n,value:void 0===t.content||null===t.content?"":t.content}):void 0})))}))),(null==H||null===(r=H.children)||void 0===r?void 0:r.length)>0&&g.a.createElement(K.a,{activeKey:(null==$?void 0:$.id)+"",onChange:function(e){var t,n=null==H||null===(t=H.children)||void 0===t?void 0:t.filter((function(t){return parseInt(e)===parseInt(null==t?void 0:t.id)}))[0];J(n),f(e)}},null==H||null===(i=H.children)||void 0===i?void 0:i.map((function(e,t){return g.a.createElement(Ge,{tab:e.name,key:null===e.id?0:e.id})}))),T&&g.a.createElement("div",null,g.a.createElement(z.a,{defaultValue:R,onChange:function(e){M(e)}}),g.a.createElement("p",{style:{marginTop:"10px"}},g.a.createElement(a.a,{style:{width:"90px"},type:"primary",onClick:function(){return function(){return Q.apply(this,arguments)}()}},"提交"),g.a.createElement(a.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return O(!1)}},"取消"))),(null===(o=b.competition_modules.filter((function(e){return e.id===y})))||void 0===o||null===(s=o[0])||void 0===s?void 0:s.show_leaderboard)&&g.a.createElement(W.a,{dataSource:null==d?void 0:d.results,columns:ee}))},We=(n("DjyN"),n("NUBc")),Ke=K.a.TabPane;var qe=function(e){var t,n,i,o,a,l,c=e.loading,d=e.ChartRules,f=e.ItemData,y=e.getCharts,b=(e.Selectkey,e.HeaderDetail,e.getChartRules,e.userinfo,e.Editable,e.dispatch,e.StaffDetail,Object(m.useState)(!1)),x=Object(h.a)(b,2),w=(x[0],x[1]),E=Object(m.useState)(""),S=Object(h.a)(E,2),C=(S[0],S[1]),k=Object(m.useState)(!0),_=Object(h.a)(k,2),T=_[0],O=(_[1],Object(m.useState)()),L=Object(h.a)(O,2),I=L[0],R=L[1],M=Object(m.useState)(),N=Object(h.a)(M,2),j=N[0],P=N[1],B=(Object(v.i)().identifier,Object(m.useState)({page:1,limit:10,sort:"desc"})),F=Object(h.a)(B,2),U=F[0],H=F[1];Object(m.useEffect)((function(){var e;T&&null!=d&&null!==(e=d.stages)&&void 0!==e&&e[0]&&z()}),[null==d||null===(t=d.stages)||void 0===t?void 0:t[0]]);var z=function(){var e=Object(u.a)(p.a.mark((function e(){var t,n,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null==d||null===(t=d.stages)||void 0===t?void 0:t[0],R(a),s=null==d||null===(n=d.stages)||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.children)||void 0===o?void 0:o[0],P(s),U.id=(null==s?void 0:s.id)||(null==a?void 0:a.id),H(Object(r.a)({},U)),e.next=7,y(Object(r.a)(Object(r.a)({},U),{},{stage_id:U.id}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return g.a.createElement("div",null,(null==d||null===(n=d.stages)||void 0===n?void 0:n.length)>0?null:g.a.createElement(q,null),(null==d||null===(i=d.stages)||void 0===i?void 0:i.length)>0&&g.a.createElement(K.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!1),l=null==d||null===(n=d.stages)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],c=null==l||null===(i=l.children)||void 0===i?void 0:i[0],P(c),R(l),C((null===(o=d.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==l?void 0:l.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||""),U.page=1,U.limit=10,U.id=(null==c?void 0:c.id)||t,H(Object(r.a)({},U)),e.next=9,y(Object(r.a)({},U));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},d&&d.stages.map((function(e,t){return g.a.createElement(Ke,{tab:e.name,key:null===e.id?0:e.id})}))),(null==I||null===(o=I.children)||void 0===o?void 0:o.length)>0&&g.a.createElement(K.a,{activeKey:(null==j?void 0:j.id)+"",onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==I||null===(n=I.children)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],P(i),U.page=1,U.limit=10,U.id=t,H(Object(r.a)({},U)),e.next=5,y(Object(r.a)({},U));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},null==I||null===(a=I.children)||void 0===a?void 0:a.map((function(e,t){return g.a.createElement(Ke,{tab:e.name,key:null===e.id?0:e.id})}))),g.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),g.a.createElement("div",{style:{padding:"20px 30px"}},g.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){U.page=1,U.sort="desc"===U.sort?"asc":"desc",H(Object(r.a)({},U)),y(Object(r.a)({},U))}},"按提交时间","asc"===U.sort?"正":"倒","序排序 ",g.a.createElement("i",{className:"iconfont font14 ".concat("asc"===U.sort?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",g.a.createElement(A.a.Search,{onSearch:function(e){U.page=1,U.search=e,H(Object(r.a)({},U)),y(Object(r.a)({},U))},style:{width:"82%"},placeholder:"输入人员/战队名称进行搜索"}),g.a.createElement(s.a,{spinning:c},null==f||null===(l=f.results)||void 0===l?void 0:l.map((function(e,t){return g.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:0===t?14:30}},g.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/images/"+(null==e?void 0:e.image_url),style:{width:40,height:40,borderRadius:"50%"}}),g.a.createElement("div",{style:{marginLeft:10}},g.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},null==e?void 0:e.user_name),g.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"所属战队",g.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(null==e?void 0:e.team_name)||"- -")),g.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"学校 ",g.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(null==e?void 0:e.school_name)||"- -")))),g.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},g.a.createElement("div",null,g.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"提交时间:",null==e?void 0:e.created_at),g.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"消耗内存:",(null==e?void 0:e.ts_mem)||"- -","MB"),g.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"代码执行时间:",(null==e?void 0:e.ts_time)||"- -","秒")),g.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(null==e?void 0:e.game_identifier),target:"_blank"},g.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),g.a.createElement("span",{style:{lineHeight:"14px"}},"查看代码"))))}))),g.a.createElement(We.a,{total:null==f?void 0:f.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:U.page,onChange:function(e,t){U.page=e,H(Object(r.a)({},U)),y(Object(r.a)({},U))}})))};var Xe=function(e){var t,n=e.item,r=e.index,i=e.StaffDetail,o=Object(m.useState)(!0),s=Object(h.a)(o,2),l=s[0],c=s[1],u=Object(m.useState)(!0),d=Object(h.a)(u,2),f=d[0],p=d[1],v=Object(m.useRef)();return g.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},g.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},g.a.createElement("img",{src:D.a.IMG_SERVER+"/"+(null==n?void 0:n.pic),style:{width:220,height:130,borderRadius:"4px"}}),g.a.createElement("div",{style:{marginLeft:20,width:"75%"}},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},g.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"任务",function(e){var t=["零","一","二","三","四","五","六","七","八","九"],n=["","十","百","千","万"];e=parseInt(e);var r=function(e){for(var r=e.toString().split("").reverse(),i="",o=0;o0&&0==r[o]&&0==r[o-1]?"":t[r[o]]+(0==r[o]?n[0]:n[o]))+i;return i},i=Math.floor(e/1e4),o=e%1e4;return o.toString().length<4&&(o="0"+o),i?r(i)+"万"+r(o):r(e)}(r+1),":",g.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},null==n?void 0:n.name)),g.a.createElement("span",{style:{color:"#9096A3"}},"关卡",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},null==n?void 0:n.challenges_count)," ")),g.a.createElement("div",{ref:v},g.a.createElement(L.a,{style:{maxHeight:l&&100},value:null==n?void 0:n.description})),g.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){c(!l)}},l?"阅读全文 ":"收起全文 ",g.a.createElement("i",{className:"iconfont font14 ".concat(l?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),g.a.createElement("div",{style:{marginTop:14,maxHeight:f&&58,overflow:"hidden"}},null==n||null===(t=n.challenges)||void 0===t?void 0:t.map((function(e,t){return g.a.createElement("div",{style:{marginTop:0===t?0:12}},g.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),g.a.createElement("span",{style:{marginLeft:10}},"第",t+1,"关",null==e?void 0:e.name))}))),g.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},g.a.createElement("span",{onClick:function(){p(!f)}},f?"展开":"收起"," ",g.a.createElement("i",{className:"iconfont font14 ".concat(f?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(null==i?void 0:i.enrolled)&&g.a.createElement(a.a,{onClick:function(){window.open("/shixuns/".concat(null==n?void 0:n.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"开启挑战")))))},Ye=K.a.TabPane;var $e=function(e){var t,n,i,o,a,l,c=e.loading,d=e.ChartRules,f=e.ItemData,y=e.getCharts,b=(e.Selectkey,e.HeaderDetail,e.getChartRules,e.userinfo,e.Editable,e.dispatch,e.StaffDetail),x=Object(m.useState)(!1),w=Object(h.a)(x,2),E=(w[0],w[1]),S=Object(m.useState)(""),C=Object(h.a)(S,2),k=(C[0],C[1]),_=Object(m.useState)(!0),T=Object(h.a)(_,2),O=T[0],A=(T[1],Object(m.useState)()),L=Object(h.a)(A,2),D=L[0],I=L[1],R=Object(m.useState)(),M=Object(h.a)(R,2),N=M[0],j=M[1],P=(Object(v.i)().identifier,Object(m.useState)({page:1,limit:10})),B=Object(h.a)(P,2),F=B[0],U=B[1],H=Object(m.useState)(),z=Object(h.a)(H,2);z[0],z[1],Object(m.useEffect)((function(){var e;O&&null!=d&&null!==(e=d.stages)&&void 0!==e&&e[0]&&G()}),[null==d||null===(t=d.stages)||void 0===t?void 0:t[0]]);var G=function(){var e=Object(u.a)(p.a.mark((function e(){var t,n,i,o,a,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null==d||null===(t=d.stages)||void 0===t?void 0:t[0],I(a),s=null==d||null===(n=d.stages)||void 0===n||null===(i=n[0])||void 0===i||null===(o=i.children)||void 0===o?void 0:o[0],j(s),F.id=(null==s?void 0:s.id)||(null==a?void 0:a.id),U(Object(r.a)({},F)),e.next=7,y(Object(r.a)(Object(r.a)({},F),{},{stage_id:F.id}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return g.a.createElement("div",null,(null==d||null===(n=d.stages)||void 0===n?void 0:n.length)>0?null:g.a.createElement(q,null),(null==d||null===(i=d.stages)||void 0===i?void 0:i.length)>0&&g.a.createElement(K.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i,o,a,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!1),l=null==d||null===(n=d.stages)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],c=null==l||null===(i=l.children)||void 0===i?void 0:i[0],j(c),I(l),k((null===(o=d.rule_contents)||void 0===o||null===(a=o.filter((function(e){return parseInt(e.competition_stage_id)===parseInt(null==l?void 0:l.id)})))||void 0===a||null===(s=a[0])||void 0===s?void 0:s.content)||""),F.page=1,F.limit=10,F.id=(null==c?void 0:c.id)||t,U(Object(r.a)({},F)),e.next=9,y(Object(r.a)({},F));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},d&&d.stages.map((function(e,t){return g.a.createElement(Ye,{tab:e.name,key:null===e.id?0:e.id})}))),(null==D||null===(o=D.children)||void 0===o?void 0:o.length)>0&&g.a.createElement(K.a,{activeKey:(null==N?void 0:N.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var e=Object(u.a)(p.a.mark((function e(t){var n,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null==D||null===(n=D.children)||void 0===n?void 0:n.filter((function(e){return parseInt(t)===parseInt(null==e?void 0:e.id)}))[0],j(i),F.page=1,F.limit=10,F.id=t,U(Object(r.a)({},F)),e.next=5,y(Object(r.a)({},F));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},null==D||null===(a=D.children)||void 0===a?void 0:a.map((function(e,t){return g.a.createElement(Ye,{tab:e.name,key:null===e.id?0:e.id})}))),g.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),g.a.createElement("div",{style:{padding:"20px 30px"}},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},g.a.createElement("span",{style:{color:"#9096A3"}},"作品提交时间",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},null==f?void 0:f.start_time,"~",null==f?void 0:f.end_time)),g.a.createElement("span",{style:{color:"#9096A3"}},"成绩来源",g.a.createElement("span",{style:{color:"#333333",marginLeft:5}},0===(null==f?void 0:f.score_source)?"经验值":"预测准确率")," ")),g.a.createElement(s.a,{spinning:c},null==f||null===(l=f.results)||void 0===l?void 0:l.map((function(e,t){return g.a.createElement(Xe,{StaffDetail:b,item:e,index:t})}))),g.a.createElement(We.a,{total:null==f?void 0:f.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:F.page,onChange:function(e,t){F.page=e,U(Object(r.a)({},F)),y(Object(r.a)({},F))}})))},Je=n("UfjD"),Ze=n("qHvr");t.default=Object(b.a)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t,user:e.user}}))((function(e){e.globalSetting;var t,n,f,b,x,S,C,k,_=e.loading,O=e.dispatch,A=e.user,L=(Object(d.a)(e,["globalSetting","loading","dispatch","user"]),Object(m.useState)({avatar_url:""})),I=Object(h.a)(L,2),M=I[0],N=I[1],j=Object(m.useState)([]),P=Object(h.a)(j,2),B=P[0],F=P[1],U=Object(v.i)().identifier,z=Object(m.useState)([]),G=Object(h.a)(z,2),W=G[0],K=G[1],q=Object(m.useState)(!0),X=Object(h.a)(q,2),Y=X[0],$=X[1],J=Object(m.useState)([]),Z=Object(h.a)(J,2),Q=Z[0],te=Z[1],ne=Object(m.useState)([]),re=Object(h.a)(ne,2),ie=re[0],oe=re[1],se=Object(m.useState)(!1),le=Object(h.a)(se,2),ce=le[0],ue=le[1],he=Object(m.useState)(!1),de=Object(h.a)(he,2),fe=de[0],pe=de[1],me=Object(m.useState)(!1),ge=Object(h.a)(me,2),ve=ge[0],ye=ge[1],be=Object(m.useState)([]),xe=Object(h.a)(be,2),we=xe[0],Ee=xe[1],Se=Object(m.useState)([]),Ce=Object(h.a)(Se,2),ke=Ce[0],_e=Ce[1],Te=Object(m.useState)([]),Oe=Object(h.a)(Te,2),Ae=Oe[0],Le=Oe[1],De=Object(m.useState)(!1),Ie=Object(h.a)(De,2),Re=Ie[0],Me=Ie[1],Ne=Object(m.useState)([]),je=Object(h.a)(Ne,2),Pe=je[0],Be=je[1],He=Object(m.useState)(),ze=Object(h.a)(He,2),Ge=ze[0],We=ze[1],Ke=Object(m.useState)(!0),Xe=Object(h.a)(Ke,2),Ye=Xe[0],Qe=Xe[1],et=Object(m.useState)(!1),tt=Object(h.a)(et,2),nt=tt[0],rt=tt[1],it=Object(m.useState)(!1),ot=Object(h.a)(it,2),at=ot[0],st=ot[1],lt=Object(m.useState)(!1),ct=Object(h.a)(lt,2),ut=ct[0],ht=ct[1],dt=Object(m.useState)(!1),ft=Object(h.a)(dt,2),pt=ft[0],mt=ft[1],gt=Object(m.useState)(!1),vt=Object(h.a)(gt,2),yt=vt[0],bt=vt[1],xt=Object(m.useState)(!0),wt=Object(h.a)(xt,2),Et=wt[0],St=wt[1],Ct=Object(v.h)(),kt=Object(m.useRef)(null);function _t(){return Tt.apply(this,arguments)}function Tt(){return(Tt=Object(u.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=F,e.next=3,O({type:"competitions/getStaff",payload:{identifier:U}});case 3:return e.t1=e.sent,(0,e.t0)(e.t1),e.next=7,O({type:"competitions/getHeader",payload:{identifier:U}});case 7:t=e.sent,N(t),Object(ae.V)((null==t?void 0:t.name)||"竞赛");case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ot(e){return At.apply(this,arguments)}function At(){return(At=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Le(t.id),Ae=t.id,te(t),"entrance"!==t.module_type){e.next=9;break}return e.next=6,O({type:"competitions/getItem",payload:{url:t.module_url,module_type:"entrance"}});case 6:n=e.sent,e.next=12;break;case 9:return e.next=11,O({type:"competitions/getItem",payload:{url:t.module_url}});case 11:n=e.sent;case 12:ue(!1),ye(!1),Me(!1),K(n),rt(!1),st(!1),oe(t.module_type),"chart"===t.module_type?(ue(!0),$(!1),It()):"certificate"===t.module_type?(ye(!0),ue(!1),$(!1),Ht()):"md_tab"===t.module_type?(Me(!0),$(!1),localStorage.setItem("issee","2"),ue(!1),ye(!1),Ft()):"md_shixun"===t.module_type?(rt(!0),$(!1),Ft()):"entrance"===t.module_type?(st(!0),$(!1),Ft()):($(!0),localStorage.setItem("issee","1"));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lt(e,t,n){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(u.a)(p.a.mark((function e(t,n,r){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),Object(R.e)(O)){e.next=3;break}return e.abrupt("return");case 3:if(null==M||!M.is_authentication||null!=A&&null!==(i=A.userInfo)&&void 0!==i&&i.authentication){e.next=6;break}return O({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 6:if(null==M||!M.enroll_url){e.next=9;break}return Object(ae.Q)(null==M?void 0:M.enroll_url),e.abrupt("return");case 9:if("ismodel"!==r){e.next=23;break}if(!0!==n.member_of_course){e.next=14;break}Object(ae.Q)("/classrooms/".concat(n.course_id)),e.next=21;break;case 14:if(n.invite_code){e.next=17;break}return c.b.info("本竞赛只面向部分学校/单位开放,你暂时没有参赛资格"),e.abrupt("return");case 17:return e.next=19,O({type:"competitions/addApplytojoincourse",payload:{invite_code:n.invite_code,student:1}});case 19:0===e.sent.status&&Object(ae.Q)("/classrooms/".concat(n.course_id));case 21:e.next=27;break;case 23:if(!0!==B.enrolled){e.next=26;break}return Object(ae.Q)(r),e.abrupt("return");case 26:ht(!0);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=pe,e.next=3,O({type:"competitions/ChartRules",payload:{identifier:U}});case 3:return e.t1=e.sent,e.next=6,(0,e.t0)(e.t1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mt(){return(Mt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Charts",payload:{identifier:U,stage_id:t}});case 2:n=e.sent,K(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(){return(Nt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Qe(!0),e.next=3,O({type:"competitions/Results",payload:Object(r.a)({identifier:U,stage_id:null==t?void 0:t.id},t)});case 3:n=e.sent,K(n),Qe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jt(){return(jt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Qe(!0),e.next=3,O({type:"competitions/Results",payload:Object(r.a)({identifier:U,stage_id:null==t?void 0:t.id,module_type:"entrance"},t)});case 3:n=e.sent,K(n),Qe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pt(e){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Results",payload:{identifier:U,stage_id:t}});case 2:if(n=e.sent,"1"!==localStorage.getItem("issee")){e.next=5;break}return e.abrupt("return");case 5:K(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ft(){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(u.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Be,e.next=3,O({type:"competitions/TabResults",payload:{identifier:U,competition_module_id:Ae}});case 3:e.t1=e.sent,(0,e.t0)(e.t1);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ht(){return zt.apply(this,arguments)}function zt(){return(zt=Object(u.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Prize",payload:{identifier:U,user_id:null==A||null===(t=A.userInfo)||void 0===t?void 0:t.user_id}});case 2:n=e.sent,Ee(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(){return(Gt=Object(u.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,O({type:"competitions/Accounts",payload:{id:null==A||null===(t=A.userInfo)||void 0===t?void 0:t.user_id}});case 2:n=e.sent,_e(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(){return(Vt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Et){e.next=2;break}return e.abrupt("return");case 2:if(St(!1),!Wt()){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,O({type:"competitions/AddTeam",payload:{identifier:U,name:t}});case 7:(n=e.sent)&&0===n.status?(c.b.info("创建战队成功"),_t(),mt(!1)):St(!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wt(){var e,t,n,r;if(null!=A&&null!==(e=A.userInfo)&&void 0!==e&&e.is_teacher){if(null!=B&&null!==(n=B.teacher_staff)&&void 0!==n&&n.mutiple_limited&&null!=B&&B.enrolled)return c.b.info("你已经报名,不能重复报名"),St(!0),!0}else if(null!=B&&null!==(r=B.member_staff)&&void 0!==r&&r.mutiple_limited&&null!=B&&B.enrolled)return c.b.info("你已经报名,不能重复报名"),St(!0),!0;if(null!=B&&B.enroll_ended)return c.b.info("报名已截止,无需报名"),St(!0),!0;if(null!=A&&null!==(t=A.userInfo)&&void 0!==t&&t.is_teacher){if(!B.teacher_staff)return c.b.info("已禁止老师报名"),St(!0),!0}else if(null==B||!B.member_staff)return c.b.info("已禁止学生报名"),St(!0),!0}function Kt(){return(Kt=Object(u.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Et){e.next=2;break}return e.abrupt("return");case 2:if(!Wt()){e.next=4;break}return e.abrupt("return");case 4:return St(!1),e.next=7,O({type:"competitions/JoinTeam",payload:{identifier:U,invite_code:t}});case 7:(n=e.sent)&&0===n.status?(c.b.info("加入战队成功"),bt(!1),St(!0),_t()):St(!0);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(m.useEffect)((function(){U&&_t(),Object(ae.V)("竞赛")}),[U]),Object(m.useEffect)((function(){var e;We(1===parseInt(null==Ct||null===(e=Ct.query)||void 0===e?void 0:e.type))}),[Ct]),Object(m.useEffect)((function(){var e;if((null==M||null===(e=M.competition_modules)||void 0===e?void 0:e.length)>0){var t,n;if("赛题发布"===(null==Ct||null===(t=Ct.query)||void 0===t?void 0:t.active)){var r,i=null==M||null===(r=M.competition_modules)||void 0===r?void 0:r.find((function(e){return"赛题发布"===e.name}));if(i)return void Ot(i)}Ot(null==M||null===(n=M.competition_modules)||void 0===n?void 0:n[0])}}),[M]),g.a.createElement("div",{className:"edu-container minH500"},g.a.createElement(l.a,{className:"mt10",separator:">"},g.a.createElement(l.a.Item,null,g.a.createElement(y.a,{to:"/competitions/index"},"在线竞赛")),g.a.createElement(l.a.Item,null,M.name,M.sub_title?"-"+M.sub_title:null)),g.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},g.a.createElement(s.a,{spinning:_.effects["competitions/getHeader"]},g.a.createElement("div",{style:{height:"355px",width:"800px"}},(null==M?void 0:M.avatar_url)&&null!==(null==M?void 0:M.avatar_url)&&g.a.createElement("img",{style:{height:"355px",width:"800px"},src:D.a.IMG_SERVER+"/"+(null==M?void 0:M.avatar_url)}),!(null!=M&&M.avatar_url)&&null==(null==M?void 0:M.avatar_url)&&g.a.createElement("img",{style:{height:"355px",width:"800px"},src:D.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),g.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},g.a.createElement("p",{className:"".concat(w.a.titlesize)},M.name,M.sub_title?"-"+M.sub_title:null),g.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"奖金"),null!=M&&M.bonus?g.a.createElement("span",{style:{fontSize:"24px"}},"¥",parseInt(M&&M.bonus).toLocaleString()):g.a.createElement("span",{style:{fontSize:"24px"}},"暂无")),g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"浏览"),g.a.createElement("span",{style:{fontSize:"24px"}},parseInt(M&&M.visits_count).toLocaleString())),g.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},g.a.createElement("span",null,"报名"),g.a.createElement("span",{style:{fontSize:"24px"}},parseInt(M&&M.member_count).toLocaleString()))),g.a.createElement("p",{className:w.a.timesize,style:{marginTop:30}},g.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"竞赛时间:"),M.start_time,"~",M.end_time),g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"报名截止:"),M.enroll_end_time),"ended"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"已结束"):null,"nearly_published"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"未发布"):null,"progressing"===M.competition_status?g.a.createElement("p",{className:w.a.timesize},g.a.createElement("span",{style:{color:"#9b9b9b"}},"竞赛状态:"),"进行中"):null,g.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(null==M?void 0:M.mode)<=2&&B.enrolled&&g.a.createElement(a.a,{onClick:function(e){var t;1===(null==M?void 0:M.mode)?Ot(null===(t=M.competition_modules)||void 0===t?void 0:t.find((function(e){return"entrance"===e.module_type}))):Lt(e,M,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:2===(null==M?void 0:M.mode)||1===(null==M?void 0:M.mode)&&(null===(t=M.competition_modules)||void 0===t||null===(n=t.filter((function(e){return"entrance"===e.module_type})))||void 0===n?void 0:n.length)>0?"":"none"},className:w.a.buttonsize},1===(null==M?void 0:M.mode)&&"赛题入口",2===(null==M?void 0:M.mode)&&"进入课堂"),"ended"===M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"已结束"):null,"nearly_published"===M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"未发布"):null,"nearly_published"!==M.competition_status&&M.enroll_end&&"ended"!==M.competition_status?g.a.createElement(a.a,{type:"primary",className:w.a.buttonsize,disabled:!0},"报名截止"):null,"progressing"===M.competition_status&&1!=M.enroll_end?g.a.createElement(a.a,{type:"primary",disabled:B.enrolled&&!M.need_attachment,className:w.a.buttonsize,onClick:function(e){var t;B.enrolled&&M.need_attachment?null===(t=kt.current)||void 0===t||t.handleVisible():Lt(e,M,2===M.mode?"ismodel":M.personal?"personal":"/competitions/index/".concat(M.identifier,"/enroll"))}},B.enrolled?M.need_attachment?"上传作品":"已报名":null!=M&&M.enroll_url?"前往大赛官网报名":"立即报名"):null),"游客"!=A.userInfo.real_name&&!(null!=M&&M.enroll_url)&&g.a.createElement("span",{onClick:function(e){return Lt(e,M,2===M.mode?"ismodel":M.personal?"personal":"/competitions/index/".concat(M.identifier,"/enroll"))},className:w.a.myteam},Object(Ue.u)()?"参赛战队>>":"我的战队>>"))),g.a.createElement("div",{className:w.a.bootmdetail},g.a.createElement("div",{className:w.a.flex1},g.a.createElement(o.a,{selectedKeys:["".concat(Ae)]},M&&M.competition_modules&&M.competition_modules.map((function(e,t){if("enroll"!=e.module_type)return g.a.createElement(o.a.Item,{className:w.a.menuItem,onClick:function(){if(null!=e&&e.is_authentication){if(!Object(R.e)(O))return;c.b.info("加入战队才能查看")}else Ot(e)},key:e.id},e.name)})))),g.a.createElement("div",{className:w.a.flex6,style:{padding:(nt||at)&&0}},ve?g.a.createElement(Fe,{dispatch:O,userid:null==A||null===(f=A.userInfo)||void 0===f?void 0:f.user_id,Prize:we,Accounts:ke,getAccounts:function(){return Gt.apply(this,arguments)}}):null,ce?g.a.createElement(ee,{HeaderDetail:M,userinfo:A.userInfo,Editable:null==M||null===(b=M.permission)||void 0===b?void 0:b.editable,getCharts:function(e){return Mt.apply(this,arguments)},getChartRules:It,Selectkey:Ae,ChartRules:fe,ItemData:W}):null,Y?g.a.createElement(H,{ref:kt,StaffDetail:B,HeaderDetail:M,userinfo:A.userInfo,Editable:null==M||null===(x=M.permission)||void 0===x?void 0:x.editable,ItemData:W,setIssee:$,ModelType:ie,dispatch:O}):null,Y||nt||at||ce||ve||Re?null:g.a.createElement(V,{userinfo:A.userInfo,ModelType:ie,getrightdatas:Ot,dispatch:O,MenuItem:Q,setIssee:$,identifier:U,ItemData:W}),Re&&g.a.createElement(Ve,{dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(S=M.permission)||void 0===S?void 0:S.editable,getCharts:Pt,getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}),nt&&g.a.createElement(qe,{loading:Ye,dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(C=M.permission)||void 0===C?void 0:C.editable,getCharts:function(e){return Nt.apply(this,arguments)},getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}),at&&g.a.createElement($e,{loading:Ye,dispatch:O,StaffDetail:B,userinfo:A.userInfo,HeaderDetail:M,Editable:null==M||null===(k=M.permission)||void 0===k?void 0:k.editable,getCharts:function(e){return jt.apply(this,arguments)},getChartRules:Ft,Selectkey:Ae,ChartRules:Pe,ItemData:W}))),g.a.createElement(E.a,null),g.a.createElement(T,{getResults:Pt}),g.a.createElement(i.a,{visible:Ge,footer:null,width:720,title:"提示",centered:!0,onCancel:function(){return We(!1)}},g.a.createElement("div",{className:w.a.modal},g.a.createElement("div",null,"华为模型王者挑战赛黄金赛正式开启啦"),g.a.createElement("div",null,"本赛段总奖金高达",g.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"元"),g.a.createElement("div",null,"1、符合赛题要求的队伍(共25支)可获得奖金:12000RMB/队 ;"),g.a.createElement("div",null,"2、参与获得“荣耀殿堂”榜主的队伍,可获得由中国软件开源创新大赛组委会颁发的黄金宝箱;"),g.a.createElement("div",null,"3、各赛题精度最高的队伍,可获得由中国软件开源创新大赛组委会颁发的黄金宝箱+荣誉证书;"),g.a.createElement("div",null,"心动吧,那就快点击下方按钮报名参赛"),g.a.createElement(a.a,{type:"primary",onClick:function(){return Object(ae.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"前往报名参赛"))),g.a.createElement(i.a,{title:"选择参赛方式",visible:ut,onCancel:function(){ht(!1)},footer:!1},g.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},g.a.createElement(a.a,{type:"primary",style:{height:40},onClick:function(){bt(!0),ht(!1)}},"加入战队参赛"),g.a.createElement(a.a,{style:{height:40},onClick:function(){mt(!0),ht(!1)}},"去创建战队参赛"))),yt?g.a.createElement(Je.a,{isjoin:yt,setJoin:bt,JoinTeams:function(e){return Kt.apply(this,arguments)}}):null,pt?g.a.createElement(Ze.a,{isAddmodle:pt,setIsAdd:mt,createTeam:function(e){return Vt.apply(this,arguments)}}):null)}))},GRuw: /*!******************************************!*\ !*** ./node_modules/crypto-js/sha224.js ***! \******************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(/*! ./core */"Ib8C"),n(/*! ./sha256 */"lPiR"),i=(r=l).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),l.SHA224)},GfqC: /*!********************************************************!*\ !*** ./node_modules/rc-upload/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n.n(r),o=n("TSYQ"),a=n.n(o);function s(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}function l(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+"[]",e)})):n.append(t,e.data[t])})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot "+e.method+" "+e.action+" "+t.status+"'",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),s(t)):e.onSuccess(s(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}var c=+new Date,u=0;function h(){return"rc-upload-"+c+"-"+ ++u}var d=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some((function(e){var t,n,a=e.trim();return"."===a.charAt(0)?(t=r.toLowerCase(),n=a.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a}))}return!0};var f=function(e,t,n){var r=function e(r,i){i=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),!i.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,""+i+r.name+"/")}))}))};e.forEach((function(e){r(e.webkitGetAsEntry())}))},p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),w=a()((v(e={},o,!0),v(e,o+"-disabled",l),v(e,s,s),e)),E=l?{}:{onClick:g?this.onClick:function(){},onKeyDown:g?this.onKeyDown:function(){},onMouseEnter:y,onMouseLeave:b,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(r,p({},E,{className:w,role:"button",style:u}),i.a.createElement("input",p({},(t=x,Object.keys(t).reduce((function(e,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(e[n]=t[n]),e}),{})),{id:c,type:"file",ref:this.saveFileInput,onClick:function(e){return e.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:d,directory:m?"directory":null,webkitdirectory:m?"webkitdirectory":null,multiple:h,onChange:this.onChange})),f)}}]),t}(r.Component),w=Object.assign||function(e){for(var t=1;t=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=l.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},c.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},c.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},c.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var i=0;i>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},c.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),i=0;i<15;i++){var o=!e&&1==(r>>i&1);i<6?this.modules[i][8]=o:i<8?this.modules[i+1][8]=o:this.modules[this.moduleCount-15+i][8]=o}for(i=0;i<15;i++){o=!e&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=o:i<9?this.modules[8][15-i-1+1]=o:this.modules[8][15-i-1]=o}this.modules[this.moduleCount-8][8]=!e},c.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,i=7,o=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var l=0;l<2;l++)if(null==this.modules[r][s-l]){var c=!1;o>>i&1)),a.getMask(t,r,s-l)&&(c=!c),this.modules[r][s-l]=c,-1==--i&&(o++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},l.PAD0=236,l.PAD1=17,l.createData=function(e,t,n){for(var r=i.getRSBlocks(e,t),s=new o,c=0;c8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(l.PAD0,8),s.getLengthInBits()>=8*h));)s.put(l.PAD1,8);return l.createBytes(s,r)},l.createBytes=function(e,t){for(var n=0,r=0,i=0,o=new Array(t.length),l=new Array(t.length),c=0;c=0?p.get(m):0}}var g=0;for(d=0;d>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},f=h.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*l,o);if(l){for(var h=0;h=0;)t^=p.G15<=0;)t^=p.G18<>>=1;return t},getPatternPosition:function(e){return p.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case l:return n%3==0;case c:return(t+n)%3==0;case u:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case f:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new i([1],0),n=0;n5&&(n+=3+o-5)}for(r=0;rn)){e.next=7;break}return i.b.info("文件超过".concat(n/1024/1024/1024,"GB,不符合上传要求")),e.abrupt("return",!1);case 7:return v.push({name:t.name,file:t}),b(Object(o.a)(v)),u.onChange(v),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},O=function(){var e=Object(c.a)(d.a.mark((function e(t,n){var r,a,s,l,c,h,f,p,g;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,f=t.name,e.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((p=e.sent).data=JSON.parse(S(p.data)),0===(null==p?void 0:p.status)){e.next=12;break}return v[v.findIndex((function(e){return e.name===f}))].status="error",v[v.findIndex((function(e){return e.name===f}))].file.status="error",u.onChange(v),i.b.warn("上传失败,请重新尝试"),e.abrupt("return");case 12:return k=new w.a({endpoint:null==p||null===(r=p.data)||void 0===r?void 0:r.end_point,region:null==p||null===(a=p.data)||void 0===a?void 0:a.region,accessKeyId:null==p||null===(s=p.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==p||null===(l=p.data)||void 0===l?void 0:l.access_key_secret,bucket:null==p||null===(c=p.data)||void 0===c?void 0:c.bucket,stsToken:null==p||null===(h=p.data)||void 0===h?void 0:h.security_token}),console.log(t,"file"),_(k),g=Object(y.a)(),e.abrupt("return",new Promise((function(e,r){try{var a;k.multipartUpload("".concat(u.identifier,"/").concat(g).concat(f.indexOf(".")>-1?"."+f.split(".").pop():""),new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,t,n){try{console.log("进度",e,t,n);var r=v.findIndex((function(e){return e.name===f}));v[r].file.percent=100*e,v[r].tempCheckpoint=t,b(Object(o.a)(v))}catch(e){}},checkpoint:v[v.findIndex((function(e){return e.name===f}))].tempCheckpoint,callback:{customValue:{id:f+""},url:null==p||null===(a=p.data)||void 0===a?void 0:a.callback_url,host:null==p?void 0:p.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(n)}}).then((function(n){var r,o=v.findIndex((function(e){return e.name===f})),a="done";if(0===(null===(r=n.data)||void 0===r?void 0:r.status)){var s;t.response=null===(s=n.data)||void 0===s?void 0:s.data;var l=v.findIndex((function(e){return e.name===f}));v[l].status="done",v[l].file.status="done"}else{var c;i.b.warn(null===(c=n.data)||void 0===c?void 0:c.message),a="error"}v[o].status=a,v[o].file.status=a,u.onChange(v),e(null==n?void 0:n.data)})).catch((function(e){v[v.findIndex((function(e){return e.name===f}))].status="error",v[v.findIndex((function(e){return e.name===f}))].file.status="error",i.b.warn("上传失败,请重新尝试"),b(Object(o.a)(v)),u.onChange(v),r(e),console.log("err:",e)}))}catch(e){}})));case 17:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return Object(f.useEffect)((function(){v.every((function(e){return"done"===e||"error"===e}))&&u.onComplete(v)}),[v]),Object(f.useEffect)((function(){var e;l&&(null===(e=k)||void 0===e||e.cancel())}),[l]),Object(f.useEffect)((function(){u.uploading&&v.map(function(){var e=Object(c.a)(d.a.mark((function e(t){var r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status&&"error"!==t.status||l){e.next=6;break}return t.status="uploading",t.file.status="uploading",e.next=5,O(t,{login:null==n||null===(r=n.userInfo)||void 0===r?void 0:r.login,container_type:u.container_type,container_id:u.container_id,description:u.description});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[u.uploading]),p.a.createElement(E,Object(r.a)({},T,{height:u.height,className:u.className}),p.a.createElement("p",{className:"ant-upload-hint"},u.text||"拖拽文件或者点击上传"))}))},KmYQ: /*!***************************************************!*\ !*** ./node_modules/crypto-js/pad-zeropadding.js ***! \***************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},r.pad.ZeroPadding)},LdHM: /*!********************************************************!*\ !*** ./node_modules/rc-select/es/index.js + 6 modules ***! \********************************************************/ /*! exports provided: Option, OptGroup, default */ /*! exports used: OptGroup, Option, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return S}));var r=n("1OyB"),i=n("vuIU"),o=n("Ji7U"),a=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),h=n("4IlW"),d=n("bX4T"),f=n("YrtM"),p=n("TSYQ"),m=n.n(p),g=n("+nKL"),v=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,o=e.childrenAsData,a=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,x=e.height,w=e.itemHeight,E=e.notFoundContent,S=e.open,C=e.menuItemSelectedIcon,k=e.virtual,_=e.onSelect,T=e.onToggleOpen,O=e.onActiveValue,A=e.onScroll,L=e.onMouseEnter,D="".concat(n,"-item"),I=Object(f.a)((function(){return i}),[S,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),M=function(e){e.preventDefault()},N=function(e){R.current&&R.current.scrollTo({index:e})},j=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];return Object(k.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,o=e.props,a=o.children,l=Object(c.a)(o,["children"]);return t||!r?_(e):Object(C.a)(Object(C.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:T(a)})})).filter((function(e){return e}))}var O=n("2Qr1"),A=n("qNPg"),L=n("U8pU"),D=n("Kwbf"),I=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,o=e.allowClear,a=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,h=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,p=e.value,m=e.inputValue,g=e.optionLabelProp,v="multiple"===t||"tags"===t,y=void 0!==c?c:v||"combobox"===t,b=n||T(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var x=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!x,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!g,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!o||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!h||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var w=Object(I.d)(p);Object(D.a)(!f||w.every((function(e){return"object"===Object(L.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!v||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var E=null;Object(k.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(k.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(E=t.type,!1)})):(E=t,!0))})),E&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(E.displayName||E.name||E,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},M=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:T,flattenOptions:O.d,getLabeledValue:O.e,filterOptions:O.b,isValueDisabled:O.g,findValueOption:O.c,warningProps:R,fillOptionsWithMissingValue:O.a}),N=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(M,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);N.Option=w,N.OptGroup=S;var j=N;t.c=j},M8RZ: /*!**********************************!*\ !*** ./src/components/modal.tsx ***! \**********************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MlIO: /*!********************************************!*\ !*** ./node_modules/crypto-js/x64-core.js ***! \********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l;e.exports=(l=n(/*! ./core */"Ib8C"),i=(r=l).lib,o=i.Base,a=i.WordArray,(s=r.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r1&&void 0!==arguments[1]&&arguments[1];return!(!E(e)||!S(t))},E=function(e){return!!Object(h.p)()||(e({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},S=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=Object(u.c)()._store.getState(),r=n.user;return!(null===(e=r.userInfo)||void 0===e||!e.profile_completed)||(o.a.confirm({title:"提示",width:530,centered:!0,content:t?"按照有关政策规定,特殊实验需要先绑定手机号才能使用,请先绑定手机号码":"您需要去完善您的个人资料,才能使用此功能",okText:"立即完善",cancelText:"稍后完善",onOk:function(){u.d.push("/account/profile/edit")}}),!1)},C=function(){var e;return!(null===(e=Object(u.c)()._store.getState().user.userInfo)||void 0===e||!e.professional_certification)||(o.a.confirm({title:"提示",centered:!0,content:c.a.createElement("div",{className:"tc"},"您需要去完成您的职业认证,才能使用此功能"),okText:"立即完善",cancelText:"稍后完善",onOk:function(){Object(d.Q)("/account/certification")}}),!1)},k=function(){return!!Object(h.a)()||(o.a.warning({centered:!0,width:530,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("p",null,"您可以扫码加群@群管理员,申请操作权限哦!"),c.a.createElement("img",{src:Object(h.t)()?b.a:"".concat(x.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"我知道了",maskClosable:!0}),!1)},_=function(e,t){return!!e||(o.a.confirm({centered:!0,zIndex:1e4,width:530,title:"提示",content:c.a.createElement("div",null,c.a.createElement("p",null,t||"该实践资源需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。"),c.a.createElement("div",{style:{marginLeft:"110px"}},c.a.createElement("img",{src:v.a,width:200}),c.a.createElement("div",{style:{marginLeft:"35px"}},"群号:","714336072"))),okText:"立即联系",cancelText:"取消",onOk:function(){Object(d.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Object(u.c)()._store.getState(),a=n.shixunsDetail.detail;return 2===(null==a?void 0:a.public)||1===(null==a?void 0:a.public)||3===(null==a?void 0:a.shixun_status)?(o.a.info({centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),width:460,title:"提示",content:c.a.createElement("div",{className:"tc",style:{marginLeft:-38}},c.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},c.a.createElement("span",null,"该实践项目的状态为",2===(null==a?void 0:a.public)?"已公开":1===(null==a?void 0:a.public)?"待审核":"已关闭",",",t,"。"),c.a.createElement("p",null,"如有需要,请联系平台管理员进行技术支持。")),c.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"二维码",width:160})),okText:"我知道了"}),!0):2===(null==a?void 0:a.shixun_status)&&(o.a.confirm({centered:!0,icon:c.a.createElement(f.a,null),title:"提示",content:c.a.createElement("div",null,c.a.createElement("span",null,"该实践项目已发布,",t,"。"),c.a.createElement("br",null),c.a.createElement("span",null,"如有需要,您可以撤销发布后,再进行操作。")),okText:"撤销发布",cancelText:"取消",onOk:function(){var t;o.a.confirm({width:440,centered:!0,icon:c.a.createElement(f.a,{style:{color:"#faad14"}}),title:"提示",content:"撤销发布后,学员将无法进行练习。是否确认撤销发布?",okText:"确定撤销发布",cancelText:"取消",onOk:(t=Object(i.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e({type:"shixunsDetail/cancelRelease",payload:{id:null==a?void 0:a.identifier}});case 2:401!==t.sent.status&&(r.b.success("撤销发布成功。实训回到未发布的状态。"),e({type:"shixunsDetail/getShixunsDetail",payload:{id:null==a?void 0:a.identifier}}),e({type:"practiceSetting/getCommonData",payload:{id:null==a?void 0:a.identifier}}));case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})}}),!0)}},NnUe: /*!********************************************************************!*\ !*** ./src/pages/Competitions/Detail/component/index.less?modules ***! \********************************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.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: /*!******************************************************!*\ !*** ./node_modules/rc-tree/es/utils/conductUtil.js ***! \******************************************************/ /*! exports provided: isCheckDisabled, conductCheck */ /*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function o(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function a(e,t,n,a){var s,l=[];s=a||o;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,h=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),h=Math.max(h,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var o=new Set(e),a=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,a=void 0===i?[]:i;o.has(t)&&!r(n)&&a.filter((function(e){return!r(e.node)})).forEach((function(e){o.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);i&&!n&&(i=!1),s||!n&&!a.has(t)||(s=!0)})),i&&o.add(t.key),s&&a.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(a,o))}}(c,u,h,s):function(e,t,n,r,o){for(var a=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;a.has(t)||s.has(t)||o(n)||i.filter((function(e){return!o(e.node)})).forEach((function(e){a.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!o(n)&&e.parent&&!c.has(e.parent.key))if(o(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!o(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||a.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(s,a))}}(c,t.halfCheckedKeys,u,h,s)}},OLod: /*!***********************************************!*\ !*** ./node_modules/crypto-js/cipher-core.js ***! \***********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./evpkdf */"K3mO"),void(r.lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=t.enc,l=(s.Utf8,s.Base64),c=t.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),h=(n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),t.mode={}),d=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=h.CBC=function(){var e=d.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?o.create([1398893684,1701076831]).concat(n).concat(t):t).toString(l)},parse:function(e){var t,n=l.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),m.create({ciphertext:n,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=c.create({keySize:t+n}).compute(e,r),a=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,m.create({key:i,iv:a,salt:r})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))},OZM5: /*!*****************************************!*\ !*** ./node_modules/rc-tree/es/util.js ***! \*****************************************/ /*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */ /*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return g}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),o=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function a(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function h(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function d(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.height,s=Math.max(.25*a,2);return n<=i+s?-1:n>=o-s?1:0}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(o.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var o=i.parent;i.node.disabled||o&&e(o.key)}}}(e)})),Object(r.a)(n)}function g(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},Ot1p: /*!**************************************************************!*\ !*** ./src/components/markdown-editor/index.tsx + 6 modules ***! \**************************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/popover/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/qrcode.react/lib/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/uuid/dist/esm-browser/v4.js */function(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),o=(n("miYZ"),n("tsqr")),a=n("9og8"),s=n("tJVT"),l=n("jrin"),c=n("WmNS"),u=n.n(c),h=n("q1tI"),d=n.n(h),f=n("VrN/"),p=n.n(f),m=n("bdgK"),g=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(h.useMemo)((function(){return""}),[n]));return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},y=(n("Q9mQ"),n("diRs")),b=n("0Owb"),x=(n("dejd"),n("C+DQ"),n("D1Df")),w=n.n(x),E=n("1vsH"),S=n("m3rI"),C=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function k(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,o=e.className,a=void 0===o?"":o,s=e.children;return d.a.createElement("a",{title:n,className:a,onClick:function(){t(i)}},d.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var _=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,o=e.insertTemp,a=e.hidetoolBar,s=e.uuid,l=e.setOpenPhones,c=Object(E.E)("_educoder_session_login"),u=Object(E.E)("_educoder_session"),h=[].concat(C,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!a&&h.map((function(e,t){return d.a.createElement("li",{key:t},e.actionName?d.a.createElement(k,Object(b.a)({},e,{onActionCallback:r})):d.a.createElement("span",{className:"v-line"}))})),n?d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,o&&d.a.createElement("li",null,d.a.createElement(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:r},d.a.createElement("span",{className:"fill-tip"},"插入模板"))),d.a.createElement("li",null,d.a.createElement(y.a,{title:"打开手机扫一扫",content:d.a.createElement("div",null,d.a.createElement("span",{style:{display:"none"}},"test----",location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(S.a.API_SERVER)),d.a.createElement(w.a,{size:150,fgColor:"#000",value:location.origin+"/upload.html?_educoder_session_login="+c+"&_educoder_session="+u+"&key="+s+"&api="+encodeURIComponent(S.a.API_SERVER)}))},d.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return l(!0)}},"手机上传文件"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(k,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},T=n("M8RZ"),O=(n("+L6B"),n("2/Rp")),A=(n("y8nQ"),n("Vl3Y")),L=(n("5NDa"),n("5rEg")),D={labelCol:{span:4},wrapperCol:{span:20}},I=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(A.a,Object(b.a)({},D,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),d.a.createElement(A.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},d.a.createElement(L.a,null)),d.a.createElement(A.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},d.a.createElement(L.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))},R=n("7ahc"),M=n("k1fw"),N=(n("HmJG"),n("BjJ7")),j=A.a.useForm,P={width:280,marginRight:10},B={labelCol:{span:5},wrapperCol:{span:19}},F=function(e){var t=e.callback,n=e.onCancel,r=j(),i=Object(s.a)(r,1)[0],o=Object(h.useRef)();function a(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id,"?type=").concat(e.content_type),type:t.type})}return d.a.createElement(A.a,Object(b.a)({form:i},B,{className:"upload-image-panel",onFinish:function(e){t(Object(M.a)(Object(M.a)({},e),{},{name:o.current}))}}),d.a.createElement(A.a.Item,{label:"文件地址",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(A.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}]},d.a.createElement(L.a,{style:P})),d.a.createElement(U,{onFileChange:function(e){var t=e.target.files[0];o.current=t.name,H(t,a)}}))),d.a.createElement(A.a.Item,{label:"文件描述",name:"alt"},d.a.createElement(L.a,{style:{width:264}})),d.a.createElement(A.a.Item,{style:{textAlign:"right"}},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))};function U(e){var t=e.onFileChange;return d.a.createElement("a",{className:"upload-button"},"本地上传",d.a.createElement("input",{type:"file",onChange:t}))}function H(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(N.a,"/api/attachments.json")),r.send(n)}n("giR+");var z,G,V=n("fyUT"),W=(n("7Kak"),n("9yH6")),K=W.a.Group,q={margin:"0 8px"},X=function(e){var t=e.callback,n=e.onCancel;return d.a.createElement(A.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},d.a.createElement("div",{className:"flex-container"},d.a.createElement("span",{style:q},"单元格数:"),d.a.createElement("span",{style:q},"行数"),d.a.createElement(A.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},d.a.createElement(V.a,null)),d.a.createElement("span",{style:q},"列数"),d.a.createElement(A.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},d.a.createElement(V.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12}},d.a.createElement("span",{style:q},"对齐方式:"),d.a.createElement(A.a.Item,{name:"align"},d.a.createElement(K,null,d.a.createElement(W.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(W.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(W.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(W.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),d.a.createElement(O.a,{type:"ghost",onClick:n},"取消")))},Y=n("ErOA"),$=n("7Cbv"),J="------------",Z={default:J,left:":".concat(J),center:":".concat(J,":"),right:"".concat(J,":")},Q=n("9VGf");function ee(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var te=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ne=["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"],re=(z={},Object(l.a)(z,te+"-B","bold"),Object(l.a)(z,te+"-I","italic"),z),ie=(G={},Object(l.a)(G,"link","添加链接"),Object(l.a)(G,"code-block","添加代码块"),Object(l.a)(G,"upload-image","添加文件"),Object(l.a)(G,"add-table","添加表格"),G);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,c=e.onChange,f=e.width,y=void 0===f?"100%":f,b=e.height,x=void 0===b?400:b,w=e.miniToolbar,E=void 0!==w&&w,C=e.isFocus,k=void 0!==C&&C,O=e.watch,A=e.insertTemp,L=e.mode,D=void 0===L?"markdown":L,M=e.id,N=void 0===M?"markdown-editor-id":M,j=e.showResizeBar,P=void 0!==j&&j,B=e.noStorage,U=void 0!==B&&B,z=e.showNullButton,G=void 0!==z&&z,V=e.hidetoolBar,W=void 0!==V&&V,K=e.fullScreen,q=void 0!==K&&K,J=e.onBlur,te=e.onCMBeforeChange,oe=e.onFullScreen,ae=e.className,se=void 0===ae?"":ae,le=e.disablePaste,ce=void 0!==le&&le,ue=e.placeholder,he=void 0===ue?"":ue,de=e.values,fe=void 0===de?"":de,pe=Object(h.useState)(null),me=Object(s.a)(pe,2),ge=me[0],ve=me[1],ye=Object(h.useState)(n),be=Object(s.a)(ye,2),xe=be[0],we=be[1],Ee=Object(h.useState)(O),Se=Object(s.a)(Ee,2),Ce=Se[0],ke=Se[1],_e=Object(h.useState)(q),Te=Object(s.a)(_e,2),Oe=Te[0],Ae=Te[1],Le=Object(h.useState)(""),De=Object(s.a)(Le,2),Ie=De[0],Re=De[1],Me=Object(h.useState)(0),Ne=Object(s.a)(Me,2),je=Ne[0],Pe=Ne[1],Be=Object(h.useState)(x),Fe=Object(s.a)(Be,2),Ue=Fe[0],He=Fe[1],ze=Object(h.useState)(!1),Ge=Object(s.a)(ze,2),Ve=(Ge[0],Ge[1]),We=Object(h.useRef)(Object($.a)()),Ke=Object(h.useRef)(!1),qe=Object(h.useRef)(),Xe=Object(h.useRef)(),Ye=Object(h.useRef)(),$e=Object(h.useRef)(),Je=Object(h.useRef)(),Ze=function(){var e=Object(a.a)(u.a.mark((function e(){var t,n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:We.current}});case 2:null!=(n=e.sent)&&null!==(t=n.attachments)&&void 0!==t&&t.length&&(console.log("cm:",ge,Xe),n.attachments.map((function(e){e.content_type.indexOf("image")>-1?ge.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?ge.replaceSelection('')):e.content_type.indexOf("pdf")>-1?ge.replaceSelection('
    ').concat(e.name,"")):ge.replaceSelection("[".concat(e.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(h.useEffect)((function(){we(fe),null==ge||ge.setValue(fe)}),[fe]),Object(h.useEffect)((function(){null==oe||oe(Oe)}),[Oe]),Object(h.useEffect)((function(){if(Xe.current){var e=p.a.fromTextArea(Xe.current,{mode:D,lineNumbers:!E,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ce){var r=n.clipboardData;if(r){var i=r.types.toString(),a=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var s,l=a[1];"file"===(null===(s=a[0])||void 0===s?void 0:s.kind)&&(l=a[0]);var c=l.getAsFile(),u=c.name.split(".").pop();H(c,(function(t){var n,r,i;t.id?(null==c||null===(n=c.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('').concat(c.name,"")):ne.includes(u)?e.replaceSelection('').concat(c.name,"")):e.replaceSelection("[".concat(c.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){o.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return k&&e.focus(),e.on("paste",t),e.on("dragleave",(function(e,t){Ye.current.classList.remove("mouse-hover-md")})),e.on("dragover",(function(e,t){Ye.current.classList.add("mouse-hover-md")})),e.on("drop",(function(t,n){var r;if(Ye.current.classList.add("mouse-hover-md"),(r=n.dataTransfer.files).length>0){n.preventDefault(),n.stopPropagation();for(var i=function(t){var n=r[t],i=n.name.split(".").pop();H(n,(function(t){var r,o,a;t.id?(null==n||null===(r=n.type)||void 0===r?void 0:r.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==n||null===(o=n.type)||void 0===o?void 0:o.indexOf("video"))>-1?e.replaceSelection('')):(null==n||null===(a=n.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?e.replaceSelection('').concat(n.name,"")):ne.includes(i)?e.replaceSelection('').concat(n.name,"")):e.replaceSelection("[".concat(n.name,"](").concat(S.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))},o=0;o0||r.target.offsetWidth>0)&&(Qe(),ge.setSize("100%","100%"),ge.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Xe.current.parentElement),e}();return function(){e.unobserve(Xe.current.parentElement)}}}),[ge,Qe]),Object(h.useEffect)((function(){if(ge){for(var e=[],t=function(){var t=r[n],i=(o=Object(s.a)(t,2))[0],a=o[1],c=Object(l.a)({},i,(function(){et(a)}));e.push(c),ge.addKeyMap(c)},n=0,r=Object.entries(re);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(N);e>=je+1e4&&(!t||t!==xe)&&(window.sessionStorage.setItem(N,xe),Ve(!0))}}),1e4),Object(h.useEffect)((function(){ke(O)}),[ge,O]),Object(h.useEffect)((function(){ge&&k&&ge.focus()}),[ge,k]),Object(h.useEffect)((function(){if(Ce&&ge){var e=ge.getScrollerElement();function t(e){var t=e.target;if(Je.current){var n=t.scrollTop/t.scrollHeight;Je.current.scrollTop=Je.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[ge,Ce]),Object(h.useEffect)((function(){if(ge&&te){function e(e,t){te(e,t)}return ge.on("beforeChange",e),function(){ge.off("beforeChange",e)}}}),[ge,te]),Object(h.useEffect)((function(){if(ge&&J){function e(){J(ge.getValue())}return ge.on("blur",e),function(){ge.off("blur",e)}}}),[ge,J]),Object(h.useEffect)((function(){if(ge){function e(e){var t=e.getValue();we(t),Pe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),c&&c(t)}return ge.on("change",e),function(){ge.off("change",e)}}}),[ge,c]),Object(h.useEffect)((function(){ge&&(null==n?(ge.setValue(""),we("")):n!==ge.getValue()&&(ge.setValue(n),we(n),ge.setCursor(ge.lineCount(),0)))}),[ge,n]);var et=Object(h.useCallback)((function(e){var t=ge.getCursor(),n=ge.getSelection(),r=n.split("\n");switch(e){case"bold":return ge.replaceSelection("**"+n+"**"),""===n&&ge.setCursor(t.line,t.ch+2),ge.focus();case"italic":return ge.replaceSelection("*"+n+"*"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"code":return ge.replaceSelection("`"+n+"`"),""===n&&ge.setCursor(t.line,t.ch+1),ge.focus();case"inline-latex":return ge.replaceSelection("`$$"+n+"$$`"),""===n&&ge.setCursor(t.line,t.ch+3),ge.focus();case"latex":return ge.replaceSelection("```latex\n"+n+"\n```"),ge.setCursor(t.line+1,n.length+1),ge.focus();case"line-break":return ge.replaceSelection("
    \n"),ge.focus();case"list-ul":return""===n?ge.replaceSelection("- "+n):ge.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),ge.focus();case"list-ol":return""===n?ge.replaceSelection("1. "+n):ge.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),ge.focus();case"add-null-ch":return""===n&&ge.setCursor(t.line,t.ch+1),ge.replaceSelection("▁"),ge.focus();case"inster-template-1":return""===n&&ge.setCursor(t.line,t.ch),ge.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),ge.focus();case"eraser":return ge.setValue(""),ge.focus();case"trigger-watch":return ke(!Ce),ge.focus();case"trigger-full-screen":return Ae(!Oe),ge.focus();case"link":return void Re("link");case"code-block":return void Re("code-block");case"upload-image":return void Re("upload-image");case"add-table":return void Re("add-table");default:throw new Error}}),[ge,Ce,Oe]),tt=Object(h.useCallback)((function(e){switch(Re(""),Ie){case"link":var t=e.title,n=e.link;return ge.replaceSelection("[".concat(t,"](").concat(n,")")),ge.focus();case"code-block":var r=e.language,i=e.content;return ge.replaceSelection(["```"+r,i,"```"].join("\n")),ge.focus();case"upload-image":var o=e.src,a=e.alt,s=e.name;return o.indexOf("type=image")>-1?ge.replaceSelection("![ ".concat(a||""," ]( ").concat(o,' "').concat(a||"",'" )')):o.indexOf("type=application/pdf")>-1?ge.replaceSelection('').concat(s,"")):ge.replaceSelection('').concat(s,"")),ge.focus();case"add-table":for(var l=e.row,c=e.col,u=e.align,h="\n",d=0;d300&&(r=300),He(x+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",o),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)}}}),[ge,$e]),Object(h.useEffect)((function(){He(x)}),[x]);var it={width:ee(y),height:ee(Ue)};Object(h.useMemo)((function(){if(je){var e=new Date(je),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[je]);return d.a.createElement(h.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ye},d.a.createElement("div",{className:"markdown-editor-container ".concat(se," ").concat(Ce?"on-preview":""," ").concat(E?"mini":""," ").concat(Oe?"full-screen":""),style:it},d.a.createElement(_,{insertTemp:A,watch:Ce,fullScreen:Oe,showNullButton:G,onActionCallback:et,hidetoolBar:W,uuid:We.current,setOpenPhones:function(){Ke.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:Xe,placeholder:he})),Ce?d.a.createElement("div",{ref:Je,className:"preview-container"},"stex"===D&&d.a.createElement(v,{value:xe}),"stex"!==D&&d.a.createElement(g.a,{edit:!0,value:xe,replaces:function(e,t){var n=ge.getValue();n=n.replace(e,t),we(n),null==ge||ge.setValue(n)}})):null))),P?d.a.createElement("a",{ref:$e,className:"editor-resize"}):null,d.a.createElement(T.a,null,ie[Ie]?d.a.createElement(r.a,{centered:!0,title:ie[Ie],visible:!0,onCancel:rt,footer:null},nt):null))}},PVpz: /*!*************************************************!*\ !*** ./node_modules/crypto-js/rabbit-legacy.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./enc-base64 */"ETIr"),n(/*! ./md5 */"cv67"),n(/*! ./evpkdf */"K3mO"),n(/*! ./cipher-core */"OLod"),function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(r[0]^=c,r[1]^=h,r[2]^=u,r[3]^=d,r[4]^=c,r[5]^=h,r[6]^=u,r[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),e[t+r]^=i[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)o[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,s=r>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)},RxwV: /*!**********************************************************!*\ !*** ./node_modules/rc-cascader/es/index.js + 4 modules ***! \**********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/array-tree-filter/lib/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("q1tI"),i=n("uciX"),o=n("2W6z"),a=n.n(o),s=n("4IlW"),l=n("uK0f"),c=n.n(l);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n0;(d||!1===e.isLeaf)&&(u+=" ".concat(i,"-menu-item-expand"),e.loading||(h=r.createElement("span",{className:"".concat(i,"-menu-item-expand-icon")},a))),"hover"!==o||!d&&!1!==e.isLeaf||(c={onMouseEnter:this.delayOnSelect.bind(this,l),onMouseLeave:this.delayOnSelect.bind(this),onClick:l}),this.isActiveOption(e,t)&&(u+=" ".concat(i,"-menu-item-active"),c.ref=this.saveMenuItem(t)),e.disabled&&(u+=" ".concat(i,"-menu-item-disabled"));var f=null;e.loading&&(u+=" ".concat(i,"-menu-item-loading"),f=s||null);var p="";return"title"in e?p=e.title:"string"==typeof e[this.getFieldName("label")]&&(p=e[this.getFieldName("label")]),r.createElement("li",Object.assign({key:e[this.getFieldName("value")],className:u,title:p},c,{role:"menuitem",onMouseDown:function(e){return e.preventDefault()}}),e[this.getFieldName("label")],h,f)}},{key:"getActiveOptions",value:function(e){var t=this,n=this.props.options,r=e||this.props.activeValue;return c()(n,(function(e,n){return e[t.getFieldName("value")]===r[n]}),{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var e=this,t=this.props.options,n=this.getActiveOptions().map((function(t){return t[e.getFieldName("children")]})).filter((function(e){return!!e}));return n.unshift(t),n}},{key:"delayOnSelect",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=o.length?0:l:(l-=1)<0?o.length-1:l:0,r[i]=o[l][t.getFieldName("value")]}else if(e.keyCode===s.a.LEFT||e.keyCode===s.a.BACKSPACE)e.preventDefault(),r.splice(r.length-1,1);else if(e.keyCode===s.a.RIGHT)e.preventDefault(),o[a]&&o[a][t.getFieldName("children")]&&r.push(o[a][t.getFieldName("children")][0][t.getFieldName("value")]);else if(e.keyCode===s.a.ESC||e.keyCode===s.a.TAB)return void t.setPopupVisible(!1);r&&0!==r.length||t.setPopupVisible(!1);var c=t.getActiveOptions(r),u=c[c.length-1];t.handleMenuSelect(u,c.length-1,e),t.props.onKeyDown&&t.props.onKeyDown(e)}else t.setPopupVisible(!0)}},t.saveTrigger=function(e){t.trigger=e};var n=[];return"value"in e?n=e.value||[]:"defaultValue"in e&&(n=e.defaultValue||[]),a()(!("filedNames"in e),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),t.state={popupVisible:e.popupVisible,activeValue:n,value:n,prevProps:e},t.defaultFieldNames={label:"label",value:"value",children:"children"},t}return t=u,o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"value"in e&&!function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r0?p=r.createElement(y,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):m=" ".concat(t,"-menus-empty");var g=p;return d&&(g=d(p)),r.createElement(i.a,Object.assign({ref:this.saveTrigger},f,{popupPlacement:u,builtinPlacements:c,popupTransitionName:n,action:l?[]:["click"],popupVisible:!l&&this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(t,"-menus"),popupClassName:o+m,popup:g}),r.cloneElement(h,{onKeyDown:this.handleKeyDown,tabIndex:l?void 0:0}))}}])&&C(t.prototype,n),o&&C(t,o),u}(r.Component)).defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:b,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},A);t.a=L},S6kV: /*!********************************************!*\ !*** ./node_modules/crypto-js/mode-ofb.js ***! \********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o;e.exports=(o=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a=0;)r[u.charAt(h)]=c;var d=c[1],f=""+d;a.hasOwnProperty(f)||(o.push(d),a[f]=null)}o.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,o=e.length;i122||(u<65||h>90||n.push([32|Math.max(65,h),32|Math.min(u,90)]),u<97||h>122||n.push([-33&Math.max(97,h),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var d=[],f=[];for(o=0;op[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,o=[],a=0,s=0;a=2&&"["===d?r[a]=c(h):"\\"!==d&&(r[a]=h.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var h=[];for(i=0,o=e.length;i=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(g=!1,y="src"),g||(f[v]=y)}var S=u;if(u+=v.length,g){var C=b[1],k=v.indexOf(C),_=k+C.length;b[2]&&(k=(_=v.length-b[2].length)-C.length);var T=y.substring(5);d(l,s+S,v.substring(0,k),o,c),d(l,s+S+k,C,w(T,C),c),d(l,s+S+_,v.substring(_),o,c)}else c.push(s+S,y)}e.decorations=c};return o}function g(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var o=i>1?"":"\n\r",a=o?".":"[\\S\\s]",s="/(?=[^/*"+o+"])(?:[^/\\x5B\\x5C"+o+"]|\\x5C"+a+"|\\x5B(?:[^\\x5C\\x5D"+o+"]|\\x5C"+a+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(t,n)}var v=g({keywords:[r,o,i,a,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,o=e.ownerDocument,a=o.createElement("li");e.firstChild;)a.appendChild(e.firstChild);var s=[a];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var a=e.nodeValue,s=a.match(i);if(s){var u=a.substring(0,s.index);e.nodeValue=u;var h=a.substring(s.index+s[0].length);if(h)e.parentNode.insertBefore(o.createTextNode(h),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var d=e.firstChild;d;d=d.nextSibling)l(d)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var o=e(i,1),a=t.nextSibling;o.appendChild(r);for(var s=a;s;s=a)a=s.nextSibling,o.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function w(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*=x&&(u+=2),s>=w&&(f+=2)}}finally{v&&(v.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function S(e,t,n){var r=n||!1,i=t||null,o=document.createElement("div");return o.innerHTML="
    "+e+"
    ",o=o.firstChild,r&&y(o,r,!0),E({langExtension:i,numberLines:r,sourceNode:o,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),o.innerHTML}function C(t,n){var r=n||document.body,i=r.ownerDocument||document;function o(e){return r.getElementsByTagName(e)}for(var a=[o("pre"),o("code"),o("xmp")],s=[],l=0;l]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),x(m([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),x(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),x(g({keywords:r,hashComments:!0,cStyleComments:!0,types:h}),["c","cc","cpp","cxx","cyc","m"]),x(g({keywords:"null,true,false"}),["json"]),x(g({keywords:o,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:h}),["cs"]),x(g({keywords:i,cStyleComments:!0}),["java"]),x(g({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),x(g({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),x(g({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),x(g({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),x(g({keywords:a,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),x(g({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),x(m([],[["str",/^[\s\S]+/]]),["regex"]);var k=e.PR={createSimpleLexer:m,registerLangHandler:x,sourceDecorator:g,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:S,prettyPrint:C},_=e.define;"function"==typeof _&&_.amd&&_("google-code-prettify",[],(function(){return k}))}()},Sjjz: /*!*******************************************************************************************!*\ !*** ./src/pages/Competitions/Detail/components/AppplyDepartmentModal/index.less?modules ***! \*******************************************************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD: /*!*******************************************************************!*\ !*** ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx ***! \*******************************************************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/modal/style */"2qtc");var r=n(/*! antd/es/modal */"kLXV"),i=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),o=(n(/*! antd/es/message/style */"miYZ"),n(/*! antd/es/message */"tsqr")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! @ant-design/icons */"4i/N");t.a=function(e){var t=e.isjoin,n=e.setJoin,u=e.JoinTeams,h=Object(s.useState)(""),d=Object(a.a)(h,2),f=d[0],p=d[1];return l.a.createElement(r.a,{centered:!0,title:l.a.createElement("div",{style:{alignItems:"center",display:"flex"}},l.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"加入战队"),l.a.createElement(c.a,{onClick:function(){return n(!1)},style:{cursor:"porint"}})),visible:t,closable:!1,destroyOnClose:!0,onOk:function(){f?u(f):o.b.info("邀请码不能为空")},onCancel:function(){return n(!1)}},l.a.createElement("div",null,l.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},l.a.createElement("span",{style:{flex:"none"}},"邀请码:")," ",l.a.createElement(i.a,{placeholder:"请输入邀请码",value:f,maxLength:60,addonAfter:String(f&&f.length||0)+"/60",onChange:function(e){return p(e.target.value)}}))))}},"VrN/": /*!***************************************************!*\ !*** ./node_modules/codemirror/lib/codemirror.js ***! \***************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=h&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var E=y&&(c||h&&(null==w||w<12.11)),S=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,_=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return T(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function U(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function q(e){for(;K.length<=e;)K.push(X(K)+" ");return K[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ae=i)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,u=a.length,h=[],d=0;d-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function pe(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function ye(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){fe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){be(e),xe(e)}function Se(e){return e.target||e.srcElement}function Ce(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var ke,_e,Te=function(){if(a&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==ke){var t=A("span","​");O(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=ke?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=_e)return _e;var t=O(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(_e=r.right-n.right<3)}var Le,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Le=A("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Me=null,Ne={},je={};function Pe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ne[e]=t}function Be(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else if(e&&"string"==typeof e.name&&je.hasOwnProperty(e.name)){var t=je[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=Be(t);var n=Ne[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Ue={};function He(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?et(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ke(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.post},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,n,r){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&ze(e.doc.mode,r.state),o=ht(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ke(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&Ke(r,o-1).stateAfter,s=a?ut.fromSaved(r,a,o):new ut(r,Ve(r.mode),o);return r.iter(o,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Ke(a,(t=st(a,t)).line),c=ft(e,t.line,n),u=new We(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&pt(e,t,r,h.pos),h.pos=t.length,l=null):l=bt(gt(n,h,r.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=t:o.to>t);(r||(r=[])).push(new St(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function Pt(e,t,n,r,i){var o=Ke(e,t),a=Et&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Bt(e){for(var t;t=Mt(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=Ke(e,t),r=Bt(n);return n==r?t:$e(r)}function Ut(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ht(e,r))return t;for(;n=Nt(r);)r=n.find(1,!0).line;return $e(r)+1}function Ht(e,t){var n=Et&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,At(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,Ot(e)}Kt.prototype.lineNo=function(){return $e(this)},ye(Kt);var Xt={},Yt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Xt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var n=L("span",null,null,l?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Qt,Ae(e.display.measure)&&(a=ce(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(o,r,dt(e,o,t!=e.display.externalMeasured&&$e(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=M(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=M(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=M(r.pre.className,r.textClass||"")),r}function Zt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&h.from<=c);d++);if(h.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,h.to-c),i,o,null,s,l),o=null,r=r.slice(h.to-c),c=h.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,h,d,f=i.length,p=0,m=1,g="",v=0;;){if(v==p){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xp||E.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),E.className&&(l+=" "+E.className),E.css&&(s=(s?s+";":"")+E.css),E.startStyle&&w.from==p&&(u+=" "+E.startStyle),E.endStyle&&w.to==v&&(b||(b=[])).push(E.endStyle,w.to),E.title&&((d||(d={})).title=E.title),E.attributes)for(var S in E.attributes)(d||(d={}))[S]=E.attributes[S];E.collapsed&&(!h||It(h.marker,E)<0)&&(h=w)}else w.from>p&&v>w.from&&(v=w.from)}if(b)for(var C=0;C=f)break;for(var _=Math.min(f,v);;){if(g){var T=p+g.length;if(!h){var O=T>_?g.slice(0,_-p):g;t.addToken(t,O,a?a+l:l,u,p+O.length==v?c:"",s,d)}if(T>=_){g=g.slice(_-p),p=_;break}p=T,u=""}g=i.slice(o,o=n[m++]),a=$t(n[m++],t.cm.options)}}else for(var A=1;An)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ln(e,t,n,r){return Rn(e,In(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=jn(t.map,n,r),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&re(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(h=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:Nn}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Bn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var h=se(s,l,c),d=ae,f=u(l,h,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function Xn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Gt(r)+Sn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Je(r,n),o=r.first+r.size-1;if(i>o)return Yn(r.first+r.size-1,Ke(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ke(r,i);;){var s=er(e,a,i,t,n),l=jt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Ke(r,i=c.line)}}function Jn(e,t,n,r){r-=Gn(t);var i=t.text.length,o=oe((function(t){return Rn(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=oe((function(t){return Rn(e,n,t).top>r}),o,i)}}function Zn(e,t,n,r){return n||(n=In(e,t)),Jn(e,t,n,Vn(e,t,Rn(e,n,r),"line").top)}function Qn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Gt(t);var o=In(e,t),a=Gn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var h=(e.options.lineWrapping?nr:tr)(e,t,n,o,u,r,i);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,f,p=null,m=null,g=oe((function(t){var n=Rn(e,o,t);return n.top+=a,n.bottom+=a,!!Qn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),v=!1;if(m){var y=r-m.left=x.bottom?1:0}return Yn(n,g=ie(t.text,g,1),f,v,r-d)}function tr(e,t,n,r,i,o,a){var s=oe((function(s){var l=i[s],c=1!=l.level;return Qn(qn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Qn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function nr(e,t,n,r,i,o,a){var s=Jn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||f.to<=l)){var p=Rn(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=pm)&&(u=f,h=m)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(A("br"));Mn.appendChild(document.createTextNode("x"))}O(e.measure,Mn);var n=Mn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Ht(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((o-kn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Et&&Ft(e.doc,t)i.viewFrom?fr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)fr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):fr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):fr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):fr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[ur(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==U(a,n)&&a.push(n)}}}function fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=ur(e,t),a=e.display.view;if(!Et||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Ft(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,i,h){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==d,w=0==h,E=!m||h==m.length-1;if(y.top-v.top<=3){var S=(c?x:b)&&E,C=(c?b:x)&&w?s:(g?v:y).left,k=S?l:(g?y:v).right;u(C,v.top,k-C,v.bottom)}else{var _,T,O,A;g?(_=c&&b&&w?s:v.left,T=c?l:p(e,i,"before"),O=c?s:p(t,i,"after"),A=c&&x&&E?l:y.right):(_=c?p(e,i,"before"):s,T=!c&&b&&w?l:v.right,O=!c&&x&&E?s:y.left,A=c?p(t,i,"after"):l),u(_,v.top,T-_,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||kr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Er(e){e.state.focused||(e.display.input.focus(),Cr(e))}function Sr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,kr(e))}),100)}function Cr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,R(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,_(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function _r(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Ye(i.line,l),Tr(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Tr(e){if(e.widgets)for(var t=0;t=a&&(o=Je(t,Gt(Ke(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ar(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=On(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Cn(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var h=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-h,f=Tn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Lr(e,t){null!=t&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Rr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ir(e,t,n){null==t&&null==n||Rr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Rr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Mr(e,Xn(e,t.from),Xn(e,t.to),t.margin))}function Mr(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ir(e,i.scrollLeft,i.scrollTop)}function Nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),jr(e,t,!0),n&&li(e),ri(e,100))}function jr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,hi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Br(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+_n(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ur=function(){};function Hr(e,t){t||(t=Br(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&_r(e),zr(e,Br(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ur.prototype.update=function(){return{bottom:0,right:0}},Ur.prototype.setScrollLeft=function(){},Ur.prototype.setScrollTop=function(){},Ur.prototype.clear=function(){};var Gr={native:Fr,null:Ur};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&_(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Pr(e,t):Nr(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Wr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Wr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&_r(t),e.barMeasure=Br(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+_n(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Jr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=A("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Sn(e.display))+"px;\n height: "+(t.bottom-t.top+_n(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=qn(e,t),l=n&&n!=t?qn(e,n):s,c=Ar(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=c.scrollTop&&(Nr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Pr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=ht(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Qr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;di(e)&&(fr(e),t.dims=or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Et&&(o=Ft(e.doc,o),a=Ut(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Gt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=I();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,h=0;h-1&&(f=!1),un(e,d,u,n)),f&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=d.node.nextSibling}else{var p=vn(e,d,u,n);o.insertBefore(p,a)}u+=d.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=I()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e))r&&(t.visible=Or(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-On(e),n.top)}),t.visible=Or(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;_r(e);var i=Br(e);gr(e),Hr(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new oi(e,t);if(ai(e,n)){_r(e),si(e,n);var r=Br(e);gr(e),Hr(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+_n(e)+"px"}function hi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var d=t.target,f=a.view;d!=s;d=d.parentNode)for(var p=0;p=0&&tt(e,r.to())<=0)return n}return-1};var Si=function(e,t){this.anchor=e,this.head=t};function Ci(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=U(t,i);for(var o=1;o0:l>=0){var c=ot(s.from(),a.from()),u=it(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Si(h?u:c,h?c:u))}}return new Ei(t,n)}function ki(e,t){return new Ei([new Si(e,t||e)],0)}function _i(e){return e.text?et(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ti(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return _i(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=_i(t).ch-t.to.ch),et(n,r)}function Oi(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,p-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Mi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(i,i.lastOp==r)))a=X(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=_i(t):o.changes.push(Bi(e,t));else{var l=X(i.done);for(l&&l.ranges||zi(e.sel,i.done),o={changes:[Bi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||pe(e,"historyAdded")}function Hi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,X(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Fi(i.undone)}function zi(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Gi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Vi(e){if(!e)return null;for(var t,n=0;n-1&&(X(s)[h]=c[h],delete c[h])}}}return r}function qi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new Si(i,t)}return new Si(n||t,t)}function Xi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new Ei([qi(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(h=ao(e,h,-r,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(d=tt(h,n))&&(r<0?d<0:d>0))return io(e,h,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=ao(e,f,r,f.line==t.line?o:null)),f?io(e,f,t,r,i):null}}return t}function oo(e,t,n,r,i){var o=r||1,a=io(e,t,n,o,i)||!i&&io(e,t,n,o,!0)||io(e,t,n,-o,i)||!i&&io(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line0)){var u=[l,1],h=tt(c.from,s.from),d=tt(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)uo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else uo(e,t)}}function uo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Oi(e,t);Ui(e,t,n,e.cm?e.cm.curOp.id:NaN),po(e,t,n,_t(e,t));var r=[];Mi(e,(function(e,n){n||-1!=U(r,e.history)||(yo(e.history,t),r.push(e.history)),po(e,t,null,_t(e,t))}))}}function ho(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c=0;--f){var p=d(f);if(p)return p.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Ei(Y(e.sel.ranges,(function(e){return new Si(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){hr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=Oi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=$e(Bt(Ke(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Ri(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=Vt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof xo))){var s=[];this.collapse(s),this.children=[new xo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=L("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Pt(e,t.line,t,n,o)||t.line!=n.line&&Pt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et=!0}o.addToHistory&&Ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Bt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new St(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Ye(t,0)})),o.clearOnEnter&&he(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Co,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)hr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)dr(c,u,"text");o.atomic&&no(c.doc),ln(c,"markerAdded",c,o)}return o}ko.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ve(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&hr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&no(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},ko.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)co(this,r[l]);s?Zi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),eo(t.doc,ki(n,n)),d)for(var f=0;f=0;t--)mo(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Zo(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qo(e,t,n){var r=Zo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(n,t.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=In(t,n);a=i<0?n.text.length-1:0;var u=Rn(t,c,a).top;a=oe((function(e){return Rn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}Go.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Go.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Go.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Go.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Go.default=y?Go.macDefault:Go.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Jo(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ke(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new Si(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Qr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,fe(i.wrapper.ownerDocument,"mouseup",c),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",c),o||(be(t),r.addNew||Xi(e.doc,n,null,null,r.extend),l&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",h),he(i.scroller,"drop",c),Sr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;be(t);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new Si(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new Si(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=va(e,n,r.unit);a=r.extend?qi(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Qi(o,Ci(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Qi(o,Ci(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):$i(o,s,a,G):(s=0,Qi(o,new Ei([a],0),G),l=o.sel);var h=n;function d(t){if(0!=tt(h,t))if(h=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=B(Ke(o,n.line).text,n.ch,c),d=B(Ke(o,t.line).text,t.ch,c),f=Math.min(u,d),p=Math.max(u,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(o,m).text,y=W(v,f,c);f==p?i.push(new Si(et(m,y),et(m,y))):v.length>y&&i.push(new Si(et(m,y),et(m,W(v,p,c))))}i.length||i.push(new Si(n,n)),Qi(o,Ci(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,w=va(e,t,r.unit),E=x.anchor;tt(w.anchor,E)>0?(b=w.head,E=ot(x.from(),w.anchor)):(b=w.anchor,E=it(x.to(),w.head));var S=l.ranges.slice(0);S[s]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(o,r.ch,r.sticky),h=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],f=l==(1==d.level),p=f?d.from:d.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new Si(new et(n.line,p,m),r)}(e,new Si(st(o,E),b)),Qi(o,Ci(e,S,s),G)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),i.input.focus()),fe(i.wrapper.ownerDocument,"mousemove",g),fe(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=ei(e,(function(t){0!==t.buttons&&Ce(t)?function t(n){var a=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,h)){e.curOp.focus=I(),d(s);var l=Or(i,o);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(ei(e,(function(){p==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),v=ei(e,m);e.state.selectingText=v,he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Se(e)==n.scroller&&be(e):2==i?(r&&Xi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Sr(t)))}}function va(e,t,n){if("char"==n)return new Si(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Si(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Si(r.from,r.to)}function ya(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,n))return we(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return pe(e,n,e,Je(e.doc,o),e.display.gutterSpecs[l].className,t),we(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function xa(e,t){En(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Ea={toString:function(){return"CodeMirror.Init"}},Sa={},Ca={};function ka(e,t,n){if(!t!=!(n&&n!=Ea)){var r=e.display.dragFunctions,i=t?he:fe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function _a(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(_(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),lr(e),hr(e),Un(e),setTimeout((function(){return Hr(e)}),100)}function Ta(e,t){var n=this;if(!(this instanceof Ta))return new Ta(e,t);this.options=t=t?P(t):{},P(Sa,t,!1);var r=t.value;"string"==typeof r?r=new Do(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ta.inputStyles[t.inputStyle](this),o=this.display=new gi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,wa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;he(t.scroller,"mousedown",ei(e,ga)),he(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!En(e.display,t)){be(t);var r=e.findWordAt(n);Xi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),he(t.scroller,"contextmenu",(function(t){return xa(e,t)})),he(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xa(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}he(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),he(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),he(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!En(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Si(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Si(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}i()})),he(t.scroller,"touchcancel",i),he(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Nr(e,t.scroller.scrollTop),Pr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),he(t.scroller,"mousewheel",(function(t){return wi(e,t)})),he(t.scroller,"DOMMouseScroll",(function(t){return wi(e,t)})),he(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||Ee(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}(e,t),Ee(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Io<100))Ee(t);else if(!me(e,t)&&!En(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ro),leave:function(t){me(e,t)||Mo(e)}};var l=t.input.getField();he(l,"keyup",(function(t){return ha.call(e,t)})),he(l,"keydown",ei(e,ua)),he(l,"keypress",ei(e,da)),he(l,"focus",(function(t){return Cr(e,t)})),he(l,"blur",(function(t){return kr(e,t)}))}(this),Po(),Kr(this),this.curOp.forceUpdate=!0,Ni(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Cr(n)}),20):kr(this),Ca)Ca.hasOwnProperty(c)&&Ca[c](this,t[c],Ea);di(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?B(Ke(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)d+=a,h+="\t";if(da,l=De(t),c=null;if(s&&r.ranges.length>1)if(La&&La.text.join("\n")==t){if(r.ranges.length%La.text.length==0){c=[];for(var u=0;u=0;d--){var f=r.ranges[d],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ke(o,m.line).text.length,m.ch+X(l).length)):s&&La&&La.lineWise&&La.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var g={from:p,to:m,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Ma(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ra(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qr(t,(function(){return Ia(t,n,0,null,"paste")})),!0}function Ma(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Aa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function Na(e){for(var t=[],n=[],r=0;r0?0:-1));a=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Qo(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=se(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&d>=u.begin)){var f=h?"before":"after";return new et(n.line,d,f)}}var p=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=p(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Qo(s,t,n);if(null==a){if(o||(c=t.line+l)=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=ea(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,h="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||c(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!f))break}var g=oo(e,t,o,a,!0);return nt(o,g)&&(g.hitSide=!0),g}function Fa(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=$n(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=An(n,r,t.line),o=ce(r,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=jn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function za(e,t){return t&&(e.bad=!0),e}function Ga(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return za(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Ha(t,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=et(a.line-1,Ke(r.doc,a.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=ur(r,a.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$e(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(et(r,0),et(i+1,0),(g=+d,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(qe(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m1&&d.length>1;)if(X(h)==X(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),t++}for(var f=0,p=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);fa.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)f--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var w=et(t,f),E=et(l,d.length?X(d).length-p:0);return h.length>1||h[0]||tt(w,E)?(mo(r.doc,h,w,E,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qr(this.cm,(function(){return hr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Ia)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Wa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Wa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(r,e)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Na(r);Da({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),N(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),he(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),he(i,"paste",(function(e){me(r,e)||Ra(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),he(i,"cut",o),he(i,"copy",o),he(e.scroller,"paste",(function(t){if(!En(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),he(e.lineSpace,"selectstart",(function(t){En(e,t)||be(t)})),he(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),he(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Wa.prototype.createField=function(e){this.wrapper=Pa(),this.textarea=this.wrapper.firstChild},Wa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=vr(e);if(e.options.moveInputWithCursor){var i=qn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Wa.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wa.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Wa.prototype.getField=function(){return this.textarea},Wa.prototype.supportsTouch=function(){return!1},Wa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Wa.prototype.blur=function(){this.textarea.blur()},Wa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wa.prototype.receivedFocus=function(){this.slowPoll()},Wa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Wa.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Wa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Wa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Wa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cr(n,e),c=r.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ei(n,Qi)(n.doc,ki(o),z);var u,d=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),S){Ee(e);var m=function(){fe(window,"mouseup",m),setTimeout(v,20)};he(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ei(n,so)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Wa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Wa.prototype.setUneditable=function(){},Wa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ea&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ea,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Li(e)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Un(e),hr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++}));for(var i=n.length-1;i>=0;i--)mo(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ea&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wa(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=$o(t),i=n!=Ea&&$o(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,_a,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=fi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=fi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,gr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(kr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,gr,!0),n("singleCursorHeightPerLine",!0,gr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ta),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($o(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Aa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&$i(this.doc,r,new Si(o,c[r].to()),z)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=dt(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Ke(this.doc,e)}else r=e;return Vn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Gt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,c=(e=qn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var h=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ar(o,a)).scrollTop&&Nr(o,s.scrollTop),null!=s.scrollLeft&&Pr(o,s.scrollLeft))},triggerOnKeyDown:ti(ua),triggerOnKeyPress:ti(da),triggerOnKeyUp:ha,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ma(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ni(this,e),Un(this),this.display.input.reset(),Ir(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ta);var Ka="iter insert remove copy getEditor constructor".split(" ");for(var qa in Do.prototype)Do.prototype.hasOwnProperty(qa)&&U(Ka,qa)<0&&(Ta.prototype[qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[qa]));return ye(Do),Ta.inputStyles={textarea:Wa,contenteditable:Ua},Ta.defineMode=function(e){Ta.defaults.mode||"null"==e||(Ta.defaults.mode=e),Pe.apply(this,arguments)},Ta.defineMIME=function(e,t){je[e]=t},Ta.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ta.defineMIME("text/plain","null"),Ta.defineExtension=function(e,t){Ta.prototype[e]=t},Ta.defineDocExtension=function(e,t){Do.prototype[e]=t},Ta.fromTextArea=function(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=I();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(he(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(fe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ta((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=fe,e.on=he,e.wheelEventPixels=xi,e.Doc=Do,e.splitLines=De,e.countColumn=B,e.findColumn=W,e.isWordChar=Q,e.Pass=H,e.signal=pe,e.Line=Kt,e.changeEnd=_i,e.scrollbarModel=Gr,e.Pos=et,e.cmpPos=tt,e.modes=Ne,e.mimeModes=je,e.resolveMode=Be,e.getMode=Fe,e.modeExtensions=Ue,e.extendMode=He,e.copyState=ze,e.startState=Ve,e.innerMode=Ge,e.commands=ta,e.keyMap=Go,e.keyName=Yo,e.isModifierKey=qo,e.lookupKey=Ko,e.normalizeKeyMap=Wo,e.StringStream=We,e.SharedTextMarker=To,e.TextMarker=ko,e.LineWidget=Eo,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=Ee,e.addClass=R,e.contains=D,e.rmClass=_,e.keyNames=Fo}(Ta),Ta.version="5.58.2",Ta}()},WYAk: /*!****************************************!*\ !*** ./node_modules/crypto-js/hmac.js ***! \****************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a;e.exports=(r=n(/*! ./core */"Ib8C"),o=(i=r).lib.Base,a=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,l=o.words,c=0;c1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&O[n])return O[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=T.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(O[n]=l),l}var L,D=n("Gytx"),I=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(L||(L={}));var R=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var o;return Object(i.a)(this,n),(o=t.call(this,e)).nextFrameActionId=void 0,o.resizeFrameId=void 0,o.textArea=void 0,o.saveTextArea=function(e){o.textArea=e},o.handleResize=function(e){var t=o.state.resizeStatus,n=o.props,r=n.autoSize,i=n.onResize;t===L.NONE&&("function"==typeof i&&i(e),r&&o.resizeOnNextFrame())},o.resizeOnNextFrame=function(){cancelAnimationFrame(o.nextFrameActionId),o.nextFrameActionId=requestAnimationFrame(o.resizeTextarea)},o.resizeTextarea=function(){var e=o.props.autoSize;if(e&&o.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;w||((w=document.createElement("textarea")).setAttribute("tab-index","-1"),w.setAttribute("aria-hidden","true"),document.body.appendChild(w)),e.getAttribute("wrap")?w.setAttribute("wrap",e.getAttribute("wrap")):w.removeAttribute("wrap");var i=A(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;w.setAttribute("style","".concat(l,";").concat(_)),w.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,d=w.scrollHeight;if("border-box"===s?d+=a:"content-box"===s&&(d-=o),null!==n||null!==r){w.value=" ";var f=w.scrollHeight-o;null!==n&&(u=f*n,"border-box"===s&&(u=u+o+a),d=Math.max(u,d)),null!==r&&(h=f*r,"border-box"===s&&(h=h+o+a),c=d>h?"":"hidden",d=Math.min(h,d))}return{height:d,minHeight:u,maxHeight:h,overflowY:c,resize:"none"}}(o.textArea,!1,t,n);o.setState({textareaStyles:r,resizeStatus:L.RESIZING},(function(){cancelAnimationFrame(o.resizeFrameId),o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.RESIZED},(function(){o.resizeFrameId=requestAnimationFrame((function(){o.setState({resizeStatus:L.NONE}),o.fixFirefoxAutoScroll()}))}))}))}))}},o.renderTextArea=function(){var e=o.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,a=e.onResize,s=e.className,h=e.disabled,d=o.state,f=d.textareaStyles,p=d.resizeStatus,m=Object(S.a)(o.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),g=k()(n,s,Object(u.a)({},"".concat(n,"-disabled"),h));"value"in m&&(m.value=m.value||"");var v=Object(c.a)(Object(c.a)(Object(c.a)({},o.props.style),f),p===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(E,{onResize:o.handleResize,disabled:!(i||a)},l.createElement("textarea",Object(r.a)({},m,{className:g,style:v,ref:o.saveTextArea})))},o.state={textareaStyles:{},resizeStatus:L.NONE},o}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&I()(e.autoSize,this.props.autoSize)||this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),M=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var o=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:o},r}return Object(o.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=M},ZW9T: /*!************************************************************!*\ !*** ./src/components/monaco-editor/index.jsx + 1 modules ***! \************************************************************/ /*! exports provided: getLanguageByMirrorName, default, DiffEditor */ /*! exports used: DiffEditor, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),o=n("rAM+"),a=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function h(e,t,n,i,o){var a=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:a.startColumn,endColumn:a.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return o.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function d(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function f(){}var p={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n0||r.target.offsetWidth>0)&&W.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(V.current),e}();return Z(!0),function(){var e=W.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),W.current.subscription&&W.current.subscription.dispose(),N&&window.removeEventListener("paste",ee),n.unobserve(V.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(W.current.instance&&J)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,J]),Object(l.useEffect)((function(){var e=W.current.instance;if(e&&J){var t=m(w);g.editor.setModelLanguage(e.getModel(),t),console.log("language:",w,e.getModel(),t)}}),[w,J]),Object(l.useEffect)((function(){W.current.instance&&J&&g.editor.setTheme(A)}),[A,J]),Object(l.useEffect)((function(){var e=W.current.instance;e&&J&&(e.updateOptions(Object(r.a)({},k)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},k))}),200))}),[JSON.stringify(k),J]),Object(l.useEffect)((function(){var e=W.current.instance;e&&J&&e.layout()}),[p,y,J]);var ie=Object(l.useState)(d(p)),oe=Object(a.a)(ie,2),ae=oe[0],se=(oe[1],Object(l.useState)(d(y))),le=Object(a.a)(se,2),ce=le[0],ue=le[1],he=Object(r.a)(Object(r.a)({},S),{},{width:ae,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:V,style:he})};function v(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,h=void 0===s?"100%":s,f=e.original,p=e.modified,m=e.language,v=e.options,y=void 0===v?{}:v,b=Object(l.useRef)(),x=Object(l.useState)(null),w=Object(a.a)(x,2),E=w[0],S=w[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(g=e).editor.createDiffEditor(b.current,Object(r.a)(Object(r.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},y),{},{wordWrap:!0}));S(t);var n=function(e){var t;return b.current&&(t=new u.default((function(t){var n,r=Object(o.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(b.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){E&&E.setModel({original:g.editor.createModel(f,m),modified:g.editor.createModel(p,m)})}),[f,p,m,E]);var C={width:d(i),height:d(h)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:C})}},ZpRC: /*!*************************************************************************!*\ !*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***! \*************************************************************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function o(e,t){if(e.clientHeightt||o>e&&a=t&&s>=n?o-e-r:a>t&&sn?a-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,h="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],p=e;r(p)&&h(p);){if((p=p.parentElement)===d){f.push(p);break}null!=p&&p===document.body&&o(p)&&!o(document.documentElement)||null!=p&&o(p,u)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),x=b.height,w=b.width,E=b.top,S=b.right,C=b.bottom,k=b.left,_="start"===s||"nearest"===s?E:"end"===s?C:E+x/2,T="center"===l?k+w/2:"end"===l?S:k,O=[],A=0;A=0&&k>=0&&C<=g&&S<=m&&E>=M&&C<=j&&k>=P&&S<=N)return O;var B=getComputedStyle(L),F=parseInt(B.borderLeftWidth,10),U=parseInt(B.borderTopWidth,10),H=parseInt(B.borderRightWidth,10),z=parseInt(B.borderBottomWidth,10),G=0,V=0,W="offsetWidth"in L?L.offsetWidth-L.clientWidth-F-H:0,K="offsetHeight"in L?L.offsetHeight-L.clientHeight-U-z:0;if(d===L)G="start"===s?_:"end"===s?_-g:"nearest"===s?a(y,y+g,g,U,z,y+_,y+_+x,x):_-g/2,V="start"===l?T:"center"===l?T-m/2:"end"===l?T-m:a(v,v+m,m,F,H,v+T,v+T+w,w),G=Math.max(0,G+y),V=Math.max(0,V+v);else{G="start"===s?_-M-U:"end"===s?_-j+z+K:"nearest"===s?a(M,j,I,U,z+K,_,_+x,x):_-(M+I/2)+K/2,V="start"===l?T-P-F:"center"===l?T-(P+R/2)+W/2:"end"===l?T-N+H+W:a(P,N,R,F,H+W,T,T+w,w);var q=L.scrollLeft,X=L.scrollTop;_+=X-(G=Math.max(0,Math.min(X+G,L.scrollHeight-I+K))),T+=q-(V=Math.max(0,Math.min(q+V,L.scrollWidth-R+W)))}O.push({el:L,top:G,left:V})}return O};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,o=e.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:t}):(r.scrollTop=i,r.scrollLeft=o)}))}(s(e,r),r.behavior)}}},Zss7: /*!**********************************************!*\ !*** ./node_modules/tinycolor2/tinycolor.js ***! \**********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,n=!1;if(L[e])e=L[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=G.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=G.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=G.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=G.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=G.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=G.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=G.hex8.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=G.hex6.exec(e))return{r:N(t[1]),g:N(t[2]),b:N(t[3]),format:n?"name":"hex"};if(t=G.hex4.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=G.hex3.exec(e))return{r:N(t[1]+""+t[1]),g:N(t[2]+""+t[2]),b:N(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(V(e.r)&&V(e.g)&&V(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*R(f,255),g:255*R(p,255),b:255*R(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):V(e.h)&&V(e.s)&&V(e.v)?(r=P(e.s),s=P(e.v),t=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=i.floor(e),o=e-r,a=n*(1-t),s=n*(1-o*t),l=n*(1-(1-o)*t),c=r%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):V(e.h)&&V(e.s)&&V(e.l)&&(r=P(e.s),l=P(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=I(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(d(r));return o}function A(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=I(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[j(l(e).toString(16)),j(l(t).toString(16)),j(l(n).toString(16)),j(B(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*R(this._r,255))+"%",g:l(100*R(this._g,255))+"%",b:l(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%)":"rgba("+l(100*R(this._r,255))+"%, "+l(100*R(this._g,255))+"%, "+l(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(C,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,o=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;cl&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var L=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L);function I(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return c(1,u(0,e))}function N(e){return parseInt(e,16)}function j(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return N(e)/255}var U,H,z,G=(H="[\\s|\\(]+("+(U="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",z="[\\s|\\(]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")[,|\\s]+("+U+")\\s*\\)?",{CSS_UNIT:new RegExp(U),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function V(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},aRTE: /*!*****************************************************!*\ !*** ./node_modules/qr.js/lib/ErrorCorrectLevel.js ***! \*****************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={L:1,M:0,Q:3,H:2}},bQjk: /*!**********************************************!*\ !*** ./node_modules/crypto-js/format-hex.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a;e.exports=(a=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}},a.format.Hex)},bT9E: /*!*****************************************!*\ !*** ./node_modules/rc-util/es/omit.js ***! \*****************************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},biw7: /*!**********************************************************!*\ !*** ./node_modules/rc-table/es/context/TableContext.js ***! \**********************************************************/ /*! exports provided: default */ /*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);t.a=i},c5Ni: /*!******************************************************!*\ !*** ./node_modules/codemirror/theme/blackboard.css ***! \******************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},cv67: /*!***************************************!*\ !*** ./node_modules/crypto-js/md5.js ***! \***************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],x=e[t+9],w=e[t+10],E=e[t+11],S=e[t+12],C=e[t+13],k=e[t+14],_=e[t+15],T=o[0],O=o[1],A=o[2],L=o[3];T=c(T,O,A,L,a,7,s[0]),L=c(L,T,O,A,l,12,s[1]),A=c(A,L,T,O,f,17,s[2]),O=c(O,A,L,T,p,22,s[3]),T=c(T,O,A,L,m,7,s[4]),L=c(L,T,O,A,g,12,s[5]),A=c(A,L,T,O,v,17,s[6]),O=c(O,A,L,T,y,22,s[7]),T=c(T,O,A,L,b,7,s[8]),L=c(L,T,O,A,x,12,s[9]),A=c(A,L,T,O,w,17,s[10]),O=c(O,A,L,T,E,22,s[11]),T=c(T,O,A,L,S,7,s[12]),L=c(L,T,O,A,C,12,s[13]),A=c(A,L,T,O,k,17,s[14]),T=u(T,O=c(O,A,L,T,_,22,s[15]),A,L,l,5,s[16]),L=u(L,T,O,A,v,9,s[17]),A=u(A,L,T,O,E,14,s[18]),O=u(O,A,L,T,a,20,s[19]),T=u(T,O,A,L,g,5,s[20]),L=u(L,T,O,A,w,9,s[21]),A=u(A,L,T,O,_,14,s[22]),O=u(O,A,L,T,m,20,s[23]),T=u(T,O,A,L,x,5,s[24]),L=u(L,T,O,A,k,9,s[25]),A=u(A,L,T,O,p,14,s[26]),O=u(O,A,L,T,b,20,s[27]),T=u(T,O,A,L,C,5,s[28]),L=u(L,T,O,A,f,9,s[29]),A=u(A,L,T,O,y,14,s[30]),T=h(T,O=u(O,A,L,T,S,20,s[31]),A,L,g,4,s[32]),L=h(L,T,O,A,b,11,s[33]),A=h(A,L,T,O,E,16,s[34]),O=h(O,A,L,T,k,23,s[35]),T=h(T,O,A,L,l,4,s[36]),L=h(L,T,O,A,m,11,s[37]),A=h(A,L,T,O,y,16,s[38]),O=h(O,A,L,T,w,23,s[39]),T=h(T,O,A,L,C,4,s[40]),L=h(L,T,O,A,a,11,s[41]),A=h(A,L,T,O,p,16,s[42]),O=h(O,A,L,T,v,23,s[43]),T=h(T,O,A,L,x,4,s[44]),L=h(L,T,O,A,S,11,s[45]),A=h(A,L,T,O,_,16,s[46]),T=d(T,O=h(O,A,L,T,f,23,s[47]),A,L,a,6,s[48]),L=d(L,T,O,A,y,10,s[49]),A=d(A,L,T,O,k,15,s[50]),O=d(O,A,L,T,g,21,s[51]),T=d(T,O,A,L,S,6,s[52]),L=d(L,T,O,A,p,10,s[53]),A=d(A,L,T,O,w,15,s[54]),O=d(O,A,L,T,l,21,s[55]),T=d(T,O,A,L,b,6,s[56]),L=d(L,T,O,A,_,10,s[57]),A=d(A,L,T,O,v,15,s[58]),O=d(O,A,L,T,C,21,s[59]),T=d(T,O,A,L,m,6,s[60]),L=d(L,T,O,A,E,10,s[61]),A=d(A,L,T,O,f,15,s[62]),O=d(O,A,L,T,x,21,s[63]),o[0]=o[0]+T|0,o[1]=o[1]+O|0,o[2]=o[2]+A|0,o[3]=o[3]+L|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<>>32-o)+t}function u(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function d(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)},dQei: /*!****************************************!*\ !*** ./node_modules/qr.js/lib/math.js ***! \****************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){for(var n={glog:function(e){if(e<1)throw new Error("glog("+e+")");return n.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return n.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},r=0;r<8;r++)n.EXP_TABLE[r]=1<1?s-1:0),c=1;c1?n-1:0),o=1;o=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,o=n.inputValue,a=n.value;null==(t=i?o:r.toPrecisionAsStep(a))&&(t="");var s=r.formatWrapper(t);return w(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var a=r.getValidValue(r.toNumber(i));return r.state=g(g({},r.state),{},{inputValue:r.toPrecisionAsStep(a),value:a}),r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,o=t.min,a=this.state.focused;if(e){if(!E(e.value,n)||!E(e.max,i)||!E(e.min,o)){var s,l=a?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==o&&"number"==typeof c&&c1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(rn&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,o=void 0===i?null:i,a=this.state.inputValue,s=void 0===a?null:a,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==o||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(w(r))return r;var o=this.getPrecision(t),a=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,o+a):o+a}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:w(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),o=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(o)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),o=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(o)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var o=this.props;if(!o.disabled){var a=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(a)){var s=this["".concat(e,"Step")](a,r),l=s>o.max||so.max?s=o.max:s=p)||o||a,q=(U||0===U)&&(isNaN(U)||Number(U)<=m)||o||a,X=f()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),K)),Y=f()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),$=s?{onTouchStart:K?y:this.up,onTouchEnd:this.stop}:{onMouseDown:K?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return h.a.createElement("div",{className:z,style:g,title:v,onMouseEnter:x,onMouseLeave:w,onMouseOver:E,onMouseOut:S,onFocus:function(){return null},onBlur:function(){return null}},h.a.createElement("div",{className:"".concat(n,"-handler-wrap")},h.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":K,className:X}),c||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),h.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Y}),u||h.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),h.a.createElement("div",{className:"".concat(n,"-input-wrap")},h.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":U,required:C,type:T,placeholder:O,onPaste:j,onClick:k,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:_,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:V?this.onKeyDown:y,onKeyUp:V?this.onKeyUp:y,autoFocus:M,maxLength:R,readOnly:a,disabled:o,max:p,min:m,step:I,name:N,title:v,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(W),pattern:D,inputMode:L,onInput:P},G))))}}]),n}(h.a.Component);S.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var C=S;t.a=C},e7zE: /*!******************************************!*\ !*** ./node_modules/crypto-js/pbkdf2.js ***! \******************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,o,a,s,l,c,u,h;e.exports=(h=n(/*! ./core */"Ib8C"),n(/*! ./sha1 */"3y9D"),n(/*! ./hmac */"WYAk"),i=(r=h).lib,o=i.Base,a=i.WordArray,s=r.algo,l=s.SHA1,c=s.HMAC,u=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=c.create(n.hasher,e),i=a.create(),o=a.create([1]),s=i.words,l=o.words,u=n.keySize,h=n.iterations;s.lengthe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var f=function(e){var t=e.className,n=e.percent,r=e.prefixCls,o=e.strokeColor,s=e.strokeLinecap,h=e.strokeWidth,f=e.style,p=e.trailColor,m=e.trailWidth,g=e.transition,v=d(e,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete v.gapPosition;var y=Array.isArray(n)?n:[n],b=Array.isArray(o)?o:[o],x=u(l(y),1)[0],w=h/2,E=100-h/2,S="M ".concat("round"===s?w:0,",").concat(w,"\n L ").concat("round"===s?E:100,",").concat(w),C="0 0 100 ".concat(h),k=0;return i.a.createElement("svg",c({className:a()("".concat(r,"-line"),t),viewBox:C,preserveAspectRatio:"none",style:f},v),i.a.createElement("path",{className:"".concat(r,"-line-trail"),d:S,strokeLinecap:s,stroke:p,strokeWidth:m||h,fillOpacity:"0"}),y.map((function(e,t){var n={strokeDasharray:"".concat(e,"px, 100px"),strokeDashoffset:"-".concat(k,"px"),transition:g||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},o=b[t]||b[b.length-1];return k+=e,i.a.createElement("path",{key:t,className:"".concat(r,"-line-path"),d:S,strokeLinecap:s,stroke:o,strokeWidth:h,fillOpacity:"0",ref:x[t],style:n})})))};f.defaultProps=s;function p(){return(p=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var y=0;function b(e){return+e.replace("%","")}function x(e){return Array.isArray(e)?e:[e]}function w(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0,a=50-r/2,s=0,l=-a,c=0,u=-2*a;switch(o){case"left":s=-a,l=0,c=2*a,u=0;break;case"right":s=a,l=0,c=-2*a,u=0;break;case"bottom":l=a,u=2*a}var h="M 50,50 m ".concat(s,",").concat(l,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(c,",").concat(-u,"\n a ").concat(a,",").concat(a," 0 1 1 ").concat(-c,",").concat(u),d=2*Math.PI*a,f={stroke:n,strokeDasharray:"".concat(t/100*(d-i),"px ").concat(d,"px"),strokeDashoffset:"-".concat(i/2+e/100*(d-i),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:h,pathStyle:f}}var E=function(e){var t,n=e.prefixCls,o=e.strokeWidth,s=e.trailWidth,c=e.gapDegree,u=e.gapPosition,h=e.trailColor,d=e.strokeLinecap,f=e.style,g=e.className,E=e.strokeColor,S=e.percent,C=v(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),k=Object(r.useMemo)((function(){return y+=1}),[]),_=w(0,100,h,o,c,u),T=_.pathString,O=_.pathStyle,A=x(S),L=x(E),D=L.find((function(e){return"[object Object]"===Object.prototype.toString.call(e)})),I=m(l(A),1)[0];return i.a.createElement("svg",p({className:a()("".concat(n,"-circle"),g),viewBox:"0 0 100 100",style:f},C),D&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(n,"-gradient-").concat(k),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(D).sort((function(e,t){return b(e)-b(t)})).map((function(e,t){return i.a.createElement("stop",{key:t,offset:e,stopColor:D[e]})})))),i.a.createElement("path",{className:"".concat(n,"-circle-trail"),d:T,stroke:h,strokeLinecap:d,strokeWidth:s||o,fillOpacity:"0",style:O}),(t=0,A.map((function(e,r){var a=L[r]||L[L.length-1],s="[object Object]"===Object.prototype.toString.call(a)?"url(#".concat(n,"-gradient-").concat(k,")"):"",l=w(t,e,a,o,c,u);return t+=e,i.a.createElement("path",{key:r,className:"".concat(n,"-circle-path"),d:l.pathString,stroke:s,strokeLinecap:d,strokeWidth:o,opacity:0===e?0:1,fillOpacity:"0",style:l.pathStyle,ref:I[r]})}))).reverse())};E.defaultProps=s;var S=E},hW8S: /*!******************************************************!*\ !*** ./node_modules/rc-table/es/utils/legacyUtil.js ***! \******************************************************/ /*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */ /*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function a(e){var t=e.expandable,n=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(r.a)(Object(r.a)({},n),t):n}function s(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},jO9C: /*!************************************************!*\ !*** ./node_modules/crypto-js/pad-iso97971.js ***! \************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;e.exports=(r=n(/*! ./core */"Ib8C"),n(/*! ./cipher-core */"OLod"),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},jwmR: /*!***************************************************************************************!*\ !*** ./src/pages/Competitions/Detail/components/AppplySchoolModal/index.less?modules ***! \***************************************************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ: /*!*******************************************************!*\ !*** ./node_modules/rc-tabs/es/index.js + 50 modules ***! \*******************************************************/ /*! exports provided: TabPane, default */ /*! exports used: TabPane, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-dropdown/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMergedState.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Wt}));var r=n("rePB"),i=n("ODXe"),o=n("Ff2n"),a=n("VTBJ"),s=n("q1tI"),l=n("TSYQ"),c=n.n(l),u=n("Zm9Q"),h=n("6cGi"),d=n("KQm4"),f=n("xEkU"),p=n.n(f),m=n("t23M");function g(e){var t=Object(s.useRef)(),n=Object(s.useRef)(!1);return Object(s.useEffect)((function(){return function(){n.current=!0,p.a.cancel(t.current)}}),[]),function(){for(var r=arguments.length,i=new Array(r),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,o=r.marginRight;n+=+i.replace("px","")+ +o.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(I.a)(e.style)&&(e.style[t]=n)},re=n("bdgK"),ie=n("i8i4"),oe=n.n(ie),ae=n("wgJM"),se=n("l4aY"),le=n("m+aA"),ce=n("c+Xe"),ue=n("zT1h"),he=n("QC+M");function de(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function pe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var me,ge,ve,ye=(me=Object(fe.a)(),ge="undefined"!=typeof window?window:{},ve={animationend:pe("Animation","AnimationEnd"),transitionend:pe("Transition","TransitionEnd")},me&&("AnimationEvent"in ge||delete ve.animationend.animation,"TransitionEvent"in ge||delete ve.transitionend.transition),ve),be={};if(Object(fe.a)()){var xe=document.createElement("div");be=xe.style}var we={};function Ee(e){if(we[e])return we[e];var t=ye[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var o=Object(ae.a)((function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)}));e.current=o},t]}(),c=Object(i.a)(l,2),u=c[0],h=c[1];return Le((function(){if("none"!==o&&"end"!==o){var e=De.indexOf(o),n=De[e+1],r=t(o);!1===r?a(n):u((function(e){function t(){e.isCanceled()||a(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,o]),s.useEffect((function(){return function(){h()}}),[]),[function(){a("prepare")},o]};function Me(e,t,n,o){var l=o.motionEnter,c=void 0===l||l,u=o.motionAppear,h=void 0===u||u,d=o.motionLeave,f=void 0===d||d,p=o.motionDeadline,m=o.motionLeaveImmediately,g=o.onAppearPrepare,v=o.onEnterPrepare,y=o.onLeavePrepare,b=o.onAppearStart,x=o.onEnterStart,w=o.onLeaveStart,E=o.onAppearActive,S=o.onEnterActive,C=o.onLeaveActive,k=o.onAppearEnd,_=o.onEnterEnd,T=o.onLeaveEnd,O=o.onVisibleChanged,A=Ae(),L=Object(i.a)(A,2),D=L[0],I=L[1],R=Ae("none"),M=Object(i.a)(R,2),N=M[0],j=M[1],P=Ae(null),B=Object(i.a)(P,2),F=B[0],U=B[1],H=Object(s.useRef)(!1),z=Object(s.useRef)(null),G=Object(s.useRef)(!1),V=Object(s.useRef)(null);function W(){return n()||V.current}var K=Object(s.useRef)(!1);function q(e){var t,n=W();e&&!e.deadline&&e.target!==n||("appear"===N&&K.current?t=null==k?void 0:k(n,e):"enter"===N&&K.current?t=null==_?void 0:_(n,e):"leave"===N&&K.current&&(t=null==T?void 0:T(n,e)),!1===t||G.current||(j("none"),U(null)))}var X=function(e){var t=Object(s.useRef)(),n=Object(s.useRef)(e);n.current=e;var r=s.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Te,r),e.removeEventListener(_e,r))}return s.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Te,r),e.addEventListener(_e,r),t.current=e)},i]}(q),Y=Object(i.a)(X,1)[0],$=s.useMemo((function(){var e,t,n;switch(N){case"appear":return e={},Object(r.a)(e,"prepare",g),Object(r.a)(e,"start",b),Object(r.a)(e,"active",E),e;case"enter":return t={},Object(r.a)(t,"prepare",v),Object(r.a)(t,"start",x),Object(r.a)(t,"active",S),t;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",w),Object(r.a)(n,"active",C),n;default:return{}}}),[N]),J=Re(N,(function(e){if("prepare"===e){var t=$.prepare;return!!t&&t(W())}var n;ee in $&&U((null===(n=$[ee])||void 0===n?void 0:n.call($,W(),null))||null);return"active"===ee&&(Y(W()),p>0&&(clearTimeout(z.current),z.current=setTimeout((function(){q({deadline:!0})}),p))),!0})),Z=Object(i.a)(J,2),Q=Z[0],ee=Z[1],te=Ie(ee);K.current=te,Le((function(){I(t);var n,r=H.current;(H.current=!0,e)&&(!r&&t&&h&&(n="appear"),r&&t&&c&&(n="enter"),(r&&!t&&f||!r&&m&&!t&&f)&&(n="leave"),n&&(j(n),Q()))}),[t]),Object(s.useEffect)((function(){("appear"===N&&!h||"enter"===N&&!c||"leave"===N&&!f)&&j("none")}),[h,c,f]),Object(s.useEffect)((function(){return function(){clearTimeout(z.current),G.current=!0}}),[]),Object(s.useEffect)((function(){void 0!==D&&"none"===N&&(null==O||O(D))}),[D,N]);var ne=F;return $.prepare&&"start"===ee&&(ne=Object(a.a)({transition:"none"},ne)),[N,ee,ne,null!=D?D:t]}var Ne=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){return Object(E.a)(this,n),t.apply(this,arguments)}return Object(S.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(s.Component);var je=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(I.a)(e)&&(t=e.transitionSupport);var o=s.forwardRef((function(e,t){var o=e.visible,l=void 0===o||o,u=e.removeOnLeave,h=void 0===u||u,d=e.forceRender,f=e.children,p=e.motionName,m=e.leavedClassName,g=e.eventProps,v=n(e),y=Object(s.useRef)(),b=Object(s.useRef)();var x=Me(v,l,(function(){try{return Object(le.a)(y.current||b.current)}catch(e){return null}}),e),w=Object(i.a)(x,4),E=w[0],S=w[1],C=w[2],k=w[3],_=s.useRef(k);k&&(_.current=!0);var T=Object(s.useRef)(t);T.current=t;var O,A=s.useCallback((function(e){y.current=e,Object(ce.b)(T.current,e)}),[]),L=Object(a.a)(Object(a.a)({},g),{},{visible:l});if(f)if("none"!==E&&n(e)){var D,I;"prepare"===S?I="prepare":Ie(S)?I="active":"start"===S&&(I="start"),O=f(Object(a.a)(Object(a.a)({},L),{},{className:c()(Oe(p,E),(D={},Object(r.a)(D,Oe(p,"".concat(E,"-").concat(I)),I),Object(r.a)(D,p,"string"==typeof p),D)),style:C}),A)}else O=k?f(Object(a.a)({},L),A):!h&&_.current?f(Object(a.a)(Object(a.a)({},L),{},{className:m}),A):d?f(Object(a.a)(Object(a.a)({},L),{},{style:{display:"none"}}),A):null;else O=null;return s.createElement(Ne,{ref:b},O)}));return o.displayName="CSSMotion",o}(ke);function Pe(e){var t;return t=e&&"object"===Object(I.a)(e)&&"key"in e?e:{key:e},Object(a.a)(Object(a.a)({},t),{},{key:String(t.key)})}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Pe)}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,o=Be(e),s=Be(t);o.forEach((function(e){for(var t=!1,o=r;o1}));return c.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var Ue=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:je,n=function(e){Object(k.a)(r,e);var n=Object(_.a)(r);function r(){var e;return Object(E.a)(this,r),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(a.a)(Object(a.a)({},e),{},{status:"removed"})}))}}))},e}return Object(S.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,a=r.children,l=r.onVisibleChanged,c=Object(o.a)(r,["component","children","onVisibleChanged"]),u=i||s.Fragment,h={};return Ue.forEach((function(e){h[e]=c[e],delete c[e]})),delete c.keys,s.createElement(u,c,n.map((function(n){var r=n.status,i=Object(o.a)(n,["status"]),c="add"===r||"keep"===r;return s.createElement(t,Object(w.a)({},h,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){null==l||l(t,{key:i.key}),t||e.removeKey(i.key)}}),a)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=Be(n);return{keyEntities:Fe(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(s.Component);n.defaultProps={component:"div"}}(ke);var He=je;function ze(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Ge(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,o=e.maskMotion,l=e.maskAnimation,u=e.maskTransitionName;if(!i)return null;var h={};return(o||u||l)&&(h=Object(a.a)({motionAppear:!0},ze({motion:o,prefixCls:t,transitionName:u,animation:l}))),s.createElement(He,Object(w.a)({},h,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return s.createElement("div",{style:{zIndex:r},className:c()("".concat(t,"-mask"),n)})}))}var Ve=n("9mu1"),We=n("o0o1"),Ke=n.n(We),qe=n("HaE+"),Xe=["measure","align",null,"motion"],Ye=s.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,o=e.className,l=e.style,u=e.children,h=e.zIndex,d=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,m=e.align,g=e.point,v=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,x=e.onMouseEnter,E=e.onMouseLeave,S=e.onMouseDown,C=e.onTouchStart,k=Object(s.useRef)(),_=Object(s.useRef)(),T=Object(s.useState)(),O=Object(i.a)(T,2),A=O[0],L=O[1],D=function(e){var t=s.useState({width:0,height:0}),n=Object(i.a)(t,2),r=n[0],o=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,i=r.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){o({width:e.offsetWidth,height:e.offsetHeight})}]}(d),I=Object(i.a)(D,2),R=I[0],M=I[1];var N=function(e,t){var n=Object(s.useState)(null),r=Object(i.a)(n,2),o=r[0],a=r[1],l=Object(s.useRef)(),c=Object(s.useRef)(!1);function u(e){c.current||a(e)}function h(){ae.a.cancel(l.current)}return Object(s.useEffect)((function(){u("measure")}),[e]),Object(s.useEffect)((function(){switch(o){case"measure":t()}o&&(l.current=Object(ae.a)(Object(qe.a)(Ke.a.mark((function e(){var t,n;return Ke.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Xe.indexOf(o),(n=Xe[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[o]),Object(s.useEffect)((function(){return function(){c.current=!0,h()}}),[]),[o,function(e){h(),l.current=Object(ae.a)((function(){u((function(e){switch(o){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){d&&M(v())})),j=Object(i.a)(N,2),P=j[0],B=j[1],F=Object(s.useRef)();function U(){var e;null===(e=k.current)||void 0===e||e.forceAlign()}function H(e,t){var n=y(t);A!==n&&L(n),"align"===P&&(A!==n?Promise.resolve().then((function(){U()})):B((function(){var e;null===(e=F.current)||void 0===e||e.call(F)})),null==b||b(e,t))}var z=Object(a.a)({},ze(e));function G(){return new Promise((function(e){F.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=z[e];z[e]=function(e,n){return B(),null==t?void 0:t(e,n)}})),s.useEffect((function(){z.motionName||"motion"!==P||B()}),[z.motionName,P]),s.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return _.current}}}));var V=Object(a.a)(Object(a.a)({},R),{},{zIndex:h,opacity:"motion"!==P&&"stable"!==P&&n?0:void 0,pointerEvents:"stable"===P?void 0:"none"},l),W=!0;!(null==m?void 0:m.points)||"align"!==P&&"stable"!==P||(W=!1);var K=u;return s.Children.count(u)>1&&(K=s.createElement("div",{className:"".concat(r,"-content")},u)),s.createElement(He,Object(w.a)({visible:n,ref:_,leavedClassName:"".concat(r,"-hidden")},z,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:f,forceRender:p}),(function(e,t){var n=e.className,i=e.style,l=c()(r,o,A,n);return s.createElement(Ve.a,{target:g||v,key:"popup",ref:k,monitorWindowResize:!0,disabled:W,align:m,onAlign:H},s.createElement("div",{ref:t,className:l,onMouseEnter:x,onMouseLeave:E,onMouseDownCapture:S,onTouchStartCapture:C,style:Object(a.a)(Object(a.a)({},i),V)},K))}))}));Ye.displayName="PopupInner";var $e=Ye,Je=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,o=e.children,l=e.mobile,u=(l=void 0===l?{}:l).popupClassName,h=l.popupStyle,d=l.popupMotion,f=void 0===d?{}:d,p=l.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var g=Object(a.a)({zIndex:i},h),v=o;return s.Children.count(o)>1&&(v=s.createElement("div",{className:"".concat(n,"-content")},o)),p&&(v=p(v)),s.createElement(He,Object(w.a)({visible:r,ref:m,removeOnLeave:!0},f),(function(e,t){var r=e.className,i=e.style,o=c()(n,u,r);return s.createElement("div",{ref:t,className:o,style:Object(a.a)(Object(a.a)({},i),g)},v)}))}));Je.displayName="MobilePopupInner";var Ze=Je,Qe=["visible","mobile"],et=s.forwardRef((function(e,t){var n=e.visible,r=e.mobile,l=Object(o.a)(e,Qe),c=Object(s.useState)(n),u=Object(i.a)(c,2),h=u[0],d=u[1],f=Object(s.useState)(!1),p=Object(i.a)(f,2),m=p[0],g=p[1],v=Object(a.a)(Object(a.a)({},l),{},{visible:h});Object(s.useEffect)((function(){d(n),n&&r&&g(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4)))}())}),[n,r]);var y=m?s.createElement(Ze,Object(w.a)({},v,{mobile:r,ref:t})):s.createElement($e,Object(w.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(Ge,v),y)}));et.displayName="Popup";var tt=et,nt=s.createContext(null);function rt(){}function it(){return""}function ot(e){return e?e.ownerDocument:window.document}var at=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var st,lt,ct=(st=he.a,(lt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var r,i;return Object(E.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(se.a)(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),i=r.getPopupDomNode();Object(se.a)(n,t)&&!r.isContextMenuOnly()||Object(se.a)(i,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(le.a)(r.triggerRef.current);if(t)return t}catch(e){}return oe.a.findDOMNode(Object(C.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,i=n.popupPlacement,o=n.builtinPlacements,a=n.prefixCls,s=n.alignPoint,l=n.getPopupClassNameFromAlign;return i&&o&&t.push(function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a=r.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(r.subMenuTitle.offsetWidth,"px"))}},r.saveSubMenuTitle=function(e){r.subMenuTitle=e},r.getBaseProps=function(){var e=Object(C.a)(r).props,t=r.getMode();return{mode:"horizontal"===t?"vertical":t,visible:r.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:r.onSubMenuClick,onSelect:r.onSelect,onDeselect:r.onDeselect,onDestroy:r.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:r.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(C.a)(r),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:r.internalMenuId,manualRef:r.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},r.getMotion=function(e,t){var n=Object(C.a)(r).haveRendered,i=r.props,o=i.motion,s=i.rootPrefixCls;return Object(a.a)(Object(a.a)({},o),{},{leavedClassName:"".concat(s,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var i=e.store,o=e.eventKey,l=i.getState().defaultActiveFirst;r.isRootMenu=!1;var c=!1;return l&&(c=l[o]),mt(i,o,c),r.state={mode:e.mode,isOpen:e.isOpen},r}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef,o=t.isOpen,a=function(){e.setState({mode:n,isOpen:o})},s=o!==this.state.isOpen,l=n!==this.state.mode;(l||s)&&(ae.a.cancel(this.updateStateRaf),l?this.updateStateRaf=Object(ae.a)(a):a()),i&&i(this),"horizontal"===n&&(null==r?void 0:r.isRootMenu)&&o&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ae.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return s.createElement(_t,Object(w.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,i=t.visible,o=t.forceSubMenuRender,a=t.direction,l=this.getMotion(n,i);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||i||o,!this.haveOpened)return s.createElement("div",null);var u=c()("".concat(t.prefixCls,"-sub"),Object(r.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===a));return this.isInlineMode()?s.createElement(He,Object(w.a)({visible:t.visible,forceRender:o},l),(function(t){var n=t.className,r=t.style,i=c()(u,n);return e.renderPopupMenu(i,r)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,i=Object(a.a)({},this.props),o=this.getVisible(),l=this.getPrefixCls(),u=this.isInlineMode(),h=this.getMode(),d=c()(l,"".concat(l,"-").concat(h),(e={},Object(r.a)(e,i.className,!!i.className),Object(r.a)(e,this.getOpenClassName(),o),Object(r.a)(e,this.getActiveClassName(),i.active||o&&!u),Object(r.a)(e,this.getDisabledClassName(),i.disabled),Object(r.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(i.eventKey?this.internalMenuId="".concat(i.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},p={},m={};i.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},p={onClick:this.onTitleClick},m={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var g={},v="rtl"===i.direction;u&&(v?g.paddingRight=i.inlineIndent*i.level:g.paddingLeft=i.inlineIndent*i.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var b=null;"horizontal"!==h&&(b=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(b=s.createElement(this.props.expandIcon,Object(a.a)({},this.props))));var x=s.createElement("div",Object(w.a)({ref:this.saveSubMenuTitle,style:g,className:"".concat(l,"-title"),role:"button"},m,p,{"aria-expanded":o},y,{"aria-haspopup":"true",title:"string"==typeof i.title?i.title:void 0}),i.title,b||s.createElement("i",{className:"".concat(l,"-arrow")})),E=this.renderChildren(),S=(null===(t=i.parentMenu)||void 0===t?void 0:t.isRootMenu)?i.parentMenu.props.getPopupContainer:function(e){return e.parentNode},C=pt[h],k=i.popupOffset?{offset:i.popupOffset}:{},_=c()((n={},Object(r.a)(n,i.popupClassName,i.popupClassName&&!u),Object(r.a)(n,"".concat(l,"-rtl"),v),n)),T=i.disabled,O=i.triggerSubMenuAction,A=i.subMenuOpenDelay,L=i.forceSubMenuRender,D=i.subMenuCloseDelay,I=i.builtinPlacements;ee.forEach((function(e){return delete i[e]})),delete i.onClick;var R=v?Object(a.a)(Object(a.a)({},dt),I):Object(a.a)(Object(a.a)({},ht),I);delete i.direction;var M=this.getBaseProps(),N=u?null:this.getMotion(M.mode,M.visible);return s.createElement("li",Object(w.a)({},i,f,{className:d,role:"menuitem"}),s.createElement(ct,{prefixCls:l,popupClassName:c()("".concat(l,"-popup"),_),getPopupContainer:S,builtinPlacements:R,popupPlacement:C,popupVisible:!u&&o,popupAlign:k,popup:u?null:E,action:T||u?[]:[O],mouseEnterDelay:A,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:L,popupMotion:N},x),u?E:null)}}]),n}(s.Component);gt.defaultProps={onMouseEnter:$,onMouseLeave:$,onTitleMouseEnter:$,onTitleMouseLeave:$,onTitleClick:$,manualRef:$,mode:"vertical",title:""};var vt=Object(T.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,o=t.eventKey,a=t.subMenuKey;return{isOpen:n.indexOf(o)>-1,active:r[a]===o,selectedKeys:i}}))(gt);vt.isSubMenu=!0;var yt=vt,bt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(E.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=s.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,r){var i=e.props,l=i.overflowedIndicator,c=i.level,u=i.mode,h=i.prefixCls,d=i.theme;if(1!==c||"horizontal"!==u)return null;var f=e.props.children[0].props,p=(f.children,f.title,f.style),m=Object(o.a)(f,["children","title","style"]),g=Object(a.a)({},p),v="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==r?g=Object(a.a)(Object(a.a)({},g),{},{display:"none"}):r&&(g=Object(a.a)(Object(a.a)({},g),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),y="".concat(y,"-placeholder"));var b=d?"".concat(h,"-").concat(d):"",x={};return ee.forEach((function(e){void 0!==m[e]&&(x[e]=m[e])})),s.createElement(yt,Object(w.a)({title:l,className:"".concat(h,"-overflowed-submenu"),popupClassName:b},x,{key:v,eventKey:y,disabled:!1,style:g}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];ne(r,"display","inline-block");var i=e.getMenuItemNodes(),o=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));o.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return te(e,!0)})),o.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(S.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new re.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,o){var a=i;if("horizontal"===t.props.mode){var l=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(o>n&&(a=s.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),o===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return s.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),l=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var c=[].concat(Object(d.a)(r),[l,a]);return o===e.length-1&&c.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),c}return[].concat(Object(d.a)(r),[a])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(o.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return s.createElement(i,Object(w.a)({ref:this.childRef},r),this.renderChildren(n))}}]),n}(s.Component);bt.defaultProps={tag:"div",className:""};var xt=bt;function wt(e,t,n){var i=e.getState();e.setState({activeKey:Object(a.a)(Object(a.a)({},i.activeKey),{},Object(r.a)({},t,n))})}function Et(e){return e.eventKey||"0-menu-"}function St(e,t){var n,r=t,i=e.children,o=e.eventKey;if(r&&(Q(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===J(e,o,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(Q(i,(function(e,t){r||!e||e.props.disabled||(r=J(e,o,t))})),r):r}function Ct(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var kt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var i;return Object(E.a)(this,n),(i=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(i.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var o=null;return r!==v.a.UP&&r!==v.a.DOWN||(o=i.step(r===v.a.UP?-1:1)),o?(e.preventDefault(),wt(i.props.store,Et(i.props),o.props.eventKey),"function"==typeof t&&t(o),1):void 0},i.onItemHover=function(e){var t=e.key,n=e.hover;wt(i.props.store,Et(i.props),n?t:null)},i.onDeselect=function(e){i.props.onDeselect(e)},i.onSelect=function(e){i.props.onSelect(e)},i.onClick=function(e){i.props.onClick(e)},i.onOpenChange=function(e){i.props.onOpenChange(e)},i.onDestroy=function(e){i.props.onDestroy(e)},i.getFlatInstanceArray=function(){return i.instanceArray},i.step=function(e){var t=i.getFlatInstanceArray(),n=i.props.store.getState().activeKey[Et(i.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var o=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(o=t,!1)})),i.props.defaultActiveFirst||-1===o||(a=t.slice(o,r-1)).length&&!a.every((function(e){return!!e.props.disabled}))){var a,s=(o+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},i.renderCommonMenuItem=function(e,t,n){var r=i.props.store.getState(),o=Object(C.a)(i).props,l=J(e,o.eventKey,t),c=e.props;if(!c||"string"==typeof e.type)return e;var u=l===r.activeKey,h=Object(a.a)(Object(a.a)({mode:c.mode||o.mode,level:o.level,inlineIndent:o.inlineIndent,renderMenuItem:i.renderMenuItem,rootPrefixCls:o.prefixCls,index:t,parentMenu:o.parentMenu,manualRef:c.disabled?void 0:Object(A.a)(e.ref,Ct.bind(Object(C.a)(i))),eventKey:l,active:!c.disabled&&u,multiple:o.multiple,onClick:function(e){(c.onClick||$)(e),i.onClick(e)},onItemHover:i.onItemHover,motion:o.motion,subMenuOpenDelay:o.subMenuOpenDelay,subMenuCloseDelay:o.subMenuCloseDelay,forceSubMenuRender:o.forceSubMenuRender,onOpenChange:i.onOpenChange,onDeselect:i.onDeselect,onSelect:i.onSelect,builtinPlacements:o.builtinPlacements,itemIcon:c.itemIcon||i.props.itemIcon,expandIcon:c.expandIcon||i.props.expandIcon},n),{},{direction:o.direction});return("inline"===o.mode||Y.any)&&(h.triggerSubMenuAction="click"),s.cloneElement(e,Object(a.a)(Object(a.a)({},h),{},{key:l||t}))},i.renderMenuItem=function(e,t,n){if(!e)return null;var r=i.props.store.getState(),o={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:i.props.triggerSubMenuAction,subMenuKey:n};return i.renderCommonMenuItem(e,t,o)},e.store.setState({activeKey:Object(a.a)(Object(a.a)({},e.store.getState().activeKey),{},Object(r.a)({},e.eventKey,St(e,e.activeKey)))}),i.instanceArray=[],i}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[Et(t)],r=St(t,n);if(r!==n)wt(t.store,Et(t),r);else if("activeKey"in e){r!==St(e,e.activeKey)&&wt(t.store,Et(t),r)}}},{key:"render",value:function(){var e=this,t=Object(w.a)({},this.props);this.instanceArray=[];var n={className:c()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,o=t.visible,a=t.level,l=t.mode,h=t.overflowedIndicator,d=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,s.createElement(xt,Object(w.a)({},t,{prefixCls:r,mode:l,tag:"ul",level:a,theme:d,visible:o,overflowedIndicator:h},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(s.Component);kt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:$};var _t=Object(T.b)()(kt),Tt=n("Kwbf");function Ot(e,t,n){var r=e.prefixCls,i=e.motion,o=e.defaultMotions,a=void 0===o?{}:o,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(I.a)(s)&&s)Object(Tt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=a[n];return u||(c?null:a.other)}var At=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(e){var r;Object(E.a)(this,n),(r=t.call(this,e)).onSelect=function(e){var t=Object(C.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onSelect(Object(a.a)(Object(a.a)({},e),{},{selectedKeys:n}))}},r.onClick=function(e){var t=r.getRealMenuMode(),n=Object(C.a)(r),i=n.store,o=n.props.onOpenChange;"inline"===t||"openKeys"in r.props||(i.setState({openKeys:[]}),o([])),r.props.onClick(e)},r.onKeyDown=function(e,t){r.innerMenu.getWrappedInstance().onKeyDown(e,t)},r.onOpenChange=function(e){var t=Object(C.a)(r).props,n=r.store.getState().openKeys.concat(),i=!1,o=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var r=n.indexOf(e.key);(t=-1!==r)&&n.splice(r,1)}i=i||t};Array.isArray(e)?e.forEach(o):o(e),i&&("openKeys"in r.props||r.store.setState({openKeys:n}),t.onOpenChange(n))},r.onDeselect=function(e){var t=Object(C.a)(r).props;if(t.selectable){var n=r.store.getState().selectedKeys.concat(),i=e.key,o=n.indexOf(i);-1!==o&&n.splice(o,1),"selectedKeys"in t||r.store.setState({selectedKeys:n}),t.onDeselect(Object(a.a)(Object(a.a)({},e),{},{selectedKeys:n}))}},r.onMouseEnter=function(e){r.restoreModeVerticalFromInline();var t=r.props.onMouseEnter;t&&t(e)},r.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,i="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,o="font-size"===e.propertyName&&i.indexOf("anticon")>=0;(t||o)&&r.restoreModeVerticalFromInline()},r.setInnerMenu=function(e){r.innerMenu=e},r.isRootMenu=!0;var i=e.defaultSelectedKeys,o=e.defaultOpenKeys;return"selectedKeys"in e&&(i=e.selectedKeys||[]),"openKeys"in e&&(o=e.openKeys||[]),r.store=Object(T.c)({selectedKeys:i,openKeys:o,activeKey:{"0-menu-":St(e,e.activeKey)}}),r.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:r.store},r}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(a.a)({},Object(O.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(a.a)(Object(a.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ot(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,s.createElement(T.a,{store:this.store},s.createElement(_t,Object(w.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.store,i=r.getState(),o={},a={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(a.switchingModeFromInline=!0),"openKeys"in e?o.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(a.switchingModeFromInline=!0,a.inlineOpenKeys=i.openKeys,o.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(o.openKeys=t.inlineOpenKeys,a.inlineOpenKeys=[])),Object.keys(o).length&&r.setState(o),a}}]),n}(s.Component);At.defaultProps={selectable:!0,onClick:$,onSelect:$,onOpenChange:$,onDeselect:$,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:s.createElement("span",null,"···")};var Lt=At,Dt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(E.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===v.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,o=n.onMouseLeave;i({key:r,hover:!1}),o({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,o=n.onMouseEnter;i({key:r,hover:!0}),o({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,o=n.onClick,a=n.onSelect,s=n.onDeselect,l=n.isSelected,c={key:r,keyPath:[r],item:Object(C.a)(e),domEvent:t};o(c),i?l?s(c):a(c):l||a(c)},e.saveNode=function(t){e.node=t},e}return Object(S.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(a.a)({},this.props),n=c()(this.getPrefixCls(),t.className,(e={},Object(r.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(r.a)(e,this.getSelectedClassName(),t.isSelected),Object(r.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(a.a)(Object(a.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(a.a)(Object(a.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var o={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},l=Object(a.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?l.paddingRight=t.inlineIndent*t.level:l.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=s.createElement(this.props.itemIcon,this.props)),s.createElement("li",Object(w.a)({},Object(O.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,o,{style:l,ref:this.saveNode}),t.children,u)}}]),n}(s.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:$,onMouseEnter:$,onMouseLeave:$,manualRef:$};var It=Object(T.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:Array.isArray(r)?-1!==r.indexOf(i):r===i}}))(Dt),Rt=function(e){Object(k.a)(n,e);var t=Object(_.a)(n);function n(){var e;return Object(E.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(S.a)(n,[{key:"render",value:function(){var e=Object(w.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),o="".concat(r,"-item-group-list"),a=e.title,l=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,s.createElement("li",Object(w.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(r,"-item-group")}),s.createElement("div",{className:i,title:"string"==typeof a?a:void 0},a),s.createElement("ul",{className:o},s.Children.map(l,this.renderInnerMenuItem)))}}]),n}(s.Component);Rt.isMenuItemGroup=!0,Rt.defaultProps={disabled:!0};var Mt=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return s.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Mt.defaultProps={disabled:!0,className:"",style:{}};var Nt=Lt,jt=n("eDIo");var Pt=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return r&&!1!==r.showAdd?s.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null==i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));var Bt=s.forwardRef((function(e,t){var n=e.prefixCls,o=e.id,a=e.tabs,l=e.locale,u=e.mobile,h=e.moreIcon,d=void 0===h?"More":h,f=e.moreTransitionName,p=e.style,m=e.className,g=e.editable,y=e.tabBarGutter,b=e.rtl,x=e.onTabClick,w=Object(s.useState)(!1),E=Object(i.a)(w,2),S=E[0],C=E[1],k=Object(s.useState)(null),_=Object(i.a)(k,2),T=_[0],O=_[1],A="".concat(o,"-more-popup"),L="".concat(n,"-dropdown"),D=null!==T?"".concat(A,"-").concat(T):null,I=null==l?void 0:l.dropdownAriaLabel,R=s.createElement(Nt,{onClick:function(e){var t=e.key,n=e.domEvent;x(t,n),C(!1)},id:A,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[T],"aria-label":void 0!==I?I:"expanded dropdown"},a.map((function(e){return s.createElement(It,{key:e.key,id:"".concat(A,"-").concat(e.key),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function M(e){for(var t=a.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===T}))||0,r=t.length,i=0;it?"left":"right"})})),G=Object(i.a)(z,2),V=G[0],W=G[1],K=Ht(0,(function(e,t){!H&&I&&I({direction:e>t?"top":"bottom"})})),q=Object(i.a)(K,2),X=q[0],Y=q[1],$=Object(s.useState)(0),J=Object(i.a)($,2),Z=J[0],Q=J[1],ee=Object(s.useState)(0),te=Object(i.a)(ee,2),ne=te[0],re=te[1],ie=Object(s.useState)(0),oe=Object(i.a)(ie,2),ae=oe[0],se=oe[1],le=Object(s.useState)(0),ce=Object(i.a)(le,2),ue=ce[0],he=ce[1],de=Object(s.useState)(null),fe=Object(i.a)(de,2),pe=fe[0],me=fe[1],ge=Object(s.useState)(null),ve=Object(i.a)(ge,2),ye=ve[0],be=ve[1],xe=Object(s.useState)(0),we=Object(i.a)(xe,2),Ee=we[0],Se=we[1],Ce=Object(s.useState)(0),ke=Object(i.a)(Ce,2),_e=ke[0],Te=ke[1],Oe=function(e){var t=Object(s.useRef)([]),n=Object(s.useState)({}),r=Object(i.a)(n,2)[1],o=Object(s.useRef)("function"==typeof e?e():e),a=g((function(){var e=o.current;t.current.forEach((function(t){e=t(e)})),t.current=[],o.current=e,r({})}));return[o.current,function(e){t.current.push(e),a()}]}(new Map),Ae=Object(i.a)(Oe,2),Le=Ae[0],De=Ae[1],Ie=function(e,t,n){return Object(s.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||b,o=i.left+i.width,s=0;sNe?[Ne,!1]:[e,!0]}H?C?(Me=0,Ne=Math.max(0,Z-pe)):(Me=Math.min(0,pe-Z),Ne=0):(Me=Math.min(0,ye-ne),Ne=0);var Pe=Object(s.useRef)(),Be=Object(s.useState)(),Fe=Object(i.a)(Be,2),Ue=Fe[0],He=Fe[1];function ze(){He(Date.now())}function Ge(){window.clearTimeout(Pe.current)}function Ve(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=Ie.get(e);if(t)if(H){var n=V;C?t.rightV+pe&&(n=t.right+t.width-pe):t.left<-V?n=-t.left:t.left+t.width>-V+pe&&(n=-(t.left+t.width-pe)),Y(0),W(je(n)[0])}else{var r=X;t.top<-X?r=-t.top:t.top+t.height>-X+ye&&(r=-(t.top+t.height-ye)),W(0),Y(je(r)[0])}}!function(e,t){var n=Object(s.useState)(),r=Object(i.a)(n,2),o=r[0],a=r[1],l=Object(s.useState)(0),c=Object(i.a)(l,2),u=c[0],h=c[1],d=Object(s.useState)(0),f=Object(i.a)(d,2),p=f[0],m=f[1],g=Object(s.useState)(),v=Object(i.a)(g,2),y=v[0],b=v[1],x=Object(s.useRef)(),w=Object(s.useRef)(0),E=Object(s.useRef)(!1),S=Object(s.useRef)(),C=Object(s.useRef)(null);C.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;a({x:n,y:r}),window.clearInterval(x.current)},onTouchMove:function(e){if(o){e.preventDefault();var n=e.touches[0],r=n.screenX,i=n.screenY;a({x:r,y:i});var s=r-o.x,l=i-o.y;t(s,l);var c=Date.now();h(c),m(c-u),b({x:s,y:l})}},onTouchEnd:function(){if(o&&(a(null),b(null),y)){var e=y.x/p,n=y.y/p,r=Math.abs(e),i=Math.abs(n);if(Math.max(r,i)<.1)return;var s=e,l=n;x.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(x.current):t(20*(s*=Ut),20*(l*=Ut))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,o=Math.abs(n),a=Math.abs(r);o===a?i="x"===S.current?n:r:o>a?(i=n,S.current="x"):(i=r,S.current="y");var s=Date.now();s-w.current>100&&(E.current=!1),(t(-i,-i)||E.current)&&(e.preventDefault(),E.current=!0),w.current=s}},s.useEffect((function(){function t(e){C.current.onTouchMove(e)}function n(e){C.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){C.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){C.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(R,(function(e,t){var n=!1;function r(e,t){e((function(e){var r=je(e+t),o=Object(i.a)(r,2),a=o[0],s=o[1];return n=s,a}))}if(H){if(pe>=Z)return n;r(W,e)}else{if(ye>=ne)return n;r(Y,t)}return Ge(),ze(),n})),Object(s.useEffect)((function(){return Ge(),Ue&&(Pe.current=window.setTimeout((function(){He(0)}),100)),Ge}),[Ue]);var We=function(e,t,n,r,i){var o,a,l,c=i.tabs,u=i.tabPosition,h=i.rtl;["top","bottom"].includes(u)?(o="width",a=h?"right":"left",l=Math.abs(t.left)):(o="height",a="top",l=-t.top);var d=t[o],f=n[o],p=r[o],m=d;return f+p>d&&(m=d-p),Object(s.useMemo)((function(){if(!c.length)return[0,0];for(var t=c.length,n=t,r=0;rl+m){n=r-1;break}}for(var s=0,u=t-1;u>=0;u-=1){if((e.get(c[u].key)||x)[a]0,st=V+pe>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&h)+l[f]+c[f];d=h,h=u,u=s,s=a+x|0,a=o,o=i,i=r,r=x+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+u|0,n[6]=n[6]+h|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)},lZu9: /*!***********************************************************!*\ !*** ./node_modules/codemirror/mode/markdown/markdown.js ***! \***********************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(o[a]=n.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,d=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==x){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=C,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var a,d=r.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var S=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;S=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,o.code;if(r.eatSpace())return null;if(d&&i.indentation<=x&&(_=r.match(u))&&_[1].length<=6)return i.quote=0,i.header=_[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,E(i);if(i.indentation<=x&&r.eat(">"))return i.quote=d?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),E(i);if(!k&&!i.setext&&d&&i.indentation<=x&&(_=r.match(l))){var T=_[1]?"ol":"ul";return i.indentation=S+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),E(i)}return d&&i.indentation<=x&&(_=r.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(_[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(_[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=w,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,E(i)):i.setext||!(C&&b||i.quote||!1!==i.list||i.code||k||p.test(r.string))&&(_=r.lookAhead(1))&&(_=_.match(h))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==_[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,E(i)):k?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===r.peek()?g(r,i,O):g(r,i,i.inline)}function x(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=C,n.block=b,n.htmlState=null)}return o}function w(e,t){var r,i=t.listStack[t.listStack.length-1]||0,a=t.indentation=e.quote?t.push(o.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(o.linkHref,"url"):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,"link"),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+"-"+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function S(e,t){if(e.match(d,!0))return E(t)}function C(t,i){var a=i.text(t,i);if(void 0!==a)return a;if(i.list)return i.list=null,E(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,E(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),E(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return o.linkHref}if("`"===s){var h=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var d=t.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var f=E(i);return i.code=0,f}return i.formatting=h,E(i)}return i.code=d,E(i)}if(i.code)return E(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=E(i),g=o.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),E(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),E(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=E(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=_,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),E(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=E(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?_:C,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=E(i))?p+=" ":p="",p+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=E(i))?p+=" ":p="",p+o.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),v(t,i,x)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var w=1,S=1==t.pos?" ":t.string.charAt(t.pos-2);w<3&&t.eat(s);)w++;var T=t.peek()||" ",O=!/\s/.test(T)&&(!m.test(T)||/\s/.test(S)||m.test(S)),A=!/\s/.test(S)&&(!m.test(S)||/\s/.test(T)||m.test(T)),L=null,D=null;if(w%2&&(i.em||!O||"*"!==s&&A&&!m.test(S)?i.em!=s||!A||"*"!==s&&O&&!m.test(T)||(L=!1):L=!0),w>1&&(i.strong||!O||"*"!==s&&A&&!m.test(S)?i.strong!=s||!A||"*"!==s&&O&&!m.test(T)||(D=!1):D=!0),null!=D||null!=L)return n.highlightFormatting&&(i.formatting=null==L?"strong":null==D?"em":"strong em"),!0===L&&(i.em=s),!0===D&&(i.strong=s),f=E(i),!1===L&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return E(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=E(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),E(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return E(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var I=E(i);return i.emoji=!1,I}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),E(i)}function k(e,t){if(">"===e.next()){t.f=t.inline=C,n.highlightFormatting&&(t.formatting="link");var r=E(t);return r?r+=" ":r="",r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function _(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=C,n.highlightFormatting&&(t.formatting="link-string");var i=E(t);return t.linkHref=!1,i}return e.match(T[r]),t.linkHref=!0,E(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,E(t)):"error"}var T={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function O(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=A,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,E(t)):g(e,t,C)}function A(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=E(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function L(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=C,o.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:C,text:S,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=x)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==x?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==x&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:E,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},mOS8: /*!*****************************************!*\ !*** ./src/assets/images/403Qrcode.png ***! \*****************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/403Qrcode.6c17b6f4.png"},mxV5: /*!*****************************************************!*\ !*** ./node_modules/ali-oss/dist/aliyun-oss-sdk.js ***! \*****************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(module,exports,__webpack_require__){(function(global){var require,require,f;f=function(){var define,module,exports;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(!s&&"function"==typeof require&&require)return require(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&h(u).to(f),p=this._divideParts(s,l),m=p.length,g=!1,v=function(n,r){var s=this;return new i.default((function(i,l){var f,v,y,b;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(s.prev=0,n.isCancel()){s.next=18;break}return f=p[r-1],v={stream:n._createStream(a,f.start,f.end),size:f.end-f.start},s.next=6,o.default.awrap(n._uploadPart(d,c,r,v));case 6:if(y=s.sent,n.isCancel()||g){s.next=15;break}if(e.doneParts.push({number:r,etag:y.res.headers.etag}),!t.progress){s.next=12;break}return s.next=12,o.default.awrap(t.progress(u.length/m,e,y.res));case 12:i({number:r,etag:y.res.headers.etag}),s.next=16;break;case 15:i();case 16:s.next=19;break;case 18:i();case 19:s.next=30;break;case 21:s.prev=21,s.t0=s.catch(0),(b=new Error).name=s.t0.name,b.message=s.t0.message,b.stack=s.t0.stack,b.partNum=r,h(s.t0).to(b),l(b);case 30:case"end":return s.stop()}}),null,s,[[0,21]])}))},y=(0,r.default)(new Array(m),(function(e,t){return t+1})),b=f.map((function(e){return e.number})),x=y.filter((function(e){return b.indexOf(e)<0})),w=t.parallel||5,S.next=17,o.default.awrap(this._parallel(x,w,(function(e){return new i.default((function(t,r){v(n,e).then((function(e){e&&f.push(e),t()})).catch((function(e){r(e)}))}))})));case 17:if(E=S.sent,g=!0,!this.isCancel()){S.next=22;break}throw v=null,this._makeCancelEvent();case 22:if(!(E&&E.length>0)){S.next=25;break}throw E[0].message="Failed to upload some parts with error: "+E[0].toString()+" part_num: "+E[0].partNum,E[0];case 25:return S.next=27,o.default.awrap(this.completeMultipartUpload(d,c,f,t));case 27:return S.abrupt("return",S.sent);case 28:case"end":return S.stop()}}),null,this)},p._getFileSize=function(e){return o.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:if(!s.buffer(e)){t.next=4;break}return t.abrupt("return",e.length);case 4:if(!d(e)&&!f(e)){t.next=6;break}return t.abrupt("return",e.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return t.stop()}}),null,this)};var m=e("stream").Readable;function g(e,t){if(!(this instanceof g))return new g(e,t);m.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(g,m),g.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(n,r))}},g.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var n=this;this.reader.onload=function(r){n.fileBuffer=t.from(new Uint8Array(r.target.result)),n.file=null,n.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},p._createStream=function(e,t,n){if(d(e)||f(e))return new g(e.slice(t,n));throw new Error("_createStream requires File/Blob.")},p._getPartSize=function(e,t){return t?Math.max(Math.ceil(e/1e4),t):1048576},p._divideParts=function(e,t){for(var n=Math.ceil(e/t),r=[],i=0;i255)throw new Error("ID is composed of 255 bytes at most");if(""===e.prefix||void 0===e.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(e.status))throw new Error("Status must be Enabled or Disabled");if(e.transition){if(!["IA","Archive"].includes(e.transition.storageClass))throw new Error("StorageClass must be IA or Archive");p(e.transition,"Transition")}if(e.expiration)if(e.expiration.expiredObjectDeleteMarker){if(e.expiration.days||e.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else p(e.expiration,"Expiration");if(e.abortMultipartUpload&&p(e.abortMultipartUpload,"AbortMultipartUpload"),!(e.expiration||e.abortMultipartUpload||e.transition||e.noncurrentVersionTransition))throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(e.tag){if(e.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");!function(e){if(!s(e)&&!c(e))throw new Error("tag must be Object or Array");e=c(e)?[e]:e;var t={};l(e).forEach((function(e){t[e.key]=e.value})),h(t)}(e.tag)}}n.putBucketLifecycle=function(e,t,n){var r,i,l,c,h;return o.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(a(e),s(t)){d.next=3;break}throw new Error("rules must be Array");case 3:return r=this._bucketRequestParams("PUT",e,"lifecycle",n),l={LifecycleConfiguration:{Rule:i=[]}},t.forEach((function(e){f(e),m(e),e.id&&(e.ID=e.id,delete e.id),i.push(e)})),c=u(l,{headers:!0,firstUpperCase:!0}),r.content=c,r.mime="xml",r.successStatuses=[200],d.next=13,o.default.awrap(this.request(r));case 13:return h=d.sent,d.abrupt("return",{res:h.res});case 15:case"end":return d.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml;n.putBucketVersioning=function(e,t){var n,r,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:if(a(e),["Enabled","Suspended"].includes(t)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return n=this._bucketRequestParams("PUT",e,"versioning",l),r={VersioningConfiguration:{Status:t}},n.mime="xml",n.content=s(r,{headers:!0}),c.next=9,o.default.awrap(this.request(n));case 9:return i=c.sent,c.abrupt("return",{res:i.res,status:i.status});case 11:case"end":return c.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("../utils/obj2xml").obj2xml,l=e("../utils/isArray").isArray;n.putBucketWebsite=function(e){var t,n,r,i,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=arguments[2];return o.default.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(a(e),t=this._bucketRequestParams("PUT",e,"website",h),n={Suffix:u.index||"index.html"},i={WebsiteConfiguration:r={IndexDocument:n}},u.supportSubDir&&(n.SupportSubDir=u.supportSubDir),u.type&&(n.Type=u.type),u.error&&(r.ErrorDocument={Key:u.error}),void 0===u.routingRules){d.next=12;break}if(l(u.routingRules)){d.next=11;break}throw new Error("RoutingRules must be Array");case 11:r.RoutingRules={RoutingRule:u.routingRules};case 12:return i=s(i),t.content=i,t.mime="xml",t.successStatuses=[200],d.next=18,o.default.awrap(this.request(t));case 18:return c=d.sent,d.abrupt("return",{res:c.res});case 20:case"end":return d.stop()}}),null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(e,t,n){(function(t){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/core-js/json/stringify"));function o(e){return e&&e.__esModule?e:{default:e}}n.encodeCallback=function(e,n){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&n.callback){var o={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(o.callbackHost=n.callback.host),n.callback.contentType&&(o.callbackBodyType=n.callback.contentType);var a=t.from((0,i.default)(o)).toString("base64");if(e.headers["x-oss-callback"]=a,n.callback.customValue){var s={};(0,r.default)(n.callback.customValue).forEach((function(e){s["x:"+e]=n.callback.customValue[e]})),e.headers["x-oss-callback-var"]=t.from((0,i.default)(s)).toString("base64")}}}}).call(this,e("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/assign"),o=(r=i)&&r.__esModule?r:{default:r},a=e("humanize-ms"),s=e("url"),l=e("../utils/checkBucketName").checkBucketName;t.exports=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");e.bucket&&l(e.bucket);var t,n,r,i,c,u=(0,o.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},e);if(u.accessKeyId=u.accessKeyId.trim(),u.accessKeySecret=u.accessKeySecret.trim(),u.timeout&&(u.timeout=a(u.timeout)),u.endpoint)u.endpoint=function(e,t){var n=s.parse(e);if(n.protocol||(n=s.parse("http"+(t?"s":"")+"://"+e)),"http:"!==n.protocol&&"https:"!==n.protocol)throw new Error("Endpoint protocol must be http or https.");return n}(u.endpoint,u.secure);else{if(!u.region)throw new Error("require options.endpoint or options.region");u.endpoint=(t=u.region,n=u.internal,r=u.secure,i=r?"https://":"http://",c=n?"-internal.aliyuncs.com":".aliyuncs.com","vpc100-oss-cn-"===t.substr(0,"vpc100-oss-cn-".length)&&(c=".aliyuncs.com"),s.parse(i+t+c))}return u.inited=!0,u}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(e,t,n){"use strict";e("merge-descriptors")(n,e("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("../utils/checkBucketName").checkBucketName,s=e("querystring"),l=e("js-base64").Base64.encode;function c(e,t){if(!e)throw new Error(t+" is required");if("string"!=typeof e)throw new Error(t+" must be String")}n.processObjectSave=function(e,t,n,r){var i,u,h,d;return o.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:return c(e,"sourceObject"),c(t,"targetObject"),c(n,"process"),t=this._objectName(t),r&&a(r),i=this._objectRequestParams("POST",e,{subres:"x-oss-process"}),u=r?",b_"+l(r):"",t=l(t),h={"x-oss-process":n+"|sys/saveas,o_"+t+u},i.content=s.stringify(h),f.next=12,o.default.awrap(this.request(i));case 12:return d=f.sent,f.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return f.stop()}}),null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(e,t,n){"use strict";var r,i=e("babel-runtime/regenerator"),o=(r=i)&&r.__esModule?r:{default:r},a=e("copy-to"),s=e("./callback"),l=e("./utils/deepCopy").deepCopy,c=n;c.listUploads=function(e,t){var n,r,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return n={},a(t=t||{}).to(n),n.subres="uploads",(r=this._objectRequestParams("GET","",n)).query=e,r.xmlResponse=!0,r.successStatuses=[200],l.next=10,o.default.awrap(this.request(r));case 10:return i=l.sent,s=i.data.Upload||[],Array.isArray(s)||(s=[s]),s=s.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),l.abrupt("return",{res:i.res,uploads:s,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:"true"===i.data.IsTruncated});case 15:case"end":return l.stop()}}),null,this)},c.listParts=function(e,t,n,r){var i,s,l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return i={},a(r=r||{}).to(i),i.subres={uploadId:t},(s=this._objectRequestParams("GET",e,i)).query=n,s.xmlResponse=!0,s.successStatuses=[200],c.next=10,o.default.awrap(this.request(s));case 10:return l=c.sent,c.abrupt("return",{res:l.res,uploadId:l.data.UploadId,bucket:l.data.Bucket,name:l.data.Key,partNumberMarker:l.data.PartNumberMarker,nextPartNumberMarker:l.data.NextPartNumberMarker,maxParts:l.data.MaxParts,isTruncated:l.data.IsTruncated,parts:l.data.Part||[]});case 12:case"end":return c.stop()}}),null,this)},c.abortMultipartUpload=function(e,t,n){var r,i,s;return o.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return this._stop(),r={},a(n=n||{}).to(r),r.subres={uploadId:t},(i=this._objectRequestParams("DELETE",e,r)).successStatuses=[204],l.next=9,o.default.awrap(this.request(i));case 9:return s=l.sent,l.abrupt("return",{res:s.res});case 11:case"end":return l.stop()}}),null,this)},c.initMultipartUpload=function(e,t){var n,r,i;return o.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return n={},a(t=t||{}).to(n),n.headers=n.headers||{},this._convertMetaToHeaders(t.meta,n.headers),n.subres="uploads",(r=this._objectRequestParams("POST",e,n)).mime=t.mime,r.xmlResponse=!0,r.successStatuses=[200],s.next=12,o.default.awrap(this.request(r));case 12:return i=s.sent,s.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return s.stop()}}),null,this)},c.uploadPart=function(e,t,n,r,i,a,s){var l;return o.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return l={stream:this._createStream(r,i,a),size:a-i},c.next=3,o.default.awrap(this._uploadPart(e,t,n,l,s));case 3:return c.abrupt("return",c.sent);case 4:case"end":return c.stop()}}),null,this)},c.completeMultipartUpload=function(e,t,n,r){var i,a,c,u,h,d,f,p;return o.default.async((function(m){for(;;)switch(m.prev=m.next){case 0:for(i=n.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,n){return!t||e.number!==n[t-1].number})),a='\n\n',c=0;c\n",a+=""+u.number+"\n",a+=""+u.etag+"\n",a+="\n";return a+="",h={},(h=l(r=r||{})).headers&&delete h.headers["x-oss-server-side-encryption"],h.subres={uploadId:t},d=this._objectRequestParams("POST",e,h),s.encodeCallback(d,h),d.mime="xml",d.content=a,d.headers&&d.headers["x-oss-callback"]||(d.xmlResponse=!0),d.successStatuses=[200],m.next=17,o.default.awrap(this.request(d));case 17:return f=m.sent,p={res:f.res,bucket:d.bucket,name:e,etag:f.res.headers.etag},d.headers&&d.headers["x-oss-callback"]&&(p.data=JSON.parse(f.data.toString())),m.abrupt("return",p);case 21:case"end":return m.stop()}}),null,this)},c._uploadPart=function(e,t,n,r,i){var s,l,c;return o.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return s={},a(i=i||{}).to(s),s.headers={"Content-Length":r.size},s.subres={partNumber:n,uploadId:t},(l=this._objectRequestParams("PUT",e,s)).mime=s.mime,l.stream=r.stream,l.successStatuses=[200],u.next=11,o.default.awrap(this.request(l));case 11:if((c=u.sent).res.headers.etag){u.next=14;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 14:return r.stream=null,l.stream=null,u.abrupt("return",{name:e,etag:c.res.headers.etag,res:c.res});case 17:case"end":return u.stop()}}),null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(e,t,n){"use strict";var r=a(e("babel-runtime/regenerator")),i=a(e("babel-runtime/core-js/object/keys")),o=a(e("babel-runtime/helpers/typeof"));function a(e){return e&&e.__esModule?e:{default:e}}var s=e("../utils/checkBucketName").checkBucketName,l=n;l.copy=function(e,t,n,a){var s,l,c;return r.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return"object"===(void 0===n?"undefined":(0,o.default)(n))&&(a=n),(a=a||{}).headers=a.headers||{},(0,i.default)(a.headers).forEach((function(e){a.headers["x-oss-copy-source-"+e.toLowerCase()]=a.headers[e]})),a.meta&&(a.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(a.meta,a.headers),t=this._getSourceName(t,n),a.versionId&&(t=t+"?versionId="+a.versionId),a.headers["x-oss-copy-source"]=t,(s=this._objectRequestParams("PUT",e,a)).xmlResponse=!0,s.successStatuses=[200,304],u.next=14,r.default.awrap(this.request(s));case 14:return l=u.sent,(c=l.data)&&(c={etag:c.ETag,lastModified:c.LastModified}),u.abrupt("return",{data:c,res:l.res});case 18:case"end":return u.stop()}}),null,this)},l._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),s(t),e="/"+t+"/"+(e=encodeURI(e))}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.delete=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),(t=this._objectRequestParams("DELETE",e,o)).successStatuses=[204],a.next=6,r.default.awrap(this.request(t));case 6:return n=a.sent,a.abrupt("return",{res:n.res});case 8:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("utility"),s=e("../utils/obj2xml").obj2xml;n.deleteMulti=function(e){var t,n,o,l,c,u,h,d,f,p,m,g,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(y){for(;;)switch(y.prev=y.next){case 0:if(t=[],e&&e.length){y.next=3;break}throw new Error("names is required");case 3:for(n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),e=this._objectName(e),(t=this._objectRequestParams("DELETE",e,o)).successStatuses=[204],a.next=7,r.default.awrap(this.request(t));case 7:return n=a.sent,a.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("fs"),s=e("is-type-of");n.get=function(e,t){var n,o,l,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return n=null,o=!1,s.writableStream(t)?n=t:s.string(t)?(n=a.createWriteStream(t),o=!0):u=t,(u=u||{}).subres=(0,i.default)({},u.subres),u.versionId&&(u.subres.versionId=u.versionId),u.process&&(u.subres["x-oss-process"]=u.process),l=void 0,h.prev=8,(c=this._objectRequestParams("GET",e,u)).writeStream=n,c.successStatuses=[200,206,304],h.next=14,r.default.awrap(this.request(c));case 14:l=h.sent,o&&n.destroy(),h.next=25;break;case 18:if(h.prev=18,h.t0=h.catch(8),!o){h.next=24;break}return n.destroy(),h.next=24,r.default.awrap(this._deleteFileSafe(t));case 24:throw h.t0;case 25:return h.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return h.stop()}}),null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.getACL=function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return o.subres=(0,i.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),e=this._objectName(e),(t=this._objectRequestParams("GET",e,o)).successStatuses=[200],t.xmlResponse=!0,a.next=8,r.default.awrap(this.request(t));case 8:return n=a.sent,a.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(e,t,n){"use strict";var r=a(e("babel-runtime/core-js/object/keys")),i=a(e("babel-runtime/regenerator")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}var s=n,l=e("../utils/isObject").isObject,c=e("../utils/isArray").isArray;function u(){var e,t,n,r,a,s,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:if(!l.versionIdMarker||void 0!==l.keyMarker){h.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return u.subres=(0,o.default)({versions:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),(e=this._objectRequestParams("GET","",u)).xmlResponse=!0,e.successStatuses=[200],e.query=d(l),h.next=10,i.default.awrap(this.request(e));case 10:return t=h.sent,n=t.data.Version||[],r=t.data.DeleteMarker||[],a=this,n&&(Array.isArray(n)||(n=[n]),n=n.map((function(e){return{name:e.Key,url:a._objectUrl(e.Key),lastModified:e.LastModified,isLatest:"true"===e.IsLatest,versionId:e.VersionId,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),r&&(c(r)||(r=[r]),r=r.map((function(e){return{name:e.Key,lastModified:e.LastModified,versionId:e.VersionId,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(s=t.data.CommonPrefixes||null)&&(c(s)||(s=[s]),s=s.map((function(e){return e.Prefix}))),h.abrupt("return",{res:t.res,objects:n,deleteMarker:r,prefixes:s,nextMarker:t.data.NextMarker||null,NextVersionIdMarker:t.data.NextVersionIdMarker||null,isTruncated:"true"===t.data.IsTruncated});case 19:case"end":return h.stop()}}),null,this)}function h(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return l(e)&&(0,r.default)(e).forEach((function(n){t[h(n)]=e[n]})),t}s.getBucketVersions=u,s.listObjectVersions=u},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.getObjectMeta=function(e,t){var n,o;return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return t=t||{},e=this._objectName(e),t.subres=(0,i.default)({objectMeta:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),(n=this._objectRequestParams("HEAD",e,t)).successStatuses=[200],a.next=8,r.default.awrap(this.request(n));case 8:return o=a.sent,a.abrupt("return",{status:o.status,res:o.res});case 10:case"end":return a.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}var a=n,s=e("../utils/isObject").isObject;a.getObjectTagging=function(e){var t,n,o,a,l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return c.subres=(0,i.default)({tagging:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),e=this._objectName(e),(t=this._objectRequestParams("GET",e,c)).successStatuses=[200],u.next=7,r.default.awrap(this.request(t));case 7:return n=u.sent,u.next=10,r.default.awrap(this.parseXML(n.data));case 10:return o=u.sent,a=(a=o.TagSet.Tag)&&s(a)?[a]:a||[],l={},a.forEach((function(e){l[e.Key]=e.Value})),u.abrupt("return",{status:n.status,res:n.res,tag:l});case 16:case"end":return u.stop()}}),null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.getSymlink=function(e){var t,n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return a.subres=(0,i.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),e=this._objectName(e),(t=this._objectRequestParams("GET",e,a)).successStatuses=[200],s.next=7,r.default.awrap(this.request(t));case 7:return n=s.sent,o=n.res.headers["x-oss-symlink-target"],s.abrupt("return",{targetName:decodeURIComponent(o),res:n.res});case 10:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(e,t,n){"use strict";var r=a(e("babel-runtime/regenerator")),i=a(e("babel-runtime/core-js/object/keys")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}n.head=function(e){var t,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:return s.subres=(0,o.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),(t=this._objectRequestParams("HEAD",e,s)).successStatuses=[200,304],l.next=6,r.default.awrap(this.request(t));case 6:return n=l.sent,a={meta:null,res:n.res,status:n.status},200===n.status&&(0,i.default)(n.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=n.headers[e])})),l.abrupt("return",a);case 10:case"end":return l.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.putACL=function(e,t,n){var o,a;return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(n=n||{}).subres=(0,i.default)({acl:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.headers=n.headers||{},n.headers["x-oss-object-acl"]=t,e=this._objectName(e),(o=this._objectRequestParams("PUT",e,n)).successStatuses=[200],s.next=10,r.default.awrap(this.request(o));case 10:return a=s.sent,s.abrupt("return",{res:a.res});case 12:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(e,t,n){"use strict";var r=a(e("babel-runtime/regenerator")),i=a(e("babel-runtime/core-js/object/keys")),o=a(e("babel-runtime/core-js/object/assign"));function a(e){return e&&e.__esModule?e:{default:e}}var s=e("../utils/obj2xml").obj2xml,l=e("../utils/checkObjectTag").checkObjectTag;n.putObjectTagging=function(e,t){var n,a,c,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:return l(t),u.subres=(0,o.default)({tagging:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),e=this._objectName(e),(n=this._objectRequestParams("PUT",e,u)).successStatuses=[200],t=(0,i.default)(t).map((function(e){return{Key:e,Value:t[e]}})),a={Tagging:{TagSet:{Tag:t}}},n.mime="xml",n.content=s(a),h.next=12,r.default.awrap(this.request(n));case 12:return c=h.sent,h.abrupt("return",{res:c.res,status:c.status});case 14:case"end":return h.stop()}}),null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/object/assign"));function o(e){return e&&e.__esModule?e:{default:e}}n.putSymlink=function(e,t,n){var o,a;return r.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return(n=n||{}).headers=n.headers||{},t=this._escape(this._objectName(t)),this._convertMetaToHeaders(n.meta,n.headers),n.headers["x-oss-symlink-target"]=t,n.subres=(0,i.default)({symlink:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),n.storageClass&&(n.headers["x-oss-storage-class"]=n.storageClass),e=this._objectName(e),(o=this._objectRequestParams("PUT",e,n)).successStatuses=[200],s.next=13,r.default.awrap(this.request(o));case 13:return a=s.sent,s.abrupt("return",{res:a.res});case 15:case"end":return s.stop()}}),null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(e,t,n){"use strict";var r=o(e("babel-runtime/regenerator")),i=o(e("babel-runtime/core-js/promise"));function o(e){return e&&e.__esModule?e:{default:e}}var a=n;a._parallelNode=function(e,t,n,o){var a,s,l,c,u,h,d,f;return r.default.async((function(p){for(;;)switch(p.prev=p.next){case 0:a=this,s=[],l=[],c=e.length/t,u=e.length%t,h=0===u?c:(e.length-u)/t+1,d=1,f=0;case 8:if(!(f0)return u=!0,void(h<=0&&i(o));h+=1,m(e.value,f(p))}d=!1}}))},a.cancel=function(e){this.options.cancelFlag=!0,e&&this.abortMultipartUpload(e.name,e.uploadId,e.options)},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1},a._stop=function(){this.options.cancelFlag=!0},a._makeCancelEvent=function(){return{status:0,name:"cancel"}}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(e,t,n){(function(t){"use strict";var r=o(e("babel-runtime/core-js/json/stringify")),i=o(e("babel-runtime/core-js/object/keys"));function o(e){return e&&e.__esModule?e:{default:e}}var a=e("./../../shims/crypto/crypto.js"),s=e("is-type-of");n.buildCanonicalizedResource=function(e,t){var n=""+e,r="?";return s.string(t)&&""!==t.trim()?n+=r+t:s.array(t)?(t.sort(),n+=r+t.join("&")):t&&(0,i.default)(t).sort((function(e,t){return e[0]>t[0]?1:e[0]1&&void 0!==arguments[1]?arguments[1]:{},o=arguments[2],a=arguments[3],s={},l=n.subResource,c=void 0===l?{}:l;if(n.process){var u="x-oss-process";c[u]=n.process}if(n.trafficLimit){var h="x-oss-traffic-limit";c[h]=n.trafficLimit}if(n.response&&(0,i.default)(n.response).forEach((function(e){var t="response-"+e.toLowerCase();c[t]=n.response[e]})),(0,i.default)(n).forEach((function(e){var t=e.toLowerCase(),r=n[e];0===t.indexOf("x-oss-")?s[t]=r:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(s[e]=r)})),Object.prototype.hasOwnProperty.call(n,"security-token")&&(c["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var d={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(d.callbackHost=n.callback.host),n.callback.contentType&&(d.callbackBodyType=n.callback.contentType),c.callback=t.from((0,r.default)(d)).toString("base64"),n.callback.customValue){var f={};(0,i.default)(n.callback.customValue).forEach((function(e){f["x:"+e]=n.callback.customValue[e]})),c["callback-var"]=t.from((0,r.default)(f)).toString("base64")}}var p=this.buildCanonicalString(n.method,o,{headers:s,parameters:c},a.toString());return{Signature:this.computeSignature(e,p),subResource:c}}}).call(this,e("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkBucketName=void 0,n.checkBucketName=function(e,t){if(!(t?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(e))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(e,t,n){"use strict";var r,i=e("babel-runtime/core-js/object/entries"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.checkObjectTag=void 0;var a=e("./checkValid").checkValid,s=e("./isObject").isObject,l=[{validator:function(e){if("string"!=typeof e)throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],c={key:[].concat(l,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(l,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};n.checkObjectTag=function(e){if(!s(e))throw new Error("tag must be Object");var t=(0,o.default)(e);if(t.length>10)throw new Error("maximum of 10 tags for a object");var n=["key","value"];t.forEach((function(e){e.forEach((function(e,t){a(e,c[n[t]])}))}))}},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkValid=void 0,n.checkValid=function(e,t){t.forEach((function(t){if(t.validator)t.validator(e);else if(t.pattern&&!t.pattern.test(e))throw new Error(t.msg)}))}},{}],38:[function(e,t,n){(function(t){"use strict";var r,i=e("babel-runtime/core-js/object/assign"),o=(r=i)&&r.__esModule?r:{default:r};Object.defineProperty(n,"__esModule",{value:!0}),n.createRequest=void 0;var a=e("./../../../shims/crypto/crypto.js"),s=e("debug")("ali-oss"),l=e("mime"),c=e("dateformat"),u=e("copy-to"),h=e("path");function d(e,t){return e[t]||e[t.toLowerCase()]}n.createRequest=function(e){var n=new Date;this.options.amendTimeSkewed&&(n=+new Date+this.options.amendTimeSkewed);var r={"x-oss-date":c(n,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(r["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,o.default)(r,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(r["x-oss-security-token"]=this.options.stsToken),u(e.headers).to(r),d(r,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?r["Content-Type"]=e.mime:r["Content-Type"]=l.getType(e.mime||h.extname(e.object||""))),d(r,"Content-Type")||function(e,t){delete e[t],delete e[t.toLowerCase()]}(r,"Content-Type"),e.content&&(r["Content-Md5"]=a.createHash("md5").update(t.from(e.content,"utf8")).digest("base64"),r["Content-Length"]||(r["Content-Length"]=e.content.length));var i=this._getResource(e);r.authorization=this.authorization(e.method,i,e.subres,r);var f=this._getReqUrl(e);s("request %s %s, with headers %j, !!stream: %s",e.method,f,r,!!e.stream);var p=e.timeout||this.options.timeout,m={method:e.method,content:e.content,stream:e.stream,headers:r,timeout:p,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx};return this.agent&&(m.agent=this.agent),this.httpsAgent&&(m.httpsAgent=this.httpsAgent),{url:f,params:m}}}).call(this,e("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(e,t,n){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/helpers/typeof"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.deepCopy=void 0,n.deepCopy=function(e){if(null===e||"object"!==(void 0===e?"undefined":(0,i.default)(e)))return e;var t=Array.isArray(e)?[]:{};return(0,r.default)(e).forEach((function(r){t[r]=n.deepCopy(e[r])})),t}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(e,t,n){"use strict";var r=o(e("babel-runtime/core-js/object/keys")),i=o(e("babel-runtime/helpers/typeof"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.formatObjKey=void 0,n.formatObjKey=function e(t,n){if(null===t||"object"!==(void 0===t?"undefined":(0,i.default)(t)))return t;var o=void 0;if(Array.isArray(t)){o=[];for(var a=0;a"+t[n]+"":"object"===s(t[n])?r+="<"+n+">"+e(t[n])+"":"array"===s(t[n])?r+=t[n].map((function(t){return"<"+n+">"+e(t)+""})).join(""):r+="<"+n+">"+t[n].toString()+""})):r+=t.toString(),r}},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(e,t,n){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],49:[function(e,t,n){t.exports=e("./register")().Promise},{"./register":51}],50:[function(e,t,n){"use strict";var r=null;t.exports=function(e,t){return function(n,i){n=n||null;var o=!1!==(i=i||{}).global;if(null===r&&o&&(r=e["@@any-promise/REGISTRATION"]||null),null!==r&&null!==n&&r.implementation!==n)throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===r&&(r=null!==n&&void 0!==i.Promise?{Promise:i.Promise,implementation:n}:t(n),o&&(e["@@any-promise/REGISTRATION"]=r)),r}}},{}],51:[function(e,t,n){"use strict";t.exports=e("./loader")(window,(function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}))},{"./loader":50}],52:[function(e,t,n){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(e,t,n){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(e,t,n){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(e,t,n){t.exports={default:e("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(e,t,n){t.exports={default:e("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(e,t,n){"use strict";n.__esModule=!0;var r=a(e("../core-js/symbol/iterator")),i=a(e("../core-js/symbol")),o="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}n.default="function"==typeof i.default&&"symbol"===o(r.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":o(e)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,h=s>0?a-4:a;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],70:[function(e,t,n){var r,i;r=this,i=function(){var e=!0;function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var i,a=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(t)&&/android/i.test(t),l=/nexus\s*[0-6]\s*/i.test(t),c=!l&&/nexus\s*[0-9]+/i.test(t),u=/CrOS/.test(t),h=/silk/i.test(t),d=/sailfish/i.test(t),f=/tizen/i.test(t),p=/(web|hpw)(o|0)s/i.test(t),m=/windows phone/i.test(t),g=(/SamsungBrowser/i.test(t),!m&&/windows/i.test(t)),v=!a&&!h&&/macintosh/i.test(t),y=!s&&!d&&!f&&!p&&/linux/i.test(t),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),x=n(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(t)&&!/tablet pc/i.test(t),E=!w&&/[^-]mobi/i.test(t),S=/xbox/i.test(t);/opera/i.test(t)?i={name:"Opera",opera:e,version:x||n(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?i={name:"Opera",opera:e,version:n(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(t)?i={name:"Samsung Internet for Android",samsungBrowser:e,version:x||n(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(t)?i={name:"NAVER Whale browser",whale:e,version:n(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(t)?i={name:"MZ Browser",mzbrowser:e,version:n(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(t)?i={name:"Opera Coast",coast:e,version:x||n(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(t)?i={name:"Focus",focus:e,version:n(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(t)?i={name:"Yandex Browser",yandexbrowser:e,version:x||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?i={name:"UC Browser",ucbrowser:e,version:n(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?i={name:"Maxthon",maxthon:e,version:n(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?i={name:"Epiphany",epiphany:e,version:n(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?i={name:"Puffin",puffin:e,version:n(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?i={name:"Sleipnir",sleipnir:e,version:n(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?i={name:"K-Meleon",kMeleon:e,version:n(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:m?(i={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},b?(i.msedge=e,i.version=b):(i.msie=e,i.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?i={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?i={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?i={name:"Microsoft Edge",msedge:e,version:b}:/vivaldi/i.test(t)?i={name:"Vivaldi",vivaldi:e,version:n(/vivaldi\/(\d+(\.\d+)?)/i)||x}:d?i={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?i={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(i={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(i.firefoxos=e,i.osname="Firefox OS")):h?i={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?i={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?i={name:"SlimerJS",slimer:e,version:n(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?i={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:x||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:p?(i={name:"WebOS",osname:"WebOS",webos:e,version:x||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(i.touchpad=e)):/bada/i.test(t)?i={name:"Bada",osname:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:f?i={name:"Tizen",osname:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(t)?i={name:"QupZilla",qupzilla:e,version:n(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(t)?i={name:"Chromium",chromium:e,version:n(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(t)?i={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?i={name:"Android",version:x}:/safari|applewebkit/i.test(t)?(i={name:"Safari",safari:e},x&&(i.version=x)):a?(i={name:"iphone"==a?"iPhone":"ipad"==a?"iPad":"iPod"},x&&(i.version=x)):i=/googlebot/i.test(t)?{name:"Googlebot",googlebot:e,version:n(/googlebot\/(\d+(\.\d+))/i)||x}:{name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(i.name=i.name||"Blink",i.blink=e):(i.name=i.name||"Webkit",i.webkit=e),!i.version&&x&&(i.version=x)):!i.opera&&/gecko\//i.test(t)&&(i.name=i.name||"Gecko",i.gecko=e,i.version=i.version||n(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||!s&&!i.silk?!i.windowsphone&&a?(i[a]=e,i.ios=e,i.osname="iOS"):v?(i.mac=e,i.osname="macOS"):S?(i.xbox=e,i.osname="Xbox"):g?(i.windows=e,i.osname="Windows"):y&&(i.linux=e,i.osname="Linux"):(i.android=e,i.osname="Android");var C="";i.windows?C=function(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(n(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?C=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?C=(C=n(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):a?C=(C=n(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?C=n(/android[ \/-](\d+(\.\d+)*)/i):i.webos?C=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?C=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?C=n(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(C=n(/tizen[\/\s](\d+(\.\d+)*)/i)),C&&(i.osversion=C);var k=!i.windows&&C.split(".")[0];return w||c||"ipad"==a||s&&(3==k||k>=4&&!E)||i.silk?i.tablet=e:(E||"iphone"==a||"ipod"==a||s||l||i.blackberry||i.webos||i.bada)&&(i.mobile=e),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.whale&&1===o([i.version,"1.0"])||i.mzbrowser&&1===o([i.version,"6.0"])||i.focus&&1===o([i.version,"1.0"])||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=e:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=e:i.x=e,i}var n=t("undefined"!=typeof navigator&&navigator.userAgent||"");function r(e){return e.split(".").length}function i(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n=0;){if(n[0][t]>n[1][t])return 1;if(n[0][t]!==n[1][t])return-1;if(0===t)return 0}}function a(e,r,i){var a=n;"string"==typeof r&&(i=r,r=void 0),void 0===r&&(r=!1),i&&(a=t(i));var s=""+a.version;for(var l in e)if(e.hasOwnProperty(l)&&a[l]){if("string"!=typeof e[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(e));return o([s,e[l]])<0}return r}return n.test=function(e){for(var t=0;t=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},o.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:73}],73:[function(e,t,n){(function(t,r){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";var i=e("base64-js"),o=e("ieee754"),a=e("isarray");function s(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(r.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(i)return F(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=r.from(t,i)),r.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,o);if("number"==typeof t)return t&=255,r.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;di&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;ri)&&(n=i);for(var o="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,i,o,a){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||N(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return i||N(e,0,n,8),o.write(e,t,n,r,52,8),n+8}n.Buffer=r,n.SlowBuffer=function(e){return+e!=e&&(e=0),r.alloc(+e)},n.INSPECT_MAX_BYTES=50,r.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),n.kMaxLength=s(),r.poolSize=8192,r._augment=function(e){return e.__proto__=r.prototype,e},r.from=function(e,t,n){return c(null,e,t,n)},r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0})),r.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?l(e,t):void 0!==n?"string"==typeof r?l(e,t).fill(n,r):l(e,t).fill(n):l(e,t)}(null,e,t,n)},r.allocUnsafe=function(e){return h(null,e)},r.allocUnsafeSlow=function(e){return h(null,e)},r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},r.prototype.compare=function(e,t,n,i,o){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,n),h=0;hi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},r.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,void 0!==global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(e,t,n){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],75:[function(e,t,n){t.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(e,t,n){ /*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */ "use strict";var r=Array.prototype.slice;function i(e,t){if(!(this instanceof i))return new i(e,t);this.src=e,this._withAccess=t}function o(e,t){return void 0===e[t]&&void 0===e.__lookupGetter__(t)&&void 0===e.__lookupSetter__(t)}t.exports=i,i.prototype.withAccess=function(e){return this._withAccess=!1!==e,this},i.prototype.pick=function(e){return Array.isArray(e)||(e=r.call(arguments)),e.length&&(this.keys=e),this},i.prototype.to=function(e){if(e=e||{},!this.src)return e;var t=this.keys||Object.keys(this.src);if(!this._withAccess){for(var n=0;nu;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(e,t,n){var r=e("./_cof"),i=e("./_wks")("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":98,"./_wks":166}],98:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],99:[function(e,t,n){var r=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},{}],100:[function(e,t,n){"use strict";var r=e("./_object-dp"),i=e("./_property-desc");t.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},{"./_object-dp":132,"./_property-desc":146}],101:[function(e,t,n){var r=e("./_a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":92}],102:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],103:[function(e,t,n){t.exports=!e("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":108}],104:[function(e,t,n){var r=e("./_is-object"),i=e("./_global").document,o=r(i)&&r(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{"./_global":110,"./_is-object":119}],105:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(e,t,n){var r=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie");t.exports=function(e){var t=r(e),n=i.f;if(n)for(var a,s=n(e),l=o.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(e,t,n){var r=e("./_global"),i=e("./_core"),o=e("./_ctx"),a=e("./_hide"),s=e("./_has"),l=function(e,t,n){var c,u,h,d=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,v=e&l.W,y=f?i:i[t]||(i[t]={}),b=y.prototype,x=f?r:p?r[t]:(r[t]||{}).prototype;for(c in f&&(n=t),n)(u=!d&&x&&void 0!==x[c])&&s(y,c)||(h=u?x[c]:n[c],y[c]=f&&"function"!=typeof x[c]?n[c]:g&&u?o(h,r):v&&x[c]==h?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[c]=h,e&l.R&&b&&!b[c]&&a(b,c,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],109:[function(e,t,n){var r=e("./_ctx"),i=e("./_iter-call"),o=e("./_is-array-iter"),a=e("./_an-object"),s=e("./_to-length"),l=e("./core.get-iterator-method"),c={},u={};(n=t.exports=function(e,t,n,h,d){var f,p,m,g,v=d?function(){return e}:l(e),y=r(n,h,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(f=s(e.length);f>b;b++)if((g=t?y(a(p=e[b])[0],p[1]):y(e[b]))===c||g===u)return g}else for(m=v.call(e);!(p=m.next()).done;)if((g=i(m,y,p.value,t))===c||g===u)return g}).BREAK=c,n.RETURN=u},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],111:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],112:[function(e,t,n){var r=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(e,t,n){var r=e("./_global").document;t.exports=r&&r.documentElement},{"./_global":110}],114:[function(e,t,n){t.exports=!e("./_descriptors")&&!e("./_fails")((function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(e,t,n){t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},{}],116:[function(e,t,n){var r=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./_cof":98}],117:[function(e,t,n){var r=e("./_iterators"),i=e("./_wks")("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},{"./_iterators":125,"./_wks":166}],118:[function(e,t,n){var r=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./_cof":98}],119:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],120:[function(e,t,n){var r=e("./_an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},{"./_an-object":95}],121:[function(e,t,n){"use strict";var r=e("./_object-create"),i=e("./_property-desc"),o=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),(function(){return this})),t.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(e,t,n){"use strict";var r=e("./_library"),i=e("./_export"),o=e("./_redefine"),a=e("./_hide"),s=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),u=e("./_object-gpo"),h=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(e,t,n,p,m,g,v){l(n,t,p);var y,b,x,w=function(e){if(!d&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",S="values"==m,C=!1,k=e.prototype,_=k[h]||k["@@iterator"]||m&&k[m],T=_||w(m),O=m?S?w("entries"):T:void 0,A="Array"==t&&k.entries||_;if(A&&(x=u(A.call(new e)))!==Object.prototype&&x.next&&(c(x,E,!0),r||"function"==typeof x[h]||a(x,h,f)),S&&_&&"values"!==_.name&&(C=!0,T=function(){return _.call(this)}),r&&!v||!d&&!C&&k[h]||a(k,h,T),s[t]=T,s[E]=f,m)if(y={values:S?T:w("values"),keys:g?T:w("keys"),entries:O},v)for(b in y)b in k||o(k,b,y[b]);else i(i.P+i.F*(d||C),t,y);return y}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(e,t,n){var r=e("./_wks")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},{"./_wks":166}],124:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],125:[function(e,t,n){t.exports={}},{}],126:[function(e,t,n){t.exports=!0},{}],127:[function(e,t,n){var r=e("./_uid")("meta"),i=e("./_is-object"),o=e("./_has"),a=e("./_object-dp").f,s=0,l=Object.isExtensible||function(){return!0},c=!e("./_fails")((function(){return l(Object.preventExtensions({}))})),u=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&h.NEED&&l(e)&&!o(e,r)&&u(e),e}}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(e,t,n){var r=e("./_global"),i=e("./_task").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,l="process"==e("./_cof")(a);t.exports=function(){var e,t,n,c=function(){var r,i;for(l&&(r=a.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var h=!0,d=document.createTextNode("");new o(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(e,t,n){"use strict";var r=e("./_a-function");function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}t.exports.f=function(e){return new i(e)}},{"./_a-function":92}],130:[function(e,t,n){"use strict";var r=e("./_descriptors"),i=e("./_object-keys"),o=e("./_object-gops"),a=e("./_object-pie"),s=e("./_to-object"),l=e("./_iobject"),c=Object.assign;t.exports=!c||e("./_fails")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=r}))?function(e,t){for(var n=s(e),c=arguments.length,u=1,h=o.f,d=a.f;c>u;)for(var f,p=l(arguments[u++]),m=h?i(p).concat(h(p)):i(p),g=m.length,v=0;g>v;)f=m[v++],r&&!d.call(p,f)||(n[f]=p[f]);return n}:c},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(e,t,n){var r=e("./_an-object"),i=e("./_object-dps"),o=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var t,n=e("./_dom-create")("iframe"),r=o.length;for(n.style.display="none",e("./_html").appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("