You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Problems__OjForm__index....

441 lines
1.2 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([[193,6,7,16,17,20],{"+NIl":function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";h.defineMode("stex",function(o,S){"use strict";function E(v,w){v.cmdState.push(w)}function b(v){return v.cmdState.length>0?v.cmdState[v.cmdState.length-1]:null}function p(v){var w=v.cmdState.pop();w&&w.closeBracket()}function d(v){for(var w=v.cmdState,_=w.length-1;_>=0;_--){var k=w[_];if(k.name=="DEFAULT")continue;return k}return{styleIdentifier:function(){return null}}}function a(v,w,_){return function(){this.name=v,this.bracketNo=0,this.style=w,this.styles=_,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};s.importmodule=a("importmodule","tag",["string","builtin"]),s.documentclass=a("documentclass","tag",["","atom"]),s.usepackage=a("usepackage","tag",["atom"]),s.begin=a("begin","tag",["atom"]),s.end=a("end","tag",["atom"]),s.label=a("label","tag",["atom"]),s.ref=a("ref","tag",["atom"]),s.eqref=a("eqref","tag",["atom"]),s.cite=a("cite","tag",["atom"]),s.bibitem=a("bibitem","tag",["atom"]),s.Bibitem=a("Bibitem","tag",["atom"]),s.RBibitem=a("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function l(v,w){v.f=w}function i(v,w){var _;if(v.match(/^\\[a-zA-Z@]+/)){var k=v.current().slice(1);return _=s.hasOwnProperty(k)?s[k]:s.DEFAULT,_=new _,E(w,_),l(w,m),_.style}if(v.match(/^\\[$&%#{}_]/))return"tag";if(v.match(/^\\[,;!\/\\]/))return"tag";if(v.match("\\["))return l(w,function(M,I){return g(M,I,"\\]")}),"keyword";if(v.match("\\("))return l(w,function(M,I){return g(M,I,"\\)")}),"keyword";if(v.match("$$"))return l(w,function(M,I){return g(M,I,"$$")}),"keyword";if(v.match("$"))return l(w,function(M,I){return g(M,I,"$")}),"keyword";var O=v.next();if(O=="%")return v.skipToEnd(),"comment";if(O=="}"||O=="]"){if(_=b(w),_)_.closeBracket(O),l(w,m);else return"error";return"bracket"}else return O=="{"||O=="["?(_=s.DEFAULT,_=new _,E(w,_),"bracket"):/\d/.test(O)?(v.eatWhile(/[\w.%]/),"atom"):(v.eatWhile(/[\w\-_]/),_=d(w),_.name=="begin"&&(_.argument=v.current()),_.styleIdentifier())}function g(v,w,_){if(v.eatSpace())return null;if(_&&v.match(_))return l(w,i),"keyword";if(v.match(/^\\[a-zA-Z@]+/))return"tag";if(v.match(/^[a-zA-Z]+/))return"variable-2";if(v.match(/^\\[$&%#{}_]/))return"tag";if(v.match(/^\\[,;!\/]/))return"tag";if(v.match(/^[\^_&]/))return"tag";if(v.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(v.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var k=v.next();return k=="{"||k=="}"||k=="["||k=="]"||k=="("||k==")"?"bracket":k=="%"?(v.skipToEnd(),"comment"):"error"}function m(v,w){var _=v.peek(),k;return _=="{"||_=="["?(k=b(w),k.openBracket(_),v.eat(_),l(w,i),"bracket"):/[ \t\r]/.test(_)?(v.eat(_),null):(l(w,i),p(w),i(v,w))}return{startState:function(){var v=S.inMathMode?function(w,_){return g(w,_)}:i;return{cmdState:[],f:v}},copyState:function(v){return{cmdState:v.cmdState.slice(),f:v.f}},token:function(v,w){return w.f(v,w)},blankLine:function(v){v.f=i,v.cmdState.length=0},lineComment:"%"}}),h.defineMIME("text/x-stex","stex"),h.defineMIME("text/x-latex","stex")})},"19Vz":function(u,G,c){(function(h){h(c("VrN/"))})(function(h){h.defineOption("placeholder","",function(a,s,l){var i=l&&l!=h.Init;if(s&&!i)a.on("blur",b),a.on("change",p),a.on("swapDoc",p),h.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){E(a)}),p(a);else if(!s&&i){a.off("blur",b),a.off("change",p),a.off("swapDoc",p),h.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),o(a);var g=a.getWrapperElement();g.className=g.className.replace(" CodeMirror-empty","")}s&&!a.hasFocus()&&b(a)});function o(a){a.state.placeholder&&(a.state.placeholder.parentNode.removeChild(a.state.placeholder),a.state.placeholder=null)}function S(a){o(a);var s=a.state.placeholder=document.createElement("pre");s.style.cssText="height: 0; overflow: visible",s.style.direction=a.getOption("direction"),s.className="CodeMirror-placeholder CodeMirror-line-like";var l=a.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),s.appendChild(l),a.display.lineSpace.insertBefore(s,a.display.lineSpace.firstChild)}function E(a){setTimeout(function(){var s=!1,l=a.getInputField();l.nodeName=="TEXTAREA"?s=!l.value:a.lineCount()==1&&(s=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),s?S(a):o(a)},20)}function b(a){d(a)&&S(a)}function p(a){var s=a.getWrapperElement(),l=d(a);s.className=s.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?S(a):o(a)}function d(a){return a.lineCount()===1&&a.getLine(0)===""}})},"1eCo":function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";var o={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};h.defineMode("xml",function(E,b){var p=E.indentUnit,d={},a=b.htmlMode?o:S;for(var s in a)d[s]=a[s];for(var s in b)d[s]=b[s];var l,i;function g(Q,ce){function fe($){return ce.tokenize=$,$(Q,ce)}var z=Q.next();if(z=="<")return Q.eat("!")?Q.eat("[")?Q.match("CDATA[")?fe(w("atom","]]>")):null:Q.match("--")?fe(w("comment","-->")):Q.match("DOCTYPE",!0,!0)?(Q.eatWhile(/[\w\._\-]/),fe(_(1))):null:Q.eat("?")?(Q.eatWhile(/[\w\._\-]/),ce.tokenize=w("meta","?>"),"meta"):(l=Q.eat("/")?"closeTag":"openTag",ce.tokenize=m,"tag bracket");if(z=="&"){var se;return Q.eat("#")?Q.eat("x")?se=Q.eatWhile(/[a-fA-F\d]/)&&Q.eat(";"):se=Q.eatWhile(/[\d]/)&&Q.eat(";"):se=Q.eatWhile(/[\w\.\-:]/)&&Q.eat(";"),se?"atom":"error"}else return Q.eatWhile(/[^&<]/),null}g.isInText=!0;function m(Q,ce){var fe=Q.next();if(fe==">"||fe=="/"&&Q.eat(">"))return ce.tokenize=g,l=fe==">"?"endTag":"selfcloseTag","tag bracket";if(fe=="=")return l="equals",null;if(fe=="<"){ce.tokenize=g,ce.state=I,ce.tagName=ce.tagStart=null;var z=ce.tokenize(Q,ce);return z?z+" tag error":"tag error"}else return/[\'\"]/.test(fe)?(ce.tokenize=v(fe),ce.stringStartCol=Q.column(),ce.tokenize(Q,ce)):(Q.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function v(Q){var ce=function(fe,z){for(;!fe.eol();)if(fe.next()==Q){z.tokenize=m;break}return"string"};return ce.isInAttribute=!0,ce}function w(Q,ce){return function(fe,z){for(;!fe.eol();){if(fe.match(ce)){z.tokenize=g;break}fe.next()}return Q}}function _(Q){return function(ce,fe){for(var z;(z=ce.next())!=null;){if(z=="<")return fe.tokenize=_(Q+1),fe.tokenize(ce,fe);if(z==">")if(Q==1){fe.tokenize=g;break}else return fe.tokenize=_(Q-1),fe.tokenize(ce,fe)}return"meta"}}function k(Q,ce,fe){this.prev=Q.context,this.tagName=ce,this.indent=Q.indented,this.startOfLine=fe,(d.doNotIndent.hasOwnProperty(ce)||Q.context&&Q.context.noIndent)&&(this.noIndent=!0)}function O(Q){Q.context&&(Q.context=Q.context.prev)}function M(Q,ce){for(var fe;;){if(!Q.context)return;if(fe=Q.context.tagName,!d.contextGrabbers.hasOwnProperty(fe)||!d.contextGrabbers[fe].hasOwnProperty(ce))return;O(Q)}}function I(Q,ce,fe){return Q=="openTag"?(fe.tagStart=ce.column(),B):Q=="closeTag"?N:I}function B(Q,ce,fe){return Q=="word"?(fe.tagName=ce.current(),i="tag",X):d.allowMissingTagName&&Q=="endTag"?(i="tag bracket",X(Q,ce,fe)):(i="error",B)}function N(Q,ce,fe){if(Q=="word"){var z=ce.current();return fe.context&&fe.context.tagName!=z&&d.implicitlyClosed.hasOwnProperty(fe.context.tagName)&&O(fe),fe.context&&fe.context.tagName==z||d.matchClosing===!1?(i="tag",y):(i="tag error",Y)}else return d.allowMissingTagName&&Q=="endTag"?(i="tag bracket",y(Q,ce,fe)):(i="error",Y)}function y(Q,ce,fe){return Q!="endTag"?(i="error",y):(O(fe),I)}function Y(Q,ce,fe){return i="error",y(Q,ce,fe)}function X(Q,ce,fe){if(Q=="word")return i="attribute",P;if(Q=="endTag"||Q=="selfcloseTag"){var z=fe.tagName,se=fe.tagStart;return fe.tagName=fe.tagStart=null,Q=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(z)?M(fe,z):(M(fe,z),fe.context=new k(fe,z,se==fe.indented)),I}return i="error",X}function P(Q,ce,fe){return Q=="equals"?F:(d.allowMissing||(i="error"),X(Q,ce,fe))}function F(Q,ce,fe){return Q=="string"?K:Q=="word"&&d.allowUnquoted?(i="string",X):(i="error",X(Q,ce,fe))}function K(Q,ce,fe){return Q=="string"?K:X(Q,ce,fe)}return{startState:function(Q){var ce={tokenize:g,state:I,indented:Q||0,tagName:null,tagStart:null,context:null};return Q!=null&&(ce.baseIndent=Q),ce},token:function(Q,ce){if(!ce.tagName&&Q.sol()&&(ce.indented=Q.indentation()),Q.eatSpace())return null;l=null;var fe=ce.tokenize(Q,ce);return(fe||l)&&fe!="comment"&&(i=null,ce.state=ce.state(l||fe,Q,ce),i&&(fe=i=="error"?fe+" error":i)),fe},indent:function(Q,ce,fe){var z=Q.context;if(Q.tokenize.isInAttribute)return Q.tagStart==Q.indented?Q.stringStartCol+1:Q.indented+p;if(z&&z.noIndent)return h.Pass;if(Q.tokenize!=m&&Q.tokenize!=g)return fe?fe.match(/^(\s*)/)[0].length:0;if(Q.tagName)return d.multilineTagIndentPastTag!==!1?Q.tagStart+Q.tagName.length+2:Q.tagStart+p*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/<!\[CDATA\[/.test(ce))return 0;var se=ce&&/^<(\/)?([\w_:\.-]*)/.exec(ce);if(se&&se[1])for(;z;)if(z.tagName==se[2]){z=z.prev;break}else if(d.implicitlyClosed.hasOwnProperty(z.tagName))z=z.prev;else break;else if(se)for(;z;){var $=d.contextGrabbers[z.tagName];if($&&$.hasOwnProperty(se[2]))z=z.prev;else break}for(;z&&z.prev&&!z.startOfLine;)z=z.prev;return z?z.indent+p:Q.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(Q){Q.state==F&&(Q.state=X)},xmlCurrentTag:function(Q){return Q.tagName?{name:Q.tagName,close:Q.type=="closeTag"}:null},xmlCurrentContext:function(Q){for(var ce=[],fe=Q.context;fe;fe=fe.prev)fe.tagName&&ce.push(fe.tagName);return ce.reverse()}}}),h.defineMIME("text/xml","xml"),h.defineMIME("application/xml","xml"),h.mimeModes.hasOwnProperty("text/html")||h.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("MlIO"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.Hasher,b=o.x64,p=b.Word,d=b.WordArray,a=o.algo;function s(){return p.create.apply(p,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)],i=[];(function(){for(var m=0;m<80;m++)i[m]=s()})();var g=a.SHA512=E.extend({_doReset:function(){this._hash=new d.init([new p.init(1779033703,4089235720),new p.init(3144134277,2227873595),new p.init(1013904242,4271175723),new p.init(2773480762,1595750129),new p.init(1359893119,2917565137),new p.init(2600822924,725511199),new p.init(528734635,4215389547),new p.init(1541459225,327033209)])},_doProcessBlock:function(m,v){for(var w=this._hash.words,_=w[0],k=w[1],O=w[2],M=w[3],I=w[4],B=w[5],N=w[6],y=w[7],Y=_.high,X=_.low,P=k.high,F=k.low,K=O.high,Q=O.low,ce=M.high,fe=M.low,z=I.high,se=I.low,$=B.high,j=B.low,U=N.high,R=N.low,C=y.high,D=y.low,le=Y,he=X,ve=P,Ee=F,Se=K,ae=Q,pe=ce,me=fe,ee=z,re=se,Z=$,ue=j,V=U,J=R,Ce=C,q=D,H=0;H<80;H++){var T,W,we=i[H];if(H<16)W=we.high=m[v+H*2]|0,T=we.low=m[v+H*2+1]|0;else{var ye=i[H-15],Oe=ye.high,Be=ye.low,Fe=(Oe>>>1|Be<<31)^(Oe>>>8|Be<<24)^Oe>>>7,Ue=(Be>>>1|Oe<<31)^(Be>>>8|Oe<<24)^(Be>>>7|Oe<<25),Ge=i[H-2],Ye=Ge.high,Xe=Ge.low,Je=(Ye>>>19|Xe<<13)^(Ye<<3|Xe>>>29)^Ye>>>6,Ne=(Xe>>>19|Ye<<13)^(Xe<<3|Ye>>>29)^(Xe>>>6|Ye<<26),nt=i[H-7],ot=nt.high,Ve=nt.low,$e=i[H-16],Ie=$e.high,De=$e.low;T=Ue+Ve,W=Fe+ot+(T>>>0<Ue>>>0?1:0),T=T+Ne,W=W+Je+(T>>>0<Ne>>>0?1:0),T=T+De,W=W+Ie+(T>>>0<De>>>0?1:0),we.high=W,we.low=T}var Le=ee&Z^~ee&V,_e=re&ue^~re&J,Te=le&ve^le&Se^ve&Se,ke=he&Ee^he&ae^Ee&ae,Ae=(le>>>28|he<<4)^(le<<30|he>>>2)^(le<<25|he>>>7),ze=(he>>>28|le<<4)^(he<<30|le>>>2)^(he<<25|le>>>7),je=(ee>>>14|re<<18)^(ee>>>18|re<<14)^(ee<<23|re>>>9),Ze=(re>>>14|ee<<18)^(re>>>18|ee<<14)^(re<<23|ee>>>9),ht=l[H],Tt=ht.high,qe=ht.low,at=q+Ze,dt=Ce+je+(at>>>0<q>>>0?1:0),at=at+_e,dt=dt+Le+(at>>>0<_e>>>0?1:0),at=at+qe,dt=dt+Tt+(at>>>0<qe>>>0?1:0),at=at+T,dt=dt+W+(at>>>0<T>>>0?1:0),st=ze+ke,St=Ae+Te+(st>>>0<ze>>>0?1:0);Ce=V,q=J,V=Z,J=ue,Z=ee,ue=re,re=me+at|0,ee=pe+dt+(re>>>0<me>>>0?1:0)|0,pe=Se,me=ae,Se=ve,ae=Ee,ve=le,Ee=he,he=at+st|0,le=dt+St+(he>>>0<at>>>0?1:0)|0}X=_.low=X+he,_.high=Y+le+(X>>>0<he>>>0?1:0),F=k.low=F+Ee,k.high=P+ve+(F>>>0<Ee>>>0?1:0),Q=O.low=Q+ae,O.high=K+Se+(Q>>>0<ae>>>0?1:0),fe=M.low=fe+me,M.high=ce+pe+(fe>>>0<me>>>0?1:0),se=I.low=se+re,I.high=z+ee+(se>>>0<re>>>0?1:0),j=B.low=j+ue,B.high=$+Z+(j>>>0<ue>>>0?1:0),R=N.low=R+J,N.high=U+V+(R>>>0<J>>>0?1:0),D=y.low=D+q,y.high=C+Ce+(D>>>0<q>>>0?1:0)},_doFinalize:function(){var m=this._data,v=m.words,w=this._nDataBytes*8,_=m.sigBytes*8;v[_>>>5]|=128<<24-_%32,v[(_+128>>>10<<5)+30]=Math.floor(w/4294967296),v[(_+128>>>10<<5)+31]=w,m.sigBytes=v.length*4,this._process();var k=this._hash.toX32();return k},clone:function(){var m=E.clone.call(this);return m._hash=this._hash.clone(),m},blockSize:1024/32});o.SHA512=E._createHelper(g),o.HmacSHA512=E._createHmacHelper(g)}(),h.SHA512})},"3y9D":function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.WordArray,b=S.Hasher,p=o.algo,d=[],a=p.SHA1=b.extend({_doReset:function(){this._hash=new E.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,l){for(var i=this._hash.words,g=i[0],m=i[1],v=i[2],w=i[3],_=i[4],k=0;k<80;k++){if(k<16)d[k]=s[l+k]|0;else{var O=d[k-3]^d[k-8]^d[k-14]^d[k-16];d[k]=O<<1|O>>>31}var M=(g<<5|g>>>27)+_+d[k];k<20?M+=(m&v|~m&w)+1518500249:k<40?M+=(m^v^w)+1859775393:k<60?M+=(m&v|m&w|v&w)-1894007588:M+=(m^v^w)-899497514,_=w,w=v,v=m<<30|m>>>2,m=g,g=M}i[0]=i[0]+g|0,i[1]=i[1]+m|0,i[2]=i[2]+v|0,i[3]=i[3]+w|0,i[4]=i[4]+_|0},_doFinalize:function(){var s=this._data,l=s.words,i=this._nDataBytes*8,g=s.sigBytes*8;return l[g>>>5]|=128<<24-g%32,l[(g+64>>>9<<4)+14]=Math.floor(i/4294967296),l[(g+64>>>9<<4)+15]=i,s.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var s=b.clone.call(this);return s._hash=this._hash.clone(),s}});o.SHA1=b._createHelper(a),o.HmacSHA1=b._createHmacHelper(a)}(),h.SHA1})},4:function(u,G){},"5hvy":function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("MlIO"))})(this,function(h){return function(o){var S=h,E=S.lib,b=E.WordArray,p=E.Hasher,d=S.x64,a=d.Word,s=S.algo,l=[],i=[],g=[];(function(){for(var w=1,_=0,k=0;k<24;k++){l[w+5*_]=(k+1)*(k+2)/2%64;var O=_%5,M=(2*w+3*_)%5;w=O,_=M}for(var w=0;w<5;w++)for(var _=0;_<5;_++)i[w+5*_]=_+(2*w+3*_)%5*5;for(var I=1,B=0;B<24;B++){for(var N=0,y=0,Y=0;Y<7;Y++){if(I&1){var X=(1<<Y)-1;X<32?y^=1<<X:N^=1<<X-32}I&128?I=I<<1^113:I<<=1}g[B]=a.create(N,y)}})();var m=[];(function(){for(var w=0;w<25;w++)m[w]=a.create()})();var v=s.SHA3=p.extend({cfg:p.cfg.extend({outputLength:512}),_doReset:function(){for(var w=this._state=[],_=0;_<25;_++)w[_]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(w,_){for(var k=this._state,O=this.blockSize/2,M=0;M<O;M++){var I=w[_+2*M],B=w[_+2*M+1];I=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360;var N=k[M];N.high^=B,N.low^=I}for(var y=0;y<24;y++){for(var Y=0;Y<5;Y++){for(var X=0,P=0,F=0;F<5;F++){var N=k[Y+5*F];X^=N.high,P^=N.low}var K=m[Y];K.high=X,K.low=P}for(var Y=0;Y<5;Y++)for(var Q=m[(Y+4)%5],ce=m[(Y+1)%5],fe=ce.high,z=ce.low,X=Q.high^(fe<<1|z>>>31),P=Q.low^(z<<1|fe>>>31),F=0;F<5;F++){var N=k[Y+5*F];N.high^=X,N.low^=P}for(var se=1;se<25;se++){var X,P,N=k[se],$=N.high,j=N.low,U=l[se];U<32?(X=$<<U|j>>>32-U,P=j<<U|$>>>32-U):(X=j<<U-32|$>>>64-U,P=$<<U-32|j>>>64-U);var R=m[i[se]];R.high=X,R.low=P}var C=m[0],D=k[0];C.high=D.high,C.low=D.low;for(var Y=0;Y<5;Y++)for(var F=0;F<5;F++){var se=Y+5*F,N=k[se],le=m[se],he=m[(Y+1)%5+5*F],ve=m[(Y+2)%5+5*F];N.high=le.high^~he.high&ve.high,N.low=le.low^~he.low&ve.low}var N=k[0],Ee=g[y];N.high^=Ee.high,N.low^=Ee.low}},_doFinalize:function(){var w=this._data,_=w.words,k=this._nDataBytes*8,O=w.sigBytes*8,M=this.blockSize*32;_[O>>>5]|=1<<24-O%32,_[(o.ceil((O+1)/M)*M>>>5)-1]|=128,w.sigBytes=_.length*4,this._process();for(var I=this._state,B=this.cfg.outputLength/8,N=B/8,y=[],Y=0;Y<N;Y++){var X=I[Y],P=X.high,F=X.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,y.push(F),y.push(P)}return new b.init(y,B)},clone:function(){for(var w=p.clone.call(this),_=w._state=this._state.slice(0),k=0;k<25;k++)_[k]=_[k].clone();return w}});S.SHA3=p._createHelper(v),S.HmacSHA3=p._createHmacHelper(v)}(Math),h.SHA3})},"5nXd":function(u,G,c){var h=c("MFOe"),o=h.slice,S=h.pluck,E=h.each,b=h.bind,p=h.create,d=h.isList,a=h.isFunction,s=h.isObject;u.exports={createStore:g};var l={version:"2.0.12",enabled:!1,get:function(m,v){var w=this.storage.read(this._namespacePrefix+m);return this._deserialize(w,v)},set:function(m,v){return v===void 0?this.remove(m):(this.storage.write(this._namespacePrefix+m,this._serialize(v)),v)},remove:function(m){this.storage.remove(this._namespacePrefix+m)},each:function(m){var v=this;this.storage.each(function(w,_){m.call(v,v._deserialize(w),(_||"").replace(v._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(m){return this._namespacePrefix=="__storejs_"+m+"_"},createStore:function(){return g.apply(this,arguments)},addPlugin:function(m){this._addPlugin(m)},namespace:function(m){return g(this.storage,this.plugins,m)}};function i(){var m=typeof console=="undefined"?null:console;if(!m)return;var v=m.warn?m.warn:m.log;v.apply(m,arguments)}function g(m,v,w){w||(w=""),m&&!d(m)&&(m=[m]),v&&!d(v)&&(v=[v]);var _=w?"__storejs_"+w+"_":"",k=w?new RegExp("^"+_):null,O=/^[a-zA-Z0-9_\-]*$/;if(!O.test(w))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var M={_namespacePrefix:_,_namespaceRegexp:k,_testStorage:function(B){try{var N="__storejs__test__";B.write(N,N);var y=B.read(N)===N;return B.remove(N),y}catch(Y){return!1}},_assignPluginFnProp:function(B,N){var y=this[N];this[N]=function(){var X=o(arguments,0),P=this;function F(){return y?(E(arguments,function(Q,ce){X[ce]=Q}),y.apply(P,X)):void 0}var K=[F].concat(X);return B.apply(P,K)}},_serialize:function(B){return JSON.stringify(B)},_deserialize:function(B,N){if(!B)return N;var y="";try{y=JSON.parse(B)}catch(Y){y=B}return y!==void 0?y:N},_addStorage:function(B){if(this.enabled)return;this._testStorage(B)&&(this.storage=B,this.enabled=!0)},_addPlugin:function(B){var N=this;if(d(B)){E(B,function(X){N._addPlugin(X)});return}var y=S(this.plugins,function(X){return B===X});if(y)return;if(this.plugins.push(B),!a(B))throw new Error("Plugins must be function values that return objects");var Y=B.call(this);if(!s(Y))throw new Error("Plugins must return an object of function properties");E(Y,function(X,P){if(!a(X))throw new Error("Bad plugin property: "+P+" from plugin "+B.name+". Plugins should only return functions.");N._assignPluginFnProp(X,P)})},addStorage:function(B){i("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(B)}},I=p(M,l,{plugins:[]});return I.raw={},E(I,function(B,N){a(B)&&(I.raw[N]=b(I,B))}),E(m,function(B){I._addStorage(B)}),E(v,function(B){I._addPlugin(B)}),I}},"7Cbv":function(u,G,c){"use strict";var h=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function S(){if(!h)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return h(o)}var E=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function b(m){return typeof m=="string"&&E.test(m)}for(var p=b,d=[],a=0;a<256;++a)d.push((a+256).toString(16).substr(1));function s(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(d[m[v+0]]+d[m[v+1]]+d[m[v+2]]+d[m[v+3]]+"-"+d[m[v+4]]+d[m[v+5]]+"-"+d[m[v+6]]+d[m[v+7]]+"-"+d[m[v+8]]+d[m[v+9]]+"-"+d[m[v+10]]+d[m[v+11]]+d[m[v+12]]+d[m[v+13]]+d[m[v+14]]+d[m[v+15]]).toLowerCase();if(!p(w))throw TypeError("Stringified UUID is invalid");return w}var l=s;function i(m,v,w){m=m||{};var _=m.random||(m.rng||S)();if(_[6]=_[6]&15|64,_[8]=_[8]&63|128,v){w=w||0;for(var k=0;k<16;++k)v[w+k]=_[k];return v}return l(_)}var g=G.a=i},"7ahc":function(u,G,c){"use strict";c.d(G,"a",function(){return B});var h=c("k1fw"),o=c("0Owb"),S=c("+L6B"),E=c("2/Rp"),b=c("y8nQ"),p=c("Vl3Y"),d=c("tJVT"),a=c("OaEy"),s=c("2fM7"),l=c("q1tI"),i=c.n(l),g=c("VrN/"),m=c.n(g),v=c("p77/"),w=c.n(v),_=c("c5Ni"),k=c.n(_),O=s.a.Option,M={labelCol:{span:4},wrapperCol:{span:20}},I={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"]};G.b=function(N){var y=N.callback,Y=N.onCancel,X=Object(l.useState)("python"),P=Object(d.a)(X,2),F=P[0],K=P[1];function Q(fe){K(I[fe][1])}function ce(fe){y(fe)}return i.a.createElement(p.a,Object(o.a)({},M,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ce}),i.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},i.a.createElement(s.a,{onChange:Q},Object.keys(I).map(function(fe){return i.a.createElement(O,{key:fe,value:fe},I[fe][0])}))),i.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},i.a.createElement(B,{mode:F})),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(E.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(E.a,{type:"ghost",onClick:Y},"\u53D6\u6D88")))};function B(N){var y=N.value,Y=N.onChange,X=N.mode,P=N.options,F=P===void 0?{}:P,K=Object(l.useRef)(),Q=Object(l.useState)(),ce=Object(d.a)(Q,2),fe=ce[0],z=ce[1];return Object(l.useEffect)(function(){if(fe){function se($){var j=$.getValue();Y&&Y(j)}return fe.on("change",se),function(){fe.off("change",se)}}},[fe,Y]),Object(l.useEffect)(function(){fe&&fe.setOption("mode",X)},[fe,X]),Object(l.useEffect)(function(){fe&&((y!==fe.getValue()||y==="")&&setTimeout(function(){fe.setValue(y||" ")},300))},[fe,y]),Object(l.useEffect)(function(){if(K.current&&!fe){var se=m.a.fromTextArea(K.current,Object(h.a)({mode:X,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},F));z(se)}},[K.current,fe]),i.a.createElement("div",{className:"my-codemirror-container"},i.a.createElement("textarea",{ref:K}))}},"7ixt":function(u,G,c){"use strict";c.d(G,"a",function(){return S});var h={adjustX:1,adjustY:1},o=[0,0],S={left:{points:["cr","cl"],overflow:h,offset:[-4,0],targetOffset:o},right:{points:["cl","cr"],overflow:h,offset:[4,0],targetOffset:o},top:{points:["bc","tc"],overflow:h,offset:[0,-4],targetOffset:o},bottom:{points:["tc","bc"],overflow:h,offset:[0,4],targetOffset:o},topLeft:{points:["bl","tl"],overflow:h,offset:[0,-4],targetOffset:o},leftTop:{points:["tr","tl"],overflow:h,offset:[-4,0],targetOffset:o},topRight:{points:["br","tr"],overflow:h,offset:[0,-4],targetOffset:o},rightTop:{points:["tl","tr"],overflow:h,offset:[4,0],targetOffset:o},bottomRight:{points:["tr","br"],overflow:h,offset:[0,4],targetOffset:o},rightBottom:{points:["bl","br"],overflow:h,offset:[4,0],targetOffset:o},bottomLeft:{points:["tl","bl"],overflow:h,offset:[0,4],targetOffset:o},leftBottom:{points:["br","bl"],overflow:h,offset:[-4,0],targetOffset:o}},E=S},"815F":function(u,G,c){"use strict";c.d(G,"e",function(){return d}),c.d(G,"c",function(){return s}),c.d(G,"d",function(){return l}),c.d(G,"a",function(){return g}),c.d(G,"f",function(){return m}),c.d(G,"b",function(){return v});var h=c("KQm4"),o=c("VTBJ"),S=c("Ff2n"),E=c("Zm9Q"),b=c("Kwbf"),p=c("OZM5");function d(w,_){return w!=null?w:_}function a(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=new Map;function k(O){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(O||[]).forEach(function(I){var B=I.key,N=I.children;Object(b.a)(B!=null,"Tree node must have a certain key: [".concat(M).concat(B,"]"));var y=String(B);Object(b.a)(!_.has(y)||B===null||B===void 0,"Same 'key' exist in the Tree: ".concat(y)),_.set(y,!0),k(N,"".concat(M).concat(y," > "))})}k(w)}function s(w){function _(k){var O=Object(E.a)(k);return O.map(function(M){if(!Object(p.i)(M))return Object(b.a)(!M,"Tree/TreeNode can only accept TreeNode as children."),null;var I=M.key,B=M.props,N=B.children,y=Object(S.a)(B,["children"]),Y=Object(o.a)({key:I},y),X=_(N);return X.length&&(Y.children=X),Y}).filter(function(M){return M})}return _(w)}function l(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],k=new Set(_===!0?[]:_),O=[];function M(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return I.map(function(N,y){var Y=Object(p.h)(B?B.pos:"0",y),X=d(N.key,Y),P=Object(o.a)(Object(o.a)({},N),{},{parent:B,pos:Y,children:null,data:N,isStart:[].concat(Object(h.a)(B?B.isStart:[]),[y===0]),isEnd:[].concat(Object(h.a)(B?B.isEnd:[]),[y===I.length-1])});return O.push(P),_===!0||k.has(X)?P.children=M(N.children||[],P):P.children=[],P})}return M(w),O}function i(w,_,k){var O;k?typeof k=="string"?O=function(B){return B[k]}:typeof k=="function"&&(O=function(B){return k(B)}):O=function(B,N){return d(B.key,N)};function M(I,B,N){var y=I?I.children:w,Y=I?Object(p.h)(N.pos,B):"0";if(I){var X=O(I,Y),P={node:I,index:B,pos:Y,key:X,parentPos:N.node?N.pos:null,level:N.level+1};_(P)}y&&y.forEach(function(F,K){M(F,K,{node:I,pos:Y,level:N?N.level+1:-1})})}M(null)}function g(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=_.initWrapper,O=_.processEntity,M=_.onProcessFinished,I=arguments.length>2?arguments[2]:void 0,B={},N={},y={posEntities:B,keyEntities:N};return k&&(y=k(y)||y),i(w,function(Y){var X=Y.node,P=Y.index,F=Y.pos,K=Y.key,Q=Y.parentPos,ce=Y.level,fe={node:X,index:P,key:K,pos:F,level:ce},z=d(K,F);B[F]=fe,N[z]=fe,fe.parent=B[Q],fe.parent&&(fe.parent.children=fe.parent.children||[],fe.parent.children.push(fe)),O&&O(fe,y)},I),M&&M(y),y}function m(w,_){var k=_.expandedKeys,O=_.selectedKeys,M=_.loadedKeys,I=_.loadingKeys,B=_.checkedKeys,N=_.halfCheckedKeys,y=_.dragOverNodeKey,Y=_.dropPosition,X=_.keyEntities,P=X[w],F={eventKey:w,expanded:k.indexOf(w)!==-1,selected:O.indexOf(w)!==-1,loaded:M.indexOf(w)!==-1,loading:I.indexOf(w)!==-1,checked:B.indexOf(w)!==-1,halfChecked:N.indexOf(w)!==-1,pos:String(P?P.pos:""),dragOver:y===w&&Y===0,dragOverGapTop:y===w&&Y===-1,dragOverGapBottom:y===w&&Y===1};return F}function v(w){var _=w.data,k=w.expanded,O=w.selected,M=w.checked,I=w.loaded,B=w.loading,N=w.halfChecked,y=w.dragOver,Y=w.dragOverGapTop,X=w.dragOverGapBottom,P=w.pos,F=w.active,K=Object(o.a)(Object(o.a)({},_),{},{expanded:k,selected:O,checked:M,loaded:I,loading:B,halfChecked:N,dragOver:y,dragOverGapTop:Y,dragOverGapBottom:X,pos:P,active:F});return"props"in K||Object.defineProperty(K,"props",{get:function(){return Object(b.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),w}}),K}},"8EBN":function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";h.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 o=0;o<h.modeInfo.length;o++){var S=h.modeInfo[o];S.mimes&&(S.mime=S.mimes[0])}h.findModeByMIME=function(E){E=E.toLowerCase();for(var b=0;b<h.modeInfo.length;b++){var p=h.modeInfo[b];if(p.mime==E)return p;if(p.mimes){for(var d=0;d<p.mimes.length;d++)if(p.mimes[d]==E)return p}}if(/\+xml$/.test(E))return h.findModeByMIME("application/xml");if(/\+json$/.test(E))return h.findModeByMIME("application/json")},h.findModeByExtension=function(E){E=E.toLowerCase();for(var b=0;b<h.modeInfo.length;b++){var p=h.modeInfo[b];if(p.ext){for(var d=0;d<p.ext.length;d++)if(p.ext[d]==E)return p}}},h.findModeByFileName=function(E){for(var b=0;b<h.modeInfo.length;b++){var p=h.modeInfo[b];if(p.file&&p.file.test(E))return p}var d=E.lastIndexOf("."),a=d>-1&&E.substring(d+1,E.length);if(a)return h.findModeByExtension(a)},h.findModeByName=function(E){E=E.toLowerCase();for(var b=0;b<h.modeInfo.length;b++){var p=h.modeInfo[b];if(p.name.toLowerCase()==E)return p;if(p.alias){for(var d=0;d<p.alias.length;d++)if(p.alias[d].toLowerCase()==E)return p}}}})},"8hTe":function(u,G,c){u.exports={button:"button___1wy9m"}},"9Bee":function(u,G,c){"use strict";var h=c("DYRE"),o=c("zeV3"),S=c("+L6B"),E=c("2/Rp"),b=c("k1fw"),p=c("9og8"),d=c("tJVT"),a=c("WmNS"),s=c.n(a),l=c("q1tI"),i=c.n(l),g=c("vg9a"),m=c("DlQD"),v=c.n(m),w=c("rUJ1");function _(oe,x){var A=oe.match(/^(\s+)(?:```)/);if(A===null)return x;var ie=A[1];return x.split(`
`).map(function(be){var ne=be.match(/^\s+/);if(ne===null)return be;var Me=Object(d.a)(ne,1),Qe=Me[0];return Qe.length>=ie.length?be.slice(ie.length):be}).join(`
`)}var k=[],O=["<ul>"],M=new v.a.Renderer,I=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function B(){k.length=0,O=["<ul>"]}var N={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(oe,x,A,ie){if(x>=oe.length||oe[x].level<=A)return x;var be=oe[x];ie.push("<li><a href='#"+be.anchor+"'>"+be.text+"</a>"),x++;var ne=[];return x=y(oe,x,be.level,ne),ne.length>0&&(ie.push("<ul>"),ne.forEach(function(Me){ie.push(Me)}),ie.push("</ul>")),ie.push("</li>"),x=y(oe,x,A,ie),x}function Y(){return y(k,0,0,O),O.push("</ul>"),O.join("")}var X={heading:function(x){var A=I.exec(x);if(A)return{type:"heading",raw:A[0],depth:A[1].length,text:A[2]}},fences:function(x){var A=this.rules.block.fences.exec(x);if(A){var ie=A[0],be=_(ie,A[3]||""),ne=A[2]?A[2].trim():A[2];if(["latex","katex","math"].indexOf(ne)>=0){var Me=K(),Qe=be;be=Me,Q[Me]={type:"block",expression:Qe}}return{type:"code",raw:ie,lang:ne,text:be}}}},P=/(?:\${2})([^\n`]+?)(?:\${2})/gi,F=0,K=function(){return"__special_katext_id_".concat(F++,"__")},Q={};function ce(){return Q}function fe(){F=0,Q={}}function z(oe){return oe=oe.replace(P,function(x,A){var ie=K();return Q[ie]={type:"inline",expression:A},ie}),oe}var se=M.listitem;M.listitem=function(oe){return se(z(oe))};var $=M.paragraph;M.paragraph=function(oe){return $(z(oe))};var j=M.tablecell;M.tablecell=function(oe,x){return j(z(oe),x)},M.code=function(oe,x,A){var ie=(x||"").match(/\S*/)[0];return ie?["latex","katex","math"].indexOf(ie)>=0?"<p class='editormd-tex'>".concat(oe,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(x,'">').concat(A?oe:Object(w.escape)(oe,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(A?oe:Object(w.escape)(oe,!0))+"</code></pre>"},M.heading=function(oe,x,A){var ie=this.options.headerPrefix+A.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return k.push({anchor:ie,level:x,text:oe}),"<h"+x+' id="'+ie+'">'+oe+"</h"+x+">"},v.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),v.a.use({tokenizer:X,renderer:M});var U=v.a,R=c("SJMd"),C=c("ulZh"),D=c.n(C),le=c("m3rI"),he=c("Oy/b"),ve=c("p5ED"),Ee=c("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Se=function(oe,x){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,ie){A.__proto__=ie}||function(A,ie){for(var be in ie)Object.prototype.hasOwnProperty.call(ie,be)&&(A[be]=ie[be])})(oe,x)};function ae(oe,x){function A(){this.constructor=oe}Se(oe,x),oe.prototype=x===null?Object.create(x):(A.prototype=x.prototype,new A)}function pe(oe,x,A,ie){return new(A||(A=Promise))(function(be,ne){function Me(wt){try{He(ie.next(wt))}catch(tt){ne(tt)}}function Qe(wt){try{He(ie.throw(wt))}catch(tt){ne(tt)}}function He(wt){var tt;wt.done?be(wt.value):(tt=wt.value,tt instanceof A?tt:new A(function(Nt){Nt(tt)})).then(Me,Qe)}He((ie=ie.apply(oe,x||[])).next())})}function me(oe,x){var A,ie,be,ne,Me={label:0,sent:function(){if(1&be[0])throw be[1];return be[1]},trys:[],ops:[]};return ne={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Qe(He){return function(wt){return function(tt){if(A)throw new TypeError("Generator is already executing.");for(;Me;)try{if(A=1,ie&&(be=2&tt[0]?ie.return:tt[0]?ie.throw||((be=ie.return)&&be.call(ie),0):ie.next)&&!(be=be.call(ie,tt[1])).done)return be;switch(ie=0,be&&(tt=[2&tt[0],be.value]),tt[0]){case 0:case 1:be=tt;break;case 4:return Me.label++,{value:tt[1],done:!1};case 5:Me.label++,ie=tt[1],tt=[0];continue;case 7:tt=Me.ops.pop(),Me.trys.pop();continue;default:if(!(be=Me.trys,(be=be.length>0&&be[be.length-1])||tt[0]!==6&&tt[0]!==2)){Me=0;continue}if(tt[0]===3&&(!be||tt[1]>be[0]&&tt[1]<be[3])){Me.label=tt[1];break}if(tt[0]===6&&Me.label<be[1]){Me.label=be[1],be=tt;break}if(be&&Me.label<be[2]){Me.label=be[2],Me.ops.push(tt);break}be[2]&&Me.ops.pop(),Me.trys.pop();continue}tt=x.call(oe,Me)}catch(Nt){tt=[6,Nt],ie=0}finally{A=be=0}if(5&tt[0])throw tt[1];return{value:tt[0]?tt[1]:void 0,done:!0}}([He,wt])}}}function ee(){for(var oe=0,x=0,A=arguments.length;x<A;x++)oe+=arguments[x].length;var ie=Array(oe),be=0;for(x=0;x<A;x++)for(var ne=arguments[x],Me=0,Qe=ne.length;Me<Qe;Me++,be++)ie[be]=ne[Me];return ie}var re=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(x,A){for(var ie=0,be=A;ie<be.length;ie++){var ne=be[ie],Me=ne[0],Qe=ne[1];x.setAttribute(Me,Qe)}},oe.createRect=function(x,A,ie){var be=document.createElementNS("http://www.w3.org/2000/svg","rect");return be.setAttribute("width",x.toString()),be.setAttribute("height",A.toString()),ie&&oe.setAttributes(be,ie),be},oe.createLine=function(x,A,ie,be,ne){var Me=document.createElementNS("http://www.w3.org/2000/svg","line");return Me.setAttribute("x1",x.toString()),Me.setAttribute("y1",A.toString()),Me.setAttribute("x2",ie.toString()),Me.setAttribute("y2",be.toString()),ne&&oe.setAttributes(Me,ne),Me},oe.createPolygon=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",x),A&&oe.setAttributes(ie,A),ie},oe.createCircle=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(x/2).toString()),ie.setAttribute("cy",(x/2).toString()),ie.setAttribute("r",x.toString()),A&&oe.setAttributes(ie,A),ie},oe.createEllipse=function(x,A,ie){var be=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return be.setAttribute("cx",(x/2).toString()),be.setAttribute("cy",(A/2).toString()),be.setAttribute("rx",(x/2).toString()),be.setAttribute("ry",(A/2).toString()),ie&&oe.setAttributes(be,ie),be},oe.createGroup=function(x){var A=document.createElementNS("http://www.w3.org/2000/svg","g");return x&&oe.setAttributes(A,x),A},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(x,A,ie,be,ne,Me,Qe){var He=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(He,[["id",x],["orient",A],["markerWidth",ie.toString()],["markerHeight",be.toString()],["refX",ne.toString()],["refY",Me.toString()]]),He.appendChild(Qe),He},oe.createText=function(x){var A=document.createElementNS("http://www.w3.org/2000/svg","text");return A.setAttribute("x","0"),A.setAttribute("y","0"),x&&oe.setAttributes(A,x),A},oe.createTSpan=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=x,A&&oe.setAttributes(ie,A),ie},oe.createImage=function(x){var A=document.createElementNS("http://www.w3.org/2000/svg","image");return x&&oe.setAttributes(A,x),A},oe.createPoint=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=x,ie.y=A,ie},oe.createPath=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",x),A&&oe.setAttributes(ie,A),ie},oe}(),Z=function(){function oe(){}return oe.addKey=function(x){oe.key=x},Object.defineProperty(oe,"isLicensed",{get:function(){return!!oe.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(oe.key)},enumerable:!1,configurable:!0}),oe}(),ue=function(){function oe(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return oe.prototype.rasterize=function(x,A,ie){var be=this;return new Promise(function(ne){var Me=ie!==void 0?ie:document.createElement("canvas");x===null&&(be.markersOnly=!0,be.naturalSize=!1);var Qe=document.createElementNS("http://www.w3.org/2000/svg","svg");Qe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Qe.setAttribute("width",A.width.baseVal.valueAsString),Qe.setAttribute("height",A.height.baseVal.valueAsString),Qe.setAttribute("viewBox","0 0 "+A.viewBox.baseVal.width.toString()+" "+A.viewBox.baseVal.height.toString()),Qe.innerHTML=A.innerHTML,be.naturalSize===!0?(Qe.width.baseVal.value=x.naturalWidth,Qe.height.baseVal.value=x.naturalHeight):be.width!==void 0&&be.height!==void 0&&(Qe.width.baseVal.value=be.width,Qe.height.baseVal.value=be.height),Me.width=Qe.width.baseVal.value,Me.height=Qe.height.baseVal.value;var He=Qe.outerHTML,wt=Me.getContext("2d");be.markersOnly!==!0&&wt.drawImage(x,0,0,Me.width,Me.height);var tt=window.URL,Nt=new Image(Me.width,Me.height);Nt.setAttribute("crossOrigin","anonymous");var Yt=new Blob([He],{type:"image/svg+xml"}),qt=tt.createObjectURL(Yt);Nt.onload=function(){wt.drawImage(Nt,0,0),tt.revokeObjectURL(qt);var Yr=Me.toDataURL(be.imageType,be.imageQuality);ne(Yr)},Nt.src=qt})},oe}(),V=function(){},J=function(){function oe(x){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+x+"_"}return Object.defineProperty(oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),oe.prototype.addClass=function(x){return this.styleSheet===void 0&&this.addStyleSheet(),x.name=""+this.classNamePrefix+x.localName,this.classes.push(x),this.styleSheet.sheet.insertRule("."+x.name+" {"+x.style+"}",this.styleSheet.sheet.cssRules.length),x},oe.prototype.addRule=function(x){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(x),this.styleSheet.sheet.insertRule(x.selector+" {"+x.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var x;this.styleSheet=document.createElement("style"),((x=this.styleSheetRoot)!==null&&x!==void 0?x:document.head).appendChild(this.styleSheet),this.addRule(new Ce("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ce("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new q("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new q("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},oe.prototype.removeStyleSheet=function(){var x;this.styleSheet&&(((x=this.styleSheetRoot)!==null&&x!==void 0?x:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Ce=function(oe,x){this.selector=oe,this.style=x},q=function(oe,x){this.localName=oe,this.style=x},H=function(){function oe(x,A,ie,be,ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=x,this.displayMode=A,this.markerItems=ie,this.uiStyleSettings=be,this.styles=ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return oe.prototype.show=function(x){var A=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=x,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ie=document.createElement("div");ie.className=this.toolbarBlockStyleClass.name,ie.style.whiteSpace="nowrap",this.uiContainer.appendChild(ie),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(ie,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"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(ne){var Me=document.createElement("div");Me.className=""+A.toolbarButtonStyleClass.name,Me.setAttribute("data-type-name",ne.typeName),Me.innerHTML=ne.icon,Me.addEventListener("click",function(){A.markerToolbarButtonClicked(Me,ne)}),A.buttons.push(Me),A.markerButtons.push(Me)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var be=document.createElement("div");be.className=this.toolbarBlockStyleClass.name,be.style.whiteSpace="nowrap",be.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(be),this.addActionButton(be,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(be,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},oe.prototype.addButtonClickListener=function(x){this.buttonClickListeners.push(x)},oe.prototype.removeButtonClickListener=function(x){this.buttonClickListeners.indexOf(x)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(x),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var x=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var A=0;A<this.markerButtons.length;A++)A<x||A===x&&this.markerButtons.length-1===x?this.markerButtonBlock.appendChild(this.markerButtons[A]):(A===x&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[A]))}},oe.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},oe.prototype.resetButtonStyles=function(){var x=this;this.buttons.forEach(function(A){A.className=A.className.replace(x.uiStyleSettings.toolbarButtonStyleColorsClassName?x.uiStyleSettings.toolbarButtonStyleColorsClassName:x.toolbarButtonStyleColorsClass.name,"").trim(),A.className=A.className.replace(x.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?x.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:x.toolbarActiveButtonStyleColorsClass.name,"").trim(),A.className+=" "+(x.uiStyleSettings.toolbarButtonStyleColorsClassName?x.uiStyleSettings.toolbarButtonStyleColorsClassName:x.toolbarButtonStyleColorsClass.name)})},oe.prototype.addActionButton=function(x,A,ie){var be=this,ne=document.createElement("div");switch(ne.className=""+this.toolbarButtonStyleClass.name,ne.innerHTML=A,ne.setAttribute("data-action",ie),ne.addEventListener("click",function(){be.actionToolbarButtonClicked(ne,ie)}),ie){case"select":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":ne.style.fill=this.uiStyleSettings.closeButtonColor}x.appendChild(ne),this.buttons.push(ne)},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new q("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new q("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new q("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new q("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new q("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var x=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*x)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*x)+`px;
padding: `+x+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new q("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ce("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},oe.prototype.markerToolbarButtonClicked=function(x,A){this.setActiveButton(x),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",A)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(x,A){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("action",A)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},oe.prototype.setActiveButton=function(x){this.resetButtonStyles(),x.className=x.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),x.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},oe.prototype.setActiveMarkerButton=function(x){var A=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===x});A&&this.setActiveButton(A)},oe.prototype.setCurrentMarker=function(x){var A=this;this.currentMarker=x,this.buttons.filter(function(ie){return/delete|notes/.test(ie.getAttribute("data-action"))}).forEach(function(ie){A.currentMarker===void 0?(ie.style.fillOpacity="0.4",ie.style.pointerEvents="none"):(ie.style.fillOpacity="1",ie.style.pointerEvents="all")})},oe}(),T=function(){function oe(x,A,ie,be){this.panels=[],this.panelButtons=[],this.markerjsContainer=x,this.displayMode=A,this.uiStyleSettings=ie,this.styles=be,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var x;this.toolboxStyleClass=this.styles.addClass(new q("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new q("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var A=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new q("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new q("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new q("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new q("toolbox-panel-row_colors",`
background-color: `+((x=this.uiStyleSettings.toolboxBackgroundColor)!==null&&x!==void 0?x:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new q("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*A)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*A)+`px;
padding: `+A+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new q("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ce("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},oe.prototype.show=function(x){var A;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=x,this.uiContainer.className=this.toolboxStyleClass.name+" "+((A=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&A!==void 0?A:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},oe.prototype.setPanelButtons=function(x){var A,ie,be=this;this.panels=x,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((A=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&A!==void 0?A:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ie=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ie!==void 0?ie:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var Me;ne.uiStyleSettings=be.uiStyleSettings;var Qe=document.createElement("div");Qe.className=be.toolboxButtonStyleClass.name+" "+((Me=be.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Me!==void 0?Me:be.toolboxButtonStyleColorsClass.name),Qe.innerHTML=ne.icon,Qe.title=ne.title,Qe.addEventListener("click",function(){be.panelButtonClick(ne)}),be.panelButtons.push(Qe),be.buttonRow.appendChild(Qe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(x){var A=this,ie=-1;if(x!==this.activePanel){ie=this.panels.indexOf(x),this.panelRow.innerHTML="";var be=x.getUi();be.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(be),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=x}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){A.displayMode==="inline"?A.panelRow.style.display="none":A.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,Me){var Qe,He;ne.className=A.toolboxButtonStyleClass.name+" "+(Me===ie?""+((Qe=A.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:A.toolboxActiveButtonStyleColorsClass.name):""+((He=A.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&He!==void 0?He:A.toolboxButtonStyleColorsClass.name))})},oe}(),W=function(oe,x){this.title=oe,this.icon=x},we=function(oe){function x(A,ie,be,ne){var Me=oe.call(this,A,ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Me.colors=[],Me.addTransparent=!1,Me.colorBoxes=[],Me.colors=ie,Me.currentColor=be,Me.setCurrentColor=Me.setCurrentColor.bind(Me),Me.getColorBox=Me.getColorBox.bind(Me),Me}return ae(x,oe),x.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(be){var ne=A.getColorBox(be);ie.appendChild(ne),A.colorBoxes.push(ne)}),ie},x.prototype.getColorBox=function(A){var ie=this,be=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-be,Me=document.createElement("div");Me.style.display="inline-block",Me.style.boxSizing="content-box",Me.style.width=ne-2+"px",Me.style.height=ne-2+"px",Me.style.padding="1px",Me.style.marginRight="2px",Me.style.marginBottom="2px",Me.style.borderWidth="2px",Me.style.borderStyle="solid",Me.style.borderRadius=(ne+2)/2+"px",Me.style.borderColor=A===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Me.addEventListener("click",function(){ie.setCurrentColor(A,Me)});var Qe=document.createElement("div");return Qe.style.display="inline-block",Qe.style.width=ne-2+"px",Qe.style.height=ne-2+"px",Qe.style.backgroundColor=A,Qe.style.borderRadius=ne/2+"px",A==="transparent"&&(Qe.style.fill=this.uiStyleSettings.toolboxAccentColor,Qe.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Me.appendChild(Qe),Me},x.prototype.setCurrentColor=function(A,ie){var be=this;this.currentColor=A,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?be.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(A)},x}(W),ye=function(){function oe(x,A,ie){this._state="new",this._isSelected=!1,this._container=x,this._overlayContainer=A,this.globalSettings=ie,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),oe.prototype.ownsTarget=function(x){return!1},Object.defineProperty(oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},oe.prototype.pointerDown=function(x,A){},oe.prototype.dblClick=function(x,A){},oe.prototype.manipulate=function(x){},oe.prototype.pointerUp=function(x){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(x){this.container.childNodes.length>0?this.container.insertBefore(x,this.container.childNodes[0]):this.container.appendChild(x)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(x){this._state=x.state,this.notes=x.notes},oe.prototype.scale=function(x,A){},oe.prototype.colorChanged=function(x){this.onColorChanged&&this.onColorChanged(x),this.stateChanged()},oe.prototype.fillColorChanged=function(x){this.onFillColorChanged&&this.onFillColorChanged(x),this.stateChanged()},oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var x=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),x.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(x)&&this.onStateChanged(this)}},oe.typeName="MarkerBase",oe}(),Oe=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.prototype.findGripByVisual=function(x){return this.topLeft.ownsTarget(x)?this.topLeft:this.topCenter.ownsTarget(x)?this.topCenter:this.topRight.ownsTarget(x)?this.topRight:this.centerLeft.ownsTarget(x)?this.centerLeft:this.centerRight.ownsTarget(x)?this.centerRight:this.bottomLeft.ownsTarget(x)?this.bottomLeft:this.bottomCenter.ownsTarget(x)?this.bottomCenter:this.bottomRight.ownsTarget(x)?this.bottomRight:void 0},oe}(),Be=function(){function oe(){this.GRIP_SIZE=10,this.visual=re.createGroup(),this.visual.appendChild(re.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(re.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},oe}(),Fe=function(){function oe(){}return oe.toITransformMatrix=function(x){return{a:x.a,b:x.b,c:x.c,d:x.d,e:x.e,f:x.f}},oe.toSVGMatrix=function(x,A){return x.a=A.a,x.b=A.b,x.c=A.c,x.d=A.d,x.e=A.e,x.f=A.f,x},oe}(),Ue=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(re.createTransform()),ne.setupControlBox(),ne}return ae(x,oe),Object.defineProperty(x.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"visual",{get:function(){return this._visual},set:function(A){this._visual=A;var ie=re.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(A){return!!oe.prototype.ownsTarget.call(this,A)||!!(this.controlGrips.findGripByVisual(A)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(A))},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.left=A.x,this.top=A.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var be=this.unrotatePoint(A);if(this.manipulationStartX=be.x,this.manipulationStartY=be.y,this.offsetX=be.x-this.left,this.offsetY=be.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Me=this.container.transform.baseVal.getItem(0);Me.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Me,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},x.prototype.pointerUp=function(A){var ie=this.state;oe.prototype.pointerUp.call(this,A),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(A),this._state="select",ie==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},x.prototype.moveVisual=function(A){this.visual.style.transform="translate("+A.x+"px, "+A.y+"px)"},x.prototype.manipulate=function(A){var ie=this.unrotatePoint(A);this.state==="creating"?this.resize(A):this.state==="move"?(this.left=this.manipulationStartLeft+(ie.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ie.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ie):this.state==="rotate"&&this.rotate(A)},x.prototype.resize=function(A){var ie=this.manipulationStartLeft,be=this.manipulationStartWidth,ne=this.manipulationStartTop,Me=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ie=this.manipulationStartLeft+A.x-this.manipulationStartX,be=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:be=this.manipulationStartWidth+A.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+A.y-this.manipulationStartY,Me=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Me=this.manipulationStartHeight+A.y-this.manipulationStartY}be>=0?(this.left=ie,this.width=be):(this.left=ie+be,this.width=-be),Me>=0?(this.top=ne,this.height=Me):(this.top=ne+Me,this.height=-Me),this.setSize()},x.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},x.prototype.rotate=function(A){if(Math.abs(A.x-this.centerX)>.1){var ie=Math.sign(A.x-this.centerX);this.rotationAngle=180*Math.atan((A.y-this.centerY)/(A.x-this.centerX))/Math.PI+90*ie,this.applyRotation()}},x.prototype.applyRotation=function(){var A=this.container.transform.baseVal.getItem(0);A.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(A,0)},x.prototype.rotatePoint=function(A){if(this.rotationAngle===0)return A;var ie=this.container.getCTM(),be=re.createPoint(A.x,A.y);return{x:(be=be.matrixTransform(ie)).x,y:be.y}},x.prototype.unrotatePoint=function(A){if(this.rotationAngle===0)return A;var ie=this.container.getCTM();ie=ie.inverse();var be=re.createPoint(A.x,A.y);return{x:(be=be.matrixTransform(ie)).x,y:be.y}},x.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=re.createGroup();var A=re.createTransform();A.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(A),this.container.appendChild(this.controlBox),this.controlRect=re.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=re.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Oe,this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){var A=this.controlBox.transform.baseVal.getItem(0);A.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(A,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},x.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},x.prototype.createGrip=function(){var A=new Be;return A.visual.transform.baseVal.appendItem(re.createTransform()),this.controlBox.appendChild(A.visual),A},x.prototype.positionGrips=function(){var A=this.controlGrips.topLeft.GRIP_SIZE,ie=-A/2,be=ie,ne=(this.width+this.CB_DISTANCE)/2-A/2,Me=(this.height+this.CB_DISTANCE)/2-A/2,Qe=this.height+this.CB_DISTANCE-A/2,He=this.width+this.CB_DISTANCE-A/2;this.positionGrip(this.controlGrips.topLeft.visual,ie,be),this.positionGrip(this.controlGrips.topCenter.visual,ne,be),this.positionGrip(this.controlGrips.topRight.visual,He,be),this.positionGrip(this.controlGrips.centerLeft.visual,ie,Me),this.positionGrip(this.controlGrips.centerRight.visual,He,Me),this.positionGrip(this.controlGrips.bottomLeft.visual,ie,Qe),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Qe),this.positionGrip(this.controlGrips.bottomRight.visual,He,Qe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,be-3*this.CB_DISTANCE)},x.prototype.positionGrip=function(A,ie,be){var ne=A.transform.baseVal.getItem(0);ne.setTranslate(ie,be),A.transform.baseVal.replaceItem(ne,0)},x.prototype.hideControlBox=function(){this.controlBox.style.display="none"},x.prototype.showControlBox=function(){this.controlBox.style.display=""},x.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Fe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Fe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},oe.prototype.getState.call(this))},x.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var ie=A;this.left=ie.left,this.top=ie.top,this.width=ie.width,this.height=ie.height,this.rotationAngle=ie.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Fe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ie.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Fe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ie.containerTransformMatrix))},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie);var be=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:be.x*A,y:be.y*ie});this.left=ne.x,this.top=ne.y,this.width=this.width*A,this.height=this.height*ie,this.adjustControlBox()},x}(ye),Ge=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual)},x.prototype.createVisual=function(){this.visual=re.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)},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},x.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A)},x.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.setSize()},x.prototype.setSize=function(){oe.prototype.setSize.call(this),re.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(A){oe.prototype.pointerUp.call(this,A),this.setSize()},x.prototype.setStrokeColor=function(A){this.strokeColor=A,this.visual&&re.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(A),this.stateChanged()},x.prototype.setFillColor=function(A){this.fillColor=A,this.visual&&re.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},x.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.visual&&re.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.visual&&re.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this))},x.prototype.restoreState=function(A){var ie=A;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),oe.prototype.restoreState.call(this,A),this.setSize()},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setSize()},x.title="Rectangle marker",x}(Ue),Ye=function(oe){function x(A,ie,be,ne){var Me=oe.call(this,A,ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Me.widths=[],Me.widthBoxes=[],Me.widths=ie,Me.currentWidth=be,Me.setCurrentWidth=Me.setCurrentWidth.bind(Me),Me}return ae(x,oe),x.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.widths.forEach(function(be){var ne=document.createElement("div");ne.style.display="flex",ne.style.flexGrow="2",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=be===A.currentWidth?A.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){A.setCurrentWidth(be,ne)}),ie.appendChild(ne);var Me=document.createElement("div");Me.innerText=be.toString(),Me.style.marginRight="5px",ne.appendChild(Me);var Qe=document.createElement("div");Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.display="flex",Qe.style.alignItems="center";var He=document.createElement("hr");He.style.minWidth="20px",He.style.border="0px",He.style.borderTop=be+"px solid "+A.uiStyleSettings.toolboxColor,He.style.flexGrow="2",Qe.appendChild(He),ne.appendChild(Qe),A.widthBoxes.push(ne)}),ie},x.prototype.setCurrentWidth=function(A,ie){var be=this;this.currentWidth=A,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?be.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},x}(W),Xe=function(oe){function x(A,ie,be,ne){var Me=oe.call(this,A,ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Me.styles=[],Me.styleBoxes=[],Me.styles=ie,Me.currentStyle=be,Me.setCurrentStyle=Me.setCurrentStyle.bind(Me),Me}return ae(x,oe),x.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",this.styles.forEach(function(be){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/A.styles.length-5+"%",ne.style.borderColor=be===A.currentStyle?A.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){A.setCurrentStyle(be,ne)}),ie.appendChild(ne);var Me=document.createElement("div");Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.overflow="hidden";var Qe=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+A.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(be!==""?'stroke-dasharray="'+be+'"':"")+` />
</svg>`;Me.innerHTML=Qe,ne.appendChild(Me),A.styleBoxes.push(ne)}),ie},x.prototype.setCurrentStyle=function(A,ie){var be=this;this.currentStyle=A,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?be.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},x}(W),Je=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.strokeColor=be.defaultColor,ne.strokeWidth=be.defaultStrokeWidth,ne.strokeDasharray=be.defaultStrokeDasharray,ne.strokePanel=new we("Line color",be.defaultColorSet,be.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ye("Line width",be.defaultStrokeWidths,be.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Xe("Line style",be.defaultStrokeDasharrays,be.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ae(x,oe),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=x.typeName,A},x.typeName="FrameMarker",x.title="Frame marker",x.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',x}(Ge),Ne=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},nt=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!!oe.prototype.ownsTarget.call(this,A)||!(!this.grip1.ownsTarget(A)&&!this.grip2.ownsTarget(A))},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.manipulationStartX=A.x,this.manipulationStartY=A.y,this.state==="new"&&(this.x1=A.x,this.y1=A.y,this.x2=A.x,this.y2=A.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ie)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ie)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},x.prototype.pointerUp=function(A){var ie=this.state;oe.prototype.pointerUp.call(this,A),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(A),this._state="select",ie==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},x.prototype.adjustVisual=function(){},x.prototype.manipulate=function(A){this.state==="creating"?this.resize(A):this.state==="move"?(this.x1=this.manipulationStartX1+A.x-this.manipulationStartX,this.y1=this.manipulationStartY1+A.y-this.manipulationStartY,this.x2=this.manipulationStartX2+A.x-this.manipulationStartX,this.y2=this.manipulationStartY2+A.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(A)},x.prototype.resize=function(A){switch(this.activeGrip){case this.grip1:this.x1=A.x,this.y1=A.y;break;case this.grip2:case void 0:this.x2=A.x,this.y2=A.y}this.adjustVisual(),this.adjustControlBox()},x.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=re.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){this.positionGrips()},x.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},x.prototype.createGrip=function(){var A=new Be;return A.visual.transform.baseVal.appendItem(re.createTransform()),this.controlBox.appendChild(A.visual),A},x.prototype.positionGrips=function(){var A=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-A/2,this.y1-A/2),this.positionGrip(this.grip2.visual,this.x2-A/2,this.y2-A/2)},x.prototype.positionGrip=function(A,ie,be){var ne=A.transform.baseVal.getItem(0);ne.setTranslate(ie,be),A.transform.baseVal.replaceItem(ne,0)},x.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},x.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var ie=A;this.x1=ie.x1,this.y1=ie.y1,this.x2=ie.x2,this.y2=ie.y2},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.x1=this.x1*A,this.y1=this.y1*ie,this.x2=this.x2*A,this.y2=this.y2*ie,this.adjustVisual(),this.adjustControlBox()},x}(ye),ot=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.strokeColor=be.defaultColor,ne.strokeWidth=be.defaultStrokeWidth,ne.strokeDasharray=be.defaultStrokeDasharray,ne.strokePanel=new we("Line color",be.defaultColorSet,be.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ye("Line width",be.defaultStrokeWidths,be.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Xe("Line style",be.defaultStrokeDasharrays,be.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.selectorLine&&A!==this.visibleLine)},x.prototype.createVisual=function(){this.visual=re.createGroup(),this.selectorLine=re.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=re.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)},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},x.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()),re.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),re.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),re.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setStrokeColor=function(A){this.strokeColor=A,this.adjustVisual(),this.colorChanged(A)},x.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.adjustVisual()},x.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var ie=A;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.createVisual(),this.adjustVisual()},x.typeName="LineMarker",x.title="Line marker",x.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',x}(nt),Ve=function(oe){function x(A,ie,be,ne){var Me=oe.call(this,A,ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Me.fonts=[],Me.fontBoxes=[],Me.fonts=ie,Me.currentFont=be,Me.setCurrentFont=Me.setCurrentFont.bind(Me),Me}return ae(x,oe),x.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(be){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/A.fonts.length-5+"%",ne.style.borderColor=be===A.currentFont?A.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){A.setCurrentFont(be,ne)}),ie.appendChild(ne);var Me=document.createElement("div");Me.style.display="flex",Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.fontFamily=be,Me.style.overflow="hidden";var Qe=document.createElement("div");Qe.style.whiteSpace="nowrap",Qe.style.overflow="hidden",Qe.style.textOverflow="ellipsis",Qe.innerHTML="The quick brown fox jumps over the lazy dog",Me.appendChild(Qe),ne.appendChild(Me),A.fontBoxes.push(ne)}),ie},x.prototype.setCurrentFont=function(A,ie){var be=this;this.currentFont=A,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?be.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},x}(W),$e=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.color="transparent",ne.padding=5,ne.DEFAULT_TEXT="your text here",ne.text=ne.DEFAULT_TEXT,ne.isMoved=!1,ne.color=be.defaultColor,ne.fontFamily=be.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setColor=ne.setColor.bind(ne),ne.setFont=ne.setFont.bind(ne),ne.renderText=ne.renderText.bind(ne),ne.sizeText=ne.sizeText.bind(ne),ne.textEditDivClicked=ne.textEditDivClicked.bind(ne),ne.showTextEditor=ne.showTextEditor.bind(ne),ne.setSize=ne.setSize.bind(ne),ne.positionTextEditor=ne.positionTextEditor.bind(ne),ne.colorPanel=new we("Color",be.defaultColorSet,be.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Ve("Font",be.defaultFontFamilies,be.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return ae(x,oe),x.prototype.ownsTarget=function(A){if(oe.prototype.ownsTarget.call(this,A)||A===this.visual||A===this.textElement||A===this.bgRectangle)return!0;var ie=!1;return this.textElement.childNodes.forEach(function(be){be===A&&(ie=!0)}),ie},x.prototype.createVisual=function(){this.visual=re.createGroup(),this.bgRectangle=re.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=re.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(re.createTransform()),this.textElement.transform.baseVal.appendItem(re.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.isMoved=!1,this.pointerDownPoint=A,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},x.prototype.renderText=function(){var A=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(ie){A.textElement.appendChild(re.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},x.prototype.getTextScale=function(){var A=this.textElement.getBBox(),ie=1;if(A.width>0&&A.height>0){var be=(1*this.width-this.width*this.padding*2/100)/A.width,ne=(1*this.height-this.height*this.padding*2/100)/A.height;ie=Math.min(be,ne)}return ie},x.prototype.getTextPosition=function(A){var ie=this.textElement.getBBox(),be=0,ne=0;return ie.width>0&&ie.height>0&&(be=(this.width-ie.width*A)/2,ne=this.height/2-ie.height*A/2),{x:be,y:ne}},x.prototype.sizeText=function(){var A=this.textElement.getBBox(),ie=this.getTextScale(),be=this.getTextPosition(ie);be.y-=A.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+be.x+"px, "+be.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(be.x,be.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},x.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(A.x-this.pointerDownPoint.x)>5||Math.abs(A.y-this.pointerDownPoint.y)>5)},x.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.isMoved=!0,this.setSize(),this.sizeText()},x.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(re.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),re.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},x.prototype.pointerUp=function(A){var ie=this.state;ie==="creating"&&(this._suppressMarkerCreateEvent=!0),oe.prototype.pointerUp.call(this,A),this.setSize(),(ie==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},x.prototype.showTextEditor=function(){var A=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(ie){ie.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ie=Number.parseFloat(A.textEditor.style.fontSize);A.textEditor.clientWidth>=Number.parseInt(A.textEditor.style.maxWidth)&&ie>.9;)ie-=.1,A.textEditor.style.fontSize=Math.max(ie,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ie){ie.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ie){if(ie.clipboardData){var be=ie.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(be)),ie.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){A.textEditDivClicked(A.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},x.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var A=this.getTextScale(),ie=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),be=this.textElement.getBBox(),ne={x:be.width*A,y:be.height*A};ie.x-=ne.x/2,ie.y-=ne.y/2,this.textEditor.style.top=ie.y+"px",this.textEditor.style.left=ie.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ie.x+"px",this.textEditor.style.fontSize=Math.max(16*A,12)+"px",this.textElement.style.display="none"}},x.prototype.textEditDivClicked=function(A){this.text=A.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},x.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},x.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},x.prototype.dblClick=function(A,ie){oe.prototype.dblClick.call(this,A,ie),this.showTextEditor()},x.prototype.setColor=function(A){this.textElement&&re.setAttributes(this.textElement,[["fill",A]]),this.color=A,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(A)},x.prototype.setFont=function(A){this.textElement&&re.setAttributes(this.textElement,[["font-family",A]]),this.fontFamily=A,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},x.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},x.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){var ie=A;this.color=ie.color,this.fontFamily=ie.fontFamily,this.padding=ie.padding,this.text=ie.text,this.createVisual(),oe.prototype.restoreState.call(this,A),this.setSize()},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},x.typeName="TextMarker",x.title="Text marker",x.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',x}(Ue),Ie=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=be.defaultColor,ne.lineWidth=be.defaultStrokeWidth,ne.pixelRatio=be.freehandPixelRatio,ne.setColor=ne.setColor.bind(ne),ne.addCanvas=ne.addCanvas.bind(ne),ne.finishCreation=ne.finishCreation.bind(ne),ne.setLineWidth=ne.setLineWidth.bind(ne),ne.colorPanel=new we("Color",be.defaultColorSet,be.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new Ye("Line width",be.defaultStrokeWidths,be.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.drawingImage)},x.prototype.createVisual=function(){this.visual=re.createGroup(),this.drawingImage=re.createImage(),this.visual.appendChild(this.drawingImage);var A=re.createTransform();this.visual.transform.baseVal.appendItem(A),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(A,ie){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(A.x,A.y),this.drawing=!0):oe.prototype.pointerDown.call(this,A,ie)},x.prototype.manipulate=function(A){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(A.x,A.y),this.canvasContext.stroke()):oe.prototype.manipulate.call(this,A)},x.prototype.resize=function(A){oe.prototype.resize.call(this,A),re.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),re.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(A){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):oe.prototype.pointerUp.call(this,A)},x.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)},x.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},x.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},x.prototype.finishCreation=function(){for(var A=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ie=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],be=ie[0],ne=ie[1],Me=ie[2],Qe=ie[3],He=!1,wt=0;wt<this.canvasElement.height;wt++)for(var tt=0;tt<this.canvasElement.width;tt++)A.data[wt*this.canvasElement.width*4+4*tt+3]>0&&(He=!0,wt<ne&&(ne=wt),tt<be&&(be=tt),wt>Qe&&(Qe=wt),tt>Me&&(Me=tt));if(He){this.left=be/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(Me-be)/this.pixelRatio,this.height=(Qe-ne)/this.pixelRatio;var Nt=document.createElement("canvas");Nt.width=Me-be,Nt.height=Qe-ne,Nt.getContext("2d").putImageData(this.canvasContext.getImageData(be,ne,Me-be,Qe-ne),0,0),this.drawingImgUrl=Nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},x.prototype.setDrawingImage=function(){re.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),re.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},x.prototype.setColor=function(A){this.color=A,this.colorChanged(A)},x.prototype.setLineWidth=function(A){this.lineWidth=A},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){this.createVisual(),oe.prototype.restoreState.call(this,A),this.drawingImgUrl=A.drawingImgUrl,this.setDrawingImage()},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setDrawingImage()},x.typeName="FreehandMarker",x.title="Freehand marker",x.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',x}(Ue),De=function(oe){function x(A,ie,be){var ne=oe.call(this,A,be||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return ne.typeBoxes=[],ne.currentType=ie,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return ae(x,oe),x.prototype.getUi=function(){var A=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var be=function(Qe){var He="both";switch(Qe){case 0:He="both";break;case 1:He="start";break;case 2:He="end";break;case 3:He="none"}var wt=document.createElement("div");if(wt.style.display="flex",wt.style.flexGrow="2",wt.style.alignItems="center",wt.style.justifyContent="space-between",wt.style.padding="5px",wt.style.borderWidth="2px",wt.style.borderStyle="solid",wt.style.borderColor=He===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",wt.addEventListener("click",function(){A.setCurrentType(He,wt)}),ie.appendChild(wt),He==="both"||He==="start"){var tt=document.createElement("div");tt.style.display="flex",tt.style.alignItems="center",tt.style.minHeight="20px",tt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,tt.style.marginLeft="5px",wt.appendChild(tt)}var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.style.flexGrow="2";var Yt=document.createElement("hr");if(Yt.style.minWidth="20px",Yt.style.border="0px",Yt.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Yt.style.flexGrow="2",Nt.appendChild(Yt),wt.appendChild(Nt),He==="both"||He==="end"){var qt=document.createElement("div");qt.style.display="flex",qt.style.alignItems="center",qt.style.minHeight="20px",qt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,qt.style.marginRight="5px",wt.appendChild(qt)}ne.typeBoxes.push(wt)},ne=this,Me=0;Me<4;Me++)be(Me);return ie},x.prototype.setCurrentType=function(A,ie){var be=this;this.currentType=A,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?be.uiStyleSettings!==void 0?be.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},x}(W),Le=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new De("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.arrow1&&A!==this.arrow2)},x.prototype.getArrowPoints=function(A,ie){var be=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return A-be/2+","+(ie+ne/2)+" "+A+","+(ie-ne/2)+" "+(A+be/2)+","+(ie+ne/2)},x.prototype.createTips=function(){this.arrow1=re.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(re.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=re.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(re.createTransform()),this.visual.appendChild(this.arrow2)},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",re.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),re.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var A=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.arrow1.transform.baseVal.getItem(0);ie.setRotate(A,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ie,0);var be=this.arrow2.transform.baseVal.getItem(0);be.setRotate(A+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(be,0)}},x.prototype.setArrowType=function(A){this.arrowType=A,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var ie=A;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},x.typeName="ArrowMarker",x.title="Arrow marker",x.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',x}(ot),_e=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.fillColor=be.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new we("Color",be.defaultColorSet,be.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return ae(x,oe),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=x.typeName,A},x.typeName="CoverMarker",x.title="Cover marker",x.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',x}(Ge),Te=function(oe){function x(A,ie,be,ne){var Me=oe.call(this,A,ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Me.opacities=[],Me.opacityBoxes=[],Me.opacities=ie,Me.currentOpacity=be,Me.setCurrentOpacity=Me.setCurrentOpacity.bind(Me),Me}return ae(x,oe),x.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2",ie.style.justifyContent="space-between",this.opacities.forEach(function(be){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="center",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.borderColor=be===A.currentOpacity?A.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){A.setCurrentOpacity(be,ne)}),ie.appendChild(ne);var Me=document.createElement("div");Me.innerText=100*be+"%",ne.appendChild(Me),A.opacityBoxes.push(ne)}),ie},x.prototype.setCurrentOpacity=function(A,ie){var be=this;this.currentOpacity=A,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===ie?be.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},x}(W),ke=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=be.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=be.defaultHighlightOpacity,ne.fillPanel=new we("Color",be.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new Te("Opacity",be.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return ae(x,oe),x.prototype.setOpacity=function(A){this.opacity=A,this.visual&&re.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=x.typeName,A},x.typeName="HighlightMarker",x.title="Highlight marker",x.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',x}(_e),Ae='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ze=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.bgColor="transparent",ne.tipPosition={x:0,y:0},ne.tipBase1Position={x:0,y:0},ne.tipBase2Position={x:0,y:0},ne.tipMoving=!1,ne.color=be.defaultStrokeColor,ne.bgColor=be.defaultFillColor,ne.fontFamily=be.defaultFontFamily,ne.defaultSize={x:100,y:30},ne.setBgColor=ne.setBgColor.bind(ne),ne.getTipPoints=ne.getTipPoints.bind(ne),ne.positionTip=ne.positionTip.bind(ne),ne.setTipPoints=ne.setTipPoints.bind(ne),ne.colorPanel=new we("Text color",be.defaultColorSet,ne.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new we("Fill color",be.defaultColorSet,ne.bgColor,Ae),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Ve("Font",be.defaultFontFamilies,be.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new Be,ne.tipGrip.visual.transform.baseVal.appendItem(re.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return oe.prototype.ownsTarget.call(this,A)||this.tipGrip.ownsTarget(A)||this.tip===A},x.prototype.createTip=function(){re.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=re.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},x.prototype.pointerDown=function(A,ie){this.state==="new"&&oe.prototype.pointerDown.call(this,A,ie),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ie)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):oe.prototype.pointerDown.call(this,A,ie)},x.prototype.pointerUp=function(A){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,oe.prototype.pointerUp.call(this,A);else{var ie=this.state==="creating";oe.prototype.pointerUp.call(this,A),this.setTipPoints(ie),this.positionTip()}},x.prototype.manipulate=function(A){if(this.tipMoving){var ie=this.unrotatePoint(A);this.tipPosition={x:ie.x-this.manipulationStartLeft,y:ie.y-this.manipulationStartTop},this.positionTip()}else oe.prototype.manipulate.call(this,A)},x.prototype.setBgColor=function(A){this.bgRectangle&&this.tip&&(re.setAttributes(this.bgRectangle,[["fill",A]]),re.setAttributes(this.tip,[["fill",A]])),this.bgColor=A,this.fillColorChanged(A)},x.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},x.prototype.setTipPoints=function(A){A===void 0&&(A=!1);var ie=Math.min(this.height/2,15),be=this.height/5;A&&(this.tipPosition={x:ie+be/2,y:this.height+20});var ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(be=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+be,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+be}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(be=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-be,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+be}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(be=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-be,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-be},this.tipBase2Position={x:this.width,y:this.height-ie}):ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(be=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+be,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-be})},x.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.positionTip()},x.prototype.positionTip=function(){re.setAttributes(this.tip,[["points",this.getTipPoints()]]);var A=this.tipGrip.visual.transform.baseVal.getItem(0);A.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(A,0)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.select=function(){this.positionTip(),oe.prototype.select.call(this)},x.prototype.getState=function(){var A=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){var ie=A;this.bgColor=ie.bgColor,this.tipPosition=ie.tipPosition,oe.prototype.restoreState.call(this,A),this.createTip(),this.setTipPoints()},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.tipPosition={x:this.tipPosition.x*A,y:this.tipPosition.y*ie},this.positionTip()},x.typeName="CalloutMarker",x.title="Callout marker",x.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',x}($e),je=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.strokeColor=be.defaultColor,ne.strokeWidth=be.defaultStrokeWidth,ne.strokeDasharray=be.defaultStrokeDasharray,ne.fillColor=be.defaultFillColor,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.setOpacity=ne.setOpacity.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne.strokePanel=new we("Line color",ee(be.defaultColorSet,["transparent"]),be.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new we("Fill color",ee(be.defaultColorSet,["transparent"]),ne.fillColor,Ae),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new Ye("Line width",be.defaultStrokeWidths,be.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Xe("Line style",be.defaultStrokeDasharrays,be.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.opacityPanel=new Te("Opacity",be.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual)},x.prototype.createVisual=function(){this.visual=re.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},x.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A)},x.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.setSize()},x.prototype.setSize=function(){oe.prototype.setSize.call(this),re.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},x.prototype.pointerUp=function(A){oe.prototype.pointerUp.call(this,A),this.setSize()},x.prototype.setStrokeColor=function(A){this.strokeColor=A,this.visual&&re.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(A),this.stateChanged()},x.prototype.setFillColor=function(A){this.fillColor=A,this.visual&&re.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(A),this.stateChanged()},x.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.visual&&re.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.visual&&re.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.setOpacity=function(A){this.opacity=A,this.visual&&re.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){var ie=A;this.fillColor=ie.fillColor,this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.opacity=ie.opacity,this.createVisual(),oe.prototype.restoreState.call(this,A),this.setSize()},x.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setSize()},x.typeName="EllipseMarker",x.title="Ellipse marker",x.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',x}(Ue),Ze=function(oe){function x(A,ie,be){return oe.call(this,A,ie,be)||this}return ae(x,oe),Object.defineProperty(x.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.tip1&&A!==this.tip2)},x.prototype.createTips=function(){this.tip1=re.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(re.createTransform()),this.visual.appendChild(this.tip1),this.tip2=re.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(re.createTransform()),this.visual.appendChild(this.tip2)},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(re.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),re.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var A=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ie=this.tip1.transform.baseVal.getItem(0);ie.setRotate(A,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ie,0);var be=this.tip2.transform.baseVal.getItem(0);be.setRotate(A+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(be,0)}},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A),this.createTips(),this.adjustVisual()},x.typeName="MeasurementMarker",x.title="Measurement marker",x.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',x}(ot),ht=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.strokePanel.colors=be.defaultColorSet,ne.fillColor="transparent",ne}return ae(x,oe),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=x.typeName,A},x.typeName="EllipseFrameMarker",x.title="Ellipse frame marker",x.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',x}(je),Tt=function(){function oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),oe.prototype.addUndoStep=function(x){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(x)||(this.undoStack.push(x),JSON.stringify(this.lastRedoStep)!==JSON.stringify(x)&&this.redoStack.splice(0,this.redoStack.length))},oe.prototype.replaceLastUndoStep=function(x){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=x)},oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},oe.prototype.undo=function(){if(this.undoStack.length>1){var x=this.undoStack.pop();return x!==void 0&&this.redoStack.push(x),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},oe}(),qe=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie,be)||this;return ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.curveX=0,ne.curveY=0,ne.manipulationStartCurveX=0,ne.manipulationStartCurveY=0,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.positionGrips=ne.positionGrips.bind(ne),ne.addControlGrips=ne.addControlGrips.bind(ne),ne.adjustVisual=ne.adjustVisual.bind(ne),ne.setupControlBox=ne.setupControlBox.bind(ne),ne.resize=ne.resize.bind(ne),ne.strokeColor=be.defaultColor,ne.strokeWidth=be.defaultStrokeWidth,ne.strokeDasharray=be.defaultStrokeDasharray,ne.strokePanel=new we("Line color",be.defaultColorSet,be.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new Ye("Line width",be.defaultStrokeWidths,be.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new Xe("Line style",be.defaultStrokeDasharrays,be.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ae(x,oe),x.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.selectorCurve&&A!==this.visibleCurve&&!this.curveGrip.ownsTarget(A))},x.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},x.prototype.createVisual=function(){this.visual=re.createGroup(),this.selectorCurve=re.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=re.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)},x.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=A.x,this.curveY=A.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ie)&&(this.activeGrip=this.curveGrip,this._state="resize")},x.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),re.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),re.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),re.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=re.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=re.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)},x.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},x.prototype.positionGrips=function(){oe.prototype.positionGrips.call(this);var A=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-A/2,this.curveY-A/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()))},x.prototype.manipulate=function(A){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+A.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+A.y-this.manipulationStartY),oe.prototype.manipulate.call(this,A)},x.prototype.resize=function(A){this.activeGrip===this.curveGrip&&(this.curveX=A.x,this.curveY=A.y),oe.prototype.resize.call(this,A),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},x.prototype.setStrokeColor=function(A){this.strokeColor=A,this.adjustVisual(),this.colorChanged(A)},x.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.adjustVisual()},x.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.adjustVisual()},x.prototype.scale=function(A,ie){this.curveX=this.curveX*A,this.curveY=this.curveY*ie,oe.prototype.scale.call(this,A,ie)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var A=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},oe.prototype.getState.call(this));return A.typeName=x.typeName,A},x.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var ie=A;this.strokeColor=ie.strokeColor,this.strokeWidth=ie.strokeWidth,this.strokeDasharray=ie.strokeDasharray,this.curveX=ie.curveX,this.curveY=ie.curveY,this.createVisual(),this.adjustVisual()},x.typeName="CurveMarker",x.title="Curve marker",x.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',x}(nt),at=function(){function oe(x,A){A===void 0&&(A=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=x,this.cancelable=A}return Object.defineProperty(oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),oe.prototype.preventDefault=function(){this._defaultPrevented=!0},oe}(),dt=function(oe){function x(A,ie,be){var ne=oe.call(this,A,!1)||this;return ne.dataUrl=ie,ne.state=be,ne}return ae(x,oe),x}(at),st=function(oe){function x(A,ie,be){be===void 0&&(be=!1);var ne=oe.call(this,A,be)||this;return ne.marker=ie,ne}return ae(x,oe),x}(at),St=function(){function oe(){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 oe.prototype.addEventListener=function(x,A){this[x].push(A)},oe.prototype.removeEventListener=function(x,A){var ie=this[x].indexOf(A);ie>-1&&this[x].splice(ie,1)},oe}(),Ft=function(){function oe(x){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new Tt,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 St,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new J(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=x,this.targetRoot=document.body,this.width=x.clientWidth,this.height=x.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(oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Je,Ie,Le,$e,ht,je,ke,ze,Ze,_e,ot,qe]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Je,Ie,Le,$e,je,ke,ze]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Je,Ie,Le,$e,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(x){var A=this;this._availableMarkerTypes.splice(0),x.forEach(function(ie){if(typeof ie=="string"){var be=A.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===ie});be!==void 0&&A._availableMarkerTypes.push(be)}else A._availableMarkerTypes.push(ie)})},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(x){this._zoomLevel=x,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(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Z.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},oe.prototype.show=function(){var x=this;this.styles.styleSheetRoot===void 0&&V.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=V.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(A){return A(new at(x))})},oe.prototype.render=function(){return pe(this,void 0,void 0,function(){var x;return me(this,function(A){switch(A.label){case 0:return this.setCurrentMarker(),(x=new ue).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.markersOnly=this.renderMarkersOnly,x.width=this.renderWidth,x.height=this.renderHeight,[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return A.sent(),[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,A.sent()]}})})},oe.prototype.close=function(x){var A=this;if(x===void 0&&(x=!1),this.isOpen){var ie=!1;x||this.eventListeners.beforeclose.forEach(function(be){var ne=new at(A,!0);be(ne),ne.defaultPrevented&&(ie=!0)}),ie||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(be){return be(new at(A))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var x,A=[],ie=0;ie<arguments.length;ie++)A[ie]=arguments[ie];(x=this._availableMarkerTypes).push.apply(x,A)},oe.prototype.addRenderEventListener=function(x){this.addEventListener("render",function(A){x(A.dataUrl,A.state)})},oe.prototype.removeRenderEventListener=function(x){},oe.prototype.addCloseEventListener=function(x){this.addEventListener("close",function(){x()})},oe.prototype.removeCloseEventListener=function(x){},oe.prototype.setupResizeObserver=function(){var x=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return x.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupTargetResize=function(){var x=1*this.target.clientWidth/this.target.clientHeight,A=this.editorCanvas.clientWidth/x>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*x:this.editorCanvas.clientWidth,ie=A<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/x;this.resize(A,ie)},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.resize=function(x,A){this._isResizing=!0;var ie=x/this.imageWidth,be=A/this.imageHeight;this.imageWidth=Math.round(x),this.imageHeight=Math.round(A),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ie,be),this._isResizing=!1},oe.prototype.scaleMarkers=function(x,A){var ie,be=this;this._currentMarker&&this._currentMarker instanceof $e?this._currentMarker.scale(x,A):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(ne){ne!==be._currentMarker&&ne.scale(x,A)}),ie!==void 0&&this.setCurrentMarker(ie)},oe.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},oe.prototype.setTopLeft=function(){var x=this.editingTarget.getBoundingClientRect(),A=this.editorCanvas.getBoundingClientRect();this.left=x.left-A.left,this.top=x.top-A.top},oe.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},oe.prototype.addDefs=function(){for(var x,A=[],ie=0;ie<arguments.length;ie++)A[ie]=arguments[ie];this.defs=re.createDefs(),this.addDefsToImage(),(x=this.defs).append.apply(x,A)},oe.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},oe.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},oe.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},oe.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},oe.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},oe.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},oe.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},oe.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var x=document.createElement("a");x.href="https://markerjs.com/",x.target="_blank",x.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',x.title="Powered by marker.js",x.style.display="grid",x.style.alignItems="center",x.style.justifyItems="center",x.style.padding="3px",x.style.width="20px",x.style.height="20px",this.logoUI.appendChild(x),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},oe.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new H(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new T(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},oe.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.removeMarker=function(x){this.markerImage.removeChild(x.container),this.markers.indexOf(x)>-1&&this.markers.splice(this.markers.indexOf(x),1),x.dispose()},oe.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},oe.prototype.toolbarButtonClicked=function(x,A){if(x==="marker"&&A!==void 0)this.createNewMarker(A);else if(x==="action")switch(A){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},oe.prototype.deleteSelectedMarker=function(){var x=this;if(this._currentMarker!==void 0){var A=!1;if(this.eventListeners.markerbeforedelete.forEach(function(be){var ne=new st(x,x._currentMarker,!0);be(ne),ne.defaultPrevented&&(A=!0)}),!A){var ie=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(be){return be(new st(x,ie))})}}},oe.prototype.clear=function(){var x=this,A=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Me){var Qe=new st(x,void 0,!0);Me(Qe),Qe.defaultPrevented&&(A=!0)}),!A)){this.setCurrentMarker();for(var ie=function(Me){var Qe=be.markers[Me];be.setCurrentMarker(be.markers[Me]),be._currentMarker.dispose(),be.markerImage.removeChild(be._currentMarker.container),be.markers.splice(be.markers.indexOf(be._currentMarker),1),be.eventListeners.markerdelete.forEach(function(He){return He(new st(x,Qe))})},be=this,ne=this.markers.length-1;ne>=0;ne--)ie(ne);this.addUndoStep()}},Object.defineProperty(oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),oe.prototype.showNotesEditor=function(){var x;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(x=this._currentMarker.notes)!==null&&x!==void 0?x:"",this.overlayContainer.appendChild(this.notesArea))},oe.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},oe.prototype.addUndoStep=function(){var x=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var A=this.getState(),ie=this.undoRedoManager.getLastUndoStep();if(!ie||ie.width===A.width&&ie.height===A.height){var be=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(A),be<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(ne){return ne(new at(x))})}else this.undoRedoManager.replaceLastUndoStep(A),this.eventListeners.statechange.forEach(function(ne){return ne(new at(x))})}},oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},oe.prototype.undoStep=function(){var x=this,A=this.undoRedoManager.undo();A!==void 0&&(this.restoreState(A),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new at(x))}))},oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},oe.prototype.redoStep=function(){var x=this,A=this.undoRedoManager.redo();A!==void 0&&(this.restoreState(A),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ie){return ie(new at(x))}))},oe.prototype.stepZoom=function(){var x=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=x<this.zoomSteps.length-1?this.zoomSteps[x+1]:this.zoomSteps[0]},oe.prototype.panTo=function(x){this.contentDiv.scrollBy({left:this.prevPanPoint.x-x.x,top:this.prevPanPoint.y-x.y}),this.prevPanPoint=x},oe.prototype.startRenderAndClose=function(){return pe(this,void 0,void 0,function(){var x,A,ie=this;return me(this,function(be){switch(be.label){case 0:return[4,this.render()];case 1:return x=be.sent(),A=this.getState(),this.eventListeners.render.forEach(function(ne){return ne(new dt(ie,x,A))}),this.close(!0),[2]}})})},oe.prototype.getState=function(x){x===!0&&this.setCurrentMarker();var A={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ie){return A.markers.push(ie.getState())}),A},oe.prototype.restoreState=function(x){var A=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);x.markers.forEach(function(ie){var be=A._availableMarkerTypes.find(function(Me){return Me.typeName===ie.typeName});if(be!==void 0){var ne=A.addNewMarker(be);ne.restoreState(ie),A.markers.push(ne)}}),x.width&&x.height&&(x.width!==this.imageWidth||x.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/x.width,this.imageHeight/x.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new at(A))})},oe.prototype.addNewMarker=function(x){var A=re.createGroup();return this.markerImage.appendChild(A),new x(A,this.overlayContainer,this.settings)},oe.prototype.createNewMarker=function(x){var A,ie=this;(A=typeof x=="string"?this._availableMarkerTypes.find(function(be){return be.typeName===x}):x)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(A),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(A.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(be){return be(new st(ie,ie._currentMarker))}))},oe.prototype.markerCreated=function(x){var A=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(x),this.setCurrentMarker(x),x instanceof Ie&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ie):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ie){return ie(new st(A,A._currentMarker))})},oe.prototype.colorChanged=function(x){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=x,this.settings.defaultStrokeColor=x)},oe.prototype.fillColorChanged=function(x){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=x)},oe.prototype.markerStateChanged=function(x){var A=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new st(A,x))})},oe.prototype.setCurrentMarker=function(x){var A=this;this._currentMarker!==x&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ie){return ie(new st(A,A._currentMarker))})),this._currentMarker=x,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ie){return ie(new st(A,A._currentMarker))}))},oe.prototype.onPointerDown=function(x){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||x.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var A=this.markers.find(function(ie){return ie.ownsTarget(x.target)});A!==void 0?(this.setCurrentMarker(A),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(x.clientX,x.clientY),x.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:x.clientX,y:x.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(x.clientX,x.clientY))},oe.prototype.onDblClick=function(x){if(this._isFocused||this.focus(),this.mode==="select"){var A=this.markers.find(function(ie){return ie.ownsTarget(x.target)});A!==void 0&&A!==this._currentMarker&&this.setCurrentMarker(A),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(x.clientX,x.clientY),x.target):this.setCurrentMarker()}},oe.prototype.onPointerMove=function(x){this.touchPoints!==1&&x.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||x.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(x.clientX,x.clientY)):this.zoomLevel>1&&this.panTo({x:x.clientX,y:x.clientY}))},oe.prototype.onPointerUp=function(x){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(x.clientX,x.clientY)),this.isDragging=!1,this.addUndoStep()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(x){this._currentMarker===void 0||this.notesArea!==void 0||x.key!=="Delete"&&x.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(x,A){var ie=this.markerImage.getBoundingClientRect();return{x:(x-ie.left)/this.zoomLevel,y:(A-ie.top)/this.zoomLevel}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"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()},oe.prototype.addLicenseKey=function(x){Z.addKey(x)},oe.prototype.addEventListener=function(x,A){this.eventListeners.addEventListener(x,A)},oe.prototype.removeEventListener=function(x,A){this.eventListeners.removeEventListener(x,A)},oe.prototype.renderState=function(x){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(x),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var x=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(A){return A(new at(x))}))},oe.prototype.blur=function(){var x=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(A){return A(new at(x))}))},oe.instanceCounter=0,oe}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Vt=function(oe,x){return(Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,ie){A.__proto__=ie}||function(A,ie){for(var be in ie)Object.prototype.hasOwnProperty.call(ie,be)&&(A[be]=ie[be])})(oe,x)};function Kt(oe,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function A(){this.constructor=oe}Vt(oe,x),oe.prototype=x===null?Object.create(x):(A.prototype=x.prototype,new A)}function At(oe,x,A,ie){return new(A||(A=Promise))(function(be,ne){function Me(wt){try{He(ie.next(wt))}catch(tt){ne(tt)}}function Qe(wt){try{He(ie.throw(wt))}catch(tt){ne(tt)}}function He(wt){var tt;wt.done?be(wt.value):(tt=wt.value,tt instanceof A?tt:new A(function(Nt){Nt(tt)})).then(Me,Qe)}He((ie=ie.apply(oe,x||[])).next())})}function jt(oe,x){var A,ie,be,ne,Me={label:0,sent:function(){if(1&be[0])throw be[1];return be[1]},trys:[],ops:[]};return ne={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Qe(He){return function(wt){return function(tt){if(A)throw new TypeError("Generator is already executing.");for(;Me;)try{if(A=1,ie&&(be=2&tt[0]?ie.return:tt[0]?ie.throw||((be=ie.return)&&be.call(ie),0):ie.next)&&!(be=be.call(ie,tt[1])).done)return be;switch(ie=0,be&&(tt=[2&tt[0],be.value]),tt[0]){case 0:case 1:be=tt;break;case 4:return Me.label++,{value:tt[1],done:!1};case 5:Me.label++,ie=tt[1],tt=[0];continue;case 7:tt=Me.ops.pop(),Me.trys.pop();continue;default:if(!(be=Me.trys,(be=be.length>0&&be[be.length-1])||tt[0]!==6&&tt[0]!==2)){Me=0;continue}if(tt[0]===3&&(!be||tt[1]>be[0]&&tt[1]<be[3])){Me.label=tt[1];break}if(tt[0]===6&&Me.label<be[1]){Me.label=be[1],be=tt;break}if(be&&Me.label<be[2]){Me.label=be[2],Me.ops.push(tt);break}be[2]&&Me.ops.pop(),Me.trys.pop();continue}tt=x.call(oe,Me)}catch(Nt){tt=[6,Nt],ie=0}finally{A=be=0}if(5&tt[0])throw tt[1];return{value:tt[0]?tt[1]:void 0,done:!0}}([He,wt])}}}var ar=function(){function oe(){}return oe.addKey=function(x){oe.key=x},Object.defineProperty(oe,"isLicensed",{get:function(){return!!oe.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(oe.key)},enumerable:!1,configurable:!0}),oe}(),Ct=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(x,A){for(var ie=0,be=A;ie<be.length;ie++){var ne=be[ie],Me=ne[0],Qe=ne[1];x.setAttribute(Me,Qe)}},oe.createRect=function(x,A,ie){var be=document.createElementNS("http://www.w3.org/2000/svg","rect");return be.setAttribute("width",x.toString()),be.setAttribute("height",A.toString()),ie&&oe.setAttributes(be,ie),be},oe.createLine=function(x,A,ie,be,ne){var Me=document.createElementNS("http://www.w3.org/2000/svg","line");return Me.setAttribute("x1",x.toString()),Me.setAttribute("y1",A.toString()),Me.setAttribute("x2",ie.toString()),Me.setAttribute("y2",be.toString()),ne&&oe.setAttributes(Me,ne),Me},oe.createPolygon=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",x),A&&oe.setAttributes(ie,A),ie},oe.createCircle=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(x/2).toString()),ie.setAttribute("cy",(x/2).toString()),ie.setAttribute("r",x.toString()),A&&oe.setAttributes(ie,A),ie},oe.createEllipse=function(x,A,ie){var be=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return be.setAttribute("cx",(x/2).toString()),be.setAttribute("cy",(A/2).toString()),be.setAttribute("rx",(x/2).toString()),be.setAttribute("ry",(A/2).toString()),ie&&oe.setAttributes(be,ie),be},oe.createGroup=function(x){var A=document.createElementNS("http://www.w3.org/2000/svg","g");return x&&oe.setAttributes(A,x),A},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(x,A,ie,be,ne,Me,Qe){var He=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(He,[["id",x],["orient",A],["markerWidth",ie.toString()],["markerHeight",be.toString()],["refX",ne.toString()],["refY",Me.toString()]]),He.appendChild(Qe),He},oe.createText=function(x){var A=document.createElementNS("http://www.w3.org/2000/svg","text");return A.setAttribute("x","0"),A.setAttribute("y","0"),x&&oe.setAttributes(A,x),A},oe.createTSpan=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=x,A&&oe.setAttributes(ie,A),ie},oe.createImage=function(x){var A=document.createElementNS("http://www.w3.org/2000/svg","image");return x&&oe.setAttributes(A,x),A},oe.createPoint=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=x,ie.y=A,ie},oe.createPath=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",x),A&&oe.setAttributes(ie,A),ie},oe.createElement=function(x,A){var ie=document.createElementNS("http://www.w3.org/2000/svg",x);return A&&oe.setAttributes(ie,A),ie},oe.getHollowRectanglePath=function(x,A,ie,be,ne,Me,Qe,He){return"M"+x+","+A+"V"+(A+be)+"H"+(x+ie)+"V"+A+"H"+ne+"V"+Me+"H"+(ne+Qe)+"V"+(Me+He)+"H"+ne+"V"+A+"Z"},oe}(),hr=function(){function oe(x){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+x+"_"}return Object.defineProperty(oe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),oe.prototype.addClass=function(x){return this.styleSheet===void 0&&this.addStyleSheet(),x.name=""+this.classNamePrefix+x.localName,this.classes.push(x),this.styleSheet.sheet.insertRule("."+x.name+" {"+x.style+"}",this.styleSheet.sheet.cssRules.length),x},oe.prototype.addRule=function(x){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(x),this.styleSheet.sheet.insertRule(x.selector+" {"+x.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var x;this.styleSheet=document.createElement("style"),((x=this.styleSheetRoot)!==null&&x!==void 0?x:document.head).appendChild(this.styleSheet),this.addRule(new Jt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Jt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Jt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new nr("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new nr("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},oe.prototype.removeStyleSheet=function(){var x;this.styleSheet&&(((x=this.styleSheetRoot)!==null&&x!==void 0?x:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Jt=function(oe,x){this.selector=oe,this.style=x},nr=function(oe,x){this.localName=oe,this.style=x},sr=function(){function oe(){this.blocks=[],this.display=""}return oe.prototype.addButtonBlock=function(x){x.className=this.blockClassName,x.buttonClassName=this.buttonClassName,x.buttonColorsClassName=this.buttonColorsClassName,x.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(x)},oe.prototype.addElementBlock=function(x){x.className===void 0&&(x.className=this.blockClassName),this.blocks.push(x)},oe.prototype.getUI=function(){var x=document.createElement("div");return x.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,x.style.display=this.display,this.blocks.forEach(function(A){return x.appendChild(A.getUI())}),x},oe}(),yr=function(){function oe(){}return oe.prototype.getUI=function(){var x=document.createElement("div");if(x.className=this.className,this.minWidth!==void 0&&(x.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":x.style.justifyContent="flex-start";break;case"center":x.style.justifyContent="center";break;case"end":x.style.justifyContent="flex-end"}return x.style.whiteSpace="nowrap",x},oe}(),Tr=function(oe){function x(){var A=oe!==null&&oe.apply(this,arguments)||this;return A.buttons=[],A}return Kt(x,oe),x.prototype.addButton=function(A){A.className=this.buttonClassName,A.colorsClassName=this.buttonColorsClassName,A.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(A)},x.prototype.getUI=function(){var A=oe.prototype.getUI.call(this);return this.buttons.forEach(function(ie){return A.appendChild(ie.getUI())}),A},x}(yr),Ut=function(){function oe(x,A){this._isActive=!1,this._isHidden=!1,this._icon=x,this.title=A,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(oe.prototype,"icon",{get:function(){return this._icon},set:function(x){this._icon=x,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isActive",{get:function(){return this._isActive},set:function(x){this._isActive=x,this.adjustClassName()},enumerable:!1,configurable:!0}),oe.prototype.getUI=function(){var x=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return x.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},oe.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},oe.prototype.hide=function(){this._isHidden=!0},oe}(),mt=function(oe){function x(){var A=oe!==null&&oe.apply(this,arguments)||this;return A.elements=[],A}return Kt(x,oe),x.prototype.addElement=function(A){this.elements.push(A)},x.prototype.getUI=function(){var A=oe.prototype.getUI.call(this);return this.elements.forEach(function(ie){return A.appendChild(ie)}),A},x}(yr),Xt=function(){function oe(x,A){this.horizontal=x,this.vertical=A}return Object.defineProperty(oe.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),oe.prototype.getVerticalLength=function(x){return x/this.ratio},oe.prototype.getHorizontalLength=function(x){return x*this.ratio},oe}(),fr=function(){function oe(){}return oe.getIcon=function(x,A){if(x>0&&A>0){var ie=new Xt(x,A),be=ie.ratio>=1?20:ie.getHorizontalLength(20),ne=ie.ratio<1?20:ie.getVerticalLength(20),Me=document.createElementNS("http://www.w3.org/2000/svg","svg");Me.setAttribute("xmlns","http://www.w3.org/2000/svg"),Me.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Me);var Qe=Ct.createDefs();Me.appendChild(Qe);var He=Ct.createElement("clipPath",[["id","text-bg-clip"]]);Qe.appendChild(He);var wt=Ct.createPath(Ct.getHollowRectanglePath((24-be)/2,(24-ne)/2,be,ne,(24-be)/2+2,(24-ne)/2+2,be-4,ne-4));Me.appendChild(wt);var tt=Ct.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);tt.appendChild(Ct.createTSpan(x+":"+A)),Me.appendChild(tt);var Nt=tt.getBBox();Ct.setAttributes(tt,[["x",((24-Nt.width)/2).toString()],["y",((24-Nt.height)/2-Nt.y).toString()]]);var Yt=Ct.createPath(Ct.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Nt.width))/2,(24-Math.ceil(Nt.height))/2,Math.ceil(Nt.width),Math.ceil(Nt.height)));return He.appendChild(Yt),Ct.setAttributes(wt,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Me),Me.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},oe}(),Mt=function(oe){function x(A,ie,be){var ne=oe.call(this,A,ie)||this;return ne.isDropdownOpen=!1,ne.onClick=ne.dropdownButtonClicked,ne.dropdownButtons=be,ne}return Kt(x,oe),x.prototype.setupDropdown=function(){var A=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ie){ie.className=A.className,ie.colorsClassName=A.colorsClassName,A.dropdownBlock.appendChild(ie.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},x.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},x.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},x.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},x.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},x.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},x}(Ut),It=function(){function oe(x,A){this.GRIP_SIZE=10,this.color=x,this.fillColor=A,this.visual=Ct.createGroup(),this.visual.appendChild(Ct.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ct.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},oe.prototype.setCenter=function(x,A){this.visual.childNodes.forEach(function(ie){return Ct.setAttributes(ie,[["cx",x.toString()],["cy",A.toString()]])})},oe}(),pr=function(){function oe(x,A,ie,be){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=x,this.canvasHeight=A,this.margin=ie,this.container=be,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(oe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(x){this._aspectRatio=x,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.gridContainer&&Ct.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(x){this._zoomFactor=x,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),oe.prototype.open=function(){var x=this;this.cropShadeElement=Ct.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ct.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var A=0;A<this.numberOfGridLines;A++)this.horizontalGridLines.push(Ct.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(Ct.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ie){return x.gridContainer.appendChild(ie)}),this.verticalGridLines.forEach(function(ie){return x.gridContainer.appendChild(ie)}),this.cropRectElement=Ct.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new It(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},oe.prototype.setCropRectangle=function(x){this.cropRect=x;var A=Object.assign({},this.cropRect);this.zoomFactor!==1&&(A.width=this.cropRect.width*this.zoomFactor,A.height=this.cropRect.height*this.zoomFactor,A.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-A.width/2,A.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-A.height/2),Ct.setAttributes(this.cropRectElement,[["x",A.x.toString()],["y",A.y.toString()],["width",A.width.toString()],["height",A.height.toString()]]);var ie=A.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ne,Me){var Qe=A.y+ie*(Me+1);Ct.setAttributes(ne,[["x1",""+A.x],["y1",""+Qe],["x2",""+(A.x+A.width)],["y2",""+Qe]])});var be=A.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ne,Me){var Qe=A.x+be*(Me+1);Ct.setAttributes(ne,[["x1",""+Qe],["y1",""+A.y],["x2",""+Qe],["y2",""+(A.y+A.height)]])}),Ct.setAttributes(this.cropShadeElement,[["d",Ct.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,A.x,A.y,A.width,A.height)]]),this.topLeftGrip.setCenter(A.x,A.y),this.topRightGrip.setCenter(A.x+A.width,A.y),this.bottomLeftGrip.setCenter(A.x,A.y+A.height),this.bottomRightGrip.setCenter(A.x+A.width,A.y+A.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},oe.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)},oe.prototype.clientToLocalCoordinates=function(x,A){var ie=this.container.getBoundingClientRect();return{x:x-ie.left+this.margin,y:A-ie.top+this.margin}},oe.prototype.onPointerDown=function(x){this.container.setPointerCapture(x.pointerId),this.previousPoint=this.clientToLocalCoordinates(x.clientX,x.clientY),this.cropRectElement===x.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(x.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(x.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(x.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(x.target)&&(this.activeGrip=this.bottomRightGrip)},oe.prototype.onPointerMove=function(x){if(this.isMoving)this.move(this.clientToLocalCoordinates(x.clientX,x.clientY));else if(this.activeGrip){var A=this.clientToLocalCoordinates(x.clientX,x.clientY);this.resize(A)}x.preventDefault()},oe.prototype.onPointerUp=function(x){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(x.pointerId)},oe.prototype.move=function(x){var A=x.x-this.previousPoint.x,ie=x.y-this.previousPoint.y;this.zoomFactor!==1&&(A=-A/this.zoomFactor,ie=-ie/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+A),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ie),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=x},oe.prototype.resize=function(x){var A=Object.assign({},this.cropRect),ie=x.x-this.previousPoint.x,be=x.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:A.x+ie<this.margin&&(ie=this.margin-A.x),A.x+=ie,A.width=this.cropRect.x+this.cropRect.width-A.x;break;case this.bottomRightGrip:case this.topRightGrip:A.width+ie>this.canvasWidth*this.zoomFactor&&(ie=this.canvasWidth*this.zoomFactor-A.width),A.width+=ie}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(A.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ie),A.height=this.aspectRatio.getVerticalLength(A.width)):(A.y+=be,A.height=this.cropRect.y+this.cropRect.height-A.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?A.height=this.aspectRatio.getVerticalLength(A.width):A.height+=be}A.width<10&&(A.x=this.cropRect.x,A.width=10),A.height<10&&(A.y=this.cropRect.y,A.height=10),this.previousPoint=x,A.x>=this.margin&&A.y>=this.margin&&A.x-this.margin+A.width<=this.canvasWidth&&A.y-this.margin+A.height<=this.canvasHeight&&(this.cropRect=A,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},oe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var x=this.cropRect.x+this.cropRect.width/2,A=this.cropRect.y+this.cropRect.height/2,ie=this.aspectRatio.getHorizontalLength(this.cropRect.height),be=this.aspectRatio.getVerticalLength(this.cropRect.width);ie/this.canvasWidth<be/this.canvasHeight?this.cropRect.width=ie:this.cropRect.height=be,this.cropRect.width>this.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=x-this.cropRect.width/2,this.cropRect.y=A-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)}},oe.prototype.getRescaledRect=function(x,A,ie,be,ne,Me){var Qe=ie/x,He=be/A;return{x:(ne.x-Me)*Qe+Me,y:(ne.y-Me)*He+Me,width:ne.width*Qe,height:ne.height*He}},oe.prototype.scaleCanvas=function(x,A){var ie=this.getRescaledRect(this.canvasWidth,this.canvasHeight,x,A,this.cropRect,this.margin);this.canvasWidth=x,this.canvasHeight=A,this.onCropChange&&this.onCropChange(ie),this.setCropRectangle(ie)},oe}(),hn=function(){function oe(x){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=x,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(oe.prototype,"angle",{get:function(){return this._angle},set:function(x){this._angle=x,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),oe.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},oe.prototype.onPointerDown=function(x){this.controlContainer.setPointerCapture(x.pointerId),this.isDragging=!0,this.previousPoint={x:x.clientX,y:x.clientY}},oe.prototype.onPointerMove=function(x){this.isDragging&&(this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.previousPoint.x=x.clientX)},oe.prototype.onPointerUp=function(x){this.isDragging&&this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(x.pointerId)},oe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var x=this.angleLabelText.getBBox();Ct.setAttributes(this.angleLabelElement,[["x",((this.width-x.width)/2).toString()],["y",(this.height/2).toString()]])}},oe.prototype.positionScaleShape=function(){if(this.scaleShape){var x=this.scaleShape.transform.baseVal.getItem(0);x.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(x,0)}},oe.prototype.getVisual=function(){var x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("width",this.width+"px"),x.setAttribute("height",this.height+"px"),x.setAttribute("viewBox","0 0 "+this.width+" "+this.height),x.style.flexShrink="0",document.body.appendChild(x);for(var A="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ie=1;ie<=this.width/5+10;ie++){var be=ie%5==0?this.height/3:this.height/6;A+="h4v"+-be+"h1v"+be}A+="v1H0Z",this.scaleShape=Ct.createPath(A);var ne=Ct.createTransform();this.scaleShape.transform.baseVal.appendItem(ne),x.appendChild(this.scaleShape),this.angleLabelElement=Ct.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ct.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Me=Ct.createTSpan("");return Me.innerHTML="&deg;",this.angleLabelElement.appendChild(Me),x.appendChild(this.angleLabelElement),document.body.removeChild(x),x},oe}(),Vr=function(){function oe(){this.naturalSize=!1,this.imageType="image/png"}return oe.prototype.rasterize=function(x,A,ie,be,ne,Me,Qe){var He=this;return new Promise(function(wt){var tt=document.createElement("canvas");tt.width=x.width.baseVal.value-2*be,tt.height=x.height.baseVal.value-2*be;var Nt=1,Yt=1;He.naturalSize===!0?(Nt=A.naturalWidth/(x.width.baseVal.value-2*be)/Me,Yt=A.naturalHeight/(x.height.baseVal.value-2*be)/Qe,tt.width=A.naturalWidth/Me,tt.height=A.naturalHeight/Qe):He.width!==void 0&&He.height!==void 0&&(Nt=He.width/ie.width,Yt=He.height/ie.height,tt.width*=Nt,tt.height*=Yt);var qt=tt.getContext("2d");qt.translate(tt.width/2,tt.height/2),qt.rotate(ne*Math.PI/180),qt.scale(Me,Qe),qt.translate(-tt.width/2,-tt.height/2),qt.drawImage(A,0,0,tt.width,tt.height);var Yr=document.createElement("canvas");Yr.width=ie.width*Nt,Yr.height=ie.height*Yt,Yr.getContext("2d").putImageData(qt.getImageData((ie.x-be)*Nt,(ie.y-be)*Yt,ie.width*Nt,ie.height*Yt),0,0),wt(Yr.toDataURL(He.imageType,He.imageQuality))})},oe}(),rt=function(){function oe(x){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=oe.instanceCounter++,this.styles=new hr(this.instanceNo),this.target=x,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(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(x){this._zoomToCropEnabled=x,x?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(x){this._gridLines=x,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(x){this._rotationAngle=x,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){var x;return(x=this._aspectRatio)!==null&&x!==void 0?x:this.aspectRatios[0]},set:function(x){this._aspectRatio=x},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},oe.prototype.show=function(){this.showUI(),this.open()},oe.prototype.close=function(x){x===void 0&&(x=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),x||this.closeEventListeners.forEach(function(A){return A()}),this._isOpen=!1)},oe.prototype.addRenderEventListener=function(x){this.renderEventListeners.push(x)},oe.prototype.removeRenderEventListener=function(x){this.renderEventListeners.indexOf(x)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(x),1)},oe.prototype.addCloseEventListener=function(x){this.closeEventListeners.push(x)},oe.prototype.removeCloseEventListener=function(x){this.closeEventListeners.indexOf(x)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(x),1)},oe.prototype.setupResizeObserver=function(){var x=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var x=1*this.target.clientWidth/this.target.clientHeight,A=this.contentDiv.clientWidth/x>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*x:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ie=A+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/x;this.resize(A,ie)}},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",Ct.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},oe.prototype.resize=function(x,A){this.imageWidth=Math.round(x),this.imageHeight=Math.round(A),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},oe.prototype.setEditingTarget=function(){var x=document.createElement("canvas");x.width=this.target.naturalWidth,x.height=this.target.naturalHeight,x.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var A=x.toDataURL();Ct.setAttributes(this.editingTarget,[["href",A]]),this.setEditingTargetSize()},oe.prototype.setTopLeft=function(){var x=this.target.getBoundingClientRect(),A=this.editorCanvas.getBoundingClientRect();this.left=x.left-A.left-this.CANVAS_MARGIN,this.top=x.top-A.top-this.CANVAS_MARGIN},oe.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=Ct.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=Ct.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=Ct.createGroup(),this.editingTargetRotationScaleContainer=Ct.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var x=Ct.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(x);var A=Ct.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(A),this.editingTargetContainer=Ct.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},oe.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},oe.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=Ct.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new pr(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},oe.prototype.zoomToCrop=function(){if(this.cropRect){var x=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,A=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=x+"px "+A+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-x+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-A+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},oe.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},oe.prototype.cropRectChanged=function(x){this.cropRect=x,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},oe.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var x=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,A=this.target.offsetTop>x+this.CANVAS_MARGIN?this.target.offsetTop-(x+this.CANVAS_MARGIN):0;this.coverDiv.style.top=A+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},oe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},oe.prototype.addTopToolbar=function(){var x=this;this.topToolbar=new sr,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 A=new Tr;A.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(A);var ie=[];this.aspectRatios.forEach(function(Yt){var qt=new Ut(fr.getIcon(Yt.horizontal,Yt.vertical),Yt.horizontal===0&&Yt.vertical===0?"FREE":Yt.horizontal+":"+Yt.vertical);qt.onClick=function(){return x.ratioButtonClicked(Yt)},ie.push(qt)}),this.aspectRatioButton=new Mt(fr.getIcon(0,0),"Aspect ratio",ie),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,A.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var be=new Ut('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");be.isActive=this.isGridVisible,be.onClick=function(){x.isGridVisible=!x.isGridVisible,be.isActive=x.isGridVisible},A.addButton(be);var ne=new Ut('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(ne.isActive=this.zoomToCropEnabled,ne.onClick=function(){x.zoomToCropEnabled=!x.zoomToCropEnabled,ne.isActive=x.zoomToCropEnabled},A.addButton(ne),!ar.isLicensed){var Me=new mt;this.topToolbar.addElementBlock(Me);var Qe=document.createElement("div");Qe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var He=document.createElement("a");He.style.color="currentColor",He.href="https://markerjs.com/products/cropro",He.target="_blank",He.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Qe.appendChild(He),Me.addElement(Qe)}var wt=new Tr;wt.minWidth=3*this.toolbarHeight+"px",wt.contentAlign="end",this.topToolbar.addButtonBlock(wt);var tt=new Ut('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");tt.onClick=this.startRenderAndClose,wt.addButton(tt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(tt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Nt=new Ut('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");Nt.onClick=this.close,wt.addButton(Nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},oe.prototype.addBottomToolbar=function(){var x=this;this.bottomToolbar=new sr,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 A=new Tr;A.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(A);var ie=new Ut('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");ie.onClick=this.rotateLeftButtonClicked,A.addButton(ie);var be=new Ut('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");be.onClick=this.rotateRightButtonClicked,A.addButton(be);var ne=new mt;ne.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ne),this.straightener=new hn("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(wt){x.rotateBy(wt),x.straightener.angle=x.rotationAngle},ne.addElement(this.straightener.getUI());var Me=new Tr;Me.minWidth=2*this.toolbarHeight+"px",Me.contentAlign="end",this.bottomToolbar.addButtonBlock(Me);var Qe=new Ut('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Qe.onClick=this.flipHorizontallyButtonClicked,Me.addButton(Qe);var He=new Ut('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");He.onClick=this.flipVerticallyButtonClicked,Me.addButton(He)},oe.prototype.ratioButtonClicked=function(x){this.aspectRatio=x,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},oe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=fr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},oe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Xt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},oe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},oe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},oe.prototype.restoreState=function(x){if(x){var A=this.cropLayer.getRescaledRect(x.width,x.height,this.imageWidth,this.imageHeight,x.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(A),this.cropRectChanged(A),this.flippedHorizontally=x.flippedHorizontally,this.flippedVertically=x.flippedVertically,this.applyFlip(),this.rotationAngle=x.rotationAngle,this.applyRotation()}},oe.prototype.clientToLocalCoordinates=function(x,A){var ie=this.cropImage.getBoundingClientRect();return{x:x-ie.left,y:A-ie.top}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var x=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=x+"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()},oe.prototype.rotateLeftButtonClicked=function(){var x=this.rotationAngle-90;this.rotationAngle%90!=0&&(x+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(x)},oe.prototype.rotateRightButtonClicked=function(){var x=this.rotationAngle+90;this.rotationAngle%90!=0&&(x-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(x)},oe.prototype.rotateTo=function(x){x=(x=x>180?x-360:x)<=-180?x+360:x,this.rotationAngle=x,this.applyRotation()},oe.prototype.rotateBy=function(x){this.rotateTo((this.rotationAngle+x)%360)},oe.prototype.applyRotation=function(){var x=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var A=this.editingTargetRotationContainer.transform.baseVal.getItem(0);A.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(A,0);var ie=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ie.width,this.imageHeight/ie.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=x},oe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},oe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},oe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},oe.prototype.startRenderAndClose=function(){return At(this,void 0,void 0,function(){var x,A;return jt(this,function(ie){switch(ie.label){case 0:return[4,this.render()];case 1:return x=ie.sent(),A=this.getState(),this.renderEventListeners.forEach(function(be){return be(x,A)}),this.close(!0),[2]}})})},oe.prototype.render=function(){return At(this,void 0,void 0,function(){var x;return jt(this,function(A){switch(A.label){case 0:return(x=new Vr).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.width=this.renderWidth,x.height=this.renderHeight,this.unzoomFromCrop(),Ct.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,x.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 A.sent(),[4,x.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,A.sent()]}})})},oe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new nr("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new nr("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new nr("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var x=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new nr("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*x)+`px;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new nr("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new nr("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Jt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Jt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new nr("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new nr("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new nr("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new nr("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new nr("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},oe.instanceCounter=0,oe}(),Ot=c("8hTe"),Hr=c.n(Ot),wr=/<pre[^>]*>/g;function fn(oe){var x=document.createElement("div");return x.innerHTML=oe,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var wn=G.a=function(oe){var x=oe.value,A=x===void 0?"":x,ie=oe.edit,be=ie===void 0?!1:ie,ne=oe.className,Me=oe.showTextOnly,Qe=oe.showLines,He=oe.replaces,wt=oe.zoomImg,tt=oe.hasMask,Nt=oe.style,Yt=Nt===void 0?{}:Nt,qt=oe.stylesPrev,Yr=qt===void 0?{}:qt,Jr=String(A),br=Object(l.useRef)(),$r=Object(l.useRef)(),Hn=Object(l.useState)(""),Wr=Object(d.a)(Hn,2),Nr=Wr[0],Cn=Wr[1],An=Object(l.useState)("office"),on=Object(d.a)(An,2),gn=on[0],zr=on[1],ti=function(){var $t=new rt($r.current);$t.displayMode="popup",$t.addRenderEventListener(function(){var Ar=Object(p.a)(s.a.mark(function Zt(Rr){var ct;return s.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return br.current.style.display="none",yt.next=3,Object(Ee.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Rr}});case 3:ct=yt.sent,ct!=null&&ct.id&&He($r.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(ct==null?void 0:ct.id,"?type=").concat(ct.content_type));case 5:case"end":return yt.stop()}},Zt)}));return function(Zt){return Ar.apply(this,arguments)}}()),$t.show()},Wn=function(){var $t=new Ft($r.current);$t.settings.displayMode="popup",$t.addEventListener("render",function(){var Ar=Object(p.a)(s.a.mark(function Zt(Rr){var ct;return s.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(br.current.style.display="none",!$r.current){yt.next=6;break}return yt.next=4,Object(Ee.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Rr.dataUrl}});case 4:ct=yt.sent,ct!=null&&ct.id&&He($r.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(ct==null?void 0:ct.id,"?type=").concat(ct.content_type));case 6:case"end":return yt.stop()}},Zt)}));return function(Zt){return Ar.apply(this,arguments)}}()),$t.show(),window.markerArea=$t},Zr=Object(l.useMemo)(function(){try{var mr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ar=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Jr=Jr.replace(mr,"("+le.a.API_SERVER+"/api/attachments/").replace($t,'"'+le.a.API_SERVER+"/api/attachments/").replace(Ar,'"'+le.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,`
`),Jr=Jr.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(vt){}var Zt=U(Jr),Rr=ce();if(Jr.match(/\[TOC\]/)&&(Zt=Zt.replace("<p>[TOC]</p>",Y()),B()),Zt=Zt.replace(/(__special_katext_id_\d+__)/g,function(vt,yt){var gt=Rr[yt],Bt=gt.type,bt=gt.expression;return Object(he.renderToString)(fn(bt)||"",{displayMode:Bt==="block",throwOnError:!1,output:"html"})}),Zt=Zt.replace(/▁/g,"\u2581\u2581\u2581"),fe(),Me){var ct=document.createElement("div");return ct.innerHTML=Zt,ct.innerText}return setTimeout(function(){return Nn()},500),Zt},[Jr]),Qr=Object(l.useRef)();N.WebkitLineClamp=Qe,Qe&&(Yt=Object(b.a)(Object(b.a)({},Yt),N));function Mn(mr){var $t=mr.target;if($t.tagName.toUpperCase()==="IMG"){if(wt){var Ar=$t.getAttribute("src");Cn(Ar),zr("image")}}else if($t.tagName.toUpperCase()==="A"){var Zt=$t.getAttribute("href");if(Zt.indexOf("office")>-1)mr.preventDefault(),Cn(Zt),zr("office");else if(Zt.indexOf("application/pdf")>-1)mr.preventDefault(),Cn(Zt),zr("pdf");else if(Zt.indexOf("type=text")>-1)mr.preventDefault(),Cn(Zt),zr("html");else if(Zt.startsWith("#")){mr.preventDefault();var Rr=document.getElementById(Zt.replace("#",""));Rr&&Rr.scrollIntoView(!0)}}}var Nn=function(){var $t,Ar=($t=Qr.current)===null||$t===void 0?void 0:$t.querySelectorAll("video");Ar==null||Ar.forEach(function(Zt){if(Zt.oncontextmenu=function(){return!1},Zt.src.indexOf(".m3u8")>-1&&!Zt.canPlayType("application/vnd.apple.mpegurl")){if(D.a.isSupported()){var Rr=new D.a;Rr.loadSource(Zt.src),Rr.attachMedia(Zt)}}})};Object(l.useEffect)(function(){if(Qr.current&&Zr&&(Zr.match(wr)&&window.PR.prettyPrint()),Qr.current)return Qr.current.addEventListener("click",Mn),function(){Qr.current.removeEventListener("click",Mn),fe(),B()}},[Zr,Qr.current,Mn]);var Pn=function($t){if(!be)return;$t.target.nodeName==="IMG"?(br.current.style.display="flex",br.current.style.width=$t.target.clientWidth+"px",br.current.style.height=$t.target.clientHeight+"px",br.current.style.top=$t.target.offsetTop+"px",br.current.style.left=$t.target.offsetLeft+"px",$r.current.src=$t.target.getAttribute("src")):br.current.style.display="none"};return i.a.createElement("div",{style:{position:"relative"}},i.a.createElement("div",{ref:Qr,style:Object(b.a)({},Yt),className:"".concat(ne||""," markdown-body ").concat(Hr.a.mdBody),onMouseOver:Pn,dangerouslySetInnerHTML:{__html:Zr}}),i.a.createElement("div",{ref:br,className:Hr.a.button},i.a.createElement(o.a,null,i.a.createElement(E.a,{onClick:function(){return ti()}},"\u88C1\u526A"),i.a.createElement(E.a,{onClick:function(){return Wn()}},"\u7F16\u8F91"))),i.a.createElement("img",{ref:$r,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),i.a.createElement(ve.a,{close:!0,data:Nr,hasMask:tt,type:Nr!=null&&Nr.length?gn:"",style:Object(b.a)({},Yr),onClose:function(){return Cn("")}}))}},"9OqN":function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.CTR=function(){var o=h.lib.BlockCipherMode.extend(),S=o.Encryptor=o.extend({processBlock:function(E,b){var p=this._cipher,d=p.blockSize,a=this._iv,s=this._counter;a&&(s=this._counter=a.slice(0),this._iv=void 0);var l=s.slice(0);p.encryptBlock(l,0),s[d-1]=s[d-1]+1|0;for(var i=0;i<d;i++)E[b+i]^=l[i]}});return o.Decryptor=S,o}(),h.mode.CTR})},"9VGf":function(u,G,c){"use strict";c.d(G,"a",function(){return S});var h=c("q1tI"),o=c.n(h);function S(E,b){var p=Object(h.useRef)();Object(h.useEffect)(function(){p.current=E}),Object(h.useEffect)(function(){function d(){p.current()}if(b!==null){var a=setInterval(d,b);return function(){return clearInterval(a)}}},[b])}},ALsQ:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.CFB=function(){var o=h.lib.BlockCipherMode.extend();o.Encryptor=o.extend({processBlock:function(E,b){var p=this._cipher,d=p.blockSize;S.call(this,E,b,d,p),this._prevBlock=E.slice(b,b+d)}}),o.Decryptor=o.extend({processBlock:function(E,b){var p=this._cipher,d=p.blockSize,a=E.slice(b,b+d);S.call(this,E,b,d,p),this._prevBlock=a}});function S(E,b,p,d){var a,s=this._iv;s?(a=s.slice(0),this._iv=void 0):a=this._prevBlock,d.encryptBlock(a,0);for(var l=0;l<p;l++)E[b+l]^=a[l]}return o}(),h.mode.CFB})},B7Ph:function(u,G,c){"use strict";c.d(G,"a",function(){return z});var h=c("5NDa"),o=c("5rEg"),S=c("+L6B"),E=c("2/Rp"),b=c("2qtc"),p=c("kLXV"),d=c("miYZ"),a=c("tsqr"),s=c("k1fw"),l=c("9og8"),i=c("tJVT"),g=c("oBTY"),m=c("DZo9"),v=c("8z0m"),w=c("WmNS"),_=c.n(w),k=c("q1tI"),O=c.n(k),M=c("Bvq2"),I=c.n(M),B=c("nj2k"),N=c.n(B),y=c("mxV5"),Y=c.n(y),X=c("KhGG"),P=c("ErOA"),F=c("7Cbv"),K=c("1vsH"),Q=v.a.Dragger,ce=function($){for(var j=function(ae){return ae&&ae.substring(0,ae.lastIndexOf("."))},U=Object(g.a)($),R=0,C=[],D=0;D<U.length;D++){for(var le="",he=0;he<C.length;he++)if(j(C[he][0].name)==j(U[D].name)){R=1,le=he;break}if(R==1)C[le].push(U[D]),R=0;else if(R==0){var ve=new Array;ve.push(U[D]),C.push(ve)}}var Ee=C.map(function(Se){if(Se[0].name.includes(".in"))return Se.length===2?Se:[Se[0],{}];if(Se[0].name.includes(".out"))return Se.length===2?Se.reverse():[{},Se[0]]});return Ee},fe=function($){var j=$.onClose,U=$.onOK,R=$.visible,C=$.wrapClassName,D=$.rootIdentifier,le=Object(k.useState)([]),he=Object(i.a)(le,2),ve=he[0],Ee=he[1],Se=Object(k.useState)({}),ae=Object(i.a)(Se,2),pe=ae[0],me=ae[1],ee=Object(k.useState)(!1),re=Object(i.a)(ee,2),Z=re[0],ue=re[1],V=Object(k.useRef)([]),J=Object(k.useRef)(0),Ce=function(){j()};Object(k.useEffect)(function(){q()},[]),Object(k.useEffect)(function(){R&&(V.current=[],J.current=0,Ee([]))},[R]);var q=function(){var Be=Object(l.a)(_.a.mark(function Fe(){var Ue,Ge;return _.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.prev=0,Xe.next=3,Object(P.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:Ue=Xe.sent,Ge=JSON.parse(Object(X.a)(Ue.data)),me(Ge),Xe.next=10;break;case 8:Xe.prev=8,Xe.t0=Xe.catch(0);case 10:case"end":return Xe.stop()}},Fe,null,[[0,8]])}));return function(){return Be.apply(this,arguments)}}(),H=function(Fe){return Fe&&Fe.substring(0,Fe.lastIndexOf("."))},T=function(Fe){var Ue,Ge,Ye=H((Ue=Fe[0])===null||Ue===void 0?void 0:Ue.name)||H((Ge=Fe[1])===null||Ge===void 0?void 0:Ge.name),Xe=ve.filter(function(Je){return H(Je.name)!==Ye});V.current=Object(g.a)(Xe),Ee(Object(g.a)(Xe))},W=function(Fe){var Ue=new Y.a({endpoint:pe.end_point,region:pe.region,accessKeyId:pe.access_key_id,accessKeySecret:pe.access_key_secret,bucket:pe.bucket,stsToken:pe.security_token}),Ge=Fe.name,Ye={container_type:"TestSet",file_name:Ge},Xe=Object(F.a)(),Je="testsets/".concat(D,"/").concat(Xe).concat(Ge.indexOf(".")>-1?"."+Ge.split(".").pop():"");D===null&&(Je="testsets/".concat(Xe).concat(Ge.indexOf(".")>-1?"."+Ge.split(".").pop():"")),Ue.multipartUpload(Je,new Blob([Fe.file],{type:Fe.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Ge+""},url:pe==null?void 0:pe.callback_url,host:pe==null?void 0:pe.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(P.e)(Ye)}}).then(function(Ne){if(Ne.data.status===0){J.current=J.current+1;var nt=V.current.map(function(Ve){var $e,Ie;if(Ve.name===(($e=Ne.data)===null||$e===void 0||((Ie=$e.data)===null||Ie===void 0)?void 0:Ie.file_name)){var De,Le,_e,Te=Object(s.a)({},Ve);if((De=Ne.data)!==null&&De!==void 0&&(Le=De.data)!==null&&Le!==void 0&&(_e=Le.file_name)!==null&&_e!==void 0&&_e.includes(".in")){var ke,Ae,ze,je,Ze,ht;Te.in_object_key=(ke=Ne.data)===null||ke===void 0||((Ae=ke.data)===null||Ae===void 0)?void 0:Ae.object,Te.in_object_size=(ze=Ne.data)===null||ze===void 0||((je=ze.data)===null||je===void 0)?void 0:je.size,Te.input=(Ze=Ne.data)===null||Ze===void 0||((ht=Ze.data)===null||ht===void 0)?void 0:ht.file_name,Te.in_file=Fe}else{var Tt,qe,at,dt,st,St;Te.out_object_key=(Tt=Ne.data)===null||Tt===void 0||((qe=Tt.data)===null||qe===void 0)?void 0:qe.object,Te.out_object_size=(at=Ne.data)===null||at===void 0||((dt=at.data)===null||dt===void 0)?void 0:dt.size,Te.output=(st=Ne.data)===null||st===void 0||((St=st.data)===null||St===void 0)?void 0:St.file_name,Te.out_file=Fe}return Te}return Ve});if(V.current=Object(g.a)(nt),Ee(Object(g.a)(nt)),J.current>0&&J.current===ve.length){ue(!1);var ot=ce(nt);ot=ot.filter(function(Ve){var $e,Ie;return!!(($e=Ve[0])!==null&&$e!==void 0&&$e.name&&(Ie=Ve[1])!==null&&Ie!==void 0&&Ie.name)}),ot=ot.map(function(Ve){return Object(s.a)(Object(s.a)(Object(s.a)({},Ve[0]),Ve[1]),{},{is_file:!0})}),U(ot),j()}}})},we=function(){if(ve.length===0){a.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}ue(!0);var Fe=ce(ve);if(Fe.some(function(Ue){var Ge,Ye;return!((Ge=Ue[0])!==null&&Ge!==void 0&&Ge.name&&(Ye=Ue[1])!==null&&Ye!==void 0&&Ye.name)})){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var Ue=Object(l.a)(_.a.mark(function Ye(){return _.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:ve.map(function(){var Ne=Object(l.a)(_.a.mark(function nt(ot){return _.a.wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:W(ot);case 1:case"end":return $e.stop()}},nt)}));return function(nt){return Ne.apply(this,arguments)}}());case 1:case"end":return Je.stop()}},Ye)}));function Ge(){return Ue.apply(this,arguments)}return Ge}(),onCancel:function(){ue(!1)}});return}ve.map(function(){var Ue=Object(l.a)(_.a.mark(function Ge(Ye){return _.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:W(Ye);case 1:case"end":return Je.stop()}},Ge)}));return function(Ge){return Ue.apply(this,arguments)}}())},ye={name:"file",fileList:ve,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Fe){if(ve!=null&&ve.some(function(Ge){return Ge.name===Fe.name}))return a.b.info("".concat(Fe.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Fe.size/1024/1024>100)return a.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Fe.name))return a.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var Ue={name:Fe.name,uid:Fe.uid,file:Fe,percent:0};return ve.push(Ue),V.current=Object(g.a)(ve),Ee(Object(g.a)(ve)),!1}},Oe=ce(ve);return console.log(ve,Oe,"fileList"),O.a.createElement(p.a,{visible:R,wrapClassName:C,onOk:we,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Z},onCancel:Ce,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},O.a.createElement("div",{className:I.a.wrap},ve.length?O.a.createElement("div",null,O.a.createElement(v.a,ye,O.a.createElement(E.a,{className:I.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),O.a.createElement(z,{data:Oe,onRemove:T})):O.a.createElement("div",{className:I.a.noData},O.a.createElement("img",{src:N.a,alt:""}),O.a.createElement(v.a,ye,O.a.createElement(E.a,{className:I.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),O.a.createElement("div",{className:I.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",O.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",O.a.createElement("br",null),"2\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",O.a.createElement("br",null),"3\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002")))},z=function($){var j=$.data,U=j===void 0?[]:j,R=$.onRemove,C=$.width,D=C===void 0?"auto":C,le=$.showScore,he=le===void 0?!1:le,ve=$.disabled,Ee=ve===void 0?!1:ve,Se=$.inputChange,ae=function(re){var Z=document.createElement("a");document.body.appendChild(Z);var ue=URL.createObjectURL(re.file);Z.href=ue,Z.download=re.name,Z.click(),URL.revokeObjectURL(ue),document.body.removeChild(Z)},pe=function(re,Z){Object(K.w)(re,Z)},me=function(re,Z){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:O.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){R(re,Z)},onCancel:function(){}})};return U.length?O.a.createElement("div",{style:{width:D}},O.a.createElement("div",{className:I.a.head},O.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),O.a.createElement("div",{style:{width:he?"25%":"35%"}},"\u8F93\u5165"),O.a.createElement("div",{style:{width:he?"25%":"35%"}},"\u8F93\u51FA"),he&&O.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),O.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),U.map(function(ee,re){var Z,ue,V,J;return O.a.createElement("div",{key:re,className:I.a.list},O.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",re+1),O.a.createElement("div",{className:I.a.info,style:{width:he?"25%":"35%"}},O.a.createElement("span",{title:ee.input||((Z=ee[0])===null||Z===void 0?void 0:Z.name),onClick:function(){ee.input?ee.input_file_url?pe(ee.input_file_url,ee.input):ae(ee.in_file):ae(ee[0])}},ee.input||((ue=ee[0])===null||ue===void 0?void 0:ue.name))),O.a.createElement("div",{className:I.a.info,style:{width:he?"25%":"35%"}},O.a.createElement("span",{title:ee.output||((V=ee[1])===null||V===void 0?void 0:V.name),onClick:function(){ee.input?ee.output_file_url?pe(ee.output_file_url,ee.output):ae(ee.out_file):ae(ee[1])}},ee.output||((J=ee[1])===null||J===void 0?void 0:J.name))),he&&O.a.createElement("div",{style:{width:"20%"}},O.a.createElement(o.a,{disabled:Ee,style:{width:"70%"},onChange:function(q){return Se(q,re)},value:ee.score}),O.a.createElement("span",null,"\xA0%")),O.a.createElement("div",{onClick:function(){return me(ee,re)},style:{width:"10%"}},O.a.createElement("span",{className:I.a.del},"\u5220\u9664")))})):O.a.createElement(O.a.Fragment,null)};G.b=fe},Bd2K:function(u,G,c){(function(h){h(c("VrN/"),c("osHv"))})(function(h){h.defineOption("autoCloseTags",!1,function(s,l,i){if(i!=h.Init&&i&&s.removeKeyMap("autoCloseTags"),!l)return;var g={name:"autoCloseTags"};(typeof l!="object"||l.whenClosing!==!1)&&(g["'/'"]=function(m){return p(m)}),(typeof l!="object"||l.whenOpening!==!1)&&(g["'>'"]=function(m){return E(m)}),s.addKeyMap(g)});var o=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function E(s){if(s.getOption("disableInput"))return h.Pass;for(var l=s.listSelections(),i=[],g=s.getOption("autoCloseTags"),m=0;m<l.length;m++){if(!l[m].empty())return h.Pass;var v=l[m].head,w=s.getTokenAt(v),_=h.innerMode(s.getMode(),w.state),k=_.state,O=_.mode.xmlCurrentTag&&_.mode.xmlCurrentTag(k),M=O&&O.name;if(!M)return h.Pass;var I=_.mode.configuration=="html",B=typeof g=="object"&&g.dontCloseTags||I&&o,N=typeof g=="object"&&g.indentTags||I&&S;w.end>v.ch&&(M=M.slice(0,M.length-w.end+v.ch));var y=M.toLowerCase();if(!M||w.type=="string"&&(w.end!=v.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&O.close||w.string.indexOf("/")==v.ch-w.start-1||B&&d(B,y)>-1||a(s,_.mode.xmlCurrentContext&&_.mode.xmlCurrentContext(k)||[],M,v,!0))return h.Pass;var Y=typeof g=="object"&&g.emptyTags;if(Y&&d(Y,M)>-1){i[m]={text:"/>",newPos:h.Pos(v.line,v.ch+2)};continue}var X=N&&d(N,y)>-1;i[m]={indent:X,text:">"+(X?`
`:"")+"</"+M+">",newPos:X?h.Pos(v.line+1,0):h.Pos(v.line,v.ch+1)}}for(var P=typeof g=="object"&&g.dontIndentOnAutoClose,m=l.length-1;m>=0;m--){var F=i[m];s.replaceRange(F.text,l[m].head,l[m].anchor,"+insert");var K=s.listSelections().slice(0);K[m]={head:F.newPos,anchor:F.newPos},s.setSelections(K),!P&&F.indent&&(s.indentLine(F.newPos.line,null,!0),s.indentLine(F.newPos.line+1,null,!0))}}function b(s,l){for(var i=s.listSelections(),g=[],m=l?"/":"</",v=s.getOption("autoCloseTags"),w=typeof v=="object"&&v.dontIndentOnSlash,_=0;_<i.length;_++){if(!i[_].empty())return h.Pass;var k=i[_].head,O=s.getTokenAt(k),M=h.innerMode(s.getMode(),O.state),I=M.state;if(l&&(O.type=="string"||O.string.charAt(0)!="<"||O.start!=k.ch-1))return h.Pass;var B,N=M.mode.name!="xml"&&s.getMode().name=="htmlmixed";if(N&&M.mode.name=="javascript")B=m+"script";else if(N&&M.mode.name=="css")B=m+"style";else{var y=M.mode.xmlCurrentContext&&M.mode.xmlCurrentContext(I);if(!y||y.length&&a(s,y,y[y.length-1],k))return h.Pass;B=m+y[y.length-1]}s.getLine(k.line).charAt(O.end)!=">"&&(B+=">"),g[_]=B}if(s.replaceSelections(g),i=s.listSelections(),!w)for(var _=0;_<i.length;_++)(_==i.length-1||i[_].head.line<i[_+1].head.line)&&s.indentLine(i[_].head.line)}function p(s){return s.getOption("disableInput")?h.Pass:b(s,!0)}h.commands.closeTag=function(s){return b(s)};function d(s,l){if(s.indexOf)return s.indexOf(l);for(var i=0,g=s.length;i<g;++i)if(s[i]==l)return i;return-1}function a(s,l,i,g,m){if(!h.scanForClosingTag)return!1;var v=Math.min(s.lastLine()+1,g.line+500),w=h.scanForClosingTag(s,g,null,v);if(!w||w.tag!=i)return!1;for(var _=m?1:0,k=l.length-1;k>=0&&l[k]==i;k--)++_;g=w.to;for(var k=1;k<_;k++){var O=h.scanForClosingTag(s,g,null,v);if(!O||O.tag!=i)return!1;g=O.to}return!0}})},BjJ7:function(u,G,c){"use strict";c.d(G,"d",function(){return o}),c.d(G,"c",function(){return S}),c.d(G,"e",function(){return E}),c.d(G,"b",function(){return b}),c.d(G,"a",function(){return d});var h=c("m3rI");function o(a){var s=!0;if(a.length>0){for(var l=0;l<a.length;l++)if(a[l].compile_success==0||!a[l].compile_success){s=!1;break}}else s=!1;return s}function S(a){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=[],i=0;i<a.length;i++){var g=a[i],m=s?"".concat(s,"/").concat(g.name):"".concat(g.name);l.push({title:g.name,isLeaf:!(g.type==="tree"),key:m})}return l}function E(a,s,l){for(var i=0;i<a.length;i++){var g=a[i];if(g.key===s){g.children=l;break}g.children&&E(g.children,s,l)}return a}function b(a,s,l){var i;return function(){var g=this,m=arguments,v=function(){i=null,l||a.apply(g,m)},w=l&&!i;clearTimeout(i),i=setTimeout(v,s),w&&a.apply(g,m)}}var p=!0,d=h.a.API_SERVER},Bvq2:function(u,G,c){u.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(u,G,c){},CrYA:function(u,G,c){var h=c("MFOe"),o=h.Global;u.exports={name:"sessionStorage",read:E,write:b,each:p,remove:d,clearAll:a};function S(){return o.sessionStorage}function E(s){return S().getItem(s)}function b(s,l){return S().setItem(s,l)}function p(s){for(var l=S().length-1;l>=0;l--){var i=S().key(l);s(E(i),i)}}function d(s){return S().removeItem(s)}function a(){return S().clear()}},D1Df:function(u,G,c){"use strict";function h(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function($){return typeof $}:h=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},h(z)}function o(){return o=Object.assign||function(z){for(var se=1;se<arguments.length;se++){var $=arguments[se];for(var j in $)Object.prototype.hasOwnProperty.call($,j)&&(z[j]=$[j])}return z},o.apply(this,arguments)}function S(z,se){var $=Object.keys(z);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(z);se&&(j=j.filter(function(U){return Object.getOwnPropertyDescriptor(z,U).enumerable})),$.push.apply($,j)}return $}function E(z){for(var se=1;se<arguments.length;se++){var $=arguments[se]!=null?arguments[se]:{};se%2?S($,!0).forEach(function(j){w(z,j,$[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors($)):S($).forEach(function(j){Object.defineProperty(z,j,Object.getOwnPropertyDescriptor($,j))})}return z}function b(z,se){if(z==null)return{};var $=p(z,se),j,U;if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(z);for(U=0;U<R.length;U++){if(j=R[U],se.indexOf(j)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,j))continue;$[j]=z[j]}}return $}function p(z,se){if(z==null)return{};var $={},j=Object.keys(z),U,R;for(R=0;R<j.length;R++){if(U=j[R],se.indexOf(U)>=0)continue;$[U]=z[U]}return $}function d(z,se){if(!(z instanceof se))throw new TypeError("Cannot call a class as a function")}function a(z,se){for(var $=0;$<se.length;$++){var j=se[$];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(z,j.key,j)}}function s(z,se,$){return se&&a(z.prototype,se),$&&a(z,$),z}function l(z,se){return se&&(h(se)==="object"||typeof se=="function")?se:g(z)}function i(z){return i=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},i(z)}function g(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function m(z,se){if(typeof se!="function"&&se!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(se&&se.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),se&&v(z,se)}function v(z,se){return v=Object.setPrototypeOf||function(j,U){return j.__proto__=U,j},v(z,se)}function w(z,se,$){return se in z?Object.defineProperty(z,se,{value:$,enumerable:!0,configurable:!0,writable:!0}):z[se]=$,z}var _=c("q1tI"),k=c("17x9"),O=c("H38U"),M=c("aRTE");function I(z){for(var se="",$=0;$<z.length;$++){var j=z.charCodeAt($);j<128?se+=String.fromCharCode(j):j<2048?(se+=String.fromCharCode(192|j>>6),se+=String.fromCharCode(128|j&63)):j<55296||j>=57344?(se+=String.fromCharCode(224|j>>12),se+=String.fromCharCode(128|j>>6&63),se+=String.fromCharCode(128|j&63)):($++,j=65536+((j&1023)<<10|z.charCodeAt($)&1023),se+=String.fromCharCode(240|j>>18),se+=String.fromCharCode(128|j>>12&63),se+=String.fromCharCode(128|j>>6&63),se+=String.fromCharCode(128|j&63))}return se}var B={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},N={},y=4,Y=.1;function X(z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=[];return z.forEach(function(j,U){var R=null;j.forEach(function(C,D){if(!C&&R!==null){$.push("M".concat(R+se," ").concat(U+se,"h").concat(D-R,"v1H").concat(R+se,"z")),R=null;return}if(D===j.length-1){if(!C)return;R===null?$.push("M".concat(D+se,",").concat(U+se," h1v1H").concat(D+se,"z")):$.push("M".concat(R+se,",").concat(U+se," h").concat(D+1-R,"v1H").concat(R+se,"z"));return}C&&R===null&&(R=D)})}),$.join("")}function P(z,se){return z.slice().map(function($,j){return j<se.y||j>=se.y+se.h?$:$.map(function(U,R){return R<se.x||R>=se.x+se.w?U:!1})})}function F(z,se){var $=z.imageSettings,j=z.size,U=z.includeMargin;if($==null)return null;var R=U?y:0,C=se.length+R*2,D=Math.floor(j*Y),le=C/j,he=($.width||D)*le,ve=($.height||D)*le,Ee=$.x==null?se.length/2-he/2:$.x*le,Se=$.y==null?se.length/2-ve/2:$.y*le,ae=null;if($.excavate){var pe=Math.floor(Ee),me=Math.floor(Se),ee=Math.ceil(he+Ee-pe),re=Math.ceil(ve+Se-me);ae={x:pe,y:me,w:ee,h:re}}return{x:Ee,y:Se,h:ve,w:he,excavation:ae}}var K=function(){try{new Path2D().addPath(new Path2D)}catch(z){return!1}return!0}(),Q=function(z){m(se,z);function se(){var $,j;d(this,se);for(var U=arguments.length,R=new Array(U),C=0;C<U;C++)R[C]=arguments[C];return j=l(this,($=i(se)).call.apply($,[this].concat(R))),w(g(j),"_canvas",void 0),w(g(j),"_image",void 0),w(g(j),"state",{imgLoaded:!1}),w(g(j),"handleImageLoad",function(){j.setState({imgLoaded:!0})}),j}return s(se,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var j=this.props,U=j.value,R=j.size,C=j.level,D=j.bgColor,le=j.fgColor,he=j.includeMargin,ve=j.imageSettings,Ee=new O(-1,M[C]);if(Ee.addData(I(U)),Ee.make(),this._canvas!=null){var Se=this._canvas,ae=Se.getContext("2d");if(!ae)return;var pe=Ee.modules;if(pe===null)return;var me=he?y:0,ee=pe.length+me*2,re=F(this.props,pe);ve!=null&&re!=null&&(re.excavation!=null&&(pe=P(pe,re.excavation)));var Z=window.devicePixelRatio||1;Se.height=Se.width=R*Z;var ue=R/ee*Z;ae.scale(ue,ue),ae.fillStyle=D,ae.fillRect(0,0,ee,ee),ae.fillStyle=le,K?ae.fill(new Path2D(X(pe,me))):pe.forEach(function(V,J){V.forEach(function(Ce,q){Ce&&ae.fillRect(q+me,J+me,1,1)})}),this.state.imgLoaded&&this._image&&re!=null&&ae.drawImage(this._image,re.x+me,re.y+me,re.w,re.h)}}},{key:"render",value:function(){var j=this,U=this.props,R=U.value,C=U.size,D=U.level,le=U.bgColor,he=U.fgColor,ve=U.style,Ee=U.includeMargin,Se=U.imageSettings,ae=b(U,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),pe=E({height:C,width:C},ve),me=null,ee=Se&&Se.src;return Se!=null&&ee!=null&&(me=_.createElement("img",{src:ee,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Z){return j._image=Z}})),_.createElement(_.Fragment,null,_.createElement("canvas",o({style:pe,height:C,width:C,ref:function(Z){return j._canvas=Z}},ae)),me)}}]),se}(_.PureComponent);w(Q,"defaultProps",B);var ce=function(z){m(se,z);function se(){return d(this,se),l(this,i(se).apply(this,arguments))}return s(se,[{key:"render",value:function(){var j=this.props,U=j.value,R=j.size,C=j.level,D=j.bgColor,le=j.fgColor,he=j.includeMargin,ve=j.imageSettings,Ee=b(j,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),Se=new O(-1,M[C]);Se.addData(I(U)),Se.make();var ae=Se.modules;if(ae===null)return null;var pe=he?y:0,me=ae.length+pe*2,ee=F(this.props,ae),re=null;ve!=null&&ee!=null&&(ee.excavation!=null&&(ae=P(ae,ee.excavation)),re=_.createElement("image",{xlinkHref:ve.src,height:ee.h,width:ee.w,x:ee.x+pe,y:ee.y+pe,preserveAspectRatio:"none"}));var Z=X(ae,pe);return _.createElement("svg",o({shapeRendering:"crispEdges",height:R,width:R,viewBox:"0 0 ".concat(me," ").concat(me)},Ee),_.createElement("path",{fill:D,d:"M0,0 h".concat(me,"v").concat(me,"H0z")}),_.createElement("path",{fill:le,d:Z}),re)}}]),se}(_.PureComponent);w(ce,"defaultProps",B);var fe=function(se){var $=se.renderAs,j=b(se,["renderAs"]),U=$==="svg"?ce:Q;return _.createElement(U,j)};fe.defaultProps=E({renderAs:"canvas"},B),u.exports=fe},DlQD:function(u,G,c){(function(h,o){u.exports=o()})(this,function(){"use strict";function h(Ie,De){for(var Le=0;Le<De.length;Le++){var _e=De[Le];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(Ie,_e.key,_e)}}function o(Ie,De,Le){return De&&h(Ie.prototype,De),Le&&h(Ie,Le),Ie}function S(Ie,De){if(!Ie)return;if(typeof Ie=="string")return E(Ie,De);var Le=Object.prototype.toString.call(Ie).slice(8,-1);if(Le==="Object"&&Ie.constructor&&(Le=Ie.constructor.name),Le==="Map"||Le==="Set")return Array.from(Ie);if(Le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Le))return E(Ie,De)}function E(Ie,De){(De==null||De>Ie.length)&&(De=Ie.length);for(var Le=0,_e=new Array(De);Le<De;Le++)_e[Le]=Ie[Le];return _e}function b(Ie,De){var Le;if(typeof Symbol=="undefined"||Ie[Symbol.iterator]==null){if(Array.isArray(Ie)||(Le=S(Ie))||De&&Ie&&typeof Ie.length=="number"){Le&&(Ie=Le);var _e=0;return function(){return _e>=Ie.length?{done:!0}:{done:!1,value:Ie[_e++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Le=Ie[Symbol.iterator](),Le.next.bind(Le)}function p(Ie,De){return De={exports:{}},Ie(De,De.exports),De.exports}var d=p(function(Ie){function De(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Le(_e){Ie.exports.defaults=_e}Ie.exports={defaults:De(),getDefaults:De,changeDefaults:Le}}),a=d.defaults,s=d.getDefaults,l=d.changeDefaults,i=/[&<>"']/,g=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,v=/[<>"']|&(?!#?\w+;)/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_=function(De){return w[De]};function k(Ie,De){if(De){if(i.test(Ie))return Ie.replace(g,_)}else if(m.test(Ie))return Ie.replace(v,_);return Ie}var O=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function M(Ie){return Ie.replace(O,function(De,Le){return Le=Le.toLowerCase(),Le==="colon"?":":Le.charAt(0)==="#"?Le.charAt(1)==="x"?String.fromCharCode(parseInt(Le.substring(2),16)):String.fromCharCode(+Le.substring(1)):""})}var I=/(^|[^\[])\^/g;function B(Ie,De){Ie=Ie.source||Ie,De=De||"";var Le={replace:function(Te,ke){return ke=ke.source||ke,ke=ke.replace(I,"$1"),Ie=Ie.replace(Te,ke),Le},getRegex:function(){return new RegExp(Ie,De)}};return Le}var N=/[^\w:]/g,y=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Y(Ie,De,Le){if(Ie){var _e;try{_e=decodeURIComponent(M(Le)).replace(N,"").toLowerCase()}catch(Te){return null}if(_e.indexOf("javascript:")===0||_e.indexOf("vbscript:")===0||_e.indexOf("data:")===0)return null}De&&!y.test(Le)&&(Le=Q(De,Le));try{Le=encodeURI(Le).replace(/%25/g,"%")}catch(Te){return null}return Le}var X={},P=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,K=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Q(Ie,De){X[" "+Ie]||(P.test(Ie)?X[" "+Ie]=Ie+"/":X[" "+Ie]=se(Ie,"/",!0)),Ie=X[" "+Ie];var Le=Ie.indexOf(":")===-1;return De.substring(0,2)==="//"?Le?De:Ie.replace(F,"$1")+De:De.charAt(0)==="/"?Le?De:Ie.replace(K,"$1")+De:Ie+De}var ce={exec:function(){}};function fe(Ie){for(var De=1,Le,_e;De<arguments.length;De++){Le=arguments[De];for(_e in Le)Object.prototype.hasOwnProperty.call(Le,_e)&&(Ie[_e]=Le[_e])}return Ie}function z(Ie,De){var Le=Ie.replace(/\|/g,function(ke,Ae,ze){for(var je=!1,Ze=Ae;--Ze>=0&&ze[Ze]==="\\";)je=!je;return je?"|":" |"}),_e=Le.split(/ \|/),Te=0;if(_e.length>De)_e.splice(De);else for(;_e.length<De;)_e.push("");for(;Te<_e.length;Te++)_e[Te]=_e[Te].trim().replace(/\\\|/g,"|");return _e}function se(Ie,De,Le){var _e=Ie.length;if(_e===0)return"";for(var Te=0;Te<_e;){var ke=Ie.charAt(_e-Te-1);if(ke===De&&!Le)Te++;else if(ke!==De&&Le)Te++;else break}return Ie.substr(0,_e-Te)}function $(Ie,De){if(Ie.indexOf(De[1])===-1)return-1;for(var Le=Ie.length,_e=0,Te=0;Te<Le;Te++)if(Ie[Te]==="\\")Te++;else if(Ie[Te]===De[0])_e++;else if(Ie[Te]===De[1]&&(_e--,_e<0))return Te;return-1}function j(Ie){Ie&&Ie.sanitize&&!Ie.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var U={escape:k,unescape:M,edit:B,cleanUrl:Y,resolveUrl:Q,noopTest:ce,merge:fe,splitCells:z,rtrim:se,findClosingBracket:$,checkSanitizeDeprecation:j},R=d.defaults,C=U.rtrim,D=U.splitCells,le=U.escape,he=U.findClosingBracket;function ve(Ie,De,Le){var _e=De.href,Te=De.title?le(De.title):null,ke=Ie[1].replace(/\\([\[\]])/g,"$1");return Ie[0].charAt(0)!=="!"?{type:"link",raw:Le,href:_e,title:Te,text:ke}:{type:"image",raw:Le,href:_e,title:Te,text:le(ke)}}function Ee(Ie,De){var Le=Ie.match(/^(\s+)(?:```)/);if(Le===null)return De;var _e=Le[1];return De.split(`
`).map(function(Te){var ke=Te.match(/^\s+/);if(ke===null)return Te;var Ae=ke[0];return Ae.length>=_e.length?Te.slice(_e.length):Te}).join(`
`)}var Se=function(){function Ie(Le){this.options=Le||R}var De=Ie.prototype;return De.space=function(_e){var Te=this.rules.block.newline.exec(_e);if(Te)return Te[0].length>1?{type:"space",raw:Te[0]}:{raw:`
`}},De.code=function(_e,Te){var ke=this.rules.block.code.exec(_e);if(ke){var Ae=Te[Te.length-1];if(Ae&&Ae.type==="paragraph")return{raw:ke[0],text:ke[0].trimRight()};var ze=ke[0].replace(/^ {4}/gm,"");return{type:"code",raw:ke[0],codeBlockStyle:"indented",text:this.options.pedantic?ze:C(ze,`
`)}}},De.fences=function(_e){var Te=this.rules.block.fences.exec(_e);if(Te){var ke=Te[0],Ae=Ee(ke,Te[3]||"");return{type:"code",raw:ke,lang:Te[2]?Te[2].trim():Te[2],text:Ae}}},De.heading=function(_e){var Te=this.rules.block.heading.exec(_e);if(Te)return{type:"heading",raw:Te[0],depth:Te[1].length,text:Te[2]}},De.nptable=function(_e){var Te=this.rules.block.nptable.exec(_e);if(Te){var ke={type:"table",header:D(Te[1].replace(/^ *| *\| *$/g,"")),align:Te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Te[3]?Te[3].replace(/\n$/,"").split(`
`):[],raw:Te[0]};if(ke.header.length===ke.align.length){var Ae=ke.align.length,ze;for(ze=0;ze<Ae;ze++)/^ *-+: *$/.test(ke.align[ze])?ke.align[ze]="right":/^ *:-+: *$/.test(ke.align[ze])?ke.align[ze]="center":/^ *:-+ *$/.test(ke.align[ze])?ke.align[ze]="left":ke.align[ze]=null;for(Ae=ke.cells.length,ze=0;ze<Ae;ze++)ke.cells[ze]=D(ke.cells[ze],ke.header.length);return ke}}},De.hr=function(_e){var Te=this.rules.block.hr.exec(_e);if(Te)return{type:"hr",raw:Te[0]}},De.blockquote=function(_e){var Te=this.rules.block.blockquote.exec(_e);if(Te){var ke=Te[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Te[0],text:ke}}},De.list=function(_e){var Te=this.rules.block.list.exec(_e);if(Te){for(var ke=Te[0],Ae=Te[2],ze=Ae.length>1,je=Ae[Ae.length-1]===")",Ze={type:"list",raw:ke,ordered:ze,start:ze?+Ae.slice(0,-1):"",loose:!1,items:[]},ht=Te[0].match(this.rules.block.item),Tt=!1,qe,at,dt,st,St,Ft,Vt,Kt=ht.length,At=0;At<Kt;At++)qe=ht[At],ke=qe,at=qe.length,qe=qe.replace(/^ *([*+-]|\d+[.)]) */,""),~qe.indexOf(`
`)&&(at-=qe.length,qe=this.options.pedantic?qe.replace(/^ {1,4}/gm,""):qe.replace(new RegExp("^ {1,"+at+"}","gm"),"")),At!==Kt-1&&(dt=this.rules.block.bullet.exec(ht[At+1])[0],(ze?dt.length===1||!je&&dt[dt.length-1]===")":dt.length>1||this.options.smartLists&&dt!==Ae)&&(st=ht.slice(At+1).join(`
`),Ze.raw=Ze.raw.substring(0,Ze.raw.length-st.length),At=Kt-1)),St=Tt||/\n\n(?!\s*$)/.test(qe),At!==Kt-1&&(Tt=qe.charAt(qe.length-1)===`
`,St||(St=Tt)),St&&(Ze.loose=!0),Ft=/^\[[ xX]\] /.test(qe),Vt=void 0,Ft&&(Vt=qe[1]!==" ",qe=qe.replace(/^\[[ xX]\] +/,"")),Ze.items.push({type:"list_item",raw:ke,task:Ft,checked:Vt,loose:St,text:qe});return Ze}},De.html=function(_e){var Te=this.rules.block.html.exec(_e);if(Te)return{type:this.options.sanitize?"paragraph":"html",raw:Te[0],pre:!this.options.sanitizer&&(Te[1]==="pre"||Te[1]==="script"||Te[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Te[0]):le(Te[0]):Te[0]}},De.def=function(_e){var Te=this.rules.block.def.exec(_e);if(Te){Te[3]&&(Te[3]=Te[3].substring(1,Te[3].length-1));var ke=Te[1].toLowerCase().replace(/\s+/g," ");return{tag:ke,raw:Te[0],href:Te[2],title:Te[3]}}},De.table=function(_e){var Te=this.rules.block.table.exec(_e);if(Te){var ke={type:"table",header:D(Te[1].replace(/^ *| *\| *$/g,"")),align:Te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Te[3]?Te[3].replace(/\n$/,"").split(`
`):[]};if(ke.header.length===ke.align.length){ke.raw=Te[0];var Ae=ke.align.length,ze;for(ze=0;ze<Ae;ze++)/^ *-+: *$/.test(ke.align[ze])?ke.align[ze]="right":/^ *:-+: *$/.test(ke.align[ze])?ke.align[ze]="center":/^ *:-+ *$/.test(ke.align[ze])?ke.align[ze]="left":ke.align[ze]=null;for(Ae=ke.cells.length,ze=0;ze<Ae;ze++)ke.cells[ze]=D(ke.cells[ze].replace(/^ *\| *| *\| *$/g,""),ke.header.length);return ke}}},De.lheading=function(_e){var Te=this.rules.block.lheading.exec(_e);if(Te)return{type:"heading",raw:Te[0],depth:Te[2].charAt(0)==="="?1:2,text:Te[1]}},De.paragraph=function(_e){var Te=this.rules.block.paragraph.exec(_e);if(Te)return{type:"paragraph",raw:Te[0],text:Te[1].charAt(Te[1].length-1)===`
`?Te[1].slice(0,-1):Te[1]}},De.text=function(_e,Te){var ke=this.rules.block.text.exec(_e);if(ke){var Ae=Te[Te.length-1];return Ae&&Ae.type==="text"?{raw:ke[0],text:ke[0]}:{type:"text",raw:ke[0],text:ke[0]}}},De.escape=function(_e){var Te=this.rules.inline.escape.exec(_e);if(Te)return{type:"escape",raw:Te[0],text:le(Te[1])}},De.tag=function(_e,Te,ke){var Ae=this.rules.inline.tag.exec(_e);if(Ae)return!Te&&/^<a /i.test(Ae[0])?Te=!0:Te&&/^<\/a>/i.test(Ae[0])&&(Te=!1),!ke&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ae[0])?ke=!0:ke&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ae[0])&&(ke=!1),{type:this.options.sanitize?"text":"html",raw:Ae[0],inLink:Te,inRawBlock:ke,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):le(Ae[0]):Ae[0]}},De.link=function(_e){var Te=this.rules.inline.link.exec(_e);if(Te){var ke=he(Te[2],"()");if(ke>-1){var Ae=Te[0].indexOf("!")===0?5:4,ze=Ae+Te[1].length+ke;Te[2]=Te[2].substring(0,ke),Te[0]=Te[0].substring(0,ze).trim(),Te[3]=""}var je=Te[2],Ze="";if(this.options.pedantic){var ht=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(je);ht?(je=ht[1],Ze=ht[3]):Ze=""}else Ze=Te[3]?Te[3].slice(1,-1):"";je=je.trim().replace(/^<([\s\S]*)>$/,"$1");var Tt=ve(Te,{href:je&&je.replace(this.rules.inline._escapes,"$1"),title:Ze&&Ze.replace(this.rules.inline._escapes,"$1")},Te[0]);return Tt}},De.reflink=function(_e,Te){var ke;if((ke=this.rules.inline.reflink.exec(_e))||(ke=this.rules.inline.nolink.exec(_e))){var Ae=(ke[2]||ke[1]).replace(/\s+/g," ");if(Ae=Te[Ae.toLowerCase()],!Ae||!Ae.href){var ze=ke[0].charAt(0);return{type:"text",raw:ze,text:ze}}var je=ve(ke,Ae,ke[0]);return je}},De.strong=function(_e,Te,ke){ke===void 0&&(ke="");var Ae=this.rules.inline.strong.start.exec(_e);if(Ae&&(!Ae[1]||Ae[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Te=Te.slice(-1*_e.length);var ze=Ae[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ze.lastIndex=0;for(var je;(Ae=ze.exec(Te))!=null;)if(je=this.rules.inline.strong.middle.exec(Te.slice(0,Ae.index+3)),je)return{type:"strong",raw:_e.slice(0,je[0].length),text:_e.slice(2,je[0].length-2)}}},De.em=function(_e,Te,ke){ke===void 0&&(ke="");var Ae=this.rules.inline.em.start.exec(_e);if(Ae&&(!Ae[1]||Ae[1]&&(ke===""||this.rules.inline.punctuation.exec(ke)))){Te=Te.slice(-1*_e.length);var ze=Ae[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ze.lastIndex=0;for(var je;(Ae=ze.exec(Te))!=null;)if(je=this.rules.inline.em.middle.exec(Te.slice(0,Ae.index+2)),je)return{type:"em",raw:_e.slice(0,je[0].length),text:_e.slice(1,je[0].length-1)}}},De.codespan=function(_e){var Te=this.rules.inline.code.exec(_e);if(Te){var ke=Te[2].replace(/\n/g," "),Ae=/[^ ]/.test(ke),ze=ke.startsWith(" ")&&ke.endsWith(" ");return Ae&&ze&&(ke=ke.substring(1,ke.length-1)),ke=le(ke,!0),{type:"codespan",raw:Te[0],text:ke}}},De.br=function(_e){var Te=this.rules.inline.br.exec(_e);if(Te)return{type:"br",raw:Te[0]}},De.del=function(_e){var Te=this.rules.inline.del.exec(_e);if(Te)return{type:"del",raw:Te[0],text:Te[1]}},De.autolink=function(_e,Te){var ke=this.rules.inline.autolink.exec(_e);if(ke){var Ae,ze;return ke[2]==="@"?(Ae=le(this.options.mangle?Te(ke[1]):ke[1]),ze="mailto:"+Ae):(Ae=le(ke[1]),ze=Ae),{type:"link",raw:ke[0],text:Ae,href:ze,tokens:[{type:"text",raw:Ae,text:Ae}]}}},De.url=function(_e,Te){var ke;if(ke=this.rules.inline.url.exec(_e)){var Ae,ze;if(ke[2]==="@")Ae=le(this.options.mangle?Te(ke[0]):ke[0]),ze="mailto:"+Ae;else{var je;do je=ke[0],ke[0]=this.rules.inline._backpedal.exec(ke[0])[0];while(je!==ke[0]);Ae=le(ke[0]),ke[1]==="www."?ze="http://"+Ae:ze=Ae}return{type:"link",raw:ke[0],text:Ae,href:ze,tokens:[{type:"text",raw:Ae,text:Ae}]}}},De.inlineText=function(_e,Te,ke){var Ae=this.rules.inline.text.exec(_e);if(Ae){var ze;return Te?ze=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):le(Ae[0]):Ae[0]:ze=le(this.options.smartypants?ke(Ae[0]):Ae[0]),{type:"text",raw:Ae[0],text:ze}}},Ie}(),ae=U.noopTest,pe=U.edit,me=U.merge,ee={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ae,table:ae,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ee._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ee.def=pe(ee.def).replace("label",ee._label).replace("title",ee._title).getRegex(),ee.bullet=/(?:[*+-]|\d{1,9}[.)])/,ee.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ee.item=pe(ee.item,"gm").replace(/bull/g,ee.bullet).getRegex(),ee.list=pe(ee.list).replace(/bull/g,ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ee.def.source+")").getRegex(),ee._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",ee._comment=/<!--(?!-?>)[\s\S]*?-->/,ee.html=pe(ee.html,"i").replace("comment",ee._comment).replace("tag",ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ee.paragraph=pe(ee._paragraph).replace("hr",ee.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ee._tag).getRegex(),ee.blockquote=pe(ee.blockquote).replace("paragraph",ee.paragraph).getRegex(),ee.normal=me({},ee),ee.gfm=me({},ee.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*|$)"}),ee.gfm.nptable=pe(ee.gfm.nptable).replace("hr",ee.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ee._tag).getRegex(),ee.gfm.table=pe(ee.gfm.table).replace("hr",ee.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ee._tag).getRegex(),ee.pedantic=me({},ee.normal,{html:pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ee._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ae,paragraph:pe(ee.normal._paragraph).replace("hr",ee.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ae,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:ae,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",re.punctuation=pe(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex(),re._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",re._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",re.em.start=pe(re.em.start).replace(/punctuation/g,re._punctuation).getRegex(),re.em.middle=pe(re.em.middle).replace(/punctuation/g,re._punctuation).replace(/overlapSkip/g,re._overlapSkip).getRegex(),re.em.endAst=pe(re.em.endAst,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.em.endUnd=pe(re.em.endUnd,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.strong.start=pe(re.strong.start).replace(/punctuation/g,re._punctuation).getRegex(),re.strong.middle=pe(re.strong.middle).replace(/punctuation/g,re._punctuation).replace(/blockSkip/g,re._blockSkip).getRegex(),re.strong.endAst=pe(re.strong.endAst,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.strong.endUnd=pe(re.strong.endUnd,"g").replace(/punctuation/g,re._punctuation).getRegex(),re.blockSkip=pe(re._blockSkip,"g").getRegex(),re.overlapSkip=pe(re._overlapSkip,"g").getRegex(),re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,re._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])?)+(?![-_])/,re.autolink=pe(re.autolink).replace("scheme",re._scheme).replace("email",re._email).getRegex(),re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,re.tag=pe(re.tag).replace("comment",ee._comment).replace("attribute",re._attribute).getRegex(),re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,re._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,re.link=pe(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex(),re.reflink=pe(re.reflink).replace("label",re._label).getRegex(),re.reflinkSearch=pe(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex(),re.normal=me({},re),re.pedantic=me({},re.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:pe(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()}),re.gfm=me({},re.normal,{escape:pe(re.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),re.gfm.url=pe(re.gfm.url,"i").replace("email",re.gfm._extended_email).getRegex(),re.breaks=me({},re.gfm,{br:pe(re.br).replace("{2,}","*").getRegex(),text:pe(re.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Z={block:ee,inline:re},ue=d.defaults,V=Z.block,J=Z.inline;function Ce(Ie){return Ie.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function q(Ie){var De="",Le,_e,Te=Ie.length;for(Le=0;Le<Te;Le++)_e=Ie.charCodeAt(Le),Math.random()>.5&&(_e="x"+_e.toString(16)),De+="&#"+_e+";";return De}var H=function(){function Ie(Le){this.tokens=[],this.tokens.links=Object.create(null),this.options=Le||ue,this.options.tokenizer=this.options.tokenizer||new Se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var _e={block:V.normal,inline:J.normal};this.options.pedantic?(_e.block=V.pedantic,_e.inline=J.pedantic):this.options.gfm&&(_e.block=V.gfm,this.options.breaks?_e.inline=J.breaks:_e.inline=J.gfm),this.tokenizer.rules=_e}Ie.lex=function(_e,Te){var ke=new Ie(Te);return ke.lex(_e)};var De=Ie.prototype;return De.lex=function(_e){return _e=_e.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(_e,this.tokens,!0),this.inline(this.tokens),this.tokens},De.blockTokens=function(_e,Te,ke){Te===void 0&&(Te=[]),ke===void 0&&(ke=!0),_e=_e.replace(/^ +$/gm,"");for(var Ae,ze,je,Ze;_e;){if(Ae=this.tokenizer.space(_e)){_e=_e.substring(Ae.raw.length),Ae.type&&Te.push(Ae);continue}if(Ae=this.tokenizer.code(_e,Te)){_e=_e.substring(Ae.raw.length),Ae.type?Te.push(Ae):(Ze=Te[Te.length-1],Ze.raw+=`
`+Ae.raw,Ze.text+=`
`+Ae.text);continue}if(Ae=this.tokenizer.fences(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(Ae=this.tokenizer.heading(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(Ae=this.tokenizer.nptable(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(Ae=this.tokenizer.hr(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(Ae=this.tokenizer.blockquote(_e)){_e=_e.substring(Ae.raw.length),Ae.tokens=this.blockTokens(Ae.text,[],ke),Te.push(Ae);continue}if(Ae=this.tokenizer.list(_e)){for(_e=_e.substring(Ae.raw.length),je=Ae.items.length,ze=0;ze<je;ze++)Ae.items[ze].tokens=this.blockTokens(Ae.items[ze].text,[],!1);Te.push(Ae);continue}if(Ae=this.tokenizer.html(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(ke&&(Ae=this.tokenizer.def(_e))){_e=_e.substring(Ae.raw.length),this.tokens.links[Ae.tag]||(this.tokens.links[Ae.tag]={href:Ae.href,title:Ae.title});continue}if(Ae=this.tokenizer.table(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(Ae=this.tokenizer.lheading(_e)){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(ke&&(Ae=this.tokenizer.paragraph(_e))){_e=_e.substring(Ae.raw.length),Te.push(Ae);continue}if(Ae=this.tokenizer.text(_e,Te)){_e=_e.substring(Ae.raw.length),Ae.type?Te.push(Ae):(Ze=Te[Te.length-1],Ze.raw+=`
`+Ae.raw,Ze.text+=`
`+Ae.text);continue}if(_e){var ht="Infinite loop on byte: "+_e.charCodeAt(0);if(this.options.silent){console.error(ht);break}else throw new Error(ht)}}return Te},De.inline=function(_e){var Te,ke,Ae,ze,je,Ze,ht=_e.length;for(Te=0;Te<ht;Te++){Ze=_e[Te];switch(Ze.type){case"paragraph":case"text":case"heading":{Ze.tokens=[],this.inlineTokens(Ze.text,Ze.tokens);break}case"table":{for(Ze.tokens={header:[],cells:[]},ze=Ze.header.length,ke=0;ke<ze;ke++)Ze.tokens.header[ke]=[],this.inlineTokens(Ze.header[ke],Ze.tokens.header[ke]);for(ze=Ze.cells.length,ke=0;ke<ze;ke++)for(je=Ze.cells[ke],Ze.tokens.cells[ke]=[],Ae=0;Ae<je.length;Ae++)Ze.tokens.cells[ke][Ae]=[],this.inlineTokens(je[Ae],Ze.tokens.cells[ke][Ae]);break}case"blockquote":{this.inline(Ze.tokens);break}case"list":{for(ze=Ze.items.length,ke=0;ke<ze;ke++)this.inline(Ze.items[ke].tokens);break}}}return _e},De.inlineTokens=function(_e,Te,ke,Ae,ze){Te===void 0&&(Te=[]),ke===void 0&&(ke=!1),Ae===void 0&&(Ae=!1),ze===void 0&&(ze="");var je,Ze=_e,ht;if(this.tokens.links){var Tt=Object.keys(this.tokens.links);if(Tt.length>0)for(;(ht=this.tokenizer.rules.inline.reflinkSearch.exec(Ze))!=null;)Tt.includes(ht[0].slice(ht[0].lastIndexOf("[")+1,-1))&&(Ze=Ze.slice(0,ht.index)+"["+"a".repeat(ht[0].length-2)+"]"+Ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ht=this.tokenizer.rules.inline.blockSkip.exec(Ze))!=null;)Ze=Ze.slice(0,ht.index)+"["+"a".repeat(ht[0].length-2)+"]"+Ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;_e;){if(je=this.tokenizer.escape(_e)){_e=_e.substring(je.raw.length),Te.push(je);continue}if(je=this.tokenizer.tag(_e,ke,Ae)){_e=_e.substring(je.raw.length),ke=je.inLink,Ae=je.inRawBlock,Te.push(je);continue}if(je=this.tokenizer.link(_e)){_e=_e.substring(je.raw.length),je.type==="link"&&(je.tokens=this.inlineTokens(je.text,[],!0,Ae)),Te.push(je);continue}if(je=this.tokenizer.reflink(_e,this.tokens.links)){_e=_e.substring(je.raw.length),je.type==="link"&&(je.tokens=this.inlineTokens(je.text,[],!0,Ae)),Te.push(je);continue}if(je=this.tokenizer.strong(_e,Ze,ze)){_e=_e.substring(je.raw.length),je.tokens=this.inlineTokens(je.text,[],ke,Ae),Te.push(je);continue}if(je=this.tokenizer.em(_e,Ze,ze)){_e=_e.substring(je.raw.length),je.tokens=this.inlineTokens(je.text,[],ke,Ae),Te.push(je);continue}if(je=this.tokenizer.codespan(_e)){_e=_e.substring(je.raw.length),Te.push(je);continue}if(je=this.tokenizer.br(_e)){_e=_e.substring(je.raw.length),Te.push(je);continue}if(je=this.tokenizer.del(_e)){_e=_e.substring(je.raw.length),je.tokens=this.inlineTokens(je.text,[],ke,Ae),Te.push(je);continue}if(je=this.tokenizer.autolink(_e,q)){_e=_e.substring(je.raw.length),Te.push(je);continue}if(!ke&&(je=this.tokenizer.url(_e,q))){_e=_e.substring(je.raw.length),Te.push(je);continue}if(je=this.tokenizer.inlineText(_e,Ae,Ce)){_e=_e.substring(je.raw.length),ze=je.raw.slice(-1),Te.push(je);continue}if(_e){var qe="Infinite loop on byte: "+_e.charCodeAt(0);if(this.options.silent){console.error(qe);break}else throw new Error(qe)}}return Te},o(Ie,null,[{key:"rules",get:function(){return{block:V,inline:J}}}]),Ie}(),T=d.defaults,W=U.cleanUrl,we=U.escape,ye=function(){function Ie(Le){this.options=Le||T}var De=Ie.prototype;return De.code=function(_e,Te,ke){var Ae=(Te||"").match(/\S*/)[0];if(this.options.highlight){var ze=this.options.highlight(_e,Ae);ze!=null&&ze!==_e&&(ke=!0,_e=ze)}return Ae?'<pre><code class="'+this.options.langPrefix+we(Ae,!0)+'">'+(ke?_e:we(_e,!0))+`</code></pre>
`:"<pre><code>"+(ke?_e:we(_e,!0))+`</code></pre>
`},De.blockquote=function(_e){return`<blockquote>
`+_e+`</blockquote>
`},De.html=function(_e){return _e},De.heading=function(_e,Te,ke,Ae){return this.options.headerIds?"<h"+Te+' id="'+this.options.headerPrefix+Ae.slug(ke)+'">'+_e+"</h"+Te+`>
`:"<h"+Te+">"+_e+"</h"+Te+`>
`},De.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},De.list=function(_e,Te,ke){var Ae=Te?"ol":"ul",ze=Te&&ke!==1?' start="'+ke+'"':"";return"<"+Ae+ze+`>
`+_e+"</"+Ae+`>
`},De.listitem=function(_e){return"<li>"+_e+`</li>
`},De.checkbox=function(_e){return"<input "+(_e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},De.paragraph=function(_e){return"<p>"+_e+`</p>
`},De.table=function(_e,Te){return Te&&(Te="<tbody>"+Te+"</tbody>"),`<table>
<thead>
`+_e+`</thead>
`+Te+`</table>
`},De.tablerow=function(_e){return`<tr>
`+_e+`</tr>
`},De.tablecell=function(_e,Te){var ke=Te.header?"th":"td",Ae=Te.align?"<"+ke+' align="'+Te.align+'">':"<"+ke+">";return Ae+_e+"</"+ke+`>
`},De.strong=function(_e){return"<strong>"+_e+"</strong>"},De.em=function(_e){return"<em>"+_e+"</em>"},De.codespan=function(_e){return"<code>"+_e+"</code>"},De.br=function(){return this.options.xhtml?"<br/>":"<br>"},De.del=function(_e){return"<del>"+_e+"</del>"},De.link=function(_e,Te,ke){if(_e=W(this.options.sanitize,this.options.baseUrl,_e),_e===null)return ke;var Ae='<a href="'+we(_e)+'"';return Te&&(Ae+=' title="'+Te+'"'),Ae+=">"+ke+"</a>",Ae},De.image=function(_e,Te,ke){if(_e=W(this.options.sanitize,this.options.baseUrl,_e),_e===null)return ke;var Ae='<img src="'+_e+'" alt="'+ke+'"';return Te&&(Ae+=' title="'+Te+'"'),Ae+=this.options.xhtml?"/>":">",Ae},De.text=function(_e){return _e},Ie}(),Oe=function(){function Ie(){}var De=Ie.prototype;return De.strong=function(_e){return _e},De.em=function(_e){return _e},De.codespan=function(_e){return _e},De.del=function(_e){return _e},De.html=function(_e){return _e},De.text=function(_e){return _e},De.link=function(_e,Te,ke){return""+ke},De.image=function(_e,Te,ke){return""+ke},De.br=function(){return""},Ie}(),Be=function(){function Ie(){this.seen={}}var De=Ie.prototype;return De.slug=function(_e){var Te=_e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Te)){var ke=Te;do this.seen[ke]++,Te=ke+"-"+this.seen[ke];while(this.seen.hasOwnProperty(Te))}return this.seen[Te]=0,Te},Ie}(),Fe=d.defaults,Ue=U.unescape,Ge=function(){function Ie(Le){this.options=Le||Fe,this.options.renderer=this.options.renderer||new ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Be}Ie.parse=function(_e,Te){var ke=new Ie(Te);return ke.parse(_e)};var De=Ie.prototype;return De.parse=function(_e,Te){Te===void 0&&(Te=!0);var ke="",Ae,ze,je,Ze,ht,Tt,qe,at,dt,st,St,Ft,Vt,Kt,At,jt,ar,Ct,hr=_e.length;for(Ae=0;Ae<hr;Ae++){st=_e[Ae];switch(st.type){case"space":continue;case"hr":{ke+=this.renderer.hr();continue}case"heading":{ke+=this.renderer.heading(this.parseInline(st.tokens),st.depth,Ue(this.parseInline(st.tokens,this.textRenderer)),this.slugger);continue}case"code":{ke+=this.renderer.code(st.text,st.lang,st.escaped);continue}case"table":{for(at="",qe="",Ze=st.header.length,ze=0;ze<Ze;ze++)qe+=this.renderer.tablecell(this.parseInline(st.tokens.header[ze]),{header:!0,align:st.align[ze]});for(at+=this.renderer.tablerow(qe),dt="",Ze=st.cells.length,ze=0;ze<Ze;ze++){for(Tt=st.tokens.cells[ze],qe="",ht=Tt.length,je=0;je<ht;je++)qe+=this.renderer.tablecell(this.parseInline(Tt[je]),{header:!1,align:st.align[je]});dt+=this.renderer.tablerow(qe)}ke+=this.renderer.table(at,dt);continue}case"blockquote":{dt=this.parse(st.tokens),ke+=this.renderer.blockquote(dt);continue}case"list":{for(St=st.ordered,Ft=st.start,Vt=st.loose,Ze=st.items.length,dt="",ze=0;ze<Ze;ze++)At=st.items[ze],jt=At.checked,ar=At.task,Kt="",At.task&&(Ct=this.renderer.checkbox(jt),Vt?At.tokens.length>0&&At.tokens[0].type==="text"?(At.tokens[0].text=Ct+" "+At.tokens[0].text,At.tokens[0].tokens&&At.tokens[0].tokens.length>0&&At.tokens[0].tokens[0].type==="text"&&(At.tokens[0].tokens[0].text=Ct+" "+At.tokens[0].tokens[0].text)):At.tokens.unshift({type:"text",text:Ct}):Kt+=Ct),Kt+=this.parse(At.tokens,Vt),dt+=this.renderer.listitem(Kt,ar,jt);ke+=this.renderer.list(dt,St,Ft);continue}case"html":{ke+=this.renderer.html(st.text);continue}case"paragraph":{ke+=this.renderer.paragraph(this.parseInline(st.tokens));continue}case"text":{for(dt=st.tokens?this.parseInline(st.tokens):st.text;Ae+1<hr&&_e[Ae+1].type==="text";)st=_e[++Ae],dt+=`
`+(st.tokens?this.parseInline(st.tokens):st.text);ke+=Te?this.renderer.paragraph(dt):dt;continue}default:{var Jt='Token with "'+st.type+'" type was not found.';if(this.options.silent){console.error(Jt);return}else throw new Error(Jt)}}}return ke},De.parseInline=function(_e,Te){Te=Te||this.renderer;var ke="",Ae,ze,je=_e.length;for(Ae=0;Ae<je;Ae++){ze=_e[Ae];switch(ze.type){case"escape":{ke+=Te.text(ze.text);break}case"html":{ke+=Te.html(ze.text);break}case"link":{ke+=Te.link(ze.href,ze.title,this.parseInline(ze.tokens,Te));break}case"image":{ke+=Te.image(ze.href,ze.title,ze.text);break}case"strong":{ke+=Te.strong(this.parseInline(ze.tokens,Te));break}case"em":{ke+=Te.em(this.parseInline(ze.tokens,Te));break}case"codespan":{ke+=Te.codespan(ze.text);break}case"br":{ke+=Te.br();break}case"del":{ke+=Te.del(this.parseInline(ze.tokens,Te));break}case"text":{ke+=Te.text(ze.text);break}default:{var Ze='Token with "'+ze.type+'" type was not found.';if(this.options.silent){console.error(Ze);return}else throw new Error(Ze)}}}return ke},Ie}(),Ye=U.merge,Xe=U.checkSanitizeDeprecation,Je=U.escape,Ne=d.getDefaults,nt=d.changeDefaults,ot=d.defaults;function Ve(Ie,De,Le){if(typeof Ie=="undefined"||Ie===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ie!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ie)+", string expected");if(typeof De=="function"&&(Le=De,De=null),De=Ye({},Ve.defaults,De||{}),Xe(De),Le){var _e=De.highlight,Te;try{Te=H.lex(Ie,De)}catch(je){return Le(je)}var ke=function(Ze){var ht;if(!Ze)try{ht=Ge.parse(Te,De)}catch(Tt){Ze=Tt}return De.highlight=_e,Ze?Le(Ze):Le(null,ht)};if(!_e||_e.length<3)return ke();if(delete De.highlight,!Te.length)return ke();var Ae=0;Ve.walkTokens(Te,function(je){je.type==="code"&&(Ae++,setTimeout(function(){_e(je.text,je.lang,function(Ze,ht){if(Ze)return ke(Ze);ht!=null&&ht!==je.text&&(je.text=ht,je.escaped=!0),Ae--,Ae===0&&ke()})},0))}),Ae===0&&ke();return}try{var ze=H.lex(Ie,De);return De.walkTokens&&Ve.walkTokens(ze,De.walkTokens),Ge.parse(ze,De)}catch(je){if(je.message+=`
Please report this to https://github.com/markedjs/marked.`,De.silent)return"<p>An error occurred:</p><pre>"+Je(je.message+"",!0)+"</pre>";throw je}}Ve.options=Ve.setOptions=function(Ie){return Ye(Ve.defaults,Ie),nt(Ve.defaults),Ve},Ve.getDefaults=Ne,Ve.defaults=ot,Ve.use=function(Ie){var De=Ye({},Ie);if(Ie.renderer&&function(){var _e=Ve.defaults.renderer||new ye,Te=function(ze){var je=_e[ze];_e[ze]=function(){for(var Ze=arguments.length,ht=new Array(Ze),Tt=0;Tt<Ze;Tt++)ht[Tt]=arguments[Tt];var qe=Ie.renderer[ze].apply(_e,ht);return qe===!1&&(qe=je.apply(_e,ht)),qe}};for(var ke in Ie.renderer)Te(ke);De.renderer=_e}(),Ie.tokenizer&&function(){var _e=Ve.defaults.tokenizer||new Se,Te=function(ze){var je=_e[ze];_e[ze]=function(){for(var Ze=arguments.length,ht=new Array(Ze),Tt=0;Tt<Ze;Tt++)ht[Tt]=arguments[Tt];var qe=Ie.tokenizer[ze].apply(_e,ht);return qe===!1&&(qe=je.apply(_e,ht)),qe}};for(var ke in Ie.tokenizer)Te(ke);De.tokenizer=_e}(),Ie.walkTokens){var Le=Ve.defaults.walkTokens;De.walkTokens=function(_e){Ie.walkTokens(_e),Le&&Le(_e)}}Ve.setOptions(De)},Ve.walkTokens=function(Ie,De){for(var Le=b(Ie),_e;!(_e=Le()).done;){var Te=_e.value;De(Te);switch(Te.type){case"table":{for(var ke=b(Te.tokens.header),Ae;!(Ae=ke()).done;){var ze=Ae.value;Ve.walkTokens(ze,De)}for(var je=b(Te.tokens.cells),Ze;!(Ze=je()).done;)for(var ht=Ze.value,Tt=b(ht),qe;!(qe=Tt()).done;){var at=qe.value;Ve.walkTokens(at,De)}break}case"list":{Ve.walkTokens(Te.items,De);break}default:Te.tokens&&Ve.walkTokens(Te.tokens,De)}}},Ve.Parser=Ge,Ve.parser=Ge.parse,Ve.Renderer=ye,Ve.TextRenderer=Oe,Ve.Lexer=H,Ve.lexer=H.lex,Ve.Tokenizer=Se,Ve.Slugger=Be,Ve.parse=Ve;var $e=Ve;return $e})},"DlR+":function(u,G,c){var h=c("MFOe"),o=h.Global,S=h.trim;u.exports={name:"cookieStorage",read:b,write:d,each:p,remove:a,clearAll:s};var E=o.document;function b(i){if(!i||!l(i))return null;var g="(?:^|.*;\\s*)"+escape(i).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(E.cookie.replace(new RegExp(g),"$1"))}function p(i){for(var g=E.cookie.split(/; ?/g),m=g.length-1;m>=0;m--){if(!S(g[m]))continue;var v=g[m].split("="),w=unescape(v[0]),_=unescape(v[1]);i(_,w)}}function d(i,g){if(!i)return;E.cookie=escape(i)+"="+escape(g)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function a(i){if(!i||!l(i))return;E.cookie=escape(i)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function s(){p(function(i,g){a(g)})}function l(i){return new RegExp("(?:^|;\\s*)"+escape(i).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(E.cookie)}},E4JC:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.StreamCipher,b=o.algo,p=[],d=[],a=[],s=b.Rabbit=E.extend({_doReset:function(){for(var i=this._key.words,g=this.cfg.iv,m=0;m<4;m++)i[m]=(i[m]<<8|i[m]>>>24)&16711935|(i[m]<<24|i[m]>>>8)&4278255360;var v=this._X=[i[0],i[3]<<16|i[2]>>>16,i[1],i[0]<<16|i[3]>>>16,i[2],i[1]<<16|i[0]>>>16,i[3],i[2]<<16|i[1]>>>16],w=this._C=[i[2]<<16|i[2]>>>16,i[0]&4294901760|i[1]&65535,i[3]<<16|i[3]>>>16,i[1]&4294901760|i[2]&65535,i[0]<<16|i[0]>>>16,i[2]&4294901760|i[3]&65535,i[1]<<16|i[1]>>>16,i[3]&4294901760|i[0]&65535];this._b=0;for(var m=0;m<4;m++)l.call(this);for(var m=0;m<8;m++)w[m]^=v[m+4&7];if(g){var _=g.words,k=_[0],O=_[1],M=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,I=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,B=M>>>16|I&4294901760,N=I<<16|M&65535;w[0]^=M,w[1]^=B,w[2]^=I,w[3]^=N,w[4]^=M,w[5]^=B,w[6]^=I,w[7]^=N;for(var m=0;m<4;m++)l.call(this)}},_doProcessBlock:function(i,g){var m=this._X;l.call(this),p[0]=m[0]^m[5]>>>16^m[3]<<16,p[1]=m[2]^m[7]>>>16^m[5]<<16,p[2]=m[4]^m[1]>>>16^m[7]<<16,p[3]=m[6]^m[3]>>>16^m[1]<<16;for(var v=0;v<4;v++)p[v]=(p[v]<<8|p[v]>>>24)&16711935|(p[v]<<24|p[v]>>>8)&4278255360,i[g+v]^=p[v]},blockSize:128/32,ivSize:64/32});function l(){for(var i=this._X,g=this._C,m=0;m<8;m++)d[m]=g[m];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<d[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<d[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<d[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<d[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<d[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<d[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<d[6]>>>0?1:0)|0,this._b=g[7]>>>0<d[7]>>>0?1:0;for(var m=0;m<8;m++){var v=i[m]+g[m],w=v&65535,_=v>>>16,k=((w*w>>>17)+w*_>>>15)+_*_,O=((v&4294901760)*v|0)+((v&65535)*v|0);a[m]=k^O}i[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,i[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,i[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,i[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,i[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,i[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,i[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,i[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}o.Rabbit=E._createHelper(s)}(),h.Rabbit})},EHPI:function(u,G,c){"use strict";var h=c("bbsP"),o=c("/wGt"),S=c("tJVT"),E=c("k1fw"),b=c("q1tI"),p=c.n(b),d=c("ZW9T"),a=c("ZD9Y"),s=c("M8RZ"),l=c("bCnd"),i=c("fcyK"),g=c.n(i),m={theme:Object(l.a)("cmCodeMode","vs-dark"),fontSize:Object(l.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(l.a)("cmTabToSpace",!0)},v;(function(k){k[k.set_font_size=0]="set_font_size",k[k.set_theme=1]="set_theme",k[k.on_tab_to_space=2]="on_tab_to_space",k[k.set_show_editor_setting=3]="set_show_editor_setting"})(v||(v={}));function w(k,O){switch(O.type){case v.set_show_editor_setting:return Object(E.a)(Object(E.a)({},k),{},{showEditorSetting:O.payload});case v.set_theme:return Object(E.a)(Object(E.a)({},k),{},{theme:O.payload});case v.set_font_size:return Object(E.a)(Object(E.a)({},k),{},{fontSize:O.payload});case v.on_tab_to_space:return Object(E.a)(Object(E.a)({},k),{},{tabToSpace:O.payload});default:throw new Error}}G.a=function(k){var O=k.value,M=k.onChange,I=k.language,B=k.ActionBarRender,N=B===void 0?function(j){return p.a.createElement(_,{onShowCodeSetting:j})}:B,y=Object(b.useReducer)(w,m),Y=Object(S.a)(y,2),X=Y[0],P=Y[1],F=X.theme,K=X.fontSize,Q=X.showEditorSetting,ce=X.tabToSpace,fe={onFontSizeChange:function(U){P({type:v.set_font_size,payload:U}),Object(l.b)("cmFontSize",U)},tabToSpace:ce,cmFontSize:K,className:"oj",cmCodeMode:F,onTabToSpace:function(U){P({type:v.on_tab_to_space,payload:U}),Object(l.b)("cmTabToSpace",U)},onCodeModeChange:function(U){P({type:v.set_theme,payload:U}),Object(l.b)("cmCodeMode",U)}};function z(){P({type:v.set_show_editor_setting,payload:!1})}function se(){P({type:v.set_show_editor_setting,payload:!0})}var $={value:O,language:I,onChange:M,theme:F,height:"calc(100% - 56px)",options:{fontSize:K,insertSpaces:ce}};return p.a.createElement(b.Fragment,null,p.a.createElement("div",{className:"code-panel-container"},N(se),p.a.createElement(d.b,$)),p.a.createElement(s.a,null,p.a.createElement(o.a,{className:"oj",title:null,placement:"right",closable:!1,visible:Q,onClose:z},p.a.createElement(a.a,fe))))};function _(k){var O=k.onShowCodeSetting;return p.a.createElement("div",{className:"action-bar"},p.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),p.a.createElement("a",{onClick:O},p.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(u,G,c){(function(h){h(c("VrN/"))})(function(h){var o={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=h.Pos;h.defineOption("autoCloseBrackets",!1,function(w,_,k){k&&k!=h.Init&&(w.removeKeyMap(b),w.state.closeBrackets=null),_&&(p(E(_,"pairs")),w.state.closeBrackets=_,w.addKeyMap(b))});function E(w,_){return _=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[_]!=null?w[_]:o[_]}var b={Backspace:s,Enter:l};function p(w){for(var _=0;_<w.length;_++){var k=w.charAt(_),O="'"+k+"'";b[O]||(b[O]=d(k))}}p(o.pairs+"`");function d(w){return function(_){return g(_,w)}}function a(w){var _=w.state.closeBrackets;if(!_||_.override)return _;var k=w.getModeAt(w.getCursor());return k.closeBrackets||_}function s(w){var _=a(w);if(!_||w.getOption("disableInput"))return h.Pass;for(var k=E(_,"pairs"),O=w.listSelections(),M=0;M<O.length;M++){if(!O[M].empty())return h.Pass;var I=m(w,O[M].head);if(!I||k.indexOf(I)%2!=0)return h.Pass}for(var M=O.length-1;M>=0;M--){var B=O[M].head;w.replaceRange("",S(B.line,B.ch-1),S(B.line,B.ch+1),"+delete")}}function l(w){var _=a(w),k=_&&E(_,"explode");if(!k||w.getOption("disableInput"))return h.Pass;for(var O=w.listSelections(),M=0;M<O.length;M++){if(!O[M].empty())return h.Pass;var I=m(w,O[M].head);if(!I||k.indexOf(I)%2!=0)return h.Pass}w.operation(function(){var B=w.lineSeparator()||`
`;w.replaceSelection(B+B,null),w.execCommand("goCharLeft"),O=w.listSelections();for(var N=0;N<O.length;N++){var y=O[N].head.line;w.indentLine(y,null,!0),w.indentLine(y+1,null,!0)}})}function i(w){var _=h.cmpPos(w.anchor,w.head)>0;return{anchor:new S(w.anchor.line,w.anchor.ch+(_?-1:1)),head:new S(w.head.line,w.head.ch+(_?1:-1))}}function g(w,_){var k=a(w);if(!k||w.getOption("disableInput"))return h.Pass;var O=E(k,"pairs"),M=O.indexOf(_);if(M==-1)return h.Pass;for(var I=E(k,"closeBefore"),B=E(k,"triples"),N=O.charAt(M+1)==_,y=w.listSelections(),Y=M%2==0,X,P=0;P<y.length;P++){var F=y[P],K=F.head,Q,ce=w.getRange(K,S(K.line,K.ch+1));if(Y&&!F.empty())Q="surround";else if((N||!Y)&&ce==_)N&&v(w,K)?Q="both":B.indexOf(_)>=0&&w.getRange(K,S(K.line,K.ch+3))==_+_+_?Q="skipThree":Q="skip";else if(N&&K.ch>1&&B.indexOf(_)>=0&&w.getRange(S(K.line,K.ch-2),K)==_+_){if(K.ch>2&&/\bstring/.test(w.getTokenTypeAt(S(K.line,K.ch-2))))return h.Pass;Q="addFour"}else if(N){var fe=K.ch==0?" ":w.getRange(S(K.line,K.ch-1),K);if(!h.isWordChar(ce)&&fe!=_&&!h.isWordChar(fe))Q="both";else return h.Pass}else if(Y&&(ce.length===0||/\s/.test(ce)||I.indexOf(ce)>-1))Q="both";else return h.Pass;if(!X)X=Q;else if(X!=Q)return h.Pass}var z=M%2?O.charAt(M-1):_,se=M%2?_:O.charAt(M+1);w.operation(function(){if(X=="skip")w.execCommand("goCharRight");else if(X=="skipThree")for(var $=0;$<3;$++)w.execCommand("goCharRight");else if(X=="surround"){for(var j=w.getSelections(),$=0;$<j.length;$++)j[$]=z+j[$]+se;w.replaceSelections(j,"around"),j=w.listSelections().slice();for(var $=0;$<j.length;$++)j[$]=i(j[$]);w.setSelections(j)}else X=="both"?(w.replaceSelection(z+se,null),w.triggerElectric(z+se),w.execCommand("goCharLeft")):X=="addFour"&&(w.replaceSelection(z+z+z+z,"before"),w.execCommand("goCharRight"))})}function m(w,_){var k=w.getRange(S(_.line,_.ch-1),S(_.line,_.ch+1));return k.length==2?k:null}function v(w,_){var k=w.getTokenAt(S(_.line,_.ch+1));return/\bstring/.test(k.type)&&k.start==_.ch&&(_.ch==0||!/\bstring/.test(w.getTokenTypeAt(_)))}})},ELcG:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){/** @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.
*/return function(o){var S=h,E=S.lib,b=E.WordArray,p=E.Hasher,d=S.algo,a=b.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]),s=b.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]),l=b.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]),i=b.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]),g=b.create([0,1518500249,1859775393,2400959708,2840853838]),m=b.create([1352829926,1548603684,1836072691,2053994217,0]),v=d.RIPEMD160=p.extend({_doReset:function(){this._hash=b.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(B,N){for(var y=0;y<16;y++){var Y=N+y,X=B[Y];B[Y]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360}var P=this._hash.words,F=g.words,K=m.words,Q=a.words,ce=s.words,fe=l.words,z=i.words,se,$,j,U,R,C,D,le,he,ve;C=se=P[0],D=$=P[1],le=j=P[2],he=U=P[3],ve=R=P[4];for(var Ee,y=0;y<80;y+=1)Ee=se+B[N+Q[y]]|0,y<16?Ee+=w($,j,U)+F[0]:y<32?Ee+=_($,j,U)+F[1]:y<48?Ee+=k($,j,U)+F[2]:y<64?Ee+=O($,j,U)+F[3]:Ee+=M($,j,U)+F[4],Ee=Ee|0,Ee=I(Ee,fe[y]),Ee=Ee+R|0,se=R,R=U,U=I(j,10),j=$,$=Ee,Ee=C+B[N+ce[y]]|0,y<16?Ee+=M(D,le,he)+K[0]:y<32?Ee+=O(D,le,he)+K[1]:y<48?Ee+=k(D,le,he)+K[2]:y<64?Ee+=_(D,le,he)+K[3]:Ee+=w(D,le,he)+K[4],Ee=Ee|0,Ee=I(Ee,z[y]),Ee=Ee+ve|0,C=ve,ve=he,he=I(le,10),le=D,D=Ee;Ee=P[1]+j+he|0,P[1]=P[2]+U+ve|0,P[2]=P[3]+R+C|0,P[3]=P[4]+se+D|0,P[4]=P[0]+$+le|0,P[0]=Ee},_doFinalize:function(){var B=this._data,N=B.words,y=this._nDataBytes*8,Y=B.sigBytes*8;N[Y>>>5]|=128<<24-Y%32,N[(Y+64>>>9<<4)+14]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,B.sigBytes=(N.length+1)*4,this._process();for(var X=this._hash,P=X.words,F=0;F<5;F++){var K=P[F];P[F]=(K<<8|K>>>24)&16711935|(K<<24|K>>>8)&4278255360}return X},clone:function(){var B=p.clone.call(this);return B._hash=this._hash.clone(),B}});function w(B,N,y){return B^N^y}function _(B,N,y){return B&N|~B&y}function k(B,N,y){return(B|~N)^y}function O(B,N,y){return B&y|N&~y}function M(B,N,y){return B^(N|~y)}function I(B,N){return B<<N|B>>>32-N}S.RIPEMD160=p._createHelper(v),S.HmacRIPEMD160=p._createHmacHelper(v)}(Math),h.RIPEMD160})},ETIr:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.WordArray,b=o.enc,p=b.Base64={stringify:function(a){var s=a.words,l=a.sigBytes,i=this._map;a.clamp();for(var g=[],m=0;m<l;m+=3)for(var v=s[m>>>2]>>>24-m%4*8&255,w=s[m+1>>>2]>>>24-(m+1)%4*8&255,_=s[m+2>>>2]>>>24-(m+2)%4*8&255,k=v<<16|w<<8|_,O=0;O<4&&m+O*.75<l;O++)g.push(i.charAt(k>>>6*(3-O)&63));var M=i.charAt(64);if(M)for(;g.length%4;)g.push(M);return g.join("")},parse:function(a){var s=a.length,l=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var g=0;g<l.length;g++)i[l.charCodeAt(g)]=g}var m=l.charAt(64);if(m){var v=a.indexOf(m);v!==-1&&(s=v)}return d(a,s,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(a,s,l){for(var i=[],g=0,m=0;m<s;m++)if(m%4){var v=l[a.charCodeAt(m-1)]<<m%4*2,w=l[a.charCodeAt(m)]>>>6-m%4*2,_=v|w;i[g>>>2]|=_<<24-g%4*8,g++}return E.create(i,g)}}(),h.enc.Base64})},"F+F2":function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(){if(typeof ArrayBuffer!="function")return;var o=h,S=o.lib,E=S.WordArray,b=E.init,p=E.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var a=d.byteLength,s=[],l=0;l<a;l++)s[l>>>2]|=d[l]<<24-l%4*8;b.call(this,s,a)}else b.apply(this,arguments)};p.prototype=E}(),h.lib.WordArray})},GRuw:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("lPiR"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.WordArray,b=o.algo,p=b.SHA256,d=b.SHA224=p.extend({_doReset:function(){this._hash=new E.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=p._doFinalize.call(this);return a.sigBytes-=4,a}});o.SHA224=p._createHelper(d),o.HmacSHA224=p._createHmacHelper(d)}(),h.SHA224})},GfqC:function(u,G,c){"use strict";var h=c("q1tI"),o=c.n(h),S=c("TSYQ"),E=c.n(S);function b(U,R){var C="cannot "+U.method+" "+U.action+" "+R.status+"'",D=new Error(C);return D.status=R.status,D.method=U.method,D.url=U.action,D}function p(U){var R=U.responseText||U.response;if(!R)return R;try{return JSON.parse(R)}catch(C){return R}}function d(U){var R=new XMLHttpRequest;U.onProgress&&R.upload&&(R.upload.onprogress=function(he){he.total>0&&(he.percent=he.loaded/he.total*100),U.onProgress(he)});var C=new FormData;U.data&&Object.keys(U.data).forEach(function(le){var he=U.data[le];if(Array.isArray(he)){he.forEach(function(ve){C.append(le+"[]",ve)});return}C.append(le,U.data[le])}),U.file instanceof Blob?C.append(U.filename,U.file,U.file.name):C.append(U.filename,U.file),R.onerror=function(he){U.onError(he)},R.onload=function(){return R.status<200||R.status>=300?U.onError(b(U,R),p(R)):U.onSuccess(p(R),R)},R.open(U.method,U.action,!0),U.withCredentials&&"withCredentials"in R&&(R.withCredentials=!0);var D=U.headers||{};return D["X-Requested-With"]!==null&&R.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(D).forEach(function(le){D[le]!==null&&R.setRequestHeader(le,D[le])}),R.send(C),{abort:function(){R.abort()}}}var a=+new Date,s=0;function l(){return"rc-upload-"+a+"-"+ ++s}function i(U,R){return U.indexOf(R,U.length-R.length)!==-1}var g=function(U,R){if(U&&R){var C=Array.isArray(R)?R:R.split(","),D=U.name||"",le=U.type||"",he=le.replace(/\/.*$/,"");return C.some(function(ve){var Ee=ve.trim();return Ee.charAt(0)==="."?i(D.toLowerCase(),Ee.toLowerCase()):/\/\*$/.test(Ee)?he===Ee.replace(/\/.*$/,""):le===Ee})}return!0};function m(U,R){var C=U.createReader(),D=[];function le(){C.readEntries(function(he){var ve=Array.prototype.slice.apply(he);D=D.concat(ve);var Ee=!ve.length;Ee?R(D):le()})}le()}var v=function(R,C,D){var le=function he(ve,Ee){Ee=Ee||"",ve.isFile?ve.file(function(Se){D(Se)&&(ve.fullPath&&!Se.webkitRelativePath&&(Object.defineProperties(Se,{webkitRelativePath:{writable:!0}}),Se.webkitRelativePath=ve.fullPath.replace(/^\//,""),Object.defineProperties(Se,{webkitRelativePath:{writable:!1}})),C([Se]))}):ve.isDirectory&&m(ve,function(Se){Se.forEach(function(ae){he(ae,""+Ee+ve.name+"/")})})};R.forEach(function(he){le(he.webkitGetAsEntry())})},w=v,_=Object.assign||function(U){for(var R=1;R<arguments.length;R++){var C=arguments[R];for(var D in C)Object.prototype.hasOwnProperty.call(C,D)&&(U[D]=C[D])}return U},k=function(){function U(R,C){var D=[],le=!0,he=!1,ve=void 0;try{for(var Ee=R[Symbol.iterator](),Se;!(le=(Se=Ee.next()).done)&&!(D.push(Se.value),C&&D.length===C);le=!0);}catch(ae){he=!0,ve=ae}finally{try{!le&&Ee.return&&Ee.return()}finally{if(he)throw ve}}return D}return function(R,C){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return U(R,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function U(R,C){for(var D=0;D<C.length;D++){var le=C[D];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(R,le.key,le)}}return function(R,C,D){return C&&U(R.prototype,C),D&&U(R,D),R}}();function M(U,R,C){return R in U?Object.defineProperty(U,R,{value:C,enumerable:!0,configurable:!0,writable:!0}):U[R]=C,U}function I(U,R){var C={};for(var D in U){if(R.indexOf(D)>=0)continue;if(!Object.prototype.hasOwnProperty.call(U,D))continue;C[D]=U[D]}return C}function B(U,R){if(!(U instanceof R))throw new TypeError("Cannot call a class as a function")}function N(U,R){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:U}function y(U,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);U.prototype=Object.create(R&&R.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(U,R):U.__proto__=R)}var Y=function(R){return Object.keys(R).reduce(function(C,D){return(D.substr(0,5)==="data-"||D.substr(0,5)==="aria-"||D==="role")&&(C[D]=R[D]),C},{})},X=function(U){y(R,U);function R(){var C,D,le,he;B(this,R);for(var ve=arguments.length,Ee=Array(ve),Se=0;Se<ve;Se++)Ee[Se]=arguments[Se];return he=(D=(le=N(this,(C=R.__proto__||Object.getPrototypeOf(R)).call.apply(C,[this].concat(Ee))),le),le.state={uid:l()},le.reqs={},le.onChange=function(ae){var pe=ae.target.files;le.uploadFiles(pe),le.reset()},le.onClick=function(ae){var pe=le.fileInput;if(!pe)return;var me=le.props,ee=me.children,re=me.onClick;ee&&ee.type==="button"&&(pe.parentNode.focus(),pe.parentNode.querySelector("button").blur()),pe.click(),re&&re(ae)},le.onKeyDown=function(ae){ae.key==="Enter"&&le.onClick()},le.onFileDrop=function(ae){var pe=le.props.multiple;if(ae.preventDefault(),ae.type==="dragover")return;if(le.props.directory)w(Array.prototype.slice.call(ae.dataTransfer.items),le.uploadFiles,function(ee){return g(ee,le.props.accept)});else{var me=Array.prototype.slice.call(ae.dataTransfer.files).filter(function(ee){return g(ee,le.props.accept)});pe===!1&&(me=me.slice(0,1)),le.uploadFiles(me)}},le.uploadFiles=function(ae){var pe=Array.prototype.slice.call(ae);pe.map(function(me){return me.uid=l(),me}).forEach(function(me){le.upload(me,pe)})},le.saveFileInput=function(ae){le.fileInput=ae},D),N(le,he)}return O(R,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(D,le){var he=this,ve=this.props;if(!ve.beforeUpload)return setTimeout(function(){return he.post(D)},0);var Ee=ve.beforeUpload(D,le);Ee&&Ee.then?Ee.then(function(Se){var ae=Object.prototype.toString.call(Se);return ae==="[object File]"||ae==="[object Blob]"?he.post(Se):he.post(D)}).catch(function(Se){console.log(Se)}):Ee!==!1&&setTimeout(function(){return he.post(D)},0);return}},{key:"post",value:function(D){var le=this;if(!this._isMounted)return;var he=this.props,ve=he.onStart,Ee=he.onProgress,Se=he.transformFile,ae=Se===void 0?function(pe){return pe}:Se;new Promise(function(pe){var me=he.action;return typeof me=="function"&&(me=me(D)),pe(me)}).then(function(pe){var me=D.uid,ee=he.customRequest||d,re=Promise.resolve(ae(D)).then(function(Z){var ue=he.data;return typeof ue=="function"&&(ue=ue(Z)),Promise.all([Z,ue])}).catch(function(Z){console.error(Z)});re.then(function(Z){var ue=k(Z,2),V=ue[0],J=ue[1],Ce={action:pe,filename:he.name,data:J,file:V,headers:he.headers,withCredentials:he.withCredentials,method:he.method||"post",onProgress:Ee?function(q){Ee(q,D)}:null,onSuccess:function(H,T){delete le.reqs[me],he.onSuccess(H,D,T)},onError:function(H,T){delete le.reqs[me],he.onError(H,T,D)}};ve(D),le.reqs[me]=ee(Ce)})})}},{key:"reset",value:function(){this.setState({uid:l()})}},{key:"abort",value:function(D){var le=this.reqs;if(D){var he=D;D&&D.uid&&(he=D.uid),le[he]&&le[he].abort&&le[he].abort(),delete le[he]}else Object.keys(le).forEach(function(ve){le[ve]&&le[ve].abort&&le[ve].abort(),delete le[ve]})}},{key:"render",value:function(){var D,le=this.props,he=le.component,ve=le.prefixCls,Ee=le.className,Se=le.disabled,ae=le.id,pe=le.style,me=le.multiple,ee=le.accept,re=le.children,Z=le.directory,ue=le.openFileDialogOnClick,V=le.onMouseEnter,J=le.onMouseLeave,Ce=I(le,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),q=E()((D={},M(D,ve,!0),M(D,ve+"-disabled",Se),M(D,Ee,Ee),D)),H=Se?{}:{onClick:ue?this.onClick:function(){},onKeyDown:ue?this.onKeyDown:function(){},onMouseEnter:V,onMouseLeave:J,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return o.a.createElement(he,_({},H,{className:q,role:"button",style:pe}),o.a.createElement("input",_({},Y(Ce),{id:ae,type:"file",ref:this.saveFileInput,onClick:function(W){return W.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ee,directory:Z?"directory":null,webkitdirectory:Z?"webkitdirectory":null,multiple:me,onChange:this.onChange})),re)}}]),R}(h.Component),P=X,F=Object.assign||function(U){for(var R=1;R<arguments.length;R++){var C=arguments[R];for(var D in C)Object.prototype.hasOwnProperty.call(C,D)&&(U[D]=C[D])}return U},K=function(){function U(R,C){for(var D=0;D<C.length;D++){var le=C[D];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(R,le.key,le)}}return function(R,C,D){return C&&U(R.prototype,C),D&&U(R,D),R}}();function Q(U,R){if(!(U instanceof R))throw new TypeError("Cannot call a class as a function")}function ce(U,R){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:U}function fe(U,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);U.prototype=Object.create(R&&R.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(U,R):U.__proto__=R)}function z(){}var se=function(U){fe(R,U);function R(){var C,D,le,he;Q(this,R);for(var ve=arguments.length,Ee=Array(ve),Se=0;Se<ve;Se++)Ee[Se]=arguments[Se];return he=(D=(le=ce(this,(C=R.__proto__||Object.getPrototypeOf(R)).call.apply(C,[this].concat(Ee))),le),le.saveUploader=function(ae){le.uploader=ae},D),ce(le,he)}return K(R,[{key:"abort",value:function(D){this.uploader.abort(D)}},{key:"render",value:function(){return o.a.createElement(P,F({},this.props,{ref:this.saveUploader}))}}]),R}(h.Component);se.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:z,onError:z,onSuccess:z,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var $=se,j=G.a=$},Gytx:function(u,G){u.exports=function(h,o,S,E){var b=S?S.call(E,h,o):void 0;if(b!==void 0)return!!b;if(h===o)return!0;if(typeof h!="object"||!h||typeof o!="object"||!o)return!1;var p=Object.keys(h),d=Object.keys(o);if(p.length!==d.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(o),s=0;s<p.length;s++){var l=p[s];if(!a(l))return!1;var i=h[l],g=o[l];if(b=S?S.call(E,i,g,l):void 0,b===!1||b===void 0&&i!==g)return!1}return!0}},H38U:function(u,G,c){var h=c("f4xo"),o=c("rcnY"),S=c("wU8J"),E=c("Iq15"),b=c("dWSS");function p(a,s){this.typeNumber=a,this.errorCorrectLevel=s,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var d=p.prototype;d.addData=function(a){var s=new h(a);this.dataList.push(s),this.dataCache=null},d.isDark=function(a,s){if(a<0||this.moduleCount<=a||s<0||this.moduleCount<=s)throw new Error(a+","+s);return this.modules[a][s]},d.getModuleCount=function(){return this.moduleCount},d.make=function(){if(this.typeNumber<1){var a=1;for(a=1;a<40;a++){for(var s=o.getRSBlocks(a,this.errorCorrectLevel),l=new S,i=0,g=0;g<s.length;g++)i+=s[g].dataCount;for(var g=0;g<this.dataList.length;g++){var m=this.dataList[g];l.put(m.mode,4),l.put(m.getLength(),E.getLengthInBits(m.mode,a)),m.write(l)}if(l.getLengthInBits()<=i*8)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},d.makeImpl=function(a,s){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var l=0;l<this.moduleCount;l++){this.modules[l]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[l][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,s),this.typeNumber>=7&&this.setupTypeNumber(a),this.dataCache==null&&(this.dataCache=p.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,s)},d.setupPositionProbePattern=function(a,s){for(var l=-1;l<=7;l++){if(a+l<=-1||this.moduleCount<=a+l)continue;for(var i=-1;i<=7;i++){if(s+i<=-1||this.moduleCount<=s+i)continue;0<=l&&l<=6&&(i==0||i==6)||0<=i&&i<=6&&(l==0||l==6)||2<=l&&l<=4&&2<=i&&i<=4?this.modules[a+l][s+i]=!0:this.modules[a+l][s+i]=!1}}},d.getBestMaskPattern=function(){for(var a=0,s=0,l=0;l<8;l++){this.makeImpl(!0,l);var i=E.getLostPoint(this);(l==0||a>i)&&(a=i,s=l)}return s},d.createMovieClip=function(a,s,l){var i=a.createEmptyMovieClip(s,l),g=1;this.make();for(var m=0;m<this.modules.length;m++)for(var v=m*g,w=0;w<this.modules[m].length;w++){var _=w*g,k=this.modules[m][w];k&&(i.beginFill(0,100),i.moveTo(_,v),i.lineTo(_+g,v),i.lineTo(_+g,v+g),i.lineTo(_,v+g),i.endFill())}return i},d.setupTimingPattern=function(){for(var a=8;a<this.moduleCount-8;a++){if(this.modules[a][6]!=null)continue;this.modules[a][6]=a%2==0}for(var s=8;s<this.moduleCount-8;s++){if(this.modules[6][s]!=null)continue;this.modules[6][s]=s%2==0}},d.setupPositionAdjustPattern=function(){for(var a=E.getPatternPosition(this.typeNumber),s=0;s<a.length;s++)for(var l=0;l<a.length;l++){var i=a[s],g=a[l];if(this.modules[i][g]!=null)continue;for(var m=-2;m<=2;m++)for(var v=-2;v<=2;v++)m==-2||m==2||v==-2||v==2||m==0&&v==0?this.modules[i+m][g+v]=!0:this.modules[i+m][g+v]=!1}},d.setupTypeNumber=function(a){for(var s=E.getBCHTypeNumber(this.typeNumber),l=0;l<18;l++){var i=!a&&(s>>l&1)==1;this.modules[Math.floor(l/3)][l%3+this.moduleCount-8-3]=i}for(var l=0;l<18;l++){var i=!a&&(s>>l&1)==1;this.modules[l%3+this.moduleCount-8-3][Math.floor(l/3)]=i}},d.setupTypeInfo=function(a,s){for(var l=this.errorCorrectLevel<<3|s,i=E.getBCHTypeInfo(l),g=0;g<15;g++){var m=!a&&(i>>g&1)==1;g<6?this.modules[g][8]=m:g<8?this.modules[g+1][8]=m:this.modules[this.moduleCount-15+g][8]=m}for(var g=0;g<15;g++){var m=!a&&(i>>g&1)==1;g<8?this.modules[8][this.moduleCount-g-1]=m:g<9?this.modules[8][15-g-1+1]=m:this.modules[8][15-g-1]=m}this.modules[this.moduleCount-8][8]=!a},d.mapData=function(a,s){for(var l=-1,i=this.moduleCount-1,g=7,m=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var w=0;w<2;w++)if(this.modules[i][v-w]==null){var _=!1;m<a.length&&(_=(a[m]>>>g&1)==1);var k=E.getMask(s,i,v-w);k&&(_=!_),this.modules[i][v-w]=_,g--,g==-1&&(m++,g=7)}if(i+=l,i<0||this.moduleCount<=i){i-=l,l=-l;break}}},p.PAD0=236,p.PAD1=17,p.createData=function(a,s,l){for(var i=o.getRSBlocks(a,s),g=new S,m=0;m<l.length;m++){var v=l[m];g.put(v.mode,4),g.put(v.getLength(),E.getLengthInBits(v.mode,a)),v.write(g)}for(var w=0,m=0;m<i.length;m++)w+=i[m].dataCount;if(g.getLengthInBits()>w*8)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+w*8+")");for(g.getLengthInBits()+4<=w*8&&g.put(0,4);g.getLengthInBits()%8!=0;)g.putBit(!1);for(;!(g.getLengthInBits()>=w*8);){if(g.put(p.PAD0,8),g.getLengthInBits()>=w*8)break;g.put(p.PAD1,8)}return p.createBytes(g,i)},p.createBytes=function(a,s){for(var l=0,i=0,g=0,m=new Array(s.length),v=new Array(s.length),w=0;w<s.length;w++){var _=s[w].dataCount,k=s[w].totalCount-_;i=Math.max(i,_),g=Math.max(g,k),m[w]=new Array(_);for(var O=0;O<m[w].length;O++)m[w][O]=255&a.buffer[O+l];l+=_;var M=E.getErrorCorrectPolynomial(k),I=new b(m[w],M.getLength()-1),B=I.mod(M);v[w]=new Array(M.getLength()-1);for(var O=0;O<v[w].length;O++){var N=O+B.getLength()-v[w].length;v[w][O]=N>=0?B.get(N):0}}for(var y=0,O=0;O<s.length;O++)y+=s[O].totalCount;for(var Y=new Array(y),X=0,O=0;O<i;O++)for(var w=0;w<s.length;w++)O<m[w].length&&(Y[X++]=m[w][O]);for(var O=0;O<g;O++)for(var w=0;w<s.length;w++)O<v[w].length&&(Y[X++]=v[w][O]);return Y},u.exports=p},HmJG:function(u,G,c){},Ib8C:function(u,G,c){(function(h){(function(o,S){u.exports=G=S()})(this,function(){var o=o||function(S,E){var b;if(typeof window!="undefined"&&window.crypto&&(b=window.crypto),typeof self!="undefined"&&self.crypto&&(b=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(b=globalThis.crypto),!b&&typeof window!="undefined"&&window.msCrypto&&(b=window.msCrypto),!b&&typeof h!="undefined"&&h.crypto&&(b=h.crypto),!b&&!0)try{b=c(4)}catch(M){}var p=function(){if(b){if(typeof b.getRandomValues=="function")try{return b.getRandomValues(new Uint32Array(1))[0]}catch(M){}if(typeof b.randomBytes=="function")try{return b.randomBytes(4).readInt32LE()}catch(M){}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function M(){}return function(I){var B;return M.prototype=I,B=new M,M.prototype=null,B}}(),a={},s=a.lib={},l=s.Base=function(){return{extend:function(M){var I=d(this);return M&&I.mixIn(M),(!I.hasOwnProperty("init")||this.init===I.init)&&(I.init=function(){I.$super.init.apply(this,arguments)}),I.init.prototype=I,I.$super=this,I},create:function(){var M=this.extend();return M.init.apply(M,arguments),M},init:function(){},mixIn:function(M){for(var I in M)M.hasOwnProperty(I)&&(this[I]=M[I]);M.hasOwnProperty("toString")&&(this.toString=M.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),i=s.WordArray=l.extend({init:function(M,I){M=this.words=M||[],I!=E?this.sigBytes=I:this.sigBytes=M.length*4},toString:function(M){return(M||m).stringify(this)},concat:function(M){var I=this.words,B=M.words,N=this.sigBytes,y=M.sigBytes;if(this.clamp(),N%4)for(var Y=0;Y<y;Y++){var X=B[Y>>>2]>>>24-Y%4*8&255;I[N+Y>>>2]|=X<<24-(N+Y)%4*8}else for(var P=0;P<y;P+=4)I[N+P>>>2]=B[P>>>2];return this.sigBytes+=y,this},clamp:function(){var M=this.words,I=this.sigBytes;M[I>>>2]&=4294967295<<32-I%4*8,M.length=S.ceil(I/4)},clone:function(){var M=l.clone.call(this);return M.words=this.words.slice(0),M},random:function(M){for(var I=[],B=0;B<M;B+=4)I.push(p());return new i.init(I,M)}}),g=a.enc={},m=g.Hex={stringify:function(M){for(var I=M.words,B=M.sigBytes,N=[],y=0;y<B;y++){var Y=I[y>>>2]>>>24-y%4*8&255;N.push((Y>>>4).toString(16)),N.push((Y&15).toString(16))}return N.join("")},parse:function(M){for(var I=M.length,B=[],N=0;N<I;N+=2)B[N>>>3]|=parseInt(M.substr(N,2),16)<<24-N%8*4;return new i.init(B,I/2)}},v=g.Latin1={stringify:function(M){for(var I=M.words,B=M.sigBytes,N=[],y=0;y<B;y++){var Y=I[y>>>2]>>>24-y%4*8&255;N.push(String.fromCharCode(Y))}return N.join("")},parse:function(M){for(var I=M.length,B=[],N=0;N<I;N++)B[N>>>2]|=(M.charCodeAt(N)&255)<<24-N%4*8;return new i.init(B,I)}},w=g.Utf8={stringify:function(M){try{return decodeURIComponent(escape(v.stringify(M)))}catch(I){throw new Error("Malformed UTF-8 data")}},parse:function(M){return v.parse(unescape(encodeURIComponent(M)))}},_=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new i.init,this._nDataBytes=0},_append:function(M){typeof M=="string"&&(M=w.parse(M)),this._data.concat(M),this._nDataBytes+=M.sigBytes},_process:function(M){var I,B=this._data,N=B.words,y=B.sigBytes,Y=this.blockSize,X=Y*4,P=y/X;M?P=S.ceil(P):P=S.max((P|0)-this._minBufferSize,0);var F=P*Y,K=S.min(F*4,y);if(F){for(var Q=0;Q<F;Q+=Y)this._doProcessBlock(N,Q);I=N.splice(0,F),B.sigBytes-=K}return new i.init(I,K)},clone:function(){var M=l.clone.call(this);return M._data=this._data.clone(),M},_minBufferSize:0}),k=s.Hasher=_.extend({cfg:l.extend(),init:function(M){this.cfg=this.cfg.extend(M),this.reset()},reset:function(){_.reset.call(this),this._doReset()},update:function(M){return this._append(M),this._process(),this},finalize:function(M){M&&this._append(M);var I=this._doFinalize();return I},blockSize:512/32,_createHelper:function(M){return function(I,B){return new M.init(B).finalize(I)}},_createHmacHelper:function(M){return function(I,B){return new O.HMAC.init(M,B).finalize(I)}}}),O=a.algo={};return a}(Math);return o})}).call(this,c("IyRk"))},Iq15:function(u,G,c){var h=c("nVVt"),o=c("dWSS"),S=c("dQei"),E={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},b={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,G18:1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,G15_MASK:1<<14|1<<12|1<<10|1<<4|1<<1,getBCHTypeInfo:function(p){for(var d=p<<10;b.getBCHDigit(d)-b.getBCHDigit(b.G15)>=0;)d^=b.G15<<b.getBCHDigit(d)-b.getBCHDigit(b.G15);return(p<<10|d)^b.G15_MASK},getBCHTypeNumber:function(p){for(var d=p<<12;b.getBCHDigit(d)-b.getBCHDigit(b.G18)>=0;)d^=b.G18<<b.getBCHDigit(d)-b.getBCHDigit(b.G18);return p<<12|d},getBCHDigit:function(p){for(var d=0;p!=0;)d++,p>>>=1;return d},getPatternPosition:function(p){return b.PATTERN_POSITION_TABLE[p-1]},getMask:function(p,d,a){switch(p){case E.PATTERN000:return(d+a)%2==0;case E.PATTERN001:return d%2==0;case E.PATTERN010:return a%3==0;case E.PATTERN011:return(d+a)%3==0;case E.PATTERN100:return(Math.floor(d/2)+Math.floor(a/3))%2==0;case E.PATTERN101:return d*a%2+d*a%3==0;case E.PATTERN110:return(d*a%2+d*a%3)%2==0;case E.PATTERN111:return(d*a%3+(d+a)%2)%2==0;default:throw new Error("bad maskPattern:"+p)}},getErrorCorrectPolynomial:function(p){for(var d=new o([1],0),a=0;a<p;a++)d=d.multiply(new o([1,S.gexp(a)],0));return d},getLengthInBits:function(p,d){if(1<=d&&d<10)switch(p){case h.MODE_NUMBER:return 10;case h.MODE_ALPHA_NUM:return 9;case h.MODE_8BIT_BYTE:return 8;case h.MODE_KANJI:return 8;default:throw new Error("mode:"+p)}else if(d<27)switch(p){case h.MODE_NUMBER:return 12;case h.MODE_ALPHA_NUM:return 11;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 10;default:throw new Error("mode:"+p)}else if(d<41)switch(p){case h.MODE_NUMBER:return 14;case h.MODE_ALPHA_NUM:return 13;case h.MODE_8BIT_BYTE:return 16;case h.MODE_KANJI:return 12;default:throw new Error("mode:"+p)}else throw new Error("type:"+d)},getLostPoint:function(p){for(var d=p.getModuleCount(),a=0,s=0;s<d;s++)for(var l=0;l<d;l++){for(var i=0,g=p.isDark(s,l),m=-1;m<=1;m++){if(s+m<0||d<=s+m)continue;for(var v=-1;v<=1;v++){if(l+v<0||d<=l+v)continue;if(m==0&&v==0)continue;g==p.isDark(s+m,l+v)&&i++}}i>5&&(a+=3+i-5)}for(var s=0;s<d-1;s++)for(var l=0;l<d-1;l++){var w=0;p.isDark(s,l)&&w++,p.isDark(s+1,l)&&w++,p.isDark(s,l+1)&&w++,p.isDark(s+1,l+1)&&w++,(w==0||w==4)&&(a+=3)}for(var s=0;s<d;s++)for(var l=0;l<d-6;l++)p.isDark(s,l)&&!p.isDark(s,l+1)&&p.isDark(s,l+2)&&p.isDark(s,l+3)&&p.isDark(s,l+4)&&!p.isDark(s,l+5)&&p.isDark(s,l+6)&&(a+=40);for(var l=0;l<d;l++)for(var s=0;s<d-6;s++)p.isDark(s,l)&&!p.isDark(s+1,l)&&p.isDark(s+2,l)&&p.isDark(s+3,l)&&p.isDark(s+4,l)&&!p.isDark(s+5,l)&&p.isDark(s+6,l)&&(a+=40);for(var _=0,l=0;l<d;l++)for(var s=0;s<d;s++)p.isDark(s,l)&&_++;var k=Math.abs(100*_/d/d-50)/5;return a+=k*10,a}};u.exports=b},J66h:function(u,G,c){(function(h){var o,S;(function(E,b){u.exports=b(E)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof h!="undefined"?h:this,function(E){"use strict";E=E||{};var b=E.Base64,p="2.6.4",d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(z){for(var se={},$=0,j=z.length;$<j;$++)se[z.charAt($)]=$;return se}(d),s=String.fromCharCode,l=function(z){if(z.length<2){var se=z.charCodeAt(0);return se<128?z:se<2048?s(192|se>>>6)+s(128|se&63):s(224|se>>>12&15)+s(128|se>>>6&63)+s(128|se&63)}else{var se=65536+(z.charCodeAt(0)-55296)*1024+(z.charCodeAt(1)-56320);return s(240|se>>>18&7)+s(128|se>>>12&63)+s(128|se>>>6&63)+s(128|se&63)}},i=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(z){return z.replace(i,l)},m=function(z){var se=[0,2,1][z.length%3],$=z.charCodeAt(0)<<16|(z.length>1?z.charCodeAt(1):0)<<8|(z.length>2?z.charCodeAt(2):0),j=[d.charAt($>>>18),d.charAt($>>>12&63),se>=2?"=":d.charAt($>>>6&63),se>=1?"=":d.charAt($&63)];return j.join("")},v=E.btoa&&typeof E.btoa=="function"?function(z){return E.btoa(z)}:function(z){if(z.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return z.replace(/[\s\S]{1,3}/g,m)},w=function(z){return v(g(String(z)))},_=function(z){return z.replace(/[+\/]/g,function(se){return se=="+"?"-":"_"}).replace(/=/g,"")},k=function(z,se){return se?_(w(z)):w(z)},O=function(z){return k(z,!0)},M;E.Uint8Array&&(M=function(z,se){for(var $="",j=0,U=z.length;j<U;j+=3){var R=z[j],C=z[j+1],D=z[j+2],le=R<<16|C<<8|D;$+=d.charAt(le>>>18)+d.charAt(le>>>12&63)+(typeof C!="undefined"?d.charAt(le>>>6&63):"=")+(typeof D!="undefined"?d.charAt(le&63):"=")}return se?_($):$});var I=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,B=function(z){switch(z.length){case 4:var se=(7&z.charCodeAt(0))<<18|(63&z.charCodeAt(1))<<12|(63&z.charCodeAt(2))<<6|63&z.charCodeAt(3),$=se-65536;return s(($>>>10)+55296)+s(($&1023)+56320);case 3:return s((15&z.charCodeAt(0))<<12|(63&z.charCodeAt(1))<<6|63&z.charCodeAt(2));default:return s((31&z.charCodeAt(0))<<6|63&z.charCodeAt(1))}},N=function(z){return z.replace(I,B)},y=function(z){var se=z.length,$=se%4,j=(se>0?a[z.charAt(0)]<<18:0)|(se>1?a[z.charAt(1)]<<12:0)|(se>2?a[z.charAt(2)]<<6:0)|(se>3?a[z.charAt(3)]:0),U=[s(j>>>16),s(j>>>8&255),s(j&255)];return U.length-=[0,0,2,1][$],U.join("")},Y=E.atob&&typeof E.atob=="function"?function(z){return E.atob(z)}:function(z){return z.replace(/\S{1,4}/g,y)},X=function(z){return Y(String(z).replace(/[^A-Za-z0-9\+\/]/g,""))},P=function(z){return N(Y(z))},F=function(z){return String(z).replace(/[-_]/g,function(se){return se=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},K=function(z){return P(F(z))},Q;E.Uint8Array&&(Q=function(z){return Uint8Array.from(X(F(z)),function(se){return se.charCodeAt(0)})});var ce=function(){var z=E.Base64;return E.Base64=b,z};if(E.Base64={VERSION:p,atob:X,btoa:v,fromBase64:K,toBase64:k,utob:g,encode:k,encodeURI:O,btou:N,decode:K,noConflict:ce,fromUint8Array:M,toUint8Array:Q},typeof Object.defineProperty=="function"){var fe=function(z){return{value:z,enumerable:!1,writable:!0,configurable:!0}};E.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",fe(function(){return K(this)})),Object.defineProperty(String.prototype,"toBase64",fe(function(z){return k(this,z)})),Object.defineProperty(String.prototype,"toBase64URI",fe(function(){return k(this,!0)}))}}return E.Meteor&&(Base64=E.Base64),u.exports?u.exports.Base64=E.Base64:!(o=[],S=function(){return E.Base64}.apply(G,o),S!==void 0&&(u.exports=S)),{Base64:E.Base64}})}).call(this,c("IyRk"))},K3mO:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("3y9D"),c("WYAk"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.Base,b=S.WordArray,p=o.algo,d=p.MD5,a=p.EvpKDF=E.extend({cfg:E.extend({keySize:128/32,hasher:d,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,l){for(var i,g=this.cfg,m=g.hasher.create(),v=b.create(),w=v.words,_=g.keySize,k=g.iterations;w.length<_;){i&&m.update(i),i=m.update(s).finalize(l),m.reset();for(var O=1;O<k;O++)i=m.finalize(i),m.reset();v.concat(i)}return v.sigBytes=_*4,v}});o.EvpKDF=function(s,l,i){return a.create(i).compute(s,l)}}(),h.EvpKDF})},KhGG:function(u,G,c){"use strict";c.d(G,"a",function(){return y}),c.d(G,"c",function(){return X});var h=c("0Owb"),o=c("miYZ"),S=c("tsqr"),E=c("oBTY"),b=c("tJVT"),p=c("PpiC"),d=c("k1fw"),a=c("9og8"),s=c("DZo9"),l=c("8z0m"),i=c("WmNS"),g=c.n(i),m=c("q1tI"),v=c.n(m),w=c("ErOA"),_=c("NFKh"),k=c.n(_),O=c("7Cbv"),M=c("9kvl"),I=c("mxV5"),B=c.n(I),N=l.a.Dragger,y=function(K){var Q="bf3c199c2470cb477d907b1e0917c17b",ce="5183666c72eec9e4",fe=k.a.enc.Utf8.parse(Q),z=k.a.enc.Utf8.parse(ce),se=k.a.AES.decrypt(K,fe,{iv:z,mode:k.a.mode.CBC});return se.toString(k.a.enc.Utf8)},Y,X=function(){var F=Object(a.a)(g.a.mark(function K(Q,ce,fe){var z,se,$,j,U,R,C,D,le;return g.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ce.file_name=Q.name,ve.next=3,Object(w.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return C=ve.sent,console.log("decrypt(res.data):",y(C.data)),C.data=JSON.parse(y(C.data)),D=Object(O.a)(),le=new B.a({endpoint:C==null||((z=C.data)===null||z===void 0)?void 0:z.end_point,region:C==null||((se=C.data)===null||se===void 0)?void 0:se.region,accessKeyId:C==null||(($=C.data)===null||$===void 0)?void 0:$.access_key_id,accessKeySecret:C==null||((j=C.data)===null||j===void 0)?void 0:j.access_key_secret,bucket:C==null||((U=C.data)===null||U===void 0)?void 0:U.bucket,stsToken:C==null||((R=C.data)===null||R===void 0)?void 0:R.security_token}),ve.abrupt("return",new Promise(function(Ee,Se){var ae;le.multipartUpload("".concat(D),new Blob([Q],{type:Q.type}),Object(d.a)(Object(d.a)({timeout:200*1e3,partSize:102400},fe),{},{callback:{url:C==null||((ae=C.data)===null||ae===void 0)?void 0:ae.callback_url,host:C==null?void 0:C.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(ce)}})).then(function(pe){var me;Q.response=(me=pe.data)===null||me===void 0?void 0:me.data,Ee(pe==null?void 0:pe.data)}).catch(function(pe){Se(pe),console.log("err:",pe)})}));case 9:case"end":return ve.stop()}},K)}));return function(Q,ce,fe){return F.apply(this,arguments)}}(),P=function(K){var Q=K.user,ce=K.cancelUpload,fe=Object(p.a)(K,["user","cancelUpload"]),z=Object(m.useState)([]),se=Object(b.a)(z,2),$=se[0],j=se[1],U=Object(m.useState)(),R=Object(b.a)(U,2),C=R[0],D=R[1],le={onRemove:function(Ee){j(Object(E.a)($.filter(function(Se){return Se.name!==Ee.name}))),fe.onChange($.filter(function(Se){return Se.name!==Ee.name}))},disabled:fe.disabled,multiple:!0,fileList:$==null?void 0:$.map(function(ve){return ve.file}),customRequest:function(){},beforeUpload:function(){var ve=Object(a.a)(g.a.mark(function Se(ae){var pe;return g.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(pe=fe.maxSize||1024*1024*1024*1,!$.filter(function(re){return re.name===ae.name}).length){ee.next=4;break}return S.b.info("".concat(ae.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ee.abrupt("return");case 4:if(!((ae==null?void 0:ae.size)>pe)){ee.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(pe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ee.abrupt("return",!1);case 7:return $.push({name:ae.name,file:ae}),j(Object(E.a)($)),fe.onChange($),ee.abrupt("return",!1);case 11:case"end":return ee.stop()}},Se)}));function Ee(Se){return ve.apply(this,arguments)}return Ee}()},he=function(){var ve=Object(a.a)(g.a.mark(function Ee(Se,ae){var pe,me,ee,re,Z,ue,V,J,Ce;return g.a.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return ae.file_name=Se.name,V=Se.name,H.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(J=H.sent,J.data=JSON.parse(y(J.data)),!((J==null?void 0:J.status)!==0)){H.next=12;break}return $[$.findIndex(function(T){return T.name===V})].status="error",$[$.findIndex(function(T){return T.name===V})].file.status="error",fe.onChange($),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H.abrupt("return");case 12:return C=new B.a({endpoint:J==null||((pe=J.data)===null||pe===void 0)?void 0:pe.end_point,region:J==null||((me=J.data)===null||me===void 0)?void 0:me.region,accessKeyId:J==null||((ee=J.data)===null||ee===void 0)?void 0:ee.access_key_id,accessKeySecret:J==null||((re=J.data)===null||re===void 0)?void 0:re.access_key_secret,bucket:J==null||((Z=J.data)===null||Z===void 0)?void 0:Z.bucket,stsToken:J==null||((ue=J.data)===null||ue===void 0)?void 0:ue.security_token}),console.log(Se,"file"),D(C),Ce=Object(O.a)(),H.abrupt("return",new Promise(function(T,W){try{var we;C.multipartUpload("".concat(fe.identifier,"/").concat(Ce).concat(V.indexOf(".")>-1?"."+V.split(".").pop():""),new Blob([Se.file],{type:Se.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Oe,Be,Fe){try{console.log("\u8FDB\u5EA6",Oe,Be,Fe);var Ue=$.findIndex(function(Ge){return Ge.name===V});$[Ue].file.percent=Oe*100,$[Ue].tempCheckpoint=Be,j(Object(E.a)($))}catch(Ge){}},checkpoint:$[$.findIndex(function(ye){return ye.name===V})].tempCheckpoint,callback:{customValue:{id:V+""},url:J==null||((we=J.data)===null||we===void 0)?void 0:we.callback_url,host:J==null?void 0:J.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(ae)}}).then(function(ye){var Oe,Be=$.findIndex(function(Xe){return Xe.name===V}),Fe="done";if(((Oe=ye.data)===null||Oe===void 0?void 0:Oe.status)===0){var Ue;Se.response=(Ue=ye.data)===null||Ue===void 0?void 0:Ue.data;var Ge=$.findIndex(function(Xe){return Xe.name===V});$[Ge].status="done",$[Ge].file.status="done"}else{var Ye;S.b.warn((Ye=ye.data)===null||Ye===void 0?void 0:Ye.message),Fe="error"}$[Be].status=Fe,$[Be].file.status=Fe,fe.onChange($),T(ye==null?void 0:ye.data)}).catch(function(ye){$[$.findIndex(function(Oe){return Oe.name===V})].status="error",$[$.findIndex(function(Oe){return Oe.name===V})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),j(Object(E.a)($)),fe.onChange($),W(ye),console.log("err:",ye)})}catch(ye){}}));case 17:case"end":return H.stop()}},Ee)}));return function(Se,ae){return ve.apply(this,arguments)}}();return Object(m.useEffect)(function(){$.every(function(ve){return ve==="done"||ve==="error"})&&fe.onComplete($)},[$]),Object(m.useEffect)(function(){if(ce){var ve;(ve=C)===null||ve===void 0||ve.cancel()}},[ce]),Object(m.useEffect)(function(){fe.uploading&&$.map(function(){var ve=Object(a.a)(g.a.mark(function Ee(Se){var ae,pe;return g.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(!((!Se.status||Se.status==="error")&&!ce)){ee.next=6;break}return Se.status="uploading",Se.file.status="uploading",ee.next=5,he(Se,{login:Q==null||((ae=Q.userInfo)===null||ae===void 0)?void 0:ae.login,container_type:fe.container_type,container_id:fe.container_id,description:fe.description});case 5:pe=ee.sent;case 6:case"end":return ee.stop()}},Ee)}));return function(Ee){return ve.apply(this,arguments)}}())},[fe.uploading]),v.a.createElement(N,Object(h.a)({},le,{height:fe.height,className:fe.className}),v.a.createElement("p",{className:"ant-upload-hint"},fe.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};G.b=Object(M.a)(function(F){var K=F.loading,Q=F.globalSetting,ce=F.user;return{globalSetting:Q,loading:K.models.competitions,user:ce}})(P)},KmYQ:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.ZeroPadding={pad:function(o,S){var E=S*4;o.clamp(),o.sigBytes+=E-(o.sigBytes%E||E)},unpad:function(o){for(var S=o.words,E=o.sigBytes-1,E=o.sigBytes-1;E>=0;E--)if(S[E>>>2]>>>24-E%4*8&255){o.sigBytes=E+1;break}}},h.pad.ZeroPadding})},LdHM:function(u,G,c){"use strict";c.d(G,"b",function(){return I}),c.d(G,"a",function(){return N});var h=c("1OyB"),o=c("vuIU"),S=c("Ji7U"),E=c("LK+K"),b=c("q1tI"),p=c("rePB"),d=c("Ff2n"),a=c("ODXe"),s=c("4IlW"),l=c("bX4T"),i=c("YrtM"),g=c("TSYQ"),m=c.n(g),v=c("+nKL"),w=c("8OUc"),_=function(D,le){var he=D.prefixCls,ve=D.id,Ee=D.flattenOptions,Se=D.childrenAsData,ae=D.values,pe=D.searchValue,me=D.multiple,ee=D.defaultActiveFirstOption,re=D.height,Z=D.itemHeight,ue=D.notFoundContent,V=D.open,J=D.menuItemSelectedIcon,Ce=D.virtual,q=D.onSelect,H=D.onToggleOpen,T=D.onActiveValue,W=D.onScroll,we=D.onMouseEnter,ye="".concat(he,"-item"),Oe=Object(i.a)(function(){return Ee},[V,Ee],function($e,Ie){return Ie[0]&&$e[1]!==Ie[1]}),Be=b.useRef(null),Fe=function(Ie){Ie.preventDefault()},Ue=function(Ie){Be.current&&Be.current.scrollTo({index:Ie})},Ge=function(Ie){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Le=Oe.length,_e=0;_e<Le;_e+=1){var Te=(Ie+_e*De+Le)%Le,ke=Oe[Te],Ae=ke.group,ze=ke.data;if(!Ae&&!ze.disabled)return Te}return-1},Ye=b.useState(function(){return Ge(0)}),Xe=Object(a.a)(Ye,2),Je=Xe[0],Ne=Xe[1],nt=function(Ie){Ne(Ie);var De=Oe[Ie];if(!De){T(null,-1);return}T(De.data.value,Ie)};b.useEffect(function(){nt(ee!==!1?Ge(0):-1)},[Oe.length,pe]),b.useEffect(function(){var $e=setTimeout(function(){if(!me&&V&&ae.size===1){var Ie=Array.from(ae)[0],De=Oe.findIndex(function(Le){var _e=Le.data;return _e.value===Ie});nt(De),Ue(De)}});return function(){return clearTimeout($e)}},[V]);var ot=function(Ie){Ie!==void 0&&q(Ie,{selected:!ae.has(Ie)}),me||H(!1)};if(b.useImperativeHandle(le,function(){return{onKeyDown:function(Ie){var De=Ie.which;switch(De){case s.a.UP:case s.a.DOWN:{var Le=0;if(De===s.a.UP?Le=-1:De===s.a.DOWN&&(Le=1),Le!==0){var _e=Ge(Je+Le,Le);Ue(_e),nt(_e)}break}case s.a.ENTER:{var Te=Oe[Je];Te&&!Te.data.disabled?ot(Te.data.value):ot(void 0),V&&Ie.preventDefault();break}case s.a.ESC:H(!1)}},onKeyUp:function(){},scrollTo:function(Ie){Ue(Ie)}}}),Oe.length===0)return b.createElement("div",{role:"listbox",id:"".concat(ve,"_list"),className:"".concat(ye,"-empty"),onMouseDown:Fe},ue);function Ve($e){var Ie=Oe[$e];if(!Ie)return null;var De=Ie.data||{},Le=De.value,_e=De.label,Te=De.children,ke=Object(l.a)(De,!0),Ae=Se?Te:_e;return Ie?b.createElement("div",Object.assign({"aria-label":typeof Ae=="string"?Ae:null},ke,{key:$e,role:"option",id:"".concat(ve,"_list_").concat($e),"aria-selected":ae.has(Le)}),Le):null}return b.createElement(b.Fragment,null,b.createElement("div",{role:"listbox",id:"".concat(ve,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(Je-1),Ve(Je),Ve(Je+1)),b.createElement(v.a,{itemKey:"key",ref:Be,data:Oe,height:re,itemHeight:Z,fullHeight:!1,onMouseDown:Fe,onScroll:W,virtual:Ce,onMouseEnter:we},function($e,Ie){var De,Le=$e.group,_e=$e.groupOption,Te=$e.data,ke=Te.label,Ae=Te.key;if(Le)return b.createElement("div",{className:m()(ye,"".concat(ye,"-group"))},ke!==void 0?ke:Ae);var ze=Te.disabled,je=Te.value,Ze=Te.title,ht=Te.children,Tt=Te.style,qe=Te.className,at=Object(d.a)(Te,["disabled","value","title","children","style","className"]),dt=ae.has(je),st="".concat(ye,"-option"),St=m()(ye,st,qe,(De={},Object(p.a)(De,"".concat(st,"-grouped"),_e),Object(p.a)(De,"".concat(st,"-active"),Je===Ie&&!ze),Object(p.a)(De,"".concat(st,"-disabled"),ze),Object(p.a)(De,"".concat(st,"-selected"),dt),De)),Ft=Se?ht:ke,Vt=!J||typeof J=="function"||dt;return b.createElement("div",Object.assign({},at,{"aria-selected":dt,className:St,title:Ze,onMouseMove:function(){if(Je===Ie||ze)return;nt(Ie)},onClick:function(){ze||ot(je)},style:Tt}),b.createElement("div",{className:"".concat(st,"-content")},Ft||je),b.isValidElement(J)||dt,Vt&&b.createElement(w.a,{className:"".concat(ye,"-option-state"),customizeIcon:J,customizeIconProps:{isSelected:dt}},dt?"\u2713":null))}))},k=b.forwardRef(_);k.displayName="OptionList";var O=k,M=function(){return null};M.isSelectOption=!0;var I=M,B=function(){return null};B.isSelectOptGroup=!0;var N=B,y=c("VTBJ"),Y=c("Zm9Q");function X(C){var D=C.key,le=C.props,he=le.children,ve=le.value,Ee=Object(d.a)(le,["children","value"]);return Object(y.a)({key:D,value:ve!==void 0?ve:D,children:he},Ee)}function P(C){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Y.a)(C).map(function(le,he){if(!b.isValidElement(le)||!le.type)return null;var ve=le.type.isSelectOptGroup,Ee=le.key,Se=le.props,ae=Se.children,pe=Object(d.a)(Se,["children"]);return D||!ve?X(le):Object(y.a)(Object(y.a)({key:"__RC_SELECT_GRP__".concat(Ee===null?he:Ee,"__"),label:Ee},pe),{},{options:P(ae)})}).filter(function(le){return le})}var F=c("2Qr1"),K=c("qNPg"),Q=c("U8pU"),ce=c("Kwbf"),fe=c("WKfj");function z(C){var D=C.mode,le=C.options,he=C.children,ve=C.backfill,Ee=C.allowClear,Se=C.placeholder,ae=C.getInputElement,pe=C.showSearch,me=C.onSearch,ee=C.defaultOpen,re=C.autoFocus,Z=C.labelInValue,ue=C.value,V=C.inputValue,J=C.optionLabelProp,Ce=D==="multiple"||D==="tags",q=pe!==void 0?pe:Ce||D==="combobox",H=le||P(he);if(Object(ce.a)(D!=="tags"||H.every(function(ye){return!ye.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),D==="tags"||D==="combobox"){var T=H.some(function(ye){return ye.options?ye.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in ye?ye.value:ye.key)=="number"});Object(ce.a)(!T,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ce.a)(D!=="combobox"||!J,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ce.a)(D==="combobox"||!ve,"`backfill` only works with `combobox` mode."),Object(ce.a)(D==="combobox"||!ae,"`getInputElement` only work with `combobox` mode."),Object(ce.b)(D!=="combobox"||!ae||!Ee||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),me&&!q&&D!=="combobox"&&D!=="tags"&&Object(ce.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ce.b)(!ee||re,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ue!=null){var W=Object(fe.d)(ue);Object(ce.a)(!Z||W.every(function(ye){return Object(Q.a)(ye)==="object"&&("key"in ye||"value"in ye)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(ce.a)(!Ce||Array.isArray(ue),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var we=null;Object(Y.a)(he).some(function(ye){if(!b.isValidElement(ye)||!ye.type)return!1;var Oe=ye.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Be=Object(Y.a)(ye.props.children).every(function(Fe){return!b.isValidElement(Fe)||!ye.type||Fe.type.isSelectOption?!0:(we=Fe.type,!1)});return!Be}return we=Oe,!0}),we&&Object(ce.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(we.displayName||we.name||we,"`.")),Object(ce.a)(V===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var se=z,$=Object(K.a)({prefixCls:"rc-select",components:{optionList:O},convertChildrenToData:P,flattenOptions:F.d,getLabeledValue:F.e,filterOptions:F.b,isValueDisabled:F.g,findValueOption:F.c,warningProps:se,fillOptionsWithMissingValue:F.a}),j=function(C){Object(S.a)(le,C);var D=Object(E.a)(le);function le(){var he;return Object(h.a)(this,le),he=D.apply(this,arguments),he.selectRef=b.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(o.a)(le,[{key:"render",value:function(){return b.createElement($,Object.assign({ref:this.selectRef},this.props))}}]),le}(b.Component);j.Option=I,j.OptGroup=N;var U=j,R=G.c=U},M8RZ:function(u,G,c){"use strict";c.d(G,"a",function(){return s});var h=c("fWQN"),o=c("mtLc"),S=c("yKVA"),E=c("879j"),b=c("q1tI"),p=c.n(b),d=c("i8i4"),a=c.n(d),s=function(l){Object(S.a)(g,l);var i=Object(E.a)(g);function g(m){var v;Object(h.a)(this,g),v=i.call(this,m);var w=window.document;return v.node=w.createElement("div"),w.body.appendChild(v.node),v}return Object(o.a)(g,[{key:"render",value:function(){var v=this.props.children;return Object(d.createPortal)(v,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),g}(p.a.Component)},MFOe:function(u,G,c){(function(h){var o=p(),S=d(),E=a(),b=typeof window!="undefined"?window:h;u.exports={assign:o,create:S,trim:E,bind:s,slice:l,each:i,map:g,pluck:m,isList:v,isFunction:w,isObject:_,Global:b};function p(){return Object.assign?Object.assign:function(O,M,I,B){for(var N=1;N<arguments.length;N++)i(Object(arguments[N]),function(y,Y){O[Y]=y});return O}}function d(){if(Object.create)return function(M,I,B,N){var y=l(arguments,1);return o.apply(this,[Object.create(M)].concat(y))};{function k(){}return function(M,I,B,N){var y=l(arguments,1);return k.prototype=M,o.apply(this,[new k].concat(y))}}}function a(){return String.prototype.trim?function(O){return String.prototype.trim.call(O)}:function(O){return O.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function s(k,O){return function(){return O.apply(k,Array.prototype.slice.call(arguments,0))}}function l(k,O){return Array.prototype.slice.call(k,O||0)}function i(k,O){m(k,function(M,I){return O(M,I),!1})}function g(k,O){var M=v(k)?[]:{};return m(k,function(I,B){return M[B]=O(I,B),!1}),M}function m(k,O){if(v(k)){for(var M=0;M<k.length;M++)if(O(k[M],M))return k[M]}else for(var I in k)if(k.hasOwnProperty(I)&&O(k[I],I))return k[I]}function v(k){return k!=null&&typeof k!="function"&&typeof k.length=="number"}function w(k){return k&&{}.toString.call(k)==="[object Function]"}function _(k){return k&&{}.toString.call(k)==="[object Object]"}}).call(this,c("IyRk"))},MlIO:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(o){var S=h,E=S.lib,b=E.Base,p=E.WordArray,d=S.x64={},a=d.Word=b.extend({init:function(l,i){this.high=l,this.low=i}}),s=d.WordArray=b.extend({init:function(l,i){l=this.words=l||[],i!=o?this.sigBytes=i:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,i=l.length,g=[],m=0;m<i;m++){var v=l[m];g.push(v.high),g.push(v.low)}return p.create(g,this.sigBytes)},clone:function(){for(var l=b.clone.call(this),i=l.words=this.words.slice(0),g=i.length,m=0;m<g;m++)i[m]=i[m].clone();return l}})}(),h})},NFKh:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("MlIO"),c("F+F2"),c("qM6L"),c("ETIr"),c("wbyO"),c("cv67"),c("3y9D"),c("lPiR"),c("GRuw"),c("1uat"),c("uGsb"),c("5hvy"),c("ELcG"),c("WYAk"),c("e7zE"),c("K3mO"),c("OLod"),c("ALsQ"),c("9OqN"),c("qu8F"),c("S6kV"),c("gb/T"),c("qBft"),c("oRuE"),c("jO9C"),c("KmYQ"),c("uGxW"),c("bQjk"),c("wZgz"),c("pA7S"),c("w7YG"),c("E4JC"),c("PVpz"))})(this,function(h){return h})},NvD2:function(u,G,c){"use strict";c.d(G,"a",function(){return p});var h=c("Kwbf");function o(d,a){var s=new Set;return d.forEach(function(l){a.has(l)||s.add(l)}),s}function S(d){var a=d||{},s=a.disabled,l=a.disableCheckbox,i=a.checkable;return!!(s||l)||i===!1}function E(d,a,s,l){for(var i=new Set(d),g=new Set,m=0;m<=s;m+=1){var v=a.get(m)||new Set;v.forEach(function(O){var M=O.key,I=O.node,B=O.children,N=B===void 0?[]:B;i.has(M)&&!l(I)&&N.filter(function(y){return!l(y.node)}).forEach(function(y){i.add(y.key)})})}for(var w=new Set,_=s;_>=0;_-=1){var k=a.get(_)||new Set;k.forEach(function(O){var M=O.parent,I=O.node;if(l(I)||!O.parent||w.has(O.parent.key))return;if(l(O.parent.node)){w.add(M.key);return}var B=!0,N=!1;(M.children||[]).filter(function(y){return!l(y.node)}).forEach(function(y){var Y=y.key,X=i.has(Y);B&&!X&&(B=!1),!N&&(X||g.has(Y))&&(N=!0)}),B&&i.add(M.key),N&&g.add(M.key),w.add(M.key)})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(o(g,i))}}function b(d,a,s,l,i){for(var g=new Set(d),m=new Set(a),v=0;v<=l;v+=1){var w=s.get(v)||new Set;w.forEach(function(M){var I=M.key,B=M.node,N=M.children,y=N===void 0?[]:N;!g.has(I)&&!m.has(I)&&!i(B)&&y.filter(function(Y){return!i(Y.node)}).forEach(function(Y){g.delete(Y.key)})})}m=new Set;for(var _=new Set,k=l;k>=0;k-=1){var O=s.get(k)||new Set;O.forEach(function(M){var I=M.parent,B=M.node;if(i(B)||!M.parent||_.has(M.parent.key))return;if(i(M.parent.node)){_.add(I.key);return}var N=!0,y=!1;(I.children||[]).filter(function(Y){return!i(Y.node)}).forEach(function(Y){var X=Y.key,P=g.has(X);N&&!P&&(N=!1),!y&&(P||m.has(X))&&(y=!0)}),N||g.delete(I.key),y&&m.add(I.key),_.add(I.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(o(m,g))}}function p(d,a,s,l){var i=[],g;l?g=l:g=S;var m=new Set(d.filter(function(k){var O=!!s[k];return O||i.push(k),O})),v=new Map,w=0;Object.keys(s).forEach(function(k){var O=s[k],M=O.level,I=v.get(M);I||(I=new Set,v.set(M,I)),I.add(O),w=Math.max(w,M)}),Object(h.a)(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(k){return"'".concat(k,"'")}).join(", ")));var _;return a===!0?_=E(m,v,w,g):_=b(m,a.halfCheckedKeys,v,w,g),_}},OLES:function(u,G,c){"use strict";var h=c("U8pU"),o=c("VTBJ"),S=c("Ff2n"),E=c("q1tI"),b=c("uciX"),p=c("7ixt"),d=function(m){var v=m.overlay,w=m.prefixCls,_=m.id,k=m.overlayInnerStyle;return E.createElement("div",{className:"".concat(w,"-inner"),id:_,role:"tooltip",style:k},typeof v=="function"?v():v)},a=d,s=function(m,v){var w=m.overlayClassName,_=m.trigger,k=_===void 0?["hover"]:_,O=m.mouseEnterDelay,M=O===void 0?0:O,I=m.mouseLeaveDelay,B=I===void 0?.1:I,N=m.overlayStyle,y=m.prefixCls,Y=y===void 0?"rc-tooltip":y,X=m.children,P=m.onVisibleChange,F=m.afterVisibleChange,K=m.transitionName,Q=m.animation,ce=m.placement,fe=ce===void 0?"right":ce,z=m.align,se=z===void 0?{}:z,$=m.destroyTooltipOnHide,j=$===void 0?!1:$,U=m.defaultVisible,R=m.getTooltipContainer,C=m.overlayInnerStyle,D=Object(S.a)(m,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),le=Object(E.useRef)(null);Object(E.useImperativeHandle)(v,function(){return le.current});var he=Object(o.a)({},D);"visible"in m&&(he.popupVisible=m.visible);var ve=function(){var me=m.arrowContent,ee=me===void 0?null:me,re=m.overlay,Z=m.id;return[E.createElement("div",{className:"".concat(Y,"-arrow"),key:"arrow"},ee),E.createElement(a,{key:"content",prefixCls:Y,id:Z,overlay:re,overlayInnerStyle:C})]},Ee=!1,Se=!1;if(typeof j=="boolean")Ee=j;else if(j&&Object(h.a)(j)==="object"){var ae=j.keepParent;Ee=ae===!0,Se=ae===!1}return E.createElement(b.a,Object.assign({popupClassName:w,prefixCls:Y,popup:ve,action:k,builtinPlacements:p.a,popupPlacement:fe,ref:le,popupAlign:se,getPopupContainer:R,onPopupVisibleChange:P,afterPopupVisibleChange:F,popupTransitionName:K,popupAnimation:Q,defaultPopupVisible:U,destroyPopupOnHide:Ee,autoDestroy:Se,mouseLeaveDelay:B,popupStyle:N,mouseEnterDelay:M},he),X)},l=Object(E.forwardRef)(s),i=G.a=l},OLod:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("K3mO"))})(this,function(h){h.lib.Cipher||function(o){var S=h,E=S.lib,b=E.Base,p=E.WordArray,d=E.BufferedBlockAlgorithm,a=S.enc,s=a.Utf8,l=a.Base64,i=S.algo,g=i.EvpKDF,m=E.Cipher=d.extend({cfg:b.extend(),createEncryptor:function(K,Q){return this.create(this._ENC_XFORM_MODE,K,Q)},createDecryptor:function(K,Q){return this.create(this._DEC_XFORM_MODE,K,Q)},init:function(K,Q,ce){this.cfg=this.cfg.extend(ce),this._xformMode=K,this._key=Q,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(K){return this._append(K),this._process()},finalize:function(K){K&&this._append(K);var Q=this._doFinalize();return Q},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function K(Q){return typeof Q=="string"?F:Y}return function(Q){return{encrypt:function(ce,fe,z){return K(fe).encrypt(Q,ce,fe,z)},decrypt:function(ce,fe,z){return K(fe).decrypt(Q,ce,fe,z)}}}}()}),v=E.StreamCipher=m.extend({_doFinalize:function(){var K=this._process(!0);return K},blockSize:1}),w=S.mode={},_=E.BlockCipherMode=b.extend({createEncryptor:function(K,Q){return this.Encryptor.create(K,Q)},createDecryptor:function(K,Q){return this.Decryptor.create(K,Q)},init:function(K,Q){this._cipher=K,this._iv=Q}}),k=w.CBC=function(){var K=_.extend();K.Encryptor=K.extend({processBlock:function(ce,fe){var z=this._cipher,se=z.blockSize;Q.call(this,ce,fe,se),z.encryptBlock(ce,fe),this._prevBlock=ce.slice(fe,fe+se)}}),K.Decryptor=K.extend({processBlock:function(ce,fe){var z=this._cipher,se=z.blockSize,$=ce.slice(fe,fe+se);z.decryptBlock(ce,fe),Q.call(this,ce,fe,se),this._prevBlock=$}});function Q(ce,fe,z){var se,$=this._iv;$?(se=$,this._iv=o):se=this._prevBlock;for(var j=0;j<z;j++)ce[fe+j]^=se[j]}return K}(),O=S.pad={},M=O.Pkcs7={pad:function(K,Q){for(var ce=Q*4,fe=ce-K.sigBytes%ce,z=fe<<24|fe<<16|fe<<8|fe,se=[],$=0;$<fe;$+=4)se.push(z);var j=p.create(se,fe);K.concat(j)},unpad:function(K){var Q=K.words[K.sigBytes-1>>>2]&255;K.sigBytes-=Q}},I=E.BlockCipher=m.extend({cfg:m.cfg.extend({mode:k,padding:M}),reset:function(){var K;m.reset.call(this);var Q=this.cfg,ce=Q.iv,fe=Q.mode;this._xformMode==this._ENC_XFORM_MODE?K=fe.createEncryptor:(K=fe.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==K?this._mode.init(this,ce&&ce.words):(this._mode=K.call(fe,this,ce&&ce.words),this._mode.__creator=K)},_doProcessBlock:function(K,Q){this._mode.processBlock(K,Q)},_doFinalize:function(){var K,Q=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(Q.pad(this._data,this.blockSize),K=this._process(!0)):(K=this._process(!0),Q.unpad(K)),K},blockSize:128/32}),B=E.CipherParams=b.extend({init:function(K){this.mixIn(K)},toString:function(K){return(K||this.formatter).stringify(this)}}),N=S.format={},y=N.OpenSSL={stringify:function(K){var Q,ce=K.ciphertext,fe=K.salt;return fe?Q=p.create([1398893684,1701076831]).concat(fe).concat(ce):Q=ce,Q.toString(l)},parse:function(K){var Q,ce=l.parse(K),fe=ce.words;return fe[0]==1398893684&&fe[1]==1701076831&&(Q=p.create(fe.slice(2,4)),fe.splice(0,4),ce.sigBytes-=16),B.create({ciphertext:ce,salt:Q})}},Y=E.SerializableCipher=b.extend({cfg:b.extend({format:y}),encrypt:function(K,Q,ce,fe){fe=this.cfg.extend(fe);var z=K.createEncryptor(ce,fe),se=z.finalize(Q),$=z.cfg;return B.create({ciphertext:se,key:ce,iv:$.iv,algorithm:K,mode:$.mode,padding:$.padding,blockSize:K.blockSize,formatter:fe.format})},decrypt:function(K,Q,ce,fe){fe=this.cfg.extend(fe),Q=this._parse(Q,fe.format);var z=K.createDecryptor(ce,fe).finalize(Q.ciphertext);return z},_parse:function(K,Q){return typeof K=="string"?Q.parse(K,this):K}}),X=S.kdf={},P=X.OpenSSL={execute:function(K,Q,ce,fe){fe||(fe=p.random(64/8));var z=g.create({keySize:Q+ce}).compute(K,fe),se=p.create(z.words.slice(Q),ce*4);return z.sigBytes=Q*4,B.create({key:z,iv:se,salt:fe})}},F=E.PasswordBasedCipher=Y.extend({cfg:Y.cfg.extend({kdf:P}),encrypt:function(K,Q,ce,fe){fe=this.cfg.extend(fe);var z=fe.kdf.execute(ce,K.keySize,K.ivSize);fe.iv=z.iv;var se=Y.encrypt.call(this,K,Q,z.key,fe);return se.mixIn(z),se},decrypt:function(K,Q,ce,fe){fe=this.cfg.extend(fe),Q=this._parse(Q,fe.format);var z=fe.kdf.execute(ce,K.keySize,K.ivSize,Q.salt);fe.iv=z.iv;var se=Y.decrypt.call(this,K,Q,z.key,fe);return se}})}()})},OZM5:function(u,G,c){"use strict";c.d(G,"b",function(){return l}),c.d(G,"a",function(){return i}),c.d(G,"k",function(){return g}),c.d(G,"h",function(){return m}),c.d(G,"i",function(){return v}),c.d(G,"g",function(){return w}),c.d(G,"c",function(){return _}),c.d(G,"d",function(){return k}),c.d(G,"j",function(){return I}),c.d(G,"e",function(){return B}),c.d(G,"f",function(){return N});var h=c("KQm4"),o=c("U8pU"),S=c("Ff2n"),E=c("q1tI"),b=c.n(E),p=c("Kwbf"),d=c("WaYH"),a=.25,s=2;function l(y,Y){var X=y.slice(),P=X.indexOf(Y);return P>=0&&X.splice(P,1),X}function i(y,Y){var X=y.slice();return X.indexOf(Y)===-1&&X.push(Y),X}function g(y){return y.split("-")}function m(y,Y){return"".concat(y,"-").concat(Y)}function v(y){return y&&y.type&&y.type.isTreeNode}function w(y,Y){var X=[y],P=Y[y];function F(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];K.forEach(function(Q){var ce=Q.key,fe=Q.children;X.push(ce),F(fe)})}return F(P.children),X}function _(y,Y){var X=y.clientY,P=Y.selectHandle.getBoundingClientRect(),F=P.top,K=P.bottom,Q=P.height,ce=Math.max(Q*a,s);return X<=F+ce?-1:X>=K-ce?1:0}function k(y,Y){if(!y)return;var X=Y.multiple;return X?y.slice():y.length?[y[0]]:y}var O=function(Y){return Y};function M(y,Y){if(!y)return[];var X=Y||{},P=X.processProps,F=P===void 0?O:P,K=Array.isArray(y)?y:[y];return K.map(function(Q){var ce=Q.children,fe=Object(S.a)(Q,["children"]),z=M(ce,Y);return b.a.createElement(d.a,Object.assign({},F(fe)),z)})}function I(y){if(!y)return null;var Y;if(Array.isArray(y))Y={checkedKeys:y,halfCheckedKeys:void 0};else if(Object(o.a)(y)==="object")Y={checkedKeys:y.checked||void 0,halfCheckedKeys:y.halfChecked||void 0};else return Object(p.a)(!1,"`checkedKeys` is not an array or an object"),null;return Y}function B(y,Y){var X=new Set;function P(F){if(X.has(F))return;var K=Y[F];if(!K)return;X.add(F);var Q=K.parent,ce=K.node;if(ce.disabled)return;Q&&P(Q.key)}return(y||[]).forEach(function(F){P(F)}),Object(h.a)(X)}function N(y){var Y={};return Object.keys(y).forEach(function(X){(X.startsWith("data-")||X.startsWith("aria-"))&&(Y[X]=y[X])}),Y}},Ot1p:function(u,G,c){"use strict";var h=c("2qtc"),o=c("kLXV"),S=c("rAM+"),E=c("miYZ"),b=c("tsqr"),p=c("9og8"),d=c("tJVT"),a=c("jrin"),s=c("WmNS"),l=c.n(s),i=c("q1tI"),g=c.n(i),m=c("VrN/"),v=c.n(m),w=c("bdgK"),_=c("p77/"),k=c("Bd2K"),O=c("ELLl"),M=c("19Vz"),I=c("lZu9"),B=c("+NIl"),N=c("kSUc"),y=c("9Bee"),Y=function(qe){var at=qe.value,dt=at===void 0?"":at,st=qe.className,St=qe.showTextOnly,Ft=qe.showLines,Vt=qe.style,Kt=Vt===void 0?{}:Vt,At=Object(i.useMemo)(function(){return""},[dt]);return g.a.createElement(g.a.Fragment,null,g.a.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},X=c("Q9mQ"),P=c("diRs"),F=c("0Owb"),K=c("dejd"),Q=c("C+DQ"),ce=c("D1Df"),fe=c.n(ce),z=c("1vsH"),se=c("m3rI"),$=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function j(qe){var at=qe.onActionCallback,dt=qe.title,st=qe.icon,St=qe.actionName,Ft=qe.className,Vt=Ft===void 0?"":Ft,Kt=qe.children;function At(){at(St)}return g.a.createElement("a",{title:dt,className:Vt,onClick:At},g.a.createElement("i",{className:"md-iconfont ".concat(st)}),Kt)}var U=function(qe){var at=qe.watch,dt=qe.showNullButton,st=qe.onActionCallback,St=qe.fullScreen,Ft=qe.insertTemp,Vt=qe.hidetoolBar,Kt=qe.uuid,At=qe.setOpenPhones,jt=Object(z.E)("_educoder_session_login"),ar=Object(z.E)("_educoder_session"),Ct=[].concat($,[{title:"".concat(at?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(at?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return g.a.createElement("ul",{className:"markdown-toolbar-container"},!Vt&&Ct.map(function(hr,Jt){return g.a.createElement("li",{key:Jt},hr.actionName?g.a.createElement(j,Object(F.a)({},hr,{onActionCallback:st})):g.a.createElement("span",{className:"v-line"}))}),dt?g.a.createElement("li",null,g.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:st},g.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ft&&g.a.createElement("li",null,g.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ft),onActionCallback:st},g.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),g.a.createElement("li",null,g.a.createElement(P.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:g.a.createElement("div",null,g.a.createElement("span",{style:{display:"none"}},location.origin+"/react/build/upload.html?_educoder_session_login="+jt+"&_educoder_session="+ar+"&key="+Kt+"&api="+encodeURIComponent(se.a.API_SERVER)),g.a.createElement(fe.a,{size:150,fgColor:"#000",value:location.origin+"/react/build/upload.html?_educoder_session_login="+jt+"&_educoder_session="+ar+"&key="+Kt+"&api="+encodeURIComponent(se.a.API_SERVER)}))},g.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return At(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement("li",{className:"btn-full-screen"},g.a.createElement(j,{icon:"".concat(St?"icon-shrink":"icon-enlarge"),title:St?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:st})))},R=c("M8RZ"),C=c("+L6B"),D=c("2/Rp"),le=c("y8nQ"),he=c("Vl3Y"),ve=c("5NDa"),Ee=c("5rEg"),Se={labelCol:{span:4},wrapperCol:{span:20}},ae=function(qe){var at=qe.callback,dt=qe.onCancel;function st(St){at(St)}return g.a.createElement(he.a,Object(F.a)({},Se,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:st}),g.a.createElement(he.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},g.a.createElement(Ee.a,null)),g.a.createElement(he.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},g.a.createElement(Ee.a,null)),g.a.createElement("div",{className:"flex-container flex-end"},g.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(D.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},pe=c("7ahc"),me=c("k1fw"),ee=c("HmJG"),re=c("BjJ7"),Z=he.a.useForm,ue={width:280,marginRight:10},V={labelCol:{span:5},wrapperCol:{span:19}},J=function(qe){var at=qe.callback,dt=qe.onCancel,st=Z(),St=Object(d.a)(st,1),Ft=St[0],Vt=Object(i.useRef)();function Kt(ar){at(Object(me.a)(Object(me.a)({},ar),{},{name:Vt.current}))}function At(ar,Ct){Ft.setFieldsValue({src:"/api/attachments/".concat(ar.id,"?type=").concat(ar.content_type),type:Ct.type})}function jt(ar){var Ct=ar.target.files[0];Vt.current=Ct.name,q(Ct,At)}return g.a.createElement(he.a,Object(F.a)({form:Ft},V,{className:"upload-image-panel",onFinish:Kt}),g.a.createElement(he.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},g.a.createElement("div",{className:"flex-container"},g.a.createElement(he.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},g.a.createElement(Ee.a,{style:ue})),g.a.createElement(Ce,{onFileChange:jt}))),g.a.createElement(he.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},g.a.createElement(Ee.a,{style:{width:264}})),g.a.createElement(he.a.Item,{style:{textAlign:"right"}},g.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(D.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))};function Ce(qe){var at=qe.onFileChange;return g.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",g.a.createElement("input",{type:"file",onChange:at}))}function q(qe,at){if(!qe)throw new String("\u6CA1\u6709\u6587\u4EF6");var dt=new FormData;dt.append("editormd-image-file",qe),dt.append("file_param_name","editormd-image-file"),dt.append("byxhr","true");var st=new window.XMLHttpRequest;st.withCredentials=!0,st.addEventListener("load",function(St){at(JSON.parse(St.target.responseText),qe)},!1),st.addEventListener("error",function(St){console.error(St)},!1),st.open("POST","".concat(re.a,"/api/attachments.json")),st.send(dt)}var H=c("giR+"),T=c("fyUT"),W=c("7Kak"),we=c("9yH6"),ye=we.a.Group,Oe={margin:"0 8px"},Be=function(qe){var at=qe.callback,dt=qe.onCancel;function st(St){at(St)}return g.a.createElement(he.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:st},g.a.createElement("div",{className:"flex-container"},g.a.createElement("span",{style:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),g.a.createElement("span",{style:Oe},"\u884C\u6570"),g.a.createElement(he.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},g.a.createElement(T.a,null)),g.a.createElement("span",{style:Oe},"\u5217\u6570"),g.a.createElement(he.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},g.a.createElement(T.a,null))),g.a.createElement("div",{className:"flex-container",style:{marginTop:12}},g.a.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),g.a.createElement(he.a.Item,{name:"align"},g.a.createElement(ye,null,g.a.createElement(we.a,{value:"default"},g.a.createElement("i",{className:"fa fa-align-justify"})),g.a.createElement(we.a,{value:"left"},g.a.createElement("i",{className:"fa fa-align-left"})),g.a.createElement(we.a,{value:"center"},g.a.createElement("i",{className:"fa fa-align-center"})),g.a.createElement(we.a,{value:"right"},g.a.createElement("i",{className:"fa fa-align-right"}))))),g.a.createElement("div",{className:"flex-container flex-end"},g.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(D.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},Fe=c("ErOA"),Ue=c("7Cbv"),Ge="link",Ye="upload-image",Xe="code-block",Je="add-table",Ne="------------",nt={default:Ne,left:":".concat(Ne),center:":".concat(Ne,":"),right:"".concat(Ne,":")},ot=c("9VGf"),Ve,$e;function Ie(){}var De=0,Le=1e4,_e="\u2581",Te=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function ke(qe){return/^\d+$/.test(qe)?"".concat(qe,"px"):qe}var Ae=navigator.platform.toUpperCase().indexOf("MAC")>=0,ze=Ae?"Cmd":"Ctrl",je=["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"],Ze=(Ve={},Object(a.a)(Ve,ze+"-B","bold"),Object(a.a)(Ve,ze+"-I","italic"),Ve),ht=($e={},Object(a.a)($e,Ge,"\u6DFB\u52A0\u94FE\u63A5"),Object(a.a)($e,Xe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(a.a)($e,Ye,"\u6DFB\u52A0\u6587\u4EF6"),Object(a.a)($e,Je,"\u6DFB\u52A0\u8868\u683C"),$e),Tt=G.a=function(qe){var at=qe.defaultValue,dt=at===void 0?"":at,st=qe.onChange,St=qe.width,Ft=St===void 0?"100%":St,Vt=qe.height,Kt=Vt===void 0?400:Vt,At=qe.miniToolbar,jt=At===void 0?!1:At,ar=qe.isFocus,Ct=ar===void 0?!1:ar,hr=qe.watch,Jt=qe.insertTemp,nr=qe.mode,sr=nr===void 0?"markdown":nr,yr=qe.id,Tr=yr===void 0?"markdown-editor-id":yr,Ut=qe.showResizeBar,mt=Ut===void 0?!1:Ut,Xt=qe.noStorage,fr=Xt===void 0?!1:Xt,Mt=qe.showNullButton,It=Mt===void 0?!1:Mt,pr=qe.hidetoolBar,hn=pr===void 0?!1:pr,Vr=qe.fullScreen,rt=Vr===void 0?!1:Vr,Ot=qe.onBlur,Hr=qe.onCMBeforeChange,wr=qe.onFullScreen,fn=qe.className,wn=fn===void 0?"":fn,oe=qe.disablePaste,x=oe===void 0?!1:oe,A=qe.placeholder,ie=A===void 0?"":A,be=qe.values,ne=be===void 0?"":be,Me=Object(i.useState)(null),Qe=Object(d.a)(Me,2),He=Qe[0],wt=Qe[1],tt=Object(i.useState)(dt),Nt=Object(d.a)(tt,2),Yt=Nt[0],qt=Nt[1],Yr=Object(i.useState)(hr),Jr=Object(d.a)(Yr,2),br=Jr[0],$r=Jr[1],Hn=Object(i.useState)(rt),Wr=Object(d.a)(Hn,2),Nr=Wr[0],Cn=Wr[1],An=Object(i.useState)(""),on=Object(d.a)(An,2),gn=on[0],zr=on[1],ti=Object(i.useState)(0),Wn=Object(d.a)(ti,2),Zr=Wn[0],Qr=Wn[1],Mn=Object(i.useState)(Kt),Nn=Object(d.a)(Mn,2),Pn=Nn[0],mr=Nn[1],$t=Object(i.useState)(!1),Ar=Object(d.a)($t,2),Zt=Ar[0],Rr=Ar[1],ct=Object(i.useRef)(Object(Ue.a)()),vt=Object(i.useRef)(!1),yt=Object(i.useRef)(),gt=Object(i.useRef)(),Bt=Object(i.useRef)(),bt=Object(i.useRef)(),Rt=Object(i.useRef)(),ur=function(){var Et=Object(p.a)(l.a.mark(function Dt(){var ut,Lt;return l.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.next=2,Object(Fe.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:ct.current}});case 2:Lt=Qt.sent,Lt!=null&&(ut=Lt.attachments)!==null&&ut!==void 0&&ut.length&&(console.log("cm:",He,gt),Lt.attachments.map(function(Gt){Gt.content_type.indexOf("image")>-1?He.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):Gt.content_type.indexOf("video")>-1?He.replaceSelection('<video width="100%" controls src="'.concat(se.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):Gt.content_type.indexOf("pdf")>-1?He.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,'&disposition=inline" target="_blank">').concat(Gt.name,"</a>")):He.replaceSelection("[".concat(Gt.name,"](").concat(se.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}));case 4:case"end":return Qt.stop()}},Dt)}));return function(){return Et.apply(this,arguments)}}();Object(i.useEffect)(function(){qt(ne),He==null||He.setValue(ne)},[ne]),Object(i.useEffect)(function(){wr==null||wr(Nr)},[Nr]),Object(i.useEffect)(function(){if(gt.current){var Et=v.a.fromTextArea(gt.current,{mode:sr,lineNumbers:!jt,lineWrapping:!0,value:dt,autoCloseTags:!0,autoCloseBrackets:!0});Ct&&Et.focus();function Dt(ut,Lt){if(x){Lt.preventDefault();return}var Ht=Lt.clipboardData;if(Ht){var Qt=Ht.types.toString(),Gt=Ht.items;if(Qt==="Files"||Ht.types.indexOf("Files")>-1){if(Lt.preventDefault(),sr=="stex")return;try{var lr,Er=Gt[1];((lr=Gt[0])===null||lr===void 0?void 0:lr.kind)==="file"&&(Er=Gt[0]);var Wt=Er.getAsFile(),Gr=Wt.name.split(".").pop();q(Wt,function(er){if(er.id){var _r,tr,en;(Wt==null||((_r=Wt.type)===null||_r===void 0)?void 0:_r.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(er.id,"?type=").concat(er.content_type,")")):(Wt==null||((tr=Wt.type)===null||tr===void 0)?void 0:tr.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,'"></video>')):(Wt==null||((en=Wt.type)===null||en===void 0)?void 0:en.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(Wt.type,'&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):je.includes(Gr)?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,'?type=office&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):Et.replaceSelection("[".concat(Wt.name,"](").concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,")"))}else(er==null?void 0:er.status)===401&&(document.location.href="/user/login")})}catch(er){b.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Et.on("paste",Dt),Et.on("dragleave",function(ut,Lt){Bt.current.classList.remove("mouse-hover-md")}),Et.on("dragover",function(ut,Lt){Bt.current.classList.add("mouse-hover-md")}),Et.on("drop",function(ut,Lt){Bt.current.classList.add("mouse-hover-md");var Ht;if(Ht=Lt.dataTransfer.files,Ht.length>0){Lt.preventDefault(),Lt.stopPropagation();for(var Qt=function(Er){var Wt=Ht[Er],Gr=Wt.name.split(".").pop();q(Wt,function(er){if(er.id){var _r,tr,en;(Wt==null||((_r=Wt.type)===null||_r===void 0)?void 0:_r.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(er.id,"?type=").concat(er.content_type,")")):(Wt==null||((tr=Wt.type)===null||tr===void 0)?void 0:tr.indexOf("video"))>-1?Et.replaceSelection('<video width="100%" controls src="'.concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,'"></video>')):(Wt==null||((en=Wt.type)===null||en===void 0)?void 0:en.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(Wt.type,'&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):je.includes(Gr)?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,'?type=office&disposition=inline" target="_blank">').concat(Wt.name,"</a>")):Et.replaceSelection("[".concat(Wt.name,"](").concat(se.a.API_SERVER,"/api/attachments/").concat(er.id,"?type=").concat(er.content_type,")"))}else(er==null?void 0:er.status)===401&&(document.location.href="/user/login")})},Gt=0;Gt<Ht.length;Gt++)Qt(Gt)}}),wt(Et),function(){Et.off("paste",Dt)}}},[]);var gr=Object(i.useCallback)(function(){if(Bt.current)try{}catch(Et){console.log(Et,"---- to set md editor body height")}},[Pn,Bt,Nr]);Object(i.useEffect)(function(){function Et(){var ut=new w.default(function(Lt){var Ht=Object(S.a)(Lt),Qt;try{for(Ht.s();!(Qt=Ht.n()).done;){var Gt=Qt.value;(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&(gr(),He.setSize("100%","100%"),He.refresh())}}catch(lr){Ht.e(lr)}finally{Ht.f()}});return ut.observe(gt.current.parentElement),ut}if(He){var Dt=Et();return function(){Dt.unobserve(gt.current.parentElement)}}},[He,gr]),Object(i.useEffect)(function(){if(He){for(var Et=[],Dt=function(){var Gt=Lt[ut];Ht=Object(d.a)(Gt,2);var lr=Ht[0],Er=Ht[1],Wt=Object(a.a)({},lr,function(){qr(Er)});Et.push(Wt),He.addKeyMap(Wt)},ut=0,Lt=Object.entries(Ze);ut<Lt.length;ut++){var Ht;Dt()}return yt.current=setInterval(function(){vt.current&&ur()},4e3),function(){clearInterval(yt.current);var Qt=Object(S.a)(Et),Gt;try{for(Qt.s();!(Gt=Qt.n()).done;){var lr=Gt.value;He.removeKeyMap(lr)}}catch(Er){Qt.e(Er)}finally{Qt.f()}}}},[He]),Object(i.useEffect)(function(){rt!==Nr&&Cn(rt)},[rt]),Object(ot.a)(function(){if(!fr&&Zr>0){var Et=new Date().getTime(),Dt=window.sessionStorage.getItem(Tr);Et>=Zr+Le&&(!Dt||Dt!==Yt)&&(window.sessionStorage.setItem(Tr,Yt),Rr(!0))}},Le),Object(i.useEffect)(function(){$r(hr)},[He,hr]),Object(i.useEffect)(function(){He&&(Ct&&He.focus())},[He,Ct]),Object(i.useEffect)(function(){if(br&&He){var Et=He.getScrollerElement();function Dt(ut){var Lt=ut.target;if(Rt.current){var Ht=Lt.scrollTop/Lt.scrollHeight;Rt.current.scrollTop=Rt.current.scrollHeight*Ht}}return Et.addEventListener("scroll",Dt),function(){Et.removeEventListener("scroll",Dt)}}},[He,br]),Object(i.useEffect)(function(){if(He&&Hr){function Et(Dt,ut){Hr(Dt,ut)}return He.on("beforeChange",Et),function(){He.off("beforeChange",Et)}}},[He,Hr]),Object(i.useEffect)(function(){if(He&&Ot){function Et(){Ot(He.getValue())}return He.on("blur",Et),function(){He.off("blur",Et)}}},[He,Ot]),Object(i.useEffect)(function(){if(He){function Et(Dt){var ut=Dt.getValue();qt(ut),Qr(new Date().getTime()),Dt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),st&&st(ut)}return He.on("change",Et),function(){He.off("change",Et)}}},[He,st]),Object(i.useEffect)(function(){He&&(dt==null?(He.setValue(""),qt("")):dt!==He.getValue()&&(He.setValue(dt),qt(dt),He.setCursor(He.lineCount(),0)))},[He,dt]);var qr=Object(i.useCallback)(function(Et){var Dt=He.getCursor(),ut=He.getSelection(),Lt=ut.split(`
`);switch(Et){case"bold":return He.replaceSelection("**"+ut+"**"),ut===""&&He.setCursor(Dt.line,Dt.ch+2),He.focus();case"italic":return He.replaceSelection("*"+ut+"*"),ut===""&&He.setCursor(Dt.line,Dt.ch+1),He.focus();case"code":return He.replaceSelection("`"+ut+"`"),ut===""&&He.setCursor(Dt.line,Dt.ch+1),He.focus();case"inline-latex":return He.replaceSelection("`$$"+ut+"$$`"),ut===""&&He.setCursor(Dt.line,Dt.ch+3),He.focus();case"latex":return He.replaceSelection("```latex\n"+ut+"\n```"),He.setCursor(Dt.line+1,ut.length+1),He.focus();case"line-break":return He.replaceSelection(`<br/>
`),He.focus();case"list-ul":return ut===""?He.replaceSelection("- "+ut):He.replaceSelection(Lt.map(function(Ht){return Ht===""?"":"- ".concat(Ht)}).join(`
`)),He.focus();case"list-ol":return ut===""?He.replaceSelection("1. "+ut):He.replaceSelection(Lt.map(function(Ht,Qt){return Ht===""?"":"".concat(Qt+1,". ").concat(Ht)}).join(`
`)),He.focus();case"add-null-ch":return ut===""&&He.setCursor(Dt.line,Dt.ch+1),He.replaceSelection(_e),He.focus();case"inster-template-1":return ut===""&&He.setCursor(Dt.line,Dt.ch),He.replaceSelection(Te),He.focus();case"eraser":return He.setValue(""),He.focus();case"trigger-watch":return $r(!br),He.focus();case"trigger-full-screen":return Cn(!Nr),He.focus();case Ge:zr(Ge);return;case Xe:zr(Xe);return;case Ye:zr(Ye);return;case Je:zr(Je);return;default:throw new Error}},[He,br,Nr]),cr=Object(i.useCallback)(function(Et){zr("");switch(gn){case Ge:var Dt=Et.title,ut=Et.link;return He.replaceSelection("[".concat(Dt,"](").concat(ut,")")),He.focus();case Xe:var Lt=Et.language,Ht=Et.content;return He.replaceSelection(["```"+Lt,Ht,"```"].join(`
`)),He.focus();case Ye:var Qt=Et.src,Gt=Et.alt,lr=Et.name;return Qt.indexOf("type=image")>-1?He.replaceSelection("![ ".concat(Gt||""," ]( ").concat(Qt,' "').concat(Gt||"",'" )')):Qt.indexOf("type=application/pdf")>-1?He.replaceSelection('<a href="'.concat(Qt,'&disposition=inline" target="_blank">').concat(lr,"</a>")):He.replaceSelection('<a href="'.concat(Qt,'" target="_blank">').concat(lr,"</a>")),He.focus();case Je:for(var Er=Et.row,Wt=Et.col,Gr=Et.align,er=`
`,_r=0;_r<Er;_r++){for(var tr=[],en=[],jn=0;jn<Wt;jn++)_r===1&&en.push(nt[Gr]),tr.push(" ");_r===1&&(er+="| ".concat(en.join(" | "),` |
`)),er+="| ".concat(tr.join(Wt===1?"":" | "),` |
`)}return He.replaceSelection(er+`
`),He.focus();default:throw new Error}},[He,gn]),Cr=Object(i.useMemo)(function(){switch(gn){case Ge:return g.a.createElement(ae,{callback:cr,onCancel:Dr});case Xe:return g.a.createElement(pe.b,{callback:cr,onCancel:Dr});case Ye:return g.a.createElement(J,{callback:cr,onCancel:Dr});case Je:return g.a.createElement(Be,{callback:cr,onCancel:Dr});default:return null}},[gn]);function Dr(){zr("")}Object(i.useEffect)(function(){if(bt.current){var Et=bt.current,Dt=!1,ut=0;function Lt(Gt){Dt=!0,ut=Gt.pageY}function Ht(){Dt=!1}function Qt(Gt){if(Dt){var lr=Gt.pageY-ut;lr<0&&(lr=0),lr>300&&(lr=300);var Er=Kt+lr+"px";mr(Er)}}return Et.addEventListener("mousedown",Lt),document.addEventListener("mousemove",Qt),document.addEventListener("mouseup",Ht),function(){Et.removeEventListener("mousedown",Lt),document.removeEventListener("mousemove",Qt),document.removeEventListener("mouseup",Ht)}}},[He,bt]),Object(i.useEffect)(function(){mr(Kt)},[Kt]);var Br=ke(Ft),Fr=ke(Pn),Ln={width:Br,height:Fr},ri=Object(i.useMemo)(function(){if(Zr){var Et=new Date(Zr),Dt=Et.getHours(),ut=Et.getMinutes(),Lt=Et.getSeconds();return Dt=Dt<10?"0"+Dt:Dt,ut=ut<10?"0"+ut:ut,Lt=Lt<10?"0"+Lt:Lt,"".concat(Dt,":").concat(ut,":").concat(Lt)}return 0},[Zr]);function In(){window.sessionStorage.removeItem(Tr),Rr(!1),Qr(0)}function vn(){Rr(!1),Qr(0),He.setValue(window.sessionStorage.getItem(Tr))}function En(Et,Dt){var ut=He.getValue();ut=ut.replace(Et,Dt),qt(ut),He==null||He.setValue(ut)}return g.a.createElement(i.Fragment,null,g.a.createElement("div",{className:"markdown-editor-wrapper",ref:Bt},g.a.createElement("div",{className:"markdown-editor-container ".concat(wn," ").concat(br?"on-preview":""," ").concat(jt?"mini":""," ").concat(Nr?"full-screen":""),style:Ln},g.a.createElement(U,{insertTemp:Jt,watch:br,fullScreen:Nr,showNullButton:It,onActionCallback:qr,hidetoolBar:hn,uuid:ct.current,setOpenPhones:function(){vt.current=!0}}),g.a.createElement("div",{className:"markdown-editor-body"},g.a.createElement("div",{className:"codemirror-container"},g.a.createElement("textarea",{ref:gt,placeholder:ie})),br?g.a.createElement("div",{ref:Rt,className:"preview-container"},sr==="stex"&&g.a.createElement(Y,{value:Yt}),sr!=="stex"&&g.a.createElement(y.a,{edit:!0,value:Yt,replaces:En})):null))),mt?g.a.createElement("a",{ref:bt,className:"editor-resize"}):null,g.a.createElement(R.a,null,ht[gn]?g.a.createElement(o.a,{centered:!0,title:ht[gn],visible:!0,onCancel:Dr,footer:null},Cr):null))}},"P/tu":function(u,G,c){"use strict";var h=c("ozfa"),o=c("MJZm"),S=c("0Owb"),E=c("9og8"),b=c("tJVT"),p=c("PpiC"),d=c("WmNS"),a=c.n(d),s=c("q1tI"),l=c.n(s),i=c("WCUW"),g=c("spXi"),m=c.n(g),v=function(_){var k=_.value,O=_.onChange,M=_.defaultValue,I=_.disabled,B=Object(p.a)(_,["value","onChange","defaultValue","disabled"]),N=Object(s.useState)([]),y=Object(b.a)(N,2),Y=y[0],X=y[1],P=Object(s.useState)("1"),F=Object(b.a)(P,2),K=F[0],Q=F[1];Object(s.useEffect)(function(){ce()},[]);var ce=function(){var se=Object(E.a)(a.a.mark(function $(){var j,U;return a.a.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,Object(i.z)({});case 2:j=C.sent,j!=null&&j.data&&(U=[{title:l.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:m.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:l.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:fe(j.data||[])}],X(U),Q("2"));case 4:case"end":return C.stop()}},$)}));return function(){return se.apply(this,arguments)}}(),fe=function($){function j(U){var R=U.children,C=Array.isArray(R)&&R.length>0,D=U==null?void 0:U.group_id;return{title:l.a.createElement("div",{title:U==null?void 0:U.name,className:m.a.name},U==null?void 0:U.name),value:D,key:D,icon:l.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:C?R==null?void 0:R.map(function(le){return j(le)}):[]}}return $==null?void 0:$.map(function(U){return j(U)})},z=M?{defaultExpandedKeys:[0]}:{selectedKeys:k,defaultExpandedKeys:k};return l.a.createElement("div",{className:m.a.customTree},l.a.createElement(o.a,Object(S.a)({key:K},z,{showIcon:!0,treeData:Y,onSelect:O,disabled:I},B)))};G.a=v},PD8m:function(u,G){u.exports={name:"memoryStorage",read:h,write:o,each:S,remove:E,clearAll:b};var c={};function h(p){return c[p]}function o(p,d){c[p]=d}function S(p){for(var d in c)c.hasOwnProperty(d)&&p(c[d],d)}function E(p){delete c[p]}function b(p){c={}}},PHyj:function(u,G,c){"use strict";c.r(G),c.d(G,"Types",function(){return Te});var h=c("P2fV"),o=c("NJEC"),S=c("CiB2"),E=c("DYRE"),b=c("zeV3"),p=c("sRBo"),d=c("kaz8"),a=c("7Kak"),s=c("9yH6"),l=c("giR+"),i=c("fyUT"),g=c("6UJt"),m=c("DFOY"),v=c("OaEy"),w=c("2fM7"),_=c("rAM+"),k=c("T2oS"),O=c("W9HT"),M=c("+L6B"),I=c("2/Rp"),B=c("oBTY"),N=c("miYZ"),y=c("tsqr"),Y=c("9og8"),X=c("y8nQ"),P=c("Vl3Y"),F=c("tJVT"),K=c("k1fw"),Q=c("fu2T"),ce=c("gK9i"),fe=c("2qtc"),z=c("kLXV"),se=c("5NDa"),$=c("5rEg"),j=c("WmNS"),U=c.n(j),R=c("q1tI"),C=c.n(R),D=c("uMZB"),le=c.n(D),he=c("jrin"),ve,Ee=w.a.Option,Se;(function(je){je[je.language=0]="language",je[je.difficult=1]="difficult",je[je.category=2]="category",je[je.openOrNot=3]="openOrNot"})(Se||(Se={}));var ae=(ve={},Object(he.a)(ve,Se.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(he.a)(ve,Se.difficult,[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}]),Object(he.a)(ve,Se.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(he.a)(ve,Se.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),ve);function pe(je){return ae[je].map(function(Ze){return C.a.createElement(Ee,{key:Ze.title,value:Ze.key}," ",Ze.title," ")})}function me(je,Ze){je.map(function(ht){var Tt=ht.id,qe=ht.name,at=ht.sub_disciplines,dt={value:Tt,label:qe};Ze.push(dt),at&&at.length>0&&(dt.children=[],me(at,dt.children))})}function ee(je,Ze){for(var ht=[],Tt=0;Tt<je.length;Tt++){var qe,at=je[Tt];if(((qe=at.sub_disciplines)===null||qe===void 0?void 0:qe.length)>0){ht[0]=at.id;for(var dt=0;dt<at.sub_disciplines.length;dt++){var st=at.sub_disciplines[dt];if(st.id===Ze)return ht[1]=st.id,[ht,st.tag_disciplines||st.sub_disciplines||[]]}}}return[ht,[]]}var re=c("Ty5D"),Z=c("J66h"),ue=c("GIiI"),V=c("2BaD"),J=c("Ot1p"),Ce=c("ErOA");function q(){return Object(Ce.c)("problems/new.json")}function H(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"question";return Object(Ce.c)("disciplines.json",{source:je})}function T(je){return Object(Ce.c)("problems/".concat(je,"/edit.json"))}function W(je,Ze){return Object(Ce.g)("problems/".concat(je,".json"),Ze)}function we(je){return Object(Ce.f)("problems.json",je)}function ye(je,Ze){return Object(Ce.f)("exercises/".concat(je,"/exercise_questions.json"),Ze)}function Oe(je,Ze){return Object(Ce.g)("exercise_questions/".concat(je,".json"),Ze)}function Be(je){return Object(Ce.f)("problems/".concat(je,"/publish.json"))}function Fe(je){return Object(Ce.f)("problems/".concat(je,"/cancel_publish.json"))}function Ue(je){return Object(Ce.c)("problems/".concat(je,"/start.json"))}function Ge(je,Ze){return Object(Ce.f)("tag_disciplines.json",{name:Ze,sub_discipline_id:je})}var Ye=c("V0Rq"),Xe=c("cDPC"),Je=c("EHPI"),Ne=c("m3rI"),nt=c("u2Z1"),ot=c("P/tu"),Ve=c("B7Ph"),$e=$.a.TextArea,Ie=z.a.confirm,De=ce.a.Panel;function Le(){return new Date().getTime()}var _e={loading:!0,user:null,disciplines:[],dicts:null,status:0,data:void 0,lastedUpdateTime:0},Te;(function(je){je[je.SET_INITAL_DATA=0]="SET_INITAL_DATA",je[je.SET_LOADING=1]="SET_LOADING",je[je.SET_STATUS=2]="SET_STATUS"})(Te||(Te={}));function ke(je,Ze){switch(Ze.type){case Te.SET_INITAL_DATA:return Object(K.a)(Object(K.a)({},je),Ze.payload);case Te.SET_LOADING:return Object(K.a)(Object(K.a)({},je),{},{loading:Ze.payload});case Te.SET_STATUS:return Object(K.a)(Object(K.a)({},je),{},{status:Ze.payload});default:throw new Error}}var Ae=G.default=function(){var je,Ze,ht=Object(re.h)(),Tt=Object(re.g)(),qe=Object(re.i)(),at=qe.id,dt=P.a.useForm(),st=Object(F.a)(dt,1),St=st[0],Ft=Object(R.useState)(),Vt=Object(F.a)(Ft,2),Kt=Vt[0],At=Vt[1],jt=Object(R.useState)([]),ar=Object(F.a)(jt,2),Ct=ar[0],hr=ar[1],Jt=Object(R.useState)([]),nr=Object(F.a)(Jt,2),sr=nr[0],yr=nr[1],Tr=Object(R.useReducer)(ke,_e),Ut=Object(F.a)(Tr,2),mt=Ut[0],Xt=Ut[1],fr=mt.loading,Mt=mt.data,It=mt.user,pr=mt.disciplines,hn=mt.dicts,Vr=mt.status,rt=Mt==null?void 0:Mt.hack_sets,Ot=Mt==null||((je=Mt.hack)===null||je===void 0)?void 0:je.test_set_average,Hr=ht.query,wr=Hr.callback_url,fn=Hr.express_id,wn=Hr.score,oe=Hr.question_id,x=Object(R.useState)([]),A=Object(F.a)(x,2),ie=A[0],be=A[1],ne=Object(R.useState)(!1),Me=Object(F.a)(ne,2),Qe=Me[0],He=Me[1],wt=Object(R.useState)(!1),tt=Object(F.a)(wt,2),Nt=tt[0],Yt=tt[1],qt=Object(R.useMemo)(function(){var ct=[];return pr&&me(pr,ct),ct},[pr]),Yr=Object(R.useCallback)(Object(Y.a)(U.a.mark(function ct(){var vt,yt,gt,Bt,bt,Rt,ur,gr,qr,cr,Cr,Dr,Br,Fr,Ln,ri,In,vn,En,Et,Dt,ut,Lt,Ht,Qt,Gt,lr,Er,Wt,Gr,er,_r,tr,en,jn,zn,ro,Bn,Mi,fi,Gn,_n,no,Ni,pi,Sn,Kn,yn,Xn=arguments;return U.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(vt=Xn.length>0&&Xn[0]!==void 0?Xn[0]:0,yt=pr,!(yt.length===0)){an.next=7;break}return an.next=5,H();case 5:gt=an.sent,yt=gt.disciplines;case 7:if(!at){an.next=15;break}return Bt={disciplines:yt},an.next=11,T(at);case 11:bt=an.sent,bt.message?bt.status==="401"&&(document.location.href="/user/login"):(Rt=bt.category,ur=bt.user,gr=bt.code,qr=bt.language,cr=bt.hack_sets,Cr=bt.description,Dr=bt.difficult,Br=bt.name,Fr=bt.open_or_not,Ln=bt.sub_discipline_id,ri=bt.tag_discipline_id,In=bt.time_limit,vn=bt.test_set_average,En=bt.test_set_score,Et=bt.status,Dt=bt.tag_discipline_ids,ut=bt.item_banks_group_id,Lt=bt.is_file,Ht=Lt===void 0?!1:Lt,Qt=bt.hide_actual_output,Gt=bt.code_compile_score,lr=bt.standard_answer,Er=ee(yt,Ln),Wt=Object(F.a)(Er,2),Gr=Wt[0],er=Wt[1],He(Qt),_r=Ht?[{input:"",output:"",score:100,position:1}]:cr,Ht?(yr(cr),St.setFieldsValue({hack_sets:_r})):yr([]),tr=ht.query.lastedUpdateTime,Bt=Object(K.a)(Object(K.a)({},Bt),{},{loading:!1,user:ur,dicts:er,status:Et,lastedUpdateTime:vt||(tr||0),data:{hack_codes:{language:qr,code:Z.Base64.decode(gr)},hack:{category:Rt,difficult:Dr,name:Br,description:Cr,open_or_not:Fr,time_limit:In,test_set_average:vn,test_set_score:En,sub_discipline_id:Gr,tag_discipline_ids:Dt,standard_answer:lr,score:wn||1,item_banks_group_ids:ut,is_file:Ht,code_compile_score:Gt},hack_sets:_r,tags:Dt}}),parseInt(Gt)>0&&Yt(!0),Xt({type:Te.SET_INITAL_DATA,payload:Bt}),At({hack:{category:Rt,difficult:Dr,name:Br,description:Cr,open_or_not:Fr,time_limit:In,test_set_average:vn,test_set_score:En,sub_discipline_id:Gr,tag_discipline_ids:Dt,score:wn||1,item_banks_group_ids:ut,is_file:Ht}}),Jr(Gr==null?void 0:Gr[0],Gr==null?void 0:Gr[1],yt)),an.next=25;break;case 15:return an.next=17,q();case 17:zn=an.sent,ro=zn.user,Bn=ht.query,Mi=Bn.difficult,fi=Bn.sub_discipline_id,Gn=Bn.tag_discipline_id,_n=Bn.tagIds,no=Bn.banksIds,Ni=ee(yt,parseInt(fi,10)),pi=Object(F.a)(Ni,2),Sn=pi[0],Kn=pi[1],yn=[Number(no)],Xt({type:Te.SET_INITAL_DATA,payload:{loading:!1,user:ro,disciplines:yt,status:0,dicts:Kn,data:{hack_codes:{language:"C",code:""},hack:{category:null,difficult:parseInt(Mi,10),time_limit:3,description:"",test_set_score:!0,test_set_average:!0,open_or_not:!0,sub_discipline_id:Sn,tag_discipline_id:_n&&(_n==null||((en=_n.split(","))===null||en===void 0)?void 0:en.map(function(tn){return Number(tn)})),name:"",item_banks_group_ids:yn,is_file:!1,standard_answer:""},tags:Gn?Gn==null?void 0:Gn.split(",").map(function(tn){return parseInt(tn,10)}):[],hack_sets:[{input:"",output:"",score:100,position:1}]}}}),At({hack:{category:null,difficult:parseInt(Mi,10),time_limit:3,description:"",test_set_average:!0,open_or_not:!0,sub_discipline_id:Sn,tag_discipline_id:_n&&(_n==null||((jn=_n.split(","))===null||jn===void 0)?void 0:jn.map(function(tn){return Number(tn)})),name:"",item_banks_group_id:yn,is_file:!1,standard_answer:""}}),Jr(Sn==null?void 0:Sn[0],Sn==null?void 0:Sn[1],yt);case 25:case"end":return an.stop()}},ct)})),[at,pr]);Object(R.useEffect)(function(){try{Yr()}catch(ct){console.log(ct,"----")}},[]),Object(R.useEffect)(function(){function ct(){return vt.apply(this,arguments)}function vt(){return vt=Object(Y.a)(U.a.mark(function yt(){var gt;return U.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Object(Ce.c)("item_banks_groups/mine.json");case 2:gt=bt.sent,be(gt);case 4:case"end":return bt.stop()}},yt)})),vt.apply(this,arguments)}ct()},[]);var Jr=function(vt,yt,gt){var Bt,bt,Rt,ur=gt==null||((Bt=gt.find(function(gr){return gr.id===vt}))===null||Bt===void 0||((bt=Bt.sub_disciplines)===null||bt===void 0||((Rt=bt.find(function(gr){return gr.id===yt}))===null||Rt===void 0)))?void 0:Rt.tag_disciplines};function br(ct,vt){return $r.apply(this,arguments)}function $r(){return $r=Object(Y.a)(U.a.mark(function ct(vt,yt){var gt,Bt,bt,Rt,ur,gr,qr,cr,Cr,Dr,Br,Fr,Ln,ri,In,vn,En,Et;return U.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:gt=Object(K.a)({},vt),Bt=gt.hack_sets,bt=gt.hack_codes,Rt=gt.hack,ur=gt.tags,Rt.hide_actual_output=Qe,gr=[],qr=[],cr=0,Cr=Rt!=null&&Rt.is_file?sr.map(function(Lt,Ht){return Object(K.a)(Object(K.a)({},Lt),{},{position:Ht+1})}):Bt.map(function(Lt){return Object(K.a)(Object(K.a)({},Lt),{},{is_file:!1})}),Dr=Object(_.a)(Cr);try{for(Dr.s();!(Br=Dr.n()).done;)Fr=Br.value,cr+=Fr.score,Fr.id&&Fr.id>=0?gr.push(Fr):qr.push(Fr)}catch(Lt){Dr.e(Lt)}finally{Dr.f()}if(Cr!=null&&Cr.length){ut.next=11;break}return y.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),ut.abrupt("return");case 11:if(cr+=parseInt(Rt.code_compile_score||0),!(cr!==100&&!Rt.test_set_score)){ut.next=15;break}return y.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),ut.abrupt("return");case 15:if(!(Cr!=null&&Cr.some(function(Lt){return!Lt.output}))){ut.next=18;break}return y.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),ut.abrupt("return");case 18:if(bt.code=Z.Base64.encode(bt==null?void 0:bt.code),Rt.sub_discipline_id=Rt.sub_discipline_id[1],Xt({type:Te.SET_LOADING,payload:!0}),wr||(Rt.score=Rt.difficult*100),!at){ut.next=43;break}return ut.next=25,W(at,{hack:Rt,hack_codes:bt,hack_sets:qr,update_hack_sets:gr,tags:ur});case 25:if(!wr){ut.next=38;break}return ut.next=28,Be(at);case 28:return ut.next=30,Oe(oe,{question_type:6,question_score:Rt.score,question_title:Rt.name,description:Rt.description,sub_discipline_id:Rt.sub_discipline_id,tag_discipline_ids:Rt.tag_discipline_ids,item_banks_group_ids:Rt.item_banks_group_ids,identifier:at});case 30:if(Ln=ut.sent,ri=Ln.status,!(ri===0)){ut.next=36;break}if(!(yt==="start")){ut.next=35;break}return ut.abrupt("return");case 35:Tt.replace(wr);case 36:ut.next=40;break;case 38:y.b.success("\u4FDD\u5B58\u6210\u529F"),Yr(Le());case 40:Xt({type:Te.SET_LOADING,payload:!1}),ut.next=66;break;case 43:return ut.next=45,we({hack:Rt,hack_codes:bt,hack_sets:Cr,tags:ur});case 45:if(In=ut.sent,vn=In.identifier,Xt({type:Te.SET_LOADING,payload:!1}),!(yt==="start")){ut.next=50;break}return ut.abrupt("return");case 50:if(!vn){ut.next=66;break}if(wr){ut.next=55;break}Tt.replace("/problems/".concat(vn,"/edit?lastedUpdateTime=").concat(Le())),ut.next=66;break;case 55:return ut.next=57,Be(vn);case 57:if(at){ut.next=65;break}return ut.next=60,ye(parseInt(fn,10),{question_type:6,question_score:Rt.score,question_title:Rt.name,identifier:vn,tag_discipline_ids:Rt.tag_discipline_ids});case 60:En=ut.sent,Et=En.status,Et===0&&Tt.replace(wr),ut.next=66;break;case 65:Tt.replace(wr);case 66:case"end":return ut.stop()}},ct)})),$r.apply(this,arguments)}function Hn(){St.submit(),setTimeout(Object(Y.a)(U.a.mark(function ct(){var vt;return U.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Be(at);case 2:vt=gt.sent,vt.status===0?(y.b.success("\u53D1\u5E03\u6210\u529F"),Xt({type:Te.SET_STATUS,payload:1})):y.b.info(vt.message);case 4:case"end":return gt.stop()}},ct)})),400)}function Wr(){return Nr.apply(this,arguments)}function Nr(){return Nr=Object(Y.a)(U.a.mark(function ct(){var vt;return U.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Fe(at);case 2:vt=gt.sent,vt.status===0?(y.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),Xt({type:Te.SET_STATUS,payload:0})):y.b.info(vt.message);case 4:case"end":return gt.stop()}},ct)})),Nr.apply(this,arguments)}function Cn(){Vr===0?Ie({title:"\u63D0\u793A",content:C.a.createElement(R.Fragment,null," ",C.a.createElement("div",null,"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802")," ",C.a.createElement("div",null," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")," "),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){Hn()}}):Ie({title:"\u63D0\u793A",content:C.a.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){Wr()}})}function An(){return on.apply(this,arguments)}function on(){return on=Object(Y.a)(U.a.mark(function ct(){return U.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.t0=br,yt.next=3,St.getFieldValue();case 3:yt.t1=yt.sent,(0,yt.t0)(yt.t1,"start"),setTimeout(Object(Y.a)(U.a.mark(function gt(){var Bt,bt;return U.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.next=2,Ue(at);case 2:Bt=ur.sent,bt=Bt.identifier,window.location.href="/myproblems/".concat(bt);case 5:case"end":return ur.stop()}},gt)})),400);case 6:case"end":return yt.stop()}},ct)})),on.apply(this,arguments)}function gn(){wr?Tt.replace(wr):Tt.replace("/problemset")}var zr=function(vt){var yt=parseInt(St.getFieldValue("hack").code_compile_score)||0,gt=Math.floor((100-yt)/vt.length),Bt=gt+(100-yt)%vt.length;vt=vt.map(function(bt,Rt){return Rt===vt.length-1?Object(K.a)(Object(K.a)({},bt),{},{score:Bt}):Object(K.a)(Object(K.a)({},bt),{},{score:gt})}),yr(vt)};function ti(ct){ct.target.value||zr(sr),Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack:Object(K.a)(Object(K.a)({},Mt.hack),{},{test_set_score:ct.target.value})})}})}function Wn(ct){Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack:Object(K.a)(Object(K.a)({},Mt.hack),{},{is_file:ct.target.value})})}})}function Zr(ct){He(ct.target.checked)}function Qr(ct){var vt=ct.target.value;vt&&zr(sr),Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack:Object(K.a)(Object(K.a)({},Mt.hack),{},{test_set_average:vt})})}})}function Mn(){var ct=St.getFieldValue("hack_sets"),vt=parseInt(St.getFieldValue("hack").code_compile_score)||0,yt=ct.length+1,gt=Math.floor((100-vt)/yt),Bt=(100-vt)%yt;ct.map(function(bt,Rt){return Ot&&(bt.score=gt),bt.position=Rt+1,bt}),ct.push({input:"",output:"",position:yt,score:Ot?gt+Bt:0}),St.setFieldsValue({hack_sets:ct}),Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack_sets:ct})}})}function Nn(){var ct=St.getFieldValue("hack_sets"),vt=parseInt(St.getFieldValue("hack").code_compile_score)||0,yt=ct.length,gt=Math.floor((100-vt)/yt),Bt=(100-vt)%yt;ct.map(function(bt,Rt){return Ot&&(bt.score=gt,Rt===ct.length-1&&(bt.score=gt+Bt)),bt.position=Rt+1,bt}),St.setFieldsValue({hack_sets:ct}),Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack_sets:ct})}})}Object(R.useEffect)(function(){if(Ot){var ct=parseInt(St.getFieldValue("hack").code_compile_score)||0,vt=rt==null?void 0:rt.length,yt=Math.floor((100-ct)/vt),gt=(100-ct)%vt;rt==null||rt.map(function(Bt,bt){return Bt.score=yt,Bt.position=bt+1,bt===vt-1&&(Bt.score=yt+gt),Bt}),Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack_sets:rt})}}),St.setFieldsValue({hack_sets:rt})}},[Ot]);function Pn(ct){var vt=St.getFieldValue("hack_sets"),yt=parseInt(St.getFieldValue("hack").code_compile_score)||0,gt=(vt==null?void 0:vt.length)-1,Bt=Math.ceil((100-yt)/gt),bt=(100-yt)%gt;vt.splice(ct,1),vt==null||vt.map(function(Rt,ur){return Ot&&(Rt.score=Bt,ur===gt-1&&(Rt.score=Bt+bt)),Rt.position=ur+1,Rt}),Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack_sets:vt})}}),St.setFieldsValue({hack_sets:vt})}function mr(ct){Xt({type:Te.SET_INITAL_DATA,payload:{data:Object(K.a)(Object(K.a)({},Mt),{},{hack_codes:Object(K.a)(Object(K.a)({},Mt.hack_codes),{},{language:ct})})}})}var $t=function(vt){var yt;if(vt!=null&&(yt=vt.hack)!==null&&yt!==void 0&&yt.sub_discipline_id){var gt,Bt,bt,Rt,ur,gr=vt==null||((gt=vt.hack)===null||gt===void 0)?void 0:gt.sub_discipline_id,qr=Object(F.a)(gr,2),cr=qr[0],Cr=qr[1],Dr=pr==null||((Bt=pr.find(function(Fr){return Fr.id===cr}))===null||Bt===void 0||((bt=Bt.sub_disciplines)===null||bt===void 0||((Rt=bt.find(function(Fr){return Fr.id===Cr}))===null||Rt===void 0)))?void 0:Rt.tag_disciplines,Br=Object(K.a)(Object(K.a)({},St.getFieldsValue()),{},{hack:Object(K.a)(Object(K.a)({},(ur=St.getFieldsValue())===null||ur===void 0?void 0:ur.hack),{},{tag_discipline_ids:[]})});St.setFieldsValue(Br),At(Br)}else At(Object(K.a)({},St.getFieldsValue()))},Ar=function(vt){hr([].concat(Object(B.a)(Ct),[Object(K.a)({},vt)]))};Object(R.useEffect)(function(){var ct,vt;if(Mt!=null&&(ct=Mt.hack)!==null&&ct!==void 0&&(vt=ct.sub_discipline_id)!==null&&vt!==void 0&&vt[1]){var yt,gt;Zt(Mt==null||((yt=Mt.hack)===null||yt===void 0||((gt=yt.sub_discipline_id)===null||gt===void 0))?void 0:gt[1])}},[Mt==null||((Ze=Mt.hack)===null||Ze===void 0)?void 0:Ze.sub_discipline_id]);var Zt=function(){var ct=Object(Y.a)(U.a.mark(function vt(yt){var gt;return U.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return bt.next=2,Object(Ye.H)({sub_discipline_id:yt});case 2:gt=bt.sent,hr(gt.tag_disciplines);case 4:case"end":return bt.stop()}},vt)}));return function(yt){return ct.apply(this,arguments)}}();function Rr(ct){var vt=ct[1],yt=ee(pr,vt),gt=Object(F.a)(yt,2),Bt=gt[1];St.setFieldsValue({tags:[]}),Xt({type:Te.SET_INITAL_DATA,payload:{dicts:Bt,data:Object(K.a)(Object(K.a)({},Mt),{},{hack:Object(K.a)(Object(K.a)({},Mt.hack),{},{sub_discipline_id:ct}),tags:[]})}})}return C.a.createElement(O.a,{spinning:fr,delay:500},Mt?C.a.createElement(R.Fragment,null,C.a.createElement("header",{className:le.a.header},C.a.createElement("div",null,C.a.createElement("img",{src:"".concat(Ne.a.IMG_SERVER,"/images/").concat(It==null?void 0:It.image_url),alt:"user",width:30}),C.a.createElement("span",null,It==null?void 0:It.name)),C.a.createElement("h2",null," ",Mt==null?void 0:Mt.hack.name," "),at?C.a.createElement("a",{className:le.a.btn_back,onClick:gn}," ",C.a.createElement(ue.a,null),"\u9000\u51FA"):null),C.a.createElement(P.a,{form:St,initialValues:Mt,layout:"vertical",className:le.a["oj-form-container"],onValuesChange:$t,onFinish:function(vt,yt){var gt;if(ht!=null&&(gt=ht.query)!==null&&gt!==void 0&&gt.exercise){z.a.confirm({title:"\u4FDD\u5B58\u63D0\u793A",content:"\u8BF7\u6CE8\u610F\uFF0C\u672C\u6B21\u7F16\u8F91\u4EC5\u4FEE\u6539\u8BD5\u5377\u4E2D\u7684\u7F16\u7A0B\u9898\uFF0C\u4E0D\u4F1A\u540C\u6B65\u539F\u8BD5\u9898\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){return br(vt,yt)}});return}br(vt,yt)}},C.a.createElement(Xe.a,{leftChild:C.a.createElement(ze,{onAddTestCases:Nn,form:St,handleAddKnowledgeFinish:Ar,MyGroup:ie,formValue:Kt,knowledgeOptions:Ct,onChangeLanguage:mr,onChangeSubDiscipline:Rr,onRemoveTestCase:Pn,onAddTestCase:Mn,dicts:hn,categorys:qt,callback_url:wr,hack:Mt.hack,onChangeScore:ti,onChangehide:Zr,onChangeAverage:Qr,onChangeFile:Wn,uploadData:sr,setUploadData:yr,handleUploadRatio:zr,ischecked:Qe,isshows:Nt}),rightChild:C.a.createElement(P.a.Item,{name:["hack_codes","code"],style:{marginBottom:0}},C.a.createElement(Je.a,{language:Mt.hack_codes.language}))}),C.a.createElement("div",{className:le.a.footer},at?C.a.createElement(R.Fragment,null,wr?null:C.a.createElement(I.a,{type:Vr?"default":"primary",onClick:Cn},Vr?"\u64A4\u9500\u53D1\u5E03":"\u7ACB\u5373\u53D1\u5E03"),C.a.createElement(I.a,{loading:fr,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"),C.a.createElement(I.a,{type:"primary",onClick:An},Vr?"\u5F00\u59CB\u6311\u6218":"\u6A21\u62DF\u6311\u6218")):C.a.createElement(R.Fragment,null,C.a.createElement(I.a,{onClick:gn},"\u53D6\u6D88"),C.a.createElement(I.a,{loading:fr,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"))))):null)};function ze(je){var Ze,ht,Tt,qe,at=je.form,dt=je.onAddTestCases,st=je.handleAddKnowledgeFinish,St=je.ischecked,Ft=je.MyGroup,Vt=je.formValue,Kt=je.knowledgeOptions,At=je.categorys,jt=je.hack,ar=je.callback_url,Ct=je.onChangeAverage,hr=je.onChangeScore,Jt=je.onChangehide,nr=je.onChangeFile,sr=je.onAddTestCase,yr=je.onRemoveTestCase,Tr=je.onChangeSubDiscipline,Ut=je.onChangeLanguage,mt=je.uploadData,Xt=je.setUploadData,fr=je.handleUploadRatio,Mt=je.isshows,It=((Ze=location)===null||Ze===void 0||((ht=Ze.search)===null||ht===void 0)?void 0:ht.includes("select"))||!1,pr=Object(R.useState)(Mt),hn=Object(F.a)(pr,2),Vr=hn[0],rt=hn[1],Ot=jt.test_set_average,Hr=jt.test_set_score,wr=Object(R.useState)(!1),fn=Object(F.a)(wr,2),wn=fn[0],oe=fn[1],x=function(Me,Qe){var He=Object(B.a)(mt);He.splice(Qe,1),Ot?fr(He):Xt(He)},A=function(Me,Qe){console.log(Me,Qe);var He=mt.map(function(wt,tt){return tt===Qe?Object(K.a)(Object(K.a)({},wt),{},{score:Me.target.value?Number(Me.target.value):0}):wt});Xt(He)},ie=function(Me){var Qe=mt.concat(Me);jt.test_set_average?fr(Qe):Xt(Qe)};function be(ne){ne.stopPropagation()}return C.a.createElement("div",{className:le.a["oj-left-panel"]},C.a.createElement("div",{className:le.a["oj-form-info"]},C.a.createElement("div",{className:le.a.field},C.a.createElement(P.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficult"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},C.a.createElement(w.a,{disabled:It},pe(Se.difficult))),C.a.createElement(P.a.Item,{label:"\u8BFE\u7A0B(\u5408\u7406\u7684\u8BFE\u7A0B\u5206\u7C7B\u6709\u5229\u4E8E\u5FEB\u901F\u68C0\u7D22)",name:["hack","sub_discipline_id"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},C.a.createElement(m.a,{disabled:It,allowClear:!1,options:At,placeholder:"\u8BF7\u9009\u62E9",onChange:Tr}))),C.a.createElement("div",{className:le.a.field},ar&&C.a.createElement(P.a.Item,{label:"\u5206\u6570",name:["hack","score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}],extra:C.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u5206")},C.a.createElement(i.a,{disabled:It,min:1,max:100})),C.a.createElement(P.a.Item,{label:C.a.createElement("div",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236 ",C.a.createElement("span",{className:"c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)")),name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],extra:C.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u79D2")},C.a.createElement(i.a,{min:3})),C.a.createElement(P.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack_codes","language"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},C.a.createElement(w.a,{onChange:Ut},pe(Se.language)))),C.a.createElement(P.a.Item,{label:C.a.createElement("span",null,"\u77E5\u8BC6\u70B9\uFF1A",C.a.createElement("span",{className:"c-grey-999"},"\uFF08\u6240\u6709\u81EA\u5EFA\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u88ABEduCoder\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u4E3A\u5B98\u65B9\u77E5\u8BC6\u70B9\u540E\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),name:["hack","tag_discipline_ids"]},C.a.createElement(nt.a,{selectvalues:(jt==null?void 0:jt.tag_discipline_id)||(jt==null?void 0:jt.tag_discipline_ids),disabled:It,subId:Vt==null||((Tt=Vt.hack)===null||Tt===void 0||((qe=Tt.sub_discipline_id)===null||qe===void 0))?void 0:qe[1],knowledgeOptions:Kt,onAddKnowledgeFinish:st})),C.a.createElement(P.a.Item,{label:"\u52A0\u5165\u6587\u4EF6\u5939\u76EE\u5F55",name:["hack","item_banks_group_ids"],labelCol:{span:24},wrapperCol:{span:24}},C.a.createElement(ot.a,{disabled:It})),C.a.createElement(P.a.Item,{label:"\u4EFB\u52A1\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},C.a.createElement($.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",suffix:C.a.createElement("span",null,60-jt.name.length)})),C.a.createElement(P.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},C.a.createElement(J.a,{miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),C.a.createElement("div",{className:"tst-case-info"},C.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," \u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!jt.is_file&&C.a.createElement(I.a,{type:"primary",ghost:!0,onClick:sr},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),C.a.createElement(P.a.Item,{name:["hack","test_set_score"]},C.a.createElement(s.a.Group,{onChange:hr},C.a.createElement(s.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",C.a.createElement("span",{className:"tip"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),C.a.createElement(s.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",C.a.createElement("span",{className:"tip"}," \uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),C.a.createElement(d.a,{style:{marginBottom:"5px"},checked:St,onChange:Jt},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),C.a.createElement(P.a.Item,{className:le.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},C.a.createElement(s.a.Group,{onChange:nr},C.a.createElement(b.a,{direction:"horizontal"},C.a.createElement(s.a,{value:!1},"\u6587\u672C"),C.a.createElement(s.a,{value:!0},"\u6587\u4EF6")))),!jt.test_set_score&&C.a.createElement(P.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},C.a.createElement(s.a.Group,{onChange:Ct},C.a.createElement(s.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),C.a.createElement(s.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),!jt.test_set_score&&C.a.createElement("div",{style:{marginBottom:"20px",marginTop:"-10px"}},C.a.createElement("div",{style:{display:"flex",height:"30px",marginBottom:"10px"}},C.a.createElement(d.a,{checked:Vr,style:{display:"flex",alignItems:"center"},className:le.a.checkboxs,onChange:function(Me){rt(Me.target.checked),at.setFieldsValue({hack:{code_compile_score:0}}),jt.test_set_average&&(jt.is_file?fr(mt):dt())}},"\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"),Vr&&C.a.createElement("span",{style:{display:"flex"}},C.a.createElement(P.a.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7F16\u8BD1\u5F97\u5206"}],name:["hack","code_compile_score"]},C.a.createElement(i.a,{onChange:function(){jt.test_set_average&&(jt.is_file?fr(mt):dt())},parser:function(Me){return isNaN(parseInt(Me))?"":parseInt(Me)},min:0,max:100,style:{width:"90px",margin:"5px 0px"}}))," ",C.a.createElement("span",{style:{display:"flex",alignItems:"center",marginLeft:"5px"}},"%"))),C.a.createElement("span",{style:{color:"#999",fontSize:"12px",marginLeft:"-8px"}},"\uFF08\u8BF7\u6CE8\u610F\u8BE5\u5B9E\u8BAD\u9898\u662F\u5426\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u82E5\u6CA1\u6709\u5219\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09")),jt.is_file&&C.a.createElement("div",{className:le.a.upBtn},C.a.createElement(I.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return oe(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),C.a.createElement(Ve.a,{disabled:jt==null?void 0:jt.test_set_average,inputChange:A,showScore:!jt.test_set_score,data:mt,onRemove:x})),!jt.is_file&&C.a.createElement(P.a.List,{name:"hack_sets"},function(ne,Me){return Object(S.a)(Me),C.a.createElement(ce.a,{accordion:!0},ne.map(function(Qe,He){return C.a.createElement(De,{key:"".concat(Qe.key,"--").concat(He),header:C.a.createElement("a",{className:le.a["test-case-name"]},C.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",He+1,"\b"),Hr?null:C.a.createElement(C.a.Fragment,null,C.a.createElement(P.a.Item,{name:[Qe.name,"score"],fieldKey:[Qe.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(He+1,"\u8BC4\u5206")}]},C.a.createElement(i.a,{onClick:be,min:0,max:100,disabled:Ot})),C.a.createElement("span",null,"%"))),extra:He>0?C.a.createElement("div",{onClick:be},C.a.createElement(o.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(He+1),onConfirm:function(){yr(He)}},C.a.createElement(V.a,{className:le.a["btn-remove-case"]}))):null},C.a.createElement(P.a.Item,{label:"\u8F93\u5165",name:[Qe.name,"input"],fieldKey:[Qe.fieldKey,"input"]},C.a.createElement($e,null)),C.a.createElement(P.a.Item,{label:"\u8F93\u51FA",name:[Qe.name,"output"],fieldKey:[Qe.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},C.a.createElement($e,null)))}))})),C.a.createElement(P.a.Item,{className:"mt20",label:"\u6837\u4F8B\u4EE3\u7801",name:["hack","standard_answer"],valuePropName:"defaultValue"},C.a.createElement(J.a,{miniToolbar:!0,id:"standard_answer",noStorage:!0,height:200}))),C.a.createElement(Ve.b,{rootIdentifier:null,visible:wn,onClose:function(){return oe(!1)},onOK:ie}))}},PVpz:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.StreamCipher,b=o.algo,p=[],d=[],a=[],s=b.RabbitLegacy=E.extend({_doReset:function(){var i=this._key.words,g=this.cfg.iv,m=this._X=[i[0],i[3]<<16|i[2]>>>16,i[1],i[0]<<16|i[3]>>>16,i[2],i[1]<<16|i[0]>>>16,i[3],i[2]<<16|i[1]>>>16],v=this._C=[i[2]<<16|i[2]>>>16,i[0]&4294901760|i[1]&65535,i[3]<<16|i[3]>>>16,i[1]&4294901760|i[2]&65535,i[0]<<16|i[0]>>>16,i[2]&4294901760|i[3]&65535,i[1]<<16|i[1]>>>16,i[3]&4294901760|i[0]&65535];this._b=0;for(var w=0;w<4;w++)l.call(this);for(var w=0;w<8;w++)v[w]^=m[w+4&7];if(g){var _=g.words,k=_[0],O=_[1],M=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,I=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,B=M>>>16|I&4294901760,N=I<<16|M&65535;v[0]^=M,v[1]^=B,v[2]^=I,v[3]^=N,v[4]^=M,v[5]^=B,v[6]^=I,v[7]^=N;for(var w=0;w<4;w++)l.call(this)}},_doProcessBlock:function(i,g){var m=this._X;l.call(this),p[0]=m[0]^m[5]>>>16^m[3]<<16,p[1]=m[2]^m[7]>>>16^m[5]<<16,p[2]=m[4]^m[1]>>>16^m[7]<<16,p[3]=m[6]^m[3]>>>16^m[1]<<16;for(var v=0;v<4;v++)p[v]=(p[v]<<8|p[v]>>>24)&16711935|(p[v]<<24|p[v]>>>8)&4278255360,i[g+v]^=p[v]},blockSize:128/32,ivSize:64/32});function l(){for(var i=this._X,g=this._C,m=0;m<8;m++)d[m]=g[m];g[0]=g[0]+1295307597+this._b|0,g[1]=g[1]+3545052371+(g[0]>>>0<d[0]>>>0?1:0)|0,g[2]=g[2]+886263092+(g[1]>>>0<d[1]>>>0?1:0)|0,g[3]=g[3]+1295307597+(g[2]>>>0<d[2]>>>0?1:0)|0,g[4]=g[4]+3545052371+(g[3]>>>0<d[3]>>>0?1:0)|0,g[5]=g[5]+886263092+(g[4]>>>0<d[4]>>>0?1:0)|0,g[6]=g[6]+1295307597+(g[5]>>>0<d[5]>>>0?1:0)|0,g[7]=g[7]+3545052371+(g[6]>>>0<d[6]>>>0?1:0)|0,this._b=g[7]>>>0<d[7]>>>0?1:0;for(var m=0;m<8;m++){var v=i[m]+g[m],w=v&65535,_=v>>>16,k=((w*w>>>17)+w*_>>>15)+_*_,O=((v&4294901760)*v|0)+((v&65535)*v|0);a[m]=k^O}i[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,i[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,i[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,i[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,i[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,i[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,i[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,i[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}o.RabbitLegacy=E._createHelper(s)}(),h.RabbitLegacy})},RELg:function(u,G,c){var h=c("MFOe"),o=h.Global;u.exports={name:"oldIE-userDataStorage",write:d,read:a,each:s,remove:l,clearAll:i};var S="storejs",E=o.document,b=v(),p=(o.navigator?o.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function d(w,_){if(p)return;var k=m(w);b(function(O){O.setAttribute(k,_),O.save(S)})}function a(w){if(p)return;var _=m(w),k=null;return b(function(O){k=O.getAttribute(_)}),k}function s(w){b(function(_){for(var k=_.XMLDocument.documentElement.attributes,O=k.length-1;O>=0;O--){var M=k[O];w(_.getAttribute(M.name),M.name)}})}function l(w){var _=m(w);b(function(k){k.removeAttribute(_),k.save(S)})}function i(){b(function(w){var _=w.XMLDocument.documentElement.attributes;w.load(S);for(var k=_.length-1;k>=0;k--)w.removeAttribute(_[k].name);w.save(S)})}var g=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function m(w){return w.replace(/^\d/,"___$&").replace(g,"___")}function v(){if(!E||!E.documentElement||!E.documentElement.addBehavior)return null;var w="script",_,k,O;try{k=new ActiveXObject("htmlfile"),k.open(),k.write("<"+w+">document.w=window</"+w+'><iframe src="/favicon.ico"></iframe>'),k.close(),_=k.w.frames[0].document,O=_.createElement("div")}catch(M){O=E.createElement("div"),_=E.body}return function(M){var I=[].slice.call(arguments,0);I.unshift(O),_.appendChild(O),O.addBehavior("#default#userData"),O.load(S),M.apply(this,I),_.removeChild(O);return}}},RxwV:function(u,G,c){"use strict";var h=c("q1tI"),o=c("uciX"),S=c("2W6z"),E=c.n(S),b=c("4IlW"),p=c("uK0f"),d=c.n(p);function a(pe,me){if(pe===me)return!0;if(!pe||!me)return!1;var ee=pe.length;if(me.length!==ee)return!1;for(var re=0;re<ee;re++)if(pe[re]!==me[re])return!1;return!0}function s(pe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(ee){return typeof ee}:s=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},s(pe)}function l(pe,me){if(!(pe instanceof me))throw new TypeError("Cannot call a class as a function")}function i(pe,me){for(var ee=0;ee<me.length;ee++){var re=me[ee];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(pe,re.key,re)}}function g(pe,me,ee){return me&&i(pe.prototype,me),ee&&i(pe,ee),pe}function m(pe,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(me&&me.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),me&&v(pe,me)}function v(pe,me){return v=Object.setPrototypeOf||function(re,Z){return re.__proto__=Z,re},v(pe,me)}function w(pe){var me=O();return function(){var ee=M(pe),re;if(me){var Z=M(this).constructor;re=Reflect.construct(ee,arguments,Z)}else re=ee.apply(this,arguments);return _(this,re)}}function _(pe,me){return me&&(s(me)==="object"||typeof me=="function")?me:k(pe)}function k(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function O(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(pe){return!1}}function M(pe){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(ee){return ee.__proto__||Object.getPrototypeOf(ee)},M(pe)}var I=function(){var pe=function(me){m(re,me);var ee=w(re);function re(){var Z;return l(this,re),Z=ee.apply(this,arguments),Z.menuItems={},Z.saveMenuItem=function(ue){return function(V){Z.menuItems[ue]=V}},Z}return g(re,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(ue){!ue.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(ue){var V=this.props,J=V.fieldNames,Ce=V.defaultFieldNames;return J[ue]||Ce[ue]}},{key:"getOption",value:function(ue,V){var J=this.props,Ce=J.prefixCls,q=J.expandTrigger,H=J.expandIcon,T=J.loadingIcon,W=this.props.onSelect.bind(this,ue,V),we=this.props.onItemDoubleClick.bind(this,ue,V),ye={onClick:W,onDoubleClick:we},Oe="".concat(Ce,"-menu-item"),Be=null,Fe=ue[this.getFieldName("children")]&&ue[this.getFieldName("children")].length>0;(Fe||ue.isLeaf===!1)&&(Oe+=" ".concat(Ce,"-menu-item-expand"),ue.loading||(Be=h.createElement("span",{className:"".concat(Ce,"-menu-item-expand-icon")},H))),q==="hover"&&(Fe||ue.isLeaf===!1)&&(ye={onMouseEnter:this.delayOnSelect.bind(this,W),onMouseLeave:this.delayOnSelect.bind(this),onClick:W}),this.isActiveOption(ue,V)&&(Oe+=" ".concat(Ce,"-menu-item-active"),ye.ref=this.saveMenuItem(V)),ue.disabled&&(Oe+=" ".concat(Ce,"-menu-item-disabled"));var Ue=null;ue.loading&&(Oe+=" ".concat(Ce,"-menu-item-loading"),Ue=T||null);var Ge="";return"title"in ue?Ge=ue.title:typeof ue[this.getFieldName("label")]=="string"&&(Ge=ue[this.getFieldName("label")]),h.createElement("li",Object.assign({key:ue[this.getFieldName("value")],className:Oe,title:Ge},ye,{role:"menuitem",onMouseDown:function(Xe){return Xe.preventDefault()}}),ue[this.getFieldName("label")],Be,Ue)}},{key:"getActiveOptions",value:function(ue){var V=this,J=this.props.options,Ce=ue||this.props.activeValue;return d()(J,function(q,H){return q[V.getFieldName("value")]===Ce[H]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var ue=this,V=this.props.options,J=this.getActiveOptions().map(function(Ce){return Ce[ue.getFieldName("children")]}).filter(function(Ce){return!!Ce});return J.unshift(V),J}},{key:"delayOnSelect",value:function(ue){for(var V=this,J=arguments.length,Ce=new Array(J>1?J-1:0),q=1;q<J;q++)Ce[q-1]=arguments[q];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof ue=="function"&&(this.delayTimer=window.setTimeout(function(){ue(Ce),V.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var ue=this.getShowOptions().length,V=0;V<ue;V++){var J=this.menuItems[V];J&&J.parentElement&&(J.parentElement.scrollTop=J.offsetTop)}}},{key:"isActiveOption",value:function(ue,V){var J=this.props.activeValue,Ce=J===void 0?[]:J;return Ce[V]===ue[this.getFieldName("value")]}},{key:"render",value:function(){var ue=this,V=this.props,J=V.prefixCls,Ce=V.dropdownMenuColumnStyle;return h.createElement("div",null,this.getShowOptions().map(function(q,H){return h.createElement("ul",{className:"".concat(J,"-menu"),key:H,style:Ce},q.map(function(T){return ue.getOption(T,H)}))}))}}]),re}(h.Component);return pe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},pe}(),B=I,N={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},y=N;function Y(pe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Y=function(ee){return typeof ee}:Y=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},Y(pe)}function X(pe,me){if(pe==null)return{};var ee=P(pe,me),re,Z;if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(pe);for(Z=0;Z<ue.length;Z++){if(re=ue[Z],me.indexOf(re)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(pe,re))continue;ee[re]=pe[re]}}return ee}function P(pe,me){if(pe==null)return{};var ee={},re=Object.keys(pe),Z,ue;for(ue=0;ue<re.length;ue++){if(Z=re[ue],me.indexOf(Z)>=0)continue;ee[Z]=pe[Z]}return ee}function F(pe){return fe(pe)||ce(pe)||Q(pe)||K()}function K(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q(pe,me){if(!pe)return;if(typeof pe=="string")return z(pe,me);var ee=Object.prototype.toString.call(pe).slice(8,-1);if(ee==="Object"&&pe.constructor&&(ee=pe.constructor.name),ee==="Map"||ee==="Set")return Array.from(pe);if(ee==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ee))return z(pe,me)}function ce(pe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(pe))return Array.from(pe)}function fe(pe){if(Array.isArray(pe))return z(pe)}function z(pe,me){(me==null||me>pe.length)&&(me=pe.length);for(var ee=0,re=new Array(me);ee<me;ee++)re[ee]=pe[ee];return re}function se(pe,me){if(!(pe instanceof me))throw new TypeError("Cannot call a class as a function")}function $(pe,me){for(var ee=0;ee<me.length;ee++){var re=me[ee];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(pe,re.key,re)}}function j(pe,me,ee){return me&&$(pe.prototype,me),ee&&$(pe,ee),pe}function U(pe,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(me&&me.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),me&&R(pe,me)}function R(pe,me){return R=Object.setPrototypeOf||function(re,Z){return re.__proto__=Z,re},R(pe,me)}function C(pe){var me=he();return function(){var ee=ve(pe),re;if(me){var Z=ve(this).constructor;re=Reflect.construct(ee,arguments,Z)}else re=ee.apply(this,arguments);return D(this,re)}}function D(pe,me){return me&&(Y(me)==="object"||typeof me=="function")?me:le(pe)}function le(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function he(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(pe){return!1}}function ve(pe){return ve=Object.setPrototypeOf?Object.getPrototypeOf:function(ee){return ee.__proto__||Object.getPrototypeOf(ee)},ve(pe)}var Ee=function(){var pe=function(me){U(re,me);var ee=C(re);function re(Z){var ue;se(this,re),ue=ee.call(this,Z),ue.setPopupVisible=function(J){var Ce=ue.state.value;"popupVisible"in ue.props||ue.setState({popupVisible:J}),J&&!ue.state.popupVisible&&ue.setState({activeValue:Ce}),ue.props.onPopupVisibleChange(J)},ue.handleChange=function(J,Ce,q){var H=Ce.visible;(q.type!=="keydown"||q.keyCode===b.a.ENTER)&&(ue.props.onChange(J.map(function(T){return T[ue.getFieldName("value")]}),J),ue.setPopupVisible(H))},ue.handlePopupVisibleChange=function(J){ue.setPopupVisible(J)},ue.handleMenuSelect=function(J,Ce,q){var H=ue.trigger.getRootDomNode();H&&H.focus&&H.focus();var T=ue.props,W=T.changeOnSelect,we=T.loadData,ye=T.expandTrigger;if(!J||J.disabled)return;var Oe=ue.state.activeValue;Oe=Oe.slice(0,Ce+1),Oe[Ce]=J[ue.getFieldName("value")];var Be=ue.getActiveOptions(Oe);if(J.isLeaf===!1&&!J[ue.getFieldName("children")]&&we){W&&ue.handleChange(Be,{visible:!0},q),ue.setState({activeValue:Oe}),we(Be);return}var Fe={};!J[ue.getFieldName("children")]||!J[ue.getFieldName("children")].length?(ue.handleChange(Be,{visible:!1},q),Fe.value=Oe):W&&(q.type==="click"||q.type==="keydown")&&(ye==="hover"?ue.handleChange(Be,{visible:!1},q):ue.handleChange(Be,{visible:!0},q),Fe.value=Oe),Fe.activeValue=Oe,("value"in ue.props||q.type==="keydown"&&q.keyCode!==b.a.ENTER)&&delete Fe.value,ue.setState(Fe)},ue.handleItemDoubleClick=function(){var J=ue.props.changeOnSelect;J&&ue.setPopupVisible(!1)},ue.handleKeyDown=function(J){var Ce=ue.props.children;if(Ce&&Ce.props.onKeyDown){Ce.props.onKeyDown(J);return}var q=F(ue.state.activeValue),H=q.length-1<0?0:q.length-1,T=ue.getCurrentLevelOptions(),W=T.map(function(Be){return Be[ue.getFieldName("value")]}).indexOf(q[H]);if(J.keyCode!==b.a.DOWN&&J.keyCode!==b.a.UP&&J.keyCode!==b.a.LEFT&&J.keyCode!==b.a.RIGHT&&J.keyCode!==b.a.ENTER&&J.keyCode!==b.a.SPACE&&J.keyCode!==b.a.BACKSPACE&&J.keyCode!==b.a.ESC&&J.keyCode!==b.a.TAB)return;if(!ue.state.popupVisible&&J.keyCode!==b.a.BACKSPACE&&J.keyCode!==b.a.LEFT&&J.keyCode!==b.a.RIGHT&&J.keyCode!==b.a.ESC&&J.keyCode!==b.a.TAB){ue.setPopupVisible(!0);return}if(J.keyCode===b.a.DOWN||J.keyCode===b.a.UP){J.preventDefault();var we=W;we!==-1?J.keyCode===b.a.DOWN?(we+=1,we=we>=T.length?0:we):(we-=1,we=we<0?T.length-1:we):we=0,q[H]=T[we][ue.getFieldName("value")]}else if(J.keyCode===b.a.LEFT||J.keyCode===b.a.BACKSPACE)J.preventDefault(),q.splice(q.length-1,1);else if(J.keyCode===b.a.RIGHT)J.preventDefault(),T[W]&&T[W][ue.getFieldName("children")]&&q.push(T[W][ue.getFieldName("children")][0][ue.getFieldName("value")]);else if(J.keyCode===b.a.ESC||J.keyCode===b.a.TAB){ue.setPopupVisible(!1);return}(!q||q.length===0)&&ue.setPopupVisible(!1);var ye=ue.getActiveOptions(q),Oe=ye[ye.length-1];ue.handleMenuSelect(Oe,ye.length-1,J),ue.props.onKeyDown&&ue.props.onKeyDown(J)},ue.saveTrigger=function(J){ue.trigger=J};var V=[];return"value"in Z?V=Z.value||[]:"defaultValue"in Z&&(V=Z.defaultValue||[]),E()(!("filedNames"in Z),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),ue.state={popupVisible:Z.popupVisible,activeValue:V,value:V,prevProps:Z},ue.defaultFieldNames={label:"label",value:"value",children:"children"},ue}return j(re,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(ue){var V=this.defaultFieldNames,J=this.props,Ce=J.fieldNames,q=J.filedNames;return"filedNames"in this.props?q[ue]||V[ue]:Ce[ue]||V[ue]}},{key:"getFieldNames",value:function(){var ue=this.props,V=ue.fieldNames,J=ue.filedNames;return"filedNames"in this.props?J:V}},{key:"getCurrentLevelOptions",value:function(){var ue=this,V=this.props.options,J=V===void 0?[]:V,Ce=this.state.activeValue,q=Ce===void 0?[]:Ce,H=d()(J,function(T,W){return T[ue.getFieldName("value")]===q[W]},{childrenKeyName:this.getFieldName("children")});return H[H.length-2]?H[H.length-2][this.getFieldName("children")]:F(J).filter(function(T){return!T.disabled})}},{key:"getActiveOptions",value:function(ue){var V=this;return d()(this.props.options||[],function(J,Ce){return J[V.getFieldName("value")]===ue[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var ue=this.props,V=ue.prefixCls,J=ue.transitionName,Ce=ue.popupClassName,q=ue.options,H=q===void 0?[]:q,T=ue.disabled,W=ue.builtinPlacements,we=ue.popupPlacement,ye=ue.children,Oe=ue.dropdownRender,Be=X(ue,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Fe=h.createElement("div",null),Ue="";H&&H.length>0?Fe=h.createElement(B,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ue=" ".concat(V,"-menus-empty");var Ge=Fe;return Oe&&(Ge=Oe(Fe)),h.createElement(o.a,Object.assign({ref:this.saveTrigger},Be,{popupPlacement:we,builtinPlacements:W,popupTransitionName:J,action:T?[]:["click"],popupVisible:T?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(V,"-menus"),popupClassName:Ce+Ue,popup:Ge}),h.cloneElement(ye,{onKeyDown:this.handleKeyDown,tabIndex:T?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(ue,V){var J=V.prevProps,Ce=J===void 0?{}:J,q={prevProps:ue};return"value"in ue&&!a(Ce.value,ue.value)&&(q.value=ue.value||[],"loadData"in ue||(q.activeValue=ue.value||[])),"popupVisible"in ue&&(q.popupVisible=ue.popupVisible),q}}]),re}(h.Component);return pe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:y,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},pe}(),Se=Ee,ae=G.a=Se},S6kV:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.OFB=function(){var o=h.lib.BlockCipherMode.extend(),S=o.Encryptor=o.extend({processBlock:function(E,b){var p=this._cipher,d=p.blockSize,a=this._iv,s=this._keystream;a&&(s=this._keystream=a.slice(0),this._iv=void 0),p.encryptBlock(s,0);for(var l=0;l<d;l++)E[b+l]^=s[l]}});return o.Decryptor=S,o}(),h.mode.OFB})},SJMd:function(u,G){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var c,h,o,S=!1,E,b;window.PR_SHOULD_USE_CONTINUATION=!0;var p,d;(function(){var a=window,s=["break,continue,do,else,for,if,return,while"],l=[s,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],i=[l,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],g=[i,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],m=[i,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],v=[i,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],w="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",_=[i,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],k="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",O=[s,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],M=[s,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],I=[s,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],B=[g,v,m,_,k,O,M,I],N=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,y="str",Y="kwd",X="com",P="typ",F="lit",K="pun",Q="pln",ce="tag",fe="dec",z="src",se="atn",$="atv",j="nocode",U="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function R(q){for(var H=0,T=!1,W=!1,we=0,ye=q.length;we<ye;++we){var Oe=q[we];if(Oe.ignoreCase)W=!0;else if(/[a-z]/i.test(Oe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){T=!0,W=!1;break}}var Be={b:8,t:9,n:10,v:11,f:12,r:13};function Fe(Je){var Ne=Je.charCodeAt(0);if(Ne!==92)return Ne;var nt=Je.charAt(1);return Ne=Be[nt],Ne||("0"<=nt&&nt<="7"?parseInt(Je.substring(1),8):nt==="u"||nt==="x"?parseInt(Je.substring(2),16):Je.charCodeAt(1))}function Ue(Je){if(Je<32)return(Je<16?"\\x0":"\\x")+Je.toString(16);var Ne=String.fromCharCode(Je);return Ne==="\\"||Ne==="-"||Ne==="]"||Ne==="^"?"\\"+Ne:Ne}function Ge(Je){var Ne=Je.substring(1,Je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),nt=[],ot=Ne[0]==="^",Ve=["["];ot&&Ve.push("^");for(var $e=ot?1:0,Ie=Ne.length;$e<Ie;++$e){var De=Ne[$e];if(/\\[bdsw]/i.test(De))Ve.push(De);else{var Le=Fe(De),_e;$e+2<Ie&&Ne[$e+1]==="-"?(_e=Fe(Ne[$e+2]),$e+=2):_e=Le,nt.push([Le,_e]),_e<65||Le>122||(_e<65||Le>90||nt.push([Math.max(65,Le)|32,Math.min(_e,90)|32]),_e<97||Le>122||nt.push([Math.max(97,Le)&~32,Math.min(_e,122)&~32]))}}nt.sort(function(ze,je){return ze[0]-je[0]||je[1]-ze[1]});for(var Te=[],ke=[],$e=0;$e<nt.length;++$e){var Ae=nt[$e];Ae[0]<=ke[1]+1?ke[1]=Math.max(ke[1],Ae[1]):Te.push(ke=Ae)}for(var $e=0;$e<Te.length;++$e){var Ae=Te[$e];Ve.push(Ue(Ae[0])),Ae[1]>Ae[0]&&(Ae[1]+1>Ae[0]&&Ve.push("-"),Ve.push(Ue(Ae[1])))}return Ve.push("]"),Ve.join("")}function Ye(Je){for(var Ne=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),nt=Ne.length,ot=[],Ve=0,$e=0;Ve<nt;++Ve){var Ie=Ne[Ve];if(Ie==="(")++$e;else if(Ie.charAt(0)==="\\"){var De=+Ie.substring(1);De&&(De<=$e?ot[De]=-1:Ne[Ve]=Ue(De))}}for(var Ve=1;Ve<ot.length;++Ve)ot[Ve]===-1&&(ot[Ve]=++H);for(var Ve=0,$e=0;Ve<nt;++Ve){var Ie=Ne[Ve];if(Ie==="(")++$e,ot[$e]||(Ne[Ve]="(?:");else if(Ie.charAt(0)==="\\"){var De=+Ie.substring(1);De&&De<=$e&&(Ne[Ve]="\\"+ot[De])}}for(var Ve=0;Ve<nt;++Ve)Ne[Ve]==="^"&&Ne[Ve+1]!=="^"&&(Ne[Ve]="");if(Je.ignoreCase&&T)for(var Ve=0;Ve<nt;++Ve){var Ie=Ne[Ve],Le=Ie.charAt(0);Ie.length>=2&&Le==="["?Ne[Ve]=Ge(Ie):Le!=="\\"&&(Ne[Ve]=Ie.replace(/[a-zA-Z]/g,function(ke){var Ae=ke.charCodeAt(0);return"["+String.fromCharCode(Ae&~32,Ae|32)+"]"}))}return Ne.join("")}for(var Xe=[],we=0,ye=q.length;we<ye;++we){var Oe=q[we];if(Oe.global||Oe.multiline)throw new Error(""+Oe);Xe.push("(?:"+Ye(Oe)+")")}return new RegExp(Xe.join("|"),W?"gi":"g")}function C(q,H){var T=/(?:^|\s)nocode(?:\s|$)/,W=[],we=0,ye=[],Oe=0;function Be(Fe){var Ue=Fe.nodeType;if(Ue==1){if(T.test(Fe.className))return;for(var Ge=Fe.firstChild;Ge;Ge=Ge.nextSibling)Be(Ge);var Ye=Fe.nodeName.toLowerCase();(Ye==="br"||Ye==="li")&&(W[Oe]=`
`,ye[Oe<<1]=we++,ye[Oe++<<1|1]=Fe)}else if(Ue==3||Ue==4){var Xe=Fe.nodeValue;Xe.length&&(H?Xe=Xe.replace(/\r\n?/g,`
`):Xe=Xe.replace(/[ \t\r\n]+/g," "),W[Oe]=Xe,ye[Oe<<1]=we,we+=Xe.length,ye[Oe++<<1|1]=Fe)}}return Be(q),{sourceCode:W.join("").replace(/\n$/,""),spans:ye}}function D(q,H,T,W,we){if(!T)return;var ye={sourceNode:q,pre:1,langExtension:null,numberLines:null,sourceCode:T,spans:null,basePos:H,decorations:null};W(ye),we.push.apply(we,ye.decorations)}var le=/\S/;function he(q){for(var H=void 0,T=q.firstChild;T;T=T.nextSibling){var W=T.nodeType;H=W===1?H?q:T:W===3&&le.test(T.nodeValue)?q:H}return H===q?void 0:H}function ve(q,H){var T={},W;(function(){for(var Oe=q.concat(H),Be=[],Fe={},Ue=0,Ge=Oe.length;Ue<Ge;++Ue){var Ye=Oe[Ue],Xe=Ye[3];if(Xe)for(var Je=Xe.length;--Je>=0;)T[Xe.charAt(Je)]=Ye;var Ne=Ye[1],nt=""+Ne;Fe.hasOwnProperty(nt)||(Be.push(Ne),Fe[nt]=null)}Be.push(/[\0-\uffff]/),W=R(Be)})();var we=H.length,ye=function(Oe){for(var Be=Oe.sourceCode,Fe=Oe.basePos,Ue=Oe.sourceNode,Ge=[Fe,Q],Ye=0,Xe=Be.match(W)||[],Je={},Ne=0,nt=Xe.length;Ne<nt;++Ne){var ot=Xe[Ne],Ve=Je[ot],$e=void 0,Ie;if(typeof Ve=="string")Ie=!1;else{var De=T[ot.charAt(0)];if(De)$e=ot.match(De[1]),Ve=De[0];else{for(var Le=0;Le<we;++Le)if(De=H[Le],$e=ot.match(De[1]),$e){Ve=De[0];break}$e||(Ve=Q)}Ie=Ve.length>=5&&Ve.substring(0,5)==="lang-",Ie&&!($e&&typeof $e[1]=="string")&&(Ie=!1,Ve=z),Ie||(Je[ot]=Ve)}var _e=Ye;if(Ye+=ot.length,!Ie)Ge.push(Fe+_e,Ve);else{var Te=$e[1],ke=ot.indexOf(Te),Ae=ke+Te.length;$e[2]&&(Ae=ot.length-$e[2].length,ke=Ae-Te.length);var ze=Ve.substring(5);D(Ue,Fe+_e,ot.substring(0,ke),ye,Ge),D(Ue,Fe+_e+ke,Te,re(ze,Te),Ge),D(Ue,Fe+_e+Ae,ot.substring(Ae),ye,Ge)}}Oe.decorations=Ge};return ye}function Ee(q){var H=[],T=[];q.tripleQuotedStrings?H.push([y,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):q.multiLineStrings?H.push([y,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):H.push([y,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),q.verbatimStrings&&T.push([y,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var W=q.hashComments;W&&(q.cStyleComments?(W>1?H.push([X,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):H.push([X,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),T.push([y,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):H.push([X,/^#[^\r\n]*/,null,"#"])),q.cStyleComments&&(T.push([X,/^\/\/[^\r\n]*/,null]),T.push([X,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var we=q.regexLiterals;if(we){var ye=we>1?"":`
\r`,Oe=ye?".":"[\\S\\s]",Be="/(?=[^/*"+ye+"])(?:[^/\\x5B\\x5C"+ye+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+ye+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";T.push(["lang-regex",RegExp("^"+U+"("+Be+")")])}var Fe=q.types;Fe&&T.push([P,Fe]);var Ue=(""+q.keywords).replace(/^ | $/g,"");Ue.length&&T.push([Y,new RegExp("^(?:"+Ue.replace(/[\s,]+/g,"|")+")\\b"),null]),H.push([Q,/^\s+/,null,` \r
\xA0`]);var Ge="^.[^\\s\\w.$@'\"`/\\\\]*";return q.regexLiterals&&(Ge+="(?!s*/)"),T.push([F,/^@[a-z_$][a-z_$@0-9]*/i,null],[P,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Q,/^[a-z_$][a-z_$@0-9]*/i,null],[F,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Q,/^\\[\s\S]?/,null],[K,new RegExp(Ge),null]),ve(H,T)}var Se=Ee({keywords:B,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ae(q,H,T){for(var W=/(?:^|\s)nocode(?:\s|$)/,we=/\r\n?|\n/,ye=q.ownerDocument,Oe=ye.createElement("li");q.firstChild;)Oe.appendChild(q.firstChild);var Be=[Oe];function Fe(Ne){var nt=Ne.nodeType;if(nt==1&&!W.test(Ne.className))if(Ne.nodeName==="br")Ue(Ne),Ne.parentNode&&Ne.parentNode.removeChild(Ne);else for(var ot=Ne.firstChild;ot;ot=ot.nextSibling)Fe(ot);else if((nt==3||nt==4)&&T){var Ve=Ne.nodeValue,$e=Ve.match(we);if($e){var Ie=Ve.substring(0,$e.index);Ne.nodeValue=Ie;var De=Ve.substring($e.index+$e[0].length);if(De){var Le=Ne.parentNode;Le.insertBefore(ye.createTextNode(De),Ne.nextSibling)}Ue(Ne),Ie||Ne.parentNode.removeChild(Ne)}}}function Ue(Ne){for(;!Ne.nextSibling;)if(Ne=Ne.parentNode,!Ne)return;function nt($e,Ie){var De=Ie?$e.cloneNode(!1):$e,Le=$e.parentNode;if(Le){var _e=nt(Le,1),Te=$e.nextSibling;_e.appendChild(De);for(var ke=Te;ke;ke=Te)Te=ke.nextSibling,_e.appendChild(ke)}return De}for(var ot=nt(Ne.nextSibling,0),Ve;(Ve=ot.parentNode)&&Ve.nodeType===1;)ot=Ve;Be.push(ot)}for(var Ge=0;Ge<Be.length;++Ge)Fe(Be[Ge]);H===(H|0)&&Be[0].setAttribute("value",H);var Ye=ye.createElement("ol");Ye.className="linenums";for(var Xe=Math.max(0,H-1|0)||0,Ge=0,Je=Be.length;Ge<Je;++Ge)Oe=Be[Ge],Oe.className="L"+(Ge+Xe)%10,Oe.firstChild||Oe.appendChild(ye.createTextNode("\xA0")),Ye.appendChild(Oe);q.appendChild(Ye)}function pe(q){var H=/\bMSIE\s(\d+)/.exec(navigator.userAgent);H=H&&+H[1]<=8;var T=/\n/g,W=q.sourceCode,we=W.length,ye=0,Oe=q.spans,Be=Oe.length,Fe=0,Ue=q.decorations,Ge=Ue.length,Ye=0;Ue[Ge]=we;var Xe,Je;for(Je=Xe=0;Je<Ge;)Ue[Je]!==Ue[Je+2]?(Ue[Xe++]=Ue[Je++],Ue[Xe++]=Ue[Je++]):Je+=2;for(Ge=Xe,Je=Xe=0;Je<Ge;){for(var Ne=Ue[Je],nt=Ue[Je+1],ot=Je+2;ot+2<=Ge&&Ue[ot+1]===nt;)ot+=2;Ue[Xe++]=Ne,Ue[Xe++]=nt,Je=ot}Ge=Ue.length=Xe;var Ve=q.sourceNode,$e="";Ve&&($e=Ve.style.display,Ve.style.display="none");try{for(var Ie=null;Fe<Be;){var De=Oe[Fe],Le=Oe[Fe+2]||we,_e=Ue[Ye+2]||we,ot=Math.min(Le,_e),Te=Oe[Fe+1],ke;if(Te.nodeType!==1&&(ke=W.substring(ye,ot))){H&&(ke=ke.replace(T,"\r")),Te.nodeValue=ke;var Ae=Te.ownerDocument,ze=Ae.createElement("span");ze.className=Ue[Ye+1];var je=Te.parentNode;je.replaceChild(ze,Te),ze.appendChild(Te),ye<Le&&(Oe[Fe+1]=Te=Ae.createTextNode(W.substring(ot,Le)),je.insertBefore(Te,ze.nextSibling))}ye=ot,ye>=Le&&(Fe+=2),ye>=_e&&(Ye+=2)}}finally{Ve&&(Ve.style.display=$e)}}var me={};function ee(q,H){for(var T=H.length;--T>=0;){var W=H[T];me.hasOwnProperty(W)?a.console&&console.warn("cannot override language handler %s",W):me[W]=q}}function re(q,H){return q&&me.hasOwnProperty(q)||(q=/^\s*</.test(H)?"default-markup":"default-code"),me[q]}ee(Se,["default-code"]),ee(ve([],[[Q,/^[^<?]+/],[fe,/^<!\w[^>]*(?:>|$)/],[X,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[K,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),ee(ve([[Q,/^[\s]+/,null,` \r
`],[$,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ce,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[se,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[K,/^[=<>\/]+/],["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"]),ee(ve([],[[$,/^[\s\S]+/]]),["uq.val"]),ee(Ee({keywords:g,hashComments:!0,cStyleComments:!0,types:N}),["c","cc","cpp","cxx","cyc","m"]),ee(Ee({keywords:"null,true,false"}),["json"]),ee(Ee({keywords:v,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:N}),["cs"]),ee(Ee({keywords:m,cStyleComments:!0}),["java"]),ee(Ee({keywords:I,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ee(Ee({keywords:O,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ee(Ee({keywords:k,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ee(Ee({keywords:M,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ee(Ee({keywords:_,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ee(Ee({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ee(ve([],[[y,/^[\s\S]+/]]),["regex"]);function Z(q){var H=q.langExtension;try{var T=C(q.sourceNode,q.pre),W=T.sourceCode;q.sourceCode=W,q.spans=T.spans,q.basePos=0,re(H,W)(q),pe(q)}catch(we){a.console&&console.log(we&&we.stack||we)}}function ue(q,H,T){var W=T||!1,we=H||null,ye=document.createElement("div");ye.innerHTML="<pre>"+q+"</pre>",ye=ye.firstChild,W&&ae(ye,W,!0);var Oe={langExtension:we,numberLines:W,sourceNode:ye,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Z(Oe),ye.innerHTML}function V(q,H){var T=H||document.body,W=T.ownerDocument||document;function we(De){return T.getElementsByTagName(De)}for(var ye=[we("pre"),we("code"),we("xmp")],Oe=[],Be=0;Be<ye.length;++Be)for(var Fe=0,Ue=ye[Be].length;Fe<Ue;++Fe)Oe.push(ye[Be][Fe]);ye=null;var Ge=Date;Ge.now||(Ge={now:function(){return+new Date}});var Ye=0,Xe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Je=/\bprettyprint\b/,Ne=/\bprettyprinted\b/,nt=/pre|xmp/i,ot=/^code$/i,Ve=/^(?:pre|code|xmp)$/i,$e={};function Ie(){for(var De=a.PR_SHOULD_USE_CONTINUATION?Ge.now()+250:Infinity;Ye<Oe.length&&Ge.now()<De;Ye++){for(var Le=Oe[Ye],_e=$e,Te=Le;Te=Te.previousSibling;){var ke=Te.nodeType,Ae=(ke===7||ke===8)&&Te.nodeValue;if(Ae?!/^\??prettify\b/.test(Ae):ke!==3||/\S/.test(Te.nodeValue))break;if(Ae){_e={},Ae.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Kt,At,jt){_e[At]=jt});break}}var ze=Le.className;if((_e!==$e||Je.test(ze))&&!Ne.test(ze)){for(var je=!1,Ze=Le.parentNode;Ze;Ze=Ze.parentNode){var ht=Ze.tagName;if(Ve.test(ht)&&Ze.className&&Je.test(Ze.className)){je=!0;break}}if(!je){Le.className+=" prettyprinted";var Tt=_e.lang;if(!Tt){Tt=ze.match(Xe);var qe;!Tt&&(qe=he(Le))&&ot.test(qe.tagName)&&(Tt=qe.className.match(Xe)),Tt&&(Tt=Tt[1])}var at;if(nt.test(Le.tagName))at=1;else{var dt=Le.currentStyle,st=W.defaultView,St=dt?dt.whiteSpace:st&&st.getComputedStyle?st.getComputedStyle(Le,null).getPropertyValue("white-space"):0;at=St&&St.substring(0,3)==="pre"}var Ft=_e.linenums;(Ft=Ft==="true"||+Ft)||(Ft=ze.match(/\blinenums\b(?::(\d+))?/),Ft=Ft?Ft[1]&&Ft[1].length?+Ft[1]:!0:!1),Ft&&ae(Le,Ft,at);var Vt={langExtension:Tt,sourceNode:Le,numberLines:Ft,pre:at,sourceCode:null,basePos:null,spans:null,decorations:null};Z(Vt)}}}Ye<Oe.length?a.setTimeout(Ie,250):typeof q=="function"&&q()}Ie()}var J=a.PR={createSimpleLexer:ve,registerLangHandler:ee,sourceDecorator:Ee,PR_ATTRIB_NAME:se,PR_ATTRIB_VALUE:$,PR_COMMENT:X,PR_DECLARATION:fe,PR_KEYWORD:Y,PR_LITERAL:F,PR_NOCODE:j,PR_PLAIN:Q,PR_PUNCTUATION:K,PR_SOURCE:z,PR_STRING:y,PR_TAG:ce,PR_TYPE:P,prettyPrintOne:S?a.prettyPrintOne=ue:p=ue,prettyPrint:d=S?a.prettyPrint=V:d=V},Ce=a.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return J})})()},T1X5:function(u,G){u.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},"VrN/":function(u,G,c){(function(h,o){u.exports=o()})(this,function(){"use strict";var h=navigator.userAgent,o=navigator.platform,S=/gecko\/\d/i.test(h),E=/MSIE \d/.test(h),b=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(h),p=/Edge\/(\d+)/.exec(h),d=E||b||p,a=d&&(E?document.documentMode||6:+(p||b)[1]),s=!p&&/WebKit\//.test(h),l=s&&/Qt\/\d+\.\d+/.test(h),i=!p&&/Chrome\//.test(h),g=/Opera\//.test(h),m=/Apple Computer/.test(navigator.vendor),v=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(h),w=/PhantomJS/.test(h),_=!p&&/AppleWebKit/.test(h)&&/Mobile\/\w+/.test(h),k=/Android/.test(h),O=_||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(h),M=_||/Mac/.test(o),I=/\bCrOS\b/.test(h),B=/win/i.test(o),N=g&&h.match(/Version\/(\d*\.\d*)/);N&&(N=Number(N[1])),N&&N>=15&&(g=!1,s=!0);var y=M&&(l||g&&(N==null||N<12.11)),Y=S||d&&a>=9;function X(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var P=function(e,t){var n=e.className,r=X(t).exec(n);if(r){var f=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(f?r[1]+f:"")}};function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function K(e,t){return F(e).appendChild(t)}function Q(e,t,n,r){var f=document.createElement(e);if(n&&(f.className=n),r&&(f.style.cssText=r),typeof t=="string")f.appendChild(document.createTextNode(t));else if(t)for(var L=0;L<t.length;++L)f.appendChild(t[L]);return f}function ce(e,t,n,r){var f=Q(e,t,n,r);return f.setAttribute("role","presentation"),f}var fe;document.createRange?fe=function(e,t,n,r){var f=document.createRange();return f.setEnd(r||e,n),f.setStart(e,t),f}:fe=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(f){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function z(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function se(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function $(e,t){var n=e.className;X(t).test(n)||(e.className+=(n?" ":"")+t)}function j(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!X(n[r]).test(t)&&(t+=" "+n[r]);return t}var U=function(e){e.select()};_?U=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:d&&(U=function(e){try{e.select()}catch(t){}});function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function C(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function D(e,t,n,r,f){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var L=r||0,te=f||0;;){var de=e.indexOf(" ",L);if(de<0||de>=t)return te+(t-L);te+=de-L,te+=n-te%n,L=de+1}}var le=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};le.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},le.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function he(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var ve=50,Ee={toString:function(){return"CodeMirror.Pass"}},Se={scroll:!1},ae={origin:"*mouse"},pe={origin:"+move"};function me(e,t,n){for(var r=0,f=0;;){var L=e.indexOf(" ",r);L==-1&&(L=e.length);var te=L-r;if(L==e.length||f+te>=t)return r+Math.min(te,t-f);if(f+=L-r,f+=n-f%n,r=L+1,f>=t)return r}}var ee=[""];function re(e){for(;ee.length<=e;)ee.push(Z(ee)+" ");return ee[e]}function Z(e){return e[e.length-1]}function ue(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function V(e,t,n){for(var r=0,f=n(t);r<e.length&&n(e[r])<=f;)r++;e.splice(r,0,t)}function J(){}function Ce(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&C(t,n),n}var q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function H(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||q.test(e))}function T(e,t){return t?t.source.indexOf("\\w")>-1&&H(e)?!0:t.test(e):H(e)}function W(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var we=/[\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 ye(e){return e.charCodeAt(0)>=768&&we.test(e)}function Oe(e,t,n){for(;(n<0?t>0:t<e.length)&&ye(e.charAt(t));)t+=n;return t}function Be(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var f=(t+n)/2,L=r<0?Math.ceil(f):Math.floor(f);if(L==t)return e(L)?t:n;e(L)?n=L:t=L+r}}function Fe(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var f=!1,L=0;L<e.length;++L){var te=e[L];(te.from<n&&te.to>t||t==n&&te.to==t)&&(r(Math.max(te.from,t),Math.min(te.to,n),te.level==1?"rtl":"ltr",L),f=!0)}f||r(t,n,"ltr")}var Ue=null;function Ge(e,t,n){var r;Ue=null;for(var f=0;f<e.length;++f){var L=e[f];if(L.from<t&&L.to>t)return f;L.to==t&&(L.from!=L.to&&n=="before"?r=f:Ue=f),L.from==t&&(L.from!=L.to&&n!="before"?r=f:Ue=f)}return r!=null?r:Ue}var Ye=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(xe){return xe<=247?e.charAt(xe):1424<=xe&&xe<=1524?"R":1536<=xe&&xe<=1785?t.charAt(xe-1536):1774<=xe&&xe<=2220?"r":8192<=xe&&xe<=8203?"w":xe==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,L=/[LRr]/,te=/[Lb1n]/,de=/[1n]/;function ge(xe,Re,Pe){this.level=xe,this.from=Re,this.to=Pe}return function(xe,Re){var Pe=Re=="ltr"?"L":"R";if(xe.length==0||Re=="ltr"&&!r.test(xe))return!1;for(var Ke=xe.length,We=[],et=0;et<Ke;++et)We.push(n(xe.charCodeAt(et)));for(var it=0,lt=Pe;it<Ke;++it){var ft=We[it];ft=="m"?We[it]=lt:lt=ft}for(var xt=0,pt=Pe;xt<Ke;++xt){var _t=We[xt];_t=="1"&&pt=="r"?We[xt]="n":L.test(_t)&&(pt=_t,_t=="r"&&(We[xt]="R"))}for(var Pt=1,kt=We[0];Pt<Ke-1;++Pt){var zt=We[Pt];zt=="+"&&kt=="1"&&We[Pt+1]=="1"?We[Pt]="1":zt==","&&kt==We[Pt+1]&&(kt=="1"||kt=="n")&&(We[Pt]=kt),kt=zt}for(var or=0;or<Ke;++or){var Ir=We[or];if(Ir==",")We[or]="N";else if(Ir=="%"){var vr=void 0;for(vr=or+1;vr<Ke&&We[vr]=="%";++vr);for(var mn=or&&We[or-1]=="!"||vr<Ke&&We[vr]=="1"?"1":"N",un=or;un<vr;++un)We[un]=mn;or=vr-1}}for(var Or=0,cn=Pe;Or<Ke;++Or){var Ur=We[Or];cn=="L"&&Ur=="1"?We[Or]="L":L.test(Ur)&&(cn=Ur)}for(var Mr=0;Mr<Ke;++Mr)if(f.test(We[Mr])){var kr=void 0;for(kr=Mr+1;kr<Ke&&f.test(We[kr]);++kr);for(var xr=(Mr?We[Mr-1]:Pe)=="L",dn=(kr<Ke?We[kr]:Pe)=="L",Ri=xr==dn?xr?"L":"R":Pe,ei=Mr;ei<kr;++ei)We[ei]=Ri;Mr=kr-1}for(var Xr=[],Dn,jr=0;jr<Ke;)if(te.test(We[jr])){var sa=jr;for(++jr;jr<Ke&&te.test(We[jr]);++jr);Xr.push(new ge(0,sa,jr))}else{var Un=jr,di=Xr.length,hi=Re=="rtl"?1:0;for(++jr;jr<Ke&&We[jr]!="L";++jr);for(var nn=Un;nn<jr;)if(de.test(We[nn])){Un<nn&&(Xr.splice(di,0,new ge(1,Un,nn)),di+=hi);var Di=nn;for(++nn;nn<jr&&de.test(We[nn]);++nn);Xr.splice(di,0,new ge(2,Di,nn)),di+=hi,Un=nn}else++nn;Un<jr&&Xr.splice(di,0,new ge(1,Un,jr))}return Re=="ltr"&&(Xr[0].level==1&&(Dn=xe.match(/^\s+/))&&(Xr[0].from=Dn[0].length,Xr.unshift(new ge(0,0,Dn[0].length))),Z(Xr).level==1&&(Dn=xe.match(/\s+$/))&&(Z(Xr).to-=Dn[0].length,Xr.push(new ge(0,Ke-Dn[0].length,Ke)))),Re=="rtl"?Xr.reverse():Xr}}();function Xe(e,t){var n=e.order;return n==null&&(n=e.order=Ye(e.text,t)),n}var Je=[],Ne=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Je).concat(n)}};function nt(e,t){return e._handlers&&e._handlers[t]||Je}function ot(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,f=r&&r[t];if(f){var L=he(f,n);L>-1&&(r[t]=f.slice(0,L).concat(f.slice(L+1)))}}}function Ve(e,t){var n=nt(e,t);if(!n.length)return;for(var r=Array.prototype.slice.call(arguments,2),f=0;f<n.length;++f)n[f].apply(null,r)}function $e(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ve(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function Ie(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)he(n,t[r])==-1&&n.push(t[r])}function De(e,t){return nt(e,t).length>0}function Le(e){e.prototype.on=function(t,n){Ne(this,t,n)},e.prototype.off=function(t,n){ot(this,t,n)}}function _e(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ae(e){_e(e),Te(e)}function ze(e){return e.target||e.srcElement}function je(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),M&&e.ctrlKey&&t==1&&(t=3),t}var Ze=function(){if(d&&a<9)return!1;var e=Q("div");return"draggable"in e||"dragDrop"in e}(),ht;function Tt(e){if(ht==null){var t=Q("span","\u200B");K(e,Q("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ht=t.offsetWidth<=1&&t.offsetHeight>2&&!(d&&a<8))}var n=ht?Q("span","\u200B"):Q("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var qe;function at(e){if(qe!=null)return qe;var t=K(e,document.createTextNode("A\u062EA")),n=fe(t,0,1).getBoundingClientRect(),r=fe(t,1,2).getBoundingClientRect();return F(e),!n||n.left==n.right?!1:qe=r.right-n.right<3}var dt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var f=e.indexOf(`
`,t);f==-1&&(f=e.length);var L=e.slice(t,e.charAt(f-1)=="\r"?f-1:f),te=L.indexOf("\r");te!=-1?(n.push(L.slice(0,te)),t+=te+1):(n.push(L),t=f+1)}return n}:function(e){return e.split(/\r\n?|\n/)},st=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},St=function(){var e=Q("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Ft=null;function Vt(e){if(Ft!=null)return Ft;var t=K(e,Q("span","x")),n=t.getBoundingClientRect(),r=fe(t,0,1).getBoundingClientRect();return Ft=Math.abs(n.left-r.left)>1}var Kt={},At={};function jt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Kt[e]=t}function ar(e,t){At[e]=t}function Ct(e){if(typeof e=="string"&&At.hasOwnProperty(e))e=At[e];else if(e&&typeof e.name=="string"&&At.hasOwnProperty(e.name)){var t=At[e.name];typeof t=="string"&&(t={name:t}),e=Ce(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ct("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ct("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function hr(e,t){t=Ct(t);var n=Kt[t.name];if(!n)return hr(e,"text/plain");var r=n(e,t);if(Jt.hasOwnProperty(t.name)){var f=Jt[t.name];for(var L in f){if(!f.hasOwnProperty(L))continue;r.hasOwnProperty(L)&&(r["_"+L]=r[L]),r[L]=f[L]}}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var te in t.modeProps)r[te]=t.modeProps[te];return r}var Jt={};function nr(e,t){var n=Jt.hasOwnProperty(e)?Jt[e]:Jt[e]={};C(t,n)}function sr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var f=t[r];f instanceof Array&&(f=f.concat([])),n[r]=f}return n}function yr(e,t){for(var n;e.innerMode&&!(n=e.innerMode(t),!n||n.mode==e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Tr(e,t,n){return e.startState?e.startState(t,n):!0}var Ut=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};Ut.prototype.eol=function(){return this.pos>=this.string.length},Ut.prototype.sol=function(){return this.pos==this.lineStart},Ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ut.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Ut.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ut.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ut.prototype.skipToEnd=function(){this.pos=this.string.length},Ut.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ut.prototype.backUp=function(e){this.pos-=e},Ut.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=D(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?D(this.string,this.lineStart,this.tabSize):0)},Ut.prototype.indentation=function(){return D(this.string,null,this.tabSize)-(this.lineStart?D(this.string,this.lineStart,this.tabSize):0)},Ut.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(te){return n?te.toLowerCase():te},f=this.string.substr(this.pos,e.length);if(r(f)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var L=this.string.slice(this.pos).match(e);return L&&L.index>0?null:(L&&t!==!1&&(this.pos+=L[0].length),L)}},Ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ut.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ut.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ut.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function mt(e,t){if(t-=e.first,t<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 f=n.children[r],L=f.chunkSize();if(t<L){n=f;break}t-=L}return n.lines[t]}function Xt(e,t,n){var r=[],f=t.line;return e.iter(t.line,n.line+1,function(L){var te=L.text;f==n.line&&(te=te.slice(0,n.ch)),f==t.line&&(te=te.slice(t.ch)),r.push(te),++f}),r}function fr(e,t,n){var r=[];return e.iter(t,n,function(f){r.push(f.text)}),r}function Mt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function It(e){if(e.parent==null)return null;for(var t=e.parent,n=he(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var f=0;!(r.children[f]==t);++f)n+=r.children[f].chunkSize();return n+t.first}function pr(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var f=e.children[r],L=f.height;if(t<L){e=f;continue e}t-=L,n+=f.chunkSize()}return n}while(!e.lines);for(var te=0;te<e.lines.length;++te){var de=e.lines[te],ge=de.height;if(t<ge)break;t-=ge}return n+te}function hn(e,t){return t>=e.first&&t<e.first+e.size}function Vr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function rt(e,t,n){if(n===void 0&&(n=null),!(this instanceof rt))return new rt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Ot(e,t){return e.line-t.line||e.ch-t.ch}function Hr(e,t){return e.sticky==t.sticky&&Ot(e,t)==0}function wr(e){return rt(e.line,e.ch)}function fn(e,t){return Ot(e,t)<0?t:e}function wn(e,t){return Ot(e,t)<0?e:t}function oe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function x(e,t){if(t.line<e.first)return rt(e.first,0);var n=e.first+e.size-1;return t.line>n?rt(n,mt(e,n).text.length):A(t,mt(e,t.line).text.length)}function A(e,t){var n=e.ch;return n==null||n>t?rt(e.line,t):n<0?rt(e.line,0):e}function ie(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=x(e,t[r]);return n}var be=function(e,t){this.state=e,this.lookAhead=t},ne=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};ne.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ne.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}},ne.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ne.fromSaved=function(e,t,n){return t instanceof be?new ne(e,sr(e.mode,t.state),n,t.lookAhead):new ne(e,sr(e.mode,t),n)},ne.prototype.save=function(e){var t=e!==!1?sr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new be(t,this.maxLookAhead):t};function Me(e,t,n,r){var f=[e.state.modeGen],L={};Jr(e,t.text,e.doc.mode,n,function(xe,Re){return f.push(xe,Re)},L,r);for(var te=n.state,de=function(xe){n.baseTokens=f;var Re=e.state.overlays[xe],Pe=1,Ke=0;n.state=!0,Jr(e,t.text,Re.mode,n,function(We,et){for(var it=Pe;Ke<We;){var lt=f[Pe];lt>We&&f.splice(Pe,1,We,f[Pe+1],lt),Pe+=2,Ke=Math.min(We,lt)}if(!et)return;if(Re.opaque)f.splice(it,Pe-it,We,"overlay "+et),Pe=it+2;else for(;it<Pe;it+=2){var ft=f[it+1];f[it+1]=(ft?ft+" ":"")+"overlay "+et}},L),n.state=te,n.baseTokens=null,n.baseTokenPos=1},ge=0;ge<e.state.overlays.length;++ge)de(ge);return{styles:f,classes:L.bgClass||L.textClass?L:null}}function Qe(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=He(e,It(t)),f=t.text.length>e.options.maxHighlightLength&&sr(e.doc.mode,r.state),L=Me(e,t,r);f&&(r.state=f),t.stateAfter=r.save(!f),t.styles=L.styles,L.classes?t.styleClasses=L.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 He(e,t,n){var r=e.doc,f=e.display;if(!r.mode.startState)return new ne(r,!0,t);var L=br(e,t,n),te=L>r.first&&mt(r,L-1).stateAfter,de=te?ne.fromSaved(r,te,L):new ne(r,Tr(r.mode),L);return r.iter(L,t,function(ge){wt(e,ge.text,de);var xe=de.line;ge.stateAfter=xe==t-1||xe%5==0||xe>=f.viewFrom&&xe<f.viewTo?de.save():null,de.nextLine()}),n&&(r.modeFrontier=de.line),de}function wt(e,t,n,r){var f=e.doc.mode,L=new Ut(t,e.options.tabSize,n);for(L.start=L.pos=r||0,t==""&&tt(f,n.state);!L.eol();)Nt(f,L,n.state),L.start=L.pos}function tt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var n=yr(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}function Nt(e,t,n,r){for(var f=0;f<10;f++){r&&(r[0]=yr(e,n).mode);var L=e.token(t,n);if(t.pos>t.start)return L}throw new Error("Mode "+e.name+" failed to advance stream.")}var Yt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function qt(e,t,n,r){var f=e.doc,L=f.mode,te;t=x(f,t);var de=mt(f,t.line),ge=He(e,t.line,n),xe=new Ut(de.text,e.options.tabSize,ge),Re;for(r&&(Re=[]);(r||xe.pos<t.ch)&&!xe.eol();)xe.start=xe.pos,te=Nt(L,xe,ge.state),r&&Re.push(new Yt(xe,te,sr(f.mode,ge.state)));return r?Re:new Yt(xe,te,ge.state)}function Yr(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Jr(e,t,n,r,f,L,te){var de=n.flattenSpans;de==null&&(de=e.options.flattenSpans);var ge=0,xe=null,Re=new Ut(t,e.options.tabSize,r),Pe,Ke=e.options.addModeClass&&[null];for(t==""&&Yr(tt(n,r.state),L);!Re.eol();){if(Re.pos>e.options.maxHighlightLength?(de=!1,te&&wt(e,t,r,Re.pos),Re.pos=t.length,Pe=null):Pe=Yr(Nt(n,Re,r.state,Ke),L),Ke){var We=Ke[0].name;We&&(Pe="m-"+(Pe?We+" "+Pe:We))}if(!de||xe!=Pe){for(;ge<Re.start;)ge=Math.min(Re.start,ge+5e3),f(ge,xe);xe=Pe}Re.start=Re.pos}for(;ge<Re.pos;){var et=Math.min(Re.pos,ge+5e3);f(et,xe),ge=et}}function br(e,t,n){for(var r,f,L=e.doc,te=n?-1:t-(e.doc.mode.innerMode?1e3:100),de=t;de>te;--de){if(de<=L.first)return L.first;var ge=mt(L,de-1),xe=ge.stateAfter;if(xe&&(!n||de+(xe instanceof be?xe.lookAhead:0)<=L.modeFrontier))return de;var Re=D(ge.text,null,e.options.tabSize);(f==null||r>Re)&&(f=de-1,r=Re)}return f}function $r(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var n=e.first,r=t-1;r>n;r--){var f=mt(e,r).stateAfter;if(f&&(!(f instanceof be)||r+f.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}var Hn=!1,Wr=!1;function Nr(){Hn=!0}function Cn(){Wr=!0}function An(e,t,n){this.marker=e,this.from=t,this.to=n}function on(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function gn(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function zr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ti(e,t,n){var r;if(e)for(var f=0;f<e.length;++f){var L=e[f],te=L.marker,de=L.from==null||(te.inclusiveLeft?L.from<=t:L.from<t);if(de||L.from==t&&te.type=="bookmark"&&(!n||!L.marker.insertLeft)){var ge=L.to==null||(te.inclusiveRight?L.to>=t:L.to>t);(r||(r=[])).push(new An(te,L.from,ge?null:L.to))}}return r}function Wn(e,t,n){var r;if(e)for(var f=0;f<e.length;++f){var L=e[f],te=L.marker,de=L.to==null||(te.inclusiveRight?L.to>=t:L.to>t);if(de||L.from==t&&te.type=="bookmark"&&(!n||L.marker.insertLeft)){var ge=L.from==null||(te.inclusiveLeft?L.from<=t:L.from<t);(r||(r=[])).push(new An(te,ge?null:L.from-t,L.to==null?null:L.to-t))}}return r}function Zr(e,t){if(t.full)return null;var n=hn(e,t.from.line)&&mt(e,t.from.line).markedSpans,r=hn(e,t.to.line)&&mt(e,t.to.line).markedSpans;if(!n&&!r)return null;var f=t.from.ch,L=t.to.ch,te=Ot(t.from,t.to)==0,de=ti(n,f,te),ge=Wn(r,L,te),xe=t.text.length==1,Re=Z(t.text).length+(xe?f:0);if(de)for(var Pe=0;Pe<de.length;++Pe){var Ke=de[Pe];if(Ke.to==null){var We=on(ge,Ke.marker);We?xe&&(Ke.to=We.to==null?null:We.to+Re):Ke.to=f}}if(ge)for(var et=0;et<ge.length;++et){var it=ge[et];if(it.to!=null&&(it.to+=Re),it.from==null){var lt=on(de,it.marker);lt||(it.from=Re,xe&&(de||(de=[])).push(it))}else it.from+=Re,xe&&(de||(de=[])).push(it)}de&&(de=Qr(de)),ge&&ge!=de&&(ge=Qr(ge));var ft=[de];if(!xe){var xt=t.text.length-2,pt;if(xt>0&&de)for(var _t=0;_t<de.length;++_t)de[_t].to==null&&(pt||(pt=[])).push(new An(de[_t].marker,null,null));for(var Pt=0;Pt<xt;++Pt)ft.push(pt);ft.push(ge)}return ft}function Qr(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Mn(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(We){if(We.markedSpans)for(var et=0;et<We.markedSpans.length;++et){var it=We.markedSpans[et].marker;it.readOnly&&(!r||he(r,it)==-1)&&(r||(r=[])).push(it)}}),!r)return null;for(var f=[{from:t,to:n}],L=0;L<r.length;++L)for(var te=r[L],de=te.find(0),ge=0;ge<f.length;++ge){var xe=f[ge];if(Ot(xe.to,de.from)<0||Ot(xe.from,de.to)>0)continue;var Re=[ge,1],Pe=Ot(xe.from,de.from),Ke=Ot(xe.to,de.to);(Pe<0||!te.inclusiveLeft&&!Pe)&&Re.push({from:xe.from,to:de.from}),(Ke>0||!te.inclusiveRight&&!Ke)&&Re.push({from:de.to,to:xe.to}),f.splice.apply(f,Re),ge+=Re.length-3}return f}function Nn(e){var t=e.markedSpans;if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}function Pn(e,t){if(!t)return;for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}function mr(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function Ar(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),f=t.find(),L=Ot(r.from,f.from)||mr(e)-mr(t);if(L)return-L;var te=Ot(r.to,f.to)||$t(e)-$t(t);return te||t.id-e.id}function Zt(e,t){var n=Wr&&e.markedSpans,r;if(n)for(var f=void 0,L=0;L<n.length;++L)f=n[L],f.marker.collapsed&&(t?f.from:f.to)==null&&(!r||Ar(r,f.marker)<0)&&(r=f.marker);return r}function Rr(e){return Zt(e,!0)}function ct(e){return Zt(e,!1)}function vt(e,t){var n=Wr&&e.markedSpans,r;if(n)for(var f=0;f<n.length;++f){var L=n[f];L.marker.collapsed&&(L.from==null||L.from<t)&&(L.to==null||L.to>t)&&(!r||Ar(r,L.marker)<0)&&(r=L.marker)}return r}function yt(e,t,n,r,f){var L=mt(e,t),te=Wr&&L.markedSpans;if(te)for(var de=0;de<te.length;++de){var ge=te[de];if(!ge.marker.collapsed)continue;var xe=ge.marker.find(0),Re=Ot(xe.from,n)||mr(ge.marker)-mr(f),Pe=Ot(xe.to,r)||$t(ge.marker)-$t(f);if(Re>=0&&Pe<=0||Re<=0&&Pe>=0)continue;if(Re<=0&&(ge.marker.inclusiveRight&&f.inclusiveLeft?Ot(xe.to,n)>=0:Ot(xe.to,n)>0)||Re>=0&&(ge.marker.inclusiveRight&&f.inclusiveLeft?Ot(xe.from,r)<=0:Ot(xe.from,r)<0))return!0}}function gt(e){for(var t;t=Rr(e);)e=t.find(-1,!0).line;return e}function Bt(e){for(var t;t=ct(e);)e=t.find(1,!0).line;return e}function bt(e){for(var t,n;t=ct(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Rt(e,t){var n=mt(e,t),r=gt(n);return n==r?t:It(r)}function ur(e,t){if(t>e.lastLine())return t;var n=mt(e,t),r;if(!gr(e,n))return t;for(;r=ct(n);)n=r.find(1,!0).line;return It(n)+1}function gr(e,t){var n=Wr&&t.markedSpans;if(n)for(var r=void 0,f=0;f<n.length;++f){if(r=n[f],!r.marker.collapsed)continue;if(r.from==null)return!0;if(r.marker.widgetNode)continue;if(r.from==0&&r.marker.inclusiveLeft&&qr(e,t,r))return!0}}function qr(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return qr(e,r.line,on(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var f=void 0,L=0;L<t.markedSpans.length;++L)if(f=t.markedSpans[L],f.marker.collapsed&&!f.marker.widgetNode&&f.from==n.to&&(f.to==null||f.to!=n.from)&&(f.marker.inclusiveLeft||n.marker.inclusiveRight)&&qr(e,t,f))return!0}function cr(e){e=gt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var f=n.lines[r];if(f==e)break;t+=f.height}for(var L=n.parent;L;n=L,L=n.parent)for(var te=0;te<L.children.length;++te){var de=L.children[te];if(de==n)break;t+=de.height}return t}function Cr(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Rr(r);){var f=n.find(0,!0);r=f.from.line,t+=f.from.ch-f.to.ch}for(r=e;n=ct(r);){var L=n.find(0,!0);t-=r.text.length-L.from.ch,r=L.to.line,t+=r.text.length-L.to.ch}return t}function Dr(e){var t=e.display,n=e.doc;t.maxLine=mt(n,n.first),t.maxLineLength=Cr(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var f=Cr(r);f>t.maxLineLength&&(t.maxLineLength=f,t.maxLine=r)})}var Br=function(e,t,n){this.text=e,Pn(this,t),this.height=n?n(this):1};Br.prototype.lineNo=function(){return It(this)},Le(Br);function Fr(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Nn(e),Pn(e,n);var f=r?r(e):1;f!=e.height&&Mt(e,f)}function Ln(e){e.parent=null,Nn(e)}var ri={},In={};function vn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?In:ri;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function En(e,t){var n=ce("span",null,null,s?"padding-right: .1px":null),r={pre:ce("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var f=0;f<=(t.rest?t.rest.length:0);f++){var L=f?t.rest[f-1]:t.line,te=void 0;r.pos=0,r.addToken=Dt,at(e.display.measure)&&(te=Xe(L,e.doc.direction))&&(r.addToken=Lt(r.addToken,te)),r.map=[];var de=t!=e.display.externalMeasured&&It(L);Qt(L,r,Qe(e,L,de)),L.styleClasses&&(L.styleClasses.bgClass&&(r.bgClass=j(L.styleClasses.bgClass,r.bgClass||"")),L.styleClasses.textClass&&(r.textClass=j(L.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Tt(e.display.measure))),f==0?(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(s){var ge=r.content.lastChild;(/\bcm-tab\b/.test(ge.className)||ge.querySelector&&ge.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=j(r.pre.className,r.textClass||"")),r}function Et(e){var t=Q("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Dt(e,t,n,r,f,L,te){if(!t)return;var de=e.splitSpaces?ut(t,e.trailingSpace):t,ge=e.cm.state.specialChars,xe=!1,Re;if(!ge.test(t))e.col+=t.length,Re=document.createTextNode(de),e.map.push(e.pos,e.pos+t.length,Re),d&&a<9&&(xe=!0),e.pos+=t.length;else{Re=document.createDocumentFragment();for(var Pe=0;;){ge.lastIndex=Pe;var Ke=ge.exec(t),We=Ke?Ke.index-Pe:t.length-Pe;if(We){var et=document.createTextNode(de.slice(Pe,Pe+We));d&&a<9?Re.appendChild(Q("span",[et])):Re.appendChild(et),e.map.push(e.pos,e.pos+We,et),e.col+=We,e.pos+=We}if(!Ke)break;Pe+=We+1;var it=void 0;if(Ke[0]==" "){var lt=e.cm.options.tabSize,ft=lt-e.col%lt;it=Re.appendChild(Q("span",re(ft),"cm-tab")),it.setAttribute("role","presentation"),it.setAttribute("cm-text"," "),e.col+=ft}else Ke[0]=="\r"||Ke[0]==`
`?(it=Re.appendChild(Q("span",Ke[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),it.setAttribute("cm-text",Ke[0]),e.col+=1):(it=e.cm.options.specialCharPlaceholder(Ke[0]),it.setAttribute("cm-text",Ke[0]),d&&a<9?Re.appendChild(Q("span",[it])):Re.appendChild(it),e.col+=1);e.map.push(e.pos,e.pos+1,it),e.pos++}}if(e.trailingSpace=de.charCodeAt(t.length-1)==32,n||r||f||xe||L||te){var xt=n||"";r&&(xt+=r),f&&(xt+=f);var pt=Q("span",[Re],xt,L);if(te)for(var _t in te)te.hasOwnProperty(_t)&&_t!="style"&&_t!="class"&&pt.setAttribute(_t,te[_t]);return e.content.appendChild(pt)}e.content.appendChild(Re)}function ut(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",f=0;f<e.length;f++){var L=e.charAt(f);L==" "&&n&&(f==e.length-1||e.charCodeAt(f+1)==32)&&(L="\xA0"),r+=L,n=L==" "}return r}function Lt(e,t){return function(n,r,f,L,te,de,ge){f=f?f+" cm-force-border":"cm-force-border";for(var xe=n.pos,Re=xe+r.length;;){for(var Pe=void 0,Ke=0;Ke<t.length&&!(Pe=t[Ke],Pe.to>xe&&Pe.from<=xe);Ke++);if(Pe.to>=Re)return e(n,r,f,L,te,de,ge);e(n,r.slice(0,Pe.to-xe),f,L,null,de,ge),L=null,r=r.slice(Pe.to-xe),xe=Pe.to}}}function Ht(e,t,n,r){var f=!r&&n.widgetNode;f&&e.map.push(e.pos,e.pos+t,f),!r&&e.cm.display.input.needsContentAttribute&&(f||(f=e.content.appendChild(document.createElement("span"))),f.setAttribute("cm-marker",n.id)),f&&(e.cm.display.input.setUneditable(f),e.content.appendChild(f)),e.pos+=t,e.trailingSpace=!1}function Qt(e,t,n){var r=e.markedSpans,f=e.text,L=0;if(!r){for(var te=1;te<n.length;te+=2)t.addToken(t,f.slice(L,L=n[te]),vn(n[te+1],t.cm.options));return}for(var de=f.length,ge=0,xe=1,Re="",Pe,Ke,We=0,et,it,lt,ft,xt;;){if(We==ge){et=it=lt=Ke="",xt=null,ft=null,We=Infinity;for(var pt=[],_t=void 0,Pt=0;Pt<r.length;++Pt){var kt=r[Pt],zt=kt.marker;if(zt.type=="bookmark"&&kt.from==ge&&zt.widgetNode)pt.push(zt);else if(kt.from<=ge&&(kt.to==null||kt.to>ge||zt.collapsed&&kt.to==ge&&kt.from==ge)){if(kt.to!=null&&kt.to!=ge&&We>kt.to&&(We=kt.to,it=""),zt.className&&(et+=" "+zt.className),zt.css&&(Ke=(Ke?Ke+";":"")+zt.css),zt.startStyle&&kt.from==ge&&(lt+=" "+zt.startStyle),zt.endStyle&&kt.to==We&&(_t||(_t=[])).push(zt.endStyle,kt.to),zt.title&&((xt||(xt={})).title=zt.title),zt.attributes)for(var or in zt.attributes)(xt||(xt={}))[or]=zt.attributes[or];zt.collapsed&&(!ft||Ar(ft.marker,zt)<0)&&(ft=kt)}else kt.from>ge&&We>kt.from&&(We=kt.from)}if(_t)for(var Ir=0;Ir<_t.length;Ir+=2)_t[Ir+1]==We&&(it+=" "+_t[Ir]);if(!ft||ft.from==ge)for(var vr=0;vr<pt.length;++vr)Ht(t,0,pt[vr]);if(ft&&(ft.from||0)==ge){if(Ht(t,(ft.to==null?de+1:ft.to)-ge,ft.marker,ft.from==null),ft.to==null)return;ft.to==ge&&(ft=!1)}}if(ge>=de)break;for(var mn=Math.min(de,We);;){if(Re){var un=ge+Re.length;if(!ft){var Or=un>mn?Re.slice(0,mn-ge):Re;t.addToken(t,Or,Pe?Pe+et:et,lt,ge+Or.length==We?it:"",Ke,xt)}if(un>=mn){Re=Re.slice(mn-ge),ge=mn;break}ge=un,lt=""}Re=f.slice(L,L=n[xe++]),Pe=vn(n[xe++],t.cm.options)}}}function Gt(e,t,n){this.line=t,this.rest=bt(t),this.size=this.rest?It(Z(this.rest))-n+1:1,this.node=this.text=null,this.hidden=gr(e,t)}function lr(e,t,n){for(var r=[],f,L=t;L<n;L=f){var te=new Gt(e.doc,mt(e.doc,L),L);f=L+te.size,r.push(te)}return r}var Er=null;function Wt(e){Er?Er.ops.push(e):e.ownsGroup=Er={ops:[e],delayedCallbacks:[]}}function Gr(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var f=e.ops[r];if(f.cursorActivityHandlers)for(;f.cursorActivityCalled<f.cursorActivityHandlers.length;)f.cursorActivityHandlers[f.cursorActivityCalled++].call(null,f.cm)}}while(n<t.length)}function er(e,t){var n=e.ownsGroup;if(!n)return;try{Gr(n)}finally{Er=null,t(n)}}var _r=null;function tr(e,t){var n=nt(e,t);if(!n.length)return;var r=Array.prototype.slice.call(arguments,2),f;Er?f=Er.delayedCallbacks:_r?f=_r:(f=_r=[],setTimeout(en,0));for(var L=function(de){f.push(function(){return n[de].apply(null,r)})},te=0;te<n.length;++te)L(te)}function en(){var e=_r;_r=null;for(var t=0;t<e.length;++t)e[t]()}function jn(e,t,n,r){for(var f=0;f<t.changes.length;f++){var L=t.changes[f];L=="text"?Mi(e,t):L=="gutter"?Gn(e,t,n,r):L=="class"?fi(e,t):L=="widget"&&_n(e,t,r)}t.changes=null}function zn(e){return e.node==e.text&&(e.node=Q("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),d&&a<8&&(e.node.style.zIndex=2)),e.node}function ro(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=zn(t);t.background=r.insertBefore(Q("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):En(e,t)}function Mi(e,t){var n=t.text.className,r=Bn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,fi(e,t)):n&&(t.text.className=n)}function fi(e,t){ro(e,t),t.line.wrapClass?zn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Gn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var f=zn(t);t.gutterBackground=Q("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),f.insertBefore(t.gutterBackground,t.text)}var L=t.line.gutterMarkers;if(e.options.lineNumbers||L){var te=zn(t),de=t.gutter=Q("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),te.insertBefore(de,t.text),t.line.gutterClass&&(de.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!L||!L["CodeMirror-linenumbers"])&&(t.lineNumber=de.appendChild(Q("div",Vr(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),L)for(var ge=0;ge<e.display.gutterSpecs.length;++ge){var xe=e.display.gutterSpecs[ge].className,Re=L.hasOwnProperty(xe)&&L[xe];Re&&de.appendChild(Q("div",[Re],"CodeMirror-gutter-elt","left: "+r.gutterLeft[xe]+"px; width: "+r.gutterWidth[xe]+"px"))}}}function _n(e,t,n){t.alignable&&(t.alignable=null);for(var r=X("CodeMirror-linewidget"),f=t.node.firstChild,L=void 0;f;f=L)L=f.nextSibling,r.test(f.className)&&t.node.removeChild(f);Ni(e,t,n)}function no(e,t,n,r){var f=Bn(e,t);return t.text=t.node=f.pre,f.bgClass&&(t.bgClass=f.bgClass),f.textClass&&(t.textClass=f.textClass),fi(e,t),Gn(e,t,n,r),Ni(e,t,r),t.node}function Ni(e,t,n){if(pi(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)pi(e,t.rest[r],t,n,!1)}function pi(e,t,n,r,f){if(!t.widgets)return;for(var L=zn(n),te=0,de=t.widgets;te<de.length;++te){var ge=de[te],xe=Q("div",[ge.node],"CodeMirror-linewidget"+(ge.className?" "+ge.className:""));ge.handleMouseEvents||xe.setAttribute("cm-ignore-events","true"),Sn(ge,xe,n,r),e.display.input.setUneditable(xe),f&&ge.above?L.insertBefore(xe,n.gutter||n.text):L.appendChild(xe),tr(ge,"redraw")}}function Sn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var f=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(f-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=f+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Kn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!z(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),K(t.display.measure,Q("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function yn(e,t){for(var n=ze(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function Xn(e){return e.lineSpace.offsetTop}function io(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function an(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=K(e.measure,Q("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function tn(e){return ve-e.display.nativeBarWidth}function ni(e){return e.display.scroller.clientWidth-tn(e)-e.display.barWidth}function Oo(e){return e.display.scroller.clientHeight-tn(e)-e.display.barHeight}function Bs(e,t,n){var r=e.options.lineWrapping,f=r&&ni(e);if(!t.measure.heights||r&&t.measure.width!=f){var L=t.measure.heights=[];if(r){t.measure.width=f;for(var te=t.text.firstChild.getClientRects(),de=0;de<te.length-1;de++){var ge=te[de],xe=te[de+1];Math.abs(ge.bottom-xe.bottom)>2&&L.push((ge.bottom+xe.top)/2-n.top)}}L.push(n.bottom-n.top)}}function ua(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var f=0;f<e.rest.length;f++)if(It(e.rest[f])>n)return{map:e.measure.maps[f],cache:e.measure.caches[f],before:!0}}function Fs(e,t){t=gt(t);var n=It(t),r=e.display.externalMeasured=new Gt(e.doc,t,n);r.lineN=n;var f=r.built=En(e,r);return r.text=f.pre,K(e.display.lineMeasure,f.pre),r}function ca(e,t,n,r){return Rn(e,mi(e,t),n,r)}function ko(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ai(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function mi(e,t){var n=It(t),r=ko(e,n);r&&!r.text?r=null:r&&r.changes&&(jn(e,r,n,Po(e)),e.curOp.forceUpdate=!0),r||(r=Fs(e,t));var f=ua(r,t,n);return{line:t,view:r,rect:null,map:f.map,cache:f.cache,before:f.before,hasHeights:!1}}function Rn(e,t,n,r,f){t.before&&(n=-1);var L=n+(r||""),te;return t.cache.hasOwnProperty(L)?te=t.cache[L]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Bs(e,t.view,t.rect),t.hasHeights=!0),te=Hs(e,t,n,r),te.bogus||(t.cache[L]=te)),{left:te.left,right:te.right,top:f?te.rtop:te.top,bottom:f?te.rbottom:te.bottom}}var da={left:0,right:0,top:0,bottom:0};function ha(e,t,n){for(var r,f,L,te,de,ge,xe=0;xe<e.length;xe+=3)if(de=e[xe],ge=e[xe+1],t<de?(f=0,L=1,te="left"):t<ge?(f=t-de,L=f+1):(xe==e.length-3||t==ge&&e[xe+3]>t)&&(L=ge-de,f=L-1,t>=ge&&(te="right")),f!=null){if(r=e[xe+2],de==ge&&n==(r.insertLeft?"left":"right")&&(te=n),n=="left"&&f==0)for(;xe&&e[xe-2]==e[xe-3]&&e[xe-1].insertLeft;)r=e[(xe-=3)+2],te="left";if(n=="right"&&f==ge-de)for(;xe<e.length-3&&e[xe+3]==e[xe+4]&&!e[xe+5].insertLeft;)r=e[(xe+=3)+2],te="right";break}return{node:r,start:f,end:L,collapse:te,coverStart:de,coverEnd:ge}}function Us(e,t){var n=da;if(t=="left")for(var r=0;r<e.length&&!((n=e[r]).left!=n.right);r++);else for(var f=e.length-1;f>=0&&!((n=e[f]).left!=n.right);f--);return n}function Hs(e,t,n,r){var f=ha(t.map,n,r),L=f.node,te=f.start,de=f.end,ge=f.collapse,xe;if(L.nodeType==3){for(var Re=0;Re<4;Re++){for(;te&&ye(t.line.text.charAt(f.coverStart+te));)--te;for(;f.coverStart+de<f.coverEnd&&ye(t.line.text.charAt(f.coverStart+de));)++de;if(d&&a<9&&te==0&&de==f.coverEnd-f.coverStart?xe=L.parentNode.getBoundingClientRect():xe=Us(fe(L,te,de).getClientRects(),r),xe.left||xe.right||te==0)break;de=te,te=te-1,ge="right"}d&&a<11&&(xe=Ws(e.display.measure,xe))}else{te>0&&(ge=r="right");var Pe;e.options.lineWrapping&&(Pe=L.getClientRects()).length>1?xe=Pe[r=="right"?Pe.length-1:0]:xe=L.getBoundingClientRect()}if(d&&a<9&&!te&&(!xe||!xe.left&&!xe.right)){var Ke=L.parentNode.getClientRects()[0];Ke?xe={left:Ke.left,right:Ke.left+vi(e.display),top:Ke.top,bottom:Ke.bottom}:xe=da}for(var We=xe.top-t.rect.top,et=xe.bottom-t.rect.top,it=(We+et)/2,lt=t.view.measure.heights,ft=0;ft<lt.length-1&&!(it<lt[ft]);ft++);var xt=ft?lt[ft-1]:0,pt=lt[ft],_t={left:(ge=="right"?xe.right:xe.left)-t.rect.left,right:(ge=="left"?xe.left:xe.right)-t.rect.left,top:xt,bottom:pt};return!xe.left&&!xe.right&&(_t.bogus=!0),e.options.singleCursorHeightPerLine||(_t.rtop=We,_t.rbottom=et),_t}function Ws(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vt(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}}function fa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pa(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)fa(e.display.view[t])}function Pi(e){pa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ma(){return i&&k?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ga(){return i&&k?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ao(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Kn(e.widgets[n]));return t}function oo(e,t,n,r,f){if(!f){var L=Ao(t);n.top+=L,n.bottom+=L}if(r=="line")return n;r||(r="local");var te=cr(t);if(r=="local"?te+=Xn(e.display):te-=e.display.viewOffset,r=="page"||r=="window"){var de=e.display.lineSpace.getBoundingClientRect();te+=de.top+(r=="window"?0:ga());var ge=de.left+(r=="window"?0:ma());n.left+=ge,n.right+=ge}return n.top+=te,n.bottom+=te,n}function va(e,t,n){if(n=="div")return t;var r=t.left,f=t.top;if(n=="page")r-=ma(),f-=ga();else if(n=="local"||!n){var L=e.display.sizer.getBoundingClientRect();r+=L.left,f+=L.top}var te=e.display.lineSpace.getBoundingClientRect();return{left:r-te.left,top:f-te.top}}function Ro(e,t,n,r,f){return r||(r=mt(e.doc,t.line)),oo(e,r,ca(e,r,t.ch,f),n)}function Tn(e,t,n,r,f,L){r=r||mt(e.doc,t.line),f||(f=mi(e,r));function te(et,it){var lt=Rn(e,f,et,it?"right":"left",L);return it?lt.left=lt.right:lt.right=lt.left,oo(e,r,lt,n)}var de=Xe(r,e.doc.direction),ge=t.ch,xe=t.sticky;if(ge>=r.text.length?(ge=r.text.length,xe="before"):ge<=0&&(ge=0,xe="after"),!de)return te(xe=="before"?ge-1:ge,xe=="before");function Re(et,it,lt){var ft=de[it],xt=ft.level==1;return te(lt?et-1:et,xt!=lt)}var Pe=Ge(de,ge,xe),Ke=Ue,We=Re(ge,Pe,xe=="before");return Ke!=null&&(We.other=Re(ge,Ke,xe!="before")),We}function ya(e,t){var n=0;t=x(e.doc,t),e.options.lineWrapping||(n=vi(e.display)*t.ch);var r=mt(e.doc,t.line),f=cr(r)+Xn(e.display);return{left:n,right:n,top:f,bottom:f+r.height}}function Do(e,t,n,r,f){var L=rt(e,t,n);return L.xRel=f,r&&(L.outside=r),L}function Mo(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Do(r.first,0,null,-1,-1);var f=pr(r,n),L=r.first+r.size-1;if(f>L)return Do(r.first+r.size-1,mt(r,L).text.length,null,1,1);t<0&&(t=0);for(var te=mt(r,f);;){var de=zs(e,te,f,t,n),ge=vt(te,de.ch+(de.xRel>0||de.outside>0?1:0));if(!ge)return de;var xe=ge.find(1);if(xe.line==f)return xe;te=mt(r,f=xe.line)}}function ba(e,t,n,r){r-=Ao(t);var f=t.text.length,L=Be(function(te){return Rn(e,n,te-1).bottom<=r},f,0);return f=Be(function(te){return Rn(e,n,te).top>r},L,f),{begin:L,end:f}}function xa(e,t,n,r){n||(n=mi(e,t));var f=oo(e,t,Rn(e,n,r),"line").top;return ba(e,t,n,f)}function No(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function zs(e,t,n,r,f){f-=cr(t);var L=mi(e,t),te=Ao(t),de=0,ge=t.text.length,xe=!0,Re=Xe(t,e.doc.direction);if(Re){var Pe=(e.options.lineWrapping?Ks:Gs)(e,t,n,L,Re,r,f);xe=Pe.level!=1,de=xe?Pe.from:Pe.to-1,ge=xe?Pe.to:Pe.from-1}var Ke=null,We=null,et=Be(function(Pt){var kt=Rn(e,L,Pt);return kt.top+=te,kt.bottom+=te,No(kt,r,f,!1)?(kt.top<=f&&kt.left<=r&&(Ke=Pt,We=kt),!0):!1},de,ge),it,lt,ft=!1;if(We){var xt=r-We.left<We.right-r,pt=xt==xe;et=Ke+(pt?0:1),lt=pt?"after":"before",it=xt?We.left:We.right}else{!xe&&(et==ge||et==de)&&et++,lt=et==0?"after":et==t.text.length?"before":Rn(e,L,et-(xe?1:0)).bottom+te<=f==xe?"after":"before";var _t=Tn(e,rt(n,et,lt),"line",t,L);it=_t.left,ft=f<_t.top?-1:f>=_t.bottom?1:0}return et=Oe(t.text,et,1),Do(n,et,lt,ft,r-it)}function Gs(e,t,n,r,f,L,te){var de=Be(function(Pe){var Ke=f[Pe],We=Ke.level!=1;return No(Tn(e,rt(n,We?Ke.to:Ke.from,We?"before":"after"),"line",t,r),L,te,!0)},0,f.length-1),ge=f[de];if(de>0){var xe=ge.level!=1,Re=Tn(e,rt(n,xe?ge.from:ge.to,xe?"after":"before"),"line",t,r);No(Re,L,te,!0)&&Re.top>te&&(ge=f[de-1])}return ge}function Ks(e,t,n,r,f,L,te){var de=ba(e,t,r,te),ge=de.begin,xe=de.end;/\s/.test(t.text.charAt(xe-1))&&xe--;for(var Re=null,Pe=null,Ke=0;Ke<f.length;Ke++){var We=f[Ke];if(We.from>=xe||We.to<=ge)continue;var et=We.level!=1,it=Rn(e,r,et?Math.min(xe,We.to)-1:Math.max(ge,We.from)).right,lt=it<L?L-it+1e9:it-L;(!Re||Pe>lt)&&(Re=We,Pe=lt)}return Re||(Re=f[f.length-1]),Re.from<ge&&(Re={from:ge,to:Re.to,level:Re.level}),Re.to>xe&&(Re={from:Re.from,to:xe,level:Re.level}),Re}var ii;function gi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ii==null){ii=Q("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ii.appendChild(document.createTextNode("x")),ii.appendChild(Q("br"));ii.appendChild(document.createTextNode("x"))}K(e.measure,ii);var n=ii.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),F(e.measure),n||1}function vi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=Q("span","xxxxxxxxxx"),n=Q("pre",[t],"CodeMirror-line-like");K(e.measure,n);var r=t.getBoundingClientRect(),f=(r.right-r.left)/10;return f>2&&(e.cachedCharWidth=f),f||10}function Po(e){for(var t=e.display,n={},r={},f=t.gutters.clientLeft,L=t.gutters.firstChild,te=0;L;L=L.nextSibling,++te){var de=e.display.gutterSpecs[te].className;n[de]=L.offsetLeft+L.clientLeft+f,r[de]=L.clientWidth}return{fixedPos:Lo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Lo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wa(e){var t=gi(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/vi(e.display)-3);return function(f){if(gr(e.doc,f))return 0;var L=0;if(f.widgets)for(var te=0;te<f.widgets.length;te++)f.widgets[te].height&&(L+=f.widgets[te].height);return n?L+(Math.ceil(f.text.length/r)||1)*t:L+t}}function Io(e){var t=e.doc,n=wa(e);t.iter(function(r){var f=n(r);f!=r.height&&Mt(r,f)})}function oi(e,t,n,r){var f=e.display;if(!n&&ze(t).getAttribute("cm-not-content")=="true")return null;var L,te,de=f.lineSpace.getBoundingClientRect();try{L=t.clientX-de.left,te=t.clientY-de.top}catch(Pe){return null}var ge=Mo(e,L,te),xe;if(r&&ge.xRel>0&&(xe=mt(e.doc,ge.line).text).length==ge.ch){var Re=D(xe,xe.length,e.options.tabSize)-xe.length;ge=rt(ge.line,Math.max(0,Math.round((L-an(e.display).left)/vi(e.display))-Re))}return ge}function ai(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function sn(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var f=e.display;if(r&&n<f.viewTo&&(f.updateLineNumbers==null||f.updateLineNumbers>t)&&(f.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=f.viewTo)Wr&&Rt(e.doc,t)<f.viewTo&&Yn(e);else if(n<=f.viewFrom)Wr&&ur(e.doc,n+r)>f.viewFrom?Yn(e):(f.viewFrom+=r,f.viewTo+=r);else if(t<=f.viewFrom&&n>=f.viewTo)Yn(e);else if(t<=f.viewFrom){var L=ao(e,n,n+r,1);L?(f.view=f.view.slice(L.index),f.viewFrom=L.lineN,f.viewTo+=r):Yn(e)}else if(n>=f.viewTo){var te=ao(e,t,t,-1);te?(f.view=f.view.slice(0,te.index),f.viewTo=te.lineN):Yn(e)}else{var de=ao(e,t,t,-1),ge=ao(e,n,n+r,1);de&&ge?(f.view=f.view.slice(0,de.index).concat(lr(e,de.lineN,ge.lineN)).concat(f.view.slice(ge.index)),f.viewTo+=r):Yn(e)}var xe=f.externalMeasured;xe&&(n<xe.lineN?xe.lineN+=r:t<xe.lineN+xe.size&&(f.externalMeasured=null))}function Vn(e,t,n){e.curOp.viewChanged=!0;var r=e.display,f=e.display.externalMeasured;if(f&&t>=f.lineN&&t<f.lineN+f.size&&(r.externalMeasured=null),t<r.viewFrom||t>=r.viewTo)return;var L=r.view[ai(e,t)];if(L.node==null)return;var te=L.changes||(L.changes=[]);he(te,n)==-1&&te.push(n)}function Yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ao(e,t,n,r){var f=ai(e,t),L,te=e.display.view;if(!Wr||n==e.doc.first+e.doc.size)return{index:f,lineN:n};for(var de=e.display.viewFrom,ge=0;ge<f;ge++)de+=te[ge].size;if(de!=t){if(r>0){if(f==te.length-1)return null;L=de+te[f].size-t,f++}else L=de-t;t+=L,n+=L}for(;Rt(e.doc,n)!=n;){if(f==(r<0?0:te.length-1))return null;n+=r*te[f-(r<0?1:0)].size,f+=r}return{index:f,lineN:n}}function Xs(e,t,n){var r=e.display,f=r.view;f.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=lr(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=lr(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ai(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(lr(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ai(e,n)))),r.viewTo=n}function Ca(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var f=t[r];!f.hidden&&(!f.node||f.changes)&&++n}return n}function Li(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ea(e,t){t===void 0&&(t=!0);for(var n=e.doc,r={},f=r.cursors=document.createDocumentFragment(),L=r.selection=document.createDocumentFragment(),te=0;te<n.sel.ranges.length;te++){if(!t&&te==n.sel.primIndex)continue;var de=n.sel.ranges[te];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var ge=de.empty();(ge||e.options.showCursorWhenSelecting)&&_a(e,de.head,f),ge||Vs(e,de,L)}return r}function _a(e,t,n){var r=Tn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),f=n.appendChild(Q("div","\xA0","CodeMirror-cursor"));if(f.style.left=r.left+"px",f.style.top=r.top+"px",f.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var L=n.appendChild(Q("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));L.style.display="",L.style.left=r.other.left+"px",L.style.top=r.other.top+"px",L.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function so(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,n){var r=e.display,f=e.doc,L=document.createDocumentFragment(),te=an(e.display),de=te.left,ge=Math.max(r.sizerWidth,ni(e)-r.sizer.offsetLeft)-te.right,xe=f.direction=="ltr";function Re(pt,_t,Pt,kt){_t<0&&(_t=0),_t=Math.round(_t),kt=Math.round(kt),L.appendChild(Q("div",null,"CodeMirror-selected","position: absolute; left: "+pt+`px;
top: `+_t+"px; width: "+(Pt==null?ge-pt:Pt)+`px;
height: `+(kt-_t)+"px"))}function Pe(pt,_t,Pt){var kt=mt(f,pt),zt=kt.text.length,or,Ir;function vr(Or,cn){return Ro(e,rt(pt,Or),"div",kt,cn)}function mn(Or,cn,Ur){var Mr=xa(e,kt,null,Or),kr=cn=="ltr"==(Ur=="after")?"left":"right",xr=Ur=="after"?Mr.begin:Mr.end-(/\s/.test(kt.text.charAt(Mr.end-1))?2:1);return vr(xr,kr)[kr]}var un=Xe(kt,f.direction);return Fe(un,_t||0,Pt==null?zt:Pt,function(Or,cn,Ur,Mr){var kr=Ur=="ltr",xr=vr(Or,kr?"left":"right"),dn=vr(cn-1,kr?"right":"left"),Ri=_t==null&&Or==0,ei=Pt==null&&cn==zt,Xr=Mr==0,Dn=!un||Mr==un.length-1;if(dn.top-xr.top<=3){var jr=(xe?Ri:ei)&&Xr,sa=(xe?ei:Ri)&&Dn,Un=jr?de:(kr?xr:dn).left,di=sa?ge:(kr?dn:xr).right;Re(Un,xr.top,di-Un,xr.bottom)}else{var hi,nn,Di,la;kr?(hi=xe&&Ri&&Xr?de:xr.left,nn=xe?ge:mn(Or,Ur,"before"),Di=xe?de:mn(cn,Ur,"after"),la=xe&&ei&&Dn?ge:dn.right):(hi=xe?mn(Or,Ur,"before"):de,nn=!xe&&Ri&&Xr?ge:xr.right,Di=!xe&&ei&&Dn?de:dn.left,la=xe?mn(cn,Ur,"after"):ge),Re(hi,xr.top,nn-hi,xr.bottom),xr.bottom<dn.top&&Re(de,xr.bottom,null,dn.top),Re(Di,dn.top,la-Di,dn.bottom)}(!or||so(xr,or)<0)&&(or=xr),so(dn,or)<0&&(or=dn),(!Ir||so(xr,Ir)<0)&&(Ir=xr),so(dn,Ir)<0&&(Ir=dn)}),{start:or,end:Ir}}var Ke=t.from(),We=t.to();if(Ke.line==We.line)Pe(Ke.line,Ke.ch,We.ch);else{var et=mt(f,Ke.line),it=mt(f,We.line),lt=gt(et)==gt(it),ft=Pe(Ke.line,Ke.ch,lt?et.text.length+1:null).end,xt=Pe(We.line,lt?0:null,We.ch).start;lt&&(ft.top<xt.top-2?(Re(ft.right,ft.top,null,ft.bottom),Re(de,xt.top,xt.left,xt.bottom)):Re(ft.right,ft.top,xt.left-ft.right,ft.bottom)),ft.bottom<xt.top&&Re(de,ft.bottom,null,xt.top)}n.appendChild(L)}function jo(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||yi(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Sa(e){e.state.focused||(e.display.input.focus(),Bo(e))}function Ta(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yi(e))},100)}function Bo(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ve(e,"focus",e,t),e.state.focused=!0,$(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),s&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),jo(e)}function yi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ve(e,"blur",e,t),e.state.focused=!1,P(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function lo(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var f=t.view[r],L=e.options.lineWrapping,te=void 0,de=0;if(f.hidden)continue;if(d&&a<8){var ge=f.node.offsetTop+f.node.offsetHeight;te=ge-n,n=ge}else{var xe=f.node.getBoundingClientRect();te=xe.bottom-xe.top,!L&&f.text.firstChild&&(de=f.text.firstChild.getBoundingClientRect().right-xe.left-1)}var Re=f.line.height-te;if((Re>.005||Re<-.005)&&(Mt(f.line,te),Oa(f.line),f.rest))for(var Pe=0;Pe<f.rest.length;Pe++)Oa(f.rest[Pe]);if(de>e.display.sizerWidth){var Ke=Math.ceil(de/vi(e.display));Ke>e.display.maxLineLength&&(e.display.maxLineLength=Ke,e.display.maxLine=f.line,e.display.maxLineChanged=!0)}}}function Oa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function uo(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var f=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,L=pr(t,r),te=pr(t,f);if(n&&n.ensure){var de=n.ensure.from.line,ge=n.ensure.to.line;de<L?(L=de,te=pr(t,cr(mt(t,de))+e.wrapper.clientHeight)):Math.min(ge,t.lastLine())>=te&&(L=pr(t,cr(mt(t,ge))-e.wrapper.clientHeight),te=ge)}return{from:L,to:Math.max(te,L+1)}}function Ys(e,t){if($e(e,"scrollCursorIntoView"))return;var n=e.display,r=n.sizer.getBoundingClientRect(),f=null;if(t.top+r.top<0?f=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(f=!1),f!=null&&!w){var L=Q("div","\u200B",null,`position: absolute;
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
height: `+(t.bottom-t.top+tn(e)+n.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(L),L.scrollIntoView(f),e.display.lineSpace.removeChild(L)}}function Js(e,t,n,r){r==null&&(r=0);var f;!e.options.lineWrapping&&t==n&&(t=t.ch?rt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,n=t.sticky=="before"?rt(t.line,t.ch+1,"before"):t);for(var L=0;L<5;L++){var te=!1,de=Tn(e,t),ge=!n||n==t?de:Tn(e,n);f={left:Math.min(de.left,ge.left),top:Math.min(de.top,ge.top)-r,right:Math.max(de.left,ge.left),bottom:Math.max(de.bottom,ge.bottom)+r};var xe=Fo(e,f),Re=e.doc.scrollTop,Pe=e.doc.scrollLeft;if(xe.scrollTop!=null&&(ji(e,xe.scrollTop),Math.abs(e.doc.scrollTop-Re)>1&&(te=!0)),xe.scrollLeft!=null&&(si(e,xe.scrollLeft),Math.abs(e.doc.scrollLeft-Pe)>1&&(te=!0)),!te)break}return f}function $s(e,t){var n=Fo(e,t);n.scrollTop!=null&&ji(e,n.scrollTop),n.scrollLeft!=null&&si(e,n.scrollLeft)}function Fo(e,t){var n=e.display,r=gi(e.display);t.top<0&&(t.top=0);var f=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,L=Oo(e),te={};t.bottom-t.top>L&&(t.bottom=t.top+L);var de=e.doc.height+io(n),ge=t.top<r,xe=t.bottom>de-r;if(t.top<f)te.scrollTop=ge?0:t.top;else if(t.bottom>f+L){var Re=Math.min(t.top,(xe?de:t.bottom)-L);Re!=f&&(te.scrollTop=Re)}var Pe=e.options.fixedGutter?0:n.gutters.offsetWidth,Ke=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-Pe,We=ni(e)-n.gutters.offsetWidth,et=t.right-t.left>We;return et&&(t.right=t.left+We),t.left<10?te.scrollLeft=0:t.left<Ke?te.scrollLeft=Math.max(0,t.left+Pe-(et?0:10)):t.right>We+Ke-3&&(te.scrollLeft=t.right+(et?0:10)-We),te}function Uo(e,t){if(t==null)return;co(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function bi(e){co(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ii(e,t,n){(t!=null||n!=null)&&co(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Zs(e,t){co(e),e.curOp.scrollToPos=t}function co(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ya(e,t.from),r=ya(e,t.to);ka(e,n,r,t.margin)}}function ka(e,t,n,r){var f=Fo(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});Ii(e,f.scrollLeft,f.scrollTop)}function ji(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;S||Wo(e,{top:t}),Aa(e,t,!0),S&&Wo(e),Ui(e,100)}function Aa(e,t,n){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!n)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function si(e,t,n,r){if(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)return;e.doc.scrollLeft=t,Pa(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function Bi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+io(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+tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var li=function(e,t,n){this.cm=n;var r=this.vert=Q("div",[Q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),f=this.horiz=Q("div",[Q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=f.tabIndex=-1,e(r),e(f),Ne(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ne(f,"scroll",function(){f.clientWidth&&t(f.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};li.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 f=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+f)+"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 L=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+L)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},li.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},li.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},li.prototype.zeroWidthHack=function(){var e=M&&!v?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new le,this.disableVert=new le},li.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto";function r(){var f=e.getBoundingClientRect(),L=n=="vert"?document.elementFromPoint(f.right-1,(f.top+f.bottom)/2):document.elementFromPoint((f.right+f.left)/2,f.bottom-1);L!=e?e.style.pointerEvents="none":t.set(1e3,r)}t.set(1e3,r)},li.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fi=function(){};Fi.prototype.update=function(){return{bottom:0,right:0}},Fi.prototype.setScrollLeft=function(){},Fi.prototype.setScrollTop=function(){},Fi.prototype.clear=function(){};function xi(e,t){t||(t=Bi(e));var n=e.display.barWidth,r=e.display.barHeight;Ra(e,t);for(var f=0;f<4&&n!=e.display.barWidth||r!=e.display.barHeight;f++)n!=e.display.barWidth&&e.options.lineWrapping&&lo(e),Ra(e,Bi(e)),n=e.display.barWidth,r=e.display.barHeight}function Ra(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=""}var Da={native:li,null:Fi};function Ma(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Da[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ne(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?si(e,t):ji(e,t)},e),e.display.scrollbars.addClass&&$(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function ui(e){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:++Qs},Wt(e.curOp)}function ci(e){var t=e.curOp;t&&er(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;el(n)})}function el(e){for(var t=e.ops,n=0;n<t.length;n++)tl(t[n]);for(var r=0;r<t.length;r++)rl(t[r]);for(var f=0;f<t.length;f++)nl(t[f]);for(var L=0;L<t.length;L++)il(t[L]);for(var te=0;te<t.length;te++)ol(t[te])}function tl(e){var t=e.cm,n=t.display;sl(t),e.updateMaxLine&&Dr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ho(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function rl(e){e.updatedDisplay=e.mustUpdate&&Ho(e.cm,e.update)}function nl(e){var t=e.cm,n=t.display;e.updatedDisplay&&lo(t),e.barMeasure=Bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ca(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+tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-ni(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function il(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&si(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==se();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&xi(t,e.barMeasure),e.updatedDisplay&&Go(t,e.barMeasure),e.selectionChanged&&jo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Sa(e.cm)}function ol(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&Na(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&Aa(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&si(t,e.scrollLeft,!0,!0),e.scrollToPos){var f=Js(t,x(r,e.scrollToPos.from),x(r,e.scrollToPos.to),e.scrollToPos.margin);Ys(t,f)}var L=e.maybeHiddenMarkers,te=e.maybeUnhiddenMarkers;if(L)for(var de=0;de<L.length;++de)L[de].lines.length||Ve(L[de],"hide");if(te)for(var ge=0;ge<te.length;++ge)te[ge].lines.length&&Ve(te[ge],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function pn(e,t){if(e.curOp)return t();ui(e);try{return t()}finally{ci(e)}}function Pr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ui(e);try{return t.apply(e,arguments)}finally{ci(e)}}}function rn(e){return function(){if(this.curOp)return e.apply(this,arguments);ui(this);try{return e.apply(this,arguments)}finally{ci(this)}}}function Lr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ui(t);try{return e.apply(this,arguments)}finally{ci(t)}}}function Ui(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var n=+new Date+e.options.workTime,r=He(e,t.highlightFrontier),f=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(L){if(r.line>=e.display.viewFrom){var te=L.styles,de=L.text.length>e.options.maxHighlightLength?sr(t.mode,r.state):null,ge=Me(e,L,r,!0);de&&(r.state=de),L.styles=ge.styles;var xe=L.styleClasses,Re=ge.classes;Re?L.styleClasses=Re:xe&&(L.styleClasses=null);for(var Pe=!te||te.length!=L.styles.length||xe!=Re&&(!xe||!Re||xe.bgClass!=Re.bgClass||xe.textClass!=Re.textClass),Ke=0;!Pe&&Ke<te.length;++Ke)Pe=te[Ke]!=L.styles[Ke];Pe&&f.push(r.line),L.stateAfter=r.save(),r.nextLine()}else L.text.length<=e.options.maxHighlightLength&&wt(e,L.text,r),L.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Ui(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),f.length&&pn(e,function(){for(var L=0;L<f.length;L++)Vn(e,f[L],"text")})}var ho=function(e,t,n){var r=e.display;this.viewport=t,this.visible=uo(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=ni(e),this.force=n,this.dims=Po(e),this.events=[]};ho.prototype.signal=function(e,t){De(e,t)&&this.events.push(arguments)},ho.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ve.apply(null,this.events[e])};function sl(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=tn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=tn(e)+"px",t.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var t=se();if(!t||!z(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&z(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function ul(e){if(!e||!e.activeElt||e.activeElt==se())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&z(document.body,e.anchorNode)&&z(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)}}function Ho(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Yn(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Ca(e)==0)return!1;La(e)&&(Yn(e),t.dims=Po(e));var f=r.first+r.size,L=Math.max(t.visible.from-e.options.viewportMargin,r.first),te=Math.min(f,t.visible.to+e.options.viewportMargin);n.viewFrom<L&&L-n.viewFrom<20&&(L=Math.max(r.first,n.viewFrom)),n.viewTo>te&&n.viewTo-te<20&&(te=Math.min(f,n.viewTo)),Wr&&(L=Rt(e.doc,L),te=ur(e.doc,te));var de=L!=n.viewFrom||te!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Xs(e,L,te),n.viewOffset=cr(mt(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var ge=Ca(e);if(!de&&ge==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var xe=ll(e);return ge>4&&(n.lineDiv.style.display="none"),cl(e,n.updateLineNumbers,t.dims),ge>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ul(xe),F(n.cursorDiv),F(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,de&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Ui(e,400)),n.updateLineNumbers=null,!0}function Na(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==ni(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+io(e.display)-Oo(e),n.top)}),t.visible=uo(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=uo(e.display,e.doc,n));if(!Ho(e,t))break;lo(e);var f=Bi(e);Li(e),xi(e,f),Go(e,f),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 Wo(e,t){var n=new ho(e,t);if(Ho(e,n)){lo(e),Na(e,n);var r=Bi(e);Li(e),xi(e,r),Go(e,r),n.finish()}}function cl(e,t,n){var r=e.display,f=e.options.lineNumbers,L=r.lineDiv,te=L.firstChild;function de(et){var it=et.nextSibling;return s&&M&&e.display.currentWheelTarget==et?et.style.display="none":et.parentNode.removeChild(et),it}for(var ge=r.view,xe=r.viewFrom,Re=0;Re<ge.length;Re++){var Pe=ge[Re];if(!Pe.hidden)if(!Pe.node||Pe.node.parentNode!=L){var Ke=no(e,Pe,xe,n);L.insertBefore(Ke,te)}else{for(;te!=Pe.node;)te=de(te);var We=f&&t!=null&&t<=xe&&Pe.lineNumber;Pe.changes&&(he(Pe.changes,"gutter")>-1&&(We=!1),jn(e,Pe,xe,n)),We&&(F(Pe.lineNumber),Pe.lineNumber.appendChild(document.createTextNode(Vr(e.options,xe)))),te=Pe.node.nextSibling}xe+=Pe.size}for(;te;)te=de(te)}function zo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Go(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+tn(e)+"px"}function Pa(e){var t=e.display,n=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var r=Lo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,f=t.gutters.offsetWidth,L=r+"px",te=0;te<n.length;te++)if(!n[te].hidden){e.options.fixedGutter&&(n[te].gutter&&(n[te].gutter.style.left=L),n[te].gutterBackground&&(n[te].gutterBackground.style.left=L));var de=n[te].alignable;if(de)for(var ge=0;ge<de.length;ge++)de[ge].style.left=L}e.options.fixedGutter&&(t.gutters.style.left=r+f+"px")}function La(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Vr(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var f=r.measure.appendChild(Q("div",[Q("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),L=f.firstChild.offsetWidth,te=f.offsetWidth-L;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(L,r.lineGutter.offsetWidth-te)+1,r.lineNumWidth=r.lineNumInnerWidth+te,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",zo(e.display),!0}return!1}function Ko(e,t){for(var n=[],r=!1,f=0;f<e.length;f++){var L=e[f],te=null;if(typeof L!="string"&&(te=L.style,L=L.className),L=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:L,style:te})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ia(e){var t=e.gutters,n=e.gutterSpecs;F(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var f=n[r],L=f.className,te=f.style,de=t.appendChild(Q("div",null,"CodeMirror-gutter "+L));te&&(de.style.cssText=te),L=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",zo(e)}function Hi(e){Ia(e.display),sn(e),Pa(e)}function dl(e,t,n,r){var f=this;this.input=n,f.scrollbarFiller=Q("div",null,"CodeMirror-scrollbar-filler"),f.scrollbarFiller.setAttribute("cm-not-content","true"),f.gutterFiller=Q("div",null,"CodeMirror-gutter-filler"),f.gutterFiller.setAttribute("cm-not-content","true"),f.lineDiv=ce("div",null,"CodeMirror-code"),f.selectionDiv=Q("div",null,null,"position: relative; z-index: 1"),f.cursorDiv=Q("div",null,"CodeMirror-cursors"),f.measure=Q("div",null,"CodeMirror-measure"),f.lineMeasure=Q("div",null,"CodeMirror-measure"),f.lineSpace=ce("div",[f.measure,f.lineMeasure,f.selectionDiv,f.cursorDiv,f.lineDiv],null,"position: relative; outline: none");var L=ce("div",[f.lineSpace],"CodeMirror-lines");f.mover=Q("div",[L],null,"position: relative"),f.sizer=Q("div",[f.mover],"CodeMirror-sizer"),f.sizerWidth=null,f.heightForcer=Q("div",null,null,"position: absolute; height: "+ve+"px; width: 1px;"),f.gutters=Q("div",null,"CodeMirror-gutters"),f.lineGutter=null,f.scroller=Q("div",[f.sizer,f.heightForcer,f.gutters],"CodeMirror-scroll"),f.scroller.setAttribute("tabIndex","-1"),f.wrapper=Q("div",[f.scrollbarFiller,f.gutterFiller,f.scroller],"CodeMirror"),d&&a<8&&(f.gutters.style.zIndex=-1,f.scroller.style.paddingRight=0),!s&&!(S&&O)&&(f.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(f.wrapper):e(f.wrapper)),f.viewFrom=f.viewTo=t.first,f.reportedViewFrom=f.reportedViewTo=t.first,f.view=[],f.renderedView=null,f.externalMeasured=null,f.viewOffset=0,f.lastWrapHeight=f.lastWrapWidth=0,f.updateLineNumbers=null,f.nativeBarWidth=f.barHeight=f.barWidth=0,f.scrollbarsClipped=!1,f.lineNumWidth=f.lineNumInnerWidth=f.lineNumChars=null,f.alignWidgets=!1,f.cachedCharWidth=f.cachedTextHeight=f.cachedPaddingH=null,f.maxLine=null,f.maxLineLength=0,f.maxLineChanged=!1,f.wheelDX=f.wheelDY=f.wheelStartX=f.wheelStartY=null,f.shift=!1,f.selForContextMenu=null,f.activeTouch=null,f.gutterSpecs=Ko(r.gutters,r.lineNumbers),Ia(f),n.init(f)}var fo=0,bn=null;d?bn=-.53:S?bn=15:i?bn=-.7:m&&(bn=-1/3);function ja(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function hl(e){var t=ja(e);return t.x*=bn,t.y*=bn,t}function Ba(e,t){var n=ja(t),r=n.x,f=n.y,L=e.display,te=L.scroller,de=te.scrollWidth>te.clientWidth,ge=te.scrollHeight>te.clientHeight;if(!(r&&de||f&&ge))return;if(f&&M&&s){e:for(var xe=t.target,Re=L.view;xe!=te;xe=xe.parentNode)for(var Pe=0;Pe<Re.length;Pe++)if(Re[Pe].node==xe){e.display.currentWheelTarget=xe;break e}}if(r&&!S&&!g&&bn!=null){f&&ge&&ji(e,Math.max(0,te.scrollTop+f*bn)),si(e,Math.max(0,te.scrollLeft+r*bn)),(!f||f&&ge)&&_e(t),L.wheelStartX=null;return}if(f&&bn!=null){var Ke=f*bn,We=e.doc.scrollTop,et=We+L.wrapper.clientHeight;Ke<0?We=Math.max(0,We+Ke-50):et=Math.min(e.doc.height,et+Ke+50),Wo(e,{top:We,bottom:et})}fo<20&&(L.wheelStartX==null?(L.wheelStartX=te.scrollLeft,L.wheelStartY=te.scrollTop,L.wheelDX=r,L.wheelDY=f,setTimeout(function(){if(L.wheelStartX==null)return;var it=te.scrollLeft-L.wheelStartX,lt=te.scrollTop-L.wheelStartY,ft=lt&&L.wheelDY&&lt/L.wheelDY||it&&L.wheelDX&&it/L.wheelDX;if(L.wheelStartX=L.wheelStartY=null,!ft)return;bn=(bn*fo+ft)/(fo+1),++fo},200)):(L.wheelDX+=r,L.wheelDY+=f))}var xn=function(e,t){this.ranges=e,this.primIndex=t};xn.prototype.primary=function(){return this.ranges[this.primIndex]},xn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!Hr(n.anchor,r.anchor)||!Hr(n.head,r.head))return!1}return!0},xn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new rr(wr(this.ranges[t].anchor),wr(this.ranges[t].head));return new xn(e,this.primIndex)},xn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},xn.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Ot(t,r.from())>=0&&Ot(e,r.to())<=0)return n}return-1};var rr=function(e,t){this.anchor=e,this.head=t};rr.prototype.from=function(){return wn(this.anchor,this.head)},rr.prototype.to=function(){return fn(this.anchor,this.head)},rr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function On(e,t,n){var r=e&&e.options.selectionsMayTouch,f=t[n];t.sort(function(Ke,We){return Ot(Ke.from(),We.from())}),n=he(t,f);for(var L=1;L<t.length;L++){var te=t[L],de=t[L-1],ge=Ot(de.to(),te.from());if(r&&!te.empty()?ge>0:ge>=0){var xe=wn(de.from(),te.from()),Re=fn(de.to(),te.to()),Pe=de.empty()?te.from()==te.head:de.from()==de.head;L<=n&&--n,t.splice(--L,2,new rr(Pe?Re:xe,Pe?xe:Re))}}return new xn(t,n)}function Jn(e,t){return new xn([new rr(e,t||e)],0)}function $n(e){return e.text?rt(e.from.line+e.text.length-1,Z(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Fa(e,t){if(Ot(e,t.from)<0)return e;if(Ot(e,t.to)<=0)return $n(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+=$n(t).ch-t.to.ch),rt(n,r)}function Xo(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var f=e.sel.ranges[r];n.push(new rr(Fa(f.anchor,t),Fa(f.head,t)))}return On(e.cm,n,e.sel.primIndex)}function Ua(e,t,n){return e.line==t.line?rt(n.line,e.ch-t.ch+n.ch):rt(n.line+(e.line-t.line),e.ch)}function fl(e,t,n){for(var r=[],f=rt(e.first,0),L=f,te=0;te<t.length;te++){var de=t[te],ge=Ua(de.from,f,L),xe=Ua($n(de),f,L);if(f=de.to,L=xe,n=="around"){var Re=e.sel.ranges[te],Pe=Ot(Re.head,Re.anchor)<0;r[te]=new rr(Pe?xe:ge,Pe?ge:xe)}else r[te]=new rr(ge,ge)}return new xn(r,e.sel.primIndex)}function Vo(e){e.doc.mode=hr(e.options,e.doc.modeOption),Wi(e)}function Wi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ui(e,100),e.state.modeGen++,e.curOp&&sn(e)}function Ha(e,t){return t.from.ch==0&&t.to.ch==0&&Z(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Yo(e,t,n,r){function f(xt){return n?n[xt]:null}function L(xt,pt,_t){Fr(xt,pt,_t,r),tr(xt,"change",xt,t)}function te(xt,pt){for(var _t=[],Pt=xt;Pt<pt;++Pt)_t.push(new Br(xe[Pt],f(Pt),r));return _t}var de=t.from,ge=t.to,xe=t.text,Re=mt(e,de.line),Pe=mt(e,ge.line),Ke=Z(xe),We=f(xe.length-1),et=ge.line-de.line;if(t.full)e.insert(0,te(0,xe.length)),e.remove(xe.length,e.size-xe.length);else if(Ha(e,t)){var it=te(0,xe.length-1);L(Pe,Pe.text,We),et&&e.remove(de.line,et),it.length&&e.insert(de.line,it)}else if(Re==Pe)if(xe.length==1)L(Re,Re.text.slice(0,de.ch)+Ke+Re.text.slice(ge.ch),We);else{var lt=te(1,xe.length-1);lt.push(new Br(Ke+Re.text.slice(ge.ch),We,r)),L(Re,Re.text.slice(0,de.ch)+xe[0],f(0)),e.insert(de.line+1,lt)}else if(xe.length==1)L(Re,Re.text.slice(0,de.ch)+xe[0]+Pe.text.slice(ge.ch),f(0)),e.remove(de.line+1,et);else{L(Re,Re.text.slice(0,de.ch)+xe[0],f(0)),L(Pe,Ke+Pe.text.slice(ge.ch),We);var ft=te(1,xe.length-1);et>1&&e.remove(de.line+1,et-1),e.insert(de.line+1,ft)}tr(e,"change",e,t)}function Zn(e,t,n){function r(f,L,te){if(f.linked)for(var de=0;de<f.linked.length;++de){var ge=f.linked[de];if(ge.doc==L)continue;var xe=te&&ge.sharedHist;if(n&&!xe)continue;t(ge.doc,xe),r(ge.doc,f,xe)}}r(e,null,!0)}function Wa(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Io(e),Vo(e),za(e),e.options.lineWrapping||Dr(e),e.options.mode=t.modeOption,sn(e)}function za(e){(e.doc.direction=="rtl"?$:P)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){pn(e,function(){za(e),sn(e)})}function po(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Jo(e,t){var n={from:wr(t.from),to:$n(t),text:Xt(e,t.from,t.to)};return Xa(e,n,t.from.line,t.to.line+1),Zn(e,function(r){return Xa(r,n,t.from.line,t.to.line+1)},!0),n}function Ga(e){for(;e.length;){var t=Z(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return Ga(e.done),Z(e.done);if(e.done.length&&!Z(e.done).ranges)return Z(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Z(e.done)}function Ka(e,t,n,r){var f=e.history;f.undone.length=0;var L=+new Date,te,de;if((f.lastOp==r||f.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&f.lastModTime>L-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(te=ml(f,f.lastOp==r)))de=Z(te.changes),Ot(t.from,t.to)==0&&Ot(t.from,de.to)==0?de.to=$n(t):te.changes.push(Jo(e,t));else{var ge=Z(f.done);for((!ge||!ge.ranges)&&mo(e.sel,f.done),te={changes:[Jo(e,t)],generation:f.generation},f.done.push(te);f.done.length>f.undoDepth;)f.done.shift(),f.done[0].ranges||f.done.shift()}f.done.push(n),f.generation=++f.maxGeneration,f.lastModTime=f.lastSelTime=L,f.lastOp=f.lastSelOp=r,f.lastOrigin=f.lastSelOrigin=t.origin,de||Ve(e,"historyAdded")}function gl(e,t,n,r){var f=t.charAt(0);return f=="*"||f=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,n,r){var f=e.history,L=r&&r.origin;n==f.lastSelOp||L&&f.lastSelOrigin==L&&(f.lastModTime==f.lastSelTime&&f.lastOrigin==L||gl(e,L,Z(f.done),t))?f.done[f.done.length-1]=t:mo(t,f.done),f.lastSelTime=+new Date,f.lastSelOrigin=L,f.lastSelOp=n,r&&r.clearRedo!==!1&&Ga(f.undone)}function mo(e,t){var n=Z(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Xa(e,t,n,r){var f=t["spans_"+e.id],L=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(te){te.markedSpans&&((f||(f=t["spans_"+e.id]={}))[L]=te.markedSpans),++L})}function yl(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function bl(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],f=0;f<t.text.length;++f)r.push(yl(n[f]));return r}function Va(e,t){var n=bl(e,t),r=Zr(e,t);if(!n)return r;if(!r)return n;for(var f=0;f<n.length;++f){var L=n[f],te=r[f];if(L&&te){e:for(var de=0;de<te.length;++de){for(var ge=te[de],xe=0;xe<L.length;++xe)if(L[xe].marker==ge.marker)continue e;L.push(ge)}}else te&&(n[f]=te)}return n}function wi(e,t,n){for(var r=[],f=0;f<e.length;++f){var L=e[f];if(L.ranges){r.push(n?xn.prototype.deepCopy.call(L):L);continue}var te=L.changes,de=[];r.push({changes:de});for(var ge=0;ge<te.length;++ge){var xe=te[ge],Re=void 0;if(de.push({from:xe.from,to:xe.to,text:xe.text}),t)for(var Pe in xe)(Re=Pe.match(/^spans_(\d+)$/))&&(he(t,Number(Re[1]))>-1&&(Z(de)[Pe]=xe[Pe],delete xe[Pe]))}}return r}function $o(e,t,n,r){if(r){var f=e.anchor;if(n){var L=Ot(t,f)<0;L!=Ot(n,f)<0?(f=t,t=n):L!=Ot(t,n)<0&&(t=n)}return new rr(f,t)}else return new rr(n||t,t)}function go(e,t,n,r,f){f==null&&(f=e.cm&&(e.cm.display.shift||e.extend)),Kr(e,new xn([$o(e.sel.primary(),t,n,f)],0),r)}function Ya(e,t,n){for(var r=[],f=e.cm&&(e.cm.display.shift||e.extend),L=0;L<e.sel.ranges.length;L++)r[L]=$o(e.sel.ranges[L],t[L],null,f);var te=On(e.cm,r,e.sel.primIndex);Kr(e,te,n)}function Zo(e,t,n,r){var f=e.sel.ranges.slice(0);f[t]=n,Kr(e,On(e.cm,f,e.sel.primIndex),r)}function Ja(e,t,n,r){Kr(e,Jn(t,n),r)}function xl(e,t,n){var r={ranges:t.ranges,update:function(f){this.ranges=[];for(var L=0;L<f.length;L++)this.ranges[L]=new rr(x(e,f[L].anchor),x(e,f[L].head))},origin:n&&n.origin};return Ve(e,"beforeSelectionChange",e,r),e.cm&&Ve(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?On(e.cm,r.ranges,r.ranges.length-1):t}function $a(e,t,n){var r=e.history.done,f=Z(r);f&&f.ranges?(r[r.length-1]=t,vo(e,t,n)):Kr(e,t,n)}function Kr(e,t,n){vo(e,t,n),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function vo(e,t,n){(De(e,"beforeSelectionChange")||e.cm&&De(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,n));var r=n&&n.bias||(Ot(t.primary().head,e.sel.primary().head)<0?-1:1);Za(e,qa(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&bi(e.cm)}function Za(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ie(e.cm)),tr(e,"cursorActivity",e)}function Qa(e){Za(e,qa(e,e.sel,null,!1))}function qa(e,t,n,r){for(var f,L=0;L<t.ranges.length;L++){var te=t.ranges[L],de=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[L],ge=yo(e,te.anchor,de&&de.anchor,n,r),xe=yo(e,te.head,de&&de.head,n,r);(f||ge!=te.anchor||xe!=te.head)&&(f||(f=t.ranges.slice(0,L)),f[L]=new rr(ge,xe))}return f?On(e.cm,f,t.primIndex):t}function Ci(e,t,n,r,f){var L=mt(e,t.line);if(L.markedSpans)for(var te=0;te<L.markedSpans.length;++te){var de=L.markedSpans[te],ge=de.marker,xe="selectLeft"in ge?!ge.selectLeft:ge.inclusiveLeft,Re="selectRight"in ge?!ge.selectRight:ge.inclusiveRight;if((de.from==null||(xe?de.from<=t.ch:de.from<t.ch))&&(de.to==null||(Re?de.to>=t.ch:de.to>t.ch))){if(f&&(Ve(ge,"beforeCursorEnter"),ge.explicitlyCleared))if(L.markedSpans){--te;continue}else break;if(!ge.atomic)continue;if(n){var Pe=ge.find(r<0?1:-1),Ke=void 0;if((r<0?Re:xe)&&(Pe=es(e,Pe,-r,Pe&&Pe.line==t.line?L:null)),Pe&&Pe.line==t.line&&(Ke=Ot(Pe,n))&&(r<0?Ke<0:Ke>0))return Ci(e,Pe,t,r,f)}var We=ge.find(r<0?-1:1);return(r<0?xe:Re)&&(We=es(e,We,r,We.line==t.line?L:null)),We?Ci(e,We,t,r,f):null}}return t}function yo(e,t,n,r,f){var L=r||1,te=Ci(e,t,n,L,f)||!f&&Ci(e,t,n,L,!0)||Ci(e,t,n,-L,f)||!f&&Ci(e,t,n,-L,!0);return te||(e.cantEdit=!0,rt(e.first,0))}function es(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?x(e,rt(t.line-1)):null:n>0&&t.ch==(r||mt(e,t.line)).text.length?t.line<e.first+e.size-1?rt(t.line+1,0):null:new rt(t.line,t.ch+n)}function ts(e){e.setSelection(rt(e.firstLine(),0),rt(e.lastLine()),Se)}function rs(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(f,L,te,de){f&&(r.from=x(e,f)),L&&(r.to=x(e,L)),te&&(r.text=te),de!==void 0&&(r.origin=de)}),Ve(e,"beforeChange",e,r),e.cm&&Ve(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Ei(e,t,n){if(e.cm){if(!e.cm.curOp)return Pr(e.cm,Ei)(e,t,n);if(e.cm.state.suppressEdits)return}if((De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"))&&(t=rs(e,t,!0),!t))return;var r=Hn&&!n&&Mn(e,t.from,t.to);if(r)for(var f=r.length-1;f>=0;--f)ns(e,{from:r[f].from,to:r[f].to,text:f?[""]:t.text,origin:t.origin});else ns(e,t)}function ns(e,t){if(t.text.length==1&&t.text[0]==""&&Ot(t.from,t.to)==0)return;var n=Xo(e,t);Ka(e,t,n,e.cm?e.cm.curOp.id:NaN),zi(e,t,n,Zr(e,t));var r=[];Zn(e,function(f,L){!L&&he(r,f.history)==-1&&(ss(f.history,t),r.push(f.history)),zi(f,t,null,Zr(f,t))})}function bo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(r&&!n)return;for(var f=e.history,L,te=e.sel,de=t=="undo"?f.done:f.undone,ge=t=="undo"?f.undone:f.done,xe=0;xe<de.length&&!(L=de[xe],n?L.ranges&&!L.equals(e.sel):!L.ranges);xe++);if(xe==de.length)return;for(f.lastOrigin=f.lastSelOrigin=null;;)if(L=de.pop(),L.ranges){if(mo(L,ge),n&&!L.equals(e.sel)){Kr(e,L,{clearRedo:!1});return}te=L}else if(r){de.push(L);return}else break;var Re=[];mo(te,ge),ge.push({changes:Re,generation:f.generation}),f.generation=L.generation||++f.maxGeneration;for(var Pe=De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"),Ke=function(it){var lt=L.changes[it];if(lt.origin=t,Pe&&!rs(e,lt,!1))return de.length=0,{};Re.push(Jo(e,lt));var ft=it?Xo(e,lt):Z(de);zi(e,lt,ft,Va(e,lt)),!it&&e.cm&&e.cm.scrollIntoView({from:lt.from,to:$n(lt)});var xt=[];Zn(e,function(pt,_t){!_t&&he(xt,pt.history)==-1&&(ss(pt.history,lt),xt.push(pt.history)),zi(pt,lt,null,Va(pt,lt))})},We=L.changes.length-1;We>=0;--We){var et=Ke(We);if(et)return et.v}}function is(e,t){if(t==0)return;if(e.first+=t,e.sel=new xn(ue(e.sel.ranges,function(f){return new rr(rt(f.anchor.line+t,f.anchor.ch),rt(f.head.line+t,f.head.ch))}),e.sel.primIndex),e.cm){sn(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Vn(e.cm,r,"gutter")}}function zi(e,t,n,r){if(e.cm&&!e.cm.curOp)return Pr(e.cm,zi)(e,t,n,r);if(t.to.line<e.first){is(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var f=t.text.length-1-(e.first-t.from.line);is(e,f),t={from:rt(e.first,0),to:rt(t.to.line+f,t.to.ch),text:[Z(t.text)],origin:t.origin}}var L=e.lastLine();t.to.line>L&&(t={from:t.from,to:rt(L,mt(e,L).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Xt(e,t.from,t.to),n||(n=Xo(e,t)),e.cm?wl(e.cm,t,r):Yo(e,t,r),vo(e,n,Se),e.cantEdit&&yo(e,rt(e.firstLine(),0))&&(e.cantEdit=!1)}function wl(e,t,n){var r=e.doc,f=e.display,L=t.from,te=t.to,de=!1,ge=L.line;e.options.lineWrapping||(ge=It(gt(mt(r,L.line))),r.iter(ge,te.line+1,function(We){if(We==f.maxLine)return de=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ie(e),Yo(r,t,n,wa(e)),e.options.lineWrapping||(r.iter(ge,L.line+t.text.length,function(We){var et=Cr(We);et>f.maxLineLength&&(f.maxLine=We,f.maxLineLength=et,f.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),$r(r,L.line),Ui(e,400);var xe=t.text.length-(te.line-L.line)-1;t.full?sn(e):L.line==te.line&&t.text.length==1&&!Ha(e.doc,t)?Vn(e,L.line,"text"):sn(e,L.line,te.line+1,xe);var Re=De(e,"changes"),Pe=De(e,"change");if(Pe||Re){var Ke={from:L,to:te,text:t.text,removed:t.removed,origin:t.origin};Pe&&tr(e,"change",e,Ke),Re&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ke)}e.display.selForContextMenu=null}function _i(e,t,n,r,f){var L;r||(r=n),Ot(r,n)<0&&(L=[r,n],n=L[0],r=L[1]),typeof t=="string"&&(t=e.splitLines(t)),Ei(e,{from:n,to:r,text:t,origin:f})}function os(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function as(e,t,n,r){for(var f=0;f<e.length;++f){var L=e[f],te=!0;if(L.ranges){L.copied||(L=e[f]=L.deepCopy(),L.copied=!0);for(var de=0;de<L.ranges.length;de++)os(L.ranges[de].anchor,t,n,r),os(L.ranges[de].head,t,n,r);continue}for(var ge=0;ge<L.changes.length;++ge){var xe=L.changes[ge];if(n<xe.from.line)xe.from=rt(xe.from.line+r,xe.from.ch),xe.to=rt(xe.to.line+r,xe.to.ch);else if(t<=xe.to.line){te=!1;break}}te||(e.splice(0,f+1),f=0)}}function ss(e,t){var n=t.from.line,r=t.to.line,f=t.text.length-(r-n)-1;as(e.done,n,r,f),as(e.undone,n,r,f)}function Gi(e,t,n,r){var f=t,L=t;return typeof t=="number"?L=mt(e,oe(e,t)):f=It(t),f==null?null:(r(L,f)&&e.cm&&Vn(e.cm,f,n),L)}function Ki(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}Ki.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var f=this.lines[n];this.height-=f.height,Ln(f),tr(f,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function Xi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var f=e[r];t+=f.chunkSize(),n+=f.height,f.parent=this}this.size=t,this.height=n,this.parent=null}Xi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],f=r.chunkSize();if(e<f){var L=Math.min(t,f-e),te=r.height;if(r.removeInner(e,L),this.height-=te-r.height,f==L&&(this.children.splice(n--,1),r.parent=null),(t-=L)==0)break;e=0}else e-=f}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Ki))){var de=[];this.collapse(de),this.children=[new Ki(de)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var f=this.children[r],L=f.chunkSize();if(e<=L){if(f.insertInner(e,t,n),f.lines&&f.lines.length>50){for(var te=f.lines.length%25+25,de=te;de<f.lines.length;){var ge=new Ki(f.lines.slice(de,de+=25));f.height-=ge.height,this.children.splice(++r,0,ge),ge.parent=this}f.lines=f.lines.slice(0,te),this.maybeSpill()}break}e-=L}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Xi(t);if(e.parent){e.size-=n.size,e.height-=n.height;var f=he(e.parent.children,e);e.parent.children.splice(f+1,0,n)}else{var r=new Xi(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var f=this.children[r],L=f.chunkSize();if(e<L){var te=Math.min(t,L-e);if(f.iterN(e,te,n))return!0;if((t-=te)==0)break;e=0}else e-=L}}};var Vi=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Vi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=It(n);if(r==null||!t)return;for(var f=0;f<t.length;++f)t[f]==this&&t.splice(f--,1);t.length||(n.widgets=null);var L=Kn(this);Mt(n,Math.max(0,n.height-L)),e&&(pn(e,function(){ls(e,n,-L),Vn(e,r,"widget")}),tr(e,"lineWidgetCleared",e,this,r))},Vi.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var f=Kn(this)-t;if(!f)return;gr(this.doc,r)||Mt(r,r.height+f),n&&pn(n,function(){n.curOp.forceUpdate=!0,ls(n,r,f),tr(n,"lineWidgetChanged",n,e,It(r))})},Le(Vi);function ls(e,t,n){cr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Uo(e,n)}function Cl(e,t,n,r){var f=new Vi(e,n,r),L=e.cm;return L&&f.noHScroll&&(L.display.alignWidgets=!0),Gi(e,t,"widget",function(te){var de=te.widgets||(te.widgets=[]);if(f.insertAt==null?de.push(f):de.splice(Math.min(de.length-1,Math.max(0,f.insertAt)),0,f),f.line=te,L&&!gr(e,te)){var ge=cr(te)<e.scrollTop;Mt(te,te.height+Kn(f)),ge&&Uo(L,f.height),L.curOp.forceUpdate=!0}return!0}),L&&tr(L,"lineWidgetAdded",L,f,typeof t=="number"?t:It(t)),f}var us=0,Qn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++us};Qn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ui(e),De(this,"clear")){var n=this.find();n&&tr(this,"clear",n.from,n.to)}for(var r=null,f=null,L=0;L<this.lines.length;++L){var te=this.lines[L],de=on(te.markedSpans,this);e&&!this.collapsed?Vn(e,It(te),"text"):e&&(de.to!=null&&(f=It(te)),de.from!=null&&(r=It(te))),te.markedSpans=gn(te.markedSpans,de),de.from==null&&this.collapsed&&!gr(this.doc,te)&&e&&Mt(te,gi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ge=0;ge<this.lines.length;++ge){var xe=gt(this.lines[ge]),Re=Cr(xe);Re>e.display.maxLineLength&&(e.display.maxLine=xe,e.display.maxLineLength=Re,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&sn(e,r,f+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qa(e.doc)),e&&tr(e,"markerCleared",e,this,r,f),t&&ci(e),this.parent&&this.parent.clear()},Qn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,f=0;f<this.lines.length;++f){var L=this.lines[f],te=on(L.markedSpans,this);if(te.from!=null&&(n=rt(t?L:It(L),te.from),e==-1))return n;if(te.to!=null&&(r=rt(t?L:It(L),te.to),e==1))return r}return n&&{from:n,to:r}},Qn.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;if(!t||!r)return;pn(r,function(){var f=t.line,L=It(t.line),te=ko(r,L);if(te&&(fa(te),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!gr(n.doc,f)&&n.height!=null){var de=n.height;n.height=null;var ge=Kn(n)-de;ge&&Mt(f,f.height+ge)}tr(r,"markerChanged",r,e)})},Qn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||he(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Qn.prototype.detachLine=function(e){if(this.lines.splice(he(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Le(Qn);function Si(e,t,n,r,f){if(r&&r.shared)return El(e,t,n,r,f);if(e.cm&&!e.cm.curOp)return Pr(e.cm,Si)(e,t,n,r,f);var L=new Qn(e,f),te=Ot(t,n);if(r&&C(r,L,!1),te>0||te==0&&L.clearWhenEmpty!==!1)return L;if(L.replacedWith&&(L.collapsed=!0,L.widgetNode=ce("span",[L.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||L.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(L.widgetNode.insertLeft=!0)),L.collapsed){if(yt(e,t.line,t,n,L)||t.line!=n.line&&yt(e,n.line,t,n,L))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cn()}L.addToHistory&&Ka(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var de=t.line,ge=e.cm,xe;if(e.iter(de,n.line+1,function(Pe){ge&&L.collapsed&&!ge.options.lineWrapping&&gt(Pe)==ge.display.maxLine&&(xe=!0),L.collapsed&&de!=t.line&&Mt(Pe,0),zr(Pe,new An(L,de==t.line?t.ch:null,de==n.line?n.ch:null)),++de}),L.collapsed&&e.iter(t.line,n.line+1,function(Pe){gr(e,Pe)&&Mt(Pe,0)}),L.clearOnEnter&&Ne(L,"beforeCursorEnter",function(){return L.clear()}),L.readOnly&&(Nr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),L.collapsed&&(L.id=++us,L.atomic=!0),ge){if(xe&&(ge.curOp.updateMaxLine=!0),L.collapsed)sn(ge,t.line,n.line+1);else if(L.className||L.startStyle||L.endStyle||L.css||L.attributes||L.title)for(var Re=t.line;Re<=n.line;Re++)Vn(ge,Re,"text");L.atomic&&Qa(ge.doc),tr(ge,"markerAdded",ge,L)}return L}var Yi=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Yi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();tr(this,"clear")},Yi.prototype.find=function(e,t){return this.primary.find(e,t)},Le(Yi);function El(e,t,n,r,f){r=C(r),r.shared=!1;var L=[Si(e,t,n,r,f)],te=L[0],de=r.widgetNode;return Zn(e,function(ge){de&&(r.widgetNode=de.cloneNode(!0)),L.push(Si(ge,x(ge,t),x(ge,n),r,f));for(var xe=0;xe<ge.linked.length;++xe)if(ge.linked[xe].isParent)return;te=Z(L)}),new Yi(L,te)}function cs(e){return e.findMarks(rt(e.first,0),e.clipPos(rt(e.lastLine())),function(t){return t.parent})}function _l(e,t){for(var n=0;n<t.length;n++){var r=t[n],f=r.find(),L=e.clipPos(f.from),te=e.clipPos(f.to);if(Ot(L,te)){var de=Si(e,L,te,r.primary,r.primary.type);r.markers.push(de),de.parent=r}}}function Sl(e){for(var t=function(r){var f=e[r],L=[f.primary.doc];Zn(f.primary.doc,function(ge){return L.push(ge)});for(var te=0;te<f.markers.length;te++){var de=f.markers[te];he(L,de.doc)==-1&&(de.parent=null,f.markers.splice(te--,1))}},n=0;n<e.length;n++)t(n)}var Tl=0,ln=function(e,t,n,r,f){if(!(this instanceof ln))return new ln(e,t,n,r,f);n==null&&(n=0),Xi.call(this,[new Ki([new Br("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var L=rt(n,0);this.sel=Jn(L),this.history=new po(null),this.id=++Tl,this.modeOption=t,this.lineSep=r,this.direction=f=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Yo(this,{from:L,to:L,text:e}),Kr(this,Jn(L),Se)};ln.prototype=Ce(Xi.prototype,{constructor:ln,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=fr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Lr(function(e){var t=rt(this.first,0),n=this.first+this.size-1;Ei(this,{from:t,to:rt(n,mt(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ii(this.cm,0,0),Kr(this,Jn(t),Se)}),replaceRange:function(e,t,n,r){t=x(this,t),n=n?x(this,n):t,_i(this,e,t,n,r)},getRange:function(e,t,n){var r=Xt(this,x(this,e),x(this,t));return n===!1?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(hn(this,e))return mt(this,e)},getLineNumber:function(e){return It(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=mt(this,e)),gt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return x(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Lr(function(e,t,n){Ja(this,x(this,typeof e=="number"?rt(e,t||0):e),null,n)}),setSelection:Lr(function(e,t,n){Ja(this,x(this,e),x(this,t||e),n)}),extendSelection:Lr(function(e,t,n){go(this,x(this,e),t&&x(this,t),n)}),extendSelections:Lr(function(e,t){Ya(this,ie(this,e),t)}),extendSelectionsBy:Lr(function(e,t){var n=ue(this.sel.ranges,e);Ya(this,ie(this,n),t)}),setSelections:Lr(function(e,t,n){if(!e.length)return;for(var r=[],f=0;f<e.length;f++)r[f]=new rr(x(this,e[f].anchor),x(this,e[f].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Kr(this,On(this.cm,r,t),n)}),addSelection:Lr(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new rr(x(this,e),x(this,t||e))),Kr(this,On(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var f=Xt(this,t[r].from(),t[r].to());n=n?n.concat(f):f}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var f=Xt(this,n[r].from(),n[r].to());e!==!1&&(f=f.join(e||this.lineSeparator())),t[r]=f}return t},replaceSelection:function(e,t,n){for(var r=[],f=0;f<this.sel.ranges.length;f++)r[f]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Lr(function(e,t,n){for(var r=[],f=this.sel,L=0;L<f.ranges.length;L++){var te=f.ranges[L];r[L]={from:te.from(),to:te.to(),text:this.splitLines(e[L]),origin:n}}for(var de=t&&t!="end"&&fl(this,r,t),ge=r.length-1;ge>=0;ge--)Ei(this,r[ge]);de?$a(this,de):this.cm&&bi(this.cm)}),undo:Lr(function(){bo(this,"undo")}),redo:Lr(function(){bo(this,"redo")}),undoSelection:Lr(function(){bo(this,"undo",!0)}),redoSelection:Lr(function(){bo(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.done.length;r++)e.done[r].ranges||++t;for(var f=0;f<e.undone.length;f++)e.undone[f].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new po(this.history.maxGeneration),Zn(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:wi(this.history.done),undone:wi(this.history.undone)}},setHistory:function(e){var t=this.history=new po(this.history.maxGeneration);t.done=wi(e.done.slice(0),null,!0),t.undone=wi(e.undone.slice(0),null,!0)},setGutterMarker:Lr(function(e,t,n){return Gi(this,e,"gutter",function(r){var f=r.gutterMarkers||(r.gutterMarkers={});return f[t]=n,!n&&W(f)&&(r.gutterMarkers=null),!0})}),clearGutter:Lr(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Gi(t,n,"gutter",function(){return n.gutterMarkers[e]=null,W(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!hn(this,e))return null;if(t=e,e=mt(this,e),!e)return null}else if(t=It(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Lr(function(e,t,n){return Gi(this,e,t=="gutter"?"gutter":"class",function(r){var f=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[f])r[f]=n;else{if(X(n).test(r[f]))return!1;r[f]+=" "+n}return!0})}),removeLineClass:Lr(function(e,t,n){return Gi(this,e,t=="gutter"?"gutter":"class",function(r){var f=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",L=r[f];if(L)if(n==null)r[f]=null;else{var te=L.match(X(n));if(!te)return!1;var de=te.index+te[0].length;r[f]=L.slice(0,te.index)+(!te.index||de==L.length?"":" ")+L.slice(de)||null}else return!1;return!0})}),addLineWidget:Lr(function(e,t,n){return Cl(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Si(this,x(this,e),x(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=x(this,e),Si(this,e,e,n,"bookmark")},findMarksAt:function(e){e=x(this,e);var t=[],n=mt(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var f=n[r];(f.from==null||f.from<=e.ch)&&(f.to==null||f.to>=e.ch)&&t.push(f.marker.parent||f.marker)}return t},findMarks:function(e,t,n){e=x(this,e),t=x(this,t);var r=[],f=e.line;return this.iter(e.line,t.line+1,function(L){var te=L.markedSpans;if(te)for(var de=0;de<te.length;de++){var ge=te[de];!(ge.to!=null&&f==e.line&&e.ch>=ge.to||ge.from==null&&f!=e.line||ge.from!=null&&f==t.line&&ge.from>=t.ch)&&(!n||n(ge.marker))&&r.push(ge.marker.parent||ge.marker)}++f}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(f){var L=f.text.length+r;if(L>e)return t=e,!0;e-=L,++n}),x(this,rt(n,t))},indexFromPos:function(e){e=x(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new ln(fr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new ln(fr(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_l(r,cs(this)),r},unlinkDoc:function(e){if(e instanceof dr&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Sl(cs(this));break}if(e.history==this.history){var r=[e.id];Zn(e,function(f){return r.push(f.id)},!0),e.history=new po(null),e.history.done=wi(this.history.done,r),e.history.undone=wi(this.history.undone,r)}},iterLinkedDocs:function(e){Zn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Lr(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pl(this.cm)})}),ln.prototype.eachLine=ln.prototype.iter;var ds=0;function Ol(e){var t=this;if(hs(t),$e(t,e)||yn(t.display,e))return;_e(e),d&&(ds=+new Date);var n=oi(t,e,!0),r=e.dataTransfer.files;if(!n||t.isReadOnly())return;if(r&&r.length&&window.FileReader&&window.File)for(var f=r.length,L=Array(f),te=0,de=function(){++te==f&&Pr(t,function(){n=x(t.doc,n);var We={from:n,to:n,text:t.doc.splitLines(L.filter(function(et){return et!=null}).join(t.doc.lineSeparator())),origin:"paste"};Ei(t.doc,We),$a(t.doc,Jn(x(t.doc,n),x(t.doc,$n(We))))})()},ge=function(We,et){if(t.options.allowDropFileTypes&&he(t.options.allowDropFileTypes,We.type)==-1){de();return}var it=new FileReader;it.onerror=function(){return de()},it.onload=function(){var lt=it.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(lt)){de();return}L[et]=lt,de()},it.readAsText(We)},xe=0;xe<r.length;xe++)ge(r[xe],xe);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Re=e.dataTransfer.getData("Text");if(Re){var Pe;if(t.state.draggingText&&!t.state.draggingText.copy&&(Pe=t.listSelections()),vo(t.doc,Jn(n,n)),Pe)for(var Ke=0;Ke<Pe.length;++Ke)_i(t.doc,"",Pe[Ke].anchor,Pe[Ke].head,"drag");t.replaceSelection(Re,"around","paste"),t.display.input.focus()}}catch(We){}}}function kl(e,t){if(d&&(!e.state.draggingText||+new Date-ds<100)){Ae(t);return}if($e(e,t)||yn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!m){var n=Q("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),g&&n.parentNode.removeChild(n)}}function Al(e,t){var n=oi(e,t);if(!n)return;var r=document.createDocumentFragment();_a(e,n,r),e.display.dragCursor||(e.display.dragCursor=Q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),K(e.display.dragCursor,r)}function hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function fs(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var f=t[r].CodeMirror;f&&n.push(f)}n.length&&n[0].operation(function(){for(var L=0;L<n.length;L++)e(n[L])})}var ps=!1;function Rl(){if(ps)return;Dl(),ps=!0}function Dl(){var e;Ne(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,fs(Ml)},100))}),Ne(window,"blur",function(){return fs(yi)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var qn={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ji=0;Ji<10;Ji++)qn[Ji+48]=qn[Ji+96]=String(Ji);for(var xo=65;xo<=90;xo++)qn[xo]=String.fromCharCode(xo);for(var $i=1;$i<=12;$i++)qn[$i+111]=qn[$i+63235]="F"+$i;var Fn={};Fn.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"},Fn.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"},Fn.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"},Fn.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"]},Fn.default=M?Fn.macDefault:Fn.pcDefault;function Nl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,f,L,te=0;te<t.length-1;te++){var de=t[te];if(/^(cmd|meta|m)$/i.test(de))L=!0;else if(/^a(lt)?$/i.test(de))n=!0;else if(/^(c|ctrl|control)$/i.test(de))r=!0;else if(/^s(hift)?$/i.test(de))f=!0;else throw new Error("Unrecognized modifier name: "+de)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),L&&(e="Cmd-"+e),f&&(e="Shift-"+e),e}function Pl(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var f=ue(n.split(" "),Nl),L=0;L<f.length;L++){var te=void 0,de=void 0;L==f.length-1?(de=f.join(" "),te=r):(de=f.slice(0,L+1).join(" "),te="...");var ge=t[de];if(!ge)t[de]=te;else if(ge!=te)throw new Error("Inconsistent bindings for "+de)}delete e[n]}for(var xe in t)e[xe]=t[xe];return e}function Ti(e,t,n,r){t=wo(t);var f=t.call?t.call(e,r):t[e];if(f===!1)return"nothing";if(f==="...")return"multi";if(f!=null&&n(f))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ti(e,t.fallthrough,n,r);for(var L=0;L<t.fallthrough.length;L++){var te=Ti(e,t.fallthrough[L],n,r);if(te)return te}}}function ms(e){var t=typeof e=="string"?e:qn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function gs(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(y?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(y?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function vs(e,t){if(g&&e.keyCode==34&&e.char)return!1;var n=qn[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),gs(n,e,t))}function wo(e){return typeof e=="string"?Fn[e]:e}function Oi(e,t){for(var n=e.doc.sel.ranges,r=[],f=0;f<n.length;f++){for(var L=t(n[f]);r.length&&Ot(L.from,Z(r).to)<=0;){var te=r.pop();if(Ot(te.from,L.from)<0){L.from=te.from;break}}r.push(L)}pn(e,function(){for(var de=r.length-1;de>=0;de--)_i(e.doc,"",r[de].from,r[de].to,"+delete");bi(e)})}function Qo(e,t,n){var r=Oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function qo(e,t,n){var r=Qo(e,t.ch,n);return r==null?null:new rt(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,f){if(e){t.doc.direction=="rtl"&&(f=-f);var L=Xe(n,t.doc.direction);if(L){var te=f<0?Z(L):L[0],de=f<0==(te.level==1),ge=de?"after":"before",xe;if(te.level>0||t.doc.direction=="rtl"){var Re=mi(t,n);xe=f<0?n.text.length-1:0;var Pe=Rn(t,Re,xe).top;xe=Be(function(Ke){return Rn(t,Re,Ke).top==Pe},f<0==(te.level==1)?te.from:te.to-1,xe),ge=="before"&&(xe=Qo(n,xe,1))}else xe=f<0?te.to:te.from;return new rt(r,xe,ge)}}return new rt(r,f<0?n.text.length:0,f<0?"before":"after")}function Ll(e,t,n,r){var f=Xe(t,e.doc.direction);if(!f)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 L=Ge(f,n.ch,n.sticky),te=f[L];if(e.doc.direction=="ltr"&&te.level%2==0&&(r>0?te.to>n.ch:te.from<n.ch))return qo(t,n,r);var de=function(ft,xt){return Qo(t,ft instanceof rt?ft.ch:ft,xt)},ge,xe=function(ft){return e.options.lineWrapping?(ge=ge||mi(e,t),xa(e,t,ge,ft)):{begin:0,end:t.text.length}},Re=xe(n.sticky=="before"?de(n,-1):n.ch);if(e.doc.direction=="rtl"||te.level==1){var Pe=te.level==1==r<0,Ke=de(n,Pe?1:-1);if(Ke!=null&&(Pe?Ke<=te.to&&Ke<=Re.end:Ke>=te.from&&Ke>=Re.begin)){var We=Pe?"before":"after";return new rt(n.line,Ke,We)}}var et=function(ft,xt,pt){for(var _t=function(or,Ir){return Ir?new rt(n.line,de(or,1),"before"):new rt(n.line,or,"after")};ft>=0&&ft<f.length;ft+=xt){var Pt=f[ft],kt=xt>0==(Pt.level!=1),zt=kt?pt.begin:de(pt.end,-1);if(Pt.from<=zt&&zt<Pt.to)return _t(zt,kt);if(zt=kt?Pt.from:de(Pt.to,-1),pt.begin<=zt&&zt<pt.end)return _t(zt,kt)}},it=et(L+r,r,Re);if(it)return it;var lt=r>0?Re.end:de(Re.begin,-1);return lt!=null&&!(r>0&&lt==t.text.length)&&(it=et(r>0?0:f.length-1,r,xe(lt)),it)?it:null}var Zi={selectAll:ts,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Se)},killLine:function(e){return Oi(e,function(t){if(t.empty()){var n=mt(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:rt(t.head.line+1,0)}:{from:t.head,to:rt(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Oi(e,function(t){return{from:rt(t.from().line,0),to:x(e.doc,rt(t.to().line+1,0))}})},delLineLeft:function(e){return Oi(e,function(t){return{from:rt(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Oi(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Oi(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(rt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(rt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ys(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return bs(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Il(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},pe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},pe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?bs(e,t.head):r},pe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,f=0;f<n.length;f++){var L=n[f].from(),te=D(e.getLine(L.line),L.ch,r);t.push(re(r-te%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return pn(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++){if(!t[r].empty())continue;var f=t[r].head,L=mt(e.doc,f.line).text;if(L){if(f.ch==L.length&&(f=new rt(f.line,f.ch-1)),f.ch>0)f=new rt(f.line,f.ch+1),e.replaceRange(L.charAt(f.ch-1)+L.charAt(f.ch-2),rt(f.line,f.ch-2),f,"+transpose");else if(f.line>e.doc.first){var te=mt(e.doc,f.line-1).text;te&&(f=new rt(f.line,1),e.replaceRange(L.charAt(0)+e.doc.lineSeparator()+te.charAt(te.length-1),rt(f.line-1,te.length-1),f,"+transpose"))}}n.push(new rr(f,f))}e.setSelections(n)})},newlineAndIndent:function(e){return pn(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<t.length;r++)e.indentLine(t[r].from().line,null,!0);bi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ys(e,t){var n=mt(e.doc,t),r=gt(n);return r!=n&&(t=It(r)),ea(!0,e,r,t,1)}function Il(e,t){var n=mt(e.doc,t),r=Bt(n);return r!=n&&(t=It(r)),ea(!0,e,n,t,-1)}function bs(e,t){var n=ys(e,t.line),r=mt(e.doc,n.line),f=Xe(r,e.doc.direction);if(!f||f[0].level==0){var L=Math.max(n.ch,r.text.search(/\S/)),te=t.line==n.line&&t.ch<=L&&t.ch;return rt(n.line,te?0:L,n.sticky)}return n}function Co(e,t,n){if(typeof t=="string"&&(t=Zi[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,f=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),f=t(e)!=Ee}finally{e.display.shift=r,e.state.suppressEdits=!1}return f}function jl(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var f=Ti(t,e.state.keyMaps[r],n,e);if(f)return f}return e.options.extraKeys&&Ti(t,e.options.extraKeys,n,e)||Ti(t,e.options.keyMap,n,e)}var Bl=new le;function Qi(e,t,n,r){var f=e.state.keySeq;if(f){if(ms(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Bl.set(50,function(){e.state.keySeq==f&&(e.state.keySeq=null,e.display.input.reset())}),xs(e,f+" "+t,n,r))return!0}return xs(e,t,n,r)}function xs(e,t,n,r){var f=jl(e,t,r);return f=="multi"&&(e.state.keySeq=t),f=="handled"&&tr(e,"keyHandled",e,t,n),(f=="handled"||f=="multi")&&(_e(n),jo(e)),!!f}function ws(e,t){var n=vs(t,!0);return n?t.shiftKey&&!e.state.keySeq?Qi(e,"Shift-"+n,t,function(r){return Co(e,r,!0)})||Qi(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Co(e,r)}):Qi(e,n,t,function(r){return Co(e,r)}):!1}function Fl(e,t,n){return Qi(e,"'"+n+"'",t,function(r){return Co(e,r,!0)})}var ta=null;function Cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=se(),$e(t,e))return;d&&a<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=ws(t,e);g&&(ta=r?n:null,!r&&n==88&&!St&&(M?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),S&&!M&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Ul(t)}function Ul(e){var t=e.display.lineDiv;$(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(P(t,"CodeMirror-crosshair"),ot(document,"keyup",n),ot(document,"mouseover",n))}Ne(document,"keyup",n),Ne(document,"mouseover",n)}function Es(e){e.keyCode==16&&(this.doc.sel.shift=!1),$e(this,e)}function _s(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(yn(t.display,e)||$e(t,e)||e.ctrlKey&&!e.altKey||M&&e.metaKey)return;var n=e.keyCode,r=e.charCode;if(g&&n==ta){ta=null,_e(e);return}if(g&&(!e.which||e.which<10)&&ws(t,e))return;var f=String.fromCharCode(r==null?n:r);if(f=="\b")return;if(Fl(t,e,f))return;t.display.input.onKeyPress(e)}var Hl=400,ra=function(e,t,n){this.time=e,this.pos=t,this.button=n};ra.prototype.compare=function(e,t,n){return this.time+Hl>e&&Ot(t,this.pos)==0&&n==this.button};var qi,eo;function Wl(e,t){var n=+new Date;return eo&&eo.compare(n,e,t)?(qi=eo=null,"triple"):qi&&qi.compare(n,e,t)?(eo=new ra(n,e,t),qi=null,"double"):(qi=new ra(n,e,t),eo=null,"single")}function Ss(e){var t=this,n=t.display;if($e(t,e)||n.activeTouch&&n.input.supportsTouch())return;if(n.input.ensurePolled(),n.shift=e.shiftKey,yn(n,e)){s||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(na(t,e))return;var r=oi(t,e),f=je(e),L=r?Wl(r,f):"single";if(window.focus(),f==1&&t.state.selectingText&&t.state.selectingText(e),r&&zl(t,f,r,L,e))return;f==1?r?Kl(t,r,L,e):ze(e)==n.scroller&&_e(e):f==2?(r&&go(t.doc,r),setTimeout(function(){return n.input.focus()},20)):f==3&&(Y?t.display.input.onContextMenu(e):Ta(t))}function zl(e,t,n,r,f){var L="Click";return r=="double"?L="Double"+L:r=="triple"&&(L="Triple"+L),L=(t==1?"Left":t==2?"Middle":"Right")+L,Qi(e,gs(L,f),f,function(te){if(typeof te=="string"&&(te=Zi[te]),!te)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=te(e,n)!=Ee}finally{e.state.suppressEdits=!1}return de})}function Gl(e,t,n){var r=e.getOption("configureMouse"),f=r?r(e,t,n):{};if(f.unit==null){var L=I?n.shiftKey&&n.metaKey:n.altKey;f.unit=L?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(f.extend==null||e.doc.extend)&&(f.extend=e.doc.extend||n.shiftKey),f.addNew==null&&(f.addNew=M?n.metaKey:n.ctrlKey),f.moveOnDrag==null&&(f.moveOnDrag=!(M?n.altKey:n.ctrlKey)),f}function Kl(e,t,n,r){d?setTimeout(R(Sa,e),0):e.curOp.focus=se();var f=Gl(e,n,r),L=e.doc.sel,te;e.options.dragDrop&&Ze&&!e.isReadOnly()&&n=="single"&&(te=L.contains(t))>-1&&(Ot((te=L.ranges[te]).from(),t)<0||t.xRel>0)&&(Ot(te.to(),t)>0||t.xRel<0)?Xl(e,r,t,f):Vl(e,r,t,f)}function Xl(e,t,n,r){var f=e.display,L=!1,te=Pr(e,function(xe){s&&(f.scroller.draggable=!1),e.state.draggingText=!1,ot(f.wrapper.ownerDocument,"mouseup",te),ot(f.wrapper.ownerDocument,"mousemove",de),ot(f.scroller,"dragstart",ge),ot(f.scroller,"drop",te),L||(_e(xe),r.addNew||go(e.doc,n,null,null,r.extend),s&&!m||d&&a==9?setTimeout(function(){f.wrapper.ownerDocument.body.focus({preventScroll:!0}),f.input.focus()},20):f.input.focus())}),de=function(xe){L=L||Math.abs(t.clientX-xe.clientX)+Math.abs(t.clientY-xe.clientY)>=10},ge=function(){return L=!0};s&&(f.scroller.draggable=!0),e.state.draggingText=te,te.copy=!r.moveOnDrag,f.scroller.dragDrop&&f.scroller.dragDrop(),Ne(f.wrapper.ownerDocument,"mouseup",te),Ne(f.wrapper.ownerDocument,"mousemove",de),Ne(f.scroller,"dragstart",ge),Ne(f.scroller,"drop",te),Ta(e),setTimeout(function(){return f.input.focus()},20)}function Ts(e,t,n){if(n=="char")return new rr(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new rr(rt(t.line,0),x(e.doc,rt(t.line+1,0)));var r=n(e,t);return new rr(r.from,r.to)}function Vl(e,t,n,r){var f=e.display,L=e.doc;_e(t);var te,de,ge=L.sel,xe=ge.ranges;if(r.addNew&&!r.extend?(de=L.sel.contains(n),de>-1?te=xe[de]:te=new rr(n,n)):(te=L.sel.primary(),de=L.sel.primIndex),r.unit=="rectangle")r.addNew||(te=new rr(n,n)),n=oi(e,t,!0,!0),de=-1;else{var Re=Ts(e,n,r.unit);r.extend?te=$o(te,Re.anchor,Re.head,r.extend):te=Re}r.addNew?de==-1?(de=xe.length,Kr(L,On(e,xe.concat([te]),de),{scroll:!1,origin:"*mouse"})):xe.length>1&&xe[de].empty()&&r.unit=="char"&&!r.extend?(Kr(L,On(e,xe.slice(0,de).concat(xe.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),ge=L.sel):Zo(L,de,te,ae):(de=0,Kr(L,new xn([te],0),ae),ge=L.sel);var Pe=n;function Ke(pt){if(Ot(Pe,pt)==0)return;if(Pe=pt,r.unit=="rectangle"){for(var _t=[],Pt=e.options.tabSize,kt=D(mt(L,n.line).text,n.ch,Pt),zt=D(mt(L,pt.line).text,pt.ch,Pt),or=Math.min(kt,zt),Ir=Math.max(kt,zt),vr=Math.min(n.line,pt.line),mn=Math.min(e.lastLine(),Math.max(n.line,pt.line));vr<=mn;vr++){var un=mt(L,vr).text,Or=me(un,or,Pt);or==Ir?_t.push(new rr(rt(vr,Or),rt(vr,Or))):un.length>Or&&_t.push(new rr(rt(vr,Or),rt(vr,me(un,Ir,Pt))))}_t.length||_t.push(new rr(n,n)),Kr(L,On(e,ge.ranges.slice(0,de).concat(_t),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pt)}else{var cn=te,Ur=Ts(e,pt,r.unit),Mr=cn.anchor,kr;Ot(Ur.anchor,Mr)>0?(kr=Ur.head,Mr=wn(cn.from(),Ur.anchor)):(kr=Ur.anchor,Mr=fn(cn.to(),Ur.head));var xr=ge.ranges.slice(0);xr[de]=Yl(e,new rr(x(L,Mr),kr)),Kr(L,On(e,xr,de),ae)}}var We=f.wrapper.getBoundingClientRect(),et=0;function it(pt){var _t=++et,Pt=oi(e,pt,!0,r.unit=="rectangle");if(!Pt)return;if(Ot(Pt,Pe)!=0){e.curOp.focus=se(),Ke(Pt);var kt=uo(f,L);(Pt.line>=kt.to||Pt.line<kt.from)&&setTimeout(Pr(e,function(){et==_t&&it(pt)}),150)}else{var zt=pt.clientY<We.top?-20:pt.clientY>We.bottom?20:0;zt&&setTimeout(Pr(e,function(){if(et!=_t)return;f.scroller.scrollTop+=zt,it(pt)}),50)}}function lt(pt){e.state.selectingText=!1,et=Infinity,pt&&(_e(pt),f.input.focus()),ot(f.wrapper.ownerDocument,"mousemove",ft),ot(f.wrapper.ownerDocument,"mouseup",xt),L.history.lastSelOrigin=null}var ft=Pr(e,function(pt){pt.buttons===0||!je(pt)?lt(pt):it(pt)}),xt=Pr(e,lt);e.state.selectingText=xt,Ne(f.wrapper.ownerDocument,"mousemove",ft),Ne(f.wrapper.ownerDocument,"mouseup",xt)}function Yl(e,t){var n=t.anchor,r=t.head,f=mt(e.doc,n.line);if(Ot(n,r)==0&&n.sticky==r.sticky)return t;var L=Xe(f);if(!L)return t;var te=Ge(L,n.ch,n.sticky),de=L[te];if(de.from!=n.ch&&de.to!=n.ch)return t;var ge=te+(de.from==n.ch==(de.level!=1)?0:1);if(ge==0||ge==L.length)return t;var xe;if(r.line!=n.line)xe=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Re=Ge(L,r.ch,r.sticky),Pe=Re-te||(r.ch-n.ch)*(de.level==1?-1:1);Re==ge-1||Re==ge?xe=Pe<0:xe=Pe>0}var Ke=L[ge+(xe?-1:0)],We=xe==(Ke.level==1),et=We?Ke.from:Ke.to,it=We?"after":"before";return n.ch==et&&n.sticky==it?t:new rr(new rt(n.line,et,it),r)}function Os(e,t,n,r){var f,L;if(t.touches)f=t.touches[0].clientX,L=t.touches[0].clientY;else try{f=t.clientX,L=t.clientY}catch(Ke){return!1}if(f>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&_e(t);var te=e.display,de=te.lineDiv.getBoundingClientRect();if(L>de.bottom||!De(e,n))return ke(t);L-=de.top-te.viewOffset;for(var ge=0;ge<e.display.gutterSpecs.length;++ge){var xe=te.gutters.childNodes[ge];if(xe&&xe.getBoundingClientRect().right>=f){var Re=pr(e.doc,L),Pe=e.display.gutterSpecs[ge];return Ve(e,n,e,Re,Pe.className,t),ke(t)}}}function na(e,t){return Os(e,t,"gutterClick",!0)}function ks(e,t){if(yn(e.display,t)||Jl(e,t))return;if($e(e,t,"contextmenu"))return;Y||e.display.input.onContextMenu(t)}function Jl(e,t){return De(e,"gutterContextMenu")?Os(e,t,"gutterContextMenu",!1):!1}function As(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pi(e)}var ki={toString:function(){return"CodeMirror.Init"}},Rs={},Eo={};function $l(e){var t=e.optionHandlers;function n(r,f,L,te){e.defaults[r]=f,L&&(t[r]=te?function(de,ge,xe){xe!=ki&&L(de,ge,xe)}:L)}e.defineOption=n,e.Init=ki,n("value","",function(r,f){return r.setValue(f)},!0),n("mode",null,function(r,f){r.doc.modeOption=f,Vo(r)},!0),n("indentUnit",2,Vo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Wi(r),Pi(r),sn(r)},!0),n("lineSeparator",null,function(r,f){if(r.doc.lineSep=f,!f)return;var L=[],te=r.doc.first;r.doc.iter(function(ge){for(var xe=0;;){var Re=ge.text.indexOf(f,xe);if(Re==-1)break;xe=Re+f.length,L.push(rt(te,Re))}te++});for(var de=L.length-1;de>=0;de--)_i(r.doc,f,L[de],rt(L[de].line,L[de].ch+f.length))}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(r,f,L){r.state.specialChars=new RegExp(f.source+(f.test(" ")?"":"| "),"g"),L!=ki&&r.refresh()}),n("specialCharPlaceholder",Et,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",O?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,f){return r.getInputField().spellcheck=f},!0),n("autocorrect",!1,function(r,f){return r.getInputField().autocorrect=f},!0),n("autocapitalize",!1,function(r,f){return r.getInputField().autocapitalize=f},!0),n("rtlMoveVisually",!B),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){As(r),Hi(r)},!0),n("keyMap","default",function(r,f,L){var te=wo(f),de=L!=ki&&wo(L);de&&de.detach&&de.detach(r,te),te.attach&&te.attach(r,de||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ql,!0),n("gutters",[],function(r,f){r.display.gutterSpecs=Ko(f,r.options.lineNumbers),Hi(r)},!0),n("fixedGutter",!0,function(r,f){r.display.gutters.style.left=f?Lo(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return xi(r)},!0),n("scrollbarStyle","native",function(r){Ma(r),xi(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,f){r.display.gutterSpecs=Ko(r.options.gutters,f),Hi(r)},!0),n("firstLineNumber",1,Hi,!0),n("lineNumberFormatter",function(r){return r},Hi,!0),n("showCursorWhenSelecting",!1,Li,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,f){f=="nocursor"&&(yi(r),r.display.input.blur()),r.display.input.readOnlyChanged(f)}),n("screenReaderLabel",null,function(r,f){f=f===""?null:f,r.display.input.screenReaderLabelChanged(f)}),n("disableInput",!1,function(r,f){f||r.display.input.reset()},!0),n("dragDrop",!0,Zl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Li,!0),n("singleCursorHeightPerLine",!0,Li,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Wi,!0),n("addModeClass",!1,Wi,!0),n("pollInterval",100),n("undoDepth",200,function(r,f){return r.doc.history.undoDepth=f}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Wi,!0),n("moveInputWithCursor",!0,function(r,f){f||r.display.input.resetPosition()}),n("tabindex",null,function(r,f){return r.display.input.getField().tabIndex=f||""}),n("autofocus",null),n("direction","ltr",function(r,f){return r.doc.setDirection(f)},!0),n("phrases",null)}function Zl(e,t,n){var r=n&&n!=ki;if(!t!=!r){var f=e.display.dragFunctions,L=t?Ne:ot;L(e.display.scroller,"dragstart",f.start),L(e.display.scroller,"dragenter",f.enter),L(e.display.scroller,"dragover",f.over),L(e.display.scroller,"dragleave",f.leave),L(e.display.scroller,"drop",f.drop)}}function Ql(e){e.options.lineWrapping?($(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(P(e.display.wrapper,"CodeMirror-wrap"),Dr(e)),Io(e),sn(e),Pi(e),setTimeout(function(){return xi(e)},100)}function dr(e,t){var n=this;if(!(this instanceof dr))return new dr(e,t);this.options=t=t?C(t):{},C(Rs,t,!1);var r=t.value;typeof r=="string"?r=new ln(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var f=new dr.inputStyles[t.inputStyle](this),L=this.display=new dl(e,r,f,t);L.wrapper.CodeMirror=this,As(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ma(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 le,keySeq:null,specialChars:null},t.autofocus&&!O&&L.input.focus(),d&&a<11&&setTimeout(function(){return n.display.input.reset(!0)},20),ql(this),Rl(),ui(this),this.curOp.forceUpdate=!0,Wa(this,r),t.autofocus&&!O||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Bo(n)},20):yi(this);for(var te in Eo)Eo.hasOwnProperty(te)&&Eo[te](this,t[te],ki);La(this),t.finishInit&&t.finishInit(this);for(var de=0;de<ia.length;++de)ia[de](this);ci(this),s&&t.lineWrapping&&getComputedStyle(L.lineDiv).textRendering=="optimizelegibility"&&(L.lineDiv.style.textRendering="auto")}dr.defaults=Rs,dr.optionHandlers=Eo;function ql(e){var t=e.display;Ne(t.scroller,"mousedown",Pr(e,Ss)),d&&a<11?Ne(t.scroller,"dblclick",Pr(e,function(ge){if($e(e,ge))return;var xe=oi(e,ge);if(!xe||na(e,ge)||yn(e.display,ge))return;_e(ge);var Re=e.findWordAt(xe);go(e.doc,Re.anchor,Re.head)})):Ne(t.scroller,"dblclick",function(ge){return $e(e,ge)||_e(ge)}),Ne(t.scroller,"contextmenu",function(ge){return ks(e,ge)}),Ne(t.input.getField(),"contextmenu",function(ge){t.scroller.contains(ge.target)||ks(e,ge)});var n,r={end:0};function f(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function L(ge){if(ge.touches.length!=1)return!1;var xe=ge.touches[0];return xe.radiusX<=1&&xe.radiusY<=1}function te(ge,xe){if(xe.left==null)return!0;var Re=xe.left-ge.left,Pe=xe.top-ge.top;return Re*Re+Pe*Pe>20*20}Ne(t.scroller,"touchstart",function(ge){if(!$e(e,ge)&&!L(ge)&&!na(e,ge)){t.input.ensurePolled(),clearTimeout(n);var xe=+new Date;t.activeTouch={start:xe,moved:!1,prev:xe-r.end<=300?r:null},ge.touches.length==1&&(t.activeTouch.left=ge.touches[0].pageX,t.activeTouch.top=ge.touches[0].pageY)}}),Ne(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ne(t.scroller,"touchend",function(ge){var xe=t.activeTouch;if(xe&&!yn(t,ge)&&xe.left!=null&&!xe.moved&&new Date-xe.start<300){var Re=e.coordsChar(t.activeTouch,"page"),Pe;!xe.prev||te(xe,xe.prev)?Pe=new rr(Re,Re):!xe.prev.prev||te(xe,xe.prev.prev)?Pe=e.findWordAt(Re):Pe=new rr(rt(Re.line,0),x(e.doc,rt(Re.line+1,0))),e.setSelection(Pe.anchor,Pe.head),e.focus(),_e(ge)}f()}),Ne(t.scroller,"touchcancel",f),Ne(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ji(e,t.scroller.scrollTop),si(e,t.scroller.scrollLeft,!0),Ve(e,"scroll",e))}),Ne(t.scroller,"mousewheel",function(ge){return Ba(e,ge)}),Ne(t.scroller,"DOMMouseScroll",function(ge){return Ba(e,ge)}),Ne(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ge){$e(e,ge)||Ae(ge)},over:function(ge){$e(e,ge)||(Al(e,ge),Ae(ge))},start:function(ge){return kl(e,ge)},drop:Pr(e,Ol),leave:function(ge){$e(e,ge)||hs(e)}};var de=t.input.getField();Ne(de,"keyup",function(ge){return Es.call(e,ge)}),Ne(de,"keydown",Pr(e,Cs)),Ne(de,"keypress",Pr(e,_s)),Ne(de,"focus",function(ge){return Bo(e,ge)}),Ne(de,"blur",function(ge){return yi(e,ge)})}var ia=[];dr.defineInitHook=function(e){return ia.push(e)};function to(e,t,n,r){var f=e.doc,L;n==null&&(n="add"),n=="smart"&&(f.mode.indent?L=He(e,t).state:n="prev");var te=e.options.tabSize,de=mt(f,t),ge=D(de.text,null,te);de.stateAfter&&(de.stateAfter=null);var xe=de.text.match(/^\s*/)[0],Re;if(!r&&!/\S/.test(de.text))Re=0,n="not";else if(n=="smart"&&(Re=f.mode.indent(L,de.text.slice(xe.length),de.text),Re==Ee||Re>150)){if(!r)return;n="prev"}n=="prev"?t>f.first?Re=D(mt(f,t-1).text,null,te):Re=0:n=="add"?Re=ge+e.options.indentUnit:n=="subtract"?Re=ge-e.options.indentUnit:typeof n=="number"&&(Re=ge+n),Re=Math.max(0,Re);var Pe="",Ke=0;if(e.options.indentWithTabs)for(var We=Math.floor(Re/te);We;--We)Ke+=te,Pe+=" ";if(Ke<Re&&(Pe+=re(Re-Ke)),Pe!=xe)return _i(f,Pe,rt(t,0),rt(t,xe.length),"+input"),de.stateAfter=null,!0;for(var et=0;et<f.sel.ranges.length;et++){var it=f.sel.ranges[et];if(it.head.line==t&&it.head.ch<xe.length){var lt=rt(t,xe.length);Zo(f,et,new rr(lt,lt));break}}}var kn=null;function _o(e){kn=e}function oa(e,t,n,r,f){var L=e.doc;e.display.shift=!1,r||(r=L.sel);var te=+new Date-200,de=f=="paste"||e.state.pasteIncoming>te,ge=dt(t),xe=null;if(de&&r.ranges.length>1)if(kn&&kn.text.join(`
`)==t){if(r.ranges.length%kn.text.length==0){xe=[];for(var Re=0;Re<kn.text.length;Re++)xe.push(L.splitLines(kn.text[Re]))}}else ge.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(xe=ue(ge,function(ft){return[ft]}));for(var Pe=e.curOp.updateInput,Ke=r.ranges.length-1;Ke>=0;Ke--){var We=r.ranges[Ke],et=We.from(),it=We.to();We.empty()&&(n&&n>0?et=rt(et.line,et.ch-n):e.state.overwrite&&!de?it=rt(it.line,Math.min(mt(L,it.line).text.length,it.ch+Z(ge).length)):de&&kn&&kn.lineWise&&kn.text.join(`
`)==ge.join(`
`)&&(et=it=rt(et.line,0)));var lt={from:et,to:it,text:xe?xe[Ke%xe.length]:ge,origin:f||(de?"paste":e.state.cutIncoming>te?"cut":"+input")};Ei(e.doc,lt),tr(e,"inputRead",e,lt)}t&&!de&&Ms(e,t),bi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Pe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ds(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&pn(t,function(){return oa(t,n,0,null,"paste")}),!0}function Ms(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var f=n.ranges[r];if(f.head.ch>100||r&&n.ranges[r-1].head.line==f.head.line)continue;var L=e.getModeAt(f.head),te=!1;if(L.electricChars){for(var de=0;de<L.electricChars.length;de++)if(t.indexOf(L.electricChars.charAt(de))>-1){te=to(e,f.head.line,"smart");break}}else L.electricInput&&(L.electricInput.test(mt(e.doc,f.head.line).text.slice(0,f.head.ch))&&(te=to(e,f.head.line,"smart")));te&&tr(e,"electricInput",e,f.head.line)}}function Ns(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var f=e.doc.sel.ranges[r].head.line,L={anchor:rt(f,0),head:rt(f+1,0)};n.push(L),t.push(e.getRange(L.anchor,L.head))}return{text:t,ranges:n}}function Ps(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ls(){var e=Q("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=Q("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),_&&(e.style.border="1px solid black"),Ps(e),t}function eu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(r,f){var L=this.options,te=L[r];if(L[r]==f&&r!="mode")return;L[r]=f,t.hasOwnProperty(r)&&Pr(this,t[r])(this,f,te),Ve(this,"optionChange",this,r)},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,f){this.state.keyMaps[f?"push":"unshift"](wo(r))},removeKeyMap:function(r){for(var f=this.state.keyMaps,L=0;L<f.length;++L)if(f[L]==r||f[L].name==r)return f.splice(L,1),!0},addOverlay:rn(function(r,f){var L=r.token?r:e.getMode(this.options,r);if(L.startState)throw new Error("Overlays may not be stateful.");V(this.state.overlays,{mode:L,modeSpec:r,opaque:f&&f.opaque,priority:f&&f.priority||0},function(te){return te.priority}),this.state.modeGen++,sn(this)}),removeOverlay:rn(function(r){for(var f=this.state.overlays,L=0;L<f.length;++L){var te=f[L].modeSpec;if(te==r||typeof r=="string"&&te.name==r){f.splice(L,1),this.state.modeGen++,sn(this);return}}}),indentLine:rn(function(r,f,L){typeof f!="string"&&typeof f!="number"&&(f==null?f=this.options.smartIndent?"smart":"prev":f=f?"add":"subtract"),hn(this.doc,r)&&to(this,r,f,L)}),indentSelection:rn(function(r){for(var f=this.doc.sel.ranges,L=-1,te=0;te<f.length;te++){var de=f[te];if(de.empty())de.head.line>L&&(to(this,de.head.line,r,!0),L=de.head.line,te==this.doc.sel.primIndex&&bi(this));else{var ge=de.from(),xe=de.to(),Re=Math.max(L,ge.line);L=Math.min(this.lastLine(),xe.line-(xe.ch?0:1))+1;for(var Pe=Re;Pe<L;++Pe)to(this,Pe,r);var Ke=this.doc.sel.ranges;ge.ch==0&&f.length==Ke.length&&Ke[te].from().ch>0&&Zo(this.doc,te,new rr(ge,Ke[te].to()),Se)}}}),getTokenAt:function(r,f){return qt(this,r,f)},getLineTokens:function(r,f){return qt(this,rt(r),f,!0)},getTokenTypeAt:function(r){r=x(this.doc,r);var f=Qe(this,mt(this.doc,r.line)),L=0,te=(f.length-1)/2,de=r.ch,ge;if(de==0)ge=f[2];else for(;;){var xe=L+te>>1;if((xe?f[xe*2-1]:0)>=de)te=xe;else if(f[xe*2+1]<de)L=xe+1;else{ge=f[xe*2+2];break}}var Re=ge?ge.indexOf("overlay "):-1;return Re<0?ge:Re==0?null:ge.slice(0,Re-1)},getModeAt:function(r){var f=this.doc.mode;return f.innerMode?e.innerMode(f,this.getTokenAt(r).state).mode:f},getHelper:function(r,f){return this.getHelpers(r,f)[0]},getHelpers:function(r,f){var L=[];if(!n.hasOwnProperty(f))return L;var te=n[f],de=this.getModeAt(r);if(typeof de[f]=="string")te[de[f]]&&L.push(te[de[f]]);else if(de[f])for(var ge=0;ge<de[f].length;ge++){var xe=te[de[f][ge]];xe&&L.push(xe)}else de.helperType&&te[de.helperType]?L.push(te[de.helperType]):te[de.name]&&L.push(te[de.name]);for(var Re=0;Re<te._global.length;Re++){var Pe=te._global[Re];Pe.pred(de,this)&&he(L,Pe.val)==-1&&L.push(Pe.val)}return L},getStateAfter:function(r,f){var L=this.doc;return r=oe(L,r==null?L.first+L.size-1:r),He(this,r+1,f).state},cursorCoords:function(r,f){var L,te=this.doc.sel.primary();return r==null?L=te.head:typeof r=="object"?L=x(this.doc,r):L=r?te.from():te.to(),Tn(this,L,f||"page")},charCoords:function(r,f){return Ro(this,x(this.doc,r),f||"page")},coordsChar:function(r,f){return r=va(this,r,f||"page"),Mo(this,r.left,r.top)},lineAtHeight:function(r,f){return r=va(this,{top:r,left:0},f||"page").top,pr(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,f,L){var te=!1,de;if(typeof r=="number"){var ge=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>ge&&(r=ge,te=!0),de=mt(this.doc,r)}else de=r;return oo(this,de,{top:0,left:0},f||"page",L||te).top+(te?this.doc.height-cr(de):0)},defaultTextHeight:function(){return gi(this.display)},defaultCharWidth:function(){return vi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,f,L,te,de){var ge=this.display;r=Tn(this,x(this.doc,r));var xe=r.bottom,Re=r.left;if(f.style.position="absolute",f.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(f),ge.sizer.appendChild(f),te=="over")xe=r.top;else if(te=="above"||te=="near"){var Pe=Math.max(ge.wrapper.clientHeight,this.doc.height),Ke=Math.max(ge.sizer.clientWidth,ge.lineSpace.clientWidth);(te=="above"||r.bottom+f.offsetHeight>Pe)&&r.top>f.offsetHeight?xe=r.top-f.offsetHeight:r.bottom+f.offsetHeight<=Pe&&(xe=r.bottom),Re+f.offsetWidth>Ke&&(Re=Ke-f.offsetWidth)}f.style.top=xe+"px",f.style.left=f.style.right="",de=="right"?(Re=ge.sizer.clientWidth-f.offsetWidth,f.style.right="0px"):(de=="left"?Re=0:de=="middle"&&(Re=(ge.sizer.clientWidth-f.offsetWidth)/2),f.style.left=Re+"px"),L&&$s(this,{left:Re,top:xe,right:Re+f.offsetWidth,bottom:xe+f.offsetHeight})},triggerOnKeyDown:rn(Cs),triggerOnKeyPress:rn(_s),triggerOnKeyUp:Es,triggerOnMouseDown:rn(Ss),execCommand:function(r){if(Zi.hasOwnProperty(r))return Zi[r].call(null,this)},triggerElectric:rn(function(r){Ms(this,r)}),findPosH:function(r,f,L,te){var de=1;f<0&&(de=-1,f=-f);for(var ge=x(this.doc,r),xe=0;xe<f&&!(ge=aa(this.doc,ge,de,L,te),ge.hitSide);++xe);return ge},moveH:rn(function(r,f){var L=this;this.extendSelectionsBy(function(te){return L.display.shift||L.doc.extend||te.empty()?aa(L.doc,te.head,r,f,L.options.rtlMoveVisually):r<0?te.from():te.to()},pe)}),deleteH:rn(function(r,f){var L=this.doc.sel,te=this.doc;L.somethingSelected()?te.replaceSelection("",null,"+delete"):Oi(this,function(de){var ge=aa(te,de.head,r,f,!1);return r<0?{from:ge,to:de.head}:{from:de.head,to:ge}})}),findPosV:function(r,f,L,te){var de=1,ge=te;f<0&&(de=-1,f=-f);for(var xe=x(this.doc,r),Re=0;Re<f;++Re){var Pe=Tn(this,xe,"div");if(ge==null?ge=Pe.left:Pe.left=ge,xe=Is(this,Pe,de,L),xe.hitSide)break}return xe},moveV:rn(function(r,f){var L=this,te=this.doc,de=[],ge=!this.display.shift&&!te.extend&&te.sel.somethingSelected();if(te.extendSelectionsBy(function(Re){if(ge)return r<0?Re.from():Re.to();var Pe=Tn(L,Re.head,"div");Re.goalColumn!=null&&(Pe.left=Re.goalColumn),de.push(Pe.left);var Ke=Is(L,Pe,r,f);return f=="page"&&Re==te.sel.primary()&&Uo(L,Ro(L,Ke,"div").top-Pe.top),Ke},pe),de.length)for(var xe=0;xe<te.sel.ranges.length;xe++)te.sel.ranges[xe].goalColumn=de[xe]}),findWordAt:function(r){var f=this.doc,L=mt(f,r.line).text,te=r.ch,de=r.ch;if(L){var ge=this.getHelper(r,"wordChars");(r.sticky=="before"||de==L.length)&&te?--te:++de;for(var xe=L.charAt(te),Re=T(xe,ge)?function(Pe){return T(Pe,ge)}:/\s/.test(xe)?function(Pe){return/\s/.test(Pe)}:function(Pe){return!/\s/.test(Pe)&&!T(Pe)};te>0&&Re(L.charAt(te-1));)--te;for(;de<L.length&&Re(L.charAt(de));)++de}return new rr(rt(r.line,te),rt(r.line,de))},toggleOverwrite:function(r){if(r!=null&&r==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?$(this.display.cursorDiv,"CodeMirror-overwrite"):P(this.display.cursorDiv,"CodeMirror-overwrite"),Ve(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==se()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:rn(function(r,f){Ii(this,r,f)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-tn(this)-this.display.barHeight,width:r.scrollWidth-tn(this)-this.display.barWidth,clientHeight:Oo(this),clientWidth:ni(this)}},scrollIntoView:rn(function(r,f){r==null?(r={from:this.doc.sel.primary().head,to:null},f==null&&(f=this.options.cursorScrollMargin)):typeof r=="number"?r={from:rt(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=f||0,r.from.line!=null?Zs(this,r):ka(this,r.from,r.to,r.margin)}),setSize:rn(function(r,f){var L=this,te=function(ge){return typeof ge=="number"||/^\d+$/.test(String(ge))?ge+"px":ge};r!=null&&(this.display.wrapper.style.width=te(r)),f!=null&&(this.display.wrapper.style.height=te(f)),this.options.lineWrapping&&pa(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(ge){if(ge.widgets){for(var xe=0;xe<ge.widgets.length;xe++)if(ge.widgets[xe].noHScroll){Vn(L,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,Ve(this,"refresh",this)}),operation:function(r){return pn(this,r)},startOperation:function(){return ui(this)},endOperation:function(){return ci(this)},refresh:rn(function(){var r=this.display.cachedTextHeight;sn(this),this.curOp.forceUpdate=!0,Pi(this),Ii(this,this.doc.scrollLeft,this.doc.scrollTop),zo(this.display),(r==null||Math.abs(r-gi(this.display))>.5||this.options.lineWrapping)&&Io(this),Ve(this,"refresh",this)}),swapDoc:rn(function(r){var f=this.doc;return f.cm=null,this.state.selectingText&&this.state.selectingText(),Wa(this,r),Pi(this),this.display.input.reset(),Ii(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,tr(this,"swapDoc",this,f),f}),phrase:function(r){var f=this.options.phrases;return f&&Object.prototype.hasOwnProperty.call(f,r)?f[r]:r},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}},Le(e),e.registerHelper=function(r,f,L){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][f]=L},e.registerGlobalHelper=function(r,f,L,te){e.registerHelper(r,f,te),n[r]._global.push({pred:L,val:te})}}function aa(e,t,n,r,f){var L=t,te=n,de=mt(e,t.line),ge=f&&e.direction=="rtl"?-n:n;function xe(){var xt=t.line+ge;return xt<e.first||xt>=e.first+e.size?!1:(t=new rt(xt,t.ch,t.sticky),de=mt(e,xt))}function Re(xt){var pt;if(r=="codepoint"){var _t=de.text.charCodeAt(t.ch+(r>0?0:-1));isNaN(_t)?pt=null:pt=new rt(t.line,Math.max(0,Math.min(de.text.length,t.ch+n*(_t>=55296&&_t<56320?2:1))),-n)}else f?pt=Ll(e.cm,de,t,n):pt=qo(de,t,n);if(pt==null)if(!xt&&xe())t=ea(f,e.cm,de,t.line,ge);else return!1;else t=pt;return!0}if(r=="char"||r=="codepoint")Re();else if(r=="column")Re(!0);else if(r=="word"||r=="group")for(var Pe=null,Ke=r=="group",We=e.cm&&e.cm.getHelper(t,"wordChars"),et=!0;!(n<0&&!Re(!et));et=!1){var it=de.text.charAt(t.ch)||`
`,lt=T(it,We)?"w":Ke&&it==`
`?"n":!Ke||/\s/.test(it)?null:"p";if(Ke&&!et&&!lt&&(lt="s"),Pe&&Pe!=lt){n<0&&(n=1,Re(),t.sticky="after");break}if(lt&&(Pe=lt),n>0&&!Re(!et))break}var ft=yo(e,t,L,te,!0);return Hr(L,ft)&&(ft.hitSide=!0),ft}function Is(e,t,n,r){var f=e.doc,L=t.left,te;if(r=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ge=Math.max(de-.5*gi(e.display),3);te=(n>0?t.bottom:t.top)+n*ge}else r=="line"&&(te=n>0?t.bottom+3:t.top-3);for(var xe;!(xe=Mo(e,L,te),!xe.outside);){if(n<0?te<=0:te>=f.height){xe.hitSide=!0;break}te+=n*5}return xe}var ir=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ir.prototype.init=function(e){var t=this,n=this,r=n.cm,f=n.div=e.lineDiv;Ps(f,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function L(de){for(var ge=de.target;ge;ge=ge.parentNode){if(ge==f)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ge.className))break}return!1}Ne(f,"paste",function(de){if(!L(de)||$e(r,de)||Ds(de,r))return;a<=11&&setTimeout(Pr(r,function(){return t.updateFromDOM()}),20)}),Ne(f,"compositionstart",function(de){t.composing={data:de.data,done:!1}}),Ne(f,"compositionupdate",function(de){t.composing||(t.composing={data:de.data,done:!1})}),Ne(f,"compositionend",function(de){t.composing&&(de.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ne(f,"touchstart",function(){return n.forceCompositionEnd()}),Ne(f,"input",function(){t.composing||t.readFromDOMSoon()});function te(de){if(!L(de)||$e(r,de))return;if(r.somethingSelected())_o({lineWise:!1,text:r.getSelections()}),de.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var ge=Ns(r);_o({lineWise:!0,text:ge.text}),de.type=="cut"&&r.operation(function(){r.setSelections(ge.ranges,0,Se),r.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var xe=kn.text.join(`
`);if(de.clipboardData.setData("Text",xe),de.clipboardData.getData("Text")==xe){de.preventDefault();return}}var Re=Ls(),Pe=Re.firstChild;r.display.lineSpace.insertBefore(Re,r.display.lineSpace.firstChild),Pe.value=kn.text.join(`
`);var Ke=document.activeElement;U(Pe),setTimeout(function(){r.display.lineSpace.removeChild(Re),Ke.focus(),Ke==f&&n.showPrimarySelection()},50)}Ne(f,"copy",te),Ne(f,"cut",te)},ir.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var e=Ea(this.cm,!1);return e.focus=document.activeElement==this.div,e},ir.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ir.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),f=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||f.line<t.display.viewFrom){e.removeAllRanges();return}var L=So(t,e.anchorNode,e.anchorOffset),te=So(t,e.focusNode,e.focusOffset);if(L&&!L.bad&&te&&!te.bad&&Ot(wn(L,te),r)==0&&Ot(fn(L,te),f)==0)return;var de=t.display.view,ge=r.line>=t.display.viewFrom&&js(t,r)||{node:de[0].measure.map[2],offset:0},xe=f.line<t.display.viewTo&&js(t,f);if(!xe){var Re=de[de.length-1].measure,Pe=Re.maps?Re.maps[Re.maps.length-1]:Re.map;xe={node:Pe[Pe.length-1],offset:Pe[Pe.length-2]-Pe[Pe.length-3]}}if(!ge||!xe){e.removeAllRanges();return}var Ke=e.rangeCount&&e.getRangeAt(0),We;try{We=fe(ge.node,ge.offset,xe.offset,xe.node)}catch(et){}We&&(!S&&t.state.focused?(e.collapse(ge.node,ge.offset),We.collapsed||(e.removeAllRanges(),e.addRange(We))):(e.removeAllRanges(),e.addRange(We)),Ke&&e.anchorNode==null?e.addRange(Ke):S&&this.startGracePeriod()),this.rememberSelection()},ir.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},ir.prototype.showMultipleSelections=function(e){K(this.cm.display.cursorDiv,e.cursors),K(this.cm.display.selectionDiv,e.selection)},ir.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ir.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return z(this.div,t)},ir.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},ir.prototype.blur=function(){this.div.blur()},ir.prototype.getField=function(){return this.div},ir.prototype.supportsTouch=function(){return!0},ir.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():pn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},ir.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ir.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(k&&i&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var n=So(t,e.anchorNode,e.anchorOffset),r=So(t,e.focusNode,e.focusOffset);n&&r&&pn(t,function(){Kr(t.doc,Jn(n,r),Se),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})},ir.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),f=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=rt(r.line-1,mt(e.doc,r.line-1).length)),f.ch==mt(e.doc,f.line).text.length&&f.line<e.lastLine()&&(f=rt(f.line+1,0)),r.line<t.viewFrom||f.line>t.viewTo-1)return!1;var L,te,de;r.line==t.viewFrom||(L=ai(e,r.line))==0?(te=It(t.view[0].line),de=t.view[0].node):(te=It(t.view[L].line),de=t.view[L-1].node.nextSibling);var ge=ai(e,f.line),xe,Re;if(ge==t.view.length-1?(xe=t.viewTo-1,Re=t.lineDiv.lastChild):(xe=It(t.view[ge+1].line)-1,Re=t.view[ge+1].node.previousSibling),!de)return!1;for(var Pe=e.doc.splitLines(ru(e,de,Re,te,xe)),Ke=Xt(e.doc,rt(te,0),rt(xe,mt(e.doc,xe).text.length));Pe.length>1&&Ke.length>1;)if(Z(Pe)==Z(Ke))Pe.pop(),Ke.pop(),xe--;else if(Pe[0]==Ke[0])Pe.shift(),Ke.shift(),te++;else break;for(var We=0,et=0,it=Pe[0],lt=Ke[0],ft=Math.min(it.length,lt.length);We<ft&&it.charCodeAt(We)==lt.charCodeAt(We);)++We;for(var xt=Z(Pe),pt=Z(Ke),_t=Math.min(xt.length-(Pe.length==1?We:0),pt.length-(Ke.length==1?We:0));et<_t&&xt.charCodeAt(xt.length-et-1)==pt.charCodeAt(pt.length-et-1);)++et;if(Pe.length==1&&Ke.length==1&&te==r.line)for(;We&&We>r.ch&&xt.charCodeAt(xt.length-et-1)==pt.charCodeAt(pt.length-et-1);)We--,et++;Pe[Pe.length-1]=xt.slice(0,xt.length-et).replace(/^\u200b+/,""),Pe[0]=Pe[0].slice(We).replace(/\u200b+$/,"");var Pt=rt(te,We),kt=rt(xe,Ke.length?Z(Ke).length-et:0);if(Pe.length>1||Pe[0]||Ot(Pt,kt))return _i(e.doc,Pe,Pt,kt,"+input"),!0},ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},ir.prototype.reset=function(){this.forceCompositionEnd()},ir.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},ir.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},ir.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&pn(this.cm,function(){return sn(e.cm)})},ir.prototype.setUneditable=function(e){e.contentEditable="false"},ir.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pr(this.cm,oa)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},ir.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},ir.prototype.onContextMenu=function(){},ir.prototype.resetPosition=function(){},ir.prototype.needsContentAttribute=!0;function js(e,t){var n=ko(e,t.line);if(!n||n.hidden)return null;var r=mt(e.doc,t.line),f=ua(n,r,t.line),L=Xe(r,e.doc.direction),te="left";if(L){var de=Ge(L,t.ch);te=de%2?"right":"left"}var ge=ha(f.map,t.ch,te);return ge.offset=ge.collapse=="right"?ge.end:ge.start,ge}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Ai(e,t){return t&&(e.bad=!0),e}function ru(e,t,n,r,f){var L="",te=!1,de=e.doc.lineSeparator(),ge=!1;function xe(We){return function(et){return et.id==We}}function Re(){te&&(L+=de,ge&&(L+=de),te=ge=!1)}function Pe(We){We&&(Re(),L+=We)}function Ke(We){if(We.nodeType==1){var et=We.getAttribute("cm-text");if(et){Pe(et);return}var it=We.getAttribute("cm-marker"),lt;if(it){var ft=e.findMarks(rt(r,0),rt(f+1,0),xe(+it));ft.length&&(lt=ft[0].find(0))&&Pe(Xt(e.doc,lt.from,lt.to).join(de));return}if(We.getAttribute("contenteditable")=="false")return;var xt=/^(pre|div|p|li|table|br)$/i.test(We.nodeName);if(!/^br$/i.test(We.nodeName)&&We.textContent.length==0)return;xt&&Re();for(var pt=0;pt<We.childNodes.length;pt++)Ke(We.childNodes[pt]);/^(pre|p)$/i.test(We.nodeName)&&(ge=!0),xt&&(te=!0)}else We.nodeType==3&&Pe(We.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ke(t),t==n);)t=t.nextSibling,ge=!1;return L}function So(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Ai(e.clipPos(rt(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 f=0;f<e.display.view.length;f++){var L=e.display.view[f];if(L.node==r)return nu(L,t,n)}}function nu(e,t,n){var r=e.text.firstChild,f=!1;if(!t||!z(r,t))return Ai(rt(It(e.line),0),!0);if(t==r&&(f=!0,t=r.childNodes[n],n=0,!t)){var L=e.rest?Z(e.rest):e.line;return Ai(rt(It(L),L.text.length),f)}var te=t.nodeType==3?t:null,de=t;for(!te&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(te=t.firstChild,n&&(n=te.nodeValue.length));de.parentNode!=r;)de=de.parentNode;var ge=e.measure,xe=ge.maps;function Re(lt,ft,xt){for(var pt=-1;pt<(xe?xe.length:0);pt++)for(var _t=pt<0?ge.map:xe[pt],Pt=0;Pt<_t.length;Pt+=3){var kt=_t[Pt+2];if(kt==lt||kt==ft){var zt=It(pt<0?e.line:e.rest[pt]),or=_t[Pt]+xt;return(xt<0||kt!=lt)&&(or=_t[Pt+(xt?1:0)]),rt(zt,or)}}}var Pe=Re(te,de,n);if(Pe)return Ai(Pe,f);for(var Ke=de.nextSibling,We=te?te.nodeValue.length-n:0;Ke;Ke=Ke.nextSibling){if(Pe=Re(Ke,Ke.firstChild,0),Pe)return Ai(rt(Pe.line,Pe.ch-We),f);We+=Ke.textContent.length}for(var et=de.previousSibling,it=n;et;et=et.previousSibling){if(Pe=Re(et,et.firstChild,-1),Pe)return Ai(rt(Pe.line,Pe.ch+it),f);it+=et.textContent.length}}var Sr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new le,this.hasSelection=!1,this.composing=null};Sr.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var f=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),_&&(f.style.width="0px"),Ne(f,"input",function(){d&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),Ne(f,"paste",function(te){if($e(r,te)||Ds(te,r))return;r.state.pasteIncoming=+new Date,n.fastPoll()});function L(te){if($e(r,te))return;if(r.somethingSelected())_o({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var de=Ns(r);_o({lineWise:!0,text:de.text}),te.type=="cut"?r.setSelections(de.ranges,null,Se):(n.prevInput="",f.value=de.text.join(`
`),U(f))}else return;te.type=="cut"&&(r.state.cutIncoming=+new Date)}Ne(f,"cut",L),Ne(f,"copy",L),Ne(e.scroller,"paste",function(te){if(yn(e,te)||$e(r,te))return;if(!f.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var de=new Event("paste");de.clipboardData=te.clipboardData,f.dispatchEvent(de)}),Ne(e.lineSpace,"selectstart",function(te){yn(e,te)||_e(te)}),Ne(f,"compositionstart",function(){var te=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:te,range:r.markText(te,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ne(f,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Sr.prototype.createField=function(e){this.wrapper=Ls(),this.textarea=this.wrapper.firstChild},Sr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Sr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ea(e);if(e.options.moveInputWithCursor){var f=Tn(e,n.sel.primary().head,"div"),L=t.wrapper.getBoundingClientRect(),te=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,f.top+te.top-L.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,f.left+te.left-L.left))}return r},Sr.prototype.showSelection=function(e){var t=this.cm,n=t.display;K(n.cursorDiv,e.cursors),K(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Sr.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&U(this.textarea),d&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",d&&a>=9&&(this.hasSelection=null))},Sr.prototype.getField=function(){return this.textarea},Sr.prototype.supportsTouch=function(){return!1},Sr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!O||se()!=this.textarea))try{this.textarea.focus()}catch(e){}},Sr.prototype.blur=function(){this.textarea.blur()},Sr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Sr.prototype.receivedFocus=function(){this.slowPoll()},Sr.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Sr.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},Sr.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||st(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var f=n.value;if(f==r&&!t.somethingSelected())return!1;if(d&&a>=9&&this.hasSelection===f||M&&/[\uf700-\uf7ff]/.test(f))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var L=f.charCodeAt(0);if(L==8203&&!r&&(r="\u200B"),L==8666)return this.reset(),this.cm.execCommand("undo")}for(var te=0,de=Math.min(r.length,f.length);te<de&&r.charCodeAt(te)==f.charCodeAt(te);)++te;return pn(t,function(){oa(t,f.slice(te),r.length-te,null,e.composing?"*compose":null),f.length>1e3||f.indexOf(`
`)>-1?n.value=e.prevInput="":e.prevInput=f,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Sr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Sr.prototype.onKeyPress=function(){d&&a>=9&&(this.hasSelection=null),this.fastPoll()},Sr.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,f=t.textarea;t.contextMenuPending&&t.contextMenuPending();var L=oi(n,e),te=r.scroller.scrollTop;if(!L||g)return;var de=n.options.resetSelectionOnContextMenu;de&&n.doc.sel.contains(L)==-1&&Pr(n,Kr)(n.doc,Jn(L),Se);var ge=f.style.cssText,xe=t.wrapper.style.cssText,Re=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",f.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Re.top-5)+"px; left: "+(e.clientX-Re.left-5)+`px;
z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Pe;s&&(Pe=window.scrollY),r.input.focus(),s&&window.scrollTo(null,Pe),r.input.reset(),n.somethingSelected()||(f.value=t.prevInput=" "),t.contextMenuPending=We,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function Ke(){if(f.selectionStart!=null){var it=n.somethingSelected(),lt="\u200B"+(it?f.value:"");f.value="\u21DA",f.value=lt,t.prevInput=it?"":"\u200B",f.selectionStart=1,f.selectionEnd=lt.length,r.selForContextMenu=n.doc.sel}}function We(){if(t.contextMenuPending!=We)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=xe,f.style.cssText=ge,d&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=te),f.selectionStart!=null){(!d||d&&a<9)&&Ke();var it=0,lt=function(){r.selForContextMenu==n.doc.sel&&f.selectionStart==0&&f.selectionEnd>0&&t.prevInput=="\u200B"?Pr(n,ts)(n):it++<10?r.detectingSelectAll=setTimeout(lt,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(lt,200)}}if(d&&a>=9&&Ke(),Y){Ae(e);var et=function(){ot(window,"mouseup",et),setTimeout(We,20)};Ne(window,"mouseup",et)}else setTimeout(We,50)},Sr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Sr.prototype.setUneditable=function(){},Sr.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?C(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=se();t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=de.getValue()}var f;if(e.form&&(Ne(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var L=e.form;f=L.submit;try{var te=L.submit=function(){r(),L.submit=f,L.submit(),L.submit=te}}catch(ge){}}t.finishInit=function(ge){ge.save=r,ge.getTextArea=function(){return e},ge.toTextArea=function(){ge.toTextArea=isNaN,r(),e.parentNode.removeChild(ge.getWrapperElement()),e.style.display="",e.form&&(ot(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=f))}},e.style.display="none";var de=dr(function(ge){return e.parentNode.insertBefore(ge,e.nextSibling)},t);return de}function ou(e){e.off=ot,e.on=Ne,e.wheelEventPixels=hl,e.Doc=ln,e.splitLines=dt,e.countColumn=D,e.findColumn=me,e.isWordChar=H,e.Pass=Ee,e.signal=Ve,e.Line=Br,e.changeEnd=$n,e.scrollbarModel=Da,e.Pos=rt,e.cmpPos=Ot,e.modes=Kt,e.mimeModes=At,e.resolveMode=Ct,e.getMode=hr,e.modeExtensions=Jt,e.extendMode=nr,e.copyState=sr,e.startState=Tr,e.innerMode=yr,e.commands=Zi,e.keyMap=Fn,e.keyName=vs,e.isModifierKey=ms,e.lookupKey=Ti,e.normalizeKeyMap=Pl,e.StringStream=Ut,e.SharedTextMarker=Yi,e.TextMarker=Qn,e.LineWidget=Vi,e.e_preventDefault=_e,e.e_stopPropagation=Te,e.e_stop=Ae,e.addClass=$,e.contains=z,e.rmClass=P,e.keyNames=qn}$l(dr),eu(dr);var au="iter insert remove copy getEditor constructor".split(" ");for(var To in ln.prototype)ln.prototype.hasOwnProperty(To)&&he(au,To)<0&&(dr.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(ln.prototype[To]));return Le(ln),dr.inputStyles={textarea:Sr,contenteditable:ir},dr.defineMode=function(e){!dr.defaults.mode&&e!="null"&&(dr.defaults.mode=e),jt.apply(this,arguments)},dr.defineMIME=ar,dr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),dr.defineMIME("text/plain","null"),dr.defineExtension=function(e,t){dr.prototype[e]=t},dr.defineDocExtension=function(e,t){ln.prototype[e]=t},dr.fromTextArea=iu,ou(dr),dr.version="5.58.2",dr})},WYAk:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){(function(){var o=h,S=o.lib,E=S.Base,b=o.enc,p=b.Utf8,d=o.algo,a=d.HMAC=E.extend({init:function(s,l){s=this._hasher=new s.init,typeof l=="string"&&(l=p.parse(l));var i=s.blockSize,g=i*4;l.sigBytes>g&&(l=s.finalize(l)),l.clamp();for(var m=this._oKey=l.clone(),v=this._iKey=l.clone(),w=m.words,_=v.words,k=0;k<i;k++)w[k]^=1549556828,_[k]^=909522486;m.sigBytes=v.sigBytes=g,this.reset()},reset:function(){var s=this._hasher;s.reset(),s.update(this._iKey)},update:function(s){return this._hasher.update(s),this},finalize:function(s){var l=this._hasher,i=l.finalize(s);l.reset();var g=l.finalize(this._oKey.clone().concat(i));return g}})})()})},WaYH:function(u,G,c){"use strict";var h=c("rePB"),o=c("Ff2n"),S=c("VTBJ"),E=c("1OyB"),b=c("vuIU"),p=c("JX7q"),d=c("Ji7U"),a=c("LK+K"),s=c("q1tI"),l=c("TSYQ"),i=c.n(l),g=c("sboe"),m=c("OZM5"),v=function(Y){var X=Y.prefixCls,P=Y.level,F=Y.isStart,K=Y.isEnd;if(!P)return null;for(var Q="".concat(X,"-indent-unit"),ce=[],fe=0;fe<P;fe+=1){var z;ce.push(s.createElement("span",{key:fe,className:i()(Q,(z={},Object(h.a)(z,"".concat(Q,"-start"),F[fe+1]),Object(h.a)(z,"".concat(Q,"-end"),K[fe+1]),Object(h.a)(z,"".concat(Q,"-end-first-level"),!fe&&K[0]),z))}))}return s.createElement("span",{"aria-hidden":"true",className:"".concat(X,"-indent")},ce)},w=v,_=c("815F"),k="open",O="close",M="---",I=function(y){Object(d.a)(X,y);var Y=Object(a.a)(X);function X(){var P;return Object(E.a)(this,X),P=Y.apply(this,arguments),P.state={dragNodeHighlight:!1},P.onSelectorClick=function(F){var K=P.props.context.onNodeClick;K(F,Object(_.b)(P.props)),P.isSelectable()?P.onSelect(F):P.onCheck(F)},P.onSelectorDoubleClick=function(F){var K=P.props.context.onNodeDoubleClick;K(F,Object(_.b)(P.props))},P.onSelect=function(F){if(P.isDisabled())return;var K=P.props.context.onNodeSelect;F.preventDefault(),K(F,Object(_.b)(P.props))},P.onCheck=function(F){if(P.isDisabled())return;var K=P.props,Q=K.disableCheckbox,ce=K.checked,fe=P.props.context.onNodeCheck;if(!P.isCheckable()||Q)return;F.preventDefault();var z=!ce;fe(F,Object(_.b)(P.props),z)},P.onMouseEnter=function(F){var K=P.props.context.onNodeMouseEnter;K(F,Object(_.b)(P.props))},P.onMouseLeave=function(F){var K=P.props.context.onNodeMouseLeave;K(F,Object(_.b)(P.props))},P.onContextMenu=function(F){var K=P.props.context.onNodeContextMenu;K(F,Object(_.b)(P.props))},P.onDragStart=function(F){var K=P.props.context.onNodeDragStart;F.stopPropagation(),P.setState({dragNodeHighlight:!0}),K(F,Object(p.a)(P));try{F.dataTransfer.setData("text/plain","")}catch(Q){}},P.onDragEnter=function(F){var K=P.props.context.onNodeDragEnter;F.preventDefault(),F.stopPropagation(),K(F,Object(p.a)(P))},P.onDragOver=function(F){var K=P.props.context.onNodeDragOver;F.preventDefault(),F.stopPropagation(),K(F,Object(p.a)(P))},P.onDragLeave=function(F){var K=P.props.context.onNodeDragLeave;F.stopPropagation(),K(F,Object(p.a)(P))},P.onDragEnd=function(F){var K=P.props.context.onNodeDragEnd;F.stopPropagation(),P.setState({dragNodeHighlight:!1}),K(F,Object(p.a)(P))},P.onDrop=function(F){var K=P.props.context.onNodeDrop;F.preventDefault(),F.stopPropagation(),P.setState({dragNodeHighlight:!1}),K(F,Object(p.a)(P))},P.onExpand=function(F){var K=P.props.context.onNodeExpand;K(F,Object(_.b)(P.props))},P.setSelectHandle=function(F){P.selectHandle=F},P.getNodeState=function(){var F=P.props.expanded;return P.isLeaf()?null:F?k:O},P.hasChildren=function(){var F=P.props.eventKey,K=P.props.context.keyEntities,Q=K[F]||{},ce=Q.children;return!!(ce||[]).length},P.isLeaf=function(){var F=P.props,K=F.isLeaf,Q=F.loaded,ce=P.props.context.loadData,fe=P.hasChildren();return K===!1?!1:K||!ce&&!fe||ce&&Q&&!fe},P.isDisabled=function(){var F=P.props.disabled,K=P.props.context.disabled;return!!(K||F)},P.isCheckable=function(){var F=P.props.checkable,K=P.props.context.checkable;return!K||F===!1?!1:K},P.syncLoadData=function(F){var K=F.expanded,Q=F.loading,ce=F.loaded,fe=P.props.context,z=fe.loadData,se=fe.onNodeLoad;if(Q)return;z&&K&&!P.isLeaf()&&(!P.hasChildren()&&!ce&&se(Object(_.b)(P.props)))},P.renderSwitcher=function(){var F=P.props,K=F.expanded,Q=F.switcherIcon,ce=P.props.context,fe=ce.prefixCls,z=ce.switcherIcon,se=Q||z;if(P.isLeaf())return s.createElement("span",{className:i()("".concat(fe,"-switcher"),"".concat(fe,"-switcher-noop"))},typeof se=="function"?se(Object(S.a)(Object(S.a)({},P.props),{},{isLeaf:!0})):se);var $=i()("".concat(fe,"-switcher"),"".concat(fe,"-switcher_").concat(K?k:O));return s.createElement("span",{onClick:P.onExpand,className:$},typeof se=="function"?se(Object(S.a)(Object(S.a)({},P.props),{},{isLeaf:!1})):se)},P.renderCheckbox=function(){var F=P.props,K=F.checked,Q=F.halfChecked,ce=F.disableCheckbox,fe=P.props.context.prefixCls,z=P.isDisabled(),se=P.isCheckable();if(!se)return null;var $=typeof se!="boolean"?se:null;return s.createElement("span",{className:i()("".concat(fe,"-checkbox"),K&&"".concat(fe,"-checkbox-checked"),!K&&Q&&"".concat(fe,"-checkbox-indeterminate"),(z||ce)&&"".concat(fe,"-checkbox-disabled")),onClick:P.onCheck},$)},P.renderIcon=function(){var F=P.props.loading,K=P.props.context.prefixCls;return s.createElement("span",{className:i()("".concat(K,"-iconEle"),"".concat(K,"-icon__").concat(P.getNodeState()||"docu"),F&&"".concat(K,"-icon_loading"))})},P.renderSelector=function(){var F=P.state.dragNodeHighlight,K=P.props,Q=K.title,ce=K.selected,fe=K.icon,z=K.loading,se=K.data,$=P.props.context,j=$.prefixCls,U=$.showIcon,R=$.icon,C=$.draggable,D=$.loadData,le=$.titleRender,he=P.isDisabled(),ve="".concat(j,"-node-content-wrapper"),Ee;if(U){var Se=fe||R;Ee=Se?s.createElement("span",{className:i()("".concat(j,"-iconEle"),"".concat(j,"-icon__customize"))},typeof Se=="function"?Se(P.props):Se):P.renderIcon()}else D&&z&&(Ee=P.renderIcon());var ae;typeof Q=="function"?ae=Q(se):le?ae=le(se):ae=Q;var pe=s.createElement("span",{className:"".concat(j,"-title")},ae);return s.createElement("span",{ref:P.setSelectHandle,title:typeof Q=="string"?Q:"",className:i()("".concat(ve),"".concat(ve,"-").concat(P.getNodeState()||"normal"),!he&&(ce||F)&&"".concat(j,"-node-selected"),!he&&C&&"draggable"),draggable:!he&&C||void 0,"aria-grabbed":!he&&C||void 0,onMouseEnter:P.onMouseEnter,onMouseLeave:P.onMouseLeave,onContextMenu:P.onContextMenu,onClick:P.onSelectorClick,onDoubleClick:P.onSelectorDoubleClick,onDragStart:C?P.onDragStart:void 0},Ee,pe)},P}return Object(b.a)(X,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var F=this.props.selectable,K=this.props.context.selectable;return typeof F=="boolean"?F:K}},{key:"render",value:function(){var F,K=this.props,Q=K.eventKey,ce=K.className,fe=K.style,z=K.dragOver,se=K.dragOverGapTop,$=K.dragOverGapBottom,j=K.isLeaf,U=K.isStart,R=K.isEnd,C=K.expanded,D=K.selected,le=K.checked,he=K.halfChecked,ve=K.loading,Ee=K.domRef,Se=K.active,ae=K.onMouseMove,pe=Object(o.a)(K,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),me=this.props.context,ee=me.prefixCls,re=me.filterTreeNode,Z=me.draggable,ue=me.keyEntities,V=this.isDisabled(),J=Object(m.f)(pe),Ce=ue[Q]||{},q=Ce.level,H=R[R.length-1];return s.createElement("div",Object.assign({ref:Ee,className:i()(ce,"".concat(ee,"-treenode"),(F={},Object(h.a)(F,"".concat(ee,"-treenode-disabled"),V),Object(h.a)(F,"".concat(ee,"-treenode-switcher-").concat(C?"open":"close"),!j),Object(h.a)(F,"".concat(ee,"-treenode-checkbox-checked"),le),Object(h.a)(F,"".concat(ee,"-treenode-checkbox-indeterminate"),he),Object(h.a)(F,"".concat(ee,"-treenode-selected"),D),Object(h.a)(F,"".concat(ee,"-treenode-loading"),ve),Object(h.a)(F,"".concat(ee,"-treenode-active"),Se),Object(h.a)(F,"".concat(ee,"-treenode-leaf-last"),H),Object(h.a)(F,"drag-over",!V&&z),Object(h.a)(F,"drag-over-gap-top",!V&&se),Object(h.a)(F,"drag-over-gap-bottom",!V&&$),Object(h.a)(F,"filter-node",re&&re(Object(_.b)(this.props))),F)),style:fe,onDragEnter:Z?this.onDragEnter:void 0,onDragOver:Z?this.onDragOver:void 0,onDragLeave:Z?this.onDragLeave:void 0,onDrop:Z?this.onDrop:void 0,onDragEnd:Z?this.onDragEnd:void 0,onMouseMove:ae},J),s.createElement(w,{prefixCls:ee,level:q,isStart:U,isEnd:R}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),X}(s.Component),B=function(Y){return s.createElement(g.a.Consumer,null,function(X){return s.createElement(I,Object.assign({},Y,{context:X}))})};B.displayName="TreeNode",B.defaultProps={title:M},B.isTreeNode=1;var N=G.a=B},XIdC:function(u,G,c){"use strict";var h=c("rePB"),o=c("ODXe"),S=c("Ff2n"),E=c("q1tI"),b=c.n(E),p=c("TSYQ"),d=c.n(p),a=c("6cGi"),s=c("4IlW"),l=E.forwardRef(function(i,g){var m,v=i.prefixCls,w=v===void 0?"rc-switch":v,_=i.className,k=i.checked,O=i.defaultChecked,M=i.disabled,I=i.loadingIcon,B=i.checkedChildren,N=i.unCheckedChildren,y=i.onClick,Y=i.onChange,X=i.onKeyDown,P=Object(S.a)(i,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),F=Object(a.a)(!1,{value:k,defaultValue:O}),K=Object(o.a)(F,2),Q=K[0],ce=K[1];function fe(j,U){var R=Q;return M||(R=j,ce(R),Y==null||Y(R,U)),R}function z(j){j.which===s.a.LEFT?fe(!1,j):j.which===s.a.RIGHT&&fe(!0,j),X==null||X(j)}function se(j){var U=fe(!Q,j);y==null||y(U,j)}var $=d()(w,_,(m={},Object(h.a)(m,"".concat(w,"-checked"),Q),Object(h.a)(m,"".concat(w,"-disabled"),M),m));return E.createElement("button",Object.assign({},P,{type:"button",role:"switch","aria-checked":Q,disabled:M,className:$,ref:g,onKeyDown:z,onClick:se}),I,E.createElement("span",{className:"".concat(w,"-inner")},Q?B:N))});l.displayName="Switch",G.a=l},Y1PL:function(u,G,c){"use strict";c.r(G),c.d(G,"ResizableTextArea",function(){return he});var h=c("wx14"),o=c("1OyB"),S=c("vuIU"),E=c("Ji7U"),b=c("LK+K"),p=c("q1tI"),d=c("VTBJ"),a=c("rePB"),s=c("Zm9Q"),l=c("Kwbf"),i=c("c+Xe"),g=c("m+aA"),m=c("bdgK"),v=new Map;function w(Se){Se.forEach(function(ae){var pe,me=ae.target;(pe=v.get(me))===null||pe===void 0||pe.forEach(function(ee){return ee(me)})})}var _=new m.default(w),k=null,O=null;function M(Se,ae){v.has(Se)||(v.set(Se,new Set),_.observe(Se)),v.get(Se).add(ae)}function I(Se,ae){v.has(Se)&&(v.get(Se).delete(ae),v.get(Se).size||(_.unobserve(Se),v.delete(Se)))}var B=function(Se){Object(E.a)(pe,Se);var ae=Object(b.a)(pe);function pe(){return Object(o.a)(this,pe),ae.apply(this,arguments)}return Object(S.a)(pe,[{key:"render",value:function(){return this.props.children}}]),pe}(p.Component),N=p.createContext(null);function y(Se){var ae=Se.children,pe=Se.onBatchResize,me=p.useRef(0),ee=p.useRef([]),re=p.useContext(N),Z=p.useCallback(function(ue,V,J){me.current+=1;var Ce=me.current;ee.current.push({size:ue,element:V,data:J}),Promise.resolve().then(function(){Ce===me.current&&(pe==null||pe(ee.current),ee.current=[])}),re==null||re(ue,V,J)},[pe,re]);return p.createElement(N.Provider,{value:Z},ae)}function Y(Se){var ae=Se.children,pe=Se.disabled,me=p.useRef(null),ee=p.useRef(null),re=p.useContext(N),Z=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ue=p.isValidElement(ae)&&Object(i.c)(ae),V=ue?ae.ref:null,J=p.useMemo(function(){return Object(i.a)(V,me)},[V,me]),Ce=p.useRef(Se);Ce.current=Se;var q=p.useCallback(function(H){var T=Ce.current,W=T.onResize,we=T.data,ye=H.getBoundingClientRect(),Oe=ye.width,Be=ye.height,Fe=H.offsetWidth,Ue=H.offsetHeight,Ge=Math.floor(Oe),Ye=Math.floor(Be);if(Z.current.width!==Ge||Z.current.height!==Ye||Z.current.offsetWidth!==Fe||Z.current.offsetHeight!==Ue){var Xe={width:Ge,height:Ye,offsetWidth:Fe,offsetHeight:Ue};Z.current=Xe;var Je=Fe===Math.round(Oe)?Oe:Fe,Ne=Ue===Math.round(Be)?Be:Ue,nt=Object(d.a)(Object(d.a)({},Xe),{},{offsetWidth:Je,offsetHeight:Ne});re==null||re(nt,H,we),W&&Promise.resolve().then(function(){W(nt,H)})}},[]);return p.useEffect(function(){var H=Object(g.a)(me.current)||Object(g.a)(ee.current);return H&&!pe&&M(H,q),function(){return I(H,q)}},[me.current,pe]),p.createElement(B,{ref:ee},ue?p.cloneElement(ae,{ref:J}):ae)}var X="rc-observer-key";function P(Se){var ae=Se.children,pe=Object(s.a)(ae);return pe.map(function(me,ee){var re=(me==null?void 0:me.key)||"".concat(X,"-").concat(ee);return p.createElement(Y,Object(h.a)({},Se,{key:re}),me)})}P.Collection=y;var F=P,K=c("bT9E"),Q=c("TSYQ"),ce=c.n(Q),fe=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,z=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],se={},$;function j(Se){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=Se.getAttribute("id")||Se.getAttribute("data-reactid")||Se.getAttribute("name");if(ae&&se[pe])return se[pe];var me=window.getComputedStyle(Se),ee=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),re=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),Z=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),ue=z.map(function(J){return"".concat(J,":").concat(me.getPropertyValue(J))}).join(";"),V={sizingStyle:ue,paddingSize:re,borderSize:Z,boxSizing:ee};return ae&&pe&&(se[pe]=V),V}function U(Se){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;$||($=document.createElement("textarea"),$.setAttribute("tab-index","-1"),$.setAttribute("aria-hidden","true"),document.body.appendChild($)),Se.getAttribute("wrap")?$.setAttribute("wrap",Se.getAttribute("wrap")):$.removeAttribute("wrap");var ee=j(Se,ae),re=ee.paddingSize,Z=ee.borderSize,ue=ee.boxSizing,V=ee.sizingStyle;$.setAttribute("style","".concat(V,";").concat(fe)),$.value=Se.value||Se.placeholder||"";var J=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,q=$.scrollHeight,H;if(ue==="border-box"?q+=Z:ue==="content-box"&&(q-=re),pe!==null||me!==null){$.value=" ";var T=$.scrollHeight-re;pe!==null&&(J=T*pe,ue==="border-box"&&(J=J+re+Z),q=Math.max(J,q)),me!==null&&(Ce=T*me,ue==="border-box"&&(Ce=Ce+re+Z),H=q>Ce?"":"hidden",q=Math.min(Ce,q))}return{height:q,minHeight:J,maxHeight:Ce,overflowY:H,resize:"none"}}var R=c("Gytx"),C=c.n(R),D;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(D||(D={}));var le=function(Se){Object(E.a)(pe,Se);var ae=Object(b.a)(pe);function pe(me){var ee;return Object(o.a)(this,pe),ee=ae.call(this,me),ee.nextFrameActionId=void 0,ee.resizeFrameId=void 0,ee.textArea=void 0,ee.saveTextArea=function(re){ee.textArea=re},ee.handleResize=function(re){var Z=ee.state.resizeStatus,ue=ee.props,V=ue.autoSize,J=ue.onResize;if(Z!==D.NONE)return;typeof J=="function"&&J(re),V&&ee.resizeOnNextFrame()},ee.resizeOnNextFrame=function(){cancelAnimationFrame(ee.nextFrameActionId),ee.nextFrameActionId=requestAnimationFrame(ee.resizeTextarea)},ee.resizeTextarea=function(){var re=ee.props.autoSize;if(!re||!ee.textArea)return;var Z=re.minRows,ue=re.maxRows,V=U(ee.textArea,!1,Z,ue);ee.setState({textareaStyles:V,resizeStatus:D.RESIZING},function(){cancelAnimationFrame(ee.resizeFrameId),ee.resizeFrameId=requestAnimationFrame(function(){ee.setState({resizeStatus:D.RESIZED},function(){ee.resizeFrameId=requestAnimationFrame(function(){ee.setState({resizeStatus:D.NONE}),ee.fixFirefoxAutoScroll()})})})})},ee.renderTextArea=function(){var re=ee.props,Z=re.prefixCls,ue=Z===void 0?"rc-textarea":Z,V=re.autoSize,J=re.onResize,Ce=re.className,q=re.disabled,H=ee.state,T=H.textareaStyles,W=H.resizeStatus,we=Object(K.a)(ee.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ye=ce()(ue,Ce,Object(a.a)({},"".concat(ue,"-disabled"),q));"value"in we&&(we.value=we.value||"");var Oe=Object(d.a)(Object(d.a)(Object(d.a)({},ee.props.style),T),W===D.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return p.createElement(F,{onResize:ee.handleResize,disabled:!(V||J)},p.createElement("textarea",Object(h.a)({},we,{className:ye,style:Oe,ref:ee.saveTextArea})))},ee.state={textareaStyles:{},resizeStatus:D.NONE},ee}return Object(S.a)(pe,[{key:"componentDidUpdate",value:function(ee){(ee.value!==this.props.value||!C()(ee.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 ee=this.textArea.selectionStart,re=this.textArea.selectionEnd;this.textArea.setSelectionRange(ee,re)}}catch(Z){}}},{key:"render",value:function(){return this.renderTextArea()}}]),pe}(p.Component),he=le,ve=function(Se){Object(E.a)(pe,Se);var ae=Object(b.a)(pe);function pe(me){var ee;Object(o.a)(this,pe),ee=ae.call(this,me),ee.resizableTextArea=void 0,ee.focus=function(){ee.resizableTextArea.textArea.focus()},ee.saveTextArea=function(Z){ee.resizableTextArea=Z},ee.handleChange=function(Z){var ue=ee.props.onChange;ee.setValue(Z.target.value,function(){ee.resizableTextArea.resizeTextarea()}),ue&&ue(Z)},ee.handleKeyDown=function(Z){var ue=ee.props,V=ue.onPressEnter,J=ue.onKeyDown;Z.keyCode===13&&V&&V(Z),J&&J(Z)};var re=typeof me.value=="undefined"||me.value===null?me.defaultValue:me.value;return ee.state={value:re},ee}return Object(S.a)(pe,[{key:"setValue",value:function(ee,re){"value"in this.props||this.setState({value:ee},re)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return p.createElement(he,Object(h.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ee){return"value"in ee?{value:ee.value}:null}}]),pe}(p.Component),Ee=G.default=ve},ZD9Y:function(u,G,c){"use strict";var h=c("BoS7"),o=c("Sdc0"),S=c("OaEy"),E=c("2fM7"),b=c("q1tI"),p=c.n(b),d=c("lOMy"),a=c.n(d),s=E.a.Option;G.a=function(l){var i=l.onFontSizeChange,g=l.cmFontSize,m=l.cmCodeMode,v=l.onCodeModeChange,w=l.onTabToSpace,_=l.className,k=_===void 0?"":_,O=l.tabToSpace,M=l.children;return p.a.createElement("div",{className:"tpi-code-setting ".concat(k)},p.a.createElement("h3",null,"\u4EE3\u7801\u7F16\u8F91\u5668"),p.a.createElement("section",null,p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u98CE\u683C\u5207\u6362"),p.a.createElement(E.a,{bordered:!1,size:"small",value:m,onChange:v},p.a.createElement(s,{value:"vs"},"\u6D45\u8272\u98CE\u683C"),p.a.createElement(s,{value:"vs-dark"},"\u6DF1\u8272\u98CE\u683C"))),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),p.a.createElement(E.a,{bordered:!1,size:"small",value:g,onChange:i},p.a.createElement(s,{value:12},"12px"),p.a.createElement(s,{value:14},"14px"),p.a.createElement(s,{value:16},"16px"),p.a.createElement(s,{value:18},"18px"),p.a.createElement(s,{value:20},"20px"),p.a.createElement(s,{value:22},"22px"))),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"Tab\u8F6C\u6362"),p.a.createElement(o.a,{checked:O,onChange:w}))),p.a.createElement("h3",null,"\u5FEB\u6377\u952E"),p.a.createElement("section",null,p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),p.a.createElement("span",null,"Ctrl + S")),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),p.a.createElement("span",null,"F1 / Alt + F1")),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),p.a.createElement("span",null,"Ctrl + ]/[")),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),p.a.createElement("span",null,"Ctrl + Shift + \\")),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),p.a.createElement("span",null,"Home")),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),p.a.createElement("span",null,"End"))),M)}},ZW9T:function(u,G,c){"use strict";c.d(G,"a",function(){return B});var h=c("k1fw"),o=c("miYZ"),S=c("tsqr"),E=c("rAM+"),b=c("tJVT"),p=c("PpiC"),d=c("q1tI"),a=c.n(d),s=c("bdgK");function l(N,y,Y,X,P){var F=y.getWordUntilPosition(Y),K={startLineNumber:Y.lineNumber,endLineNumber:Y.lineNumber,startColumn:F.startColumn,endColumn:F.endColumn},Q=X.map(function(ce){return{label:ce,kind:N.languages.CompletionItemKind.Keyword,insertText:ce,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:K}});return P.map(function(ce){Q.push(Object(h.a)(Object(h.a)({},ce),{},{range:K}))}),Q}var i=function(N){var y={label:"ifelse",kind:N.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet},Y=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];N.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(K,Q){var ce=l(N,K,Q,Y,[y]);return{suggestions:ce}}});var X=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];N.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(K,Q){var ce=[{label:"print",kind:N.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}],fe=l(N,K,Q,X,ce);return{suggestions:fe}}});var P=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];N.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(K,Q){var ce=[y,{label:"main",kind:N.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:N.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}],fe=l(N,K,Q,P,ce);return{suggestions:fe}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",m=c("LvDl");function v(N){return/^\d+$/.test(N)?"".concat(N,"px"):N}function w(){}var _=!1,k={"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 O(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=N;if(Array.isArray(N)){for(var Y=0;Y<N.length;Y++){var X=k[N[Y]];if(X)return X}return y[0]}return k[y]||y}var M=null,I=G.b=function(N){var y=N.width,Y=y===void 0?"100%":y,X=N.height,P=X===void 0?"100%":X,F=N.value,K=N.language,Q=K===void 0?"javascript":K,ce=N.style,fe=ce===void 0?{}:ce,z=N.options,se=z===void 0?{}:z,$=N.overrideServices,j=$===void 0?{}:$,U=N.theme,R=U===void 0?"vs-dark":U,C=N.onEditBlur,D=N.onSave,le=N.autoHeight,he=le===void 0?!1:le,ve=N.forbidCopy,Ee=ve===void 0?!1:ve,Se=N.onChange,ae=Se===void 0?w:Se,pe=N.editorDidMount,me=pe===void 0?w:pe,ee=N.onFocus,re=ee===void 0?w:ee,Z=N.filename,ue=Z===void 0?"educoder.txt":Z,V=Object(p.a)(N,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),J=Object(d.useRef)(),Ce=Object(d.useRef)({}),q=Object(d.useRef)(),H=Object(d.useRef)(!1),T=Object(d.useRef)(),W=Object(d.useState)(!1),we=Object(b.a)(W,2),ye=we[0],Oe=we[1];function Be(){var ke;return J.current&&(ke=new s.default(function(Ae){var ze=Object(E.a)(Ae),je;try{for(ze.s();!(je=ze.n()).done;){var Ze=je.value;(Ze.target.offsetHeight>0||Ze.target.offsetWidth>0)&&Ce.current.instance.layout()}}catch(ht){ze.e(ht)}finally{ze.f()}}),ke.observe(J.current)),ke}function Fe(){S.b.warn(decodeURIComponent(g))}var Ue=function(){var Ae=Ce.current.instance;if(F!=null&&Ae&&ye){var ze=Ae.getModel();ze&&F!==ze.getValue()&&(_=!0,ze.setValue(F),Ae.layout(),_=!1)}};Object(d.useEffect)(function(){q.current&&clearTimeout(q.current),q.current=setTimeout(function(){Ue()},500)},[F,ye,Ce.current]);function Ge(){var ke=Ce.current.instance;if(ke){var Ae=ke.getSelection(),ze=Ce.current.pastePos||{},je=new M.Range(ze.startLineNumber||Ae.endLineNumber,ze.startColumn||Ae.endColumn,ze.endLineNumber||Ae.endLineNumber,ze.endColumn||Ae.endColumn);setTimeout(function(){ke.executeEdits("",[{range:je,text:""}])},300)}}function Ye(ke){(window.navigator.platform.match("Mac")?ke.metaKey:ke.ctrlKey)&&ke.keyCode==83&&(ke.preventDefault(),D())}var Xe=function(){if(he&&Ce.current.instance){var Ae=Ce.current.instance.getContentHeight();_e(Ae<P?P:Ae)}else _e(P)};function Je(ke){var Ae=document.createEvent("MouseEvents");Ae.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ke.dispatchEvent(Ae)}function Ne(ke,Ae){var ze=window.URL||window.webkitURL||window,je=new Blob([Ae]),Ze=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ze.href=ze.createObjectURL(je),Ze.download=ke,Je(Ze)}Object(d.useEffect)(function(){Xe()},[Xe]),Object(d.useEffect)(function(){J.current&&!ye&&c.e(27).then(c.t.bind(null,"M/lh",7)).then(function(ke){try{M=ke,Ce.current.instance=M.editor.create(J.current,{value:F,language:O(Q),theme:R,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},j);var Ae=Ce.current.instance;if(me(Ae,M),setTimeout(function(){Xe(),Ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ne(ue||"educoder.txt",Ae.getValue())}})},500),Ce.current.subscription=Ae.onDidChangeModelContent(function(je){H.current?clearTimeout(T.current):(Xe(),ae(Ae.getValue(),je)),T.current=setTimeout(function(){H.current=!1},500)}),window.Monaco||i(M),Ee&&(Ae.addCommand(M.KeyMod.CtrlCmd|M.KeyMod.Shift|M.KeyCode.KEY_V,function(){return Fe(),null}),Ae.addCommand(M.KeyMod.CtrlCmd|M.KeyCode.KEY_C,function(){return Fe(),null})),window.Monaco=M,C&&Ae.onDidBlurEditorWidget(function(){C(Ae.getValue())}),re&&Ae.onDidFocusEditorText(function(){re(Ae.getValue())}),Ee){Ae.addCommand(M.KeyMod.CtrlCmd|M.KeyCode.KEY_V,function(){return Fe(),null}),Ae.onDidPaste(function(je){Ce.current.pastePos=je});try{window.addEventListener("paste",Ge)}catch(je){}}var ze=Be();return Oe(!0),function(){var je=Ce.current.instance;je.dispose();var Ze=je.getModel();Ze&&Ze.dispose(),Ce.current.subscription&&Ce.current.subscription.dispose(),Ee&&window.removeEventListener("paste",Ge),ze.unobserve(J.current)}}catch(je){}})},[]),Object(d.useEffect)(function(){var ke=Ce.current.instance;if(ke&&ye)return document.addEventListener("keydown",Ye,!1),function(){document.removeEventListener("keydown",Ye)}},[D,ye]),Object(d.useEffect)(function(){var ke=Ce.current.instance;if(ke&&ye){var Ae=O(Q);M.editor.setModelLanguage(ke.getModel(),Ae),console.log("language:",Q,ke.getModel(),Ae)}},[Q,ye]),Object(d.useEffect)(function(){var ke=Ce.current.instance;ke&&ye&&M.editor.setTheme(R)},[R,ye]),Object(d.useEffect)(function(){var ke=Ce.current.instance;ke&&ye&&(ke.updateOptions(Object(h.a)({},se)),setTimeout(function(){ke.getModel().updateOptions(Object(h.a)({},se))},200))},[JSON.stringify(se),ye]),Object(d.useEffect)(function(){var ke=Ce.current.instance;ke&&ye&&ke.layout()},[Y,P,ye]);var nt=Object(d.useState)(v(Y)),ot=Object(b.a)(nt,2),Ve=ot[0],$e=ot[1],Ie=Object(d.useState)(v(P)),De=Object(b.a)(Ie,2),Le=De[0],_e=De[1],Te=Object(h.a)(Object(h.a)({},fe),{},{width:Ve,height:Le});return a.a.createElement("div",{className:"my-monaco-editor",ref:J,style:Te})};function B(N){var y=N.width,Y=y===void 0?"100%":y,X=N.height,P=X===void 0?"100%":X,F=N.original,K=N.modified,Q=N.language,ce=N.options,fe=ce===void 0?{}:ce,z=Object(d.useRef)(),se=Object(d.useState)(null),$=Object(b.a)(se,2),j=$[0],U=$[1];function R(he){var ve;return z.current&&(ve=new s.default(function(Ee){var Se=Object(E.a)(Ee),ae;try{for(Se.s();!(ae=Se.n()).done;){var pe=ae.value;(pe.target.offsetHeight>0||pe.target.offsetWidth>0)&&he.layout()}}catch(me){Se.e(me)}finally{Se.f()}}),ve.observe(z.current)),ve}Object(d.useEffect)(function(){z.current&&c.e(27).then(c.t.bind(null,"M/lh",7)).then(function(he){M=he;var ve=M.editor.createDiffEditor(z.current,Object(h.a)(Object(h.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},fe),{},{wordWrap:!0}));U(ve);var Ee=R(ve);return function(){ve.dispose();var Se=ve.getModel();Se&&Se.dispose(),Ee.unobserve(z.current)}})},[]),Object(d.useEffect)(function(){j&&j.setModel({original:M.editor.createModel(F,Q),modified:M.editor.createModel(K,Q)})},[F,K,Q,j]);var C=v(Y),D=v(P),le={width:C,height:D};return a.a.createElement("div",{className:"my-diff-editor",ref:z,style:le})}},ZpRC:function(u,G,c){"use strict";function h(i){return typeof i=="object"&&i!=null&&i.nodeType===1}function o(i,g){return(!g||i!=="hidden")&&i!=="visible"&&i!=="clip"}function S(i,g){if(i.clientHeight<i.scrollHeight||i.clientWidth<i.scrollWidth){var m=getComputedStyle(i,null);return o(m.overflowY,g)||o(m.overflowX,g)||function(v){var w=function(_){if(!_.ownerDocument||!_.ownerDocument.defaultView)return null;try{return _.ownerDocument.defaultView.frameElement}catch(k){return null}}(v);return!!w&&(w.clientHeight<v.scrollHeight||w.clientWidth<v.scrollWidth)}(i)}return!1}function E(i,g,m,v,w,_,k,O){return _<i&&k>g||_>i&&k<g?0:_<=i&&O<=m||k>=g&&O>=m?_-i-v:k>g&&O<m||_<i&&O>m?k-g+w:0}var b=function(i,g){var m=window,v=g.scrollMode,w=g.block,_=g.inline,k=g.boundary,O=g.skipOverflowHiddenElements,M=typeof k=="function"?k:function(T){return T!==k};if(!h(i))throw new TypeError("Invalid target");for(var I=document.scrollingElement||document.documentElement,B=[],N=i;h(N)&&M(N);){if((N=N.parentElement)===I){B.push(N);break}N!=null&&N===document.body&&S(N)&&!S(document.documentElement)||N!=null&&S(N,O)&&B.push(N)}for(var y=m.visualViewport?m.visualViewport.width:innerWidth,Y=m.visualViewport?m.visualViewport.height:innerHeight,X=window.scrollX||pageXOffset,P=window.scrollY||pageYOffset,F=i.getBoundingClientRect(),K=F.height,Q=F.width,ce=F.top,fe=F.right,z=F.bottom,se=F.left,$=w==="start"||w==="nearest"?ce:w==="end"?z:ce+K/2,j=_==="center"?se+Q/2:_==="end"?fe:se,U=[],R=0;R<B.length;R++){var C=B[R],D=C.getBoundingClientRect(),le=D.height,he=D.width,ve=D.top,Ee=D.right,Se=D.bottom,ae=D.left;if(v==="if-needed"&&ce>=0&&se>=0&&z<=Y&&fe<=y&&ce>=ve&&z<=Se&&se>=ae&&fe<=Ee)return U;var pe=getComputedStyle(C),me=parseInt(pe.borderLeftWidth,10),ee=parseInt(pe.borderTopWidth,10),re=parseInt(pe.borderRightWidth,10),Z=parseInt(pe.borderBottomWidth,10),ue=0,V=0,J="offsetWidth"in C?C.offsetWidth-C.clientWidth-me-re:0,Ce="offsetHeight"in C?C.offsetHeight-C.clientHeight-ee-Z:0;if(I===C)ue=w==="start"?$:w==="end"?$-Y:w==="nearest"?E(P,P+Y,Y,ee,Z,P+$,P+$+K,K):$-Y/2,V=_==="start"?j:_==="center"?j-y/2:_==="end"?j-y:E(X,X+y,y,me,re,X+j,X+j+Q,Q),ue=Math.max(0,ue+P),V=Math.max(0,V+X);else{ue=w==="start"?$-ve-ee:w==="end"?$-Se+Z+Ce:w==="nearest"?E(ve,Se,le,ee,Z+Ce,$,$+K,K):$-(ve+le/2)+Ce/2,V=_==="start"?j-ae-me:_==="center"?j-(ae+he/2)+J/2:_==="end"?j-Ee+re+J:E(ae,Ee,he,me,re+J,j,j+Q,Q);var q=C.scrollLeft,H=C.scrollTop;$+=H-(ue=Math.max(0,Math.min(H+ue,C.scrollHeight-le+Ce))),j+=q-(V=Math.max(0,Math.min(q+V,C.scrollWidth-he+J)))}U.push({el:C,top:ue,left:V})}return U};function p(i){return i===Object(i)&&Object.keys(i).length!==0}function d(i,g){g===void 0&&(g="auto");var m="scrollBehavior"in document.body.style;i.forEach(function(v){var w=v.el,_=v.top,k=v.left;w.scroll&&m?w.scroll({top:_,left:k,behavior:g}):(w.scrollTop=_,w.scrollLeft=k)})}function a(i){return i===!1?{block:"end",inline:"nearest"}:p(i)?i:{block:"start",inline:"nearest"}}function s(i,g){var m=!i.ownerDocument.documentElement.contains(i);if(p(g)&&typeof g.behavior=="function")return g.behavior(m?[]:b(i,g));if(m)return;var v=a(g);return d(b(i,v),v.behavior)}var l=G.a=s},Zss7:function(u,G,c){var h;(function(o){var S=/^\s+/,E=/\s+$/,b=0,p=o.round,d=o.min,a=o.max,s=o.random;function l(Z,ue){if(Z=Z||"",ue=ue||{},Z instanceof l)return Z;if(!(this instanceof l))return new l(Z,ue);var V=i(Z);this._originalInput=Z,this._r=V.r,this._g=V.g,this._b=V.b,this._a=V.a,this._roundA=p(100*this._a)/100,this._format=ue.format||V.format,this._gradientType=ue.gradientType,this._r<1&&(this._r=p(this._r)),this._g<1&&(this._g=p(this._g)),this._b<1&&(this._b=p(this._b)),this._ok=V.ok,this._tc_id=b++}l.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 Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),ue,V,J,Ce,q,H;return ue=Z.r/255,V=Z.g/255,J=Z.b/255,ue<=.03928?Ce=ue/12.92:Ce=o.pow((ue+.055)/1.055,2.4),V<=.03928?q=V/12.92:q=o.pow((V+.055)/1.055,2.4),J<=.03928?H=J/12.92:H=o.pow((J+.055)/1.055,2.4),.2126*Ce+.7152*q+.0722*H},setAlpha:function(Z){return this._a=U(Z),this._roundA=p(100*this._a)/100,this},toHsv:function(){var Z=w(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=w(this._r,this._g,this._b),ue=p(Z.h*360),V=p(Z.s*100),J=p(Z.v*100);return this._a==1?"hsv("+ue+", "+V+"%, "+J+"%)":"hsva("+ue+", "+V+"%, "+J+"%, "+this._roundA+")"},toHsl:function(){var Z=m(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=m(this._r,this._g,this._b),ue=p(Z.h*360),V=p(Z.s*100),J=p(Z.l*100);return this._a==1?"hsl("+ue+", "+V+"%, "+J+"%)":"hsla("+ue+", "+V+"%, "+J+"%, "+this._roundA+")"},toHex:function(Z){return k(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return O(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:p(this._r),g:p(this._g),b:p(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+p(this._r)+", "+p(this._g)+", "+p(this._b)+")":"rgba("+p(this._r)+", "+p(this._g)+", "+p(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:p(R(this._r,255)*100)+"%",g:p(R(this._g,255)*100)+"%",b:p(R(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+p(R(this._r,255)*100)+"%, "+p(R(this._g,255)*100)+"%, "+p(R(this._b,255)*100)+"%)":"rgba("+p(R(this._r,255)*100)+"%, "+p(R(this._g,255)*100)+"%, "+p(R(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:$[k(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var ue="#"+M(this._r,this._g,this._b,this._a),V=ue,J=this._gradientType?"GradientType = 1, ":"";if(Z){var Ce=l(Z);V="#"+M(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+J+"startColorstr="+ue+",endColorstr="+V+")"},toString:function(Z){var ue=!!Z;Z=Z||this._format;var V=!1,J=this._a<1&&this._a>=0,Ce=!ue&&J&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return Ce?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(V=this.toRgbString()),Z==="prgb"&&(V=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(V=this.toHexString()),Z==="hex3"&&(V=this.toHexString(!0)),Z==="hex4"&&(V=this.toHex8String(!0)),Z==="hex8"&&(V=this.toHex8String()),Z==="name"&&(V=this.toName()),Z==="hsl"&&(V=this.toHslString()),Z==="hsv"&&(V=this.toHsvString()),V||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(Z,ue){var V=Z.apply(null,[this].concat([].slice.call(ue)));return this._r=V._r,this._g=V._g,this._b=V._b,this.setAlpha(V._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(Y,arguments)},darken:function(){return this._applyModification(X,arguments)},desaturate:function(){return this._applyModification(I,arguments)},saturate:function(){return this._applyModification(B,arguments)},greyscale:function(){return this._applyModification(N,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(Z,ue){return Z.apply(null,[this].concat([].slice.call(ue)))},analogous:function(){return this._applyCombination(fe,arguments)},complement:function(){return this._applyCombination(F,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(ce,arguments)},triad:function(){return this._applyCombination(K,arguments)},tetrad:function(){return this._applyCombination(Q,arguments)}},l.fromRatio=function(Z,ue){if(typeof Z=="object"){var V={};for(var J in Z)Z.hasOwnProperty(J)&&(J==="a"?V[J]=Z[J]:V[J]=Ee(Z[J]));Z=V}return l(Z,ue)};function i(Z){var ue={r:0,g:0,b:0},V=1,J=null,Ce=null,q=null,H=!1,T=!1;return typeof Z=="string"&&(Z=ee(Z)),typeof Z=="object"&&(me(Z.r)&&me(Z.g)&&me(Z.b)?(ue=g(Z.r,Z.g,Z.b),H=!0,T=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):me(Z.h)&&me(Z.s)&&me(Z.v)?(J=Ee(Z.s),Ce=Ee(Z.v),ue=_(Z.h,J,Ce),H=!0,T="hsv"):me(Z.h)&&me(Z.s)&&me(Z.l)&&(J=Ee(Z.s),q=Ee(Z.l),ue=v(Z.h,J,q),H=!0,T="hsl"),Z.hasOwnProperty("a")&&(V=Z.a)),V=U(V),{ok:H,format:Z.format||T,r:d(255,a(ue.r,0)),g:d(255,a(ue.g,0)),b:d(255,a(ue.b,0)),a:V}}function g(Z,ue,V){return{r:R(Z,255)*255,g:R(ue,255)*255,b:R(V,255)*255}}function m(Z,ue,V){Z=R(Z,255),ue=R(ue,255),V=R(V,255);var J=a(Z,ue,V),Ce=d(Z,ue,V),q,H,T=(J+Ce)/2;if(J==Ce)q=H=0;else{var W=J-Ce;H=T>.5?W/(2-J-Ce):W/(J+Ce);switch(J){case Z:q=(ue-V)/W+(ue<V?6:0);break;case ue:q=(V-Z)/W+2;break;case V:q=(Z-ue)/W+4;break}q/=6}return{h:q,s:H,l:T}}function v(Z,ue,V){var J,Ce,q;Z=R(Z,360),ue=R(ue,100),V=R(V,100);function H(we,ye,Oe){return Oe<0&&(Oe+=1),Oe>1&&(Oe-=1),Oe<1/6?we+(ye-we)*6*Oe:Oe<1/2?ye:Oe<2/3?we+(ye-we)*(2/3-Oe)*6:we}if(ue===0)J=Ce=q=V;else{var T=V<.5?V*(1+ue):V+ue-V*ue,W=2*V-T;J=H(W,T,Z+1/3),Ce=H(W,T,Z),q=H(W,T,Z-1/3)}return{r:J*255,g:Ce*255,b:q*255}}function w(Z,ue,V){Z=R(Z,255),ue=R(ue,255),V=R(V,255);var J=a(Z,ue,V),Ce=d(Z,ue,V),q,H,T=J,W=J-Ce;if(H=J===0?0:W/J,J==Ce)q=0;else{switch(J){case Z:q=(ue-V)/W+(ue<V?6:0);break;case ue:q=(V-Z)/W+2;break;case V:q=(Z-ue)/W+4;break}q/=6}return{h:q,s:H,v:T}}function _(Z,ue,V){Z=R(Z,360)*6,ue=R(ue,100),V=R(V,100);var J=o.floor(Z),Ce=Z-J,q=V*(1-ue),H=V*(1-Ce*ue),T=V*(1-(1-Ce)*ue),W=J%6,we=[V,H,q,q,T,V][W],ye=[T,V,V,H,q,q][W],Oe=[q,q,T,V,V,H][W];return{r:we*255,g:ye*255,b:Oe*255}}function k(Z,ue,V,J){var Ce=[ve(p(Z).toString(16)),ve(p(ue).toString(16)),ve(p(V).toString(16))];return J&&Ce[0].charAt(0)==Ce[0].charAt(1)&&Ce[1].charAt(0)==Ce[1].charAt(1)&&Ce[2].charAt(0)==Ce[2].charAt(1)?Ce[0].charAt(0)+Ce[1].charAt(0)+Ce[2].charAt(0):Ce.join("")}function O(Z,ue,V,J,Ce){var q=[ve(p(Z).toString(16)),ve(p(ue).toString(16)),ve(p(V).toString(16)),ve(Se(J))];return Ce&&q[0].charAt(0)==q[0].charAt(1)&&q[1].charAt(0)==q[1].charAt(1)&&q[2].charAt(0)==q[2].charAt(1)&&q[3].charAt(0)==q[3].charAt(1)?q[0].charAt(0)+q[1].charAt(0)+q[2].charAt(0)+q[3].charAt(0):q.join("")}function M(Z,ue,V,J){var Ce=[ve(Se(J)),ve(p(Z).toString(16)),ve(p(ue).toString(16)),ve(p(V).toString(16))];return Ce.join("")}l.equals=function(Z,ue){return!Z||!ue?!1:l(Z).toRgbString()==l(ue).toRgbString()},l.random=function(){return l.fromRatio({r:s(),g:s(),b:s()})};function I(Z,ue){ue=ue===0?0:ue||10;var V=l(Z).toHsl();return V.s-=ue/100,V.s=C(V.s),l(V)}function B(Z,ue){ue=ue===0?0:ue||10;var V=l(Z).toHsl();return V.s+=ue/100,V.s=C(V.s),l(V)}function N(Z){return l(Z).desaturate(100)}function y(Z,ue){ue=ue===0?0:ue||10;var V=l(Z).toHsl();return V.l+=ue/100,V.l=C(V.l),l(V)}function Y(Z,ue){ue=ue===0?0:ue||10;var V=l(Z).toRgb();return V.r=a(0,d(255,V.r-p(255*-(ue/100)))),V.g=a(0,d(255,V.g-p(255*-(ue/100)))),V.b=a(0,d(255,V.b-p(255*-(ue/100)))),l(V)}function X(Z,ue){ue=ue===0?0:ue||10;var V=l(Z).toHsl();return V.l-=ue/100,V.l=C(V.l),l(V)}function P(Z,ue){var V=l(Z).toHsl(),J=(V.h+ue)%360;return V.h=J<0?360+J:J,l(V)}function F(Z){var ue=l(Z).toHsl();return ue.h=(ue.h+180)%360,l(ue)}function K(Z){var ue=l(Z).toHsl(),V=ue.h;return[l(Z),l({h:(V+120)%360,s:ue.s,l:ue.l}),l({h:(V+240)%360,s:ue.s,l:ue.l})]}function Q(Z){var ue=l(Z).toHsl(),V=ue.h;return[l(Z),l({h:(V+90)%360,s:ue.s,l:ue.l}),l({h:(V+180)%360,s:ue.s,l:ue.l}),l({h:(V+270)%360,s:ue.s,l:ue.l})]}function ce(Z){var ue=l(Z).toHsl(),V=ue.h;return[l(Z),l({h:(V+72)%360,s:ue.s,l:ue.l}),l({h:(V+216)%360,s:ue.s,l:ue.l})]}function fe(Z,ue,V){ue=ue||6,V=V||30;var J=l(Z).toHsl(),Ce=360/V,q=[l(Z)];for(J.h=(J.h-(Ce*ue>>1)+720)%360;--ue;)J.h=(J.h+Ce)%360,q.push(l(J));return q}function z(Z,ue){ue=ue||6;for(var V=l(Z).toHsv(),J=V.h,Ce=V.s,q=V.v,H=[],T=1/ue;ue--;)H.push(l({h:J,s:Ce,v:q})),q=(q+T)%1;return H}l.mix=function(Z,ue,V){V=V===0?0:V||50;var J=l(Z).toRgb(),Ce=l(ue).toRgb(),q=V/100,H={r:(Ce.r-J.r)*q+J.r,g:(Ce.g-J.g)*q+J.g,b:(Ce.b-J.b)*q+J.b,a:(Ce.a-J.a)*q+J.a};return l(H)},l.readability=function(Z,ue){var V=l(Z),J=l(ue);return(o.max(V.getLuminance(),J.getLuminance())+.05)/(o.min(V.getLuminance(),J.getLuminance())+.05)},l.isReadable=function(Z,ue,V){var J=l.readability(Z,ue),Ce,q;q=!1,Ce=re(V);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":q=J>=4.5;break;case"AAlarge":q=J>=3;break;case"AAAsmall":q=J>=7;break}return q},l.mostReadable=function(Z,ue,V){var J=null,Ce=0,q,H,T,W;V=V||{},H=V.includeFallbackColors,T=V.level,W=V.size;for(var we=0;we<ue.length;we++)q=l.readability(Z,ue[we]),q>Ce&&(Ce=q,J=l(ue[we]));return l.isReadable(Z,J,{level:T,size:W})||!H?J:(V.includeFallbackColors=!1,l.mostReadable(Z,["#fff","#000"],V))};var se=l.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"},$=l.hexNames=j(se);function j(Z){var ue={};for(var V in Z)Z.hasOwnProperty(V)&&(ue[Z[V]]=V);return ue}function U(Z){return Z=parseFloat(Z),(isNaN(Z)||Z<0||Z>1)&&(Z=1),Z}function R(Z,ue){le(Z)&&(Z="100%");var V=he(Z);return Z=d(ue,a(0,parseFloat(Z))),V&&(Z=parseInt(Z*ue,10)/100),o.abs(Z-ue)<1e-6?1:Z%ue/parseFloat(ue)}function C(Z){return d(1,a(0,Z))}function D(Z){return parseInt(Z,16)}function le(Z){return typeof Z=="string"&&Z.indexOf(".")!=-1&&parseFloat(Z)===1}function he(Z){return typeof Z=="string"&&Z.indexOf("%")!=-1}function ve(Z){return Z.length==1?"0"+Z:""+Z}function Ee(Z){return Z<=1&&(Z=Z*100+"%"),Z}function Se(Z){return o.round(parseFloat(Z)*255).toString(16)}function ae(Z){return D(Z)/255}var pe=function(){var Z="[-\\+]?\\d+%?",ue="[-\\+]?\\d*\\.\\d+%?",V="(?:"+ue+")|(?:"+Z+")",J="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",Ce="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?";return{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+J),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+J),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+J),hsva:new RegExp("hsva"+Ce),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 me(Z){return!!pe.CSS_UNIT.exec(Z)}function ee(Z){Z=Z.replace(S,"").replace(E,"").toLowerCase();var ue=!1;if(se[Z])Z=se[Z],ue=!0;else if(Z=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var V;return(V=pe.rgb.exec(Z))?{r:V[1],g:V[2],b:V[3]}:(V=pe.rgba.exec(Z))?{r:V[1],g:V[2],b:V[3],a:V[4]}:(V=pe.hsl.exec(Z))?{h:V[1],s:V[2],l:V[3]}:(V=pe.hsla.exec(Z))?{h:V[1],s:V[2],l:V[3],a:V[4]}:(V=pe.hsv.exec(Z))?{h:V[1],s:V[2],v:V[3]}:(V=pe.hsva.exec(Z))?{h:V[1],s:V[2],v:V[3],a:V[4]}:(V=pe.hex8.exec(Z))?{r:D(V[1]),g:D(V[2]),b:D(V[3]),a:ae(V[4]),format:ue?"name":"hex8"}:(V=pe.hex6.exec(Z))?{r:D(V[1]),g:D(V[2]),b:D(V[3]),format:ue?"name":"hex"}:(V=pe.hex4.exec(Z))?{r:D(V[1]+""+V[1]),g:D(V[2]+""+V[2]),b:D(V[3]+""+V[3]),a:ae(V[4]+""+V[4]),format:ue?"name":"hex8"}:(V=pe.hex3.exec(Z))?{r:D(V[1]+""+V[1]),g:D(V[2]+""+V[2]),b:D(V[3]+""+V[3]),format:ue?"name":"hex"}:!1}function re(Z){var ue,V;return Z=Z||{level:"AA",size:"small"},ue=(Z.level||"AA").toUpperCase(),V=(Z.size||"small").toLowerCase(),ue!=="AA"&&ue!=="AAA"&&(ue="AA"),V!=="small"&&V!=="large"&&(V="small"),{level:ue,size:V}}u.exports?u.exports=l:!(h=function(){return l}.call(G,c,G,u),h!==void 0&&(u.exports=h))})(Math)},aRTE:function(u,G){u.exports={L:1,M:0,Q:3,H:2}},bCnd:function(u,G,c){"use strict";c.d(G,"b",function(){return E}),c.d(G,"a",function(){return b});var h=c("je13"),o=c.n(h),S=!1;function E(p,d){var a=o.a.get("__ec");a||(a={}),a[p]=d,o.a.set("__ec",a)}function b(p,d){var a=o.a.get("__ec");return a?a[p]===void 0?d:a[p]:d}},bQjk:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return function(o){var S=h,E=S.lib,b=E.CipherParams,p=S.enc,d=p.Hex,a=S.format,s=a.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var i=d.parse(l);return b.create({ciphertext:i})}}}(),h.format.Hex})},bT9E:function(u,G,c){"use strict";c.d(G,"a",function(){return o});var h=c("VTBJ");function o(S,E){var b=Object(h.a)({},S);return Array.isArray(E)&&E.forEach(function(p){delete b[p]}),b}},c5Ni:function(u,G,c){},cDPC:function(u,G,c){"use strict";var h=c("tJVT"),o=c("q1tI"),S=c.n(o),E=c("i3hx"),b=c.n(E);G.a=function(p){var d=p.defaultX,a=d===void 0?"40%":d,s=p.leftChild,l=p.rightChild,i=p.className,g=p.hideResize,m=g===void 0?!1:g,v=Object(o.useState)(a),w=Object(h.a)(v,2),_=w[0],k=w[1],O=Object(o.useRef)();function M(){O.current=!0}Object(o.useEffect)(function(){function N(Y){O.current&&k(Y.pageX)}function y(){O.current=!1}return window.addEventListener("mousemove",N),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",y)}},[]);var I=typeof _=="number"&&_!==.01?"".concat(_,"px"):a,B="calc(100% - ".concat(m?"0px":"4px"," - ").concat(I,")");return S.a.createElement("div",{className:"split-panel-container ".concat(i)},S.a.createElement("section",{style:{width:I,display:_===.01?"none":""}},s),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:M},S.a.createElement("a",{className:"btn-resize"},S.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},S.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),S.a.createElement("section",{style:{width:B}},l))}},cv67:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(o){var S=h,E=S.lib,b=E.WordArray,p=E.Hasher,d=S.algo,a=[];(function(){for(var v=0;v<64;v++)a[v]=o.abs(o.sin(v+1))*4294967296|0})();var s=d.MD5=p.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,w){for(var _=0;_<16;_++){var k=w+_,O=v[k];v[k]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var M=this._hash.words,I=v[w+0],B=v[w+1],N=v[w+2],y=v[w+3],Y=v[w+4],X=v[w+5],P=v[w+6],F=v[w+7],K=v[w+8],Q=v[w+9],ce=v[w+10],fe=v[w+11],z=v[w+12],se=v[w+13],$=v[w+14],j=v[w+15],U=M[0],R=M[1],C=M[2],D=M[3];U=l(U,R,C,D,I,7,a[0]),D=l(D,U,R,C,B,12,a[1]),C=l(C,D,U,R,N,17,a[2]),R=l(R,C,D,U,y,22,a[3]),U=l(U,R,C,D,Y,7,a[4]),D=l(D,U,R,C,X,12,a[5]),C=l(C,D,U,R,P,17,a[6]),R=l(R,C,D,U,F,22,a[7]),U=l(U,R,C,D,K,7,a[8]),D=l(D,U,R,C,Q,12,a[9]),C=l(C,D,U,R,ce,17,a[10]),R=l(R,C,D,U,fe,22,a[11]),U=l(U,R,C,D,z,7,a[12]),D=l(D,U,R,C,se,12,a[13]),C=l(C,D,U,R,$,17,a[14]),R=l(R,C,D,U,j,22,a[15]),U=i(U,R,C,D,B,5,a[16]),D=i(D,U,R,C,P,9,a[17]),C=i(C,D,U,R,fe,14,a[18]),R=i(R,C,D,U,I,20,a[19]),U=i(U,R,C,D,X,5,a[20]),D=i(D,U,R,C,ce,9,a[21]),C=i(C,D,U,R,j,14,a[22]),R=i(R,C,D,U,Y,20,a[23]),U=i(U,R,C,D,Q,5,a[24]),D=i(D,U,R,C,$,9,a[25]),C=i(C,D,U,R,y,14,a[26]),R=i(R,C,D,U,K,20,a[27]),U=i(U,R,C,D,se,5,a[28]),D=i(D,U,R,C,N,9,a[29]),C=i(C,D,U,R,F,14,a[30]),R=i(R,C,D,U,z,20,a[31]),U=g(U,R,C,D,X,4,a[32]),D=g(D,U,R,C,K,11,a[33]),C=g(C,D,U,R,fe,16,a[34]),R=g(R,C,D,U,$,23,a[35]),U=g(U,R,C,D,B,4,a[36]),D=g(D,U,R,C,Y,11,a[37]),C=g(C,D,U,R,F,16,a[38]),R=g(R,C,D,U,ce,23,a[39]),U=g(U,R,C,D,se,4,a[40]),D=g(D,U,R,C,I,11,a[41]),C=g(C,D,U,R,y,16,a[42]),R=g(R,C,D,U,P,23,a[43]),U=g(U,R,C,D,Q,4,a[44]),D=g(D,U,R,C,z,11,a[45]),C=g(C,D,U,R,j,16,a[46]),R=g(R,C,D,U,N,23,a[47]),U=m(U,R,C,D,I,6,a[48]),D=m(D,U,R,C,F,10,a[49]),C=m(C,D,U,R,$,15,a[50]),R=m(R,C,D,U,X,21,a[51]),U=m(U,R,C,D,z,6,a[52]),D=m(D,U,R,C,y,10,a[53]),C=m(C,D,U,R,ce,15,a[54]),R=m(R,C,D,U,B,21,a[55]),U=m(U,R,C,D,K,6,a[56]),D=m(D,U,R,C,j,10,a[57]),C=m(C,D,U,R,P,15,a[58]),R=m(R,C,D,U,se,21,a[59]),U=m(U,R,C,D,Y,6,a[60]),D=m(D,U,R,C,fe,10,a[61]),C=m(C,D,U,R,N,15,a[62]),R=m(R,C,D,U,Q,21,a[63]),M[0]=M[0]+U|0,M[1]=M[1]+R|0,M[2]=M[2]+C|0,M[3]=M[3]+D|0},_doFinalize:function(){var v=this._data,w=v.words,_=this._nDataBytes*8,k=v.sigBytes*8;w[k>>>5]|=128<<24-k%32;var O=o.floor(_/4294967296),M=_;w[(k+64>>>9<<4)+15]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360,w[(k+64>>>9<<4)+14]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360,v.sigBytes=(w.length+1)*4,this._process();for(var I=this._hash,B=I.words,N=0;N<4;N++){var y=B[N];B[N]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}return I},clone:function(){var v=p.clone.call(this);return v._hash=this._hash.clone(),v}});function l(v,w,_,k,O,M,I){var B=v+(w&_|~w&k)+O+I;return(B<<M|B>>>32-M)+w}function i(v,w,_,k,O,M,I){var B=v+(w&k|_&~k)+O+I;return(B<<M|B>>>32-M)+w}function g(v,w,_,k,O,M,I){var B=v+(w^_^k)+O+I;return(B<<M|B>>>32-M)+w}function m(v,w,_,k,O,M,I){var B=v+(_^(w|~k))+O+I;return(B<<M|B>>>32-M)+w}S.MD5=p._createHelper(s),S.HmacMD5=p._createHmacHelper(s)}(Math),h.MD5})},dQei:function(u,G){for(var c={glog:function(o){if(o<1)throw new Error("glog("+o+")");return c.LOG_TABLE[o]},gexp:function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return c.EXP_TABLE[o]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;h<8;h++)c.EXP_TABLE[h]=1<<h;for(var h=8;h<256;h++)c.EXP_TABLE[h]=c.EXP_TABLE[h-4]^c.EXP_TABLE[h-5]^c.EXP_TABLE[h-6]^c.EXP_TABLE[h-8];for(var h=0;h<255;h++)c.LOG_TABLE[c.EXP_TABLE[h]]=h;u.exports=c},dWSS:function(u,G,c){var h=c("dQei");function o(S,E){if(S.length==null)throw new Error(S.length+"/"+E);for(var b=0;b<S.length&&S[b]==0;)b++;this.num=new Array(S.length-b+E);for(var p=0;p<S.length-b;p++)this.num[p]=S[p+b]}o.prototype={get:function(S){return this.num[S]},getLength:function(){return this.num.length},multiply:function(S){for(var E=new Array(this.getLength()+S.getLength()-1),b=0;b<this.getLength();b++)for(var p=0;p<S.getLength();p++)E[b+p]^=h.gexp(h.glog(this.get(b))+h.glog(S.get(p)));return new o(E,0)},mod:function(S){if(this.getLength()-S.getLength()<0)return this;for(var E=h.glog(this.get(0))-h.glog(S.get(0)),b=new Array(this.getLength()),p=0;p<this.getLength();p++)b[p]=this.get(p);for(var p=0;p<S.getLength();p++)b[p]^=h.gexp(h.glog(S.get(p))+E);return new o(b,0).mod(S)}},u.exports=o},dejd:function(u,G,c){},dmUQ:function(u,G,c){"use strict";var h=c("Ff2n"),o=c("rePB"),S=c("1OyB"),E=c("vuIU"),b=c("Ji7U"),p=c("md7G"),d=c("foSv"),a=c("q1tI"),s=c.n(a),l=c("TSYQ"),i=c.n(l),g=c("4IlW");function m(K,Q){var ce=Object.keys(K);if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(K);Q&&(fe=fe.filter(function(z){return Object.getOwnPropertyDescriptor(K,z).enumerable})),ce.push.apply(ce,fe)}return ce}function v(K){for(var Q=1;Q<arguments.length;Q++){var ce=arguments[Q]!=null?arguments[Q]:{};Q%2?m(Object(ce),!0).forEach(function(fe){Object(o.a)(K,fe,ce[fe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(ce)):m(Object(ce)).forEach(function(fe){Object.defineProperty(K,fe,Object.getOwnPropertyDescriptor(ce,fe))})}return K}function w(K){var Q=_();return function(){var fe=Object(d.a)(K),z;if(Q){var se=Object(d.a)(this).constructor;z=Reflect.construct(fe,arguments,se)}else z=fe.apply(this,arguments);return Object(p.a)(this,z)}}function _(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(K){return!1}}function k(){}function O(K){K.preventDefault()}var M=function(Q){return Q.replace(/[^\w.-]+/g,"")},I=200,B=600,N=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,y=function(Q){return Q!=null},Y=function(Q,ce){return ce===Q||typeof ce=="number"&&typeof Q=="number"&&isNaN(ce)&&isNaN(Q)},X=function(K){Object(b.a)(ce,K);var Q=w(ce);function ce(fe){var z;Object(S.a)(this,ce),z=Q.call(this,fe),z.onKeyDown=function(j){var U=z.props,R=U.onKeyDown,C=U.onPressEnter;if(j.keyCode===g.a.UP){var D=z.getRatio(j);z.up(j,D,null),z.stop()}else if(j.keyCode===g.a.DOWN){var le=z.getRatio(j);z.down(j,le,null),z.stop()}else j.keyCode===g.a.ENTER&&C&&C(j);if(z.recordCursorPosition(),z.lastKeyCode=j.keyCode,R){for(var he=arguments.length,ve=new Array(he>1?he-1:0),Ee=1;Ee<he;Ee++)ve[Ee-1]=arguments[Ee];R.apply(void 0,[j].concat(ve))}},z.onKeyUp=function(j){var U=z.props.onKeyUp;if(z.stop(),z.recordCursorPosition(),U){for(var R=arguments.length,C=new Array(R>1?R-1:0),D=1;D<R;D++)C[D-1]=arguments[D];U.apply(void 0,[j].concat(C))}},z.onChange=function(j){var U=z.props.onChange;z.state.focused&&(z.inputting=!0),z.rawInput=z.props.parser(z.getValueFromEvent(j)),z.setState({inputValue:z.rawInput}),U(z.toNumber(z.rawInput))},z.onMouseUp=function(){var j=z.props.onMouseUp;z.recordCursorPosition(),j&&j.apply(void 0,arguments)},z.onFocus=function(){var j;z.setState({focused:!0}),(j=z.props).onFocus.apply(j,arguments)},z.onBlur=function(){var j=z.props.onBlur;z.inputting=!1,z.setState({focused:!1});var U=z.getCurrentValidValue(z.state.inputValue),R=z.setValue(U,k);if(j){var C=z.input.value,D=z.getInputDisplayValue({focus:!1,value:R});z.input.value=D&&Number(D),j.apply(void 0,arguments),z.input.value=C}},z.getRatio=function(j){var U=1;return j.metaKey||j.ctrlKey?U=.1:j.shiftKey&&(U=10),U},z.getFullNum=function(j){return isNaN(j)?j:/e/i.test(String(j))?Number(j).toFixed(18).replace(/\.?0+$/,""):j},z.getPrecision=function(j){if(y(z.props.precision))return z.props.precision;var U=String(j);if(U.indexOf("e-")>=0)return parseInt(U.slice(U.indexOf("e-")+2),10);var R=0;return U.indexOf(".")>=0&&(R=U.length-U.indexOf(".")-1),R},z.getInputDisplayValue=function(j){var U=j||z.state,R=U.focused,C=U.inputValue,D=U.value,le;R?le=C:le=z.toPrecisionAsStep(D),le==null&&(le="");var he=z.formatWrapper(le);return y(z.props.decimalSeparator)&&(he=he.toString().replace(".",z.props.decimalSeparator)),he},z.recordCursorPosition=function(){try{z.cursorStart=z.input.selectionStart,z.cursorEnd=z.input.selectionEnd,z.currentValue=z.input.value,z.cursorBefore=z.input.value.substring(0,z.cursorStart),z.cursorAfter=z.input.value.substring(z.cursorEnd)}catch(j){}},z.restoreByAfter=function(j){if(j===void 0)return!1;var U=z.input.value,R=U.lastIndexOf(j);if(R===-1)return!1;var C=z.cursorBefore.length;return z.lastKeyCode===g.a.DELETE&&z.cursorBefore.charAt(C-1)===j[0]?(z.fixCaret(C,C),!0):R+j.length===U.length?(z.fixCaret(R,R),!0):!1},z.partRestoreByAfter=function(j){return j===void 0?!1:Array.prototype.some.call(j,function(U,R){var C=j.substring(R);return z.restoreByAfter(C)})},z.isNotCompleteNumber=function(j){return isNaN(j)||j===""||j===null||j&&j.toString().indexOf(".")===j.toString().length-1},z.stop=function(){z.autoStepTimer&&clearTimeout(z.autoStepTimer)},z.down=function(j,U,R){z.pressingUpOrDown=!0,z.step("down",j,U,R)},z.up=function(j,U,R){z.pressingUpOrDown=!0,z.step("up",j,U,R)},z.saveInput=function(j){z.input=j};var se=fe.value;se===void 0&&(se=fe.defaultValue),z.state={focused:fe.autoFocus};var $=z.getValidValue(z.toNumber(se));return z.state=v(v({},z.state),{},{inputValue:z.toPrecisionAsStep($),value:$}),z}return Object(E.a)(ce,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(z){var se=this.props,$=se.value,j=se.onChange,U=se.max,R=se.min,C=this.state.focused;if(z){if(!Y(z.value,$)||!Y(z.max,U)||!Y(z.min,R)){var D=C?$:this.getValidValue($),le;this.pressingUpOrDown?le=D:this.inputting?le=this.rawInput:le=this.toPrecisionAsStep(D),this.setState({value:D,inputValue:le})}var he="value"in this.props?$:this.state.value;"max"in this.props&&z.max!==U&&typeof he=="number"&&he>U&&j&&j(U),"min"in this.props&&z.min!==R&&typeof he=="number"&&he<R&&j&&j(R)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ve=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===g.a.BACKSPACE?ve=this.cursorStart-1:this.lastKeyCode===g.a.DELETE&&(ve=this.cursorStart):ve=this.input.value.length,this.fixCaret(ve,ve)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case g.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case g.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ee){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(z){var se=z;return se===""?se="":this.isNotCompleteNumber(parseFloat(se))?se=this.state.value:se=this.getValidValue(se),this.toNumber(se)}},{key:"getValueFromEvent",value:function(z){var se=z.target.value.trim().replace(/。/g,".");return y(this.props.decimalSeparator)&&(se=se.replace(this.props.decimalSeparator,".")),se}},{key:"getValidValue",value:function(z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,j=parseFloat(z);return isNaN(j)?z:(j<se&&(j=se),j>$&&(j=$),j)}},{key:"setValue",value:function(z,se){var $=this.props.precision,j=this.isNotCompleteNumber(parseFloat(z))?null:parseFloat(z),U=this.state.value,R=U===void 0?null:U,C=this.state.inputValue,D=C===void 0?null:C,le=typeof j=="number"?j.toFixed($):"".concat(j),he=j!==R||le!=="".concat(D);return"value"in this.props?(D=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:D},se)):this.setState({value:j,inputValue:this.toPrecisionAsStep(z)},se),he&&this.props.onChange(j),j}},{key:"getMaxPrecision",value:function(z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,$=this.props,j=$.precision,U=$.step;if(y(j))return j;var R=this.getPrecision(se),C=this.getPrecision(U),D=this.getPrecision(z);return z?Math.max(D,R+C):R+C}},{key:"getPrecisionFactor",value:function(z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,$=this.getMaxPrecision(z,se);return Math.pow(10,$)}},{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(z){return this.props.formatter?this.props.formatter(z):z}},{key:"toPrecisionAsStep",value:function(z){if(this.isNotCompleteNumber(z)||z==="")return z;var se=Math.abs(this.getMaxPrecision(z));return isNaN(se)?z.toString():Number(z).toFixed(se)}},{key:"toNumber",value:function(z){var se=this.props.precision,$=this.state.focused,j=z&&z.length>16&&$;return this.isNotCompleteNumber(z)||j?z:y(se)?Math.round(z*Math.pow(10,se))/Math.pow(10,se):Number(z)}},{key:"upStep",value:function(z,se){var $=this.props.step,j=this.getPrecisionFactor(z,se),U=Math.abs(this.getMaxPrecision(z,se)),R=((j*z+j*$*se)/j).toFixed(U);return this.toNumber(R)}},{key:"downStep",value:function(z,se){var $=this.props.step,j=this.getPrecisionFactor(z,se),U=Math.abs(this.getMaxPrecision(z,se)),R=((j*z-j*$*se)/j).toFixed(U);return this.toNumber(R)}},{key:"step",value:function(z,se){var $=this,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,U=arguments.length>3?arguments[3]:void 0;this.stop(),se&&(se.persist(),se.preventDefault());var R=this.props;if(R.disabled)return;var C=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(C))return;var D=this["".concat(z,"Step")](C,j),le=D>R.max||D<R.min;if(D>R.max?D=R.max:D<R.min&&(D=R.min),this.setValue(D,null),this.setState({focused:!0},function(){$.pressingUpOrDown=!1}),le)return;this.autoStepTimer=setTimeout(function(){$[z](se,j,!0)},U?I:B)}},{key:"fixCaret",value:function(z,se){if(z===void 0||se===void 0||!this.input||!this.input.value)return;try{var $=this.input.selectionStart,j=this.input.selectionEnd;(z!==$||se!==j)&&this.input.setSelectionRange(z,se)}catch(U){}}},{key:"render",value:function(){var z,se=this.props,$=se.prefixCls,j=se.disabled,U=se.readOnly,R=se.useTouch,C=se.autoComplete,D=se.upHandler,le=se.downHandler,he=se.className,ve=se.max,Ee=se.min,Se=se.style,ae=se.title,pe=se.onMouseEnter,me=se.onMouseLeave,ee=se.onMouseOver,re=se.onMouseOut,Z=se.required,ue=se.onClick,V=se.tabIndex,J=se.type,Ce=se.placeholder,q=se.id,H=se.inputMode,T=se.pattern,W=se.step,we=se.maxLength,ye=se.autoFocus,Oe=se.name,Be=se.onPaste,Fe=se.onInput,Ue=Object(h.a)(se,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Ge=this.state,Ye=Ge.value,Xe=Ge.focused,Je=i()($,(z={},Object(o.a)(z,he,!!he),Object(o.a)(z,"".concat($,"-disabled"),j),Object(o.a)(z,"".concat($,"-focused"),Xe),z)),Ne={};Object.keys(Ue).forEach(function(Ae){(Ae.substr(0,5)==="data-"||Ae.substr(0,5)==="aria-"||Ae==="role")&&(Ne[Ae]=Ue[Ae])});var nt=!U&&!j,ot=this.getInputDisplayValue(null),Ve=(Ye||Ye===0)&&(isNaN(Ye)||Number(Ye)>=ve),$e=(Ye||Ye===0)&&(isNaN(Ye)||Number(Ye)<=Ee),Ie=Ve||j||U,De=$e||j||U,Le=i()("".concat($,"-handler"),"".concat($,"-handler-up"),Object(o.a)({},"".concat($,"-handler-up-disabled"),Ie)),_e=i()("".concat($,"-handler"),"".concat($,"-handler-down"),Object(o.a)({},"".concat($,"-handler-down-disabled"),De)),Te=R?{onTouchStart:Ie?k:this.up,onTouchEnd:this.stop}:{onMouseDown:Ie?k:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ke=R?{onTouchStart:De?k:this.down,onTouchEnd:this.stop}:{onMouseDown:De?k:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return s.a.createElement("div",{className:Je,style:Se,title:ae,onMouseEnter:pe,onMouseLeave:me,onMouseOver:ee,onMouseOut:re,onFocus:function(){return null},onBlur:function(){return null}},s.a.createElement("div",{className:"".concat($,"-handler-wrap")},s.a.createElement("span",Object.assign({unselectable:"on"},Te,{role:"button","aria-label":"Increase Value","aria-disabled":Ie,className:Le}),D||s.a.createElement("span",{unselectable:"on",className:"".concat($,"-handler-up-inner"),onClick:O})),s.a.createElement("span",Object.assign({unselectable:"on"},ke,{role:"button","aria-label":"Decrease Value","aria-disabled":De,className:_e}),le||s.a.createElement("span",{unselectable:"on",className:"".concat($,"-handler-down-inner"),onClick:O}))),s.a.createElement("div",{className:"".concat($,"-input-wrap")},s.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ee,"aria-valuemax":ve,"aria-valuenow":Ye,required:Z,type:J,placeholder:Ce,onPaste:Be,onClick:ue,onMouseUp:this.onMouseUp,className:"".concat($,"-input"),tabIndex:V,autoComplete:C,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:nt?this.onKeyDown:k,onKeyUp:nt?this.onKeyUp:k,autoFocus:ye,maxLength:we,readOnly:U,disabled:j,max:ve,min:Ee,step:W,name:Oe,title:ae,id:q,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ot),pattern:T,inputMode:H,onInput:Fe},Ne))))}}]),ce}(s.a.Component);X.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:N,min:-N,step:1,style:{},onChange:k,onKeyDown:k,onPressEnter:k,onFocus:k,onBlur:k,parser:M,required:!1,autoComplete:"off"};var P=X,F=G.a=P},e7zE:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("3y9D"),c("WYAk"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.Base,b=S.WordArray,p=o.algo,d=p.SHA1,a=p.HMAC,s=p.PBKDF2=E.extend({cfg:E.extend({keySize:128/32,hasher:d,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,i){for(var g=this.cfg,m=a.create(g.hasher,l),v=b.create(),w=b.create([1]),_=v.words,k=w.words,O=g.keySize,M=g.iterations;_.length<O;){var I=m.update(i).finalize(w);m.reset();for(var B=I.words,N=B.length,y=I,Y=1;Y<M;Y++){y=m.finalize(y),m.reset();for(var X=y.words,P=0;P<N;P++)B[P]^=X[P]}v.concat(I),k[0]++}return v.sigBytes=O*4,v}});o.PBKDF2=function(l,i,g){return s.create(g).compute(l,i)}}(),h.PBKDF2})},f4xo:function(u,G,c){var h=c("nVVt");function o(S){this.mode=h.MODE_8BIT_BYTE,this.data=S}o.prototype={getLength:function(S){return this.data.length},write:function(S){for(var E=0;E<this.data.length;E++)S.put(this.data.charCodeAt(E),8)}},u.exports=o},fAei:function(u,G,c){"use strict";c.d(G,"a",function(){return I.a});var h=c("rePB"),o=c("VTBJ"),S=c("KQm4"),E=c("1OyB"),b=c("vuIU"),p=c("Ji7U"),d=c("LK+K"),a=c("q1tI"),s=c("4IlW"),l=c("Kwbf"),i=c("TSYQ"),g=c.n(i),m=c("sboe"),v=c("OZM5"),w=c("815F"),_=c("ODXe"),k=c("Ff2n"),O=c("+nKL"),M=c("8XRh"),I=c("WaYH"),B=function(Ee,Se){var ae=Ee.className,pe=Ee.style,me=Ee.motion,ee=Ee.motionNodes,re=Ee.motionType,Z=Ee.onMotionStart,ue=Ee.onMotionEnd,V=Ee.active,J=Ee.treeNodeRequiredProps,Ce=Object(k.a)(Ee,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),q=a.useState(!0),H=Object(_.a)(q,2),T=H[0],W=H[1],we=a.useContext(m.a),ye=we.prefixCls,Oe=a.useRef(!1),Be=function(){Oe.current||ue(),Oe.current=!0};return Object(a.useEffect)(function(){ee&&re==="hide"&&T&&W(!1)},[ee]),Object(a.useEffect)(function(){return ee&&Z(),function(){ee&&Be()}},[]),ee?a.createElement(M.default,Object.assign({ref:Se,visible:T},me,{motionAppear:re==="show",onAppearEnd:Be,onLeaveEnd:Be}),function(Fe,Ue){var Ge=Fe.className,Ye=Fe.style;return a.createElement("div",{ref:Ue,className:g()("".concat(ye,"-treenode-motion"),Ge),style:Ye},ee.map(function(Xe){var Je=Xe.data,Ne=Je.key,nt=Object(k.a)(Je,["key"]),ot=Xe.isStart,Ve=Xe.isEnd;delete nt.children;var $e=Object(w.f)(Ne,J);return a.createElement(I.a,Object.assign({},nt,$e,{active:V,data:Xe.data,key:Ne,isStart:ot,isEnd:Ve}))}))}):a.createElement(I.a,Object.assign({domRef:Se,className:ae,style:pe},Ce,{active:V}))};B.displayName="MotionTreeNode";var N=a.forwardRef(B),y=N;function Y(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Se=ve.length,ae=Ee.length;if(Math.abs(Se-ae)!==1)return{add:!1,key:null};function pe(me,ee){var re=new Map;me.forEach(function(ue){re.set(ue,!0)});var Z=ee.filter(function(ue){return!re.has(ue)});return Z.length===1?Z[0]:null}return Se<ae?{add:!0,key:pe(ve,Ee)}:{add:!1,key:pe(Ee,ve)}}function X(ve,Ee,Se){var ae=ve.findIndex(function(re){var Z=re.data;return Z.key===Se}),pe=ve[ae+1],me=Ee.findIndex(function(re){var Z=re.data;return Z.key===Se});if(pe){var ee=Ee.findIndex(function(re){var Z=re.data;return Z.key===pe.data.key});return Ee.slice(me+1,ee)}return Ee.slice(me+1)}var P={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},F=function(){},K="RC_TREE_MOTION_".concat(Math.random()),Q={key:K},ce={key:K,level:0,index:0,pos:"0",node:Q},fe={parent:null,children:[],pos:ce.pos,data:Q,isStart:[],isEnd:[]};function z(ve,Ee,Se,ae){return Ee===!1||!Se?ve:ve.slice(0,Math.ceil(Se/ae)+1)}function se(ve){var Ee=ve.data.key,Se=ve.pos;return Object(w.e)(Ee,Se)}function $(ve){for(var Ee=String(ve.data.key),Se=ve;Se.parent;)Se=Se.parent,Ee="".concat(Se.data.key," > ").concat(Ee);return Ee}var j=function(Ee,Se){var ae=Ee.prefixCls,pe=Ee.data,me=Ee.selectable,ee=Ee.checkable,re=Ee.expandedKeys,Z=Ee.selectedKeys,ue=Ee.checkedKeys,V=Ee.loadedKeys,J=Ee.loadingKeys,Ce=Ee.halfCheckedKeys,q=Ee.keyEntities,H=Ee.disabled,T=Ee.dragging,W=Ee.dragOverNodeKey,we=Ee.dropPosition,ye=Ee.motion,Oe=Ee.height,Be=Ee.itemHeight,Fe=Ee.virtual,Ue=Ee.focusable,Ge=Ee.activeItem,Ye=Ee.focused,Xe=Ee.tabIndex,Je=Ee.onKeyDown,Ne=Ee.onFocus,nt=Ee.onBlur,ot=Ee.onActiveChange,Ve=Ee.onListChangeStart,$e=Ee.onListChangeEnd,Ie=Object(k.a)(Ee,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),De=a.useRef(null);a.useImperativeHandle(Se,function(){return{scrollTo:function(nr){De.current.scrollTo(nr)}}});var Le=a.useState(re),_e=Object(_.a)(Le,2),Te=_e[0],ke=_e[1],Ae=a.useState(pe),ze=Object(_.a)(Ae,2),je=ze[0],Ze=ze[1],ht=a.useState(pe),Tt=Object(_.a)(ht,2),qe=Tt[0],at=Tt[1],dt=a.useState([]),st=Object(_.a)(dt,2),St=st[0],Ft=st[1],Vt=a.useState(null),Kt=Object(_.a)(Vt,2),At=Kt[0],jt=Kt[1];function ar(){Ze(pe),at(pe),Ft([]),jt(null),$e()}a.useEffect(function(){ke(re);var Jt=Y(Te,re);if(Jt.key!==null)if(Jt.add){var nr=je.findIndex(function(Xt){var fr=Xt.data.key;return fr===Jt.key}),sr=z(X(je,pe,Jt.key),Fe,Oe,Be),yr=je.slice();yr.splice(nr+1,0,fe),at(yr),Ft(sr),jt("show")}else{var Tr=pe.findIndex(function(Xt){var fr=Xt.data.key;return fr===Jt.key}),Ut=z(X(pe,je,Jt.key),Fe,Oe,Be),mt=pe.slice();mt.splice(Tr+1,0,fe),at(mt),Ft(Ut),jt("hide")}else je!==pe&&(Ze(pe),at(pe))},[re,pe]),a.useEffect(function(){T||ar()},[T]);var Ct=ye?qe:pe,hr={expandedKeys:re,selectedKeys:Z,loadedKeys:V,loadingKeys:J,checkedKeys:ue,halfCheckedKeys:Ce,dragOverNodeKey:W,dropPosition:we,keyEntities:q};return a.createElement(a.Fragment,null,Ye&&Ge&&a.createElement("span",{style:P,"aria-live":"assertive"},$(Ge)),a.createElement("div",{role:"tree"},a.createElement("input",{style:P,disabled:Ue===!1||H,tabIndex:Ue!==!1?Xe:null,onKeyDown:Je,onFocus:Ne,onBlur:nt,value:"",onChange:F})),a.createElement(O.a,Object.assign({},Ie,{data:Ct,itemKey:se,height:Oe,fullHeight:!1,virtual:Fe,itemHeight:Be,prefixCls:"".concat(ae,"-list"),ref:De}),function(Jt){var nr=Jt.pos,sr=Jt.data,yr=sr.key,Tr=Object(k.a)(sr,["key"]),Ut=Jt.isStart,mt=Jt.isEnd,Xt=Object(w.e)(yr,nr);delete Tr.children;var fr=Object(w.f)(Xt,hr);return a.createElement(y,Object.assign({},Tr,fr,{active:Ge&&yr===Ge.data.key,pos:nr,data:Jt.data,isStart:Ut,isEnd:mt,motion:ye,motionNodes:yr===K?St:null,motionType:At,onMotionStart:Ve,onMotionEnd:ar,treeNodeRequiredProps:hr,onMouseMove:function(){ot(null)}}))}))},U=a.forwardRef(j);U.displayName="NodeList";var R=U,C=c("NvD2"),D=function(ve){Object(p.a)(Se,ve);var Ee=Object(d.a)(Se);function Se(){var ae;return Object(E.a)(this,Se),ae=Ee.apply(this,arguments),ae.destroyed=!1,ae.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ae.listRef=a.createRef(),ae.onNodeDragStart=function(pe,me){var ee=ae.state,re=ee.expandedKeys,Z=ee.keyEntities,ue=ae.props.onDragStart,V=me.props.eventKey;ae.dragNode=me;var J=Object(v.b)(re,V);ae.setState({dragging:!0,dragNodesKeys:Object(v.g)(V,Z)}),ae.setExpandedKeys(J),ue&&ue({event:pe,node:Object(w.b)(me.props)})},ae.onNodeDragEnter=function(pe,me){var ee=ae.state,re=ee.expandedKeys,Z=ee.keyEntities,ue=ee.dragNodesKeys,V=ae.props.onDragEnter,J=me.props,Ce=J.pos,q=J.eventKey;if(!ae.dragNode||ue.indexOf(q)!==-1)return;var H=Object(v.c)(pe,me);if(ae.dragNode.props.eventKey===q&&H===0){ae.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ae.setState({dragOverNodeKey:q,dropPosition:H}),ae.delayedDragEnterLogic||(ae.delayedDragEnterLogic={}),Object.keys(ae.delayedDragEnterLogic).forEach(function(T){clearTimeout(ae.delayedDragEnterLogic[T])}),ae.delayedDragEnterLogic[Ce]=window.setTimeout(function(){if(!ae.state.dragging)return;var T=Object(S.a)(re),W=Z[q];W&&(W.children||[]).length&&(T=Object(v.a)(re,q)),"expandedKeys"in ae.props||ae.setExpandedKeys(T),V&&V({event:pe,node:Object(w.b)(me.props),expandedKeys:T})},400)},0)},ae.onNodeDragOver=function(pe,me){var ee=ae.state.dragNodesKeys,re=ae.props.onDragOver,Z=me.props.eventKey;if(ee.indexOf(Z)!==-1)return;if(ae.dragNode&&Z===ae.state.dragOverNodeKey){var ue=Object(v.c)(pe,me);if(ue===ae.state.dropPosition)return;ae.setState({dropPosition:ue})}re&&re({event:pe,node:Object(w.b)(me.props)})},ae.onNodeDragLeave=function(pe,me){var ee=ae.props.onDragLeave;ae.setState({dragOverNodeKey:""}),ee&&ee({event:pe,node:Object(w.b)(me.props)})},ae.onNodeDragEnd=function(pe,me){var ee=ae.props.onDragEnd;ae.setState({dragOverNodeKey:""}),ae.cleanDragState(),ee&&ee({event:pe,node:Object(w.b)(me.props)}),ae.dragNode=null},ae.onNodeDrop=function(pe,me){var ee=ae.state,re=ee.dragNodesKeys,Z=re===void 0?[]:re,ue=ee.dropPosition,V=ae.props.onDrop,J=me.props,Ce=J.eventKey,q=J.pos;if(ae.setState({dragOverNodeKey:""}),ae.cleanDragState(),Z.indexOf(Ce)!==-1){Object(l.a)(!1,"Can not drop to dragNode(include it's children node)");return}var H=Object(v.k)(q),T={event:pe,node:Object(w.b)(me.props),dragNode:ae.dragNode?Object(w.b)(ae.dragNode.props):null,dragNodesKeys:Z.slice(),dropPosition:ue+Number(H[H.length-1]),dropToGap:!1};ue!==0&&(T.dropToGap=!0),V&&V(T),ae.dragNode=null},ae.cleanDragState=function(){var pe=ae.state.dragging;pe&&ae.setState({dragging:!1})},ae.onNodeClick=function(pe,me){var ee=ae.props.onClick;ee&&ee(pe,me)},ae.onNodeDoubleClick=function(pe,me){var ee=ae.props.onDoubleClick;ee&&ee(pe,me)},ae.onNodeSelect=function(pe,me){var ee=ae.state.selectedKeys,re=ae.state.keyEntities,Z=ae.props,ue=Z.onSelect,V=Z.multiple,J=me.selected,Ce=me.key,q=!J;q?V?ee=Object(v.a)(ee,Ce):ee=[Ce]:ee=Object(v.b)(ee,Ce);var H=ee.map(function(T){var W=re[T];return W?W.node:null}).filter(function(T){return T});ae.setUncontrolledState({selectedKeys:ee}),ue&&ue(ee,{event:"select",selected:q,node:me,selectedNodes:H,nativeEvent:pe.nativeEvent})},ae.onNodeCheck=function(pe,me,ee){var re=ae.state,Z=re.keyEntities,ue=re.checkedKeys,V=re.halfCheckedKeys,J=ae.props,Ce=J.checkStrictly,q=J.onCheck,H=me.key,T,W={event:"check",node:me,checked:ee,nativeEvent:pe.nativeEvent};if(Ce){var we=ee?Object(v.a)(ue,H):Object(v.b)(ue,H),ye=Object(v.b)(V,H);T={checked:we,halfChecked:ye},W.checkedNodes=we.map(function(Ye){return Z[Ye]}).filter(function(Ye){return Ye}).map(function(Ye){return Ye.node}),ae.setUncontrolledState({checkedKeys:we})}else{var Oe=Object(C.a)([].concat(Object(S.a)(ue),[H]),!0,Z),Be=Oe.checkedKeys,Fe=Oe.halfCheckedKeys;if(!ee){var Ue=new Set(Be);Ue.delete(H);var Ge=Object(C.a)(Array.from(Ue),{checked:!1,halfCheckedKeys:Fe},Z);Be=Ge.checkedKeys,Fe=Ge.halfCheckedKeys}T=Be,W.checkedNodes=[],W.checkedNodesPositions=[],W.halfCheckedKeys=Fe,Be.forEach(function(Ye){var Xe=Z[Ye];if(!Xe)return;var Je=Xe.node,Ne=Xe.pos;W.checkedNodes.push(Je),W.checkedNodesPositions.push({node:Je,pos:Ne})}),ae.setUncontrolledState({checkedKeys:Be},!1,{halfCheckedKeys:Fe})}q&&q(T,W)},ae.onNodeLoad=function(pe){return new Promise(function(me){ae.setState(function(ee){var re=ee.loadedKeys,Z=re===void 0?[]:re,ue=ee.loadingKeys,V=ue===void 0?[]:ue,J=ae.props,Ce=J.loadData,q=J.onLoad,H=pe.key;if(!Ce||Z.indexOf(H)!==-1||V.indexOf(H)!==-1)return{};var T=Ce(pe);return T.then(function(){var W=ae.state,we=W.loadedKeys,ye=W.loadingKeys,Oe=Object(v.a)(we,H),Be=Object(v.b)(ye,H);q&&q(Oe,{event:"load",node:pe}),ae.setUncontrolledState({loadedKeys:Oe}),ae.setState({loadingKeys:Be}),me()}),{loadingKeys:Object(v.a)(V,H)}})})},ae.onNodeMouseEnter=function(pe,me){var ee=ae.props.onMouseEnter;ee&&ee({event:pe,node:me})},ae.onNodeMouseLeave=function(pe,me){var ee=ae.props.onMouseLeave;ee&&ee({event:pe,node:me})},ae.onNodeContextMenu=function(pe,me){var ee=ae.props.onRightClick;ee&&(pe.preventDefault(),ee({event:pe,node:me}))},ae.onFocus=function(){var pe=ae.props.onFocus;ae.setState({focused:!0}),pe&&pe.apply(void 0,arguments)},ae.onBlur=function(){var pe=ae.props.onBlur;ae.setState({focused:!1}),ae.onActiveChange(null),pe&&pe.apply(void 0,arguments)},ae.getTreeNodeRequiredProps=function(){var pe=ae.state,me=pe.expandedKeys,ee=pe.selectedKeys,re=pe.loadedKeys,Z=pe.loadingKeys,ue=pe.checkedKeys,V=pe.halfCheckedKeys,J=pe.dragOverNodeKey,Ce=pe.dropPosition,q=pe.keyEntities;return{expandedKeys:me||[],selectedKeys:ee||[],loadedKeys:re||[],loadingKeys:Z||[],checkedKeys:ue||[],halfCheckedKeys:V||[],dragOverNodeKey:J,dropPosition:Ce,keyEntities:q}},ae.setExpandedKeys=function(pe){var me=ae.state.treeData,ee=Object(w.d)(me,pe);ae.setUncontrolledState({expandedKeys:pe,flattenNodes:ee},!0)},ae.onNodeExpand=function(pe,me){var ee=ae.state.expandedKeys,re=ae.state.listChanging,Z=ae.props,ue=Z.onExpand,V=Z.loadData,J=me.key,Ce=me.expanded;if(re)return;var q=ee.indexOf(J),H=!Ce;if(Object(l.a)(Ce&&q!==-1||!Ce&&q===-1,"Expand state not sync with index check"),H?ee=Object(v.a)(ee,J):ee=Object(v.b)(ee,J),ae.setExpandedKeys(ee),ue&&ue(ee,{node:me,expanded:H,nativeEvent:pe.nativeEvent}),H&&V){var T=ae.onNodeLoad(me);T&&T.then(function(){var W=Object(w.d)(ae.state.treeData,ee);ae.setUncontrolledState({flattenNodes:W})})}},ae.onListChangeStart=function(){ae.setUncontrolledState({listChanging:!0})},ae.onListChangeEnd=function(){setTimeout(function(){ae.setUncontrolledState({listChanging:!1})})},ae.onActiveChange=function(pe){var me=ae.state.activeKey,ee=ae.props.onActiveChange;if(me===pe)return;ae.setState({activeKey:pe}),pe!==null&&ae.scrollTo({key:pe}),ee&&ee(pe)},ae.getActiveItem=function(){var pe=ae.state,me=pe.activeKey,ee=pe.flattenNodes;return me===null?null:ee.find(function(re){var Z=re.data.key;return Z===me})||null},ae.offsetActiveKey=function(pe){var me=ae.state,ee=me.flattenNodes,re=me.activeKey,Z=ee.findIndex(function(J){var Ce=J.data.key;return Ce===re});Z===-1&&pe<0&&(Z=ee.length),Z=(Z+pe+ee.length)%ee.length;var ue=ee[Z];if(ue){var V=ue.data.key;ae.onActiveChange(V)}else ae.onActiveChange(null)},ae.onKeyDown=function(pe){var me=ae.state,ee=me.activeKey,re=me.expandedKeys,Z=me.checkedKeys,ue=ae.props,V=ue.onKeyDown,J=ue.checkable,Ce=ue.selectable;switch(pe.which){case s.a.UP:{ae.offsetActiveKey(-1),pe.preventDefault();break}case s.a.DOWN:{ae.offsetActiveKey(1),pe.preventDefault();break}}var q=ae.getActiveItem();if(q&&q.data){var H=ae.getTreeNodeRequiredProps(),T=q.data.isLeaf===!1||!!(q.data.children||[]).length,W=Object(w.b)(Object(o.a)(Object(o.a)({},Object(w.f)(ee,H)),{},{data:q.data,active:!0}));switch(pe.which){case s.a.LEFT:{T&&re.includes(ee)?ae.onNodeExpand({},W):q.parent&&ae.onActiveChange(q.parent.data.key),pe.preventDefault();break}case s.a.RIGHT:{T&&!re.includes(ee)?ae.onNodeExpand({},W):q.children&&q.children.length&&ae.onActiveChange(q.children[0].data.key),pe.preventDefault();break}case s.a.ENTER:case s.a.SPACE:{J&&!W.disabled&&W.checkable!==!1&&!W.disableCheckbox?ae.onNodeCheck({},W,!Z.includes(ee)):!J&&Ce&&!W.disabled&&W.selectable!==!1&&ae.onNodeSelect({},W);break}}}V&&V(pe)},ae.setUncontrolledState=function(pe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ae.destroyed)return;var re=!1,Z=!0,ue={};Object.keys(pe).forEach(function(V){if(V in ae.props){Z=!1;return}re=!0,ue[V]=pe[V]}),re&&(!me||Z)&&ae.setState(Object(o.a)(Object(o.a)({},ue),ee))},ae.scrollTo=function(pe){ae.listRef.current.scrollTo(pe)},ae}return Object(b.a)(Se,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var pe,me=this.state,ee=me.focused,re=me.flattenNodes,Z=me.keyEntities,ue=me.dragging,V=me.activeKey,J=this.props,Ce=J.prefixCls,q=J.className,H=J.style,T=J.showLine,W=J.focusable,we=J.tabIndex,ye=we===void 0?0:we,Oe=J.selectable,Be=J.showIcon,Fe=J.icon,Ue=J.switcherIcon,Ge=J.draggable,Ye=J.checkable,Xe=J.checkStrictly,Je=J.disabled,Ne=J.motion,nt=J.loadData,ot=J.filterTreeNode,Ve=J.height,$e=J.itemHeight,Ie=J.virtual,De=J.titleRender,Le=J.onContextMenu,_e=Object(v.f)(this.props);return a.createElement(m.a.Provider,{value:{prefixCls:Ce,selectable:Oe,showIcon:Be,icon:Fe,switcherIcon:Ue,draggable:Ge,checkable:Ye,checkStrictly:Xe,disabled:Je,keyEntities:Z,loadData:nt,filterTreeNode:ot,titleRender:De,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},a.createElement("div",{className:g()(Ce,q,(pe={},Object(h.a)(pe,"".concat(Ce,"-show-line"),T),Object(h.a)(pe,"".concat(Ce,"-focused"),ee),Object(h.a)(pe,"".concat(Ce,"-active-focused"),V!==null),pe))},a.createElement(R,Object.assign({ref:this.listRef,prefixCls:Ce,style:H,data:re,disabled:Je,selectable:Oe,checkable:!!Ye,motion:Ne,dragging:ue,height:Ve,itemHeight:$e,virtual:Ie,focusable:W,focused:ee,tabIndex:ye,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Le},this.getTreeNodeRequiredProps(),_e))))}}],[{key:"getDerivedStateFromProps",value:function(pe,me){var ee=me.prevProps,re={prevProps:pe};function Z(Fe){return!ee&&Fe in pe||ee&&ee[Fe]!==pe[Fe]}var ue;if(Z("treeData")?ue=pe.treeData:Z("children")&&(Object(l.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),ue=Object(w.c)(pe.children)),ue){re.treeData=ue;var V=Object(w.a)(ue);re.keyEntities=Object(o.a)(Object(h.a)({},K,ce),V.keyEntities)}var J=re.keyEntities||me.keyEntities;if(Z("expandedKeys")||ee&&Z("autoExpandParent"))re.expandedKeys=pe.autoExpandParent||!ee&&pe.defaultExpandParent?Object(v.e)(pe.expandedKeys,J):pe.expandedKeys;else if(!ee&&pe.defaultExpandAll){var Ce=Object(o.a)({},J);delete Ce[K],re.expandedKeys=Object.keys(Ce).map(function(Fe){return Ce[Fe].key})}else!ee&&pe.defaultExpandedKeys&&(re.expandedKeys=pe.autoExpandParent||pe.defaultExpandParent?Object(v.e)(pe.defaultExpandedKeys,J):pe.defaultExpandedKeys);if(re.expandedKeys||delete re.expandedKeys,ue||re.expandedKeys){var q=Object(w.d)(ue||me.treeData,re.expandedKeys||me.expandedKeys);re.flattenNodes=q}if(pe.selectable&&(Z("selectedKeys")?re.selectedKeys=Object(v.d)(pe.selectedKeys,pe):!ee&&pe.defaultSelectedKeys&&(re.selectedKeys=Object(v.d)(pe.defaultSelectedKeys,pe))),pe.checkable){var H;if(Z("checkedKeys")?H=Object(v.j)(pe.checkedKeys)||{}:!ee&&pe.defaultCheckedKeys?H=Object(v.j)(pe.defaultCheckedKeys)||{}:ue&&(H=Object(v.j)(pe.checkedKeys)||{checkedKeys:me.checkedKeys,halfCheckedKeys:me.halfCheckedKeys}),H){var T=H,W=T.checkedKeys,we=W===void 0?[]:W,ye=T.halfCheckedKeys,Oe=ye===void 0?[]:ye;if(!pe.checkStrictly){var Be=Object(C.a)(we,!0,J);we=Be.checkedKeys,Oe=Be.halfCheckedKeys}re.checkedKeys=we,re.halfCheckedKeys=Oe}}return Z("loadedKeys")&&(re.loadedKeys=pe.loadedKeys),re}}]),Se}(a.Component);D.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},D.TreeNode=I.a;var le=D,he=G.b=le},fcSX:function(u,G,c){"use strict";var h=c("Ff2n"),o=c("1OyB"),S=c("vuIU"),E=c("Ji7U"),b=c("md7G"),p=c("foSv"),d=c("1W/9"),a=c("q1tI"),s=c("rePB"),l=c("JX7q"),i=c("TSYQ"),g=c.n(i),m=c("qx4F"),v=c("4IlW");function w(j){return Array.isArray(j)?j:[j]}var _={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},k=Object.keys(_).filter(function(j){if(typeof document=="undefined")return!1;var U=document.getElementsByTagName("html")[0];return j in(U?U.style:{})})[0],O=_[k];function M(j,U,R,C){j.addEventListener?j.addEventListener(U,R,C):j.attachEvent&&j.attachEvent("on".concat(U),R)}function I(j,U,R,C){j.removeEventListener?j.removeEventListener(U,R,C):j.attachEvent&&j.detachEvent("on".concat(U),R)}function B(j,U){var R=typeof j=="function"?j(U):j;return Array.isArray(R)?R.length===2?R:[R[0],R[1]]:[R]}var N=function(U){return!isNaN(parseFloat(U))&&isFinite(U)},y=!(typeof window!="undefined"&&window.document&&window.document.createElement),Y=function j(U,R,C,D){if(!R||R===document||R instanceof Document)return!1;if(R===U.parentNode)return!0;var le=Math.max(Math.abs(C),Math.abs(D))===Math.abs(D),he=Math.max(Math.abs(C),Math.abs(D))===Math.abs(C),ve=R.scrollHeight-R.clientHeight,Ee=R.scrollWidth-R.clientWidth,Se=document.defaultView.getComputedStyle(R),ae=Se.overflowY==="auto"||Se.overflowY==="scroll",pe=Se.overflowX==="auto"||Se.overflowX==="scroll",me=ve&&ae,ee=Ee&&pe;return le&&(!me||me&&(R.scrollTop>=ve&&D<0||R.scrollTop<=0&&D>0))||he&&(!ee||ee&&(R.scrollLeft>=Ee&&C<0||R.scrollLeft<=0&&C>0))?j(U,R.parentNode,C,D):!1};function X(j){var U=P();return function(){var C=Object(p.a)(j),D;if(U){var le=Object(p.a)(this).constructor;D=Reflect.construct(C,arguments,le)}else D=C.apply(this,arguments);return Object(b.a)(this,D)}}function P(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(j){return!1}}var F={},K=function(j){Object(E.a)(R,j);var U=X(R);function R(C){var D;return Object(o.a)(this,R),D=U.call(this,C),D.domFocus=function(){D.dom&&D.dom.focus()},D.removeStartHandler=function(le){if(le.touches.length>1)return;D.startPos={x:le.touches[0].clientX,y:le.touches[0].clientY}},D.removeMoveHandler=function(le){if(le.changedTouches.length>1)return;var he=le.currentTarget,ve=le.changedTouches[0].clientX-D.startPos.x,Ee=le.changedTouches[0].clientY-D.startPos.y;(he===D.maskDom||he===D.handlerDom||he===D.contentDom&&Y(he,le.target,ve,Ee))&&le.cancelable&&le.preventDefault()},D.transitionEnd=function(le){var he=le.target;I(he,O,D.transitionEnd),he.style.transition=""},D.onKeyDown=function(le){if(le.keyCode===v.a.ESC){var he=D.props.onClose;le.stopPropagation(),he&&he(le)}},D.onWrapperTransitionEnd=function(le){var he=D.props,ve=he.open,Ee=he.afterVisibleChange;le.target===D.contentWrapper&&le.propertyName.match(/transform$/)&&(D.dom.style.transition="",!ve&&D.getCurrentDrawerSome()&&(document.body.style.overflowX="",D.maskDom&&(D.maskDom.style.left="",D.maskDom.style.width="")),Ee&&Ee(!!ve))},D.openLevelTransition=function(){var le=D.props,he=le.open,ve=le.width,Ee=le.height,Se=D.getHorizontalBoolAndPlacementName(),ae=Se.isHorizontal,pe=Se.placementName,me=D.contentDom?D.contentDom.getBoundingClientRect()[ae?"width":"height"]:0,ee=(ae?ve:Ee)||me;D.setLevelAndScrolling(he,pe,ee)},D.setLevelTransform=function(le,he,ve,Ee){var Se=D.props,ae=Se.placement,pe=Se.levelMove,me=Se.duration,ee=Se.ease,re=Se.showMask;D.levelDom.forEach(function(Z){Z.style.transition="transform ".concat(me," ").concat(ee),M(Z,O,D.transitionEnd);var ue=le?ve:0;if(pe){var V=B(pe,{target:Z,open:le});ue=le?V[0]:V[1]||0}var J=typeof ue=="number"?"".concat(ue,"px"):ue,Ce=ae==="left"||ae==="top"?J:"-".concat(J);Ce=re&&ae==="right"&&Ee?"calc(".concat(Ce," + ").concat(Ee,"px)"):Ce,Z.style.transform=ue?"".concat(he,"(").concat(Ce,")"):""})},D.setLevelAndScrolling=function(le,he,ve){var Ee=D.props.onChange;if(!y){var Se=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(m.a)(!0):0;D.setLevelTransform(le,he,ve,Se),D.toggleScrollingToDrawerAndBody(Se)}Ee&&Ee(le)},D.toggleScrollingToDrawerAndBody=function(le){var he=D.props,ve=he.getOpenCount,Ee=he.getContainer,Se=he.showMask,ae=he.open,pe=Ee&&Ee(),me=ve&&ve();if(pe&&pe.parentNode===document.body&&Se){var ee=["touchstart"],re=[document.body,D.maskDom,D.handlerDom,D.contentDom];ae&&document.body.style.overflow!=="hidden"?(le&&D.addScrollingEffect(le),me===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",re.forEach(function(Z,ue){if(!Z)return;M(Z,ee[ue]||"touchmove",ue?D.removeMoveHandler:D.removeStartHandler,D.passive)})):D.getCurrentDrawerSome()&&(me||(document.body.style.overflow=""),document.body.style.touchAction="",le&&D.remScrollingEffect(le),re.forEach(function(Z,ue){if(!Z)return;I(Z,ee[ue]||"touchmove",ue?D.removeMoveHandler:D.removeStartHandler,D.passive)}))}},D.addScrollingEffect=function(le){var he=D.props,ve=he.placement,Ee=he.duration,Se=he.ease,ae=he.getOpenCount,pe=he.switchScrollingEffect,me=ae&&ae();me===1&&pe();var ee="width ".concat(Ee," ").concat(Se),re="transform ".concat(Ee," ").concat(Se);D.dom.style.transition="none";switch(ve){case"right":D.dom.style.transform="translateX(-".concat(le,"px)");break;case"top":case"bottom":D.dom.style.width="calc(100% - ".concat(le,"px)"),D.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(D.timeout),D.timeout=setTimeout(function(){D.dom&&(D.dom.style.transition="".concat(re,",").concat(ee),D.dom.style.width="",D.dom.style.transform="")})},D.remScrollingEffect=function(le){var he=D.props,ve=he.placement,Ee=he.duration,Se=he.ease,ae=he.getOpenCount,pe=he.switchScrollingEffect,me=ae&&ae();me||pe(!0),k&&(document.body.style.overflowX="hidden"),D.dom.style.transition="none";var ee,re="width ".concat(Ee," ").concat(Se),Z="transform ".concat(Ee," ").concat(Se);switch(ve){case"left":{D.dom.style.width="100%",re="width 0s ".concat(Se," ").concat(Ee);break}case"right":{D.dom.style.transform="translateX(".concat(le,"px)"),D.dom.style.width="100%",re="width 0s ".concat(Se," ").concat(Ee),D.maskDom&&(D.maskDom.style.left="-".concat(le,"px"),D.maskDom.style.width="calc(100% + ".concat(le,"px)"));break}case"top":case"bottom":{D.dom.style.width="calc(100% + ".concat(le,"px)"),D.dom.style.height="100%",D.dom.style.transform="translateZ(0)",ee="height 0s ".concat(Se," ").concat(Ee);break}default:break}clearTimeout(D.timeout),D.timeout=setTimeout(function(){D.dom&&(D.dom.style.transition="".concat(Z,",").concat(ee?"".concat(ee,","):"").concat(re),D.dom.style.transform="",D.dom.style.width="",D.dom.style.height="")})},D.getCurrentDrawerSome=function(){return!Object.keys(F).some(function(le){return F[le]})},D.getLevelDom=function(le){var he=le.level,ve=le.getContainer;if(y)return;var Ee=ve&&ve(),Se=Ee?Ee.parentNode:null;if(D.levelDom=[],he==="all"){var ae=Se?Array.prototype.slice.call(Se.children):[];ae.forEach(function(pe){pe.nodeName!=="SCRIPT"&&pe.nodeName!=="STYLE"&&pe.nodeName!=="LINK"&&pe!==Ee&&D.levelDom.push(pe)})}else he&&w(he).forEach(function(pe){document.querySelectorAll(pe).forEach(function(me){D.levelDom.push(me)})})},D.getHorizontalBoolAndPlacementName=function(){var le=D.props.placement,he=le==="left"||le==="right",ve="translate".concat(he?"X":"Y");return{isHorizontal:he,placementName:ve}},D.state={_self:Object(l.a)(D)},D}return Object(S.a)(R,[{key:"componentDidMount",value:function(){var D=this;if(!y){var le=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return le=!0,null}}))}catch(ae){}this.passive=le?{passive:!1}:!1}var he=this.props,ve=he.open,Ee=he.getContainer,Se=Ee&&Ee();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ve&&(Se&&Se.parentNode===document.body&&(F[this.drawerId]=ve),this.openLevelTransition(),this.forceUpdate(function(){D.domFocus()}))}},{key:"componentDidUpdate",value:function(D){var le=this.props,he=le.open,ve=le.getContainer,Ee=ve&&ve();he!==D.open&&(he&&this.domFocus(),Ee&&Ee.parentNode===document.body&&(F[this.drawerId]=!!he),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var D=this.props,le=D.getOpenCount,he=D.open,ve=D.switchScrollingEffect,Ee=typeof le=="function"&&le();delete F[this.drawerId],he&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Ee||(document.body.style.overflow="",ve(!0))}},{key:"render",value:function(){var D,le=this,he=this.props,ve=he.className,Ee=he.children,Se=he.style,ae=he.width,pe=he.height,me=he.defaultOpen,ee=he.open,re=he.prefixCls,Z=he.placement,ue=he.level,V=he.levelMove,J=he.ease,Ce=he.duration,q=he.getContainer,H=he.handler,T=he.onChange,W=he.afterVisibleChange,we=he.showMask,ye=he.maskClosable,Oe=he.maskStyle,Be=he.onClose,Fe=he.onHandleClick,Ue=he.keyboard,Ge=he.getOpenCount,Ye=he.switchScrollingEffect,Xe=Object(h.a)(he,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Je=this.dom?ee:!1,Ne=g()(re,(D={},Object(s.a)(D,"".concat(re,"-").concat(Z),!0),Object(s.a)(D,"".concat(re,"-open"),Je),Object(s.a)(D,ve||"",!!ve),Object(s.a)(D,"no-mask",!we),D)),nt=this.getHorizontalBoolAndPlacementName(),ot=nt.placementName,Ve=Z==="left"||Z==="top"?"-100%":"100%",$e=Je?"":"".concat(ot,"(").concat(Ve,")"),Ie=H&&a.cloneElement(H,{onClick:function(Le){H.props.onClick&&H.props.onClick(),Fe&&Fe(Le)},ref:function(Le){le.handlerDom=Le}});return a.createElement("div",Object.assign({},Xe,{tabIndex:-1,className:Ne,style:Se,ref:function(Le){le.dom=Le},onKeyDown:Je&&Ue?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),we&&a.createElement("div",{className:"".concat(re,"-mask"),onClick:ye?Be:void 0,style:Oe,ref:function(Le){le.maskDom=Le}}),a.createElement("div",{className:"".concat(re,"-content-wrapper"),style:{transform:$e,msTransform:$e,width:N(ae)?"".concat(ae,"px"):ae,height:N(pe)?"".concat(pe,"px"):pe},ref:function(Le){le.contentWrapper=Le}},a.createElement("div",{className:"".concat(re,"-content"),ref:function(Le){le.contentDom=Le},onTouchStart:Je&&we?this.removeStartHandler:void 0,onTouchMove:Je&&we?this.removeMoveHandler:void 0},Ee),Ie))}}],[{key:"getDerivedStateFromProps",value:function(D,le){var he=le.prevProps,ve=le._self,Ee={prevProps:D};if(he!==void 0){var Se=D.placement,ae=D.level;Se!==he.placement&&(ve.contentDom=null),ae!==he.level&&ve.getLevelDom(D)}return Ee}}]),R}(a.Component);K.defaultProps={switchScrollingEffect:function(){}};var Q=K;function ce(j){var U=fe();return function(){var C=Object(p.a)(j),D;if(U){var le=Object(p.a)(this).constructor;D=Reflect.construct(C,arguments,le)}else D=C.apply(this,arguments);return Object(b.a)(this,D)}}function fe(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(j){return!1}}var z=function(j){Object(E.a)(R,j);var U=ce(R);function R(C){var D;Object(o.a)(this,R),D=U.call(this,C),D.onHandleClick=function(he){var ve=D.props,Ee=ve.onHandleClick,Se=ve.open;if(Ee&&Ee(he),typeof Se=="undefined"){var ae=D.state.open;D.setState({open:!ae})}},D.onClose=function(he){var ve=D.props,Ee=ve.onClose,Se=ve.open;Ee&&Ee(he),typeof Se=="undefined"&&D.setState({open:!1})};var le=typeof C.open!="undefined"?C.open:!!C.defaultOpen;return D.state={open:le},"onMaskClick"in C&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),D}return Object(S.a)(R,[{key:"render",value:function(){var D=this,le=this.props,he=le.defaultOpen,ve=le.getContainer,Ee=le.wrapperClassName,Se=le.forceRender,ae=le.handler,pe=Object(h.a)(le,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),me=this.state.open;if(!ve)return a.createElement("div",{className:Ee,ref:function(Z){D.dom=Z}},a.createElement(Q,Object.assign({},pe,{open:me,handler:ae,getContainer:function(){return D.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ee=!!ae||Se;return a.createElement(d.a,{visible:me,forceRender:ee,getContainer:ve,wrapperClassName:Ee},function(re){var Z=re.visible,ue=re.afterClose,V=Object(h.a)(re,["visible","afterClose"]);return a.createElement(Q,Object.assign({},pe,V,{open:Z!==void 0?Z:me,afterVisibleChange:ue!==void 0?ue:pe.afterVisibleChange,handler:ae,onClose:D.onClose,onHandleClick:D.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(D,le){var he=le.prevProps,ve={prevProps:D};return typeof he!="undefined"&&D.open!==he.open&&(ve.open=D.open),ve}}]),R}(a.Component);z.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:a.createElement("div",{className:"drawer-handle"},a.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var se=z,$=G.a=se},fcyK:function(u,G,c){},gRFJ:function(u,G,c){u.exports=[c("rdUC"),c("ynwM"),c("RELg"),c("DlR+"),c("CrYA"),c("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(u){return u<10?"0"+u:u}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(u){return rx_escapable.lastIndex=0,rx_escapable.test(u)?'"'+u.replace(rx_escapable,function(G){var c=meta[G];return typeof c=="string"?c:"\\u"+("0000"+G.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+u+'"'}function str(u,G){var c,h,o,S,E=gap,b,p=G[u];p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(u)),typeof rep=="function"&&(p=rep.call(G,u,p));switch(typeof p){case"string":return quote(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(gap+=indent,b=[],Object.prototype.toString.apply(p)==="[object Array]"){for(S=p.length,c=0;c<S;c+=1)b[c]=str(c,p)||"null";return o=b.length===0?"[]":gap?`[
`+gap+b.join(`,
`+gap)+`
`+E+"]":"["+b.join(",")+"]",gap=E,o}if(rep&&typeof rep=="object")for(S=rep.length,c=0;c<S;c+=1)typeof rep[c]=="string"&&(h=rep[c],o=str(h,p),o&&b.push(quote(h)+(gap?": ":":")+o));else for(h in p)Object.prototype.hasOwnProperty.call(p,h)&&(o=str(h,p),o&&b.push(quote(h)+(gap?": ":":")+o));return o=b.length===0?"{}":gap?`{
`+gap+b.join(`,
`+gap)+`
`+E+"}":"{"+b.join(",")+"}",gap=E,o}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(u,G,c){var h;if(gap="",indent="",typeof c=="number")for(h=0;h<c;h+=1)indent+=" ";else typeof c=="string"&&(indent=c);if(rep=G,G&&typeof G!="function"&&(typeof G!="object"||typeof G.length!="number"))throw new Error("JSON.stringify");return str("",{"":u})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(u,G){var c,h,o=u[G];if(o&&typeof o=="object")for(c in o)Object.prototype.hasOwnProperty.call(o,c)&&(h=walk(o,c),h!==void 0?o[c]=h:delete o[c]);return reviver.call(u,G,o)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(u){return"\\u"+("0000"+u.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.ECB=function(){var o=h.lib.BlockCipherMode.extend();return o.Encryptor=o.extend({processBlock:function(S,E){this._cipher.encryptBlock(S,E)}}),o.Decryptor=o.extend({processBlock:function(S,E){this._cipher.decryptBlock(S,E)}}),o}(),h.mode.ECB})},h78n:function(u,G,c){"use strict";c.d(G,"a",function(){return z});var h=c("q1tI"),o=c.n(h),S=c("TSYQ"),E=c.n(S),b={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},p=function(j){var U=j.map(function(){return Object(h.useRef)()}),R=Object(h.useRef)();return Object(h.useEffect)(function(){var C=Date.now(),D=!1;Object.keys(U).forEach(function(le){var he=U[le].current;if(!he)return;D=!0;var ve=he.style;ve.transitionDuration=".3s, .3s, .3s, .06s",R.current&&C-R.current<100&&(ve.transitionDuration="0s, 0s")}),D&&(R.current=Date.now())}),[U]};function d(){return d=Object.assign||function($){for(var j=1;j<arguments.length;j++){var U=arguments[j];for(var R in U)Object.prototype.hasOwnProperty.call(U,R)&&($[R]=U[R])}return $},d.apply(this,arguments)}function a($,j){return m($)||g($,j)||l($,j)||s()}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l($,j){if(!$)return;if(typeof $=="string")return i($,j);var U=Object.prototype.toString.call($).slice(8,-1);if(U==="Object"&&$.constructor&&(U=$.constructor.name),U==="Map"||U==="Set")return Array.from($);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return i($,j)}function i($,j){(j==null||j>$.length)&&(j=$.length);for(var U=0,R=new Array(j);U<j;U++)R[U]=$[U];return R}function g($,j){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object($)))return;var U=[],R=!0,C=!1,D=void 0;try{for(var le=$[Symbol.iterator](),he;!(R=(he=le.next()).done)&&!(U.push(he.value),j&&U.length===j);R=!0);}catch(ve){C=!0,D=ve}finally{try{!R&&le.return!=null&&le.return()}finally{if(C)throw D}}return U}function m($){if(Array.isArray($))return $}function v($,j){if($==null)return{};var U=w($,j),R,C;if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols($);for(C=0;C<D.length;C++){if(R=D[C],j.indexOf(R)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,R))continue;U[R]=$[R]}}return U}function w($,j){if($==null)return{};var U={},R=Object.keys($),C,D;for(D=0;D<R.length;D++){if(C=R[D],j.indexOf(C)>=0)continue;U[C]=$[C]}return U}var _=function(j){var U=j.className,R=j.percent,C=j.prefixCls,D=j.strokeColor,le=j.strokeLinecap,he=j.strokeWidth,ve=j.style,Ee=j.trailColor,Se=j.trailWidth,ae=j.transition,pe=v(j,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete pe.gapPosition;var me=Array.isArray(R)?R:[R],ee=Array.isArray(D)?D:[D],re=p(me),Z=a(re,1),ue=Z[0],V=he/2,J=100-he/2,Ce="M ".concat(le==="round"?V:0,",").concat(V,`
L `).concat(le==="round"?J:100,",").concat(V),q="0 0 100 ".concat(he),H=0;return o.a.createElement("svg",d({className:E()("".concat(C,"-line"),U),viewBox:q,preserveAspectRatio:"none",style:ve},pe),o.a.createElement("path",{className:"".concat(C,"-line-trail"),d:Ce,strokeLinecap:le,stroke:Ee,strokeWidth:Se||he,fillOpacity:"0"}),me.map(function(T,W){var we={strokeDasharray:"".concat(T,"px, 100px"),strokeDashoffset:"-".concat(H,"px"),transition:ae||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ye=ee[W]||ee[ee.length-1];return H+=T,o.a.createElement("path",{key:W,className:"".concat(C,"-line-path"),d:Ce,strokeLinecap:le,stroke:ye,strokeWidth:he,fillOpacity:"0",ref:ue[W],style:we})}))};_.defaultProps=b;var k=_;function O(){return O=Object.assign||function($){for(var j=1;j<arguments.length;j++){var U=arguments[j];for(var R in U)Object.prototype.hasOwnProperty.call(U,R)&&($[R]=U[R])}return $},O.apply(this,arguments)}function M($,j){return Y($)||y($,j)||B($,j)||I()}function I(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B($,j){if(!$)return;if(typeof $=="string")return N($,j);var U=Object.prototype.toString.call($).slice(8,-1);if(U==="Object"&&$.constructor&&(U=$.constructor.name),U==="Map"||U==="Set")return Array.from($);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return N($,j)}function N($,j){(j==null||j>$.length)&&(j=$.length);for(var U=0,R=new Array(j);U<j;U++)R[U]=$[U];return R}function y($,j){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object($)))return;var U=[],R=!0,C=!1,D=void 0;try{for(var le=$[Symbol.iterator](),he;!(R=(he=le.next()).done)&&!(U.push(he.value),j&&U.length===j);R=!0);}catch(ve){C=!0,D=ve}finally{try{!R&&le.return!=null&&le.return()}finally{if(C)throw D}}return U}function Y($){if(Array.isArray($))return $}function X($,j){if($==null)return{};var U=P($,j),R,C;if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols($);for(C=0;C<D.length;C++){if(R=D[C],j.indexOf(R)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call($,R))continue;U[R]=$[R]}}return U}function P($,j){if($==null)return{};var U={},R=Object.keys($),C,D;for(D=0;D<R.length;D++){if(C=R[D],j.indexOf(C)>=0)continue;U[C]=$[C]}return U}var F=0;function K($){return+$.replace("%","")}function Q($){return Array.isArray($)?$:[$]}function ce($,j,U,R){var C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,D=arguments.length>5?arguments[5]:void 0,le=50-R/2,he=0,ve=-le,Ee=0,Se=-2*le;switch(D){case"left":he=-le,ve=0,Ee=2*le,Se=0;break;case"right":he=le,ve=0,Ee=-2*le,Se=0;break;case"bottom":ve=le,Se=2*le;break;default:}var ae="M 50,50 m ".concat(he,",").concat(ve,`
a `).concat(le,",").concat(le," 0 1 1 ").concat(Ee,",").concat(-Se,`
a `).concat(le,",").concat(le," 0 1 1 ").concat(-Ee,",").concat(Se),pe=Math.PI*2*le,me={stroke:U,strokeDasharray:"".concat(j/100*(pe-C),"px ").concat(pe,"px"),strokeDashoffset:"-".concat(C/2+$/100*(pe-C),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ae,pathStyle:me}}var fe=function(j){var U=j.prefixCls,R=j.strokeWidth,C=j.trailWidth,D=j.gapDegree,le=j.gapPosition,he=j.trailColor,ve=j.strokeLinecap,Ee=j.style,Se=j.className,ae=j.strokeColor,pe=j.percent,me=X(j,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ee=Object(h.useMemo)(function(){return F+=1,F},[]),re=ce(0,100,he,R,D,le),Z=re.pathString,ue=re.pathStyle,V=Q(pe),J=Q(ae),Ce=J.find(function(we){return Object.prototype.toString.call(we)==="[object Object]"}),q=p(V),H=M(q,1),T=H[0],W=function(){var ye=0;return V.map(function(Oe,Be){var Fe=J[Be]||J[J.length-1],Ue=Object.prototype.toString.call(Fe)==="[object Object]"?"url(#".concat(U,"-gradient-").concat(ee,")"):"",Ge=ce(ye,Oe,Fe,R,D,le);return ye+=Oe,o.a.createElement("path",{key:Be,className:"".concat(U,"-circle-path"),d:Ge.pathString,stroke:Ue,strokeLinecap:ve,strokeWidth:R,opacity:Oe===0?0:1,fillOpacity:"0",style:Ge.pathStyle,ref:T[Be]})})};return o.a.createElement("svg",O({className:E()("".concat(U,"-circle"),Se),viewBox:"0 0 100 100",style:Ee},me),Ce&&o.a.createElement("defs",null,o.a.createElement("linearGradient",{id:"".concat(U,"-gradient-").concat(ee),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(we,ye){return K(we)-K(ye)}).map(function(we,ye){return o.a.createElement("stop",{key:ye,offset:we,stopColor:Ce[we]})}))),o.a.createElement("path",{className:"".concat(U,"-circle-trail"),d:Z,stroke:he,strokeLinecap:ve,strokeWidth:C||R,fillOpacity:"0",style:ue}),W().reverse())};fe.defaultProps=b;var z=fe,se={Line:k,Circle:z}},i3hx:function(u,G,c){},i58Z:function(u,G,c){u.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},jO9C:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.Iso97971={pad:function(o,S){o.concat(h.lib.WordArray.create([2147483648],1)),h.pad.ZeroPadding.pad(o,S)},unpad:function(o){h.pad.ZeroPadding.unpad(o),o.sigBytes--}},h.pad.Iso97971})},je13:function(u,G,c){var h=c("5nXd"),o=c("gRFJ"),S=[c("uQRt")];u.exports=h.createStore(o,S)},kSUc:function(u,G,c){},lOMy:function(u,G,c){},lPiR:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(o){var S=h,E=S.lib,b=E.WordArray,p=E.Hasher,d=S.algo,a=[],s=[];(function(){function g(_){for(var k=o.sqrt(_),O=2;O<=k;O++)if(!(_%O))return!1;return!0}function m(_){return(_-(_|0))*4294967296|0}for(var v=2,w=0;w<64;)g(v)&&(w<8&&(a[w]=m(o.pow(v,1/2))),s[w]=m(o.pow(v,1/3)),w++),v++})();var l=[],i=d.SHA256=p.extend({_doReset:function(){this._hash=new b.init(a.slice(0))},_doProcessBlock:function(g,m){for(var v=this._hash.words,w=v[0],_=v[1],k=v[2],O=v[3],M=v[4],I=v[5],B=v[6],N=v[7],y=0;y<64;y++){if(y<16)l[y]=g[m+y]|0;else{var Y=l[y-15],X=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,P=l[y-2],F=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;l[y]=X+l[y-7]+F+l[y-16]}var K=M&I^~M&B,Q=w&_^w&k^_&k,ce=(w<<30|w>>>2)^(w<<19|w>>>13)^(w<<10|w>>>22),fe=(M<<26|M>>>6)^(M<<21|M>>>11)^(M<<7|M>>>25),z=N+fe+K+s[y]+l[y],se=ce+Q;N=B,B=I,I=M,M=O+z|0,O=k,k=_,_=w,w=z+se|0}v[0]=v[0]+w|0,v[1]=v[1]+_|0,v[2]=v[2]+k|0,v[3]=v[3]+O|0,v[4]=v[4]+M|0,v[5]=v[5]+I|0,v[6]=v[6]+B|0,v[7]=v[7]+N|0},_doFinalize:function(){var g=this._data,m=g.words,v=this._nDataBytes*8,w=g.sigBytes*8;return m[w>>>5]|=128<<24-w%32,m[(w+64>>>9<<4)+14]=o.floor(v/4294967296),m[(w+64>>>9<<4)+15]=v,g.sigBytes=m.length*4,this._process(),this._hash},clone:function(){var g=p.clone.call(this);return g._hash=this._hash.clone(),g}});S.SHA256=p._createHelper(i),S.HmacSHA256=p._createHmacHelper(i)}(Math),h.SHA256})},lZu9:function(u,G,c){(function(h){h(c("VrN/"),c("1eCo"),c("8EBN"))})(function(h){"use strict";h.defineMode("markdown",function(o,S){var E=h.getMode(o,"text/html"),b=E.name=="null";function p(R){if(h.findModeByName){var C=h.findModeByName(R);C&&(R=C.mime||C.mimes[0])}var D=h.getMode(o,R);return D.name=="null"?null:D}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.tokenTypeOverrides={});var d={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 d)d.hasOwnProperty(a)&&S.tokenTypeOverrides[a]&&(d[a]=S.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,i=/^\[(x| )\](?=\s)/i,g=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,m=/^ {0,3}(?:\={1,}|-{2,})\s*$/,v=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,_=/^\s*\[[^\]]+?\]:.*$/,k=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,O=" ";function M(R,C,D){return C.f=C.inline=D,D(R,C)}function I(R,C,D){return C.f=C.block=D,D(R,C)}function B(R){return!R||!/\S/.test(R.string)}function N(R){if(R.linkTitle=!1,R.linkHref=!1,R.linkText=!1,R.em=!1,R.strong=!1,R.strikethrough=!1,R.quote=0,R.indentedCode=!1,R.f==Y){var C=b;if(!C){var D=h.innerMode(E,R.htmlState);C=D.mode.name=="xml"&&D.state.tagStart===null&&!D.state.context&&D.state.tokenize.isInText}C&&(R.f=K,R.block=y,R.htmlState=null)}return R.trailingSpace=0,R.trailingSpaceNewLine=!1,R.prevLine=R.thisLine,R.thisLine={stream:null},null}function y(R,C){var D=R.column()===C.indentation,le=B(C.prevLine.stream),he=C.indentedCode,ve=C.prevLine.hr,Ee=C.list!==!1,Se=(C.listStack[C.listStack.length-1]||0)+3;C.indentedCode=!1;var ae=C.indentation;if(C.indentationDiff===null&&(C.indentationDiff=C.indentation,Ee)){for(C.list=null;ae<C.listStack[C.listStack.length-1];)C.listStack.pop(),C.listStack.length?C.indentation=C.listStack[C.listStack.length-1]:C.list=!1;C.list!==!1&&(C.indentationDiff=ae-C.listStack[C.listStack.length-1])}var pe=!le&&!ve&&!C.prevLine.header&&(!Ee||!he)&&!C.prevLine.fencedCodeEnd,me=(C.list===!1||ve||le)&&C.indentation<=Se&&R.match(s),ee=null;if(C.indentationDiff>=4&&(he||C.prevLine.fencedCodeEnd||C.prevLine.header||le))return R.skipToEnd(),C.indentedCode=!0,d.code;if(R.eatSpace())return null;if(D&&C.indentation<=Se&&(ee=R.match(g))&&ee[1].length<=6)return C.quote=0,C.header=ee[1].length,C.thisLine.header=!0,S.highlightFormatting&&(C.formatting="header"),C.f=C.inline,P(C);if(C.indentation<=Se&&R.eat(">"))return C.quote=D?1:C.quote+1,S.highlightFormatting&&(C.formatting="quote"),R.eatSpace(),P(C);if(!me&&!C.setext&&D&&C.indentation<=Se&&(ee=R.match(l))){var re=ee[1]?"ol":"ul";return C.indentation=ae+R.current().length,C.list=!0,C.quote=0,C.listStack.push(C.indentation),C.em=!1,C.strong=!1,C.code=!1,C.strikethrough=!1,S.taskLists&&R.match(i,!1)&&(C.taskList=!0),C.f=C.inline,S.highlightFormatting&&(C.formatting=["list","list-"+re]),P(C)}else{if(D&&C.indentation<=Se&&(ee=R.match(w,!0)))return C.quote=0,C.fencedEndRE=new RegExp(ee[1]+"+ *$"),C.localMode=S.fencedCodeBlockHighlighting&&p(ee[2]||S.fencedCodeBlockDefaultMode),C.localMode&&(C.localState=h.startState(C.localMode)),C.f=C.block=X,S.highlightFormatting&&(C.formatting="code-block"),C.code=-1,P(C);if(C.setext||(!pe||!Ee)&&!C.quote&&C.list===!1&&!C.code&&!me&&!_.test(R.string)&&(ee=R.lookAhead(1))&&(ee=ee.match(m)))return C.setext?(C.header=C.setext,C.setext=0,R.skipToEnd(),S.highlightFormatting&&(C.formatting="header")):(C.header=ee[0].charAt(0)=="="?1:2,C.setext=C.header),C.thisLine.header=!0,C.f=C.inline,P(C);if(me)return R.skipToEnd(),C.hr=!0,C.thisLine.hr=!0,d.hr;if(R.peek()==="[")return M(R,C,se)}return M(R,C,C.inline)}function Y(R,C){var D=E.token(R,C.htmlState);if(!b){var le=h.innerMode(E,C.htmlState);(le.mode.name=="xml"&&le.state.tagStart===null&&!le.state.context&&le.state.tokenize.isInText||C.md_inside&&R.current().indexOf(">")>-1)&&(C.f=K,C.block=y,C.htmlState=null)}return D}function X(R,C){var D=C.listStack[C.listStack.length-1]||0,le=C.indentation<D,he=D+3;if(C.fencedEndRE&&C.indentation<=he&&(le||R.match(C.fencedEndRE))){S.highlightFormatting&&(C.formatting="code-block");var ve;return le||(ve=P(C)),C.localMode=C.localState=null,C.block=y,C.f=K,C.fencedEndRE=null,C.code=0,C.thisLine.fencedCodeEnd=!0,le?I(R,C,C.block):ve}else return C.localMode?C.localMode.token(R,C.localState):(R.skipToEnd(),d.code)}function P(R){var C=[];if(R.formatting){C.push(d.formatting),typeof R.formatting=="string"&&(R.formatting=[R.formatting]);for(var D=0;D<R.formatting.length;D++)C.push(d.formatting+"-"+R.formatting[D]),R.formatting[D]==="header"&&C.push(d.formatting+"-"+R.formatting[D]+"-"+R.header),R.formatting[D]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=R.quote?C.push(d.formatting+"-"+R.formatting[D]+"-"+R.quote):C.push("error"))}if(R.taskOpen)return C.push("meta"),C.length?C.join(" "):null;if(R.taskClosed)return C.push("property"),C.length?C.join(" "):null;if(R.linkHref?C.push(d.linkHref,"url"):(R.strong&&C.push(d.strong),R.em&&C.push(d.em),R.strikethrough&&C.push(d.strikethrough),R.emoji&&C.push(d.emoji),R.linkText&&C.push(d.linkText),R.code&&C.push(d.code),R.image&&C.push(d.image),R.imageAltText&&C.push(d.imageAltText,"link"),R.imageMarker&&C.push(d.imageMarker)),R.header&&C.push(d.header,d.header+"-"+R.header),R.quote&&(C.push(d.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=R.quote?C.push(d.quote+"-"+R.quote):C.push(d.quote+"-"+S.maxBlockquoteDepth)),R.list!==!1){var le=(R.listStack.length-1)%3;le?le===1?C.push(d.list2):C.push(d.list3):C.push(d.list1)}return R.trailingSpaceNewLine?C.push("trailing-space-new-line"):R.trailingSpace&&C.push("trailing-space-"+(R.trailingSpace%2?"a":"b")),C.length?C.join(" "):null}function F(R,C){return R.match(v,!0)?P(C):void 0}function K(R,C){var D=C.text(R,C);if(typeof D!="undefined")return D;if(C.list)return C.list=null,P(C);if(C.taskList){var le=R.match(i,!0)[1]===" ";return le?C.taskOpen=!0:C.taskClosed=!0,S.highlightFormatting&&(C.formatting="task"),C.taskList=!1,P(C)}if(C.taskOpen=!1,C.taskClosed=!1,C.header&&R.match(/^#+$/,!0))return S.highlightFormatting&&(C.formatting="header"),P(C);var he=R.next();if(C.linkTitle){C.linkTitle=!1;var ve=he;he==="("&&(ve=")"),ve=(ve+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ee="^\\s*(?:[^"+ve+"\\\\]+|\\\\\\\\|\\\\.)"+ve;if(R.match(new RegExp(Ee),!0))return d.linkHref}if(he==="`"){var Se=C.formatting;S.highlightFormatting&&(C.formatting="code"),R.eatWhile("`");var ae=R.current().length;if(C.code==0&&(!C.quote||ae==1))return C.code=ae,P(C);if(ae==C.code){var pe=P(C);return C.code=0,pe}else return C.formatting=Se,P(C)}else if(C.code)return P(C);if(he==="\\"&&(R.next(),S.highlightFormatting)){var me=P(C),ee=d.formatting+"-escape";return me?me+" "+ee:ee}if(he==="!"&&R.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return C.imageMarker=!0,C.image=!0,S.highlightFormatting&&(C.formatting="image"),P(C);if(he==="["&&C.imageMarker&&R.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return C.imageMarker=!1,C.imageAltText=!0,S.highlightFormatting&&(C.formatting="image"),P(C);if(he==="]"&&C.imageAltText){S.highlightFormatting&&(C.formatting="image");var me=P(C);return C.imageAltText=!1,C.image=!1,C.inline=C.f=ce,me}if(he==="["&&!C.image)return C.linkText&&R.match(/^.*?\]/)||(C.linkText=!0,S.highlightFormatting&&(C.formatting="link")),P(C);if(he==="]"&&C.linkText){S.highlightFormatting&&(C.formatting="link");var me=P(C);return C.linkText=!1,C.inline=C.f=R.match(/\(.*?\)| ?\[.*?\]/,!1)?ce:K,me}if(he==="<"&&R.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){C.f=C.inline=Q,S.highlightFormatting&&(C.formatting="link");var me=P(C);return me?me+=" ":me="",me+d.linkInline}if(he==="<"&&R.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){C.f=C.inline=Q,S.highlightFormatting&&(C.formatting="link");var me=P(C);return me?me+=" ":me="",me+d.linkEmail}if(S.xml&&he==="<"&&R.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var re=R.string.indexOf(">",R.pos);if(re!=-1){var Z=R.string.substring(R.start,re);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Z)&&(C.md_inside=!0)}return R.backUp(1),C.htmlState=h.startState(E),I(R,C,Y)}if(S.xml&&he==="<"&&R.match(/^\/\w*?>/))return C.md_inside=!1,"tag";if(he==="*"||he==="_"){for(var ue=1,V=R.pos==1?" ":R.string.charAt(R.pos-2);ue<3&&R.eat(he);)ue++;var J=R.peek()||" ",Ce=!/\s/.test(J)&&(!k.test(J)||/\s/.test(V)||k.test(V)),q=!/\s/.test(V)&&(!k.test(V)||/\s/.test(J)||k.test(J)),H=null,T=null;if(ue%2&&(!C.em&&Ce&&(he==="*"||!q||k.test(V))?H=!0:C.em==he&&q&&(he==="*"||!Ce||k.test(J))&&(H=!1)),ue>1&&(!C.strong&&Ce&&(he==="*"||!q||k.test(V))?T=!0:C.strong==he&&q&&(he==="*"||!Ce||k.test(J))&&(T=!1)),T!=null||H!=null){S.highlightFormatting&&(C.formatting=H==null?"strong":T==null?"em":"strong em"),H===!0&&(C.em=he),T===!0&&(C.strong=he);var pe=P(C);return H===!1&&(C.em=!1),T===!1&&(C.strong=!1),pe}}else if(he===" "&&(R.eat("*")||R.eat("_"))){if(R.peek()===" ")return P(C);R.backUp(1)}if(S.strikethrough){if(he==="~"&&R.eatWhile(he)){if(C.strikethrough){S.highlightFormatting&&(C.formatting="strikethrough");var pe=P(C);return C.strikethrough=!1,pe}else if(R.match(/^[^\s]/,!1))return C.strikethrough=!0,S.highlightFormatting&&(C.formatting="strikethrough"),P(C)}else if(he===" "&&R.match(/^~~/,!0)){if(R.peek()===" ")return P(C);R.backUp(2)}}if(S.emoji&&he===":"&&R.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){C.emoji=!0,S.highlightFormatting&&(C.formatting="emoji");var W=P(C);return C.emoji=!1,W}return he===" "&&(R.match(/^ +$/,!1)?C.trailingSpace++:C.trailingSpace&&(C.trailingSpaceNewLine=!0)),P(C)}function Q(R,C){var D=R.next();if(D===">"){C.f=C.inline=K,S.highlightFormatting&&(C.formatting="link");var le=P(C);return le?le+=" ":le="",le+d.linkInline}return R.match(/^[^>]+/,!0),d.linkInline}function ce(R,C){if(R.eatSpace())return null;var D=R.next();return D==="("||D==="["?(C.f=C.inline=z(D==="("?")":"]"),S.highlightFormatting&&(C.formatting="link-string"),C.linkHref=!0,P(C)):"error"}var fe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function z(R){return function(C,D){var le=C.next();if(le===R){D.f=D.inline=K,S.highlightFormatting&&(D.formatting="link-string");var he=P(D);return D.linkHref=!1,he}return C.match(fe[R]),D.linkHref=!0,P(D)}}function se(R,C){return R.match(/^([^\]\\]|\\.)*\]:/,!1)?(C.f=$,R.next(),S.highlightFormatting&&(C.formatting="link"),C.linkText=!0,P(C)):M(R,C,K)}function $(R,C){if(R.match(/^\]:/,!0)){C.f=C.inline=j,S.highlightFormatting&&(C.formatting="link");var D=P(C);return C.linkText=!1,D}return R.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function j(R,C){return R.eatSpace()?null:(R.match(/^[^\s]+/,!0),R.peek()===void 0?C.linkTitle=!0:R.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),C.f=C.inline=K,d.linkHref+" url")}var U={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:K,text:F,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(R){return{f:R.f,prevLine:R.prevLine,thisLine:R.thisLine,block:R.block,htmlState:R.htmlState&&h.copyState(E,R.htmlState),indentation:R.indentation,localMode:R.localMode,localState:R.localMode?h.copyState(R.localMode,R.localState):null,inline:R.inline,text:R.text,formatting:!1,linkText:R.linkText,linkTitle:R.linkTitle,linkHref:R.linkHref,code:R.code,em:R.em,strong:R.strong,strikethrough:R.strikethrough,emoji:R.emoji,header:R.header,setext:R.setext,hr:R.hr,taskList:R.taskList,list:R.list,listStack:R.listStack.slice(0),quote:R.quote,indentedCode:R.indentedCode,trailingSpace:R.trailingSpace,trailingSpaceNewLine:R.trailingSpaceNewLine,md_inside:R.md_inside,fencedEndRE:R.fencedEndRE}},token:function(R,C){if(C.formatting=!1,R!=C.thisLine.stream){if(C.header=0,C.hr=!1,R.match(/^\s*$/,!0))return N(C),null;if(C.prevLine=C.thisLine,C.thisLine={stream:R},C.taskList=!1,C.trailingSpace=0,C.trailingSpaceNewLine=!1,!C.localState&&(C.f=C.block,C.f!=Y)){var D=R.match(/^\s*/,!0)[0].replace(/\t/g,O).length;if(C.indentation=D,C.indentationDiff=null,D>0)return null}}return C.f(R,C)},innerMode:function(R){return R.block==Y?{state:R.htmlState,mode:E}:R.localState?{state:R.localState,mode:R.localMode}:{state:R,mode:U}},indent:function(R,C,D){return R.block==Y&&E.indent?E.indent(R.htmlState,C,D):R.localState&&R.localMode.indent?R.localMode.indent(R.localState,C,D):h.Pass},blankLine:N,getType:P,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return U},"xml"),h.defineMIME("text/markdown","markdown"),h.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(u){if(!0)module.exports=u();else var G})(function(){var define,module,exports;return function(){function u(G,c,h){function o(b,p){if(!c[b]){if(!G[b]){var d=typeof require=="function"&&require;if(!p&&d)return require(b,!0);if(S)return S(b,!0);var a=new Error("Cannot find module '"+b+"'");throw a.code="MODULE_NOT_FOUND",a}var s=c[b]={exports:{}};G[b][0].call(s.exports,function(l){var i=G[b][1][l];return o(i||l)},s,s.exports,u,G,c,h)}return c[b].exports}for(var S=typeof require=="function"&&require,E=0;E<h.length;E++)o(h[E]);return o}return u}()({1:[function(u,G,c){"use strict";var h=u("./browser/client");h.Buffer=u("buffer").Buffer,h.urllib=u("../shims/xhr"),h.version=u("./browser/version").version,G.exports=h},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(u,G,c){(function(h,o){"use strict";var S=u("babel-runtime/core-js/promise"),E=s(S),b=u("babel-runtime/regenerator"),p=s(b),d=u("babel-runtime/core-js/object/assign"),a=s(d);function s(se){return se&&se.__esModule?se:{default:se}}var l=u("debug")("ali-oss"),i=u("copy-to"),g=u("xml2js"),m=u("agentkeepalive"),v=u("merge-descriptors"),w=u("url"),_=u("is-type-of"),k=u("platform"),O=u("utility"),M=u("urllib"),I=u("./version"),B=u("bowser"),N=u("../common/signUtils"),y=u("../common/utils/isIP"),Y=y.isIP,X=u("../common/client/initOptions"),P=u("../common/utils/createRequest"),F=P.createRequest,K=new m;function Q(){var se=k.name,$=k.version;se&&se.toLowerCase&&se.toLowerCase()==="ie"&&$.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function ce(){return location&&location.protocol==="https:"}function fe(se,$){if(Q(),!(this instanceof fe))return new fe(se,$);se&&se.inited?this.options=se:this.options=fe.initOptions(se),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=M,this.agent=this.options.agent||K),this.ctx=$,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}G.exports=fe,fe.initOptions=function($){$.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var j=(0,a.default)({secure:ce(),useFetch:!1},$);return X(j)};var z=fe.prototype;z.debug=l,v(z,u("./object")),v(z,u("../common/bucket/getBucketWebsite")),v(z,u("../common/bucket/putBucketWebsite")),v(z,u("../common/bucket/deleteBucketWebsite")),v(z,u("../common/bucket/getBucketLifecycle")),v(z,u("../common/bucket/putBucketLifecycle")),v(z,u("../common/bucket/deleteBucketLifecycle")),v(z,u("../common/bucket/putBucketVersioning")),v(z,u("../common/bucket/getBucketVersioning")),v(z,u("./managed-upload")),v(z,u("../common/multipart")),v(z,u("../common/parallel")),z.signature=function($){return this.debug("authorization stringToSign: %s",$,"info"),N.computeSignature(this.options.accessKeySecret,$)},z.authorization=function($,j,U,R){var C=N.buildCanonicalString($.toUpperCase(),j,{headers:R,parameters:U});return N.authorization(this.options.accessKeyId,this.options.accessKeySecret,C)},z.request=function($){var j,U,R,C,D,le;return p.default.async(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return j=F.call(this,$),this.options.useFetch||(j.params.mode="disable-fetch"),U=void 0,R=void 0,C=!!$.stream,ve.prev=5,ve.next=8,p.default.awrap(this.urllib.request(j.url,j.params));case 8:U=ve.sent,this.debug("response %s %s, got %s, headers: %j",$.method,j.url,U.status,U.headers,"info"),ve.next=15;break;case 12:ve.prev=12,ve.t0=ve.catch(5),R=ve.t0;case 15:if(D=void 0,!(U&&$.successStatuses&&$.successStatuses.indexOf(U.status)===-1)){ve.next=28;break}return ve.next=19,p.default.awrap(this.requestError(U));case 19:if(D=ve.sent,!(D.code==="RequestTimeTooSkewed"&&!C)){ve.next=25;break}return this.options.amendTimeSkewed=+new Date(D.serverTime)-new Date,ve.next=24,p.default.awrap(this.request($));case 24:return ve.abrupt("return",ve.sent);case 25:D.params=$,ve.next=32;break;case 28:if(!R){ve.next=32;break}return ve.next=31,p.default.awrap(this.requestError(R));case 31:D=ve.sent;case 32:if(!D){ve.next=34;break}throw D;case 34:if(!$.xmlResponse){ve.next=39;break}return ve.next=37,p.default.awrap(this.parseXML(U.data));case 37:le=ve.sent,U.data=le;case 39:return ve.abrupt("return",U);case 40:case"end":return ve.stop()}},null,this,[[5,12]])},z._getResource=function($){var j="/";return $.bucket&&(j+=$.bucket+"/"),$.object&&(j+=$.object),j},z._isIP=Y,z._escape=function($){return O.encodeURIComponent($).replace(/%2F/g,"/")},z._getReqUrl=function($){var j={};i(this.options.endpoint).to(j);var U=this._isIP(j.hostname),R=this.options.cname;$.bucket&&!R&&!U&&(j.host=$.bucket+"."+j.host);var C="/";$.bucket&&U&&(C+=$.bucket+"/"),$.object&&(C+=this._escape($.object).replace(/\+/g,"%2B")),j.pathname=C;var D={};if($.query&&v(D,$.query),$.subres){var le={};_.string($.subres)?le[$.subres]="":_.array($.subres)?$.subres.forEach(function(he){le[he]=""}):le=$.subres,v(D,le)}return j.query=D,w.format(j)},z._getUserAgent=function(){var $=o&&o.browser?"js":"nodejs",j="aliyun-sdk-"+$+"/"+I.version,U=k.description;return!U&&o&&(U="Node.js "+o.version.slice(1)+" on "+o.platform+" "+o.arch),this._checkUserAgent(j+" "+U)},z._checkUserAgent=function($){var j=$.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return j},z.checkBrowserAndVersion=function($,j){return B.name===$&&B.version.split(".")[0]===j},z.parseXML=function($){return new E.default(function(j,U){h.isBuffer($)&&($=$.toString()),g.parseString($,{explicitRoot:!1,explicitArray:!1},function(R,C){R?U(R):j(C)})})},z.requestError=function($){var j,U,R,C;return p.default.async(function(le){for(;;)switch(le.prev=le.next){case 0:if(j=null,!(!$.data||!$.data.length)){le.next=5;break}$.status===-1||$.status===-2?(j=new Error($.message),j.name=$.name,j.status=$.status,j.code=$.name):($.status===404?(j=new Error("Object not exists"),j.name="NoSuchKeyError",j.status=404,j.code="NoSuchKey"):$.status===412?(j=new Error("Pre condition failed"),j.name="PreconditionFailedError",j.status=412,j.code="PreconditionFailed"):(j=new Error("Unknow error, status: "+$.status),j.name="UnknowError",j.status=$.status),j.requestId=$.headers["x-oss-request-id"],j.host=""),le.next=33;break;case 5:return U=String($.data),this.debug("request response error data: %s",U,"error"),R=void 0,le.prev=8,le.next=11,p.default.awrap(this.parseXML(U));case 11:if(le.t0=le.sent,le.t0){le.next=14;break}le.t0={};case 14:R=le.t0,le.next=24;break;case 17:return le.prev=17,le.t1=le.catch(8),this.debug(U,"error"),le.t1.message+=`
raw xml: `+U,le.t1.status=$.status,le.t1.requestId=$.headers["x-oss-request-id"],le.abrupt("return",le.t1);case 24:C=R.Message||"unknow request error, status: "+$.status,R.Condition&&(C+=" (condition: "+R.Condition+")"),j=new Error(C),j.name=R.Code?R.Code+"Error":"UnknowError",j.status=$.status,j.code=R.Code,j.requestId=R.RequestId,j.hostId=R.HostId,j.serverTime=R.ServerTime;case 33:return this.debug("generate error %j",j,"error"),le.abrupt("return",j);case 35:case"end":return le.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:u("../../node_modules/is-buffer/index.js")},u("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/core-js/array/from"),S=a(o),E=u("babel-runtime/core-js/promise"),b=a(E),p=u("babel-runtime/regenerator"),d=a(p);function a(N){return N&&N.__esModule?N:{default:N}}var s=u("is-type-of"),l=u("util"),i=u("path"),g=u("mime"),m=u("copy-to"),v=u("../common/utils/isBlob"),w=v.isBlob,_=u("../common/utils/isFile"),k=_.isFile,O=c;O.multipartUpload=function(y,Y,X){var P,F,K,Q,ce,fe,z,se,$;return d.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(this.resetCancelFlag(),X=X||{},!(X.checkpoint&&X.checkpoint.uploadId)){U.next=6;break}return U.next=5,d.default.awrap(this._resumeMultipart(X.checkpoint,X));case 5:return U.abrupt("return",U.sent);case 6:return P=100*1024,X.mime||(k(Y)?X.mime=g.getType(i.extname(Y.name)):w(Y)?X.mime=Y.type:X.mime=g.getType(i.extname(Y))),X.headers=X.headers||{},this._convertMetaToHeaders(X.meta,X.headers),U.next=12,d.default.awrap(this._getFileSize(Y));case 12:if(F=U.sent,!(F<P)){U.next=25;break}return K=this._createStream(Y,0,F),X.contentLength=F,U.next=18,d.default.awrap(this.putStream(y,K,X));case 18:if(Q=U.sent,!(X&&X.progress)){U.next=22;break}return U.next=22,d.default.awrap(X.progress(1));case 22:return ce={res:Q.res,bucket:this.options.bucket,name:y,etag:Q.res.headers.etag},(X.headers&&X.headers["x-oss-callback"]||X.callback)&&(ce.data=Q.data),U.abrupt("return",ce);case 25:if(!(X.partSize&&!(parseInt(X.partSize,10)===X.partSize))){U.next=27;break}throw new Error("partSize must be int number");case 27:if(!(X.partSize&&X.partSize<P)){U.next=29;break}throw new Error("partSize must not be smaller than "+P);case 29:return U.next=31,d.default.awrap(this.initMultipartUpload(y,X));case 31:if(fe=U.sent,z=fe.uploadId,se=this._getPartSize(F,X.partSize),$={file:Y,name:y,fileSize:F,partSize:se,uploadId:z,doneParts:[]},!(X&&X.progress)){U.next=38;break}return U.next=38,d.default.awrap(X.progress(0,$,fe.res));case 38:return U.next=40,d.default.awrap(this._resumeMultipart($,X));case 40:return U.abrupt("return",U.sent);case 41:case"end":return U.stop()}},null,this)},O._resumeMultipart=function(y,Y){var X,P,F,K,Q,ce,fe,z,se,$,j,U,R,C,D,le,he,ve;return d.default.async(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(X=this,!this.isCancel()){Se.next=3;break}throw this._makeCancelEvent();case 3:return P=y.file,F=y.fileSize,K=y.partSize,Q=y.uploadId,ce=y.doneParts,fe=y.name,z=[],ce.length>0&&m(ce).to(z),se=this._divideParts(F,K),$=se.length,j=!1,U=function(pe,me){var ee=this;return new b.default(function(Z,ue){var V,J,Ce,q;return d.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(T.prev=0,pe.isCancel()){T.next=18;break}return V=se[me-1],J={stream:pe._createStream(P,V.start,V.end),size:V.end-V.start},T.next=6,d.default.awrap(pe._uploadPart(fe,Q,me,J));case 6:if(Ce=T.sent,!(!pe.isCancel()&&!j)){T.next=15;break}if(y.doneParts.push({number:me,etag:Ce.res.headers.etag}),!Y.progress){T.next=12;break}return T.next=12,d.default.awrap(Y.progress(ce.length/$,y,Ce.res));case 12:Z({number:me,etag:Ce.res.headers.etag}),T.next=16;break;case 15:Z();case 16:T.next=19;break;case 18:Z();case 19:T.next=30;break;case 21:T.prev=21,T.t0=T.catch(0),q=new Error,q.name=T.t0.name,q.message=T.t0.message,q.stack=T.t0.stack,q.partNum=me,m(T.t0).to(q),ue(q);case 30:case"end":return T.stop()}},null,ee,[[0,21]])})},R=(0,S.default)(new Array($),function(ae,pe){return pe+1}),C=z.map(function(ae){return ae.number}),D=R.filter(function(ae){return C.indexOf(ae)<0}),le=5,he=Y.parallel||le,Se.next=17,d.default.awrap(this._parallel(D,he,function(ae){return new b.default(function(pe,me){U(X,ae).then(function(ee){ee&&z.push(ee),pe()}).catch(function(ee){me(ee)})})}));case 17:if(ve=Se.sent,j=!0,!this.isCancel()){Se.next=22;break}throw U=null,this._makeCancelEvent();case 22:if(!(ve&&ve.length>0)){Se.next=25;break}throw ve[0].message="Failed to upload some parts with error: "+ve[0].toString()+" part_num: "+ve[0].partNum,ve[0];case 25:return Se.next=27,d.default.awrap(this.completeMultipartUpload(fe,Q,z,Y));case 27:return Se.abrupt("return",Se.sent);case 28:case"end":return Se.stop()}},null,this)},O._getFileSize=function(y){return d.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(!s.buffer(y)){X.next=4;break}return X.abrupt("return",y.length);case 4:if(!(w(y)||k(y))){X.next=6;break}return X.abrupt("return",y.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return X.stop()}},null,this)};var M=u("stream"),I=M.Readable;function B(N,y){if(!(this instanceof B))return new B(N,y);I.call(this,y),this.file=N,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(B,I),B.prototype.readFileAndPush=function(y){if(this.fileBuffer)for(var Y=!0;Y&&this.fileBuffer&&this.start<this.fileBuffer.length;){var X=this.start,P=X+y;P=P>this.fileBuffer.length?this.fileBuffer.length:P,this.start=P,Y=this.push(this.fileBuffer.slice(X,P))}},B.prototype._read=function(y){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Y=16*1024;y=y||Y;var X=this;this.reader.onload=function(F){X.fileBuffer=h.from(new Uint8Array(F.target.result)),X.file=null,X.readFileAndPush(y)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(y)},O._createStream=function(y,Y,X){if(w(y)||k(y))return new B(y.slice(Y,X));throw new Error("_createStream requires File/Blob.")},O._getPartSize=function(y,Y){var X=10*1e3,P=1024*1024;return Y?Math.max(Math.ceil(y/X),Y):P},O._divideParts=function(y,Y){for(var X=Math.ceil(y/Y),P=[],F=0;F<X;F++){var K=Y*F,Q=Math.min(K+Y,y);P.push({start:K,end:Q})}return P}}).call(this,u("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/promise"),o=s(h),S=u("babel-runtime/core-js/object/keys"),E=s(S),b=u("babel-runtime/core-js/object/assign"),p=s(b),d=u("babel-runtime/regenerator"),a=s(d);function s(X){return X&&X.__esModule?X:{default:X}}var l=u("utility"),i=u("fs"),g=u("is-type-of"),m=u("url"),v=u("copy-to"),w=u("path"),_=u("mime"),k=u("../common/callback"),O=u("../common/signUtils"),M=u("merge-descriptors"),I=u("../common/utils/isBlob"),B=I.isBlob,N=u("../common/utils/isFile"),y=N.isFile,Y=c;Y.append=function(P,F,K){var Q;return a.default.async(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return K=K||{},K.position===void 0&&(K.position="0"),K.subres={append:"",position:K.position},K.method="POST",fe.next=6,a.default.awrap(this.put(P,F,K));case 6:return Q=fe.sent,Q.nextAppendPosition=Q.res.headers["x-oss-next-append-position"],fe.abrupt("return",Q);case 9:case"end":return fe.stop()}},null,this)},Y.put=function(P,F,K){var Q,ce,fe,z,se,$,j;return a.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(Q=void 0,K=K||{},P=this._objectName(P),!g.buffer(F)){R.next=7;break}Q=F,R.next=33;break;case 7:if(!(B(F)||y(F))){R.next=32;break}return K.mime||(y(F)?K.mime=_.getType(w.extname(F.name)):K.mime=F.type),ce=this._createStream(F,0,F.size),R.next=12,a.default.awrap(this._getFileSize(F));case 12:return K.contentLength=R.sent,R.prev=13,R.next=16,a.default.awrap(this.putStream(P,ce,K));case 16:return fe=R.sent,R.abrupt("return",fe);case 20:if(R.prev=20,R.t0=R.catch(13),!(R.t0.code==="RequestTimeTooSkewed")){R.next=29;break}return this.options.amendTimeSkewed=+new Date(R.t0.serverTime)-new Date,R.next=26,a.default.awrap(this.put(P,F,K));case 26:return R.abrupt("return",R.sent);case 29:throw R.t0;case 30:R.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return K.headers=K.headers||{},this._convertMetaToHeaders(K.meta,K.headers),z=K.method||"PUT",se=this._objectRequestParams(z,P,K),k.encodeCallback(se,K),se.mime=K.mime,se.content=Q,se.successStatuses=[200],R.next=43,a.default.awrap(this.request(se));case 43:return $=R.sent,j={name:P,url:this._objectUrl(P),res:$.res},se.headers&&se.headers["x-oss-callback"]&&(j.data=JSON.parse($.data.toString())),R.abrupt("return",j);case 47:case"end":return R.stop()}},null,this,[[13,20]])},Y.putStream=function(P,F,K){var Q,ce,fe,z;return a.default.async(function($){for(;;)switch($.prev=$.next){case 0:return K=K||{},K.headers=K.headers||{},P=this._objectName(P),K.contentLength?K.headers["Content-Length"]=K.contentLength:K.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(K.meta,K.headers),Q=K.method||"PUT",ce=this._objectRequestParams(Q,P,K),k.encodeCallback(ce,K),ce.mime=K.mime,ce.stream=F,ce.successStatuses=[200],$.next=13,a.default.awrap(this.request(ce));case 13:return fe=$.sent,z={name:P,url:this._objectUrl(P),res:fe.res},ce.headers&&ce.headers["x-oss-callback"]&&(z.data=JSON.parse(fe.data.toString())),$.abrupt("return",z);case 17:case"end":return $.stop()}},null,this)},M(Y,u("../common/object/copyObject")),M(Y,u("../common/object/getObjectTagging")),M(Y,u("../common/object/putObjectTagging")),M(Y,u("../common/object/deleteObjectTagging")),M(Y,u("../common/image")),M(Y,u("../common/object/getBucketVersions")),M(Y,u("../common/object/getACL")),M(Y,u("../common/object/putACL")),M(Y,u("../common/object/head")),M(Y,u("../common/object/delete")),M(Y,u("../common/object/get")),M(Y,u("../common/object/putSymlink")),M(Y,u("../common/object/getSymlink")),M(Y,u("../common/object/deleteMulti")),M(Y,u("../common/object/getObjectMeta")),Y.putMeta=function(P,F,K){var Q;return a.default.async(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.next=2,a.default.awrap(this.copy(P,P,{meta:F||{},timeout:K&&K.timeout,ctx:K&&K.ctx}));case 2:return Q=fe.sent,fe.abrupt("return",Q);case 4:case"end":return fe.stop()}},null,this)},Y.list=function(P,F){var K,Q,ce,fe,z;return a.default.async(function($){for(;;)switch($.prev=$.next){case 0:return K=this._objectRequestParams("GET","",F),K.query=P,K.xmlResponse=!0,K.successStatuses=[200],$.next=6,a.default.awrap(this.request(K));case 6:return Q=$.sent,ce=Q.data.Contents,fe=this,ce&&(Array.isArray(ce)||(ce=[ce]),ce=ce.map(function(j){return{name:j.Key,url:fe._objectUrl(j.Key),lastModified:j.LastModified,etag:j.ETag,type:j.Type,size:Number(j.Size),storageClass:j.StorageClass,owner:{id:j.Owner.ID,displayName:j.Owner.DisplayName}}})),z=Q.data.CommonPrefixes||null,z&&(Array.isArray(z)||(z=[z]),z=z.map(function(j){return j.Prefix})),$.abrupt("return",{res:Q.res,objects:ce,prefixes:z,nextMarker:Q.data.NextMarker||null,isTruncated:Q.data.IsTruncated==="true"});case 13:case"end":return $.stop()}},null,this)},Y.restore=function(P,F){var K,Q;return a.default.async(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return F=F||{},F.subres=(0,p.default)({restore:""},F.subres),F.versionId&&(F.subres.versionId=F.versionId),K=this._objectRequestParams("POST",P,F),K.successStatuses=[202],fe.next=7,a.default.awrap(this.request(K));case 7:return Q=fe.sent,fe.abrupt("return",{res:Q.res});case 9:case"end":return fe.stop()}},null,this)},Y.signatureUrl=function(P,F){F=F||{},P=this._objectName(P),F.method=F.method||"GET";var K=l.timestamp()+(F.expires||1800),Q={bucket:this.options.bucket,object:P},ce=this._getResource(Q);this.options.stsToken&&(F["security-token"]=this.options.stsToken);var fe=O._signatureForURL(this.options.accessKeySecret,F,ce,K),z=m.parse(this._getReqUrl(Q));return z.query={OSSAccessKeyId:this.options.accessKeyId,Expires:K,Signature:fe.Signature},v(fe.subResource).to(z.query),z.format()},Y.getObjectUrl=function(P,F){return F?F[F.length-1]!=="/"&&(F+="/"):F=this.options.endpoint.format(),F+this._escape(this._objectName(P))},Y._objectUrl=function(P){return this._getReqUrl({bucket:this.options.bucket,object:P})},Y.generateObjectUrl=function(X,P){if(P)P[P.length-1]!=="/"&&(P+="/");else{P=this.options.endpoint.format();var F=m.parse(P),K=this.options.bucket;F.hostname=K+"."+F.hostname,F.host=K+"."+F.host,P=F.format()}return P+this._escape(this._objectName(X))},Y._objectRequestParams=function(P,F,K){if(!this.options.bucket)throw new Error("Please create a bucket first");K=K||{},F=this._objectName(F);var Q={object:F,bucket:this.options.bucket,method:P,subres:K&&K.subres,timeout:K&&K.timeout,ctx:K&&K.ctx};return K.headers&&(Q.headers={},v(K.headers).to(Q.headers)),Q},Y._objectName=function(P){return P.replace(/^\/+/,"")},Y._convertMetaToHeaders=function(P,F){if(!P)return;(0,E.default)(P).forEach(function(K){F["x-oss-meta-"+K]=P[K]})},Y._deleteFileSafe=function(P){var F=this;return new o.default(function(K){i.exists(P,function(Q){Q?i.unlink(P,function(ce){ce&&F.debug("unlink %j error: %s",P,ce,"error"),K()}):K()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(u,G,c){"use strict";c.version="6.10.0"},{}],6:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(d){return d&&d.__esModule?d:{default:d}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=c;p.deleteBucketLifecycle=function(a,s){var l,i;return o.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return b(a),l=this._bucketRequestParams("DELETE",a,"lifecycle",s),l.successStatuses=[204],m.next=5,o.default.awrap(this.request(l));case 5:return i=m.sent,m.abrupt("return",{res:i.res});case 7:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(d){return d&&d.__esModule?d:{default:d}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=c;p.deleteBucketWebsite=function(a,s){var l,i;return o.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return b(a),l=this._bucketRequestParams("DELETE",a,"website",s),l.successStatuses=[204],m.next=5,o.default.awrap(this.request(l));case 5:return i=m.sent,m.abrupt("return",{res:i.res});case 7:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(i){return i&&i.__esModule?i:{default:i}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=u("../utils/isArray"),d=p.isArray,a=u("../utils/formatObjKey"),s=a.formatObjKey,l=c;l.getBucketLifecycle=function(g,m){var v,w,_;return o.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:return b(g),v=this._bucketRequestParams("GET",g,"lifecycle",m),v.successStatuses=[200],v.xmlResponse=!0,O.next=6,o.default.awrap(this.request(v));case 6:return w=O.sent,_=w.data.Rule||null,_&&(d(_)||(_=[_]),_=_.map(function(M){return M.ID&&(M.id=M.ID,delete M.ID),M.Tag&&!d(M.Tag)&&(M.Tag=[M.Tag]),s(M,"firstLowerCase")})),O.abrupt("return",{rules:_,res:w.res});case 10:case"end":return O.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(d){return d&&d.__esModule?d:{default:d}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=c;p.getBucketVersioning=function(a,s){var l,i,g;return o.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return b(a),l=this._bucketRequestParams("GET",a,"versioning",s),l.xmlResponse=!0,l.successStatuses=[200],v.next=6,o.default.awrap(this.request(l));case 6:return i=v.sent,g=i.data.Status,v.abrupt("return",{status:i.status,versionStatus:g,res:i.res});case 9:case"end":return v.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(s){return s&&s.__esModule?s:{default:s}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=u("../utils/isObject"),d=p.isObject,a=c;a.getBucketWebsite=function(l,i){var g,m,v;return o.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return b(l),g=this._bucketRequestParams("GET",l,"website",i),g.successStatuses=[200],g.xmlResponse=!0,_.next=6,o.default.awrap(this.request(g));case 6:return m=_.sent,v=[],m.data.RoutingRules&&m.data.RoutingRules.RoutingRule&&(d(m.data.RoutingRules.RoutingRule)?v=[m.data.RoutingRules.RoutingRule]:v=m.data.RoutingRules.RoutingRule),_.abrupt("return",{index:m.data.IndexDocument&&m.data.IndexDocument.Suffix||"",supportSubDir:m.data.IndexDocument&&m.data.IndexDocument.SupportSubDir||"false",type:m.data.IndexDocument&&m.data.IndexDocument.Type,routingRules:v,error:m.data.ErrorDocument&&m.data.ErrorDocument.Key||null,res:m.res});case 10:case"end":return _.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(y){return y&&y.__esModule?y:{default:y}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=u("../utils/isArray"),d=p.isArray,a=u("../utils/deepCopy"),s=a.deepCopy,l=u("../utils/isObject"),i=l.isObject,g=u("../utils/obj2xml"),m=g.obj2xml,v=u("../utils/checkObjectTag"),w=v.checkObjectTag,_=u("../utils/getStrBytesCount"),k=_.getStrBytesCount,O=c;O.putBucketLifecycle=function(Y,X,P){var F,K,Q,ce,fe;return o.default.async(function(se){for(;;)switch(se.prev=se.next){case 0:if(b(Y),d(X)){se.next=3;break}throw new Error("rules must be Array");case 3:return F=this._bucketRequestParams("PUT",Y,"lifecycle",P),K=[],Q={LifecycleConfiguration:{Rule:K}},X.forEach(function($){M($),N($),$.id&&($.ID=$.id,delete $.id),K.push($)}),ce=m(Q,{headers:!0,firstUpperCase:!0}),F.content=ce,F.mime="xml",F.successStatuses=[200],se.next=13,o.default.awrap(this.request(F));case 13:return fe=se.sent,se.abrupt("return",{res:fe.res});case 15:case"end":return se.stop()}},null,this)};function M(y){y.days&&(y.expiration={days:y.days}),y.date&&(y.expiration={createdBeforeDate:y.date})}function I(y,Y){var X=y.days,P=y.createdBeforeDate;if(!X&&!P)throw new Error(Y+" must includes days or createdBeforeDate");if(X&&!/^[1-9][0-9]*$/.test(X))throw new Error("days must be a positive integer");if(P&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(P))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function B(y){if(!d(y)&&!i(y))throw new Error("tag must be Object or Array");y=i(y)?[y]:y;var Y={},X=s(y);X.forEach(function(P){Y[P.key]=P.value}),w(Y)}function N(y){if(y.id&&k(y.id)>255)throw new Error("ID is composed of 255 bytes at most");if(y.prefix===""||y.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(y.status))throw new Error("Status must be Enabled or Disabled");if(y.transition){if(!["IA","Archive"].includes(y.transition.storageClass))throw new Error("StorageClass must be IA or Archive");I(y.transition,"Transition")}if(y.expiration){if(!y.expiration.expiredObjectDeleteMarker)I(y.expiration,"Expiration");else if(y.expiration.days||y.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(y.abortMultipartUpload&&I(y.abortMultipartUpload,"AbortMultipartUpload"),!y.expiration&&!y.abortMultipartUpload&&!y.transition&&!y.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(y.tag){if(y.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");B(y.tag)}}},{"../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(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(s){return s&&s.__esModule?s:{default:s}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=u("../utils/obj2xml"),d=p.obj2xml,a=c;a.putBucketVersioning=function(l,i){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,v,w;return o.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:if(b(l),["Enabled","Suspended"].includes(i)){k.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return m=this._bucketRequestParams("PUT",l,"versioning",g),v={VersioningConfiguration:{Status:i}},m.mime="xml",m.content=d(v,{headers:!0}),k.next=9,o.default.awrap(this.request(m));case 9:return w=k.sent,k.abrupt("return",{res:w.res,status:w.status});case 11:case"end":return k.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(i){return i&&i.__esModule?i:{default:i}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=u("../utils/obj2xml"),d=p.obj2xml,a=u("../utils/isArray"),s=a.isArray,l=c;l.putBucketWebsite=function(g){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments[2],w,_,k,O,M;return o.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(b(g),w=this._bucketRequestParams("PUT",g,"website",v),_={Suffix:m.index||"index.html"},k={IndexDocument:_},O={WebsiteConfiguration:k},m.supportSubDir&&(_.SupportSubDir=m.supportSubDir),m.type&&(_.Type=m.type),m.error&&(k.ErrorDocument={Key:m.error}),!(m.routingRules!==void 0)){B.next=12;break}if(s(m.routingRules)){B.next=11;break}throw new Error("RoutingRules must be Array");case 11:k.RoutingRules={RoutingRule:m.routingRules};case 12:return O=d(O),w.content=O,w.mime="xml",w.successStatuses=[200],B.next=18,o.default.awrap(this.request(w));case 18:return M=B.sent,B.abrupt("return",{res:M.res});case 20:case"end":return B.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/core-js/object/keys"),S=p(o),E=u("babel-runtime/core-js/json/stringify"),b=p(E);function p(d){return d&&d.__esModule?d:{default:d}}c.encodeCallback=function(a,s){if(a.headers=a.headers||{},!Object.prototype.hasOwnProperty.call(a.headers,"x-oss-callback")&&s.callback){var l={callbackUrl:encodeURI(s.callback.url),callbackBody:s.callback.body};s.callback.host&&(l.callbackHost=s.callback.host),s.callback.contentType&&(l.callbackBodyType=s.callback.contentType);var i=h.from((0,b.default)(l)).toString("base64");if(a.headers["x-oss-callback"]=i,s.callback.customValue){var g={};(0,S.default)(s.callback.customValue).forEach(function(m){g["x:"+m]=s.callback.customValue[m]}),a.headers["x-oss-callback-var"]=h.from((0,b.default)(g)).toString("base64")}}}}).call(this,u("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/assign"),o=S(h);function S(l){return l&&l.__esModule?l:{default:l}}var E=u("humanize-ms"),b=u("url"),p=u("../utils/checkBucketName"),d=p.checkBucketName;function a(l,i){var g=b.parse(l);if(g.protocol||(g=b.parse("http"+(i?"s":"")+"://"+l)),g.protocol!=="http:"&&g.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return g}function s(l,i,g){var m=g?"https://":"http://",v=i?"-internal.aliyuncs.com":".aliyuncs.com",w="vpc100-oss-cn-";return l.substr(0,w.length)===w&&(v=".aliyuncs.com"),b.parse(m+l+v)}G.exports=function(l){if(!l||!l.accessKeyId||!l.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");l.bucket&&d(l.bucket);var i=(0,o.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},l);if(i.accessKeyId=i.accessKeyId.trim(),i.accessKeySecret=i.accessKeySecret.trim(),i.timeout&&(i.timeout=E(i.timeout)),i.endpoint)i.endpoint=a(i.endpoint,i.secure);else if(i.region)i.endpoint=s(i.region,i.internal,i.secure);else throw new Error("require options.endpoint or options.region");return i.inited=!0,i}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(u,G,c){"use strict";var h=u("merge-descriptors"),o=c;h(o,u("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(i){return i&&i.__esModule?i:{default:i}}var E=u("../utils/checkBucketName"),b=E.checkBucketName,p=u("querystring"),d=u("js-base64"),a=d.Base64.encode,s=c;s.processObjectSave=function(g,m,v,w){var _,k,O,M;return o.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:return l(g,"sourceObject"),l(m,"targetObject"),l(v,"process"),m=this._objectName(m),w&&b(w),_=this._objectRequestParams("POST",g,{subres:"x-oss-process"}),k=w?",b_"+a(w):"",m=a(m),O={"x-oss-process":v+"|sys/saveas,o_"+m+k},_.content=p.stringify(O),B.next=12,o.default.awrap(this.request(_));case 12:return M=B.sent,B.abrupt("return",{res:M.res,status:M.res.status});case 14:case"end":return B.stop()}},null,this)};function l(i,g){if(!i)throw new Error(g+" is required");if(typeof i!="string")throw new Error(g+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=S(h);function S(s){return s&&s.__esModule?s:{default:s}}var E=u("copy-to"),b=u("./callback"),p=u("./utils/deepCopy"),d=p.deepCopy,a=c;a.listUploads=function(l,i){var g,m,v,w;return o.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return i=i||{},g={},E(i).to(g),g.subres="uploads",m=this._objectRequestParams("GET","",g),m.query=l,m.xmlResponse=!0,m.successStatuses=[200],k.next=10,o.default.awrap(this.request(m));case 10:return v=k.sent,w=v.data.Upload||[],Array.isArray(w)||(w=[w]),w=w.map(function(O){return{name:O.Key,uploadId:O.UploadId,initiated:O.Initiated}}),k.abrupt("return",{res:v.res,uploads:w,bucket:v.data.Bucket,nextKeyMarker:v.data.NextKeyMarker,nextUploadIdMarker:v.data.NextUploadIdMarker,isTruncated:v.data.IsTruncated==="true"});case 15:case"end":return k.stop()}},null,this)},a.listParts=function(l,i,g,m){var v,w,_;return o.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:return m=m||{},v={},E(m).to(v),v.subres={uploadId:i},w=this._objectRequestParams("GET",l,v),w.query=g,w.xmlResponse=!0,w.successStatuses=[200],O.next=10,o.default.awrap(this.request(w));case 10:return _=O.sent,O.abrupt("return",{res:_.res,uploadId:_.data.UploadId,bucket:_.data.Bucket,name:_.data.Key,partNumberMarker:_.data.PartNumberMarker,nextPartNumberMarker:_.data.NextPartNumberMarker,maxParts:_.data.MaxParts,isTruncated:_.data.IsTruncated,parts:_.data.Part||[]});case 12:case"end":return O.stop()}},null,this)},a.abortMultipartUpload=function(l,i,g){var m,v,w;return o.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return this._stop(),g=g||{},m={},E(g).to(m),m.subres={uploadId:i},v=this._objectRequestParams("DELETE",l,m),v.successStatuses=[204],k.next=9,o.default.awrap(this.request(v));case 9:return w=k.sent,k.abrupt("return",{res:w.res});case 11:case"end":return k.stop()}},null,this)},a.initMultipartUpload=function(l,i){var g,m,v;return o.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return i=i||{},g={},E(i).to(g),g.headers=g.headers||{},this._convertMetaToHeaders(i.meta,g.headers),g.subres="uploads",m=this._objectRequestParams("POST",l,g),m.mime=i.mime,m.xmlResponse=!0,m.successStatuses=[200],_.next=12,o.default.awrap(this.request(m));case 12:return v=_.sent,_.abrupt("return",{res:v.res,bucket:v.data.Bucket,name:v.data.Key,uploadId:v.data.UploadId});case 14:case"end":return _.stop()}},null,this)},a.uploadPart=function(l,i,g,m,v,w,_){var k;return o.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return k={stream:this._createStream(m,v,w),size:w-v},M.next=3,o.default.awrap(this._uploadPart(l,i,g,k,_));case 3:return M.abrupt("return",M.sent);case 4:case"end":return M.stop()}},null,this)},a.completeMultipartUpload=function(l,i,g,m){var v,w,_,k,O,M,I,B;return o.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:for(v=g.concat().sort(function(Y,X){return Y.number-X.number}).filter(function(Y,X,P){return!X||Y.number!==P[X-1].number}),w=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,_=0;_<v.length;_++)k=v[_],w+=`<Part>
`,w+="<PartNumber>"+k.number+`</PartNumber>
`,w+="<ETag>"+k.etag+`</ETag>
`,w+=`</Part>
`;return w+="</CompleteMultipartUpload>",m=m||{},O={},O=d(m),O.headers&&delete O.headers["x-oss-server-side-encryption"],O.subres={uploadId:i},M=this._objectRequestParams("POST",l,O),b.encodeCallback(M,O),M.mime="xml",M.content=w,M.headers&&M.headers["x-oss-callback"]||(M.xmlResponse=!0),M.successStatuses=[200],y.next=17,o.default.awrap(this.request(M));case 17:return I=y.sent,B={res:I.res,bucket:M.bucket,name:l,etag:I.res.headers.etag},M.headers&&M.headers["x-oss-callback"]&&(B.data=JSON.parse(I.data.toString())),y.abrupt("return",B);case 21:case"end":return y.stop()}},null,this)},a._uploadPart=function(l,i,g,m,v){var w,_,k;return o.default.async(function(M){for(;;)switch(M.prev=M.next){case 0:return v=v||{},w={},E(v).to(w),w.headers={"Content-Length":m.size},w.subres={partNumber:g,uploadId:i},_=this._objectRequestParams("PUT",l,w),_.mime=w.mime,_.stream=m.stream,_.successStatuses=[200],M.next=11,o.default.awrap(this.request(_));case 11:if(k=M.sent,k.res.headers.etag){M.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 14:return m.stream=null,_.stream=null,M.abrupt("return",{name:l,etag:k.res.headers.etag,res:k.res});case 17:case"end":return M.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=d(h),S=u("babel-runtime/core-js/object/keys"),E=d(S),b=u("babel-runtime/helpers/typeof"),p=d(b);function d(i){return i&&i.__esModule?i:{default:i}}var a=u("../utils/checkBucketName"),s=a.checkBucketName,l=c;l.copy=function(g,m,v,w){var _,k,O;return o.default.async(function(I){for(;;)switch(I.prev=I.next){case 0:return(typeof v=="undefined"?"undefined":(0,p.default)(v))==="object"&&(w=v),w=w||{},w.headers=w.headers||{},(0,E.default)(w.headers).forEach(function(B){w.headers["x-oss-copy-source-"+B.toLowerCase()]=w.headers[B]}),w.meta&&(w.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(w.meta,w.headers),m=this._getSourceName(m,v),w.versionId&&(m=m+"?versionId="+w.versionId),w.headers["x-oss-copy-source"]=m,_=this._objectRequestParams("PUT",g,w),_.xmlResponse=!0,_.successStatuses=[200,304],I.next=14,o.default.awrap(this.request(_));case 14:return k=I.sent,O=k.data,O&&(O={etag:O.ETag,lastModified:O.LastModified}),I.abrupt("return",{data:O,res:k.res});case 18:case"end":return I.stop()}},null,this)},l._getSourceName=function(g,m){return typeof m=="string"?g=this._objectName(g):g[0]!=="/"?m=this.options.bucket:(m=g.replace(/\/(.+?)(\/.*)/,"$1"),g=g.replace(/(\/.+?\/)(.*)/,"$2")),s(m),g=encodeURI(g),g="/"+m+"/"+g,g}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.delete=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,i;return o.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s.subres=(0,E.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("DELETE",a,s),l.successStatuses=[204],m.next=6,o.default.awrap(this.request(l));case 6:return i=m.sent,m.abrupt("return",{res:i.res});case 8:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(l){return l&&l.__esModule?l:{default:l}}var p=u("utility"),d=u("../utils/obj2xml"),a=d.obj2xml,s=c;s.deleteMulti=function(i){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,v,w,_,k,O,M,I,B,N,y,Y;return o.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:if(m=[],!(!i||!i.length)){P.next=3;break}throw new Error("names is required");case 3:for(v=0;v<i.length;v++)w={},typeof i[v]=="string"?w.Key=p.escape(this._objectName(i[v])):(_=i[v],k=_.key,O=_.versionId,w.Key=p.escape(this._objectName(k)),w.VersionId=O),m.push(w);return M={Delete:{Quiet:!!g.quiet,Object:m}},I=a(M,{headers:!0}),g.subres=(0,E.default)({delete:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),B=this._objectRequestParams("POST","",g),B.mime="xml",B.content=I,B.xmlResponse=!0,B.successStatuses=[200],P.next=15,o.default.awrap(this.request(B));case 15:return N=P.sent,y=N.data,Y=y&&y.Deleted||null,Y&&(Array.isArray(Y)||(Y=[Y])),P.abrupt("return",{res:N.res,deleted:Y||[]});case 20:case"end":return P.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.deleteObjectTagging=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,i;return o.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s.subres=(0,E.default)({tagging:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),a=this._objectName(a),l=this._objectRequestParams("DELETE",a,s),l.successStatuses=[204],m.next=7,o.default.awrap(this.request(l));case 7:return i=m.sent,m.abrupt("return",{status:i.status,res:i.res});case 9:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(s){return s&&s.__esModule?s:{default:s}}var p=u("fs"),d=u("is-type-of"),a=c;a.get=function(l,i){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,v,w,_;return o.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:return m=null,v=!1,d.writableStream(i)?m=i:d.string(i)?(m=p.createWriteStream(i),v=!0):g=i,g=g||{},g.subres=(0,E.default)({},g.subres),g.versionId&&(g.subres.versionId=g.versionId),g.process&&(g.subres["x-oss-process"]=g.process),w=void 0,O.prev=8,_=this._objectRequestParams("GET",l,g),_.writeStream=m,_.successStatuses=[200,206,304],O.next=14,o.default.awrap(this.request(_));case 14:w=O.sent,v&&m.destroy(),O.next=25;break;case 18:if(O.prev=18,O.t0=O.catch(8),!v){O.next=24;break}return m.destroy(),O.next=24,o.default.awrap(this._deleteFileSafe(i));case 24:throw O.t0;case 25:return O.abrupt("return",{res:w.res,content:w.data});case 26:case"end":return O.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.getACL=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,i;return o.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s.subres=(0,E.default)({acl:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),a=this._objectName(a),l=this._objectRequestParams("GET",a,s),l.successStatuses=[200],l.xmlResponse=!0,m.next=8,o.default.awrap(this.request(l));case 8:return i=m.sent,m.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/keys"),o=d(h),S=u("babel-runtime/regenerator"),E=d(S),b=u("babel-runtime/core-js/object/assign"),p=d(b);function d(_){return _&&_.__esModule?_:{default:_}}var a=c,s=u("../utils/isObject"),l=s.isObject,i=u("../utils/isArray"),g=i.isArray;a.getBucketVersions=m,a.listObjectVersions=m;function m(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O,M,I,B,N,y;return E.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(!(_.versionIdMarker&&_.keyMarker===void 0)){X.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return k.subres=(0,p.default)({versions:""},k.subres),k.versionId&&(k.subres.versionId=k.versionId),O=this._objectRequestParams("GET","",k),O.xmlResponse=!0,O.successStatuses=[200],O.query=w(_),X.next=10,E.default.awrap(this.request(O));case 10:return M=X.sent,I=M.data.Version||[],B=M.data.DeleteMarker||[],N=this,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(P){return{name:P.Key,url:N._objectUrl(P.Key),lastModified:P.LastModified,isLatest:P.IsLatest==="true",versionId:P.VersionId,etag:P.ETag,type:P.Type,size:Number(P.Size),storageClass:P.StorageClass,owner:{id:P.Owner.ID,displayName:P.Owner.DisplayName}}})),B&&(g(B)||(B=[B]),B=B.map(function(P){return{name:P.Key,lastModified:P.LastModified,versionId:P.VersionId,owner:{id:P.Owner.ID,displayName:P.Owner.DisplayName}}})),y=M.data.CommonPrefixes||null,y&&(g(y)||(y=[y]),y=y.map(function(P){return P.Prefix})),X.abrupt("return",{res:M.res,objects:I,deleteMarker:B,prefixes:y,nextMarker:M.data.NextMarker||null,NextVersionIdMarker:M.data.NextVersionIdMarker||null,isTruncated:M.data.IsTruncated==="true"});case 19:case"end":return X.stop()}},null,this)}function v(_){return _.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k={};return l(_)&&(0,o.default)(_).forEach(function(O){k[v(O)]=_[O]}),k}},{"../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(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.getObjectMeta=function(a,s){var l,i;return o.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s=s||{},a=this._objectName(a),s.subres=(0,E.default)({objectMeta:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("HEAD",a,s),l.successStatuses=[200],m.next=8,o.default.awrap(this.request(l));case 8:return i=m.sent,m.abrupt("return",{status:i.status,res:i.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(s){return s&&s.__esModule?s:{default:s}}var p=c,d=u("../utils/isObject"),a=d.isObject;p.getObjectTagging=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,v,w,_;return o.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:return i.subres=(0,E.default)({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),l=this._objectName(l),g=this._objectRequestParams("GET",l,i),g.successStatuses=[200],O.next=7,o.default.awrap(this.request(g));case 7:return m=O.sent,O.next=10,o.default.awrap(this.parseXML(m.data));case 10:return v=O.sent,w=v.TagSet.Tag,w=w&&a(w)?[w]:w||[],_={},w.forEach(function(M){_[M.Key]=M.Value}),O.abrupt("return",{status:m.status,res:m.res,tag:_});case 16:case"end":return O.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.getSymlink=function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,i,g;return o.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return s.subres=(0,E.default)({symlink:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),a=this._objectName(a),l=this._objectRequestParams("GET",a,s),l.successStatuses=[200],v.next=7,o.default.awrap(this.request(l));case 7:return i=v.sent,g=i.res.headers["x-oss-symlink-target"],v.abrupt("return",{targetName:decodeURIComponent(g),res:i.res});case 10:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=d(h),S=u("babel-runtime/core-js/object/keys"),E=d(S),b=u("babel-runtime/core-js/object/assign"),p=d(b);function d(s){return s&&s.__esModule?s:{default:s}}var a=c;a.head=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,v;return o.default.async(function(_){for(;;)switch(_.prev=_.next){case 0:return i.subres=(0,p.default)({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),g=this._objectRequestParams("HEAD",l,i),g.successStatuses=[200,304],_.next=6,o.default.awrap(this.request(g));case 6:return m=_.sent,v={meta:null,res:m.res,status:m.status},m.status===200&&(0,E.default)(m.headers).forEach(function(k){k.indexOf("x-oss-meta-")===0&&(v.meta||(v.meta={}),v.meta[k.substring(11)]=m.headers[k])}),_.abrupt("return",v);case 10:case"end":return _.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.putACL=function(a,s,l){var i,g;return o.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return l=l||{},l.subres=(0,E.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.headers=l.headers||{},l.headers["x-oss-object-acl"]=s,a=this._objectName(a),i=this._objectRequestParams("PUT",a,l),i.successStatuses=[200],v.next=10,o.default.awrap(this.request(i));case 10:return g=v.sent,v.abrupt("return",{res:g.res});case 12:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=d(h),S=u("babel-runtime/core-js/object/keys"),E=d(S),b=u("babel-runtime/core-js/object/assign"),p=d(b);function d(m){return m&&m.__esModule?m:{default:m}}var a=u("../utils/obj2xml"),s=a.obj2xml,l=u("../utils/checkObjectTag"),i=l.checkObjectTag,g=c;g.putObjectTagging=function(v,w){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k,O,M;return o.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:return i(w),_.subres=(0,p.default)({tagging:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),v=this._objectName(v),k=this._objectRequestParams("PUT",v,_),k.successStatuses=[200],w=(0,E.default)(w).map(function(N){return{Key:N,Value:w[N]}}),O={Tagging:{TagSet:{Tag:w}}},k.mime="xml",k.content=s(O),B.next=12,o.default.awrap(this.request(k));case 12:return M=B.sent,B.abrupt("return",{res:M.res,status:M.status});case 14:case"end":return B.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(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/object/assign"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p.putSymlink=function(a,s,l){var i,g;return o.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return l=l||{},l.headers=l.headers||{},s=this._escape(this._objectName(s)),this._convertMetaToHeaders(l.meta,l.headers),l.headers["x-oss-symlink-target"]=s,l.subres=(0,E.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.storageClass&&(l.headers["x-oss-storage-class"]=l.storageClass),a=this._objectName(a),i=this._objectRequestParams("PUT",a,l),i.successStatuses=[200],v.next=13,o.default.awrap(this.request(i));case 13:return g=v.sent,v.abrupt("return",{res:g.res});case 15:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),o=b(h),S=u("babel-runtime/core-js/promise"),E=b(S);function b(d){return d&&d.__esModule?d:{default:d}}var p=c;p._parallelNode=function(a,s,l,i){var g,m,v,w,_,k,O,M;return o.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:g=this,m=[],v=[],w=a.length/s,_=a.length%s,k=_===0?w:(a.length-_)/s+1,O=1,M=0;case 8:if(!(M<a.length)){B.next=26;break}if(!g.isCancel()){B.next=11;break}return B.abrupt("break",26);case 11:if(i?v.push(l(g,a[M],i)):v.push(l(g,a[M])),!(v.length===s||O===k&&M===a.length-1)){B.next=23;break}return B.prev=13,O+=1,B.next=17,o.default.awrap(E.default.all(v));case 17:B.next=22;break;case 19:B.prev=19,B.t0=B.catch(13),m.push(B.t0);case 22:v=[];case 23:M++,B.next=8;break;case 26:return B.abrupt("return",m);case 27:case"end":return B.stop()}},null,this,[[13,19]])},p._parallel=function(a,s,l){var i=this;return new E.default(function(g){var m=[];if(s<=0||!a){g(m);return}function v(y){return function(){if(y===null)throw new Error("Callback was already called.");var Y=y;y=null;for(var X=arguments.length,P=Array(X),F=0;F<X;F++)P[F]=arguments[F];Y.apply(this,P)}}function w(y){var Y=-1,X=y.length;return function(){return++Y<X&&!i.isCancel()?{value:y[Y],key:Y}:null}}var _=w(a),k=!1,O=0,M=!1;function I(y,Y){O-=1,y?(k=!0,m.push(y),g(m)):Y==={}||k&&O<=0?(k=!0,g(m)):M||(i.isCancel()?g(m):N())}function B(y,Y){l(y).then(function(X){Y(null,X)}).catch(function(X){Y(X)})}function N(){for(M=!0;O<s&&!k&&!i.isCancel();){var y=_();if(y===null||m.length>0){k=!0,O<=0&&g(m);return}O+=1,B(y.value,v(I))}M=!1}N()})},p.cancel=function(a){this.options.cancelFlag=!0,a&&this.abortMultipartUpload(a.name,a.uploadId,a.options)},p.isCancel=function(){return this.options.cancelFlag},p.resetCancelFlag=function(){this.options.cancelFlag=!1},p._stop=function(){this.options.cancelFlag=!0},p._makeCancelEvent=function(){var a={status:0,name:"cancel"};return a}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/core-js/json/stringify"),S=p(o),E=u("babel-runtime/core-js/object/keys"),b=p(E);function p(s){return s&&s.__esModule?s:{default:s}}var d=u("./../../shims/crypto/crypto.js"),a=u("is-type-of");c.buildCanonicalizedResource=function(l,i){var g=""+l,m="?";if(a.string(i)&&i.trim()!=="")g+=m+i;else if(a.array(i))i.sort(),g+=m+i.join("&");else if(i){var v=function(k,O){return k[0]>O[0]?1:k[0]<O[0]?-1:0},w=function(k){g+=m+k,i[k]&&(g+="="+i[k]),m="&"};(0,b.default)(i).sort(v).forEach(w)}return g},c.buildCanonicalString=function(l,i,g,m){g=g||{};var v=g.headers||{},w="x-oss-",_=[],k={},O=[l.toUpperCase(),v["Content-Md5"]||"",v["Content-Type"]||v["Content-Type".toLowerCase()],m||v["x-oss-date"]];return(0,b.default)(v).forEach(function(M){var I=M.toLowerCase();I.indexOf(w)===0&&(k[I]=String(v[M]).trim())}),(0,b.default)(k).sort().forEach(function(M){_.push(M+":"+k[M])}),O=O.concat(_),O.push(this.buildCanonicalizedResource(i,g.parameters)),O.join(`
`)},c.computeSignature=function(l,i){var g=d.createHmac("sha1",l);return g.update(h.from(i,"utf8")).digest("base64")},c.authorization=function(l,i,g){return"OSS "+l+":"+this.computeSignature(i,g)},c._signatureForURL=function(l){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=arguments[2],m=arguments[3],v={},w=i.subResource,_=w===void 0?{}:w;if(i.process){var k="x-oss-process";_[k]=i.process}if(i.trafficLimit){var O="x-oss-traffic-limit";_[O]=i.trafficLimit}if(i.response&&(0,b.default)(i.response).forEach(function(N){var y="response-"+N.toLowerCase();_[y]=i.response[N]}),(0,b.default)(i).forEach(function(N){var y=N.toLowerCase(),Y=i[N];y.indexOf("x-oss-")===0?v[y]=Y:(y.indexOf("content-md5")===0||y.indexOf("content-type")===0)&&(v[N]=Y)}),Object.prototype.hasOwnProperty.call(i,"security-token")&&(_["security-token"]=i["security-token"]),Object.prototype.hasOwnProperty.call(i,"callback")){var M={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};if(i.callback.host&&(M.callbackHost=i.callback.host),i.callback.contentType&&(M.callbackBodyType=i.callback.contentType),_.callback=h.from((0,S.default)(M)).toString("base64"),i.callback.customValue){var I={};(0,b.default)(i.callback.customValue).forEach(function(N){I["x:"+N]=i.callback.customValue[N]}),_["callback-var"]=h.from((0,S.default)(I)).toString("base64")}}var B=this.buildCanonicalString(i.method,g,{headers:v,parameters:_},m.toString());return{Signature:this.computeSignature(l,B),subResource:_}}}).call(this,u("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(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.checkBucketName=void 0,c.checkBucketName=function(h,o){var S=o?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(h))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/entries"),o=S(h);function S(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(c,"__esModule",{value:!0}),c.checkObjectTag=void 0;var E=u("./checkValid"),b=E.checkValid,p=u("./isObject"),d=p.isObject,a=[{validator:function(g){if(typeof g!="string")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 (/)"}],s={key:[].concat(a,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(a,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function l(i){if(!d(i))throw new Error("tag must be Object");var g=(0,o.default)(i);if(g.length>10)throw new Error("maximum of 10 tags for a object");var m=["key","value"];g.forEach(function(v){v.forEach(function(w,_){b(w,s[m[_]])})})}c.checkObjectTag=l},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.checkValid=void 0;function h(o,S){S.forEach(function(E){if(E.validator)E.validator(o);else if(E.pattern&&!E.pattern.test(o))throw new Error(E.msg)})}c.checkValid=h},{}],38:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/core-js/object/assign"),S=E(o);function E(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(c,"__esModule",{value:!0}),c.createRequest=void 0;var b=u("./../../../shims/crypto/crypto.js"),p=u("debug")("ali-oss"),d=u("mime"),a=u("dateformat"),s=u("copy-to"),l=u("path");function i(v,w){return v[w]||v[w.toLowerCase()]}function g(v,w){delete v[w],delete v[w.toLowerCase()]}function m(v){var w=new Date;this.options.amendTimeSkewed&&(w=+new Date+this.options.amendTimeSkewed);var _={"x-oss-date":a(w,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(_["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(_,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(_["x-oss-security-token"]=this.options.stsToken),s(v.headers).to(_),i(_,"Content-Type")||(v.mime&&v.mime.indexOf("/")>0?_["Content-Type"]=v.mime:_["Content-Type"]=d.getType(v.mime||l.extname(v.object||""))),i(_,"Content-Type")||g(_,"Content-Type"),v.content&&(_["Content-Md5"]=b.createHash("md5").update(h.from(v.content,"utf8")).digest("base64"),_["Content-Length"]||(_["Content-Length"]=v.content.length));var k=this._getResource(v);_.authorization=this.authorization(v.method,k,v.subres,_);var O=this._getReqUrl(v);p("request %s %s, with headers %j, !!stream: %s",v.method,O,_,!!v.stream);var M=v.timeout||this.options.timeout,I={method:v.method,content:v.content,stream:v.stream,headers:_,timeout:M,writeStream:v.writeStream,customResponse:v.customResponse,ctx:v.ctx||this.ctx};return this.agent&&(I.agent=this.agent),this.httpsAgent&&(I.httpsAgent=this.httpsAgent),{url:O,params:I}}c.createRequest=m}).call(this,u("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(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/keys"),o=b(h),S=u("babel-runtime/helpers/typeof"),E=b(S);function b(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(c,"__esModule",{value:!0}),c.deepCopy=void 0,c.deepCopy=function(p){if(p===null||(typeof p=="undefined"?"undefined":(0,E.default)(p))!=="object")return p;var d=Array.isArray(p)?[]:{};return(0,o.default)(p).forEach(function(a){d[a]=c.deepCopy(p[a])}),d}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/keys"),o=b(h),S=u("babel-runtime/helpers/typeof"),E=b(S);function b(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0}),c.formatObjKey=void 0;function p(a,s){if(a===null||(typeof a=="undefined"?"undefined":(0,E.default)(a))!=="object")return a;var l=void 0;if(Array.isArray(a)){l=[];for(var i=0;i<a.length;i++)l.push(p(a[i],s))}else l={},(0,o.default)(a).forEach(function(g){l[d(g,s)]=p(a[g],s)});return l}c.formatObjKey=p;function d(a,s){return s==="firstUpperCase"?a=a.replace(/^./,function(l){return l.toUpperCase()}):s==="firstLowerCase"&&(a=a.replace(/^./,function(l){return l.toLowerCase()})),a}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.getStrBytesCount=void 0;function h(o){for(var S=0,E=0;E<o.length;E++){var b=o.charAt(E);/^[\u00-\uff]$/.test(b)?S+=1:S+=2}return S}c.getStrBytesCount=h},{}],42:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isArray=void 0,c.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{}],43:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isBlob=void 0;function h(o){return typeof Blob!="undefined"&&o instanceof Blob}c.isBlob=h},{}],44:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isFile=void 0,c.isFile=function(h){return typeof File!="undefined"&&h instanceof File}},{}],45:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isIP=void 0,c.isIP=function(h){var o=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,S=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return o.test(h)||S.test(h)}},{}],46:[function(u,G,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isObject=void 0,c.isObject=function(h){return Object.prototype.toString.call(h)==="[object Object]"}},{}],47:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/keys"),o=S(h);function S(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(c,"__esModule",{value:!0}),c.obj2xml=void 0;var E=u("./formatObjKey");function b(d){return Object.prototype.toString.call(d).replace(/(.*? |])/g,"").toLowerCase()}function p(d,a){var s="";return a&&a.headers&&(s=`<?xml version="1.0" encoding="UTF-8"?>
`),a&&a.firstUpperCase&&(d=E.formatObjKey(d,"firstUpperCase")),b(d)==="object"?(0,o.default)(d).forEach(function(l){b(d[l])==="string"||b(d[l])==="number"?s+="<"+l+">"+d[l]+"</"+l+">":b(d[l])==="object"?s+="<"+l+">"+p(d[l])+"</"+l+">":b(d[l])==="array"?s+=d[l].map(function(i){return"<"+l+">"+p(i)+"</"+l+">"}).join(""):s+="<"+l+">"+d[l].toString()+"</"+l+">"}):s+=d.toString(),s}c.obj2xml=p},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(u,G,c){G.exports=h,G.exports.HttpsAgent=h;function h(){}},{}],49:[function(u,G,c){G.exports=u("./register")().Promise},{"./register":51}],50:[function(u,G,c){"use strict";var h="@@any-promise/REGISTRATION",o=null;G.exports=function(S,E){return function(p,d){p=p||null,d=d||{};var a=d.global!==!1;if(o===null&&a&&(o=S[h]||null),o!==null&&p!==null&&o.implementation!==p)throw new Error('any-promise already defined as "'+o.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return o===null&&(p!==null&&typeof d.Promise!="undefined"?o={Promise:d.Promise,implementation:p}:o=E(p),a&&(S[h]=o)),o}}},{}],51:[function(u,G,c){"use strict";G.exports=u("./loader")(window,h);function h(){if(typeof window.Promise=="undefined")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(u,G,c){G.exports={default:u("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(u,G,c){G.exports={default:u("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(u,G,c){G.exports={default:u("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(u,G,c){G.exports={default:u("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(u,G,c){G.exports={default:u("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(u,G,c){G.exports={default:u("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(u,G,c){G.exports={default:u("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(u,G,c){G.exports={default:u("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(u,G,c){G.exports={default:u("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(u,G,c){"use strict";c.__esModule=!0;var h=u("../core-js/symbol/iterator"),o=p(h),S=u("../core-js/symbol"),E=p(S),b=typeof E.default=="function"&&typeof o.default=="symbol"?function(d){return typeof d}:function(d){return d&&typeof E.default=="function"&&d.constructor===E.default&&d!==E.default.prototype?"symbol":typeof d};function p(d){return d&&d.__esModule?d:{default:d}}c.default=typeof E.default=="function"&&b(o.default)==="symbol"?function(d){return typeof d=="undefined"?"undefined":b(d)}:function(d){return d&&typeof E.default=="function"&&d.constructor===E.default&&d!==E.default.prototype?"symbol":typeof d=="undefined"?"undefined":b(d)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(u,G,c){G.exports=u("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(u,G,c){"use strict";c.byteLength=a,c.toByteArray=l,c.fromByteArray=m;for(var h=[],o=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b=0,p=E.length;b<p;++b)h[b]=E[b],o[E.charCodeAt(b)]=b;o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;function d(v){var w=v.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=v.indexOf("=");_===-1&&(_=w);var k=_===w?0:4-_%4;return[_,k]}function a(v){var w=d(v),_=w[0],k=w[1];return(_+k)*3/4-k}function s(v,w,_){return(w+_)*3/4-_}function l(v){var w,_=d(v),k=_[0],O=_[1],M=new S(s(v,k,O)),I=0,B=O>0?k-4:k,N;for(N=0;N<B;N+=4)w=o[v.charCodeAt(N)]<<18|o[v.charCodeAt(N+1)]<<12|o[v.charCodeAt(N+2)]<<6|o[v.charCodeAt(N+3)],M[I++]=w>>16&255,M[I++]=w>>8&255,M[I++]=w&255;return O===2&&(w=o[v.charCodeAt(N)]<<2|o[v.charCodeAt(N+1)]>>4,M[I++]=w&255),O===1&&(w=o[v.charCodeAt(N)]<<10|o[v.charCodeAt(N+1)]<<4|o[v.charCodeAt(N+2)]>>2,M[I++]=w>>8&255,M[I++]=w&255),M}function i(v){return h[v>>18&63]+h[v>>12&63]+h[v>>6&63]+h[v&63]}function g(v,w,_){for(var k,O=[],M=w;M<_;M+=3)k=(v[M]<<16&16711680)+(v[M+1]<<8&65280)+(v[M+2]&255),O.push(i(k));return O.join("")}function m(v){for(var w,_=v.length,k=_%3,O=[],M=16383,I=0,B=_-k;I<B;I+=M)O.push(g(v,I,I+M>B?B:I+M));return k===1?(w=v[_-1],O.push(h[w>>2]+h[w<<4&63]+"==")):k===2&&(w=(v[_-2]<<8)+v[_-1],O.push(h[w>>10]+h[w>>4&63]+h[w<<2&63]+"=")),O.join("")}},{}],70:[function(u,G,c){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(h,o,S){typeof G!="undefined"&&G.exports?G.exports=S():typeof define=="function"&&define.amd?define(o,S):h[o]=S()}(this,"bowser",function(){var h=!0;function o(s){function l(U){var R=s.match(U);return R&&R.length>1&&R[1]||""}function i(U){var R=s.match(U);return R&&R.length>1&&R[2]||""}var g=l(/(ipod|iphone|ipad)/i).toLowerCase(),m=/like android/i.test(s),v=!m&&/android/i.test(s),w=/nexus\s*[0-6]\s*/i.test(s),_=!w&&/nexus\s*[0-9]+/i.test(s),k=/CrOS/.test(s),O=/silk/i.test(s),M=/sailfish/i.test(s),I=/tizen/i.test(s),B=/(web|hpw)(o|0)s/i.test(s),N=/windows phone/i.test(s),y=/SamsungBrowser/i.test(s),Y=!N&&/windows/i.test(s),X=!g&&!O&&/macintosh/i.test(s),P=!v&&!M&&!I&&!B&&/linux/i.test(s),F=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),K=l(/version\/(\d+(\.\d+)?)/i),Q=/tablet/i.test(s)&&!/tablet pc/i.test(s),ce=!Q&&/[^-]mobi/i.test(s),fe=/xbox/i.test(s),z;/opera/i.test(s)?z={name:"Opera",opera:h,version:K||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?z={name:"Opera",opera:h,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||K}:/SamsungBrowser/i.test(s)?z={name:"Samsung Internet for Android",samsungBrowser:h,version:K||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(s)?z={name:"NAVER Whale browser",whale:h,version:l(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(s)?z={name:"MZ Browser",mzbrowser:h,version:l(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(s)?z={name:"Opera Coast",coast:h,version:K||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(s)?z={name:"Focus",focus:h,version:l(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(s)?z={name:"Yandex Browser",yandexbrowser:h,version:K||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?z={name:"UC Browser",ucbrowser:h,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?z={name:"Maxthon",maxthon:h,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?z={name:"Epiphany",epiphany:h,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?z={name:"Puffin",puffin:h,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?z={name:"Sleipnir",sleipnir:h,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?z={name:"K-Meleon",kMeleon:h,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:N?(z={name:"Windows Phone",osname:"Windows Phone",windowsphone:h},F?(z.msedge=h,z.version=F):(z.msie=h,z.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?z={name:"Internet Explorer",msie:h,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:k?z={name:"Chrome",osname:"Chrome OS",chromeos:h,chromeBook:h,chrome:h,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?z={name:"Microsoft Edge",msedge:h,version:F}:/vivaldi/i.test(s)?z={name:"Vivaldi",vivaldi:h,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||K}:M?z={name:"Sailfish",osname:"Sailfish OS",sailfish:h,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?z={name:"SeaMonkey",seamonkey:h,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(z={name:"Firefox",firefox:h,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(z.firefoxos=h,z.osname="Firefox OS")):O?z={name:"Amazon Silk",silk:h,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?z={name:"PhantomJS",phantom:h,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?z={name:"SlimerJS",slimer:h,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?z={name:"BlackBerry",osname:"BlackBerry OS",blackberry:h,version:K||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:B?(z={name:"WebOS",osname:"WebOS",webos:h,version:K||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(z.touchpad=h)):/bada/i.test(s)?z={name:"Bada",osname:"Bada",bada:h,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:I?z={name:"Tizen",osname:"Tizen",tizen:h,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||K}:/qupzilla/i.test(s)?z={name:"QupZilla",qupzilla:h,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||K}:/chromium/i.test(s)?z={name:"Chromium",chromium:h,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||K}:/chrome|crios|crmo/i.test(s)?z={name:"Chrome",chrome:h,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:v?z={name:"Android",version:K}:/safari|applewebkit/i.test(s)?(z={name:"Safari",safari:h},K&&(z.version=K)):g?(z={name:g=="iphone"?"iPhone":g=="ipad"?"iPad":"iPod"},K&&(z.version=K)):/googlebot/i.test(s)?z={name:"Googlebot",googlebot:h,version:l(/googlebot\/(\d+(\.\d+))/i)||K}:z={name:l(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!z.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(z.name=z.name||"Blink",z.blink=h):(z.name=z.name||"Webkit",z.webkit=h),!z.version&&K&&(z.version=K)):!z.opera&&/gecko\//i.test(s)&&(z.name=z.name||"Gecko",z.gecko=h,z.version=z.version||l(/gecko\/(\d+(\.\d+)?)/i)),!z.windowsphone&&(v||z.silk)?(z.android=h,z.osname="Android"):!z.windowsphone&&g?(z[g]=h,z.ios=h,z.osname="iOS"):X?(z.mac=h,z.osname="macOS"):fe?(z.xbox=h,z.osname="Xbox"):Y?(z.windows=h,z.osname="Windows"):P&&(z.linux=h,z.osname="Linux");function se(U){switch(U){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}}var $="";z.windows?$=se(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):z.windowsphone?$=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):z.mac?($=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),$=$.replace(/[_\s]/g,".")):g?($=l(/os (\d+([_\s]\d+)*) like mac os x/i),$=$.replace(/[_\s]/g,".")):v?$=l(/android[ \/-](\d+(\.\d+)*)/i):z.webos?$=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):z.blackberry?$=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):z.bada?$=l(/bada\/(\d+(\.\d+)*)/i):z.tizen&&($=l(/tizen[\/\s](\d+(\.\d+)*)/i)),$&&(z.osversion=$);var j=!z.windows&&$.split(".")[0];return Q||_||g=="ipad"||v&&(j==3||j>=4&&!ce)||z.silk?z.tablet=h:(ce||g=="iphone"||g=="ipod"||v||w||z.blackberry||z.webos||z.bada)&&(z.mobile=h),z.msedge||z.msie&&z.version>=10||z.yandexbrowser&&z.version>=15||z.vivaldi&&z.version>=1||z.chrome&&z.version>=20||z.samsungBrowser&&z.version>=4||z.whale&&p([z.version,"1.0"])===1||z.mzbrowser&&p([z.version,"6.0"])===1||z.focus&&p([z.version,"1.0"])===1||z.firefox&&z.version>=20||z.safari&&z.version>=6||z.opera&&z.version>=10||z.ios&&z.osversion&&z.osversion.split(".")[0]>=6||z.blackberry&&z.version>=10.1||z.chromium&&z.version>=20?z.a=h:z.msie&&z.version<10||z.chrome&&z.version<20||z.firefox&&z.version<20||z.safari&&z.version<6||z.opera&&z.version<10||z.ios&&z.osversion&&z.osversion.split(".")[0]<6||z.chromium&&z.version<20?z.c=h:z.x=h,z}var S=o(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(s){for(var l=0;l<s.length;++l){var i=s[l];if(typeof i=="string"&&i in S)return!0}return!1};function E(s){return s.split(".").length}function b(s,l){var i=[],g;if(Array.prototype.map)return Array.prototype.map.call(s,l);for(g=0;g<s.length;g++)i.push(l(s[g]));return i}function p(s){for(var l=Math.max(E(s[0]),E(s[1])),i=b(s,function(g){var m=l-E(g);return g=g+new Array(m+1).join(".0"),b(g.split("."),function(v){return new Array(20-v.length).join("0")+v}).reverse()});--l>=0;){if(i[0][l]>i[1][l])return 1;if(i[0][l]===i[1][l]){if(l===0)return 0}else return-1}}function d(s,l,i){var g=S;typeof l=="string"&&(i=l,l=void 0),l===void 0&&(l=!1),i&&(g=o(i));var m=""+g.version;for(var v in s)if(s.hasOwnProperty(v)&&g[v]){if(typeof s[v]!="string")throw new Error("Browser version in the minVersion map should be a string: "+v+": "+String(s));return p([m,s[v]])<0}return l}function a(s,l,i){return!d(s,l,i)}return S.isUnsupportedBrowser=d,S.compareVersions=p,S.check=a,S._detect=o,S.detect=o,S})},{}],71:[function(u,G,c){},{}],72:[function(u,G,c){var h=u("buffer").Buffer,o=h.isEncoding||function(a){switch(a&&a.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(a){if(a&&!o(a))throw new Error("Unknown encoding: "+a)}var E=c.StringDecoder=function(a){this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),S(a);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=p;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=d;break;default:this.write=b;return}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};E.prototype.write=function(a){for(var s="";this.charLength;){var l=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";a=a.slice(l,a.length),s=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var g=s.charCodeAt(s.length-1);if(g>=55296&&g<=56319){this.charLength+=this.surrogateSize,s="";continue}if(this.charReceived=this.charLength=0,a.length===0)return s;break}this.detectIncompleteChar(a);var i=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,i),i-=this.charReceived),s+=a.toString(this.encoding,0,i);var i=s.length-1,g=s.charCodeAt(i);if(g>=55296&&g<=56319){var m=this.surrogateSize;return this.charLength+=m,this.charReceived+=m,this.charBuffer.copy(this.charBuffer,m,0,m),a.copy(this.charBuffer,0,0,m),s.substring(0,i)}return s},E.prototype.detectIncompleteChar=function(a){for(var s=a.length>=3?3:a.length;s>0;s--){var l=a[a.length-s];if(s==1&&l>>5==6){this.charLength=2;break}if(s<=2&&l>>4==14){this.charLength=3;break}if(s<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=s},E.prototype.end=function(a){var s="";if(a&&a.length&&(s=this.write(a)),this.charReceived){var l=this.charReceived,i=this.charBuffer,g=this.encoding;s+=i.slice(0,l).toString(g)}return s};function b(a){return a.toString(this.encoding)}function p(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function d(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(u,G,c){(function(h,o){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var S=u("base64-js"),E=u("ieee754"),b=u("isarray");c.Buffer=o,c.SlowBuffer=O,c.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:p(),c.kMaxLength=d();function p(){try{var q=new Uint8Array(1);return q.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},q.foo()===42&&typeof q.subarray=="function"&&q.subarray(1,1).byteLength===0}catch(H){return!1}}function d(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(q,H){if(d()<H)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(q=new Uint8Array(H),q.__proto__=o.prototype):(q===null&&(q=new o(H)),q.length=H),q}function o(q,H,T){if(!o.TYPED_ARRAY_SUPPORT&&!(this instanceof o))return new o(q,H,T);if(typeof q=="number"){if(typeof H=="string")throw new Error("If encoding is specified then the first argument must be a string");return g(this,q)}return s(this,q,H,T)}o.poolSize=8192,o._augment=function(q){return q.__proto__=o.prototype,q};function s(q,H,T,W){if(typeof H=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&H instanceof ArrayBuffer?w(q,H,T,W):typeof H=="string"?m(q,H,T):_(q,H)}o.from=function(q,H,T){return s(null,q,H,T)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0}));function l(q){if(typeof q!="number")throw new TypeError('"size" argument must be a number');if(q<0)throw new RangeError('"size" argument must not be negative')}function i(q,H,T,W){return l(H),H<=0?a(q,H):T!==void 0?typeof W=="string"?a(q,H).fill(T,W):a(q,H).fill(T):a(q,H)}o.alloc=function(q,H,T){return i(null,q,H,T)};function g(q,H){if(l(H),q=a(q,H<0?0:k(H)|0),!o.TYPED_ARRAY_SUPPORT)for(var T=0;T<H;++T)q[T]=0;return q}o.allocUnsafe=function(q){return g(null,q)},o.allocUnsafeSlow=function(q){return g(null,q)};function m(q,H,T){if((typeof T!="string"||T==="")&&(T="utf8"),!o.isEncoding(T))throw new TypeError('"encoding" must be a valid string encoding');var W=M(H,T)|0;q=a(q,W);var we=q.write(H,T);return we!==W&&(q=q.slice(0,we)),q}function v(q,H){var T=H.length<0?0:k(H.length)|0;q=a(q,T);for(var W=0;W<T;W+=1)q[W]=H[W]&255;return q}function w(q,H,T,W){if(H.byteLength,T<0||H.byteLength<T)throw new RangeError("'offset' is out of bounds");if(H.byteLength<T+(W||0))throw new RangeError("'length' is out of bounds");return T===void 0&&W===void 0?H=new Uint8Array(H):W===void 0?H=new Uint8Array(H,T):H=new Uint8Array(H,T,W),o.TYPED_ARRAY_SUPPORT?(q=H,q.__proto__=o.prototype):q=v(q,H),q}function _(q,H){if(o.isBuffer(H)){var T=k(H.length)|0;return q=a(q,T),q.length===0||H.copy(q,0,0,T),q}if(H){if(typeof ArrayBuffer!="undefined"&&H.buffer instanceof ArrayBuffer||"length"in H)return typeof H.length!="number"||Ce(H.length)?a(q,0):v(q,H);if(H.type==="Buffer"&&b(H.data))return v(q,H.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function k(q){if(q>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return q|0}function O(q){return+q!=q&&(q=0),o.alloc(+q)}o.isBuffer=function(H){return!!(H!=null&&H._isBuffer)},o.compare=function(H,T){if(!o.isBuffer(H)||!o.isBuffer(T))throw new TypeError("Arguments must be Buffers");if(H===T)return 0;for(var W=H.length,we=T.length,ye=0,Oe=Math.min(W,we);ye<Oe;++ye)if(H[ye]!==T[ye]){W=H[ye],we=T[ye];break}return W<we?-1:we<W?1:0},o.isEncoding=function(H){switch(String(H).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(H,T){if(!b(H))throw new TypeError('"list" argument must be an Array of Buffers');if(H.length===0)return o.alloc(0);var W;if(T===void 0)for(T=0,W=0;W<H.length;++W)T+=H[W].length;var we=o.allocUnsafe(T),ye=0;for(W=0;W<H.length;++W){var Oe=H[W];if(!o.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(we,ye),ye+=Oe.length}return we};function M(q,H){if(o.isBuffer(q))return q.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(q)||q instanceof ArrayBuffer))return q.byteLength;typeof q!="string"&&(q=""+q);var T=q.length;if(T===0)return 0;for(var W=!1;;)switch(H){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":case void 0:return re(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return V(q).length;default:if(W)return re(q).length;H=(""+H).toLowerCase(),W=!0}}o.byteLength=M;function I(q,H,T){var W=!1;if((H===void 0||H<0)&&(H=0),H>this.length)return"";if((T===void 0||T>this.length)&&(T=this.length),T<=0)return"";if(T>>>=0,H>>>=0,T<=H)return"";for(q||(q="utf8");;)switch(q){case"hex":return U(this,H,T);case"utf8":case"utf-8":return fe(this,H,T);case"ascii":return $(this,H,T);case"latin1":case"binary":return j(this,H,T);case"base64":return ce(this,H,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,H,T);default:if(W)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),W=!0}}o.prototype._isBuffer=!0;function B(q,H,T){var W=q[H];q[H]=q[T],q[T]=W}o.prototype.swap16=function(){var H=this.length;if(H%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var T=0;T<H;T+=2)B(this,T,T+1);return this},o.prototype.swap32=function(){var H=this.length;if(H%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var T=0;T<H;T+=4)B(this,T,T+3),B(this,T+1,T+2);return this},o.prototype.swap64=function(){var H=this.length;if(H%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var T=0;T<H;T+=8)B(this,T,T+7),B(this,T+1,T+6),B(this,T+2,T+5),B(this,T+3,T+4);return this},o.prototype.toString=function(){var H=this.length|0;return H===0?"":arguments.length===0?fe(this,0,H):I.apply(this,arguments)},o.prototype.equals=function(H){if(!o.isBuffer(H))throw new TypeError("Argument must be a Buffer");return this===H?!0:o.compare(this,H)===0},o.prototype.inspect=function(){var H="",T=c.INSPECT_MAX_BYTES;return this.length>0&&(H=this.toString("hex",0,T).match(/.{2}/g).join(" "),this.length>T&&(H+=" ... ")),"<Buffer "+H+">"},o.prototype.compare=function(H,T,W,we,ye){if(!o.isBuffer(H))throw new TypeError("Argument must be a Buffer");if(T===void 0&&(T=0),W===void 0&&(W=H?H.length:0),we===void 0&&(we=0),ye===void 0&&(ye=this.length),T<0||W>H.length||we<0||ye>this.length)throw new RangeError("out of range index");if(we>=ye&&T>=W)return 0;if(we>=ye)return-1;if(T>=W)return 1;if(T>>>=0,W>>>=0,we>>>=0,ye>>>=0,this===H)return 0;for(var Oe=ye-we,Be=W-T,Fe=Math.min(Oe,Be),Ue=this.slice(we,ye),Ge=H.slice(T,W),Ye=0;Ye<Fe;++Ye)if(Ue[Ye]!==Ge[Ye]){Oe=Ue[Ye],Be=Ge[Ye];break}return Oe<Be?-1:Be<Oe?1:0};function N(q,H,T,W,we){if(q.length===0)return-1;if(typeof T=="string"?(W=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,isNaN(T)&&(T=we?0:q.length-1),T<0&&(T=q.length+T),T>=q.length){if(we)return-1;T=q.length-1}else if(T<0)if(we)T=0;else return-1;if(typeof H=="string"&&(H=o.from(H,W)),o.isBuffer(H))return H.length===0?-1:y(q,H,T,W,we);if(typeof H=="number")return H=H&255,o.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?we?Uint8Array.prototype.indexOf.call(q,H,T):Uint8Array.prototype.lastIndexOf.call(q,H,T):y(q,[H],T,W,we);throw new TypeError("val must be string, number or Buffer")}function y(q,H,T,W,we){var ye=1,Oe=q.length,Be=H.length;if(W!==void 0&&(W=String(W).toLowerCase(),W==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(q.length<2||H.length<2)return-1;ye=2,Oe/=2,Be/=2,T/=2}function Fe(Je,Ne){return ye===1?Je[Ne]:Je.readUInt16BE(Ne*ye)}var Ue;if(we){var Ge=-1;for(Ue=T;Ue<Oe;Ue++)if(Fe(q,Ue)===Fe(H,Ge===-1?0:Ue-Ge)){if(Ge===-1&&(Ge=Ue),Ue-Ge+1===Be)return Ge*ye}else Ge!==-1&&(Ue-=Ue-Ge),Ge=-1}else for(T+Be>Oe&&(T=Oe-Be),Ue=T;Ue>=0;Ue--){for(var Ye=!0,Xe=0;Xe<Be;Xe++)if(Fe(q,Ue+Xe)!==Fe(H,Xe)){Ye=!1;break}if(Ye)return Ue}return-1}o.prototype.includes=function(H,T,W){return this.indexOf(H,T,W)!==-1},o.prototype.indexOf=function(H,T,W){return N(this,H,T,W,!0)},o.prototype.lastIndexOf=function(H,T,W){return N(this,H,T,W,!1)};function Y(q,H,T,W){T=Number(T)||0;var we=q.length-T;W?(W=Number(W),W>we&&(W=we)):W=we;var ye=H.length;if(ye%2!==0)throw new TypeError("Invalid hex string");W>ye/2&&(W=ye/2);for(var Oe=0;Oe<W;++Oe){var Be=parseInt(H.substr(Oe*2,2),16);if(isNaN(Be))return Oe;q[T+Oe]=Be}return Oe}function X(q,H,T,W){return J(re(H,q.length-T),q,T,W)}function P(q,H,T,W){return J(Z(H),q,T,W)}function F(q,H,T,W){return P(q,H,T,W)}function K(q,H,T,W){return J(V(H),q,T,W)}function Q(q,H,T,W){return J(ue(H,q.length-T),q,T,W)}o.prototype.write=function(H,T,W,we){if(T===void 0)we="utf8",W=this.length,T=0;else if(W===void 0&&typeof T=="string")we=T,W=this.length,T=0;else if(isFinite(T))T=T|0,isFinite(W)?(W=W|0,we===void 0&&(we="utf8")):(we=W,W=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ye=this.length-T;if((W===void 0||W>ye)&&(W=ye),H.length>0&&(W<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");we||(we="utf8");for(var Oe=!1;;)switch(we){case"hex":return Y(this,H,T,W);case"utf8":case"utf-8":return X(this,H,T,W);case"ascii":return P(this,H,T,W);case"latin1":case"binary":return F(this,H,T,W);case"base64":return K(this,H,T,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,H,T,W);default:if(Oe)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Oe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ce(q,H,T){return H===0&&T===q.length?S.fromByteArray(q):S.fromByteArray(q.slice(H,T))}function fe(q,H,T){T=Math.min(q.length,T);for(var W=[],we=H;we<T;){var ye=q[we],Oe=null,Be=ye>239?4:ye>223?3:ye>191?2:1;if(we+Be<=T){var Fe,Ue,Ge,Ye;switch(Be){case 1:ye<128&&(Oe=ye);break;case 2:Fe=q[we+1],(Fe&192)===128&&(Ye=(ye&31)<<6|Fe&63,Ye>127&&(Oe=Ye));break;case 3:Fe=q[we+1],Ue=q[we+2],(Fe&192)===128&&(Ue&192)===128&&(Ye=(ye&15)<<12|(Fe&63)<<6|Ue&63,Ye>2047&&(Ye<55296||Ye>57343)&&(Oe=Ye));break;case 4:Fe=q[we+1],Ue=q[we+2],Ge=q[we+3],(Fe&192)===128&&(Ue&192)===128&&(Ge&192)===128&&(Ye=(ye&15)<<18|(Fe&63)<<12|(Ue&63)<<6|Ge&63,Ye>65535&&Ye<1114112&&(Oe=Ye))}}Oe===null?(Oe=65533,Be=1):Oe>65535&&(Oe-=65536,W.push(Oe>>>10&1023|55296),Oe=56320|Oe&1023),W.push(Oe),we+=Be}return se(W)}var z=4096;function se(q){var H=q.length;if(H<=z)return String.fromCharCode.apply(String,q);for(var T="",W=0;W<H;)T+=String.fromCharCode.apply(String,q.slice(W,W+=z));return T}function $(q,H,T){var W="";T=Math.min(q.length,T);for(var we=H;we<T;++we)W+=String.fromCharCode(q[we]&127);return W}function j(q,H,T){var W="";T=Math.min(q.length,T);for(var we=H;we<T;++we)W+=String.fromCharCode(q[we]);return W}function U(q,H,T){var W=q.length;(!H||H<0)&&(H=0),(!T||T<0||T>W)&&(T=W);for(var we="",ye=H;ye<T;++ye)we+=ee(q[ye]);return we}function R(q,H,T){for(var W=q.slice(H,T),we="",ye=0;ye<W.length;ye+=2)we+=String.fromCharCode(W[ye]+W[ye+1]*256);return we}o.prototype.slice=function(H,T){var W=this.length;H=~~H,T=T===void 0?W:~~T,H<0?(H+=W,H<0&&(H=0)):H>W&&(H=W),T<0?(T+=W,T<0&&(T=0)):T>W&&(T=W),T<H&&(T=H);var we;if(o.TYPED_ARRAY_SUPPORT)we=this.subarray(H,T),we.__proto__=o.prototype;else{var ye=T-H;we=new o(ye,void 0);for(var Oe=0;Oe<ye;++Oe)we[Oe]=this[Oe+H]}return we};function C(q,H,T){if(q%1!==0||q<0)throw new RangeError("offset is not uint");if(q+H>T)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUIntLE=function(H,T,W){H=H|0,T=T|0,W||C(H,T,this.length);for(var we=this[H],ye=1,Oe=0;++Oe<T&&(ye*=256);)we+=this[H+Oe]*ye;return we},o.prototype.readUIntBE=function(H,T,W){H=H|0,T=T|0,W||C(H,T,this.length);for(var we=this[H+--T],ye=1;T>0&&(ye*=256);)we+=this[H+--T]*ye;return we},o.prototype.readUInt8=function(H,T){return T||C(H,1,this.length),this[H]},o.prototype.readUInt16LE=function(H,T){return T||C(H,2,this.length),this[H]|this[H+1]<<8},o.prototype.readUInt16BE=function(H,T){return T||C(H,2,this.length),this[H]<<8|this[H+1]},o.prototype.readUInt32LE=function(H,T){return T||C(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+this[H+3]*16777216},o.prototype.readUInt32BE=function(H,T){return T||C(H,4,this.length),this[H]*16777216+(this[H+1]<<16|this[H+2]<<8|this[H+3])},o.prototype.readIntLE=function(H,T,W){H=H|0,T=T|0,W||C(H,T,this.length);for(var we=this[H],ye=1,Oe=0;++Oe<T&&(ye*=256);)we+=this[H+Oe]*ye;return ye*=128,we>=ye&&(we-=Math.pow(2,8*T)),we},o.prototype.readIntBE=function(H,T,W){H=H|0,T=T|0,W||C(H,T,this.length);for(var we=T,ye=1,Oe=this[H+--we];we>0&&(ye*=256);)Oe+=this[H+--we]*ye;return ye*=128,Oe>=ye&&(Oe-=Math.pow(2,8*T)),Oe},o.prototype.readInt8=function(H,T){return T||C(H,1,this.length),this[H]&128?(255-this[H]+1)*-1:this[H]},o.prototype.readInt16LE=function(H,T){T||C(H,2,this.length);var W=this[H]|this[H+1]<<8;return W&32768?W|4294901760:W},o.prototype.readInt16BE=function(H,T){T||C(H,2,this.length);var W=this[H+1]|this[H]<<8;return W&32768?W|4294901760:W},o.prototype.readInt32LE=function(H,T){return T||C(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},o.prototype.readInt32BE=function(H,T){return T||C(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},o.prototype.readFloatLE=function(H,T){return T||C(H,4,this.length),E.read(this,H,!0,23,4)},o.prototype.readFloatBE=function(H,T){return T||C(H,4,this.length),E.read(this,H,!1,23,4)},o.prototype.readDoubleLE=function(H,T){return T||C(H,8,this.length),E.read(this,H,!0,52,8)},o.prototype.readDoubleBE=function(H,T){return T||C(H,8,this.length),E.read(this,H,!1,52,8)};function D(q,H,T,W,we,ye){if(!o.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(H>we||H<ye)throw new RangeError('"value" argument is out of bounds');if(T+W>q.length)throw new RangeError("Index out of range")}o.prototype.writeUIntLE=function(H,T,W,we){if(H=+H,T=T|0,W=W|0,!we){var ye=Math.pow(2,8*W)-1;D(this,H,T,W,ye,0)}var Oe=1,Be=0;for(this[T]=H&255;++Be<W&&(Oe*=256);)this[T+Be]=H/Oe&255;return T+W},o.prototype.writeUIntBE=function(H,T,W,we){if(H=+H,T=T|0,W=W|0,!we){var ye=Math.pow(2,8*W)-1;D(this,H,T,W,ye,0)}var Oe=W-1,Be=1;for(this[T+Oe]=H&255;--Oe>=0&&(Be*=256);)this[T+Oe]=H/Be&255;return T+W},o.prototype.writeUInt8=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,1,255,0),o.TYPED_ARRAY_SUPPORT||(H=Math.floor(H)),this[T]=H&255,T+1};function le(q,H,T,W){H<0&&(H=65535+H+1);for(var we=0,ye=Math.min(q.length-T,2);we<ye;++we)q[T+we]=(H&255<<8*(W?we:1-we))>>>(W?we:1-we)*8}o.prototype.writeUInt16LE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[T]=H&255,this[T+1]=H>>>8):le(this,H,T,!0),T+2},o.prototype.writeUInt16BE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[T]=H>>>8,this[T+1]=H&255):le(this,H,T,!1),T+2};function he(q,H,T,W){H<0&&(H=4294967295+H+1);for(var we=0,ye=Math.min(q.length-T,4);we<ye;++we)q[T+we]=H>>>(W?we:3-we)*8&255}o.prototype.writeUInt32LE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[T+3]=H>>>24,this[T+2]=H>>>16,this[T+1]=H>>>8,this[T]=H&255):he(this,H,T,!0),T+4},o.prototype.writeUInt32BE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[T]=H>>>24,this[T+1]=H>>>16,this[T+2]=H>>>8,this[T+3]=H&255):he(this,H,T,!1),T+4},o.prototype.writeIntLE=function(H,T,W,we){if(H=+H,T=T|0,!we){var ye=Math.pow(2,8*W-1);D(this,H,T,W,ye-1,-ye)}var Oe=0,Be=1,Fe=0;for(this[T]=H&255;++Oe<W&&(Be*=256);)H<0&&Fe===0&&this[T+Oe-1]!==0&&(Fe=1),this[T+Oe]=(H/Be>>0)-Fe&255;return T+W},o.prototype.writeIntBE=function(H,T,W,we){if(H=+H,T=T|0,!we){var ye=Math.pow(2,8*W-1);D(this,H,T,W,ye-1,-ye)}var Oe=W-1,Be=1,Fe=0;for(this[T+Oe]=H&255;--Oe>=0&&(Be*=256);)H<0&&Fe===0&&this[T+Oe+1]!==0&&(Fe=1),this[T+Oe]=(H/Be>>0)-Fe&255;return T+W},o.prototype.writeInt8=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,1,127,-128),o.TYPED_ARRAY_SUPPORT||(H=Math.floor(H)),H<0&&(H=255+H+1),this[T]=H&255,T+1},o.prototype.writeInt16LE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[T]=H&255,this[T+1]=H>>>8):le(this,H,T,!0),T+2},o.prototype.writeInt16BE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[T]=H>>>8,this[T+1]=H&255):le(this,H,T,!1),T+2},o.prototype.writeInt32LE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[T]=H&255,this[T+1]=H>>>8,this[T+2]=H>>>16,this[T+3]=H>>>24):he(this,H,T,!0),T+4},o.prototype.writeInt32BE=function(H,T,W){return H=+H,T=T|0,W||D(this,H,T,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),o.TYPED_ARRAY_SUPPORT?(this[T]=H>>>24,this[T+1]=H>>>16,this[T+2]=H>>>8,this[T+3]=H&255):he(this,H,T,!1),T+4};function ve(q,H,T,W,we,ye){if(T+W>q.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function Ee(q,H,T,W,we){return we||ve(q,H,T,4,34028234663852886e22,-34028234663852886e22),E.write(q,H,T,W,23,4),T+4}o.prototype.writeFloatLE=function(H,T,W){return Ee(this,H,T,!0,W)},o.prototype.writeFloatBE=function(H,T,W){return Ee(this,H,T,!1,W)};function Se(q,H,T,W,we){return we||ve(q,H,T,8,17976931348623157e292,-17976931348623157e292),E.write(q,H,T,W,52,8),T+8}o.prototype.writeDoubleLE=function(H,T,W){return Se(this,H,T,!0,W)},o.prototype.writeDoubleBE=function(H,T,W){return Se(this,H,T,!1,W)},o.prototype.copy=function(H,T,W,we){if(W||(W=0),!we&&we!==0&&(we=this.length),T>=H.length&&(T=H.length),T||(T=0),we>0&&we<W&&(we=W),we===W)return 0;if(H.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(W<0||W>=this.length)throw new RangeError("sourceStart out of bounds");if(we<0)throw new RangeError("sourceEnd out of bounds");we>this.length&&(we=this.length),H.length-T<we-W&&(we=H.length-T+W);var ye=we-W,Oe;if(this===H&&W<T&&T<we)for(Oe=ye-1;Oe>=0;--Oe)H[Oe+T]=this[Oe+W];else if(ye<1e3||!o.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<ye;++Oe)H[Oe+T]=this[Oe+W];else Uint8Array.prototype.set.call(H,this.subarray(W,W+ye),T);return ye},o.prototype.fill=function(H,T,W,we){if(typeof H=="string"){if(typeof T=="string"?(we=T,T=0,W=this.length):typeof W=="string"&&(we=W,W=this.length),H.length===1){var ye=H.charCodeAt(0);ye<256&&(H=ye)}if(we!==void 0&&typeof we!="string")throw new TypeError("encoding must be a string");if(typeof we=="string"&&!o.isEncoding(we))throw new TypeError("Unknown encoding: "+we)}else typeof H=="number"&&(H=H&255);if(T<0||this.length<T||this.length<W)throw new RangeError("Out of range index");if(W<=T)return this;T=T>>>0,W=W===void 0?this.length:W>>>0,H||(H=0);var Oe;if(typeof H=="number")for(Oe=T;Oe<W;++Oe)this[Oe]=H;else{var Be=o.isBuffer(H)?H:re(new o(H,we).toString()),Fe=Be.length;for(Oe=0;Oe<W-T;++Oe)this[Oe+T]=Be[Oe%Fe]}return this};var ae=/[^+\/0-9A-Za-z-_]/g;function pe(q){if(q=me(q).replace(ae,""),q.length<2)return"";for(;q.length%4!==0;)q=q+"=";return q}function me(q){return q.trim?q.trim():q.replace(/^\s+|\s+$/g,"")}function ee(q){return q<16?"0"+q.toString(16):q.toString(16)}function re(q,H){H=H||Infinity;for(var T,W=q.length,we=null,ye=[],Oe=0;Oe<W;++Oe){if(T=q.charCodeAt(Oe),T>55295&&T<57344){if(!we){if(T>56319){(H-=3)>-1&&ye.push(239,191,189);continue}else if(Oe+1===W){(H-=3)>-1&&ye.push(239,191,189);continue}we=T;continue}if(T<56320){(H-=3)>-1&&ye.push(239,191,189),we=T;continue}T=(we-55296<<10|T-56320)+65536}else we&&((H-=3)>-1&&ye.push(239,191,189));if(we=null,T<128){if((H-=1)<0)break;ye.push(T)}else if(T<2048){if((H-=2)<0)break;ye.push(T>>6|192,T&63|128)}else if(T<65536){if((H-=3)<0)break;ye.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((H-=4)<0)break;ye.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return ye}function Z(q){for(var H=[],T=0;T<q.length;++T)H.push(q.charCodeAt(T)&255);return H}function ue(q,H){for(var T,W,we,ye=[],Oe=0;Oe<q.length&&!((H-=2)<0);++Oe)T=q.charCodeAt(Oe),W=T>>8,we=T%256,ye.push(we),ye.push(W);return ye}function V(q){return S.toByteArray(pe(q))}function J(q,H,T,W){for(var we=0;we<W&&!(we+T>=H.length||we>=q.length);++we)H[we+T]=q[we];return we}function Ce(q){return q!==q}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},u("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(u,G,c){G.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(u,G,c){G.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(u,G,c){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var h=Array.prototype.slice;G.exports=o;function o(E,b){if(!(this instanceof o))return new o(E,b);this.src=E,this._withAccess=b}o.prototype.withAccess=function(E){return this._withAccess=E!==!1,this},o.prototype.pick=function(E){return Array.isArray(E)||(E=h.call(arguments)),E.length&&(this.keys=E),this},o.prototype.to=function(E){if(E=E||{},!this.src)return E;var b=this.keys||Object.keys(this.src);if(!this._withAccess){for(var p=0;p<b.length;p++){if(d=b[p],E[d]!==void 0)continue;E[d]=this.src[d]}return E}for(var p=0;p<b.length;p++){var d=b[p];if(!S(E,d))continue;var a=this.src.__lookupGetter__(d),s=this.src.__lookupSetter__(d);a&&E.__defineGetter__(d,a),s&&E.__defineSetter__(d,s),!a&&!s&&(E[d]=this.src[d])}return E},o.prototype.toCover=function(E){for(var b=this.keys||Object.keys(this.src),p=0;p<b.length;p++){var d=b[p];delete E[d];var a=this.src.__lookupGetter__(d),s=this.src.__lookupSetter__(d);a&&E.__defineGetter__(d,a),s&&E.__defineSetter__(d,s),!a&&!s&&(E[d]=this.src[d])}},o.prototype.override=o.prototype.toCover,o.prototype.and=function(E){var b={};return this.to(b),this.src=E,this.to(b),this.src=b,this};function S(E,b){return E[b]===void 0&&E.__lookupGetter__(b)===void 0&&E.__lookupSetter__(b)===void 0}},{}],77:[function(u,G,c){u("../../modules/es6.string.iterator"),u("../../modules/es6.array.from"),G.exports=u("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(u,G,c){var h=u("../../modules/_core"),o=h.JSON||(h.JSON={stringify:JSON.stringify});G.exports=function(E){return o.stringify.apply(o,arguments)}},{"../../modules/_core":99}],79:[function(u,G,c){u("../../modules/es6.object.assign"),G.exports=u("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(u,G,c){u("../../modules/es6.object.create");var h=u("../../modules/_core").Object;G.exports=function(S,E){return h.create(S,E)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(u,G,c){u("../../modules/es6.object.define-property");var h=u("../../modules/_core").Object;G.exports=function(S,E,b){return h.defineProperty(S,E,b)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(u,G,c){u("../../modules/es7.object.entries"),G.exports=u("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(u,G,c){u("../../modules/es6.object.get-own-property-names");var h=u("../../modules/_core").Object;G.exports=function(S){return h.getOwnPropertyNames(S)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(u,G,c){u("../../modules/es6.object.get-prototype-of"),G.exports=u("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(u,G,c){u("../../modules/es6.object.keys"),G.exports=u("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(u,G,c){u("../modules/es6.object.to-string"),u("../modules/es6.string.iterator"),u("../modules/web.dom.iterable"),u("../modules/es6.promise"),u("../modules/es7.promise.finally"),u("../modules/es7.promise.try"),G.exports=u("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(u,G,c){u("../modules/web.immediate"),G.exports=u("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(u,G,c){u("../../modules/es6.string.from-code-point"),G.exports=u("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(u,G,c){u("../../modules/es6.function.has-instance"),G.exports=u("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(u,G,c){u("../../modules/es6.symbol"),u("../../modules/es6.object.to-string"),u("../../modules/es7.symbol.async-iterator"),u("../../modules/es7.symbol.observable"),G.exports=u("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(u,G,c){u("../../modules/es6.string.iterator"),u("../../modules/web.dom.iterable"),G.exports=u("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(u,G,c){G.exports=function(h){if(typeof h!="function")throw TypeError(h+" is not a function!");return h}},{}],93:[function(u,G,c){G.exports=function(){}},{}],94:[function(u,G,c){G.exports=function(h,o,S,E){if(!(h instanceof o)||E!==void 0&&E in h)throw TypeError(S+": incorrect invocation!");return h}},{}],95:[function(u,G,c){var h=u("./_is-object");G.exports=function(o){if(!h(o))throw TypeError(o+" is not an object!");return o}},{"./_is-object":119}],96:[function(u,G,c){var h=u("./_to-iobject"),o=u("./_to-length"),S=u("./_to-absolute-index");G.exports=function(E){return function(b,p,d){var a=h(b),s=o(a.length),l=S(d,s),i;if(E&&p!=p){for(;s>l;)if(i=a[l++],i!=i)return!0}else for(;s>l;l++)if((E||l in a)&&a[l]===p)return E||l||0;return!E&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(u,G,c){var h=u("./_cof"),o=u("./_wks")("toStringTag"),S=h(function(){return arguments}())=="Arguments",E=function(b,p){try{return b[p]}catch(d){}};G.exports=function(b){var p,d,a;return b===void 0?"Undefined":b===null?"Null":typeof(d=E(p=Object(b),o))=="string"?d:S?h(p):(a=h(p))=="Object"&&typeof p.callee=="function"?"Arguments":a}},{"./_cof":98,"./_wks":166}],98:[function(u,G,c){var h={}.toString;G.exports=function(o){return h.call(o).slice(8,-1)}},{}],99:[function(u,G,c){var h=G.exports={version:"2.6.11"};typeof __e=="number"&&(__e=h)},{}],100:[function(u,G,c){"use strict";var h=u("./_object-dp"),o=u("./_property-desc");G.exports=function(S,E,b){E in S?h.f(S,E,o(0,b)):S[E]=b}},{"./_object-dp":132,"./_property-desc":146}],101:[function(u,G,c){var h=u("./_a-function");G.exports=function(o,S,E){if(h(o),S===void 0)return o;switch(E){case 1:return function(b){return o.call(S,b)};case 2:return function(b,p){return o.call(S,b,p)};case 3:return function(b,p,d){return o.call(S,b,p,d)}}return function(){return o.apply(S,arguments)}}},{"./_a-function":92}],102:[function(u,G,c){G.exports=function(h){if(h==null)throw TypeError("Can't call method on "+h);return h}},{}],103:[function(u,G,c){G.exports=!u("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(u,G,c){var h=u("./_is-object"),o=u("./_global").document,S=h(o)&&h(o.createElement);G.exports=function(E){return S?o.createElement(E):{}}},{"./_global":110,"./_is-object":119}],105:[function(u,G,c){G.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(u,G,c){var h=u("./_object-keys"),o=u("./_object-gops"),S=u("./_object-pie");G.exports=function(E){var b=h(E),p=o.f;if(p)for(var d=p(E),a=S.f,s=0,l;d.length>s;)a.call(E,l=d[s++])&&b.push(l);return b}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(u,G,c){var h=u("./_global"),o=u("./_core"),S=u("./_ctx"),E=u("./_hide"),b=u("./_has"),p="prototype",d=function(a,s,l){var i=a&d.F,g=a&d.G,m=a&d.S,v=a&d.P,w=a&d.B,_=a&d.W,k=g?o:o[s]||(o[s]={}),O=k[p],M=g?h:m?h[s]:(h[s]||{})[p],I,B,N;g&&(l=s);for(I in l){if(B=!i&&M&&M[I]!==void 0,B&&b(k,I))continue;N=B?M[I]:l[I],k[I]=g&&typeof M[I]!="function"?l[I]:w&&B?S(N,h):_&&M[I]==N?function(y){var Y=function(X,P,F){if(this instanceof y){switch(arguments.length){case 0:return new y;case 1:return new y(X);case 2:return new y(X,P)}return new y(X,P,F)}return y.apply(this,arguments)};return Y[p]=y[p],Y}(N):v&&typeof N=="function"?S(Function.call,N):N,v&&((k.virtual||(k.virtual={}))[I]=N,a&d.R&&O&&!O[I]&&E(O,I,N))}};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,G.exports=d},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(u,G,c){G.exports=function(h){try{return!!h()}catch(o){return!0}}},{}],109:[function(u,G,c){var h=u("./_ctx"),o=u("./_iter-call"),S=u("./_is-array-iter"),E=u("./_an-object"),b=u("./_to-length"),p=u("./core.get-iterator-method"),d={},a={},c=G.exports=function(s,l,i,g,m){var v=m?function(){return s}:p(s),w=h(i,g,l?2:1),_=0,k,O,M,I;if(typeof v!="function")throw TypeError(s+" is not iterable!");if(S(v)){for(k=b(s.length);k>_;_++)if(I=l?w(E(O=s[_])[0],O[1]):w(s[_]),I===d||I===a)return I}else for(M=v.call(s);!(O=M.next()).done;)if(I=o(M,w,O.value,l),I===d||I===a)return I};c.BREAK=d,c.RETURN=a},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(u,G,c){var h=G.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=h)},{}],111:[function(u,G,c){var h={}.hasOwnProperty;G.exports=function(o,S){return h.call(o,S)}},{}],112:[function(u,G,c){var h=u("./_object-dp"),o=u("./_property-desc");G.exports=u("./_descriptors")?function(S,E,b){return h.f(S,E,o(1,b))}:function(S,E,b){return S[E]=b,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(u,G,c){var h=u("./_global").document;G.exports=h&&h.documentElement},{"./_global":110}],114:[function(u,G,c){G.exports=!u("./_descriptors")&&!u("./_fails")(function(){return Object.defineProperty(u("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(u,G,c){G.exports=function(h,o,S){var E=S===void 0;switch(o.length){case 0:return E?h():h.call(S);case 1:return E?h(o[0]):h.call(S,o[0]);case 2:return E?h(o[0],o[1]):h.call(S,o[0],o[1]);case 3:return E?h(o[0],o[1],o[2]):h.call(S,o[0],o[1],o[2]);case 4:return E?h(o[0],o[1],o[2],o[3]):h.call(S,o[0],o[1],o[2],o[3])}return h.apply(S,o)}},{}],116:[function(u,G,c){var h=u("./_cof");G.exports=Object("z").propertyIsEnumerable(0)?Object:function(o){return h(o)=="String"?o.split(""):Object(o)}},{"./_cof":98}],117:[function(u,G,c){var h=u("./_iterators"),o=u("./_wks")("iterator"),S=Array.prototype;G.exports=function(E){return E!==void 0&&(h.Array===E||S[o]===E)}},{"./_iterators":125,"./_wks":166}],118:[function(u,G,c){var h=u("./_cof");G.exports=Array.isArray||function(S){return h(S)=="Array"}},{"./_cof":98}],119:[function(u,G,c){G.exports=function(h){return typeof h=="object"?h!==null:typeof h=="function"}},{}],120:[function(u,G,c){var h=u("./_an-object");G.exports=function(o,S,E,b){try{return b?S(h(E)[0],E[1]):S(E)}catch(d){var p=o.return;throw p!==void 0&&h(p.call(o)),d}}},{"./_an-object":95}],121:[function(u,G,c){"use strict";var h=u("./_object-create"),o=u("./_property-desc"),S=u("./_set-to-string-tag"),E={};u("./_hide")(E,u("./_wks")("iterator"),function(){return this}),G.exports=function(b,p,d){b.prototype=h(E,{next:o(1,d)}),S(b,p+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(u,G,c){"use strict";var h=u("./_library"),o=u("./_export"),S=u("./_redefine"),E=u("./_hide"),b=u("./_iterators"),p=u("./_iter-create"),d=u("./_set-to-string-tag"),a=u("./_object-gpo"),s=u("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),i="@@iterator",g="keys",m="values",v=function(){return this};G.exports=function(w,_,k,O,M,I,B){p(k,_,O);var N=function($){if(!l&&$ in P)return P[$];switch($){case g:return function(){return new k(this,$)};case m:return function(){return new k(this,$)}}return function(){return new k(this,$)}},y=_+" Iterator",Y=M==m,X=!1,P=w.prototype,F=P[s]||P[i]||M&&P[M],K=F||N(M),Q=M?Y?N("entries"):K:void 0,ce=_=="Array"&&P.entries||F,fe,z,se;if(ce&&(se=a(ce.call(new w)),se!==Object.prototype&&se.next&&(d(se,y,!0),!h&&typeof se[s]!="function"&&E(se,s,v))),Y&&F&&F.name!==m&&(X=!0,K=function(){return F.call(this)}),(!h||B)&&(l||X||!P[s])&&E(P,s,K),b[_]=K,b[y]=v,M)if(fe={values:Y?K:N(m),keys:I?K:N(g),entries:Q},B)for(z in fe)z in P||S(P,z,fe[z]);else o(o.P+o.F*(l||X),_,fe);return fe}},{"./_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(u,G,c){var h=u("./_wks")("iterator"),o=!1;try{var S=[7][h]();S.return=function(){o=!0},Array.from(S,function(){throw 2})}catch(E){}G.exports=function(E,b){if(!b&&!o)return!1;var p=!1;try{var d=[7],a=d[h]();a.next=function(){return{done:p=!0}},d[h]=function(){return a},E(d)}catch(s){}return p}},{"./_wks":166}],124:[function(u,G,c){G.exports=function(h,o){return{value:o,done:!!h}}},{}],125:[function(u,G,c){G.exports={}},{}],126:[function(u,G,c){G.exports=!0},{}],127:[function(u,G,c){var h=u("./_uid")("meta"),o=u("./_is-object"),S=u("./_has"),E=u("./_object-dp").f,b=0,p=Object.isExtensible||function(){return!0},d=!u("./_fails")(function(){return p(Object.preventExtensions({}))}),a=function(m){E(m,h,{value:{i:"O"+ ++b,w:{}}})},s=function(m,v){if(!o(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!S(m,h)){if(!p(m))return"F";if(!v)return"E";a(m)}return m[h].i},l=function(m,v){if(!S(m,h)){if(!p(m))return!0;if(!v)return!1;a(m)}return m[h].w},i=function(m){return d&&g.NEED&&p(m)&&!S(m,h)&&a(m),m},g=G.exports={KEY:h,NEED:!1,fastKey:s,getWeak:l,onFreeze:i}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(u,G,c){var h=u("./_global"),o=u("./_task").set,S=h.MutationObserver||h.WebKitMutationObserver,E=h.process,b=h.Promise,p=u("./_cof")(E)=="process";G.exports=function(){var d,a,s,l=function(){var v,w;for(p&&(v=E.domain)&&v.exit();d;){w=d.fn,d=d.next;try{w()}catch(_){throw d?s():a=void 0,_}}a=void 0,v&&v.enter()};if(p)s=function(){E.nextTick(l)};else if(S&&!(h.navigator&&h.navigator.standalone)){var i=!0,g=document.createTextNode("");new S(l).observe(g,{characterData:!0}),s=function(){g.data=i=!i}}else if(b&&b.resolve){var m=b.resolve(void 0);s=function(){m.then(l)}}else s=function(){o.call(h,l)};return function(v){var w={fn:v,next:void 0};a&&(a.next=w),d||(d=w,s()),a=w}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(u,G,c){"use strict";var h=u("./_a-function");function o(S){var E,b;this.promise=new S(function(p,d){if(E!==void 0||b!==void 0)throw TypeError("Bad Promise constructor");E=p,b=d}),this.resolve=h(E),this.reject=h(b)}G.exports.f=function(S){return new o(S)}},{"./_a-function":92}],130:[function(u,G,c){"use strict";var h=u("./_descriptors"),o=u("./_object-keys"),S=u("./_object-gops"),E=u("./_object-pie"),b=u("./_to-object"),p=u("./_iobject"),d=Object.assign;G.exports=!d||u("./_fails")(function(){var a={},s={},l=Symbol(),i="abcdefghijklmnopqrst";return a[l]=7,i.split("").forEach(function(g){s[g]=g}),d({},a)[l]!=7||Object.keys(d({},s)).join("")!=i})?function(s,l){for(var i=b(s),g=arguments.length,m=1,v=S.f,w=E.f;g>m;)for(var _=p(arguments[m++]),k=v?o(_).concat(v(_)):o(_),O=k.length,M=0,I;O>M;)I=k[M++],(!h||w.call(_,I))&&(i[I]=_[I]);return i}:d},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(u,G,c){var h=u("./_an-object"),o=u("./_object-dps"),S=u("./_enum-bug-keys"),E=u("./_shared-key")("IE_PROTO"),b=function(){},p="prototype",d=function(){var a=u("./_dom-create")("iframe"),s=S.length,l="<",i=">",g;for(a.style.display="none",u("./_html").appendChild(a),a.src="javascript:",g=a.contentWindow.document,g.open(),g.write(l+"script"+i+"document.F=Object"+l+"/script"+i),g.close(),d=g.F;s--;)delete d[p][S[s]];return d()};G.exports=Object.create||function(s,l){var i;return s!==null?(b[p]=h(s),i=new b,b[p]=null,i[E]=s):i=d(),l===void 0?i:o(i,l)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(u,G,c){var h=u("./_an-object"),o=u("./_ie8-dom-define"),S=u("./_to-primitive"),E=Object.defineProperty;c.f=u("./_descriptors")?Object.defineProperty:function(p,d,a){if(h(p),d=S(d,!0),h(a),o)try{return E(p,d,a)}catch(s){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(p[d]=a.value),p}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(u,G,c){var h=u("./_object-dp"),o=u("./_an-object"),S=u("./_object-keys");G.exports=u("./_descriptors")?Object.defineProperties:function(b,p){o(b);for(var d=S(p),a=d.length,s=0,l;a>s;)h.f(b,l=d[s++],p[l]);return b}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(u,G,c){var h=u("./_object-pie"),o=u("./_property-desc"),S=u("./_to-iobject"),E=u("./_to-primitive"),b=u("./_has"),p=u("./_ie8-dom-define"),d=Object.getOwnPropertyDescriptor;c.f=u("./_descriptors")?d:function(s,l){if(s=S(s),l=E(l,!0),p)try{return d(s,l)}catch(i){}if(b(s,l))return o(!h.f.call(s,l),s[l])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(u,G,c){var h=u("./_to-iobject"),o=u("./_object-gopn").f,S={}.toString,E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(p){try{return o(p)}catch(d){return E.slice()}};G.exports.f=function(d){return E&&S.call(d)=="[object Window]"?b(d):o(h(d))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(u,G,c){var h=u("./_object-keys-internal"),o=u("./_enum-bug-keys").concat("length","prototype");c.f=Object.getOwnPropertyNames||function(E){return h(E,o)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(u,G,c){c.f=Object.getOwnPropertySymbols},{}],138:[function(u,G,c){var h=u("./_has"),o=u("./_to-object"),S=u("./_shared-key")("IE_PROTO"),E=Object.prototype;G.exports=Object.getPrototypeOf||function(b){return b=o(b),h(b,S)?b[S]:typeof b.constructor=="function"&&b instanceof b.constructor?b.constructor.prototype:b instanceof Object?E:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(u,G,c){var h=u("./_has"),o=u("./_to-iobject"),S=u("./_array-includes")(!1),E=u("./_shared-key")("IE_PROTO");G.exports=function(b,p){var d=o(b),a=0,s=[],l;for(l in d)l!=E&&(h(d,l)&&s.push(l));for(;p.length>a;)h(d,l=p[a++])&&(~S(s,l)||s.push(l));return s}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(u,G,c){var h=u("./_object-keys-internal"),o=u("./_enum-bug-keys");G.exports=Object.keys||function(E){return h(E,o)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(u,G,c){c.f={}.propertyIsEnumerable},{}],142:[function(u,G,c){var h=u("./_export"),o=u("./_core"),S=u("./_fails");G.exports=function(E,b){var p=(o.Object||{})[E]||Object[E],d={};d[E]=b(p),h(h.S+h.F*S(function(){p(1)}),"Object",d)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(u,G,c){var h=u("./_descriptors"),o=u("./_object-keys"),S=u("./_to-iobject"),E=u("./_object-pie").f;G.exports=function(b){return function(p){for(var d=S(p),a=o(d),s=a.length,l=0,i=[],g;s>l;)g=a[l++],(!h||E.call(d,g))&&i.push(b?[g,d[g]]:d[g]);return i}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(u,G,c){G.exports=function(h){try{return{e:!1,v:h()}}catch(o){return{e:!0,v:o}}}},{}],145:[function(u,G,c){var h=u("./_an-object"),o=u("./_is-object"),S=u("./_new-promise-capability");G.exports=function(E,b){if(h(E),o(b)&&b.constructor===E)return b;var p=S.f(E),d=p.resolve;return d(b),p.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(u,G,c){G.exports=function(h,o){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:o}}},{}],147:[function(u,G,c){var h=u("./_hide");G.exports=function(o,S,E){for(var b in S)E&&o[b]?o[b]=S[b]:h(o,b,S[b]);return o}},{"./_hide":112}],148:[function(u,G,c){G.exports=u("./_hide")},{"./_hide":112}],149:[function(u,G,c){"use strict";var h=u("./_global"),o=u("./_core"),S=u("./_object-dp"),E=u("./_descriptors"),b=u("./_wks")("species");G.exports=function(p){var d=typeof o[p]=="function"?o[p]:h[p];E&&d&&!d[b]&&S.f(d,b,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(u,G,c){var h=u("./_object-dp").f,o=u("./_has"),S=u("./_wks")("toStringTag");G.exports=function(E,b,p){E&&!o(E=p?E:E.prototype,S)&&h(E,S,{configurable:!0,value:b})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(u,G,c){var h=u("./_shared")("keys"),o=u("./_uid");G.exports=function(S){return h[S]||(h[S]=o(S))}},{"./_shared":152,"./_uid":162}],152:[function(u,G,c){var h=u("./_core"),o=u("./_global"),S="__core-js_shared__",E=o[S]||(o[S]={});(G.exports=function(b,p){return E[b]||(E[b]=p!==void 0?p:{})})("versions",[]).push({version:h.version,mode:u("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(u,G,c){var h=u("./_an-object"),o=u("./_a-function"),S=u("./_wks")("species");G.exports=function(E,b){var p=h(E).constructor,d;return p===void 0||(d=h(p)[S])==null?b:o(d)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(u,G,c){var h=u("./_to-integer"),o=u("./_defined");G.exports=function(S){return function(E,b){var p=String(o(E)),d=h(b),a=p.length,s,l;return d<0||d>=a?S?"":void 0:(s=p.charCodeAt(d),s<55296||s>56319||d+1===a||(l=p.charCodeAt(d+1))<56320||l>57343?S?p.charAt(d):s:S?p.slice(d,d+2):(s-55296<<10)+(l-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(u,G,c){var h=u("./_ctx"),o=u("./_invoke"),S=u("./_html"),E=u("./_dom-create"),b=u("./_global"),p=b.process,d=b.setImmediate,a=b.clearImmediate,s=b.MessageChannel,l=b.Dispatch,i=0,g={},m="onreadystatechange",v,w,_,k=function(){var M=+this;if(g.hasOwnProperty(M)){var I=g[M];delete g[M],I()}},O=function(M){k.call(M.data)};(!d||!a)&&(d=function(I){for(var B=[],N=1;arguments.length>N;)B.push(arguments[N++]);return g[++i]=function(){o(typeof I=="function"?I:Function(I),B)},v(i),i},a=function(I){delete g[I]},u("./_cof")(p)=="process"?v=function(M){p.nextTick(h(k,M,1))}:l&&l.now?v=function(M){l.now(h(k,M,1))}:s?(w=new s,_=w.port2,w.port1.onmessage=O,v=h(_.postMessage,_,1)):b.addEventListener&&typeof postMessage=="function"&&!b.importScripts?(v=function(M){b.postMessage(M+"","*")},b.addEventListener("message",O,!1)):m in E("script")?v=function(M){S.appendChild(E("script"))[m]=function(){S.removeChild(this),k.call(M)}}:v=function(M){setTimeout(h(k,M,1),0)}),G.exports={set:d,clear:a}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(u,G,c){var h=u("./_to-integer"),o=Math.max,S=Math.min;G.exports=function(E,b){return E=h(E),E<0?o(E+b,0):S(E,b)}},{"./_to-integer":157}],157:[function(u,G,c){var h=Math.ceil,o=Math.floor;G.exports=function(S){return isNaN(S=+S)?0:(S>0?o:h)(S)}},{}],158:[function(u,G,c){var h=u("./_iobject"),o=u("./_defined");G.exports=function(S){return h(o(S))}},{"./_defined":102,"./_iobject":116}],159:[function(u,G,c){var h=u("./_to-integer"),o=Math.min;G.exports=function(S){return S>0?o(h(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(u,G,c){var h=u("./_defined");G.exports=function(o){return Object(h(o))}},{"./_defined":102}],161:[function(u,G,c){var h=u("./_is-object");G.exports=function(o,S){if(!h(o))return o;var E,b;if(S&&typeof(E=o.toString)=="function"&&!h(b=E.call(o)))return b;if(typeof(E=o.valueOf)=="function"&&!h(b=E.call(o)))return b;if(!S&&typeof(E=o.toString)=="function"&&!h(b=E.call(o)))return b;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(u,G,c){var h=0,o=Math.random();G.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++h+o).toString(36))}},{}],163:[function(u,G,c){var h=u("./_global"),o=h.navigator;G.exports=o&&o.userAgent||""},{"./_global":110}],164:[function(u,G,c){var h=u("./_global"),o=u("./_core"),S=u("./_library"),E=u("./_wks-ext"),b=u("./_object-dp").f;G.exports=function(p){var d=o.Symbol||(o.Symbol=S?{}:h.Symbol||{});p.charAt(0)!="_"&&!(p in d)&&b(d,p,{value:E.f(p)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(u,G,c){c.f=u("./_wks")},{"./_wks":166}],166:[function(u,G,c){var h=u("./_shared")("wks"),o=u("./_uid"),S=u("./_global").Symbol,E=typeof S=="function",b=G.exports=function(p){return h[p]||(h[p]=E&&S[p]||(E?S:o)("Symbol."+p))};b.store=h},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(u,G,c){var h=u("./_classof"),o=u("./_wks")("iterator"),S=u("./_iterators");G.exports=u("./_core").getIteratorMethod=function(E){if(E!=null)return E[o]||E["@@iterator"]||S[h(E)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(u,G,c){"use strict";var h=u("./_ctx"),o=u("./_export"),S=u("./_to-object"),E=u("./_iter-call"),b=u("./_is-array-iter"),p=u("./_to-length"),d=u("./_create-property"),a=u("./core.get-iterator-method");o(o.S+o.F*!u("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(l){var i=S(l),g=typeof this=="function"?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,w=v!==void 0,_=0,k=a(i),O,M,I,B;if(w&&(v=h(v,m>2?arguments[2]:void 0,2)),k!=null&&!(g==Array&&b(k)))for(B=k.call(i),M=new g;!(I=B.next()).done;_++)d(M,_,w?E(B,v,[I.value,_],!0):I.value);else for(O=p(i.length),M=new g(O);O>_;_++)d(M,_,w?v(i[_],_):i[_]);return M.length=_,M}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(u,G,c){"use strict";var h=u("./_add-to-unscopables"),o=u("./_iter-step"),S=u("./_iterators"),E=u("./_to-iobject");G.exports=u("./_iter-define")(Array,"Array",function(b,p){this._t=E(b),this._i=0,this._k=p},function(){var b=this._t,p=this._k,d=this._i++;return!b||d>=b.length?(this._t=void 0,o(1)):p=="keys"?o(0,d):p=="values"?o(0,b[d]):o(0,[d,b[d]])},"values"),S.Arguments=S.Array,h("keys"),h("values"),h("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(u,G,c){"use strict";var h=u("./_is-object"),o=u("./_object-gpo"),S=u("./_wks")("hasInstance"),E=Function.prototype;S in E||u("./_object-dp").f(E,S,{value:function(b){if(typeof this!="function"||!h(b))return!1;if(!h(this.prototype))return b instanceof this;for(;b=o(b);)if(this.prototype===b)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(u,G,c){var h=u("./_export");h(h.S+h.F,"Object",{assign:u("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(u,G,c){var h=u("./_export");h(h.S,"Object",{create:u("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(u,G,c){var h=u("./_export");h(h.S+h.F*!u("./_descriptors"),"Object",{defineProperty:u("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(u,G,c){u("./_object-sap")("getOwnPropertyNames",function(){return u("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(u,G,c){var h=u("./_to-object"),o=u("./_object-gpo");u("./_object-sap")("getPrototypeOf",function(){return function(E){return o(h(E))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(u,G,c){var h=u("./_to-object"),o=u("./_object-keys");u("./_object-sap")("keys",function(){return function(E){return o(h(E))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(u,G,c){arguments[4][71][0].apply(c,arguments)},{dup:71}],178:[function(u,G,c){"use strict";var h=u("./_library"),o=u("./_global"),S=u("./_ctx"),E=u("./_classof"),b=u("./_export"),p=u("./_is-object"),d=u("./_a-function"),a=u("./_an-instance"),s=u("./_for-of"),l=u("./_species-constructor"),i=u("./_task").set,g=u("./_microtask")(),m=u("./_new-promise-capability"),v=u("./_perform"),w=u("./_user-agent"),_=u("./_promise-resolve"),k="Promise",O=o.TypeError,M=o.process,I=M&&M.versions,B=I&&I.v8||"",N=o[k],y=E(M)=="process",Y=function(){},X,P,F,K,Q=P=m.f,ce=!!function(){try{var C=N.resolve(1),D=(C.constructor={})[u("./_wks")("species")]=function(le){le(Y,Y)};return(y||typeof PromiseRejectionEvent=="function")&&C.then(Y)instanceof D&&B.indexOf("6.6")!==0&&w.indexOf("Chrome/66")===-1}catch(le){}}(),fe=function(C){var D;return p(C)&&typeof(D=C.then)=="function"?D:!1},z=function(C,D){if(C._n)return;C._n=!0;var le=C._c;g(function(){for(var he=C._v,ve=C._s==1,Ee=0,Se=function(ae){var pe=ve?ae.ok:ae.fail,me=ae.resolve,ee=ae.reject,re=ae.domain,Z,ue,V;try{pe?(ve||(C._h==2&&j(C),C._h=1),pe===!0?Z=he:(re&&re.enter(),Z=pe(he),re&&(re.exit(),V=!0)),Z===ae.promise?ee(O("Promise-chain cycle")):(ue=fe(Z))?ue.call(Z,me,ee):me(Z)):ee(he)}catch(J){re&&!V&&re.exit(),ee(J)}};le.length>Ee;)Se(le[Ee++]);C._c=[],C._n=!1,D&&!C._h&&se(C)})},se=function(C){i.call(o,function(){var D=C._v,le=$(C),he,ve,Ee;if(le&&(he=v(function(){y?M.emit("unhandledRejection",D,C):(ve=o.onunhandledrejection)?ve({promise:C,reason:D}):(Ee=o.console)&&Ee.error&&Ee.error("Unhandled promise rejection",D)}),C._h=y||$(C)?2:1),C._a=void 0,le&&he.e)throw he.v})},$=function(C){return C._h!==1&&(C._a||C._c).length===0},j=function(C){i.call(o,function(){var D;y?M.emit("rejectionHandled",C):(D=o.onrejectionhandled)&&D({promise:C,reason:C._v})})},U=function(C){var D=this;if(D._d)return;D._d=!0,D=D._w||D,D._v=C,D._s=2,D._a||(D._a=D._c.slice()),z(D,!0)},R=function(C){var D=this,le;if(D._d)return;D._d=!0,D=D._w||D;try{if(D===C)throw O("Promise can't be resolved itself");(le=fe(C))?g(function(){var he={_w:D,_d:!1};try{le.call(C,S(R,he,1),S(U,he,1))}catch(ve){U.call(he,ve)}}):(D._v=C,D._s=1,z(D,!1))}catch(he){U.call({_w:D,_d:!1},he)}};ce||(N=function(D){a(this,N,k,"_h"),d(D),X.call(this);try{D(S(R,this,1),S(U,this,1))}catch(le){U.call(this,le)}},X=function(D){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},X.prototype=u("./_redefine-all")(N.prototype,{then:function(D,le){var he=Q(l(this,N));return he.ok=typeof D=="function"?D:!0,he.fail=typeof le=="function"&&le,he.domain=y?M.domain:void 0,this._c.push(he),this._a&&this._a.push(he),this._s&&z(this,!1),he.promise},catch:function(C){return this.then(void 0,C)}}),F=function(){var C=new X;this.promise=C,this.resolve=S(R,C,1),this.reject=S(U,C,1)},m.f=Q=function(C){return C===N||C===K?new F(C):P(C)}),b(b.G+b.W+b.F*!ce,{Promise:N}),u("./_set-to-string-tag")(N,k),u("./_set-species")(k),K=u("./_core")[k],b(b.S+b.F*!ce,k,{reject:function(D){var le=Q(this),he=le.reject;return he(D),le.promise}}),b(b.S+b.F*(h||!ce),k,{resolve:function(D){return _(h&&this===K?N:this,D)}}),b(b.S+b.F*!(ce&&u("./_iter-detect")(function(C){N.all(C).catch(Y)})),k,{all:function(D){var le=this,he=Q(le),ve=he.resolve,Ee=he.reject,Se=v(function(){var ae=[],pe=0,me=1;s(D,!1,function(ee){var re=pe++,Z=!1;ae.push(void 0),me++,le.resolve(ee).then(function(ue){if(Z)return;Z=!0,ae[re]=ue,--me||ve(ae)},Ee)}),--me||ve(ae)});return Se.e&&Ee(Se.v),he.promise},race:function(D){var le=this,he=Q(le),ve=he.reject,Ee=v(function(){s(D,!1,function(Se){le.resolve(Se).then(he.resolve,ve)})});return Ee.e&&ve(Ee.v),he.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(u,G,c){var h=u("./_export"),o=u("./_to-absolute-index"),S=String.fromCharCode,E=String.fromCodePoint;h(h.S+h.F*(!!E&&E.length!=1),"String",{fromCodePoint:function(p){for(var d=[],a=arguments.length,s=0,l;a>s;){if(l=+arguments[s++],o(l,1114111)!==l)throw RangeError(l+" is not a valid code point");d.push(l<65536?S(l):S(((l-=65536)>>10)+55296,l%1024+56320))}return d.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(u,G,c){"use strict";var h=u("./_string-at")(!0);u("./_iter-define")(String,"String",function(o){this._t=String(o),this._i=0},function(){var o=this._t,S=this._i,E;return S>=o.length?{value:void 0,done:!0}:(E=h(o,S),this._i+=E.length,{value:E,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(u,G,c){"use strict";var h=u("./_global"),o=u("./_has"),S=u("./_descriptors"),E=u("./_export"),b=u("./_redefine"),p=u("./_meta").KEY,d=u("./_fails"),a=u("./_shared"),s=u("./_set-to-string-tag"),l=u("./_uid"),i=u("./_wks"),g=u("./_wks-ext"),m=u("./_wks-define"),v=u("./_enum-keys"),w=u("./_is-array"),_=u("./_an-object"),k=u("./_is-object"),O=u("./_to-object"),M=u("./_to-iobject"),I=u("./_to-primitive"),B=u("./_property-desc"),N=u("./_object-create"),y=u("./_object-gopn-ext"),Y=u("./_object-gopd"),X=u("./_object-gops"),P=u("./_object-dp"),F=u("./_object-keys"),K=Y.f,Q=P.f,ce=y.f,fe=h.Symbol,z=h.JSON,se=z&&z.stringify,$="prototype",j=i("_hidden"),U=i("toPrimitive"),R={}.propertyIsEnumerable,C=a("symbol-registry"),D=a("symbols"),le=a("op-symbols"),he=Object[$],ve=typeof fe=="function"&&!!X.f,Ee=h.QObject,Se=!Ee||!Ee[$]||!Ee[$].findChild,ae=S&&d(function(){return N(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a!=7})?function(ye,Oe,Be){var Fe=K(he,Oe);Fe&&delete he[Oe],Q(ye,Oe,Be),Fe&&ye!==he&&Q(he,Oe,Fe)}:Q,pe=function(ye){var Oe=D[ye]=N(fe[$]);return Oe._k=ye,Oe},me=ve&&typeof fe.iterator=="symbol"?function(ye){return typeof ye=="symbol"}:function(ye){return ye instanceof fe},ee=function(Oe,Be,Fe){return Oe===he&&ee(le,Be,Fe),_(Oe),Be=I(Be,!0),_(Fe),o(D,Be)?(Fe.enumerable?(o(Oe,j)&&Oe[j][Be]&&(Oe[j][Be]=!1),Fe=N(Fe,{enumerable:B(0,!1)})):(o(Oe,j)||Q(Oe,j,B(1,{})),Oe[j][Be]=!0),ae(Oe,Be,Fe)):Q(Oe,Be,Fe)},re=function(Oe,Be){_(Oe);for(var Fe=v(Be=M(Be)),Ue=0,Ge=Fe.length,Ye;Ge>Ue;)ee(Oe,Ye=Fe[Ue++],Be[Ye]);return Oe},Z=function(Oe,Be){return Be===void 0?N(Oe):re(N(Oe),Be)},ue=function(Oe){var Be=R.call(this,Oe=I(Oe,!0));return this===he&&o(D,Oe)&&!o(le,Oe)?!1:Be||!o(this,Oe)||!o(D,Oe)||o(this,j)&&this[j][Oe]?Be:!0},V=function(Oe,Be){if(Oe=M(Oe),Be=I(Be,!0),Oe===he&&o(D,Be)&&!o(le,Be))return;var Fe=K(Oe,Be);return Fe&&o(D,Be)&&!(o(Oe,j)&&Oe[j][Be])&&(Fe.enumerable=!0),Fe},J=function(Oe){for(var Be=ce(M(Oe)),Fe=[],Ue=0,Ge;Be.length>Ue;)!o(D,Ge=Be[Ue++])&&Ge!=j&&Ge!=p&&Fe.push(Ge);return Fe},Ce=function(Oe){for(var Be=Oe===he,Fe=ce(Be?le:M(Oe)),Ue=[],Ge=0,Ye;Fe.length>Ge;)o(D,Ye=Fe[Ge++])&&(Be?o(he,Ye):!0)&&Ue.push(D[Ye]);return Ue};ve||(fe=function(){if(this instanceof fe)throw TypeError("Symbol is not a constructor!");var Oe=l(arguments.length>0?arguments[0]:void 0),Be=function(Fe){this===he&&Be.call(le,Fe),o(this,j)&&o(this[j],Oe)&&(this[j][Oe]=!1),ae(this,Oe,B(1,Fe))};return S&&Se&&ae(he,Oe,{configurable:!0,set:Be}),pe(Oe)},b(fe[$],"toString",function(){return this._k}),Y.f=V,P.f=ee,u("./_object-gopn").f=y.f=J,u("./_object-pie").f=ue,X.f=Ce,S&&!u("./_library")&&b(he,"propertyIsEnumerable",ue,!0),g.f=function(ye){return pe(i(ye))}),E(E.G+E.W+E.F*!ve,{Symbol:fe});for(var q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),H=0;q.length>H;)i(q[H++]);for(var T=F(i.store),W=0;T.length>W;)m(T[W++]);E(E.S+E.F*!ve,"Symbol",{for:function(ye){return o(C,ye+="")?C[ye]:C[ye]=fe(ye)},keyFor:function(Oe){if(!me(Oe))throw TypeError(Oe+" is not a symbol!");for(var Be in C)if(C[Be]===Oe)return Be},useSetter:function(){Se=!0},useSimple:function(){Se=!1}}),E(E.S+E.F*!ve,"Object",{create:Z,defineProperty:ee,defineProperties:re,getOwnPropertyDescriptor:V,getOwnPropertyNames:J,getOwnPropertySymbols:Ce});var we=d(function(){X.f(1)});E(E.S+E.F*we,"Object",{getOwnPropertySymbols:function(Oe){return X.f(O(Oe))}}),z&&E(E.S+E.F*(!ve||d(function(){var ye=fe();return se([ye])!="[null]"||se({a:ye})!="{}"||se(Object(ye))!="{}"})),"JSON",{stringify:function(Oe){for(var Be=[Oe],Fe=1,Ue,Ge;arguments.length>Fe;)Be.push(arguments[Fe++]);return Ge=Ue=Be[1],!k(Ue)&&Oe===void 0||me(Oe)?void 0:(w(Ue)||(Ue=function(Ye,Xe){if(typeof Ge=="function"&&(Xe=Ge.call(this,Ye,Xe)),!me(Xe))return Xe}),Be[1]=Ue,se.apply(z,Be))}}),fe[$][U]||u("./_hide")(fe[$],U,fe[$].valueOf),s(fe,"Symbol"),s(Math,"Math",!0),s(h.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(u,G,c){var h=u("./_export"),o=u("./_object-to-array")(!0);h(h.S,"Object",{entries:function(E){return o(E)}})},{"./_export":107,"./_object-to-array":143}],183:[function(u,G,c){"use strict";var h=u("./_export"),o=u("./_core"),S=u("./_global"),E=u("./_species-constructor"),b=u("./_promise-resolve");h(h.P+h.R,"Promise",{finally:function(p){var d=E(this,o.Promise||S.Promise),a=typeof p=="function";return this.then(a?function(s){return b(d,p()).then(function(){return s})}:p,a?function(s){return b(d,p()).then(function(){throw s})}:p)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(u,G,c){"use strict";var h=u("./_export"),o=u("./_new-promise-capability"),S=u("./_perform");h(h.S,"Promise",{try:function(E){var b=o.f(this),p=S(E);return(p.e?b.reject:b.resolve)(p.v),b.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(u,G,c){u("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(u,G,c){u("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(u,G,c){u("./es6.array.iterator");for(var h=u("./_global"),o=u("./_hide"),S=u("./_iterators"),E=u("./_wks")("toStringTag"),b="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),p=0;p<b.length;p++){var d=b[p],a=h[d],s=a&&a.prototype;s&&!s[E]&&o(s,E,d),S[d]=S.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(u,G,c){var h=u("./_export"),o=u("./_task");h(h.G+h.B,{setImmediate:o.set,clearImmediate:o.clear})},{"./_export":107,"./_task":155}],189:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/helpers/typeof"),S=E(o);function E(I){return I&&I.__esModule?I:{default:I}}function b(I){return Array.isArray?Array.isArray(I):M(I)==="[object Array]"}c.isArray=b;function p(I){return typeof I=="boolean"}c.isBoolean=p;function d(I){return I===null}c.isNull=d;function a(I){return I==null}c.isNullOrUndefined=a;function s(I){return typeof I=="number"}c.isNumber=s;function l(I){return typeof I=="string"}c.isString=l;function i(I){return(typeof I=="undefined"?"undefined":(0,S.default)(I))==="symbol"}c.isSymbol=i;function g(I){return I===void 0}c.isUndefined=g;function m(I){return M(I)==="[object RegExp]"}c.isRegExp=m;function v(I){return(typeof I=="undefined"?"undefined":(0,S.default)(I))==="object"&&I!==null}c.isObject=v;function w(I){return M(I)==="[object Date]"}c.isDate=w;function _(I){return M(I)==="[object Error]"||I instanceof Error}c.isError=_;function k(I){return typeof I=="function"}c.isFunction=k;function O(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||(typeof I=="undefined"?"undefined":(0,S.default)(I))==="symbol"||typeof I=="undefined"}c.isPrimitive=O,c.isBuffer=h.isBuffer;function M(I){return Object.prototype.toString.call(I)}}).call(this,{isBuffer:u("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(u,G,c){"use strict";var h=u("babel-runtime/helpers/typeof"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(E){"use strict";var b=function(){var l=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,i=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,g=/[^-+\dA-Z]/g;return function(m,v,w,_){if(arguments.length===1&&s(m)==="string"&&!/\d/.test(m)&&(v=m,m=void 0),m=m||new Date,m instanceof Date||(m=new Date(m)),isNaN(m))throw TypeError("Invalid date");v=String(b.masks[v]||v||b.masks.default);var k=v.slice(0,4);(k==="UTC:"||k==="GMT:")&&(v=v.slice(4),w=!0,k==="GMT:"&&(_=!0));var O=w?"getUTC":"get",M=m[O+"Date"](),I=m[O+"Day"](),B=m[O+"Month"](),N=m[O+"FullYear"](),y=m[O+"Hours"](),Y=m[O+"Minutes"](),X=m[O+"Seconds"](),P=m[O+"Milliseconds"](),F=w?0:m.getTimezoneOffset(),K=d(m),Q=a(m),ce={d:M,dd:p(M),ddd:b.i18n.dayNames[I],dddd:b.i18n.dayNames[I+7],m:B+1,mm:p(B+1),mmm:b.i18n.monthNames[B],mmmm:b.i18n.monthNames[B+12],yy:String(N).slice(2),yyyy:N,h:y%12||12,hh:p(y%12||12),H:y,HH:p(y),M:Y,MM:p(Y),s:X,ss:p(X),l:p(P,3),L:p(Math.round(P/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:_?"GMT":w?"UTC":(String(m).match(i)||[""]).pop().replace(g,""),o:(F>0?"-":"+")+p(Math.floor(Math.abs(F)/60)*100+Math.abs(F)%60,4),S:["th","st","nd","rd"][M%10>3?0:(M%100-M%10!=10)*M%10],W:K,N:Q};return v.replace(l,function(fe){return fe in ce?ce[fe]:fe.slice(1,fe.length-1)})}}();b.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},b.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function p(l,i){for(l=String(l),i=i||2;l.length<i;)l="0"+l;return l}function d(l){var i=new Date(l.getFullYear(),l.getMonth(),l.getDate());i.setDate(i.getDate()-(i.getDay()+6)%7+3);var g=new Date(i.getFullYear(),0,4);g.setDate(g.getDate()-(g.getDay()+6)%7+3);var m=i.getTimezoneOffset()-g.getTimezoneOffset();i.setHours(i.getHours()-m);var v=(i-g)/(864e5*7);return 1+Math.floor(v)}function a(l){var i=l.getDay();return i===0&&(i=7),i}function s(l){return l===null?"null":l===void 0?"undefined":(typeof l=="undefined"?"undefined":(0,o.default)(l))!=="object"?typeof l=="undefined"?"undefined":(0,o.default)(l):Array.isArray(l)?"array":{}.toString.call(l).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return b}):(typeof c=="undefined"?"undefined":(0,o.default)(c))==="object"?G.exports=b:E.dateFormat=b})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(u,G,c){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var h=/["'&<>]/;G.exports=o;function o(S){var E=""+S,b=h.exec(E);if(!b)return E;var p,d="",a=0,s=0;for(a=b.index;a<E.length;a++){switch(E.charCodeAt(a)){case 34:p="&quot;";break;case 38:p="&amp;";break;case 39:p="&#39;";break;case 60:p="&lt;";break;case 62:p="&gt;";break;default:continue}s!==a&&(d+=E.substring(s,a)),s=a+1,d+=p}return s!==a?d+E.substring(s,a):d}},{}],192:[function(u,G,c){function h(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}G.exports=h,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._maxListeners=void 0,h.defaultMaxListeners=10,h.prototype.setMaxListeners=function(p){if(!S(p)||p<0||isNaN(p))throw TypeError("n must be a positive number");return this._maxListeners=p,this},h.prototype.emit=function(p){var d,a,s,l,i,g;if(this._events||(this._events={}),p==="error"&&(!this._events.error||E(this._events.error)&&!this._events.error.length)){if(d=arguments[1],d instanceof Error)throw d;var m=new Error('Uncaught, unspecified "error" event. ('+d+")");throw m.context=d,m}if(a=this._events[p],b(a))return!1;if(o(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),a.apply(this,l)}else if(E(a))for(l=Array.prototype.slice.call(arguments,1),g=a.slice(),s=g.length,i=0;i<s;i++)g[i].apply(this,l);return!0},h.prototype.addListener=function(p,d){var a;if(!o(d))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",p,o(d.listener)?d.listener:d),this._events[p]?E(this._events[p])?this._events[p].push(d):this._events[p]=[this._events[p],d]:this._events[p]=d,E(this._events[p])&&!this._events[p].warned&&(b(this._maxListeners)?a=h.defaultMaxListeners:a=this._maxListeners,a&&a>0&&this._events[p].length>a&&(this._events[p].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[p].length),typeof console.trace=="function"&&console.trace())),this},h.prototype.on=h.prototype.addListener,h.prototype.once=function(p,d){if(!o(d))throw TypeError("listener must be a function");var a=!1;function s(){this.removeListener(p,s),a||(a=!0,d.apply(this,arguments))}return s.listener=d,this.on(p,s),this},h.prototype.removeListener=function(p,d){var a,s,l,i;if(!o(d))throw TypeError("listener must be a function");if(!this._events||!this._events[p])return this;if(a=this._events[p],l=a.length,s=-1,a===d||o(a.listener)&&a.listener===d)delete this._events[p],this._events.removeListener&&this.emit("removeListener",p,d);else if(E(a)){for(i=l;i-- >0;)if(a[i]===d||a[i].listener&&a[i].listener===d){s=i;break}if(s<0)return this;a.length===1?(a.length=0,delete this._events[p]):a.splice(s,1),this._events.removeListener&&this.emit("removeListener",p,d)}return this},h.prototype.removeAllListeners=function(p){var d,a;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[p]&&delete this._events[p],this;if(arguments.length===0){for(d in this._events){if(d==="removeListener")continue;this.removeAllListeners(d)}return this.removeAllListeners("removeListener"),this._events={},this}if(a=this._events[p],o(a))this.removeListener(p,a);else if(a)for(;a.length;)this.removeListener(p,a[a.length-1]);return delete this._events[p],this},h.prototype.listeners=function(p){var d;return!this._events||!this._events[p]?d=[]:o(this._events[p])?d=[this._events[p]]:d=this._events[p].slice(),d},h.prototype.listenerCount=function(p){if(this._events){var d=this._events[p];if(o(d))return 1;if(d)return d.length}return 0},h.listenerCount=function(p,d){return p.listenerCount(d)};function o(p){return typeof p=="function"}function S(p){return typeof p=="number"}function E(p){return typeof p=="object"&&p!==null}function b(p){return p===void 0}},{}],193:[function(u,G,c){var h=u("http"),o=G.exports;for(var S in h)h.hasOwnProperty(S)&&(o[S]=h[S]);o.request=function(E,b){return E||(E={}),E.scheme="https",E.protocol="https:",h.request.call(this,E,b)}},{http:231}],194:[function(u,G,c){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var h=u("util"),o=u("ms");G.exports=function(S){if(typeof S=="number")return S;var E=o(S);if(E===void 0){var b=new Error(h.format("humanize-ms(%j) result undefined",S));console.warn(b.stack)}return E}},{ms:204,util:243}],195:[function(u,G,c){c.read=function(h,o,S,E,b){var p,d,a=b*8-E-1,s=(1<<a)-1,l=s>>1,i=-7,g=S?b-1:0,m=S?-1:1,v=h[o+g];for(g+=m,p=v&(1<<-i)-1,v>>=-i,i+=a;i>0;p=p*256+h[o+g],g+=m,i-=8);for(d=p&(1<<-i)-1,p>>=-i,i+=E;i>0;d=d*256+h[o+g],g+=m,i-=8);if(p===0)p=1-l;else{if(p===s)return d?NaN:(v?-1:1)*Infinity;d=d+Math.pow(2,E),p=p-l}return(v?-1:1)*d*Math.pow(2,p-E)},c.write=function(h,o,S,E,b,p){var d,a,s,l=p*8-b-1,i=(1<<l)-1,g=i>>1,m=b===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=E?0:p-1,w=E?1:-1,_=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===Infinity?(a=isNaN(o)?1:0,d=i):(d=Math.floor(Math.log(o)/Math.LN2),o*(s=Math.pow(2,-d))<1&&(d--,s*=2),d+g>=1?o+=m/s:o+=m*Math.pow(2,1-g),o*s>=2&&(d++,s/=2),d+g>=i?(a=0,d=i):d+g>=1?(a=(o*s-1)*Math.pow(2,b),d=d+g):(a=o*Math.pow(2,g-1)*Math.pow(2,b),d=0));b>=8;h[S+v]=a&255,v+=w,a/=256,b-=8);for(d=d<<b|a,l+=b;l>0;h[S+v]=d&255,v+=w,d/=256,l-=8);h[S+v-w]|=_*128}},{}],196:[function(u,G,c){typeof Object.create=="function"?G.exports=function(o,S){S&&(o.super_=S,o.prototype=Object.create(S.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(o,S){if(S){o.super_=S;var E=function(){};E.prototype=S.prototype,o.prototype=new E,o.prototype.constructor=o}}},{}],197:[function(u,G,c){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/G.exports=function(S){return S!=null&&(h(S)||o(S)||!!S._isBuffer)};function h(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function o(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&h(S.slice(0,0))}},{}],198:[function(u,G,c){var h={}.toString;G.exports=Array.isArray||function(o){return h.call(o)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(u,G){typeof exports=="object"&&typeof module!="undefined"?module.exports=G(u):typeof define=="function"&&define.amd?define(G):G(u)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(u){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(u){for(var G={},c=0,h=u.length;c<h;c++)G[u.charAt(c)]=c;return G}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(u){if(u.length<2){var G=u.charCodeAt(0);return G<128?u:G<2048?fromCharCode(192|G>>>6)+fromCharCode(128|G&63):fromCharCode(224|G>>>12&15)+fromCharCode(128|G>>>6&63)+fromCharCode(128|G&63)}else{var G=65536+(u.charCodeAt(0)-55296)*1024+(u.charCodeAt(1)-56320);return fromCharCode(240|G>>>18&7)+fromCharCode(128|G>>>12&63)+fromCharCode(128|G>>>6&63)+fromCharCode(128|G&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(u){return u.replace(re_utob,cb_utob)},cb_encode=function(u){var G=[0,2,1][u.length%3],c=u.charCodeAt(0)<<16|(u.length>1?u.charCodeAt(1):0)<<8|(u.length>2?u.charCodeAt(2):0),h=[b64chars.charAt(c>>>18),b64chars.charAt(c>>>12&63),G>=2?"=":b64chars.charAt(c>>>6&63),G>=1?"=":b64chars.charAt(c&63)];return h.join("")},btoa=global.btoa?function(u){return global.btoa(u)}:function(u){return u.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(u){var G=Object.prototype.toString.call(u)==="[object Uint8Array]";return G?u.toString("base64"):btoa(utob(String(u)))},encode=function(u,G){return G?_encode(String(u)).replace(/[+\/]/g,function(c){return c=="+"?"-":"_"}).replace(/=/g,""):_encode(u)},encodeURI=function(u){return encode(u,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(u){switch(u.length){case 4:var G=(7&u.charCodeAt(0))<<18|(63&u.charCodeAt(1))<<12|(63&u.charCodeAt(2))<<6|63&u.charCodeAt(3),c=G-65536;return fromCharCode((c>>>10)+55296)+fromCharCode((c&1023)+56320);case 3:return fromCharCode((15&u.charCodeAt(0))<<12|(63&u.charCodeAt(1))<<6|63&u.charCodeAt(2));default:return fromCharCode((31&u.charCodeAt(0))<<6|63&u.charCodeAt(1))}},btou=function(u){return u.replace(re_btou,cb_btou)},cb_decode=function(u){var G=u.length,c=G%4,h=(G>0?b64tab[u.charAt(0)]<<18:0)|(G>1?b64tab[u.charAt(1)]<<12:0)|(G>2?b64tab[u.charAt(2)]<<6:0)|(G>3?b64tab[u.charAt(3)]:0),o=[fromCharCode(h>>>16),fromCharCode(h>>>8&255),fromCharCode(h&255)];return o.length-=[0,0,2,1][c],o.join("")},_atob=global.atob?function(u){return global.atob(u)}:function(u){return u.replace(/\S{1,4}/g,cb_decode)},atob=function(u){return _atob(String(u).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(u){return(u.constructor===buffer.constructor?u:buffer.from(u,"base64")).toString()}:function(u){return(u.constructor===buffer.constructor?u:new buffer(u,"base64")).toString()}:function(u){return btou(_atob(u))},decode=function(u){return _decode(String(u).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var u=global.Base64;return global.Base64=_Base64,u};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(u){return{value:u,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(u){return encode(this,u)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(u,G,c){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";G.exports=o;var h=Object.prototype.hasOwnProperty;function o(S,E,b){if(!S)throw new TypeError("argument dest is required");if(!E)throw new TypeError("argument src is required");return b===void 0&&(b=!0),Object.getOwnPropertyNames(E).forEach(function(d){if(!b&&h.call(S,d))return;var a=Object.getOwnPropertyDescriptor(E,d);Object.defineProperty(S,d,a)}),S}},{}],201:[function(u,G,c){"use strict";function h(){this._types=Object.create(null),this._extensions=Object.create(null);for(var o=0;o<arguments.length;o++)this.define(arguments[o]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}h.prototype.define=function(o,S){for(var E in o){var b=o[E].map(function(a){return a.toLowerCase()});E=E.toLowerCase();for(var p=0;p<b.length;p++){var d=b[p];if(d[0]=="*")continue;if(!S&&d in this._types)throw new Error('Attempt to change mapping for "'+d+'" extension from "'+this._types[d]+'" to "'+E+'". Pass `force=true` to allow this, otherwise remove "'+d+'" from the list of extensions for "'+E+'".');this._types[d]=E}if(S||!this._extensions[E]){var d=b[0];this._extensions[E]=d[0]!="*"?d:d.substr(1)}}},h.prototype.getType=function(o){o=String(o);var S=o.replace(/^.*[/\\]/,"").toLowerCase(),E=S.replace(/^.*\./,"").toLowerCase(),b=S.length<o.length,p=E.length<S.length-1;return(p||!b)&&this._types[E]||null},h.prototype.getExtension=function(o){return o=/^\s*([^;\s]*)/.test(o)&&RegExp.$1,o&&this._extensions[o.toLowerCase()]||null},G.exports=h},{}],202:[function(u,G,c){"use strict";var h=u("./Mime");G.exports=new h(u("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(u,G,c){G.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(u,G,c){var h=1e3,o=h*60,S=o*60,E=S*24,b=E*7,p=E*365.25;G.exports=function(i,g){g=g||{};var m=typeof i;if(m==="string"&&i.length>0)return d(i);if(m==="number"&&isFinite(i))return g.long?s(i):a(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function d(i){if(i=String(i),i.length>100)return;var g=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!g)return;var m=parseFloat(g[1]),v=(g[2]||"ms").toLowerCase();switch(v){case"years":case"year":case"yrs":case"yr":case"y":return m*p;case"weeks":case"week":case"w":return m*b;case"days":case"day":case"d":return m*E;case"hours":case"hour":case"hrs":case"hr":case"h":return m*S;case"minutes":case"minute":case"mins":case"min":case"m":return m*o;case"seconds":case"second":case"secs":case"sec":case"s":return m*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}function a(i){var g=Math.abs(i);return g>=E?Math.round(i/E)+"d":g>=S?Math.round(i/S)+"h":g>=o?Math.round(i/o)+"m":g>=h?Math.round(i/h)+"s":i+"ms"}function s(i){var g=Math.abs(i);return g>=E?l(i,g,E,"day"):g>=S?l(i,g,S,"hour"):g>=o?l(i,g,o,"minute"):g>=h?l(i,g,h,"second"):i+" ms"}function l(i,g,m,v){var w=g>=m*1.5;return Math.round(i/m)+" "+v+(w?"s":"")}},{}],205:[function(u,G,c){(function(h){function o(p,d){for(var a=0,s=p.length-1;s>=0;s--){var l=p[s];l==="."?p.splice(s,1):l===".."?(p.splice(s,1),a++):a&&(p.splice(s,1),a--)}if(d)for(;a--;a)p.unshift("..");return p}c.resolve=function(){for(var p="",d=!1,a=arguments.length-1;a>=-1&&!d;a--){var s=a>=0?arguments[a]:h.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!s)continue;p=s+"/"+p,d=s.charAt(0)==="/"}return p=o(E(p.split("/"),function(l){return!!l}),!d).join("/"),(d?"/":"")+p||"."},c.normalize=function(p){var d=c.isAbsolute(p),a=b(p,-1)==="/";return p=o(E(p.split("/"),function(s){return!!s}),!d).join("/"),!p&&!d&&(p="."),p&&a&&(p+="/"),(d?"/":"")+p},c.isAbsolute=function(p){return p.charAt(0)==="/"},c.join=function(){var p=Array.prototype.slice.call(arguments,0);return c.normalize(E(p,function(d,a){if(typeof d!="string")throw new TypeError("Arguments to path.join must be strings");return d}).join("/"))},c.relative=function(p,d){p=c.resolve(p).substr(1),d=c.resolve(d).substr(1);function a(w){for(var _=0;_<w.length&&!(w[_]!=="");_++);for(var k=w.length-1;k>=0&&!(w[k]!=="");k--);return _>k?[]:w.slice(_,k-_+1)}for(var s=a(p.split("/")),l=a(d.split("/")),i=Math.min(s.length,l.length),g=i,m=0;m<i;m++)if(s[m]!==l[m]){g=m;break}for(var v=[],m=g;m<s.length;m++)v.push("..");return v=v.concat(l.slice(g)),v.join("/")},c.sep="/",c.delimiter=":",c.dirname=function(p){if(typeof p!="string"&&(p=p+""),p.length===0)return".";for(var d=p.charCodeAt(0),a=d===47,s=-1,l=!0,i=p.length-1;i>=1;--i)if(d=p.charCodeAt(i),d===47){if(!l){s=i;break}}else l=!1;return s===-1?a?"/":".":a&&s===1?"/":p.slice(0,s)};function S(p){typeof p!="string"&&(p=p+"");var d=0,a=-1,s=!0,l;for(l=p.length-1;l>=0;--l)if(p.charCodeAt(l)===47){if(!s){d=l+1;break}}else a===-1&&(s=!1,a=l+1);return a===-1?"":p.slice(d,a)}c.basename=function(p,d){var a=S(p);return d&&a.substr(-1*d.length)===d&&(a=a.substr(0,a.length-d.length)),a},c.extname=function(p){typeof p!="string"&&(p=p+"");for(var d=-1,a=0,s=-1,l=!0,i=0,g=p.length-1;g>=0;--g){var m=p.charCodeAt(g);if(m===47){if(!l){a=g+1;break}continue}s===-1&&(l=!1,s=g+1),m===46?d===-1?d=g:i!==1&&(i=1):d!==-1&&(i=-1)}return d===-1||s===-1||i===0||i===1&&d===s-1&&d===a+1?"":p.slice(d,s)};function E(p,d){if(p.filter)return p.filter(d);for(var a=[],s=0;s<p.length;s++)d(p[s],s,p)&&a.push(p[s]);return a}var b="ab".substr(-1)==="b"?function(p,d,a){return p.substr(d,a)}:function(p,d,a){return d<0&&(d=p.length+d),p.substr(d,a)}}).call(this,u("_process"))},{_process:208}],206:[function(u,G,c){(function(h){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var o={function:!0,object:!0},S=o[typeof window]&&window||this,E=S,b=o[typeof c]&&c,p=o[typeof G]&&G&&!G.nodeType&&G,d=b&&p&&typeof h=="object"&&h;d&&(d.global===d||d.window===d||d.self===d)&&(S=d);var a=Math.pow(2,53)-1,s=/\bOpera/,l=this,i=Object.prototype,g=i.hasOwnProperty,m=i.toString;function v(P){return P=String(P),P.charAt(0).toUpperCase()+P.slice(1)}function w(P,F,K){var Q={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return F&&K&&/^Win/i.test(P)&&!/^Windows Phone /i.test(P)&&(Q=Q[/[\d.]+$/.exec(P)])&&(P="Windows "+Q),P=String(P),F&&K&&(P=P.replace(RegExp(F,"i"),K)),P=k(P.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),P}function _(P,F){var K=-1,Q=P?P.length:0;if(typeof Q=="number"&&Q>-1&&Q<=a)for(;++K<Q;)F(P[K],K,P);else O(P,F)}function k(P){return P=y(P),/^(?:webOS|i(?:OS|P))/.test(P)?P:v(P)}function O(P,F){for(var K in P)g.call(P,K)&&F(P[K],K,P)}function M(P){return P==null?v(P):m.call(P).slice(8,-1)}function I(P,F){var K=P!=null?typeof P[F]:"number";return!/^(?:boolean|number|string|undefined)$/.test(K)&&(K=="object"?!!P[F]:!0)}function B(P){return String(P).replace(/([ -])(?!$)/g,"$1?")}function N(P,F){var K=null;return _(P,function(Q,ce){K=F(K,Q,ce,P)}),K}function y(P){return String(P).replace(/^ +| +$/g,"")}function Y(P){var F=S,K=P&&typeof P=="object"&&M(P)!="String";K&&(F=P,P=null);var Q=F.navigator||{},ce=Q.userAgent||"";P||(P=ce);var fe=K||l==E,z=K?!!Q.likeChrome:/\bChrome\b/.test(P)&&!/internal|\n/i.test(m.toString()),se="Object",$=K?se:"ScriptBridgingProxyObject",j=K?se:"Environment",U=K&&F.java?"JavaPackage":M(F.java),R=K?se:"RuntimeObject",C=/\bJava/.test(U)&&F.java,D=C&&M(F.environment)==j,le=C?"a":"\u03B1",he=C?"b":"\u03B2",ve=F.document||{},Ee=F.operamini||F.opera,Se=s.test(Se=K&&Ee?Ee["[[Class]]"]:M(Ee))?Se:Ee=null,ae,pe=P,me=[],ee=null,re=P==ce,Z=re&&Ee&&typeof Ee.version=="function"&&Ee.version(),ue,V=T([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),J=we(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Ce=Oe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),q=W({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),H=ye(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function T(Ge){return N(Ge,function(Ye,Xe){return Ye||RegExp("\\b"+(Xe.pattern||B(Xe))+"\\b","i").exec(P)&&(Xe.label||Xe)})}function W(Ge){return N(Ge,function(Ye,Xe,Je){return Ye||(Xe[Ce]||Xe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ce)]||RegExp("\\b"+B(Je)+"(?:\\b|\\w*\\d)","i").exec(P))&&Je})}function we(Ge){return N(Ge,function(Ye,Xe){return Ye||RegExp("\\b"+(Xe.pattern||B(Xe))+"\\b","i").exec(P)&&(Xe.label||Xe)})}function ye(Ge){return N(Ge,function(Ye,Xe){var Je=Xe.pattern||B(Xe);return!Ye&&(Ye=RegExp("\\b"+Je+"(?:/[\\d.]+|[ \\w.]*)","i").exec(P))&&(Ye=w(Ye,Je,Xe.label||Xe)),Ye})}function Oe(Ge){return N(Ge,function(Ye,Xe){var Je=Xe.pattern||B(Xe);return!Ye&&(Ye=RegExp("\\b"+Je+" *\\d+[.\\w_]*","i").exec(P)||RegExp("\\b"+Je+" *\\w+-[\\w]*","i").exec(P)||RegExp("\\b"+Je+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(P))&&((Ye=String(Xe.label&&!RegExp(Je,"i").test(Xe.label)?Xe.label:Ye).split("/"))[1]&&!/[\d.]+/.test(Ye[0])&&(Ye[0]+=" "+Ye[1]),Xe=Xe.label||Xe,Ye=k(Ye[0].replace(RegExp(Je,"i"),Xe).replace(RegExp("; *(?:"+Xe+"[_-])?","i")," ").replace(RegExp("("+Xe+")[-_.]?(\\w)","i"),"$1 $2"))),Ye})}function Be(Ge){return N(Ge,function(Ye,Xe){return Ye||(RegExp(Xe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(P)||0)[1]||null})}function Fe(){return this.description||""}if(V&&(V=[V]),q&&!Ce&&(Ce=Oe([q])),(ae=/\bGoogle TV\b/.exec(Ce))&&(Ce=ae[0]),/\bSimulator\b/i.test(P)&&(Ce=(Ce?Ce+" ":"")+"Simulator"),J=="Opera Mini"&&/\bOPiOS\b/.test(P)&&me.push("running in Turbo/Uncompressed mode"),J=="IE"&&/\blike iPhone OS\b/.test(P)?(ae=Y(P.replace(/like iPhone OS/,"")),q=ae.manufacturer,Ce=ae.product):/^iP/.test(Ce)?(J||(J="Safari"),H="iOS"+((ae=/ OS ([\d_]+)/i.exec(P))?" "+ae[1].replace(/_/g,"."):"")):J=="Konqueror"&&!/buntu/i.test(H)?H="Kubuntu":q&&q!="Google"&&(/Chrome/.test(J)&&!/\bMobile Safari\b/i.test(P)||/\bVita\b/.test(Ce))||/\bAndroid\b/.test(H)&&/^Chrome/.test(J)&&/\bVersion\//i.test(P)?(J="Android Browser",H=/\bAndroid\b/.test(H)?H:"Android"):J=="Silk"?(/\bMobi/i.test(P)||(H="Android",me.unshift("desktop mode")),/Accelerated *= *true/i.test(P)&&me.unshift("accelerated")):J=="PaleMoon"&&(ae=/\bFirefox\/([\d.]+)\b/.exec(P))?me.push("identifying as Firefox "+ae[1]):J=="Firefox"&&(ae=/\b(Mobile|Tablet|TV)\b/i.exec(P))?(H||(H="Firefox OS"),Ce||(Ce=ae[1])):!J||(ae=!/\bMinefield\b/i.test(P)&&/\b(?:Firefox|Safari)\b/.exec(J))?(J&&!Ce&&/[\/,]|^[^(]+?\)/.test(P.slice(P.indexOf(ae+"/")+8))&&(J=null),(ae=Ce||q||H)&&(Ce||q||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(H))&&(J=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(H)?H:ae)+" Browser")):J=="Electron"&&(ae=(/\bChrome\/([\d.]+)\b/.exec(P)||0)[1])&&me.push("Chromium "+ae),Z||(Z=Be(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",B(J),"(?:Firefox|Minefield|NetFront)"])),(ae=V=="iCab"&&parseFloat(Z)>3&&"WebKit"||/\bOpera\b/.test(J)&&(/\bOPR\b/.test(P)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(P)&&!/^(?:Trident|EdgeHTML)$/.test(V)&&"WebKit"||!V&&/\bMSIE\b/i.test(P)&&(H=="Mac OS"?"Tasman":"Trident")||V=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(J)&&"NetFront")&&(V=[ae]),J=="IE"&&(ae=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(P)||0)[1])?(J+=" Mobile",H="Windows Phone "+(/\+$/.test(ae)?ae:ae+".x"),me.unshift("desktop mode")):/\bWPDesktop\b/i.test(P)?(J="IE Mobile",H="Windows Phone 8.x",me.unshift("desktop mode"),Z||(Z=(/\brv:([\d.]+)/.exec(P)||0)[1])):J!="IE"&&V=="Trident"&&(ae=/\brv:([\d.]+)/.exec(P))&&(J&&me.push("identifying as "+J+(Z?" "+Z:"")),J="IE",Z=ae[1]),re){if(I(F,"global"))if(C&&(ae=C.lang.System,pe=ae.getProperty("os.arch"),H=H||ae.getProperty("os.name")+" "+ae.getProperty("os.version")),D){try{Z=F.require("ringo/engine").version.join("."),J="RingoJS"}catch(Ge){(ae=F.system)&&ae.global.system==F.system&&(J="Narwhal",H||(H=ae[0].os||null))}J||(J="Rhino")}else typeof F.process=="object"&&!F.process.browser&&(ae=F.process)&&(typeof ae.versions=="object"&&(typeof ae.versions.electron=="string"?(me.push("Node "+ae.versions.node),J="Electron",Z=ae.versions.electron):typeof ae.versions.nw=="string"&&(me.push("Chromium "+Z,"Node "+ae.versions.node),J="NW.js",Z=ae.versions.nw)),J||(J="Node.js",pe=ae.arch,H=ae.platform,Z=/[\d.]+/.exec(ae.version),Z=Z?Z[0]:null));else M(ae=F.runtime)==$?(J="Adobe AIR",H=ae.flash.system.Capabilities.os):M(ae=F.phantom)==R?(J="PhantomJS",Z=(ae=ae.version||null)&&ae.major+"."+ae.minor+"."+ae.patch):typeof ve.documentMode=="number"&&(ae=/\bTrident\/(\d+)/i.exec(P))?(Z=[Z,ve.documentMode],(ae=+ae[1]+4)!=Z[1]&&(me.push("IE "+Z[1]+" mode"),V&&(V[1]=""),Z[1]=ae),Z=J=="IE"?String(Z[1].toFixed(1)):Z[0]):typeof ve.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(J)&&(me.push("masking as "+J+" "+Z),J="IE",Z="11.0",V=["Trident"],H="Windows");H=H&&k(H)}if(Z&&(ae=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Z)||/(?:alpha|beta)(?: ?\d)?/i.exec(P+";"+(re&&Q.appMinorVersion))||/\bMinefield\b/i.test(P)&&"a")&&(ee=/b/i.test(ae)?"beta":"alpha",Z=Z.replace(RegExp(ae+"\\+?$"),"")+(ee=="beta"?he:le)+(/\d+\+?/.exec(ae)||"")),J=="Fennec"||J=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(H))J="Firefox Mobile";else if(J=="Maxthon"&&Z)Z=Z.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ce))Ce=="Xbox 360"&&(H=null),Ce=="Xbox 360"&&/\bIEMobile\b/.test(P)&&me.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(J)||J&&!Ce&&!/Browser|Mobi/.test(J))&&(H=="Windows CE"||/Mobi/i.test(P)))J+=" Mobile";else if(J=="IE"&&re)try{F.external===null&&me.unshift("platform preview")}catch(Ge){me.unshift("embedded")}else(/\bBlackBerry\b/.test(Ce)||/\bBB10\b/.test(P))&&(ae=(RegExp(Ce.replace(/ +/g," *")+"/([.\\d]+)","i").exec(P)||0)[1]||Z)?(ae=[ae,/BB10/.test(P)],H=(ae[1]?(Ce=null,q="BlackBerry"):"Device Software")+" "+ae[0],Z=null):this!=O&&Ce!="Wii"&&(re&&Ee||/Opera/.test(J)&&/\b(?:MSIE|Firefox)\b/i.test(P)||J=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(H)||J=="IE"&&(H&&!/^Win/.test(H)&&Z>5.5||/\bWindows XP\b/.test(H)&&Z>8||Z==8&&!/\bTrident\b/.test(P)))&&!s.test(ae=Y.call(O,P.replace(s,"")+";"))&&ae.name&&(ae="ing as "+ae.name+((ae=ae.version)?" "+ae:""),s.test(J)?(/\bIE\b/.test(ae)&&H=="Mac OS"&&(H=null),ae="identify"+ae):(ae="mask"+ae,Se?J=k(Se.replace(/([a-z])([A-Z])/g,"$1 $2")):J="Opera",/\bIE\b/.test(ae)&&(H=null),re||(Z=null)),V=["Presto"],me.push(ae));(ae=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(P)||0)[1])&&(ae=[parseFloat(ae.replace(/\.(\d)$/,".0$1")),ae],J=="Safari"&&ae[1].slice(-1)=="+"?(J="WebKit Nightly",ee="alpha",Z=ae[1].slice(0,-1)):(Z==ae[1]||Z==(ae[2]=(/\bSafari\/([\d.]+\+?)/i.exec(P)||0)[1]))&&(Z=null),ae[1]=(/\bChrome\/([\d.]+)/i.exec(P)||0)[1],ae[0]==537.36&&ae[2]==537.36&&parseFloat(ae[1])>=28&&V=="WebKit"&&(V=["Blink"]),!re||!z&&!ae[1]?(V&&(V[1]="like Safari"),ae=(ae=ae[0],ae<400?1:ae<500?2:ae<526?3:ae<533?4:ae<534?"4+":ae<535?5:ae<537?6:ae<538?7:ae<601?8:"8")):(V&&(V[1]="like Chrome"),ae=ae[1]||(ae=ae[0],ae<530?1:ae<532?2:ae<532.05?3:ae<533?4:ae<534.03?5:ae<534.07?6:ae<534.1?7:ae<534.13?8:ae<534.16?9:ae<534.24?10:ae<534.3?11:ae<535.01?12:ae<535.02?"13+":ae<535.07?15:ae<535.11?16:ae<535.19?17:ae<536.05?18:ae<536.1?19:ae<537.01?20:ae<537.11?"21+":ae<537.13?23:ae<537.18?24:ae<537.24?25:ae<537.36?26:V!="Blink"?"27":"28")),V&&(V[1]+=" "+(ae+=typeof ae=="number"?".x":/[.+]/.test(ae)?"":"+")),J=="Safari"&&(!Z||parseInt(Z)>45)&&(Z=ae)),J=="Opera"&&(ae=/\bzbov|zvav$/.exec(H))?(J+=" ",me.unshift("desktop mode"),ae=="zvav"?(J+="Mini",Z=null):J+="Mobile",H=H.replace(RegExp(" *"+ae+"$"),"")):J=="Safari"&&/\bChrome\b/.exec(V&&V[1])&&(me.unshift("desktop mode"),J="Chrome Mobile",Z=null,/\bOS X\b/.test(H)?(q="Apple",H="iOS 4.3+"):H=null),Z&&Z.indexOf(ae=/[\d.]+$/.exec(H))==0&&P.indexOf("/"+ae+"-")>-1&&(H=y(H.replace(ae,""))),V&&!/\b(?:Avant|Nook)\b/.test(J)&&(/Browser|Lunascape|Maxthon/.test(J)||J!="Safari"&&/^iOS/.test(H)&&/\bSafari\b/.test(V[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(J)&&V[1])&&((ae=V[V.length-1])&&me.push(ae)),me.length&&(me=["("+me.join("; ")+")"]),q&&Ce&&Ce.indexOf(q)<0&&me.push("on "+q),Ce&&me.push((/^on /.test(me[me.length-1])?"":"on ")+Ce),H&&(ae=/ ([\d.+]+)$/.exec(H),ue=ae&&H.charAt(H.length-ae[0].length-1)=="/",H={architecture:32,family:ae&&!ue?H.replace(ae[0],""):H,version:ae?ae[1]:null,toString:function(){var Ge=this.version;return this.family+(Ge&&!ue?" "+Ge:"")+(this.architecture==64?" 64-bit":"")}}),(ae=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(pe))&&!/\bi686\b/i.test(pe)?(H&&(H.architecture=64,H.family=H.family.replace(RegExp(" *"+ae),"")),J&&(/\bWOW64\b/i.test(P)||re&&/\w(?:86|32)$/.test(Q.cpuClass||Q.platform)&&!/\bWin64; x64\b/i.test(P))&&me.unshift("32-bit")):H&&/^OS X/.test(H.family)&&J=="Chrome"&&parseFloat(Z)>=39&&(H.architecture=64),P||(P=null);var Ue={};return Ue.description=P,Ue.layout=V&&V[0],Ue.manufacturer=q,Ue.name=J,Ue.prerelease=ee,Ue.product=Ce,Ue.ua=P,Ue.version=J&&Z,Ue.os=H||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ue.parse=Y,Ue.toString=Fe,Ue.version&&me.unshift(Z),Ue.name&&me.unshift(J),H&&J&&!(H==String(H).split(" ")[0]&&(H==J.split(" ")[0]||Ce))&&me.push(Ce?"("+H+")":"on "+H),me.length&&(Ue.description=me.join(" ")),Ue}var X=Y();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=X,define(function(){return X})):b&&p?O(X,function(P,F){b[F]=P}):S.platform=X}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(u,G,c){(function(h){"use strict";typeof h=="undefined"||!h.version||h.version.indexOf("v0.")===0||h.version.indexOf("v1.")===0&&h.version.indexOf("v1.8.")!==0?G.exports={nextTick:o}:G.exports=h;function o(S,E,b,p){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var d=arguments.length,a,s;switch(d){case 0:case 1:return h.nextTick(S);case 2:return h.nextTick(function(){S.call(null,E)});case 3:return h.nextTick(function(){S.call(null,E,b)});case 4:return h.nextTick(function(){S.call(null,E,b,p)});default:for(a=new Array(d-1),s=0;s<a.length;)a[s++]=arguments[s];return h.nextTick(function(){S.apply(null,a)})}}}).call(this,u("_process"))},{_process:208}],208:[function(u,G,c){var h=G.exports={},o,S;function E(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?o=setTimeout:o=E}catch(_){o=E}try{typeof clearTimeout=="function"?S=clearTimeout:S=b}catch(_){S=b}})();function p(_){if(o===setTimeout)return setTimeout(_,0);if((o===E||!o)&&setTimeout)return o=setTimeout,setTimeout(_,0);try{return o(_,0)}catch(k){try{return o.call(null,_,0)}catch(O){return o.call(this,_,0)}}}function d(_){if(S===clearTimeout)return clearTimeout(_);if((S===b||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(_);try{return S(_)}catch(k){try{return S.call(null,_)}catch(O){return S.call(this,_)}}}var a=[],s=!1,l,i=-1;function g(){if(!s||!l)return;s=!1,l.length?a=l.concat(a):i=-1,a.length&&m()}function m(){if(s)return;var _=p(g);s=!0;for(var k=a.length;k;){for(l=a,a=[];++i<k;)l&&l[i].run();i=-1,k=a.length}l=null,s=!1,d(_)}h.nextTick=function(_){var k=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)k[O-1]=arguments[O];a.push(new v(_,k)),a.length===1&&!s&&p(m)};function v(_,k){this.fun=_,this.array=k}v.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={};function w(){}h.on=w,h.addListener=w,h.once=w,h.off=w,h.removeListener=w,h.removeAllListeners=w,h.emit=w,h.prependListener=w,h.prependOnceListener=w,h.listeners=function(_){return[]},h.binding=function(_){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(_){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],209:[function(u,G,c){(function(h){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(o){var S=typeof c=="object"&&c&&!c.nodeType&&c,E=typeof G=="object"&&G&&!G.nodeType&&G,b=typeof h=="object"&&h;(b.global===b||b.window===b||b.self===b)&&(o=b);var p,d=2147483647,a=36,s=1,l=26,i=38,g=700,m=72,v=128,w="-",_=/^xn--/,k=/[^\x20-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=a-s,B=Math.floor,N=String.fromCharCode,y;function Y(U){throw new RangeError(M[U])}function X(U,R){for(var C=U.length,D=[];C--;)D[C]=R(U[C]);return D}function P(U,R){var C=U.split("@"),D="";C.length>1&&(D=C[0]+"@",U=C[1]),U=U.replace(O,".");var le=U.split("."),he=X(le,R).join(".");return D+he}function F(U){for(var R=[],C=0,D=U.length,le,he;C<D;)le=U.charCodeAt(C++),le>=55296&&le<=56319&&C<D?(he=U.charCodeAt(C++),(he&64512)==56320?R.push(((le&1023)<<10)+(he&1023)+65536):(R.push(le),C--)):R.push(le);return R}function K(U){return X(U,function(R){var C="";return R>65535&&(R-=65536,C+=N(R>>>10&1023|55296),R=56320|R&1023),C+=N(R),C}).join("")}function Q(U){return U-48<10?U-22:U-65<26?U-65:U-97<26?U-97:a}function ce(U,R){return U+22+75*(U<26)-((R!=0)<<5)}function fe(U,R,C){var D=0;for(U=C?B(U/g):U>>1,U+=B(U/R);U>I*l>>1;D+=a)U=B(U/I);return B(D+(I+1)*U/(U+i))}function z(U){var R=[],C=U.length,D,le=0,he=v,ve=m,Ee,Se,ae,pe,me,ee,re,Z,ue;for(Ee=U.lastIndexOf(w),Ee<0&&(Ee=0),Se=0;Se<Ee;++Se)U.charCodeAt(Se)>=128&&Y("not-basic"),R.push(U.charCodeAt(Se));for(ae=Ee>0?Ee+1:0;ae<C;){for(pe=le,me=1,ee=a;!(ae>=C&&Y("invalid-input"),re=Q(U.charCodeAt(ae++)),(re>=a||re>B((d-le)/me))&&Y("overflow"),le+=re*me,Z=ee<=ve?s:ee>=ve+l?l:ee-ve,re<Z);ee+=a)ue=a-Z,me>B(d/ue)&&Y("overflow"),me*=ue;D=R.length+1,ve=fe(le-pe,D,pe==0),B(le/D)>d-he&&Y("overflow"),he+=B(le/D),le%=D,R.splice(le++,0,he)}return K(R)}function se(U){var R,C,D,le,he,ve,Ee,Se,ae,pe,me,ee=[],re,Z,ue,V;for(U=F(U),re=U.length,R=v,C=0,he=m,ve=0;ve<re;++ve)me=U[ve],me<128&&ee.push(N(me));for(D=le=ee.length,le&&ee.push(w);D<re;){for(Ee=d,ve=0;ve<re;++ve)me=U[ve],me>=R&&me<Ee&&(Ee=me);for(Z=D+1,Ee-R>B((d-C)/Z)&&Y("overflow"),C+=(Ee-R)*Z,R=Ee,ve=0;ve<re;++ve)if(me=U[ve],me<R&&++C>d&&Y("overflow"),me==R){for(Se=C,ae=a;!(pe=ae<=he?s:ae>=he+l?l:ae-he,Se<pe);ae+=a)V=Se-pe,ue=a-pe,ee.push(N(ce(pe+V%ue,0))),Se=B(V/ue);ee.push(N(ce(Se,0))),he=fe(C,Z,D==le),C=0,++D}++C,++R}return ee.join("")}function $(U){return P(U,function(R){return _.test(R)?z(R.slice(4).toLowerCase()):R})}function j(U){return P(U,function(R){return k.test(R)?"xn--"+se(R):R})}if(p={version:"1.4.1",ucs2:{decode:F,encode:K},decode:z,encode:se,toASCII:j,toUnicode:$},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return p});else if(S&&E)if(G.exports==S)E.exports=p;else for(y in p)p.hasOwnProperty(y)&&(S[y]=p[y]);else o.punycode=p})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(u,G,c){"use strict";function h(S,E){return Object.prototype.hasOwnProperty.call(S,E)}G.exports=function(S,E,b,p){E=E||"&",b=b||"=";var d={};if(typeof S!="string"||S.length===0)return d;var a=/\+/g;S=S.split(E);var s=1e3;p&&typeof p.maxKeys=="number"&&(s=p.maxKeys);var l=S.length;s>0&&l>s&&(l=s);for(var i=0;i<l;++i){var g=S[i].replace(a,"%20"),m=g.indexOf(b),v,w,_,k;m>=0?(v=g.substr(0,m),w=g.substr(m+1)):(v=g,w=""),_=decodeURIComponent(v),k=decodeURIComponent(w),h(d,_)?o(d[_])?d[_].push(k):d[_]=[d[_],k]:d[_]=k}return d};var o=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(u,G,c){"use strict";var h=function(b){switch(typeof b){case"string":return b;case"boolean":return b?"true":"false";case"number":return isFinite(b)?b:"";default:return""}};G.exports=function(b,p,d,a){return p=p||"&",d=d||"=",b===null&&(b=void 0),typeof b=="object"?S(E(b),function(s){var l=encodeURIComponent(h(s))+d;return o(b[s])?S(b[s],function(i){return l+encodeURIComponent(h(i))}).join(p):l+encodeURIComponent(h(b[s]))}).join(p):a?encodeURIComponent(h(a))+d+encodeURIComponent(h(b)):""};var o=Array.isArray||function(b){return Object.prototype.toString.call(b)==="[object Array]"};function S(b,p){if(b.map)return b.map(p);for(var d=[],a=0;a<b.length;a++)d.push(p(b[a],a));return d}var E=Object.keys||function(b){var p=[];for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&p.push(d);return p}},{}],212:[function(u,G,c){"use strict";c.decode=c.parse=u("./decode"),c.encode=c.stringify=u("./encode")},{"./decode":210,"./encode":211}],213:[function(u,G,c){G.exports=u("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=b(h),S=u("babel-runtime/core-js/object/keys"),E=b(S);function b(k){return k&&k.__esModule?k:{default:k}}var p=u("process-nextick-args"),d=E.default||function(k){var O=[];for(var M in k)O.push(M);return O};G.exports=v;var a=(0,o.default)(u("core-util-is"));a.inherits=u("inherits");var s=u("./_stream_readable"),l=u("./_stream_writable");a.inherits(v,s);for(var i=d(l.prototype),g=0;g<i.length;g++){var m=i[g];v.prototype[m]||(v.prototype[m]=l.prototype[m])}function v(k){if(!(this instanceof v))return new v(k);s.call(this,k),l.call(this,k),k&&k.readable===!1&&(this.readable=!1),k&&k.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,k&&k.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function w(){if(this.allowHalfOpen||this._writableState.ended)return;p.nextTick(_,this)}function _(k){k.end()}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(O){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=O,this._writableState.destroyed=O}}),v.prototype._destroy=function(k,O){this.push(null),this.end(),p.nextTick(O,k)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(d){return d&&d.__esModule?d:{default:d}}G.exports=p;var E=u("./_stream_transform"),b=(0,o.default)(u("core-util-is"));b.inherits=u("inherits"),b.inherits(p,E);function p(d){if(!(this instanceof p))return new p(d);E.call(this,d)}p.prototype._transform=function(d,a,s){s(null,d)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(u,G,c){(function(h,o){"use strict";var S=u("babel-runtime/core-js/object/get-prototype-of"),E=d(S),b=u("babel-runtime/core-js/object/create"),p=d(b);function d(V){return V&&V.__esModule?V:{default:V}}var a=u("process-nextick-args");G.exports=F;var s=u("isarray"),l;F.ReadableState=P;var i=u("events").EventEmitter,g=function(J,Ce){return J.listeners(Ce).length},m=u("./internal/streams/stream"),v=u("safe-buffer").Buffer,w=o.Uint8Array||function(){};function _(V){return v.from(V)}function k(V){return v.isBuffer(V)||V instanceof w}var O=(0,p.default)(u("core-util-is"));O.inherits=u("inherits");var M=u("util"),I=void 0;M&&M.debuglog?I=M.debuglog("stream"):I=function(){};var B=u("./internal/streams/BufferList"),N=u("./internal/streams/destroy"),y;O.inherits(F,m);var Y=["error","close","destroy","pause","resume"];function X(V,J,Ce){if(typeof V.prependListener=="function")return V.prependListener(J,Ce);!V._events||!V._events[J]?V.on(J,Ce):s(V._events[J])?V._events[J].unshift(Ce):V._events[J]=[Ce,V._events[J]]}function P(V,J){l=l||u("./_stream_duplex"),V=V||{};var Ce=J instanceof l;this.objectMode=!!V.objectMode,Ce&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var q=V.highWaterMark,H=V.readableHighWaterMark,T=this.objectMode?16:16*1024;q||q===0?this.highWaterMark=q:Ce&&(H||H===0)?this.highWaterMark=H:this.highWaterMark=T,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new B,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(y||(y=u("string_decoder/").StringDecoder),this.decoder=new y(V.encoding),this.encoding=V.encoding)}function F(V){if(l=l||u("./_stream_duplex"),!(this instanceof F))return new F(V);this._readableState=new P(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),m.call(this)}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(J){if(!this._readableState)return;this._readableState.destroyed=J}}),F.prototype.destroy=N.destroy,F.prototype._undestroy=N.undestroy,F.prototype._destroy=function(V,J){this.push(null),J(V)},F.prototype.push=function(V,J){var Ce=this._readableState,q;return Ce.objectMode?q=!0:typeof V=="string"&&(J=J||Ce.defaultEncoding,J!==Ce.encoding&&(V=v.from(V,J),J=""),q=!0),K(this,V,J,!1,q)},F.prototype.unshift=function(V){return K(this,V,null,!0,!1)};function K(V,J,Ce,q,H){var T=V._readableState;if(J===null)T.reading=!1,j(V,T);else{var W;H||(W=ce(T,J)),W?V.emit("error",W):T.objectMode||J&&J.length>0?(typeof J!="string"&&!T.objectMode&&(0,E.default)(J)!==v.prototype&&(J=_(J)),q?T.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):Q(V,T,J,!0):T.ended?V.emit("error",new Error("stream.push() after EOF")):(T.reading=!1,T.decoder&&!Ce?(J=T.decoder.write(J),T.objectMode||J.length!==0?Q(V,T,J,!1):C(V,T)):Q(V,T,J,!1))):q||(T.reading=!1)}return fe(T)}function Q(V,J,Ce,q){J.flowing&&J.length===0&&!J.sync?(V.emit("data",Ce),V.read(0)):(J.length+=J.objectMode?1:Ce.length,q?J.buffer.unshift(Ce):J.buffer.push(Ce),J.needReadable&&U(V)),C(V,J)}function ce(V,J){var Ce;return!k(J)&&typeof J!="string"&&J!==void 0&&!V.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function fe(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(V){return y||(y=u("string_decoder/").StringDecoder),this._readableState.decoder=new y(V),this._readableState.encoding=V,this};var z=8388608;function se(V){return V>=z?V=z:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function $(V,J){return V<=0||J.length===0&&J.ended?0:J.objectMode?1:V!==V?J.flowing&&J.length?J.buffer.head.data.length:J.length:(V>J.highWaterMark&&(J.highWaterMark=se(V)),V<=J.length?V:J.ended?J.length:(J.needReadable=!0,0))}F.prototype.read=function(V){I("read",V),V=parseInt(V,10);var J=this._readableState,Ce=V;if(V!==0&&(J.emittedReadable=!1),V===0&&J.needReadable&&(J.length>=J.highWaterMark||J.ended))return I("read: emitReadable",J.length,J.ended),J.length===0&&J.ended?re(this):U(this),null;if(V=$(V,J),V===0&&J.ended)return J.length===0&&re(this),null;var q=J.needReadable;I("need readable",q),(J.length===0||J.length-V<J.highWaterMark)&&(q=!0,I("length less than watermark",q)),J.ended||J.reading?(q=!1,I("reading or ended",q)):q&&(I("do read"),J.reading=!0,J.sync=!0,J.length===0&&(J.needReadable=!0),this._read(J.highWaterMark),J.sync=!1,J.reading||(V=$(Ce,J)));var H;return V>0?H=ae(V,J):H=null,H===null?(J.needReadable=!0,V=0):J.length-=V,J.length===0&&(J.ended||(J.needReadable=!0),Ce!==V&&J.ended&&re(this)),H!==null&&this.emit("data",H),H};function j(V,J){if(J.ended)return;if(J.decoder){var Ce=J.decoder.end();Ce&&Ce.length&&(J.buffer.push(Ce),J.length+=J.objectMode?1:Ce.length)}J.ended=!0,U(V)}function U(V){var J=V._readableState;J.needReadable=!1,J.emittedReadable||(I("emitReadable",J.flowing),J.emittedReadable=!0,J.sync?a.nextTick(R,V):R(V))}function R(V){I("emit readable"),V.emit("readable"),Se(V)}function C(V,J){J.readingMore||(J.readingMore=!0,a.nextTick(D,V,J))}function D(V,J){for(var Ce=J.length;!J.reading&&!J.flowing&&!J.ended&&J.length<J.highWaterMark&&!(I("maybeReadMore read 0"),V.read(0),Ce===J.length);)Ce=J.length;J.readingMore=!1}F.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},F.prototype.pipe=function(V,J){var Ce=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=V;break;case 1:q.pipes=[q.pipes,V];break;default:q.pipes.push(V);break}q.pipesCount+=1,I("pipe count=%d opts=%j",q.pipesCount,J);var H=(!J||J.end!==!1)&&V!==h.stdout&&V!==h.stderr,T=H?we:Je;q.endEmitted?a.nextTick(T):Ce.once("end",T),V.on("unpipe",W);function W(Ne,nt){I("onunpipe"),Ne===Ce&&(nt&&nt.hasUnpiped===!1&&(nt.hasUnpiped=!0,Be()))}function we(){I("onend"),V.end()}var ye=le(Ce);V.on("drain",ye);var Oe=!1;function Be(){I("cleanup"),V.removeListener("close",Ye),V.removeListener("finish",Xe),V.removeListener("drain",ye),V.removeListener("error",Ge),V.removeListener("unpipe",W),Ce.removeListener("end",we),Ce.removeListener("end",Je),Ce.removeListener("data",Ue),Oe=!0,q.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&ye()}var Fe=!1;Ce.on("data",Ue);function Ue(Ne){I("ondata"),Fe=!1;var nt=V.write(Ne);nt===!1&&!Fe&&((q.pipesCount===1&&q.pipes===V||q.pipesCount>1&&ue(q.pipes,V)!==-1)&&!Oe&&(I("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,Fe=!0),Ce.pause())}function Ge(Ne){I("onerror",Ne),Je(),V.removeListener("error",Ge),g(V,"error")===0&&V.emit("error",Ne)}X(V,"error",Ge);function Ye(){V.removeListener("finish",Xe),Je()}V.once("close",Ye);function Xe(){I("onfinish"),V.removeListener("close",Ye),Je()}V.once("finish",Xe);function Je(){I("unpipe"),Ce.unpipe(V)}return V.emit("pipe",Ce),q.flowing||(I("pipe resume"),Ce.resume()),V};function le(V){return function(){var J=V._readableState;I("pipeOnDrain",J.awaitDrain),J.awaitDrain&&J.awaitDrain--,J.awaitDrain===0&&g(V,"data")&&(J.flowing=!0,Se(V))}}F.prototype.unpipe=function(V){var J=this._readableState,Ce={hasUnpiped:!1};if(J.pipesCount===0)return this;if(J.pipesCount===1)return V&&V!==J.pipes?this:(V||(V=J.pipes),J.pipes=null,J.pipesCount=0,J.flowing=!1,V&&V.emit("unpipe",this,Ce),this);if(!V){var q=J.pipes,H=J.pipesCount;J.pipes=null,J.pipesCount=0,J.flowing=!1;for(var T=0;T<H;T++)q[T].emit("unpipe",this,Ce);return this}var W=ue(J.pipes,V);return W===-1?this:(J.pipes.splice(W,1),J.pipesCount-=1,J.pipesCount===1&&(J.pipes=J.pipes[0]),V.emit("unpipe",this,Ce),this)},F.prototype.on=function(V,J){var Ce=m.prototype.on.call(this,V,J);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="readable"){var q=this._readableState;!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.emittedReadable=!1,q.reading?q.length&&U(this):a.nextTick(he,this))}return Ce},F.prototype.addListener=F.prototype.on;function he(V){I("readable nexttick read 0"),V.read(0)}F.prototype.resume=function(){var V=this._readableState;return V.flowing||(I("resume"),V.flowing=!0,ve(this,V)),this};function ve(V,J){J.resumeScheduled||(J.resumeScheduled=!0,a.nextTick(Ee,V,J))}function Ee(V,J){J.reading||(I("resume read 0"),V.read(0)),J.resumeScheduled=!1,J.awaitDrain=0,V.emit("resume"),Se(V),J.flowing&&!J.reading&&V.read(0)}F.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Se(V){var J=V._readableState;for(I("flow",J.flowing);J.flowing&&V.read()!==null;);}F.prototype.wrap=function(V){var J=this,Ce=this._readableState,q=!1;V.on("end",function(){if(I("wrapped end"),Ce.decoder&&!Ce.ended){var W=Ce.decoder.end();W&&W.length&&J.push(W)}J.push(null)}),V.on("data",function(W){if(I("wrapped data"),Ce.decoder&&(W=Ce.decoder.write(W)),Ce.objectMode&&W==null)return;if(!Ce.objectMode&&(!W||!W.length))return;var we=J.push(W);we||(q=!0,V.pause())});for(var H in V)this[H]===void 0&&typeof V[H]=="function"&&(this[H]=function(W){return function(){return V[W].apply(V,arguments)}}(H));for(var T=0;T<Y.length;T++)V.on(Y[T],this.emit.bind(this,Y[T]));return this._read=function(W){I("wrapped _read",W),q&&(q=!1,V.resume())},this},Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),F._fromList=ae;function ae(V,J){if(J.length===0)return null;var Ce;return J.objectMode?Ce=J.buffer.shift():!V||V>=J.length?(J.decoder?Ce=J.buffer.join(""):J.buffer.length===1?Ce=J.buffer.head.data:Ce=J.buffer.concat(J.length),J.buffer.clear()):Ce=pe(V,J.buffer,J.decoder),Ce}function pe(V,J,Ce){var q;return V<J.head.data.length?(q=J.head.data.slice(0,V),J.head.data=J.head.data.slice(V)):V===J.head.data.length?q=J.shift():q=Ce?me(V,J):ee(V,J),q}function me(V,J){var Ce=J.head,q=1,H=Ce.data;for(V-=H.length;Ce=Ce.next;){var T=Ce.data,W=V>T.length?T.length:V;if(W===T.length?H+=T:H+=T.slice(0,V),V-=W,V===0){W===T.length?(++q,Ce.next?J.head=Ce.next:J.head=J.tail=null):(J.head=Ce,Ce.data=T.slice(W));break}++q}return J.length-=q,H}function ee(V,J){var Ce=v.allocUnsafe(V),q=J.head,H=1;for(q.data.copy(Ce),V-=q.data.length;q=q.next;){var T=q.data,W=V>T.length?T.length:V;if(T.copy(Ce,Ce.length-V,0,W),V-=W,V===0){W===T.length?(++H,q.next?J.head=q.next:J.head=J.tail=null):(J.head=q,q.data=T.slice(W));break}++H}return J.length-=H,Ce}function re(V){var J=V._readableState;if(J.length>0)throw new Error('"endReadable()" called on non-empty stream');J.endEmitted||(J.ended=!0,a.nextTick(Z,J,V))}function Z(V,J){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,J.readable=!1,J.emit("end"))}function ue(V,J){for(var Ce=0,q=V.length;Ce<q;Ce++)if(V[Ce]===J)return Ce;return-1}}).call(this,u("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(l){return l&&l.__esModule?l:{default:l}}G.exports=d;var E=u("./_stream_duplex"),b=(0,o.default)(u("core-util-is"));b.inherits=u("inherits"),b.inherits(d,E);function p(l,i){var g=this._transformState;g.transforming=!1;var m=g.writecb;if(!m)return this.emit("error",new Error("write callback called multiple times"));g.writechunk=null,g.writecb=null,i!=null&&this.push(i),m(l);var v=this._readableState;v.reading=!1,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}function d(l){if(!(this instanceof d))return new d(l);E.call(this,l),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",a)}function a(){var l=this;typeof this._flush=="function"?this._flush(function(i,g){s(l,i,g)}):s(this,null,null)}d.prototype.push=function(l,i){return this._transformState.needTransform=!1,E.prototype.push.call(this,l,i)},d.prototype._transform=function(l,i,g){throw new Error("_transform() is not implemented")},d.prototype._write=function(l,i,g){var m=this._transformState;if(m.writecb=g,m.writechunk=l,m.writeencoding=i,!m.transforming){var v=this._readableState;(m.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},d.prototype._read=function(l){var i=this._transformState;i.writechunk!==null&&i.writecb&&!i.transforming?(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform)):i.needTransform=!0},d.prototype._destroy=function(l,i){var g=this;E.prototype._destroy.call(this,l,function(m){i(m),g.emit("close")})};function s(l,i,g){if(i)return l.emit("error",i);if(g!=null&&l.push(g),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(u,G,c){(function(h,o){"use strict";var S=u("babel-runtime/core-js/object/define-property"),E=m(S),b=u("babel-runtime/core-js/symbol/has-instance"),p=m(b),d=u("babel-runtime/core-js/symbol"),a=m(d),s=u("babel-runtime/core-js/object/create"),l=m(s),i=u("babel-runtime/core-js/set-immediate"),g=m(i);function m(ee){return ee&&ee.__esModule?ee:{default:ee}}var v=u("process-nextick-args");G.exports=ce;function w(ee,re,Z){this.chunk=ee,this.encoding=re,this.callback=Z,this.next=null}function _(ee){var re=this;this.next=null,this.entry=null,this.finish=function(){me(re,ee)}}var k=!h.browser&&["v0.10","v0.9."].indexOf(h.version.slice(0,5))>-1?g.default:v.nextTick,O;ce.WritableState=K;var M=(0,l.default)(u("core-util-is"));M.inherits=u("inherits");var I={deprecate:u("util-deprecate")},B=u("./internal/streams/stream"),N=u("safe-buffer").Buffer,y=o.Uint8Array||function(){};function Y(ee){return N.from(ee)}function X(ee){return N.isBuffer(ee)||ee instanceof y}var P=u("./internal/streams/destroy");M.inherits(ce,B);function F(){}function K(ee,re){O=O||u("./_stream_duplex"),ee=ee||{};var Z=re instanceof O;this.objectMode=!!ee.objectMode,Z&&(this.objectMode=this.objectMode||!!ee.writableObjectMode);var ue=ee.highWaterMark,V=ee.writableHighWaterMark,J=this.objectMode?16:16*1024;ue||ue===0?this.highWaterMark=ue:Z&&(V||V===0)?this.highWaterMark=V:this.highWaterMark=J,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ce=ee.decodeStrings===!1;this.decodeStrings=!Ce,this.defaultEncoding=ee.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(q){C(re,q)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}K.prototype.getBuffer=function(){for(var re=this.bufferedRequest,Z=[];re;)Z.push(re),re=re.next;return Z},function(){try{Object.defineProperty(K.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ee){}}();var Q;typeof a.default=="function"&&p.default&&typeof Function.prototype[p.default]=="function"?(Q=Function.prototype[p.default],(0,E.default)(ce,p.default,{value:function(re){return Q.call(this,re)?!0:this!==ce?!1:re&&re._writableState instanceof K}})):Q=function(re){return re instanceof this};function ce(ee){if(O=O||u("./_stream_duplex"),!Q.call(ce,this)&&!(this instanceof O))return new ce(ee);this._writableState=new K(ee,this),this.writable=!0,ee&&(typeof ee.write=="function"&&(this._write=ee.write),typeof ee.writev=="function"&&(this._writev=ee.writev),typeof ee.destroy=="function"&&(this._destroy=ee.destroy),typeof ee.final=="function"&&(this._final=ee.final)),B.call(this)}ce.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function fe(ee,re){var Z=new Error("write after end");ee.emit("error",Z),v.nextTick(re,Z)}function z(ee,re,Z,ue){var V=!0,J=!1;return Z===null?J=new TypeError("May not write null values to stream"):typeof Z!="string"&&Z!==void 0&&!re.objectMode&&(J=new TypeError("Invalid non-string/buffer chunk")),J&&(ee.emit("error",J),v.nextTick(ue,J),V=!1),V}ce.prototype.write=function(ee,re,Z){var ue=this._writableState,V=!1,J=!ue.objectMode&&X(ee);return J&&!N.isBuffer(ee)&&(ee=Y(ee)),typeof re=="function"&&(Z=re,re=null),J?re="buffer":re||(re=ue.defaultEncoding),typeof Z!="function"&&(Z=F),ue.ended?fe(this,Z):(J||z(this,ue,ee,Z))&&(ue.pendingcb++,V=$(this,ue,J,ee,re,Z)),V},ce.prototype.cork=function(){var ee=this._writableState;ee.corked++},ce.prototype.uncork=function(){var ee=this._writableState;ee.corked&&(ee.corked--,!ee.writing&&!ee.corked&&!ee.finished&&!ee.bufferProcessing&&ee.bufferedRequest&&he(this,ee))},ce.prototype.setDefaultEncoding=function(re){if(typeof re=="string"&&(re=re.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((re+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+re);return this._writableState.defaultEncoding=re,this};function se(ee,re,Z){return!ee.objectMode&&ee.decodeStrings!==!1&&typeof re=="string"&&(re=N.from(re,Z)),re}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $(ee,re,Z,ue,V,J){if(!Z){var Ce=se(re,ue,V);ue!==Ce&&(Z=!0,V="buffer",ue=Ce)}var q=re.objectMode?1:ue.length;re.length+=q;var H=re.length<re.highWaterMark;if(H||(re.needDrain=!0),re.writing||re.corked){var T=re.lastBufferedRequest;re.lastBufferedRequest={chunk:ue,encoding:V,isBuf:Z,callback:J,next:null},T?T.next=re.lastBufferedRequest:re.bufferedRequest=re.lastBufferedRequest,re.bufferedRequestCount+=1}else j(ee,re,!1,q,ue,V,J);return H}function j(ee,re,Z,ue,V,J,Ce){re.writelen=ue,re.writecb=Ce,re.writing=!0,re.sync=!0,Z?ee._writev(V,re.onwrite):ee._write(V,J,re.onwrite),re.sync=!1}function U(ee,re,Z,ue,V){--re.pendingcb,Z?(v.nextTick(V,ue),v.nextTick(ae,ee,re),ee._writableState.errorEmitted=!0,ee.emit("error",ue)):(V(ue),ee._writableState.errorEmitted=!0,ee.emit("error",ue),ae(ee,re))}function R(ee){ee.writing=!1,ee.writecb=null,ee.length-=ee.writelen,ee.writelen=0}function C(ee,re){var Z=ee._writableState,ue=Z.sync,V=Z.writecb;if(R(Z),re)U(ee,Z,ue,re,V);else{var J=ve(Z);!J&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&he(ee,Z),ue?k(D,ee,Z,J,V):D(ee,Z,J,V)}}function D(ee,re,Z,ue){Z||le(ee,re),re.pendingcb--,ue(),ae(ee,re)}function le(ee,re){re.length===0&&re.needDrain&&(re.needDrain=!1,ee.emit("drain"))}function he(ee,re){re.bufferProcessing=!0;var Z=re.bufferedRequest;if(ee._writev&&Z&&Z.next){var ue=re.bufferedRequestCount,V=new Array(ue),J=re.corkedRequestsFree;J.entry=Z;for(var Ce=0,q=!0;Z;)V[Ce]=Z,Z.isBuf||(q=!1),Z=Z.next,Ce+=1;V.allBuffers=q,j(ee,re,!0,re.length,V,"",J.finish),re.pendingcb++,re.lastBufferedRequest=null,J.next?(re.corkedRequestsFree=J.next,J.next=null):re.corkedRequestsFree=new _(re),re.bufferedRequestCount=0}else{for(;Z;){var H=Z.chunk,T=Z.encoding,W=Z.callback,we=re.objectMode?1:H.length;if(j(ee,re,!1,we,H,T,W),Z=Z.next,re.bufferedRequestCount--,re.writing)break}Z===null&&(re.lastBufferedRequest=null)}re.bufferedRequest=Z,re.bufferProcessing=!1}ce.prototype._write=function(ee,re,Z){Z(new Error("_write() is not implemented"))},ce.prototype._writev=null,ce.prototype.end=function(ee,re,Z){var ue=this._writableState;typeof ee=="function"?(Z=ee,ee=null,re=null):typeof re=="function"&&(Z=re,re=null),ee!=null&&this.write(ee,re),ue.corked&&(ue.corked=1,this.uncork()),!ue.ending&&!ue.finished&&pe(this,ue,Z)};function ve(ee){return ee.ending&&ee.length===0&&ee.bufferedRequest===null&&!ee.finished&&!ee.writing}function Ee(ee,re){ee._final(function(Z){re.pendingcb--,Z&&ee.emit("error",Z),re.prefinished=!0,ee.emit("prefinish"),ae(ee,re)})}function Se(ee,re){!re.prefinished&&!re.finalCalled&&(typeof ee._final=="function"?(re.pendingcb++,re.finalCalled=!0,v.nextTick(Ee,ee,re)):(re.prefinished=!0,ee.emit("prefinish")))}function ae(ee,re){var Z=ve(re);return Z&&(Se(ee,re),re.pendingcb===0&&(re.finished=!0,ee.emit("finish"))),Z}function pe(ee,re,Z){re.ending=!0,ae(ee,re),Z&&(re.finished?v.nextTick(Z):ee.once("finish",Z)),re.ended=!0,ee.writable=!1}function me(ee,re,Z){var ue=ee.entry;for(ee.entry=null;ue;){var V=ue.callback;re.pendingcb--,V(Z),ue=ue.next}re.corkedRequestsFree?re.corkedRequestsFree.next=ee:re.corkedRequestsFree=ee}Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(re){if(!this._writableState)return;this._writableState.destroyed=re}}),ce.prototype.destroy=P.destroy,ce.prototype._undestroy=P.undestroy,ce.prototype._destroy=function(ee,re){this.end(),re(ee)}}).call(this,u("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(u,G,c){"use strict";function h(b,p){if(!(b instanceof p))throw new TypeError("Cannot call a class as a function")}var o=u("safe-buffer").Buffer,S=u("util");function E(b,p,d){b.copy(p,d)}G.exports=function(){function b(){h(this,b),this.head=null,this.tail=null,this.length=0}return b.prototype.push=function(d){var a={data:d,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},b.prototype.unshift=function(d){var a={data:d,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},b.prototype.shift=function(){if(this.length===0)return;var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d},b.prototype.clear=function(){this.head=this.tail=null,this.length=0},b.prototype.join=function(d){if(this.length===0)return"";for(var a=this.head,s=""+a.data;a=a.next;)s+=d+a.data;return s},b.prototype.concat=function(d){if(this.length===0)return o.alloc(0);if(this.length===1)return this.head.data;for(var a=o.allocUnsafe(d>>>0),s=this.head,l=0;s;)E(s.data,a,l),l+=s.data.length,s=s.next;return a},b}(),S&&S.inspect&&S.inspect.custom&&(G.exports.prototype[S.inspect.custom]=function(){var b=S.inspect({length:this.length});return this.constructor.name+" "+b})},{"safe-buffer":228,util:71}],220:[function(u,G,c){"use strict";var h=u("process-nextick-args");function o(b,p){var d=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(p?p(b):b&&(!this._writableState||!this._writableState.errorEmitted)&&h.nextTick(E,this,b),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(b||null,function(l){!p&&l?(h.nextTick(E,d,l),d._writableState&&(d._writableState.errorEmitted=!0)):p&&p(l)}),this)}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function E(b,p){b.emit("error",p)}G.exports={destroy:o,undestroy:S}},{"process-nextick-args":207}],221:[function(u,G,c){"use strict";G.exports=u("events").EventEmitter},{events:192}],222:[function(u,G,c){G.exports=u("./readable").PassThrough},{"./readable":223}],223:[function(u,G,c){c=G.exports=u("./lib/_stream_readable.js"),c.Stream=c,c.Readable=c,c.Writable=u("./lib/_stream_writable.js"),c.Duplex=u("./lib/_stream_duplex.js"),c.Transform=u("./lib/_stream_transform.js"),c.PassThrough=u("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(u,G,c){G.exports=u("./readable").Transform},{"./readable":223}],225:[function(u,G,c){G.exports=u("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(u,G,c){var h=function(){return this}()||Function("return this")(),o=h.regeneratorRuntime&&Object.getOwnPropertyNames(h).indexOf("regeneratorRuntime")>=0,S=o&&h.regeneratorRuntime;if(h.regeneratorRuntime=void 0,G.exports=u("./runtime"),o)h.regeneratorRuntime=S;else try{delete h.regeneratorRuntime}catch(E){h.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(u,G,c){!function(h){"use strict";var o=Object.prototype,S=o.hasOwnProperty,E,b=typeof Symbol=="function"?Symbol:{},p=b.iterator||"@@iterator",d=b.asyncIterator||"@@asyncIterator",a=b.toStringTag||"@@toStringTag",s=typeof G=="object",l=h.regeneratorRuntime;if(l){s&&(G.exports=l);return}l=h.regeneratorRuntime=s?G.exports:{};function i($,j,U,R){var C=j&&j.prototype instanceof O?j:O,D=Object.create(C.prototype),le=new fe(R||[]);return D._invoke=F($,U,le),D}l.wrap=i;function g($,j,U){try{return{type:"normal",arg:$.call(j,U)}}catch(R){return{type:"throw",arg:R}}}var m="suspendedStart",v="suspendedYield",w="executing",_="completed",k={};function O(){}function M(){}function I(){}var B={};B[p]=function(){return this};var N=Object.getPrototypeOf,y=N&&N(N(z([])));y&&y!==o&&S.call(y,p)&&(B=y);var Y=I.prototype=O.prototype=Object.create(B);M.prototype=Y.constructor=I,I.constructor=M,I[a]=M.displayName="GeneratorFunction";function X($){["next","throw","return"].forEach(function(j){$[j]=function(U){return this._invoke(j,U)}})}l.isGeneratorFunction=function($){var j=typeof $=="function"&&$.constructor;return j?j===M||(j.displayName||j.name)==="GeneratorFunction":!1},l.mark=function($){return Object.setPrototypeOf?Object.setPrototypeOf($,I):($.__proto__=I,a in $||($[a]="GeneratorFunction")),$.prototype=Object.create(Y),$},l.awrap=function($){return{__await:$}};function P($){function j(C,D,le,he){var ve=g($[C],$,D);if(ve.type==="throw")he(ve.arg);else{var Ee=ve.arg,Se=Ee.value;return Se&&typeof Se=="object"&&S.call(Se,"__await")?Promise.resolve(Se.__await).then(function(ae){j("next",ae,le,he)},function(ae){j("throw",ae,le,he)}):Promise.resolve(Se).then(function(ae){Ee.value=ae,le(Ee)},he)}}var U;function R(C,D){function le(){return new Promise(function(he,ve){j(C,D,he,ve)})}return U=U?U.then(le,le):le()}this._invoke=R}X(P.prototype),P.prototype[d]=function(){return this},l.AsyncIterator=P,l.async=function($,j,U,R){var C=new P(i($,j,U,R));return l.isGeneratorFunction(j)?C:C.next().then(function(D){return D.done?D.value:C.next()})};function F($,j,U){var R=m;return function(D,le){if(R===w)throw new Error("Generator is already running");if(R===_){if(D==="throw")throw le;return se()}for(U.method=D,U.arg=le;;){var he=U.delegate;if(he){var ve=K(he,U);if(ve){if(ve===k)continue;return ve}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(R===m)throw R=_,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);R=w;var Ee=g($,j,U);if(Ee.type==="normal"){if(R=U.done?_:v,Ee.arg===k)continue;return{value:Ee.arg,done:U.done}}else Ee.type==="throw"&&(R=_,U.method="throw",U.arg=Ee.arg)}}}function K($,j){var U=$.iterator[j.method];if(U===E){if(j.delegate=null,j.method==="throw"){if($.iterator.return&&(j.method="return",j.arg=E,K($,j),j.method==="throw"))return k;j.method="throw",j.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var R=g(U,$.iterator,j.arg);if(R.type==="throw")return j.method="throw",j.arg=R.arg,j.delegate=null,k;var C=R.arg;if(!C)return j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,k;if(C.done)j[$.resultName]=C.value,j.next=$.nextLoc,j.method!=="return"&&(j.method="next",j.arg=E);else return C;return j.delegate=null,k}X(Y),Y[a]="Generator",Y[p]=function(){return this},Y.toString=function(){return"[object Generator]"};function Q($){var j={tryLoc:$[0]};1 in $&&(j.catchLoc=$[1]),2 in $&&(j.finallyLoc=$[2],j.afterLoc=$[3]),this.tryEntries.push(j)}function ce($){var j=$.completion||{};j.type="normal",delete j.arg,$.completion=j}function fe($){this.tryEntries=[{tryLoc:"root"}],$.forEach(Q,this),this.reset(!0)}l.keys=function($){var j=[];for(var U in $)j.push(U);return j.reverse(),function R(){for(;j.length;){var C=j.pop();if(C in $)return R.value=C,R.done=!1,R}return R.done=!0,R}};function z($){if($){var j=$[p];if(j)return j.call($);if(typeof $.next=="function")return $;if(!isNaN($.length)){var U=-1,R=function C(){for(;++U<$.length;)if(S.call($,U))return C.value=$[U],C.done=!1,C;return C.value=E,C.done=!0,C};return R.next=R}}return{next:se}}l.values=z;function se(){return{value:E,done:!0}}fe.prototype={constructor:fe,reset:function($){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(ce),!$)for(var j in this)j.charAt(0)==="t"&&S.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=E)},stop:function(){this.done=!0;var $=this.tryEntries[0],j=$.completion;if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function($){if(this.done)throw $;var j=this;function U(ve,Ee){return D.type="throw",D.arg=$,j.next=ve,Ee&&(j.method="next",j.arg=E),!!Ee}for(var R=this.tryEntries.length-1;R>=0;--R){var C=this.tryEntries[R],D=C.completion;if(C.tryLoc==="root")return U("end");if(C.tryLoc<=this.prev){var le=S.call(C,"catchLoc"),he=S.call(C,"finallyLoc");if(le&&he){if(this.prev<C.catchLoc)return U(C.catchLoc,!0);if(this.prev<C.finallyLoc)return U(C.finallyLoc)}else if(le){if(this.prev<C.catchLoc)return U(C.catchLoc,!0)}else if(he){if(this.prev<C.finallyLoc)return U(C.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function($,j){for(var U=this.tryEntries.length-1;U>=0;--U){var R=this.tryEntries[U];if(R.tryLoc<=this.prev&&S.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var C=R;break}}C&&($==="break"||$==="continue")&&C.tryLoc<=j&&j<=C.finallyLoc&&(C=null);var D=C?C.completion:{};return D.type=$,D.arg=j,C?(this.method="next",this.next=C.finallyLoc,k):this.complete(D)},complete:function($,j){if($.type==="throw")throw $.arg;return $.type==="break"||$.type==="continue"?this.next=$.arg:$.type==="return"?(this.rval=this.arg=$.arg,this.method="return",this.next="end"):$.type==="normal"&&j&&(this.next=j),k},finish:function($){for(var j=this.tryEntries.length-1;j>=0;--j){var U=this.tryEntries[j];if(U.finallyLoc===$)return this.complete(U.completion,U.afterLoc),ce(U),k}},catch:function($){for(var j=this.tryEntries.length-1;j>=0;--j){var U=this.tryEntries[j];if(U.tryLoc===$){var R=U.completion;if(R.type==="throw"){var C=R.arg;ce(U)}return C}}throw new Error("illegal catch attempt")},delegateYield:function($,j,U){return this.delegate={iterator:z($),resultName:j,nextLoc:U},this.method==="next"&&(this.arg=E),k}}}(function(){return this}()||Function("return this")())},{}],228:[function(u,G,c){var h=u("buffer"),o=h.Buffer;function S(b,p){for(var d in b)p[d]=b[d]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?G.exports=h:(S(h,c),c.Buffer=E);function E(b,p,d){return o(b,p,d)}S(o,E),E.from=function(b,p,d){if(typeof b=="number")throw new TypeError("Argument must not be a number");return o(b,p,d)},E.alloc=function(b,p,d){if(typeof b!="number")throw new TypeError("Argument must be a number");var a=o(b);return p!==void 0?typeof d=="string"?a.fill(p,d):a.fill(p):a.fill(0),a},E.allocUnsafe=function(b){if(typeof b!="number")throw new TypeError("Argument must be a number");return o(b)},E.allocUnsafeSlow=function(b){if(typeof b!="number")throw new TypeError("Argument must be a number");return h.SlowBuffer(b)}},{buffer:73}],229:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/core-js/string/from-code-point"),S=v(o),E=u("babel-runtime/core-js/json/stringify"),b=v(E),p=u("babel-runtime/helpers/typeof"),d=v(p),a=u("babel-runtime/core-js/object/define-property"),s=v(a),l=u("babel-runtime/core-js/object/keys"),i=v(l),g=u("babel-runtime/core-js/object/create"),m=v(g);function v(w){return w&&w.__esModule?w:{default:w}}(function(w){w.parser=function(T,W){return new k(T,W)},w.SAXParser=k,w.SAXStream=Y,w.createStream=y,w.MAX_BUFFER_LENGTH=64*1024;var _=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];w.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function k(T,W){if(!(this instanceof k))return new k(T,W);var we=this;M(we),we.q=we.c="",we.bufferCheckPosition=w.MAX_BUFFER_LENGTH,we.opt=W||{},we.opt.lowercase=we.opt.lowercase||we.opt.lowercasetags,we.looseCase=we.opt.lowercase?"toLowerCase":"toUpperCase",we.tags=[],we.closed=we.closedRoot=we.sawRoot=!1,we.tag=we.error=null,we.strict=!!T,we.noscript=!!(T||we.opt.noscript),we.state=D.BEGIN,we.strictEntities=we.opt.strictEntities,we.ENTITIES=we.strictEntities?(0,m.default)(w.XML_ENTITIES):(0,m.default)(w.ENTITIES),we.attribList=[],we.opt.xmlns&&(we.ns=(0,m.default)(Q)),we.trackPosition=we.opt.position!==!1,we.trackPosition&&(we.position=we.line=we.column=0),he(we,"onready")}m.default||(Object.create=function(T){function W(){}W.prototype=T;var we=new W;return we}),i.default||(Object.keys=function(T){var W=[];for(var we in T)T.hasOwnProperty(we)&&W.push(we);return W});function O(T){for(var W=Math.max(w.MAX_BUFFER_LENGTH,10),we=0,ye=0,Oe=_.length;ye<Oe;ye++){var Be=T[_[ye]].length;if(Be>W)switch(_[ye]){case"textNode":Ee(T);break;case"cdata":ve(T,"oncdata",T.cdata),T.cdata="";break;case"script":ve(T,"onscript",T.script),T.script="";break;default:ae(T,"Max buffer length exceeded: "+_[ye])}we=Math.max(we,Be)}var Fe=w.MAX_BUFFER_LENGTH-we;T.bufferCheckPosition=Fe+T.position}function M(T){for(var W=0,we=_.length;W<we;W++)T[_[W]]=""}function I(T){Ee(T),T.cdata!==""&&(ve(T,"oncdata",T.cdata),T.cdata=""),T.script!==""&&(ve(T,"onscript",T.script),T.script="")}k.prototype={end:function(){pe(this)},write:H,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){I(this)}};var B;try{B=u("stream").Stream}catch(T){B=function(){}}var N=w.EVENTS.filter(function(T){return T!=="error"&&T!=="end"});function y(T,W){return new Y(T,W)}function Y(T,W){if(!(this instanceof Y))return new Y(T,W);B.apply(this),this._parser=new k(T,W),this.writable=!0,this.readable=!0;var we=this;this._parser.onend=function(){we.emit("end")},this._parser.onerror=function(ye){we.emit("error",ye),we._parser.error=null},this._decoder=null,N.forEach(function(ye){(0,s.default)(we,"on"+ye,{get:function(){return we._parser["on"+ye]},set:function(Be){if(!Be)return we.removeAllListeners(ye),we._parser["on"+ye]=Be,Be;we.on(ye,Be)},enumerable:!0,configurable:!1})})}Y.prototype=(0,m.default)(B.prototype,{constructor:{value:Y}}),Y.prototype.write=function(T){if(typeof h=="function"&&typeof h.isBuffer=="function"&&h.isBuffer(T)){if(!this._decoder){var W=u("string_decoder").StringDecoder;this._decoder=new W("utf8")}T=this._decoder.write(T)}return this._parser.write(T.toString()),this.emit("data",T),!0},Y.prototype.end=function(T){return T&&T.length&&this.write(T),this._parser.end(),!0},Y.prototype.on=function(T,W){var we=this;return!we._parser["on"+T]&&N.indexOf(T)!==-1&&(we._parser["on"+T]=function(){var ye=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ye.splice(0,0,T),we.emit.apply(we,ye)}),B.prototype.on.call(we,T,W)};var X="[CDATA[",P="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",K="http://www.w3.org/2000/xmlns/",Q={xml:F,xmlns:K},ce=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,fe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,z=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,se=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function $(T){return T===" "||T===`
`||T==="\r"||T===" "}function j(T){return T==='"'||T==="'"}function U(T){return T===">"||$(T)}function R(T,W){return T.test(W)}function C(T,W){return!R(T,W)}var D=0;w.STATE={BEGIN:D++,BEGIN_WHITESPACE:D++,TEXT:D++,TEXT_ENTITY:D++,OPEN_WAKA:D++,SGML_DECL:D++,SGML_DECL_QUOTED:D++,DOCTYPE:D++,DOCTYPE_QUOTED:D++,DOCTYPE_DTD:D++,DOCTYPE_DTD_QUOTED:D++,COMMENT_STARTING:D++,COMMENT:D++,COMMENT_ENDING:D++,COMMENT_ENDED:D++,CDATA:D++,CDATA_ENDING:D++,CDATA_ENDING_2:D++,PROC_INST:D++,PROC_INST_BODY:D++,PROC_INST_ENDING:D++,OPEN_TAG:D++,OPEN_TAG_SLASH:D++,ATTRIB:D++,ATTRIB_NAME:D++,ATTRIB_NAME_SAW_WHITE:D++,ATTRIB_VALUE:D++,ATTRIB_VALUE_QUOTED:D++,ATTRIB_VALUE_CLOSED:D++,ATTRIB_VALUE_UNQUOTED:D++,ATTRIB_VALUE_ENTITY_Q:D++,ATTRIB_VALUE_ENTITY_U:D++,CLOSE_TAG:D++,CLOSE_TAG_SAW_WHITE:D++,SCRIPT:D++,SCRIPT_ENDING:D++},w.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},w.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,i.default)(w.ENTITIES).forEach(function(T){var W=w.ENTITIES[T],we=typeof W=="number"?String.fromCharCode(W):W;w.ENTITIES[T]=we});for(var le in w.STATE)w.STATE[w.STATE[le]]=le;D=w.STATE;function he(T,W,we){T[W]&&T[W](we)}function ve(T,W,we){T.textNode&&Ee(T),he(T,W,we)}function Ee(T){T.textNode=Se(T.opt,T.textNode),T.textNode&&he(T,"ontext",T.textNode),T.textNode=""}function Se(T,W){return T.trim&&(W=W.trim()),T.normalize&&(W=W.replace(/\s+/g," ")),W}function ae(T,W){return Ee(T),T.trackPosition&&(W+=`
Line: `+T.line+`
Column: `+T.column+`
Char: `+T.c),W=new Error(W),T.error=W,he(T,"onerror",W),T}function pe(T){return T.sawRoot&&!T.closedRoot&&me(T,"Unclosed root tag"),T.state!==D.BEGIN&&T.state!==D.BEGIN_WHITESPACE&&T.state!==D.TEXT&&ae(T,"Unexpected end"),Ee(T),T.c="",T.closed=!0,he(T,"onend"),k.call(T,T.strict,T.opt),T}function me(T,W){if((typeof T=="undefined"?"undefined":(0,d.default)(T))!=="object"||!(T instanceof k))throw new Error("bad call to strictFail");T.strict&&ae(T,W)}function ee(T){T.strict||(T.tagName=T.tagName[T.looseCase]());var W=T.tags[T.tags.length-1]||T,we=T.tag={name:T.tagName,attributes:{}};T.opt.xmlns&&(we.ns=W.ns),T.attribList.length=0,ve(T,"onopentagstart",we)}function re(T,W){var we=T.indexOf(":"),ye=we<0?["",T]:T.split(":"),Oe=ye[0],Be=ye[1];return W&&T==="xmlns"&&(Oe="xmlns",Be=""),{prefix:Oe,local:Be}}function Z(T){if(T.strict||(T.attribName=T.attribName[T.looseCase]()),T.attribList.indexOf(T.attribName)!==-1||T.tag.attributes.hasOwnProperty(T.attribName)){T.attribName=T.attribValue="";return}if(T.opt.xmlns){var W=re(T.attribName,!0),we=W.prefix,ye=W.local;if(we==="xmlns")if(ye==="xml"&&T.attribValue!==F)me(T,"xml: prefix must be bound to "+F+`
Actual: `+T.attribValue);else if(ye==="xmlns"&&T.attribValue!==K)me(T,"xmlns: prefix must be bound to "+K+`
Actual: `+T.attribValue);else{var Oe=T.tag,Be=T.tags[T.tags.length-1]||T;Oe.ns===Be.ns&&(Oe.ns=(0,m.default)(Be.ns)),Oe.ns[ye]=T.attribValue}T.attribList.push([T.attribName,T.attribValue])}else T.tag.attributes[T.attribName]=T.attribValue,ve(T,"onattribute",{name:T.attribName,value:T.attribValue});T.attribName=T.attribValue=""}function ue(T,W){if(T.opt.xmlns){var we=T.tag,ye=re(T.tagName);we.prefix=ye.prefix,we.local=ye.local,we.uri=we.ns[ye.prefix]||"",we.prefix&&!we.uri&&(me(T,"Unbound namespace prefix: "+(0,b.default)(T.tagName)),we.uri=ye.prefix);var Oe=T.tags[T.tags.length-1]||T;we.ns&&Oe.ns!==we.ns&&(0,i.default)(we.ns).forEach(function(Ve){ve(T,"onopennamespace",{prefix:Ve,uri:we.ns[Ve]})});for(var Be=0,Fe=T.attribList.length;Be<Fe;Be++){var Ue=T.attribList[Be],Ge=Ue[0],Ye=Ue[1],Xe=re(Ge,!0),Je=Xe.prefix,Ne=Xe.local,nt=Je===""?"":we.ns[Je]||"",ot={name:Ge,value:Ye,prefix:Je,local:Ne,uri:nt};Je&&Je!=="xmlns"&&!nt&&(me(T,"Unbound namespace prefix: "+(0,b.default)(Je)),ot.uri=Je),T.tag.attributes[Ge]=ot,ve(T,"onattribute",ot)}T.attribList.length=0}T.tag.isSelfClosing=!!W,T.sawRoot=!0,T.tags.push(T.tag),ve(T,"onopentag",T.tag),W||(!T.noscript&&T.tagName.toLowerCase()==="script"?T.state=D.SCRIPT:T.state=D.TEXT,T.tag=null,T.tagName=""),T.attribName=T.attribValue="",T.attribList.length=0}function V(T){if(!T.tagName){me(T,"Weird empty close tag."),T.textNode+="</>",T.state=D.TEXT;return}if(T.script){if(T.tagName!=="script"){T.script+="</"+T.tagName+">",T.tagName="",T.state=D.SCRIPT;return}ve(T,"onscript",T.script),T.script=""}var W=T.tags.length,we=T.tagName;T.strict||(we=we[T.looseCase]());for(var ye=we;W--;){var Oe=T.tags[W];if(Oe.name!==ye)me(T,"Unexpected close tag");else break}if(W<0){me(T,"Unmatched closing tag: "+T.tagName),T.textNode+="</"+T.tagName+">",T.state=D.TEXT;return}T.tagName=we;for(var Be=T.tags.length;Be-- >W;){var Fe=T.tag=T.tags.pop();T.tagName=T.tag.name,ve(T,"onclosetag",T.tagName);var Ue={};for(var Ge in Fe.ns)Ue[Ge]=Fe.ns[Ge];var Ye=T.tags[T.tags.length-1]||T;T.opt.xmlns&&Fe.ns!==Ye.ns&&(0,i.default)(Fe.ns).forEach(function(Xe){var Je=Fe.ns[Xe];ve(T,"onclosenamespace",{prefix:Xe,uri:Je})})}W===0&&(T.closedRoot=!0),T.tagName=T.attribValue=T.attribName="",T.attribList.length=0,T.state=D.TEXT}function J(T){var W=T.entity,we=W.toLowerCase(),ye,Oe="";return T.ENTITIES[W]?T.ENTITIES[W]:T.ENTITIES[we]?T.ENTITIES[we]:(W=we,W.charAt(0)==="#"&&(W.charAt(1)==="x"?(W=W.slice(2),ye=parseInt(W,16),Oe=ye.toString(16)):(W=W.slice(1),ye=parseInt(W,10),Oe=ye.toString(10))),W=W.replace(/^0+/,""),isNaN(ye)||Oe.toLowerCase()!==W?(me(T,"Invalid character entity"),"&"+T.entity+";"):(0,S.default)(ye))}function Ce(T,W){W==="<"?(T.state=D.OPEN_WAKA,T.startTagPosition=T.position):$(W)||(me(T,"Non-whitespace before first tag."),T.textNode=W,T.state=D.TEXT)}function q(T,W){var we="";return W<T.length&&(we=T.charAt(W)),we}function H(T){var W=this;if(this.error)throw this.error;if(W.closed)return ae(W,"Cannot write after close. Assign an onready handler.");if(T===null)return pe(W);(typeof T=="undefined"?"undefined":(0,d.default)(T))==="object"&&(T=T.toString());for(var we=0,ye="";!(ye=q(T,we++),W.c=ye,!ye);){W.trackPosition&&(W.position++,ye===`
`?(W.line++,W.column=0):W.column++);switch(W.state){case D.BEGIN:if(W.state=D.BEGIN_WHITESPACE,ye==="\uFEFF")continue;Ce(W,ye);continue;case D.BEGIN_WHITESPACE:Ce(W,ye);continue;case D.TEXT:if(W.sawRoot&&!W.closedRoot){for(var Oe=we-1;ye&&ye!=="<"&&ye!=="&";)ye=q(T,we++),ye&&W.trackPosition&&(W.position++,ye===`
`?(W.line++,W.column=0):W.column++);W.textNode+=T.substring(Oe,we-1)}ye==="<"&&!(W.sawRoot&&W.closedRoot&&!W.strict)?(W.state=D.OPEN_WAKA,W.startTagPosition=W.position):(!$(ye)&&(!W.sawRoot||W.closedRoot)&&me(W,"Text data outside of root node."),ye==="&"?W.state=D.TEXT_ENTITY:W.textNode+=ye);continue;case D.SCRIPT:ye==="<"?W.state=D.SCRIPT_ENDING:W.script+=ye;continue;case D.SCRIPT_ENDING:ye==="/"?W.state=D.CLOSE_TAG:(W.script+="<"+ye,W.state=D.SCRIPT);continue;case D.OPEN_WAKA:if(ye==="!")W.state=D.SGML_DECL,W.sgmlDecl="";else if(!$(ye))if(R(ce,ye))W.state=D.OPEN_TAG,W.tagName=ye;else if(ye==="/")W.state=D.CLOSE_TAG,W.tagName="";else if(ye==="?")W.state=D.PROC_INST,W.procInstName=W.procInstBody="";else{if(me(W,"Unencoded <"),W.startTagPosition+1<W.position){var Be=W.position-W.startTagPosition;ye=new Array(Be).join(" ")+ye}W.textNode+="<"+ye,W.state=D.TEXT}continue;case D.SGML_DECL:(W.sgmlDecl+ye).toUpperCase()===X?(ve(W,"onopencdata"),W.state=D.CDATA,W.sgmlDecl="",W.cdata=""):W.sgmlDecl+ye==="--"?(W.state=D.COMMENT,W.comment="",W.sgmlDecl=""):(W.sgmlDecl+ye).toUpperCase()===P?(W.state=D.DOCTYPE,(W.doctype||W.sawRoot)&&me(W,"Inappropriately located doctype declaration"),W.doctype="",W.sgmlDecl=""):ye===">"?(ve(W,"onsgmldeclaration",W.sgmlDecl),W.sgmlDecl="",W.state=D.TEXT):(j(ye)&&(W.state=D.SGML_DECL_QUOTED),W.sgmlDecl+=ye);continue;case D.SGML_DECL_QUOTED:ye===W.q&&(W.state=D.SGML_DECL,W.q=""),W.sgmlDecl+=ye;continue;case D.DOCTYPE:ye===">"?(W.state=D.TEXT,ve(W,"ondoctype",W.doctype),W.doctype=!0):(W.doctype+=ye,ye==="["?W.state=D.DOCTYPE_DTD:j(ye)&&(W.state=D.DOCTYPE_QUOTED,W.q=ye));continue;case D.DOCTYPE_QUOTED:W.doctype+=ye,ye===W.q&&(W.q="",W.state=D.DOCTYPE);continue;case D.DOCTYPE_DTD:W.doctype+=ye,ye==="]"?W.state=D.DOCTYPE:j(ye)&&(W.state=D.DOCTYPE_DTD_QUOTED,W.q=ye);continue;case D.DOCTYPE_DTD_QUOTED:W.doctype+=ye,ye===W.q&&(W.state=D.DOCTYPE_DTD,W.q="");continue;case D.COMMENT:ye==="-"?W.state=D.COMMENT_ENDING:W.comment+=ye;continue;case D.COMMENT_ENDING:ye==="-"?(W.state=D.COMMENT_ENDED,W.comment=Se(W.opt,W.comment),W.comment&&ve(W,"oncomment",W.comment),W.comment=""):(W.comment+="-"+ye,W.state=D.COMMENT);continue;case D.COMMENT_ENDED:ye!==">"?(me(W,"Malformed comment"),W.comment+="--"+ye,W.state=D.COMMENT):W.state=D.TEXT;continue;case D.CDATA:ye==="]"?W.state=D.CDATA_ENDING:W.cdata+=ye;continue;case D.CDATA_ENDING:ye==="]"?W.state=D.CDATA_ENDING_2:(W.cdata+="]"+ye,W.state=D.CDATA);continue;case D.CDATA_ENDING_2:ye===">"?(W.cdata&&ve(W,"oncdata",W.cdata),ve(W,"onclosecdata"),W.cdata="",W.state=D.TEXT):ye==="]"?W.cdata+="]":(W.cdata+="]]"+ye,W.state=D.CDATA);continue;case D.PROC_INST:ye==="?"?W.state=D.PROC_INST_ENDING:$(ye)?W.state=D.PROC_INST_BODY:W.procInstName+=ye;continue;case D.PROC_INST_BODY:if(!W.procInstBody&&$(ye))continue;ye==="?"?W.state=D.PROC_INST_ENDING:W.procInstBody+=ye;continue;case D.PROC_INST_ENDING:ye===">"?(ve(W,"onprocessinginstruction",{name:W.procInstName,body:W.procInstBody}),W.procInstName=W.procInstBody="",W.state=D.TEXT):(W.procInstBody+="?"+ye,W.state=D.PROC_INST_BODY);continue;case D.OPEN_TAG:R(fe,ye)?W.tagName+=ye:(ee(W),ye===">"?ue(W):ye==="/"?W.state=D.OPEN_TAG_SLASH:($(ye)||me(W,"Invalid character in tag name"),W.state=D.ATTRIB));continue;case D.OPEN_TAG_SLASH:ye===">"?(ue(W,!0),V(W)):(me(W,"Forward-slash in opening tag not followed by >"),W.state=D.ATTRIB);continue;case D.ATTRIB:if($(ye))continue;ye===">"?ue(W):ye==="/"?W.state=D.OPEN_TAG_SLASH:R(ce,ye)?(W.attribName=ye,W.attribValue="",W.state=D.ATTRIB_NAME):me(W,"Invalid attribute name");continue;case D.ATTRIB_NAME:ye==="="?W.state=D.ATTRIB_VALUE:ye===">"?(me(W,"Attribute without value"),W.attribValue=W.attribName,Z(W),ue(W)):$(ye)?W.state=D.ATTRIB_NAME_SAW_WHITE:R(fe,ye)?W.attribName+=ye:me(W,"Invalid attribute name");continue;case D.ATTRIB_NAME_SAW_WHITE:if(ye==="=")W.state=D.ATTRIB_VALUE;else{if($(ye))continue;me(W,"Attribute without value"),W.tag.attributes[W.attribName]="",W.attribValue="",ve(W,"onattribute",{name:W.attribName,value:""}),W.attribName="",ye===">"?ue(W):R(ce,ye)?(W.attribName=ye,W.state=D.ATTRIB_NAME):(me(W,"Invalid attribute name"),W.state=D.ATTRIB)}continue;case D.ATTRIB_VALUE:if($(ye))continue;j(ye)?(W.q=ye,W.state=D.ATTRIB_VALUE_QUOTED):(me(W,"Unquoted attribute value"),W.state=D.ATTRIB_VALUE_UNQUOTED,W.attribValue=ye);continue;case D.ATTRIB_VALUE_QUOTED:if(ye!==W.q){ye==="&"?W.state=D.ATTRIB_VALUE_ENTITY_Q:W.attribValue+=ye;continue}Z(W),W.q="",W.state=D.ATTRIB_VALUE_CLOSED;continue;case D.ATTRIB_VALUE_CLOSED:$(ye)?W.state=D.ATTRIB:ye===">"?ue(W):ye==="/"?W.state=D.OPEN_TAG_SLASH:R(ce,ye)?(me(W,"No whitespace between attributes"),W.attribName=ye,W.attribValue="",W.state=D.ATTRIB_NAME):me(W,"Invalid attribute name");continue;case D.ATTRIB_VALUE_UNQUOTED:if(!U(ye)){ye==="&"?W.state=D.ATTRIB_VALUE_ENTITY_U:W.attribValue+=ye;continue}Z(W),ye===">"?ue(W):W.state=D.ATTRIB;continue;case D.CLOSE_TAG:if(W.tagName)ye===">"?V(W):R(fe,ye)?W.tagName+=ye:W.script?(W.script+="</"+W.tagName,W.tagName="",W.state=D.SCRIPT):($(ye)||me(W,"Invalid tagname in closing tag"),W.state=D.CLOSE_TAG_SAW_WHITE);else{if($(ye))continue;C(ce,ye)?W.script?(W.script+="</"+ye,W.state=D.SCRIPT):me(W,"Invalid tagname in closing tag."):W.tagName=ye}continue;case D.CLOSE_TAG_SAW_WHITE:if($(ye))continue;ye===">"?V(W):me(W,"Invalid characters in closing tag");continue;case D.TEXT_ENTITY:case D.ATTRIB_VALUE_ENTITY_Q:case D.ATTRIB_VALUE_ENTITY_U:var Fe,Ue;switch(W.state){case D.TEXT_ENTITY:Fe=D.TEXT,Ue="textNode";break;case D.ATTRIB_VALUE_ENTITY_Q:Fe=D.ATTRIB_VALUE_QUOTED,Ue="attribValue";break;case D.ATTRIB_VALUE_ENTITY_U:Fe=D.ATTRIB_VALUE_UNQUOTED,Ue="attribValue";break}ye===";"?(W[Ue]+=J(W),W.entity="",W.state=Fe):R(W.entity.length?se:z,ye)?W.entity+=ye:(me(W,"Invalid character in entity name"),W[Ue]+="&"+W.entity+ye,W.entity="",W.state=Fe);continue;default:throw new Error(W,"Unknown state: "+W.state)}}return W.position>=W.bufferCheckPosition&&O(W),W}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var T=String.fromCharCode,W=Math.floor,we=function(){var Oe=16384,Be=[],Fe,Ue,Ge=-1,Ye=arguments.length;if(!Ye)return"";for(var Xe="";++Ge<Ye;){var Je=Number(arguments[Ge]);if(!isFinite(Je)||Je<0||Je>1114111||W(Je)!==Je)throw RangeError("Invalid code point: "+Je);Je<=65535?Be.push(Je):(Je-=65536,Fe=(Je>>10)+55296,Ue=Je%1024+56320,Be.push(Fe,Ue)),(Ge+1===Ye||Be.length>Oe)&&(Xe+=T.apply(null,Be),Be.length=0)}return Xe};s.default?Object.defineProperty(String,"fromCodePoint",{value:we,configurable:!0,writable:!0}):String.fromCodePoint=we}()})(typeof c=="undefined"?(void 0).sax={}:c)}).call(this,u("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(u,G,c){G.exports=S;var h=u("events").EventEmitter,o=u("inherits");o(S,h),S.Readable=u("readable-stream/readable.js"),S.Writable=u("readable-stream/writable.js"),S.Duplex=u("readable-stream/duplex.js"),S.Transform=u("readable-stream/transform.js"),S.PassThrough=u("readable-stream/passthrough.js"),S.Stream=S;function S(){h.call(this)}S.prototype.pipe=function(E,b){var p=this;function d(v){E.writable&&(E.write(v)===!1&&p.pause&&p.pause())}p.on("data",d);function a(){p.readable&&p.resume&&p.resume()}E.on("drain",a),!E._isStdio&&(!b||b.end!==!1)&&(p.on("end",l),p.on("close",i));var s=!1;function l(){if(s)return;s=!0,E.end()}function i(){if(s)return;s=!0,typeof E.destroy=="function"&&E.destroy()}function g(v){if(m(),h.listenerCount(this,"error")===0)throw v}p.on("error",g),E.on("error",g);function m(){p.removeListener("data",d),E.removeListener("drain",a),p.removeListener("end",l),p.removeListener("close",i),p.removeListener("error",g),E.removeListener("error",g),p.removeListener("end",m),p.removeListener("close",m),E.removeListener("close",m)}return p.on("end",m),p.on("close",m),E.on("close",m),E.emit("pipe",p),E}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(u,G,c){(function(h){var o=u("./lib/request"),S=u("./lib/response"),E=u("xtend"),b=u("builtin-status-codes"),p=u("url"),d=c;d.request=function(a,s){typeof a=="string"?a=p.parse(a):a=E(a);var l=h.location.protocol.search(/^https?:$/)===-1?"http:":"",i=a.protocol||l,g=a.hostname||a.host,m=a.port,v=a.path||"/";g&&g.indexOf(":")!==-1&&(g="["+g+"]"),a.url=(g?i+"//"+g:"")+(m?":"+m:"")+v,a.method=(a.method||"GET").toUpperCase(),a.headers=a.headers||{};var w=new o(a);return s&&w.on("response",s),w},d.get=function(s,l){var i=d.request(s,l);return i.end(),i},d.ClientRequest=o,d.IncomingMessage=S.IncomingMessage,d.Agent=function(){},d.Agent.defaultMaxSockets=4,d.globalAgent=new d.Agent,d.STATUS_CODES=b,d.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(u,G,c){(function(h){"use strict";c.fetch=d(h.fetch)&&d(h.ReadableStream),c.writableStream=d(h.WritableStream),c.abortController=d(h.AbortController),c.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),c.blobConstructor=!0}catch(a){}var o;function S(){if(o!==void 0)return o;if(h.XMLHttpRequest){o=new h.XMLHttpRequest;try{o.open("GET",h.XDomainRequest?"/":"https://example.com")}catch(a){o=null}}else o=null;return o}function E(a){var s=S();if(!s)return!1;try{return s.responseType=a,s.responseType===a}catch(l){}return!1}var b=typeof h.ArrayBuffer!="undefined",p=b&&d(h.ArrayBuffer.prototype.slice);c.arraybuffer=c.fetch||b&&E("arraybuffer"),c.msstream=!c.fetch&&p&&E("ms-stream"),c.mozchunkedarraybuffer=!c.fetch&&b&&E("moz-chunked-arraybuffer"),c.overrideMimeType=c.fetch||(S()?d(S().overrideMimeType):!1),c.vbArray=d(h.VBArray);function d(a){return typeof a=="function"}o=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(u,G,c){(function(h,o,S){"use strict";var E=u("babel-runtime/core-js/object/keys"),b=p(E);function p(O){return O&&O.__esModule?O:{default:O}}var d=u("./capability"),a=u("inherits"),s=u("./response"),l=u("readable-stream"),i=u("to-arraybuffer"),g=s.IncomingMessage,m=s.readyStates;function v(O,M){return d.fetch&&M?"fetch":d.mozchunkedarraybuffer?"moz-chunked-arraybuffer":d.msstream?"ms-stream":d.arraybuffer&&O?"arraybuffer":d.vbArray&&O?"text:vbarray":"text"}var w=G.exports=function(O){var M=this;l.Writable.call(M),M._opts=O,M._body=[],M._headers={},O.auth&&M.setHeader("Authorization","Basic "+new S(O.auth).toString("base64")),(0,b.default)(O.headers).forEach(function(N){M.setHeader(N,O.headers[N])});var I,B=!0;if(O.mode==="disable-fetch"||"requestTimeout"in O&&!d.abortController)B=!1,I=!0;else if(O.mode==="prefer-streaming")I=!1;else if(O.mode==="allow-wrong-content-type")I=!d.overrideMimeType;else if(!O.mode||O.mode==="default"||O.mode==="prefer-fast")I=!0;else throw new Error("Invalid value for opts.mode");M._mode=v(I,B),M._fetchTimer=null,M.on("finish",function(){M._onFinish()})};a(w,l.Writable),w.prototype.setHeader=function(O,M){var I=this,B=O.toLowerCase();if(k.indexOf(B)!==-1)return;I._headers[B]={name:O,value:M}},w.prototype.getHeader=function(O){var M=this._headers[O.toLowerCase()];return M?M.value:null},w.prototype.removeHeader=function(O){var M=this;delete M._headers[O.toLowerCase()]},w.prototype._onFinish=function(){var O=this;if(O._destroyed)return;var M=O._opts,I=O._headers,B=null;M.method!=="GET"&&M.method!=="HEAD"&&(d.arraybuffer?B=i(S.concat(O._body)):d.blobConstructor?B=new o.Blob(O._body.map(function(F){return i(F)}),{type:(I["content-type"]||{}).value||""}):B=S.concat(O._body).toString());var N=[];if((0,b.default)(I).forEach(function(F){var K=I[F].name,Q=I[F].value;Array.isArray(Q)?Q.forEach(function(ce){N.push([K,ce])}):N.push([K,Q])}),O._mode==="fetch"){var y=null,Y=null;if(d.abortController){var X=new AbortController;y=X.signal,O._fetchAbortController=X,"requestTimeout"in M&&M.requestTimeout!==0&&(O._fetchTimer=o.setTimeout(function(){O.emit("requestTimeout"),O._fetchAbortController&&O._fetchAbortController.abort()},M.requestTimeout))}o.fetch(O._opts.url,{method:O._opts.method,headers:N,body:B||void 0,mode:"cors",credentials:M.withCredentials?"include":"same-origin",signal:y}).then(function(F){O._fetchResponse=F,O._connect()},function(F){o.clearTimeout(O._fetchTimer),O._destroyed||O.emit("error",F)})}else{var P=O._xhr=new o.XMLHttpRequest;try{P.open(O._opts.method,O._opts.url,!0)}catch(F){h.nextTick(function(){O.emit("error",F)});return}"responseType"in P&&(P.responseType=O._mode.split(":")[0]),"withCredentials"in P&&(P.withCredentials=!!M.withCredentials),O._mode==="text"&&"overrideMimeType"in P&&P.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in M&&(P.timeout=M.requestTimeout,P.ontimeout=function(){O.emit("requestTimeout")}),N.forEach(function(F){P.setRequestHeader(F[0],F[1])}),O._response=null,P.onreadystatechange=function(){switch(P.readyState){case m.LOADING:case m.DONE:O._onXHRProgress();break}},O._mode==="moz-chunked-arraybuffer"&&(P.onprogress=function(){O._onXHRProgress()}),P.onerror=function(){if(O._destroyed)return;O.emit("error",new Error("XHR error"))};try{P.send(B)}catch(F){h.nextTick(function(){O.emit("error",F)});return}}};function _(O){try{var M=O.status;return M!==null&&M!==0}catch(I){return!1}}w.prototype._onXHRProgress=function(){var O=this;if(!_(O._xhr)||O._destroyed)return;O._response||O._connect(),O._response._onXHRProgress()},w.prototype._connect=function(){var O=this;if(O._destroyed)return;O._response=new g(O._xhr,O._fetchResponse,O._mode,O._fetchTimer),O._response.on("error",function(M){O.emit("error",M)}),O.emit("response",O._response)},w.prototype._write=function(O,M,I){var B=this;B._body.push(O),I()},w.prototype.abort=w.prototype.destroy=function(){var O=this;O._destroyed=!0,o.clearTimeout(O._fetchTimer),O._response&&(O._response._destroyed=!0),O._xhr?O._xhr.abort():O._fetchAbortController&&O._fetchAbortController.abort()},w.prototype.end=function(O,M,I){var B=this;typeof O=="function"&&(I=O,O=void 0),l.Writable.prototype.end.call(B,O,M,I)},w.prototype.flushHeaders=function(){},w.prototype.setTimeout=function(){},w.prototype.setNoDelay=function(){},w.prototype.setSocketKeepAlive=function(){};var k=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,u("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},u("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(u,G,c){(function(h,o,S){"use strict";var E=u("babel-runtime/core-js/promise"),b=p(E);function p(g){return g&&g.__esModule?g:{default:g}}var d=u("./capability"),a=u("inherits"),s=u("readable-stream"),l=c.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},i=c.IncomingMessage=function(g,m,v,w){var _=this;if(s.Readable.call(_),_._mode=v,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){h.nextTick(function(){_.emit("close")})}),v==="fetch"){var k=function y(){M.read().then(function(Y){if(_._destroyed)return;if(Y.done){o.clearTimeout(w),_.push(null);return}_.push(new S(Y.value)),y()}).catch(function(Y){o.clearTimeout(w),_._destroyed||_.emit("error",Y)})};if(_._fetchResponse=m,_.url=m.url,_.statusCode=m.status,_.statusMessage=m.statusText,m.headers.forEach(function(y,Y){_.headers[Y.toLowerCase()]=y,_.rawHeaders.push(Y,y)}),d.writableStream){var O=new WritableStream({write:function(Y){return new b.default(function(X,P){_._destroyed?P():_.push(new S(Y))?X():_._resumeFetch=X})},close:function(){o.clearTimeout(w),_._destroyed||_.push(null)},abort:function(Y){_._destroyed||_.emit("error",Y)}});try{m.body.pipeTo(O).catch(function(y){o.clearTimeout(w),_._destroyed||_.emit("error",y)});return}catch(y){}}var M=m.body.getReader();k()}else{_._xhr=g,_._pos=0,_.url=g.responseURL,_.statusCode=g.status,_.statusMessage=g.statusText;var I=g.getAllResponseHeaders().split(/\r?\n/);if(I.forEach(function(y){var Y=y.match(/^([^:]+):\s*(.*)/);if(Y){var X=Y[1].toLowerCase();X==="set-cookie"?(_.headers[X]===void 0&&(_.headers[X]=[]),_.headers[X].push(Y[2])):_.headers[X]!==void 0?_.headers[X]+=", "+Y[2]:_.headers[X]=Y[2],_.rawHeaders.push(Y[1],Y[2])}}),_._charset="x-user-defined",!d.overrideMimeType){var B=_.rawHeaders["mime-type"];if(B){var N=B.match(/;\s*charset=([^;])(;|$)/);N&&(_._charset=N[1].toLowerCase())}_._charset||(_._charset="utf-8")}}};a(i,s.Readable),i.prototype._read=function(){var g=this,m=g._resumeFetch;m&&(g._resumeFetch=null,m())},i.prototype._onXHRProgress=function(){var g=this,m=g._xhr,v=null;switch(g._mode){case"text:vbarray":if(m.readyState!==l.DONE)break;try{v=new o.VBArray(m.responseBody).toArray()}catch(M){}if(v!==null){g.push(new S(v));break}case"text":try{v=m.responseText}catch(M){g._mode="text:vbarray";break}if(v.length>g._pos){var w=v.substr(g._pos);if(g._charset==="x-user-defined"){for(var _=new S(w.length),k=0;k<w.length;k++)_[k]=w.charCodeAt(k)&255;g.push(_)}else g.push(w,g._charset);g._pos=v.length}break;case"arraybuffer":if(m.readyState!==l.DONE||!m.response)break;v=m.response,g.push(new S(new Uint8Array(v)));break;case"moz-chunked-arraybuffer":if(v=m.response,m.readyState!==l.LOADING||!v)break;g.push(new S(new Uint8Array(v)));break;case"ms-stream":if(v=m.response,m.readyState!==l.LOADING)break;var O=new o.MSStreamReader;O.onprogress=function(){O.result.byteLength>g._pos&&(g.push(new S(new Uint8Array(O.result.slice(g._pos)))),g._pos=O.result.byteLength)},O.onload=function(){g.push(null)},O.readAsArrayBuffer(v);break}g._xhr.readyState===l.DONE&&g._mode!=="ms-stream"&&g.push(null)}}).call(this,u("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},u("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(u,G,c){"use strict";var h=u("safe-buffer").Buffer,o=h.isEncoding||function(O){O=""+O;switch(O&&O.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(O){if(!O)return"utf8";for(var M;;)switch(O){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return O;default:if(M)return;O=(""+O).toLowerCase(),M=!0}}function E(O){var M=S(O);if(typeof M!="string"&&(h.isEncoding===o||!o(O)))throw new Error("Unknown encoding: "+O);return M||O}c.StringDecoder=b;function b(O){this.encoding=E(O);var M;switch(this.encoding){case"utf16le":this.text=g,this.end=m,M=4;break;case"utf8":this.fillLast=s,M=4;break;case"base64":this.text=v,this.end=w,M=3;break;default:this.write=_,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(M)}b.prototype.write=function(O){if(O.length===0)return"";var M,I;if(this.lastNeed){if(M=this.fillLast(O),M===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<O.length?M?M+this.text(O,I):this.text(O,I):M||""},b.prototype.end=i,b.prototype.text=l,b.prototype.fillLast=function(O){if(this.lastNeed<=O.length)return O.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);O.copy(this.lastChar,this.lastTotal-this.lastNeed,0,O.length),this.lastNeed-=O.length};function p(O){return O<=127?0:O>>5===6?2:O>>4===14?3:O>>3===30?4:O>>6===2?-1:-2}function d(O,M,I){var B=M.length-1;if(B<I)return 0;var N=p(M[B]);return N>=0?(N>0&&(O.lastNeed=N-1),N):--B<I||N===-2?0:(N=p(M[B]),N>=0?(N>0&&(O.lastNeed=N-2),N):--B<I||N===-2?0:(N=p(M[B]),N>=0?(N>0&&(N===2?N=0:O.lastNeed=N-3),N):0))}function a(O,M,I){if((M[0]&192)!==128)return O.lastNeed=0,"\uFFFD";if(O.lastNeed>1&&M.length>1){if((M[1]&192)!==128)return O.lastNeed=1,"\uFFFD";if(O.lastNeed>2&&M.length>2&&(M[2]&192)!==128)return O.lastNeed=2,"\uFFFD"}}function s(O){var M=this.lastTotal-this.lastNeed,I=a(this,O,M);if(I!==void 0)return I;if(this.lastNeed<=O.length)return O.copy(this.lastChar,M,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);O.copy(this.lastChar,M,0,O.length),this.lastNeed-=O.length}function l(O,M){var I=d(this,O,M);if(!this.lastNeed)return O.toString("utf8",M);this.lastTotal=I;var B=O.length-(I-this.lastNeed);return O.copy(this.lastChar,0,B),O.toString("utf8",M,B)}function i(O){var M=O&&O.length?this.write(O):"";return this.lastNeed?M+"\uFFFD":M}function g(O,M){if((O.length-M)%2===0){var I=O.toString("utf16le",M);if(I){var B=I.charCodeAt(I.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=O[O.length-2],this.lastChar[1]=O[O.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=O[O.length-1],O.toString("utf16le",M,O.length-1)}function m(O){var M=O&&O.length?this.write(O):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,I)}return M}function v(O,M){var I=(O.length-M)%3;return I===0?O.toString("base64",M):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=O[O.length-1]:(this.lastChar[0]=O[O.length-2],this.lastChar[1]=O[O.length-1]),O.toString("base64",M,O.length-I))}function w(O){var M=O&&O.length?this.write(O):"";return this.lastNeed?M+this.lastChar.toString("base64",0,3-this.lastNeed):M}function _(O){return O.toString(this.encoding)}function k(O){return O&&O.length?this.write(O):""}},{"safe-buffer":228}],236:[function(u,G,c){(function(h,o){var S=u("process/browser.js").nextTick,E=Function.prototype.apply,b=Array.prototype.slice,p={},d=0;c.setTimeout=function(){return new a(E.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new a(E.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(s){s.close()};function a(s,l){this._id=s,this._clearFn=l}a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(s,l){clearTimeout(s._idleTimeoutId),s._idleTimeout=l},c.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},c._unrefActive=c.active=function(s){clearTimeout(s._idleTimeoutId);var l=s._idleTimeout;l>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},l))},c.setImmediate=typeof h=="function"?h:function(s){var l=d++,i=arguments.length<2?!1:b.call(arguments,1);return p[l]=!0,S(function(){p[l]&&(i?s.apply(null,i):s.call(null),c.clearImmediate(l))}),l},c.clearImmediate=typeof o=="function"?o:function(s){delete p[s]}}).call(this,u("timers").setImmediate,u("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(u,G,c){var h=u("buffer").Buffer;G.exports=function(o){if(o instanceof Uint8Array){if(o.byteOffset===0&&o.byteLength===o.buffer.byteLength)return o.buffer;if(typeof o.buffer.slice=="function")return o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength)}if(h.isBuffer(o)){for(var S=new Uint8Array(o.length),E=o.length,b=0;b<E;b++)S[b]=o[b];return S.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(u,G,c){"use strict";var h=u("punycode"),o=u("./util");c.parse=M,c.resolve=B,c.resolveObject=N,c.format=I,c.Url=S;function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var E=/^([a-z0-9.+-]+:)/i,b=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r",`
`," "],a=["{","}","|","\\","^","`"].concat(d),s=["'"].concat(a),l=["%","/","?",";","#"].concat(s),i=["/","?","#"],g=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},O=u("querystring");function M(y,Y,X){if(y&&o.isObject(y)&&y instanceof S)return y;var P=new S;return P.parse(y,Y,X),P}S.prototype.parse=function(y,Y,X){if(!o.isString(y))throw new TypeError("Parameter 'url' must be a string, not "+typeof y);var P=y.indexOf("?"),F=P!==-1&&P<y.indexOf("#")?"?":"#",K=y.split(F),Q=/\\/g;K[0]=K[0].replace(Q,"/"),y=K.join(F);var ce=y;if(ce=ce.trim(),!X&&y.split("#").length===1){var fe=p.exec(ce);if(fe)return this.path=ce,this.href=ce,this.pathname=fe[1],fe[2]?(this.search=fe[2],Y?this.query=O.parse(this.search.substr(1)):this.query=this.search.substr(1)):Y&&(this.search="",this.query={}),this}var z=E.exec(ce);if(z){z=z[0];var se=z.toLowerCase();this.protocol=se,ce=ce.substr(z.length)}if(X||z||ce.match(/^\/\/[^@\/]+@[^@\/]+/)){var $=ce.substr(0,2)==="//";$&&!(z&&_[z])&&(ce=ce.substr(2),this.slashes=!0)}if(!_[z]&&($||z&&!k[z])){for(var j=-1,U=0;U<i.length;U++){var R=ce.indexOf(i[U]);R!==-1&&(j===-1||R<j)&&(j=R)}var C,D;j===-1?D=ce.lastIndexOf("@"):D=ce.lastIndexOf("@",j),D!==-1&&(C=ce.slice(0,D),ce=ce.slice(D+1),this.auth=decodeURIComponent(C)),j=-1;for(var U=0;U<l.length;U++){var R=ce.indexOf(l[U]);R!==-1&&(j===-1||R<j)&&(j=R)}j===-1&&(j=ce.length),this.host=ce.slice(0,j),ce=ce.slice(j),this.parseHost(),this.hostname=this.hostname||"";var le=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!le)for(var he=this.hostname.split(/\./),U=0,ve=he.length;U<ve;U++){var Ee=he[U];if(!Ee)continue;if(!Ee.match(m)){for(var Se="",ae=0,pe=Ee.length;ae<pe;ae++)Ee.charCodeAt(ae)>127?Se+="x":Se+=Ee[ae];if(!Se.match(m)){var me=he.slice(0,U),ee=he.slice(U+1),re=Ee.match(v);re&&(me.push(re[1]),ee.unshift(re[2])),ee.length&&(ce="/"+ee.join(".")+ce),this.hostname=me.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),le||(this.hostname=h.toASCII(this.hostname));var Z=this.port?":"+this.port:"",ue=this.hostname||"";this.host=ue+Z,this.href+=this.host,le&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ce[0]!=="/"&&(ce="/"+ce))}if(!w[se])for(var U=0,ve=s.length;U<ve;U++){var V=s[U];if(ce.indexOf(V)===-1)continue;var J=encodeURIComponent(V);J===V&&(J=escape(V)),ce=ce.split(V).join(J)}var Ce=ce.indexOf("#");Ce!==-1&&(this.hash=ce.substr(Ce),ce=ce.slice(0,Ce));var q=ce.indexOf("?");if(q!==-1?(this.search=ce.substr(q),this.query=ce.substr(q+1),Y&&(this.query=O.parse(this.query)),ce=ce.slice(0,q)):Y&&(this.search="",this.query={}),ce&&(this.pathname=ce),k[se]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Z=this.pathname||"",H=this.search||"";this.path=Z+H}return this.href=this.format(),this};function I(y){return o.isString(y)&&(y=M(y)),y instanceof S?y.format():S.prototype.format.call(y)}S.prototype.format=function(){var y=this.auth||"";y&&(y=encodeURIComponent(y),y=y.replace(/%3A/i,":"),y+="@");var Y=this.protocol||"",X=this.pathname||"",P=this.hash||"",F=!1,K="";this.host?F=y+this.host:this.hostname&&(F=y+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(F+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(K=O.stringify(this.query));var Q=this.search||K&&"?"+K||"";return Y&&Y.substr(-1)!==":"&&(Y+=":"),this.slashes||(!Y||k[Y])&&F!==!1?(F="//"+(F||""),X&&X.charAt(0)!=="/"&&(X="/"+X)):F||(F=""),P&&P.charAt(0)!=="#"&&(P="#"+P),Q&&Q.charAt(0)!=="?"&&(Q="?"+Q),X=X.replace(/[?#]/g,function(ce){return encodeURIComponent(ce)}),Q=Q.replace("#","%23"),Y+F+X+Q+P};function B(y,Y){return M(y,!1,!0).resolve(Y)}S.prototype.resolve=function(y){return this.resolveObject(M(y,!1,!0)).format()};function N(y,Y){return y?M(y,!1,!0).resolveObject(Y):Y}S.prototype.resolveObject=function(y){if(o.isString(y)){var Y=new S;Y.parse(y,!1,!0),y=Y}for(var X=new S,P=Object.keys(this),F=0;F<P.length;F++){var K=P[F];X[K]=this[K]}if(X.hash=y.hash,y.href==="")return X.href=X.format(),X;if(y.slashes&&!y.protocol){for(var Q=Object.keys(y),ce=0;ce<Q.length;ce++){var fe=Q[ce];fe!=="protocol"&&(X[fe]=y[fe])}return k[X.protocol]&&X.hostname&&!X.pathname&&(X.path=X.pathname="/"),X.href=X.format(),X}if(y.protocol&&y.protocol!==X.protocol){if(!k[y.protocol]){for(var z=Object.keys(y),se=0;se<z.length;se++){var $=z[se];X[$]=y[$]}return X.href=X.format(),X}if(X.protocol=y.protocol,!y.host&&!_[y.protocol]){for(var ve=(y.pathname||"").split("/");ve.length&&!(y.host=ve.shift()););y.host||(y.host=""),y.hostname||(y.hostname=""),ve[0]!==""&&ve.unshift(""),ve.length<2&&ve.unshift(""),X.pathname=ve.join("/")}else X.pathname=y.pathname;if(X.search=y.search,X.query=y.query,X.host=y.host||"",X.auth=y.auth,X.hostname=y.hostname||y.host,X.port=y.port,X.pathname||X.search){var j=X.pathname||"",U=X.search||"";X.path=j+U}return X.slashes=X.slashes||y.slashes,X.href=X.format(),X}var R=X.pathname&&X.pathname.charAt(0)==="/",C=y.host||y.pathname&&y.pathname.charAt(0)==="/",D=C||R||X.host&&y.pathname,le=D,he=X.pathname&&X.pathname.split("/")||[],ve=y.pathname&&y.pathname.split("/")||[],Ee=X.protocol&&!k[X.protocol];if(Ee&&(X.hostname="",X.port=null,X.host&&(he[0]===""?he[0]=X.host:he.unshift(X.host)),X.host="",y.protocol&&(y.hostname=null,y.port=null,y.host&&(ve[0]===""?ve[0]=y.host:ve.unshift(y.host)),y.host=null),D=D&&(ve[0]===""||he[0]==="")),C)X.host=y.host||y.host===""?y.host:X.host,X.hostname=y.hostname||y.hostname===""?y.hostname:X.hostname,X.search=y.search,X.query=y.query,he=ve;else if(ve.length)he||(he=[]),he.pop(),he=he.concat(ve),X.search=y.search,X.query=y.query;else if(!o.isNullOrUndefined(y.search)){if(Ee){X.hostname=X.host=he.shift();var Se=X.host&&X.host.indexOf("@")>0?X.host.split("@"):!1;Se&&(X.auth=Se.shift(),X.host=X.hostname=Se.shift())}return X.search=y.search,X.query=y.query,(!o.isNull(X.pathname)||!o.isNull(X.search))&&(X.path=(X.pathname?X.pathname:"")+(X.search?X.search:"")),X.href=X.format(),X}if(!he.length)return X.pathname=null,X.search?X.path="/"+X.search:X.path=null,X.href=X.format(),X;for(var ae=he.slice(-1)[0],pe=(X.host||y.host||he.length>1)&&(ae==="."||ae==="..")||ae==="",me=0,ee=he.length;ee>=0;ee--)ae=he[ee],ae==="."?he.splice(ee,1):ae===".."?(he.splice(ee,1),me++):me&&(he.splice(ee,1),me--);if(!D&&!le)for(;me--;me)he.unshift("..");D&&he[0]!==""&&(!he[0]||he[0].charAt(0)!=="/")&&he.unshift(""),pe&&he.join("/").substr(-1)!=="/"&&he.push("");var re=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(Ee){X.hostname=X.host=re?"":he.length?he.shift():"";var Se=X.host&&X.host.indexOf("@")>0?X.host.split("@"):!1;Se&&(X.auth=Se.shift(),X.host=X.hostname=Se.shift())}return D=D||X.host&&he.length,D&&!re&&he.unshift(""),he.length?X.pathname=he.join("/"):(X.pathname=null,X.path=null),(!o.isNull(X.pathname)||!o.isNull(X.search))&&(X.path=(X.pathname?X.pathname:"")+(X.search?X.search:"")),X.auth=y.auth||X.auth,X.slashes=X.slashes||y.slashes,X.href=X.format(),X},S.prototype.parseHost=function(){var y=this.host,Y=b.exec(y);Y&&(Y=Y[0],Y!==":"&&(this.port=Y.substr(1)),y=y.substr(0,y.length-Y.length)),y&&(this.hostname=y)}},{"./util":239,punycode:209,querystring:212}],239:[function(u,G,c){"use strict";G.exports={isString:function(h){return typeof h=="string"},isObject:function(h){return typeof h=="object"&&h!==null},isNull:function(h){return h===null},isNullOrUndefined:function(h){return h==null}}},{}],240:[function(u,G,c){(function(h){G.exports=o;function o(E,b){if(S("noDeprecation"))return E;var p=!1;function d(){if(!p){if(S("throwDeprecation"))throw new Error(b);S("traceDeprecation")?console.trace(b):console.warn(b),p=!0}return E.apply(this,arguments)}return d}function S(E){try{if(!h.localStorage)return!1}catch(p){return!1}var b=h.localStorage[E];return b==null?!1:String(b).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(u,G,c){typeof Object.create=="function"?G.exports=function(o,S){o.super_=S,o.prototype=Object.create(S.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})}:G.exports=function(o,S){o.super_=S;var E=function(){};E.prototype=S.prototype,o.prototype=new E,o.prototype.constructor=o}},{}],242:[function(u,G,c){G.exports=function(o){return o&&typeof o=="object"&&typeof o.copy=="function"&&typeof o.fill=="function"&&typeof o.readUInt8=="function"}},{}],243:[function(u,G,c){(function(h,o){var S=/%[sdj%]/g;c.format=function(j){if(!B(j)){for(var U=[],R=0;R<arguments.length;R++)U.push(p(arguments[R]));return U.join(" ")}for(var R=1,C=arguments,D=C.length,le=String(j).replace(S,function(ve){if(ve==="%%")return"%";if(R>=D)return ve;switch(ve){case"%s":return String(C[R++]);case"%d":return Number(C[R++]);case"%j":try{return JSON.stringify(C[R++])}catch(Ee){return"[Circular]"}default:return ve}}),he=C[R];R<D;he=C[++R])O(he)||!X(he)?le+=" "+he:le+=" "+p(he);return le},c.deprecate=function(j,U){if(y(o.process))return function(){return c.deprecate(j,U).apply(this,arguments)};if(h.noDeprecation===!0)return j;var R=!1;function C(){if(!R){if(h.throwDeprecation)throw new Error(U);h.traceDeprecation?console.trace(U):console.error(U),R=!0}return j.apply(this,arguments)}return C};var E={},b;c.debuglog=function(j){if(y(b)&&(b=h.env.NODE_DEBUG||""),j=j.toUpperCase(),!E[j])if(new RegExp("\\b"+j+"\\b","i").test(b)){var U=h.pid;E[j]=function(){var R=c.format.apply(c,arguments);console.error("%s %d: %s",j,U,R)}}else E[j]=function(){};return E[j]};function p(j,U){var R={seen:[],stylize:a};return arguments.length>=3&&(R.depth=arguments[2]),arguments.length>=4&&(R.colors=arguments[3]),k(U)?R.showHidden=U:U&&c._extend(R,U),y(R.showHidden)&&(R.showHidden=!1),y(R.depth)&&(R.depth=2),y(R.colors)&&(R.colors=!1),y(R.customInspect)&&(R.customInspect=!0),R.colors&&(R.stylize=d),l(R,j,R.depth)}c.inspect=p,p.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function d(j,U){var R=p.styles[U];return R?"["+p.colors[R][0]+"m"+j+"["+p.colors[R][1]+"m":j}function a(j,U){return j}function s(j){var U={};return j.forEach(function(R,C){U[R]=!0}),U}function l(j,U,R){if(j.customInspect&&U&&K(U.inspect)&&U.inspect!==c.inspect&&!(U.constructor&&U.constructor.prototype===U)){var C=U.inspect(R,j);return B(C)||(C=l(j,C,R)),C}var D=i(j,U);if(D)return D;var le=Object.keys(U),he=s(le);if(j.showHidden&&(le=Object.getOwnPropertyNames(U)),F(U)&&(le.indexOf("message")>=0||le.indexOf("description")>=0))return g(U);if(le.length===0){if(K(U)){var ve=U.name?": "+U.name:"";return j.stylize("[Function"+ve+"]","special")}if(Y(U))return j.stylize(RegExp.prototype.toString.call(U),"regexp");if(P(U))return j.stylize(Date.prototype.toString.call(U),"date");if(F(U))return g(U)}var Ee="",Se=!1,ae=["{","}"];if(_(U)&&(Se=!0,ae=["[","]"]),K(U)){var pe=U.name?": "+U.name:"";Ee=" [Function"+pe+"]"}if(Y(U)&&(Ee=" "+RegExp.prototype.toString.call(U)),P(U)&&(Ee=" "+Date.prototype.toUTCString.call(U)),F(U)&&(Ee=" "+g(U)),le.length===0&&(!Se||U.length==0))return ae[0]+Ee+ae[1];if(R<0)return Y(U)?j.stylize(RegExp.prototype.toString.call(U),"regexp"):j.stylize("[Object]","special");j.seen.push(U);var me;return Se?me=m(j,U,R,he,le):me=le.map(function(ee){return v(j,U,R,he,ee,Se)}),j.seen.pop(),w(me,Ee,ae)}function i(j,U){if(y(U))return j.stylize("undefined","undefined");if(B(U)){var R="'"+JSON.stringify(U).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(R,"string")}if(I(U))return j.stylize(""+U,"number");if(k(U))return j.stylize(""+U,"boolean");if(O(U))return j.stylize("null","null")}function g(j){return"["+Error.prototype.toString.call(j)+"]"}function m(j,U,R,C,D){for(var le=[],he=0,ve=U.length;he<ve;++he)$(U,String(he))?le.push(v(j,U,R,C,String(he),!0)):le.push("");return D.forEach(function(Ee){Ee.match(/^\d+$/)||le.push(v(j,U,R,C,Ee,!0))}),le}function v(j,U,R,C,D,le){var he,ve,Ee;if(Ee=Object.getOwnPropertyDescriptor(U,D)||{value:U[D]},Ee.get?Ee.set?ve=j.stylize("[Getter/Setter]","special"):ve=j.stylize("[Getter]","special"):Ee.set&&(ve=j.stylize("[Setter]","special")),$(C,D)||(he="["+D+"]"),ve||(j.seen.indexOf(Ee.value)<0?(O(R)?ve=l(j,Ee.value,null):ve=l(j,Ee.value,R-1),ve.indexOf(`
`)>-1&&(le?ve=ve.split(`
`).map(function(Se){return" "+Se}).join(`
`).substr(2):ve=`
`+ve.split(`
`).map(function(Se){return" "+Se}).join(`
`))):ve=j.stylize("[Circular]","special")),y(he)){if(le&&D.match(/^\d+$/))return ve;he=JSON.stringify(""+D),he.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(he=he.substr(1,he.length-2),he=j.stylize(he,"name")):(he=he.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),he=j.stylize(he,"string"))}return he+": "+ve}function w(j,U,R){var C=0,D=j.reduce(function(le,he){return C++,he.indexOf(`
`)>=0&&C++,le+he.replace(/\u001b\[\d\d?m/g,"").length+1},0);return D>60?R[0]+(U===""?"":U+`
`)+" "+j.join(`,
`)+" "+R[1]:R[0]+U+" "+j.join(", ")+" "+R[1]}function _(j){return Array.isArray(j)}c.isArray=_;function k(j){return typeof j=="boolean"}c.isBoolean=k;function O(j){return j===null}c.isNull=O;function M(j){return j==null}c.isNullOrUndefined=M;function I(j){return typeof j=="number"}c.isNumber=I;function B(j){return typeof j=="string"}c.isString=B;function N(j){return typeof j=="symbol"}c.isSymbol=N;function y(j){return j===void 0}c.isUndefined=y;function Y(j){return X(j)&&ce(j)==="[object RegExp]"}c.isRegExp=Y;function X(j){return typeof j=="object"&&j!==null}c.isObject=X;function P(j){return X(j)&&ce(j)==="[object Date]"}c.isDate=P;function F(j){return X(j)&&(ce(j)==="[object Error]"||j instanceof Error)}c.isError=F;function K(j){return typeof j=="function"}c.isFunction=K;function Q(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j=="undefined"}c.isPrimitive=Q,c.isBuffer=u("./support/isBuffer");function ce(j){return Object.prototype.toString.call(j)}function fe(j){return j<10?"0"+j.toString(10):j.toString(10)}var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function se(){var j=new Date,U=[fe(j.getHours()),fe(j.getMinutes()),fe(j.getSeconds())].join(":");return[j.getDate(),z[j.getMonth()],U].join(" ")}c.log=function(){console.log("%s - %s",se(),c.format.apply(c,arguments))},c.inherits=u("inherits"),c._extend=function(j,U){if(!U||!X(U))return j;for(var R=Object.keys(U),C=R.length;C--;)j[R[C]]=U[R[C]];return j};function $(j,U){return Object.prototype.hasOwnProperty.call(j,U)}}).call(this,u("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(u,G,c){"use strict";(function(){"use strict";c.stripBOM=function(h){return h[0]==="\uFEFF"?h.substring(1):h}}).call(void 0)},{}],245:[function(u,G,c){"use strict";var h=u("babel-runtime/helpers/typeof"),o=b(h),S=u("babel-runtime/core-js/object/keys"),E=b(S);function b(p){return p&&p.__esModule?p:{default:p}}(function(){"use strict";var p,d,a,s,l,i={}.hasOwnProperty;p=u("xmlbuilder"),d=u("./defaults").defaults,s=function(m){return typeof m=="string"&&(m.indexOf("&")>=0||m.indexOf(">")>=0||m.indexOf("<")>=0)},l=function(m){return"<![CDATA["+a(m)+"]]>"},a=function(m){return m.replace("]]>","]]]]><![CDATA[>")},c.Builder=function(){function g(m){var v,w,_;this.options={},w=d["0.2"];for(v in w){if(!i.call(w,v))continue;_=w[v],this.options[v]=_}for(v in m){if(!i.call(m,v))continue;_=m[v],this.options[v]=_}}return g.prototype.buildObject=function(m){var v,w,_,k,O;return v=this.options.attrkey,w=this.options.charkey,(0,E.default)(m).length===1&&this.options.rootName===d["0.2"].rootName?(O=(0,E.default)(m)[0],m=m[O]):O=this.options.rootName,_=function(M){return function(I,B){var N,y,Y,X,P,F;if((typeof B=="undefined"?"undefined":(0,o.default)(B))!=="object")M.options.cdata&&s(B)?I.raw(l(B)):I.txt(B);else if(Array.isArray(B))for(X in B){if(!i.call(B,X))continue;y=B[X];for(P in y)Y=y[P],I=_(I.ele(P),Y).up()}else for(P in B){if(!i.call(B,P))continue;if(y=B[P],P===v){if((typeof y=="undefined"?"undefined":(0,o.default)(y))==="object")for(N in y)F=y[N],I=I.att(N,F)}else if(P===w)M.options.cdata&&s(y)?I=I.raw(l(y)):I=I.txt(y);else if(Array.isArray(y))for(X in y){if(!i.call(y,X))continue;Y=y[X],typeof Y=="string"?M.options.cdata&&s(Y)?I=I.ele(P).raw(l(Y)).up():I=I.ele(P,Y).up():I=_(I.ele(P),Y).up()}else(typeof y=="undefined"?"undefined":(0,o.default)(y))==="object"?I=_(I.ele(P),y).up():typeof y=="string"&&M.options.cdata&&s(y)?I=I.ele(P).raw(l(y)).up():(y==null&&(y=""),I=I.ele(P,y.toString()).up())}return I}}(this),k=p.create(O,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),_(k,m).end(this.options.renderOpts)},g}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(u,G,c){"use strict";(function(){c.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/promise"),o=s(h),S=u("babel-runtime/core-js/object/get-own-property-names"),E=s(S),b=u("babel-runtime/core-js/object/keys"),p=s(b),d=u("babel-runtime/helpers/typeof"),a=s(d);function s(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,i,g,m,v,w,_,k,O=function(N,y){return function(){return N.apply(y,arguments)}},M=function(N,y){for(var Y in y)I.call(y,Y)&&(N[Y]=y[Y]);function X(){this.constructor=N}return X.prototype=y.prototype,N.prototype=new X,N.__super__=y.prototype,N},I={}.hasOwnProperty;_=u("sax"),g=u("events"),l=u("./bom"),w=u("./processors"),k=u("timers").setImmediate,i=u("./defaults").defaults,m=function(N){return(typeof N=="undefined"?"undefined":(0,a.default)(N))==="object"&&N!=null&&(0,p.default)(N).length===0},v=function(N,y,Y){var X,P,F;for(X=0,P=N.length;X<P;X++)F=N[X],y=F(y,Y);return y},c.Parser=function(B){M(N,B);function N(y){this.parseStringPromise=O(this.parseStringPromise,this),this.parseString=O(this.parseString,this),this.reset=O(this.reset,this),this.assignOrPush=O(this.assignOrPush,this),this.processAsync=O(this.processAsync,this);var Y,X,P;if(!(this instanceof c.Parser))return new c.Parser(y);this.options={},X=i["0.2"];for(Y in X){if(!I.call(X,Y))continue;P=X[Y],this.options[Y]=P}for(Y in y){if(!I.call(y,Y))continue;P=y[Y],this.options[Y]=P}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(w.normalize)),this.reset()}return N.prototype.processAsync=function(){var y,Y;try{return this.remaining.length<=this.options.chunkSize?(y=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(y),this.saxParser.close()):(y=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(y),k(this.processAsync))}catch(X){if(Y=X,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Y)}},N.prototype.assignOrPush=function(y,Y,X){return Y in y?(y[Y]instanceof Array||(y[Y]=[y[Y]]),y[Y].push(X)):this.options.explicitArray?y[Y]=[X]:y[Y]=X},N.prototype.reset=function(){var y,Y,X,P;return this.removeAllListeners(),this.saxParser=_.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(F){return function(K){if(F.saxParser.resume(),!F.saxParser.errThrown)return F.saxParser.errThrown=!0,F.emit("error",K)}}(this),this.saxParser.onend=function(F){return function(){if(!F.saxParser.ended)return F.saxParser.ended=!0,F.emit("end",F.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,P=[],y=this.options.attrkey,Y=this.options.charkey,this.saxParser.onopentag=function(F){return function(K){var Q,ce,fe,z,se;if(fe={},fe[Y]="",!F.options.ignoreAttrs){se=K.attributes;for(Q in se){if(!I.call(se,Q))continue;!(y in fe)&&!F.options.mergeAttrs&&(fe[y]={}),ce=F.options.attrValueProcessors?v(F.options.attrValueProcessors,K.attributes[Q],Q):K.attributes[Q],z=F.options.attrNameProcessors?v(F.options.attrNameProcessors,Q):Q,F.options.mergeAttrs?F.assignOrPush(fe,z,ce):fe[y][z]=ce}}return fe["#name"]=F.options.tagNameProcessors?v(F.options.tagNameProcessors,K.name):K.name,F.options.xmlns&&(fe[F.options.xmlnskey]={uri:K.uri,local:K.local}),P.push(fe)}}(this),this.saxParser.onclosetag=function(F){return function(){var K,Q,ce,fe,z,se,$,j,U,R;if(se=P.pop(),z=se["#name"],(!F.options.explicitChildren||!F.options.preserveChildrenOrder)&&delete se["#name"],se.cdata===!0&&(K=se.cdata,delete se.cdata),U=P[P.length-1],se[Y].match(/^\s*$/)&&!K?(Q=se[Y],delete se[Y]):(F.options.trim&&(se[Y]=se[Y].trim()),F.options.normalize&&(se[Y]=se[Y].replace(/\s{2,}/g," ").trim()),se[Y]=F.options.valueProcessors?v(F.options.valueProcessors,se[Y],z):se[Y],(0,p.default)(se).length===1&&Y in se&&!F.EXPLICIT_CHARKEY&&(se=se[Y])),m(se)&&(se=F.options.emptyTag!==""?F.options.emptyTag:Q),F.options.validator!=null&&(R="/"+function(){var C,D,le;for(le=[],C=0,D=P.length;C<D;C++)fe=P[C],le.push(fe["#name"]);return le}().concat(z).join("/"),function(){var C;try{return se=F.options.validator(R,U&&U[z],se)}catch(D){return C=D,F.emit("error",C)}}()),F.options.explicitChildren&&!F.options.mergeAttrs&&(typeof se=="undefined"?"undefined":(0,a.default)(se))==="object"){if(!F.options.preserveChildrenOrder)fe={},F.options.attrkey in se&&(fe[F.options.attrkey]=se[F.options.attrkey],delete se[F.options.attrkey]),!F.options.charsAsChildren&&F.options.charkey in se&&(fe[F.options.charkey]=se[F.options.charkey],delete se[F.options.charkey]),(0,E.default)(se).length>0&&(fe[F.options.childkey]=se),se=fe;else if(U){U[F.options.childkey]=U[F.options.childkey]||[],$={};for(ce in se){if(!I.call(se,ce))continue;$[ce]=se[ce]}U[F.options.childkey].push($),delete se["#name"],(0,p.default)(se).length===1&&Y in se&&!F.EXPLICIT_CHARKEY&&(se=se[Y])}}return P.length>0?F.assignOrPush(U,z,se):(F.options.explicitRoot&&(j=se,se={},se[z]=j),F.resultObject=se,F.saxParser.ended=!0,F.emit("end",F.resultObject))}}(this),X=function(F){return function(K){var Q,ce;if(ce=P[P.length-1],ce)return ce[Y]+=K,F.options.explicitChildren&&F.options.preserveChildrenOrder&&F.options.charsAsChildren&&(F.options.includeWhiteChars||K.replace(/\\n/g,"").trim()!=="")&&(ce[F.options.childkey]=ce[F.options.childkey]||[],Q={"#name":"__text__"},Q[Y]=K,F.options.normalize&&(Q[Y]=Q[Y].replace(/\s{2,}/g," ").trim()),ce[F.options.childkey].push(Q)),ce}}(this),this.saxParser.ontext=X,this.saxParser.oncdata=function(F){return function(K){var Q;if(Q=X(K),Q)return Q.cdata=!0}}(this)},N.prototype.parseString=function(y,Y){var X;Y!=null&&typeof Y=="function"&&(this.on("end",function(P){return this.reset(),Y(null,P)}),this.on("error",function(P){return this.reset(),Y(P)}));try{return y=y.toString(),y.trim()===""?(this.emit("end",null),!0):(y=l.stripBOM(y),this.options.async?(this.remaining=y,k(this.processAsync),this.saxParser):this.saxParser.write(y).close())}catch(P){if(X=P,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw X}else return this.emit("error",X),this.saxParser.errThrown=!0}},N.prototype.parseStringPromise=function(y){return new o.default(function(Y){return function(X,P){return Y.parseString(y,function(F,K){return F?P(F):X(K)})}}(this))},N}(g),c.parseString=function(B,N,y){var Y,X,P;return y!=null?(typeof y=="function"&&(Y=y),(typeof N=="undefined"?"undefined":(0,a.default)(N))==="object"&&(X=N)):(typeof N=="function"&&(Y=N),X={}),P=new c.Parser(X),P.parseString(B,Y)},c.parseStringPromise=function(B,N){var y,Y;return(typeof N=="undefined"?"undefined":(0,a.default)(N))==="object"&&(y=N),Y=new c.Parser(y),Y.parseStringPromise(B)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(u,G,c){"use strict";(function(){"use strict";var h;h=new RegExp(/(?!xmlns)^.*:/),c.normalize=function(o){return o.toLowerCase()},c.firstCharLowerCase=function(o){return o.charAt(0).toLowerCase()+o.slice(1)},c.stripPrefix=function(o){return o.replace(h,"")},c.parseNumbers=function(o){return isNaN(o)||(o=o%1===0?parseInt(o,10):parseFloat(o)),o},c.parseBooleans=function(o){return/^(?:true|false)$/i.test(o)&&(o=o.toLowerCase()==="true"),o}}).call(void 0)},{}],249:[function(u,G,c){"use strict";(function(){"use strict";var h,o,S,E,b=function(a,s){for(var l in s)p.call(s,l)&&(a[l]=s[l]);function i(){this.constructor=a}return i.prototype=s.prototype,a.prototype=new i,a.__super__=s.prototype,a},p={}.hasOwnProperty;o=u("./defaults"),h=u("./builder"),S=u("./parser"),E=u("./processors"),c.defaults=o.defaults,c.processors=E,c.ValidationError=function(d){b(a,d);function a(s){this.message=s}return a}(Error),c.Builder=h.Builder,c.Parser=S.Parser,c.parseString=S.parseString,c.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(u,G,c){"use strict";(function(){G.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(u,G,c){"use strict";(function(){G.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/get-prototype-of"),o=d(h),S=u("babel-runtime/helpers/typeof"),E=d(S),b=u("babel-runtime/core-js/object/assign"),p=d(b);function d(a){return a&&a.__esModule?a:{default:a}}(function(){var a,s,l,i,g,m,v,w=[].slice,_={}.hasOwnProperty;a=function(){var O,M,I,B,N,y;if(y=arguments[0],N=2<=arguments.length?w.call(arguments,1):[],g(p.default))p.default.apply(null,arguments);else for(O=0,I=N.length;O<I;O++)if(B=N[O],B!=null)for(M in B){if(!_.call(B,M))continue;y[M]=B[M]}return y},g=function(O){return!!O&&Object.prototype.toString.call(O)==="[object Function]"},m=function(O){var M;return!!O&&((M=typeof O=="undefined"?"undefined":(0,E.default)(O))==="function"||M==="object")},l=function(O){return g(Array.isArray)?Array.isArray(O):Object.prototype.toString.call(O)==="[object Array]"},i=function(O){var M;if(l(O))return!O.length;for(M in O){if(!_.call(O,M))continue;return!1}return!0},v=function(O){var M,I;return m(O)&&(I=(0,o.default)(O))&&(M=I.constructor)&&typeof M=="function"&&M instanceof M&&Function.prototype.toString.call(M)===Function.prototype.toString.call(Object)},s=function(O){return g(O.valueOf)?O.valueOf():O},G.exports.assign=a,G.exports.isFunction=g,G.exports.isObject=m,G.exports.isArray=l,G.exports.isEmpty=i,G.exports.isPlainObject=v,G.exports.getValue=s}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(u,G,c){"use strict";(function(){G.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p;E=u("./NodeType"),p=u("./XMLNode"),G.exports=b=function(){function d(a,s,l){if(this.parent=a,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(l),this.type=E.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(d.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(d.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return this.value},set:function(s){return this.value=s||""}}),Object.defineProperty(d.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(d.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(d.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(d.prototype,"specified",{get:function(){return!0}}),d.prototype.clone=function(){return(0,o.default)(this)},d.prototype.toString=function(a){return this.options.writer.attribute(this,this.options.writer.filterOptions(a))},d.prototype.debugInfo=function(a){return a=a||this.name,a==null?"parent: <"+this.parent.name+">":"attribute: {"+a+"}, parent: <"+this.parent.name+">"},d.prototype.isEqualNode=function(a){return a.namespaceURI!==this.namespaceURI||(a.prefix!==this.prefix||a.localName!==this.localName)?!1:!(a.value!==this.value)},d}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d=function(l,i){for(var g in i)a.call(i,g)&&(l[g]=i[g]);function m(){this.constructor=l}return m.prototype=i.prototype,l.prototype=new m,l.__super__=i.prototype,l},a={}.hasOwnProperty;E=u("./NodeType"),p=u("./XMLCharacterData"),G.exports=b=function(s){d(l,s);function l(i,g){if(l.__super__.constructor.call(this,i),g==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=E.CData,this.value=this.stringify.cdata(g)}return l.prototype.clone=function(){return(0,o.default)(this)},l.prototype.toString=function(i){return this.options.writer.cdata(this,this.options.writer.filterOptions(i))},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p=function(s,l){for(var i in l)d.call(l,i)&&(s[i]=l[i]);function g(){this.constructor=s}return g.prototype=l.prototype,s.prototype=new g,s.__super__=l.prototype,s},d={}.hasOwnProperty;b=u("./XMLNode"),G.exports=E=function(a){p(s,a);function s(l){s.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),s.prototype.clone=function(){return(0,o.default)(this)},s.prototype.substringData=function(l,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.appendData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.insertData=function(l,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(l,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(l,i,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(l){return s.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.data!==this.data):!1},s}(b)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d=function(l,i){for(var g in i)a.call(i,g)&&(l[g]=i[g]);function m(){this.constructor=l}return m.prototype=i.prototype,l.prototype=new m,l.__super__=i.prototype,l},a={}.hasOwnProperty;E=u("./NodeType"),b=u("./XMLCharacterData"),G.exports=p=function(s){d(l,s);function l(i,g){if(l.__super__.constructor.call(this,i),g==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=E.Comment,this.value=this.stringify.comment(g)}return l.prototype.clone=function(){return(0,o.default)(this)},l.prototype.toString=function(i){return this.options.writer.comment(this,this.options.writer.filterOptions(i))},l}(b)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/keys"),o=b(h),S=u("babel-runtime/core-js/object/create"),E=b(S);function b(p){return p&&p.__esModule?p:{default:p}}(function(){var p,d,a;d=u("./XMLDOMErrorHandler"),a=u("./XMLDOMStringList"),G.exports=p=function(){function s(){var l;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new d,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=l=(0,E.default)(this.defaultParams)}return Object.defineProperty(s.prototype,"parameterNames",{get:function(){return new a((0,o.default)(this.defaultParams))}}),s.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},s.prototype.canSetParameter=function(l,i){return!0},s.prototype.setParameter=function(l,i){return i!=null?this.params[l]=i:delete this.params[l]},s}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(u,G,c){"use strict";(function(){var h;G.exports=h=function(){function o(){}return o.prototype.handleError=function(S){throw new Error(S)},o}()}).call(void 0)},{}],260:[function(u,G,c){"use strict";(function(){var h;G.exports=h=function(){function o(){}return o.prototype.hasFeature=function(S,E){return!0},o.prototype.createDocumentType=function(S,E,b){throw new Error("This DOM method is not implemented.")},o.prototype.createDocument=function(S,E,b){throw new Error("This DOM method is not implemented.")},o.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},o.prototype.getFeature=function(S,E){throw new Error("This DOM method is not implemented.")},o}()}).call(void 0)},{}],261:[function(u,G,c){"use strict";(function(){var h;G.exports=h=function(){function o(S){this.arr=S||[]}return Object.defineProperty(o.prototype,"length",{get:function(){return this.arr.length}}),o.prototype.item=function(S){return this.arr[S]||null},o.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},o}()}).call(void 0)},{}],262:[function(u,G,c){"use strict";(function(){var h,o,S,E=function(d,a){for(var s in a)b.call(a,s)&&(d[s]=a[s]);function l(){this.constructor=d}return l.prototype=a.prototype,d.prototype=new l,d.__super__=a.prototype,d},b={}.hasOwnProperty;S=u("./XMLNode"),h=u("./NodeType"),G.exports=o=function(p){E(d,p);function d(a,s,l,i,g,m){if(d.__super__.constructor.call(this,a),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(s));if(!i)throw new Error("Missing DTD attribute type. "+this.debugInfo(s));if(!g)throw new Error("Missing DTD attribute default. "+this.debugInfo(s));if(g.indexOf("#")!==0&&(g="#"+g),!g.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(s));if(m&&!g.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(s));this.elementName=this.stringify.name(s),this.type=h.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(i),m&&(this.defaultValue=this.stringify.dtdAttDefault(m)),this.defaultValueType=g}return d.prototype.toString=function(a){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(a))},d}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(u,G,c){"use strict";(function(){var h,o,S,E=function(d,a){for(var s in a)b.call(a,s)&&(d[s]=a[s]);function l(){this.constructor=d}return l.prototype=a.prototype,d.prototype=new l,d.__super__=a.prototype,d},b={}.hasOwnProperty;S=u("./XMLNode"),h=u("./NodeType"),G.exports=o=function(p){E(d,p);function d(a,s,l){if(d.__super__.constructor.call(this,a),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(s),this.type=h.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return d.prototype.toString=function(a){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(a))},d}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(u,G,c){"use strict";(function(){var h,o,S,E,b=function(a,s){for(var l in s)p.call(s,l)&&(a[l]=s[l]);function i(){this.constructor=a}return i.prototype=s.prototype,a.prototype=new i,a.__super__=s.prototype,a},p={}.hasOwnProperty;E=u("./Utility").isObject,S=u("./XMLNode"),h=u("./NodeType"),G.exports=o=function(d){b(a,d);function a(s,l,i,g){if(a.__super__.constructor.call(this,s),i==null)throw new Error("Missing DTD entity name. "+this.debugInfo(i));if(g==null)throw new Error("Missing DTD entity value. "+this.debugInfo(i));if(this.pe=!!l,this.name=this.stringify.name(i),this.type=h.EntityDeclaration,!E(g))this.value=this.stringify.dtdEntityValue(g),this.internal=!0;else{if(!g.pubID&&!g.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(i));if(g.pubID&&!g.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(i));if(this.internal=!1,g.pubID!=null&&(this.pubID=this.stringify.dtdPubID(g.pubID)),g.sysID!=null&&(this.sysID=this.stringify.dtdSysID(g.sysID)),g.nData!=null&&(this.nData=this.stringify.dtdNData(g.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(i))}}return Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(a.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlVersion",{get:function(){return null}}),a.prototype.toString=function(s){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(s))},a}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(u,G,c){"use strict";(function(){var h,o,S,E=function(d,a){for(var s in a)b.call(a,s)&&(d[s]=a[s]);function l(){this.constructor=d}return l.prototype=a.prototype,d.prototype=new l,d.__super__=a.prototype,d},b={}.hasOwnProperty;S=u("./XMLNode"),h=u("./NodeType"),G.exports=o=function(p){E(d,p);function d(a,s,l){if(d.__super__.constructor.call(this,a),s==null)throw new Error("Missing DTD notation name. "+this.debugInfo(s));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(s));this.name=this.stringify.name(s),this.type=h.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),d.prototype.toString=function(a){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(a))},d}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(u,G,c){"use strict";(function(){var h,o,S,E,b=function(a,s){for(var l in s)p.call(s,l)&&(a[l]=s[l]);function i(){this.constructor=a}return i.prototype=s.prototype,a.prototype=new i,a.__super__=s.prototype,a},p={}.hasOwnProperty;E=u("./Utility").isObject,S=u("./XMLNode"),h=u("./NodeType"),G.exports=o=function(d){b(a,d);function a(s,l,i,g){var m;a.__super__.constructor.call(this,s),E(l)&&(m=l,l=m.version,i=m.encoding,g=m.standalone),l||(l="1.0"),this.type=h.Declaration,this.version=this.stringify.xmlVersion(l),i!=null&&(this.encoding=this.stringify.xmlEncoding(i)),g!=null&&(this.standalone=this.stringify.xmlStandalone(g))}return a.prototype.toString=function(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))},a}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(u,G,c){"use strict";(function(){var h,o,S,E,b,p,d,a,s,l=function(m,v){for(var w in v)i.call(v,w)&&(m[w]=v[w]);function _(){this.constructor=m}return _.prototype=v.prototype,m.prototype=new _,m.__super__=v.prototype,m},i={}.hasOwnProperty;s=u("./Utility").isObject,a=u("./XMLNode"),h=u("./NodeType"),o=u("./XMLDTDAttList"),E=u("./XMLDTDEntity"),S=u("./XMLDTDElement"),b=u("./XMLDTDNotation"),d=u("./XMLNamedNodeMap"),G.exports=p=function(g){l(m,g);function m(v,w,_){var k,O,M,I,B,N;if(m.__super__.constructor.call(this,v),this.type=h.DocType,v.children){for(I=v.children,O=0,M=I.length;O<M;O++)if(k=I[O],k.type===h.Element){this.name=k.name;break}}this.documentObject=v,s(w)&&(B=w,w=B.pubID,_=B.sysID),_==null&&(N=[w,_],_=N[0],w=N[1]),w!=null&&(this.pubID=this.stringify.dtdPubID(w)),_!=null&&(this.sysID=this.stringify.dtdSysID(_))}return Object.defineProperty(m.prototype,"entities",{get:function(){var w,_,k,O,M;for(O={},M=this.children,_=0,k=M.length;_<k;_++)w=M[_],w.type===h.EntityDeclaration&&!w.pe&&(O[w.name]=w);return new d(O)}}),Object.defineProperty(m.prototype,"notations",{get:function(){var w,_,k,O,M;for(O={},M=this.children,_=0,k=M.length;_<k;_++)w=M[_],w.type===h.NotationDeclaration&&(O[w.name]=w);return new d(O)}}),Object.defineProperty(m.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(m.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(m.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),m.prototype.element=function(v,w){var _;return _=new S(this,v,w),this.children.push(_),this},m.prototype.attList=function(v,w,_,k,O){var M;return M=new o(this,v,w,_,k,O),this.children.push(M),this},m.prototype.entity=function(v,w){var _;return _=new E(this,!1,v,w),this.children.push(_),this},m.prototype.pEntity=function(v,w){var _;return _=new E(this,!0,v,w),this.children.push(_),this},m.prototype.notation=function(v,w){var _;return _=new b(this,v,w),this.children.push(_),this},m.prototype.toString=function(v){return this.options.writer.docType(this,this.options.writer.filterOptions(v))},m.prototype.ele=function(v,w){return this.element(v,w)},m.prototype.att=function(v,w,_,k,O){return this.attList(v,w,_,k,O)},m.prototype.ent=function(v,w){return this.entity(v,w)},m.prototype.pent=function(v,w){return this.pEntity(v,w)},m.prototype.not=function(v,w){return this.notation(v,w)},m.prototype.up=function(){return this.root()||this.documentObject},m.prototype.isEqualNode=function(v){return m.__super__.isEqualNode.apply(this,arguments).isEqualNode(v)?v.name!==this.name||v.publicId!==this.publicId?!1:!(v.systemId!==this.systemId):!1},m}(a)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(u,G,c){"use strict";(function(){var h,o,S,E,b,p,d,a,s=function(g,m){for(var v in m)l.call(m,v)&&(g[v]=m[v]);function w(){this.constructor=g}return w.prototype=m.prototype,g.prototype=new w,g.__super__=m.prototype,g},l={}.hasOwnProperty;a=u("./Utility").isPlainObject,S=u("./XMLDOMImplementation"),o=u("./XMLDOMConfiguration"),b=u("./XMLNode"),h=u("./NodeType"),d=u("./XMLStringifier"),p=u("./XMLStringWriter"),G.exports=E=function(i){s(g,i);function g(m){g.__super__.constructor.call(this,null),this.name="#document",this.type=h.Document,this.documentURI=null,this.domConfig=new o,m||(m={}),m.writer||(m.writer=new p),this.options=m,this.stringify=new d(m)}return Object.defineProperty(g.prototype,"implementation",{value:new S}),Object.defineProperty(g.prototype,"doctype",{get:function(){var v,w,_,k;for(k=this.children,w=0,_=k.length;w<_;w++)if(v=k[w],v.type===h.DocType)return v;return null}}),Object.defineProperty(g.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(g.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(g.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(g.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===h.Declaration?this.children[0].encoding:null}}),Object.defineProperty(g.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===h.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(g.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===h.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(g.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(g.prototype,"origin",{get:function(){return null}}),Object.defineProperty(g.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(g.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(g.prototype,"contentType",{get:function(){return null}}),g.prototype.end=function(m){var v;return v={},m?a(m)&&(v=m,m=this.options.writer):m=this.options.writer,m.document(this,m.filterOptions(v))},g.prototype.toString=function(m){return this.options.writer.document(this,this.options.writer.filterOptions(m))},g.prototype.createElement=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createTextNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createComment=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createCDATASection=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createProcessingInstruction=function(m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createAttribute=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createEntityReference=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.importNode=function(m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createElementNS=function(m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createAttributeNS=function(m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementById=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.adoptNode=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.renameNode=function(m,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createEvent=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createNodeIterator=function(m,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.createTreeWalker=function(m,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(u,G,c){"use strict";(function(){var h,o,S,E,b,p,d,a,s,l,i,g,m,v,w,_,k,O,M,I,B,N,y,Y,X={}.hasOwnProperty;Y=u("./Utility"),N=Y.isObject,B=Y.isFunction,y=Y.isPlainObject,I=Y.getValue,h=u("./NodeType"),g=u("./XMLDocument"),v=u("./XMLElement"),E=u("./XMLCData"),b=u("./XMLComment"),_=u("./XMLRaw"),M=u("./XMLText"),w=u("./XMLProcessingInstruction"),l=u("./XMLDeclaration"),i=u("./XMLDocType"),p=u("./XMLDTDAttList"),a=u("./XMLDTDEntity"),d=u("./XMLDTDElement"),s=u("./XMLDTDNotation"),S=u("./XMLAttribute"),O=u("./XMLStringifier"),k=u("./XMLStringWriter"),o=u("./WriterState"),G.exports=m=function(){function P(F,K,Q){var ce;this.name="?xml",this.type=h.Document,F||(F={}),ce={},F.writer?y(F.writer)&&(ce=F.writer,F.writer=new k):F.writer=new k,this.options=F,this.writer=F.writer,this.writerOptions=this.writer.filterOptions(ce),this.stringify=new O(F),this.onDataCallback=K||function(){},this.onEndCallback=Q||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return P.prototype.createChildNode=function(F){var K,Q,ce,fe,z,se,$,j;switch(F.type){case h.CData:this.cdata(F.value);break;case h.Comment:this.comment(F.value);break;case h.Element:ce={},$=F.attribs;for(Q in $){if(!X.call($,Q))continue;K=$[Q],ce[Q]=K.value}this.node(F.name,ce);break;case h.Dummy:this.dummy();break;case h.Raw:this.raw(F.value);break;case h.Text:this.text(F.value);break;case h.ProcessingInstruction:this.instruction(F.target,F.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+F.constructor.name)}for(j=F.children,z=0,se=j.length;z<se;z++)fe=j[z],this.createChildNode(fe),fe.type===h.Element&&this.up();return this},P.prototype.dummy=function(){return this},P.prototype.node=function(F,K,Q){var ce;if(F==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(F));return this.openCurrent(),F=I(F),K==null&&(K={}),K=I(K),N(K)||(ce=[K,Q],Q=ce[0],K=ce[1]),this.currentNode=new v(this,F,K),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Q!=null&&this.text(Q),this},P.prototype.element=function(F,K,Q){var ce,fe,z,se,$,j;if(this.currentNode&&this.currentNode.type===h.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(F)||N(F)||B(F))for(se=this.options.noValidation,this.options.noValidation=!0,j=new g(this.options).element("TEMP_ROOT"),j.element(F),this.options.noValidation=se,$=j.children,fe=0,z=$.length;fe<z;fe++)ce=$[fe],this.createChildNode(ce),ce.type===h.Element&&this.up();else this.node(F,K,Q);return this},P.prototype.attribute=function(F,K){var Q,ce;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(F));if(F!=null&&(F=I(F)),N(F))for(Q in F){if(!X.call(F,Q))continue;ce=F[Q],this.attribute(Q,ce)}else B(K)&&(K=K.apply()),this.options.keepNullAttributes&&K==null?this.currentNode.attribs[F]=new S(this,F,""):K!=null&&(this.currentNode.attribs[F]=new S(this,F,K));return this},P.prototype.text=function(F){var K;return this.openCurrent(),K=new M(this,F),this.onData(this.writer.text(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.cdata=function(F){var K;return this.openCurrent(),K=new E(this,F),this.onData(this.writer.cdata(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.comment=function(F){var K;return this.openCurrent(),K=new b(this,F),this.onData(this.writer.comment(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.raw=function(F){var K;return this.openCurrent(),K=new _(this,F),this.onData(this.writer.raw(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.instruction=function(F,K){var Q,ce,fe,z,se;if(this.openCurrent(),F!=null&&(F=I(F)),K!=null&&(K=I(K)),Array.isArray(F))for(Q=0,z=F.length;Q<z;Q++)ce=F[Q],this.instruction(ce);else if(N(F))for(ce in F){if(!X.call(F,ce))continue;fe=F[ce],this.instruction(ce,fe)}else B(K)&&(K=K.apply()),se=new w(this,F,K),this.onData(this.writer.processingInstruction(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},P.prototype.declaration=function(F,K,Q){var ce;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ce=new l(this,F,K,Q),this.onData(this.writer.declaration(ce,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.doctype=function(F,K,Q){if(this.openCurrent(),F==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new i(this,K,Q),this.currentNode.rootNodeName=F,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},P.prototype.dtdElement=function(F,K){var Q;return this.openCurrent(),Q=new d(this,F,K),this.onData(this.writer.dtdElement(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.attList=function(F,K,Q,ce,fe){var z;return this.openCurrent(),z=new p(this,F,K,Q,ce,fe),this.onData(this.writer.dtdAttList(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.entity=function(F,K){var Q;return this.openCurrent(),Q=new a(this,!1,F,K),this.onData(this.writer.dtdEntity(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.pEntity=function(F,K){var Q;return this.openCurrent(),Q=new a(this,!0,F,K),this.onData(this.writer.dtdEntity(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.notation=function(F,K){var Q;return this.openCurrent(),Q=new s(this,F,K),this.onData(this.writer.dtdNotation(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},P.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},P.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},P.prototype.openNode=function(F){var K,Q,ce,fe;if(!F.isOpen){if(!this.root&&this.currentLevel===0&&F.type===h.Element&&(this.root=F),Q="",F.type===h.Element){this.writerOptions.state=o.OpenTag,Q=this.writer.indent(F,this.writerOptions,this.currentLevel)+"<"+F.name,fe=F.attribs;for(ce in fe){if(!X.call(fe,ce))continue;K=fe[ce],Q+=this.writer.attribute(K,this.writerOptions,this.currentLevel)}Q+=(F.children?">":"/>")+this.writer.endline(F,this.writerOptions,this.currentLevel),this.writerOptions.state=o.InsideTag}else this.writerOptions.state=o.OpenTag,Q=this.writer.indent(F,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+F.rootNodeName,F.pubID&&F.sysID?Q+=' PUBLIC "'+F.pubID+'" "'+F.sysID+'"':F.sysID&&(Q+=' SYSTEM "'+F.sysID+'"'),F.children?(Q+=" [",this.writerOptions.state=o.InsideTag):(this.writerOptions.state=o.CloseTag,Q+=">"),Q+=this.writer.endline(F,this.writerOptions,this.currentLevel);return this.onData(Q,this.currentLevel),F.isOpen=!0}},P.prototype.closeNode=function(F){var K;if(!F.isClosed)return K="",this.writerOptions.state=o.CloseTag,F.type===h.Element?K=this.writer.indent(F,this.writerOptions,this.currentLevel)+"</"+F.name+">"+this.writer.endline(F,this.writerOptions,this.currentLevel):K=this.writer.indent(F,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(F,this.writerOptions,this.currentLevel),this.writerOptions.state=o.None,this.onData(K,this.currentLevel),F.isClosed=!0},P.prototype.onData=function(F,K){return this.documentStarted=!0,this.onDataCallback(F,K+1)},P.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},P.prototype.debugInfo=function(F){return F==null?"":"node: <"+F+">"},P.prototype.ele=function(){return this.element.apply(this,arguments)},P.prototype.nod=function(F,K,Q){return this.node(F,K,Q)},P.prototype.txt=function(F){return this.text(F)},P.prototype.dat=function(F){return this.cdata(F)},P.prototype.com=function(F){return this.comment(F)},P.prototype.ins=function(F,K){return this.instruction(F,K)},P.prototype.dec=function(F,K,Q){return this.declaration(F,K,Q)},P.prototype.dtd=function(F,K,Q){return this.doctype(F,K,Q)},P.prototype.e=function(F,K,Q){return this.element(F,K,Q)},P.prototype.n=function(F,K,Q){return this.node(F,K,Q)},P.prototype.t=function(F){return this.text(F)},P.prototype.d=function(F){return this.cdata(F)},P.prototype.c=function(F){return this.comment(F)},P.prototype.r=function(F){return this.raw(F)},P.prototype.i=function(F,K){return this.instruction(F,K)},P.prototype.att=function(){return this.currentNode&&this.currentNode.type===h.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},P.prototype.a=function(){return this.currentNode&&this.currentNode.type===h.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},P.prototype.ent=function(F,K){return this.entity(F,K)},P.prototype.pent=function(F,K){return this.pEntity(F,K)},P.prototype.not=function(F,K){return this.notation(F,K)},P}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d=function(l,i){for(var g in i)a.call(i,g)&&(l[g]=i[g]);function m(){this.constructor=l}return m.prototype=i.prototype,l.prototype=new m,l.__super__=i.prototype,l},a={}.hasOwnProperty;p=u("./XMLNode"),E=u("./NodeType"),G.exports=b=function(s){d(l,s);function l(i){l.__super__.constructor.call(this,i),this.type=E.Dummy}return l.prototype.clone=function(){return(0,o.default)(this)},l.prototype.toString=function(i){return""},l}(p)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d,a,s,l,i,g,m=function(_,k){for(var O in k)v.call(k,O)&&(_[O]=k[O]);function M(){this.constructor=_}return M.prototype=k.prototype,_.prototype=new M,_.__super__=k.prototype,_},v={}.hasOwnProperty;g=u("./Utility"),i=g.isObject,l=g.isFunction,s=g.getValue,a=u("./XMLNode"),E=u("./NodeType"),b=u("./XMLAttribute"),d=u("./XMLNamedNodeMap"),G.exports=p=function(w){m(_,w);function _(k,O,M){var I,B,N,y;if(_.__super__.constructor.call(this,k),O==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(O),this.type=E.Element,this.attribs={},this.schemaTypeInfo=null,M!=null&&this.attribute(M),k.type===E.Document&&(this.isRoot=!0,this.documentObject=k,k.rootObject=this,k.children)){for(y=k.children,B=0,N=y.length;B<N;B++)if(I=y[B],I.type===E.DocType){I.name=this.name;break}}}return Object.defineProperty(_.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(_.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(_.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(_.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(_.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(_.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(_.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(_.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new d(this.attribs)),this.attributeMap}}),_.prototype.clone=function(){var k,O,M,I;M=(0,o.default)(this),M.isRoot&&(M.documentObject=null),M.attribs={},I=this.attribs;for(O in I){if(!v.call(I,O))continue;k=I[O],M.attribs[O]=k.clone()}return M.children=[],this.children.forEach(function(B){var N;return N=B.clone(),N.parent=M,M.children.push(N)}),M},_.prototype.attribute=function(k,O){var M,I;if(k!=null&&(k=s(k)),i(k))for(M in k){if(!v.call(k,M))continue;I=k[M],this.attribute(M,I)}else l(O)&&(O=O.apply()),this.options.keepNullAttributes&&O==null?this.attribs[k]=new b(this,k,""):O!=null&&(this.attribs[k]=new b(this,k,O));return this},_.prototype.removeAttribute=function(k){var O,M,I;if(k==null)throw new Error("Missing attribute name. "+this.debugInfo());if(k=s(k),Array.isArray(k))for(M=0,I=k.length;M<I;M++)O=k[M],delete this.attribs[O];else delete this.attribs[k];return this},_.prototype.toString=function(k){return this.options.writer.element(this,this.options.writer.filterOptions(k))},_.prototype.att=function(k,O){return this.attribute(k,O)},_.prototype.a=function(k,O){return this.attribute(k,O)},_.prototype.getAttribute=function(k){return this.attribs.hasOwnProperty(k)?this.attribs[k].value:null},_.prototype.setAttribute=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getAttributeNode=function(k){return this.attribs.hasOwnProperty(k)?this.attribs[k]:null},_.prototype.setAttributeNode=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.removeAttributeNode=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getAttributeNS=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setAttributeNS=function(k,O,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.removeAttributeNS=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getAttributeNodeNS=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setAttributeNodeNS=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.hasAttribute=function(k){return this.attribs.hasOwnProperty(k)},_.prototype.hasAttributeNS=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setIdAttribute=function(k,O){return this.attribs.hasOwnProperty(k)?this.attribs[k].isId:O},_.prototype.setIdAttributeNS=function(k,O,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.setIdAttributeNode=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(k,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByClassName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.isEqualNode=function(k){var O,M,I;if(!_.__super__.isEqualNode.apply(this,arguments).isEqualNode(k))return!1;if(k.namespaceURI!==this.namespaceURI)return!1;if(k.prefix!==this.prefix)return!1;if(k.localName!==this.localName)return!1;if(k.attribs.length!==this.attribs.length)return!1;for(O=M=0,I=this.attribs.length-1;0<=I?M<=I:M>=I;O=0<=I?++M:--M)if(!this.attribs[O].isEqualNode(k.attribs[O]))return!1;return!0},_}(a)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/keys"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E;G.exports=E=function(){function b(p){this.nodes=p}return Object.defineProperty(b.prototype,"length",{get:function(){return(0,o.default)(this.nodes).length||0}}),b.prototype.clone=function(){return this.nodes=null},b.prototype.getNamedItem=function(p){return this.nodes[p]},b.prototype.setNamedItem=function(p){var d;return d=this.nodes[p.nodeName],this.nodes[p.nodeName]=p,d||null},b.prototype.removeNamedItem=function(p){var d;return d=this.nodes[p],delete this.nodes[p],d||null},b.prototype.item=function(p){return this.nodes[(0,o.default)(this.nodes)[p]]||null},b.prototype.getNamedItemNS=function(p,d){throw new Error("This DOM method is not implemented.")},b.prototype.setNamedItemNS=function(p){throw new Error("This DOM method is not implemented.")},b.prototype.removeNamedItemNS=function(p,d){throw new Error("This DOM method is not implemented.")},b}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(u,G,c){"use strict";(function(){var h,o,S,E,b,p,d,a,s,l,i,g,m,v,w,_,k,O,M,I={}.hasOwnProperty;M=u("./Utility"),O=M.isObject,k=M.isFunction,_=M.isEmpty,w=M.getValue,a=null,S=null,E=null,b=null,p=null,m=null,v=null,g=null,d=null,o=null,i=null,s=null,h=null,G.exports=l=function(){function B(N){this.parent=N,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,a||(a=u("./XMLElement"),S=u("./XMLCData"),E=u("./XMLComment"),b=u("./XMLDeclaration"),p=u("./XMLDocType"),m=u("./XMLRaw"),v=u("./XMLText"),g=u("./XMLProcessingInstruction"),d=u("./XMLDummy"),o=u("./NodeType"),i=u("./XMLNodeList"),s=u("./XMLNamedNodeMap"),h=u("./DocumentPosition"))}return Object.defineProperty(B.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(B.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(B.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(B.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(B.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new i(this.children)),this.childNodeList}}),Object.defineProperty(B.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(B.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(B.prototype,"previousSibling",{get:function(){var y;return y=this.parent.children.indexOf(this),this.parent.children[y-1]||null}}),Object.defineProperty(B.prototype,"nextSibling",{get:function(){var y;return y=this.parent.children.indexOf(this),this.parent.children[y+1]||null}}),Object.defineProperty(B.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(B.prototype,"textContent",{get:function(){var y,Y,X,P,F;if(this.nodeType===o.Element||this.nodeType===o.DocumentFragment){for(F="",P=this.children,Y=0,X=P.length;Y<X;Y++)y=P[Y],y.textContent&&(F+=y.textContent);return F}else return null},set:function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),B.prototype.setParent=function(N){var y,Y,X,P,F;for(this.parent=N,N&&(this.options=N.options,this.stringify=N.stringify),P=this.children,F=[],Y=0,X=P.length;Y<X;Y++)y=P[Y],F.push(y.setParent(this));return F},B.prototype.element=function(N,y,Y){var X,P,F,K,Q,ce,fe,z,se,$,j;if(ce=null,y===null&&Y==null&&(se=[{},null],y=se[0],Y=se[1]),y==null&&(y={}),y=w(y),O(y)||($=[y,Y],Y=$[0],y=$[1]),N!=null&&(N=w(N)),Array.isArray(N))for(F=0,fe=N.length;F<fe;F++)P=N[F],ce=this.element(P);else if(k(N))ce=this.element(N.apply());else if(O(N))for(Q in N){if(!I.call(N,Q))continue;if(j=N[Q],k(j)&&(j=j.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Q.indexOf(this.stringify.convertAttKey)===0)ce=this.attribute(Q.substr(this.stringify.convertAttKey.length),j);else if(!this.options.separateArrayItems&&Array.isArray(j)&&_(j))ce=this.dummy();else if(O(j)&&_(j))ce=this.element(Q);else if(!this.options.keepNullNodes&&j==null)ce=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(j))for(K=0,z=j.length;K<z;K++)P=j[K],X={},X[Q]=P,ce=this.element(X);else O(j)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Q.indexOf(this.stringify.convertTextKey)===0?ce=this.element(j):(ce=this.element(Q),ce.element(j)):ce=this.element(Q,j)}else!this.options.keepNullNodes&&Y===null?ce=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&N.indexOf(this.stringify.convertTextKey)===0?ce=this.text(Y):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&N.indexOf(this.stringify.convertCDataKey)===0?ce=this.cdata(Y):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&N.indexOf(this.stringify.convertCommentKey)===0?ce=this.comment(Y):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&N.indexOf(this.stringify.convertRawKey)===0?ce=this.raw(Y):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&N.indexOf(this.stringify.convertPIKey)===0?ce=this.instruction(N.substr(this.stringify.convertPIKey.length),Y):ce=this.node(N,y,Y);if(ce==null)throw new Error("Could not create any elements with: "+N+". "+this.debugInfo());return ce},B.prototype.insertBefore=function(N,y,Y){var X,P,F,K,Q;if(N!=null?N.type:void 0)return F=N,K=y,F.setParent(this),K?(P=children.indexOf(K),Q=children.splice(P),children.push(F),Array.prototype.push.apply(children,Q)):children.push(F),F;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(N));return P=this.parent.children.indexOf(this),Q=this.parent.children.splice(P),X=this.parent.element(N,y,Y),Array.prototype.push.apply(this.parent.children,Q),X},B.prototype.insertAfter=function(N,y,Y){var X,P,F;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(N));return P=this.parent.children.indexOf(this),F=this.parent.children.splice(P+1),X=this.parent.element(N,y,Y),Array.prototype.push.apply(this.parent.children,F),X},B.prototype.remove=function(){var N,y;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return N=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[N,N-N+1].concat(y=[])),this.parent},B.prototype.node=function(N,y,Y){var X,P;return N!=null&&(N=w(N)),y||(y={}),y=w(y),O(y)||(P=[y,Y],Y=P[0],y=P[1]),X=new a(this,N,y),Y!=null&&X.text(Y),this.children.push(X),X},B.prototype.text=function(N){var y;return O(N)&&this.element(N),y=new v(this,N),this.children.push(y),this},B.prototype.cdata=function(N){var y;return y=new S(this,N),this.children.push(y),this},B.prototype.comment=function(N){var y;return y=new E(this,N),this.children.push(y),this},B.prototype.commentBefore=function(N){var y,Y,X;return Y=this.parent.children.indexOf(this),X=this.parent.children.splice(Y),y=this.parent.comment(N),Array.prototype.push.apply(this.parent.children,X),this},B.prototype.commentAfter=function(N){var y,Y,X;return Y=this.parent.children.indexOf(this),X=this.parent.children.splice(Y+1),y=this.parent.comment(N),Array.prototype.push.apply(this.parent.children,X),this},B.prototype.raw=function(N){var y;return y=new m(this,N),this.children.push(y),this},B.prototype.dummy=function(){var N;return N=new d(this),N},B.prototype.instruction=function(N,y){var Y,X,P,F,K;if(N!=null&&(N=w(N)),y!=null&&(y=w(y)),Array.isArray(N))for(F=0,K=N.length;F<K;F++)Y=N[F],this.instruction(Y);else if(O(N))for(Y in N){if(!I.call(N,Y))continue;X=N[Y],this.instruction(Y,X)}else k(y)&&(y=y.apply()),P=new g(this,N,y),this.children.push(P);return this},B.prototype.instructionBefore=function(N,y){var Y,X,P;return X=this.parent.children.indexOf(this),P=this.parent.children.splice(X),Y=this.parent.instruction(N,y),Array.prototype.push.apply(this.parent.children,P),this},B.prototype.instructionAfter=function(N,y){var Y,X,P;return X=this.parent.children.indexOf(this),P=this.parent.children.splice(X+1),Y=this.parent.instruction(N,y),Array.prototype.push.apply(this.parent.children,P),this},B.prototype.declaration=function(N,y,Y){var X,P;return X=this.document(),P=new b(X,N,y,Y),X.children.length===0?X.children.unshift(P):X.children[0].type===o.Declaration?X.children[0]=P:X.children.unshift(P),X.root()||X},B.prototype.dtd=function(N,y){var Y,X,P,F,K,Q,ce,fe,z,se;for(X=this.document(),P=new p(X,N,y),z=X.children,F=K=0,ce=z.length;K<ce;F=++K)if(Y=z[F],Y.type===o.DocType)return X.children[F]=P,P;for(se=X.children,F=Q=0,fe=se.length;Q<fe;F=++Q)if(Y=se[F],Y.isRoot)return X.children.splice(F,0,P),P;return X.children.push(P),P},B.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},B.prototype.root=function(){var N;for(N=this;N;){if(N.type===o.Document)return N.rootObject;if(N.isRoot)return N;N=N.parent}},B.prototype.document=function(){var N;for(N=this;N;){if(N.type===o.Document)return N;N=N.parent}},B.prototype.end=function(N){return this.document().end(N)},B.prototype.prev=function(){var N;if(N=this.parent.children.indexOf(this),N<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[N-1]},B.prototype.next=function(){var N;if(N=this.parent.children.indexOf(this),N===-1||N===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[N+1]},B.prototype.importDocument=function(N){var y;return y=N.root().clone(),y.parent=this,y.isRoot=!1,this.children.push(y),this},B.prototype.debugInfo=function(N){var y,Y;return N=N||this.name,N==null&&!((y=this.parent)!=null?y.name:void 0)?"":N==null?"parent: <"+this.parent.name+">":((Y=this.parent)!=null?Y.name:void 0)?"node: <"+N+">, parent: <"+this.parent.name+">":"node: <"+N+">"},B.prototype.ele=function(N,y,Y){return this.element(N,y,Y)},B.prototype.nod=function(N,y,Y){return this.node(N,y,Y)},B.prototype.txt=function(N){return this.text(N)},B.prototype.dat=function(N){return this.cdata(N)},B.prototype.com=function(N){return this.comment(N)},B.prototype.ins=function(N,y){return this.instruction(N,y)},B.prototype.doc=function(){return this.document()},B.prototype.dec=function(N,y,Y){return this.declaration(N,y,Y)},B.prototype.e=function(N,y,Y){return this.element(N,y,Y)},B.prototype.n=function(N,y,Y){return this.node(N,y,Y)},B.prototype.t=function(N){return this.text(N)},B.prototype.d=function(N){return this.cdata(N)},B.prototype.c=function(N){return this.comment(N)},B.prototype.r=function(N){return this.raw(N)},B.prototype.i=function(N,y){return this.instruction(N,y)},B.prototype.u=function(){return this.up()},B.prototype.importXMLBuilder=function(N){return this.importDocument(N)},B.prototype.replaceChild=function(N,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.removeChild=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.appendChild=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.hasChildNodes=function(){return this.children.length!==0},B.prototype.cloneNode=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.isSupported=function(N,y){return!0},B.prototype.hasAttributes=function(){return this.attribs.length!==0},B.prototype.compareDocumentPosition=function(N){var y,Y;return y=this,y===N?0:this.document()!==N.document()?(Y=h.Disconnected|h.ImplementationSpecific,Math.random()<.5?Y|=h.Preceding:Y|=h.Following,Y):y.isAncestor(N)?h.Contains|h.Preceding:y.isDescendant(N)?h.Contains|h.Following:y.isPreceding(N)?h.Preceding:h.Following},B.prototype.isSameNode=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.lookupPrefix=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.isDefaultNamespace=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.lookupNamespaceURI=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.isEqualNode=function(N){var y,Y,X;if(N.nodeType!==this.nodeType)return!1;if(N.children.length!==this.children.length)return!1;for(y=Y=0,X=this.children.length-1;0<=X?Y<=X:Y>=X;y=0<=X?++Y:--Y)if(!this.children[y].isEqualNode(N.children[y]))return!1;return!0},B.prototype.getFeature=function(N,y){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.setUserData=function(N,y,Y){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.getUserData=function(N){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.contains=function(N){return N?N===this||this.isDescendant(N):!1},B.prototype.isDescendant=function(N){var y,Y,X,P,F;for(F=this.children,X=0,P=F.length;X<P;X++){if(y=F[X],N===y)return!0;if(Y=y.isDescendant(N),Y)return!0}return!1},B.prototype.isAncestor=function(N){return N.isDescendant(this)},B.prototype.isPreceding=function(N){var y,Y;return y=this.treePosition(N),Y=this.treePosition(this),y===-1||Y===-1?!1:y<Y},B.prototype.isFollowing=function(N){var y,Y;return y=this.treePosition(N),Y=this.treePosition(this),y===-1||Y===-1?!1:y>Y},B.prototype.treePosition=function(N){var y,Y;return Y=0,y=!1,this.foreachTreeNode(this.document(),function(X){if(Y++,!y&&X===N)return y=!0}),y?Y:-1},B.prototype.foreachTreeNode=function(N,y){var Y,X,P,F,K;for(N||(N=this.document()),F=N.children,X=0,P=F.length;X<P;X++){if(Y=F[X],K=y(Y))return K;if(K=this.foreachTreeNode(Y,y),K)return K}},B}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(u,G,c){"use strict";(function(){var h;G.exports=h=function(){function o(S){this.nodes=S}return Object.defineProperty(o.prototype,"length",{get:function(){return this.nodes.length||0}}),o.prototype.clone=function(){return this.nodes=null},o.prototype.item=function(S){return this.nodes[S]||null},o}()}).call(void 0)},{}],275:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d=function(l,i){for(var g in i)a.call(i,g)&&(l[g]=i[g]);function m(){this.constructor=l}return m.prototype=i.prototype,l.prototype=new m,l.__super__=i.prototype,l},a={}.hasOwnProperty;E=u("./NodeType"),b=u("./XMLCharacterData"),G.exports=p=function(s){d(l,s);function l(i,g,m){if(l.__super__.constructor.call(this,i),g==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=E.ProcessingInstruction,this.target=this.stringify.insTarget(g),this.name=this.target,m&&(this.value=this.stringify.insValue(m))}return l.prototype.clone=function(){return(0,o.default)(this)},l.prototype.toString=function(i){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(i))},l.prototype.isEqualNode=function(i){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.target!==this.target):!1},l}(b)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d=function(l,i){for(var g in i)a.call(i,g)&&(l[g]=i[g]);function m(){this.constructor=l}return m.prototype=i.prototype,l.prototype=new m,l.__super__=i.prototype,l},a={}.hasOwnProperty;E=u("./NodeType"),b=u("./XMLNode"),G.exports=p=function(s){d(l,s);function l(i,g){if(l.__super__.constructor.call(this,i),g==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=E.Raw,this.value=this.stringify.raw(g)}return l.prototype.clone=function(){return(0,o.default)(this)},l.prototype.toString=function(i){return this.options.writer.raw(this,this.options.writer.filterOptions(i))},l}(b)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(u,G,c){"use strict";(function(){var h,o,S,E,b=function(a,s){for(var l in s)p.call(s,l)&&(a[l]=s[l]);function i(){this.constructor=a}return i.prototype=s.prototype,a.prototype=new i,a.__super__=s.prototype,a},p={}.hasOwnProperty;h=u("./NodeType"),E=u("./XMLWriterBase"),o=u("./WriterState"),G.exports=S=function(d){b(a,d);function a(s,l){this.stream=s,a.__super__.constructor.call(this,l)}return a.prototype.endline=function(s,l,i){return s.isLastRootNode&&l.state===o.CloseTag?"":a.__super__.endline.call(this,s,l,i)},a.prototype.document=function(s,l){var i,g,m,v,w,_,k,O,M;for(k=s.children,g=m=0,w=k.length;m<w;g=++m)i=k[g],i.isLastRootNode=g===s.children.length-1;for(l=this.filterOptions(l),O=s.children,M=[],v=0,_=O.length;v<_;v++)i=O[v],M.push(this.writeChildNode(i,l,0));return M},a.prototype.attribute=function(s,l,i){return this.stream.write(a.__super__.attribute.call(this,s,l,i))},a.prototype.cdata=function(s,l,i){return this.stream.write(a.__super__.cdata.call(this,s,l,i))},a.prototype.comment=function(s,l,i){return this.stream.write(a.__super__.comment.call(this,s,l,i))},a.prototype.declaration=function(s,l,i){return this.stream.write(a.__super__.declaration.call(this,s,l,i))},a.prototype.docType=function(s,l,i){var g,m,v,w;if(i||(i=0),this.openNode(s,l,i),l.state=o.OpenTag,this.stream.write(this.indent(s,l,i)),this.stream.write("<!DOCTYPE "+s.root().name),s.pubID&&s.sysID?this.stream.write(' PUBLIC "'+s.pubID+'" "'+s.sysID+'"'):s.sysID&&this.stream.write(' SYSTEM "'+s.sysID+'"'),s.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(s,l,i)),l.state=o.InsideTag,w=s.children,m=0,v=w.length;m<v;m++)g=w[m],this.writeChildNode(g,l,i+1);l.state=o.CloseTag,this.stream.write("]")}return l.state=o.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(s,l,i)),l.state=o.None,this.closeNode(s,l,i)},a.prototype.element=function(s,l,i){var g,m,v,w,_,k,O,M,I,B;i||(i=0),this.openNode(s,l,i),l.state=o.OpenTag,this.stream.write(this.indent(s,l,i)+"<"+s.name),I=s.attribs;for(O in I){if(!p.call(I,O))continue;g=I[O],this.attribute(g,l,i)}if(v=s.children.length,w=v===0?null:s.children[0],v===0||s.children.every(function(N){return(N.type===h.Text||N.type===h.Raw)&&N.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=o.CloseTag,this.stream.write("</"+s.name+">")):(l.state=o.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&v===1&&(w.type===h.Text||w.type===h.Raw)&&w.value!=null)this.stream.write(">"),l.state=o.InsideTag,l.suppressPrettyCount++,M=!0,this.writeChildNode(w,l,i+1),l.suppressPrettyCount--,M=!1,l.state=o.CloseTag,this.stream.write("</"+s.name+">");else{for(this.stream.write(">"+this.endline(s,l,i)),l.state=o.InsideTag,B=s.children,_=0,k=B.length;_<k;_++)m=B[_],this.writeChildNode(m,l,i+1);l.state=o.CloseTag,this.stream.write(this.indent(s,l,i)+"</"+s.name+">")}return this.stream.write(this.endline(s,l,i)),l.state=o.None,this.closeNode(s,l,i)},a.prototype.processingInstruction=function(s,l,i){return this.stream.write(a.__super__.processingInstruction.call(this,s,l,i))},a.prototype.raw=function(s,l,i){return this.stream.write(a.__super__.raw.call(this,s,l,i))},a.prototype.text=function(s,l,i){return this.stream.write(a.__super__.text.call(this,s,l,i))},a.prototype.dtdAttList=function(s,l,i){return this.stream.write(a.__super__.dtdAttList.call(this,s,l,i))},a.prototype.dtdElement=function(s,l,i){return this.stream.write(a.__super__.dtdElement.call(this,s,l,i))},a.prototype.dtdEntity=function(s,l,i){return this.stream.write(a.__super__.dtdEntity.call(this,s,l,i))},a.prototype.dtdNotation=function(s,l,i){return this.stream.write(a.__super__.dtdNotation.call(this,s,l,i))},a}(E)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(u,G,c){"use strict";(function(){var h,o,S=function(p,d){for(var a in d)E.call(d,a)&&(p[a]=d[a]);function s(){this.constructor=p}return s.prototype=d.prototype,p.prototype=new s,p.__super__=d.prototype,p},E={}.hasOwnProperty;o=u("./XMLWriterBase"),G.exports=h=function(b){S(p,b);function p(d){p.__super__.constructor.call(this,d)}return p.prototype.document=function(d,a){var s,l,i,g,m;for(a=this.filterOptions(a),g="",m=d.children,l=0,i=m.length;l<i;l++)s=m[l],g+=this.writeChildNode(s,a,0);return a.pretty&&g.slice(-a.newline.length)===a.newline&&(g=g.slice(0,-a.newline.length)),g},p}(o)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(u,G,c){"use strict";(function(){var h,o=function(b,p){return function(){return b.apply(p,arguments)}},S={}.hasOwnProperty;G.exports=h=function(){function E(b){this.assertLegalName=o(this.assertLegalName,this),this.assertLegalChar=o(this.assertLegalChar,this);var p,d,a;b||(b={}),this.options=b,this.options.version||(this.options.version="1.0"),d=b.stringify||{};for(p in d){if(!S.call(d,p))continue;a=d[p],this[p]=a}}return E.prototype.name=function(b){return this.options.noValidation?b:this.assertLegalName(""+b||"")},E.prototype.text=function(b){return this.options.noValidation?b:this.assertLegalChar(this.textEscape(""+b||""))},E.prototype.cdata=function(b){return this.options.noValidation?b:(b=""+b||"",b=b.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(b))},E.prototype.comment=function(b){if(this.options.noValidation)return b;if(b=""+b||"",b.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+b);return this.assertLegalChar(b)},E.prototype.raw=function(b){return this.options.noValidation?b:""+b||""},E.prototype.attValue=function(b){return this.options.noValidation?b:this.assertLegalChar(this.attEscape(b=""+b||""))},E.prototype.insTarget=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.insValue=function(b){if(this.options.noValidation)return b;if(b=""+b||"",b.match(/\?>/))throw new Error("Invalid processing instruction value: "+b);return this.assertLegalChar(b)},E.prototype.xmlVersion=function(b){if(this.options.noValidation)return b;if(b=""+b||"",!b.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+b);return b},E.prototype.xmlEncoding=function(b){if(this.options.noValidation)return b;if(b=""+b||"",!b.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+b);return this.assertLegalChar(b)},E.prototype.xmlStandalone=function(b){return this.options.noValidation?b:b?"yes":"no"},E.prototype.dtdPubID=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.dtdSysID=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.dtdElementValue=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.dtdAttType=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.dtdAttDefault=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.dtdEntityValue=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.dtdNData=function(b){return this.options.noValidation?b:this.assertLegalChar(""+b||"")},E.prototype.convertAttKey="@",E.prototype.convertPIKey="?",E.prototype.convertTextKey="#text",E.prototype.convertCDataKey="#cdata",E.prototype.convertCommentKey="#comment",E.prototype.convertRawKey="#raw",E.prototype.assertLegalChar=function(b){var p,d;if(this.options.noValidation)return b;if(p="",this.options.version==="1.0"){if(p=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=b.match(p))throw new Error("Invalid character in string: "+b+" at index "+d.index)}else if(this.options.version==="1.1"&&(p=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=b.match(p)))throw new Error("Invalid character in string: "+b+" at index "+d.index);return b},E.prototype.assertLegalName=function(b){var p;if(this.options.noValidation)return b;if(this.assertLegalChar(b),p=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!b.match(p))throw new Error("Invalid character in name");return b},E.prototype.textEscape=function(b){var p;return this.options.noValidation?b:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,b.replace(p,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},E.prototype.attEscape=function(b){var p;return this.options.noValidation?b:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,b.replace(p,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},E}()}).call(void 0)},{}],280:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),o=S(h);function S(E){return E&&E.__esModule?E:{default:E}}(function(){var E,b,p,d=function(l,i){for(var g in i)a.call(i,g)&&(l[g]=i[g]);function m(){this.constructor=l}return m.prototype=i.prototype,l.prototype=new m,l.__super__=i.prototype,l},a={}.hasOwnProperty;E=u("./NodeType"),b=u("./XMLCharacterData"),G.exports=p=function(s){d(l,s);function l(i,g){if(l.__super__.constructor.call(this,i),g==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=E.Text,this.value=this.stringify.text(g)}return Object.defineProperty(l.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(l.prototype,"wholeText",{get:function(){var g,m,v;for(v="",m=this.previousSibling;m;)v=m.data+v,m=m.previousSibling;for(v+=this.data,g=this.nextSibling;g;)v=v+g.data,g=g.nextSibling;return v}}),l.prototype.clone=function(){return(0,o.default)(this)},l.prototype.toString=function(i){return this.options.writer.text(this,this.options.writer.filterOptions(i))},l.prototype.splitText=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceWholeText=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l}(b)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(u,G,c){"use strict";(function(){var h,o,S,E,b,p,d,a,s,l,i,g,m,v,w,_,k,O={}.hasOwnProperty;k=u("./Utility").assign,h=u("./NodeType"),s=u("./XMLDeclaration"),l=u("./XMLDocType"),S=u("./XMLCData"),E=u("./XMLComment"),g=u("./XMLElement"),v=u("./XMLRaw"),w=u("./XMLText"),m=u("./XMLProcessingInstruction"),i=u("./XMLDummy"),b=u("./XMLDTDAttList"),p=u("./XMLDTDElement"),d=u("./XMLDTDEntity"),a=u("./XMLDTDNotation"),o=u("./WriterState"),G.exports=_=function(){function M(I){var B,N,y;I||(I={}),this.options=I,N=I.writer||{};for(B in N){if(!O.call(N,B))continue;y=N[B],this["_"+B]=this[B],this[B]=y}}return M.prototype.filterOptions=function(I){var B,N,y,Y,X,P,F,K;return I||(I={}),I=k({},this.options,I),B={writer:this},B.pretty=I.pretty||!1,B.allowEmpty=I.allowEmpty||!1,B.indent=(N=I.indent)!=null?N:" ",B.newline=(y=I.newline)!=null?y:`
`,B.offset=(Y=I.offset)!=null?Y:0,B.dontPrettyTextNodes=(X=(P=I.dontPrettyTextNodes)!=null?P:I.dontprettytextnodes)!=null?X:0,B.spaceBeforeSlash=(F=(K=I.spaceBeforeSlash)!=null?K:I.spacebeforeslash)!=null?F:"",B.spaceBeforeSlash===!0&&(B.spaceBeforeSlash=" "),B.suppressPrettyCount=0,B.user={},B.state=o.None,B},M.prototype.indent=function(I,B,N){var y;return!B.pretty||B.suppressPrettyCount?"":B.pretty&&(y=(N||0)+B.offset+1,y>0)?new Array(y).join(B.indent):""},M.prototype.endline=function(I,B,N){return!B.pretty||B.suppressPrettyCount?"":B.newline},M.prototype.attribute=function(I,B,N){var y;return this.openAttribute(I,B,N),y=" "+I.name+'="'+I.value+'"',this.closeAttribute(I,B,N),y},M.prototype.cdata=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<![CDATA[",B.state=o.InsideTag,y+=I.value,B.state=o.CloseTag,y+="]]>"+this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.comment=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<!-- ",B.state=o.InsideTag,y+=I.value,B.state=o.CloseTag,y+=" -->"+this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.declaration=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<?xml",B.state=o.InsideTag,y+=' version="'+I.version+'"',I.encoding!=null&&(y+=' encoding="'+I.encoding+'"'),I.standalone!=null&&(y+=' standalone="'+I.standalone+'"'),B.state=o.CloseTag,y+=B.spaceBeforeSlash+"?>",y+=this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.docType=function(I,B,N){var y,Y,X,P,F;if(N||(N=0),this.openNode(I,B,N),B.state=o.OpenTag,P=this.indent(I,B,N),P+="<!DOCTYPE "+I.root().name,I.pubID&&I.sysID?P+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(P+=' SYSTEM "'+I.sysID+'"'),I.children.length>0){for(P+=" [",P+=this.endline(I,B,N),B.state=o.InsideTag,F=I.children,Y=0,X=F.length;Y<X;Y++)y=F[Y],P+=this.writeChildNode(y,B,N+1);B.state=o.CloseTag,P+="]"}return B.state=o.CloseTag,P+=B.spaceBeforeSlash+">",P+=this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),P},M.prototype.element=function(I,B,N){var y,Y,X,P,F,K,Q,ce,fe,z,se,$,j,U;N||(N=0),z=!1,se="",this.openNode(I,B,N),B.state=o.OpenTag,se+=this.indent(I,B,N)+"<"+I.name,$=I.attribs;for(fe in $){if(!O.call($,fe))continue;y=$[fe],se+=this.attribute(y,B,N)}if(X=I.children.length,P=X===0?null:I.children[0],X===0||I.children.every(function(R){return(R.type===h.Text||R.type===h.Raw)&&R.value===""}))B.allowEmpty?(se+=">",B.state=o.CloseTag,se+="</"+I.name+">"+this.endline(I,B,N)):(B.state=o.CloseTag,se+=B.spaceBeforeSlash+"/>"+this.endline(I,B,N));else if(B.pretty&&X===1&&(P.type===h.Text||P.type===h.Raw)&&P.value!=null)se+=">",B.state=o.InsideTag,B.suppressPrettyCount++,z=!0,se+=this.writeChildNode(P,B,N+1),B.suppressPrettyCount--,z=!1,B.state=o.CloseTag,se+="</"+I.name+">"+this.endline(I,B,N);else{if(B.dontPrettyTextNodes){for(j=I.children,F=0,Q=j.length;F<Q;F++)if(Y=j[F],(Y.type===h.Text||Y.type===h.Raw)&&Y.value!=null){B.suppressPrettyCount++,z=!0;break}}for(se+=">"+this.endline(I,B,N),B.state=o.InsideTag,U=I.children,K=0,ce=U.length;K<ce;K++)Y=U[K],se+=this.writeChildNode(Y,B,N+1);B.state=o.CloseTag,se+=this.indent(I,B,N)+"</"+I.name+">",z&&B.suppressPrettyCount--,se+=this.endline(I,B,N),B.state=o.None}return this.closeNode(I,B,N),se},M.prototype.writeChildNode=function(I,B,N){switch(I.type){case h.CData:return this.cdata(I,B,N);case h.Comment:return this.comment(I,B,N);case h.Element:return this.element(I,B,N);case h.Raw:return this.raw(I,B,N);case h.Text:return this.text(I,B,N);case h.ProcessingInstruction:return this.processingInstruction(I,B,N);case h.Dummy:return"";case h.Declaration:return this.declaration(I,B,N);case h.DocType:return this.docType(I,B,N);case h.AttributeDeclaration:return this.dtdAttList(I,B,N);case h.ElementDeclaration:return this.dtdElement(I,B,N);case h.EntityDeclaration:return this.dtdEntity(I,B,N);case h.NotationDeclaration:return this.dtdNotation(I,B,N);default:throw new Error("Unknown XML node type: "+I.constructor.name)}},M.prototype.processingInstruction=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<?",B.state=o.InsideTag,y+=I.target,I.value&&(y+=" "+I.value),B.state=o.CloseTag,y+=B.spaceBeforeSlash+"?>",y+=this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.raw=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N),B.state=o.InsideTag,y+=I.value,B.state=o.CloseTag,y+=this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.text=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N),B.state=o.InsideTag,y+=I.value,B.state=o.CloseTag,y+=this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.dtdAttList=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<!ATTLIST",B.state=o.InsideTag,y+=" "+I.elementName+" "+I.attributeName+" "+I.attributeType,I.defaultValueType!=="#DEFAULT"&&(y+=" "+I.defaultValueType),I.defaultValue&&(y+=' "'+I.defaultValue+'"'),B.state=o.CloseTag,y+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.dtdElement=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<!ELEMENT",B.state=o.InsideTag,y+=" "+I.name+" "+I.value,B.state=o.CloseTag,y+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.dtdEntity=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<!ENTITY",B.state=o.InsideTag,I.pe&&(y+=" %"),y+=" "+I.name,I.value?y+=' "'+I.value+'"':(I.pubID&&I.sysID?y+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(y+=' SYSTEM "'+I.sysID+'"'),I.nData&&(y+=" NDATA "+I.nData)),B.state=o.CloseTag,y+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.dtdNotation=function(I,B,N){var y;return this.openNode(I,B,N),B.state=o.OpenTag,y=this.indent(I,B,N)+"<!NOTATION",B.state=o.InsideTag,y+=" "+I.name,I.pubID&&I.sysID?y+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.pubID?y+=' PUBLIC "'+I.pubID+'"':I.sysID&&(y+=' SYSTEM "'+I.sysID+'"'),B.state=o.CloseTag,y+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=o.None,this.closeNode(I,B,N),y},M.prototype.openNode=function(I,B,N){},M.prototype.closeNode=function(I,B,N){},M.prototype.openAttribute=function(I,B,N){},M.prototype.closeAttribute=function(I,B,N){},M}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(u,G,c){"use strict";(function(){var h,o,S,E,b,p,d,a,s,l;l=u("./Utility"),a=l.assign,s=l.isFunction,S=u("./XMLDOMImplementation"),E=u("./XMLDocument"),b=u("./XMLDocumentCB"),d=u("./XMLStringWriter"),p=u("./XMLStreamWriter"),h=u("./NodeType"),o=u("./WriterState"),G.exports.create=function(i,g,m,v){var w,_;if(i==null)throw new Error("Root element needs a name.");return v=a({},g,m,v),w=new E(v),_=w.element(i),v.headless||(w.declaration(v),(v.pubID!=null||v.sysID!=null)&&w.dtd(v)),_},G.exports.begin=function(i,g,m){var v;return s(i)&&(v=[i,g],g=v[0],m=v[1],i={}),g?new b(i,g,m):new E(i)},G.exports.stringWriter=function(i){return new d(i)},G.exports.streamWriter=function(i,g){return new p(i,g)},G.exports.implementation=new S,G.exports.nodeType=h,G.exports.writerState=o}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(u,G,c){G.exports=o;var h=Object.prototype.hasOwnProperty;function o(){for(var S={},E=0;E<arguments.length;E++){var b=arguments[E];for(var p in b)h.call(b,p)&&(S[p]=b[p])}return S}},{}],284:[function(u,G,c){"use strict";var h=u("buffer").Buffer,o=u("./sha"),S=u("./md5"),E={sha1:o,md5:S},b=64,p=h.alloc(b);p.fill(0);function d(l,i,g){h.isBuffer(i)||(i=h.from(i)),h.isBuffer(g)||(g=h.from(g)),i.length>b?i=l(i):i.length<b&&(i=h.concat([i,p],b));for(var m=h.alloc(b),v=h.alloc(b),w=0;w<b;w++)m[w]=i[w]^54,v[w]=i[w]^92;var _=l(h.concat([m,g]));return l(h.concat([v,_]))}function a(l,i){l=l||"sha1";var g=E[l],m=[],v=0;return g||s("algorithm:",l,"is not yet supported"),{update:function(_){return h.isBuffer(_)||(_=h.from(_)),m.push(_),v+=_.length,this},digest:function(_){var k=h.concat(m),O=i?d(g,i,k):g(k);return m=null,_?O.toString(_):O}}}function s(){var l=[].slice.call(arguments).join(" ");throw new Error([l,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}c.createHash=function(l){return a(l)},c.createHmac=function(l,i){return a(l,i)},c.createCredentials=function(){s("sorry,createCredentials is not implemented yet")},c.createCipher=function(){s("sorry,createCipher is not implemented yet")},c.createCipheriv=function(){s("sorry,createCipheriv is not implemented yet")},c.createDecipher=function(){s("sorry,createDecipher is not implemented yet")},c.createDecipheriv=function(){s("sorry,createDecipheriv is not implemented yet")},c.createSign=function(){s("sorry,createSign is not implemented yet")},c.createVerify=function(){s("sorry,createVerify is not implemented yet")},c.createDiffieHellman=function(){s("sorry,createDiffieHellman is not implemented yet")},c.pbkdf2=function(){s("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(u,G,c){"use strict";var h=u("buffer").Buffer,o=4,S=h.alloc(o);S.fill(0);var E=8;function b(a,s){if(a.length%o!==0){var l=a.length+(o-a.length%o);a=h.concat([a,S],l)}for(var i=[],g=s?a.readInt32BE:a.readInt32LE,m=0;m<a.length;m+=o)i.push(g.call(a,m));return i}function p(a,s,l){for(var i=h.alloc(s),g=l?i.writeInt32BE:i.writeInt32LE,m=0;m<a.length;m++)g.call(i,a[m],m*4,!0);return i}function d(a,s,l,i){h.isBuffer(a)||(a=h.from(a));var g=s(b(a,i),a.length*E);return p(g,l,i)}G.exports={hash:d}},{buffer:73}],286:[function(u,G,c){"use strict";var h=u("./helpers");function o(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function S(i,g){i[g>>5]|=128<<g%32,i[(g+64>>>9<<4)+14]=g;for(var m=1732584193,v=-271733879,w=-1732584194,_=271733878,k=0;k<i.length;k+=16){var O=m,M=v,I=w,B=_;m=b(m,v,w,_,i[k+0],7,-680876936),_=b(_,m,v,w,i[k+1],12,-389564586),w=b(w,_,m,v,i[k+2],17,606105819),v=b(v,w,_,m,i[k+3],22,-1044525330),m=b(m,v,w,_,i[k+4],7,-176418897),_=b(_,m,v,w,i[k+5],12,1200080426),w=b(w,_,m,v,i[k+6],17,-1473231341),v=b(v,w,_,m,i[k+7],22,-45705983),m=b(m,v,w,_,i[k+8],7,1770035416),_=b(_,m,v,w,i[k+9],12,-1958414417),w=b(w,_,m,v,i[k+10],17,-42063),v=b(v,w,_,m,i[k+11],22,-1990404162),m=b(m,v,w,_,i[k+12],7,1804603682),_=b(_,m,v,w,i[k+13],12,-40341101),w=b(w,_,m,v,i[k+14],17,-1502002290),v=b(v,w,_,m,i[k+15],22,1236535329),m=p(m,v,w,_,i[k+1],5,-165796510),_=p(_,m,v,w,i[k+6],9,-1069501632),w=p(w,_,m,v,i[k+11],14,643717713),v=p(v,w,_,m,i[k+0],20,-373897302),m=p(m,v,w,_,i[k+5],5,-701558691),_=p(_,m,v,w,i[k+10],9,38016083),w=p(w,_,m,v,i[k+15],14,-660478335),v=p(v,w,_,m,i[k+4],20,-405537848),m=p(m,v,w,_,i[k+9],5,568446438),_=p(_,m,v,w,i[k+14],9,-1019803690),w=p(w,_,m,v,i[k+3],14,-187363961),v=p(v,w,_,m,i[k+8],20,1163531501),m=p(m,v,w,_,i[k+13],5,-1444681467),_=p(_,m,v,w,i[k+2],9,-51403784),w=p(w,_,m,v,i[k+7],14,1735328473),v=p(v,w,_,m,i[k+12],20,-1926607734),m=d(m,v,w,_,i[k+5],4,-378558),_=d(_,m,v,w,i[k+8],11,-2022574463),w=d(w,_,m,v,i[k+11],16,1839030562),v=d(v,w,_,m,i[k+14],23,-35309556),m=d(m,v,w,_,i[k+1],4,-1530992060),_=d(_,m,v,w,i[k+4],11,1272893353),w=d(w,_,m,v,i[k+7],16,-155497632),v=d(v,w,_,m,i[k+10],23,-1094730640),m=d(m,v,w,_,i[k+13],4,681279174),_=d(_,m,v,w,i[k+0],11,-358537222),w=d(w,_,m,v,i[k+3],16,-722521979),v=d(v,w,_,m,i[k+6],23,76029189),m=d(m,v,w,_,i[k+9],4,-640364487),_=d(_,m,v,w,i[k+12],11,-421815835),w=d(w,_,m,v,i[k+15],16,530742520),v=d(v,w,_,m,i[k+2],23,-995338651),m=a(m,v,w,_,i[k+0],6,-198630844),_=a(_,m,v,w,i[k+7],10,1126891415),w=a(w,_,m,v,i[k+14],15,-1416354905),v=a(v,w,_,m,i[k+5],21,-57434055),m=a(m,v,w,_,i[k+12],6,1700485571),_=a(_,m,v,w,i[k+3],10,-1894986606),w=a(w,_,m,v,i[k+10],15,-1051523),v=a(v,w,_,m,i[k+1],21,-2054922799),m=a(m,v,w,_,i[k+8],6,1873313359),_=a(_,m,v,w,i[k+15],10,-30611744),w=a(w,_,m,v,i[k+6],15,-1560198380),v=a(v,w,_,m,i[k+13],21,1309151649),m=a(m,v,w,_,i[k+4],6,-145523070),_=a(_,m,v,w,i[k+11],10,-1120210379),w=a(w,_,m,v,i[k+2],15,718787259),v=a(v,w,_,m,i[k+9],21,-343485551),m=s(m,O),v=s(v,M),w=s(w,I),_=s(_,B)}return Array(m,v,w,_)}function E(i,g,m,v,w,_){return s(l(s(s(g,i),s(v,_)),w),m)}function b(i,g,m,v,w,_,k){return E(g&m|~g&v,i,g,w,_,k)}function p(i,g,m,v,w,_,k){return E(g&v|m&~v,i,g,w,_,k)}function d(i,g,m,v,w,_,k){return E(g^m^v,i,g,w,_,k)}function a(i,g,m,v,w,_,k){return E(m^(g|~v),i,g,w,_,k)}function s(i,g){var m=(i&65535)+(g&65535),v=(i>>16)+(g>>16)+(m>>16);return v<<16|m&65535}function l(i,g){return i<<g|i>>>32-g}G.exports=function(g){return h.hash(g,S,16)}},{"./helpers":285}],287:[function(u,G,c){"use strict";var h=u("./helpers");function o(d,a){d[a>>5]|=128<<24-a%32,d[(a+64>>9<<4)+15]=a;for(var s=Array(80),l=1732584193,i=-271733879,g=-1732584194,m=271733878,v=-1009589776,w=0;w<d.length;w+=16){for(var _=l,k=i,O=g,M=m,I=v,B=0;B<80;B++){B<16?s[B]=d[w+B]:s[B]=p(s[B-3]^s[B-8]^s[B-14]^s[B-16],1);var N=b(b(p(l,5),S(B,i,g,m)),b(b(v,s[B]),E(B)));v=m,m=g,g=p(i,30),i=l,l=N}l=b(l,_),i=b(i,k),g=b(g,O),m=b(m,M),v=b(v,I)}return Array(l,i,g,m,v)}function S(d,a,s,l){return d<20?a&s|~a&l:d<40?a^s^l:d<60?a&s|a&l|s&l:a^s^l}function E(d){return d<20?1518500249:d<40?1859775393:d<60?-1894007588:-899497514}function b(d,a){var s=(d&65535)+(a&65535),l=(d>>16)+(a>>16)+(s>>16);return l<<16|s&65535}function p(d,a){return d<<a|d>>>32-a}G.exports=function(a){return h.hash(a,o,20,!0)}},{"./helpers":285}],288:[function(u,G,c){"use strict";G.exports=function(){return function(){}}},{}],289:[function(u,G,c){(function(h){"use strict";var o=u("babel-runtime/helpers/typeof"),S=E(o);function E(l){return l&&l.__esModule?l:{default:l}}var b=u("stream"),p=b.Stream,d=u("../lib/common/utils/isArray"),a=d.isArray;G.exports.string=function(i){return typeof i=="string"},G.exports.array=a,G.exports.buffer=h.isBuffer;function s(l){return l instanceof p}G.exports.writableStream=function(i){return s(i)&&typeof i._write=="function"&&(0,S.default)(i._writableState)==="object"}}).call(this,{isBuffer:u("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(u,G,c){"use strict";c.encodeURIComponent=function(h){try{return encodeURIComponent(h)}catch(o){return h}},c.escape=u("escape-html"),c.timestamp=function(o){if(o){var S=o;return typeof S=="string"&&(S=Number(S)),String(o).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(u,G,c){(function(h,o){"use strict";var S=u("babel-runtime/core-js/json/stringify"),E=d(S),b=u("babel-runtime/helpers/typeof"),p=d(b);function d(B){return B&&B.__esModule?B:{default:B}}var a=u("util"),s=u("url"),l=u("http"),i=u("https"),g=u("debug")("urllib"),m=u("humanize-ms"),v,w=0,_=Math.pow(2,31)-10,k=/^https?:\/\//i;function O(B,N){return B===void 0?N:B}function M(B,N){return function(y,Y,X){if(y)return N(y);B({data:Y,status:X.statusCode,headers:X.headers,res:X})}}c.TIMEOUTS=[m("300s"),m("300s")];var I=["json","text"];c.request=function(N,y,Y){return arguments.length===2&&typeof y=="function"&&(Y=y,y=null),typeof Y=="function"?c.requestWithCallback(N,y,Y):(v||(v=u("any-promise")),new v(function(X,P){c.requestWithCallback(N,y,M(X,P))}))},c.requestWithCallback=function(N,y,Y){if(!N||typeof N!="string"&&(typeof N=="undefined"?"undefined":(0,p.default)(N))!=="object"){var X=a.format("expect request url to be a string or a http request options, but got %j",N);throw new Error(X)}arguments.length===2&&typeof y=="function"&&(Y=y,y=null),y=y||{},w>=_&&(w=0);var P=++w;y.requestUrls=y.requestUrls||[];var F={requestId:P,url:N,args:y,ctx:y.ctx};y.emitter&&y.emitter.emit("request",F),y.timeout=y.timeout||c.TIMEOUTS,y.maxRedirects=y.maxRedirects||10,y.streaming=y.streaming||y.customResponse;var K=Date.now(),Q;typeof N=="string"?(k.test(N)||(N="http://"+N),Q=s.parse(N)):Q=N;var ce=(y.type||y.method||Q.method||"GET").toUpperCase(),fe=Q.port||80,z=l,se=O(y.agent,c.agent),$=y.fixJSONCtlChars;Q.protocol==="https:"&&(z=i,se=O(y.httpsAgent,c.httpsAgent),Q.port||(fe=443));var j={host:Q.hostname||Q.host||"localhost",path:Q.path||"/",method:ce,port:fe,agent:se,headers:y.headers||{},lookup:y.lookup};Array.isArray(y.timeout)?j.requestTimeout=y.timeout[y.timeout.length-1]:typeof y.timeout!="undefined"&&(j.requestTimeout=y.timeout);for(var U=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],R=0;R<U.length;R++){var C=U[R];y.hasOwnProperty(C)&&(j[C]=y[C])}j.rejectUnauthorized===!1&&!j.hasOwnProperty("secureOptions")&&(j.secureOptions=u("constants").SSL_OP_NO_TLSv1_2);var D=y.auth||Q.auth;D&&(j.auth=D);var le=y.content||y.data,he=ce==="GET"||ce==="HEAD"||y.dataAsQueryString;if(!y.content&&(le&&!(typeof le=="string"||o.isBuffer(le))))if(he)le=y.nestedQuerystring?qs.stringify(le):querystring.stringify(le);else{var ve=j.headers["Content-Type"]||j.headers["content-type"];ve||(y.contentType==="json"?ve="application/json":ve="application/x-www-form-urlencoded",j.headers["Content-Type"]=ve),parseContentType(ve).type==="application/json"?le=(0,E.default)(le):le=y.nestedQuerystring?qs.stringify(le):querystring.stringify(le)}he&&le&&(j.path+=(Q.query?"&":"?")+le,le=null);var Ee=0;if(le){var Se=le.length;o.isBuffer(le)||(Se=o.byteLength(le)),Ee=j.headers["Content-Length"]=Se}y.dataType==="json"&&(j.headers.Accept="application/json"),typeof y.beforeRequest=="function"&&y.beforeRequest(j);var ae=null,pe=null,me=null,ee=!1,re=!1,Z=0,ue=-1,V=!1,J="",Ce="",q=null;y.timing&&(q={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function H(){ae&&(clearTimeout(ae),ae=null)}function T(){pe&&(clearTimeout(pe),pe=null)}function W(Ne,nt,ot){if(T(),!Y){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),P,h.pid,j.method,N),Ne&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),P,h.pid,Ne.name,Ne.message,Ne.stack);return}var Ve=Y;Y=null;var $e={};if(ot&&(ue=ot.statusCode,$e=ot.headers),ue===401&&$e["www-authenticate"]&&(!y.headers||!y.headers.Authorization)&&y.digestAuth){var Ie=$e["www-authenticate"];if(Ie.indexOf("Digest ")>=0)return g("Request#%d %s: got digest auth header WWW-Authenticate: %s",P,N,Ie),y.headers=y.headers||{},y.headers.Authorization=digestAuthHeader(j.method,j.path,Ie,y.digestAuth),g("Request#%d %s: auth with digest header: %s",P,N,y.headers.Authorization),ot.headers["set-cookie"]&&(y.headers.Cookie=ot.headers["set-cookie"].join(";")),c.requestWithCallback(N,y,Ve)}var De=Date.now()-K;q&&(q.contentDownload=De),g("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",De,Z,ue,j.method,j.host,j.path,re,q);var Le={status:ue,statusCode:ue,headers:$e,size:Z,aborted:V,rt:De,keepAliveSocket:re,data:nt,requestUrls:y.requestUrls,timing:q,remoteAddress:J,remotePort:Ce};if(Ne){var _e="";se&&typeof se.getCurrentStatus=="function"&&(_e=", agent status: "+(0,E.default)(se.getCurrentStatus())),Ne.message+=", "+j.method+" "+N+" "+ue+" (connected: "+ee+", keepalive socket: "+re+_e+`)
headers: `+(0,E.default)($e),Ne.data=nt,Ne.path=j.path,Ne.status=ue,Ne.headers=$e,Ne.res=Le}Ve(Ne,nt,y.streaming?ot:Le),y.emitter&&(F.url=N,F.socket=Xe&&Xe.connection,F.options=j,F.size=Ee,y.emitter.emit("response",{requestId:P,error:Ne,ctx:y.ctx,req:F,res:Le}))}function we(Ne){var nt=null;if(y.followRedirect&&statuses.redirect[Ne.statusCode]){y._followRedirectCount=(y._followRedirectCount||0)+1;var ot=Ne.headers.location;if(!ot)nt=new Error("Got statusCode "+Ne.statusCode+" but cannot resolve next location from headers"),nt.name="FollowRedirectError";else if(y._followRedirectCount>y.maxRedirects)nt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+N),nt.name="MaxRedirectError";else{var Ve=y.formatRedirectUrl?y.formatRedirectUrl(N,ot):s.resolve(N,ot);g("Request#%d %s: `redirected` from %s to %s",P,j.path,N,Ve),T(),y.headers&&y.headers.Host&&k.test(ot)&&(y.headers.Host=null);var $e=Y;return Y=null,c.requestWithCallback(Ve,y,$e),{redirect:!0,error:null}}}return{redirect:!1,error:nt}}!j.headers["User-Agent"]&&!j.headers["user-agent"]&&(j.headers["User-Agent"]=navigator.userAgent),y.gzip&&(!j.headers["Accept-Encoding"]&&!j.headers["accept-encoding"]&&(j.headers["Accept-Encoding"]="gzip"));function ye(Ne,nt,ot){var Ve=Ne.headers["content-encoding"];return ot(null,nt,Ve)}var Oe=y.writeStream;g("Request#%d %s %s with headers %j, options.path: %s",P,ce,N,j.headers,j.path),y.requestUrls.push(N);function Be(Ne){if(q&&(q.waiting=Date.now()-K),g("Request#%d %s `req response` event emit: status %d, headers: %j",P,N,Ne.statusCode,Ne.headers),y.streaming){var nt=we(Ne);if(nt.redirect){Ne.resume();return}return nt.error?(Ne.resume(),W(nt.error,null,Ne)):W(null,null,Ne)}if(Ne.on("close",function(){g("Request#%d %s: `res close` event emit, total size %d",P,N,Z)}),Ne.on("error",function(){g("Request#%d %s: `res error` event emit, total size %d",P,N,Z)}),Ne.on("aborted",function(){V=!0,g("Request#%d %s: `res aborted` event emit, total size %d",P,N,Z)}),Oe){var nt=we(Ne);if(nt.redirect){Ne.resume();return}return nt.error?(Ne.resume(),Oe.end(),W(nt.error,null,Ne)):(y.consumeWriteStream===!1?Ne.on("end",W.bind(null,null,null,Ne)):isNode010||isNode012?first([[Oe,"close"],[Ne,"aborted"]],function($e,Ie,De){g("Request#%d %s: writeStream or res %s event emitted",P,N,De),W(me||null,null,Ne)}):Oe.on("close",function(){g("Request#%d %s: writeStream close event emitted",P,N),W(me||null,null,Ne)}),Ne.pipe(Oe))}var ot=[];Ne.on("data",function(Ve){g("Request#%d %s: `res data` event emit, size %d",P,N,Ve.length),Z+=Ve.length,ot.push(Ve)}),Ne.on("end",function(){var Ve=o.concat(ot,Z);if(g("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",P,N,Z,Ne._dumped),me)return W(me,Ve,Ne);var $e=we(Ne);if($e.error)return W($e.error,Ve,Ne);if($e.redirect)return;ye(Ne,Ve,function(Ie,De,Le){if(Ie)return W(Ie,Ve,Ne);if(!Le&&I.indexOf(y.dataType)>=0){try{De=decodeBodyByCharset(De,Ne)}catch(Te){return g("decodeBodyByCharset error: %s",Te),W(null,De,Ne)}if(y.dataType==="json")if(Z===0)De=null;else{var _e=parseJSON(De,$);_e.error?Ie=_e.error:De=_e.data}}V&&g("Request#%d %s: Remote socket was terminated before `response.end()` was called",P,N),W(Ie,De,Ne)})})}var Fe,Ue;Array.isArray(y.timeout)?(Fe=m(y.timeout[0]),Ue=m(y.timeout[1])):Fe=Ue=m(y.timeout),g("ConnectTimeout: %d, ResponseTimeout: %d",Fe,Ue);function Ge(){g("Connect timer ticking, timeout: %d",Fe),ae=setTimeout(function(){ae=null,ue===-1&&(ue=-2);var Ne="Connect timeout for "+Fe+"ms",nt="ConnectionTimeoutError";Xe.socket||(nt="SocketAssignTimeoutError",Ne+=", working sockets is full"),me=new Error(Ne),me.name=nt,me.requestId=P,g("ConnectTimeout: Request#%d %s %s: %s, connected: %s",P,N,me.name,Ne,ee),Je()},Fe)}function Ye(){g("Response timer ticking, timeout: %d",Ue),pe=setTimeout(function(){pe=null;var Ne="Response timeout for "+Ue+"ms",nt="ResponseTimeoutError";me=new Error(Ne),me.name=nt,me.requestId=P,g("ResponseTimeout: Request#%d %s %s: %s, connected: %s",P,N,me.name,Ne,ee),Je()},Ue)}var Xe;j.mode=y.mode?y.mode:"";try{Xe=z.request(j,Be)}catch(Ne){return W(Ne)}typeof window=="undefined"?Ge():Xe.on("requestTimeout",function(){ue===-1&&(ue=-2);var Ne="Connect timeout for "+Fe+"ms",nt="ConnectionTimeoutError";me=new Error(Ne),me.name=nt,me.requestId=P,Je()});function Je(){g("Request#%d %s abort, connected: %s",P,N,ee),Xe.socket||(me.noSocket=!0,W(me)),Xe.abort()}return q&&Xe.on("finish",function(){q.requestSent=Date.now()-K}),Xe.once("socket",function(Ne){q&&(q.queuing=Date.now()-K),isNode010&&Ne.socket&&(Ne=Ne.socket);var nt=Ne.readyState;if(nt==="opening"){Ne.once("lookup",function(ot,Ve,$e){g("Request#%d %s lookup: %s, %s, %s",P,N,ot,Ve,$e),q&&(q.dnslookup=Date.now()-K),Ve&&(J=Ve)}),Ne.once("connect",function(){q&&(q.connected=Date.now()-K),H(),Ye(),g("Request#%d %s new socket connected",P,N),ee=!0,J||(J=Ne.remoteAddress),Ce=Ne.remotePort});return}g("Request#%d %s reuse socket connected, readyState: %s",P,N,nt),ee=!0,re=!0,J||(J=Ne.remoteAddress),Ce=Ne.remotePort,H(),Ye()}),Xe.on("error",function(Ne){(Ne.name==="Error"||Ne.name==="TypeError")&&(Ne.name=ee?"ResponseError":"RequestError"),Ne.message+=' (req "error")',g("Request#%d %s `req error` event emit, %s: %s",P,N,Ne.name,Ne.message),W(me||Ne)}),Oe&&Oe.once("error",function(Ne){Ne.message+=' (writeStream "error")',me=Ne,g("Request#%d %s `writeStream error` event emit, %s: %s",P,N,Ne.name,Ne.message),Je()}),y.stream?(y.stream.pipe(Xe),y.stream.once("error",function(Ne){Ne.message+=' (stream "error")',me=Ne,g("Request#%d %s `readStream error` event emit, %s: %s",P,N,Ne.name,Ne.message),Je()})):Xe.end(le),Xe.requestId=P,Xe}}).call(this,u("_process"),u("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},nVVt:function(u,G){u.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nj2k:function(u,G,c){u.exports=c.p+"static/nodata.c3b0b86c.svg"},oRuE:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.Iso10126={pad:function(o,S){var E=S*4,b=E-o.sigBytes%E;o.concat(h.lib.WordArray.random(b-1)).concat(h.lib.WordArray.create([b<<24],1))},unpad:function(o){var S=o.words[o.sigBytes-1>>>2]&255;o.sigBytes-=S}},h.pad.Iso10126})},osHv:function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";var o=h.Pos;function S(k,O){return k.line-O.line||k.ch-O.ch}var E="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",b=E+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",p=new RegExp("<(/?)(["+E+"]["+b+"]*)","g");function d(k,O,M,I){this.line=O,this.ch=M,this.cm=k,this.text=k.getLine(O),this.min=I?Math.max(I.from,k.firstLine()):k.firstLine(),this.max=I?Math.min(I.to-1,k.lastLine()):k.lastLine()}function a(k,O){var M=k.cm.getTokenTypeAt(o(k.line,O));return M&&/\btag\b/.test(M)}function s(k){return k.line>=k.max?void 0:(k.ch=0,k.text=k.cm.getLine(++k.line),!0)}function l(k){return k.line<=k.min?void 0:(k.text=k.cm.getLine(--k.line),k.ch=k.text.length,!0)}function i(k){for(;;){var O=k.text.indexOf(">",k.ch);if(O==-1){if(s(k))continue;return}if(!a(k,O+1)){k.ch=O+1;continue}var M=k.text.lastIndexOf("/",O),I=M>-1&&!/\S/.test(k.text.slice(M+1,O));return k.ch=O+1,I?"selfClose":"regular"}}function g(k){for(;;){var O=k.ch?k.text.lastIndexOf("<",k.ch-1):-1;if(O==-1){if(l(k))continue;return}if(!a(k,O+1)){k.ch=O;continue}p.lastIndex=O,k.ch=O;var M=p.exec(k.text);if(M&&M.index==O)return M}}function m(k){for(;;){p.lastIndex=k.ch;var O=p.exec(k.text);if(!O){if(s(k))continue;return}if(!a(k,O.index+1)){k.ch=O.index+1;continue}return k.ch=O.index+O[0].length,O}}function v(k){for(;;){var O=k.ch?k.text.lastIndexOf(">",k.ch-1):-1;if(O==-1){if(l(k))continue;return}if(!a(k,O+1)){k.ch=O;continue}var M=k.text.lastIndexOf("/",O),I=M>-1&&!/\S/.test(k.text.slice(M+1,O));return k.ch=O+1,I?"selfClose":"regular"}}function w(k,O){for(var M=[];;){var I=m(k),B,N=k.line,y=k.ch-(I?I[0].length:0);if(!I||!(B=i(k)))return;if(B=="selfClose")continue;if(I[1]){for(var Y=M.length-1;Y>=0;--Y)if(M[Y]==I[2]){M.length=Y;break}if(Y<0&&(!O||O==I[2]))return{tag:I[2],from:o(N,y),to:o(k.line,k.ch)}}else M.push(I[2])}}function _(k,O){for(var M=[];;){var I=v(k);if(!I)return;if(I=="selfClose"){g(k);continue}var B=k.line,N=k.ch,y=g(k);if(!y)return;if(y[1])M.push(y[2]);else{for(var Y=M.length-1;Y>=0;--Y)if(M[Y]==y[2]){M.length=Y;break}if(Y<0&&(!O||O==y[2]))return{tag:y[2],from:o(k.line,k.ch),to:o(B,N)}}}}h.registerHelper("fold","xml",function(k,O){for(var M=new d(k,O.line,0);;){var I=m(M);if(!I||M.line!=O.line)return;var B=i(M);if(!B)return;if(!I[1]&&B!="selfClose"){var N=o(M.line,M.ch),y=w(M,I[2]);return y&&S(y.from,N)>0?{from:N,to:y.from}:null}}}),h.findMatchingTag=function(k,O,M){var I=new d(k,O.line,O.ch,M);if(I.text.indexOf(">")==-1&&I.text.indexOf("<")==-1)return;var B=i(I),N=B&&o(I.line,I.ch),y=B&&g(I);if(!B||!y||S(I,O)>0)return;var Y={from:o(I.line,I.ch),to:N,tag:y[2]};return B=="selfClose"?{open:Y,close:null,at:"open"}:y[1]?{open:_(I,y[2]),close:Y,at:"close"}:(I=new d(k,N.line,N.ch,M),{open:Y,close:w(I,y[2]),at:"open"})},h.findEnclosingTag=function(k,O,M,I){for(var B=new d(k,O.line,O.ch,M);;){var N=_(B,I);if(!N)break;var y=new d(k,O.line,O.ch,M),Y=w(y,N.tag);if(Y)return{open:N,close:Y}}},h.scanForClosingTag=function(k,O,M,I){var B=new d(k,O.line,O.ch,I?{from:0,to:I}:null);return w(B,M)}})},p5ED:function(u,G,c){"use strict";var h=c("+L6B"),o=c("2/Rp"),S=c("5Dmo"),E=c("3S7+"),b=c("k1fw"),p=c("9og8"),d=c("tJVT"),a=c("WmNS"),s=c.n(a),l=c("q1tI"),i=c.n(l),g=c("vHTk"),m=c.n(g),v=c("yEEn"),w=c("ZW9T"),_=c("1vsH"),k=c("V0Rq"),O=c("m3rI"),M=function(B){var N=B.name,y=B.data,Y=B.theme,X=B.type,P=B.filename,F=B.monacoEditor,K=B.className,Q=B.style,ce=B.close,fe=B.onClose,z=B.hasMask,se=B.otherData,$=se===void 0?{}:se,j=Object(l.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),U=Object(d.a)(j,2),R=U[0],C=U[1],D=Object(l.useState)(""),le=Object(d.a)(D,2),he=le[0],ve=le[1],Ee=Object(l.useState)(),Se=Object(d.a)(Ee,2),ae=Se[0],pe=Se[1],me,ee=1024*1024,re=10*ee,Z=Object(l.useRef)();X==="office"&&(X="other",me=Object(_.R)(y).filesize,me>re&&(X="other")),P&&(F.filename=P),Object(l.useEffect)(function(){var Ce,q,H=(Ce=document.cookie)===null||Ce===void 0||((q=Ce.replace(/\s/g,""))===null||q===void 0)?void 0:q.split(";");H==null||H.map(function(T){var W=T.split("=");W[0]==="_educoder_session"&&ve(W[1])})},[]),Object(l.useEffect)(function(){X==="office"&&ue()},[X]);var ue=function(){var Ce=Object(p.a)(s.a.mark(function q(){var H,T,W;return s.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return console.log("data:",y),H=y,y.startsWith("http")||(H=location.origin+H),T=new URL(H).pathname.split("/").pop(),ye.next=6,Object(k.U)({attachment_id:T});case 6:W=ye.sent,pe(W);case 8:case"end":return ye.stop()}},q)}));return function(){return Ce.apply(this,arguments)}}(),V=function(){if(y.startsWith("http")||y.startsWith("blob:")){J();return}Object(_.x)(P||"educoder",y,P)},J=function(){Object(_.v)(P||"educoder",decodeURIComponent(y))};return i.a.createElement("div",{style:Object(b.a)({},Q||{}),className:"".concat(z&&m.a.bgBlack," ").concat(X?m.a.wrp:"hide")},ce&&i.a.createElement("div",{className:m.a.close,ref:Z},i.a.createElement(E.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Z.current}},i.a.createElement("span",{onClick:J},i.a.createElement("i",{className:"icon-quxiaozhiding"}))),i.a.createElement(E.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Z.current}},i.a.createElement("span",{className:"",onClick:function(){fe(),pe(null)}},i.a.createElement("i",{className:"icon-guanbi1"})))),i.a.createElement("div",{className:"".concat(m.a[K]," ").concat(K," ").concat(m.a.monaco," ").concat(X==="txt"?"show":"hide")},X==="txt"&&i.a.createElement(w.b,F)),X==="audio"&&i.a.createElement("audio",{src:"".concat((y==null?void 0:y.indexOf("http://"))>-1||(y==null?void 0:y.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(y),autoPlay:!0}),X==="video"&&i.a.createElement(i.a.Fragment,null,(y==null?void 0:y.indexOf("http"))>-1?i.a.createElement("video",{controls:!0,src:"".concat(y),autoPlay:!0}):i.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(y),autoPlay:!0})),X==="office"&&ae&&i.a.createElement("iframe",{src:"/react/build/office.html?key=".concat(ae.key,"&url=").concat(O.a.API_SERVER+ae.url,"&callbackUrl=").concat(O.a.API_SERVER+ae.callbackUrl,"&fileType=").concat(ae.fileType,"&title=").concat(ae.title,"&model=view")}),(X==="xlsx"||X==="doc"||X==="pptx"||X==="docx")&&i.a.createElement("iframe",{src:"/react/build/office.html?key=".concat($.key,"&url=").concat(O.a.API_SERVER+$.url,"&callbackUrl=").concat(O.a.API_SERVER+$.callbackUrl,"&fileType=").concat($.fileType,"&title=").concat($.title,"&model=").concat($.model)}),X==="html"&&i.a.createElement("iframe",{src:y+"&disposition=inline"}),X==="pdf"&&i.a.createElement("embed",{className:m.a.embed,src:y,type:"application/pdf"}),X==="image"&&i.a.createElement("img",{src:"".concat((y==null?void 0:y.indexOf("http://"))>-1||(y==null?void 0:y.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(y)}),X==="other"&&i.a.createElement("div",null,i.a.createElement(o.a,{type:"primary",size:"large",onClick:V},i.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),X==="download"&&i.a.createElement(o.a,{type:"primary",size:"large",onClick:V},i.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};G.a=M},"p77/":function(u,G,c){},pA7S:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.WordArray,b=S.BlockCipher,p=o.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],s=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],i=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=p.DES=b.extend({_doReset:function(){for(var _=this._key,k=_.words,O=[],M=0;M<56;M++){var I=d[M]-1;O[M]=k[I>>>5]>>>31-I%32&1}for(var B=this._subKeys=[],N=0;N<16;N++){for(var y=B[N]=[],Y=s[N],M=0;M<24;M++)y[M/6|0]|=O[(a[M]-1+Y)%28]<<31-M%6,y[4+(M/6|0)]|=O[28+(a[M+24]-1+Y)%28]<<31-M%6;y[0]=y[0]<<1|y[0]>>>31;for(var M=1;M<7;M++)y[M]=y[M]>>>(M-1)*4+3;y[7]=y[7]<<5|y[7]>>>27}for(var X=this._invSubKeys=[],M=0;M<16;M++)X[M]=B[15-M]},encryptBlock:function(_,k){this._doCryptBlock(_,k,this._subKeys)},decryptBlock:function(_,k){this._doCryptBlock(_,k,this._invSubKeys)},_doCryptBlock:function(_,k,O){this._lBlock=_[k],this._rBlock=_[k+1],m.call(this,4,252645135),m.call(this,16,65535),v.call(this,2,858993459),v.call(this,8,16711935),m.call(this,1,1431655765);for(var M=0;M<16;M++){for(var I=O[M],B=this._lBlock,N=this._rBlock,y=0,Y=0;Y<8;Y++)y|=l[Y][((N^I[Y])&i[Y])>>>0];this._lBlock=N,this._rBlock=B^y}var X=this._lBlock;this._lBlock=this._rBlock,this._rBlock=X,m.call(this,1,1431655765),v.call(this,8,16711935),v.call(this,2,858993459),m.call(this,16,65535),m.call(this,4,252645135),_[k]=this._lBlock,_[k+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function m(_,k){var O=(this._lBlock>>>_^this._rBlock)&k;this._rBlock^=O,this._lBlock^=O<<_}function v(_,k){var O=(this._rBlock>>>_^this._lBlock)&k;this._lBlock^=O,this._rBlock^=O<<_}o.DES=b._createHelper(g);var w=p.TripleDES=b.extend({_doReset:function(){var _=this._key,k=_.words;if(k.length!==2&&k.length!==4&&k.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var O=k.slice(0,2),M=k.length<4?k.slice(0,2):k.slice(2,4),I=k.length<6?k.slice(0,2):k.slice(4,6);this._des1=g.createEncryptor(E.create(O)),this._des2=g.createEncryptor(E.create(M)),this._des3=g.createEncryptor(E.create(I))},encryptBlock:function(_,k){this._des1.encryptBlock(_,k),this._des2.decryptBlock(_,k),this._des3.encryptBlock(_,k)},decryptBlock:function(_,k){this._des3.decryptBlock(_,k),this._des2.encryptBlock(_,k),this._des1.decryptBlock(_,k)},keySize:192/32,ivSize:64/32,blockSize:64/32});o.TripleDES=b._createHelper(w)}(),h.TripleDES})},qBft:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.AnsiX923={pad:function(o,S){var E=o.sigBytes,b=S*4,p=b-E%b,d=E+p-1;o.clamp(),o.words[d>>>2]|=p<<24-d%4*8,o.sigBytes+=p},unpad:function(o){var S=o.words[o.sigBytes-1>>>2]&255;o.sigBytes-=S}},h.pad.Ansix923})},qM6L:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.WordArray,b=o.enc,p=b.Utf16=b.Utf16BE={stringify:function(a){for(var s=a.words,l=a.sigBytes,i=[],g=0;g<l;g+=2){var m=s[g>>>2]>>>16-g%4*8&65535;i.push(String.fromCharCode(m))}return i.join("")},parse:function(a){for(var s=a.length,l=[],i=0;i<s;i++)l[i>>>1]|=a.charCodeAt(i)<<16-i%2*16;return E.create(l,s*2)}};b.Utf16LE={stringify:function(a){for(var s=a.words,l=a.sigBytes,i=[],g=0;g<l;g+=2){var m=d(s[g>>>2]>>>16-g%4*8&65535);i.push(String.fromCharCode(m))}return i.join("")},parse:function(a){for(var s=a.length,l=[],i=0;i<s;i++)l[i>>>1]|=d(a.charCodeAt(i)<<16-i%2*16);return E.create(l,s*2)}};function d(a){return a<<8&4278255360|a>>>8&16711935}}(),h.enc.Utf16})},qu8F:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return h.mode.CTRGladman=function(){var o=h.lib.BlockCipherMode.extend();function S(p){if((p>>24&255)===255){var d=p>>16&255,a=p>>8&255,s=p&255;d===255?(d=0,a===255?(a=0,s===255?s=0:++s):++a):++d,p=0,p+=d<<16,p+=a<<8,p+=s}else p+=1<<24;return p}function E(p){return(p[0]=S(p[0]))===0&&(p[1]=S(p[1])),p}var b=o.Encryptor=o.extend({processBlock:function(p,d){var a=this._cipher,s=a.blockSize,l=this._iv,i=this._counter;l&&(i=this._counter=l.slice(0),this._iv=void 0),E(i);var g=i.slice(0);a.encryptBlock(g,0);for(var m=0;m<s;m++)p[d+m]^=g[m]}});return o.Decryptor=b,o}(),h.mode.CTRGladman})},"rAM+":function(u,G,c){"use strict";c.d(G,"a",function(){return o});var h=c("Qw5x");function o(S,E){var b;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(b=Object(h.a)(S))||E&&S&&typeof S.length=="number"){b&&(S=b);var p=0,d=function(){};return{s:d,n:function(){return p>=S.length?{done:!0}:{done:!1,value:S[p++]}},e:function(g){throw g},f:d}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,l;return{s:function(){b=S[Symbol.iterator]()},n:function(){var g=b.next();return a=g.done,g},e:function(g){s=!0,l=g},f:function(){try{!a&&b.return!=null&&b.return()}finally{if(s)throw l}}}}},rUJ1:function(u,G){const c=/[&<>"']/,h=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,E={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},b=X=>E[X];function p(X,P){if(P){if(c.test(X))return X.replace(h,b)}else if(o.test(X))return X.replace(S,b);return X}const d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(X){return X.replace(d,(P,F)=>(F=F.toLowerCase(),F==="colon"?":":F.charAt(0)==="#"?F.charAt(1)==="x"?String.fromCharCode(parseInt(F.substring(2),16)):String.fromCharCode(+F.substring(1)):""))}const s=/(^|[^\[])\^/g;function l(X,P){X=X.source||X,P=P||"";const F={replace:(K,Q)=>(Q=Q.source||Q,Q=Q.replace(s,"$1"),X=X.replace(K,Q),F),getRegex:()=>new RegExp(X,P)};return F}const i=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(X,P,F){if(X){let K;try{K=decodeURIComponent(a(F)).replace(i,"").toLowerCase()}catch(Q){return null}if(K.indexOf("javascript:")===0||K.indexOf("vbscript:")===0||K.indexOf("data:")===0)return null}P&&!g.test(F)&&(F=O(P,F));try{F=encodeURI(F).replace(/%25/g,"%")}catch(K){return null}return F}const v={},w=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;function O(X,P){v[" "+X]||(w.test(X)?v[" "+X]=X+"/":v[" "+X]=N(X,"/",!0)),X=v[" "+X];const F=X.indexOf(":")===-1;return P.substring(0,2)==="//"?F?P:X.replace(_,"$1")+P:P.charAt(0)==="/"?F?P:X.replace(k,"$1")+P:X+P}const M={exec:function(){}};function I(X){let P=1,F,K;for(;P<arguments.length;P++){F=arguments[P];for(K in F)Object.prototype.hasOwnProperty.call(F,K)&&(X[K]=F[K])}return X}function B(X,P){const F=X.replace(/\|/g,(ce,fe,z)=>{let se=!1,$=fe;for(;--$>=0&&z[$]==="\\";)se=!se;return se?"|":" |"}),K=F.split(/ \|/);let Q=0;if(K.length>P)K.splice(P);else for(;K.length<P;)K.push("");for(;Q<K.length;Q++)K[Q]=K[Q].trim().replace(/\\\|/g,"|");return K}function N(X,P,F){const K=X.length;if(K===0)return"";let Q=0;for(;Q<K;){const ce=X.charAt(K-Q-1);if(ce===P&&!F)Q++;else if(ce!==P&&F)Q++;else break}return X.substr(0,K-Q)}function y(X,P){if(X.indexOf(P[1])===-1)return-1;const F=X.length;let K=0,Q=0;for(;Q<F;Q++)if(X[Q]==="\\")Q++;else if(X[Q]===P[0])K++;else if(X[Q]===P[1]&&(K--,K<0))return Q;return-1}function Y(X){X&&X.sanitize&&!X.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}u.exports={escape:p,unescape:a,edit:l,cleanUrl:m,resolveUrl:O,noopTest:M,merge:I,splitCells:B,rtrim:N,findClosingBracket:y,checkSanitizeDeprecation:Y}},rcnY:function(u,G,c){var h=c("aRTE");function o(S,E){this.totalCount=S,this.dataCount=E}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(S,E){var b=o.getRsBlockTable(S,E);if(b==null)throw new Error("bad rs block @ typeNumber:"+S+"/errorCorrectLevel:"+E);for(var p=b.length/3,d=new Array,a=0;a<p;a++)for(var s=b[a*3+0],l=b[a*3+1],i=b[a*3+2],g=0;g<s;g++)d.push(new o(l,i));return d},o.getRsBlockTable=function(S,E){switch(E){case h.L:return o.RS_BLOCK_TABLE[(S-1)*4+0];case h.M:return o.RS_BLOCK_TABLE[(S-1)*4+1];case h.Q:return o.RS_BLOCK_TABLE[(S-1)*4+2];case h.H:return o.RS_BLOCK_TABLE[(S-1)*4+3];default:return}},u.exports=o},rdUC:function(u,G,c){var h=c("MFOe"),o=h.Global;u.exports={name:"localStorage",read:E,write:b,each:p,remove:d,clearAll:a};function S(){return o.localStorage}function E(s){return S().getItem(s)}function b(s,l){return S().setItem(s,l)}function p(s){for(var l=S().length-1;l>=0;l--){var i=S().key(l);s(E(i),i)}}function d(s){return S().removeItem(s)}function a(){return S().clear()}},sboe:function(u,G,c){"use strict";c.d(G,"a",function(){return S});var h=c("q1tI"),o=c.n(h),S=h.createContext(null)},spXi:function(u,G,c){u.exports={flex_box_center:"flex_box_center___2B_Y7",flex_space_between:"flex_space_between___2olzC",flex_box_vertical_center:"flex_box_vertical_center___2Z4dV",flex_box_center_end:"flex_box_center_end___3FiwX",flex_box_column:"flex_box_column___8kyK-",customTree:"customTree___1KOYx",name:"name___3pqs4"}},u2Z1:function(u,G,c){"use strict";c.d(G,"a",function(){return N});var h=c("miYZ"),o=c("tsqr"),S=c("9og8"),E=c("5NDa"),b=c("5rEg"),p=c("2qtc"),d=c("kLXV"),a=c("oBTY"),s=c("tJVT"),l=c("OaEy"),i=c("2fM7"),g=c("WmNS"),m=c.n(g),v=c("q1tI"),w=c.n(v),_=c("ErOA"),k=c("i58Z"),O=c.n(k),M=c("T1X5"),I=c.n(M),B=i.a.Option,N=function(Y){var X=Y.subId,P=Y.value,F=Y.selectvalues,K=Y.disabled,Q=Y.knowledgeOptions,ce=Q===void 0?[]:Q,fe=Y.onChange,z=fe===void 0?function(){}:fe,se=Y.onAddKnowledgeFinish,$=se===void 0?function(){}:se,j=Object(v.useRef)(),U=Object(v.useState)([]),R=Object(s.a)(U,2),C=R[0],D=R[1];P=P||[];var le=function(Ee,Se){Ee?(D([Se.key]),z([Se.key])):(D([]),z([]))};Object(v.useEffect)(function(){(F==null?void 0:F.length)>0&&(D(Object(a.a)(F)),z(Object(a.a)(F)))},[ce]),Object(v.useEffect)(function(){var ve;((ve=P)===null||ve===void 0?void 0:ve.length)>0&&z(Object(a.a)(P))},[ce]);var he=function(Ee){Ee.preventDefault(),j.current="",d.a.confirm({centered:!0,width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:w.a.createElement("div",{className:"font14"},w.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},w.a.createElement("img",{src:I.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"\u60A8\u586B\u5199\u7684\u77E5\u8BC6\u70B9\u6682\u65F6\u4EC5\u5BF9\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u540E\u5C06\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF1B",w.a.createElement("br",null),"\u5E73\u53F0\u5BA1\u6838\u8FC7\u7A0B\u4E2D\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF08\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u9519\u8BEF\u3001\u975E\u6CD5\u3001\u4E0D\u96C5\u3001\u4E0D\u5339\u914D\u5F53\u524D\u8BFE\u7A0B\u7B49\u60C5\u5F62\uFF09\uFF0C\u5220\u9664\u540E\u53EF\u80FD\u5F71\u54CD\u60A8\u7684\u8BD5\u9898\u7684\u6B63\u5E38\u4F7F\u7528\u3002",w.a.createElement("br",null),"\u8BF7\u8BA4\u771F\u586B\u5199\u4E0E\u6559\u5B66\u5185\u5BB9\u76F8\u5173\u7684\u771F\u5B9E\u77E5\u8BC6\u70B9 ",w.a.createElement("br",null)),w.a.createElement(b.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:j.current,onChange:function(ae){j.current=ae.target.value}})),onOk:function(){return new Promise(function(){var ae=Object(S.a)(m.a.mark(function pe(me,ee){var re,Z;return m.a.wrap(function(V){for(;;)switch(V.prev=V.next){case 0:if(j.current){V.next=3;break}return o.b.warn("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),V.abrupt("return",ee());case 3:if(!(j.current.length>20)){V.next=6;break}return o.b.warn("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),V.abrupt("return",ee());case 6:return V.next=8,Object(_.a)("/api/tag_disciplines.json",{method:"post",body:{name:j.current,sub_discipline_id:X}});case 8:return re=V.sent,(re==null?void 0:re.status)===0&&($({id:re.tag_discipline_id,name:j.current,type:"personal"}),Z=[],Z.push(re.tag_discipline_id),z([].concat(Z)),D([re.tag_discipline_id]),z([].concat(Z))),V.abrupt("return",me());case 11:case"end":return V.stop()}},pe)}));return function(pe,me){return ae.apply(this,arguments)}}())}})};return w.a.createElement("div",{className:O.a.wrap},w.a.createElement(i.a,{disabled:!X||K,className:"mr5",style:{width:"242px"},onChange:le,showSearch:!0,allowClear:!0,value:ce==null?void 0:ce.filter(function(ve){return(C==null?void 0:C.includes(ve==null?void 0:ve.id))||(C==null?void 0:C.includes((ve==null?void 0:ve.id)+""))}).map(function(ve){return ve.name})},ce==null?void 0:ce.map(function(ve){return w.a.createElement(B,{key:ve.id,value:ve.name},w.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},w.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ve.name),w.a.createElement("span",null,ve.type==="personal"?"\uFF08\u81EA\u7528\uFF09":"")))})),w.a.createElement("button",{disabled:!X,className:"".concat(O.a.addKnowledge," ").concat(X?"":O.a.disabled),onClick:he},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))}},uGsb:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("MlIO"),c("1uat"))})(this,function(h){return function(){var o=h,S=o.x64,E=S.Word,b=S.WordArray,p=o.algo,d=p.SHA512,a=p.SHA384=d.extend({_doReset:function(){this._hash=new b.init([new E.init(3418070365,3238371032),new E.init(1654270250,914150663),new E.init(2438529370,812702999),new E.init(355462360,4144912697),new E.init(1731405415,4290775857),new E.init(2394180231,1750603025),new E.init(3675008525,1694076839),new E.init(1203062813,3204075428)])},_doFinalize:function(){var s=d._doFinalize.call(this);return s.sigBytes-=16,s}});o.SHA384=d._createHelper(a),o.HmacSHA384=d._createHmacHelper(a)}(),h.SHA384})},uGxW:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.NoPadding={pad:function(){},unpad:function(){}},h.pad.NoPadding})},uK0f:function(u,G,c){(function(h,o){u.exports=o()})(this,function(){"use strict";function h(o,S,E){E=E||{},E.childrenKeyName=E.childrenKeyName||"children";var b=o||[],p=[],d=0;do{var a=b.filter(function(s){return S(s,d)})[0];if(!a)break;p.push(a),b=a[E.childrenKeyName]||[],d+=1}while(b.length>0);return p}return h})},uMZB:function(u,G,c){u.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(u,G,c){u.exports=h;function h(){return c("gaXo"),{}}},vHTk:function(u,G,c){u.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.StreamCipher,b=o.algo,p=b.RC4=E.extend({_doReset:function(){for(var s=this._key,l=s.words,i=s.sigBytes,g=this._S=[],m=0;m<256;m++)g[m]=m;for(var m=0,v=0;m<256;m++){var w=m%i,_=l[w>>>2]>>>24-w%4*8&255;v=(v+g[m]+_)%256;var k=g[m];g[m]=g[v],g[v]=k}this._i=this._j=0},_doProcessBlock:function(s,l){s[l]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var s=this._S,l=this._i,i=this._j,g=0,m=0;m<4;m++){l=(l+1)%256,i=(i+s[l])%256;var v=s[l];s[l]=s[i],s[i]=v,g|=s[(s[l]+s[i])%256]<<24-m*8}return this._i=l,this._j=i,g}o.RC4=E._createHelper(p);var a=b.RC4Drop=p.extend({cfg:p.cfg.extend({drop:192}),_doReset:function(){p._doReset.call(this);for(var s=this.cfg.drop;s>0;s--)d.call(this)}});o.RC4Drop=E._createHelper(a)}(),h.RC4})},wU8J:function(u,G){function c(){this.buffer=new Array,this.length=0}c.prototype={get:function(h){var o=Math.floor(h/8);return(this.buffer[o]>>>7-h%8&1)==1},put:function(h,o){for(var S=0;S<o;S++)this.putBit((h>>>o-S-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(h){var o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),h&&(this.buffer[o]|=128>>>this.length%8),this.length++}},u.exports=c},wZgz:function(u,G,c){(function(h,o,S){u.exports=G=o(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.BlockCipher,b=o.algo,p=[],d=[],a=[],s=[],l=[],i=[],g=[],m=[],v=[],w=[];(function(){for(var O=[],M=0;M<256;M++)M<128?O[M]=M<<1:O[M]=M<<1^283;for(var I=0,B=0,M=0;M<256;M++){var N=B^B<<1^B<<2^B<<3^B<<4;N=N>>>8^N&255^99,p[I]=N,d[N]=I;var y=O[I],Y=O[y],X=O[Y],P=O[N]*257^N*16843008;a[I]=P<<24|P>>>8,s[I]=P<<16|P>>>16,l[I]=P<<8|P>>>24,i[I]=P;var P=X*16843009^Y*65537^y*257^I*16843008;g[N]=P<<24|P>>>8,m[N]=P<<16|P>>>16,v[N]=P<<8|P>>>24,w[N]=P,I?(I=y^O[O[O[X^y]]],B^=O[O[B]]):I=B=1}})();var _=[0,1,2,4,8,16,32,64,128,27,54],k=b.AES=E.extend({_doReset:function(){var O;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var M=this._keyPriorReset=this._key,I=M.words,B=M.sigBytes/4,N=this._nRounds=B+6,y=(N+1)*4,Y=this._keySchedule=[],X=0;X<y;X++)X<B?Y[X]=I[X]:(O=Y[X-1],X%B?B>6&&X%B==4&&(O=p[O>>>24]<<24|p[O>>>16&255]<<16|p[O>>>8&255]<<8|p[O&255]):(O=O<<8|O>>>24,O=p[O>>>24]<<24|p[O>>>16&255]<<16|p[O>>>8&255]<<8|p[O&255],O^=_[X/B|0]<<24),Y[X]=Y[X-B]^O);for(var P=this._invKeySchedule=[],F=0;F<y;F++){var X=y-F;if(F%4)var O=Y[X];else var O=Y[X-4];F<4||X<=4?P[F]=O:P[F]=g[p[O>>>24]]^m[p[O>>>16&255]]^v[p[O>>>8&255]]^w[p[O&255]]}},encryptBlock:function(O,M){this._doCryptBlock(O,M,this._keySchedule,a,s,l,i,p)},decryptBlock:function(O,M){var I=O[M+1];O[M+1]=O[M+3],O[M+3]=I,this._doCryptBlock(O,M,this._invKeySchedule,g,m,v,w,d);var I=O[M+1];O[M+1]=O[M+3],O[M+3]=I},_doCryptBlock:function(O,M,I,B,N,y,Y,X){for(var P=this._nRounds,F=O[M]^I[0],K=O[M+1]^I[1],Q=O[M+2]^I[2],ce=O[M+3]^I[3],fe=4,z=1;z<P;z++){var se=B[F>>>24]^N[K>>>16&255]^y[Q>>>8&255]^Y[ce&255]^I[fe++],$=B[K>>>24]^N[Q>>>16&255]^y[ce>>>8&255]^Y[F&255]^I[fe++],j=B[Q>>>24]^N[ce>>>16&255]^y[F>>>8&255]^Y[K&255]^I[fe++],U=B[ce>>>24]^N[F>>>16&255]^y[K>>>8&255]^Y[Q&255]^I[fe++];F=se,K=$,Q=j,ce=U}var se=(X[F>>>24]<<24|X[K>>>16&255]<<16|X[Q>>>8&255]<<8|X[ce&255])^I[fe++],$=(X[K>>>24]<<24|X[Q>>>16&255]<<16|X[ce>>>8&255]<<8|X[F&255])^I[fe++],j=(X[Q>>>24]<<24|X[ce>>>16&255]<<16|X[F>>>8&255]<<8|X[K&255])^I[fe++],U=(X[ce>>>24]<<24|X[F>>>16&255]<<16|X[K>>>8&255]<<8|X[Q&255])^I[fe++];O[M]=se,O[M+1]=$,O[M+2]=j,O[M+3]=U},keySize:256/32});o.AES=E._createHelper(k)}(),h.AES})},wbyO:function(u,G,c){(function(h,o){u.exports=G=o(c("Ib8C"))})(this,function(h){return function(){var o=h,S=o.lib,E=S.WordArray,b=o.enc,p=b.Base64url={stringify:function(a,s=!0){var l=a.words,i=a.sigBytes,g=s?this._safe_map:this._map;a.clamp();for(var m=[],v=0;v<i;v+=3)for(var w=l[v>>>2]>>>24-v%4*8&255,_=l[v+1>>>2]>>>24-(v+1)%4*8&255,k=l[v+2>>>2]>>>24-(v+2)%4*8&255,O=w<<16|_<<8|k,M=0;M<4&&v+M*.75<i;M++)m.push(g.charAt(O>>>6*(3-M)&63));var I=g.charAt(64);if(I)for(;m.length%4;)m.push(I);return m.join("")},parse:function(a,s=!0){var l=a.length,i=s?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var m=0;m<i.length;m++)g[i.charCodeAt(m)]=m}var v=i.charAt(64);if(v){var w=a.indexOf(v);w!==-1&&(l=w)}return d(a,l,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function d(a,s,l){for(var i=[],g=0,m=0;m<s;m++)if(m%4){var v=l[a.charCodeAt(m-1)]<<m%4*2,w=l[a.charCodeAt(m)]>>>6-m%4*2,_=v|w;i[g>>>2]|=_<<24-g%4*8,g++}return E.create(i,g)}}(),h.enc.Base64url})},ynwM:function(u,G,c){var h=c("MFOe"),o=h.Global;u.exports={name:"oldFF-globalStorage",read:E,write:b,each:p,remove:d,clearAll:a};var S=o.globalStorage;function E(s){return S[s]}function b(s,l){S[s]=l}function p(s){for(var l=S.length-1;l>=0;l--){var i=S.key(l);s(S[i],i)}}function d(s){return S.removeItem(s)}function a(){p(function(s,l){delete S[s]})}}}]);