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([[189,6,7,16,17,20],{"+NIl":function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";h.defineMode("stex",function(i,S){"use strict";function _(v,w){v.cmdState.push(w)}function y(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,E=w.length-1;E>=0;E--){var k=w[E];if(k.name=="DEFAULT")continue;return k}return{styleIdentifier:function(){return null}}}function o(v,w,E){return function(){this.name=v,this.bracketNo=0,this.style=w,this.styles=E,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=o("importmodule","tag",["string","builtin"]),s.documentclass=o("documentclass","tag",["","atom"]),s.usepackage=o("usepackage","tag",["atom"]),s.begin=o("begin","tag",["atom"]),s.end=o("end","tag",["atom"]),s.label=o("label","tag",["atom"]),s.ref=o("ref","tag",["atom"]),s.eqref=o("eqref","tag",["atom"]),s.cite=o("cite","tag",["atom"]),s.bibitem=o("bibitem","tag",["atom"]),s.Bibitem=o("Bibitem","tag",["atom"]),s.RBibitem=o("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 a(v,w){var E;if(v.match(/^\\[a-zA-Z@]+/)){var k=v.current().slice(1);return E=s.hasOwnProperty(k)?s[k]:s.DEFAULT,E=new E,_(w,E),l(w,m),E.style}if(v.match(/^\\[$&%#{}_]/))return"tag";if(v.match(/^\\[,;!\/\\]/))return"tag";if(v.match("\\["))return l(w,function(D,I){return g(D,I,"\\]")}),"keyword";if(v.match("\\("))return l(w,function(D,I){return g(D,I,"\\)")}),"keyword";if(v.match("$$"))return l(w,function(D,I){return g(D,I,"$$")}),"keyword";if(v.match("$"))return l(w,function(D,I){return g(D,I,"$")}),"keyword";var T=v.next();if(T=="%")return v.skipToEnd(),"comment";if(T=="}"||T=="]"){if(E=y(w),E)E.closeBracket(T),l(w,m);else return"error";return"bracket"}else return T=="{"||T=="["?(E=s.DEFAULT,E=new E,_(w,E),"bracket"):/\d/.test(T)?(v.eatWhile(/[\w.%]/),"atom"):(v.eatWhile(/[\w\-_]/),E=d(w),E.name=="begin"&&(E.argument=v.current()),E.styleIdentifier())}function g(v,w,E){if(v.eatSpace())return null;if(E&&v.match(E))return l(w,a),"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 E=v.peek(),k;return E=="{"||E=="["?(k=y(w),k.openBracket(E),v.eat(E),l(w,a),"bracket"):/[ \t\r]/.test(E)?(v.eat(E),null):(l(w,a),p(w),a(v,w))}return{startState:function(){var v=S.inMathMode?function(w,E){return g(w,E)}:a;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=a,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(o,s,l){var a=l&&l!=h.Init;if(s&&!a)o.on("blur",y),o.on("change",p),o.on("swapDoc",p),h.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){_(o)}),p(o);else if(!s&&a){o.off("blur",y),o.off("change",p),o.off("swapDoc",p),h.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),i(o);var g=o.getWrapperElement();g.className=g.className.replace(" CodeMirror-empty","")}s&&!o.hasFocus()&&y(o)});function i(o){o.state.placeholder&&(o.state.placeholder.parentNode.removeChild(o.state.placeholder),o.state.placeholder=null)}function S(o){i(o);var s=o.state.placeholder=document.createElement("pre");s.style.cssText="height: 0; overflow: visible",s.style.direction=o.getOption("direction"),s.className="CodeMirror-placeholder CodeMirror-line-like";var l=o.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),s.appendChild(l),o.display.lineSpace.insertBefore(s,o.display.lineSpace.firstChild)}function _(o){setTimeout(function(){var s=!1,l=o.getInputField();l.nodeName=="TEXTAREA"?s=!l.value:o.lineCount()==1&&(s=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),s?S(o):i(o)},20)}function y(o){d(o)&&S(o)}function p(o){var s=o.getWrapperElement(),l=d(o);s.className=s.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?S(o):i(o)}function d(o){return o.lineCount()===1&&o.getLine(0)===""}})},"1eCo":function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";var i={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(_,y){var p=_.indentUnit,d={},o=y.htmlMode?i:S;for(var s in o)d[s]=o[s];for(var s in y)d[s]=y[s];var l,a;function g(Q,ce){function fe(J){return ce.tokenize=J,J(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(E(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 E(Q){return function(ce,fe){for(var z;(z=ce.next())!=null;){if(z=="<")return fe.tokenize=E(Q+1),fe.tokenize(ce,fe);if(z==">")if(Q==1){fe.tokenize=g;break}else return fe.tokenize=E(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 T(Q){Q.context&&(Q.context=Q.context.prev)}function D(Q,ce){for(var fe;;){if(!Q.context)return;if(fe=Q.context.tagName,!d.contextGrabbers.hasOwnProperty(fe)||!d.contextGrabbers[fe].hasOwnProperty(ce))return;T(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(),a="tag",V):d.allowMissingTagName&&Q=="endTag"?(a="tag bracket",V(Q,ce,fe)):(a="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)&&T(fe),fe.context&&fe.context.tagName==z||d.matchClosing===!1?(a="tag",x):(a="tag error",Y)}else return d.allowMissingTagName&&Q=="endTag"?(a="tag bracket",x(Q,ce,fe)):(a="error",Y)}function x(Q,ce,fe){return Q!="endTag"?(a="error",x):(T(fe),I)}function Y(Q,ce,fe){return a="error",x(Q,ce,fe)}function V(Q,ce,fe){if(Q=="word")return a="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)?D(fe,z):(D(fe,z),fe.context=new k(fe,z,se==fe.indented)),I}return a="error",V}function P(Q,ce,fe){return Q=="equals"?F:(d.allowMissing||(a="error"),V(Q,ce,fe))}function F(Q,ce,fe){return Q=="string"?X:Q=="word"&&d.allowUnquoted?(a="string",V):(a="error",V(Q,ce,fe))}function X(Q,ce,fe){return Q=="string"?X:V(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"&&(a=null,ce.state=ce.state(l||fe,Q,ce),a&&(fe=a=="error"?fe+" error":a)),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 J=d.contextGrabbers[z.tagName];if(J&&J.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=V)},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,i,S){u.exports=G=i(c("Ib8C"),c("MlIO"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.Hasher,y=i.x64,p=y.Word,d=y.WordArray,o=i.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)],a=[];(function(){for(var m=0;m<80;m++)a[m]=s()})();var g=o.SHA512=_.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,E=w[0],k=w[1],T=w[2],D=w[3],I=w[4],B=w[5],N=w[6],x=w[7],Y=E.high,V=E.low,P=k.high,F=k.low,X=T.high,Q=T.low,ce=D.high,fe=D.low,z=I.high,se=I.low,J=B.high,j=B.low,U=N.high,R=N.low,C=x.high,M=x.low,le=Y,he=V,ve=P,Ee=F,Se=X,ae=Q,pe=ce,me=fe,ee=z,ne=se,Z=J,ue=j,K=U,$=R,Ce=C,q=M,H=0;H<80;H++){var O,W,we=a[H];if(H<16)W=we.high=m[v+H*2]|0,O=we.low=m[v+H*2+1]|0;else{var be=a[H-15],Oe=be.high,Be=be.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=a[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=a[H-7],ot=nt.high,Ve=nt.low,$e=a[H-16],Ie=$e.high,De=$e.low;O=Ue+Ve,W=Fe+ot+(O>>>0<Ue>>>0?1:0),O=O+Ne,W=W+Je+(O>>>0<Ne>>>0?1:0),O=O+De,W=W+Ie+(O>>>0<De>>>0?1:0),we.high=W,we.low=O}var Le=ee&Z^~ee&K,_e=ne&ue^~ne&$,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|ne<<18)^(ee>>>18|ne<<14)^(ee<<23|ne>>>9),Ze=(ne>>>14|ee<<18)^(ne>>>18|ee<<14)^(ne<<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+O,dt=dt+W+(at>>>0<O>>>0?1:0),st=ze+ke,St=Ae+Te+(st>>>0<ze>>>0?1:0);Ce=K,q=$,K=Z,$=ue,Z=ee,ue=ne,ne=me+at|0,ee=pe+dt+(ne>>>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}V=E.low=V+he,E.high=Y+le+(V>>>0<he>>>0?1:0),F=k.low=F+Ee,k.high=P+ve+(F>>>0<Ee>>>0?1:0),Q=T.low=Q+ae,T.high=X+Se+(Q>>>0<ae>>>0?1:0),fe=D.low=fe+me,D.high=ce+pe+(fe>>>0<me>>>0?1:0),se=I.low=se+ne,I.high=z+ee+(se>>>0<ne>>>0?1:0),j=B.low=j+ue,B.high=J+Z+(j>>>0<ue>>>0?1:0),R=N.low=R+$,N.high=U+K+(R>>>0<$>>>0?1:0),M=x.low=M+q,x.high=C+Ce+(M>>>0<q>>>0?1:0)},_doFinalize:function(){var m=this._data,v=m.words,w=this._nDataBytes*8,E=m.sigBytes*8;v[E>>>5]|=128<<24-E%32,v[(E+128>>>10<<5)+30]=Math.floor(w/4294967296),v[(E+128>>>10<<5)+31]=w,m.sigBytes=v.length*4,this._process();var k=this._hash.toX32();return k},clone:function(){var m=_.clone.call(this);return m._hash=this._hash.clone(),m},blockSize:1024/32});i.SHA512=_._createHelper(g),i.HmacSHA512=_._createHmacHelper(g)}(),h.SHA512})},"3y9D":function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.WordArray,y=S.Hasher,p=i.algo,d=[],o=p.SHA1=y.extend({_doReset:function(){this._hash=new _.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(s,l){for(var a=this._hash.words,g=a[0],m=a[1],v=a[2],w=a[3],E=a[4],k=0;k<80;k++){if(k<16)d[k]=s[l+k]|0;else{var T=d[k-3]^d[k-8]^d[k-14]^d[k-16];d[k]=T<<1|T>>>31}var D=(g<<5|g>>>27)+E+d[k];k<20?D+=(m&v|~m&w)+1518500249:k<40?D+=(m^v^w)+1859775393:k<60?D+=(m&v|m&w|v&w)-1894007588:D+=(m^v^w)-899497514,E=w,w=v,v=m<<30|m>>>2,m=g,g=D}a[0]=a[0]+g|0,a[1]=a[1]+m|0,a[2]=a[2]+v|0,a[3]=a[3]+w|0,a[4]=a[4]+E|0},_doFinalize:function(){var s=this._data,l=s.words,a=this._nDataBytes*8,g=s.sigBytes*8;return l[g>>>5]|=128<<24-g%32,l[(g+64>>>9<<4)+14]=Math.floor(a/4294967296),l[(g+64>>>9<<4)+15]=a,s.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var s=y.clone.call(this);return s._hash=this._hash.clone(),s}});i.SHA1=y._createHelper(o),i.HmacSHA1=y._createHmacHelper(o)}(),h.SHA1})},4:function(u,G){},"5hvy":function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("MlIO"))})(this,function(h){return function(i){var S=h,_=S.lib,y=_.WordArray,p=_.Hasher,d=S.x64,o=d.Word,s=S.algo,l=[],a=[],g=[];(function(){for(var w=1,E=0,k=0;k<24;k++){l[w+5*E]=(k+1)*(k+2)/2%64;var T=E%5,D=(2*w+3*E)%5;w=T,E=D}for(var w=0;w<5;w++)for(var E=0;E<5;E++)a[w+5*E]=E+(2*w+3*E)%5*5;for(var I=1,B=0;B<24;B++){for(var N=0,x=0,Y=0;Y<7;Y++){if(I&1){var V=(1<<Y)-1;V<32?x^=1<<V:N^=1<<V-32}I&128?I=I<<1^113:I<<=1}g[B]=o.create(N,x)}})();var m=[];(function(){for(var w=0;w<25;w++)m[w]=o.create()})();var v=s.SHA3=p.extend({cfg:p.cfg.extend({outputLength:512}),_doReset:function(){for(var w=this._state=[],E=0;E<25;E++)w[E]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(w,E){for(var k=this._state,T=this.blockSize/2,D=0;D<T;D++){var I=w[E+2*D],B=w[E+2*D+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[D];N.high^=B,N.low^=I}for(var x=0;x<24;x++){for(var Y=0;Y<5;Y++){for(var V=0,P=0,F=0;F<5;F++){var N=k[Y+5*F];V^=N.high,P^=N.low}var X=m[Y];X.high=V,X.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,V=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^=V,N.low^=P}for(var se=1;se<25;se++){var V,P,N=k[se],J=N.high,j=N.low,U=l[se];U<32?(V=J<<U|j>>>32-U,P=j<<U|J>>>32-U):(V=j<<U-32|J>>>64-U,P=J<<U-32|j>>>64-U);var R=m[a[se]];R.high=V,R.low=P}var C=m[0],M=k[0];C.high=M.high,C.low=M.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[x];N.high^=Ee.high,N.low^=Ee.low}},_doFinalize:function(){var w=this._data,E=w.words,k=this._nDataBytes*8,T=w.sigBytes*8,D=this.blockSize*32;E[T>>>5]|=1<<24-T%32,E[(i.ceil((T+1)/D)*D>>>5)-1]|=128,w.sigBytes=E.length*4,this._process();for(var I=this._state,B=this.cfg.outputLength/8,N=B/8,x=[],Y=0;Y<N;Y++){var V=I[Y],P=V.high,F=V.low;P=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360,F=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360,x.push(F),x.push(P)}return new y.init(x,B)},clone:function(){for(var w=p.clone.call(this),E=w._state=this._state.slice(0),k=0;k<25;k++)E[k]=E[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"),i=h.slice,S=h.pluck,_=h.each,y=h.bind,p=h.create,d=h.isList,o=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,E){m.call(v,v._deserialize(w),(E||"").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 a(){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 E=w?"__storejs_"+w+"_":"",k=w?new RegExp("^"+E):null,T=/^[a-zA-Z0-9_\-]*$/;if(!T.test(w))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var D={_namespacePrefix:E,_namespaceRegexp:k,_testStorage:function(B){try{var N="__storejs__test__";B.write(N,N);var x=B.read(N)===N;return B.remove(N),x}catch(Y){return!1}},_assignPluginFnProp:function(B,N){var x=this[N];this[N]=function(){var V=i(arguments,0),P=this;function F(){return x?(_(arguments,function(Q,ce){V[ce]=Q}),x.apply(P,V)):void 0}var X=[F].concat(V);return B.apply(P,X)}},_serialize:function(B){return JSON.stringify(B)},_deserialize:function(B,N){if(!B)return N;var x="";try{x=JSON.parse(B)}catch(Y){x=B}return x!==void 0?x: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)){_(B,function(V){N._addPlugin(V)});return}var x=S(this.plugins,function(V){return B===V});if(x)return;if(this.plugins.push(B),!o(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");_(Y,function(V,P){if(!o(V))throw new Error("Bad plugin property: "+P+" from plugin "+B.name+". Plugins should only return functions.");N._assignPluginFnProp(V,P)})},addStorage:function(B){a("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(B)}},I=p(D,l,{plugins:[]});return I.raw={},_(I,function(B,N){o(B)&&(I.raw[N]=y(I,B))}),_(m,function(B){I._addStorage(B)}),_(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),i=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(i)}var _=/^(?:[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 y(m){return typeof m=="string"&&_.test(m)}for(var p=y,d=[],o=0;o<256;++o)d.push((o+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 a(m,v,w){m=m||{};var E=m.random||(m.rng||S)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,v){w=w||0;for(var k=0;k<16;++k)v[w+k]=E[k];return v}return l(E)}var g=G.a=a},"7ahc":function(u,G,c){"use strict";c.d(G,"a",function(){return B});var h=c("k1fw"),i=c("0Owb"),S=c("+L6B"),_=c("2/Rp"),y=c("y8nQ"),p=c("Vl3Y"),d=c("tJVT"),o=c("OaEy"),s=c("2fM7"),l=c("q1tI"),a=c.n(l),g=c("VrN/"),m=c.n(g),v=c("p77/"),w=c.n(v),E=c("c5Ni"),k=c.n(E),T=s.a.Option,D={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 x=N.callback,Y=N.onCancel,V=Object(l.useState)("python"),P=Object(d.a)(V,2),F=P[0],X=P[1];function Q(fe){X(I[fe][1])}function ce(fe){x(fe)}return a.a.createElement(p.a,Object(i.a)({},D,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ce}),a.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},a.a.createElement(s.a,{onChange:Q},Object.keys(I).map(function(fe){return a.a.createElement(T,{key:fe,value:fe},I[fe][0])}))),a.a.createElement(p.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},a.a.createElement(B,{mode:F})),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(_.a,{type:"ghost",onClick:Y},"\u53D6\u6D88")))};function B(N){var x=N.value,Y=N.onChange,V=N.mode,P=N.options,F=P===void 0?{}:P,X=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(J){var j=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",V)},[fe,V]),Object(l.useEffect)(function(){fe&&((x!==fe.getValue()||x==="")&&setTimeout(function(){fe.setValue(x||" ")},300))},[fe,x]),Object(l.useEffect)(function(){if(X.current&&!fe){var se=m.a.fromTextArea(X.current,Object(h.a)({mode:V,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},F));z(se)}},[X.current,fe]),a.a.createElement("div",{className:"my-codemirror-container"},a.a.createElement("textarea",{ref:X}))}},"7ixt":function(u,G,c){"use strict";c.d(G,"a",function(){return S});var h={adjustX:1,adjustY:1},i=[0,0],S={left:{points:["cr","cl"],overflow:h,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:h,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:h,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:h,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:h,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:h,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:h,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:h,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:h,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:h,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:h,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:h,offset:[-4,0],targetOffset:i}},_=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"),i=c("VTBJ"),S=c("Ff2n"),_=c("Zm9Q"),y=c("Kwbf"),p=c("OZM5");function d(w,E){return w!=null?w:E}function o(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=new Map;function k(T){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(T||[]).forEach(function(I){var B=I.key,N=I.children;Object(y.a)(B!=null,"Tree node must have a certain key: [".concat(D).concat(B,"]"));var x=String(B);Object(y.a)(!E.has(x)||B===null||B===void 0,"Same 'key' exist in the Tree: ".concat(x)),E.set(x,!0),k(N,"".concat(D).concat(x," > "))})}k(w)}function s(w){function E(k){var T=Object(_.a)(k);return T.map(function(D){if(!Object(p.i)(D))return Object(y.a)(!D,"Tree/TreeNode can only accept TreeNode as children."),null;var I=D.key,B=D.props,N=B.children,x=Object(S.a)(B,["children"]),Y=Object(i.a)({key:I},x),V=E(N);return V.length&&(Y.children=V),Y}).filter(function(D){return D})}return E(w)}function l(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],k=new Set(E===!0?[]:E),T=[];function D(I){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return I.map(function(N,x){var Y=Object(p.h)(B?B.pos:"0",x),V=d(N.key,Y),P=Object(i.a)(Object(i.a)({},N),{},{parent:B,pos:Y,children:null,data:N,isStart:[].concat(Object(h.a)(B?B.isStart:[]),[x===0]),isEnd:[].concat(Object(h.a)(B?B.isEnd:[]),[x===I.length-1])});return T.push(P),E===!0||k.has(V)?P.children=D(N.children||[],P):P.children=[],P})}return D(w),T}function a(w,E,k){var T;k?typeof k=="string"?T=function(B){return B[k]}:typeof k=="function"&&(T=function(B){return k(B)}):T=function(B,N){return d(B.key,N)};function D(I,B,N){var x=I?I.children:w,Y=I?Object(p.h)(N.pos,B):"0";if(I){var V=T(I,Y),P={node:I,index:B,pos:Y,key:V,parentPos:N.node?N.pos:null,level:N.level+1};E(P)}x&&x.forEach(function(F,X){D(F,X,{node:I,pos:Y,level:N?N.level+1:-1})})}D(null)}function g(w){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=E.initWrapper,T=E.processEntity,D=E.onProcessFinished,I=arguments.length>2?arguments[2]:void 0,B={},N={},x={posEntities:B,keyEntities:N};return k&&(x=k(x)||x),a(w,function(Y){var V=Y.node,P=Y.index,F=Y.pos,X=Y.key,Q=Y.parentPos,ce=Y.level,fe={node:V,index:P,key:X,pos:F,level:ce},z=d(X,F);B[F]=fe,N[z]=fe,fe.parent=B[Q],fe.parent&&(fe.parent.children=fe.parent.children||[],fe.parent.children.push(fe)),T&&T(fe,x)},I),D&&D(x),x}function m(w,E){var k=E.expandedKeys,T=E.selectedKeys,D=E.loadedKeys,I=E.loadingKeys,B=E.checkedKeys,N=E.halfCheckedKeys,x=E.dragOverNodeKey,Y=E.dropPosition,V=E.keyEntities,P=V[w],F={eventKey:w,expanded:k.indexOf(w)!==-1,selected:T.indexOf(w)!==-1,loaded:D.indexOf(w)!==-1,loading:I.indexOf(w)!==-1,checked:B.indexOf(w)!==-1,halfChecked:N.indexOf(w)!==-1,pos:String(P?P.pos:""),dragOver:x===w&&Y===0,dragOverGapTop:x===w&&Y===-1,dragOverGapBottom:x===w&&Y===1};return F}function v(w){var E=w.data,k=w.expanded,T=w.selected,D=w.checked,I=w.loaded,B=w.loading,N=w.halfChecked,x=w.dragOver,Y=w.dragOverGapTop,V=w.dragOverGapBottom,P=w.pos,F=w.active,X=Object(i.a)(Object(i.a)({},E),{},{expanded:k,selected:T,checked:D,loaded:I,loading:B,halfChecked:N,dragOver:x,dragOverGapTop:Y,dragOverGapBottom:V,pos:P,active:F});return"props"in X||Object.defineProperty(X,"props",{get:function(){return Object(y.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),w}}),X}},"8EBN":function(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 i=0;i<h.modeInfo.length;i++){var S=h.modeInfo[i];S.mimes&&(S.mime=S.mimes[0])}h.findModeByMIME=function(_){_=_.toLowerCase();for(var y=0;y<h.modeInfo.length;y++){var p=h.modeInfo[y];if(p.mime==_)return p;if(p.mimes){for(var d=0;d<p.mimes.length;d++)if(p.mimes[d]==_)return p}}if(/\+xml$/.test(_))return h.findModeByMIME("application/xml");if(/\+json$/.test(_))return h.findModeByMIME("application/json")},h.findModeByExtension=function(_){_=_.toLowerCase();for(var y=0;y<h.modeInfo.length;y++){var p=h.modeInfo[y];if(p.ext){for(var d=0;d<p.ext.length;d++)if(p.ext[d]==_)return p}}},h.findModeByFileName=function(_){for(var y=0;y<h.modeInfo.length;y++){var p=h.modeInfo[y];if(p.file&&p.file.test(_))return p}var d=_.lastIndexOf("."),o=d>-1&&_.substring(d+1,_.length);if(o)return h.findModeByExtension(o)},h.findModeByName=function(_){_=_.toLowerCase();for(var y=0;y<h.modeInfo.length;y++){var p=h.modeInfo[y];if(p.name.toLowerCase()==_)return p;if(p.alias){for(var d=0;d<p.alias.length;d++)if(p.alias[d].toLowerCase()==_)return p}}}})},"8hTe":function(u,G,c){u.exports={button:"button___1wy9m"}},"9Bee":function(u,G,c){"use strict";var h=c("DYRE"),i=c("zeV3"),S=c("+L6B"),_=c("2/Rp"),y=c("k1fw"),p=c("9og8"),d=c("tJVT"),o=c("WmNS"),s=c.n(o),l=c("q1tI"),a=c.n(l),g=c("vg9a"),m=c("DlQD"),v=c.n(m),w=c("rUJ1");function E(oe,b){var A=oe.match(/^(\s+)(?:```)/);if(A===null)return b;var ie=A[1];return b.split(`
`).map(function(ye){var re=ye.match(/^\s+/);if(re===null)return ye;var Me=Object(d.a)(re,1),Qe=Me[0];return Qe.length>=ie.length?ye.slice(ie.length):ye}).join(`
`)}var k=[],T=["<ul>"],D=new v.a.Renderer,I=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function B(){k.length=0,T=["<ul>"]}var N={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(oe,b,A,ie){if(b>=oe.length||oe[b].level<=A)return b;var ye=oe[b];ie.push("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),b++;var re=[];return b=x(oe,b,ye.level,re),re.length>0&&(ie.push("<ul>"),re.forEach(function(Me){ie.push(Me)}),ie.push("</ul>")),ie.push("</li>"),b=x(oe,b,A,ie),b}function Y(){return x(k,0,0,T),T.push("</ul>"),T.join("")}var V={heading:function(b){var A=I.exec(b);if(A)return{type:"heading",raw:A[0],depth:A[1].length,text:A[2]}},fences:function(b){var A=this.rules.block.fences.exec(b);if(A){var ie=A[0],ye=E(ie,A[3]||""),re=A[2]?A[2].trim():A[2];if(["latex","katex","math"].indexOf(re)>=0){var Me=X(),Qe=ye;ye=Me,Q[Me]={type:"block",expression:Qe}}return{type:"code",raw:ie,lang:re,text:ye}}}},P=/(?:\${2})([^\n`]+?)(?:\${2})/gi,F=0,X=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(b,A){var ie=X();return Q[ie]={type:"inline",expression:A},ie}),oe}var se=D.listitem;D.listitem=function(oe){return se(z(oe))};var J=D.paragraph;D.paragraph=function(oe){return J(z(oe))};var j=D.tablecell;D.tablecell=function(oe,b){return j(z(oe),b)},D.code=function(oe,b,A){var ie=(b||"").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(b,'">').concat(A?oe:Object(w.escape)(oe,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(A?oe:Object(w.escape)(oe,!0))+"</code></pre>"},D.heading=function(oe,b,A){var ie=this.options.headerPrefix+A.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return k.push({anchor:ie,level:b,text:oe}),"<h"+b+' id="'+ie+'">'+oe+"</h"+b+">"},v.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),v.a.use({tokenizer:V,renderer:D});var U=v.a,R=c("SJMd"),C=c("ulZh"),M=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,b){return(Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,ie){A.__proto__=ie}||function(A,ie){for(var ye in ie)Object.prototype.hasOwnProperty.call(ie,ye)&&(A[ye]=ie[ye])})(oe,b)};function ae(oe,b){function A(){this.constructor=oe}Se(oe,b),oe.prototype=b===null?Object.create(b):(A.prototype=b.prototype,new A)}function pe(oe,b,A,ie){return new(A||(A=Promise))(function(ye,re){function Me(wt){try{He(ie.next(wt))}catch(tt){re(tt)}}function Qe(wt){try{He(ie.throw(wt))}catch(tt){re(tt)}}function He(wt){var tt;wt.done?ye(wt.value):(tt=wt.value,tt instanceof A?tt:new A(function(Nt){Nt(tt)})).then(Me,Qe)}He((ie=ie.apply(oe,b||[])).next())})}function me(oe,b){var A,ie,ye,re,Me={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return re={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;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&&(ye=2&tt[0]?ie.return:tt[0]?ie.throw||((ye=ie.return)&&ye.call(ie),0):ie.next)&&!(ye=ye.call(ie,tt[1])).done)return ye;switch(ie=0,ye&&(tt=[2&tt[0],ye.value]),tt[0]){case 0:case 1:ye=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(!(ye=Me.trys,(ye=ye.length>0&&ye[ye.length-1])||tt[0]!==6&&tt[0]!==2)){Me=0;continue}if(tt[0]===3&&(!ye||tt[1]>ye[0]&&tt[1]<ye[3])){Me.label=tt[1];break}if(tt[0]===6&&Me.label<ye[1]){Me.label=ye[1],ye=tt;break}if(ye&&Me.label<ye[2]){Me.label=ye[2],Me.ops.push(tt);break}ye[2]&&Me.ops.pop(),Me.trys.pop();continue}tt=b.call(oe,Me)}catch(Nt){tt=[6,Nt],ie=0}finally{A=ye=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,b=0,A=arguments.length;b<A;b++)oe+=arguments[b].length;var ie=Array(oe),ye=0;for(b=0;b<A;b++)for(var re=arguments[b],Me=0,Qe=re.length;Me<Qe;Me++,ye++)ie[ye]=re[Me];return ie}var ne=function(){function oe(){}return oe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},oe.setAttributes=function(b,A){for(var ie=0,ye=A;ie<ye.length;ie++){var re=ye[ie],Me=re[0],Qe=re[1];b.setAttribute(Me,Qe)}},oe.createRect=function(b,A,ie){var ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return ye.setAttribute("width",b.toString()),ye.setAttribute("height",A.toString()),ie&&oe.setAttributes(ye,ie),ye},oe.createLine=function(b,A,ie,ye,re){var Me=document.createElementNS("http://www.w3.org/2000/svg","line");return Me.setAttribute("x1",b.toString()),Me.setAttribute("y1",A.toString()),Me.setAttribute("x2",ie.toString()),Me.setAttribute("y2",ye.toString()),re&&oe.setAttributes(Me,re),Me},oe.createPolygon=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",b),A&&oe.setAttributes(ie,A),ie},oe.createCircle=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(b/2).toString()),ie.setAttribute("cy",(b/2).toString()),ie.setAttribute("r",b.toString()),A&&oe.setAttributes(ie,A),ie},oe.createEllipse=function(b,A,ie){var ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ye.setAttribute("cx",(b/2).toString()),ye.setAttribute("cy",(A/2).toString()),ye.setAttribute("rx",(b/2).toString()),ye.setAttribute("ry",(A/2).toString()),ie&&oe.setAttributes(ye,ie),ye},oe.createGroup=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","g");return b&&oe.setAttributes(A,b),A},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(b,A,ie,ye,re,Me,Qe){var He=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(He,[["id",b],["orient",A],["markerWidth",ie.toString()],["markerHeight",ye.toString()],["refX",re.toString()],["refY",Me.toString()]]),He.appendChild(Qe),He},oe.createText=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","text");return A.setAttribute("x","0"),A.setAttribute("y","0"),b&&oe.setAttributes(A,b),A},oe.createTSpan=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=b,A&&oe.setAttributes(ie,A),ie},oe.createImage=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","image");return b&&oe.setAttributes(A,b),A},oe.createPoint=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=b,ie.y=A,ie},oe.createPath=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",b),A&&oe.setAttributes(ie,A),ie},oe}(),Z=function(){function oe(){}return oe.addKey=function(b){oe.key=b},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(b,A,ie){var ye=this;return new Promise(function(re){var Me=ie!==void 0?ie:document.createElement("canvas");b===null&&(ye.markersOnly=!0,ye.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,ye.naturalSize===!0?(Qe.width.baseVal.value=b.naturalWidth,Qe.height.baseVal.value=b.naturalHeight):ye.width!==void 0&&ye.height!==void 0&&(Qe.width.baseVal.value=ye.width,Qe.height.baseVal.value=ye.height),Me.width=Qe.width.baseVal.value,Me.height=Qe.height.baseVal.value;var He=Qe.outerHTML,wt=Me.getContext("2d");ye.markersOnly!==!0&&wt.drawImage(b,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"}),er=tt.createObjectURL(Yt);Nt.onload=function(){wt.drawImage(Nt,0,0),tt.revokeObjectURL(er);var Vr=Me.toDataURL(ye.imageType,ye.imageQuality);re(Vr)},Nt.src=er})},oe}(),K=function(){},$=function(){function oe(b){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+b+"_"}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(b){return this.styleSheet===void 0&&this.addStyleSheet(),b.name=""+this.classNamePrefix+b.localName,this.classes.push(b),this.styleSheet.sheet.insertRule("."+b.name+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length),b},oe.prototype.addRule=function(b){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(b),this.styleSheet.sheet.insertRule(b.selector+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var b;this.styleSheet=document.createElement("style"),((b=this.styleSheetRoot)!==null&&b!==void 0?b: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 b;this.styleSheet&&(((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Ce=function(oe,b){this.selector=oe,this.style=b},q=function(oe,b){this.localName=oe,this.style=b},H=function(){function oe(b,A,ie,ye,re){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=b,this.displayMode=A,this.markerItems=ie,this.uiStyleSettings=ye,this.styles=re,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(b){var A=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=b,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(re){var Me=document.createElement("div");Me.className=""+A.toolbarButtonStyleClass.name,Me.setAttribute("data-type-name",re.typeName),Me.innerHTML=re.icon,Me.addEventListener("click",function(){A.markerToolbarButtonClicked(Me,re)}),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 ye=document.createElement("div");ye.className=this.toolbarBlockStyleClass.name,ye.style.whiteSpace="nowrap",ye.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(ye),this.addActionButton(ye,'<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(ye,'<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(b){this.buttonClickListeners.push(b)},oe.prototype.removeButtonClickListener=function(b){this.buttonClickListeners.indexOf(b)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(b),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var b=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<b||A===b&&this.markerButtons.length-1===b?this.markerButtonBlock.appendChild(this.markerButtons[A]):(A===b&&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 b=this;this.buttons.forEach(function(A){A.className=A.className.replace(b.uiStyleSettings.toolbarButtonStyleColorsClassName?b.uiStyleSettings.toolbarButtonStyleColorsClassName:b.toolbarButtonStyleColorsClass.name,"").trim(),A.className=A.className.replace(b.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?b.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:b.toolbarActiveButtonStyleColorsClass.name,"").trim(),A.className+=" "+(b.uiStyleSettings.toolbarButtonStyleColorsClassName?b.uiStyleSettings.toolbarButtonStyleColorsClassName:b.toolbarButtonStyleColorsClass.name)})},oe.prototype.addActionButton=function(b,A,ie){var ye=this,re=document.createElement("div");switch(re.className=""+this.toolbarButtonStyleClass.name,re.innerHTML=A,re.setAttribute("data-action",ie),re.addEventListener("click",function(){ye.actionToolbarButtonClicked(re,ie)}),ie){case"select":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":re.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":re.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":re.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":re.style.fill=this.uiStyleSettings.closeButtonColor}b.appendChild(re),this.buttons.push(re)},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 b=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*b)+`px;
padding: `+b+`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(b,A){this.setActiveButton(b),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ie){return ie("marker",A)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(b,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(b){this.resetButtonStyles(),b.className=b.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),b.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},oe.prototype.setActiveMarkerButton=function(b){var A=this.markerButtons.find(function(ie){return ie.getAttribute("data-type-name")===b});A&&this.setActiveButton(A)},oe.prototype.setCurrentMarker=function(b){var A=this;this.currentMarker=b,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}(),O=function(){function oe(b,A,ie,ye){this.panels=[],this.panelButtons=[],this.markerjsContainer=b,this.displayMode=A,this.uiStyleSettings=ie,this.styles=ye,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var b;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: `+((b=this.uiStyleSettings.toolboxBackgroundColor)!==null&&b!==void 0?b: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(b){var A;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=b,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(b){var A,ie,ye=this;this.panels=b,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(re){var Me;re.uiStyleSettings=ye.uiStyleSettings;var Qe=document.createElement("div");Qe.className=ye.toolboxButtonStyleClass.name+" "+((Me=ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Me!==void 0?Me:ye.toolboxButtonStyleColorsClass.name),Qe.innerHTML=re.icon,Qe.title=re.title,Qe.addEventListener("click",function(){ye.panelButtonClick(re)}),ye.panelButtons.push(Qe),ye.buttonRow.appendChild(Qe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(b){var A=this,ie=-1;if(b!==this.activePanel){ie=this.panels.indexOf(b),this.panelRow.innerHTML="";var ye=b.getUi();ye.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(ye),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=b}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(re,Me){var Qe,He;re.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,b){this.title=oe,this.icon=b},we=function(oe){function b(A,ie,ye,re){var Me=oe.call(this,A,re||'<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=ye,Me.setCurrentColor=Me.setCurrentColor.bind(Me),Me.getColorBox=Me.getColorBox.bind(Me),Me}return ae(b,oe),b.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.whiteSpace="nowrap",this.colors.forEach(function(ye){var re=A.getColorBox(ye);ie.appendChild(re),A.colorBoxes.push(re)}),ie},b.prototype.getColorBox=function(A){var ie=this,ye=this.uiStyleSettings.toolbarHeight/4,re=this.uiStyleSettings.toolbarHeight-ye,Me=document.createElement("div");Me.style.display="inline-block",Me.style.boxSizing="content-box",Me.style.width=re-2+"px",Me.style.height=re-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=(re+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=re-2+"px",Qe.style.height=re-2+"px",Qe.style.backgroundColor=A,Qe.style.borderRadius=re/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},b.prototype.setCurrentColor=function(A,ie){var ye=this;this.currentColor=A,this.colorBoxes.forEach(function(re){re.style.borderColor=re===ie?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(A)},b}(W),be=function(){function oe(b,A,ie){this._state="new",this._isSelected=!1,this._container=b,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(b){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(b,A){},oe.prototype.dblClick=function(b,A){},oe.prototype.manipulate=function(b){},oe.prototype.pointerUp=function(b){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(b){this.container.childNodes.length>0?this.container.insertBefore(b,this.container.childNodes[0]):this.container.appendChild(b)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(b){this._state=b.state,this.notes=b.notes},oe.prototype.scale=function(b,A){},oe.prototype.colorChanged=function(b){this.onColorChanged&&this.onColorChanged(b),this.stateChanged()},oe.prototype.fillColorChanged=function(b){this.onFillColorChanged&&this.onFillColorChanged(b),this.stateChanged()},oe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var b=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),b.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(b)&&this.onStateChanged(this)}},oe.typeName="MarkerBase",oe}(),Oe=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.prototype.findGripByVisual=function(b){return this.topLeft.ownsTarget(b)?this.topLeft:this.topCenter.ownsTarget(b)?this.topCenter:this.topRight.ownsTarget(b)?this.topRight:this.centerLeft.ownsTarget(b)?this.centerLeft:this.centerRight.ownsTarget(b)?this.centerRight:this.bottomLeft.ownsTarget(b)?this.bottomLeft:this.bottomCenter.ownsTarget(b)?this.bottomCenter:this.bottomRight.ownsTarget(b)?this.bottomRight:void 0},oe}(),Be=function(){function oe(){this.GRIP_SIZE=10,this.visual=ne.createGroup(),this.visual.appendChild(ne.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ne.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(b){return b===this.visual||b===this.visual.childNodes[0]||b===this.visual.childNodes[1]},oe}(),Fe=function(){function oe(){}return oe.toITransformMatrix=function(b){return{a:b.a,b:b.b,c:b.c,d:b.d,e:b.e,f:b.f}},oe.toSVGMatrix=function(b,A){return b.a=A.a,b.b=A.b,b.c=A.c,b.d=A.d,b.e=A.e,b.f=A.f,b},oe}(),Ue=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.left=0,re.top=0,re.width=0,re.height=0,re.defaultSize={x:50,y:20},re.offsetX=0,re.offsetY=0,re.rotationAngle=0,re.CB_DISTANCE=10,re._suppressMarkerCreateEvent=!1,re.container.transform.baseVal.appendItem(ne.createTransform()),re.setupControlBox(),re}return ae(b,oe),Object.defineProperty(b.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"visual",{get:function(){return this._visual},set:function(A){this._visual=A;var ie=ne.createTransform();this._visual.transform.baseVal.appendItem(ie)},enumerable:!1,configurable:!0}),b.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))},b.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 ye=this.unrotatePoint(A);if(this.manipulationStartX=ye.x,this.manipulationStartY=ye.y,this.offsetX=ye.x-this.left,this.offsetY=ye.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ie),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ie)){this.activeGrip=this.rotatorGrip;var re=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=re.x-this.width/2,this.top=re.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"},b.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)},b.prototype.moveVisual=function(A){this.visual.style.transform="translate("+A.x+"px, "+A.y+"px)"},b.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)},b.prototype.resize=function(A){var ie=this.manipulationStartLeft,ye=this.manipulationStartWidth,re=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,ye=this.manipulationStartWidth+this.manipulationStartLeft-ie;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:ye=this.manipulationStartWidth+A.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:re=this.manipulationStartTop+A.y-this.manipulationStartY,Me=this.manipulationStartHeight+this.manipulationStartTop-re;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Me=this.manipulationStartHeight+A.y-this.manipulationStartY}ye>=0?(this.left=ie,this.width=ye):(this.left=ie+ye,this.width=-ye),Me>=0?(this.top=re,this.height=Me):(this.top=re+Me,this.height=-Me),this.setSize()},b.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},b.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()}},b.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)},b.prototype.rotatePoint=function(A){if(this.rotationAngle===0)return A;var ie=this.container.getCTM(),ye=ne.createPoint(A.x,A.y);return{x:(ye=ye.matrixTransform(ie)).x,y:ye.y}},b.prototype.unrotatePoint=function(A){if(this.rotationAngle===0)return A;var ie=this.container.getCTM();ie=ie.inverse();var ye=ne.createPoint(A.x,A.y);return{x:(ye=ye.matrixTransform(ie)).x,y:ye.y}},b.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},b.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},b.prototype.setupControlBox=function(){this.controlBox=ne.createGroup();var A=ne.createTransform();A.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(A),this.container.appendChild(this.controlBox),this.controlRect=ne.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=ne.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"},b.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()},b.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()},b.prototype.createGrip=function(){var A=new Be;return A.visual.transform.baseVal.appendItem(ne.createTransform()),this.controlBox.appendChild(A.visual),A},b.prototype.positionGrips=function(){var A=this.controlGrips.topLeft.GRIP_SIZE,ie=-A/2,ye=ie,re=(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,ye),this.positionGrip(this.controlGrips.topCenter.visual,re,ye),this.positionGrip(this.controlGrips.topRight.visual,He,ye),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,re,Qe),this.positionGrip(this.controlGrips.bottomRight.visual,He,Qe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,re,ye-3*this.CB_DISTANCE)},b.prototype.positionGrip=function(A,ie,ye){var re=A.transform.baseVal.getItem(0);re.setTranslate(ie,ye),A.transform.baseVal.replaceItem(re,0)},b.prototype.hideControlBox=function(){this.controlBox.style.display="none"},b.prototype.showControlBox=function(){this.controlBox.style.display=""},b.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))},b.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))},b.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie);var ye=this.rotatePoint({x:this.left,y:this.top}),re=this.unrotatePoint({x:ye.x*A,y:ye.y*ie});this.left=re.x,this.top=re.y,this.width=this.width*A,this.height=this.height*ie,this.adjustControlBox()},b}(be),Ge=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.createVisual=re.createVisual.bind(re),re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual)},b.prototype.createVisual=function(){this.visual=ne.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)},b.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},b.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.setSize()},b.prototype.setSize=function(){oe.prototype.setSize.call(this),ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},b.prototype.pointerUp=function(A){oe.prototype.pointerUp.call(this,A),this.setSize()},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.visual&&ne.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(A),this.stateChanged()},b.prototype.setFillColor=function(A){this.fillColor=A,this.visual&&ne.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.visual&&ne.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.visual&&ne.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},b.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))},b.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()},b.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setSize()},b.title="Rectangle marker",b}(Ue),Ye=function(oe){function b(A,ie,ye,re){var Me=oe.call(this,A,re||'<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=ye,Me.setCurrentWidth=Me.setCurrentWidth.bind(Me),Me}return ae(b,oe),b.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(ye){var re=document.createElement("div");re.style.display="flex",re.style.flexGrow="2",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=ye===A.currentWidth?A.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){A.setCurrentWidth(ye,re)}),ie.appendChild(re);var Me=document.createElement("div");Me.innerText=ye.toString(),Me.style.marginRight="5px",re.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=ye+"px solid "+A.uiStyleSettings.toolboxColor,He.style.flexGrow="2",Qe.appendChild(He),re.appendChild(Qe),A.widthBoxes.push(re)}),ie},b.prototype.setCurrentWidth=function(A,ie){var ye=this;this.currentWidth=A,this.widthBoxes.forEach(function(re){re.style.borderColor=re===ie?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},b}(W),Xe=function(oe){function b(A,ie,ye,re){var Me=oe.call(this,A,re||'<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=ye,Me.setCurrentStyle=Me.setCurrentStyle.bind(Me),Me}return ae(b,oe),b.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(ye){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/A.styles.length-5+"%",re.style.borderColor=ye===A.currentStyle?A.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){A.setCurrentStyle(ye,re)}),ie.appendChild(re);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" '+(ye!==""?'stroke-dasharray="'+ye+'"':"")+` />
</svg>`;Me.innerHTML=Qe,re.appendChild(Me),A.styleBoxes.push(re)}),ie},b.prototype.setCurrentStyle=function(A,ie){var ye=this;this.currentStyle=A,this.styleBoxes.forEach(function(re){re.style.borderColor=re===ie?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},b}(W),Je=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.strokeColor=ye.defaultColor,re.strokeWidth=ye.defaultStrokeWidth,re.strokeDasharray=ye.defaultStrokeDasharray,re.strokePanel=new we("Line color",ye.defaultColorSet,ye.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new Ye("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Xe("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ae(b,oe),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="FrameMarker",b.title="Frame marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',b}(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 b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.x1=0,re.y1=0,re.x2=0,re.y2=0,re.defaultLength=50,re.manipulationStartX=0,re.manipulationStartY=0,re.manipulationStartX1=0,re.manipulationStartY1=0,re.manipulationStartX2=0,re.manipulationStartY2=0,re.setupControlBox(),re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!!oe.prototype.ownsTarget.call(this,A)||!(!this.grip1.ownsTarget(A)&&!this.grip2.ownsTarget(A))},b.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")},b.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)},b.prototype.adjustVisual=function(){},b.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)},b.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()},b.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},b.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},b.prototype.setupControlBox=function(){this.controlBox=ne.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},b.prototype.adjustControlBox=function(){this.positionGrips()},b.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},b.prototype.createGrip=function(){var A=new Be;return A.visual.transform.baseVal.appendItem(ne.createTransform()),this.controlBox.appendChild(A.visual),A},b.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)},b.prototype.positionGrip=function(A,ie,ye){var re=A.transform.baseVal.getItem(0);re.setTranslate(ie,ye),A.transform.baseVal.replaceItem(re,0)},b.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},b.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},b.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()},b}(be),ot=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.strokeColor=ye.defaultColor,re.strokeWidth=ye.defaultStrokeWidth,re.strokeDasharray=ye.defaultStrokeDasharray,re.strokePanel=new we("Line color",ye.defaultColorSet,ye.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new Ye("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Xe("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.selectorLine&&A!==this.visibleLine)},b.prototype.createVisual=function(){this.visual=ne.createGroup(),this.selectorLine=ne.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ne.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)},b.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},b.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()),ne.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ne.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ne.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.adjustVisual(),this.colorChanged(A)},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.adjustVisual()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.adjustVisual(),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.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()},b.typeName="LineMarker",b.title="Line marker",b.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',b}(nt),Ve=function(oe){function b(A,ie,ye,re){var Me=oe.call(this,A,re||'<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=ye,Me.setCurrentFont=Me.setCurrentFont.bind(Me),Me}return ae(b,oe),b.prototype.getUi=function(){var A=this,ie=document.createElement("div");return ie.style.overflow="hidden",ie.style.flexGrow="2",this.fonts.forEach(function(ye){var re=document.createElement("div");re.style.display="inline-block",re.style.alignItems="center",re.style.justifyContent="space-between",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.overflow="hidden",re.style.maxWidth=100/A.fonts.length-5+"%",re.style.borderColor=ye===A.currentFont?A.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){A.setCurrentFont(ye,re)}),ie.appendChild(re);var Me=document.createElement("div");Me.style.display="flex",Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.fontFamily=ye,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),re.appendChild(Me),A.fontBoxes.push(re)}),ie},b.prototype.setCurrentFont=function(A,ie){var ye=this;this.currentFont=A,this.fontBoxes.forEach(function(re){re.style.borderColor=re===ie?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},b}(W),$e=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.color="transparent",re.padding=5,re.DEFAULT_TEXT="your text here",re.text=re.DEFAULT_TEXT,re.isMoved=!1,re.color=ye.defaultColor,re.fontFamily=ye.defaultFontFamily,re.defaultSize={x:100,y:30},re.setColor=re.setColor.bind(re),re.setFont=re.setFont.bind(re),re.renderText=re.renderText.bind(re),re.sizeText=re.sizeText.bind(re),re.textEditDivClicked=re.textEditDivClicked.bind(re),re.showTextEditor=re.showTextEditor.bind(re),re.setSize=re.setSize.bind(re),re.positionTextEditor=re.positionTextEditor.bind(re),re.colorPanel=new we("Color",ye.defaultColorSet,ye.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.fontFamilyPanel=new Ve("Font",ye.defaultFontFamilies,ye.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re}return ae(b,oe),b.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(ye){ye===A&&(ie=!0)}),ie},b.prototype.createVisual=function(){this.visual=ne.createGroup(),this.bgRectangle=ne.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ne.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ne.createTransform()),this.textElement.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},b.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")},b.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(ne.createTSpan(ie.trim()===""?" ":ie.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},b.prototype.getTextScale=function(){var A=this.textElement.getBBox(),ie=1;if(A.width>0&&A.height>0){var ye=(1*this.width-this.width*this.padding*2/100)/A.width,re=(1*this.height-this.height*this.padding*2/100)/A.height;ie=Math.min(ye,re)}return ie},b.prototype.getTextPosition=function(A){var ie=this.textElement.getBBox(),ye=0,re=0;return ie.width>0&&ie.height>0&&(ye=(this.width-ie.width*A)/2,re=this.height/2-ie.height*A/2),{x:ye,y:re}},b.prototype.sizeText=function(){var A=this.textElement.getBBox(),ie=this.getTextScale(),ye=this.getTextPosition(ie);ye.y-=A.y*ie,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+ye.x+"px, "+ye.y+"px) scale("+ie+", "+ie+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(ye.x,ye.y),this.textElement.transform.baseVal.getItem(1).setScale(ie,ie))},b.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)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.isMoved=!0,this.setSize(),this.sizeText()},b.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ne.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},b.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},b.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 ye=ie.clipboardData.getData("text"),re=window.getSelection();if(!re.rangeCount)return!1;re.deleteFromDocument(),re.getRangeAt(0).insertNode(document.createTextNode(ye)),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")},b.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}),ye=this.textElement.getBBox(),re={x:ye.width*A,y:ye.height*A};ie.x-=re.x/2,ie.y-=re.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"}},b.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()},b.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},b.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},b.prototype.dblClick=function(A,ie){oe.prototype.dblClick.call(this,A,ie),this.showTextEditor()},b.prototype.setColor=function(A){this.textElement&&ne.setAttributes(this.textElement,[["fill",A]]),this.color=A,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(A)},b.prototype.setFont=function(A){this.textElement&&ne.setAttributes(this.textElement,[["font-family",A]]),this.fontFamily=A,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},b.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},b.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),b.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=b.typeName,A},b.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()},b.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setSize(),this.sizeText(),this.positionTextEditor()},b.typeName="TextMarker",b.title="Text marker",b.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>',b}(Ue),Ie=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.color="transparent",re.lineWidth=3,re.drawing=!1,re.pixelRatio=1,re.color=ye.defaultColor,re.lineWidth=ye.defaultStrokeWidth,re.pixelRatio=ye.freehandPixelRatio,re.setColor=re.setColor.bind(re),re.addCanvas=re.addCanvas.bind(re),re.finishCreation=re.finishCreation.bind(re),re.setLineWidth=re.setLineWidth.bind(re),re.colorPanel=new we("Color",ye.defaultColorSet,ye.defaultColor),re.colorPanel.onColorChanged=re.setColor,re.lineWidthPanel=new Ye("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),re.lineWidthPanel.onWidthChanged=re.setLineWidth,re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.drawingImage)},b.prototype.createVisual=function(){this.visual=ne.createGroup(),this.drawingImage=ne.createImage(),this.visual.appendChild(this.drawingImage);var A=ne.createTransform();this.visual.transform.baseVal.appendItem(A),this.addMarkerVisualToContainer(this.visual)},b.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)},b.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)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),ne.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ne.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},b.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)},b.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)},b.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},b.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},b.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],ye=ie[0],re=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<re&&(re=wt),tt<ye&&(ye=tt),wt>Qe&&(Qe=wt),tt>Me&&(Me=tt));if(He){this.left=ye/this.pixelRatio,this.top=re/this.pixelRatio,this.width=(Me-ye)/this.pixelRatio,this.height=(Qe-re)/this.pixelRatio;var Nt=document.createElement("canvas");Nt.width=Me-ye,Nt.height=Qe-re,Nt.getContext("2d").putImageData(this.canvasContext.getImageData(ye,re,Me-ye,Qe-re),0,0),this.drawingImgUrl=Nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},b.prototype.setDrawingImage=function(){ne.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ne.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},b.prototype.setColor=function(A){this.color=A,this.colorChanged(A)},b.prototype.setLineWidth=function(A){this.lineWidth=A},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){this.createVisual(),oe.prototype.restoreState.call(this,A),this.drawingImgUrl=A.drawingImgUrl,this.setDrawingImage()},b.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setDrawingImage()},b.typeName="FreehandMarker",b.title="Freehand marker",b.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>',b}(Ue),De=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ye||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return re.typeBoxes=[],re.currentType=ie,re.setCurrentType=re.setCurrentType.bind(re),re}return ae(b,oe),b.prototype.getUi=function(){var A=this,ie=document.createElement("div");ie.style.display="flex",ie.style.overflow="hidden",ie.style.flexGrow="2";for(var ye=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===re.currentType?re.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="`+(re.uiStyleSettings!==void 0?re.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 "+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee"),Yt.style.flexGrow="2",Nt.appendChild(Yt),wt.appendChild(Nt),He==="both"||He==="end"){var er=document.createElement("div");er.style.display="flex",er.style.alignItems="center",er.style.minHeight="20px",er.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="`+(re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,er.style.marginRight="5px",wt.appendChild(er)}re.typeBoxes.push(wt)},re=this,Me=0;Me<4;Me++)ye(Me);return ie},b.prototype.setCurrentType=function(A,ie){var ye=this;this.currentType=A,this.typeBoxes.forEach(function(re){re.style.borderColor=re===ie?ye.uiStyleSettings!==void 0?ye.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},b}(W),Le=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.arrowType="end",re.arrowBaseHeight=10,re.arrowBaseWidth=10,re.getArrowPoints=re.getArrowPoints.bind(re),re.setArrowType=re.setArrowType.bind(re),re.arrowTypePanel=new De("Arrow type","end"),re.arrowTypePanel.onArrowTypeChanged=re.setArrowType,re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.arrow1&&A!==this.arrow2)},b.prototype.getArrowPoints=function(A,ie){var ye=this.arrowBaseWidth+2*this.strokeWidth,re=this.arrowBaseHeight+2*this.strokeWidth;return A-ye/2+","+(ie+re/2)+" "+A+","+(ie-re/2)+" "+(A+ye/2)+","+(ie+re/2)},b.prototype.createTips=function(){this.arrow1=ne.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ne.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ne.createTransform()),this.visual.appendChild(this.arrow2)},b.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="creating"&&this.createTips()},b.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",ne.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ne.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 ye=this.arrow2.transform.baseVal.getItem(0);ye.setRotate(A+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(ye,0)}},b.prototype.setArrowType=function(A){this.arrowType=A,this.adjustVisual(),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A);var ie=A;this.arrowType=ie.arrowType,this.createTips(),this.adjustVisual()},b.typeName="ArrowMarker",b.title="Arrow marker",b.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',b}(ot),_e=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.fillColor=ye.defaultFillColor,re.strokeWidth=0,re.fillPanel=new we("Color",ye.defaultColorSet,ye.defaultFillColor),re.fillPanel.onColorChanged=re.setFillColor,re}return ae(b,oe),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="CoverMarker",b.title="Cover marker",b.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',b}(Ge),Te=function(oe){function b(A,ie,ye,re){var Me=oe.call(this,A,re||'<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=ye,Me.setCurrentOpacity=Me.setCurrentOpacity.bind(Me),Me}return ae(b,oe),b.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(ye){var re=document.createElement("div");re.style.display="flex",re.style.alignItems="center",re.style.justifyContent="center",re.style.padding="5px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderColor=ye===A.currentOpacity?A.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){A.setCurrentOpacity(ye,re)}),ie.appendChild(re);var Me=document.createElement("div");Me.innerText=100*ye+"%",re.appendChild(Me),A.opacityBoxes.push(re)}),ie},b.prototype.setCurrentOpacity=function(A,ie){var ye=this;this.currentOpacity=A,this.opacityBoxes.forEach(function(re){re.style.borderColor=re===ie?ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},b}(W),ke=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.setOpacity=re.setOpacity.bind(re),re.fillColor=ye.defaultHighlightColor,re.strokeWidth=0,re.opacity=ye.defaultHighlightOpacity,re.fillPanel=new we("Color",ye.defaultColorSet,re.fillColor),re.fillPanel.onColorChanged=re.setFillColor,re.opacityPanel=new Te("Opacity",ye.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return ae(b,oe),b.prototype.setOpacity=function(A){this.opacity=A,this.visual&&ne.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="HighlightMarker",b.title="Highlight marker",b.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>',b}(_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 b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.bgColor="transparent",re.tipPosition={x:0,y:0},re.tipBase1Position={x:0,y:0},re.tipBase2Position={x:0,y:0},re.tipMoving=!1,re.color=ye.defaultStrokeColor,re.bgColor=ye.defaultFillColor,re.fontFamily=ye.defaultFontFamily,re.defaultSize={x:100,y:30},re.setBgColor=re.setBgColor.bind(re),re.getTipPoints=re.getTipPoints.bind(re),re.positionTip=re.positionTip.bind(re),re.setTipPoints=re.setTipPoints.bind(re),re.colorPanel=new we("Text color",ye.defaultColorSet,re.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>'),re.colorPanel.onColorChanged=re.setColor,re.bgColorPanel=new we("Fill color",ye.defaultColorSet,re.bgColor,Ae),re.bgColorPanel.onColorChanged=re.setBgColor,re.fontFamilyPanel=new Ve("Font",ye.defaultFontFamilies,ye.defaultFontFamily),re.fontFamilyPanel.onFontChanged=re.setFont,re.tipGrip=new Be,re.tipGrip.visual.transform.baseVal.appendItem(ne.createTransform()),re.controlBox.appendChild(re.tipGrip.visual),re}return ae(b,oe),b.prototype.ownsTarget=function(A){return oe.prototype.ownsTarget.call(this,A)||this.tipGrip.ownsTarget(A)||this.tip===A},b.prototype.createTip=function(){ne.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ne.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},b.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)},b.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()}},b.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)},b.prototype.setBgColor=function(A){this.bgRectangle&&this.tip&&(ne.setAttributes(this.bgRectangle,[["fill",A]]),ne.setAttributes(this.tip,[["fill",A]])),this.bgColor=A,this.fillColorChanged(A)},b.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},b.prototype.setTipPoints=function(A){A===void 0&&(A=!1);var ie=Math.min(this.height/2,15),ye=this.height/5;A&&(this.tipPosition={x:ie+ye/2,y:this.height+20});var re=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(ye=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:0},this.tipBase2Position={x:ie+ye,y:0}):(this.tipBase1Position={x:0,y:ie},this.tipBase2Position={x:0,y:ie+ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?re<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(ye=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ye,y:0},this.tipBase2Position={x:this.width-ie,y:0}):(this.tipBase1Position={x:this.width,y:ie},this.tipBase2Position={x:this.width,y:ie+ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?re<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(ye=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ie-ye,y:this.height},this.tipBase2Position={x:this.width-ie,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ie-ye},this.tipBase2Position={x:this.width,y:this.height-ie}):re<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(ye=this.width/5,ie=Math.min(this.width/2,15),this.tipBase1Position={x:ie,y:this.height},this.tipBase2Position={x:ie+ye,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ie},this.tipBase2Position={x:0,y:this.height-ie-ye})},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.positionTip()},b.prototype.positionTip=function(){ne.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(b.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),b.prototype.select=function(){this.positionTip(),oe.prototype.select.call(this)},b.prototype.getState=function(){var A=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},oe.prototype.getState.call(this));return A.typeName=b.typeName,A},b.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()},b.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()},b.typeName="CalloutMarker",b.title="Callout marker",b.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>',b}($e),je=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.fillColor="transparent",re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.opacity=1,re.strokeColor=ye.defaultColor,re.strokeWidth=ye.defaultStrokeWidth,re.strokeDasharray=ye.defaultStrokeDasharray,re.fillColor=ye.defaultFillColor,re.setStrokeColor=re.setStrokeColor.bind(re),re.setFillColor=re.setFillColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.setOpacity=re.setOpacity.bind(re),re.createVisual=re.createVisual.bind(re),re.strokePanel=new we("Line color",ee(ye.defaultColorSet,["transparent"]),ye.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.fillPanel=new we("Fill color",ee(ye.defaultColorSet,["transparent"]),re.fillColor,Ae),re.fillPanel.onColorChanged=re.setFillColor,re.strokeWidthPanel=new Ye("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Xe("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re.opacityPanel=new Te("Opacity",ye.defaultOpacitySteps,re.opacity),re.opacityPanel.onOpacityChanged=re.setOpacity,re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual)},b.prototype.createVisual=function(){this.visual=ne.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)},b.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="new"&&(this.createVisual(),this.moveVisual(A),this._state="creating")},b.prototype.manipulate=function(A){oe.prototype.manipulate.call(this,A)},b.prototype.resize=function(A){oe.prototype.resize.call(this,A),this.setSize()},b.prototype.setSize=function(){oe.prototype.setSize.call(this),ne.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},b.prototype.pointerUp=function(A){oe.prototype.pointerUp.call(this,A),this.setSize()},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.visual&&ne.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(A),this.stateChanged()},b.prototype.setFillColor=function(A){this.fillColor=A,this.visual&&ne.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(A),this.stateChanged()},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.visual&&ne.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.visual&&ne.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},b.prototype.setOpacity=function(A){this.opacity=A,this.visual&&ne.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),b.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=b.typeName,A},b.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()},b.prototype.scale=function(A,ie){oe.prototype.scale.call(this,A,ie),this.setSize()},b.typeName="EllipseMarker",b.title="Ellipse marker",b.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>',b}(Ue),Ze=function(oe){function b(A,ie,ye){return oe.call(this,A,ie,ye)||this}return ae(b,oe),Object.defineProperty(b.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.tip1&&A!==this.tip2)},b.prototype.createTips=function(){this.tip1=ne.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(ne.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ne.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(ne.createTransform()),this.visual.appendChild(this.tip2)},b.prototype.pointerDown=function(A,ie){oe.prototype.pointerDown.call(this,A,ie),this.state==="creating"&&this.createTips()},b.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ne.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()]]),ne.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 ye=this.tip2.transform.baseVal.getItem(0);ye.setRotate(A+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(ye,0)}},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.prototype.restoreState=function(A){oe.prototype.restoreState.call(this,A),this.createTips(),this.adjustVisual()},b.typeName="MeasurementMarker",b.title="Measurement marker",b.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>',b}(ot),ht=function(oe){function b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.strokePanel.colors=ye.defaultColorSet,re.fillColor="transparent",re}return ae(b,oe),Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.prototype.getState=function(){var A=oe.prototype.getState.call(this);return A.typeName=b.typeName,A},b.typeName="EllipseFrameMarker",b.title="Ellipse frame marker",b.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>',b}(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(b){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(b)||(this.undoStack.push(b),JSON.stringify(this.lastRedoStep)!==JSON.stringify(b)&&this.redoStack.splice(0,this.redoStack.length))},oe.prototype.replaceLastUndoStep=function(b){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=b)},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 b=this.undoStack.pop();return b!==void 0&&this.redoStack.push(b),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 b(A,ie,ye){var re=oe.call(this,A,ie,ye)||this;return re.strokeColor="transparent",re.strokeWidth=0,re.strokeDasharray="",re.curveX=0,re.curveY=0,re.manipulationStartCurveX=0,re.manipulationStartCurveY=0,re.setStrokeColor=re.setStrokeColor.bind(re),re.setStrokeWidth=re.setStrokeWidth.bind(re),re.setStrokeDasharray=re.setStrokeDasharray.bind(re),re.positionGrips=re.positionGrips.bind(re),re.addControlGrips=re.addControlGrips.bind(re),re.adjustVisual=re.adjustVisual.bind(re),re.setupControlBox=re.setupControlBox.bind(re),re.resize=re.resize.bind(re),re.strokeColor=ye.defaultColor,re.strokeWidth=ye.defaultStrokeWidth,re.strokeDasharray=ye.defaultStrokeDasharray,re.strokePanel=new we("Line color",ye.defaultColorSet,ye.defaultColor),re.strokePanel.onColorChanged=re.setStrokeColor,re.strokeWidthPanel=new Ye("Line width",ye.defaultStrokeWidths,ye.defaultStrokeWidth),re.strokeWidthPanel.onWidthChanged=re.setStrokeWidth,re.strokeStylePanel=new Xe("Line style",ye.defaultStrokeDasharrays,ye.defaultStrokeDasharray),re.strokeStylePanel.onStyleChanged=re.setStrokeDasharray,re}return ae(b,oe),b.prototype.ownsTarget=function(A){return!(!oe.prototype.ownsTarget.call(this,A)&&A!==this.visual&&A!==this.selectorCurve&&A!==this.visibleCurve&&!this.curveGrip.ownsTarget(A))},b.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},b.prototype.createVisual=function(){this.visual=ne.createGroup(),this.selectorCurve=ne.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ne.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)},b.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")},b.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ne.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ne.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ne.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},b.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=ne.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ne.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)},b.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},b.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()))},b.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)},b.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)},b.prototype.setStrokeColor=function(A){this.strokeColor=A,this.adjustVisual(),this.colorChanged(A)},b.prototype.setStrokeWidth=function(A){this.strokeWidth=A,this.adjustVisual()},b.prototype.setStrokeDasharray=function(A){this.strokeDasharray=A,this.adjustVisual()},b.prototype.scale=function(A,ie){this.curveX=this.curveX*A,this.curveY=this.curveY*ie,oe.prototype.scale.call(this,A,ie)},Object.defineProperty(b.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),b.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=b.typeName,A},b.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()},b.typeName="CurveMarker",b.title="Curve marker",b.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>',b}(nt),at=function(){function oe(b,A){A===void 0&&(A=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=b,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 b(A,ie,ye){var re=oe.call(this,A,!1)||this;return re.dataUrl=ie,re.state=ye,re}return ae(b,oe),b}(at),st=function(oe){function b(A,ie,ye){ye===void 0&&(ye=!1);var re=oe.call(this,A,ye)||this;return re.marker=ie,re}return ae(b,oe),b}(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(b,A){this[b].push(A)},oe.prototype.removeEventListener=function(b,A){var ie=this[b].indexOf(A);ie>-1&&this[b].splice(ie,1)},oe}(),Ut=function(){function oe(b){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 $(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=b,this.targetRoot=document.body,this.width=b.clientWidth,this.height=b.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(b){var A=this;this._availableMarkerTypes.splice(0),b.forEach(function(ie){if(typeof ie=="string"){var ye=A.ALL_MARKER_TYPES.find(function(re){return re.typeName===ie});ye!==void 0&&A._availableMarkerTypes.push(ye)}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(b){this._zoomLevel=b,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 b=this;this.styles.styleSheetRoot===void 0&&K.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=K.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(A){return A(new at(b))})},oe.prototype.render=function(){return pe(this,void 0,void 0,function(){var b;return me(this,function(A){switch(A.label){case 0:return this.setCurrentMarker(),(b=new ue).naturalSize=this.renderAtNaturalSize,b.imageType=this.renderImageType,b.imageQuality=this.renderImageQuality,b.markersOnly=this.renderMarkersOnly,b.width=this.renderWidth,b.height=this.renderHeight,[4,b.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return A.sent(),[4,b.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,A.sent()]}})})},oe.prototype.close=function(b){var A=this;if(b===void 0&&(b=!1),this.isOpen){var ie=!1;b||this.eventListeners.beforeclose.forEach(function(ye){var re=new at(A,!0);ye(re),re.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(ye){return ye(new at(A))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var b,A=[],ie=0;ie<arguments.length;ie++)A[ie]=arguments[ie];(b=this._availableMarkerTypes).push.apply(b,A)},oe.prototype.addRenderEventListener=function(b){this.addEventListener("render",function(A){b(A.dataUrl,A.state)})},oe.prototype.removeRenderEventListener=function(b){},oe.prototype.addCloseEventListener=function(b){this.addEventListener("close",function(){b()})},oe.prototype.removeCloseEventListener=function(b){},oe.prototype.setupResizeObserver=function(){var b=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){b.resize(b.target.clientWidth,b.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return b.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},oe.prototype.onPopupTargetResize=function(){var b=1*this.target.clientWidth/this.target.clientHeight,A=this.editorCanvas.clientWidth/b>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*b:this.editorCanvas.clientWidth,ie=A<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/b;this.resize(A,ie)},oe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},oe.prototype.resize=function(b,A){this._isResizing=!0;var ie=b/this.imageWidth,ye=A/this.imageHeight;this.imageWidth=Math.round(b),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,ye),this._isResizing=!1},oe.prototype.scaleMarkers=function(b,A){var ie,ye=this;this._currentMarker&&this._currentMarker instanceof $e?this._currentMarker.scale(b,A):(ie=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(re){re!==ye._currentMarker&&re.scale(b,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 b=this.editingTarget.getBoundingClientRect(),A=this.editorCanvas.getBoundingClientRect();this.left=b.left-A.left,this.top=b.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 b,A=[],ie=0;ie<arguments.length;ie++)A[ie]=arguments[ie];this.defs=ne.createDefs(),this.addDefsToImage(),(b=this.defs).append.apply(b,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 b=document.createElement("a");b.href="https://markerjs.com/",b.target="_blank",b.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>',b.title="Powered by marker.js",b.style.display="grid",b.style.alignItems="center",b.style.justifyItems="center",b.style.padding="3px",b.style.width="20px",b.style.height="20px",this.logoUI.appendChild(b),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 b=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=b+"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 O(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(b){this.markerImage.removeChild(b.container),this.markers.indexOf(b)>-1&&this.markers.splice(this.markers.indexOf(b),1),b.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(b,A){if(b==="marker"&&A!==void 0)this.createNewMarker(A);else if(b==="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 b=this;if(this._currentMarker!==void 0){var A=!1;if(this.eventListeners.markerbeforedelete.forEach(function(ye){var re=new st(b,b._currentMarker,!0);ye(re),re.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(ye){return ye(new st(b,ie))})}}},oe.prototype.clear=function(){var b=this,A=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Me){var Qe=new st(b,void 0,!0);Me(Qe),Qe.defaultPrevented&&(A=!0)}),!A)){this.setCurrentMarker();for(var ie=function(Me){var Qe=ye.markers[Me];ye.setCurrentMarker(ye.markers[Me]),ye._currentMarker.dispose(),ye.markerImage.removeChild(ye._currentMarker.container),ye.markers.splice(ye.markers.indexOf(ye._currentMarker),1),ye.eventListeners.markerdelete.forEach(function(He){return He(new st(b,Qe))})},ye=this,re=this.markers.length-1;re>=0;re--)ie(re);this.addUndoStep()}},Object.defineProperty(oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),oe.prototype.showNotesEditor=function(){var b;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=(b=this._currentMarker.notes)!==null&&b!==void 0?b:"",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 b=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 ye=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(A),ye<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(re){return re(new at(b))})}else this.undoRedoManager.replaceLastUndoStep(A),this.eventListeners.statechange.forEach(function(re){return re(new at(b))})}},oe.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},oe.prototype.undoStep=function(){var b=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(b))}))},oe.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},oe.prototype.redoStep=function(){var b=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(b))}))},oe.prototype.stepZoom=function(){var b=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=b<this.zoomSteps.length-1?this.zoomSteps[b+1]:this.zoomSteps[0]},oe.prototype.panTo=function(b){this.contentDiv.scrollBy({left:this.prevPanPoint.x-b.x,top:this.prevPanPoint.y-b.y}),this.prevPanPoint=b},oe.prototype.startRenderAndClose=function(){return pe(this,void 0,void 0,function(){var b,A,ie=this;return me(this,function(ye){switch(ye.label){case 0:return[4,this.render()];case 1:return b=ye.sent(),A=this.getState(),this.eventListeners.render.forEach(function(re){return re(new dt(ie,b,A))}),this.close(!0),[2]}})})},oe.prototype.getState=function(b){b===!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(b){var A=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);b.markers.forEach(function(ie){var ye=A._availableMarkerTypes.find(function(Me){return Me.typeName===ie.typeName});if(ye!==void 0){var re=A.addNewMarker(ye);re.restoreState(ie),A.markers.push(re)}}),b.width&&b.height&&(b.width!==this.imageWidth||b.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/b.width,this.imageHeight/b.height),this.eventListeners.restorestate.forEach(function(ie){return ie(new at(A))})},oe.prototype.addNewMarker=function(b){var A=ne.createGroup();return this.markerImage.appendChild(A),new b(A,this.overlayContainer,this.settings)},oe.prototype.createNewMarker=function(b){var A,ie=this;(A=typeof b=="string"?this._availableMarkerTypes.find(function(ye){return ye.typeName===b}):b)&&(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(ye){return ye(new st(ie,ie._currentMarker))}))},oe.prototype.markerCreated=function(b){var A=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(b),this.setCurrentMarker(b),b 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(b){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=b,this.settings.defaultStrokeColor=b)},oe.prototype.fillColorChanged=function(b){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=b)},oe.prototype.markerStateChanged=function(b){var A=this;this.eventListeners.markerchange.forEach(function(ie){return ie(new st(A,b))})},oe.prototype.setCurrentMarker=function(b){var A=this;this._currentMarker!==b&&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=b,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(b){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||b.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(b.target)});A!==void 0?(this.setCurrentMarker(A),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(b.clientX,b.clientY),b.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:b.clientX,y:b.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(b.clientX,b.clientY))},oe.prototype.onDblClick=function(b){if(this._isFocused||this.focus(),this.mode==="select"){var A=this.markers.find(function(ie){return ie.ownsTarget(b.target)});A!==void 0&&A!==this._currentMarker&&this.setCurrentMarker(A),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(b.clientX,b.clientY),b.target):this.setCurrentMarker()}},oe.prototype.onPointerMove=function(b){this.touchPoints!==1&&b.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||b.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(b.clientX,b.clientY)):this.zoomLevel>1&&this.panTo({x:b.clientX,y:b.clientY}))},oe.prototype.onPointerUp=function(b){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(b.clientX,b.clientY)),this.isDragging=!1,this.addUndoStep()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(b){this._currentMarker===void 0||this.notesArea!==void 0||b.key!=="Delete"&&b.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(b,A){var ie=this.markerImage.getBoundingClientRect();return{x:(b-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 b=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=b+"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(b){Z.addKey(b)},oe.prototype.addEventListener=function(b,A){this.eventListeners.addEventListener(b,A)},oe.prototype.removeEventListener=function(b,A){this.eventListeners.removeEventListener(b,A)},oe.prototype.renderState=function(b){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(b),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var b=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(b))}))},oe.prototype.blur=function(){var b=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(A){return A(new at(b))}))},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,b){return(Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,ie){A.__proto__=ie}||function(A,ie){for(var ye in ie)Object.prototype.hasOwnProperty.call(ie,ye)&&(A[ye]=ie[ye])})(oe,b)};function Xt(oe,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function A(){this.constructor=oe}Vt(oe,b),oe.prototype=b===null?Object.create(b):(A.prototype=b.prototype,new A)}function At(oe,b,A,ie){return new(A||(A=Promise))(function(ye,re){function Me(wt){try{He(ie.next(wt))}catch(tt){re(tt)}}function Qe(wt){try{He(ie.throw(wt))}catch(tt){re(tt)}}function He(wt){var tt;wt.done?ye(wt.value):(tt=wt.value,tt instanceof A?tt:new A(function(Nt){Nt(tt)})).then(Me,Qe)}He((ie=ie.apply(oe,b||[])).next())})}function Ft(oe,b){var A,ie,ye,re,Me={label:0,sent:function(){if(1&ye[0])throw ye[1];return ye[1]},trys:[],ops:[]};return re={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;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&&(ye=2&tt[0]?ie.return:tt[0]?ie.throw||((ye=ie.return)&&ye.call(ie),0):ie.next)&&!(ye=ye.call(ie,tt[1])).done)return ye;switch(ie=0,ye&&(tt=[2&tt[0],ye.value]),tt[0]){case 0:case 1:ye=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(!(ye=Me.trys,(ye=ye.length>0&&ye[ye.length-1])||tt[0]!==6&&tt[0]!==2)){Me=0;continue}if(tt[0]===3&&(!ye||tt[1]>ye[0]&&tt[1]<ye[3])){Me.label=tt[1];break}if(tt[0]===6&&Me.label<ye[1]){Me.label=ye[1],ye=tt;break}if(ye&&Me.label<ye[2]){Me.label=ye[2],Me.ops.push(tt);break}ye[2]&&Me.ops.pop(),Me.trys.pop();continue}tt=b.call(oe,Me)}catch(Nt){tt=[6,Nt],ie=0}finally{A=ye=0}if(5&tt[0])throw tt[1];return{value:tt[0]?tt[1]:void 0,done:!0}}([He,wt])}}}var or=function(){function oe(){}return oe.addKey=function(b){oe.key=b},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(b,A){for(var ie=0,ye=A;ie<ye.length;ie++){var re=ye[ie],Me=re[0],Qe=re[1];b.setAttribute(Me,Qe)}},oe.createRect=function(b,A,ie){var ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return ye.setAttribute("width",b.toString()),ye.setAttribute("height",A.toString()),ie&&oe.setAttributes(ye,ie),ye},oe.createLine=function(b,A,ie,ye,re){var Me=document.createElementNS("http://www.w3.org/2000/svg","line");return Me.setAttribute("x1",b.toString()),Me.setAttribute("y1",A.toString()),Me.setAttribute("x2",ie.toString()),Me.setAttribute("y2",ye.toString()),re&&oe.setAttributes(Me,re),Me},oe.createPolygon=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ie.setAttribute("points",b),A&&oe.setAttributes(ie,A),ie},oe.createCircle=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","circle");return ie.setAttribute("cx",(b/2).toString()),ie.setAttribute("cy",(b/2).toString()),ie.setAttribute("r",b.toString()),A&&oe.setAttributes(ie,A),ie},oe.createEllipse=function(b,A,ie){var ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ye.setAttribute("cx",(b/2).toString()),ye.setAttribute("cy",(A/2).toString()),ye.setAttribute("rx",(b/2).toString()),ye.setAttribute("ry",(A/2).toString()),ie&&oe.setAttributes(ye,ie),ye},oe.createGroup=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","g");return b&&oe.setAttributes(A,b),A},oe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},oe.createMarker=function(b,A,ie,ye,re,Me,Qe){var He=document.createElementNS("http://www.w3.org/2000/svg","marker");return oe.setAttributes(He,[["id",b],["orient",A],["markerWidth",ie.toString()],["markerHeight",ye.toString()],["refX",re.toString()],["refY",Me.toString()]]),He.appendChild(Qe),He},oe.createText=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","text");return A.setAttribute("x","0"),A.setAttribute("y","0"),b&&oe.setAttributes(A,b),A},oe.createTSpan=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ie.textContent=b,A&&oe.setAttributes(ie,A),ie},oe.createImage=function(b){var A=document.createElementNS("http://www.w3.org/2000/svg","image");return b&&oe.setAttributes(A,b),A},oe.createPoint=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ie.x=b,ie.y=A,ie},oe.createPath=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg","path");return ie.setAttribute("d",b),A&&oe.setAttributes(ie,A),ie},oe.createElement=function(b,A){var ie=document.createElementNS("http://www.w3.org/2000/svg",b);return A&&oe.setAttributes(ie,A),ie},oe.getHollowRectanglePath=function(b,A,ie,ye,re,Me,Qe,He){return"M"+b+","+A+"V"+(A+ye)+"H"+(b+ie)+"V"+A+"H"+re+"V"+Me+"H"+(re+Qe)+"V"+(Me+He)+"H"+re+"V"+A+"Z"},oe}(),kr=function(){function oe(b){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+b+"_"}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(b){return this.styleSheet===void 0&&this.addStyleSheet(),b.name=""+this.classNamePrefix+b.localName,this.classes.push(b),this.styleSheet.sheet.insertRule("."+b.name+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length),b},oe.prototype.addRule=function(b){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(b),this.styleSheet.sheet.insertRule(b.selector+" {"+b.style+"}",this.styleSheet.sheet.cssRules.length)},oe.prototype.addStyleSheet=function(){var b;this.styleSheet=document.createElement("style"),((b=this.styleSheetRoot)!==null&&b!==void 0?b: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 b;this.styleSheet&&(((b=this.styleSheetRoot)!==null&&b!==void 0?b:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},oe}(),Jt=function(oe,b){this.selector=oe,this.style=b},nr=function(oe,b){this.localName=oe,this.style=b},sr=function(){function oe(){this.blocks=[],this.display=""}return oe.prototype.addButtonBlock=function(b){b.className=this.blockClassName,b.buttonClassName=this.buttonClassName,b.buttonColorsClassName=this.buttonColorsClassName,b.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(b)},oe.prototype.addElementBlock=function(b){b.className===void 0&&(b.className=this.blockClassName),this.blocks.push(b)},oe.prototype.getUI=function(){var b=document.createElement("div");return b.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,b.style.display=this.display,this.blocks.forEach(function(A){return b.appendChild(A.getUI())}),b},oe}(),vr=function(){function oe(){}return oe.prototype.getUI=function(){var b=document.createElement("div");if(b.className=this.className,this.minWidth!==void 0&&(b.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":b.style.justifyContent="flex-start";break;case"center":b.style.justifyContent="center";break;case"end":b.style.justifyContent="flex-end"}return b.style.whiteSpace="nowrap",b},oe}(),Sr=function(oe){function b(){var A=oe!==null&&oe.apply(this,arguments)||this;return A.buttons=[],A}return Xt(b,oe),b.prototype.addButton=function(A){A.className=this.buttonClassName,A.colorsClassName=this.buttonColorsClassName,A.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(A)},b.prototype.getUI=function(){var A=oe.prototype.getUI.call(this);return this.buttons.forEach(function(ie){return A.appendChild(ie.getUI())}),A},b}(vr),Ht=function(){function oe(b,A){this._isActive=!1,this._isHidden=!1,this._icon=b,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(b){this._icon=b,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isActive",{get:function(){return this._isActive},set:function(b){this._isActive=b,this.adjustClassName()},enumerable:!1,configurable:!0}),oe.prototype.getUI=function(){var b=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 b.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 b(){var A=oe!==null&&oe.apply(this,arguments)||this;return A.elements=[],A}return Xt(b,oe),b.prototype.addElement=function(A){this.elements.push(A)},b.prototype.getUI=function(){var A=oe.prototype.getUI.call(this);return this.elements.forEach(function(ie){return A.appendChild(ie)}),A},b}(vr),Kt=function(){function oe(b,A){this.horizontal=b,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(b){return b/this.ratio},oe.prototype.getHorizontalLength=function(b){return b*this.ratio},oe}(),hr=function(){function oe(){}return oe.getIcon=function(b,A){if(b>0&&A>0){var ie=new Kt(b,A),ye=ie.ratio>=1?20:ie.getHorizontalLength(20),re=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-ye)/2,(24-re)/2,ye,re,(24-ye)/2+2,(24-re)/2+2,ye-4,re-4));Me.appendChild(wt);var tt=Ct.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);tt.appendChild(Ct.createTSpan(b+":"+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 b(A,ie,ye){var re=oe.call(this,A,ie)||this;return re.isDropdownOpen=!1,re.onClick=re.dropdownButtonClicked,re.dropdownButtons=ye,re}return Xt(b,oe),b.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)},b.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},b.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},b.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},b.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},b.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},b}(Ht),It=function(){function oe(b,A){this.GRIP_SIZE=10,this.color=b,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(b){return b===this.visual||b===this.visual.childNodes[0]||b===this.visual.childNodes[1]},oe.prototype.setCenter=function(b,A){this.visual.childNodes.forEach(function(ie){return Ct.setAttributes(ie,[["cx",b.toString()],["cy",A.toString()]])})},oe}(),fr=function(){function oe(b,A,ie,ye){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=b,this.canvasHeight=A,this.margin=ie,this.container=ye,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(oe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(b){this._aspectRatio=b,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(b){this._isGridVisible=b,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(b){this._zoomFactor=b,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),oe.prototype.open=function(){var b=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 b.gridContainer.appendChild(ie)}),this.verticalGridLines.forEach(function(ie){return b.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(b){this.cropRect=b;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(re,Me){var Qe=A.y+ie*(Me+1);Ct.setAttributes(re,[["x1",""+A.x],["y1",""+Qe],["x2",""+(A.x+A.width)],["y2",""+Qe]])});var ye=A.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(re,Me){var Qe=A.x+ye*(Me+1);Ct.setAttributes(re,[["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(b,A){var ie=this.container.getBoundingClientRect();return{x:b-ie.left+this.margin,y:A-ie.top+this.margin}},oe.prototype.onPointerDown=function(b){this.container.setPointerCapture(b.pointerId),this.previousPoint=this.clientToLocalCoordinates(b.clientX,b.clientY),this.cropRectElement===b.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(b.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(b.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(b.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(b.target)&&(this.activeGrip=this.bottomRightGrip)},oe.prototype.onPointerMove=function(b){if(this.isMoving)this.move(this.clientToLocalCoordinates(b.clientX,b.clientY));else if(this.activeGrip){var A=this.clientToLocalCoordinates(b.clientX,b.clientY);this.resize(A)}b.preventDefault()},oe.prototype.onPointerUp=function(b){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(b.pointerId)},oe.prototype.move=function(b){var A=b.x-this.previousPoint.x,ie=b.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=b},oe.prototype.resize=function(b){var A=Object.assign({},this.cropRect),ie=b.x-this.previousPoint.x,ye=b.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+=ye,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+=ye}A.width<10&&(A.x=this.cropRect.x,A.width=10),A.height<10&&(A.y=this.cropRect.y,A.height=10),this.previousPoint=b,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 b=this.cropRect.x+this.cropRect.width/2,A=this.cropRect.y+this.cropRect.height/2,ie=this.aspectRatio.getHorizontalLength(this.cropRect.height),ye=this.aspectRatio.getVerticalLength(this.cropRect.width);ie/this.canvasWidth<ye/this.canvasHeight?this.cropRect.width=ie:this.cropRect.height=ye,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=b-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(b,A,ie,ye,re,Me){var Qe=ie/b,He=ye/A;return{x:(re.x-Me)*Qe+Me,y:(re.y-Me)*He+Me,width:re.width*Qe,height:re.height*He}},oe.prototype.scaleCanvas=function(b,A){var ie=this.getRescaledRect(this.canvasWidth,this.canvasHeight,b,A,this.cropRect,this.margin);this.canvasWidth=b,this.canvasHeight=A,this.onCropChange&&this.onCropChange(ie),this.setCropRectangle(ie)},oe}(),cn=function(){function oe(b){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=b,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(b){this._angle=b,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(b){this.controlContainer.setPointerCapture(b.pointerId),this.isDragging=!0,this.previousPoint={x:b.clientX,y:b.clientY}},oe.prototype.onPointerMove=function(b){this.isDragging&&(this.onAngleChange&&this.onAngleChange((b.clientX-this.previousPoint.x)/5),this.previousPoint.x=b.clientX)},oe.prototype.onPointerUp=function(b){this.isDragging&&this.onAngleChange&&this.onAngleChange((b.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(b.pointerId)},oe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var b=this.angleLabelText.getBBox();Ct.setAttributes(this.angleLabelElement,[["x",((this.width-b.width)/2).toString()],["y",(this.height/2).toString()]])}},oe.prototype.positionScaleShape=function(){if(this.scaleShape){var b=this.scaleShape.transform.baseVal.getItem(0);b.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(b,0)}},oe.prototype.getVisual=function(){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("xmlns","http://www.w3.org/2000/svg"),b.setAttribute("width",this.width+"px"),b.setAttribute("height",this.height+"px"),b.setAttribute("viewBox","0 0 "+this.width+" "+this.height),b.style.flexShrink="0",document.body.appendChild(b);for(var A="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ie=1;ie<=this.width/5+10;ie++){var ye=ie%5==0?this.height/3:this.height/6;A+="h4v"+-ye+"h1v"+ye}A+="v1H0Z",this.scaleShape=Ct.createPath(A);var re=Ct.createTransform();this.scaleShape.transform.baseVal.appendItem(re),b.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),b.appendChild(this.angleLabelElement),document.body.removeChild(b),b},oe}(),Kr=function(){function oe(){this.naturalSize=!1,this.imageType="image/png"}return oe.prototype.rasterize=function(b,A,ie,ye,re,Me,Qe){var He=this;return new Promise(function(wt){var tt=document.createElement("canvas");tt.width=b.width.baseVal.value-2*ye,tt.height=b.height.baseVal.value-2*ye;var Nt=1,Yt=1;He.naturalSize===!0?(Nt=A.naturalWidth/(b.width.baseVal.value-2*ye)/Me,Yt=A.naturalHeight/(b.height.baseVal.value-2*ye)/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 er=tt.getContext("2d");er.translate(tt.width/2,tt.height/2),er.rotate(re*Math.PI/180),er.scale(Me,Qe),er.translate(-tt.width/2,-tt.height/2),er.drawImage(A,0,0,tt.width,tt.height);var Vr=document.createElement("canvas");Vr.width=ie.width*Nt,Vr.height=ie.height*Yt,Vr.getContext("2d").putImageData(er.getImageData((ie.x-ye)*Nt,(ie.y-ye)*Yt,ie.width*Nt,ie.height*Yt),0,0),wt(Vr.toDataURL(He.imageType,He.imageQuality))})},oe}(),rt=function(){function oe(b){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 kr(this.instanceNo),this.target=b,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(b){this._zoomToCropEnabled=b,b?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(b){this._isGridVisible=b,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(b){this._gridLines=b,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(b){this._rotationAngle=b,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 b;return(b=this._aspectRatio)!==null&&b!==void 0?b:this.aspectRatios[0]},set:function(b){this._aspectRatio=b},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(b){b===void 0&&(b=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),b||this.closeEventListeners.forEach(function(A){return A()}),this._isOpen=!1)},oe.prototype.addRenderEventListener=function(b){this.renderEventListeners.push(b)},oe.prototype.removeRenderEventListener=function(b){this.renderEventListeners.indexOf(b)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(b),1)},oe.prototype.addCloseEventListener=function(b){this.closeEventListeners.push(b)},oe.prototype.removeCloseEventListener=function(b){this.closeEventListeners.indexOf(b)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(b),1)},oe.prototype.setupResizeObserver=function(){var b=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){b.resize(b.target.clientWidth,b.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 b=1*this.target.clientWidth/this.target.clientHeight,A=this.contentDiv.clientWidth/b>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*b: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)/b;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(b,A){this.imageWidth=Math.round(b),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 b=document.createElement("canvas");b.width=this.target.naturalWidth,b.height=this.target.naturalHeight,b.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var A=b.toDataURL();Ct.setAttributes(this.editingTarget,[["href",A]]),this.setEditingTargetSize()},oe.prototype.setTopLeft=function(){var b=this.target.getBoundingClientRect(),A=this.editorCanvas.getBoundingClientRect();this.left=b.left-A.left-this.CANVAS_MARGIN,this.top=b.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 b=Ct.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(b);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 fr(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 b=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=b+"px "+A+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-b+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(b){this.cropRect=b,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 b=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,A=this.target.offsetTop>b+this.CANVAS_MARGIN?this.target.offsetTop-(b+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 b=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 Sr;A.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(A);var ie=[];this.aspectRatios.forEach(function(Yt){var er=new Ht(hr.getIcon(Yt.horizontal,Yt.vertical),Yt.horizontal===0&&Yt.vertical===0?"FREE":Yt.horizontal+":"+Yt.vertical);er.onClick=function(){return b.ratioButtonClicked(Yt)},ie.push(er)}),this.aspectRatioButton=new Mt(hr.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 ye=new Ht('<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");ye.isActive=this.isGridVisible,ye.onClick=function(){b.isGridVisible=!b.isGridVisible,ye.isActive=b.isGridVisible},A.addButton(ye);var re=new Ht('<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(re.isActive=this.zoomToCropEnabled,re.onClick=function(){b.zoomToCropEnabled=!b.zoomToCropEnabled,re.isActive=b.zoomToCropEnabled},A.addButton(re),!or.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 Sr;wt.minWidth=3*this.toolbarHeight+"px",wt.contentAlign="end",this.topToolbar.addButtonBlock(wt);var tt=new Ht('<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 Ht('<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 b=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 Sr;A.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(A);var ie=new Ht('<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 ye=new Ht('<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");ye.onClick=this.rotateRightButtonClicked,A.addButton(ye);var re=new mt;re.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(re),this.straightener=new cn("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){b.rotateBy(wt),b.straightener.angle=b.rotationAngle},re.addElement(this.straightener.getUI());var Me=new Sr;Me.minWidth=2*this.toolbarHeight+"px",Me.contentAlign="end",this.bottomToolbar.addButtonBlock(Me);var Qe=new Ht('<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 Ht('<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(b){this.aspectRatio=b,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},oe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=hr.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 Kt(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(b){if(b){var A=this.cropLayer.getRescaledRect(b.width,b.height,this.imageWidth,this.imageHeight,b.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(A),this.cropRectChanged(A),this.flippedHorizontally=b.flippedHorizontally,this.flippedVertically=b.flippedVertically,this.applyFlip(),this.rotationAngle=b.rotationAngle,this.applyRotation()}},oe.prototype.clientToLocalCoordinates=function(b,A){var ie=this.cropImage.getBoundingClientRect();return{x:b-ie.left,y:A-ie.top}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var b=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=b+"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 b=this.rotationAngle-90;this.rotationAngle%90!=0&&(b+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(b)},oe.prototype.rotateRightButtonClicked=function(){var b=this.rotationAngle+90;this.rotationAngle%90!=0&&(b-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(b)},oe.prototype.rotateTo=function(b){b=(b=b>180?b-360:b)<=-180?b+360:b,this.rotationAngle=b,this.applyRotation()},oe.prototype.rotateBy=function(b){this.rotateTo((this.rotationAngle+b)%360)},oe.prototype.applyRotation=function(){var b=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=b},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 b,A;return Ft(this,function(ie){switch(ie.label){case 0:return[4,this.render()];case 1:return b=ie.sent(),A=this.getState(),this.renderEventListeners.forEach(function(ye){return ye(b,A)}),this.close(!0),[2]}})})},oe.prototype.render=function(){return At(this,void 0,void 0,function(){var b;return Ft(this,function(A){switch(A.label){case 0:return(b=new Kr).naturalSize=this.renderAtNaturalSize,b.imageType=this.renderImageType,b.imageQuality=this.renderImageQuality,b.width=this.renderWidth,b.height=this.renderHeight,this.unzoomFromCrop(),Ct.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,b.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,b.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 b=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new nr("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*b)+`px;
height: `+(this.toolbarHeight-2*b)+`px;
padding: `+b+`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*b)+`px;
padding: `+b+`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 dn(oe){var b=document.createElement("div");return b.innerHTML=oe,b.childNodes.length===0?"":b.childNodes[0].nodeValue}var bn=G.a=function(oe){var b=oe.value,A=b===void 0?"":b,ie=oe.edit,ye=ie===void 0?!1:ie,re=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,er=oe.stylesPrev,Vr=er===void 0?{}:er,Yr=String(A),yr=Object(l.useRef)(),Jr=Object(l.useRef)(),Hn=Object(l.useState)(""),Wr=Object(d.a)(Hn,2),Nr=Wr[0],xn=Wr[1],On=Object(l.useState)("office"),nn=Object(d.a)(On,2),pn=nn[0],zr=nn[1],ti=function(){var $t=new rt(Jr.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 yr.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(Jr.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 Ut(Jr.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(yr.current.style.display="none",!Jr.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(Jr.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},$r=Object(l.useMemo)(function(){try{var pr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,$t=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ar=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Yr=Yr.replace(pr,"("+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,`
`),Yr=Yr.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(vt){}var Zt=U(Yr),Rr=ce();if(Yr.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)(dn(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},[Yr]),Zr=Object(l.useRef)();N.WebkitLineClamp=Qe,Qe&&(Yt=Object(y.a)(Object(y.a)({},Yt),N));function Mn(pr){var $t=pr.target;if($t.tagName.toUpperCase()==="IMG"){if(wt){var Ar=$t.getAttribute("src");xn(Ar),zr("image")}}else if($t.tagName.toUpperCase()==="A"){var Zt=$t.getAttribute("href");if(Zt.indexOf("office")>-1)pr.preventDefault(),xn(Zt),zr("office");else if(Zt.indexOf("application/pdf")>-1)pr.preventDefault(),xn(Zt),zr("pdf");else if(Zt.indexOf("type=text")>-1)pr.preventDefault(),xn(Zt),zr("html");else if(Zt.startsWith("#")){pr.preventDefault();var Rr=document.getElementById(Zt.replace("#",""));Rr&&Rr.scrollIntoView(!0)}}}var Nn=function(){var $t,Ar=($t=Zr.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(M.a.isSupported()){var Rr=new M.a;Rr.loadSource(Zt.src),Rr.attachMedia(Zt)}}})};Object(l.useEffect)(function(){if(Zr.current&&$r&&($r.match(wr)&&window.PR.prettyPrint()),Zr.current)return Zr.current.addEventListener("click",Mn),function(){Zr.current.removeEventListener("click",Mn),fe(),B()}},[$r,Zr.current,Mn]);var Pn=function($t){if(!ye)return;$t.target.nodeName==="IMG"?(yr.current.style.display="flex",yr.current.style.width=$t.target.clientWidth+"px",yr.current.style.height=$t.target.clientHeight+"px",yr.current.style.top=$t.target.offsetTop+"px",yr.current.style.left=$t.target.offsetLeft+"px",Jr.current.src=$t.target.getAttribute("src")):yr.current.style.display="none"};return a.a.createElement("div",{style:{position:"relative"}},a.a.createElement("div",{ref:Zr,style:Object(y.a)({},Yt),className:"".concat(re||""," markdown-body ").concat(Hr.a.mdBody),onMouseOver:Pn,dangerouslySetInnerHTML:{__html:$r}}),a.a.createElement("div",{ref:yr,className:Hr.a.button},a.a.createElement(i.a,null,a.a.createElement(_.a,{onClick:function(){return ti()}},"\u88C1\u526A"),a.a.createElement(_.a,{onClick:function(){return Wn()}},"\u7F16\u8F91"))),a.a.createElement("img",{ref:Jr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),a.a.createElement(ve.a,{close:!0,data:Nr,hasMask:tt,type:Nr!=null&&Nr.length?pn:"",style:Object(y.a)({},Vr),onClose:function(){return xn("")}}))}},"9OqN":function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.CTR=function(){var i=h.lib.BlockCipherMode.extend(),S=i.Encryptor=i.extend({processBlock:function(_,y){var p=this._cipher,d=p.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.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 a=0;a<d;a++)_[y+a]^=l[a]}});return i.Decryptor=S,i}(),h.mode.CTR})},"9VGf":function(u,G,c){"use strict";c.d(G,"a",function(){return S});var h=c("q1tI"),i=c.n(h);function S(_,y){var p=Object(h.useRef)();Object(h.useEffect)(function(){p.current=_}),Object(h.useEffect)(function(){function d(){p.current()}if(y!==null){var o=setInterval(d,y);return function(){return clearInterval(o)}}},[y])}},ALsQ:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.CFB=function(){var i=h.lib.BlockCipherMode.extend();i.Encryptor=i.extend({processBlock:function(_,y){var p=this._cipher,d=p.blockSize;S.call(this,_,y,d,p),this._prevBlock=_.slice(y,y+d)}}),i.Decryptor=i.extend({processBlock:function(_,y){var p=this._cipher,d=p.blockSize,o=_.slice(y,y+d);S.call(this,_,y,d,p),this._prevBlock=o}});function S(_,y,p,d){var o,s=this._iv;s?(o=s.slice(0),this._iv=void 0):o=this._prevBlock,d.encryptBlock(o,0);for(var l=0;l<p;l++)_[y+l]^=o[l]}return i}(),h.mode.CFB})},B7Ph:function(u,G,c){"use strict";c.d(G,"a",function(){return z});var h=c("5NDa"),i=c("5rEg"),S=c("+L6B"),_=c("2/Rp"),y=c("2qtc"),p=c("kLXV"),d=c("k1fw"),o=c("miYZ"),s=c("tsqr"),l=c("9og8"),a=c("tJVT"),g=c("oBTY"),m=c("DZo9"),v=c("8z0m"),w=c("WmNS"),E=c.n(w),k=c("q1tI"),T=c.n(k),D=c("Bvq2"),I=c.n(D),B=c("nj2k"),N=c.n(B),x=c("mxV5"),Y=c.n(x),V=c("KhGG"),P=c("ErOA"),F=c("7Cbv"),X=c("1vsH"),Q=v.a.Dragger,ce=function(J){for(var j=function(ae){return ae&&ae.substring(0,ae.lastIndexOf("."))},U=Object(g.a)(J),R=0,C=[],M=0;M<U.length;M++){for(var le="",he=0;he<C.length;he++)if(j(C[he][0].name)==j(U[M].name)){R=1,le=he;break}if(R==1)C[le].push(U[M]),R=0;else if(R==0){var ve=new Array;ve.push(U[M]),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(J){var j=J.onClose,U=J.onOK,R=J.visible,C=J.wrapClassName,M=J.rootIdentifier,le=Object(k.useState)([]),he=Object(a.a)(le,2),ve=he[0],Ee=he[1],Se=Object(k.useState)({}),ae=Object(a.a)(Se,2),pe=ae[0],me=ae[1],ee=Object(k.useState)(!1),ne=Object(a.a)(ee,2),Z=ne[0],ue=ne[1],K=Object(k.useRef)([]),$=Object(k.useRef)(0),Ce=function(){j()};Object(k.useEffect)(function(){q()},[]),Object(k.useEffect)(function(){R&&(K.current=[],$.current=0,Ee([]))},[R]);var q=function(){var Be=Object(l.a)(E.a.mark(function Fe(){var Ue,Ge;return E.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(V.a)(Ue.data)),me(Ge),Xe.next=11;break;case 8:Xe.prev=8,Xe.t0=Xe.catch(0),s.b.error(Xe.t0);case 11: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("."))},O=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});K.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(M,"/").concat(Xe).concat(Ge.indexOf(".")>-1?"."+Ge.split(".").pop():"");M===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){$.current=$.current+1;var nt=K.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(d.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(K.current=Object(g.a)(nt),Ee(Object(g.a)(nt)),$.current>0&&$.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(d.a)(Object(d.a)(Object(d.a)({},Ve[0]),Ve[1]),{},{is_file:!0})}),U(ot),j()}}})},we=function(){if(ve.length===0){s.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)(E.a.mark(function Ye(){return E.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:ve.map(function(){var Ne=Object(l.a)(E.a.mark(function nt(ot){return E.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)(E.a.mark(function Ge(Ye){return E.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)}}())},be={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 s.b.info("".concat(Fe.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Fe.size/1024/1024>100)return s.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Fe.name))return s.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),K.current=Object(g.a)(ve),Ee(Object(g.a)(ve)),!1}},Oe=ce(ve);return console.log(ve,Oe,"fileList"),T.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"},T.a.createElement("div",{className:I.a.wrap},ve.length?T.a.createElement("div",null,T.a.createElement(v.a,be,T.a.createElement(_.a,{className:I.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),T.a.createElement(z,{data:Oe,onRemove:O})):T.a.createElement("div",{className:I.a.noData},T.a.createElement("img",{src:N.a,alt:""}),T.a.createElement(v.a,be,T.a.createElement(_.a,{className:I.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),T.a.createElement("div",{className:I.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",T.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",T.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",T.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(J){var j=J.data,U=j===void 0?[]:j,R=J.onRemove,C=J.width,M=C===void 0?"auto":C,le=J.showScore,he=le===void 0?!1:le,ve=J.disabled,Ee=ve===void 0?!1:ve,Se=J.inputChange,ae=function(ne){var Z=document.createElement("a");document.body.appendChild(Z);var ue=URL.createObjectURL(ne.file);Z.href=ue,Z.download=ne.name,Z.click(),URL.revokeObjectURL(ue),document.body.removeChild(Z)},pe=function(ne,Z){Object(X.w)(ne,Z)},me=function(ne,Z){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:T.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){R(ne,Z)},onCancel:function(){}})};return U.length?T.a.createElement("div",{style:{width:M}},T.a.createElement("div",{className:I.a.head},T.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),T.a.createElement("div",{style:{width:he?"25%":"35%"}},"\u8F93\u5165"),T.a.createElement("div",{style:{width:he?"25%":"35%"}},"\u8F93\u51FA"),he&&T.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),T.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),U.map(function(ee,ne){var Z,ue,K,$;return T.a.createElement("div",{key:ne,className:I.a.list},T.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",ne+1),T.a.createElement("div",{className:I.a.info,style:{width:he?"25%":"35%"}},T.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))),T.a.createElement("div",{className:I.a.info,style:{width:he?"25%":"35%"}},T.a.createElement("span",{title:ee.output||((K=ee[1])===null||K===void 0?void 0:K.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||(($=ee[1])===null||$===void 0?void 0:$.name))),he&&T.a.createElement("div",{style:{width:"20%"}},T.a.createElement(i.a,{disabled:Ee,style:{width:"70%"},onChange:function(q){return Se(q,ne)},value:ee.score}),T.a.createElement("span",null,"\xA0%")),T.a.createElement("div",{onClick:function(){return me(ee,ne)},style:{width:"10%"}},T.a.createElement("span",{className:I.a.del},"\u5220\u9664")))})):T.a.createElement(T.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,a){if(a!=h.Init&&a&&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 _(m)}),s.addKeyMap(g)});var i=["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 _(s){if(s.getOption("disableInput"))return h.Pass;for(var l=s.listSelections(),a=[],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),E=h.innerMode(s.getMode(),w.state),k=E.state,T=E.mode.xmlCurrentTag&&E.mode.xmlCurrentTag(k),D=T&&T.name;if(!D)return h.Pass;var I=E.mode.configuration=="html",B=typeof g=="object"&&g.dontCloseTags||I&&i,N=typeof g=="object"&&g.indentTags||I&&S;w.end>v.ch&&(D=D.slice(0,D.length-w.end+v.ch));var x=D.toLowerCase();if(!D||w.type=="string"&&(w.end!=v.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&T.close||w.string.indexOf("/")==v.ch-w.start-1||B&&d(B,x)>-1||o(s,E.mode.xmlCurrentContext&&E.mode.xmlCurrentContext(k)||[],D,v,!0))return h.Pass;var Y=typeof g=="object"&&g.emptyTags;if(Y&&d(Y,D)>-1){a[m]={text:"/>",newPos:h.Pos(v.line,v.ch+2)};continue}var V=N&&d(N,x)>-1;a[m]={indent:V,text:">"+(V?`
`:"")+"</"+D+">",newPos:V?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=a[m];s.replaceRange(F.text,l[m].head,l[m].anchor,"+insert");var X=s.listSelections().slice(0);X[m]={head:F.newPos,anchor:F.newPos},s.setSelections(X),!P&&F.indent&&(s.indentLine(F.newPos.line,null,!0),s.indentLine(F.newPos.line+1,null,!0))}}function y(s,l){for(var a=s.listSelections(),g=[],m=l?"/":"</",v=s.getOption("autoCloseTags"),w=typeof v=="object"&&v.dontIndentOnSlash,E=0;E<a.length;E++){if(!a[E].empty())return h.Pass;var k=a[E].head,T=s.getTokenAt(k),D=h.innerMode(s.getMode(),T.state),I=D.state;if(l&&(T.type=="string"||T.string.charAt(0)!="<"||T.start!=k.ch-1))return h.Pass;var B,N=D.mode.name!="xml"&&s.getMode().name=="htmlmixed";if(N&&D.mode.name=="javascript")B=m+"script";else if(N&&D.mode.name=="css")B=m+"style";else{var x=D.mode.xmlCurrentContext&&D.mode.xmlCurrentContext(I);if(!x||x.length&&o(s,x,x[x.length-1],k))return h.Pass;B=m+x[x.length-1]}s.getLine(k.line).charAt(T.end)!=">"&&(B+=">"),g[E]=B}if(s.replaceSelections(g),a=s.listSelections(),!w)for(var E=0;E<a.length;E++)(E==a.length-1||a[E].head.line<a[E+1].head.line)&&s.indentLine(a[E].head.line)}function p(s){return s.getOption("disableInput")?h.Pass:y(s,!0)}h.commands.closeTag=function(s){return y(s)};function d(s,l){if(s.indexOf)return s.indexOf(l);for(var a=0,g=s.length;a<g;++a)if(s[a]==l)return a;return-1}function o(s,l,a,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!=a)return!1;for(var E=m?1:0,k=l.length-1;k>=0&&l[k]==a;k--)++E;g=w.to;for(var k=1;k<E;k++){var T=h.scanForClosingTag(s,g,null,v);if(!T||T.tag!=a)return!1;g=T.to}return!0}})},BjJ7:function(u,G,c){"use strict";c.d(G,"d",function(){return i}),c.d(G,"c",function(){return S}),c.d(G,"e",function(){return _}),c.d(G,"b",function(){return y}),c.d(G,"a",function(){return d});var h=c("m3rI");function i(o){var s=!0;if(o.length>0){for(var l=0;l<o.length;l++)if(o[l].compile_success==0||!o[l].compile_success){s=!1;break}}else s=!1;return s}function S(o){for(var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=[],a=0;a<o.length;a++){var g=o[a],m=s?"".concat(s,"/").concat(g.name):"".concat(g.name);l.push({title:g.name,isLeaf:!(g.type==="tree"),key:m})}return l}function _(o,s,l){for(var a=0;a<o.length;a++){var g=o[a];if(g.key===s){g.children=l;break}g.children&&_(g.children,s,l)}return o}function y(o,s,l){var a;return function(){var g=this,m=arguments,v=function(){a=null,l||o.apply(g,m)},w=l&&!a;clearTimeout(a),a=setTimeout(v,s),w&&o.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"),i=h.Global;u.exports={name:"sessionStorage",read:_,write:y,each:p,remove:d,clearAll:o};function S(){return i.sessionStorage}function _(s){return S().getItem(s)}function y(s,l){return S().setItem(s,l)}function p(s){for(var l=S().length-1;l>=0;l--){var a=S().key(l);s(_(a),a)}}function d(s){return S().removeItem(s)}function o(){return S().clear()}},D1Df:function(u,G,c){"use strict";function h(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(J){return typeof J}:h=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},h(z)}function i(){return i=Object.assign||function(z){for(var se=1;se<arguments.length;se++){var J=arguments[se];for(var j in J)Object.prototype.hasOwnProperty.call(J,j)&&(z[j]=J[j])}return z},i.apply(this,arguments)}function S(z,se){var J=Object.keys(z);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(z);se&&(j=j.filter(function(U){return Object.getOwnPropertyDescriptor(z,U).enumerable})),J.push.apply(J,j)}return J}function _(z){for(var se=1;se<arguments.length;se++){var J=arguments[se]!=null?arguments[se]:{};se%2?S(J,!0).forEach(function(j){w(z,j,J[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(J)):S(J).forEach(function(j){Object.defineProperty(z,j,Object.getOwnPropertyDescriptor(J,j))})}return z}function y(z,se){if(z==null)return{};var J=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[j]=z[j]}}return J}function p(z,se){if(z==null)return{};var J={},j=Object.keys(z),U,R;for(R=0;R<j.length;R++){if(U=j[R],se.indexOf(U)>=0)continue;J[U]=z[U]}return J}function d(z,se){if(!(z instanceof se))throw new TypeError("Cannot call a class as a function")}function o(z,se){for(var J=0;J<se.length;J++){var j=se[J];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(z,j.key,j)}}function s(z,se,J){return se&&o(z.prototype,se),J&&o(z,J),z}function l(z,se){return se&&(h(se)==="object"||typeof se=="function")?se:g(z)}function a(z){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(J){return J.__proto__||Object.getPrototypeOf(J)},a(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,J){return se in z?Object.defineProperty(z,se,{value:J,enumerable:!0,configurable:!0,writable:!0}):z[se]=J,z}var E=c("q1tI"),k=c("17x9"),T=c("H38U"),D=c("aRTE");function I(z){for(var se="",J=0;J<z.length;J++){var j=z.charCodeAt(J);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++,j=65536+((j&1023)<<10|z.charCodeAt(J)&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={},x=4,Y=.1;function V(z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,J=[];return z.forEach(function(j,U){var R=null;j.forEach(function(C,M){if(!C&&R!==null){J.push("M".concat(R+se," ").concat(U+se,"h").concat(M-R,"v1H").concat(R+se,"z")),R=null;return}if(M===j.length-1){if(!C)return;R===null?J.push("M".concat(M+se,",").concat(U+se," h1v1H").concat(M+se,"z")):J.push("M".concat(R+se,",").concat(U+se," h").concat(M+1-R,"v1H").concat(R+se,"z"));return}C&&R===null&&(R=M)})}),J.join("")}function P(z,se){return z.slice().map(function(J,j){return j<se.y||j>=se.y+se.h?J:J.map(function(U,R){return R<se.x||R>=se.x+se.w?U:!1})})}function F(z,se){var J=z.imageSettings,j=z.size,U=z.includeMargin;if(J==null)return null;var R=U?x:0,C=se.length+R*2,M=Math.floor(j*Y),le=C/j,he=(J.width||M)*le,ve=(J.height||M)*le,Ee=J.x==null?se.length/2-he/2:J.x*le,Se=J.y==null?se.length/2-ve/2:J.y*le,ae=null;if(J.excavate){var pe=Math.floor(Ee),me=Math.floor(Se),ee=Math.ceil(he+Ee-pe),ne=Math.ceil(ve+Se-me);ae={x:pe,y:me,w:ee,h:ne}}return{x:Ee,y:Se,h:ve,w:he,excavation:ae}}var X=function(){try{new Path2D().addPath(new Path2D)}catch(z){return!1}return!0}(),Q=function(z){m(se,z);function se(){var J,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,(J=a(se)).call.apply(J,[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,M=j.bgColor,le=j.fgColor,he=j.includeMargin,ve=j.imageSettings,Ee=new T(-1,D[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?x:0,ee=pe.length+me*2,ne=F(this.props,pe);ve!=null&&ne!=null&&(ne.excavation!=null&&(pe=P(pe,ne.excavation)));var Z=window.devicePixelRatio||1;Se.height=Se.width=R*Z;var ue=R/ee*Z;ae.scale(ue,ue),ae.fillStyle=M,ae.fillRect(0,0,ee,ee),ae.fillStyle=le,X?ae.fill(new Path2D(V(pe,me))):pe.forEach(function(K,$){K.forEach(function(Ce,q){Ce&&ae.fillRect(q+me,$+me,1,1)})}),this.state.imgLoaded&&this._image&&ne!=null&&ae.drawImage(this._image,ne.x+me,ne.y+me,ne.w,ne.h)}}},{key:"render",value:function(){var j=this,U=this.props,R=U.value,C=U.size,M=U.level,le=U.bgColor,he=U.fgColor,ve=U.style,Ee=U.includeMargin,Se=U.imageSettings,ae=y(U,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),pe=_({height:C,width:C},ve),me=null,ee=Se&&Se.src;return Se!=null&&ee!=null&&(me=E.createElement("img",{src:ee,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Z){return j._image=Z}})),E.createElement(E.Fragment,null,E.createElement("canvas",i({style:pe,height:C,width:C,ref:function(Z){return j._canvas=Z}},ae)),me)}}]),se}(E.PureComponent);w(Q,"defaultProps",B);var ce=function(z){m(se,z);function se(){return d(this,se),l(this,a(se).apply(this,arguments))}return s(se,[{key:"render",value:function(){var j=this.props,U=j.value,R=j.size,C=j.level,M=j.bgColor,le=j.fgColor,he=j.includeMargin,ve=j.imageSettings,Ee=y(j,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),Se=new T(-1,D[C]);Se.addData(I(U)),Se.make();var ae=Se.modules;if(ae===null)return null;var pe=he?x:0,me=ae.length+pe*2,ee=F(this.props,ae),ne=null;ve!=null&&ee!=null&&(ee.excavation!=null&&(ae=P(ae,ee.excavation)),ne=E.createElement("image",{xlinkHref:ve.src,height:ee.h,width:ee.w,x:ee.x+pe,y:ee.y+pe,preserveAspectRatio:"none"}));var Z=V(ae,pe);return E.createElement("svg",i({shapeRendering:"crispEdges",height:R,width:R,viewBox:"0 0 ".concat(me," ").concat(me)},Ee),E.createElement("path",{fill:M,d:"M0,0 h".concat(me,"v").concat(me,"H0z")}),E.createElement("path",{fill:le,d:Z}),ne)}}]),se}(E.PureComponent);w(ce,"defaultProps",B);var fe=function(se){var J=se.renderAs,j=y(se,["renderAs"]),U=J==="svg"?ce:Q;return E.createElement(U,j)};fe.defaultProps=_({renderAs:"canvas"},B),u.exports=fe},DlQD:function(u,G,c){(function(h,i){u.exports=i()})(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 i(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 _(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 _(Ie,De)}function _(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 y(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}}),o=d.defaults,s=d.getDefaults,l=d.changeDefaults,a=/[&<>"']/,g=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,v=/[<>"']|&(?!#?\w+;)/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},E=function(De){return w[De]};function k(Ie,De){if(De){if(a.test(Ie))return Ie.replace(g,E)}else if(m.test(Ie))return Ie.replace(v,E);return Ie}var T=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function D(Ie){return Ie.replace(T,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,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Y(Ie,De,Le){if(Ie){var _e;try{_e=decodeURIComponent(D(Le)).replace(N,"").toLowerCase()}catch(Te){return null}if(_e.indexOf("javascript:")===0||_e.indexOf("vbscript:")===0||_e.indexOf("data:")===0)return null}De&&!x.test(Le)&&(Le=Q(De,Le));try{Le=encodeURI(Le).replace(/%25/g,"%")}catch(Te){return null}return Le}var V={},P=/^[^:]+:\/*[^/]*$/,F=/^([^:]+:)[\s\S]*$/,X=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Q(Ie,De){V[" "+Ie]||(P.test(Ie)?V[" "+Ie]=Ie+"/":V[" "+Ie]=se(Ie,"/",!0)),Ie=V[" "+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(X,"$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 J(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:D,edit:B,cleanUrl:Y,resolveUrl:Q,noopTest:ce,merge:fe,splitCells:z,rtrim:se,findClosingBracket:J,checkSanitizeDeprecation:j},R=d.defaults,C=U.rtrim,M=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:M(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]=M(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,Ut,Vt,Xt=ht.length,At=0;At<Xt;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!==Xt-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=Xt-1)),St=Tt||/\n\n(?!\s*$)/.test(qe),At!==Xt-1&&(Tt=qe.charAt(qe.length-1)===`
`,St||(St=Tt)),St&&(Ze.loose=!0),Ut=/^\[[ xX]\] /.test(qe),Vt=void 0,Ut&&(Vt=qe[1]!==" ",qe=qe.replace(/^\[[ xX]\] +/,"")),Ze.items.push({type:"list_item",raw:ke,task:Ut,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:M(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]=M(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 ne={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])/};ne._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ne.punctuation=pe(ne.punctuation).replace(/punctuation/g,ne._punctuation).getRegex(),ne._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ne._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ne.em.start=pe(ne.em.start).replace(/punctuation/g,ne._punctuation).getRegex(),ne.em.middle=pe(ne.em.middle).replace(/punctuation/g,ne._punctuation).replace(/overlapSkip/g,ne._overlapSkip).getRegex(),ne.em.endAst=pe(ne.em.endAst,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.em.endUnd=pe(ne.em.endUnd,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.strong.start=pe(ne.strong.start).replace(/punctuation/g,ne._punctuation).getRegex(),ne.strong.middle=pe(ne.strong.middle).replace(/punctuation/g,ne._punctuation).replace(/blockSkip/g,ne._blockSkip).getRegex(),ne.strong.endAst=pe(ne.strong.endAst,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.strong.endUnd=pe(ne.strong.endUnd,"g").replace(/punctuation/g,ne._punctuation).getRegex(),ne.blockSkip=pe(ne._blockSkip,"g").getRegex(),ne.overlapSkip=pe(ne._overlapSkip,"g").getRegex(),ne._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ne._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ne._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])?)+(?![-_])/,ne.autolink=pe(ne.autolink).replace("scheme",ne._scheme).replace("email",ne._email).getRegex(),ne._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ne.tag=pe(ne.tag).replace("comment",ee._comment).replace("attribute",ne._attribute).getRegex(),ne._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ne._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ne._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ne.link=pe(ne.link).replace("label",ne._label).replace("href",ne._href).replace("title",ne._title).getRegex(),ne.reflink=pe(ne.reflink).replace("label",ne._label).getRegex(),ne.reflinkSearch=pe(ne.reflinkSearch,"g").replace("reflink",ne.reflink).replace("nolink",ne.nolink).getRegex(),ne.normal=me({},ne),ne.pedantic=me({},ne.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",ne._label).getRegex(),reflink:pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ne._label).getRegex()}),ne.gfm=me({},ne.normal,{escape:pe(ne.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ne.gfm.url=pe(ne.gfm.url,"i").replace("email",ne.gfm._extended_email).getRegex(),ne.breaks=me({},ne.gfm,{br:pe(ne.br).replace("{2,}","*").getRegex(),text:pe(ne.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Z={block:ee,inline:ne},ue=d.defaults,K=Z.block,$=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:K.normal,inline:$.normal};this.options.pedantic?(_e.block=K.pedantic,_e.inline=$.pedantic):this.options.gfm&&(_e.block=K.gfm,this.options.breaks?_e.inline=$.breaks:_e.inline=$.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},i(Ie,null,[{key:"rules",get:function(){return{block:K,inline:$}}}]),Ie}(),O=d.defaults,W=U.cleanUrl,we=U.escape,be=function(){function Ie(Le){this.options=Le||O}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 be,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,Ut,Vt,Xt,At,Ft,or,Ct,kr=_e.length;for(Ae=0;Ae<kr;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,Ut=st.start,Vt=st.loose,Ze=st.items.length,dt="",ze=0;ze<Ze;ze++)At=st.items[ze],Ft=At.checked,or=At.task,Xt="",At.task&&(Ct=this.renderer.checkbox(Ft),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}):Xt+=Ct),Xt+=this.parse(At.tokens,Vt),dt+=this.renderer.listitem(Xt,or,Ft);ke+=this.renderer.list(dt,St,Ut);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<kr&&_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 be,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=y(Ie),_e;!(_e=Le()).done;){var Te=_e.value;De(Te);switch(Te.type){case"table":{for(var ke=y(Te.tokens.header),Ae;!(Ae=ke()).done;){var ze=Ae.value;Ve.walkTokens(ze,De)}for(var je=y(Te.tokens.cells),Ze;!(Ze=je()).done;)for(var ht=Ze.value,Tt=y(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=be,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"),i=h.Global,S=h.trim;u.exports={name:"cookieStorage",read:y,write:d,each:p,remove:o,clearAll:s};var _=i.document;function y(a){if(!a||!l(a))return null;var g="(?:^|.*;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(_.cookie.replace(new RegExp(g),"$1"))}function p(a){for(var g=_.cookie.split(/; ?/g),m=g.length-1;m>=0;m--){if(!S(g[m]))continue;var v=g[m].split("="),w=unescape(v[0]),E=unescape(v[1]);a(E,w)}}function d(a,g){if(!a)return;_.cookie=escape(a)+"="+escape(g)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function o(a){if(!a||!l(a))return;_.cookie=escape(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function s(){p(function(a,g){o(g)})}function l(a){return new RegExp("(?:^|;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(_.cookie)}},E4JC:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.StreamCipher,y=i.algo,p=[],d=[],o=[],s=y.Rabbit=_.extend({_doReset:function(){for(var a=this._key.words,g=this.cfg.iv,m=0;m<4;m++)a[m]=(a[m]<<8|a[m]>>>24)&16711935|(a[m]<<24|a[m]>>>8)&4278255360;var v=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],w=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[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 E=g.words,k=E[0],T=E[1],D=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,I=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,B=D>>>16|I&4294901760,N=I<<16|D&65535;w[0]^=D,w[1]^=B,w[2]^=I,w[3]^=N,w[4]^=D,w[5]^=B,w[6]^=I,w[7]^=N;for(var m=0;m<4;m++)l.call(this)}},_doProcessBlock:function(a,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,a[g+v]^=p[v]},blockSize:128/32,ivSize:64/32});function l(){for(var a=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=a[m]+g[m],w=v&65535,E=v>>>16,k=((w*w>>>17)+w*E>>>15)+E*E,T=((v&4294901760)*v|0)+((v&65535)*v|0);o[m]=k^T}a[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,a[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,a[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,a[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,a[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,a[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,a[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,a[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}i.Rabbit=_._createHelper(s)}(),h.Rabbit})},EHPI:function(u,G,c){"use strict";var h=c("bbsP"),i=c("/wGt"),S=c("tJVT"),_=c("k1fw"),y=c("q1tI"),p=c.n(y),d=c("ZW9T"),o=c("ZD9Y"),s=c("M8RZ"),l=c("bCnd"),a=c("fcyK"),g=c.n(a),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,T){switch(T.type){case v.set_show_editor_setting:return Object(_.a)(Object(_.a)({},k),{},{showEditorSetting:T.payload});case v.set_theme:return Object(_.a)(Object(_.a)({},k),{},{theme:T.payload});case v.set_font_size:return Object(_.a)(Object(_.a)({},k),{},{fontSize:T.payload});case v.on_tab_to_space:return Object(_.a)(Object(_.a)({},k),{},{tabToSpace:T.payload});default:throw new Error}}G.a=function(k){var T=k.value,D=k.onChange,I=k.language,B=k.ActionBarRender,N=B===void 0?function(j){return p.a.createElement(E,{onShowCodeSetting:j})}:B,x=Object(y.useReducer)(w,m),Y=Object(S.a)(x,2),V=Y[0],P=Y[1],F=V.theme,X=V.fontSize,Q=V.showEditorSetting,ce=V.tabToSpace,fe={onFontSizeChange:function(U){P({type:v.set_font_size,payload:U}),Object(l.b)("cmFontSize",U)},tabToSpace:ce,cmFontSize:X,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 J={value:T,language:I,onChange:D,theme:F,height:"calc(100% - 56px)",options:{fontSize:X,insertSpaces:ce}};return p.a.createElement(y.Fragment,null,p.a.createElement("div",{className:"code-panel-container"},N(se),p.a.createElement(d.b,J)),p.a.createElement(s.a,null,p.a.createElement(i.a,{className:"oj",title:null,placement:"right",closable:!1,visible:Q,onClose:z},p.a.createElement(o.a,fe))))};function E(k){var T=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:T},p.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(u,G,c){(function(h){h(c("VrN/"))})(function(h){var i={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=h.Pos;h.defineOption("autoCloseBrackets",!1,function(w,E,k){k&&k!=h.Init&&(w.removeKeyMap(y),w.state.closeBrackets=null),E&&(p(_(E,"pairs")),w.state.closeBrackets=E,w.addKeyMap(y))});function _(w,E){return E=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[E]!=null?w[E]:i[E]}var y={Backspace:s,Enter:l};function p(w){for(var E=0;E<w.length;E++){var k=w.charAt(E),T="'"+k+"'";y[T]||(y[T]=d(k))}}p(i.pairs+"`");function d(w){return function(E){return g(E,w)}}function o(w){var E=w.state.closeBrackets;if(!E||E.override)return E;var k=w.getModeAt(w.getCursor());return k.closeBrackets||E}function s(w){var E=o(w);if(!E||w.getOption("disableInput"))return h.Pass;for(var k=_(E,"pairs"),T=w.listSelections(),D=0;D<T.length;D++){if(!T[D].empty())return h.Pass;var I=m(w,T[D].head);if(!I||k.indexOf(I)%2!=0)return h.Pass}for(var D=T.length-1;D>=0;D--){var B=T[D].head;w.replaceRange("",S(B.line,B.ch-1),S(B.line,B.ch+1),"+delete")}}function l(w){var E=o(w),k=E&&_(E,"explode");if(!k||w.getOption("disableInput"))return h.Pass;for(var T=w.listSelections(),D=0;D<T.length;D++){if(!T[D].empty())return h.Pass;var I=m(w,T[D].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"),T=w.listSelections();for(var N=0;N<T.length;N++){var x=T[N].head.line;w.indentLine(x,null,!0),w.indentLine(x+1,null,!0)}})}function a(w){var E=h.cmpPos(w.anchor,w.head)>0;return{anchor:new S(w.anchor.line,w.anchor.ch+(E?-1:1)),head:new S(w.head.line,w.head.ch+(E?1:-1))}}function g(w,E){var k=o(w);if(!k||w.getOption("disableInput"))return h.Pass;var T=_(k,"pairs"),D=T.indexOf(E);if(D==-1)return h.Pass;for(var I=_(k,"closeBefore"),B=_(k,"triples"),N=T.charAt(D+1)==E,x=w.listSelections(),Y=D%2==0,V,P=0;P<x.length;P++){var F=x[P],X=F.head,Q,ce=w.getRange(X,S(X.line,X.ch+1));if(Y&&!F.empty())Q="surround";else if((N||!Y)&&ce==E)N&&v(w,X)?Q="both":B.indexOf(E)>=0&&w.getRange(X,S(X.line,X.ch+3))==E+E+E?Q="skipThree":Q="skip";else if(N&&X.ch>1&&B.indexOf(E)>=0&&w.getRange(S(X.line,X.ch-2),X)==E+E){if(X.ch>2&&/\bstring/.test(w.getTokenTypeAt(S(X.line,X.ch-2))))return h.Pass;Q="addFour"}else if(N){var fe=X.ch==0?" ":w.getRange(S(X.line,X.ch-1),X);if(!h.isWordChar(ce)&&fe!=E&&!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(!V)V=Q;else if(V!=Q)return h.Pass}var z=D%2?T.charAt(D-1):E,se=D%2?E:T.charAt(D+1);w.operation(function(){if(V=="skip")w.execCommand("goCharRight");else if(V=="skipThree")for(var J=0;J<3;J++)w.execCommand("goCharRight");else if(V=="surround"){for(var j=w.getSelections(),J=0;J<j.length;J++)j[J]=z+j[J]+se;w.replaceSelections(j,"around"),j=w.listSelections().slice();for(var J=0;J<j.length;J++)j[J]=a(j[J]);w.setSelections(j)}else V=="both"?(w.replaceSelection(z+se,null),w.triggerElectric(z+se),w.execCommand("goCharLeft")):V=="addFour"&&(w.replaceSelection(z+z+z+z,"before"),w.execCommand("goCharRight"))})}function m(w,E){var k=w.getRange(S(E.line,E.ch-1),S(E.line,E.ch+1));return k.length==2?k:null}function v(w,E){var k=w.getTokenAt(S(E.line,E.ch+1));return/\bstring/.test(k.type)&&k.start==E.ch&&(E.ch==0||!/\bstring/.test(w.getTokenTypeAt(E)))}})},ELcG:function(u,G,c){(function(h,i){u.exports=G=i(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(i){var S=h,_=S.lib,y=_.WordArray,p=_.Hasher,d=S.algo,o=y.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=y.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=y.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]),a=y.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=y.create([0,1518500249,1859775393,2400959708,2840853838]),m=y.create([1352829926,1548603684,1836072691,2053994217,0]),v=d.RIPEMD160=p.extend({_doReset:function(){this._hash=y.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(B,N){for(var x=0;x<16;x++){var Y=N+x,V=B[Y];B[Y]=(V<<8|V>>>24)&16711935|(V<<24|V>>>8)&4278255360}var P=this._hash.words,F=g.words,X=m.words,Q=o.words,ce=s.words,fe=l.words,z=a.words,se,J,j,U,R,C,M,le,he,ve;C=se=P[0],M=J=P[1],le=j=P[2],he=U=P[3],ve=R=P[4];for(var Ee,x=0;x<80;x+=1)Ee=se+B[N+Q[x]]|0,x<16?Ee+=w(J,j,U)+F[0]:x<32?Ee+=E(J,j,U)+F[1]:x<48?Ee+=k(J,j,U)+F[2]:x<64?Ee+=T(J,j,U)+F[3]:Ee+=D(J,j,U)+F[4],Ee=Ee|0,Ee=I(Ee,fe[x]),Ee=Ee+R|0,se=R,R=U,U=I(j,10),j=J,J=Ee,Ee=C+B[N+ce[x]]|0,x<16?Ee+=D(M,le,he)+X[0]:x<32?Ee+=T(M,le,he)+X[1]:x<48?Ee+=k(M,le,he)+X[2]:x<64?Ee+=E(M,le,he)+X[3]:Ee+=w(M,le,he)+X[4],Ee=Ee|0,Ee=I(Ee,z[x]),Ee=Ee+ve|0,C=ve,ve=he,he=I(le,10),le=M,M=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+M|0,P[4]=P[0]+J+le|0,P[0]=Ee},_doFinalize:function(){var B=this._data,N=B.words,x=this._nDataBytes*8,Y=B.sigBytes*8;N[Y>>>5]|=128<<24-Y%32,N[(Y+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,B.sigBytes=(N.length+1)*4,this._process();for(var V=this._hash,P=V.words,F=0;F<5;F++){var X=P[F];P[F]=(X<<8|X>>>24)&16711935|(X<<24|X>>>8)&4278255360}return V},clone:function(){var B=p.clone.call(this);return B._hash=this._hash.clone(),B}});function w(B,N,x){return B^N^x}function E(B,N,x){return B&N|~B&x}function k(B,N,x){return(B|~N)^x}function T(B,N,x){return B&x|N&~x}function D(B,N,x){return B^(N|~x)}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,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.WordArray,y=i.enc,p=y.Base64={stringify:function(o){var s=o.words,l=o.sigBytes,a=this._map;o.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,E=s[m+2>>>2]>>>24-(m+2)%4*8&255,k=v<<16|w<<8|E,T=0;T<4&&m+T*.75<l;T++)g.push(a.charAt(k>>>6*(3-T)&63));var D=a.charAt(64);if(D)for(;g.length%4;)g.push(D);return g.join("")},parse:function(o){var s=o.length,l=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var g=0;g<l.length;g++)a[l.charCodeAt(g)]=g}var m=l.charAt(64);if(m){var v=o.indexOf(m);v!==-1&&(s=v)}return d(o,s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(o,s,l){for(var a=[],g=0,m=0;m<s;m++)if(m%4){var v=l[o.charCodeAt(m-1)]<<m%4*2,w=l[o.charCodeAt(m)]>>>6-m%4*2,E=v|w;a[g>>>2]|=E<<24-g%4*8,g++}return _.create(a,g)}}(),h.enc.Base64})},"F+F2":function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(){if(typeof ArrayBuffer!="function")return;var i=h,S=i.lib,_=S.WordArray,y=_.init,p=_.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 o=d.byteLength,s=[],l=0;l<o;l++)s[l>>>2]|=d[l]<<24-l%4*8;y.call(this,s,o)}else y.apply(this,arguments)};p.prototype=_}(),h.lib.WordArray})},GRuw:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("lPiR"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.WordArray,y=i.algo,p=y.SHA256,d=y.SHA224=p.extend({_doReset:function(){this._hash=new _.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var o=p._doFinalize.call(this);return o.sigBytes-=4,o}});i.SHA224=p._createHelper(d),i.HmacSHA224=p._createHmacHelper(d)}(),h.SHA224})},GfqC:function(u,G,c){"use strict";var h=c("q1tI"),i=c.n(h),S=c("TSYQ"),_=c.n(S);function y(U,R){var C="cannot "+U.method+" "+U.action+" "+R.status+"'",M=new Error(C);return M.status=R.status,M.method=U.method,M.url=U.action,M}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(y(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 M=U.headers||{};return M["X-Requested-With"]!==null&&R.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(M).forEach(function(le){M[le]!==null&&R.setRequestHeader(le,M[le])}),R.send(C),{abort:function(){R.abort()}}}var o=+new Date,s=0;function l(){return"rc-upload-"+o+"-"+ ++s}function a(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(","),M=U.name||"",le=U.type||"",he=le.replace(/\/.*$/,"");return C.some(function(ve){var Ee=ve.trim();return Ee.charAt(0)==="."?a(M.toLowerCase(),Ee.toLowerCase()):/\/\*$/.test(Ee)?he===Ee.replace(/\/.*$/,""):le===Ee})}return!0};function m(U,R){var C=U.createReader(),M=[];function le(){C.readEntries(function(he){var ve=Array.prototype.slice.apply(he);M=M.concat(ve);var Ee=!ve.length;Ee?R(M):le()})}le()}var v=function(R,C,M){var le=function he(ve,Ee){Ee=Ee||"",ve.isFile?ve.file(function(Se){M(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,E=Object.assign||function(U){for(var R=1;R<arguments.length;R++){var C=arguments[R];for(var M in C)Object.prototype.hasOwnProperty.call(C,M)&&(U[M]=C[M])}return U},k=function(){function U(R,C){var M=[],le=!0,he=!1,ve=void 0;try{for(var Ee=R[Symbol.iterator](),Se;!(le=(Se=Ee.next()).done)&&!(M.push(Se.value),C&&M.length===C);le=!0);}catch(ae){he=!0,ve=ae}finally{try{!le&&Ee.return&&Ee.return()}finally{if(he)throw ve}}return M}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")}}(),T=function(){function U(R,C){for(var M=0;M<C.length;M++){var le=C[M];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(R,le.key,le)}}return function(R,C,M){return C&&U(R.prototype,C),M&&U(R,M),R}}();function D(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 M in U){if(R.indexOf(M)>=0)continue;if(!Object.prototype.hasOwnProperty.call(U,M))continue;C[M]=U[M]}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 x(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,M){return(M.substr(0,5)==="data-"||M.substr(0,5)==="aria-"||M==="role")&&(C[M]=R[M]),C},{})},V=function(U){x(R,U);function R(){var C,M,le,he;B(this,R);for(var ve=arguments.length,Ee=Array(ve),Se=0;Se<ve;Se++)Ee[Se]=arguments[Se];return he=(M=(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,ne=me.onClick;ee&&ee.type==="button"&&(pe.parentNode.focus(),pe.parentNode.querySelector("button").blur()),pe.click(),ne&&ne(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},M),N(le,he)}return T(R,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(M,le){var he=this,ve=this.props;if(!ve.beforeUpload)return setTimeout(function(){return he.post(M)},0);var Ee=ve.beforeUpload(M,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(M)}).catch(function(Se){console.log(Se)}):Ee!==!1&&setTimeout(function(){return he.post(M)},0);return}},{key:"post",value:function(M){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(M)),pe(me)}).then(function(pe){var me=M.uid,ee=he.customRequest||d,ne=Promise.resolve(ae(M)).then(function(Z){var ue=he.data;return typeof ue=="function"&&(ue=ue(Z)),Promise.all([Z,ue])}).catch(function(Z){console.error(Z)});ne.then(function(Z){var ue=k(Z,2),K=ue[0],$=ue[1],Ce={action:pe,filename:he.name,data:$,file:K,headers:he.headers,withCredentials:he.withCredentials,method:he.method||"post",onProgress:Ee?function(q){Ee(q,M)}:null,onSuccess:function(H,O){delete le.reqs[me],he.onSuccess(H,M,O)},onError:function(H,O){delete le.reqs[me],he.onError(H,O,M)}};ve(M),le.reqs[me]=ee(Ce)})})}},{key:"reset",value:function(){this.setState({uid:l()})}},{key:"abort",value:function(M){var le=this.reqs;if(M){var he=M;M&&M.uid&&(he=M.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 M,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,ne=le.children,Z=le.directory,ue=le.openFileDialogOnClick,K=le.onMouseEnter,$=le.onMouseLeave,Ce=I(le,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),q=_()((M={},D(M,ve,!0),D(M,ve+"-disabled",Se),D(M,Ee,Ee),M)),H=Se?{}:{onClick:ue?this.onClick:function(){},onKeyDown:ue?this.onKeyDown:function(){},onMouseEnter:K,onMouseLeave:$,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return i.a.createElement(he,E({},H,{className:q,role:"button",style:pe}),i.a.createElement("input",E({},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})),ne)}}]),R}(h.Component),P=V,F=Object.assign||function(U){for(var R=1;R<arguments.length;R++){var C=arguments[R];for(var M in C)Object.prototype.hasOwnProperty.call(C,M)&&(U[M]=C[M])}return U},X=function(){function U(R,C){for(var M=0;M<C.length;M++){var le=C[M];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(R,le.key,le)}}return function(R,C,M){return C&&U(R.prototype,C),M&&U(R,M),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,M,le,he;Q(this,R);for(var ve=arguments.length,Ee=Array(ve),Se=0;Se<ve;Se++)Ee[Se]=arguments[Se];return he=(M=(le=ce(this,(C=R.__proto__||Object.getPrototypeOf(R)).call.apply(C,[this].concat(Ee))),le),le.saveUploader=function(ae){le.uploader=ae},M),ce(le,he)}return X(R,[{key:"abort",value:function(M){this.uploader.abort(M)}},{key:"render",value:function(){return i.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 J=se,j=G.a=J},Gytx:function(u,G){u.exports=function(h,i,S,_){var y=S?S.call(_,h,i):void 0;if(y!==void 0)return!!y;if(h===i)return!0;if(typeof h!="object"||!h||typeof i!="object"||!i)return!1;var p=Object.keys(h),d=Object.keys(i);if(p.length!==d.length)return!1;for(var o=Object.prototype.hasOwnProperty.bind(i),s=0;s<p.length;s++){var l=p[s];if(!o(l))return!1;var a=h[l],g=i[l];if(y=S?S.call(_,a,g,l):void 0,y===!1||y===void 0&&a!==g)return!1}return!0}},H38U:function(u,G,c){var h=c("f4xo"),i=c("rcnY"),S=c("wU8J"),_=c("Iq15"),y=c("dWSS");function p(o,s){this.typeNumber=o,this.errorCorrectLevel=s,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var d=p.prototype;d.addData=function(o){var s=new h(o);this.dataList.push(s),this.dataCache=null},d.isDark=function(o,s){if(o<0||this.moduleCount<=o||s<0||this.moduleCount<=s)throw new Error(o+","+s);return this.modules[o][s]},d.getModuleCount=function(){return this.moduleCount},d.make=function(){if(this.typeNumber<1){var o=1;for(o=1;o<40;o++){for(var s=i.getRSBlocks(o,this.errorCorrectLevel),l=new S,a=0,g=0;g<s.length;g++)a+=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(),_.getLengthInBits(m.mode,o)),m.write(l)}if(l.getLengthInBits()<=a*8)break}this.typeNumber=o}this.makeImpl(!1,this.getBestMaskPattern())},d.makeImpl=function(o,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 a=0;a<this.moduleCount;a++)this.modules[l][a]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,s),this.typeNumber>=7&&this.setupTypeNumber(o),this.dataCache==null&&(this.dataCache=p.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,s)},d.setupPositionProbePattern=function(o,s){for(var l=-1;l<=7;l++){if(o+l<=-1||this.moduleCount<=o+l)continue;for(var a=-1;a<=7;a++){if(s+a<=-1||this.moduleCount<=s+a)continue;0<=l&&l<=6&&(a==0||a==6)||0<=a&&a<=6&&(l==0||l==6)||2<=l&&l<=4&&2<=a&&a<=4?this.modules[o+l][s+a]=!0:this.modules[o+l][s+a]=!1}}},d.getBestMaskPattern=function(){for(var o=0,s=0,l=0;l<8;l++){this.makeImpl(!0,l);var a=_.getLostPoint(this);(l==0||o>a)&&(o=a,s=l)}return s},d.createMovieClip=function(o,s,l){var a=o.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 E=w*g,k=this.modules[m][w];k&&(a.beginFill(0,100),a.moveTo(E,v),a.lineTo(E+g,v),a.lineTo(E+g,v+g),a.lineTo(E,v+g),a.endFill())}return a},d.setupTimingPattern=function(){for(var o=8;o<this.moduleCount-8;o++){if(this.modules[o][6]!=null)continue;this.modules[o][6]=o%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 o=_.getPatternPosition(this.typeNumber),s=0;s<o.length;s++)for(var l=0;l<o.length;l++){var a=o[s],g=o[l];if(this.modules[a][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[a+m][g+v]=!0:this.modules[a+m][g+v]=!1}},d.setupTypeNumber=function(o){for(var s=_.getBCHTypeNumber(this.typeNumber),l=0;l<18;l++){var a=!o&&(s>>l&1)==1;this.modules[Math.floor(l/3)][l%3+this.moduleCount-8-3]=a}for(var l=0;l<18;l++){var a=!o&&(s>>l&1)==1;this.modules[l%3+this.moduleCount-8-3][Math.floor(l/3)]=a}},d.setupTypeInfo=function(o,s){for(var l=this.errorCorrectLevel<<3|s,a=_.getBCHTypeInfo(l),g=0;g<15;g++){var m=!o&&(a>>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=!o&&(a>>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]=!o},d.mapData=function(o,s){for(var l=-1,a=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[a][v-w]==null){var E=!1;m<o.length&&(E=(o[m]>>>g&1)==1);var k=_.getMask(s,a,v-w);k&&(E=!E),this.modules[a][v-w]=E,g--,g==-1&&(m++,g=7)}if(a+=l,a<0||this.moduleCount<=a){a-=l,l=-l;break}}},p.PAD0=236,p.PAD1=17,p.createData=function(o,s,l){for(var a=i.getRSBlocks(o,s),g=new S,m=0;m<l.length;m++){var v=l[m];g.put(v.mode,4),g.put(v.getLength(),_.getLengthInBits(v.mode,o)),v.write(g)}for(var w=0,m=0;m<a.length;m++)w+=a[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,a)},p.createBytes=function(o,s){for(var l=0,a=0,g=0,m=new Array(s.length),v=new Array(s.length),w=0;w<s.length;w++){var E=s[w].dataCount,k=s[w].totalCount-E;a=Math.max(a,E),g=Math.max(g,k),m[w]=new Array(E);for(var T=0;T<m[w].length;T++)m[w][T]=255&o.buffer[T+l];l+=E;var D=_.getErrorCorrectPolynomial(k),I=new y(m[w],D.getLength()-1),B=I.mod(D);v[w]=new Array(D.getLength()-1);for(var T=0;T<v[w].length;T++){var N=T+B.getLength()-v[w].length;v[w][T]=N>=0?B.get(N):0}}for(var x=0,T=0;T<s.length;T++)x+=s[T].totalCount;for(var Y=new Array(x),V=0,T=0;T<a;T++)for(var w=0;w<s.length;w++)T<m[w].length&&(Y[V++]=m[w][T]);for(var T=0;T<g;T++)for(var w=0;w<s.length;w++)T<v[w].length&&(Y[V++]=v[w][T]);return Y},u.exports=p},HmJG:function(u,G,c){},Ib8C:function(u,G,c){(function(h){(function(i,S){u.exports=G=S()})(this,function(){var i=i||function(S,_){var y;if(typeof window!="undefined"&&window.crypto&&(y=window.crypto),typeof self!="undefined"&&self.crypto&&(y=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(y=globalThis.crypto),!y&&typeof window!="undefined"&&window.msCrypto&&(y=window.msCrypto),!y&&typeof h!="undefined"&&h.crypto&&(y=h.crypto),!y&&!0)try{y=c(4)}catch(D){}var p=function(){if(y){if(typeof y.getRandomValues=="function")try{return y.getRandomValues(new Uint32Array(1))[0]}catch(D){}if(typeof y.randomBytes=="function")try{return y.randomBytes(4).readInt32LE()}catch(D){}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function D(){}return function(I){var B;return D.prototype=I,B=new D,D.prototype=null,B}}(),o={},s=o.lib={},l=s.Base=function(){return{extend:function(D){var I=d(this);return D&&I.mixIn(D),(!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 D=this.extend();return D.init.apply(D,arguments),D},init:function(){},mixIn:function(D){for(var I in D)D.hasOwnProperty(I)&&(this[I]=D[I]);D.hasOwnProperty("toString")&&(this.toString=D.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=s.WordArray=l.extend({init:function(D,I){D=this.words=D||[],I!=_?this.sigBytes=I:this.sigBytes=D.length*4},toString:function(D){return(D||m).stringify(this)},concat:function(D){var I=this.words,B=D.words,N=this.sigBytes,x=D.sigBytes;if(this.clamp(),N%4)for(var Y=0;Y<x;Y++){var V=B[Y>>>2]>>>24-Y%4*8&255;I[N+Y>>>2]|=V<<24-(N+Y)%4*8}else for(var P=0;P<x;P+=4)I[N+P>>>2]=B[P>>>2];return this.sigBytes+=x,this},clamp:function(){var D=this.words,I=this.sigBytes;D[I>>>2]&=4294967295<<32-I%4*8,D.length=S.ceil(I/4)},clone:function(){var D=l.clone.call(this);return D.words=this.words.slice(0),D},random:function(D){for(var I=[],B=0;B<D;B+=4)I.push(p());return new a.init(I,D)}}),g=o.enc={},m=g.Hex={stringify:function(D){for(var I=D.words,B=D.sigBytes,N=[],x=0;x<B;x++){var Y=I[x>>>2]>>>24-x%4*8&255;N.push((Y>>>4).toString(16)),N.push((Y&15).toString(16))}return N.join("")},parse:function(D){for(var I=D.length,B=[],N=0;N<I;N+=2)B[N>>>3]|=parseInt(D.substr(N,2),16)<<24-N%8*4;return new a.init(B,I/2)}},v=g.Latin1={stringify:function(D){for(var I=D.words,B=D.sigBytes,N=[],x=0;x<B;x++){var Y=I[x>>>2]>>>24-x%4*8&255;N.push(String.fromCharCode(Y))}return N.join("")},parse:function(D){for(var I=D.length,B=[],N=0;N<I;N++)B[N>>>2]|=(D.charCodeAt(N)&255)<<24-N%4*8;return new a.init(B,I)}},w=g.Utf8={stringify:function(D){try{return decodeURIComponent(escape(v.stringify(D)))}catch(I){throw new Error("Malformed UTF-8 data")}},parse:function(D){return v.parse(unescape(encodeURIComponent(D)))}},E=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(D){typeof D=="string"&&(D=w.parse(D)),this._data.concat(D),this._nDataBytes+=D.sigBytes},_process:function(D){var I,B=this._data,N=B.words,x=B.sigBytes,Y=this.blockSize,V=Y*4,P=x/V;D?P=S.ceil(P):P=S.max((P|0)-this._minBufferSize,0);var F=P*Y,X=S.min(F*4,x);if(F){for(var Q=0;Q<F;Q+=Y)this._doProcessBlock(N,Q);I=N.splice(0,F),B.sigBytes-=X}return new a.init(I,X)},clone:function(){var D=l.clone.call(this);return D._data=this._data.clone(),D},_minBufferSize:0}),k=s.Hasher=E.extend({cfg:l.extend(),init:function(D){this.cfg=this.cfg.extend(D),this.reset()},reset:function(){E.reset.call(this),this._doReset()},update:function(D){return this._append(D),this._process(),this},finalize:function(D){D&&this._append(D);var I=this._doFinalize();return I},blockSize:512/32,_createHelper:function(D){return function(I,B){return new D.init(B).finalize(I)}},_createHmacHelper:function(D){return function(I,B){return new T.HMAC.init(D,B).finalize(I)}}}),T=o.algo={};return o}(Math);return i})}).call(this,c("IyRk"))},Iq15:function(u,G,c){var h=c("nVVt"),i=c("dWSS"),S=c("dQei"),_={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},y={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;y.getBCHDigit(d)-y.getBCHDigit(y.G15)>=0;)d^=y.G15<<y.getBCHDigit(d)-y.getBCHDigit(y.G15);return(p<<10|d)^y.G15_MASK},getBCHTypeNumber:function(p){for(var d=p<<12;y.getBCHDigit(d)-y.getBCHDigit(y.G18)>=0;)d^=y.G18<<y.getBCHDigit(d)-y.getBCHDigit(y.G18);return p<<12|d},getBCHDigit:function(p){for(var d=0;p!=0;)d++,p>>>=1;return d},getPatternPosition:function(p){return y.PATTERN_POSITION_TABLE[p-1]},getMask:function(p,d,o){switch(p){case _.PATTERN000:return(d+o)%2==0;case _.PATTERN001:return d%2==0;case _.PATTERN010:return o%3==0;case _.PATTERN011:return(d+o)%3==0;case _.PATTERN100:return(Math.floor(d/2)+Math.floor(o/3))%2==0;case _.PATTERN101:return d*o%2+d*o%3==0;case _.PATTERN110:return(d*o%2+d*o%3)%2==0;case _.PATTERN111:return(d*o%3+(d+o)%2)%2==0;default:throw new Error("bad maskPattern:"+p)}},getErrorCorrectPolynomial:function(p){for(var d=new i([1],0),o=0;o<p;o++)d=d.multiply(new i([1,S.gexp(o)],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(),o=0,s=0;s<d;s++)for(var l=0;l<d;l++){for(var a=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)&&a++}}a>5&&(o+=3+a-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)&&(o+=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)&&(o+=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)&&(o+=40);for(var E=0,l=0;l<d;l++)for(var s=0;s<d;s++)p.isDark(s,l)&&E++;var k=Math.abs(100*E/d/d-50)/5;return o+=k*10,o}};u.exports=y},J66h:function(u,G,c){(function(h){var i,S;(function(_,y){u.exports=y(_)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof h!="undefined"?h:this,function(_){"use strict";_=_||{};var y=_.Base64,p="2.6.4",d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=function(z){for(var se={},J=0,j=z.length;J<j;J++)se[z.charAt(J)]=J;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)}},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,g=function(z){return z.replace(a,l)},m=function(z){var se=[0,2,1][z.length%3],J=z.charCodeAt(0)<<16|(z.length>1?z.charCodeAt(1):0)<<8|(z.length>2?z.charCodeAt(2):0),j=[d.charAt(J>>>18),d.charAt(J>>>12&63),se>=2?"=":d.charAt(J>>>6&63),se>=1?"=":d.charAt(J&63)];return j.join("")},v=_.btoa&&typeof _.btoa=="function"?function(z){return _.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)))},E=function(z){return z.replace(/[+\/]/g,function(se){return se=="+"?"-":"_"}).replace(/=/g,"")},k=function(z,se){return se?E(w(z)):w(z)},T=function(z){return k(z,!0)},D;_.Uint8Array&&(D=function(z,se){for(var J="",j=0,U=z.length;j<U;j+=3){var R=z[j],C=z[j+1],M=z[j+2],le=R<<16|C<<8|M;J+=d.charAt(le>>>18)+d.charAt(le>>>12&63)+(typeof C!="undefined"?d.charAt(le>>>6&63):"=")+(typeof M!="undefined"?d.charAt(le&63):"=")}return se?E(J):J});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),J=se-65536;return s((J>>>10)+55296)+s((J&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)},x=function(z){var se=z.length,J=se%4,j=(se>0?o[z.charAt(0)]<<18:0)|(se>1?o[z.charAt(1)]<<12:0)|(se>2?o[z.charAt(2)]<<6:0)|(se>3?o[z.charAt(3)]:0),U=[s(j>>>16),s(j>>>8&255),s(j&255)];return U.length-=[0,0,2,1][J],U.join("")},Y=_.atob&&typeof _.atob=="function"?function(z){return _.atob(z)}:function(z){return z.replace(/\S{1,4}/g,x)},V=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,"")},X=function(z){return P(F(z))},Q;_.Uint8Array&&(Q=function(z){return Uint8Array.from(V(F(z)),function(se){return se.charCodeAt(0)})});var ce=function(){var z=_.Base64;return _.Base64=y,z};if(_.Base64={VERSION:p,atob:V,btoa:v,fromBase64:X,toBase64:k,utob:g,encode:k,encodeURI:T,btou:N,decode:X,noConflict:ce,fromUint8Array:D,toUint8Array:Q},typeof Object.defineProperty=="function"){var fe=function(z){return{value:z,enumerable:!1,writable:!0,configurable:!0}};_.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",fe(function(){return X(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 _.Meteor&&(Base64=_.Base64),u.exports?u.exports.Base64=_.Base64:!(i=[],S=function(){return _.Base64}.apply(G,i),S!==void 0&&(u.exports=S)),{Base64:_.Base64}})}).call(this,c("IyRk"))},K3mO:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("3y9D"),c("WYAk"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.Base,y=S.WordArray,p=i.algo,d=p.MD5,o=p.EvpKDF=_.extend({cfg:_.extend({keySize:128/32,hasher:d,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,l){for(var a,g=this.cfg,m=g.hasher.create(),v=y.create(),w=v.words,E=g.keySize,k=g.iterations;w.length<E;){a&&m.update(a),a=m.update(s).finalize(l),m.reset();for(var T=1;T<k;T++)a=m.finalize(a),m.reset();v.concat(a)}return v.sigBytes=E*4,v}});i.EvpKDF=function(s,l,a){return o.create(a).compute(s,l)}}(),h.EvpKDF})},KhGG:function(u,G,c){"use strict";c.d(G,"a",function(){return x}),c.d(G,"c",function(){return V});var h=c("0Owb"),i=c("miYZ"),S=c("tsqr"),_=c("oBTY"),y=c("tJVT"),p=c("PpiC"),d=c("k1fw"),o=c("9og8"),s=c("DZo9"),l=c("8z0m"),a=c("WmNS"),g=c.n(a),m=c("q1tI"),v=c.n(m),w=c("ErOA"),E=c("NFKh"),k=c.n(E),T=c("7Cbv"),D=c("9kvl"),I=c("mxV5"),B=c.n(I),N=l.a.Dragger,x=function(X){var Q="bf3c199c2470cb477d907b1e0917c17b",ce="5183666c72eec9e4",fe=k.a.enc.Utf8.parse(Q),z=k.a.enc.Utf8.parse(ce),se=k.a.AES.decrypt(X,fe,{iv:z,mode:k.a.mode.CBC});return se.toString(k.a.enc.Utf8)},Y,V=function(){var F=Object(o.a)(g.a.mark(function X(Q,ce,fe){var z,se,J,j,U,R,C,M,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):",x(C.data)),C.data=JSON.parse(x(C.data)),M=Object(T.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||((J=C.data)===null||J===void 0)?void 0:J.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(M),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()}},X)}));return function(Q,ce,fe){return F.apply(this,arguments)}}(),P=function(X){var Q=X.user,ce=X.cancelUpload,fe=Object(p.a)(X,["user","cancelUpload"]),z=Object(m.useState)([]),se=Object(y.a)(z,2),J=se[0],j=se[1],U=Object(m.useState)(),R=Object(y.a)(U,2),C=R[0],M=R[1],le={onRemove:function(Ee){j(Object(_.a)(J.filter(function(Se){return Se.name!==Ee.name}))),fe.onChange(J.filter(function(Se){return Se.name!==Ee.name}))},disabled:fe.disabled,multiple:!0,fileList:J==null?void 0:J.map(function(ve){return ve.file}),customRequest:function(){},beforeUpload:function(){var ve=Object(o.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,!J.filter(function(ne){return ne.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 J.push({name:ae.name,file:ae}),j(Object(_.a)(J)),fe.onChange(J),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(o.a)(g.a.mark(function Ee(Se,ae){var pe,me,ee,ne,Z,ue,K,$,Ce;return g.a.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return ae.file_name=Se.name,K=Se.name,H.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if($=H.sent,$.data=JSON.parse(x($.data)),!(($==null?void 0:$.status)!==0)){H.next=12;break}return J[J.findIndex(function(O){return O.name===K})].status="error",J[J.findIndex(function(O){return O.name===K})].file.status="error",fe.onChange(J),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H.abrupt("return");case 12:return C=new B.a({endpoint:$==null||((pe=$.data)===null||pe===void 0)?void 0:pe.end_point,region:$==null||((me=$.data)===null||me===void 0)?void 0:me.region,accessKeyId:$==null||((ee=$.data)===null||ee===void 0)?void 0:ee.access_key_id,accessKeySecret:$==null||((ne=$.data)===null||ne===void 0)?void 0:ne.access_key_secret,bucket:$==null||((Z=$.data)===null||Z===void 0)?void 0:Z.bucket,stsToken:$==null||((ue=$.data)===null||ue===void 0)?void 0:ue.security_token}),console.log(Se,"file"),M(C),Ce=Object(T.a)(),H.abrupt("return",new Promise(function(O,W){try{var we;C.multipartUpload("".concat(fe.identifier,"/").concat(Ce).concat(K.indexOf(".")>-1?"."+K.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=J.findIndex(function(Ge){return Ge.name===K});J[Ue].file.percent=Oe*100,J[Ue].tempCheckpoint=Be,j(Object(_.a)(J))}catch(Ge){}},checkpoint:J[J.findIndex(function(be){return be.name===K})].tempCheckpoint,callback:{customValue:{id:K+""},url:$==null||((we=$.data)===null||we===void 0)?void 0:we.callback_url,host:$==null?void 0:$.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(be){var Oe,Be=J.findIndex(function(Xe){return Xe.name===K}),Fe="done";if(((Oe=be.data)===null||Oe===void 0?void 0:Oe.status)===0){var Ue;Se.response=(Ue=be.data)===null||Ue===void 0?void 0:Ue.data;var Ge=J.findIndex(function(Xe){return Xe.name===K});J[Ge].status="done",J[Ge].file.status="done"}else{var Ye;S.b.warn((Ye=be.data)===null||Ye===void 0?void 0:Ye.message),Fe="error"}J[Be].status=Fe,J[Be].file.status=Fe,fe.onChange(J),O(be==null?void 0:be.data)}).catch(function(be){J[J.findIndex(function(Oe){return Oe.name===K})].status="error",J[J.findIndex(function(Oe){return Oe.name===K})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),j(Object(_.a)(J)),fe.onChange(J),W(be),console.log("err:",be)})}catch(be){}}));case 17:case"end":return H.stop()}},Ee)}));return function(Se,ae){return ve.apply(this,arguments)}}();return Object(m.useEffect)(function(){J.every(function(ve){return ve==="done"||ve==="error"})&&fe.onComplete(J)},[J]),Object(m.useEffect)(function(){if(ce){var ve;(ve=C)===null||ve===void 0||ve.cancel()}},[ce]),Object(m.useEffect)(function(){fe.uploading&&J.map(function(){var ve=Object(o.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(D.a)(function(F){var X=F.loading,Q=F.globalSetting,ce=F.user;return{globalSetting:Q,loading:X.models.competitions,user:ce}})(P)},KmYQ:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.ZeroPadding={pad:function(i,S){var _=S*4;i.clamp(),i.sigBytes+=_-(i.sigBytes%_||_)},unpad:function(i){for(var S=i.words,_=i.sigBytes-1,_=i.sigBytes-1;_>=0;_--)if(S[_>>>2]>>>24-_%4*8&255){i.sigBytes=_+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"),i=c("vuIU"),S=c("Ji7U"),_=c("LK+K"),y=c("q1tI"),p=c("rePB"),d=c("Ff2n"),o=c("ODXe"),s=c("4IlW"),l=c("bX4T"),a=c("YrtM"),g=c("TSYQ"),m=c.n(g),v=c("+nKL"),w=c("8OUc"),E=function(M,le){var he=M.prefixCls,ve=M.id,Ee=M.flattenOptions,Se=M.childrenAsData,ae=M.values,pe=M.searchValue,me=M.multiple,ee=M.defaultActiveFirstOption,ne=M.height,Z=M.itemHeight,ue=M.notFoundContent,K=M.open,$=M.menuItemSelectedIcon,Ce=M.virtual,q=M.onSelect,H=M.onToggleOpen,O=M.onActiveValue,W=M.onScroll,we=M.onMouseEnter,be="".concat(he,"-item"),Oe=Object(a.a)(function(){return Ee},[K,Ee],function($e,Ie){return Ie[0]&&$e[1]!==Ie[1]}),Be=y.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=y.useState(function(){return Ge(0)}),Xe=Object(o.a)(Ye,2),Je=Xe[0],Ne=Xe[1],nt=function(Ie){Ne(Ie);var De=Oe[Ie];if(!De){O(null,-1);return}O(De.data.value,Ie)};y.useEffect(function(){nt(ee!==!1?Ge(0):-1)},[Oe.length,pe]),y.useEffect(function(){var $e=setTimeout(function(){if(!me&&K&&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)}},[K]);var ot=function(Ie){Ie!==void 0&&q(Ie,{selected:!ae.has(Ie)}),me||H(!1)};if(y.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),K&&Ie.preventDefault();break}case s.a.ESC:H(!1)}},onKeyUp:function(){},scrollTo:function(Ie){Ue(Ie)}}}),Oe.length===0)return y.createElement("div",{role:"listbox",id:"".concat(ve,"_list"),className:"".concat(be,"-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?y.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 y.createElement(y.Fragment,null,y.createElement("div",{role:"listbox",id:"".concat(ve,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ve(Je-1),Ve(Je),Ve(Je+1)),y.createElement(v.a,{itemKey:"key",ref:Be,data:Oe,height:ne,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 y.createElement("div",{className:m()(be,"".concat(be,"-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(be,"-option"),St=m()(be,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)),Ut=Se?ht:ke,Vt=!$||typeof $=="function"||dt;return y.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}),y.createElement("div",{className:"".concat(st,"-content")},Ut||je),y.isValidElement($)||dt,Vt&&y.createElement(w.a,{className:"".concat(be,"-option-state"),customizeIcon:$,customizeIconProps:{isSelected:dt}},dt?"\u2713":null))}))},k=y.forwardRef(E);k.displayName="OptionList";var T=k,D=function(){return null};D.isSelectOption=!0;var I=D,B=function(){return null};B.isSelectOptGroup=!0;var N=B,x=c("VTBJ"),Y=c("Zm9Q");function V(C){var M=C.key,le=C.props,he=le.children,ve=le.value,Ee=Object(d.a)(le,["children","value"]);return Object(x.a)({key:M,value:ve!==void 0?ve:M,children:he},Ee)}function P(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(Y.a)(C).map(function(le,he){if(!y.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 M||!ve?V(le):Object(x.a)(Object(x.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"),X=c("qNPg"),Q=c("U8pU"),ce=c("Kwbf"),fe=c("WKfj");function z(C){var M=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,ne=C.autoFocus,Z=C.labelInValue,ue=C.value,K=C.inputValue,$=C.optionLabelProp,Ce=M==="multiple"||M==="tags",q=pe!==void 0?pe:Ce||M==="combobox",H=le||P(he);if(Object(ce.a)(M!=="tags"||H.every(function(be){return!be.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),M==="tags"||M==="combobox"){var O=H.some(function(be){return be.options?be.options.some(function(Oe){return typeof("value"in Oe?Oe.value:Oe.key)=="number"}):typeof("value"in be?be.value:be.key)=="number"});Object(ce.a)(!O,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ce.a)(M!=="combobox"||!$,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ce.a)(M==="combobox"||!ve,"`backfill` only works with `combobox` mode."),Object(ce.a)(M==="combobox"||!ae,"`getInputElement` only work with `combobox` mode."),Object(ce.b)(M!=="combobox"||!ae||!Ee||!Se,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),me&&!q&&M!=="combobox"&&M!=="tags"&&Object(ce.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ce.b)(!ee||ne,"`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(be){return Object(Q.a)(be)==="object"&&("key"in be||"value"in be)}),"`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(be){if(!y.isValidElement(be)||!be.type)return!1;var Oe=be.type;if(Oe.isSelectOption)return!1;if(Oe.isSelectOptGroup){var Be=Object(Y.a)(be.props.children).every(function(Fe){return!y.isValidElement(Fe)||!be.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)(K===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var se=z,J=Object(X.a)({prefixCls:"rc-select",components:{optionList:T},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 M=Object(_.a)(le);function le(){var he;return Object(h.a)(this,le),he=M.apply(this,arguments),he.selectRef=y.createRef(),he.focus=function(){he.selectRef.current.focus()},he.blur=function(){he.selectRef.current.blur()},he}return Object(i.a)(le,[{key:"render",value:function(){return y.createElement(J,Object.assign({ref:this.selectRef},this.props))}}]),le}(y.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"),i=c("mtLc"),S=c("yKVA"),_=c("879j"),y=c("q1tI"),p=c.n(y),d=c("i8i4"),o=c.n(d),s=function(l){Object(S.a)(g,l);var a=Object(_.a)(g);function g(m){var v;Object(h.a)(this,g),v=a.call(this,m);var w=window.document;return v.node=w.createElement("div"),w.body.appendChild(v.node),v}return Object(i.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 i=p(),S=d(),_=o(),y=typeof window!="undefined"?window:h;u.exports={assign:i,create:S,trim:_,bind:s,slice:l,each:a,map:g,pluck:m,isList:v,isFunction:w,isObject:E,Global:y};function p(){return Object.assign?Object.assign:function(T,D,I,B){for(var N=1;N<arguments.length;N++)a(Object(arguments[N]),function(x,Y){T[Y]=x});return T}}function d(){if(Object.create)return function(D,I,B,N){var x=l(arguments,1);return i.apply(this,[Object.create(D)].concat(x))};{function k(){}return function(D,I,B,N){var x=l(arguments,1);return k.prototype=D,i.apply(this,[new k].concat(x))}}}function o(){return String.prototype.trim?function(T){return String.prototype.trim.call(T)}:function(T){return T.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function s(k,T){return function(){return T.apply(k,Array.prototype.slice.call(arguments,0))}}function l(k,T){return Array.prototype.slice.call(k,T||0)}function a(k,T){m(k,function(D,I){return T(D,I),!1})}function g(k,T){var D=v(k)?[]:{};return m(k,function(I,B){return D[B]=T(I,B),!1}),D}function m(k,T){if(v(k)){for(var D=0;D<k.length;D++)if(T(k[D],D))return k[D]}else for(var I in k)if(k.hasOwnProperty(I)&&T(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 E(k){return k&&{}.toString.call(k)==="[object Object]"}}).call(this,c("IyRk"))},MlIO:function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(i){var S=h,_=S.lib,y=_.Base,p=_.WordArray,d=S.x64={},o=d.Word=y.extend({init:function(l,a){this.high=l,this.low=a}}),s=d.WordArray=y.extend({init:function(l,a){l=this.words=l||[],a!=i?this.sigBytes=a:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,a=l.length,g=[],m=0;m<a;m++){var v=l[m];g.push(v.high),g.push(v.low)}return p.create(g,this.sigBytes)},clone:function(){for(var l=y.clone.call(this),a=l.words=this.words.slice(0),g=a.length,m=0;m<g;m++)a[m]=a[m].clone();return l}})}(),h})},NFKh:function(u,G,c){(function(h,i,S){u.exports=G=i(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 i(d,o){var s=new Set;return d.forEach(function(l){o.has(l)||s.add(l)}),s}function S(d){var o=d||{},s=o.disabled,l=o.disableCheckbox,a=o.checkable;return!!(s||l)||a===!1}function _(d,o,s,l){for(var a=new Set(d),g=new Set,m=0;m<=s;m+=1){var v=o.get(m)||new Set;v.forEach(function(T){var D=T.key,I=T.node,B=T.children,N=B===void 0?[]:B;a.has(D)&&!l(I)&&N.filter(function(x){return!l(x.node)}).forEach(function(x){a.add(x.key)})})}for(var w=new Set,E=s;E>=0;E-=1){var k=o.get(E)||new Set;k.forEach(function(T){var D=T.parent,I=T.node;if(l(I)||!T.parent||w.has(T.parent.key))return;if(l(T.parent.node)){w.add(D.key);return}var B=!0,N=!1;(D.children||[]).filter(function(x){return!l(x.node)}).forEach(function(x){var Y=x.key,V=a.has(Y);B&&!V&&(B=!1),!N&&(V||g.has(Y))&&(N=!0)}),B&&a.add(D.key),N&&g.add(D.key),w.add(D.key)})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(g,a))}}function y(d,o,s,l,a){for(var g=new Set(d),m=new Set(o),v=0;v<=l;v+=1){var w=s.get(v)||new Set;w.forEach(function(D){var I=D.key,B=D.node,N=D.children,x=N===void 0?[]:N;!g.has(I)&&!m.has(I)&&!a(B)&&x.filter(function(Y){return!a(Y.node)}).forEach(function(Y){g.delete(Y.key)})})}m=new Set;for(var E=new Set,k=l;k>=0;k-=1){var T=s.get(k)||new Set;T.forEach(function(D){var I=D.parent,B=D.node;if(a(B)||!D.parent||E.has(D.parent.key))return;if(a(D.parent.node)){E.add(I.key);return}var N=!0,x=!1;(I.children||[]).filter(function(Y){return!a(Y.node)}).forEach(function(Y){var V=Y.key,P=g.has(V);N&&!P&&(N=!1),!x&&(P||m.has(V))&&(x=!0)}),N||g.delete(I.key),x&&m.add(I.key),E.add(I.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(i(m,g))}}function p(d,o,s,l){var a=[],g;l?g=l:g=S;var m=new Set(d.filter(function(k){var T=!!s[k];return T||a.push(k),T})),v=new Map,w=0;Object.keys(s).forEach(function(k){var T=s[k],D=T.level,I=v.get(D);I||(I=new Set,v.set(D,I)),I.add(T),w=Math.max(w,D)}),Object(h.a)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(k){return"'".concat(k,"'")}).join(", ")));var E;return o===!0?E=_(m,v,w,g):E=y(m,o.halfCheckedKeys,v,w,g),E}},OLES:function(u,G,c){"use strict";var h=c("U8pU"),i=c("VTBJ"),S=c("Ff2n"),_=c("q1tI"),y=c("uciX"),p=c("7ixt"),d=function(m){var v=m.overlay,w=m.prefixCls,E=m.id,k=m.overlayInnerStyle;return _.createElement("div",{className:"".concat(w,"-inner"),id:E,role:"tooltip",style:k},typeof v=="function"?v():v)},o=d,s=function(m,v){var w=m.overlayClassName,E=m.trigger,k=E===void 0?["hover"]:E,T=m.mouseEnterDelay,D=T===void 0?0:T,I=m.mouseLeaveDelay,B=I===void 0?.1:I,N=m.overlayStyle,x=m.prefixCls,Y=x===void 0?"rc-tooltip":x,V=m.children,P=m.onVisibleChange,F=m.afterVisibleChange,X=m.transitionName,Q=m.animation,ce=m.placement,fe=ce===void 0?"right":ce,z=m.align,se=z===void 0?{}:z,J=m.destroyTooltipOnHide,j=J===void 0?!1:J,U=m.defaultVisible,R=m.getTooltipContainer,C=m.overlayInnerStyle,M=Object(S.a)(m,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),le=Object(_.useRef)(null);Object(_.useImperativeHandle)(v,function(){return le.current});var he=Object(i.a)({},M);"visible"in m&&(he.popupVisible=m.visible);var ve=function(){var me=m.arrowContent,ee=me===void 0?null:me,ne=m.overlay,Z=m.id;return[_.createElement("div",{className:"".concat(Y,"-arrow"),key:"arrow"},ee),_.createElement(o,{key:"content",prefixCls:Y,id:Z,overlay:ne,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 _.createElement(y.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:X,popupAnimation:Q,defaultPopupVisible:U,destroyPopupOnHide:Ee,autoDestroy:Se,mouseLeaveDelay:B,popupStyle:N,mouseEnterDelay:D},he),V)},l=Object(_.forwardRef)(s),a=G.a=l},OLod:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("K3mO"))})(this,function(h){h.lib.Cipher||function(i){var S=h,_=S.lib,y=_.Base,p=_.WordArray,d=_.BufferedBlockAlgorithm,o=S.enc,s=o.Utf8,l=o.Base64,a=S.algo,g=a.EvpKDF,m=_.Cipher=d.extend({cfg:y.extend(),createEncryptor:function(X,Q){return this.create(this._ENC_XFORM_MODE,X,Q)},createDecryptor:function(X,Q){return this.create(this._DEC_XFORM_MODE,X,Q)},init:function(X,Q,ce){this.cfg=this.cfg.extend(ce),this._xformMode=X,this._key=Q,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(X){return this._append(X),this._process()},finalize:function(X){X&&this._append(X);var Q=this._doFinalize();return Q},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function X(Q){return typeof Q=="string"?F:Y}return function(Q){return{encrypt:function(ce,fe,z){return X(fe).encrypt(Q,ce,fe,z)},decrypt:function(ce,fe,z){return X(fe).decrypt(Q,ce,fe,z)}}}}()}),v=_.StreamCipher=m.extend({_doFinalize:function(){var X=this._process(!0);return X},blockSize:1}),w=S.mode={},E=_.BlockCipherMode=y.extend({createEncryptor:function(X,Q){return this.Encryptor.create(X,Q)},createDecryptor:function(X,Q){return this.Decryptor.create(X,Q)},init:function(X,Q){this._cipher=X,this._iv=Q}}),k=w.CBC=function(){var X=E.extend();X.Encryptor=X.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)}}),X.Decryptor=X.extend({processBlock:function(ce,fe){var z=this._cipher,se=z.blockSize,J=ce.slice(fe,fe+se);z.decryptBlock(ce,fe),Q.call(this,ce,fe,se),this._prevBlock=J}});function Q(ce,fe,z){var se,J=this._iv;J?(se=J,this._iv=i):se=this._prevBlock;for(var j=0;j<z;j++)ce[fe+j]^=se[j]}return X}(),T=S.pad={},D=T.Pkcs7={pad:function(X,Q){for(var ce=Q*4,fe=ce-X.sigBytes%ce,z=fe<<24|fe<<16|fe<<8|fe,se=[],J=0;J<fe;J+=4)se.push(z);var j=p.create(se,fe);X.concat(j)},unpad:function(X){var Q=X.words[X.sigBytes-1>>>2]&255;X.sigBytes-=Q}},I=_.BlockCipher=m.extend({cfg:m.cfg.extend({mode:k,padding:D}),reset:function(){var X;m.reset.call(this);var Q=this.cfg,ce=Q.iv,fe=Q.mode;this._xformMode==this._ENC_XFORM_MODE?X=fe.createEncryptor:(X=fe.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==X?this._mode.init(this,ce&&ce.words):(this._mode=X.call(fe,this,ce&&ce.words),this._mode.__creator=X)},_doProcessBlock:function(X,Q){this._mode.processBlock(X,Q)},_doFinalize:function(){var X,Q=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(Q.pad(this._data,this.blockSize),X=this._process(!0)):(X=this._process(!0),Q.unpad(X)),X},blockSize:128/32}),B=_.CipherParams=y.extend({init:function(X){this.mixIn(X)},toString:function(X){return(X||this.formatter).stringify(this)}}),N=S.format={},x=N.OpenSSL={stringify:function(X){var Q,ce=X.ciphertext,fe=X.salt;return fe?Q=p.create([1398893684,1701076831]).concat(fe).concat(ce):Q=ce,Q.toString(l)},parse:function(X){var Q,ce=l.parse(X),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=_.SerializableCipher=y.extend({cfg:y.extend({format:x}),encrypt:function(X,Q,ce,fe){fe=this.cfg.extend(fe);var z=X.createEncryptor(ce,fe),se=z.finalize(Q),J=z.cfg;return B.create({ciphertext:se,key:ce,iv:J.iv,algorithm:X,mode:J.mode,padding:J.padding,blockSize:X.blockSize,formatter:fe.format})},decrypt:function(X,Q,ce,fe){fe=this.cfg.extend(fe),Q=this._parse(Q,fe.format);var z=X.createDecryptor(ce,fe).finalize(Q.ciphertext);return z},_parse:function(X,Q){return typeof X=="string"?Q.parse(X,this):X}}),V=S.kdf={},P=V.OpenSSL={execute:function(X,Q,ce,fe){fe||(fe=p.random(64/8));var z=g.create({keySize:Q+ce}).compute(X,fe),se=p.create(z.words.slice(Q),ce*4);return z.sigBytes=Q*4,B.create({key:z,iv:se,salt:fe})}},F=_.PasswordBasedCipher=Y.extend({cfg:Y.cfg.extend({kdf:P}),encrypt:function(X,Q,ce,fe){fe=this.cfg.extend(fe);var z=fe.kdf.execute(ce,X.keySize,X.ivSize);fe.iv=z.iv;var se=Y.encrypt.call(this,X,Q,z.key,fe);return se.mixIn(z),se},decrypt:function(X,Q,ce,fe){fe=this.cfg.extend(fe),Q=this._parse(Q,fe.format);var z=fe.kdf.execute(ce,X.keySize,X.ivSize,Q.salt);fe.iv=z.iv;var se=Y.decrypt.call(this,X,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 a}),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 E}),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"),i=c("U8pU"),S=c("Ff2n"),_=c("q1tI"),y=c.n(_),p=c("Kwbf"),d=c("WaYH"),o=.25,s=2;function l(x,Y){var V=x.slice(),P=V.indexOf(Y);return P>=0&&V.splice(P,1),V}function a(x,Y){var V=x.slice();return V.indexOf(Y)===-1&&V.push(Y),V}function g(x){return x.split("-")}function m(x,Y){return"".concat(x,"-").concat(Y)}function v(x){return x&&x.type&&x.type.isTreeNode}function w(x,Y){var V=[x],P=Y[x];function F(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];X.forEach(function(Q){var ce=Q.key,fe=Q.children;V.push(ce),F(fe)})}return F(P.children),V}function E(x,Y){var V=x.clientY,P=Y.selectHandle.getBoundingClientRect(),F=P.top,X=P.bottom,Q=P.height,ce=Math.max(Q*o,s);return V<=F+ce?-1:V>=X-ce?1:0}function k(x,Y){if(!x)return;var V=Y.multiple;return V?x.slice():x.length?[x[0]]:x}var T=function(Y){return Y};function D(x,Y){if(!x)return[];var V=Y||{},P=V.processProps,F=P===void 0?T:P,X=Array.isArray(x)?x:[x];return X.map(function(Q){var ce=Q.children,fe=Object(S.a)(Q,["children"]),z=D(ce,Y);return y.a.createElement(d.a,Object.assign({},F(fe)),z)})}function I(x){if(!x)return null;var Y;if(Array.isArray(x))Y={checkedKeys:x,halfCheckedKeys:void 0};else if(Object(i.a)(x)==="object")Y={checkedKeys:x.checked||void 0,halfCheckedKeys:x.halfChecked||void 0};else return Object(p.a)(!1,"`checkedKeys` is not an array or an object"),null;return Y}function B(x,Y){var V=new Set;function P(F){if(V.has(F))return;var X=Y[F];if(!X)return;V.add(F);var Q=X.parent,ce=X.node;if(ce.disabled)return;Q&&P(Q.key)}return(x||[]).forEach(function(F){P(F)}),Object(h.a)(V)}function N(x){var Y={};return Object.keys(x).forEach(function(V){(V.startsWith("data-")||V.startsWith("aria-"))&&(Y[V]=x[V])}),Y}},Ot1p:function(u,G,c){"use strict";var h=c("2qtc"),i=c("kLXV"),S=c("rAM+"),_=c("miYZ"),y=c("tsqr"),p=c("9og8"),d=c("tJVT"),o=c("jrin"),s=c("WmNS"),l=c.n(s),a=c("q1tI"),g=c.n(a),m=c("VrN/"),v=c.n(m),w=c("bdgK"),E=c("p77/"),k=c("Bd2K"),T=c("ELLl"),D=c("19Vz"),I=c("lZu9"),B=c("+NIl"),N=c("kSUc"),x=c("9Bee"),Y=function(qe){var at=qe.value,dt=at===void 0?"":at,st=qe.className,St=qe.showTextOnly,Ut=qe.showLines,Vt=qe.style,Xt=Vt===void 0?{}:Vt,At=Object(a.useMemo)(function(){return""},[dt]);return g.a.createElement(g.a.Fragment,null,g.a.createElement("div",{dangerouslySetInnerHTML:{__html:At}}))},V=c("Q9mQ"),P=c("diRs"),F=c("0Owb"),X=c("dejd"),Q=c("C+DQ"),ce=c("D1Df"),fe=c.n(ce),z=c("1vsH"),se=c("m3rI"),J=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function j(qe){var at=qe.onActionCallback,dt=qe.title,st=qe.icon,St=qe.actionName,Ut=qe.className,Vt=Ut===void 0?"":Ut,Xt=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)}),Xt)}var U=function(qe){var at=qe.watch,dt=qe.showNullButton,st=qe.onActionCallback,St=qe.fullScreen,Ut=qe.insertTemp,Vt=qe.hidetoolBar,Xt=qe.uuid,At=qe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(z.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(z.E)("_educoder_session"),"&key=").concat(Xt,"&api=").concat(encodeURIComponent(se.a.PROXY_SERVER)));var Ft=[].concat(J,[{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&&Ft.map(function(or,Ct){return g.a.createElement("li",{key:Ct},or.actionName?g.a.createElement(j,Object(F.a)({},or,{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,Ut&&g.a.createElement("li",null,g.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ut),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(fe.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(z.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(z.E)("_educoder_session"),"&key=").concat(Xt,"&api=").concat(encodeURIComponent(se.a.PROXY_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"),M=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(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(M.a,{type:"ghost",onClick:dt},"\u53D6\u6D88")))},pe=c("7ahc"),me=c("k1fw"),ee=c("HmJG"),ne=c("BjJ7"),Z=he.a.useForm,ue={width:280,marginRight:10},K={labelCol:{span:5},wrapperCol:{span:19}},$=function(qe){var at=qe.callback,dt=qe.onCancel,st=Z(),St=Object(d.a)(st,1),Ut=St[0],Vt=Object(a.useRef)();function Xt(or){at(Object(me.a)(Object(me.a)({},or),{},{name:Vt.current}))}function At(or,Ct){Ut.setFieldsValue({src:"/api/attachments/".concat(or.id,"?type=").concat(or.content_type),type:Ct.type})}function Ft(or){var Ct=or.target.files[0];Vt.current=Ct.name,q(Ct,At)}return g.a.createElement(he.a,Object(F.a)({form:Ut},K,{className:"upload-image-panel",onFinish:Xt}),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:Ft}))),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(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(M.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(ne.a,"/api/attachments.json")),st.send(dt)}var H=c("giR+"),O=c("fyUT"),W=c("7Kak"),we=c("9yH6"),be=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(O.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(O.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(be,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(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),g.a.createElement(M.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(o.a)(Ve,ze+"-B","bold"),Object(o.a)(Ve,ze+"-I","italic"),Ve),ht=($e={},Object(o.a)($e,Ge,"\u6DFB\u52A0\u94FE\u63A5"),Object(o.a)($e,Xe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(o.a)($e,Ye,"\u6DFB\u52A0\u6587\u4EF6"),Object(o.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,Ut=St===void 0?"100%":St,Vt=qe.height,Xt=Vt===void 0?400:Vt,At=qe.miniToolbar,Ft=At===void 0?!1:At,or=qe.isFocus,Ct=or===void 0?!1:or,kr=qe.watch,Jt=qe.insertTemp,nr=qe.mode,sr=nr===void 0?"markdown":nr,vr=qe.id,Sr=vr===void 0?"markdown-editor-id":vr,Ht=qe.showResizeBar,mt=Ht===void 0?!1:Ht,Kt=qe.noStorage,hr=Kt===void 0?!1:Kt,Mt=qe.showNullButton,It=Mt===void 0?!1:Mt,fr=qe.hidetoolBar,cn=fr===void 0?!1:fr,Kr=qe.fullScreen,rt=Kr===void 0?!1:Kr,Ot=qe.onBlur,Hr=qe.onCMBeforeChange,wr=qe.onFullScreen,dn=qe.className,bn=dn===void 0?"":dn,oe=qe.disablePaste,b=oe===void 0?!1:oe,A=qe.placeholder,ie=A===void 0?"":A,ye=qe.values,re=ye===void 0?"":ye,Me=Object(a.useState)(null),Qe=Object(d.a)(Me,2),He=Qe[0],wt=Qe[1],tt=Object(a.useState)(dt),Nt=Object(d.a)(tt,2),Yt=Nt[0],er=Nt[1],Vr=Object(a.useState)(kr),Yr=Object(d.a)(Vr,2),yr=Yr[0],Jr=Yr[1],Hn=Object(a.useState)(rt),Wr=Object(d.a)(Hn,2),Nr=Wr[0],xn=Wr[1],On=Object(a.useState)(""),nn=Object(d.a)(On,2),pn=nn[0],zr=nn[1],ti=Object(a.useState)(0),Wn=Object(d.a)(ti,2),$r=Wn[0],Zr=Wn[1],Mn=Object(a.useState)(Xt),Nn=Object(d.a)(Mn,2),Pn=Nn[0],pr=Nn[1],$t=Object(a.useState)(!1),Ar=Object(d.a)($t,2),Zt=Ar[0],Rr=Ar[1],ct=Object(a.useRef)(Object(Ue.a)()),vt=Object(a.useRef)(!1),yt=Object(a.useRef)(),gt=Object(a.useRef)(),Bt=Object(a.useRef)(),bt=Object(a.useRef)(),Rt=Object(a.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(a.useEffect)(function(){er(re),He==null||He.setValue(re)},[re]),Object(a.useEffect)(function(){wr==null||wr(Nr)},[Nr]),Object(a.useEffect)(function(){if(gt.current){var Et=v.a.fromTextArea(gt.current,{mode:sr,lineNumbers:!Ft,lineWrapping:!0,value:dt,autoCloseTags:!0,autoCloseBrackets:!0});Ct&&Et.focus();function Dt(ut,Lt){if(b){Lt.preventDefault();return}var Wt=Lt.clipboardData;if(Wt){var Qt=Wt.types.toString(),Gt=Wt.items;if(Qt==="Files"||Wt.types.indexOf("Files")>-1){if(Lt.preventDefault(),sr=="stex")return;try{var lr,br=Gt[1];((lr=Gt[0])===null||lr===void 0?void 0:lr.kind)==="file"&&(br=Gt[0]);var jt=br.getAsFile(),kn=jt.name.split(".").pop();q(jt,function(qt){if(qt.id){var Er,tr,qr;(jt==null||((Er=jt.type)===null||Er===void 0)?void 0:Er.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(qt.id,"?type=").concat(qt.content_type,")")):(jt==null||((tr=jt.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(qt.id,'"></video>')):(jt==null||((qr=jt.type)===null||qr===void 0)?void 0:qr.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(jt.type,'&disposition=inline" target="_blank">').concat(jt.name,"</a>")):je.includes(kn)?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(qt.id,'?type=office&disposition=inline" target="_blank">').concat(jt.name,"</a>")):Et.replaceSelection("[".concat(jt.name,"](").concat(se.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(qt.content_type,")"))}else(qt==null?void 0:qt.status)===401&&(document.location.href="/user/login")})}catch(qt){y.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 Wt;if(Wt=Lt.dataTransfer.files,Wt.length>0){Lt.preventDefault(),Lt.stopPropagation();for(var Qt=function(br){var jt=Wt[br],kn=jt.name.split(".").pop();q(jt,function(qt){if(qt.id){var Er,tr,qr;(jt==null||((Er=jt.type)===null||Er===void 0)?void 0:Er.indexOf("image"))>-1?Et.replaceSelection("![,](/api/attachments/".concat(qt.id,"?type=").concat(qt.content_type,")")):(jt==null||((tr=jt.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(qt.id,'"></video>')):(jt==null||((qr=jt.type)===null||qr===void 0)?void 0:qr.indexOf("pdf"))>-1?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(jt.type,'&disposition=inline" target="_blank">').concat(jt.name,"</a>")):je.includes(kn)?Et.replaceSelection('<a href="'.concat(se.a.API_SERVER,"/api/attachments/").concat(qt.id,'?type=office&disposition=inline" target="_blank">').concat(jt.name,"</a>")):Et.replaceSelection("[".concat(jt.name,"](").concat(se.a.API_SERVER,"/api/attachments/").concat(qt.id,"?type=").concat(qt.content_type,")"))}else(qt==null?void 0:qt.status)===401&&(document.location.href="/user/login")})},Gt=0;Gt<Wt.length;Gt++)Qt(Gt)}}),wt(Et),function(){Et.off("paste",Dt)}}},[]);var mr=Object(a.useCallback)(function(){if(Bt.current)try{}catch(Et){console.log(Et,"---- to set md editor body height")}},[Pn,Bt,Nr]);Object(a.useEffect)(function(){function Et(){var ut=new w.default(function(Lt){var Wt=Object(S.a)(Lt),Qt;try{for(Wt.s();!(Qt=Wt.n()).done;){var Gt=Qt.value;(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&(mr(),He.setSize("100%","100%"),He.refresh())}}catch(lr){Wt.e(lr)}finally{Wt.f()}});return ut.observe(gt.current.parentElement),ut}if(He){var Dt=Et();return function(){Dt.unobserve(gt.current.parentElement)}}},[He,mr]),Object(a.useEffect)(function(){if(He){for(var Et=[],Dt=function(){var Gt=Lt[ut];Wt=Object(d.a)(Gt,2);var lr=Wt[0],br=Wt[1],jt=Object(o.a)({},lr,function(){Qr(br)});Et.push(jt),He.addKeyMap(jt)},ut=0,Lt=Object.entries(Ze);ut<Lt.length;ut++){var Wt;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(br){Qt.e(br)}finally{Qt.f()}}}},[He]),Object(a.useEffect)(function(){rt!==Nr&&xn(rt)},[rt]),Object(ot.a)(function(){if(!hr&&$r>0){var Et=new Date().getTime(),Dt=window.sessionStorage.getItem(Sr);Et>=$r+Le&&(!Dt||Dt!==Yt)&&(window.sessionStorage.setItem(Sr,Yt),Rr(!0))}},Le),Object(a.useEffect)(function(){Jr(kr)},[He,kr]),Object(a.useEffect)(function(){He&&(Ct&&He.focus())},[He,Ct]),Object(a.useEffect)(function(){if(yr&&He){var Et=He.getScrollerElement();function Dt(ut){var Lt=ut.target;if(Rt.current){var Wt=Lt.scrollTop/Lt.scrollHeight;Rt.current.scrollTop=Rt.current.scrollHeight*Wt}}return Et.addEventListener("scroll",Dt),function(){Et.removeEventListener("scroll",Dt)}}},[He,yr]),Object(a.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(a.useEffect)(function(){if(He&&Ot){function Et(){Ot(He.getValue())}return He.on("blur",Et),function(){He.off("blur",Et)}}},[He,Ot]),Object(a.useEffect)(function(){if(He){function Et(Dt){var ut=Dt.getValue();er(ut),Zr(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(a.useEffect)(function(){He&&(dt==null?(He.setValue(""),er("")):dt!==He.getValue()&&(He.setValue(dt),er(dt),He.setCursor(He.lineCount(),0)))},[He,dt]);var Qr=Object(a.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(Wt){return Wt===""?"":"- ".concat(Wt)}).join(`
`)),He.focus();case"list-ol":return ut===""?He.replaceSelection("1. "+ut):He.replaceSelection(Lt.map(function(Wt,Qt){return Wt===""?"":"".concat(Qt+1,". ").concat(Wt)}).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 Jr(!yr),He.focus();case"trigger-full-screen":return xn(!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,yr,Nr]),cr=Object(a.useCallback)(function(Et){zr("");switch(pn){case Ge:var Dt=Et.title,ut=Et.link;return He.replaceSelection("[".concat(Dt,"](").concat(ut,")")),He.focus();case Xe:var Lt=Et.language,Wt=Et.content;return He.replaceSelection(["```"+Lt,Wt,"```"].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 br=Et.row,jt=Et.col,kn=Et.align,qt=`
`,Er=0;Er<br;Er++){for(var tr=[],qr=[],zn=0;zn<jt;zn++)Er===1&&qr.push(nt[kn]),tr.push(" ");Er===1&&(qt+="| ".concat(qr.join(" | "),` |
`)),qt+="| ".concat(tr.join(jt===1?"":" | "),` |
`)}return He.replaceSelection(qt+`
`),He.focus();default:throw new Error}},[He,pn]),Cr=Object(a.useMemo)(function(){switch(pn){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($,{callback:cr,onCancel:Dr});case Je:return g.a.createElement(Be,{callback:cr,onCancel:Dr});default:return null}},[pn]);function Dr(){zr("")}Object(a.useEffect)(function(){if(bt.current){var Et=bt.current,Dt=!1,ut=0;function Lt(Gt){Dt=!0,ut=Gt.pageY}function Wt(){Dt=!1}function Qt(Gt){if(Dt){var lr=Gt.pageY-ut;lr<0&&(lr=0),lr>300&&(lr=300);var br=Xt+lr+"px";pr(br)}}return Et.addEventListener("mousedown",Lt),document.addEventListener("mousemove",Qt),document.addEventListener("mouseup",Wt),function(){Et.removeEventListener("mousedown",Lt),document.removeEventListener("mousemove",Qt),document.removeEventListener("mouseup",Wt)}}},[He,bt]),Object(a.useEffect)(function(){pr(Xt)},[Xt]);var Br=ke(Ut),Fr=ke(Pn),Ln={width:Br,height:Fr},ri=Object(a.useMemo)(function(){if($r){var Et=new Date($r),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},[$r]);function In(){window.sessionStorage.removeItem(Sr),Rr(!1),Zr(0)}function mn(){Rr(!1),Zr(0),He.setValue(window.sessionStorage.getItem(Sr))}function En(Et,Dt){var ut=He.getValue();ut=ut.replace(Et,Dt),er(ut),He==null||He.setValue(ut)}return g.a.createElement(a.Fragment,null,g.a.createElement("div",{className:"markdown-editor-wrapper",ref:Bt},g.a.createElement("div",{className:"markdown-editor-container ".concat(bn," ").concat(yr?"on-preview":""," ").concat(Ft?"mini":""," ").concat(Nr?"full-screen":""),style:Ln},g.a.createElement(U,{insertTemp:Jt,watch:yr,fullScreen:Nr,showNullButton:It,onActionCallback:Qr,hidetoolBar:cn,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})),yr?g.a.createElement("div",{ref:Rt,className:"preview-container"},sr==="stex"&&g.a.createElement(Y,{value:Yt}),sr!=="stex"&&g.a.createElement(x.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[pn]?g.a.createElement(i.a,{centered:!0,title:ht[pn],visible:!0,onCancel:Dr,footer:null},Cr):null))}},"P/tu":function(u,G,c){"use strict";var h=c("ozfa"),i=c("MJZm"),S=c("0Owb"),_=c("9og8"),y=c("tJVT"),p=c("PpiC"),d=c("WmNS"),o=c.n(d),s=c("q1tI"),l=c.n(s),a=c("WCUW"),g=c("spXi"),m=c.n(g),v=function(E){var k=E.value,T=E.onChange,D=E.defaultValue,I=E.disabled,B=Object(p.a)(E,["value","onChange","defaultValue","disabled"]),N=Object(s.useState)([]),x=Object(y.a)(N,2),Y=x[0],V=x[1],P=Object(s.useState)("1"),F=Object(y.a)(P,2),X=F[0],Q=F[1];Object(s.useEffect)(function(){ce()},[]);var ce=function(){var se=Object(_.a)(o.a.mark(function J(){var j,U;return o.a.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,Object(a.x)({});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||[])}],V(U),Q("2"));case 4:case"end":return C.stop()}},J)}));return function(){return se.apply(this,arguments)}}(),fe=function(J){function j(U){var R=U.children,C=Array.isArray(R)&&R.length>0,M=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:M,key:M,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 J==null?void 0:J.map(function(U){return j(U)})},z=D?{defaultExpandedKeys:[0]}:{selectedKeys:k,defaultExpandedKeys:k};return l.a.createElement("div",{className:m.a.customTree},l.a.createElement(i.a,Object(S.a)({key:X},z,{showIcon:!0,treeData:Y,onSelect:T,disabled:I},B)))};G.a=v},PD8m:function(u,G){u.exports={name:"memoryStorage",read:h,write:i,each:S,remove:_,clearAll:y};var c={};function h(p){return c[p]}function i(p,d){c[p]=d}function S(p){for(var d in c)c.hasOwnProperty(d)&&p(c[d],d)}function _(p){delete c[p]}function y(p){c={}}},PHyj:function(u,G,c){"use strict";c.r(G),c.d(G,"Types",function(){return Te});var h=c("P2fV"),i=c("NJEC"),S=c("CiB2"),_=c("DYRE"),y=c("zeV3"),p=c("sRBo"),d=c("kaz8"),o=c("7Kak"),s=c("9yH6"),l=c("giR+"),a=c("fyUT"),g=c("6UJt"),m=c("DFOY"),v=c("OaEy"),w=c("2fM7"),E=c("rAM+"),k=c("T2oS"),T=c("W9HT"),D=c("+L6B"),I=c("2/Rp"),B=c("oBTY"),N=c("miYZ"),x=c("tsqr"),Y=c("9og8"),V=c("y8nQ"),P=c("Vl3Y"),F=c("tJVT"),X=c("k1fw"),Q=c("fu2T"),ce=c("gK9i"),fe=c("2qtc"),z=c("kLXV"),se=c("5NDa"),J=c("5rEg"),j=c("WmNS"),U=c.n(j),R=c("q1tI"),C=c.n(R),M=c("uMZB"),le=c.n(M),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 ne=c("Ty5D"),Z=c("J66h"),ue=c("GIiI"),K=c("2BaD"),$=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 O(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 be(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=J.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(X.a)(Object(X.a)({},je),Ze.payload);case Te.SET_LOADING:return Object(X.a)(Object(X.a)({},je),{},{loading:Ze.payload});case Te.SET_STATUS:return Object(X.a)(Object(X.a)({},je),{},{status:Ze.payload});default:throw new Error}}var Ae=G.default=function(){var je,Ze,ht=Object(ne.h)(),Tt=Object(ne.g)(),qe=Object(ne.i)(),at=qe.id,dt=P.a.useForm(),st=Object(F.a)(dt,1),St=st[0],Ut=Object(R.useState)(),Vt=Object(F.a)(Ut,2),Xt=Vt[0],At=Vt[1],Ft=Object(R.useState)([]),or=Object(F.a)(Ft,2),Ct=or[0],kr=or[1],Jt=Object(R.useState)([]),nr=Object(F.a)(Jt,2),sr=nr[0],vr=nr[1],Sr=Object(R.useReducer)(ke,_e),Ht=Object(F.a)(Sr,2),mt=Ht[0],Kt=Ht[1],hr=mt.loading,Mt=mt.data,It=mt.user,fr=mt.disciplines,cn=mt.dicts,Kr=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,dn=Hr.express_id,bn=Hr.score,oe=Hr.question_id,b=Object(R.useState)([]),A=Object(F.a)(b,2),ie=A[0],ye=A[1],re=Object(R.useState)(!1),Me=Object(F.a)(re,2),Qe=Me[0],He=Me[1],wt=Object(R.useState)(!1),tt=Object(F.a)(wt,2),Nt=tt[0],Yt=tt[1],er=Object(R.useMemo)(function(){var ct=[];return fr&&me(fr,ct),ct},[fr]),Vr=Object(R.useCallback)(Object(Y.a)(U.a.mark(function ct(){var vt,yt,gt,Bt,bt,Rt,ur,mr,Qr,cr,Cr,Dr,Br,Fr,Ln,ri,In,mn,En,Et,Dt,ut,Lt,Wt,Qt,Gt,lr,br,jt,kn,qt,Er,tr,qr,zn,Gn,Xn,fi,to,jn,wn,ro,no,pi,Cn,io,Bn,gn=arguments;return U.a.wrap(function(en){for(;;)switch(en.prev=en.next){case 0:if(vt=gn.length>0&&gn[0]!==void 0?gn[0]:0,yt=fr,!(yt.length===0)){en.next=7;break}return en.next=5,H();case 5:gt=en.sent,yt=gt.disciplines;case 7:if(!at){en.next=15;break}return Bt={disciplines:yt},en.next=11,O(at);case 11:bt=en.sent,bt.message?bt.status==="401"&&(document.location.href="/user/login"):(Rt=bt.category,ur=bt.user,mr=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,mn=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,Wt=Lt===void 0?!1:Lt,Qt=bt.hide_actual_output,Gt=bt.code_compile_score,lr=ee(yt,Ln),br=Object(F.a)(lr,2),jt=br[0],kn=br[1],He(Qt),qt=Wt?[{input:"",output:"",score:100,position:1}]:cr,Wt?(vr(cr),St.setFieldsValue({hack_sets:qt})):vr([]),Er=ht.query.lastedUpdateTime,Bt=Object(X.a)(Object(X.a)({},Bt),{},{loading:!1,user:ur,dicts:kn,status:Et,lastedUpdateTime:vt||(Er||0),data:{hack_codes:{language:Qr,code:Z.Base64.decode(mr)},hack:{category:Rt,difficult:Dr,name:Br,description:Cr,open_or_not:Fr,time_limit:In,test_set_average:mn,test_set_score:En,sub_discipline_id:jt,tag_discipline_ids:Dt,score:bn||1,item_banks_group_ids:ut,is_file:Wt,code_compile_score:Gt},hack_sets:qt,tags:Dt}}),parseInt(Gt)>0&&Yt(!0),Kt({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:mn,test_set_score:En,sub_discipline_id:jt,tag_discipline_ids:Dt,score:bn||1,item_banks_group_ids:ut,is_file:Wt}}),Yr(jt==null?void 0:jt[0],jt==null?void 0:jt[1],yt)),en.next=25;break;case 15:return en.next=17,q();case 17:zn=en.sent,Gn=zn.user,Xn=ht.query,fi=Xn.difficult,to=Xn.sub_discipline_id,jn=Xn.tag_discipline_id,wn=Xn.tagIds,ro=Xn.banksIds,no=ee(yt,parseInt(to,10)),pi=Object(F.a)(no,2),Cn=pi[0],io=pi[1],Bn=[Number(ro)],Kt({type:Te.SET_INITAL_DATA,payload:{loading:!1,user:Gn,disciplines:yt,status:0,dicts:io,data:{hack_codes:{language:"C",code:""},hack:{category:null,difficult:parseInt(fi,10),time_limit:3,description:"",test_set_score:!0,test_set_average:!0,open_or_not:!0,sub_discipline_id:Cn,tag_discipline_id:wn&&(wn==null||((tr=wn.split(","))===null||tr===void 0)?void 0:tr.map(function(Kn){return Number(Kn)})),name:"",item_banks_group_ids:Bn,is_file:!1},tags:jn?jn==null?void 0:jn.split(",").map(function(Kn){return parseInt(Kn,10)}):[],hack_sets:[{input:"",output:"",score:100,position:1}]}}}),At({hack:{category:null,difficult:parseInt(fi,10),time_limit:3,description:"",test_set_average:!0,open_or_not:!0,sub_discipline_id:Cn,tag_discipline_id:wn&&(wn==null||((qr=wn.split(","))===null||qr===void 0)?void 0:qr.map(function(Kn){return Number(Kn)})),name:"",item_banks_group_id:Bn,is_file:!1}}),Yr(Cn==null?void 0:Cn[0],Cn==null?void 0:Cn[1],yt);case 25:case"end":return en.stop()}},ct)})),[at,fr]);Object(R.useEffect)(function(){try{Vr()}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,ye(gt);case 4:case"end":return bt.stop()}},yt)})),vt.apply(this,arguments)}ct()},[]);var Yr=function(vt,yt,gt){var Bt,bt,Rt,ur=gt==null||((Bt=gt.find(function(mr){return mr.id===vt}))===null||Bt===void 0||((bt=Bt.sub_disciplines)===null||bt===void 0||((Rt=bt.find(function(mr){return mr.id===yt}))===null||Rt===void 0)))?void 0:Rt.tag_disciplines};function yr(ct,vt){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(Y.a)(U.a.mark(function ct(vt,yt){var gt,Bt,bt,Rt,ur,mr,Qr,cr,Cr,Dr,Br,Fr,Ln,ri,In,mn,En,Et;return U.a.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:gt=Object(X.a)({},vt),Bt=gt.hack_sets,bt=gt.hack_codes,Rt=gt.hack,ur=gt.tags,Rt.hide_actual_output=Qe,mr=[],Qr=[],cr=0,Cr=Rt!=null&&Rt.is_file?sr.map(function(Lt,Wt){return Object(X.a)(Object(X.a)({},Lt),{},{position:Wt+1})}):Bt.map(function(Lt){return Object(X.a)(Object(X.a)({},Lt),{},{is_file:!1})}),Dr=Object(E.a)(Cr);try{for(Dr.s();!(Br=Dr.n()).done;)Fr=Br.value,cr+=Fr.score,Fr.id&&Fr.id>=0?mr.push(Fr):Qr.push(Fr)}catch(Lt){Dr.e(Lt)}finally{Dr.f()}if(Cr!=null&&Cr.length){ut.next=11;break}return x.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 x.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 x.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],Kt({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:mr,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:x.b.success("\u4FDD\u5B58\u6210\u529F"),Vr(Le());case 40:Kt({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,mn=In.identifier,Kt({type:Te.SET_LOADING,payload:!1}),!(yt==="start")){ut.next=50;break}return ut.abrupt("return");case 50:if(!mn){ut.next=66;break}if(wr){ut.next=55;break}Tt.replace("/problems/".concat(mn,"/edit?lastedUpdateTime=").concat(Le())),ut.next=66;break;case 55:return ut.next=57,Be(mn);case 57:if(at){ut.next=65;break}return ut.next=60,be(parseInt(dn,10),{question_type:6,question_score:Rt.score,question_title:Rt.name,identifier:mn,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)})),Jr.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?(x.b.success("\u53D1\u5E03\u6210\u529F"),Kt({type:Te.SET_STATUS,payload:1})):x.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?(x.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),Kt({type:Te.SET_STATUS,payload:0})):x.b.info(vt.message);case 4:case"end":return gt.stop()}},ct)})),Nr.apply(this,arguments)}function xn(){Kr===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 On(){return nn.apply(this,arguments)}function nn(){return nn=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=yr,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)})),nn.apply(this,arguments)}function pn(){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(X.a)(Object(X.a)({},bt),{},{score:Bt}):Object(X.a)(Object(X.a)({},bt),{},{score:gt})}),vr(vt)};function ti(ct){ct.target.value||zr(sr),Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.a)({},Mt),{},{hack:Object(X.a)(Object(X.a)({},Mt.hack),{},{test_set_score:ct.target.value})})}})}function Wn(ct){Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.a)({},Mt),{},{hack:Object(X.a)(Object(X.a)({},Mt.hack),{},{is_file:ct.target.value})})}})}function $r(ct){He(ct.target.checked)}function Zr(ct){var vt=ct.target.value;vt&&zr(sr),Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.a)({},Mt),{},{hack:Object(X.a)(Object(X.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}),Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.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}),Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.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}),Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.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}),Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.a)({},Mt),{},{hack_sets:vt})}}),St.setFieldsValue({hack_sets:vt})}function pr(ct){Kt({type:Te.SET_INITAL_DATA,payload:{data:Object(X.a)(Object(X.a)({},Mt),{},{hack_codes:Object(X.a)(Object(X.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,mr=vt==null||((gt=vt.hack)===null||gt===void 0)?void 0:gt.sub_discipline_id,Qr=Object(F.a)(mr,2),cr=Qr[0],Cr=Qr[1],Dr=fr==null||((Bt=fr.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(X.a)(Object(X.a)({},St.getFieldsValue()),{},{hack:Object(X.a)(Object(X.a)({},(ur=St.getFieldsValue())===null||ur===void 0?void 0:ur.hack),{},{tag_discipline_ids:[]})});St.setFieldsValue(Br),At(Br)}else At(Object(X.a)({},St.getFieldsValue()))},Ar=function(vt){kr([].concat(Object(B.a)(Ct),[Object(X.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.I)({sub_discipline_id:yt});case 2:gt=bt.sent,kr(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(fr,vt),gt=Object(F.a)(yt,2),Bt=gt[1];St.setFieldsValue({tags:[]}),Kt({type:Te.SET_INITAL_DATA,payload:{dicts:Bt,data:Object(X.a)(Object(X.a)({},Mt),{},{hack:Object(X.a)(Object(X.a)({},Mt.hack),{},{sub_discipline_id:ct}),tags:[]})}})}return C.a.createElement(T.a,{spinning:hr,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:pn}," ",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 yr(vt,yt)}});return}yr(vt,yt)}},C.a.createElement(Xe.a,{leftChild:C.a.createElement(ze,{onAddTestCases:Nn,form:St,handleAddKnowledgeFinish:Ar,MyGroup:ie,formValue:Xt,knowledgeOptions:Ct,onChangeLanguage:pr,onChangeSubDiscipline:Rr,onRemoveTestCase:Pn,onAddTestCase:Mn,dicts:cn,categorys:er,callback_url:wr,hack:Mt.hack,onChangeScore:ti,onChangehide:$r,onChangeAverage:Zr,onChangeFile:Wn,uploadData:sr,setUploadData:vr,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:Kr?"default":"primary",onClick:xn},Kr?"\u64A4\u9500\u53D1\u5E03":"\u7ACB\u5373\u53D1\u5E03"),C.a.createElement(I.a,{loading:hr,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"),C.a.createElement(I.a,{type:"primary",onClick:On},Kr?"\u5F00\u59CB\u6311\u6218":"\u6A21\u62DF\u6311\u6218")):C.a.createElement(R.Fragment,null,C.a.createElement(I.a,{onClick:pn},"\u53D6\u6D88"),C.a.createElement(I.a,{loading:hr,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,Ut=je.MyGroup,Vt=je.formValue,Xt=je.knowledgeOptions,At=je.categorys,Ft=je.hack,or=je.callback_url,Ct=je.onChangeAverage,kr=je.onChangeScore,Jt=je.onChangehide,nr=je.onChangeFile,sr=je.onAddTestCase,vr=je.onRemoveTestCase,Sr=je.onChangeSubDiscipline,Ht=je.onChangeLanguage,mt=je.uploadData,Kt=je.setUploadData,hr=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,fr=Object(R.useState)(Mt),cn=Object(F.a)(fr,2),Kr=cn[0],rt=cn[1],Ot=Ft.test_set_average,Hr=Ft.test_set_score,wr=Object(R.useState)(!1),dn=Object(F.a)(wr,2),bn=dn[0],oe=dn[1],b=function(Me,Qe){var He=Object(B.a)(mt);He.splice(Qe,1),Ot?hr(He):Kt(He)},A=function(Me,Qe){console.log(Me,Qe);var He=mt.map(function(wt,tt){return tt===Qe?Object(X.a)(Object(X.a)({},wt),{},{score:Me.target.value?Number(Me.target.value):0}):wt});Kt(He)},ie=function(Me){var Qe=mt.concat(Me);Ft.test_set_average?hr(Qe):Kt(Qe)};function ye(re){re.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:Sr}))),C.a.createElement("div",{className:le.a.field},or&&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(a.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(a.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:Ht},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:(Ft==null?void 0:Ft.tag_discipline_id)||(Ft==null?void 0:Ft.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:Xt,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(J.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",suffix:C.a.createElement("span",null,60-Ft.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($.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",!Ft.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:kr},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(y.a,{direction:"horizontal"},C.a.createElement(s.a,{value:!1},"\u6587\u672C"),C.a.createElement(s.a,{value:!0},"\u6587\u4EF6")))),!Ft.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"))),!Ft.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:Kr,style:{display:"flex",alignItems:"center"},className:le.a.checkboxs,onChange:function(Me){rt(Me.target.checked),at.setFieldsValue({hack:{code_compile_score:0}}),Ft.test_set_average&&(Ft.is_file?hr(mt):dt())}},"\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"),Kr&&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(a.a,{onChange:function(){Ft.test_set_average&&(Ft.is_file?hr(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")),Ft.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:Ft==null?void 0:Ft.test_set_average,inputChange:A,showScore:!Ft.test_set_score,data:mt,onRemove:b})),!Ft.is_file&&C.a.createElement(P.a.List,{name:"hack_sets"},function(re,Me){return Object(S.a)(Me),C.a.createElement(ce.a,{accordion:!0},re.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(a.a,{onClick:ye,min:0,max:100,disabled:Ot})),C.a.createElement("span",null,"%"))),extra:He>0?C.a.createElement("div",{onClick:ye},C.a.createElement(i.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(He+1),onConfirm:function(){vr(He)}},C.a.createElement(K.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(Ve.b,{rootIdentifier:null,visible:bn,onClose:function(){return oe(!1)},onOK:ie}))}},PVpz:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.StreamCipher,y=i.algo,p=[],d=[],o=[],s=y.RabbitLegacy=_.extend({_doReset:function(){var a=this._key.words,g=this.cfg.iv,m=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],v=this._C=[a[2]<<16|a[2]>>>16,a[0]&4294901760|a[1]&65535,a[3]<<16|a[3]>>>16,a[1]&4294901760|a[2]&65535,a[0]<<16|a[0]>>>16,a[2]&4294901760|a[3]&65535,a[1]<<16|a[1]>>>16,a[3]&4294901760|a[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 E=g.words,k=E[0],T=E[1],D=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,I=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,B=D>>>16|I&4294901760,N=I<<16|D&65535;v[0]^=D,v[1]^=B,v[2]^=I,v[3]^=N,v[4]^=D,v[5]^=B,v[6]^=I,v[7]^=N;for(var w=0;w<4;w++)l.call(this)}},_doProcessBlock:function(a,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,a[g+v]^=p[v]},blockSize:128/32,ivSize:64/32});function l(){for(var a=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=a[m]+g[m],w=v&65535,E=v>>>16,k=((w*w>>>17)+w*E>>>15)+E*E,T=((v&4294901760)*v|0)+((v&65535)*v|0);o[m]=k^T}a[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,a[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,a[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,a[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,a[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,a[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,a[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,a[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}i.RabbitLegacy=_._createHelper(s)}(),h.RabbitLegacy})},RELg:function(u,G,c){var h=c("MFOe"),i=h.Global;u.exports={name:"oldIE-userDataStorage",write:d,read:o,each:s,remove:l,clearAll:a};var S="storejs",_=i.document,y=v(),p=(i.navigator?i.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function d(w,E){if(p)return;var k=m(w);y(function(T){T.setAttribute(k,E),T.save(S)})}function o(w){if(p)return;var E=m(w),k=null;return y(function(T){k=T.getAttribute(E)}),k}function s(w){y(function(E){for(var k=E.XMLDocument.documentElement.attributes,T=k.length-1;T>=0;T--){var D=k[T];w(E.getAttribute(D.name),D.name)}})}function l(w){var E=m(w);y(function(k){k.removeAttribute(E),k.save(S)})}function a(){y(function(w){var E=w.XMLDocument.documentElement.attributes;w.load(S);for(var k=E.length-1;k>=0;k--)w.removeAttribute(E[k].name);w.save(S)})}var g=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function m(w){return w.replace(/^\d/,"___$&").replace(g,"___")}function v(){if(!_||!_.documentElement||!_.documentElement.addBehavior)return null;var w="script",E,k,T;try{k=new ActiveXObject("htmlfile"),k.open(),k.write("<"+w+">document.w=window</"+w+'><iframe src="/favicon.ico"></iframe>'),k.close(),E=k.w.frames[0].document,T=E.createElement("div")}catch(D){T=_.createElement("div"),E=_.body}return function(D){var I=[].slice.call(arguments,0);I.unshift(T),E.appendChild(T),T.addBehavior("#default#userData"),T.load(S),D.apply(this,I),E.removeChild(T);return}}},RxwV:function(u,G,c){"use strict";var h=c("q1tI"),i=c("uciX"),S=c("2W6z"),_=c.n(S),y=c("4IlW"),p=c("uK0f"),d=c.n(p);function o(pe,me){if(pe===me)return!0;if(!pe||!me)return!1;var ee=pe.length;if(me.length!==ee)return!1;for(var ne=0;ne<ee;ne++)if(pe[ne]!==me[ne])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 a(pe,me){for(var ee=0;ee<me.length;ee++){var ne=me[ee];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(pe,ne.key,ne)}}function g(pe,me,ee){return me&&a(pe.prototype,me),ee&&a(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(ne,Z){return ne.__proto__=Z,ne},v(pe,me)}function w(pe){var me=T();return function(){var ee=D(pe),ne;if(me){var Z=D(this).constructor;ne=Reflect.construct(ee,arguments,Z)}else ne=ee.apply(this,arguments);return E(this,ne)}}function E(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 T(){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 D(pe){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(ee){return ee.__proto__||Object.getPrototypeOf(ee)},D(pe)}var I=function(){var pe=function(me){m(ne,me);var ee=w(ne);function ne(){var Z;return l(this,ne),Z=ee.apply(this,arguments),Z.menuItems={},Z.saveMenuItem=function(ue){return function(K){Z.menuItems[ue]=K}},Z}return g(ne,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(ue){!ue.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(ue){var K=this.props,$=K.fieldNames,Ce=K.defaultFieldNames;return $[ue]||Ce[ue]}},{key:"getOption",value:function(ue,K){var $=this.props,Ce=$.prefixCls,q=$.expandTrigger,H=$.expandIcon,O=$.loadingIcon,W=this.props.onSelect.bind(this,ue,K),we=this.props.onItemDoubleClick.bind(this,ue,K),be={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)&&(be={onMouseEnter:this.delayOnSelect.bind(this,W),onMouseLeave:this.delayOnSelect.bind(this),onClick:W}),this.isActiveOption(ue,K)&&(Oe+=" ".concat(Ce,"-menu-item-active"),be.ref=this.saveMenuItem(K)),ue.disabled&&(Oe+=" ".concat(Ce,"-menu-item-disabled"));var Ue=null;ue.loading&&(Oe+=" ".concat(Ce,"-menu-item-loading"),Ue=O||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},be,{role:"menuitem",onMouseDown:function(Xe){return Xe.preventDefault()}}),ue[this.getFieldName("label")],Be,Ue)}},{key:"getActiveOptions",value:function(ue){var K=this,$=this.props.options,Ce=ue||this.props.activeValue;return d()($,function(q,H){return q[K.getFieldName("value")]===Ce[H]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var ue=this,K=this.props.options,$=this.getActiveOptions().map(function(Ce){return Ce[ue.getFieldName("children")]}).filter(function(Ce){return!!Ce});return $.unshift(K),$}},{key:"delayOnSelect",value:function(ue){for(var K=this,$=arguments.length,Ce=new Array($>1?$-1:0),q=1;q<$;q++)Ce[q-1]=arguments[q];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof ue=="function"&&(this.delayTimer=window.setTimeout(function(){ue(Ce),K.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var ue=this.getShowOptions().length,K=0;K<ue;K++){var $=this.menuItems[K];$&&$.parentElement&&($.parentElement.scrollTop=$.offsetTop)}}},{key:"isActiveOption",value:function(ue,K){var $=this.props.activeValue,Ce=$===void 0?[]:$;return Ce[K]===ue[this.getFieldName("value")]}},{key:"render",value:function(){var ue=this,K=this.props,$=K.prefixCls,Ce=K.dropdownMenuColumnStyle;return h.createElement("div",null,this.getShowOptions().map(function(q,H){return h.createElement("ul",{className:"".concat($,"-menu"),key:H,style:Ce},q.map(function(O){return ue.getOption(O,H)}))}))}}]),ne}(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}}},x=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 V(pe,me){if(pe==null)return{};var ee=P(pe,me),ne,Z;if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(pe);for(Z=0;Z<ue.length;Z++){if(ne=ue[Z],me.indexOf(ne)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(pe,ne))continue;ee[ne]=pe[ne]}}return ee}function P(pe,me){if(pe==null)return{};var ee={},ne=Object.keys(pe),Z,ue;for(ue=0;ue<ne.length;ue++){if(Z=ne[ue],me.indexOf(Z)>=0)continue;ee[Z]=pe[Z]}return ee}function F(pe){return fe(pe)||ce(pe)||Q(pe)||X()}function X(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function 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,ne=new Array(me);ee<me;ee++)ne[ee]=pe[ee];return ne}function se(pe,me){if(!(pe instanceof me))throw new TypeError("Cannot call a class as a function")}function J(pe,me){for(var ee=0;ee<me.length;ee++){var ne=me[ee];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(pe,ne.key,ne)}}function j(pe,me,ee){return me&&J(pe.prototype,me),ee&&J(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(ne,Z){return ne.__proto__=Z,ne},R(pe,me)}function C(pe){var me=he();return function(){var ee=ve(pe),ne;if(me){var Z=ve(this).constructor;ne=Reflect.construct(ee,arguments,Z)}else ne=ee.apply(this,arguments);return M(this,ne)}}function M(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(ne,me);var ee=C(ne);function ne(Z){var ue;se(this,ne),ue=ee.call(this,Z),ue.setPopupVisible=function($){var Ce=ue.state.value;"popupVisible"in ue.props||ue.setState({popupVisible:$}),$&&!ue.state.popupVisible&&ue.setState({activeValue:Ce}),ue.props.onPopupVisibleChange($)},ue.handleChange=function($,Ce,q){var H=Ce.visible;(q.type!=="keydown"||q.keyCode===y.a.ENTER)&&(ue.props.onChange($.map(function(O){return O[ue.getFieldName("value")]}),$),ue.setPopupVisible(H))},ue.handlePopupVisibleChange=function($){ue.setPopupVisible($)},ue.handleMenuSelect=function($,Ce,q){var H=ue.trigger.getRootDomNode();H&&H.focus&&H.focus();var O=ue.props,W=O.changeOnSelect,we=O.loadData,be=O.expandTrigger;if(!$||$.disabled)return;var Oe=ue.state.activeValue;Oe=Oe.slice(0,Ce+1),Oe[Ce]=$[ue.getFieldName("value")];var Be=ue.getActiveOptions(Oe);if($.isLeaf===!1&&!$[ue.getFieldName("children")]&&we){W&&ue.handleChange(Be,{visible:!0},q),ue.setState({activeValue:Oe}),we(Be);return}var Fe={};!$[ue.getFieldName("children")]||!$[ue.getFieldName("children")].length?(ue.handleChange(Be,{visible:!1},q),Fe.value=Oe):W&&(q.type==="click"||q.type==="keydown")&&(be==="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!==y.a.ENTER)&&delete Fe.value,ue.setState(Fe)},ue.handleItemDoubleClick=function(){var $=ue.props.changeOnSelect;$&&ue.setPopupVisible(!1)},ue.handleKeyDown=function($){var Ce=ue.props.children;if(Ce&&Ce.props.onKeyDown){Ce.props.onKeyDown($);return}var q=F(ue.state.activeValue),H=q.length-1<0?0:q.length-1,O=ue.getCurrentLevelOptions(),W=O.map(function(Be){return Be[ue.getFieldName("value")]}).indexOf(q[H]);if($.keyCode!==y.a.DOWN&&$.keyCode!==y.a.UP&&$.keyCode!==y.a.LEFT&&$.keyCode!==y.a.RIGHT&&$.keyCode!==y.a.ENTER&&$.keyCode!==y.a.SPACE&&$.keyCode!==y.a.BACKSPACE&&$.keyCode!==y.a.ESC&&$.keyCode!==y.a.TAB)return;if(!ue.state.popupVisible&&$.keyCode!==y.a.BACKSPACE&&$.keyCode!==y.a.LEFT&&$.keyCode!==y.a.RIGHT&&$.keyCode!==y.a.ESC&&$.keyCode!==y.a.TAB){ue.setPopupVisible(!0);return}if($.keyCode===y.a.DOWN||$.keyCode===y.a.UP){$.preventDefault();var we=W;we!==-1?$.keyCode===y.a.DOWN?(we+=1,we=we>=O.length?0:we):(we-=1,we=we<0?O.length-1:we):we=0,q[H]=O[we][ue.getFieldName("value")]}else if($.keyCode===y.a.LEFT||$.keyCode===y.a.BACKSPACE)$.preventDefault(),q.splice(q.length-1,1);else if($.keyCode===y.a.RIGHT)$.preventDefault(),O[W]&&O[W][ue.getFieldName("children")]&&q.push(O[W][ue.getFieldName("children")][0][ue.getFieldName("value")]);else if($.keyCode===y.a.ESC||$.keyCode===y.a.TAB){ue.setPopupVisible(!1);return}(!q||q.length===0)&&ue.setPopupVisible(!1);var be=ue.getActiveOptions(q),Oe=be[be.length-1];ue.handleMenuSelect(Oe,be.length-1,$),ue.props.onKeyDown&&ue.props.onKeyDown($)},ue.saveTrigger=function($){ue.trigger=$};var K=[];return"value"in Z?K=Z.value||[]:"defaultValue"in Z&&(K=Z.defaultValue||[]),_()(!("filedNames"in Z),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),ue.state={popupVisible:Z.popupVisible,activeValue:K,value:K,prevProps:Z},ue.defaultFieldNames={label:"label",value:"value",children:"children"},ue}return j(ne,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(ue){var K=this.defaultFieldNames,$=this.props,Ce=$.fieldNames,q=$.filedNames;return"filedNames"in this.props?q[ue]||K[ue]:Ce[ue]||K[ue]}},{key:"getFieldNames",value:function(){var ue=this.props,K=ue.fieldNames,$=ue.filedNames;return"filedNames"in this.props?$:K}},{key:"getCurrentLevelOptions",value:function(){var ue=this,K=this.props.options,$=K===void 0?[]:K,Ce=this.state.activeValue,q=Ce===void 0?[]:Ce,H=d()($,function(O,W){return O[ue.getFieldName("value")]===q[W]},{childrenKeyName:this.getFieldName("children")});return H[H.length-2]?H[H.length-2][this.getFieldName("children")]:F($).filter(function(O){return!O.disabled})}},{key:"getActiveOptions",value:function(ue){var K=this;return d()(this.props.options||[],function($,Ce){return $[K.getFieldName("value")]===ue[Ce]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var ue=this.props,K=ue.prefixCls,$=ue.transitionName,Ce=ue.popupClassName,q=ue.options,H=q===void 0?[]:q,O=ue.disabled,W=ue.builtinPlacements,we=ue.popupPlacement,be=ue.children,Oe=ue.dropdownRender,Be=V(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(K,"-menus-empty");var Ge=Fe;return Oe&&(Ge=Oe(Fe)),h.createElement(i.a,Object.assign({ref:this.saveTrigger},Be,{popupPlacement:we,builtinPlacements:W,popupTransitionName:$,action:O?[]:["click"],popupVisible:O?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(K,"-menus"),popupClassName:Ce+Ue,popup:Ge}),h.cloneElement(be,{onKeyDown:this.handleKeyDown,tabIndex:O?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(ue,K){var $=K.prevProps,Ce=$===void 0?{}:$,q={prevProps:ue};return"value"in ue&&!o(Ce.value,ue.value)&&(q.value=ue.value||[],"loadData"in ue||(q.activeValue=ue.value||[])),"popupVisible"in ue&&(q.popupVisible=ue.popupVisible),q}}]),ne}(h.Component);return pe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:x,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},pe}(),Se=Ee,ae=G.a=Se},S6kV:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.OFB=function(){var i=h.lib.BlockCipherMode.extend(),S=i.Encryptor=i.extend({processBlock:function(_,y){var p=this._cipher,d=p.blockSize,o=this._iv,s=this._keystream;o&&(s=this._keystream=o.slice(0),this._iv=void 0),p.encryptBlock(s,0);for(var l=0;l<d;l++)_[y+l]^=s[l]}});return i.Decryptor=S,i}(),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,i,S=!1,_,y;window.PR_SHOULD_USE_CONTINUATION=!0;var p,d;(function(){var o=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"],a=[l,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],g=[a,"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=[a,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],v=[a,"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",E=[a,"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",T=[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"],D=[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,E,k,T,D,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/,x="str",Y="kwd",V="com",P="typ",F="lit",X="pun",Q="pln",ce="tag",fe="dec",z="src",se="atn",J="atv",j="nocode",U="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function R(q){for(var H=0,O=!1,W=!1,we=0,be=q.length;we<be;++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,""))){O=!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&&O)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,be=q.length;we<be;++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 O=/(?:^|\s)nocode(?:\s|$)/,W=[],we=0,be=[],Oe=0;function Be(Fe){var Ue=Fe.nodeType;if(Ue==1){if(O.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]=`
`,be[Oe<<1]=we++,be[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,be[Oe<<1]=we,we+=Xe.length,be[Oe++<<1|1]=Fe)}}return Be(q),{sourceCode:W.join("").replace(/\n$/,""),spans:be}}function M(q,H,O,W,we){if(!O)return;var be={sourceNode:q,pre:1,langExtension:null,numberLines:null,sourceCode:O,spans:null,basePos:H,decorations:null};W(be),we.push.apply(we,be.decorations)}var le=/\S/;function he(q){for(var H=void 0,O=q.firstChild;O;O=O.nextSibling){var W=O.nodeType;H=W===1?H?q:O:W===3&&le.test(O.nodeValue)?q:H}return H===q?void 0:H}function ve(q,H){var O={},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;)O[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,be=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=O[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);M(Ue,Fe+_e,ot.substring(0,ke),be,Ge),M(Ue,Fe+_e+ke,Te,ne(ze,Te),Ge),M(Ue,Fe+_e+Ae,ot.substring(Ae),be,Ge)}}Oe.decorations=Ge};return be}function Ee(q){var H=[],O=[];q.tripleQuotedStrings?H.push([x,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):q.multiLineStrings?H.push([x,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):H.push([x,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),q.verbatimStrings&&O.push([x,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var W=q.hashComments;W&&(q.cStyleComments?(W>1?H.push([V,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):H.push([V,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),O.push([x,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):H.push([V,/^#[^\r\n]*/,null,"#"])),q.cStyleComments&&(O.push([V,/^\/\/[^\r\n]*/,null]),O.push([V,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var we=q.regexLiterals;if(we){var be=we>1?"":`
\r`,Oe=be?".":"[\\S\\s]",Be="/(?=[^/*"+be+"])(?:[^/\\x5B\\x5C"+be+"]|\\x5C"+Oe+"|\\x5B(?:[^\\x5C\\x5D"+be+"]|\\x5C"+Oe+")*(?:\\x5D|$))+/";O.push(["lang-regex",RegExp("^"+U+"("+Be+")")])}var Fe=q.types;Fe&&O.push([P,Fe]);var Ue=(""+q.keywords).replace(/^ | $/g,"");Ue.length&&O.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*/)"),O.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],[X,new RegExp(Ge),null]),ve(H,O)}var Se=Ee({keywords:B,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ae(q,H,O){for(var W=/(?:^|\s)nocode(?:\s|$)/,we=/\r\n?|\n/,be=q.ownerDocument,Oe=be.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)&&O){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(be.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=be.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(be.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 O=/\n/g,W=q.sourceCode,we=W.length,be=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(be,ot))){H&&(ke=ke.replace(O,"\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),be<Le&&(Oe[Fe+1]=Te=Ae.createTextNode(W.substring(ot,Le)),je.insertBefore(Te,ze.nextSibling))}be=ot,be>=Le&&(Fe+=2),be>=_e&&(Ye+=2)}}finally{Ve&&(Ve.style.display=$e)}}var me={};function ee(q,H){for(var O=H.length;--O>=0;){var W=H[O];me.hasOwnProperty(W)?o.console&&console.warn("cannot override language handler %s",W):me[W]=q}}function ne(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[^>]*(?:>|$)/],[V,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[X,/^(?:<[%?]|[%?]>)/],["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
`],[J,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ce,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[se,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[X,/^[=<>\/]+/],["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([],[[J,/^[\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:T,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:D,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ee(Ee({keywords:E,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([],[[x,/^[\s\S]+/]]),["regex"]);function Z(q){var H=q.langExtension;try{var O=C(q.sourceNode,q.pre),W=O.sourceCode;q.sourceCode=W,q.spans=O.spans,q.basePos=0,ne(H,W)(q),pe(q)}catch(we){o.console&&console.log(we&&we.stack||we)}}function ue(q,H,O){var W=O||!1,we=H||null,be=document.createElement("div");be.innerHTML="<pre>"+q+"</pre>",be=be.firstChild,W&&ae(be,W,!0);var Oe={langExtension:we,numberLines:W,sourceNode:be,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Z(Oe),be.innerHTML}function K(q,H){var O=H||document.body,W=O.ownerDocument||document;function we(De){return O.getElementsByTagName(De)}for(var be=[we("pre"),we("code"),we("xmp")],Oe=[],Be=0;Be<be.length;++Be)for(var Fe=0,Ue=be[Be].length;Fe<Ue;++Fe)Oe.push(be[Be][Fe]);be=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=o.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(Xt,At,Ft){_e[At]=Ft});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 Ut=_e.linenums;(Ut=Ut==="true"||+Ut)||(Ut=ze.match(/\blinenums\b(?::(\d+))?/),Ut=Ut?Ut[1]&&Ut[1].length?+Ut[1]:!0:!1),Ut&&ae(Le,Ut,at);var Vt={langExtension:Tt,sourceNode:Le,numberLines:Ut,pre:at,sourceCode:null,basePos:null,spans:null,decorations:null};Z(Vt)}}}Ye<Oe.length?o.setTimeout(Ie,250):typeof q=="function"&&q()}Ie()}var $=o.PR={createSimpleLexer:ve,registerLangHandler:ee,sourceDecorator:Ee,PR_ATTRIB_NAME:se,PR_ATTRIB_VALUE:J,PR_COMMENT:V,PR_DECLARATION:fe,PR_KEYWORD:Y,PR_LITERAL:F,PR_NOCODE:j,PR_PLAIN:Q,PR_PUNCTUATION:X,PR_SOURCE:z,PR_STRING:x,PR_TAG:ce,PR_TYPE:P,prettyPrintOne:S?o.prettyPrintOne=ue:p=ue,prettyPrint:d=S?o.prettyPrint=K:d=K},Ce=o.define;typeof Ce=="function"&&Ce.amd&&Ce("google-code-prettify",[],function(){return $})})()},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,i){u.exports=i()})(this,function(){"use strict";var h=navigator.userAgent,i=navigator.platform,S=/gecko\/\d/i.test(h),_=/MSIE \d/.test(h),y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(h),p=/Edge\/(\d+)/.exec(h),d=_||y||p,o=d&&(_?document.documentMode||6:+(p||y)[1]),s=!p&&/WebKit\//.test(h),l=s&&/Qt\/\d+\.\d+/.test(h),a=!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),E=!p&&/AppleWebKit/.test(h)&&/Mobile\/\w+/.test(h),k=/Android/.test(h),T=E||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(h),D=E||/Mac/.test(i),I=/\bCrOS\b/.test(h),B=/win/i.test(i),N=g&&h.match(/Version\/(\d*\.\d*)/);N&&(N=Number(N[1])),N&&N>=15&&(g=!1,s=!0);var x=D&&(l||g&&(N==null||N<12.11)),Y=S||d&&o>=9;function V(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var P=function(e,t){var n=e.className,r=V(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 X(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 J(e,t){var n=e.className;V(t).test(n)||(e.className+=(n?" ":"")+t)}function j(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!V(n[r]).test(t)&&(t+=" "+n[r]);return t}var U=function(e){e.select()};E?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 M(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 ne(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 K(e,t,n){for(var r=0,f=n(t);r<e.length&&n(e[r])<=f;)r++;e.splice(r,0,t)}function $(){}function Ce(e,t){var n;return Object.create?n=Object.create(e):($.prototype=e,n=new $),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 O(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 be(e){return e.charCodeAt(0)>=768&&we.test(e)}function Oe(e,t,n){for(;(n<0?t>0:t<e.length)&&be(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 ar=0;ar<Ke;++ar){var Ir=We[ar];if(Ir==",")We[ar]="N";else if(Ir=="%"){var gr=void 0;for(gr=ar+1;gr<Ke&&We[gr]=="%";++gr);for(var fn=ar&&We[ar-1]=="!"||gr<Ke&&We[gr]=="1"?"1":"N",sn=ar;sn<gr;++sn)We[sn]=fn;ar=gr-1}}for(var Tr=0,ln=Pe;Tr<Ke;++Tr){var Ur=We[Tr];ln=="L"&&Ur=="1"?We[Tr]="L":L.test(Ur)&&(ln=Ur)}for(var Mr=0;Mr<Ke;++Mr)if(f.test(We[Mr])){var Or=void 0;for(Or=Mr+1;Or<Ke&&f.test(We[Or]);++Or);for(var xr=(Mr?We[Mr-1]:Pe)=="L",un=(Or<Ke?We[Or]:Pe)=="L",Ri=xr==un?xr?"L":"R":Pe,ei=Mr;ei<Or;++ei)We[ei]=Ri;Mr=Or-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 rn=Un;rn<jr;)if(de.test(We[rn])){Un<rn&&(Xr.splice(di,0,new ge(1,Un,rn)),di+=hi);var Di=rn;for(++rn;rn<jr&&de.test(We[rn]);++rn);Xr.splice(di,0,new ge(2,Di,rn)),di+=hi,Un=rn}else++rn;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)),D&&e.ctrlKey&&t==1&&(t=3),t}var Ze=function(){if(d&&o<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");X(e,Q("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ht=t.offsetWidth<=1&&t.offsetHeight>2&&!(d&&o<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=X(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")}(),Ut=null;function Vt(e){if(Ut!=null)return Ut;var t=X(e,Q("span","x")),n=t.getBoundingClientRect(),r=fe(t,0,1).getBoundingClientRect();return Ut=Math.abs(n.left-r.left)>1}var Xt={},At={};function Ft(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Xt[e]=t}function or(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 kr(e,t){t=Ct(t);var n=Xt[t.name];if(!n)return kr(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 vr(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 Sr(e,t,n){return e.startState?e.startState(t,n):!0}var Ht=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};Ht.prototype.eol=function(){return this.pos>=this.string.length},Ht.prototype.sol=function(){return this.pos==this.lineStart},Ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ht.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},Ht.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ht.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ht.prototype.skipToEnd=function(){this.pos=this.string.length},Ht.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ht.prototype.backUp=function(e){this.pos-=e},Ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=M(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?M(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.indentation=function(){return M(this.string,null,this.tabSize)-(this.lineStart?M(this.string,this.lineStart,this.tabSize):0)},Ht.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)}},Ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ht.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ht.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ht.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 Kt(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 hr(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 fr(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 cn(e,t){return t>=e.first&&t<e.first+e.size}function Kr(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 dn(e,t){return Ot(e,t)<0?t:e}function bn(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 b(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]=b(e,t[r]);return n}var ye=function(e,t){this.state=e,this.lookAhead=t},re=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};re.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},re.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}},re.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},re.fromSaved=function(e,t,n){return t instanceof ye?new re(e,sr(e.mode,t.state),n,t.lookAhead):new re(e,sr(e.mode,t),n)},re.prototype.save=function(e){var t=e!==!1?sr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ye(t,this.maxLookAhead):t};function Me(e,t,n,r){var f=[e.state.modeGen],L={};Yr(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,Yr(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 re(r,!0,t);var L=yr(e,t,n),te=L>r.first&&mt(r,L-1).stateAfter,de=te?re.fromSaved(r,te,L):new re(r,Sr(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 Ht(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=vr(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]=vr(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 er(e,t,n,r){var f=e.doc,L=f.mode,te;t=b(f,t);var de=mt(f,t.line),ge=He(e,t.line,n),xe=new Ht(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 Vr(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 Yr(e,t,n,r,f,L,te){var de=n.flattenSpans;de==null&&(de=e.options.flattenSpans);var ge=0,xe=null,Re=new Ht(t,e.options.tabSize,r),Pe,Ke=e.options.addModeClass&&[null];for(t==""&&Vr(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=Vr(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 yr(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 ye?xe.lookAhead:0)<=L.modeFrontier))return de;var Re=M(ge.text,null,e.options.tabSize);(f==null||r>Re)&&(f=de-1,r=Re)}return f}function Jr(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 ye)||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 xn(){Wr=!0}function On(e,t,n){this.marker=e,this.from=t,this.to=n}function nn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function pn(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 On(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 On(te,ge?null:L.from-t,L.to==null?null:L.to-t))}}return r}function $r(e,t){if(t.full)return null;var n=cn(e,t.from.line)&&mt(e,t.from.line).markedSpans,r=cn(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=nn(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=nn(de,it.marker);lt||(it.from=Re,xe&&(de||(de=[])).push(it))}else it.from+=Re,xe&&(de||(de=[])).push(it)}de&&(de=Zr(de)),ge&&ge!=de&&(ge=Zr(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 On(de[_t].marker,null,null));for(var Pt=0;Pt<xt;++Pt)ft.push(pt);ft.push(ge)}return ft}function Zr(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 pr(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)||pr(e)-pr(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)||pr(ge.marker)-pr(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(!mr(e,n))return t;for(;r=ct(n);)n=r.find(1,!0).line;return It(n)+1}function mr(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,nn(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 mn(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&&o<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&&o<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",ne(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&&o<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 Wt(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]),mn(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 ar in zt.attributes)(xt||(xt={}))[ar]=zt.attributes[ar];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 gr=0;gr<pt.length;++gr)Wt(t,0,pt[gr]);if(ft&&(ft.from||0)==ge){if(Wt(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 fn=Math.min(de,We);;){if(Re){var sn=ge+Re.length;if(!ft){var Tr=sn>fn?Re.slice(0,fn-ge):Re;t.addToken(t,Tr,Pe?Pe+et:et,lt,ge+Tr.length==We?it:"",Ke,xt)}if(sn>=fn){Re=Re.slice(fn-ge),ge=fn;break}ge=sn,lt=""}Re=f.slice(L,L=n[xe++]),Pe=mn(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=mr(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 br=null;function jt(e){br?br.ops.push(e):e.ownsGroup=br={ops:[e],delayedCallbacks:[]}}function kn(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 qt(e,t){var n=e.ownsGroup;if(!n)return;try{kn(n)}finally{br=null,t(n)}}var Er=null;function tr(e,t){var n=nt(e,t);if(!n.length)return;var r=Array.prototype.slice.call(arguments,2),f;br?f=br.delayedCallbacks:Er?f=Er:(f=Er=[],setTimeout(qr,0));for(var L=function(de){f.push(function(){return n[de].apply(null,r)})},te=0;te<n.length;++te)L(te)}function qr(){var e=Er;Er=null;for(var t=0;t<e.length;++t)e[t]()}function zn(e,t,n,r){for(var f=0;f<t.changes.length;f++){var L=t.changes[f];L=="text"?to(e,t):L=="gutter"?wn(e,t,n,r):L=="class"?jn(e,t):L=="widget"&&ro(e,t,r)}t.changes=null}function Gn(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&&o<8&&(e.node.style.zIndex=2)),e.node}function Xn(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=Gn(t);t.background=r.insertBefore(Q("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function fi(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 to(e,t){var n=t.text.className,r=fi(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,jn(e,t)):n&&(t.text.className=n)}function jn(e,t){Xn(e,t),t.line.wrapClass?Gn(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 wn(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=Gn(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=Gn(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",Kr(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 ro(e,t,n){t.alignable&&(t.alignable=null);for(var r=V("CodeMirror-linewidget"),f=t.node.firstChild,L=void 0;f;f=L)L=f.nextSibling,r.test(f.className)&&t.node.removeChild(f);pi(e,t,n)}function no(e,t,n,r){var f=fi(e,t);return t.text=t.node=f.pre,f.bgClass&&(t.bgClass=f.bgClass),f.textClass&&(t.textClass=f.textClass),jn(e,t),wn(e,t,n,r),pi(e,t,r),t.node}function pi(e,t,n){if(Cn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Cn(e,t.rest[r],t,n,!1)}function Cn(e,t,n,r,f){if(!t.widgets)return;for(var L=Gn(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"),io(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 io(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 Bn(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;"),X(t.display.measure,Q("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function gn(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 Mi(e){return e.lineSpace.offsetTop}function en(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Kn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=X(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 An(e){return ve-e.display.nativeBarWidth}function ni(e){return e.display.scroller.clientWidth-An(e)-e.display.barWidth}function Oo(e){return e.display.scroller.clientHeight-An(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,X(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&&(zn(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&&be(t.line.text.charAt(f.coverStart+te));)--te;for(;f.coverStart+de<f.coverEnd&&be(t.line.text.charAt(f.coverStart+de));)++de;if(d&&o<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&&o<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&&o<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 Ni(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 a&&k?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ga(){return a&&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+=Bn(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+=Mi(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 _n(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=b(e.doc,t),e.options.lineWrapping||(n=vi(e.display)*t.ch);var r=mt(e.doc,t.line),f=cr(r)+Mi(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=fr(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?Xs: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=_n(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(_n(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=_n(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 Xs(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"))}X(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");X(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(mr(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=M(xe,xe.length,e.options.tabSize)-xe.length;ge=rt(ge.line,Math.max(0,Math.round((L-Kn(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 on(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 Ks(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 Pi(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=_n(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=Kn(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,ar,Ir;function gr(Tr,ln){return Ro(e,rt(pt,Tr),"div",kt,ln)}function fn(Tr,ln,Ur){var Mr=xa(e,kt,null,Tr),Or=ln=="ltr"==(Ur=="after")?"left":"right",xr=Ur=="after"?Mr.begin:Mr.end-(/\s/.test(kt.text.charAt(Mr.end-1))?2:1);return gr(xr,Or)[Or]}var sn=Xe(kt,f.direction);return Fe(sn,_t||0,Pt==null?zt:Pt,function(Tr,ln,Ur,Mr){var Or=Ur=="ltr",xr=gr(Tr,Or?"left":"right"),un=gr(ln-1,Or?"right":"left"),Ri=_t==null&&Tr==0,ei=Pt==null&&ln==zt,Xr=Mr==0,Dn=!sn||Mr==sn.length-1;if(un.top-xr.top<=3){var jr=(xe?Ri:ei)&&Xr,sa=(xe?ei:Ri)&&Dn,Un=jr?de:(Or?xr:un).left,di=sa?ge:(Or?un:xr).right;Re(Un,xr.top,di-Un,xr.bottom)}else{var hi,rn,Di,la;Or?(hi=xe&&Ri&&Xr?de:xr.left,rn=xe?ge:fn(Tr,Ur,"before"),Di=xe?de:fn(ln,Ur,"after"),la=xe&&ei&&Dn?ge:un.right):(hi=xe?fn(Tr,Ur,"before"):de,rn=!xe&&Ri&&Xr?ge:xr.right,Di=!xe&&ei&&Dn?de:un.left,la=xe?fn(ln,Ur,"after"):ge),Re(hi,xr.top,rn-hi,xr.bottom),xr.bottom<un.top&&Re(de,xr.bottom,null,un.top),Re(Di,un.top,la-Di,un.bottom)}(!ar||so(xr,ar)<0)&&(ar=xr),so(un,ar)<0&&(ar=un),(!Ir||so(xr,Ir)<0)&&(Ir=xr),so(un,Ir)<0&&(Ir=un)}),{start:ar,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,J(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&&o<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-Mi(e));var f=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,L=fr(t,r),te=fr(t,f);if(n&&n.ensure){var de=n.ensure.from.line,ge=n.ensure.to.line;de<L?(L=de,te=fr(t,cr(mt(t,de))+e.wrapper.clientHeight)):Math.min(ge,t.lastLine())>=te&&(L=fr(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-Mi(e.display))+`px;
height: `+(t.bottom-t.top+An(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=_n(e,t),ge=!n||n==t?de:_n(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&&(Ii(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&&Ii(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+en(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 Li(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});Li(e,f.scrollLeft,f.scrollTop)}function Ii(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;S||Wo(e,{top:t}),Aa(e,t,!0),S&&Wo(e),Fi(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 ji(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+en(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+An(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&&o<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=D&&!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 Bi=function(){};Bi.prototype.update=function(){return{bottom:0,right:0}},Bi.prototype.setScrollLeft=function(){},Bi.prototype.setScrollTop=function(){},Bi.prototype.clear=function(){};function xi(e,t){t||(t=ji(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,ji(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:Bi};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):Ii(e,t)},e),e.display.scrollbars.addClass&&J(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},jt(e.curOp)}function ci(e){var t=e.curOp;t&&qt(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=ji(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+An(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,b(r,e.scrollToPos.from),b(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 hn(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 tn(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 Fi(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 Fi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),f.length&&hn(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=An(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=An(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;Ks(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,Fi(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+en(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=ji(e);Pi(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=ji(e);Pi(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&&D&&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),zn(e,Pe,xe,n)),We&&(F(Pe.lineNumber),Pe.lineNumber.appendChild(document.createTextNode(Kr(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+An(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=Kr(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 Xo(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 Ui(e){Ia(e.display),on(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&&o<8&&(f.gutters.style.zIndex=-1,f.scroller.style.paddingRight=0),!s&&!(S&&T)&&(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=Xo(r.gutters,r.lineNumbers),Ia(f),n.init(f)}var fo=0,vn=null;d?vn=-.53:S?vn=15:a?vn=-.7:m&&(vn=-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*=vn,t.y*=vn,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&&D&&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&&vn!=null){f&&ge&&Ii(e,Math.max(0,te.scrollTop+f*vn)),si(e,Math.max(0,te.scrollLeft+r*vn)),(!f||f&&ge)&&_e(t),L.wheelStartX=null;return}if(f&&vn!=null){var Ke=f*vn,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;vn=(vn*fo+ft)/(fo+1),++fo},200)):(L.wheelDX+=r,L.wheelDY+=f))}var yn=function(e,t){this.ranges=e,this.primIndex=t};yn.prototype.primary=function(){return this.ranges[this.primIndex]},yn.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},yn.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 yn(e,this.primIndex)},yn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},yn.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 bn(this.anchor,this.head)},rr.prototype.to=function(){return dn(this.anchor,this.head)},rr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Sn(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=bn(de.from(),te.from()),Re=dn(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 yn(t,n)}function Jn(e,t){return new yn([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 Ko(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 Sn(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 yn(r,e.sel.primIndex)}function Vo(e){e.doc.mode=kr(e.options,e.doc.modeOption),Hi(e)}function Hi(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,Fi(e,100),e.state.modeGen++,e.curOp&&on(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,on(e)}function za(e){(e.doc.direction=="rtl"?J:P)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){hn(e,function(){za(e),on(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:Kt(e,t.from,t.to)};return Ka(e,n,t.from.line,t.to.line+1),Zn(e,function(r){return Ka(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 Xa(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 Ka(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=$r(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?yn.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)),Gr(e,new yn([$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=Sn(e.cm,r,e.sel.primIndex);Gr(e,te,n)}function Zo(e,t,n,r){var f=e.sel.ranges.slice(0);f[t]=n,Gr(e,Sn(e.cm,f,e.sel.primIndex),r)}function Ja(e,t,n,r){Gr(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(b(e,f[L].anchor),b(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?Sn(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)):Gr(e,t,n)}function Gr(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?Sn(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?b(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=b(e,f)),L&&(r.to=b(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=Ko(e,t);Xa(e,t,n,e.cm?e.cm.curOp.id:NaN),Wi(e,t,n,$r(e,t));var r=[];Zn(e,function(f,L){!L&&he(r,f.history)==-1&&(ss(f.history,t),r.push(f.history)),Wi(f,t,null,$r(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)){Gr(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?Ko(e,lt):Z(de);Wi(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)),Wi(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 yn(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){on(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 Wi(e,t,n,r){if(e.cm&&!e.cm.curOp)return Pr(e.cm,Wi)(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=Kt(e,t.from,t.to),n||(n=Ko(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)),Jr(r,L.line),Fi(e,400);var xe=t.text.length-(te.line-L.line)-1;t.full?on(e):L.line==te.line&&t.text.length==1&&!Ha(e.doc,t)?Vn(e,L.line,"text"):on(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 zi(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 Gi(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}Gi.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 Gi))){var de=[];this.collapse(de),this.children=[new Gi(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 Gi(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 Ki=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Ki.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=Bn(this);Mt(n,Math.max(0,n.height-L)),e&&(hn(e,function(){ls(e,n,-L),Vn(e,r,"widget")}),tr(e,"lineWidgetCleared",e,this,r))},Ki.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var f=Bn(this)-t;if(!f)return;mr(this.doc,r)||Mt(r,r.height+f),n&&hn(n,function(){n.curOp.forceUpdate=!0,ls(n,r,f),tr(n,"lineWidgetChanged",n,e,It(r))})},Le(Ki);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 Ki(e,n,r),L=e.cm;return L&&f.noHScroll&&(L.display.alignWidgets=!0),zi(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&&!mr(e,te)){var ge=cr(te)<e.scrollTop;Mt(te,te.height+Bn(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=nn(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=pn(te.markedSpans,de),de.from==null&&this.collapsed&&!mr(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&&on(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=nn(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;hn(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,!mr(n.doc,f)&&n.height!=null){var de=n.height;n.height=null;var ge=Bn(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");xn()}L.addToHistory&&Xa(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 On(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){mr(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)on(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 Vi=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};Vi.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")},Vi.prototype.find=function(e,t){return this.primary.find(e,t)},Le(Vi);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,b(ge,t),b(ge,n),r,f));for(var xe=0;xe<ge.linked.length;++xe)if(ge.linked[xe].isParent)return;te=Z(L)}),new Vi(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,an=function(e,t,n,r,f){if(!(this instanceof an))return new an(e,t,n,r,f);n==null&&(n=0),Xi.call(this,[new Gi([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}),Gr(this,Jn(L),Se)};an.prototype=Ce(Xi.prototype,{constructor:an,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=hr(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&&Li(this.cm,0,0),Gr(this,Jn(t),Se)}),replaceRange:function(e,t,n,r){t=b(this,t),n=n?b(this,n):t,_i(this,e,t,n,r)},getRange:function(e,t,n){var r=Kt(this,b(this,e),b(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(cn(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 b(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,b(this,typeof e=="number"?rt(e,t||0):e),null,n)}),setSelection:Lr(function(e,t,n){Ja(this,b(this,e),b(this,t||e),n)}),extendSelection:Lr(function(e,t,n){go(this,b(this,e),t&&b(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(b(this,e[f].anchor),b(this,e[f].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Gr(this,Sn(this.cm,r,t),n)}),addSelection:Lr(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new rr(b(this,e),b(this,t||e))),Gr(this,Sn(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=Kt(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=Kt(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 zi(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]&&zi(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(!cn(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 zi(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(V(n).test(r[f]))return!1;r[f]+=" "+n}return!0})}),removeLineClass:Lr(function(e,t,n){return zi(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(V(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,b(this,e),b(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=b(this,e),Si(this,e,e,n,"bookmark")},findMarksAt:function(e){e=b(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=b(this,e),t=b(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}),b(this,rt(n,t))},indexFromPos:function(e){e=b(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 an(hr(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 an(hr(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)})}),an.prototype.eachLine=an.prototype.iter;var ds=0;function Ol(e){var t=this;if(hs(t),$e(t,e)||gn(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=b(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(b(t.doc,n),b(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)||gn(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)),X(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"},Yi=0;Yi<10;Yi++)qn[Yi+48]=qn[Yi+96]=String(Yi);for(var xo=65;xo<=90;xo++)qn[xo]=String.fromCharCode(xo);for(var Ji=1;Ji<=12;Ji++)qn[Ji+111]=qn[Ji+63235]="F"+Ji;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=D?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),(x?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(x?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)}hn(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(ar,Ir){return Ir?new rt(n.line,de(ar,1),"before"):new rt(n.line,ar,"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 $i={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:b(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=M(e.getLine(L.line),L.ch,r);t.push(ne(r-te%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return hn(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 hn(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=$i[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 Zi(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?Zi(e,"Shift-"+n,t,function(r){return Co(e,r,!0)})||Zi(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return Co(e,r)}):Zi(e,n,t,function(r){return Co(e,r)}):!1}function Fl(e,t,n){return Zi(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&&o<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&&(D?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),S&&!D&&!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;J(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(gn(t.display,e)||$e(t,e)||e.ctrlKey&&!e.altKey||D&&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,qi;function Wl(e,t){var n=+new Date;return qi&&qi.compare(n,e,t)?(Qi=qi=null,"triple"):Qi&&Qi.compare(n,e,t)?(qi=new ra(n,e,t),Qi=null,"double"):(Qi=new ra(n,e,t),qi=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,gn(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?Xl(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,Zi(e,gs(L,f),f,function(te){if(typeof te=="string"&&(te=$i[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=D?n.metaKey:n.ctrlKey),f.moveOnDrag==null&&(f.moveOnDrag=!(D?n.altKey:n.ctrlKey)),f}function Xl(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)?Kl(e,r,t,f):Vl(e,r,t,f)}function Kl(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&&o==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),b(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,Gr(L,Sn(e,xe.concat([te]),de),{scroll:!1,origin:"*mouse"})):xe.length>1&&xe[de].empty()&&r.unit=="char"&&!r.extend?(Gr(L,Sn(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,Gr(L,new yn([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=M(mt(L,n.line).text,n.ch,Pt),zt=M(mt(L,pt.line).text,pt.ch,Pt),ar=Math.min(kt,zt),Ir=Math.max(kt,zt),gr=Math.min(n.line,pt.line),fn=Math.min(e.lastLine(),Math.max(n.line,pt.line));gr<=fn;gr++){var sn=mt(L,gr).text,Tr=me(sn,ar,Pt);ar==Ir?_t.push(new rr(rt(gr,Tr),rt(gr,Tr))):sn.length>Tr&&_t.push(new rr(rt(gr,Tr),rt(gr,me(sn,Ir,Pt))))}_t.length||_t.push(new rr(n,n)),Gr(L,Sn(e,ge.ranges.slice(0,de).concat(_t),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pt)}else{var ln=te,Ur=Ts(e,pt,r.unit),Mr=ln.anchor,Or;Ot(Ur.anchor,Mr)>0?(Or=Ur.head,Mr=bn(ln.from(),Ur.anchor)):(Or=Ur.anchor,Mr=dn(ln.to(),Ur.head));var xr=ge.ranges.slice(0);xr[de]=Yl(e,new rr(b(L,Mr),Or)),Gr(L,Sn(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=fr(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(gn(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-"),Ni(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){Hi(r),Ni(r),on(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",T?"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),Ui(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=Xo(f,r.options.lineNumbers),Ui(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=Xo(r.options.gutters,f),Ui(r)},!0),n("firstLineNumber",1,Ui,!0),n("lineNumberFormatter",function(r){return r},Ui,!0),n("showCursorWhenSelecting",!1,Pi,!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,Pi,!0),n("singleCursorHeightPerLine",!0,Pi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Hi,!0),n("addModeClass",!1,Hi,!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,Hi,!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?(J(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(P(e.display.wrapper,"CodeMirror-wrap"),Dr(e)),Io(e),on(e),Ni(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 an(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&&!T&&L.input.focus(),d&&o<11&&setTimeout(function(){return n.display.input.reset(!0)},20),ql(this),Rl(),ui(this),this.curOp.forceUpdate=!0,Wa(this,r),t.autofocus&&!T||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&&o<11?Ne(t.scroller,"dblclick",Pr(e,function(ge){if($e(e,ge))return;var xe=oi(e,ge);if(!xe||na(e,ge)||gn(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&&!gn(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),b(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&&(Ii(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 eo(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=M(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=M(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+=ne(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 Tn=null;function _o(e){Tn=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(Tn&&Tn.text.join(`
`)==t){if(r.ranges.length%Tn.text.length==0){xe=[];for(var Re=0;Re<Tn.text.length;Re++)xe.push(L.splitLines(Tn.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&&Tn&&Tn.lineWise&&Tn.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&&hn(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=eo(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=eo(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&&(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:tn(function(r,f){var L=r.token?r:e.getMode(this.options,r);if(L.startState)throw new Error("Overlays may not be stateful.");K(this.state.overlays,{mode:L,modeSpec:r,opaque:f&&f.opaque,priority:f&&f.priority||0},function(te){return te.priority}),this.state.modeGen++,on(this)}),removeOverlay:tn(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++,on(this);return}}}),indentLine:tn(function(r,f,L){typeof f!="string"&&typeof f!="number"&&(f==null?f=this.options.smartIndent?"smart":"prev":f=f?"add":"subtract"),cn(this.doc,r)&&eo(this,r,f,L)}),indentSelection:tn(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&&(eo(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)eo(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 er(this,r,f)},getLineTokens:function(r,f){return er(this,rt(r),f,!0)},getTokenTypeAt:function(r){r=b(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=b(this.doc,r):L=r?te.from():te.to(),_n(this,L,f||"page")},charCoords:function(r,f){return Ro(this,b(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,fr(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=_n(this,b(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:tn(Cs),triggerOnKeyPress:tn(_s),triggerOnKeyUp:Es,triggerOnMouseDown:tn(Ss),execCommand:function(r){if($i.hasOwnProperty(r))return $i[r].call(null,this)},triggerElectric:tn(function(r){Ms(this,r)}),findPosH:function(r,f,L,te){var de=1;f<0&&(de=-1,f=-f);for(var ge=b(this.doc,r),xe=0;xe<f&&!(ge=aa(this.doc,ge,de,L,te),ge.hitSide);++xe);return ge},moveH:tn(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:tn(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=b(this.doc,r),Re=0;Re<f;++Re){var Pe=_n(this,xe,"div");if(ge==null?ge=Pe.left:Pe.left=ge,xe=Is(this,Pe,de,L),xe.hitSide)break}return xe},moveV:tn(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=_n(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=O(xe,ge)?function(Pe){return O(Pe,ge)}:/\s/.test(xe)?function(Pe){return/\s/.test(Pe)}:function(Pe){return!/\s/.test(Pe)&&!O(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)?J(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:tn(function(r,f){Li(this,r,f)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-An(this)-this.display.barHeight,width:r.scrollWidth-An(this)-this.display.barWidth,clientHeight:Oo(this),clientWidth:ni(this)}},scrollIntoView:tn(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:tn(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 hn(this,r)},startOperation:function(){return ui(this)},endOperation:function(){return ci(this)},refresh:tn(function(){var r=this.display.cachedTextHeight;on(this),this.curOp.forceUpdate=!0,Ni(this),Li(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:tn(function(r){var f=this.doc;return f.cm=null,this.state.selectingText&&this.state.selectingText(),Wa(this,r),Ni(this),this.display.input.reset(),Li(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=O(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;o<=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=Tn.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=Tn.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(bn(L,te),r)==0&&Ot(dn(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){X(this.cm.display.cursorDiv,e.cursors),X(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():hn(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&&a&&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&&hn(t,function(){Gr(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=Kt(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())&&hn(this.cm,function(){return on(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(Kt(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]),ar=_t[Pt]+xt;return(xt<0||kt!=lt)&&(ar=_t[Pt+(xt?1:0)]),rt(zt,ar)}}}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 _r=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new le,this.hasSelection=!1,this.composing=null};_r.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),E&&(f.style.width="0px"),Ne(f,"input",function(){d&&o>=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(gn(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){gn(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)})},_r.prototype.createField=function(e){this.wrapper=Ls(),this.textarea=this.wrapper.firstChild},_r.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},_r.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Ea(e);if(e.options.moveInputWithCursor){var f=_n(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},_r.prototype.showSelection=function(e){var t=this.cm,n=t.display;X(n.cursorDiv,e.cursors),X(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},_r.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&&o>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",d&&o>=9&&(this.hasSelection=null))},_r.prototype.getField=function(){return this.textarea},_r.prototype.supportsTouch=function(){return!1},_r.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!T||se()!=this.textarea))try{this.textarea.focus()}catch(e){}},_r.prototype.blur=function(){this.textarea.blur()},_r.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},_r.prototype.receivedFocus=function(){this.slowPoll()},_r.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()})},_r.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)},_r.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&&o>=9&&this.hasSelection===f||D&&/[\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 hn(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},_r.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},_r.prototype.onKeyPress=function(){d&&o>=9&&(this.hasSelection=null),this.fastPoll()},_r.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,Gr)(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&&o<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=te),f.selectionStart!=null){(!d||d&&o<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&&o>=9&&Ke(),Y){Ae(e);var et=function(){ot(window,"mouseup",et),setTimeout(We,20)};Ne(window,"mouseup",et)}else setTimeout(We,50)},_r.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},_r.prototype.setUneditable=function(){},_r.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=an,e.splitLines=dt,e.countColumn=M,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=Xt,e.mimeModes=At,e.resolveMode=Ct,e.getMode=kr,e.modeExtensions=Jt,e.extendMode=nr,e.copyState=sr,e.startState=Sr,e.innerMode=vr,e.commands=$i,e.keyMap=Fn,e.keyName=vs,e.isModifierKey=ms,e.lookupKey=Ti,e.normalizeKeyMap=Pl,e.StringStream=Ht,e.SharedTextMarker=Vi,e.TextMarker=Qn,e.LineWidget=Ki,e.e_preventDefault=_e,e.e_stopPropagation=Te,e.e_stop=Ae,e.addClass=J,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 an.prototype)an.prototype.hasOwnProperty(To)&&he(au,To)<0&&(dr.prototype[To]=function(e){return function(){return e.apply(this.doc,arguments)}}(an.prototype[To]));return Le(an),dr.inputStyles={textarea:_r,contenteditable:ir},dr.defineMode=function(e){!dr.defaults.mode&&e!="null"&&(dr.defaults.mode=e),Ft.apply(this,arguments)},dr.defineMIME=or,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){an.prototype[e]=t},dr.fromTextArea=iu,ou(dr),dr.version="5.58.2",dr})},WYAk:function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){(function(){var i=h,S=i.lib,_=S.Base,y=i.enc,p=y.Utf8,d=i.algo,o=d.HMAC=_.extend({init:function(s,l){s=this._hasher=new s.init,typeof l=="string"&&(l=p.parse(l));var a=s.blockSize,g=a*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,E=v.words,k=0;k<a;k++)w[k]^=1549556828,E[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,a=l.finalize(s);l.reset();var g=l.finalize(this._oKey.clone().concat(a));return g}})})()})},WaYH:function(u,G,c){"use strict";var h=c("rePB"),i=c("Ff2n"),S=c("VTBJ"),_=c("1OyB"),y=c("vuIU"),p=c("JX7q"),d=c("Ji7U"),o=c("LK+K"),s=c("q1tI"),l=c("TSYQ"),a=c.n(l),g=c("sboe"),m=c("OZM5"),v=function(Y){var V=Y.prefixCls,P=Y.level,F=Y.isStart,X=Y.isEnd;if(!P)return null;for(var Q="".concat(V,"-indent-unit"),ce=[],fe=0;fe<P;fe+=1){var z;ce.push(s.createElement("span",{key:fe,className:a()(Q,(z={},Object(h.a)(z,"".concat(Q,"-start"),F[fe+1]),Object(h.a)(z,"".concat(Q,"-end"),X[fe+1]),Object(h.a)(z,"".concat(Q,"-end-first-level"),!fe&&X[0]),z))}))}return s.createElement("span",{"aria-hidden":"true",className:"".concat(V,"-indent")},ce)},w=v,E=c("815F"),k="open",T="close",D="---",I=function(x){Object(d.a)(V,x);var Y=Object(o.a)(V);function V(){var P;return Object(_.a)(this,V),P=Y.apply(this,arguments),P.state={dragNodeHighlight:!1},P.onSelectorClick=function(F){var X=P.props.context.onNodeClick;X(F,Object(E.b)(P.props)),P.isSelectable()?P.onSelect(F):P.onCheck(F)},P.onSelectorDoubleClick=function(F){var X=P.props.context.onNodeDoubleClick;X(F,Object(E.b)(P.props))},P.onSelect=function(F){if(P.isDisabled())return;var X=P.props.context.onNodeSelect;F.preventDefault(),X(F,Object(E.b)(P.props))},P.onCheck=function(F){if(P.isDisabled())return;var X=P.props,Q=X.disableCheckbox,ce=X.checked,fe=P.props.context.onNodeCheck;if(!P.isCheckable()||Q)return;F.preventDefault();var z=!ce;fe(F,Object(E.b)(P.props),z)},P.onMouseEnter=function(F){var X=P.props.context.onNodeMouseEnter;X(F,Object(E.b)(P.props))},P.onMouseLeave=function(F){var X=P.props.context.onNodeMouseLeave;X(F,Object(E.b)(P.props))},P.onContextMenu=function(F){var X=P.props.context.onNodeContextMenu;X(F,Object(E.b)(P.props))},P.onDragStart=function(F){var X=P.props.context.onNodeDragStart;F.stopPropagation(),P.setState({dragNodeHighlight:!0}),X(F,Object(p.a)(P));try{F.dataTransfer.setData("text/plain","")}catch(Q){}},P.onDragEnter=function(F){var X=P.props.context.onNodeDragEnter;F.preventDefault(),F.stopPropagation(),X(F,Object(p.a)(P))},P.onDragOver=function(F){var X=P.props.context.onNodeDragOver;F.preventDefault(),F.stopPropagation(),X(F,Object(p.a)(P))},P.onDragLeave=function(F){var X=P.props.context.onNodeDragLeave;F.stopPropagation(),X(F,Object(p.a)(P))},P.onDragEnd=function(F){var X=P.props.context.onNodeDragEnd;F.stopPropagation(),P.setState({dragNodeHighlight:!1}),X(F,Object(p.a)(P))},P.onDrop=function(F){var X=P.props.context.onNodeDrop;F.preventDefault(),F.stopPropagation(),P.setState({dragNodeHighlight:!1}),X(F,Object(p.a)(P))},P.onExpand=function(F){var X=P.props.context.onNodeExpand;X(F,Object(E.b)(P.props))},P.setSelectHandle=function(F){P.selectHandle=F},P.getNodeState=function(){var F=P.props.expanded;return P.isLeaf()?null:F?k:T},P.hasChildren=function(){var F=P.props.eventKey,X=P.props.context.keyEntities,Q=X[F]||{},ce=Q.children;return!!(ce||[]).length},P.isLeaf=function(){var F=P.props,X=F.isLeaf,Q=F.loaded,ce=P.props.context.loadData,fe=P.hasChildren();return X===!1?!1:X||!ce&&!fe||ce&&Q&&!fe},P.isDisabled=function(){var F=P.props.disabled,X=P.props.context.disabled;return!!(X||F)},P.isCheckable=function(){var F=P.props.checkable,X=P.props.context.checkable;return!X||F===!1?!1:X},P.syncLoadData=function(F){var X=F.expanded,Q=F.loading,ce=F.loaded,fe=P.props.context,z=fe.loadData,se=fe.onNodeLoad;if(Q)return;z&&X&&!P.isLeaf()&&(!P.hasChildren()&&!ce&&se(Object(E.b)(P.props)))},P.renderSwitcher=function(){var F=P.props,X=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:a()("".concat(fe,"-switcher"),"".concat(fe,"-switcher-noop"))},typeof se=="function"?se(Object(S.a)(Object(S.a)({},P.props),{},{isLeaf:!0})):se);var J=a()("".concat(fe,"-switcher"),"".concat(fe,"-switcher_").concat(X?k:T));return s.createElement("span",{onClick:P.onExpand,className:J},typeof se=="function"?se(Object(S.a)(Object(S.a)({},P.props),{},{isLeaf:!1})):se)},P.renderCheckbox=function(){var F=P.props,X=F.checked,Q=F.halfChecked,ce=F.disableCheckbox,fe=P.props.context.prefixCls,z=P.isDisabled(),se=P.isCheckable();if(!se)return null;var J=typeof se!="boolean"?se:null;return s.createElement("span",{className:a()("".concat(fe,"-checkbox"),X&&"".concat(fe,"-checkbox-checked"),!X&&Q&&"".concat(fe,"-checkbox-indeterminate"),(z||ce)&&"".concat(fe,"-checkbox-disabled")),onClick:P.onCheck},J)},P.renderIcon=function(){var F=P.props.loading,X=P.props.context.prefixCls;return s.createElement("span",{className:a()("".concat(X,"-iconEle"),"".concat(X,"-icon__").concat(P.getNodeState()||"docu"),F&&"".concat(X,"-icon_loading"))})},P.renderSelector=function(){var F=P.state.dragNodeHighlight,X=P.props,Q=X.title,ce=X.selected,fe=X.icon,z=X.loading,se=X.data,J=P.props.context,j=J.prefixCls,U=J.showIcon,R=J.icon,C=J.draggable,M=J.loadData,le=J.titleRender,he=P.isDisabled(),ve="".concat(j,"-node-content-wrapper"),Ee;if(U){var Se=fe||R;Ee=Se?s.createElement("span",{className:a()("".concat(j,"-iconEle"),"".concat(j,"-icon__customize"))},typeof Se=="function"?Se(P.props):Se):P.renderIcon()}else M&&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:a()("".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(y.a)(V,[{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,X=this.props.context.selectable;return typeof F=="boolean"?F:X}},{key:"render",value:function(){var F,X=this.props,Q=X.eventKey,ce=X.className,fe=X.style,z=X.dragOver,se=X.dragOverGapTop,J=X.dragOverGapBottom,j=X.isLeaf,U=X.isStart,R=X.isEnd,C=X.expanded,M=X.selected,le=X.checked,he=X.halfChecked,ve=X.loading,Ee=X.domRef,Se=X.active,ae=X.onMouseMove,pe=Object(i.a)(X,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),me=this.props.context,ee=me.prefixCls,ne=me.filterTreeNode,Z=me.draggable,ue=me.keyEntities,K=this.isDisabled(),$=Object(m.f)(pe),Ce=ue[Q]||{},q=Ce.level,H=R[R.length-1];return s.createElement("div",Object.assign({ref:Ee,className:a()(ce,"".concat(ee,"-treenode"),(F={},Object(h.a)(F,"".concat(ee,"-treenode-disabled"),K),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"),M),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",!K&&z),Object(h.a)(F,"drag-over-gap-top",!K&&se),Object(h.a)(F,"drag-over-gap-bottom",!K&&J),Object(h.a)(F,"filter-node",ne&&ne(Object(E.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},$),s.createElement(w,{prefixCls:ee,level:q,isStart:U,isEnd:R}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),V}(s.Component),B=function(Y){return s.createElement(g.a.Consumer,null,function(V){return s.createElement(I,Object.assign({},Y,{context:V}))})};B.displayName="TreeNode",B.defaultProps={title:D},B.isTreeNode=1;var N=G.a=B},XIdC:function(u,G,c){"use strict";var h=c("rePB"),i=c("ODXe"),S=c("Ff2n"),_=c("q1tI"),y=c.n(_),p=c("TSYQ"),d=c.n(p),o=c("6cGi"),s=c("4IlW"),l=_.forwardRef(function(a,g){var m,v=a.prefixCls,w=v===void 0?"rc-switch":v,E=a.className,k=a.checked,T=a.defaultChecked,D=a.disabled,I=a.loadingIcon,B=a.checkedChildren,N=a.unCheckedChildren,x=a.onClick,Y=a.onChange,V=a.onKeyDown,P=Object(S.a)(a,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),F=Object(o.a)(!1,{value:k,defaultValue:T}),X=Object(i.a)(F,2),Q=X[0],ce=X[1];function fe(j,U){var R=Q;return D||(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),V==null||V(j)}function se(j){var U=fe(!Q,j);x==null||x(U,j)}var J=d()(w,E,(m={},Object(h.a)(m,"".concat(w,"-checked"),Q),Object(h.a)(m,"".concat(w,"-disabled"),D),m));return _.createElement("button",Object.assign({},P,{type:"button",role:"switch","aria-checked":Q,disabled:D,className:J,ref:g,onKeyDown:z,onClick:se}),I,_.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"),i=c("1OyB"),S=c("vuIU"),_=c("Ji7U"),y=c("LK+K"),p=c("q1tI"),d=c("VTBJ"),o=c("rePB"),s=c("Zm9Q"),l=c("Kwbf"),a=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 E=new m.default(w),k=null,T=null;function D(Se,ae){v.has(Se)||(v.set(Se,new Set),E.observe(Se)),v.get(Se).add(ae)}function I(Se,ae){v.has(Se)&&(v.get(Se).delete(ae),v.get(Se).size||(E.unobserve(Se),v.delete(Se)))}var B=function(Se){Object(_.a)(pe,Se);var ae=Object(y.a)(pe);function pe(){return Object(i.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 x(Se){var ae=Se.children,pe=Se.onBatchResize,me=p.useRef(0),ee=p.useRef([]),ne=p.useContext(N),Z=p.useCallback(function(ue,K,$){me.current+=1;var Ce=me.current;ee.current.push({size:ue,element:K,data:$}),Promise.resolve().then(function(){Ce===me.current&&(pe==null||pe(ee.current),ee.current=[])}),ne==null||ne(ue,K,$)},[pe,ne]);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),ne=p.useContext(N),Z=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ue=p.isValidElement(ae)&&Object(a.c)(ae),K=ue?ae.ref:null,$=p.useMemo(function(){return Object(a.a)(K,me)},[K,me]),Ce=p.useRef(Se);Ce.current=Se;var q=p.useCallback(function(H){var O=Ce.current,W=O.onResize,we=O.data,be=H.getBoundingClientRect(),Oe=be.width,Be=be.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});ne==null||ne(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&&D(H,q),function(){return I(H,q)}},[me.current,pe]),p.createElement(B,{ref:ee},ue?p.cloneElement(ae,{ref:$}):ae)}var V="rc-observer-key";function P(Se){var ae=Se.children,pe=Object(s.a)(ae);return pe.map(function(me,ee){var ne=(me==null?void 0:me.key)||"".concat(V,"-").concat(ee);return p.createElement(Y,Object(h.a)({},Se,{key:ne}),me)})}P.Collection=x;var F=P,X=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={},J;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"),ne=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($){return"".concat($,":").concat(me.getPropertyValue($))}).join(";"),K={sizingStyle:ue,paddingSize:ne,borderSize:Z,boxSizing:ee};return ae&&pe&&(se[pe]=K),K}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;J||(J=document.createElement("textarea"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),document.body.appendChild(J)),Se.getAttribute("wrap")?J.setAttribute("wrap",Se.getAttribute("wrap")):J.removeAttribute("wrap");var ee=j(Se,ae),ne=ee.paddingSize,Z=ee.borderSize,ue=ee.boxSizing,K=ee.sizingStyle;J.setAttribute("style","".concat(K,";").concat(fe)),J.value=Se.value||Se.placeholder||"";var $=Number.MIN_SAFE_INTEGER,Ce=Number.MAX_SAFE_INTEGER,q=J.scrollHeight,H;if(ue==="border-box"?q+=Z:ue==="content-box"&&(q-=ne),pe!==null||me!==null){J.value=" ";var O=J.scrollHeight-ne;pe!==null&&($=O*pe,ue==="border-box"&&($=$+ne+Z),q=Math.max($,q)),me!==null&&(Ce=O*me,ue==="border-box"&&(Ce=Ce+ne+Z),H=q>Ce?"":"hidden",q=Math.min(Ce,q))}return{height:q,minHeight:$,maxHeight:Ce,overflowY:H,resize:"none"}}var R=c("Gytx"),C=c.n(R),M;(function(Se){Se[Se.NONE=0]="NONE",Se[Se.RESIZING=1]="RESIZING",Se[Se.RESIZED=2]="RESIZED"})(M||(M={}));var le=function(Se){Object(_.a)(pe,Se);var ae=Object(y.a)(pe);function pe(me){var ee;return Object(i.a)(this,pe),ee=ae.call(this,me),ee.nextFrameActionId=void 0,ee.resizeFrameId=void 0,ee.textArea=void 0,ee.saveTextArea=function(ne){ee.textArea=ne},ee.handleResize=function(ne){var Z=ee.state.resizeStatus,ue=ee.props,K=ue.autoSize,$=ue.onResize;if(Z!==M.NONE)return;typeof $=="function"&&$(ne),K&&ee.resizeOnNextFrame()},ee.resizeOnNextFrame=function(){cancelAnimationFrame(ee.nextFrameActionId),ee.nextFrameActionId=requestAnimationFrame(ee.resizeTextarea)},ee.resizeTextarea=function(){var ne=ee.props.autoSize;if(!ne||!ee.textArea)return;var Z=ne.minRows,ue=ne.maxRows,K=U(ee.textArea,!1,Z,ue);ee.setState({textareaStyles:K,resizeStatus:M.RESIZING},function(){cancelAnimationFrame(ee.resizeFrameId),ee.resizeFrameId=requestAnimationFrame(function(){ee.setState({resizeStatus:M.RESIZED},function(){ee.resizeFrameId=requestAnimationFrame(function(){ee.setState({resizeStatus:M.NONE}),ee.fixFirefoxAutoScroll()})})})})},ee.renderTextArea=function(){var ne=ee.props,Z=ne.prefixCls,ue=Z===void 0?"rc-textarea":Z,K=ne.autoSize,$=ne.onResize,Ce=ne.className,q=ne.disabled,H=ee.state,O=H.textareaStyles,W=H.resizeStatus,we=Object(X.a)(ee.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),be=ce()(ue,Ce,Object(o.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),O),W===M.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return p.createElement(F,{onResize:ee.handleResize,disabled:!(K||$)},p.createElement("textarea",Object(h.a)({},we,{className:be,style:Oe,ref:ee.saveTextArea})))},ee.state={textareaStyles:{},resizeStatus:M.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,ne=this.textArea.selectionEnd;this.textArea.setSelectionRange(ee,ne)}}catch(Z){}}},{key:"render",value:function(){return this.renderTextArea()}}]),pe}(p.Component),he=le,ve=function(Se){Object(_.a)(pe,Se);var ae=Object(y.a)(pe);function pe(me){var ee;Object(i.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,K=ue.onPressEnter,$=ue.onKeyDown;Z.keyCode===13&&K&&K(Z),$&&$(Z)};var ne=typeof me.value=="undefined"||me.value===null?me.defaultValue:me.value;return ee.state={value:ne},ee}return Object(S.a)(pe,[{key:"setValue",value:function(ee,ne){"value"in this.props||this.setState({value:ee},ne)}},{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"),i=c("Sdc0"),S=c("OaEy"),_=c("2fM7"),y=c("q1tI"),p=c.n(y),d=c("lOMy"),o=c.n(d),s=_.a.Option;G.a=function(l){var a=l.onFontSizeChange,g=l.cmFontSize,m=l.cmCodeMode,v=l.onCodeModeChange,w=l.onTabToSpace,E=l.className,k=E===void 0?"":E,T=l.tabToSpace,D=l.children;return p.a.createElement("div",{className:"tpi-code-setting ".concat(k)},p.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),p.a.createElement("section",null,p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),p.a.createElement(_.a,{bordered:!1,size:"small",value:m,onChange:v},p.a.createElement(s,{value:"vs"},"\u767D\u8272\u80CC\u666F"),p.a.createElement(s,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),p.a.createElement("div",{className:"file-item"},p.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),p.a.createElement(_.a,{bordered:!1,size:"small",value:g,onChange:a},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(i.a,{checked:T,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"))),D)}},ZW9T:function(u,G,c){"use strict";c.d(G,"a",function(){return B});var h=c("k1fw"),i=c("miYZ"),S=c("tsqr"),_=c("rAM+"),y=c("tJVT"),p=c("PpiC"),d=c("q1tI"),o=c.n(d),s=c("bdgK");function l(N,x,Y,V,P){var F=x.getWordUntilPosition(Y),X={startLineNumber:Y.lineNumber,endLineNumber:Y.lineNumber,startColumn:F.startColumn,endColumn:F.endColumn},Q=V.map(function(ce){return{label:ce,kind:N.languages.CompletionItemKind.Keyword,insertText:ce,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:X}});return P.map(function(ce){Q.push(Object(h.a)(Object(h.a)({},ce),{},{range:X}))}),Q}var a=function(N){var x={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(X,Q){var ce=l(N,X,Q,Y,[x]);return{suggestions:ce}}});var V=["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(X,Q){var ce=[{label:"print",kind:N.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}],fe=l(N,X,Q,V,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(X,Q){var ce=[x,{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,X,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 E=!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 T(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],x=N;if(Array.isArray(N)){for(var Y=0;Y<N.length;Y++){var V=k[N[Y]];if(V)return V}return x[0]}return k[x]||x}var D=null,I=G.b=function(N){var x=N.width,Y=x===void 0?"100%":x,V=N.height,P=V===void 0?"100%":V,F=N.value,X=N.language,Q=X===void 0?"javascript":X,ce=N.style,fe=ce===void 0?{}:ce,z=N.options,se=z===void 0?{}:z,J=N.overrideServices,j=J===void 0?{}:J,U=N.theme,R=U===void 0?"vs-dark":U,C=N.onEditBlur,M=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,ne=ee===void 0?w:ee,Z=N.filename,ue=Z===void 0?"educoder.txt":Z,K=Object(p.a)(N,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),$=Object(d.useRef)(),Ce=Object(d.useRef)({}),q=Object(d.useRef)(),H=Object(d.useRef)(!1),O=Object(d.useRef)(),W=Object(d.useState)(!1),we=Object(y.a)(W,2),be=we[0],Oe=we[1];function Be(){var ke;return $.current&&(ke=new s.default(function(Ae){var ze=Object(_.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($.current)),ke}function Fe(){S.b.warn(decodeURIComponent(g))}var Ue=function(){var Ae=Ce.current.instance;if(F!=null&&Ae&&be){var ze=Ae.getModel();ze&&F!==ze.getValue()&&(E=!0,ze.setValue(F),Ae.layout(),E=!1)}};Object(d.useEffect)(function(){q.current&&clearTimeout(q.current),q.current=setTimeout(function(){Ue()},500)},[F,be,Ce.current]);function Ge(){var ke=Ce.current.instance;if(ke){var Ae=ke.getSelection(),ze=Ce.current.pastePos||{},je=new D.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(),M())}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(){$.current&&!be&&c.e(27).then(c.t.bind(null,"M/lh",7)).then(function(ke){try{D=ke,Ce.current.instance=D.editor.create($.current,{value:F,language:T(Q),theme:R,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},j);var Ae=Ce.current.instance;if(me(Ae,D),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(O.current):(Xe(),ae(Ae.getValue(),je)),O.current=setTimeout(function(){H.current=!1},500)}),window.Monaco||a(D),Ee&&(Ae.addCommand(D.KeyMod.CtrlCmd|D.KeyMod.Shift|D.KeyCode.KEY_V,function(){return Fe(),null}),Ae.addCommand(D.KeyMod.CtrlCmd|D.KeyCode.KEY_C,function(){return Fe(),null})),window.Monaco=D,C&&Ae.onDidBlurEditorWidget(function(){C(Ae.getValue())}),ne&&Ae.onDidFocusEditorText(function(){ne(Ae.getValue())}),Ee){Ae.addCommand(D.KeyMod.CtrlCmd|D.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($.current)}}catch(je){}})},[]),Object(d.useEffect)(function(){var ke=Ce.current.instance;if(ke&&be)return document.addEventListener("keydown",Ye,!1),function(){document.removeEventListener("keydown",Ye)}},[M,be]),Object(d.useEffect)(function(){var ke=Ce.current.instance;if(ke&&be){var Ae=T(Q);D.editor.setModelLanguage(ke.getModel(),Ae),console.log("language:",Q,ke.getModel(),Ae)}},[Q,be]),Object(d.useEffect)(function(){var ke=Ce.current.instance;ke&&be&&D.editor.setTheme(R)},[R,be]),Object(d.useEffect)(function(){var ke=Ce.current.instance;ke&&be&&(ke.updateOptions(Object(h.a)({},se)),setTimeout(function(){ke.getModel().updateOptions(Object(h.a)({},se))},200))},[JSON.stringify(se),be]),Object(d.useEffect)(function(){var ke=Ce.current.instance;ke&&be&&ke.layout()},[Y,P,be]);var nt=Object(d.useState)(v(Y)),ot=Object(y.a)(nt,2),Ve=ot[0],$e=ot[1],Ie=Object(d.useState)(v(P)),De=Object(y.a)(Ie,2),Le=De[0],_e=De[1],Te=Object(h.a)(Object(h.a)({},fe),{},{width:Ve,height:Le});return o.a.createElement("div",{className:"my-monaco-editor",ref:$,style:Te})};function B(N){var x=N.width,Y=x===void 0?"100%":x,V=N.height,P=V===void 0?"100%":V,F=N.original,X=N.modified,Q=N.language,ce=N.options,fe=ce===void 0?{}:ce,z=Object(d.useRef)(),se=Object(d.useState)(null),J=Object(y.a)(se,2),j=J[0],U=J[1];function R(he){var ve;return z.current&&(ve=new s.default(function(Ee){var Se=Object(_.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){D=he;var ve=D.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:D.editor.createModel(F,Q),modified:D.editor.createModel(X,Q)})},[F,X,Q,j]);var C=v(Y),M=v(P),le={width:C,height:M};return o.a.createElement("div",{className:"my-diff-editor",ref:z,style:le})}},ZpRC:function(u,G,c){"use strict";function h(a){return typeof a=="object"&&a!=null&&a.nodeType===1}function i(a,g){return(!g||a!=="hidden")&&a!=="visible"&&a!=="clip"}function S(a,g){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var m=getComputedStyle(a,null);return i(m.overflowY,g)||i(m.overflowX,g)||function(v){var w=function(E){if(!E.ownerDocument||!E.ownerDocument.defaultView)return null;try{return E.ownerDocument.defaultView.frameElement}catch(k){return null}}(v);return!!w&&(w.clientHeight<v.scrollHeight||w.clientWidth<v.scrollWidth)}(a)}return!1}function _(a,g,m,v,w,E,k,T){return E<a&&k>g||E>a&&k<g?0:E<=a&&T<=m||k>=g&&T>=m?E-a-v:k>g&&T<m||E<a&&T>m?k-g+w:0}var y=function(a,g){var m=window,v=g.scrollMode,w=g.block,E=g.inline,k=g.boundary,T=g.skipOverflowHiddenElements,D=typeof k=="function"?k:function(O){return O!==k};if(!h(a))throw new TypeError("Invalid target");for(var I=document.scrollingElement||document.documentElement,B=[],N=a;h(N)&&D(N);){if((N=N.parentElement)===I){B.push(N);break}N!=null&&N===document.body&&S(N)&&!S(document.documentElement)||N!=null&&S(N,T)&&B.push(N)}for(var x=m.visualViewport?m.visualViewport.width:innerWidth,Y=m.visualViewport?m.visualViewport.height:innerHeight,V=window.scrollX||pageXOffset,P=window.scrollY||pageYOffset,F=a.getBoundingClientRect(),X=F.height,Q=F.width,ce=F.top,fe=F.right,z=F.bottom,se=F.left,J=w==="start"||w==="nearest"?ce:w==="end"?z:ce+X/2,j=E==="center"?se+Q/2:E==="end"?fe:se,U=[],R=0;R<B.length;R++){var C=B[R],M=C.getBoundingClientRect(),le=M.height,he=M.width,ve=M.top,Ee=M.right,Se=M.bottom,ae=M.left;if(v==="if-needed"&&ce>=0&&se>=0&&z<=Y&&fe<=x&&ce>=ve&&z<=Se&&se>=ae&&fe<=Ee)return U;var pe=getComputedStyle(C),me=parseInt(pe.borderLeftWidth,10),ee=parseInt(pe.borderTopWidth,10),ne=parseInt(pe.borderRightWidth,10),Z=parseInt(pe.borderBottomWidth,10),ue=0,K=0,$="offsetWidth"in C?C.offsetWidth-C.clientWidth-me-ne:0,Ce="offsetHeight"in C?C.offsetHeight-C.clientHeight-ee-Z:0;if(I===C)ue=w==="start"?J:w==="end"?J-Y:w==="nearest"?_(P,P+Y,Y,ee,Z,P+J,P+J+X,X):J-Y/2,K=E==="start"?j:E==="center"?j-x/2:E==="end"?j-x:_(V,V+x,x,me,ne,V+j,V+j+Q,Q),ue=Math.max(0,ue+P),K=Math.max(0,K+V);else{ue=w==="start"?J-ve-ee:w==="end"?J-Se+Z+Ce:w==="nearest"?_(ve,Se,le,ee,Z+Ce,J,J+X,X):J-(ve+le/2)+Ce/2,K=E==="start"?j-ae-me:E==="center"?j-(ae+he/2)+$/2:E==="end"?j-Ee+ne+$:_(ae,Ee,he,me,ne+$,j,j+Q,Q);var q=C.scrollLeft,H=C.scrollTop;J+=H-(ue=Math.max(0,Math.min(H+ue,C.scrollHeight-le+Ce))),j+=q-(K=Math.max(0,Math.min(q+K,C.scrollWidth-he+$)))}U.push({el:C,top:ue,left:K})}return U};function p(a){return a===Object(a)&&Object.keys(a).length!==0}function d(a,g){g===void 0&&(g="auto");var m="scrollBehavior"in document.body.style;a.forEach(function(v){var w=v.el,E=v.top,k=v.left;w.scroll&&m?w.scroll({top:E,left:k,behavior:g}):(w.scrollTop=E,w.scrollLeft=k)})}function o(a){return a===!1?{block:"end",inline:"nearest"}:p(a)?a:{block:"start",inline:"nearest"}}function s(a,g){var m=!a.ownerDocument.documentElement.contains(a);if(p(g)&&typeof g.behavior=="function")return g.behavior(m?[]:y(a,g));if(m)return;var v=o(g);return d(y(a,v),v.behavior)}var l=G.a=s},Zss7:function(u,G,c){var h;(function(i){var S=/^\s+/,_=/\s+$/,y=0,p=i.round,d=i.min,o=i.max,s=i.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 K=a(Z);this._originalInput=Z,this._r=K.r,this._g=K.g,this._b=K.b,this._a=K.a,this._roundA=p(100*this._a)/100,this._format=ue.format||K.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=K.ok,this._tc_id=y++}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,K,$,Ce,q,H;return ue=Z.r/255,K=Z.g/255,$=Z.b/255,ue<=.03928?Ce=ue/12.92:Ce=i.pow((ue+.055)/1.055,2.4),K<=.03928?q=K/12.92:q=i.pow((K+.055)/1.055,2.4),$<=.03928?H=$/12.92:H=i.pow(($+.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),K=p(Z.s*100),$=p(Z.v*100);return this._a==1?"hsv("+ue+", "+K+"%, "+$+"%)":"hsva("+ue+", "+K+"%, "+$+"%, "+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),K=p(Z.s*100),$=p(Z.l*100);return this._a==1?"hsl("+ue+", "+K+"%, "+$+"%)":"hsla("+ue+", "+K+"%, "+$+"%, "+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 T(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:J[k(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var ue="#"+D(this._r,this._g,this._b,this._a),K=ue,$=this._gradientType?"GradientType = 1, ":"";if(Z){var Ce=l(Z);K="#"+D(Ce._r,Ce._g,Ce._b,Ce._a)}return"progid:DXImageTransform.Microsoft.gradient("+$+"startColorstr="+ue+",endColorstr="+K+")"},toString:function(Z){var ue=!!Z;Z=Z||this._format;var K=!1,$=this._a<1&&this._a>=0,Ce=!ue&&$&&(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"&&(K=this.toRgbString()),Z==="prgb"&&(K=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(K=this.toHexString()),Z==="hex3"&&(K=this.toHexString(!0)),Z==="hex4"&&(K=this.toHex8String(!0)),Z==="hex8"&&(K=this.toHex8String()),Z==="name"&&(K=this.toName()),Z==="hsl"&&(K=this.toHslString()),Z==="hsv"&&(K=this.toHsvString()),K||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(Z,ue){var K=Z.apply(null,[this].concat([].slice.call(ue)));return this._r=K._r,this._g=K._g,this._b=K._b,this.setAlpha(K._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(Y,arguments)},darken:function(){return this._applyModification(V,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(X,arguments)},tetrad:function(){return this._applyCombination(Q,arguments)}},l.fromRatio=function(Z,ue){if(typeof Z=="object"){var K={};for(var $ in Z)Z.hasOwnProperty($)&&($==="a"?K[$]=Z[$]:K[$]=Ee(Z[$]));Z=K}return l(Z,ue)};function a(Z){var ue={r:0,g:0,b:0},K=1,$=null,Ce=null,q=null,H=!1,O=!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,O=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):me(Z.h)&&me(Z.s)&&me(Z.v)?($=Ee(Z.s),Ce=Ee(Z.v),ue=E(Z.h,$,Ce),H=!0,O="hsv"):me(Z.h)&&me(Z.s)&&me(Z.l)&&($=Ee(Z.s),q=Ee(Z.l),ue=v(Z.h,$,q),H=!0,O="hsl"),Z.hasOwnProperty("a")&&(K=Z.a)),K=U(K),{ok:H,format:Z.format||O,r:d(255,o(ue.r,0)),g:d(255,o(ue.g,0)),b:d(255,o(ue.b,0)),a:K}}function g(Z,ue,K){return{r:R(Z,255)*255,g:R(ue,255)*255,b:R(K,255)*255}}function m(Z,ue,K){Z=R(Z,255),ue=R(ue,255),K=R(K,255);var $=o(Z,ue,K),Ce=d(Z,ue,K),q,H,O=($+Ce)/2;if($==Ce)q=H=0;else{var W=$-Ce;H=O>.5?W/(2-$-Ce):W/($+Ce);switch($){case Z:q=(ue-K)/W+(ue<K?6:0);break;case ue:q=(K-Z)/W+2;break;case K:q=(Z-ue)/W+4;break}q/=6}return{h:q,s:H,l:O}}function v(Z,ue,K){var $,Ce,q;Z=R(Z,360),ue=R(ue,100),K=R(K,100);function H(we,be,Oe){return Oe<0&&(Oe+=1),Oe>1&&(Oe-=1),Oe<1/6?we+(be-we)*6*Oe:Oe<1/2?be:Oe<2/3?we+(be-we)*(2/3-Oe)*6:we}if(ue===0)$=Ce=q=K;else{var O=K<.5?K*(1+ue):K+ue-K*ue,W=2*K-O;$=H(W,O,Z+1/3),Ce=H(W,O,Z),q=H(W,O,Z-1/3)}return{r:$*255,g:Ce*255,b:q*255}}function w(Z,ue,K){Z=R(Z,255),ue=R(ue,255),K=R(K,255);var $=o(Z,ue,K),Ce=d(Z,ue,K),q,H,O=$,W=$-Ce;if(H=$===0?0:W/$,$==Ce)q=0;else{switch($){case Z:q=(ue-K)/W+(ue<K?6:0);break;case ue:q=(K-Z)/W+2;break;case K:q=(Z-ue)/W+4;break}q/=6}return{h:q,s:H,v:O}}function E(Z,ue,K){Z=R(Z,360)*6,ue=R(ue,100),K=R(K,100);var $=i.floor(Z),Ce=Z-$,q=K*(1-ue),H=K*(1-Ce*ue),O=K*(1-(1-Ce)*ue),W=$%6,we=[K,H,q,q,O,K][W],be=[O,K,K,H,q,q][W],Oe=[q,q,O,K,K,H][W];return{r:we*255,g:be*255,b:Oe*255}}function k(Z,ue,K,$){var Ce=[ve(p(Z).toString(16)),ve(p(ue).toString(16)),ve(p(K).toString(16))];return $&&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 T(Z,ue,K,$,Ce){var q=[ve(p(Z).toString(16)),ve(p(ue).toString(16)),ve(p(K).toString(16)),ve(Se($))];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 D(Z,ue,K,$){var Ce=[ve(Se($)),ve(p(Z).toString(16)),ve(p(ue).toString(16)),ve(p(K).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 K=l(Z).toHsl();return K.s-=ue/100,K.s=C(K.s),l(K)}function B(Z,ue){ue=ue===0?0:ue||10;var K=l(Z).toHsl();return K.s+=ue/100,K.s=C(K.s),l(K)}function N(Z){return l(Z).desaturate(100)}function x(Z,ue){ue=ue===0?0:ue||10;var K=l(Z).toHsl();return K.l+=ue/100,K.l=C(K.l),l(K)}function Y(Z,ue){ue=ue===0?0:ue||10;var K=l(Z).toRgb();return K.r=o(0,d(255,K.r-p(255*-(ue/100)))),K.g=o(0,d(255,K.g-p(255*-(ue/100)))),K.b=o(0,d(255,K.b-p(255*-(ue/100)))),l(K)}function V(Z,ue){ue=ue===0?0:ue||10;var K=l(Z).toHsl();return K.l-=ue/100,K.l=C(K.l),l(K)}function P(Z,ue){var K=l(Z).toHsl(),$=(K.h+ue)%360;return K.h=$<0?360+$:$,l(K)}function F(Z){var ue=l(Z).toHsl();return ue.h=(ue.h+180)%360,l(ue)}function X(Z){var ue=l(Z).toHsl(),K=ue.h;return[l(Z),l({h:(K+120)%360,s:ue.s,l:ue.l}),l({h:(K+240)%360,s:ue.s,l:ue.l})]}function Q(Z){var ue=l(Z).toHsl(),K=ue.h;return[l(Z),l({h:(K+90)%360,s:ue.s,l:ue.l}),l({h:(K+180)%360,s:ue.s,l:ue.l}),l({h:(K+270)%360,s:ue.s,l:ue.l})]}function ce(Z){var ue=l(Z).toHsl(),K=ue.h;return[l(Z),l({h:(K+72)%360,s:ue.s,l:ue.l}),l({h:(K+216)%360,s:ue.s,l:ue.l})]}function fe(Z,ue,K){ue=ue||6,K=K||30;var $=l(Z).toHsl(),Ce=360/K,q=[l(Z)];for($.h=($.h-(Ce*ue>>1)+720)%360;--ue;)$.h=($.h+Ce)%360,q.push(l($));return q}function z(Z,ue){ue=ue||6;for(var K=l(Z).toHsv(),$=K.h,Ce=K.s,q=K.v,H=[],O=1/ue;ue--;)H.push(l({h:$,s:Ce,v:q})),q=(q+O)%1;return H}l.mix=function(Z,ue,K){K=K===0?0:K||50;var $=l(Z).toRgb(),Ce=l(ue).toRgb(),q=K/100,H={r:(Ce.r-$.r)*q+$.r,g:(Ce.g-$.g)*q+$.g,b:(Ce.b-$.b)*q+$.b,a:(Ce.a-$.a)*q+$.a};return l(H)},l.readability=function(Z,ue){var K=l(Z),$=l(ue);return(i.max(K.getLuminance(),$.getLuminance())+.05)/(i.min(K.getLuminance(),$.getLuminance())+.05)},l.isReadable=function(Z,ue,K){var $=l.readability(Z,ue),Ce,q;q=!1,Ce=ne(K);switch(Ce.level+Ce.size){case"AAsmall":case"AAAlarge":q=$>=4.5;break;case"AAlarge":q=$>=3;break;case"AAAsmall":q=$>=7;break}return q},l.mostReadable=function(Z,ue,K){var $=null,Ce=0,q,H,O,W;K=K||{},H=K.includeFallbackColors,O=K.level,W=K.size;for(var we=0;we<ue.length;we++)q=l.readability(Z,ue[we]),q>Ce&&(Ce=q,$=l(ue[we]));return l.isReadable(Z,$,{level:O,size:W})||!H?$:(K.includeFallbackColors=!1,l.mostReadable(Z,["#fff","#000"],K))};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"},J=l.hexNames=j(se);function j(Z){var ue={};for(var K in Z)Z.hasOwnProperty(K)&&(ue[Z[K]]=K);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 K=he(Z);return Z=d(ue,o(0,parseFloat(Z))),K&&(Z=parseInt(Z*ue,10)/100),i.abs(Z-ue)<1e-6?1:Z%ue/parseFloat(ue)}function C(Z){return d(1,o(0,Z))}function M(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 i.round(parseFloat(Z)*255).toString(16)}function ae(Z){return M(Z)/255}var pe=function(){var Z="[-\\+]?\\d+%?",ue="[-\\+]?\\d*\\.\\d+%?",K="(?:"+ue+")|(?:"+Z+")",$="[\\s|\\(]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")\\s*\\)?",Ce="[\\s|\\(]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")[,|\\s]+("+K+")\\s*\\)?";return{CSS_UNIT:new RegExp(K),rgb:new RegExp("rgb"+$),rgba:new RegExp("rgba"+Ce),hsl:new RegExp("hsl"+$),hsla:new RegExp("hsla"+Ce),hsv:new RegExp("hsv"+$),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(_,"").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 K;return(K=pe.rgb.exec(Z))?{r:K[1],g:K[2],b:K[3]}:(K=pe.rgba.exec(Z))?{r:K[1],g:K[2],b:K[3],a:K[4]}:(K=pe.hsl.exec(Z))?{h:K[1],s:K[2],l:K[3]}:(K=pe.hsla.exec(Z))?{h:K[1],s:K[2],l:K[3],a:K[4]}:(K=pe.hsv.exec(Z))?{h:K[1],s:K[2],v:K[3]}:(K=pe.hsva.exec(Z))?{h:K[1],s:K[2],v:K[3],a:K[4]}:(K=pe.hex8.exec(Z))?{r:M(K[1]),g:M(K[2]),b:M(K[3]),a:ae(K[4]),format:ue?"name":"hex8"}:(K=pe.hex6.exec(Z))?{r:M(K[1]),g:M(K[2]),b:M(K[3]),format:ue?"name":"hex"}:(K=pe.hex4.exec(Z))?{r:M(K[1]+""+K[1]),g:M(K[2]+""+K[2]),b:M(K[3]+""+K[3]),a:ae(K[4]+""+K[4]),format:ue?"name":"hex8"}:(K=pe.hex3.exec(Z))?{r:M(K[1]+""+K[1]),g:M(K[2]+""+K[2]),b:M(K[3]+""+K[3]),format:ue?"name":"hex"}:!1}function ne(Z){var ue,K;return Z=Z||{level:"AA",size:"small"},ue=(Z.level||"AA").toUpperCase(),K=(Z.size||"small").toLowerCase(),ue!=="AA"&&ue!=="AAA"&&(ue="AA"),K!=="small"&&K!=="large"&&(K="small"),{level:ue,size:K}}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 _}),c.d(G,"a",function(){return y});var h=c("je13"),i=c.n(h),S=!1;function _(p,d){var o=i.a.get("__ec");o||(o={}),o[p]=d,i.a.set("__ec",o)}function y(p,d){var o=i.a.get("__ec");return o?o[p]===void 0?d:o[p]:d}},bQjk:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return function(i){var S=h,_=S.lib,y=_.CipherParams,p=S.enc,d=p.Hex,o=S.format,s=o.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var a=d.parse(l);return y.create({ciphertext:a})}}}(),h.format.Hex})},bT9E:function(u,G,c){"use strict";c.d(G,"a",function(){return i});var h=c("VTBJ");function i(S,_){var y=Object(h.a)({},S);return Array.isArray(_)&&_.forEach(function(p){delete y[p]}),y}},c5Ni:function(u,G,c){},cDPC:function(u,G,c){"use strict";var h=c("tJVT"),i=c("q1tI"),S=c.n(i),_=c("i3hx"),y=c.n(_);G.a=function(p){var d=p.defaultX,o=d===void 0?"40%":d,s=p.leftChild,l=p.rightChild,a=p.className,g=p.hideResize,m=g===void 0?!1:g,v=Object(i.useState)(o),w=Object(h.a)(v,2),E=w[0],k=w[1],T=Object(i.useRef)();function D(){T.current=!0}Object(i.useEffect)(function(){function N(Y){T.current&&k(Y.pageX)}function x(){T.current=!1}return window.addEventListener("mousemove",N),window.addEventListener("mouseup",x),function(){window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",x)}},[]);var I=typeof E=="number"&&E!==.01?"".concat(E,"px"):o,B="calc(100% - ".concat(m?"0px":"4px"," - ").concat(I,")");return S.a.createElement("div",{className:"split-panel-container ".concat(a)},S.a.createElement("section",{style:{width:I,display:E===.01?"none":""}},s),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:D},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,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(i){var S=h,_=S.lib,y=_.WordArray,p=_.Hasher,d=S.algo,o=[];(function(){for(var v=0;v<64;v++)o[v]=i.abs(i.sin(v+1))*4294967296|0})();var s=d.MD5=p.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(v,w){for(var E=0;E<16;E++){var k=w+E,T=v[k];v[k]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}var D=this._hash.words,I=v[w+0],B=v[w+1],N=v[w+2],x=v[w+3],Y=v[w+4],V=v[w+5],P=v[w+6],F=v[w+7],X=v[w+8],Q=v[w+9],ce=v[w+10],fe=v[w+11],z=v[w+12],se=v[w+13],J=v[w+14],j=v[w+15],U=D[0],R=D[1],C=D[2],M=D[3];U=l(U,R,C,M,I,7,o[0]),M=l(M,U,R,C,B,12,o[1]),C=l(C,M,U,R,N,17,o[2]),R=l(R,C,M,U,x,22,o[3]),U=l(U,R,C,M,Y,7,o[4]),M=l(M,U,R,C,V,12,o[5]),C=l(C,M,U,R,P,17,o[6]),R=l(R,C,M,U,F,22,o[7]),U=l(U,R,C,M,X,7,o[8]),M=l(M,U,R,C,Q,12,o[9]),C=l(C,M,U,R,ce,17,o[10]),R=l(R,C,M,U,fe,22,o[11]),U=l(U,R,C,M,z,7,o[12]),M=l(M,U,R,C,se,12,o[13]),C=l(C,M,U,R,J,17,o[14]),R=l(R,C,M,U,j,22,o[15]),U=a(U,R,C,M,B,5,o[16]),M=a(M,U,R,C,P,9,o[17]),C=a(C,M,U,R,fe,14,o[18]),R=a(R,C,M,U,I,20,o[19]),U=a(U,R,C,M,V,5,o[20]),M=a(M,U,R,C,ce,9,o[21]),C=a(C,M,U,R,j,14,o[22]),R=a(R,C,M,U,Y,20,o[23]),U=a(U,R,C,M,Q,5,o[24]),M=a(M,U,R,C,J,9,o[25]),C=a(C,M,U,R,x,14,o[26]),R=a(R,C,M,U,X,20,o[27]),U=a(U,R,C,M,se,5,o[28]),M=a(M,U,R,C,N,9,o[29]),C=a(C,M,U,R,F,14,o[30]),R=a(R,C,M,U,z,20,o[31]),U=g(U,R,C,M,V,4,o[32]),M=g(M,U,R,C,X,11,o[33]),C=g(C,M,U,R,fe,16,o[34]),R=g(R,C,M,U,J,23,o[35]),U=g(U,R,C,M,B,4,o[36]),M=g(M,U,R,C,Y,11,o[37]),C=g(C,M,U,R,F,16,o[38]),R=g(R,C,M,U,ce,23,o[39]),U=g(U,R,C,M,se,4,o[40]),M=g(M,U,R,C,I,11,o[41]),C=g(C,M,U,R,x,16,o[42]),R=g(R,C,M,U,P,23,o[43]),U=g(U,R,C,M,Q,4,o[44]),M=g(M,U,R,C,z,11,o[45]),C=g(C,M,U,R,j,16,o[46]),R=g(R,C,M,U,N,23,o[47]),U=m(U,R,C,M,I,6,o[48]),M=m(M,U,R,C,F,10,o[49]),C=m(C,M,U,R,J,15,o[50]),R=m(R,C,M,U,V,21,o[51]),U=m(U,R,C,M,z,6,o[52]),M=m(M,U,R,C,x,10,o[53]),C=m(C,M,U,R,ce,15,o[54]),R=m(R,C,M,U,B,21,o[55]),U=m(U,R,C,M,X,6,o[56]),M=m(M,U,R,C,j,10,o[57]),C=m(C,M,U,R,P,15,o[58]),R=m(R,C,M,U,se,21,o[59]),U=m(U,R,C,M,Y,6,o[60]),M=m(M,U,R,C,fe,10,o[61]),C=m(C,M,U,R,N,15,o[62]),R=m(R,C,M,U,Q,21,o[63]),D[0]=D[0]+U|0,D[1]=D[1]+R|0,D[2]=D[2]+C|0,D[3]=D[3]+M|0},_doFinalize:function(){var v=this._data,w=v.words,E=this._nDataBytes*8,k=v.sigBytes*8;w[k>>>5]|=128<<24-k%32;var T=i.floor(E/4294967296),D=E;w[(k+64>>>9<<4)+15]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,w[(k+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,v.sigBytes=(w.length+1)*4,this._process();for(var I=this._hash,B=I.words,N=0;N<4;N++){var x=B[N];B[N]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return I},clone:function(){var v=p.clone.call(this);return v._hash=this._hash.clone(),v}});function l(v,w,E,k,T,D,I){var B=v+(w&E|~w&k)+T+I;return(B<<D|B>>>32-D)+w}function a(v,w,E,k,T,D,I){var B=v+(w&k|E&~k)+T+I;return(B<<D|B>>>32-D)+w}function g(v,w,E,k,T,D,I){var B=v+(w^E^k)+T+I;return(B<<D|B>>>32-D)+w}function m(v,w,E,k,T,D,I){var B=v+(E^(w|~k))+T+I;return(B<<D|B>>>32-D)+w}S.MD5=p._createHelper(s),S.HmacMD5=p._createHmacHelper(s)}(Math),h.MD5})},dQei:function(u,G){for(var c={glog:function(i){if(i<1)throw new Error("glog("+i+")");return c.LOG_TABLE[i]},gexp:function(i){for(;i<0;)i+=255;for(;i>=256;)i-=255;return c.EXP_TABLE[i]},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 i(S,_){if(S.length==null)throw new Error(S.length+"/"+_);for(var y=0;y<S.length&&S[y]==0;)y++;this.num=new Array(S.length-y+_);for(var p=0;p<S.length-y;p++)this.num[p]=S[p+y]}i.prototype={get:function(S){return this.num[S]},getLength:function(){return this.num.length},multiply:function(S){for(var _=new Array(this.getLength()+S.getLength()-1),y=0;y<this.getLength();y++)for(var p=0;p<S.getLength();p++)_[y+p]^=h.gexp(h.glog(this.get(y))+h.glog(S.get(p)));return new i(_,0)},mod:function(S){if(this.getLength()-S.getLength()<0)return this;for(var _=h.glog(this.get(0))-h.glog(S.get(0)),y=new Array(this.getLength()),p=0;p<this.getLength();p++)y[p]=this.get(p);for(var p=0;p<S.getLength();p++)y[p]^=h.gexp(h.glog(S.get(p))+_);return new i(y,0).mod(S)}},u.exports=i},dejd:function(u,G,c){},dmUQ:function(u,G,c){"use strict";var h=c("Ff2n"),i=c("rePB"),S=c("1OyB"),_=c("vuIU"),y=c("Ji7U"),p=c("md7G"),d=c("foSv"),o=c("q1tI"),s=c.n(o),l=c("TSYQ"),a=c.n(l),g=c("4IlW");function m(X,Q){var ce=Object.keys(X);if(Object.getOwnPropertySymbols){var fe=Object.getOwnPropertySymbols(X);Q&&(fe=fe.filter(function(z){return Object.getOwnPropertyDescriptor(X,z).enumerable})),ce.push.apply(ce,fe)}return ce}function v(X){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(i.a)(X,fe,ce[fe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(ce)):m(Object(ce)).forEach(function(fe){Object.defineProperty(X,fe,Object.getOwnPropertyDescriptor(ce,fe))})}return X}function w(X){var Q=E();return function(){var fe=Object(d.a)(X),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 E(){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(X){return!1}}function k(){}function T(X){X.preventDefault()}var D=function(Q){return Q.replace(/[^\w.-]+/g,"")},I=200,B=600,N=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,x=function(Q){return Q!=null},Y=function(Q,ce){return ce===Q||typeof ce=="number"&&typeof Q=="number"&&isNaN(ce)&&isNaN(Q)},V=function(X){Object(y.a)(ce,X);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 M=z.getRatio(j);z.up(j,M,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),M=1;M<R;M++)C[M-1]=arguments[M];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,M=z.getInputDisplayValue({focus:!1,value:R});z.input.value=M&&Number(M),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(x(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,M=U.value,le;R?le=C:le=z.toPrecisionAsStep(M),le==null&&(le="");var he=z.formatWrapper(le);return x(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 J=z.getValidValue(z.toNumber(se));return z.state=v(v({},z.state),{},{inputValue:z.toPrecisionAsStep(J),value:J}),z}return Object(_.a)(ce,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(z){var se=this.props,J=se.value,j=se.onChange,U=se.max,R=se.min,C=this.state.focused;if(z){if(!Y(z.value,J)||!Y(z.max,U)||!Y(z.min,R)){var M=C?J:this.getValidValue(J),le;this.pressingUpOrDown?le=M:this.inputting?le=this.rawInput:le=this.toPrecisionAsStep(M),this.setState({value:M,inputValue:le})}var he="value"in this.props?J: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 x(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,J=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=J),j)}},{key:"setValue",value:function(z,se){var J=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,M=C===void 0?null:C,le=typeof j=="number"?j.toFixed(J):"".concat(j),he=j!==R||le!=="".concat(M);return"value"in this.props?(M=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:M},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,J=this.props,j=J.precision,U=J.step;if(x(j))return j;var R=this.getPrecision(se),C=this.getPrecision(U),M=this.getPrecision(z);return z?Math.max(M,R+C):R+C}},{key:"getPrecisionFactor",value:function(z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,J=this.getMaxPrecision(z,se);return Math.pow(10,J)}},{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,J=this.state.focused,j=z&&z.length>16&&J;return this.isNotCompleteNumber(z)||j?z:x(se)?Math.round(z*Math.pow(10,se))/Math.pow(10,se):Number(z)}},{key:"upStep",value:function(z,se){var J=this.props.step,j=this.getPrecisionFactor(z,se),U=Math.abs(this.getMaxPrecision(z,se)),R=((j*z+j*J*se)/j).toFixed(U);return this.toNumber(R)}},{key:"downStep",value:function(z,se){var J=this.props.step,j=this.getPrecisionFactor(z,se),U=Math.abs(this.getMaxPrecision(z,se)),R=((j*z-j*J*se)/j).toFixed(U);return this.toNumber(R)}},{key:"step",value:function(z,se){var J=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 M=this["".concat(z,"Step")](C,j),le=M>R.max||M<R.min;if(M>R.max?M=R.max:M<R.min&&(M=R.min),this.setValue(M,null),this.setState({focused:!0},function(){J.pressingUpOrDown=!1}),le)return;this.autoStepTimer=setTimeout(function(){J[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 J=this.input.selectionStart,j=this.input.selectionEnd;(z!==J||se!==j)&&this.input.setSelectionRange(z,se)}catch(U){}}},{key:"render",value:function(){var z,se=this.props,J=se.prefixCls,j=se.disabled,U=se.readOnly,R=se.useTouch,C=se.autoComplete,M=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,ne=se.onMouseOut,Z=se.required,ue=se.onClick,K=se.tabIndex,$=se.type,Ce=se.placeholder,q=se.id,H=se.inputMode,O=se.pattern,W=se.step,we=se.maxLength,be=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=a()(J,(z={},Object(i.a)(z,he,!!he),Object(i.a)(z,"".concat(J,"-disabled"),j),Object(i.a)(z,"".concat(J,"-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=a()("".concat(J,"-handler"),"".concat(J,"-handler-up"),Object(i.a)({},"".concat(J,"-handler-up-disabled"),Ie)),_e=a()("".concat(J,"-handler"),"".concat(J,"-handler-down"),Object(i.a)({},"".concat(J,"-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:ne,onFocus:function(){return null},onBlur:function(){return null}},s.a.createElement("div",{className:"".concat(J,"-handler-wrap")},s.a.createElement("span",Object.assign({unselectable:"on"},Te,{role:"button","aria-label":"Increase Value","aria-disabled":Ie,className:Le}),M||s.a.createElement("span",{unselectable:"on",className:"".concat(J,"-handler-up-inner"),onClick:T})),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(J,"-handler-down-inner"),onClick:T}))),s.a.createElement("div",{className:"".concat(J,"-input-wrap")},s.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ee,"aria-valuemax":ve,"aria-valuenow":Ye,required:Z,type:$,placeholder:Ce,onPaste:Be,onClick:ue,onMouseUp:this.onMouseUp,className:"".concat(J,"-input"),tabIndex:K,autoComplete:C,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:nt?this.onKeyDown:k,onKeyUp:nt?this.onKeyUp:k,autoFocus:be,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:O,inputMode:H,onInput:Fe},Ne))))}}]),ce}(s.a.Component);V.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:D,required:!1,autoComplete:"off"};var P=V,F=G.a=P},e7zE:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("3y9D"),c("WYAk"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.Base,y=S.WordArray,p=i.algo,d=p.SHA1,o=p.HMAC,s=p.PBKDF2=_.extend({cfg:_.extend({keySize:128/32,hasher:d,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,a){for(var g=this.cfg,m=o.create(g.hasher,l),v=y.create(),w=y.create([1]),E=v.words,k=w.words,T=g.keySize,D=g.iterations;E.length<T;){var I=m.update(a).finalize(w);m.reset();for(var B=I.words,N=B.length,x=I,Y=1;Y<D;Y++){x=m.finalize(x),m.reset();for(var V=x.words,P=0;P<N;P++)B[P]^=V[P]}v.concat(I),k[0]++}return v.sigBytes=T*4,v}});i.PBKDF2=function(l,a,g){return s.create(g).compute(l,a)}}(),h.PBKDF2})},f4xo:function(u,G,c){var h=c("nVVt");function i(S){this.mode=h.MODE_8BIT_BYTE,this.data=S}i.prototype={getLength:function(S){return this.data.length},write:function(S){for(var _=0;_<this.data.length;_++)S.put(this.data.charCodeAt(_),8)}},u.exports=i},fAei:function(u,G,c){"use strict";c.d(G,"a",function(){return I.a});var h=c("rePB"),i=c("VTBJ"),S=c("KQm4"),_=c("1OyB"),y=c("vuIU"),p=c("Ji7U"),d=c("LK+K"),o=c("q1tI"),s=c("4IlW"),l=c("Kwbf"),a=c("TSYQ"),g=c.n(a),m=c("sboe"),v=c("OZM5"),w=c("815F"),E=c("ODXe"),k=c("Ff2n"),T=c("+nKL"),D=c("8XRh"),I=c("WaYH"),B=function(Ee,Se){var ae=Ee.className,pe=Ee.style,me=Ee.motion,ee=Ee.motionNodes,ne=Ee.motionType,Z=Ee.onMotionStart,ue=Ee.onMotionEnd,K=Ee.active,$=Ee.treeNodeRequiredProps,Ce=Object(k.a)(Ee,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),q=o.useState(!0),H=Object(E.a)(q,2),O=H[0],W=H[1],we=o.useContext(m.a),be=we.prefixCls,Oe=o.useRef(!1),Be=function(){Oe.current||ue(),Oe.current=!0};return Object(o.useEffect)(function(){ee&&ne==="hide"&&O&&W(!1)},[ee]),Object(o.useEffect)(function(){return ee&&Z(),function(){ee&&Be()}},[]),ee?o.createElement(D.default,Object.assign({ref:Se,visible:O},me,{motionAppear:ne==="show",onAppearEnd:Be,onLeaveEnd:Be}),function(Fe,Ue){var Ge=Fe.className,Ye=Fe.style;return o.createElement("div",{ref:Ue,className:g()("".concat(be,"-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,$);return o.createElement(I.a,Object.assign({},nt,$e,{active:K,data:Xe.data,key:Ne,isStart:ot,isEnd:Ve}))}))}):o.createElement(I.a,Object.assign({domRef:Se,className:ae,style:pe},Ce,{active:K}))};B.displayName="MotionTreeNode";var N=o.forwardRef(B),x=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 ne=new Map;me.forEach(function(ue){ne.set(ue,!0)});var Z=ee.filter(function(ue){return!ne.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 V(ve,Ee,Se){var ae=ve.findIndex(function(ne){var Z=ne.data;return Z.key===Se}),pe=ve[ae+1],me=Ee.findIndex(function(ne){var Z=ne.data;return Z.key===Se});if(pe){var ee=Ee.findIndex(function(ne){var Z=ne.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(){},X="RC_TREE_MOTION_".concat(Math.random()),Q={key:X},ce={key:X,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 J(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,ne=Ee.expandedKeys,Z=Ee.selectedKeys,ue=Ee.checkedKeys,K=Ee.loadedKeys,$=Ee.loadingKeys,Ce=Ee.halfCheckedKeys,q=Ee.keyEntities,H=Ee.disabled,O=Ee.dragging,W=Ee.dragOverNodeKey,we=Ee.dropPosition,be=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=o.useRef(null);o.useImperativeHandle(Se,function(){return{scrollTo:function(nr){De.current.scrollTo(nr)}}});var Le=o.useState(ne),_e=Object(E.a)(Le,2),Te=_e[0],ke=_e[1],Ae=o.useState(pe),ze=Object(E.a)(Ae,2),je=ze[0],Ze=ze[1],ht=o.useState(pe),Tt=Object(E.a)(ht,2),qe=Tt[0],at=Tt[1],dt=o.useState([]),st=Object(E.a)(dt,2),St=st[0],Ut=st[1],Vt=o.useState(null),Xt=Object(E.a)(Vt,2),At=Xt[0],Ft=Xt[1];function or(){Ze(pe),at(pe),Ut([]),Ft(null),$e()}o.useEffect(function(){ke(ne);var Jt=Y(Te,ne);if(Jt.key!==null)if(Jt.add){var nr=je.findIndex(function(Kt){var hr=Kt.data.key;return hr===Jt.key}),sr=z(V(je,pe,Jt.key),Fe,Oe,Be),vr=je.slice();vr.splice(nr+1,0,fe),at(vr),Ut(sr),Ft("show")}else{var Sr=pe.findIndex(function(Kt){var hr=Kt.data.key;return hr===Jt.key}),Ht=z(V(pe,je,Jt.key),Fe,Oe,Be),mt=pe.slice();mt.splice(Sr+1,0,fe),at(mt),Ut(Ht),Ft("hide")}else je!==pe&&(Ze(pe),at(pe))},[ne,pe]),o.useEffect(function(){O||or()},[O]);var Ct=be?qe:pe,kr={expandedKeys:ne,selectedKeys:Z,loadedKeys:K,loadingKeys:$,checkedKeys:ue,halfCheckedKeys:Ce,dragOverNodeKey:W,dropPosition:we,keyEntities:q};return o.createElement(o.Fragment,null,Ye&&Ge&&o.createElement("span",{style:P,"aria-live":"assertive"},J(Ge)),o.createElement("div",{role:"tree"},o.createElement("input",{style:P,disabled:Ue===!1||H,tabIndex:Ue!==!1?Xe:null,onKeyDown:Je,onFocus:Ne,onBlur:nt,value:"",onChange:F})),o.createElement(T.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,vr=sr.key,Sr=Object(k.a)(sr,["key"]),Ht=Jt.isStart,mt=Jt.isEnd,Kt=Object(w.e)(vr,nr);delete Sr.children;var hr=Object(w.f)(Kt,kr);return o.createElement(x,Object.assign({},Sr,hr,{active:Ge&&vr===Ge.data.key,pos:nr,data:Jt.data,isStart:Ht,isEnd:mt,motion:be,motionNodes:vr===X?St:null,motionType:At,onMotionStart:Ve,onMotionEnd:or,treeNodeRequiredProps:kr,onMouseMove:function(){ot(null)}}))}))},U=o.forwardRef(j);U.displayName="NodeList";var R=U,C=c("NvD2"),M=function(ve){Object(p.a)(Se,ve);var Ee=Object(d.a)(Se);function Se(){var ae;return Object(_.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=o.createRef(),ae.onNodeDragStart=function(pe,me){var ee=ae.state,ne=ee.expandedKeys,Z=ee.keyEntities,ue=ae.props.onDragStart,K=me.props.eventKey;ae.dragNode=me;var $=Object(v.b)(ne,K);ae.setState({dragging:!0,dragNodesKeys:Object(v.g)(K,Z)}),ae.setExpandedKeys($),ue&&ue({event:pe,node:Object(w.b)(me.props)})},ae.onNodeDragEnter=function(pe,me){var ee=ae.state,ne=ee.expandedKeys,Z=ee.keyEntities,ue=ee.dragNodesKeys,K=ae.props.onDragEnter,$=me.props,Ce=$.pos,q=$.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(O){clearTimeout(ae.delayedDragEnterLogic[O])}),ae.delayedDragEnterLogic[Ce]=window.setTimeout(function(){if(!ae.state.dragging)return;var O=Object(S.a)(ne),W=Z[q];W&&(W.children||[]).length&&(O=Object(v.a)(ne,q)),"expandedKeys"in ae.props||ae.setExpandedKeys(O),K&&K({event:pe,node:Object(w.b)(me.props),expandedKeys:O})},400)},0)},ae.onNodeDragOver=function(pe,me){var ee=ae.state.dragNodesKeys,ne=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})}ne&&ne({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,ne=ee.dragNodesKeys,Z=ne===void 0?[]:ne,ue=ee.dropPosition,K=ae.props.onDrop,$=me.props,Ce=$.eventKey,q=$.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),O={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&&(O.dropToGap=!0),K&&K(O),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,ne=ae.state.keyEntities,Z=ae.props,ue=Z.onSelect,K=Z.multiple,$=me.selected,Ce=me.key,q=!$;q?K?ee=Object(v.a)(ee,Ce):ee=[Ce]:ee=Object(v.b)(ee,Ce);var H=ee.map(function(O){var W=ne[O];return W?W.node:null}).filter(function(O){return O});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 ne=ae.state,Z=ne.keyEntities,ue=ne.checkedKeys,K=ne.halfCheckedKeys,$=ae.props,Ce=$.checkStrictly,q=$.onCheck,H=me.key,O,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),be=Object(v.b)(K,H);O={checked:we,halfChecked:be},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}O=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(O,W)},ae.onNodeLoad=function(pe){return new Promise(function(me){ae.setState(function(ee){var ne=ee.loadedKeys,Z=ne===void 0?[]:ne,ue=ee.loadingKeys,K=ue===void 0?[]:ue,$=ae.props,Ce=$.loadData,q=$.onLoad,H=pe.key;if(!Ce||Z.indexOf(H)!==-1||K.indexOf(H)!==-1)return{};var O=Ce(pe);return O.then(function(){var W=ae.state,we=W.loadedKeys,be=W.loadingKeys,Oe=Object(v.a)(we,H),Be=Object(v.b)(be,H);q&&q(Oe,{event:"load",node:pe}),ae.setUncontrolledState({loadedKeys:Oe}),ae.setState({loadingKeys:Be}),me()}),{loadingKeys:Object(v.a)(K,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,ne=pe.loadedKeys,Z=pe.loadingKeys,ue=pe.checkedKeys,K=pe.halfCheckedKeys,$=pe.dragOverNodeKey,Ce=pe.dropPosition,q=pe.keyEntities;return{expandedKeys:me||[],selectedKeys:ee||[],loadedKeys:ne||[],loadingKeys:Z||[],checkedKeys:ue||[],halfCheckedKeys:K||[],dragOverNodeKey:$,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,ne=ae.state.listChanging,Z=ae.props,ue=Z.onExpand,K=Z.loadData,$=me.key,Ce=me.expanded;if(ne)return;var q=ee.indexOf($),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,$):ee=Object(v.b)(ee,$),ae.setExpandedKeys(ee),ue&&ue(ee,{node:me,expanded:H,nativeEvent:pe.nativeEvent}),H&&K){var O=ae.onNodeLoad(me);O&&O.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(ne){var Z=ne.data.key;return Z===me})||null},ae.offsetActiveKey=function(pe){var me=ae.state,ee=me.flattenNodes,ne=me.activeKey,Z=ee.findIndex(function($){var Ce=$.data.key;return Ce===ne});Z===-1&&pe<0&&(Z=ee.length),Z=(Z+pe+ee.length)%ee.length;var ue=ee[Z];if(ue){var K=ue.data.key;ae.onActiveChange(K)}else ae.onActiveChange(null)},ae.onKeyDown=function(pe){var me=ae.state,ee=me.activeKey,ne=me.expandedKeys,Z=me.checkedKeys,ue=ae.props,K=ue.onKeyDown,$=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(),O=q.data.isLeaf===!1||!!(q.data.children||[]).length,W=Object(w.b)(Object(i.a)(Object(i.a)({},Object(w.f)(ee,H)),{},{data:q.data,active:!0}));switch(pe.which){case s.a.LEFT:{O&&ne.includes(ee)?ae.onNodeExpand({},W):q.parent&&ae.onActiveChange(q.parent.data.key),pe.preventDefault();break}case s.a.RIGHT:{O&&!ne.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:{$&&!W.disabled&&W.checkable!==!1&&!W.disableCheckbox?ae.onNodeCheck({},W,!Z.includes(ee)):!$&&Ce&&!W.disabled&&W.selectable!==!1&&ae.onNodeSelect({},W);break}}}K&&K(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 ne=!1,Z=!0,ue={};Object.keys(pe).forEach(function(K){if(K in ae.props){Z=!1;return}ne=!0,ue[K]=pe[K]}),ne&&(!me||Z)&&ae.setState(Object(i.a)(Object(i.a)({},ue),ee))},ae.scrollTo=function(pe){ae.listRef.current.scrollTo(pe)},ae}return Object(y.a)(Se,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var pe,me=this.state,ee=me.focused,ne=me.flattenNodes,Z=me.keyEntities,ue=me.dragging,K=me.activeKey,$=this.props,Ce=$.prefixCls,q=$.className,H=$.style,O=$.showLine,W=$.focusable,we=$.tabIndex,be=we===void 0?0:we,Oe=$.selectable,Be=$.showIcon,Fe=$.icon,Ue=$.switcherIcon,Ge=$.draggable,Ye=$.checkable,Xe=$.checkStrictly,Je=$.disabled,Ne=$.motion,nt=$.loadData,ot=$.filterTreeNode,Ve=$.height,$e=$.itemHeight,Ie=$.virtual,De=$.titleRender,Le=$.onContextMenu,_e=Object(v.f)(this.props);return o.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}},o.createElement("div",{className:g()(Ce,q,(pe={},Object(h.a)(pe,"".concat(Ce,"-show-line"),O),Object(h.a)(pe,"".concat(Ce,"-focused"),ee),Object(h.a)(pe,"".concat(Ce,"-active-focused"),K!==null),pe))},o.createElement(R,Object.assign({ref:this.listRef,prefixCls:Ce,style:H,data:ne,disabled:Je,selectable:Oe,checkable:!!Ye,motion:Ne,dragging:ue,height:Ve,itemHeight:$e,virtual:Ie,focusable:W,focused:ee,tabIndex:be,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,ne={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){ne.treeData=ue;var K=Object(w.a)(ue);ne.keyEntities=Object(i.a)(Object(h.a)({},X,ce),K.keyEntities)}var $=ne.keyEntities||me.keyEntities;if(Z("expandedKeys")||ee&&Z("autoExpandParent"))ne.expandedKeys=pe.autoExpandParent||!ee&&pe.defaultExpandParent?Object(v.e)(pe.expandedKeys,$):pe.expandedKeys;else if(!ee&&pe.defaultExpandAll){var Ce=Object(i.a)({},$);delete Ce[X],ne.expandedKeys=Object.keys(Ce).map(function(Fe){return Ce[Fe].key})}else!ee&&pe.defaultExpandedKeys&&(ne.expandedKeys=pe.autoExpandParent||pe.defaultExpandParent?Object(v.e)(pe.defaultExpandedKeys,$):pe.defaultExpandedKeys);if(ne.expandedKeys||delete ne.expandedKeys,ue||ne.expandedKeys){var q=Object(w.d)(ue||me.treeData,ne.expandedKeys||me.expandedKeys);ne.flattenNodes=q}if(pe.selectable&&(Z("selectedKeys")?ne.selectedKeys=Object(v.d)(pe.selectedKeys,pe):!ee&&pe.defaultSelectedKeys&&(ne.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 O=H,W=O.checkedKeys,we=W===void 0?[]:W,be=O.halfCheckedKeys,Oe=be===void 0?[]:be;if(!pe.checkStrictly){var Be=Object(C.a)(we,!0,$);we=Be.checkedKeys,Oe=Be.halfCheckedKeys}ne.checkedKeys=we,ne.halfCheckedKeys=Oe}}return Z("loadedKeys")&&(ne.loadedKeys=pe.loadedKeys),ne}}]),Se}(o.Component);M.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:[]},M.TreeNode=I.a;var le=M,he=G.b=le},fcSX:function(u,G,c){"use strict";var h=c("Ff2n"),i=c("1OyB"),S=c("vuIU"),_=c("Ji7U"),y=c("md7G"),p=c("foSv"),d=c("1W/9"),o=c("q1tI"),s=c("rePB"),l=c("JX7q"),a=c("TSYQ"),g=c.n(a),m=c("qx4F"),v=c("4IlW");function w(j){return Array.isArray(j)?j:[j]}var E={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},k=Object.keys(E).filter(function(j){if(typeof document=="undefined")return!1;var U=document.getElementsByTagName("html")[0];return j in(U?U.style:{})})[0],T=E[k];function D(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)},x=!(typeof window!="undefined"&&window.document&&window.document.createElement),Y=function j(U,R,C,M){if(!R||R===document||R instanceof Document)return!1;if(R===U.parentNode)return!0;var le=Math.max(Math.abs(C),Math.abs(M))===Math.abs(M),he=Math.max(Math.abs(C),Math.abs(M))===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&&M<0||R.scrollTop<=0&&M>0))||he&&(!ee||ee&&(R.scrollLeft>=Ee&&C<0||R.scrollLeft<=0&&C>0))?j(U,R.parentNode,C,M):!1};function V(j){var U=P();return function(){var C=Object(p.a)(j),M;if(U){var le=Object(p.a)(this).constructor;M=Reflect.construct(C,arguments,le)}else M=C.apply(this,arguments);return Object(y.a)(this,M)}}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={},X=function(j){Object(_.a)(R,j);var U=V(R);function R(C){var M;return Object(i.a)(this,R),M=U.call(this,C),M.domFocus=function(){M.dom&&M.dom.focus()},M.removeStartHandler=function(le){if(le.touches.length>1)return;M.startPos={x:le.touches[0].clientX,y:le.touches[0].clientY}},M.removeMoveHandler=function(le){if(le.changedTouches.length>1)return;var he=le.currentTarget,ve=le.changedTouches[0].clientX-M.startPos.x,Ee=le.changedTouches[0].clientY-M.startPos.y;(he===M.maskDom||he===M.handlerDom||he===M.contentDom&&Y(he,le.target,ve,Ee))&&le.cancelable&&le.preventDefault()},M.transitionEnd=function(le){var he=le.target;I(he,T,M.transitionEnd),he.style.transition=""},M.onKeyDown=function(le){if(le.keyCode===v.a.ESC){var he=M.props.onClose;le.stopPropagation(),he&&he(le)}},M.onWrapperTransitionEnd=function(le){var he=M.props,ve=he.open,Ee=he.afterVisibleChange;le.target===M.contentWrapper&&le.propertyName.match(/transform$/)&&(M.dom.style.transition="",!ve&&M.getCurrentDrawerSome()&&(document.body.style.overflowX="",M.maskDom&&(M.maskDom.style.left="",M.maskDom.style.width="")),Ee&&Ee(!!ve))},M.openLevelTransition=function(){var le=M.props,he=le.open,ve=le.width,Ee=le.height,Se=M.getHorizontalBoolAndPlacementName(),ae=Se.isHorizontal,pe=Se.placementName,me=M.contentDom?M.contentDom.getBoundingClientRect()[ae?"width":"height"]:0,ee=(ae?ve:Ee)||me;M.setLevelAndScrolling(he,pe,ee)},M.setLevelTransform=function(le,he,ve,Ee){var Se=M.props,ae=Se.placement,pe=Se.levelMove,me=Se.duration,ee=Se.ease,ne=Se.showMask;M.levelDom.forEach(function(Z){Z.style.transition="transform ".concat(me," ").concat(ee),D(Z,T,M.transitionEnd);var ue=le?ve:0;if(pe){var K=B(pe,{target:Z,open:le});ue=le?K[0]:K[1]||0}var $=typeof ue=="number"?"".concat(ue,"px"):ue,Ce=ae==="left"||ae==="top"?$:"-".concat($);Ce=ne&&ae==="right"&&Ee?"calc(".concat(Ce," + ").concat(Ee,"px)"):Ce,Z.style.transform=ue?"".concat(he,"(").concat(Ce,")"):""})},M.setLevelAndScrolling=function(le,he,ve){var Ee=M.props.onChange;if(!x){var Se=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(m.a)(!0):0;M.setLevelTransform(le,he,ve,Se),M.toggleScrollingToDrawerAndBody(Se)}Ee&&Ee(le)},M.toggleScrollingToDrawerAndBody=function(le){var he=M.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"],ne=[document.body,M.maskDom,M.handlerDom,M.contentDom];ae&&document.body.style.overflow!=="hidden"?(le&&M.addScrollingEffect(le),me===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ne.forEach(function(Z,ue){if(!Z)return;D(Z,ee[ue]||"touchmove",ue?M.removeMoveHandler:M.removeStartHandler,M.passive)})):M.getCurrentDrawerSome()&&(me||(document.body.style.overflow=""),document.body.style.touchAction="",le&&M.remScrollingEffect(le),ne.forEach(function(Z,ue){if(!Z)return;I(Z,ee[ue]||"touchmove",ue?M.removeMoveHandler:M.removeStartHandler,M.passive)}))}},M.addScrollingEffect=function(le){var he=M.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),ne="transform ".concat(Ee," ").concat(Se);M.dom.style.transition="none";switch(ve){case"right":M.dom.style.transform="translateX(-".concat(le,"px)");break;case"top":case"bottom":M.dom.style.width="calc(100% - ".concat(le,"px)"),M.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(M.timeout),M.timeout=setTimeout(function(){M.dom&&(M.dom.style.transition="".concat(ne,",").concat(ee),M.dom.style.width="",M.dom.style.transform="")})},M.remScrollingEffect=function(le){var he=M.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"),M.dom.style.transition="none";var ee,ne="width ".concat(Ee," ").concat(Se),Z="transform ".concat(Ee," ").concat(Se);switch(ve){case"left":{M.dom.style.width="100%",ne="width 0s ".concat(Se," ").concat(Ee);break}case"right":{M.dom.style.transform="translateX(".concat(le,"px)"),M.dom.style.width="100%",ne="width 0s ".concat(Se," ").concat(Ee),M.maskDom&&(M.maskDom.style.left="-".concat(le,"px"),M.maskDom.style.width="calc(100% + ".concat(le,"px)"));break}case"top":case"bottom":{M.dom.style.width="calc(100% + ".concat(le,"px)"),M.dom.style.height="100%",M.dom.style.transform="translateZ(0)",ee="height 0s ".concat(Se," ").concat(Ee);break}default:break}clearTimeout(M.timeout),M.timeout=setTimeout(function(){M.dom&&(M.dom.style.transition="".concat(Z,",").concat(ee?"".concat(ee,","):"").concat(ne),M.dom.style.transform="",M.dom.style.width="",M.dom.style.height="")})},M.getCurrentDrawerSome=function(){return!Object.keys(F).some(function(le){return F[le]})},M.getLevelDom=function(le){var he=le.level,ve=le.getContainer;if(x)return;var Ee=ve&&ve(),Se=Ee?Ee.parentNode:null;if(M.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&&M.levelDom.push(pe)})}else he&&w(he).forEach(function(pe){document.querySelectorAll(pe).forEach(function(me){M.levelDom.push(me)})})},M.getHorizontalBoolAndPlacementName=function(){var le=M.props.placement,he=le==="left"||le==="right",ve="translate".concat(he?"X":"Y");return{isHorizontal:he,placementName:ve}},M.state={_self:Object(l.a)(M)},M}return Object(S.a)(R,[{key:"componentDidMount",value:function(){var M=this;if(!x){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(){M.domFocus()}))}},{key:"componentDidUpdate",value:function(M){var le=this.props,he=le.open,ve=le.getContainer,Ee=ve&&ve();he!==M.open&&(he&&this.domFocus(),Ee&&Ee.parentNode===document.body&&(F[this.drawerId]=!!he),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var M=this.props,le=M.getOpenCount,he=M.open,ve=M.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 M,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,ne=he.prefixCls,Z=he.placement,ue=he.level,K=he.levelMove,$=he.ease,Ce=he.duration,q=he.getContainer,H=he.handler,O=he.onChange,W=he.afterVisibleChange,we=he.showMask,be=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()(ne,(M={},Object(s.a)(M,"".concat(ne,"-").concat(Z),!0),Object(s.a)(M,"".concat(ne,"-open"),Je),Object(s.a)(M,ve||"",!!ve),Object(s.a)(M,"no-mask",!we),M)),nt=this.getHorizontalBoolAndPlacementName(),ot=nt.placementName,Ve=Z==="left"||Z==="top"?"-100%":"100%",$e=Je?"":"".concat(ot,"(").concat(Ve,")"),Ie=H&&o.cloneElement(H,{onClick:function(Le){H.props.onClick&&H.props.onClick(),Fe&&Fe(Le)},ref:function(Le){le.handlerDom=Le}});return o.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&&o.createElement("div",{className:"".concat(ne,"-mask"),onClick:be?Be:void 0,style:Oe,ref:function(Le){le.maskDom=Le}}),o.createElement("div",{className:"".concat(ne,"-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}},o.createElement("div",{className:"".concat(ne,"-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(M,le){var he=le.prevProps,ve=le._self,Ee={prevProps:M};if(he!==void 0){var Se=M.placement,ae=M.level;Se!==he.placement&&(ve.contentDom=null),ae!==he.level&&ve.getLevelDom(M)}return Ee}}]),R}(o.Component);X.defaultProps={switchScrollingEffect:function(){}};var Q=X;function ce(j){var U=fe();return function(){var C=Object(p.a)(j),M;if(U){var le=Object(p.a)(this).constructor;M=Reflect.construct(C,arguments,le)}else M=C.apply(this,arguments);return Object(y.a)(this,M)}}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(_.a)(R,j);var U=ce(R);function R(C){var M;Object(i.a)(this,R),M=U.call(this,C),M.onHandleClick=function(he){var ve=M.props,Ee=ve.onHandleClick,Se=ve.open;if(Ee&&Ee(he),typeof Se=="undefined"){var ae=M.state.open;M.setState({open:!ae})}},M.onClose=function(he){var ve=M.props,Ee=ve.onClose,Se=ve.open;Ee&&Ee(he),typeof Se=="undefined"&&M.setState({open:!1})};var le=typeof C.open!="undefined"?C.open:!!C.defaultOpen;return M.state={open:le},"onMaskClick"in C&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),M}return Object(S.a)(R,[{key:"render",value:function(){var M=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 o.createElement("div",{className:Ee,ref:function(Z){M.dom=Z}},o.createElement(Q,Object.assign({},pe,{open:me,handler:ae,getContainer:function(){return M.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ee=!!ae||Se;return o.createElement(d.a,{visible:me,forceRender:ee,getContainer:ve,wrapperClassName:Ee},function(ne){var Z=ne.visible,ue=ne.afterClose,K=Object(h.a)(ne,["visible","afterClose"]);return o.createElement(Q,Object.assign({},pe,K,{open:Z!==void 0?Z:me,afterVisibleChange:ue!==void 0?ue:pe.afterVisibleChange,handler:ae,onClose:M.onClose,onHandleClick:M.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(M,le){var he=le.prevProps,ve={prevProps:M};return typeof he!="undefined"&&M.open!==he.open&&(ve.open=M.open),ve}}]),R}(o.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:o.createElement("div",{className:"drawer-handle"},o.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var se=z,J=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,i,S,_=gap,y,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,y=[],Object.prototype.toString.apply(p)==="[object Array]"){for(S=p.length,c=0;c<S;c+=1)y[c]=str(c,p)||"null";return i=y.length===0?"[]":gap?`[
`+gap+y.join(`,
`+gap)+`
`+_+"]":"["+y.join(",")+"]",gap=_,i}if(rep&&typeof rep=="object")for(S=rep.length,c=0;c<S;c+=1)typeof rep[c]=="string"&&(h=rep[c],i=str(h,p),i&&y.push(quote(h)+(gap?": ":":")+i));else for(h in p)Object.prototype.hasOwnProperty.call(p,h)&&(i=str(h,p),i&&y.push(quote(h)+(gap?": ":":")+i));return i=y.length===0?"{}":gap?`{
`+gap+y.join(`,
`+gap)+`
`+_+"}":"{"+y.join(",")+"}",gap=_,i}}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,i=u[G];if(i&&typeof i=="object")for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(h=walk(i,c),h!==void 0?i[c]=h:delete i[c]);return reviver.call(u,G,i)}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,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.mode.ECB=function(){var i=h.lib.BlockCipherMode.extend();return i.Encryptor=i.extend({processBlock:function(S,_){this._cipher.encryptBlock(S,_)}}),i.Decryptor=i.extend({processBlock:function(S,_){this._cipher.decryptBlock(S,_)}}),i}(),h.mode.ECB})},h78n:function(u,G,c){"use strict";c.d(G,"a",function(){return z});var h=c("q1tI"),i=c.n(h),S=c("TSYQ"),_=c.n(S),y={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(),M=!1;Object.keys(U).forEach(function(le){var he=U[le].current;if(!he)return;M=!0;var ve=he.style;ve.transitionDuration=".3s, .3s, .3s, .06s",R.current&&C-R.current<100&&(ve.transitionDuration="0s, 0s")}),M&&(R.current=Date.now())}),[U]};function d(){return d=Object.assign||function(J){for(var j=1;j<arguments.length;j++){var U=arguments[j];for(var R in U)Object.prototype.hasOwnProperty.call(U,R)&&(J[R]=U[R])}return J},d.apply(this,arguments)}function o(J,j){return m(J)||g(J,j)||l(J,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,j){if(!J)return;if(typeof J=="string")return a(J,j);var U=Object.prototype.toString.call(J).slice(8,-1);if(U==="Object"&&J.constructor&&(U=J.constructor.name),U==="Map"||U==="Set")return Array.from(J);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return a(J,j)}function a(J,j){(j==null||j>J.length)&&(j=J.length);for(var U=0,R=new Array(j);U<j;U++)R[U]=J[U];return R}function g(J,j){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(J)))return;var U=[],R=!0,C=!1,M=void 0;try{for(var le=J[Symbol.iterator](),he;!(R=(he=le.next()).done)&&!(U.push(he.value),j&&U.length===j);R=!0);}catch(ve){C=!0,M=ve}finally{try{!R&&le.return!=null&&le.return()}finally{if(C)throw M}}return U}function m(J){if(Array.isArray(J))return J}function v(J,j){if(J==null)return{};var U=w(J,j),R,C;if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(J);for(C=0;C<M.length;C++){if(R=M[C],j.indexOf(R)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(J,R))continue;U[R]=J[R]}}return U}function w(J,j){if(J==null)return{};var U={},R=Object.keys(J),C,M;for(M=0;M<R.length;M++){if(C=R[M],j.indexOf(C)>=0)continue;U[C]=J[C]}return U}var E=function(j){var U=j.className,R=j.percent,C=j.prefixCls,M=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(M)?M:[M],ne=p(me),Z=o(ne,1),ue=Z[0],K=he/2,$=100-he/2,Ce="M ".concat(le==="round"?K:0,",").concat(K,`
L `).concat(le==="round"?$:100,",").concat(K),q="0 0 100 ".concat(he),H=0;return i.a.createElement("svg",d({className:_()("".concat(C,"-line"),U),viewBox:q,preserveAspectRatio:"none",style:ve},pe),i.a.createElement("path",{className:"".concat(C,"-line-trail"),d:Ce,strokeLinecap:le,stroke:Ee,strokeWidth:Se||he,fillOpacity:"0"}),me.map(function(O,W){var we={strokeDasharray:"".concat(O,"px, 100px"),strokeDashoffset:"-".concat(H,"px"),transition:ae||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},be=ee[W]||ee[ee.length-1];return H+=O,i.a.createElement("path",{key:W,className:"".concat(C,"-line-path"),d:Ce,strokeLinecap:le,stroke:be,strokeWidth:he,fillOpacity:"0",ref:ue[W],style:we})}))};E.defaultProps=y;var k=E;function T(){return T=Object.assign||function(J){for(var j=1;j<arguments.length;j++){var U=arguments[j];for(var R in U)Object.prototype.hasOwnProperty.call(U,R)&&(J[R]=U[R])}return J},T.apply(this,arguments)}function D(J,j){return Y(J)||x(J,j)||B(J,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,j){if(!J)return;if(typeof J=="string")return N(J,j);var U=Object.prototype.toString.call(J).slice(8,-1);if(U==="Object"&&J.constructor&&(U=J.constructor.name),U==="Map"||U==="Set")return Array.from(J);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return N(J,j)}function N(J,j){(j==null||j>J.length)&&(j=J.length);for(var U=0,R=new Array(j);U<j;U++)R[U]=J[U];return R}function x(J,j){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(J)))return;var U=[],R=!0,C=!1,M=void 0;try{for(var le=J[Symbol.iterator](),he;!(R=(he=le.next()).done)&&!(U.push(he.value),j&&U.length===j);R=!0);}catch(ve){C=!0,M=ve}finally{try{!R&&le.return!=null&&le.return()}finally{if(C)throw M}}return U}function Y(J){if(Array.isArray(J))return J}function V(J,j){if(J==null)return{};var U=P(J,j),R,C;if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(J);for(C=0;C<M.length;C++){if(R=M[C],j.indexOf(R)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(J,R))continue;U[R]=J[R]}}return U}function P(J,j){if(J==null)return{};var U={},R=Object.keys(J),C,M;for(M=0;M<R.length;M++){if(C=R[M],j.indexOf(C)>=0)continue;U[C]=J[C]}return U}var F=0;function X(J){return+J.replace("%","")}function Q(J){return Array.isArray(J)?J:[J]}function ce(J,j,U,R){var C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,M=arguments.length>5?arguments[5]:void 0,le=50-R/2,he=0,ve=-le,Ee=0,Se=-2*le;switch(M){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+J/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,M=j.gapDegree,le=j.gapPosition,he=j.trailColor,ve=j.strokeLinecap,Ee=j.style,Se=j.className,ae=j.strokeColor,pe=j.percent,me=V(j,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ee=Object(h.useMemo)(function(){return F+=1,F},[]),ne=ce(0,100,he,R,M,le),Z=ne.pathString,ue=ne.pathStyle,K=Q(pe),$=Q(ae),Ce=$.find(function(we){return Object.prototype.toString.call(we)==="[object Object]"}),q=p(K),H=D(q,1),O=H[0],W=function(){var be=0;return K.map(function(Oe,Be){var Fe=$[Be]||$[$.length-1],Ue=Object.prototype.toString.call(Fe)==="[object Object]"?"url(#".concat(U,"-gradient-").concat(ee,")"):"",Ge=ce(be,Oe,Fe,R,M,le);return be+=Oe,i.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:O[Be]})})};return i.a.createElement("svg",T({className:_()("".concat(U,"-circle"),Se),viewBox:"0 0 100 100",style:Ee},me),Ce&&i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"".concat(U,"-gradient-").concat(ee),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ce).sort(function(we,be){return X(we)-X(be)}).map(function(we,be){return i.a.createElement("stop",{key:be,offset:we,stopColor:Ce[we]})}))),i.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=y;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,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.Iso97971={pad:function(i,S){i.concat(h.lib.WordArray.create([2147483648],1)),h.pad.ZeroPadding.pad(i,S)},unpad:function(i){h.pad.ZeroPadding.unpad(i),i.sigBytes--}},h.pad.Iso97971})},je13:function(u,G,c){var h=c("5nXd"),i=c("gRFJ"),S=[c("uQRt")];u.exports=h.createStore(i,S)},kSUc:function(u,G,c){},lOMy:function(u,G,c){},lPiR:function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(i){var S=h,_=S.lib,y=_.WordArray,p=_.Hasher,d=S.algo,o=[],s=[];(function(){function g(E){for(var k=i.sqrt(E),T=2;T<=k;T++)if(!(E%T))return!1;return!0}function m(E){return(E-(E|0))*4294967296|0}for(var v=2,w=0;w<64;)g(v)&&(w<8&&(o[w]=m(i.pow(v,1/2))),s[w]=m(i.pow(v,1/3)),w++),v++})();var l=[],a=d.SHA256=p.extend({_doReset:function(){this._hash=new y.init(o.slice(0))},_doProcessBlock:function(g,m){for(var v=this._hash.words,w=v[0],E=v[1],k=v[2],T=v[3],D=v[4],I=v[5],B=v[6],N=v[7],x=0;x<64;x++){if(x<16)l[x]=g[m+x]|0;else{var Y=l[x-15],V=(Y<<25|Y>>>7)^(Y<<14|Y>>>18)^Y>>>3,P=l[x-2],F=(P<<15|P>>>17)^(P<<13|P>>>19)^P>>>10;l[x]=V+l[x-7]+F+l[x-16]}var X=D&I^~D&B,Q=w&E^w&k^E&k,ce=(w<<30|w>>>2)^(w<<19|w>>>13)^(w<<10|w>>>22),fe=(D<<26|D>>>6)^(D<<21|D>>>11)^(D<<7|D>>>25),z=N+fe+X+s[x]+l[x],se=ce+Q;N=B,B=I,I=D,D=T+z|0,T=k,k=E,E=w,w=z+se|0}v[0]=v[0]+w|0,v[1]=v[1]+E|0,v[2]=v[2]+k|0,v[3]=v[3]+T|0,v[4]=v[4]+D|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]=i.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(a),S.HmacSHA256=p._createHmacHelper(a)}(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(i,S){var _=h.getMode(i,"text/html"),y=_.name=="null";function p(R){if(h.findModeByName){var C=h.findModeByName(R);C&&(R=C.mime||C.mimes[0])}var M=h.getMode(i,R);return M.name=="null"?null:M}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 o in d)d.hasOwnProperty(o)&&S.tokenTypeOverrides[o]&&(d[o]=S.tokenTypeOverrides[o]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,a=/^\[(x| )\](?=\s)/i,g=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,m=/^ {0,3}(?:\={1,}|-{2,})\s*$/,v=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\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]/,T=" ";function D(R,C,M){return C.f=C.inline=M,M(R,C)}function I(R,C,M){return C.f=C.block=M,M(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=y;if(!C){var M=h.innerMode(_,R.htmlState);C=M.mode.name=="xml"&&M.state.tagStart===null&&!M.state.context&&M.state.tokenize.isInText}C&&(R.f=X,R.block=x,R.htmlState=null)}return R.trailingSpace=0,R.trailingSpaceNewLine=!1,R.prevLine=R.thisLine,R.thisLine={stream:null},null}function x(R,C){var M=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(M&&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=M?1:C.quote+1,S.highlightFormatting&&(C.formatting="quote"),R.eatSpace(),P(C);if(!me&&!C.setext&&M&&C.indentation<=Se&&(ee=R.match(l))){var ne=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(a,!1)&&(C.taskList=!0),C.f=C.inline,S.highlightFormatting&&(C.formatting=["list","list-"+ne]),P(C)}else{if(M&&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=V,S.highlightFormatting&&(C.formatting="code-block"),C.code=-1,P(C);if(C.setext||(!pe||!Ee)&&!C.quote&&C.list===!1&&!C.code&&!me&&!E.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 D(R,C,se)}return D(R,C,C.inline)}function Y(R,C){var M=_.token(R,C.htmlState);if(!y){var le=h.innerMode(_,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=X,C.block=x,C.htmlState=null)}return M}function V(R,C){var M=C.listStack[C.listStack.length-1]||0,le=C.indentation<M,he=M+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=x,C.f=X,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 M=0;M<R.formatting.length;M++)C.push(d.formatting+"-"+R.formatting[M]),R.formatting[M]==="header"&&C.push(d.formatting+"-"+R.formatting[M]+"-"+R.header),R.formatting[M]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=R.quote?C.push(d.formatting+"-"+R.formatting[M]+"-"+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 X(R,C){var M=C.text(R,C);if(typeof M!="undefined")return M;if(C.list)return C.list=null,P(C);if(C.taskList){var le=R.match(a,!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:X,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 ne=R.string.indexOf(">",R.pos);if(ne!=-1){var Z=R.string.substring(R.start,ne);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Z)&&(C.md_inside=!0)}return R.backUp(1),C.htmlState=h.startState(_),I(R,C,Y)}if(S.xml&&he==="<"&&R.match(/^\/\w*?>/))return C.md_inside=!1,"tag";if(he==="*"||he==="_"){for(var ue=1,K=R.pos==1?" ":R.string.charAt(R.pos-2);ue<3&&R.eat(he);)ue++;var $=R.peek()||" ",Ce=!/\s/.test($)&&(!k.test($)||/\s/.test(K)||k.test(K)),q=!/\s/.test(K)&&(!k.test(K)||/\s/.test($)||k.test($)),H=null,O=null;if(ue%2&&(!C.em&&Ce&&(he==="*"||!q||k.test(K))?H=!0:C.em==he&&q&&(he==="*"||!Ce||k.test($))&&(H=!1)),ue>1&&(!C.strong&&Ce&&(he==="*"||!q||k.test(K))?O=!0:C.strong==he&&q&&(he==="*"||!Ce||k.test($))&&(O=!1)),O!=null||H!=null){S.highlightFormatting&&(C.formatting=H==null?"strong":O==null?"em":"strong em"),H===!0&&(C.em=he),O===!0&&(C.strong=he);var pe=P(C);return H===!1&&(C.em=!1),O===!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 M=R.next();if(M===">"){C.f=C.inline=X,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 M=R.next();return M==="("||M==="["?(C.f=C.inline=z(M==="("?")":"]"),S.highlightFormatting&&(C.formatting="link-string"),C.linkHref=!0,P(C)):"error"}var fe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function z(R){return function(C,M){var le=C.next();if(le===R){M.f=M.inline=X,S.highlightFormatting&&(M.formatting="link-string");var he=P(M);return M.linkHref=!1,he}return C.match(fe[R]),M.linkHref=!0,P(M)}}function se(R,C){return R.match(/^([^\]\\]|\\.)*\]:/,!1)?(C.f=J,R.next(),S.highlightFormatting&&(C.formatting="link"),C.linkText=!0,P(C)):D(R,C,X)}function J(R,C){if(R.match(/^\]:/,!0)){C.f=C.inline=j,S.highlightFormatting&&(C.formatting="link");var M=P(C);return C.linkText=!1,M}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=X,d.linkHref+" url")}var U={startState:function(){return{f:x,prevLine:{stream:null},thisLine:{stream:null},block:x,htmlState:null,indentation:0,inline:X,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(_,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 M=R.match(/^\s*/,!0)[0].replace(/\t/g,T).length;if(C.indentation=M,C.indentationDiff=null,M>0)return null}}return C.f(R,C)},innerMode:function(R){return R.block==Y?{state:R.htmlState,mode:_}:R.localState?{state:R.localState,mode:R.localMode}:{state:R,mode:U}},indent:function(R,C,M){return R.block==Y&&_.indent?_.indent(R.htmlState,C,M):R.localState&&R.localMode.indent?R.localMode.indent(R.localState,C,M):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 i(y,p){if(!c[y]){if(!G[y]){var d=typeof require=="function"&&require;if(!p&&d)return require(y,!0);if(S)return S(y,!0);var o=new Error("Cannot find module '"+y+"'");throw o.code="MODULE_NOT_FOUND",o}var s=c[y]={exports:{}};G[y][0].call(s.exports,function(l){var a=G[y][1][l];return i(a||l)},s,s.exports,u,G,c,h)}return c[y].exports}for(var S=typeof require=="function"&&require,_=0;_<h.length;_++)i(h[_]);return i}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,i){"use strict";var S=u("babel-runtime/core-js/promise"),_=s(S),y=u("babel-runtime/regenerator"),p=s(y),d=u("babel-runtime/core-js/object/assign"),o=s(d);function s(se){return se&&se.__esModule?se:{default:se}}var l=u("debug")("ali-oss"),a=u("copy-to"),g=u("xml2js"),m=u("agentkeepalive"),v=u("merge-descriptors"),w=u("url"),E=u("is-type-of"),k=u("platform"),T=u("utility"),D=u("urllib"),I=u("./version"),B=u("bowser"),N=u("../common/signUtils"),x=u("../common/utils/isIP"),Y=x.isIP,V=u("../common/client/initOptions"),P=u("../common/utils/createRequest"),F=P.createRequest,X=new m;function Q(){var se=k.name,J=k.version;se&&se.toLowerCase&&se.toLowerCase()==="ie"&&J.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function ce(){return location&&location.protocol==="https:"}function fe(se,J){if(Q(),!(this instanceof fe))return new fe(se,J);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=D,this.agent=this.options.agent||X),this.ctx=J,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}G.exports=fe,fe.initOptions=function(J){J.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var j=(0,o.default)({secure:ce(),useFetch:!1},J);return V(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(J){return this.debug("authorization stringToSign: %s",J,"info"),N.computeSignature(this.options.accessKeySecret,J)},z.authorization=function(J,j,U,R){var C=N.buildCanonicalString(J.toUpperCase(),j,{headers:R,parameters:U});return N.authorization(this.options.accessKeyId,this.options.accessKeySecret,C)},z.request=function(J){var j,U,R,C,M,le;return p.default.async(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return j=F.call(this,J),this.options.useFetch||(j.params.mode="disable-fetch"),U=void 0,R=void 0,C=!!J.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",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(M=void 0,!(U&&J.successStatuses&&J.successStatuses.indexOf(U.status)===-1)){ve.next=28;break}return ve.next=19,p.default.awrap(this.requestError(U));case 19:if(M=ve.sent,!(M.code==="RequestTimeTooSkewed"&&!C)){ve.next=25;break}return this.options.amendTimeSkewed=+new Date(M.serverTime)-new Date,ve.next=24,p.default.awrap(this.request(J));case 24:return ve.abrupt("return",ve.sent);case 25:M.params=J,ve.next=32;break;case 28:if(!R){ve.next=32;break}return ve.next=31,p.default.awrap(this.requestError(R));case 31:M=ve.sent;case 32:if(!M){ve.next=34;break}throw M;case 34:if(!J.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(J){var j="/";return J.bucket&&(j+=J.bucket+"/"),J.object&&(j+=J.object),j},z._isIP=Y,z._escape=function(J){return T.encodeURIComponent(J).replace(/%2F/g,"/")},z._getReqUrl=function(J){var j={};a(this.options.endpoint).to(j);var U=this._isIP(j.hostname),R=this.options.cname;J.bucket&&!R&&!U&&(j.host=J.bucket+"."+j.host);var C="/";J.bucket&&U&&(C+=J.bucket+"/"),J.object&&(C+=this._escape(J.object).replace(/\+/g,"%2B")),j.pathname=C;var M={};if(J.query&&v(M,J.query),J.subres){var le={};E.string(J.subres)?le[J.subres]="":E.array(J.subres)?J.subres.forEach(function(he){le[he]=""}):le=J.subres,v(M,le)}return j.query=M,w.format(j)},z._getUserAgent=function(){var J=i&&i.browser?"js":"nodejs",j="aliyun-sdk-"+J+"/"+I.version,U=k.description;return!U&&i&&(U="Node.js "+i.version.slice(1)+" on "+i.platform+" "+i.arch),this._checkUserAgent(j+" "+U)},z._checkUserAgent=function(J){var j=J.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return j},z.checkBrowserAndVersion=function(J,j){return B.name===J&&B.version.split(".")[0]===j},z.parseXML=function(J){return new _.default(function(j,U){h.isBuffer(J)&&(J=J.toString()),g.parseString(J,{explicitRoot:!1,explicitArray:!1},function(R,C){R?U(R):j(C)})})},z.requestError=function(J){var j,U,R,C;return p.default.async(function(le){for(;;)switch(le.prev=le.next){case 0:if(j=null,!(!J.data||!J.data.length)){le.next=5;break}J.status===-1||J.status===-2?(j=new Error(J.message),j.name=J.name,j.status=J.status,j.code=J.name):(J.status===404?(j=new Error("Object not exists"),j.name="NoSuchKeyError",j.status=404,j.code="NoSuchKey"):J.status===412?(j=new Error("Pre condition failed"),j.name="PreconditionFailedError",j.status=412,j.code="PreconditionFailed"):(j=new Error("Unknow error, status: "+J.status),j.name="UnknowError",j.status=J.status),j.requestId=J.headers["x-oss-request-id"],j.host=""),le.next=33;break;case 5:return U=String(J.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=J.status,le.t1.requestId=J.headers["x-oss-request-id"],le.abrupt("return",le.t1);case 24:C=R.Message||"unknow request error, status: "+J.status,R.Condition&&(C+=" (condition: "+R.Condition+")"),j=new Error(C),j.name=R.Code?R.Code+"Error":"UnknowError",j.status=J.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 i=u("babel-runtime/core-js/array/from"),S=o(i),_=u("babel-runtime/core-js/promise"),y=o(_),p=u("babel-runtime/regenerator"),d=o(p);function o(N){return N&&N.__esModule?N:{default:N}}var s=u("is-type-of"),l=u("util"),a=u("path"),g=u("mime"),m=u("copy-to"),v=u("../common/utils/isBlob"),w=v.isBlob,E=u("../common/utils/isFile"),k=E.isFile,T=c;T.multipartUpload=function(x,Y,V){var P,F,X,Q,ce,fe,z,se,J;return d.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(this.resetCancelFlag(),V=V||{},!(V.checkpoint&&V.checkpoint.uploadId)){U.next=6;break}return U.next=5,d.default.awrap(this._resumeMultipart(V.checkpoint,V));case 5:return U.abrupt("return",U.sent);case 6:return P=100*1024,V.mime||(k(Y)?V.mime=g.getType(a.extname(Y.name)):w(Y)?V.mime=Y.type:V.mime=g.getType(a.extname(Y))),V.headers=V.headers||{},this._convertMetaToHeaders(V.meta,V.headers),U.next=12,d.default.awrap(this._getFileSize(Y));case 12:if(F=U.sent,!(F<P)){U.next=25;break}return X=this._createStream(Y,0,F),V.contentLength=F,U.next=18,d.default.awrap(this.putStream(x,X,V));case 18:if(Q=U.sent,!(V&&V.progress)){U.next=22;break}return U.next=22,d.default.awrap(V.progress(1));case 22:return ce={res:Q.res,bucket:this.options.bucket,name:x,etag:Q.res.headers.etag},(V.headers&&V.headers["x-oss-callback"]||V.callback)&&(ce.data=Q.data),U.abrupt("return",ce);case 25:if(!(V.partSize&&!(parseInt(V.partSize,10)===V.partSize))){U.next=27;break}throw new Error("partSize must be int number");case 27:if(!(V.partSize&&V.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(x,V));case 31:if(fe=U.sent,z=fe.uploadId,se=this._getPartSize(F,V.partSize),J={file:Y,name:x,fileSize:F,partSize:se,uploadId:z,doneParts:[]},!(V&&V.progress)){U.next=38;break}return U.next=38,d.default.awrap(V.progress(0,J,fe.res));case 38:return U.next=40,d.default.awrap(this._resumeMultipart(J,V));case 40:return U.abrupt("return",U.sent);case 41:case"end":return U.stop()}},null,this)},T._resumeMultipart=function(x,Y){var V,P,F,X,Q,ce,fe,z,se,J,j,U,R,C,M,le,he,ve;return d.default.async(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(V=this,!this.isCancel()){Se.next=3;break}throw this._makeCancelEvent();case 3:return P=x.file,F=x.fileSize,X=x.partSize,Q=x.uploadId,ce=x.doneParts,fe=x.name,z=[],ce.length>0&&m(ce).to(z),se=this._divideParts(F,X),J=se.length,j=!1,U=function(pe,me){var ee=this;return new y.default(function(Z,ue){var K,$,Ce,q;return d.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(O.prev=0,pe.isCancel()){O.next=18;break}return K=se[me-1],$={stream:pe._createStream(P,K.start,K.end),size:K.end-K.start},O.next=6,d.default.awrap(pe._uploadPart(fe,Q,me,$));case 6:if(Ce=O.sent,!(!pe.isCancel()&&!j)){O.next=15;break}if(x.doneParts.push({number:me,etag:Ce.res.headers.etag}),!Y.progress){O.next=12;break}return O.next=12,d.default.awrap(Y.progress(ce.length/J,x,Ce.res));case 12:Z({number:me,etag:Ce.res.headers.etag}),O.next=16;break;case 15:Z();case 16:O.next=19;break;case 18:Z();case 19:O.next=30;break;case 21:O.prev=21,O.t0=O.catch(0),q=new Error,q.name=O.t0.name,q.message=O.t0.message,q.stack=O.t0.stack,q.partNum=me,m(O.t0).to(q),ue(q);case 30:case"end":return O.stop()}},null,ee,[[0,21]])})},R=(0,S.default)(new Array(J),function(ae,pe){return pe+1}),C=z.map(function(ae){return ae.number}),M=R.filter(function(ae){return C.indexOf(ae)<0}),le=5,he=Y.parallel||le,Se.next=17,d.default.awrap(this._parallel(M,he,function(ae){return new y.default(function(pe,me){U(V,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)},T._getFileSize=function(x){return d.default.async(function(V){for(;;)switch(V.prev=V.next){case 0:if(!s.buffer(x)){V.next=4;break}return V.abrupt("return",x.length);case 4:if(!(w(x)||k(x))){V.next=6;break}return V.abrupt("return",x.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return V.stop()}},null,this)};var D=u("stream"),I=D.Readable;function B(N,x){if(!(this instanceof B))return new B(N,x);I.call(this,x),this.file=N,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(B,I),B.prototype.readFileAndPush=function(x){if(this.fileBuffer)for(var Y=!0;Y&&this.fileBuffer&&this.start<this.fileBuffer.length;){var V=this.start,P=V+x;P=P>this.fileBuffer.length?this.fileBuffer.length:P,this.start=P,Y=this.push(this.fileBuffer.slice(V,P))}},B.prototype._read=function(x){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;x=x||Y;var V=this;this.reader.onload=function(F){V.fileBuffer=h.from(new Uint8Array(F.target.result)),V.file=null,V.readFileAndPush(x)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(x)},T._createStream=function(x,Y,V){if(w(x)||k(x))return new B(x.slice(Y,V));throw new Error("_createStream requires File/Blob.")},T._getPartSize=function(x,Y){var V=10*1e3,P=1024*1024;return Y?Math.max(Math.ceil(x/V),Y):P},T._divideParts=function(x,Y){for(var V=Math.ceil(x/Y),P=[],F=0;F<V;F++){var X=Y*F,Q=Math.min(X+Y,x);P.push({start:X,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"),i=s(h),S=u("babel-runtime/core-js/object/keys"),_=s(S),y=u("babel-runtime/core-js/object/assign"),p=s(y),d=u("babel-runtime/regenerator"),o=s(d);function s(V){return V&&V.__esModule?V:{default:V}}var l=u("utility"),a=u("fs"),g=u("is-type-of"),m=u("url"),v=u("copy-to"),w=u("path"),E=u("mime"),k=u("../common/callback"),T=u("../common/signUtils"),D=u("merge-descriptors"),I=u("../common/utils/isBlob"),B=I.isBlob,N=u("../common/utils/isFile"),x=N.isFile,Y=c;Y.append=function(P,F,X){var Q;return o.default.async(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return X=X||{},X.position===void 0&&(X.position="0"),X.subres={append:"",position:X.position},X.method="POST",fe.next=6,o.default.awrap(this.put(P,F,X));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,X){var Q,ce,fe,z,se,J,j;return o.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(Q=void 0,X=X||{},P=this._objectName(P),!g.buffer(F)){R.next=7;break}Q=F,R.next=33;break;case 7:if(!(B(F)||x(F))){R.next=32;break}return X.mime||(x(F)?X.mime=E.getType(w.extname(F.name)):X.mime=F.type),ce=this._createStream(F,0,F.size),R.next=12,o.default.awrap(this._getFileSize(F));case 12:return X.contentLength=R.sent,R.prev=13,R.next=16,o.default.awrap(this.putStream(P,ce,X));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,o.default.awrap(this.put(P,F,X));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 X.headers=X.headers||{},this._convertMetaToHeaders(X.meta,X.headers),z=X.method||"PUT",se=this._objectRequestParams(z,P,X),k.encodeCallback(se,X),se.mime=X.mime,se.content=Q,se.successStatuses=[200],R.next=43,o.default.awrap(this.request(se));case 43:return J=R.sent,j={name:P,url:this._objectUrl(P),res:J.res},se.headers&&se.headers["x-oss-callback"]&&(j.data=JSON.parse(J.data.toString())),R.abrupt("return",j);case 47:case"end":return R.stop()}},null,this,[[13,20]])},Y.putStream=function(P,F,X){var Q,ce,fe,z;return o.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:return X=X||{},X.headers=X.headers||{},P=this._objectName(P),X.contentLength?X.headers["Content-Length"]=X.contentLength:X.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(X.meta,X.headers),Q=X.method||"PUT",ce=this._objectRequestParams(Q,P,X),k.encodeCallback(ce,X),ce.mime=X.mime,ce.stream=F,ce.successStatuses=[200],J.next=13,o.default.awrap(this.request(ce));case 13:return fe=J.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())),J.abrupt("return",z);case 17:case"end":return J.stop()}},null,this)},D(Y,u("../common/object/copyObject")),D(Y,u("../common/object/getObjectTagging")),D(Y,u("../common/object/putObjectTagging")),D(Y,u("../common/object/deleteObjectTagging")),D(Y,u("../common/image")),D(Y,u("../common/object/getBucketVersions")),D(Y,u("../common/object/getACL")),D(Y,u("../common/object/putACL")),D(Y,u("../common/object/head")),D(Y,u("../common/object/delete")),D(Y,u("../common/object/get")),D(Y,u("../common/object/putSymlink")),D(Y,u("../common/object/getSymlink")),D(Y,u("../common/object/deleteMulti")),D(Y,u("../common/object/getObjectMeta")),Y.putMeta=function(P,F,X){var Q;return o.default.async(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.next=2,o.default.awrap(this.copy(P,P,{meta:F||{},timeout:X&&X.timeout,ctx:X&&X.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 X,Q,ce,fe,z;return o.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:return X=this._objectRequestParams("GET","",F),X.query=P,X.xmlResponse=!0,X.successStatuses=[200],J.next=6,o.default.awrap(this.request(X));case 6:return Q=J.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})),J.abrupt("return",{res:Q.res,objects:ce,prefixes:z,nextMarker:Q.data.NextMarker||null,isTruncated:Q.data.IsTruncated==="true"});case 13:case"end":return J.stop()}},null,this)},Y.restore=function(P,F){var X,Q;return o.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),X=this._objectRequestParams("POST",P,F),X.successStatuses=[202],fe.next=7,o.default.awrap(this.request(X));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 X=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=T._signatureForURL(this.options.accessKeySecret,F,ce,X),z=m.parse(this._getReqUrl(Q));return z.query={OSSAccessKeyId:this.options.accessKeyId,Expires:X,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(V,P){if(P)P[P.length-1]!=="/"&&(P+="/");else{P=this.options.endpoint.format();var F=m.parse(P),X=this.options.bucket;F.hostname=X+"."+F.hostname,F.host=X+"."+F.host,P=F.format()}return P+this._escape(this._objectName(V))},Y._objectRequestParams=function(P,F,X){if(!this.options.bucket)throw new Error("Please create a bucket first");X=X||{},F=this._objectName(F);var Q={object:F,bucket:this.options.bucket,method:P,subres:X&&X.subres,timeout:X&&X.timeout,ctx:X&&X.ctx};return X.headers&&(Q.headers={},v(X.headers).to(Q.headers)),Q},Y._objectName=function(P){return P.replace(/^\/+/,"")},Y._convertMetaToHeaders=function(P,F){if(!P)return;(0,_.default)(P).forEach(function(X){F["x-oss-meta-"+X]=P[X]})},Y._deleteFileSafe=function(P){var F=this;return new i.default(function(X){a.exists(P,function(Q){Q?a.unlink(P,function(ce){ce&&F.debug("unlink %j error: %s",P,ce,"error"),X()}):X()})})}},{"../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"),i=S(h);function S(d){return d&&d.__esModule?d:{default:d}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=c;p.deleteBucketLifecycle=function(o,s){var l,a;return i.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return y(o),l=this._bucketRequestParams("DELETE",o,"lifecycle",s),l.successStatuses=[204],m.next=5,i.default.awrap(this.request(l));case 5:return a=m.sent,m.abrupt("return",{res:a.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"),i=S(h);function S(d){return d&&d.__esModule?d:{default:d}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=c;p.deleteBucketWebsite=function(o,s){var l,a;return i.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return y(o),l=this._bucketRequestParams("DELETE",o,"website",s),l.successStatuses=[204],m.next=5,i.default.awrap(this.request(l));case 5:return a=m.sent,m.abrupt("return",{res:a.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"),i=S(h);function S(a){return a&&a.__esModule?a:{default:a}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=u("../utils/isArray"),d=p.isArray,o=u("../utils/formatObjKey"),s=o.formatObjKey,l=c;l.getBucketLifecycle=function(g,m){var v,w,E;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return y(g),v=this._bucketRequestParams("GET",g,"lifecycle",m),v.successStatuses=[200],v.xmlResponse=!0,T.next=6,i.default.awrap(this.request(v));case 6:return w=T.sent,E=w.data.Rule||null,E&&(d(E)||(E=[E]),E=E.map(function(D){return D.ID&&(D.id=D.ID,delete D.ID),D.Tag&&!d(D.Tag)&&(D.Tag=[D.Tag]),s(D,"firstLowerCase")})),T.abrupt("return",{rules:E,res:w.res});case 10:case"end":return T.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"),i=S(h);function S(d){return d&&d.__esModule?d:{default:d}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=c;p.getBucketVersioning=function(o,s){var l,a,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return y(o),l=this._bucketRequestParams("GET",o,"versioning",s),l.xmlResponse=!0,l.successStatuses=[200],v.next=6,i.default.awrap(this.request(l));case 6:return a=v.sent,g=a.data.Status,v.abrupt("return",{status:a.status,versionStatus:g,res:a.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"),i=S(h);function S(s){return s&&s.__esModule?s:{default:s}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=u("../utils/isObject"),d=p.isObject,o=c;o.getBucketWebsite=function(l,a){var g,m,v;return i.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return y(l),g=this._bucketRequestParams("GET",l,"website",a),g.successStatuses=[200],g.xmlResponse=!0,E.next=6,i.default.awrap(this.request(g));case 6:return m=E.sent,v=[],m.data.RoutingRules&&m.data.RoutingRules.RoutingRule&&(d(m.data.RoutingRules.RoutingRule)?v=[m.data.RoutingRules.RoutingRule]:v=m.data.RoutingRules.RoutingRule),E.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 E.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"),i=S(h);function S(x){return x&&x.__esModule?x:{default:x}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=u("../utils/isArray"),d=p.isArray,o=u("../utils/deepCopy"),s=o.deepCopy,l=u("../utils/isObject"),a=l.isObject,g=u("../utils/obj2xml"),m=g.obj2xml,v=u("../utils/checkObjectTag"),w=v.checkObjectTag,E=u("../utils/getStrBytesCount"),k=E.getStrBytesCount,T=c;T.putBucketLifecycle=function(Y,V,P){var F,X,Q,ce,fe;return i.default.async(function(se){for(;;)switch(se.prev=se.next){case 0:if(y(Y),d(V)){se.next=3;break}throw new Error("rules must be Array");case 3:return F=this._bucketRequestParams("PUT",Y,"lifecycle",P),X=[],Q={LifecycleConfiguration:{Rule:X}},V.forEach(function(J){D(J),N(J),J.id&&(J.ID=J.id,delete J.id),X.push(J)}),ce=m(Q,{headers:!0,firstUpperCase:!0}),F.content=ce,F.mime="xml",F.successStatuses=[200],se.next=13,i.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 D(x){x.days&&(x.expiration={days:x.days}),x.date&&(x.expiration={createdBeforeDate:x.date})}function I(x,Y){var V=x.days,P=x.createdBeforeDate;if(!V&&!P)throw new Error(Y+" must includes days or createdBeforeDate");if(V&&!/^[1-9][0-9]*$/.test(V))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(x){if(!d(x)&&!a(x))throw new Error("tag must be Object or Array");x=a(x)?[x]:x;var Y={},V=s(x);V.forEach(function(P){Y[P.key]=P.value}),w(Y)}function N(x){if(x.id&&k(x.id)>255)throw new Error("ID is composed of 255 bytes at most");if(x.prefix===""||x.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(x.status))throw new Error("Status must be Enabled or Disabled");if(x.transition){if(!["IA","Archive"].includes(x.transition.storageClass))throw new Error("StorageClass must be IA or Archive");I(x.transition,"Transition")}if(x.expiration){if(!x.expiration.expiredObjectDeleteMarker)I(x.expiration,"Expiration");else if(x.expiration.days||x.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(x.abortMultipartUpload&&I(x.abortMultipartUpload,"AbortMultipartUpload"),!x.expiration&&!x.abortMultipartUpload&&!x.transition&&!x.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(x.tag){if(x.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");B(x.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"),i=S(h);function S(s){return s&&s.__esModule?s:{default:s}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=u("../utils/obj2xml"),d=p.obj2xml,o=c;o.putBucketVersioning=function(l,a){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,v,w;return i.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:if(y(l),["Enabled","Suspended"].includes(a)){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:a}},m.mime="xml",m.content=d(v,{headers:!0}),k.next=9,i.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"),i=S(h);function S(a){return a&&a.__esModule?a:{default:a}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=u("../utils/obj2xml"),d=p.obj2xml,o=u("../utils/isArray"),s=o.isArray,l=c;l.putBucketWebsite=function(g){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments[2],w,E,k,T,D;return i.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(y(g),w=this._bucketRequestParams("PUT",g,"website",v),E={Suffix:m.index||"index.html"},k={IndexDocument:E},T={WebsiteConfiguration:k},m.supportSubDir&&(E.SupportSubDir=m.supportSubDir),m.type&&(E.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 T=d(T),w.content=T,w.mime="xml",w.successStatuses=[200],B.next=18,i.default.awrap(this.request(w));case 18:return D=B.sent,B.abrupt("return",{res:D.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 i=u("babel-runtime/core-js/object/keys"),S=p(i),_=u("babel-runtime/core-js/json/stringify"),y=p(_);function p(d){return d&&d.__esModule?d:{default:d}}c.encodeCallback=function(o,s){if(o.headers=o.headers||{},!Object.prototype.hasOwnProperty.call(o.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 a=h.from((0,y.default)(l)).toString("base64");if(o.headers["x-oss-callback"]=a,s.callback.customValue){var g={};(0,S.default)(s.callback.customValue).forEach(function(m){g["x:"+m]=s.callback.customValue[m]}),o.headers["x-oss-callback-var"]=h.from((0,y.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"),i=S(h);function S(l){return l&&l.__esModule?l:{default:l}}var _=u("humanize-ms"),y=u("url"),p=u("../utils/checkBucketName"),d=p.checkBucketName;function o(l,a){var g=y.parse(l);if(g.protocol||(g=y.parse("http"+(a?"s":"")+"://"+l)),g.protocol!=="http:"&&g.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return g}function s(l,a,g){var m=g?"https://":"http://",v=a?"-internal.aliyuncs.com":".aliyuncs.com",w="vpc100-oss-cn-";return l.substr(0,w.length)===w&&(v=".aliyuncs.com"),y.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 a=(0,i.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},l);if(a.accessKeyId=a.accessKeyId.trim(),a.accessKeySecret=a.accessKeySecret.trim(),a.timeout&&(a.timeout=_(a.timeout)),a.endpoint)a.endpoint=o(a.endpoint,a.secure);else if(a.region)a.endpoint=s(a.region,a.internal,a.secure);else throw new Error("require options.endpoint or options.region");return a.inited=!0,a}},{"../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"),i=c;h(i,u("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(u,G,c){"use strict";var h=u("babel-runtime/regenerator"),i=S(h);function S(a){return a&&a.__esModule?a:{default:a}}var _=u("../utils/checkBucketName"),y=_.checkBucketName,p=u("querystring"),d=u("js-base64"),o=d.Base64.encode,s=c;s.processObjectSave=function(g,m,v,w){var E,k,T,D;return i.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&&y(w),E=this._objectRequestParams("POST",g,{subres:"x-oss-process"}),k=w?",b_"+o(w):"",m=o(m),T={"x-oss-process":v+"|sys/saveas,o_"+m+k},E.content=p.stringify(T),B.next=12,i.default.awrap(this.request(E));case 12:return D=B.sent,B.abrupt("return",{res:D.res,status:D.res.status});case 14:case"end":return B.stop()}},null,this)};function l(a,g){if(!a)throw new Error(g+" is required");if(typeof a!="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"),i=S(h);function S(s){return s&&s.__esModule?s:{default:s}}var _=u("copy-to"),y=u("./callback"),p=u("./utils/deepCopy"),d=p.deepCopy,o=c;o.listUploads=function(l,a){var g,m,v,w;return i.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return a=a||{},g={},_(a).to(g),g.subres="uploads",m=this._objectRequestParams("GET","",g),m.query=l,m.xmlResponse=!0,m.successStatuses=[200],k.next=10,i.default.awrap(this.request(m));case 10:return v=k.sent,w=v.data.Upload||[],Array.isArray(w)||(w=[w]),w=w.map(function(T){return{name:T.Key,uploadId:T.UploadId,initiated:T.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)},o.listParts=function(l,a,g,m){var v,w,E;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return m=m||{},v={},_(m).to(v),v.subres={uploadId:a},w=this._objectRequestParams("GET",l,v),w.query=g,w.xmlResponse=!0,w.successStatuses=[200],T.next=10,i.default.awrap(this.request(w));case 10:return E=T.sent,T.abrupt("return",{res:E.res,uploadId:E.data.UploadId,bucket:E.data.Bucket,name:E.data.Key,partNumberMarker:E.data.PartNumberMarker,nextPartNumberMarker:E.data.NextPartNumberMarker,maxParts:E.data.MaxParts,isTruncated:E.data.IsTruncated,parts:E.data.Part||[]});case 12:case"end":return T.stop()}},null,this)},o.abortMultipartUpload=function(l,a,g){var m,v,w;return i.default.async(function(k){for(;;)switch(k.prev=k.next){case 0:return this._stop(),g=g||{},m={},_(g).to(m),m.subres={uploadId:a},v=this._objectRequestParams("DELETE",l,m),v.successStatuses=[204],k.next=9,i.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)},o.initMultipartUpload=function(l,a){var g,m,v;return i.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return a=a||{},g={},_(a).to(g),g.headers=g.headers||{},this._convertMetaToHeaders(a.meta,g.headers),g.subres="uploads",m=this._objectRequestParams("POST",l,g),m.mime=a.mime,m.xmlResponse=!0,m.successStatuses=[200],E.next=12,i.default.awrap(this.request(m));case 12:return v=E.sent,E.abrupt("return",{res:v.res,bucket:v.data.Bucket,name:v.data.Key,uploadId:v.data.UploadId});case 14:case"end":return E.stop()}},null,this)},o.uploadPart=function(l,a,g,m,v,w,E){var k;return i.default.async(function(D){for(;;)switch(D.prev=D.next){case 0:return k={stream:this._createStream(m,v,w),size:w-v},D.next=3,i.default.awrap(this._uploadPart(l,a,g,k,E));case 3:return D.abrupt("return",D.sent);case 4:case"end":return D.stop()}},null,this)},o.completeMultipartUpload=function(l,a,g,m){var v,w,E,k,T,D,I,B;return i.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:for(v=g.concat().sort(function(Y,V){return Y.number-V.number}).filter(function(Y,V,P){return!V||Y.number!==P[V-1].number}),w=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,E=0;E<v.length;E++)k=v[E],w+=`<Part>
`,w+="<PartNumber>"+k.number+`</PartNumber>
`,w+="<ETag>"+k.etag+`</ETag>
`,w+=`</Part>
`;return w+="</CompleteMultipartUpload>",m=m||{},T={},T=d(m),T.headers&&delete T.headers["x-oss-server-side-encryption"],T.subres={uploadId:a},D=this._objectRequestParams("POST",l,T),y.encodeCallback(D,T),D.mime="xml",D.content=w,D.headers&&D.headers["x-oss-callback"]||(D.xmlResponse=!0),D.successStatuses=[200],x.next=17,i.default.awrap(this.request(D));case 17:return I=x.sent,B={res:I.res,bucket:D.bucket,name:l,etag:I.res.headers.etag},D.headers&&D.headers["x-oss-callback"]&&(B.data=JSON.parse(I.data.toString())),x.abrupt("return",B);case 21:case"end":return x.stop()}},null,this)},o._uploadPart=function(l,a,g,m,v){var w,E,k;return i.default.async(function(D){for(;;)switch(D.prev=D.next){case 0:return v=v||{},w={},_(v).to(w),w.headers={"Content-Length":m.size},w.subres={partNumber:g,uploadId:a},E=this._objectRequestParams("PUT",l,w),E.mime=w.mime,E.stream=m.stream,E.successStatuses=[200],D.next=11,i.default.awrap(this.request(E));case 11:if(k=D.sent,k.res.headers.etag){D.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,E.stream=null,D.abrupt("return",{name:l,etag:k.res.headers.etag,res:k.res});case 17:case"end":return D.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"),i=d(h),S=u("babel-runtime/core-js/object/keys"),_=d(S),y=u("babel-runtime/helpers/typeof"),p=d(y);function d(a){return a&&a.__esModule?a:{default:a}}var o=u("../utils/checkBucketName"),s=o.checkBucketName,l=c;l.copy=function(g,m,v,w){var E,k,T;return i.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,_.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,E=this._objectRequestParams("PUT",g,w),E.xmlResponse=!0,E.successStatuses=[200,304],I.next=14,i.default.awrap(this.request(E));case 14:return k=I.sent,T=k.data,T&&(T={etag:T.ETag,lastModified:T.LastModified}),I.abrupt("return",{data:T,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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.delete=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return i.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s.subres=(0,_.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("DELETE",o,s),l.successStatuses=[204],m.next=6,i.default.awrap(this.request(l));case 6:return a=m.sent,m.abrupt("return",{res:a.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(l){return l&&l.__esModule?l:{default:l}}var p=u("utility"),d=u("../utils/obj2xml"),o=d.obj2xml,s=c;s.deleteMulti=function(a){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,v,w,E,k,T,D,I,B,N,x,Y;return i.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:if(m=[],!(!a||!a.length)){P.next=3;break}throw new Error("names is required");case 3:for(v=0;v<a.length;v++)w={},typeof a[v]=="string"?w.Key=p.escape(this._objectName(a[v])):(E=a[v],k=E.key,T=E.versionId,w.Key=p.escape(this._objectName(k)),w.VersionId=T),m.push(w);return D={Delete:{Quiet:!!g.quiet,Object:m}},I=o(D,{headers:!0}),g.subres=(0,_.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,i.default.awrap(this.request(B));case 15:return N=P.sent,x=N.data,Y=x&&x.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.deleteObjectTagging=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return i.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s.subres=(0,_.default)({tagging:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),o=this._objectName(o),l=this._objectRequestParams("DELETE",o,s),l.successStatuses=[204],m.next=7,i.default.awrap(this.request(l));case 7:return a=m.sent,m.abrupt("return",{status:a.status,res:a.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(s){return s&&s.__esModule?s:{default:s}}var p=u("fs"),d=u("is-type-of"),o=c;o.get=function(l,a){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,v,w,E;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return m=null,v=!1,d.writableStream(a)?m=a:d.string(a)?(m=p.createWriteStream(a),v=!0):g=a,g=g||{},g.subres=(0,_.default)({},g.subres),g.versionId&&(g.subres.versionId=g.versionId),g.process&&(g.subres["x-oss-process"]=g.process),w=void 0,T.prev=8,E=this._objectRequestParams("GET",l,g),E.writeStream=m,E.successStatuses=[200,206,304],T.next=14,i.default.awrap(this.request(E));case 14:w=T.sent,v&&m.destroy(),T.next=25;break;case 18:if(T.prev=18,T.t0=T.catch(8),!v){T.next=24;break}return m.destroy(),T.next=24,i.default.awrap(this._deleteFileSafe(a));case 24:throw T.t0;case 25:return T.abrupt("return",{res:w.res,content:w.data});case 26:case"end":return T.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.getACL=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return i.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s.subres=(0,_.default)({acl:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),o=this._objectName(o),l=this._objectRequestParams("GET",o,s),l.successStatuses=[200],l.xmlResponse=!0,m.next=8,i.default.awrap(this.request(l));case 8:return a=m.sent,m.abrupt("return",{acl:a.data.AccessControlList.Grant,owner:{id:a.data.Owner.ID,displayName:a.data.Owner.DisplayName},res:a.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"),i=d(h),S=u("babel-runtime/regenerator"),_=d(S),y=u("babel-runtime/core-js/object/assign"),p=d(y);function d(E){return E&&E.__esModule?E:{default:E}}var o=c,s=u("../utils/isObject"),l=s.isObject,a=u("../utils/isArray"),g=a.isArray;o.getBucketVersions=m,o.listObjectVersions=m;function m(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},T,D,I,B,N,x;return _.default.async(function(V){for(;;)switch(V.prev=V.next){case 0:if(!(E.versionIdMarker&&E.keyMarker===void 0)){V.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),T=this._objectRequestParams("GET","",k),T.xmlResponse=!0,T.successStatuses=[200],T.query=w(E),V.next=10,_.default.awrap(this.request(T));case 10:return D=V.sent,I=D.data.Version||[],B=D.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}}})),x=D.data.CommonPrefixes||null,x&&(g(x)||(x=[x]),x=x.map(function(P){return P.Prefix})),V.abrupt("return",{res:D.res,objects:I,deleteMarker:B,prefixes:x,nextMarker:D.data.NextMarker||null,NextVersionIdMarker:D.data.NextVersionIdMarker||null,isTruncated:D.data.IsTruncated==="true"});case 19:case"end":return V.stop()}},null,this)}function v(E){return E.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k={};return l(E)&&(0,i.default)(E).forEach(function(T){k[v(T)]=E[T]}),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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.getObjectMeta=function(o,s){var l,a;return i.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return s=s||{},o=this._objectName(o),s.subres=(0,_.default)({objectMeta:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("HEAD",o,s),l.successStatuses=[200],m.next=8,i.default.awrap(this.request(l));case 8:return a=m.sent,m.abrupt("return",{status:a.status,res:a.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(s){return s&&s.__esModule?s:{default:s}}var p=c,d=u("../utils/isObject"),o=d.isObject;p.getObjectTagging=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,v,w,E;return i.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return a.subres=(0,_.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),l=this._objectName(l),g=this._objectRequestParams("GET",l,a),g.successStatuses=[200],T.next=7,i.default.awrap(this.request(g));case 7:return m=T.sent,T.next=10,i.default.awrap(this.parseXML(m.data));case 10:return v=T.sent,w=v.TagSet.Tag,w=w&&o(w)?[w]:w||[],E={},w.forEach(function(D){E[D.Key]=D.Value}),T.abrupt("return",{status:m.status,res:m.res,tag:E});case 16:case"end":return T.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.getSymlink=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return s.subres=(0,_.default)({symlink:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),o=this._objectName(o),l=this._objectRequestParams("GET",o,s),l.successStatuses=[200],v.next=7,i.default.awrap(this.request(l));case 7:return a=v.sent,g=a.res.headers["x-oss-symlink-target"],v.abrupt("return",{targetName:decodeURIComponent(g),res:a.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"),i=d(h),S=u("babel-runtime/core-js/object/keys"),_=d(S),y=u("babel-runtime/core-js/object/assign"),p=d(y);function d(s){return s&&s.__esModule?s:{default:s}}var o=c;o.head=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,v;return i.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return a.subres=(0,p.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),g=this._objectRequestParams("HEAD",l,a),g.successStatuses=[200,304],E.next=6,i.default.awrap(this.request(g));case 6:return m=E.sent,v={meta:null,res:m.res,status:m.status},m.status===200&&(0,_.default)(m.headers).forEach(function(k){k.indexOf("x-oss-meta-")===0&&(v.meta||(v.meta={}),v.meta[k.substring(11)]=m.headers[k])}),E.abrupt("return",v);case 10:case"end":return E.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.putACL=function(o,s,l){var a,g;return i.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return l=l||{},l.subres=(0,_.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.headers=l.headers||{},l.headers["x-oss-object-acl"]=s,o=this._objectName(o),a=this._objectRequestParams("PUT",o,l),a.successStatuses=[200],v.next=10,i.default.awrap(this.request(a));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"),i=d(h),S=u("babel-runtime/core-js/object/keys"),_=d(S),y=u("babel-runtime/core-js/object/assign"),p=d(y);function d(m){return m&&m.__esModule?m:{default:m}}var o=u("../utils/obj2xml"),s=o.obj2xml,l=u("../utils/checkObjectTag"),a=l.checkObjectTag,g=c;g.putObjectTagging=function(v,w){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k,T,D;return i.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:return a(w),E.subres=(0,p.default)({tagging:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),v=this._objectName(v),k=this._objectRequestParams("PUT",v,E),k.successStatuses=[200],w=(0,_.default)(w).map(function(N){return{Key:N,Value:w[N]}}),T={Tagging:{TagSet:{Tag:w}}},k.mime="xml",k.content=s(T),B.next=12,i.default.awrap(this.request(k));case 12:return D=B.sent,B.abrupt("return",{res:D.res,status:D.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"),i=y(h),S=u("babel-runtime/core-js/object/assign"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p.putSymlink=function(o,s,l){var a,g;return i.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,_.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.storageClass&&(l.headers["x-oss-storage-class"]=l.storageClass),o=this._objectName(o),a=this._objectRequestParams("PUT",o,l),a.successStatuses=[200],v.next=13,i.default.awrap(this.request(a));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"),i=y(h),S=u("babel-runtime/core-js/promise"),_=y(S);function y(d){return d&&d.__esModule?d:{default:d}}var p=c;p._parallelNode=function(o,s,l,a){var g,m,v,w,E,k,T,D;return i.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:g=this,m=[],v=[],w=o.length/s,E=o.length%s,k=E===0?w:(o.length-E)/s+1,T=1,D=0;case 8:if(!(D<o.length)){B.next=26;break}if(!g.isCancel()){B.next=11;break}return B.abrupt("break",26);case 11:if(a?v.push(l(g,o[D],a)):v.push(l(g,o[D])),!(v.length===s||T===k&&D===o.length-1)){B.next=23;break}return B.prev=13,T+=1,B.next=17,i.default.awrap(_.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:D++,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(o,s,l){var a=this;return new _.default(function(g){var m=[];if(s<=0||!o){g(m);return}function v(x){return function(){if(x===null)throw new Error("Callback was already called.");var Y=x;x=null;for(var V=arguments.length,P=Array(V),F=0;F<V;F++)P[F]=arguments[F];Y.apply(this,P)}}function w(x){var Y=-1,V=x.length;return function(){return++Y<V&&!a.isCancel()?{value:x[Y],key:Y}:null}}var E=w(o),k=!1,T=0,D=!1;function I(x,Y){T-=1,x?(k=!0,m.push(x),g(m)):Y==={}||k&&T<=0?(k=!0,g(m)):D||(a.isCancel()?g(m):N())}function B(x,Y){l(x).then(function(V){Y(null,V)}).catch(function(V){Y(V)})}function N(){for(D=!0;T<s&&!k&&!a.isCancel();){var x=E();if(x===null||m.length>0){k=!0,T<=0&&g(m);return}T+=1,B(x.value,v(I))}D=!1}N()})},p.cancel=function(o){this.options.cancelFlag=!0,o&&this.abortMultipartUpload(o.name,o.uploadId,o.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 o={status:0,name:"cancel"};return o}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(u,G,c){(function(h){"use strict";var i=u("babel-runtime/core-js/json/stringify"),S=p(i),_=u("babel-runtime/core-js/object/keys"),y=p(_);function p(s){return s&&s.__esModule?s:{default:s}}var d=u("./../../shims/crypto/crypto.js"),o=u("is-type-of");c.buildCanonicalizedResource=function(l,a){var g=""+l,m="?";if(o.string(a)&&a.trim()!=="")g+=m+a;else if(o.array(a))a.sort(),g+=m+a.join("&");else if(a){var v=function(k,T){return k[0]>T[0]?1:k[0]<T[0]?-1:0},w=function(k){g+=m+k,a[k]&&(g+="="+a[k]),m="&"};(0,y.default)(a).sort(v).forEach(w)}return g},c.buildCanonicalString=function(l,a,g,m){g=g||{};var v=g.headers||{},w="x-oss-",E=[],k={},T=[l.toUpperCase(),v["Content-Md5"]||"",v["Content-Type"]||v["Content-Type".toLowerCase()],m||v["x-oss-date"]];return(0,y.default)(v).forEach(function(D){var I=D.toLowerCase();I.indexOf(w)===0&&(k[I]=String(v[D]).trim())}),(0,y.default)(k).sort().forEach(function(D){E.push(D+":"+k[D])}),T=T.concat(E),T.push(this.buildCanonicalizedResource(a,g.parameters)),T.join(`
`)},c.computeSignature=function(l,a){var g=d.createHmac("sha1",l);return g.update(h.from(a,"utf8")).digest("base64")},c.authorization=function(l,a,g){return"OSS "+l+":"+this.computeSignature(a,g)},c._signatureForURL=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=arguments[2],m=arguments[3],v={},w=a.subResource,E=w===void 0?{}:w;if(a.process){var k="x-oss-process";E[k]=a.process}if(a.trafficLimit){var T="x-oss-traffic-limit";E[T]=a.trafficLimit}if(a.response&&(0,y.default)(a.response).forEach(function(N){var x="response-"+N.toLowerCase();E[x]=a.response[N]}),(0,y.default)(a).forEach(function(N){var x=N.toLowerCase(),Y=a[N];x.indexOf("x-oss-")===0?v[x]=Y:(x.indexOf("content-md5")===0||x.indexOf("content-type")===0)&&(v[N]=Y)}),Object.prototype.hasOwnProperty.call(a,"security-token")&&(E["security-token"]=a["security-token"]),Object.prototype.hasOwnProperty.call(a,"callback")){var D={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};if(a.callback.host&&(D.callbackHost=a.callback.host),a.callback.contentType&&(D.callbackBodyType=a.callback.contentType),E.callback=h.from((0,S.default)(D)).toString("base64"),a.callback.customValue){var I={};(0,y.default)(a.callback.customValue).forEach(function(N){I["x:"+N]=a.callback.customValue[N]}),E["callback-var"]=h.from((0,S.default)(I)).toString("base64")}}var B=this.buildCanonicalString(a.method,g,{headers:v,parameters:E},m.toString());return{Signature:this.computeSignature(l,B),subResource:E}}}).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,i){var S=i?/^[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"),i=S(h);function S(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(c,"__esModule",{value:!0}),c.checkObjectTag=void 0;var _=u("./checkValid"),y=_.checkValid,p=u("./isObject"),d=p.isObject,o=[{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(o,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(o,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function l(a){if(!d(a))throw new Error("tag must be Object");var g=(0,i.default)(a);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,E){y(w,s[m[E]])})})}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(i,S){S.forEach(function(_){if(_.validator)_.validator(i);else if(_.pattern&&!_.pattern.test(i))throw new Error(_.msg)})}c.checkValid=h},{}],38:[function(u,G,c){(function(h){"use strict";var i=u("babel-runtime/core-js/object/assign"),S=_(i);function _(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(c,"__esModule",{value:!0}),c.createRequest=void 0;var y=u("./../../../shims/crypto/crypto.js"),p=u("debug")("ali-oss"),d=u("mime"),o=u("dateformat"),s=u("copy-to"),l=u("path");function a(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 E={"x-oss-date":o(w,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(E["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(E,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(E["x-oss-security-token"]=this.options.stsToken),s(v.headers).to(E),a(E,"Content-Type")||(v.mime&&v.mime.indexOf("/")>0?E["Content-Type"]=v.mime:E["Content-Type"]=d.getType(v.mime||l.extname(v.object||""))),a(E,"Content-Type")||g(E,"Content-Type"),v.content&&(E["Content-Md5"]=y.createHash("md5").update(h.from(v.content,"utf8")).digest("base64"),E["Content-Length"]||(E["Content-Length"]=v.content.length));var k=this._getResource(v);E.authorization=this.authorization(v.method,k,v.subres,E);var T=this._getReqUrl(v);p("request %s %s, with headers %j, !!stream: %s",v.method,T,E,!!v.stream);var D=v.timeout||this.options.timeout,I={method:v.method,content:v.content,stream:v.stream,headers:E,timeout:D,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:T,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"),i=y(h),S=u("babel-runtime/helpers/typeof"),_=y(S);function y(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,_.default)(p))!=="object")return p;var d=Array.isArray(p)?[]:{};return(0,i.default)(p).forEach(function(o){d[o]=c.deepCopy(p[o])}),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"),i=y(h),S=u("babel-runtime/helpers/typeof"),_=y(S);function y(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(c,"__esModule",{value:!0}),c.formatObjKey=void 0;function p(o,s){if(o===null||(typeof o=="undefined"?"undefined":(0,_.default)(o))!=="object")return o;var l=void 0;if(Array.isArray(o)){l=[];for(var a=0;a<o.length;a++)l.push(p(o[a],s))}else l={},(0,i.default)(o).forEach(function(g){l[d(g,s)]=p(o[g],s)});return l}c.formatObjKey=p;function d(o,s){return s==="firstUpperCase"?o=o.replace(/^./,function(l){return l.toUpperCase()}):s==="firstLowerCase"&&(o=o.replace(/^./,function(l){return l.toLowerCase()})),o}},{"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(i){for(var S=0,_=0;_<i.length;_++){var y=i.charAt(_);/^[\u00-\uff]$/.test(y)?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(i){return typeof Blob!="undefined"&&i 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 i=/^(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 i.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"),i=S(h);function S(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(c,"__esModule",{value:!0}),c.obj2xml=void 0;var _=u("./formatObjKey");function y(d){return Object.prototype.toString.call(d).replace(/(.*? |])/g,"").toLowerCase()}function p(d,o){var s="";return o&&o.headers&&(s=`<?xml version="1.0" encoding="UTF-8"?>
`),o&&o.firstUpperCase&&(d=_.formatObjKey(d,"firstUpperCase")),y(d)==="object"?(0,i.default)(d).forEach(function(l){y(d[l])==="string"||y(d[l])==="number"?s+="<"+l+">"+d[l]+"</"+l+">":y(d[l])==="object"?s+="<"+l+">"+p(d[l])+"</"+l+">":y(d[l])==="array"?s+=d[l].map(function(a){return"<"+l+">"+p(a)+"</"+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",i=null;G.exports=function(S,_){return function(p,d){p=p||null,d=d||{};var o=d.global!==!1;if(i===null&&o&&(i=S[h]||null),i!==null&&p!==null&&i.implementation!==p)throw new Error('any-promise already defined as "'+i.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return i===null&&(p!==null&&typeof d.Promise!="undefined"?i={Promise:d.Promise,implementation:p}:i=_(p),o&&(S[h]=i)),i}}},{}],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"),i=p(h),S=u("../core-js/symbol"),_=p(S),y=typeof _.default=="function"&&typeof i.default=="symbol"?function(d){return typeof d}:function(d){return d&&typeof _.default=="function"&&d.constructor===_.default&&d!==_.default.prototype?"symbol":typeof d};function p(d){return d&&d.__esModule?d:{default:d}}c.default=typeof _.default=="function"&&y(i.default)==="symbol"?function(d){return typeof d=="undefined"?"undefined":y(d)}:function(d){return d&&typeof _.default=="function"&&d.constructor===_.default&&d!==_.default.prototype?"symbol":typeof d=="undefined"?"undefined":y(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=o,c.toByteArray=l,c.fromByteArray=m;for(var h=[],i=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,p=_.length;y<p;++y)h[y]=_[y],i[_.charCodeAt(y)]=y;i["-".charCodeAt(0)]=62,i["_".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 E=v.indexOf("=");E===-1&&(E=w);var k=E===w?0:4-E%4;return[E,k]}function o(v){var w=d(v),E=w[0],k=w[1];return(E+k)*3/4-k}function s(v,w,E){return(w+E)*3/4-E}function l(v){var w,E=d(v),k=E[0],T=E[1],D=new S(s(v,k,T)),I=0,B=T>0?k-4:k,N;for(N=0;N<B;N+=4)w=i[v.charCodeAt(N)]<<18|i[v.charCodeAt(N+1)]<<12|i[v.charCodeAt(N+2)]<<6|i[v.charCodeAt(N+3)],D[I++]=w>>16&255,D[I++]=w>>8&255,D[I++]=w&255;return T===2&&(w=i[v.charCodeAt(N)]<<2|i[v.charCodeAt(N+1)]>>4,D[I++]=w&255),T===1&&(w=i[v.charCodeAt(N)]<<10|i[v.charCodeAt(N+1)]<<4|i[v.charCodeAt(N+2)]>>2,D[I++]=w>>8&255,D[I++]=w&255),D}function a(v){return h[v>>18&63]+h[v>>12&63]+h[v>>6&63]+h[v&63]}function g(v,w,E){for(var k,T=[],D=w;D<E;D+=3)k=(v[D]<<16&16711680)+(v[D+1]<<8&65280)+(v[D+2]&255),T.push(a(k));return T.join("")}function m(v){for(var w,E=v.length,k=E%3,T=[],D=16383,I=0,B=E-k;I<B;I+=D)T.push(g(v,I,I+D>B?B:I+D));return k===1?(w=v[E-1],T.push(h[w>>2]+h[w<<4&63]+"==")):k===2&&(w=(v[E-2]<<8)+v[E-1],T.push(h[w>>10]+h[w>>4&63]+h[w<<2&63]+"=")),T.join("")}},{}],70:[function(u,G,c){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(h,i,S){typeof G!="undefined"&&G.exports?G.exports=S():typeof define=="function"&&define.amd?define(i,S):h[i]=S()}(this,"bowser",function(){var h=!0;function i(s){function l(U){var R=s.match(U);return R&&R.length>1&&R[1]||""}function a(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),E=!w&&/nexus\s*[0-9]+/i.test(s),k=/CrOS/.test(s),T=/silk/i.test(s),D=/sailfish/i.test(s),I=/tizen/i.test(s),B=/(web|hpw)(o|0)s/i.test(s),N=/windows phone/i.test(s),x=/SamsungBrowser/i.test(s),Y=!N&&/windows/i.test(s),V=!g&&!T&&/macintosh/i.test(s),P=!v&&!D&&!I&&!B&&/linux/i.test(s),F=a(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),X=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:X||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)||X}:/SamsungBrowser/i.test(s)?z={name:"Samsung Internet for Android",samsungBrowser:h,version:X||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:X||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:X||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)||X}:D?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")):T?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:X||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:B?(z={name:"WebOS",osname:"WebOS",webos:h,version:X||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)||X}:/qupzilla/i.test(s)?z={name:"QupZilla",qupzilla:h,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||X}:/chromium/i.test(s)?z={name:"Chromium",chromium:h,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||X}:/chrome|crios|crmo/i.test(s)?z={name:"Chrome",chrome:h,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:v?z={name:"Android",version:X}:/safari|applewebkit/i.test(s)?(z={name:"Safari",safari:h},X&&(z.version=X)):g?(z={name:g=="iphone"?"iPhone":g=="ipad"?"iPad":"iPod"},X&&(z.version=X)):/googlebot/i.test(s)?z={name:"Googlebot",googlebot:h,version:l(/googlebot\/(\d+(\.\d+))/i)||X}:z={name:l(/^(.*)\/(.*) /),version:a(/^(.*)\/(.*) /)},!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&&X&&(z.version=X)):!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"):V?(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 J="";z.windows?J=se(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):z.windowsphone?J=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):z.mac?(J=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),J=J.replace(/[_\s]/g,".")):g?(J=l(/os (\d+([_\s]\d+)*) like mac os x/i),J=J.replace(/[_\s]/g,".")):v?J=l(/android[ \/-](\d+(\.\d+)*)/i):z.webos?J=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):z.blackberry?J=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):z.bada?J=l(/bada\/(\d+(\.\d+)*)/i):z.tizen&&(J=l(/tizen[\/\s](\d+(\.\d+)*)/i)),J&&(z.osversion=J);var j=!z.windows&&J.split(".")[0];return Q||E||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=i(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(s){for(var l=0;l<s.length;++l){var a=s[l];if(typeof a=="string"&&a in S)return!0}return!1};function _(s){return s.split(".").length}function y(s,l){var a=[],g;if(Array.prototype.map)return Array.prototype.map.call(s,l);for(g=0;g<s.length;g++)a.push(l(s[g]));return a}function p(s){for(var l=Math.max(_(s[0]),_(s[1])),a=y(s,function(g){var m=l-_(g);return g=g+new Array(m+1).join(".0"),y(g.split("."),function(v){return new Array(20-v.length).join("0")+v}).reverse()});--l>=0;){if(a[0][l]>a[1][l])return 1;if(a[0][l]===a[1][l]){if(l===0)return 0}else return-1}}function d(s,l,a){var g=S;typeof l=="string"&&(a=l,l=void 0),l===void 0&&(l=!1),a&&(g=i(a));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 o(s,l,a){return!d(s,l,a)}return S.isUnsupportedBrowser=d,S.compareVersions=p,S.check=o,S._detect=i,S.detect=i,S})},{}],71:[function(u,G,c){},{}],72:[function(u,G,c){var h=u("buffer").Buffer,i=h.isEncoding||function(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&&!i(o))throw new Error("Unknown encoding: "+o)}var _=c.StringDecoder=function(o){this.encoding=(o||"utf8").toLowerCase().replace(/[-_]/,""),S(o);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=y;return}this.charBuffer=new h(6),this.charReceived=0,this.charLength=0};_.prototype.write=function(o){for(var s="";this.charLength;){var l=o.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:o.length;if(o.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";o=o.slice(l,o.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,o.length===0)return s;break}this.detectIncompleteChar(o);var a=o.length;this.charLength&&(o.copy(this.charBuffer,0,o.length-this.charReceived,a),a-=this.charReceived),s+=o.toString(this.encoding,0,a);var a=s.length-1,g=s.charCodeAt(a);if(g>=55296&&g<=56319){var m=this.surrogateSize;return this.charLength+=m,this.charReceived+=m,this.charBuffer.copy(this.charBuffer,m,0,m),o.copy(this.charBuffer,0,0,m),s.substring(0,a)}return s},_.prototype.detectIncompleteChar=function(o){for(var s=o.length>=3?3:o.length;s>0;s--){var l=o[o.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},_.prototype.end=function(o){var s="";if(o&&o.length&&(s=this.write(o)),this.charReceived){var l=this.charReceived,a=this.charBuffer,g=this.encoding;s+=a.slice(0,l).toString(g)}return s};function y(o){return o.toString(this.encoding)}function p(o){this.charReceived=o.length%2,this.charLength=this.charReceived?2:0}function d(o){this.charReceived=o.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(u,G,c){(function(h,i){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var S=u("base64-js"),_=u("ieee754"),y=u("isarray");c.Buffer=i,c.SlowBuffer=T,c.INSPECT_MAX_BYTES=50,i.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 i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(q,H){if(d()<H)throw new RangeError("Invalid typed array length");return i.TYPED_ARRAY_SUPPORT?(q=new Uint8Array(H),q.__proto__=i.prototype):(q===null&&(q=new i(H)),q.length=H),q}function i(q,H,O){if(!i.TYPED_ARRAY_SUPPORT&&!(this instanceof i))return new i(q,H,O);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,O)}i.poolSize=8192,i._augment=function(q){return q.__proto__=i.prototype,q};function s(q,H,O,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,O,W):typeof H=="string"?m(q,H,O):E(q,H)}i.from=function(q,H,O){return s(null,q,H,O)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,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 a(q,H,O,W){return l(H),H<=0?o(q,H):O!==void 0?typeof W=="string"?o(q,H).fill(O,W):o(q,H).fill(O):o(q,H)}i.alloc=function(q,H,O){return a(null,q,H,O)};function g(q,H){if(l(H),q=o(q,H<0?0:k(H)|0),!i.TYPED_ARRAY_SUPPORT)for(var O=0;O<H;++O)q[O]=0;return q}i.allocUnsafe=function(q){return g(null,q)},i.allocUnsafeSlow=function(q){return g(null,q)};function m(q,H,O){if((typeof O!="string"||O==="")&&(O="utf8"),!i.isEncoding(O))throw new TypeError('"encoding" must be a valid string encoding');var W=D(H,O)|0;q=o(q,W);var we=q.write(H,O);return we!==W&&(q=q.slice(0,we)),q}function v(q,H){var O=H.length<0?0:k(H.length)|0;q=o(q,O);for(var W=0;W<O;W+=1)q[W]=H[W]&255;return q}function w(q,H,O,W){if(H.byteLength,O<0||H.byteLength<O)throw new RangeError("'offset' is out of bounds");if(H.byteLength<O+(W||0))throw new RangeError("'length' is out of bounds");return O===void 0&&W===void 0?H=new Uint8Array(H):W===void 0?H=new Uint8Array(H,O):H=new Uint8Array(H,O,W),i.TYPED_ARRAY_SUPPORT?(q=H,q.__proto__=i.prototype):q=v(q,H),q}function E(q,H){if(i.isBuffer(H)){var O=k(H.length)|0;return q=o(q,O),q.length===0||H.copy(q,0,0,O),q}if(H){if(typeof ArrayBuffer!="undefined"&&H.buffer instanceof ArrayBuffer||"length"in H)return typeof H.length!="number"||Ce(H.length)?o(q,0):v(q,H);if(H.type==="Buffer"&&y(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 T(q){return+q!=q&&(q=0),i.alloc(+q)}i.isBuffer=function(H){return!!(H!=null&&H._isBuffer)},i.compare=function(H,O){if(!i.isBuffer(H)||!i.isBuffer(O))throw new TypeError("Arguments must be Buffers");if(H===O)return 0;for(var W=H.length,we=O.length,be=0,Oe=Math.min(W,we);be<Oe;++be)if(H[be]!==O[be]){W=H[be],we=O[be];break}return W<we?-1:we<W?1:0},i.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}},i.concat=function(H,O){if(!y(H))throw new TypeError('"list" argument must be an Array of Buffers');if(H.length===0)return i.alloc(0);var W;if(O===void 0)for(O=0,W=0;W<H.length;++W)O+=H[W].length;var we=i.allocUnsafe(O),be=0;for(W=0;W<H.length;++W){var Oe=H[W];if(!i.isBuffer(Oe))throw new TypeError('"list" argument must be an Array of Buffers');Oe.copy(we,be),be+=Oe.length}return we};function D(q,H){if(i.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 O=q.length;if(O===0)return 0;for(var W=!1;;)switch(H){case"ascii":case"latin1":case"binary":return O;case"utf8":case"utf-8":case void 0:return ne(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O*2;case"hex":return O>>>1;case"base64":return K(q).length;default:if(W)return ne(q).length;H=(""+H).toLowerCase(),W=!0}}i.byteLength=D;function I(q,H,O){var W=!1;if((H===void 0||H<0)&&(H=0),H>this.length)return"";if((O===void 0||O>this.length)&&(O=this.length),O<=0)return"";if(O>>>=0,H>>>=0,O<=H)return"";for(q||(q="utf8");;)switch(q){case"hex":return U(this,H,O);case"utf8":case"utf-8":return fe(this,H,O);case"ascii":return J(this,H,O);case"latin1":case"binary":return j(this,H,O);case"base64":return ce(this,H,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,H,O);default:if(W)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),W=!0}}i.prototype._isBuffer=!0;function B(q,H,O){var W=q[H];q[H]=q[O],q[O]=W}i.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 O=0;O<H;O+=2)B(this,O,O+1);return this},i.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 O=0;O<H;O+=4)B(this,O,O+3),B(this,O+1,O+2);return this},i.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 O=0;O<H;O+=8)B(this,O,O+7),B(this,O+1,O+6),B(this,O+2,O+5),B(this,O+3,O+4);return this},i.prototype.toString=function(){var H=this.length|0;return H===0?"":arguments.length===0?fe(this,0,H):I.apply(this,arguments)},i.prototype.equals=function(H){if(!i.isBuffer(H))throw new TypeError("Argument must be a Buffer");return this===H?!0:i.compare(this,H)===0},i.prototype.inspect=function(){var H="",O=c.INSPECT_MAX_BYTES;return this.length>0&&(H=this.toString("hex",0,O).match(/.{2}/g).join(" "),this.length>O&&(H+=" ... ")),"<Buffer "+H+">"},i.prototype.compare=function(H,O,W,we,be){if(!i.isBuffer(H))throw new TypeError("Argument must be a Buffer");if(O===void 0&&(O=0),W===void 0&&(W=H?H.length:0),we===void 0&&(we=0),be===void 0&&(be=this.length),O<0||W>H.length||we<0||be>this.length)throw new RangeError("out of range index");if(we>=be&&O>=W)return 0;if(we>=be)return-1;if(O>=W)return 1;if(O>>>=0,W>>>=0,we>>>=0,be>>>=0,this===H)return 0;for(var Oe=be-we,Be=W-O,Fe=Math.min(Oe,Be),Ue=this.slice(we,be),Ge=H.slice(O,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,O,W,we){if(q.length===0)return-1;if(typeof O=="string"?(W=O,O=0):O>2147483647?O=2147483647:O<-2147483648&&(O=-2147483648),O=+O,isNaN(O)&&(O=we?0:q.length-1),O<0&&(O=q.length+O),O>=q.length){if(we)return-1;O=q.length-1}else if(O<0)if(we)O=0;else return-1;if(typeof H=="string"&&(H=i.from(H,W)),i.isBuffer(H))return H.length===0?-1:x(q,H,O,W,we);if(typeof H=="number")return H=H&255,i.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?we?Uint8Array.prototype.indexOf.call(q,H,O):Uint8Array.prototype.lastIndexOf.call(q,H,O):x(q,[H],O,W,we);throw new TypeError("val must be string, number or Buffer")}function x(q,H,O,W,we){var be=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;be=2,Oe/=2,Be/=2,O/=2}function Fe(Je,Ne){return be===1?Je[Ne]:Je.readUInt16BE(Ne*be)}var Ue;if(we){var Ge=-1;for(Ue=O;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*be}else Ge!==-1&&(Ue-=Ue-Ge),Ge=-1}else for(O+Be>Oe&&(O=Oe-Be),Ue=O;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}i.prototype.includes=function(H,O,W){return this.indexOf(H,O,W)!==-1},i.prototype.indexOf=function(H,O,W){return N(this,H,O,W,!0)},i.prototype.lastIndexOf=function(H,O,W){return N(this,H,O,W,!1)};function Y(q,H,O,W){O=Number(O)||0;var we=q.length-O;W?(W=Number(W),W>we&&(W=we)):W=we;var be=H.length;if(be%2!==0)throw new TypeError("Invalid hex string");W>be/2&&(W=be/2);for(var Oe=0;Oe<W;++Oe){var Be=parseInt(H.substr(Oe*2,2),16);if(isNaN(Be))return Oe;q[O+Oe]=Be}return Oe}function V(q,H,O,W){return $(ne(H,q.length-O),q,O,W)}function P(q,H,O,W){return $(Z(H),q,O,W)}function F(q,H,O,W){return P(q,H,O,W)}function X(q,H,O,W){return $(K(H),q,O,W)}function Q(q,H,O,W){return $(ue(H,q.length-O),q,O,W)}i.prototype.write=function(H,O,W,we){if(O===void 0)we="utf8",W=this.length,O=0;else if(W===void 0&&typeof O=="string")we=O,W=this.length,O=0;else if(isFinite(O))O=O|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 be=this.length-O;if((W===void 0||W>be)&&(W=be),H.length>0&&(W<0||O<0)||O>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,O,W);case"utf8":case"utf-8":return V(this,H,O,W);case"ascii":return P(this,H,O,W);case"latin1":case"binary":return F(this,H,O,W);case"base64":return X(this,H,O,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,H,O,W);default:if(Oe)throw new TypeError("Unknown encoding: "+we);we=(""+we).toLowerCase(),Oe=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ce(q,H,O){return H===0&&O===q.length?S.fromByteArray(q):S.fromByteArray(q.slice(H,O))}function fe(q,H,O){O=Math.min(q.length,O);for(var W=[],we=H;we<O;){var be=q[we],Oe=null,Be=be>239?4:be>223?3:be>191?2:1;if(we+Be<=O){var Fe,Ue,Ge,Ye;switch(Be){case 1:be<128&&(Oe=be);break;case 2:Fe=q[we+1],(Fe&192)===128&&(Ye=(be&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=(be&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=(be&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 O="",W=0;W<H;)O+=String.fromCharCode.apply(String,q.slice(W,W+=z));return O}function J(q,H,O){var W="";O=Math.min(q.length,O);for(var we=H;we<O;++we)W+=String.fromCharCode(q[we]&127);return W}function j(q,H,O){var W="";O=Math.min(q.length,O);for(var we=H;we<O;++we)W+=String.fromCharCode(q[we]);return W}function U(q,H,O){var W=q.length;(!H||H<0)&&(H=0),(!O||O<0||O>W)&&(O=W);for(var we="",be=H;be<O;++be)we+=ee(q[be]);return we}function R(q,H,O){for(var W=q.slice(H,O),we="",be=0;be<W.length;be+=2)we+=String.fromCharCode(W[be]+W[be+1]*256);return we}i.prototype.slice=function(H,O){var W=this.length;H=~~H,O=O===void 0?W:~~O,H<0?(H+=W,H<0&&(H=0)):H>W&&(H=W),O<0?(O+=W,O<0&&(O=0)):O>W&&(O=W),O<H&&(O=H);var we;if(i.TYPED_ARRAY_SUPPORT)we=this.subarray(H,O),we.__proto__=i.prototype;else{var be=O-H;we=new i(be,void 0);for(var Oe=0;Oe<be;++Oe)we[Oe]=this[Oe+H]}return we};function C(q,H,O){if(q%1!==0||q<0)throw new RangeError("offset is not uint");if(q+H>O)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUIntLE=function(H,O,W){H=H|0,O=O|0,W||C(H,O,this.length);for(var we=this[H],be=1,Oe=0;++Oe<O&&(be*=256);)we+=this[H+Oe]*be;return we},i.prototype.readUIntBE=function(H,O,W){H=H|0,O=O|0,W||C(H,O,this.length);for(var we=this[H+--O],be=1;O>0&&(be*=256);)we+=this[H+--O]*be;return we},i.prototype.readUInt8=function(H,O){return O||C(H,1,this.length),this[H]},i.prototype.readUInt16LE=function(H,O){return O||C(H,2,this.length),this[H]|this[H+1]<<8},i.prototype.readUInt16BE=function(H,O){return O||C(H,2,this.length),this[H]<<8|this[H+1]},i.prototype.readUInt32LE=function(H,O){return O||C(H,4,this.length),(this[H]|this[H+1]<<8|this[H+2]<<16)+this[H+3]*16777216},i.prototype.readUInt32BE=function(H,O){return O||C(H,4,this.length),this[H]*16777216+(this[H+1]<<16|this[H+2]<<8|this[H+3])},i.prototype.readIntLE=function(H,O,W){H=H|0,O=O|0,W||C(H,O,this.length);for(var we=this[H],be=1,Oe=0;++Oe<O&&(be*=256);)we+=this[H+Oe]*be;return be*=128,we>=be&&(we-=Math.pow(2,8*O)),we},i.prototype.readIntBE=function(H,O,W){H=H|0,O=O|0,W||C(H,O,this.length);for(var we=O,be=1,Oe=this[H+--we];we>0&&(be*=256);)Oe+=this[H+--we]*be;return be*=128,Oe>=be&&(Oe-=Math.pow(2,8*O)),Oe},i.prototype.readInt8=function(H,O){return O||C(H,1,this.length),this[H]&128?(255-this[H]+1)*-1:this[H]},i.prototype.readInt16LE=function(H,O){O||C(H,2,this.length);var W=this[H]|this[H+1]<<8;return W&32768?W|4294901760:W},i.prototype.readInt16BE=function(H,O){O||C(H,2,this.length);var W=this[H+1]|this[H]<<8;return W&32768?W|4294901760:W},i.prototype.readInt32LE=function(H,O){return O||C(H,4,this.length),this[H]|this[H+1]<<8|this[H+2]<<16|this[H+3]<<24},i.prototype.readInt32BE=function(H,O){return O||C(H,4,this.length),this[H]<<24|this[H+1]<<16|this[H+2]<<8|this[H+3]},i.prototype.readFloatLE=function(H,O){return O||C(H,4,this.length),_.read(this,H,!0,23,4)},i.prototype.readFloatBE=function(H,O){return O||C(H,4,this.length),_.read(this,H,!1,23,4)},i.prototype.readDoubleLE=function(H,O){return O||C(H,8,this.length),_.read(this,H,!0,52,8)},i.prototype.readDoubleBE=function(H,O){return O||C(H,8,this.length),_.read(this,H,!1,52,8)};function M(q,H,O,W,we,be){if(!i.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(H>we||H<be)throw new RangeError('"value" argument is out of bounds');if(O+W>q.length)throw new RangeError("Index out of range")}i.prototype.writeUIntLE=function(H,O,W,we){if(H=+H,O=O|0,W=W|0,!we){var be=Math.pow(2,8*W)-1;M(this,H,O,W,be,0)}var Oe=1,Be=0;for(this[O]=H&255;++Be<W&&(Oe*=256);)this[O+Be]=H/Oe&255;return O+W},i.prototype.writeUIntBE=function(H,O,W,we){if(H=+H,O=O|0,W=W|0,!we){var be=Math.pow(2,8*W)-1;M(this,H,O,W,be,0)}var Oe=W-1,Be=1;for(this[O+Oe]=H&255;--Oe>=0&&(Be*=256);)this[O+Oe]=H/Be&255;return O+W},i.prototype.writeUInt8=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,1,255,0),i.TYPED_ARRAY_SUPPORT||(H=Math.floor(H)),this[O]=H&255,O+1};function le(q,H,O,W){H<0&&(H=65535+H+1);for(var we=0,be=Math.min(q.length-O,2);we<be;++we)q[O+we]=(H&255<<8*(W?we:1-we))>>>(W?we:1-we)*8}i.prototype.writeUInt16LE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[O]=H&255,this[O+1]=H>>>8):le(this,H,O,!0),O+2},i.prototype.writeUInt16BE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[O]=H>>>8,this[O+1]=H&255):le(this,H,O,!1),O+2};function he(q,H,O,W){H<0&&(H=4294967295+H+1);for(var we=0,be=Math.min(q.length-O,4);we<be;++we)q[O+we]=H>>>(W?we:3-we)*8&255}i.prototype.writeUInt32LE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[O+3]=H>>>24,this[O+2]=H>>>16,this[O+1]=H>>>8,this[O]=H&255):he(this,H,O,!0),O+4},i.prototype.writeUInt32BE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[O]=H>>>24,this[O+1]=H>>>16,this[O+2]=H>>>8,this[O+3]=H&255):he(this,H,O,!1),O+4},i.prototype.writeIntLE=function(H,O,W,we){if(H=+H,O=O|0,!we){var be=Math.pow(2,8*W-1);M(this,H,O,W,be-1,-be)}var Oe=0,Be=1,Fe=0;for(this[O]=H&255;++Oe<W&&(Be*=256);)H<0&&Fe===0&&this[O+Oe-1]!==0&&(Fe=1),this[O+Oe]=(H/Be>>0)-Fe&255;return O+W},i.prototype.writeIntBE=function(H,O,W,we){if(H=+H,O=O|0,!we){var be=Math.pow(2,8*W-1);M(this,H,O,W,be-1,-be)}var Oe=W-1,Be=1,Fe=0;for(this[O+Oe]=H&255;--Oe>=0&&(Be*=256);)H<0&&Fe===0&&this[O+Oe+1]!==0&&(Fe=1),this[O+Oe]=(H/Be>>0)-Fe&255;return O+W},i.prototype.writeInt8=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,1,127,-128),i.TYPED_ARRAY_SUPPORT||(H=Math.floor(H)),H<0&&(H=255+H+1),this[O]=H&255,O+1},i.prototype.writeInt16LE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[O]=H&255,this[O+1]=H>>>8):le(this,H,O,!0),O+2},i.prototype.writeInt16BE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[O]=H>>>8,this[O+1]=H&255):le(this,H,O,!1),O+2},i.prototype.writeInt32LE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[O]=H&255,this[O+1]=H>>>8,this[O+2]=H>>>16,this[O+3]=H>>>24):he(this,H,O,!0),O+4},i.prototype.writeInt32BE=function(H,O,W){return H=+H,O=O|0,W||M(this,H,O,4,2147483647,-2147483648),H<0&&(H=4294967295+H+1),i.TYPED_ARRAY_SUPPORT?(this[O]=H>>>24,this[O+1]=H>>>16,this[O+2]=H>>>8,this[O+3]=H&255):he(this,H,O,!1),O+4};function ve(q,H,O,W,we,be){if(O+W>q.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("Index out of range")}function Ee(q,H,O,W,we){return we||ve(q,H,O,4,34028234663852886e22,-34028234663852886e22),_.write(q,H,O,W,23,4),O+4}i.prototype.writeFloatLE=function(H,O,W){return Ee(this,H,O,!0,W)},i.prototype.writeFloatBE=function(H,O,W){return Ee(this,H,O,!1,W)};function Se(q,H,O,W,we){return we||ve(q,H,O,8,17976931348623157e292,-17976931348623157e292),_.write(q,H,O,W,52,8),O+8}i.prototype.writeDoubleLE=function(H,O,W){return Se(this,H,O,!0,W)},i.prototype.writeDoubleBE=function(H,O,W){return Se(this,H,O,!1,W)},i.prototype.copy=function(H,O,W,we){if(W||(W=0),!we&&we!==0&&(we=this.length),O>=H.length&&(O=H.length),O||(O=0),we>0&&we<W&&(we=W),we===W)return 0;if(H.length===0||this.length===0)return 0;if(O<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-O<we-W&&(we=H.length-O+W);var be=we-W,Oe;if(this===H&&W<O&&O<we)for(Oe=be-1;Oe>=0;--Oe)H[Oe+O]=this[Oe+W];else if(be<1e3||!i.TYPED_ARRAY_SUPPORT)for(Oe=0;Oe<be;++Oe)H[Oe+O]=this[Oe+W];else Uint8Array.prototype.set.call(H,this.subarray(W,W+be),O);return be},i.prototype.fill=function(H,O,W,we){if(typeof H=="string"){if(typeof O=="string"?(we=O,O=0,W=this.length):typeof W=="string"&&(we=W,W=this.length),H.length===1){var be=H.charCodeAt(0);be<256&&(H=be)}if(we!==void 0&&typeof we!="string")throw new TypeError("encoding must be a string");if(typeof we=="string"&&!i.isEncoding(we))throw new TypeError("Unknown encoding: "+we)}else typeof H=="number"&&(H=H&255);if(O<0||this.length<O||this.length<W)throw new RangeError("Out of range index");if(W<=O)return this;O=O>>>0,W=W===void 0?this.length:W>>>0,H||(H=0);var Oe;if(typeof H=="number")for(Oe=O;Oe<W;++Oe)this[Oe]=H;else{var Be=i.isBuffer(H)?H:ne(new i(H,we).toString()),Fe=Be.length;for(Oe=0;Oe<W-O;++Oe)this[Oe+O]=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 ne(q,H){H=H||Infinity;for(var O,W=q.length,we=null,be=[],Oe=0;Oe<W;++Oe){if(O=q.charCodeAt(Oe),O>55295&&O<57344){if(!we){if(O>56319){(H-=3)>-1&&be.push(239,191,189);continue}else if(Oe+1===W){(H-=3)>-1&&be.push(239,191,189);continue}we=O;continue}if(O<56320){(H-=3)>-1&&be.push(239,191,189),we=O;continue}O=(we-55296<<10|O-56320)+65536}else we&&((H-=3)>-1&&be.push(239,191,189));if(we=null,O<128){if((H-=1)<0)break;be.push(O)}else if(O<2048){if((H-=2)<0)break;be.push(O>>6|192,O&63|128)}else if(O<65536){if((H-=3)<0)break;be.push(O>>12|224,O>>6&63|128,O&63|128)}else if(O<1114112){if((H-=4)<0)break;be.push(O>>18|240,O>>12&63|128,O>>6&63|128,O&63|128)}else throw new Error("Invalid code point")}return be}function Z(q){for(var H=[],O=0;O<q.length;++O)H.push(q.charCodeAt(O)&255);return H}function ue(q,H){for(var O,W,we,be=[],Oe=0;Oe<q.length&&!((H-=2)<0);++Oe)O=q.charCodeAt(Oe),W=O>>8,we=O%256,be.push(we),be.push(W);return be}function K(q){return S.toByteArray(pe(q))}function $(q,H,O,W){for(var we=0;we<W&&!(we+O>=H.length||we>=q.length);++we)H[we+O]=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=i;function i(_,y){if(!(this instanceof i))return new i(_,y);this.src=_,this._withAccess=y}i.prototype.withAccess=function(_){return this._withAccess=_!==!1,this},i.prototype.pick=function(_){return Array.isArray(_)||(_=h.call(arguments)),_.length&&(this.keys=_),this},i.prototype.to=function(_){if(_=_||{},!this.src)return _;var y=this.keys||Object.keys(this.src);if(!this._withAccess){for(var p=0;p<y.length;p++){if(d=y[p],_[d]!==void 0)continue;_[d]=this.src[d]}return _}for(var p=0;p<y.length;p++){var d=y[p];if(!S(_,d))continue;var o=this.src.__lookupGetter__(d),s=this.src.__lookupSetter__(d);o&&_.__defineGetter__(d,o),s&&_.__defineSetter__(d,s),!o&&!s&&(_[d]=this.src[d])}return _},i.prototype.toCover=function(_){for(var y=this.keys||Object.keys(this.src),p=0;p<y.length;p++){var d=y[p];delete _[d];var o=this.src.__lookupGetter__(d),s=this.src.__lookupSetter__(d);o&&_.__defineGetter__(d,o),s&&_.__defineSetter__(d,s),!o&&!s&&(_[d]=this.src[d])}},i.prototype.override=i.prototype.toCover,i.prototype.and=function(_){var y={};return this.to(y),this.src=_,this.to(y),this.src=y,this};function S(_,y){return _[y]===void 0&&_.__lookupGetter__(y)===void 0&&_.__lookupSetter__(y)===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"),i=h.JSON||(h.JSON={stringify:JSON.stringify});G.exports=function(_){return i.stringify.apply(i,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,_){return h.create(S,_)}},{"../../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,_,y){return h.defineProperty(S,_,y)}},{"../../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,i,S,_){if(!(h instanceof i)||_!==void 0&&_ in h)throw TypeError(S+": incorrect invocation!");return h}},{}],95:[function(u,G,c){var h=u("./_is-object");G.exports=function(i){if(!h(i))throw TypeError(i+" is not an object!");return i}},{"./_is-object":119}],96:[function(u,G,c){var h=u("./_to-iobject"),i=u("./_to-length"),S=u("./_to-absolute-index");G.exports=function(_){return function(y,p,d){var o=h(y),s=i(o.length),l=S(d,s),a;if(_&&p!=p){for(;s>l;)if(a=o[l++],a!=a)return!0}else for(;s>l;l++)if((_||l in o)&&o[l]===p)return _||l||0;return!_&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(u,G,c){var h=u("./_cof"),i=u("./_wks")("toStringTag"),S=h(function(){return arguments}())=="Arguments",_=function(y,p){try{return y[p]}catch(d){}};G.exports=function(y){var p,d,o;return y===void 0?"Undefined":y===null?"Null":typeof(d=_(p=Object(y),i))=="string"?d:S?h(p):(o=h(p))=="Object"&&typeof p.callee=="function"?"Arguments":o}},{"./_cof":98,"./_wks":166}],98:[function(u,G,c){var h={}.toString;G.exports=function(i){return h.call(i).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"),i=u("./_property-desc");G.exports=function(S,_,y){_ in S?h.f(S,_,i(0,y)):S[_]=y}},{"./_object-dp":132,"./_property-desc":146}],101:[function(u,G,c){var h=u("./_a-function");G.exports=function(i,S,_){if(h(i),S===void 0)return i;switch(_){case 1:return function(y){return i.call(S,y)};case 2:return function(y,p){return i.call(S,y,p)};case 3:return function(y,p,d){return i.call(S,y,p,d)}}return function(){return i.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"),i=u("./_global").document,S=h(i)&&h(i.createElement);G.exports=function(_){return S?i.createElement(_):{}}},{"./_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"),i=u("./_object-gops"),S=u("./_object-pie");G.exports=function(_){var y=h(_),p=i.f;if(p)for(var d=p(_),o=S.f,s=0,l;d.length>s;)o.call(_,l=d[s++])&&y.push(l);return y}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(u,G,c){var h=u("./_global"),i=u("./_core"),S=u("./_ctx"),_=u("./_hide"),y=u("./_has"),p="prototype",d=function(o,s,l){var a=o&d.F,g=o&d.G,m=o&d.S,v=o&d.P,w=o&d.B,E=o&d.W,k=g?i:i[s]||(i[s]={}),T=k[p],D=g?h:m?h[s]:(h[s]||{})[p],I,B,N;g&&(l=s);for(I in l){if(B=!a&&D&&D[I]!==void 0,B&&y(k,I))continue;N=B?D[I]:l[I],k[I]=g&&typeof D[I]!="function"?l[I]:w&&B?S(N,h):E&&D[I]==N?function(x){var Y=function(V,P,F){if(this instanceof x){switch(arguments.length){case 0:return new x;case 1:return new x(V);case 2:return new x(V,P)}return new x(V,P,F)}return x.apply(this,arguments)};return Y[p]=x[p],Y}(N):v&&typeof N=="function"?S(Function.call,N):N,v&&((k.virtual||(k.virtual={}))[I]=N,o&d.R&&T&&!T[I]&&_(T,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(i){return!0}}},{}],109:[function(u,G,c){var h=u("./_ctx"),i=u("./_iter-call"),S=u("./_is-array-iter"),_=u("./_an-object"),y=u("./_to-length"),p=u("./core.get-iterator-method"),d={},o={},c=G.exports=function(s,l,a,g,m){var v=m?function(){return s}:p(s),w=h(a,g,l?2:1),E=0,k,T,D,I;if(typeof v!="function")throw TypeError(s+" is not iterable!");if(S(v)){for(k=y(s.length);k>E;E++)if(I=l?w(_(T=s[E])[0],T[1]):w(s[E]),I===d||I===o)return I}else for(D=v.call(s);!(T=D.next()).done;)if(I=i(D,w,T.value,l),I===d||I===o)return I};c.BREAK=d,c.RETURN=o},{"./_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(i,S){return h.call(i,S)}},{}],112:[function(u,G,c){var h=u("./_object-dp"),i=u("./_property-desc");G.exports=u("./_descriptors")?function(S,_,y){return h.f(S,_,i(1,y))}:function(S,_,y){return S[_]=y,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,i,S){var _=S===void 0;switch(i.length){case 0:return _?h():h.call(S);case 1:return _?h(i[0]):h.call(S,i[0]);case 2:return _?h(i[0],i[1]):h.call(S,i[0],i[1]);case 3:return _?h(i[0],i[1],i[2]):h.call(S,i[0],i[1],i[2]);case 4:return _?h(i[0],i[1],i[2],i[3]):h.call(S,i[0],i[1],i[2],i[3])}return h.apply(S,i)}},{}],116:[function(u,G,c){var h=u("./_cof");G.exports=Object("z").propertyIsEnumerable(0)?Object:function(i){return h(i)=="String"?i.split(""):Object(i)}},{"./_cof":98}],117:[function(u,G,c){var h=u("./_iterators"),i=u("./_wks")("iterator"),S=Array.prototype;G.exports=function(_){return _!==void 0&&(h.Array===_||S[i]===_)}},{"./_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(i,S,_,y){try{return y?S(h(_)[0],_[1]):S(_)}catch(d){var p=i.return;throw p!==void 0&&h(p.call(i)),d}}},{"./_an-object":95}],121:[function(u,G,c){"use strict";var h=u("./_object-create"),i=u("./_property-desc"),S=u("./_set-to-string-tag"),_={};u("./_hide")(_,u("./_wks")("iterator"),function(){return this}),G.exports=function(y,p,d){y.prototype=h(_,{next:i(1,d)}),S(y,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"),i=u("./_export"),S=u("./_redefine"),_=u("./_hide"),y=u("./_iterators"),p=u("./_iter-create"),d=u("./_set-to-string-tag"),o=u("./_object-gpo"),s=u("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),a="@@iterator",g="keys",m="values",v=function(){return this};G.exports=function(w,E,k,T,D,I,B){p(k,E,T);var N=function(J){if(!l&&J in P)return P[J];switch(J){case g:return function(){return new k(this,J)};case m:return function(){return new k(this,J)}}return function(){return new k(this,J)}},x=E+" Iterator",Y=D==m,V=!1,P=w.prototype,F=P[s]||P[a]||D&&P[D],X=F||N(D),Q=D?Y?N("entries"):X:void 0,ce=E=="Array"&&P.entries||F,fe,z,se;if(ce&&(se=o(ce.call(new w)),se!==Object.prototype&&se.next&&(d(se,x,!0),!h&&typeof se[s]!="function"&&_(se,s,v))),Y&&F&&F.name!==m&&(V=!0,X=function(){return F.call(this)}),(!h||B)&&(l||V||!P[s])&&_(P,s,X),y[E]=X,y[x]=v,D)if(fe={values:Y?X:N(m),keys:I?X:N(g),entries:Q},B)for(z in fe)z in P||S(P,z,fe[z]);else i(i.P+i.F*(l||V),E,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"),i=!1;try{var S=[7][h]();S.return=function(){i=!0},Array.from(S,function(){throw 2})}catch(_){}G.exports=function(_,y){if(!y&&!i)return!1;var p=!1;try{var d=[7],o=d[h]();o.next=function(){return{done:p=!0}},d[h]=function(){return o},_(d)}catch(s){}return p}},{"./_wks":166}],124:[function(u,G,c){G.exports=function(h,i){return{value:i,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"),i=u("./_is-object"),S=u("./_has"),_=u("./_object-dp").f,y=0,p=Object.isExtensible||function(){return!0},d=!u("./_fails")(function(){return p(Object.preventExtensions({}))}),o=function(m){_(m,h,{value:{i:"O"+ ++y,w:{}}})},s=function(m,v){if(!i(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";o(m)}return m[h].i},l=function(m,v){if(!S(m,h)){if(!p(m))return!0;if(!v)return!1;o(m)}return m[h].w},a=function(m){return d&&g.NEED&&p(m)&&!S(m,h)&&o(m),m},g=G.exports={KEY:h,NEED:!1,fastKey:s,getWeak:l,onFreeze:a}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(u,G,c){var h=u("./_global"),i=u("./_task").set,S=h.MutationObserver||h.WebKitMutationObserver,_=h.process,y=h.Promise,p=u("./_cof")(_)=="process";G.exports=function(){var d,o,s,l=function(){var v,w;for(p&&(v=_.domain)&&v.exit();d;){w=d.fn,d=d.next;try{w()}catch(E){throw d?s():o=void 0,E}}o=void 0,v&&v.enter()};if(p)s=function(){_.nextTick(l)};else if(S&&!(h.navigator&&h.navigator.standalone)){var a=!0,g=document.createTextNode("");new S(l).observe(g,{characterData:!0}),s=function(){g.data=a=!a}}else if(y&&y.resolve){var m=y.resolve(void 0);s=function(){m.then(l)}}else s=function(){i.call(h,l)};return function(v){var w={fn:v,next:void 0};o&&(o.next=w),d||(d=w,s()),o=w}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(u,G,c){"use strict";var h=u("./_a-function");function i(S){var _,y;this.promise=new S(function(p,d){if(_!==void 0||y!==void 0)throw TypeError("Bad Promise constructor");_=p,y=d}),this.resolve=h(_),this.reject=h(y)}G.exports.f=function(S){return new i(S)}},{"./_a-function":92}],130:[function(u,G,c){"use strict";var h=u("./_descriptors"),i=u("./_object-keys"),S=u("./_object-gops"),_=u("./_object-pie"),y=u("./_to-object"),p=u("./_iobject"),d=Object.assign;G.exports=!d||u("./_fails")(function(){var o={},s={},l=Symbol(),a="abcdefghijklmnopqrst";return o[l]=7,a.split("").forEach(function(g){s[g]=g}),d({},o)[l]!=7||Object.keys(d({},s)).join("")!=a})?function(s,l){for(var a=y(s),g=arguments.length,m=1,v=S.f,w=_.f;g>m;)for(var E=p(arguments[m++]),k=v?i(E).concat(v(E)):i(E),T=k.length,D=0,I;T>D;)I=k[D++],(!h||w.call(E,I))&&(a[I]=E[I]);return a}: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"),i=u("./_object-dps"),S=u("./_enum-bug-keys"),_=u("./_shared-key")("IE_PROTO"),y=function(){},p="prototype",d=function(){var o=u("./_dom-create")("iframe"),s=S.length,l="<",a=">",g;for(o.style.display="none",u("./_html").appendChild(o),o.src="javascript:",g=o.contentWindow.document,g.open(),g.write(l+"script"+a+"document.F=Object"+l+"/script"+a),g.close(),d=g.F;s--;)delete d[p][S[s]];return d()};G.exports=Object.create||function(s,l){var a;return s!==null?(y[p]=h(s),a=new y,y[p]=null,a[_]=s):a=d(),l===void 0?a:i(a,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"),i=u("./_ie8-dom-define"),S=u("./_to-primitive"),_=Object.defineProperty;c.f=u("./_descriptors")?Object.defineProperty:function(p,d,o){if(h(p),d=S(d,!0),h(o),i)try{return _(p,d,o)}catch(s){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");return"value"in o&&(p[d]=o.value),p}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(u,G,c){var h=u("./_object-dp"),i=u("./_an-object"),S=u("./_object-keys");G.exports=u("./_descriptors")?Object.defineProperties:function(y,p){i(y);for(var d=S(p),o=d.length,s=0,l;o>s;)h.f(y,l=d[s++],p[l]);return y}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(u,G,c){var h=u("./_object-pie"),i=u("./_property-desc"),S=u("./_to-iobject"),_=u("./_to-primitive"),y=u("./_has"),p=u("./_ie8-dom-define"),d=Object.getOwnPropertyDescriptor;c.f=u("./_descriptors")?d:function(s,l){if(s=S(s),l=_(l,!0),p)try{return d(s,l)}catch(a){}if(y(s,l))return i(!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"),i=u("./_object-gopn").f,S={}.toString,_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y=function(p){try{return i(p)}catch(d){return _.slice()}};G.exports.f=function(d){return _&&S.call(d)=="[object Window]"?y(d):i(h(d))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(u,G,c){var h=u("./_object-keys-internal"),i=u("./_enum-bug-keys").concat("length","prototype");c.f=Object.getOwnPropertyNames||function(_){return h(_,i)}},{"./_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"),i=u("./_to-object"),S=u("./_shared-key")("IE_PROTO"),_=Object.prototype;G.exports=Object.getPrototypeOf||function(y){return y=i(y),h(y,S)?y[S]:typeof y.constructor=="function"&&y instanceof y.constructor?y.constructor.prototype:y instanceof Object?_:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(u,G,c){var h=u("./_has"),i=u("./_to-iobject"),S=u("./_array-includes")(!1),_=u("./_shared-key")("IE_PROTO");G.exports=function(y,p){var d=i(y),o=0,s=[],l;for(l in d)l!=_&&(h(d,l)&&s.push(l));for(;p.length>o;)h(d,l=p[o++])&&(~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"),i=u("./_enum-bug-keys");G.exports=Object.keys||function(_){return h(_,i)}},{"./_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"),i=u("./_core"),S=u("./_fails");G.exports=function(_,y){var p=(i.Object||{})[_]||Object[_],d={};d[_]=y(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"),i=u("./_object-keys"),S=u("./_to-iobject"),_=u("./_object-pie").f;G.exports=function(y){return function(p){for(var d=S(p),o=i(d),s=o.length,l=0,a=[],g;s>l;)g=o[l++],(!h||_.call(d,g))&&a.push(y?[g,d[g]]:d[g]);return a}}},{"./_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(i){return{e:!0,v:i}}}},{}],145:[function(u,G,c){var h=u("./_an-object"),i=u("./_is-object"),S=u("./_new-promise-capability");G.exports=function(_,y){if(h(_),i(y)&&y.constructor===_)return y;var p=S.f(_),d=p.resolve;return d(y),p.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(u,G,c){G.exports=function(h,i){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:i}}},{}],147:[function(u,G,c){var h=u("./_hide");G.exports=function(i,S,_){for(var y in S)_&&i[y]?i[y]=S[y]:h(i,y,S[y]);return i}},{"./_hide":112}],148:[function(u,G,c){G.exports=u("./_hide")},{"./_hide":112}],149:[function(u,G,c){"use strict";var h=u("./_global"),i=u("./_core"),S=u("./_object-dp"),_=u("./_descriptors"),y=u("./_wks")("species");G.exports=function(p){var d=typeof i[p]=="function"?i[p]:h[p];_&&d&&!d[y]&&S.f(d,y,{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,i=u("./_has"),S=u("./_wks")("toStringTag");G.exports=function(_,y,p){_&&!i(_=p?_:_.prototype,S)&&h(_,S,{configurable:!0,value:y})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(u,G,c){var h=u("./_shared")("keys"),i=u("./_uid");G.exports=function(S){return h[S]||(h[S]=i(S))}},{"./_shared":152,"./_uid":162}],152:[function(u,G,c){var h=u("./_core"),i=u("./_global"),S="__core-js_shared__",_=i[S]||(i[S]={});(G.exports=function(y,p){return _[y]||(_[y]=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"),i=u("./_a-function"),S=u("./_wks")("species");G.exports=function(_,y){var p=h(_).constructor,d;return p===void 0||(d=h(p)[S])==null?y:i(d)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(u,G,c){var h=u("./_to-integer"),i=u("./_defined");G.exports=function(S){return function(_,y){var p=String(i(_)),d=h(y),o=p.length,s,l;return d<0||d>=o?S?"":void 0:(s=p.charCodeAt(d),s<55296||s>56319||d+1===o||(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"),i=u("./_invoke"),S=u("./_html"),_=u("./_dom-create"),y=u("./_global"),p=y.process,d=y.setImmediate,o=y.clearImmediate,s=y.MessageChannel,l=y.Dispatch,a=0,g={},m="onreadystatechange",v,w,E,k=function(){var D=+this;if(g.hasOwnProperty(D)){var I=g[D];delete g[D],I()}},T=function(D){k.call(D.data)};(!d||!o)&&(d=function(I){for(var B=[],N=1;arguments.length>N;)B.push(arguments[N++]);return g[++a]=function(){i(typeof I=="function"?I:Function(I),B)},v(a),a},o=function(I){delete g[I]},u("./_cof")(p)=="process"?v=function(D){p.nextTick(h(k,D,1))}:l&&l.now?v=function(D){l.now(h(k,D,1))}:s?(w=new s,E=w.port2,w.port1.onmessage=T,v=h(E.postMessage,E,1)):y.addEventListener&&typeof postMessage=="function"&&!y.importScripts?(v=function(D){y.postMessage(D+"","*")},y.addEventListener("message",T,!1)):m in _("script")?v=function(D){S.appendChild(_("script"))[m]=function(){S.removeChild(this),k.call(D)}}:v=function(D){setTimeout(h(k,D,1),0)}),G.exports={set:d,clear:o}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(u,G,c){var h=u("./_to-integer"),i=Math.max,S=Math.min;G.exports=function(_,y){return _=h(_),_<0?i(_+y,0):S(_,y)}},{"./_to-integer":157}],157:[function(u,G,c){var h=Math.ceil,i=Math.floor;G.exports=function(S){return isNaN(S=+S)?0:(S>0?i:h)(S)}},{}],158:[function(u,G,c){var h=u("./_iobject"),i=u("./_defined");G.exports=function(S){return h(i(S))}},{"./_defined":102,"./_iobject":116}],159:[function(u,G,c){var h=u("./_to-integer"),i=Math.min;G.exports=function(S){return S>0?i(h(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(u,G,c){var h=u("./_defined");G.exports=function(i){return Object(h(i))}},{"./_defined":102}],161:[function(u,G,c){var h=u("./_is-object");G.exports=function(i,S){if(!h(i))return i;var _,y;if(S&&typeof(_=i.toString)=="function"&&!h(y=_.call(i)))return y;if(typeof(_=i.valueOf)=="function"&&!h(y=_.call(i)))return y;if(!S&&typeof(_=i.toString)=="function"&&!h(y=_.call(i)))return y;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(u,G,c){var h=0,i=Math.random();G.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++h+i).toString(36))}},{}],163:[function(u,G,c){var h=u("./_global"),i=h.navigator;G.exports=i&&i.userAgent||""},{"./_global":110}],164:[function(u,G,c){var h=u("./_global"),i=u("./_core"),S=u("./_library"),_=u("./_wks-ext"),y=u("./_object-dp").f;G.exports=function(p){var d=i.Symbol||(i.Symbol=S?{}:h.Symbol||{});p.charAt(0)!="_"&&!(p in d)&&y(d,p,{value:_.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"),i=u("./_uid"),S=u("./_global").Symbol,_=typeof S=="function",y=G.exports=function(p){return h[p]||(h[p]=_&&S[p]||(_?S:i)("Symbol."+p))};y.store=h},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(u,G,c){var h=u("./_classof"),i=u("./_wks")("iterator"),S=u("./_iterators");G.exports=u("./_core").getIteratorMethod=function(_){if(_!=null)return _[i]||_["@@iterator"]||S[h(_)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(u,G,c){"use strict";var h=u("./_ctx"),i=u("./_export"),S=u("./_to-object"),_=u("./_iter-call"),y=u("./_is-array-iter"),p=u("./_to-length"),d=u("./_create-property"),o=u("./core.get-iterator-method");i(i.S+i.F*!u("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(l){var a=S(l),g=typeof this=="function"?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,w=v!==void 0,E=0,k=o(a),T,D,I,B;if(w&&(v=h(v,m>2?arguments[2]:void 0,2)),k!=null&&!(g==Array&&y(k)))for(B=k.call(a),D=new g;!(I=B.next()).done;E++)d(D,E,w?_(B,v,[I.value,E],!0):I.value);else for(T=p(a.length),D=new g(T);T>E;E++)d(D,E,w?v(a[E],E):a[E]);return D.length=E,D}})},{"./_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"),i=u("./_iter-step"),S=u("./_iterators"),_=u("./_to-iobject");G.exports=u("./_iter-define")(Array,"Array",function(y,p){this._t=_(y),this._i=0,this._k=p},function(){var y=this._t,p=this._k,d=this._i++;return!y||d>=y.length?(this._t=void 0,i(1)):p=="keys"?i(0,d):p=="values"?i(0,y[d]):i(0,[d,y[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"),i=u("./_object-gpo"),S=u("./_wks")("hasInstance"),_=Function.prototype;S in _||u("./_object-dp").f(_,S,{value:function(y){if(typeof this!="function"||!h(y))return!1;if(!h(this.prototype))return y instanceof this;for(;y=i(y);)if(this.prototype===y)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"),i=u("./_object-gpo");u("./_object-sap")("getPrototypeOf",function(){return function(_){return i(h(_))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(u,G,c){var h=u("./_to-object"),i=u("./_object-keys");u("./_object-sap")("keys",function(){return function(_){return i(h(_))}})},{"./_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"),i=u("./_global"),S=u("./_ctx"),_=u("./_classof"),y=u("./_export"),p=u("./_is-object"),d=u("./_a-function"),o=u("./_an-instance"),s=u("./_for-of"),l=u("./_species-constructor"),a=u("./_task").set,g=u("./_microtask")(),m=u("./_new-promise-capability"),v=u("./_perform"),w=u("./_user-agent"),E=u("./_promise-resolve"),k="Promise",T=i.TypeError,D=i.process,I=D&&D.versions,B=I&&I.v8||"",N=i[k],x=_(D)=="process",Y=function(){},V,P,F,X,Q=P=m.f,ce=!!function(){try{var C=N.resolve(1),M=(C.constructor={})[u("./_wks")("species")]=function(le){le(Y,Y)};return(x||typeof PromiseRejectionEvent=="function")&&C.then(Y)instanceof M&&B.indexOf("6.6")!==0&&w.indexOf("Chrome/66")===-1}catch(le){}}(),fe=function(C){var M;return p(C)&&typeof(M=C.then)=="function"?M:!1},z=function(C,M){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,ne=ae.domain,Z,ue,K;try{pe?(ve||(C._h==2&&j(C),C._h=1),pe===!0?Z=he:(ne&&ne.enter(),Z=pe(he),ne&&(ne.exit(),K=!0)),Z===ae.promise?ee(T("Promise-chain cycle")):(ue=fe(Z))?ue.call(Z,me,ee):me(Z)):ee(he)}catch($){ne&&!K&&ne.exit(),ee($)}};le.length>Ee;)Se(le[Ee++]);C._c=[],C._n=!1,M&&!C._h&&se(C)})},se=function(C){a.call(i,function(){var M=C._v,le=J(C),he,ve,Ee;if(le&&(he=v(function(){x?D.emit("unhandledRejection",M,C):(ve=i.onunhandledrejection)?ve({promise:C,reason:M}):(Ee=i.console)&&Ee.error&&Ee.error("Unhandled promise rejection",M)}),C._h=x||J(C)?2:1),C._a=void 0,le&&he.e)throw he.v})},J=function(C){return C._h!==1&&(C._a||C._c).length===0},j=function(C){a.call(i,function(){var M;x?D.emit("rejectionHandled",C):(M=i.onrejectionhandled)&&M({promise:C,reason:C._v})})},U=function(C){var M=this;if(M._d)return;M._d=!0,M=M._w||M,M._v=C,M._s=2,M._a||(M._a=M._c.slice()),z(M,!0)},R=function(C){var M=this,le;if(M._d)return;M._d=!0,M=M._w||M;try{if(M===C)throw T("Promise can't be resolved itself");(le=fe(C))?g(function(){var he={_w:M,_d:!1};try{le.call(C,S(R,he,1),S(U,he,1))}catch(ve){U.call(he,ve)}}):(M._v=C,M._s=1,z(M,!1))}catch(he){U.call({_w:M,_d:!1},he)}};ce||(N=function(M){o(this,N,k,"_h"),d(M),V.call(this);try{M(S(R,this,1),S(U,this,1))}catch(le){U.call(this,le)}},V=function(M){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},V.prototype=u("./_redefine-all")(N.prototype,{then:function(M,le){var he=Q(l(this,N));return he.ok=typeof M=="function"?M:!0,he.fail=typeof le=="function"&&le,he.domain=x?D.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 V;this.promise=C,this.resolve=S(R,C,1),this.reject=S(U,C,1)},m.f=Q=function(C){return C===N||C===X?new F(C):P(C)}),y(y.G+y.W+y.F*!ce,{Promise:N}),u("./_set-to-string-tag")(N,k),u("./_set-species")(k),X=u("./_core")[k],y(y.S+y.F*!ce,k,{reject:function(M){var le=Q(this),he=le.reject;return he(M),le.promise}}),y(y.S+y.F*(h||!ce),k,{resolve:function(M){return E(h&&this===X?N:this,M)}}),y(y.S+y.F*!(ce&&u("./_iter-detect")(function(C){N.all(C).catch(Y)})),k,{all:function(M){var le=this,he=Q(le),ve=he.resolve,Ee=he.reject,Se=v(function(){var ae=[],pe=0,me=1;s(M,!1,function(ee){var ne=pe++,Z=!1;ae.push(void 0),me++,le.resolve(ee).then(function(ue){if(Z)return;Z=!0,ae[ne]=ue,--me||ve(ae)},Ee)}),--me||ve(ae)});return Se.e&&Ee(Se.v),he.promise},race:function(M){var le=this,he=Q(le),ve=he.reject,Ee=v(function(){s(M,!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"),i=u("./_to-absolute-index"),S=String.fromCharCode,_=String.fromCodePoint;h(h.S+h.F*(!!_&&_.length!=1),"String",{fromCodePoint:function(p){for(var d=[],o=arguments.length,s=0,l;o>s;){if(l=+arguments[s++],i(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(i){this._t=String(i),this._i=0},function(){var i=this._t,S=this._i,_;return S>=i.length?{value:void 0,done:!0}:(_=h(i,S),this._i+=_.length,{value:_,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(u,G,c){"use strict";var h=u("./_global"),i=u("./_has"),S=u("./_descriptors"),_=u("./_export"),y=u("./_redefine"),p=u("./_meta").KEY,d=u("./_fails"),o=u("./_shared"),s=u("./_set-to-string-tag"),l=u("./_uid"),a=u("./_wks"),g=u("./_wks-ext"),m=u("./_wks-define"),v=u("./_enum-keys"),w=u("./_is-array"),E=u("./_an-object"),k=u("./_is-object"),T=u("./_to-object"),D=u("./_to-iobject"),I=u("./_to-primitive"),B=u("./_property-desc"),N=u("./_object-create"),x=u("./_object-gopn-ext"),Y=u("./_object-gopd"),V=u("./_object-gops"),P=u("./_object-dp"),F=u("./_object-keys"),X=Y.f,Q=P.f,ce=x.f,fe=h.Symbol,z=h.JSON,se=z&&z.stringify,J="prototype",j=a("_hidden"),U=a("toPrimitive"),R={}.propertyIsEnumerable,C=o("symbol-registry"),M=o("symbols"),le=o("op-symbols"),he=Object[J],ve=typeof fe=="function"&&!!V.f,Ee=h.QObject,Se=!Ee||!Ee[J]||!Ee[J].findChild,ae=S&&d(function(){return N(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a!=7})?function(be,Oe,Be){var Fe=X(he,Oe);Fe&&delete he[Oe],Q(be,Oe,Be),Fe&&be!==he&&Q(he,Oe,Fe)}:Q,pe=function(be){var Oe=M[be]=N(fe[J]);return Oe._k=be,Oe},me=ve&&typeof fe.iterator=="symbol"?function(be){return typeof be=="symbol"}:function(be){return be instanceof fe},ee=function(Oe,Be,Fe){return Oe===he&&ee(le,Be,Fe),E(Oe),Be=I(Be,!0),E(Fe),i(M,Be)?(Fe.enumerable?(i(Oe,j)&&Oe[j][Be]&&(Oe[j][Be]=!1),Fe=N(Fe,{enumerable:B(0,!1)})):(i(Oe,j)||Q(Oe,j,B(1,{})),Oe[j][Be]=!0),ae(Oe,Be,Fe)):Q(Oe,Be,Fe)},ne=function(Oe,Be){E(Oe);for(var Fe=v(Be=D(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):ne(N(Oe),Be)},ue=function(Oe){var Be=R.call(this,Oe=I(Oe,!0));return this===he&&i(M,Oe)&&!i(le,Oe)?!1:Be||!i(this,Oe)||!i(M,Oe)||i(this,j)&&this[j][Oe]?Be:!0},K=function(Oe,Be){if(Oe=D(Oe),Be=I(Be,!0),Oe===he&&i(M,Be)&&!i(le,Be))return;var Fe=X(Oe,Be);return Fe&&i(M,Be)&&!(i(Oe,j)&&Oe[j][Be])&&(Fe.enumerable=!0),Fe},$=function(Oe){for(var Be=ce(D(Oe)),Fe=[],Ue=0,Ge;Be.length>Ue;)!i(M,Ge=Be[Ue++])&&Ge!=j&&Ge!=p&&Fe.push(Ge);return Fe},Ce=function(Oe){for(var Be=Oe===he,Fe=ce(Be?le:D(Oe)),Ue=[],Ge=0,Ye;Fe.length>Ge;)i(M,Ye=Fe[Ge++])&&(Be?i(he,Ye):!0)&&Ue.push(M[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),i(this,j)&&i(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)},y(fe[J],"toString",function(){return this._k}),Y.f=K,P.f=ee,u("./_object-gopn").f=x.f=$,u("./_object-pie").f=ue,V.f=Ce,S&&!u("./_library")&&y(he,"propertyIsEnumerable",ue,!0),g.f=function(be){return pe(a(be))}),_(_.G+_.W+_.F*!ve,{Symbol:fe});for(var q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),H=0;q.length>H;)a(q[H++]);for(var O=F(a.store),W=0;O.length>W;)m(O[W++]);_(_.S+_.F*!ve,"Symbol",{for:function(be){return i(C,be+="")?C[be]:C[be]=fe(be)},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}}),_(_.S+_.F*!ve,"Object",{create:Z,defineProperty:ee,defineProperties:ne,getOwnPropertyDescriptor:K,getOwnPropertyNames:$,getOwnPropertySymbols:Ce});var we=d(function(){V.f(1)});_(_.S+_.F*we,"Object",{getOwnPropertySymbols:function(Oe){return V.f(T(Oe))}}),z&&_(_.S+_.F*(!ve||d(function(){var be=fe();return se([be])!="[null]"||se({a:be})!="{}"||se(Object(be))!="{}"})),"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[J][U]||u("./_hide")(fe[J],U,fe[J].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"),i=u("./_object-to-array")(!0);h(h.S,"Object",{entries:function(_){return i(_)}})},{"./_export":107,"./_object-to-array":143}],183:[function(u,G,c){"use strict";var h=u("./_export"),i=u("./_core"),S=u("./_global"),_=u("./_species-constructor"),y=u("./_promise-resolve");h(h.P+h.R,"Promise",{finally:function(p){var d=_(this,i.Promise||S.Promise),o=typeof p=="function";return this.then(o?function(s){return y(d,p()).then(function(){return s})}:p,o?function(s){return y(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"),i=u("./_new-promise-capability"),S=u("./_perform");h(h.S,"Promise",{try:function(_){var y=i.f(this),p=S(_);return(p.e?y.reject:y.resolve)(p.v),y.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"),i=u("./_hide"),S=u("./_iterators"),_=u("./_wks")("toStringTag"),y="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<y.length;p++){var d=y[p],o=h[d],s=o&&o.prototype;s&&!s[_]&&i(s,_,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"),i=u("./_task");h(h.G+h.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":107,"./_task":155}],189:[function(u,G,c){(function(h){"use strict";var i=u("babel-runtime/helpers/typeof"),S=_(i);function _(I){return I&&I.__esModule?I:{default:I}}function y(I){return Array.isArray?Array.isArray(I):D(I)==="[object Array]"}c.isArray=y;function p(I){return typeof I=="boolean"}c.isBoolean=p;function d(I){return I===null}c.isNull=d;function o(I){return I==null}c.isNullOrUndefined=o;function s(I){return typeof I=="number"}c.isNumber=s;function l(I){return typeof I=="string"}c.isString=l;function a(I){return(typeof I=="undefined"?"undefined":(0,S.default)(I))==="symbol"}c.isSymbol=a;function g(I){return I===void 0}c.isUndefined=g;function m(I){return D(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 D(I)==="[object Date]"}c.isDate=w;function E(I){return D(I)==="[object Error]"||I instanceof Error}c.isError=E;function k(I){return typeof I=="function"}c.isFunction=k;function T(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=T,c.isBuffer=h.isBuffer;function D(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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(_){"use strict";var y=function(){var l=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,a=/\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,E){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(y.masks[v]||v||y.masks.default);var k=v.slice(0,4);(k==="UTC:"||k==="GMT:")&&(v=v.slice(4),w=!0,k==="GMT:"&&(E=!0));var T=w?"getUTC":"get",D=m[T+"Date"](),I=m[T+"Day"](),B=m[T+"Month"](),N=m[T+"FullYear"](),x=m[T+"Hours"](),Y=m[T+"Minutes"](),V=m[T+"Seconds"](),P=m[T+"Milliseconds"](),F=w?0:m.getTimezoneOffset(),X=d(m),Q=o(m),ce={d:D,dd:p(D),ddd:y.i18n.dayNames[I],dddd:y.i18n.dayNames[I+7],m:B+1,mm:p(B+1),mmm:y.i18n.monthNames[B],mmmm:y.i18n.monthNames[B+12],yy:String(N).slice(2),yyyy:N,h:x%12||12,hh:p(x%12||12),H:x,HH:p(x),M:Y,MM:p(Y),s:V,ss:p(V),l:p(P,3),L:p(Math.round(P/10)),t:x<12?"a":"p",tt:x<12?"am":"pm",T:x<12?"A":"P",TT:x<12?"AM":"PM",Z:E?"GMT":w?"UTC":(String(m).match(a)||[""]).pop().replace(g,""),o:(F>0?"-":"+")+p(Math.floor(Math.abs(F)/60)*100+Math.abs(F)%60,4),S:["th","st","nd","rd"][D%10>3?0:(D%100-D%10!=10)*D%10],W:X,N:Q};return v.replace(l,function(fe){return fe in ce?ce[fe]:fe.slice(1,fe.length-1)})}}();y.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"},y.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,a){for(l=String(l),a=a||2;l.length<a;)l="0"+l;return l}function d(l){var a=new Date(l.getFullYear(),l.getMonth(),l.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);var g=new Date(a.getFullYear(),0,4);g.setDate(g.getDate()-(g.getDay()+6)%7+3);var m=a.getTimezoneOffset()-g.getTimezoneOffset();a.setHours(a.getHours()-m);var v=(a-g)/(864e5*7);return 1+Math.floor(v)}function o(l){var a=l.getDay();return a===0&&(a=7),a}function s(l){return l===null?"null":l===void 0?"undefined":(typeof l=="undefined"?"undefined":(0,i.default)(l))!=="object"?typeof l=="undefined"?"undefined":(0,i.default)(l):Array.isArray(l)?"array":{}.toString.call(l).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return y}):(typeof c=="undefined"?"undefined":(0,i.default)(c))==="object"?G.exports=y:_.dateFormat=y})(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=i;function i(S){var _=""+S,y=h.exec(_);if(!y)return _;var p,d="",o=0,s=0;for(o=y.index;o<_.length;o++){switch(_.charCodeAt(o)){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!==o&&(d+=_.substring(s,o)),s=o+1,d+=p}return s!==o?d+_.substring(s,o):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,o,s,l,a,g;if(this._events||(this._events={}),p==="error"&&(!this._events.error||_(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(o=this._events[p],y(o))return!1;if(i(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),o.apply(this,l)}else if(_(o))for(l=Array.prototype.slice.call(arguments,1),g=o.slice(),s=g.length,a=0;a<s;a++)g[a].apply(this,l);return!0},h.prototype.addListener=function(p,d){var o;if(!i(d))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",p,i(d.listener)?d.listener:d),this._events[p]?_(this._events[p])?this._events[p].push(d):this._events[p]=[this._events[p],d]:this._events[p]=d,_(this._events[p])&&!this._events[p].warned&&(y(this._maxListeners)?o=h.defaultMaxListeners:o=this._maxListeners,o&&o>0&&this._events[p].length>o&&(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(!i(d))throw TypeError("listener must be a function");var o=!1;function s(){this.removeListener(p,s),o||(o=!0,d.apply(this,arguments))}return s.listener=d,this.on(p,s),this},h.prototype.removeListener=function(p,d){var o,s,l,a;if(!i(d))throw TypeError("listener must be a function");if(!this._events||!this._events[p])return this;if(o=this._events[p],l=o.length,s=-1,o===d||i(o.listener)&&o.listener===d)delete this._events[p],this._events.removeListener&&this.emit("removeListener",p,d);else if(_(o)){for(a=l;a-- >0;)if(o[a]===d||o[a].listener&&o[a].listener===d){s=a;break}if(s<0)return this;o.length===1?(o.length=0,delete this._events[p]):o.splice(s,1),this._events.removeListener&&this.emit("removeListener",p,d)}return this},h.prototype.removeAllListeners=function(p){var d,o;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(o=this._events[p],i(o))this.removeListener(p,o);else if(o)for(;o.length;)this.removeListener(p,o[o.length-1]);return delete this._events[p],this},h.prototype.listeners=function(p){var d;return!this._events||!this._events[p]?d=[]:i(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(i(d))return 1;if(d)return d.length}return 0},h.listenerCount=function(p,d){return p.listenerCount(d)};function i(p){return typeof p=="function"}function S(p){return typeof p=="number"}function _(p){return typeof p=="object"&&p!==null}function y(p){return p===void 0}},{}],193:[function(u,G,c){var h=u("http"),i=G.exports;for(var S in h)h.hasOwnProperty(S)&&(i[S]=h[S]);i.request=function(_,y){return _||(_={}),_.scheme="https",_.protocol="https:",h.request.call(this,_,y)}},{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"),i=u("ms");G.exports=function(S){if(typeof S=="number")return S;var _=i(S);if(_===void 0){var y=new Error(h.format("humanize-ms(%j) result undefined",S));console.warn(y.stack)}return _}},{ms:204,util:243}],195:[function(u,G,c){c.read=function(h,i,S,_,y){var p,d,o=y*8-_-1,s=(1<<o)-1,l=s>>1,a=-7,g=S?y-1:0,m=S?-1:1,v=h[i+g];for(g+=m,p=v&(1<<-a)-1,v>>=-a,a+=o;a>0;p=p*256+h[i+g],g+=m,a-=8);for(d=p&(1<<-a)-1,p>>=-a,a+=_;a>0;d=d*256+h[i+g],g+=m,a-=8);if(p===0)p=1-l;else{if(p===s)return d?NaN:(v?-1:1)*Infinity;d=d+Math.pow(2,_),p=p-l}return(v?-1:1)*d*Math.pow(2,p-_)},c.write=function(h,i,S,_,y,p){var d,o,s,l=p*8-y-1,a=(1<<l)-1,g=a>>1,m=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=_?0:p-1,w=_?1:-1,E=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===Infinity?(o=isNaN(i)?1:0,d=a):(d=Math.floor(Math.log(i)/Math.LN2),i*(s=Math.pow(2,-d))<1&&(d--,s*=2),d+g>=1?i+=m/s:i+=m*Math.pow(2,1-g),i*s>=2&&(d++,s/=2),d+g>=a?(o=0,d=a):d+g>=1?(o=(i*s-1)*Math.pow(2,y),d=d+g):(o=i*Math.pow(2,g-1)*Math.pow(2,y),d=0));y>=8;h[S+v]=o&255,v+=w,o/=256,y-=8);for(d=d<<y|o,l+=y;l>0;h[S+v]=d&255,v+=w,d/=256,l-=8);h[S+v-w]|=E*128}},{}],196:[function(u,G,c){typeof Object.create=="function"?G.exports=function(i,S){S&&(i.super_=S,i.prototype=Object.create(S.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(i,S){if(S){i.super_=S;var _=function(){};_.prototype=S.prototype,i.prototype=new _,i.prototype.constructor=i}}},{}],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)||i(S)||!!S._isBuffer)};function h(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function i(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(i){return h.call(i)=="[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),i=[fromCharCode(h>>>16),fromCharCode(h>>>8&255),fromCharCode(h&255)];return i.length-=[0,0,2,1][c],i.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=i;var h=Object.prototype.hasOwnProperty;function i(S,_,y){if(!S)throw new TypeError("argument dest is required");if(!_)throw new TypeError("argument src is required");return y===void 0&&(y=!0),Object.getOwnPropertyNames(_).forEach(function(d){if(!y&&h.call(S,d))return;var o=Object.getOwnPropertyDescriptor(_,d);Object.defineProperty(S,d,o)}),S}},{}],201:[function(u,G,c){"use strict";function h(){this._types=Object.create(null),this._extensions=Object.create(null);for(var i=0;i<arguments.length;i++)this.define(arguments[i]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}h.prototype.define=function(i,S){for(var _ in i){var y=i[_].map(function(o){return o.toLowerCase()});_=_.toLowerCase();for(var p=0;p<y.length;p++){var d=y[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 "'+_+'". Pass `force=true` to allow this, otherwise remove "'+d+'" from the list of extensions for "'+_+'".');this._types[d]=_}if(S||!this._extensions[_]){var d=y[0];this._extensions[_]=d[0]!="*"?d:d.substr(1)}}},h.prototype.getType=function(i){i=String(i);var S=i.replace(/^.*[/\\]/,"").toLowerCase(),_=S.replace(/^.*\./,"").toLowerCase(),y=S.length<i.length,p=_.length<S.length-1;return(p||!y)&&this._types[_]||null},h.prototype.getExtension=function(i){return i=/^\s*([^;\s]*)/.test(i)&&RegExp.$1,i&&this._extensions[i.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,i=h*60,S=i*60,_=S*24,y=_*7,p=_*365.25;G.exports=function(a,g){g=g||{};var m=typeof a;if(m==="string"&&a.length>0)return d(a);if(m==="number"&&isFinite(a))return g.long?s(a):o(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function d(a){if(a=String(a),a.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(a);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*y;case"days":case"day":case"d":return m*_;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*i;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 o(a){var g=Math.abs(a);return g>=_?Math.round(a/_)+"d":g>=S?Math.round(a/S)+"h":g>=i?Math.round(a/i)+"m":g>=h?Math.round(a/h)+"s":a+"ms"}function s(a){var g=Math.abs(a);return g>=_?l(a,g,_,"day"):g>=S?l(a,g,S,"hour"):g>=i?l(a,g,i,"minute"):g>=h?l(a,g,h,"second"):a+" ms"}function l(a,g,m,v){var w=g>=m*1.5;return Math.round(a/m)+" "+v+(w?"s":"")}},{}],205:[function(u,G,c){(function(h){function i(p,d){for(var o=0,s=p.length-1;s>=0;s--){var l=p[s];l==="."?p.splice(s,1):l===".."?(p.splice(s,1),o++):o&&(p.splice(s,1),o--)}if(d)for(;o--;o)p.unshift("..");return p}c.resolve=function(){for(var p="",d=!1,o=arguments.length-1;o>=-1&&!d;o--){var s=o>=0?arguments[o]: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=i(_(p.split("/"),function(l){return!!l}),!d).join("/"),(d?"/":"")+p||"."},c.normalize=function(p){var d=c.isAbsolute(p),o=y(p,-1)==="/";return p=i(_(p.split("/"),function(s){return!!s}),!d).join("/"),!p&&!d&&(p="."),p&&o&&(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(_(p,function(d,o){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 o(w){for(var E=0;E<w.length&&!(w[E]!=="");E++);for(var k=w.length-1;k>=0&&!(w[k]!=="");k--);return E>k?[]:w.slice(E,k-E+1)}for(var s=o(p.split("/")),l=o(d.split("/")),a=Math.min(s.length,l.length),g=a,m=0;m<a;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),o=d===47,s=-1,l=!0,a=p.length-1;a>=1;--a)if(d=p.charCodeAt(a),d===47){if(!l){s=a;break}}else l=!1;return s===-1?o?"/":".":o&&s===1?"/":p.slice(0,s)};function S(p){typeof p!="string"&&(p=p+"");var d=0,o=-1,s=!0,l;for(l=p.length-1;l>=0;--l)if(p.charCodeAt(l)===47){if(!s){d=l+1;break}}else o===-1&&(s=!1,o=l+1);return o===-1?"":p.slice(d,o)}c.basename=function(p,d){var o=S(p);return d&&o.substr(-1*d.length)===d&&(o=o.substr(0,o.length-d.length)),o},c.extname=function(p){typeof p!="string"&&(p=p+"");for(var d=-1,o=0,s=-1,l=!0,a=0,g=p.length-1;g>=0;--g){var m=p.charCodeAt(g);if(m===47){if(!l){o=g+1;break}continue}s===-1&&(l=!1,s=g+1),m===46?d===-1?d=g:a!==1&&(a=1):d!==-1&&(a=-1)}return d===-1||s===-1||a===0||a===1&&d===s-1&&d===o+1?"":p.slice(d,s)};function _(p,d){if(p.filter)return p.filter(d);for(var o=[],s=0;s<p.length;s++)d(p[s],s,p)&&o.push(p[s]);return o}var y="ab".substr(-1)==="b"?function(p,d,o){return p.substr(d,o)}:function(p,d,o){return d<0&&(d=p.length+d),p.substr(d,o)}}).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 i={function:!0,object:!0},S=i[typeof window]&&window||this,_=S,y=i[typeof c]&&c,p=i[typeof G]&&G&&!G.nodeType&&G,d=y&&p&&typeof h=="object"&&h;d&&(d.global===d||d.window===d||d.self===d)&&(S=d);var o=Math.pow(2,53)-1,s=/\bOpera/,l=this,a=Object.prototype,g=a.hasOwnProperty,m=a.toString;function v(P){return P=String(P),P.charAt(0).toUpperCase()+P.slice(1)}function w(P,F,X){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&&X&&/^Win/i.test(P)&&!/^Windows Phone /i.test(P)&&(Q=Q[/[\d.]+$/.exec(P)])&&(P="Windows "+Q),P=String(P),F&&X&&(P=P.replace(RegExp(F,"i"),X)),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 E(P,F){var X=-1,Q=P?P.length:0;if(typeof Q=="number"&&Q>-1&&Q<=o)for(;++X<Q;)F(P[X],X,P);else T(P,F)}function k(P){return P=x(P),/^(?:webOS|i(?:OS|P))/.test(P)?P:v(P)}function T(P,F){for(var X in P)g.call(P,X)&&F(P[X],X,P)}function D(P){return P==null?v(P):m.call(P).slice(8,-1)}function I(P,F){var X=P!=null?typeof P[F]:"number";return!/^(?:boolean|number|string|undefined)$/.test(X)&&(X=="object"?!!P[F]:!0)}function B(P){return String(P).replace(/([ -])(?!$)/g,"$1?")}function N(P,F){var X=null;return E(P,function(Q,ce){X=F(X,Q,ce,P)}),X}function x(P){return String(P).replace(/^ +| +$/g,"")}function Y(P){var F=S,X=P&&typeof P=="object"&&D(P)!="String";X&&(F=P,P=null);var Q=F.navigator||{},ce=Q.userAgent||"";P||(P=ce);var fe=X||l==_,z=X?!!Q.likeChrome:/\bChrome\b/.test(P)&&!/internal|\n/i.test(m.toString()),se="Object",J=X?se:"ScriptBridgingProxyObject",j=X?se:"Environment",U=X&&F.java?"JavaPackage":D(F.java),R=X?se:"RuntimeObject",C=/\bJava/.test(U)&&F.java,M=C&&D(F.environment)==j,le=C?"a":"\u03B1",he=C?"b":"\u03B2",ve=F.document||{},Ee=F.operamini||F.opera,Se=s.test(Se=X&&Ee?Ee["[[Class]]"]:D(Ee))?Se:Ee=null,ae,pe=P,me=[],ee=null,ne=P==ce,Z=ne&&Ee&&typeof Ee.version=="function"&&Ee.version(),ue,K=O([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),$=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=be(["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 O(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 be(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(K&&(K=[K]),q&&!Ce&&(Ce=Oe([q])),(ae=/\bGoogle TV\b/.exec(Ce))&&(Ce=ae[0]),/\bSimulator\b/i.test(P)&&(Ce=(Ce?Ce+" ":"")+"Simulator"),$=="Opera Mini"&&/\bOPiOS\b/.test(P)&&me.push("running in Turbo/Uncompressed mode"),$=="IE"&&/\blike iPhone OS\b/.test(P)?(ae=Y(P.replace(/like iPhone OS/,"")),q=ae.manufacturer,Ce=ae.product):/^iP/.test(Ce)?($||($="Safari"),H="iOS"+((ae=/ OS ([\d_]+)/i.exec(P))?" "+ae[1].replace(/_/g,"."):"")):$=="Konqueror"&&!/buntu/i.test(H)?H="Kubuntu":q&&q!="Google"&&(/Chrome/.test($)&&!/\bMobile Safari\b/i.test(P)||/\bVita\b/.test(Ce))||/\bAndroid\b/.test(H)&&/^Chrome/.test($)&&/\bVersion\//i.test(P)?($="Android Browser",H=/\bAndroid\b/.test(H)?H:"Android"):$=="Silk"?(/\bMobi/i.test(P)||(H="Android",me.unshift("desktop mode")),/Accelerated *= *true/i.test(P)&&me.unshift("accelerated")):$=="PaleMoon"&&(ae=/\bFirefox\/([\d.]+)\b/.exec(P))?me.push("identifying as Firefox "+ae[1]):$=="Firefox"&&(ae=/\b(Mobile|Tablet|TV)\b/i.exec(P))?(H||(H="Firefox OS"),Ce||(Ce=ae[1])):!$||(ae=!/\bMinefield\b/i.test(P)&&/\b(?:Firefox|Safari)\b/.exec($))?($&&!Ce&&/[\/,]|^[^(]+?\)/.test(P.slice(P.indexOf(ae+"/")+8))&&($=null),(ae=Ce||q||H)&&(Ce||q||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(H))&&($=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(H)?H:ae)+" Browser")):$=="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($),"(?:Firefox|Minefield|NetFront)"])),(ae=K=="iCab"&&parseFloat(Z)>3&&"WebKit"||/\bOpera\b/.test($)&&(/\bOPR\b/.test(P)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(P)&&!/^(?:Trident|EdgeHTML)$/.test(K)&&"WebKit"||!K&&/\bMSIE\b/i.test(P)&&(H=="Mac OS"?"Tasman":"Trident")||K=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test($)&&"NetFront")&&(K=[ae]),$=="IE"&&(ae=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(P)||0)[1])?($+=" Mobile",H="Windows Phone "+(/\+$/.test(ae)?ae:ae+".x"),me.unshift("desktop mode")):/\bWPDesktop\b/i.test(P)?($="IE Mobile",H="Windows Phone 8.x",me.unshift("desktop mode"),Z||(Z=(/\brv:([\d.]+)/.exec(P)||0)[1])):$!="IE"&&K=="Trident"&&(ae=/\brv:([\d.]+)/.exec(P))&&($&&me.push("identifying as "+$+(Z?" "+Z:"")),$="IE",Z=ae[1]),ne){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")),M){try{Z=F.require("ringo/engine").version.join("."),$="RingoJS"}catch(Ge){(ae=F.system)&&ae.global.system==F.system&&($="Narwhal",H||(H=ae[0].os||null))}$||($="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),$="Electron",Z=ae.versions.electron):typeof ae.versions.nw=="string"&&(me.push("Chromium "+Z,"Node "+ae.versions.node),$="NW.js",Z=ae.versions.nw)),$||($="Node.js",pe=ae.arch,H=ae.platform,Z=/[\d.]+/.exec(ae.version),Z=Z?Z[0]:null));else D(ae=F.runtime)==J?($="Adobe AIR",H=ae.flash.system.Capabilities.os):D(ae=F.phantom)==R?($="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"),K&&(K[1]=""),Z[1]=ae),Z=$=="IE"?String(Z[1].toFixed(1)):Z[0]):typeof ve.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test($)&&(me.push("masking as "+$+" "+Z),$="IE",Z="11.0",K=["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+";"+(ne&&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)||"")),$=="Fennec"||$=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(H))$="Firefox Mobile";else if($=="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($)||$&&!Ce&&!/Browser|Mobi/.test($))&&(H=="Windows CE"||/Mobi/i.test(P)))$+=" Mobile";else if($=="IE"&&ne)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!=T&&Ce!="Wii"&&(ne&&Ee||/Opera/.test($)&&/\b(?:MSIE|Firefox)\b/i.test(P)||$=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(H)||$=="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(T,P.replace(s,"")+";"))&&ae.name&&(ae="ing as "+ae.name+((ae=ae.version)?" "+ae:""),s.test($)?(/\bIE\b/.test(ae)&&H=="Mac OS"&&(H=null),ae="identify"+ae):(ae="mask"+ae,Se?$=k(Se.replace(/([a-z])([A-Z])/g,"$1 $2")):$="Opera",/\bIE\b/.test(ae)&&(H=null),ne||(Z=null)),K=["Presto"],me.push(ae));(ae=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(P)||0)[1])&&(ae=[parseFloat(ae.replace(/\.(\d)$/,".0$1")),ae],$=="Safari"&&ae[1].slice(-1)=="+"?($="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&&K=="WebKit"&&(K=["Blink"]),!ne||!z&&!ae[1]?(K&&(K[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")):(K&&(K[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:K!="Blink"?"27":"28")),K&&(K[1]+=" "+(ae+=typeof ae=="number"?".x":/[.+]/.test(ae)?"":"+")),$=="Safari"&&(!Z||parseInt(Z)>45)&&(Z=ae)),$=="Opera"&&(ae=/\bzbov|zvav$/.exec(H))?($+=" ",me.unshift("desktop mode"),ae=="zvav"?($+="Mini",Z=null):$+="Mobile",H=H.replace(RegExp(" *"+ae+"$"),"")):$=="Safari"&&/\bChrome\b/.exec(K&&K[1])&&(me.unshift("desktop mode"),$="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=x(H.replace(ae,""))),K&&!/\b(?:Avant|Nook)\b/.test($)&&(/Browser|Lunascape|Maxthon/.test($)||$!="Safari"&&/^iOS/.test(H)&&/\bSafari\b/.test(K[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test($)&&K[1])&&((ae=K[K.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),"")),$&&(/\bWOW64\b/i.test(P)||ne&&/\w(?:86|32)$/.test(Q.cpuClass||Q.platform)&&!/\bWin64; x64\b/i.test(P))&&me.unshift("32-bit")):H&&/^OS X/.test(H.family)&&$=="Chrome"&&parseFloat(Z)>=39&&(H.architecture=64),P||(P=null);var Ue={};return Ue.description=P,Ue.layout=K&&K[0],Ue.manufacturer=q,Ue.name=$,Ue.prerelease=ee,Ue.product=Ce,Ue.ua=P,Ue.version=$&&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($),H&&$&&!(H==String(H).split(" ")[0]&&(H==$.split(" ")[0]||Ce))&&me.push(Ce?"("+H+")":"on "+H),me.length&&(Ue.description=me.join(" ")),Ue}var V=Y();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=V,define(function(){return V})):y&&p?T(V,function(P,F){y[F]=P}):S.platform=V}).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:i}:G.exports=h;function i(S,_,y,p){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var d=arguments.length,o,s;switch(d){case 0:case 1:return h.nextTick(S);case 2:return h.nextTick(function(){S.call(null,_)});case 3:return h.nextTick(function(){S.call(null,_,y)});case 4:return h.nextTick(function(){S.call(null,_,y,p)});default:for(o=new Array(d-1),s=0;s<o.length;)o[s++]=arguments[s];return h.nextTick(function(){S.apply(null,o)})}}}).call(this,u("_process"))},{_process:208}],208:[function(u,G,c){var h=G.exports={},i,S;function _(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?i=setTimeout:i=_}catch(E){i=_}try{typeof clearTimeout=="function"?S=clearTimeout:S=y}catch(E){S=y}})();function p(E){if(i===setTimeout)return setTimeout(E,0);if((i===_||!i)&&setTimeout)return i=setTimeout,setTimeout(E,0);try{return i(E,0)}catch(k){try{return i.call(null,E,0)}catch(T){return i.call(this,E,0)}}}function d(E){if(S===clearTimeout)return clearTimeout(E);if((S===y||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(E);try{return S(E)}catch(k){try{return S.call(null,E)}catch(T){return S.call(this,E)}}}var o=[],s=!1,l,a=-1;function g(){if(!s||!l)return;s=!1,l.length?o=l.concat(o):a=-1,o.length&&m()}function m(){if(s)return;var E=p(g);s=!0;for(var k=o.length;k;){for(l=o,o=[];++a<k;)l&&l[a].run();a=-1,k=o.length}l=null,s=!1,d(E)}h.nextTick=function(E){var k=new Array(arguments.length-1);if(arguments.length>1)for(var T=1;T<arguments.length;T++)k[T-1]=arguments[T];o.push(new v(E,k)),o.length===1&&!s&&p(m)};function v(E,k){this.fun=E,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(E){return[]},h.binding=function(E){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(E){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(i){var S=typeof c=="object"&&c&&!c.nodeType&&c,_=typeof G=="object"&&G&&!G.nodeType&&G,y=typeof h=="object"&&h;(y.global===y||y.window===y||y.self===y)&&(i=y);var p,d=2147483647,o=36,s=1,l=26,a=38,g=700,m=72,v=128,w="-",E=/^xn--/,k=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=o-s,B=Math.floor,N=String.fromCharCode,x;function Y(U){throw new RangeError(D[U])}function V(U,R){for(var C=U.length,M=[];C--;)M[C]=R(U[C]);return M}function P(U,R){var C=U.split("@"),M="";C.length>1&&(M=C[0]+"@",U=C[1]),U=U.replace(T,".");var le=U.split("."),he=V(le,R).join(".");return M+he}function F(U){for(var R=[],C=0,M=U.length,le,he;C<M;)le=U.charCodeAt(C++),le>=55296&&le<=56319&&C<M?(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 X(U){return V(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:o}function ce(U,R){return U+22+75*(U<26)-((R!=0)<<5)}function fe(U,R,C){var M=0;for(U=C?B(U/g):U>>1,U+=B(U/R);U>I*l>>1;M+=o)U=B(U/I);return B(M+(I+1)*U/(U+a))}function z(U){var R=[],C=U.length,M,le=0,he=v,ve=m,Ee,Se,ae,pe,me,ee,ne,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=o;!(ae>=C&&Y("invalid-input"),ne=Q(U.charCodeAt(ae++)),(ne>=o||ne>B((d-le)/me))&&Y("overflow"),le+=ne*me,Z=ee<=ve?s:ee>=ve+l?l:ee-ve,ne<Z);ee+=o)ue=o-Z,me>B(d/ue)&&Y("overflow"),me*=ue;M=R.length+1,ve=fe(le-pe,M,pe==0),B(le/M)>d-he&&Y("overflow"),he+=B(le/M),le%=M,R.splice(le++,0,he)}return X(R)}function se(U){var R,C,M,le,he,ve,Ee,Se,ae,pe,me,ee=[],ne,Z,ue,K;for(U=F(U),ne=U.length,R=v,C=0,he=m,ve=0;ve<ne;++ve)me=U[ve],me<128&&ee.push(N(me));for(M=le=ee.length,le&&ee.push(w);M<ne;){for(Ee=d,ve=0;ve<ne;++ve)me=U[ve],me>=R&&me<Ee&&(Ee=me);for(Z=M+1,Ee-R>B((d-C)/Z)&&Y("overflow"),C+=(Ee-R)*Z,R=Ee,ve=0;ve<ne;++ve)if(me=U[ve],me<R&&++C>d&&Y("overflow"),me==R){for(Se=C,ae=o;!(pe=ae<=he?s:ae>=he+l?l:ae-he,Se<pe);ae+=o)K=Se-pe,ue=o-pe,ee.push(N(ce(pe+K%ue,0))),Se=B(K/ue);ee.push(N(ce(Se,0))),he=fe(C,Z,M==le),C=0,++M}++C,++R}return ee.join("")}function J(U){return P(U,function(R){return E.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:X},decode:z,encode:se,toASCII:j,toUnicode:J},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return p});else if(S&&_)if(G.exports==S)_.exports=p;else for(x in p)p.hasOwnProperty(x)&&(S[x]=p[x]);else i.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,_){return Object.prototype.hasOwnProperty.call(S,_)}G.exports=function(S,_,y,p){_=_||"&",y=y||"=";var d={};if(typeof S!="string"||S.length===0)return d;var o=/\+/g;S=S.split(_);var s=1e3;p&&typeof p.maxKeys=="number"&&(s=p.maxKeys);var l=S.length;s>0&&l>s&&(l=s);for(var a=0;a<l;++a){var g=S[a].replace(o,"%20"),m=g.indexOf(y),v,w,E,k;m>=0?(v=g.substr(0,m),w=g.substr(m+1)):(v=g,w=""),E=decodeURIComponent(v),k=decodeURIComponent(w),h(d,E)?i(d[E])?d[E].push(k):d[E]=[d[E],k]:d[E]=k}return d};var i=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(u,G,c){"use strict";var h=function(y){switch(typeof y){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}};G.exports=function(y,p,d,o){return p=p||"&",d=d||"=",y===null&&(y=void 0),typeof y=="object"?S(_(y),function(s){var l=encodeURIComponent(h(s))+d;return i(y[s])?S(y[s],function(a){return l+encodeURIComponent(h(a))}).join(p):l+encodeURIComponent(h(y[s]))}).join(p):o?encodeURIComponent(h(o))+d+encodeURIComponent(h(y)):""};var i=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"};function S(y,p){if(y.map)return y.map(p);for(var d=[],o=0;o<y.length;o++)d.push(p(y[o],o));return d}var _=Object.keys||function(y){var p=[];for(var d in y)Object.prototype.hasOwnProperty.call(y,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"),i=y(h),S=u("babel-runtime/core-js/object/keys"),_=y(S);function y(k){return k&&k.__esModule?k:{default:k}}var p=u("process-nextick-args"),d=_.default||function(k){var T=[];for(var D in k)T.push(D);return T};G.exports=v;var o=(0,i.default)(u("core-util-is"));o.inherits=u("inherits");var s=u("./_stream_readable"),l=u("./_stream_writable");o.inherits(v,s);for(var a=d(l.prototype),g=0;g<a.length;g++){var m=a[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(E,this)}function E(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(T){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=T,this._writableState.destroyed=T}}),v.prototype._destroy=function(k,T){this.push(null),this.end(),p.nextTick(T,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"),i=S(h);function S(d){return d&&d.__esModule?d:{default:d}}G.exports=p;var _=u("./_stream_transform"),y=(0,i.default)(u("core-util-is"));y.inherits=u("inherits"),y.inherits(p,_);function p(d){if(!(this instanceof p))return new p(d);_.call(this,d)}p.prototype._transform=function(d,o,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,i){"use strict";var S=u("babel-runtime/core-js/object/get-prototype-of"),_=d(S),y=u("babel-runtime/core-js/object/create"),p=d(y);function d(K){return K&&K.__esModule?K:{default:K}}var o=u("process-nextick-args");G.exports=F;var s=u("isarray"),l;F.ReadableState=P;var a=u("events").EventEmitter,g=function($,Ce){return $.listeners(Ce).length},m=u("./internal/streams/stream"),v=u("safe-buffer").Buffer,w=i.Uint8Array||function(){};function E(K){return v.from(K)}function k(K){return v.isBuffer(K)||K instanceof w}var T=(0,p.default)(u("core-util-is"));T.inherits=u("inherits");var D=u("util"),I=void 0;D&&D.debuglog?I=D.debuglog("stream"):I=function(){};var B=u("./internal/streams/BufferList"),N=u("./internal/streams/destroy"),x;T.inherits(F,m);var Y=["error","close","destroy","pause","resume"];function V(K,$,Ce){if(typeof K.prependListener=="function")return K.prependListener($,Ce);!K._events||!K._events[$]?K.on($,Ce):s(K._events[$])?K._events[$].unshift(Ce):K._events[$]=[Ce,K._events[$]]}function P(K,$){l=l||u("./_stream_duplex"),K=K||{};var Ce=$ instanceof l;this.objectMode=!!K.objectMode,Ce&&(this.objectMode=this.objectMode||!!K.readableObjectMode);var q=K.highWaterMark,H=K.readableHighWaterMark,O=this.objectMode?16:16*1024;q||q===0?this.highWaterMark=q:Ce&&(H||H===0)?this.highWaterMark=H:this.highWaterMark=O,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=K.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,K.encoding&&(x||(x=u("string_decoder/").StringDecoder),this.decoder=new x(K.encoding),this.encoding=K.encoding)}function F(K){if(l=l||u("./_stream_duplex"),!(this instanceof F))return new F(K);this._readableState=new P(K,this),this.readable=!0,K&&(typeof K.read=="function"&&(this._read=K.read),typeof K.destroy=="function"&&(this._destroy=K.destroy)),m.call(this)}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function($){if(!this._readableState)return;this._readableState.destroyed=$}}),F.prototype.destroy=N.destroy,F.prototype._undestroy=N.undestroy,F.prototype._destroy=function(K,$){this.push(null),$(K)},F.prototype.push=function(K,$){var Ce=this._readableState,q;return Ce.objectMode?q=!0:typeof K=="string"&&($=$||Ce.defaultEncoding,$!==Ce.encoding&&(K=v.from(K,$),$=""),q=!0),X(this,K,$,!1,q)},F.prototype.unshift=function(K){return X(this,K,null,!0,!1)};function X(K,$,Ce,q,H){var O=K._readableState;if($===null)O.reading=!1,j(K,O);else{var W;H||(W=ce(O,$)),W?K.emit("error",W):O.objectMode||$&&$.length>0?(typeof $!="string"&&!O.objectMode&&(0,_.default)($)!==v.prototype&&($=E($)),q?O.endEmitted?K.emit("error",new Error("stream.unshift() after end event")):Q(K,O,$,!0):O.ended?K.emit("error",new Error("stream.push() after EOF")):(O.reading=!1,O.decoder&&!Ce?($=O.decoder.write($),O.objectMode||$.length!==0?Q(K,O,$,!1):C(K,O)):Q(K,O,$,!1))):q||(O.reading=!1)}return fe(O)}function Q(K,$,Ce,q){$.flowing&&$.length===0&&!$.sync?(K.emit("data",Ce),K.read(0)):($.length+=$.objectMode?1:Ce.length,q?$.buffer.unshift(Ce):$.buffer.push(Ce),$.needReadable&&U(K)),C(K,$)}function ce(K,$){var Ce;return!k($)&&typeof $!="string"&&$!==void 0&&!K.objectMode&&(Ce=new TypeError("Invalid non-string/buffer chunk")),Ce}function fe(K){return!K.ended&&(K.needReadable||K.length<K.highWaterMark||K.length===0)}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(K){return x||(x=u("string_decoder/").StringDecoder),this._readableState.decoder=new x(K),this._readableState.encoding=K,this};var z=8388608;function se(K){return K>=z?K=z:(K--,K|=K>>>1,K|=K>>>2,K|=K>>>4,K|=K>>>8,K|=K>>>16,K++),K}function J(K,$){return K<=0||$.length===0&&$.ended?0:$.objectMode?1:K!==K?$.flowing&&$.length?$.buffer.head.data.length:$.length:(K>$.highWaterMark&&($.highWaterMark=se(K)),K<=$.length?K:$.ended?$.length:($.needReadable=!0,0))}F.prototype.read=function(K){I("read",K),K=parseInt(K,10);var $=this._readableState,Ce=K;if(K!==0&&($.emittedReadable=!1),K===0&&$.needReadable&&($.length>=$.highWaterMark||$.ended))return I("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?ne(this):U(this),null;if(K=J(K,$),K===0&&$.ended)return $.length===0&&ne(this),null;var q=$.needReadable;I("need readable",q),($.length===0||$.length-K<$.highWaterMark)&&(q=!0,I("length less than watermark",q)),$.ended||$.reading?(q=!1,I("reading or ended",q)):q&&(I("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(K=J(Ce,$)));var H;return K>0?H=ae(K,$):H=null,H===null?($.needReadable=!0,K=0):$.length-=K,$.length===0&&($.ended||($.needReadable=!0),Ce!==K&&$.ended&&ne(this)),H!==null&&this.emit("data",H),H};function j(K,$){if($.ended)return;if($.decoder){var Ce=$.decoder.end();Ce&&Ce.length&&($.buffer.push(Ce),$.length+=$.objectMode?1:Ce.length)}$.ended=!0,U(K)}function U(K){var $=K._readableState;$.needReadable=!1,$.emittedReadable||(I("emitReadable",$.flowing),$.emittedReadable=!0,$.sync?o.nextTick(R,K):R(K))}function R(K){I("emit readable"),K.emit("readable"),Se(K)}function C(K,$){$.readingMore||($.readingMore=!0,o.nextTick(M,K,$))}function M(K,$){for(var Ce=$.length;!$.reading&&!$.flowing&&!$.ended&&$.length<$.highWaterMark&&!(I("maybeReadMore read 0"),K.read(0),Ce===$.length);)Ce=$.length;$.readingMore=!1}F.prototype._read=function(K){this.emit("error",new Error("_read() is not implemented"))},F.prototype.pipe=function(K,$){var Ce=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=K;break;case 1:q.pipes=[q.pipes,K];break;default:q.pipes.push(K);break}q.pipesCount+=1,I("pipe count=%d opts=%j",q.pipesCount,$);var H=(!$||$.end!==!1)&&K!==h.stdout&&K!==h.stderr,O=H?we:Je;q.endEmitted?o.nextTick(O):Ce.once("end",O),K.on("unpipe",W);function W(Ne,nt){I("onunpipe"),Ne===Ce&&(nt&&nt.hasUnpiped===!1&&(nt.hasUnpiped=!0,Be()))}function we(){I("onend"),K.end()}var be=le(Ce);K.on("drain",be);var Oe=!1;function Be(){I("cleanup"),K.removeListener("close",Ye),K.removeListener("finish",Xe),K.removeListener("drain",be),K.removeListener("error",Ge),K.removeListener("unpipe",W),Ce.removeListener("end",we),Ce.removeListener("end",Je),Ce.removeListener("data",Ue),Oe=!0,q.awaitDrain&&(!K._writableState||K._writableState.needDrain)&&be()}var Fe=!1;Ce.on("data",Ue);function Ue(Ne){I("ondata"),Fe=!1;var nt=K.write(Ne);nt===!1&&!Fe&&((q.pipesCount===1&&q.pipes===K||q.pipesCount>1&&ue(q.pipes,K)!==-1)&&!Oe&&(I("false write response, pause",Ce._readableState.awaitDrain),Ce._readableState.awaitDrain++,Fe=!0),Ce.pause())}function Ge(Ne){I("onerror",Ne),Je(),K.removeListener("error",Ge),g(K,"error")===0&&K.emit("error",Ne)}V(K,"error",Ge);function Ye(){K.removeListener("finish",Xe),Je()}K.once("close",Ye);function Xe(){I("onfinish"),K.removeListener("close",Ye),Je()}K.once("finish",Xe);function Je(){I("unpipe"),Ce.unpipe(K)}return K.emit("pipe",Ce),q.flowing||(I("pipe resume"),Ce.resume()),K};function le(K){return function(){var $=K._readableState;I("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&g(K,"data")&&($.flowing=!0,Se(K))}}F.prototype.unpipe=function(K){var $=this._readableState,Ce={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return K&&K!==$.pipes?this:(K||(K=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,K&&K.emit("unpipe",this,Ce),this);if(!K){var q=$.pipes,H=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var O=0;O<H;O++)q[O].emit("unpipe",this,Ce);return this}var W=ue($.pipes,K);return W===-1?this:($.pipes.splice(W,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),K.emit("unpipe",this,Ce),this)},F.prototype.on=function(K,$){var Ce=m.prototype.on.call(this,K,$);if(K==="data")this._readableState.flowing!==!1&&this.resume();else if(K==="readable"){var q=this._readableState;!q.endEmitted&&!q.readableListening&&(q.readableListening=q.needReadable=!0,q.emittedReadable=!1,q.reading?q.length&&U(this):o.nextTick(he,this))}return Ce},F.prototype.addListener=F.prototype.on;function he(K){I("readable nexttick read 0"),K.read(0)}F.prototype.resume=function(){var K=this._readableState;return K.flowing||(I("resume"),K.flowing=!0,ve(this,K)),this};function ve(K,$){$.resumeScheduled||($.resumeScheduled=!0,o.nextTick(Ee,K,$))}function Ee(K,$){$.reading||(I("resume read 0"),K.read(0)),$.resumeScheduled=!1,$.awaitDrain=0,K.emit("resume"),Se(K),$.flowing&&!$.reading&&K.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(K){var $=K._readableState;for(I("flow",$.flowing);$.flowing&&K.read()!==null;);}F.prototype.wrap=function(K){var $=this,Ce=this._readableState,q=!1;K.on("end",function(){if(I("wrapped end"),Ce.decoder&&!Ce.ended){var W=Ce.decoder.end();W&&W.length&&$.push(W)}$.push(null)}),K.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=$.push(W);we||(q=!0,K.pause())});for(var H in K)this[H]===void 0&&typeof K[H]=="function"&&(this[H]=function(W){return function(){return K[W].apply(K,arguments)}}(H));for(var O=0;O<Y.length;O++)K.on(Y[O],this.emit.bind(this,Y[O]));return this._read=function(W){I("wrapped _read",W),q&&(q=!1,K.resume())},this},Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),F._fromList=ae;function ae(K,$){if($.length===0)return null;var Ce;return $.objectMode?Ce=$.buffer.shift():!K||K>=$.length?($.decoder?Ce=$.buffer.join(""):$.buffer.length===1?Ce=$.buffer.head.data:Ce=$.buffer.concat($.length),$.buffer.clear()):Ce=pe(K,$.buffer,$.decoder),Ce}function pe(K,$,Ce){var q;return K<$.head.data.length?(q=$.head.data.slice(0,K),$.head.data=$.head.data.slice(K)):K===$.head.data.length?q=$.shift():q=Ce?me(K,$):ee(K,$),q}function me(K,$){var Ce=$.head,q=1,H=Ce.data;for(K-=H.length;Ce=Ce.next;){var O=Ce.data,W=K>O.length?O.length:K;if(W===O.length?H+=O:H+=O.slice(0,K),K-=W,K===0){W===O.length?(++q,Ce.next?$.head=Ce.next:$.head=$.tail=null):($.head=Ce,Ce.data=O.slice(W));break}++q}return $.length-=q,H}function ee(K,$){var Ce=v.allocUnsafe(K),q=$.head,H=1;for(q.data.copy(Ce),K-=q.data.length;q=q.next;){var O=q.data,W=K>O.length?O.length:K;if(O.copy(Ce,Ce.length-K,0,W),K-=W,K===0){W===O.length?(++H,q.next?$.head=q.next:$.head=$.tail=null):($.head=q,q.data=O.slice(W));break}++H}return $.length-=H,Ce}function ne(K){var $=K._readableState;if($.length>0)throw new Error('"endReadable()" called on non-empty stream');$.endEmitted||($.ended=!0,o.nextTick(Z,$,K))}function Z(K,$){!K.endEmitted&&K.length===0&&(K.endEmitted=!0,$.readable=!1,$.emit("end"))}function ue(K,$){for(var Ce=0,q=K.length;Ce<q;Ce++)if(K[Ce]===$)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"),i=S(h);function S(l){return l&&l.__esModule?l:{default:l}}G.exports=d;var _=u("./_stream_duplex"),y=(0,i.default)(u("core-util-is"));y.inherits=u("inherits"),y.inherits(d,_);function p(l,a){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,a!=null&&this.push(a),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);_.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",o)}function o(){var l=this;typeof this._flush=="function"?this._flush(function(a,g){s(l,a,g)}):s(this,null,null)}d.prototype.push=function(l,a){return this._transformState.needTransform=!1,_.prototype.push.call(this,l,a)},d.prototype._transform=function(l,a,g){throw new Error("_transform() is not implemented")},d.prototype._write=function(l,a,g){var m=this._transformState;if(m.writecb=g,m.writechunk=l,m.writeencoding=a,!m.transforming){var v=this._readableState;(m.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark)}},d.prototype._read=function(l){var a=this._transformState;a.writechunk!==null&&a.writecb&&!a.transforming?(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform)):a.needTransform=!0},d.prototype._destroy=function(l,a){var g=this;_.prototype._destroy.call(this,l,function(m){a(m),g.emit("close")})};function s(l,a,g){if(a)return l.emit("error",a);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,i){"use strict";var S=u("babel-runtime/core-js/object/define-property"),_=m(S),y=u("babel-runtime/core-js/symbol/has-instance"),p=m(y),d=u("babel-runtime/core-js/symbol"),o=m(d),s=u("babel-runtime/core-js/object/create"),l=m(s),a=u("babel-runtime/core-js/set-immediate"),g=m(a);function m(ee){return ee&&ee.__esModule?ee:{default:ee}}var v=u("process-nextick-args");G.exports=ce;function w(ee,ne,Z){this.chunk=ee,this.encoding=ne,this.callback=Z,this.next=null}function E(ee){var ne=this;this.next=null,this.entry=null,this.finish=function(){me(ne,ee)}}var k=!h.browser&&["v0.10","v0.9."].indexOf(h.version.slice(0,5))>-1?g.default:v.nextTick,T;ce.WritableState=X;var D=(0,l.default)(u("core-util-is"));D.inherits=u("inherits");var I={deprecate:u("util-deprecate")},B=u("./internal/streams/stream"),N=u("safe-buffer").Buffer,x=i.Uint8Array||function(){};function Y(ee){return N.from(ee)}function V(ee){return N.isBuffer(ee)||ee instanceof x}var P=u("./internal/streams/destroy");D.inherits(ce,B);function F(){}function X(ee,ne){T=T||u("./_stream_duplex"),ee=ee||{};var Z=ne instanceof T;this.objectMode=!!ee.objectMode,Z&&(this.objectMode=this.objectMode||!!ee.writableObjectMode);var ue=ee.highWaterMark,K=ee.writableHighWaterMark,$=this.objectMode?16:16*1024;ue||ue===0?this.highWaterMark=ue:Z&&(K||K===0)?this.highWaterMark=K:this.highWaterMark=$,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(ne,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 E(this)}X.prototype.getBuffer=function(){for(var ne=this.bufferedRequest,Z=[];ne;)Z.push(ne),ne=ne.next;return Z},function(){try{Object.defineProperty(X.prototype,"buffer",{get:I.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ee){}}();var Q;typeof o.default=="function"&&p.default&&typeof Function.prototype[p.default]=="function"?(Q=Function.prototype[p.default],(0,_.default)(ce,p.default,{value:function(ne){return Q.call(this,ne)?!0:this!==ce?!1:ne&&ne._writableState instanceof X}})):Q=function(ne){return ne instanceof this};function ce(ee){if(T=T||u("./_stream_duplex"),!Q.call(ce,this)&&!(this instanceof T))return new ce(ee);this._writableState=new X(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,ne){var Z=new Error("write after end");ee.emit("error",Z),v.nextTick(ne,Z)}function z(ee,ne,Z,ue){var K=!0,$=!1;return Z===null?$=new TypeError("May not write null values to stream"):typeof Z!="string"&&Z!==void 0&&!ne.objectMode&&($=new TypeError("Invalid non-string/buffer chunk")),$&&(ee.emit("error",$),v.nextTick(ue,$),K=!1),K}ce.prototype.write=function(ee,ne,Z){var ue=this._writableState,K=!1,$=!ue.objectMode&&V(ee);return $&&!N.isBuffer(ee)&&(ee=Y(ee)),typeof ne=="function"&&(Z=ne,ne=null),$?ne="buffer":ne||(ne=ue.defaultEncoding),typeof Z!="function"&&(Z=F),ue.ended?fe(this,Z):($||z(this,ue,ee,Z))&&(ue.pendingcb++,K=J(this,ue,$,ee,ne,Z)),K},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(ne){if(typeof ne=="string"&&(ne=ne.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ne+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ne);return this._writableState.defaultEncoding=ne,this};function se(ee,ne,Z){return!ee.objectMode&&ee.decodeStrings!==!1&&typeof ne=="string"&&(ne=N.from(ne,Z)),ne}Object.defineProperty(ce.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(ee,ne,Z,ue,K,$){if(!Z){var Ce=se(ne,ue,K);ue!==Ce&&(Z=!0,K="buffer",ue=Ce)}var q=ne.objectMode?1:ue.length;ne.length+=q;var H=ne.length<ne.highWaterMark;if(H||(ne.needDrain=!0),ne.writing||ne.corked){var O=ne.lastBufferedRequest;ne.lastBufferedRequest={chunk:ue,encoding:K,isBuf:Z,callback:$,next:null},O?O.next=ne.lastBufferedRequest:ne.bufferedRequest=ne.lastBufferedRequest,ne.bufferedRequestCount+=1}else j(ee,ne,!1,q,ue,K,$);return H}function j(ee,ne,Z,ue,K,$,Ce){ne.writelen=ue,ne.writecb=Ce,ne.writing=!0,ne.sync=!0,Z?ee._writev(K,ne.onwrite):ee._write(K,$,ne.onwrite),ne.sync=!1}function U(ee,ne,Z,ue,K){--ne.pendingcb,Z?(v.nextTick(K,ue),v.nextTick(ae,ee,ne),ee._writableState.errorEmitted=!0,ee.emit("error",ue)):(K(ue),ee._writableState.errorEmitted=!0,ee.emit("error",ue),ae(ee,ne))}function R(ee){ee.writing=!1,ee.writecb=null,ee.length-=ee.writelen,ee.writelen=0}function C(ee,ne){var Z=ee._writableState,ue=Z.sync,K=Z.writecb;if(R(Z),ne)U(ee,Z,ue,ne,K);else{var $=ve(Z);!$&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&he(ee,Z),ue?k(M,ee,Z,$,K):M(ee,Z,$,K)}}function M(ee,ne,Z,ue){Z||le(ee,ne),ne.pendingcb--,ue(),ae(ee,ne)}function le(ee,ne){ne.length===0&&ne.needDrain&&(ne.needDrain=!1,ee.emit("drain"))}function he(ee,ne){ne.bufferProcessing=!0;var Z=ne.bufferedRequest;if(ee._writev&&Z&&Z.next){var ue=ne.bufferedRequestCount,K=new Array(ue),$=ne.corkedRequestsFree;$.entry=Z;for(var Ce=0,q=!0;Z;)K[Ce]=Z,Z.isBuf||(q=!1),Z=Z.next,Ce+=1;K.allBuffers=q,j(ee,ne,!0,ne.length,K,"",$.finish),ne.pendingcb++,ne.lastBufferedRequest=null,$.next?(ne.corkedRequestsFree=$.next,$.next=null):ne.corkedRequestsFree=new E(ne),ne.bufferedRequestCount=0}else{for(;Z;){var H=Z.chunk,O=Z.encoding,W=Z.callback,we=ne.objectMode?1:H.length;if(j(ee,ne,!1,we,H,O,W),Z=Z.next,ne.bufferedRequestCount--,ne.writing)break}Z===null&&(ne.lastBufferedRequest=null)}ne.bufferedRequest=Z,ne.bufferProcessing=!1}ce.prototype._write=function(ee,ne,Z){Z(new Error("_write() is not implemented"))},ce.prototype._writev=null,ce.prototype.end=function(ee,ne,Z){var ue=this._writableState;typeof ee=="function"?(Z=ee,ee=null,ne=null):typeof ne=="function"&&(Z=ne,ne=null),ee!=null&&this.write(ee,ne),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,ne){ee._final(function(Z){ne.pendingcb--,Z&&ee.emit("error",Z),ne.prefinished=!0,ee.emit("prefinish"),ae(ee,ne)})}function Se(ee,ne){!ne.prefinished&&!ne.finalCalled&&(typeof ee._final=="function"?(ne.pendingcb++,ne.finalCalled=!0,v.nextTick(Ee,ee,ne)):(ne.prefinished=!0,ee.emit("prefinish")))}function ae(ee,ne){var Z=ve(ne);return Z&&(Se(ee,ne),ne.pendingcb===0&&(ne.finished=!0,ee.emit("finish"))),Z}function pe(ee,ne,Z){ne.ending=!0,ae(ee,ne),Z&&(ne.finished?v.nextTick(Z):ee.once("finish",Z)),ne.ended=!0,ee.writable=!1}function me(ee,ne,Z){var ue=ee.entry;for(ee.entry=null;ue;){var K=ue.callback;ne.pendingcb--,K(Z),ue=ue.next}ne.corkedRequestsFree?ne.corkedRequestsFree.next=ee:ne.corkedRequestsFree=ee}Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ne){if(!this._writableState)return;this._writableState.destroyed=ne}}),ce.prototype.destroy=P.destroy,ce.prototype._undestroy=P.undestroy,ce.prototype._destroy=function(ee,ne){this.end(),ne(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(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}var i=u("safe-buffer").Buffer,S=u("util");function _(y,p,d){y.copy(p,d)}G.exports=function(){function y(){h(this,y),this.head=null,this.tail=null,this.length=0}return y.prototype.push=function(d){var o={data:d,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length},y.prototype.unshift=function(d){var o={data:d,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length},y.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},y.prototype.clear=function(){this.head=this.tail=null,this.length=0},y.prototype.join=function(d){if(this.length===0)return"";for(var o=this.head,s=""+o.data;o=o.next;)s+=d+o.data;return s},y.prototype.concat=function(d){if(this.length===0)return i.alloc(0);if(this.length===1)return this.head.data;for(var o=i.allocUnsafe(d>>>0),s=this.head,l=0;s;)_(s.data,o,l),l+=s.data.length,s=s.next;return o},y}(),S&&S.inspect&&S.inspect.custom&&(G.exports.prototype[S.inspect.custom]=function(){var y=S.inspect({length:this.length});return this.constructor.name+" "+y})},{"safe-buffer":228,util:71}],220:[function(u,G,c){"use strict";var h=u("process-nextick-args");function i(y,p){var d=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(p?p(y):y&&(!this._writableState||!this._writableState.errorEmitted)&&h.nextTick(_,this,y),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(y||null,function(l){!p&&l?(h.nextTick(_,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 _(y,p){y.emit("error",p)}G.exports={destroy:i,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")(),i=h.regeneratorRuntime&&Object.getOwnPropertyNames(h).indexOf("regeneratorRuntime")>=0,S=i&&h.regeneratorRuntime;if(h.regeneratorRuntime=void 0,G.exports=u("./runtime"),i)h.regeneratorRuntime=S;else try{delete h.regeneratorRuntime}catch(_){h.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(u,G,c){!function(h){"use strict";var i=Object.prototype,S=i.hasOwnProperty,_,y=typeof Symbol=="function"?Symbol:{},p=y.iterator||"@@iterator",d=y.asyncIterator||"@@asyncIterator",o=y.toStringTag||"@@toStringTag",s=typeof G=="object",l=h.regeneratorRuntime;if(l){s&&(G.exports=l);return}l=h.regeneratorRuntime=s?G.exports:{};function a(J,j,U,R){var C=j&&j.prototype instanceof T?j:T,M=Object.create(C.prototype),le=new fe(R||[]);return M._invoke=F(J,U,le),M}l.wrap=a;function g(J,j,U){try{return{type:"normal",arg:J.call(j,U)}}catch(R){return{type:"throw",arg:R}}}var m="suspendedStart",v="suspendedYield",w="executing",E="completed",k={};function T(){}function D(){}function I(){}var B={};B[p]=function(){return this};var N=Object.getPrototypeOf,x=N&&N(N(z([])));x&&x!==i&&S.call(x,p)&&(B=x);var Y=I.prototype=T.prototype=Object.create(B);D.prototype=Y.constructor=I,I.constructor=D,I[o]=D.displayName="GeneratorFunction";function V(J){["next","throw","return"].forEach(function(j){J[j]=function(U){return this._invoke(j,U)}})}l.isGeneratorFunction=function(J){var j=typeof J=="function"&&J.constructor;return j?j===D||(j.displayName||j.name)==="GeneratorFunction":!1},l.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,I):(J.__proto__=I,o in J||(J[o]="GeneratorFunction")),J.prototype=Object.create(Y),J},l.awrap=function(J){return{__await:J}};function P(J){function j(C,M,le,he){var ve=g(J[C],J,M);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,M){function le(){return new Promise(function(he,ve){j(C,M,he,ve)})}return U=U?U.then(le,le):le()}this._invoke=R}V(P.prototype),P.prototype[d]=function(){return this},l.AsyncIterator=P,l.async=function(J,j,U,R){var C=new P(a(J,j,U,R));return l.isGeneratorFunction(j)?C:C.next().then(function(M){return M.done?M.value:C.next()})};function F(J,j,U){var R=m;return function(M,le){if(R===w)throw new Error("Generator is already running");if(R===E){if(M==="throw")throw le;return se()}for(U.method=M,U.arg=le;;){var he=U.delegate;if(he){var ve=X(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=E,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);R=w;var Ee=g(J,j,U);if(Ee.type==="normal"){if(R=U.done?E:v,Ee.arg===k)continue;return{value:Ee.arg,done:U.done}}else Ee.type==="throw"&&(R=E,U.method="throw",U.arg=Ee.arg)}}}function X(J,j){var U=J.iterator[j.method];if(U===_){if(j.delegate=null,j.method==="throw"){if(J.iterator.return&&(j.method="return",j.arg=_,X(J,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,J.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[J.resultName]=C.value,j.next=J.nextLoc,j.method!=="return"&&(j.method="next",j.arg=_);else return C;return j.delegate=null,k}V(Y),Y[o]="Generator",Y[p]=function(){return this},Y.toString=function(){return"[object Generator]"};function Q(J){var j={tryLoc:J[0]};1 in J&&(j.catchLoc=J[1]),2 in J&&(j.finallyLoc=J[2],j.afterLoc=J[3]),this.tryEntries.push(j)}function ce(J){var j=J.completion||{};j.type="normal",delete j.arg,J.completion=j}function fe(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(Q,this),this.reset(!0)}l.keys=function(J){var j=[];for(var U in J)j.push(U);return j.reverse(),function R(){for(;j.length;){var C=j.pop();if(C in J)return R.value=C,R.done=!1,R}return R.done=!0,R}};function z(J){if(J){var j=J[p];if(j)return j.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var U=-1,R=function C(){for(;++U<J.length;)if(S.call(J,U))return C.value=J[U],C.done=!1,C;return C.value=_,C.done=!0,C};return R.next=R}}return{next:se}}l.values=z;function se(){return{value:_,done:!0}}fe.prototype={constructor:fe,reset:function(J){if(this.prev=0,this.next=0,this.sent=this._sent=_,this.done=!1,this.delegate=null,this.method="next",this.arg=_,this.tryEntries.forEach(ce),!J)for(var j in this)j.charAt(0)==="t"&&S.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=_)},stop:function(){this.done=!0;var J=this.tryEntries[0],j=J.completion;if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(J){if(this.done)throw J;var j=this;function U(ve,Ee){return M.type="throw",M.arg=J,j.next=ve,Ee&&(j.method="next",j.arg=_),!!Ee}for(var R=this.tryEntries.length-1;R>=0;--R){var C=this.tryEntries[R],M=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,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&&(J==="break"||J==="continue")&&C.tryLoc<=j&&j<=C.finallyLoc&&(C=null);var M=C?C.completion:{};return M.type=J,M.arg=j,C?(this.method="next",this.next=C.finallyLoc,k):this.complete(M)},complete:function(J,j){if(J.type==="throw")throw J.arg;return J.type==="break"||J.type==="continue"?this.next=J.arg:J.type==="return"?(this.rval=this.arg=J.arg,this.method="return",this.next="end"):J.type==="normal"&&j&&(this.next=j),k},finish:function(J){for(var j=this.tryEntries.length-1;j>=0;--j){var U=this.tryEntries[j];if(U.finallyLoc===J)return this.complete(U.completion,U.afterLoc),ce(U),k}},catch:function(J){for(var j=this.tryEntries.length-1;j>=0;--j){var U=this.tryEntries[j];if(U.tryLoc===J){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,j,U){return this.delegate={iterator:z(J),resultName:j,nextLoc:U},this.method==="next"&&(this.arg=_),k}}}(function(){return this}()||Function("return this")())},{}],228:[function(u,G,c){var h=u("buffer"),i=h.Buffer;function S(y,p){for(var d in y)p[d]=y[d]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?G.exports=h:(S(h,c),c.Buffer=_);function _(y,p,d){return i(y,p,d)}S(i,_),_.from=function(y,p,d){if(typeof y=="number")throw new TypeError("Argument must not be a number");return i(y,p,d)},_.alloc=function(y,p,d){if(typeof y!="number")throw new TypeError("Argument must be a number");var o=i(y);return p!==void 0?typeof d=="string"?o.fill(p,d):o.fill(p):o.fill(0),o},_.allocUnsafe=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return i(y)},_.allocUnsafeSlow=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return h.SlowBuffer(y)}},{buffer:73}],229:[function(u,G,c){(function(h){"use strict";var i=u("babel-runtime/core-js/string/from-code-point"),S=v(i),_=u("babel-runtime/core-js/json/stringify"),y=v(_),p=u("babel-runtime/helpers/typeof"),d=v(p),o=u("babel-runtime/core-js/object/define-property"),s=v(o),l=u("babel-runtime/core-js/object/keys"),a=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(O,W){return new k(O,W)},w.SAXParser=k,w.SAXStream=Y,w.createStream=x,w.MAX_BUFFER_LENGTH=64*1024;var E=["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(O,W){if(!(this instanceof k))return new k(O,W);var we=this;D(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=!!O,we.noscript=!!(O||we.opt.noscript),we.state=M.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(O){function W(){}W.prototype=O;var we=new W;return we}),a.default||(Object.keys=function(O){var W=[];for(var we in O)O.hasOwnProperty(we)&&W.push(we);return W});function T(O){for(var W=Math.max(w.MAX_BUFFER_LENGTH,10),we=0,be=0,Oe=E.length;be<Oe;be++){var Be=O[E[be]].length;if(Be>W)switch(E[be]){case"textNode":Ee(O);break;case"cdata":ve(O,"oncdata",O.cdata),O.cdata="";break;case"script":ve(O,"onscript",O.script),O.script="";break;default:ae(O,"Max buffer length exceeded: "+E[be])}we=Math.max(we,Be)}var Fe=w.MAX_BUFFER_LENGTH-we;O.bufferCheckPosition=Fe+O.position}function D(O){for(var W=0,we=E.length;W<we;W++)O[E[W]]=""}function I(O){Ee(O),O.cdata!==""&&(ve(O,"oncdata",O.cdata),O.cdata=""),O.script!==""&&(ve(O,"onscript",O.script),O.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(O){B=function(){}}var N=w.EVENTS.filter(function(O){return O!=="error"&&O!=="end"});function x(O,W){return new Y(O,W)}function Y(O,W){if(!(this instanceof Y))return new Y(O,W);B.apply(this),this._parser=new k(O,W),this.writable=!0,this.readable=!0;var we=this;this._parser.onend=function(){we.emit("end")},this._parser.onerror=function(be){we.emit("error",be),we._parser.error=null},this._decoder=null,N.forEach(function(be){(0,s.default)(we,"on"+be,{get:function(){return we._parser["on"+be]},set:function(Be){if(!Be)return we.removeAllListeners(be),we._parser["on"+be]=Be,Be;we.on(be,Be)},enumerable:!0,configurable:!1})})}Y.prototype=(0,m.default)(B.prototype,{constructor:{value:Y}}),Y.prototype.write=function(O){if(typeof h=="function"&&typeof h.isBuffer=="function"&&h.isBuffer(O)){if(!this._decoder){var W=u("string_decoder").StringDecoder;this._decoder=new W("utf8")}O=this._decoder.write(O)}return this._parser.write(O.toString()),this.emit("data",O),!0},Y.prototype.end=function(O){return O&&O.length&&this.write(O),this._parser.end(),!0},Y.prototype.on=function(O,W){var we=this;return!we._parser["on"+O]&&N.indexOf(O)!==-1&&(we._parser["on"+O]=function(){var be=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);be.splice(0,0,O),we.emit.apply(we,be)}),B.prototype.on.call(we,O,W)};var V="[CDATA[",P="DOCTYPE",F="http://www.w3.org/XML/1998/namespace",X="http://www.w3.org/2000/xmlns/",Q={xml:F,xmlns:X},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 J(O){return O===" "||O===`
`||O==="\r"||O===" "}function j(O){return O==='"'||O==="'"}function U(O){return O===">"||J(O)}function R(O,W){return O.test(W)}function C(O,W){return!R(O,W)}var M=0;w.STATE={BEGIN:M++,BEGIN_WHITESPACE:M++,TEXT:M++,TEXT_ENTITY:M++,OPEN_WAKA:M++,SGML_DECL:M++,SGML_DECL_QUOTED:M++,DOCTYPE:M++,DOCTYPE_QUOTED:M++,DOCTYPE_DTD:M++,DOCTYPE_DTD_QUOTED:M++,COMMENT_STARTING:M++,COMMENT:M++,COMMENT_ENDING:M++,COMMENT_ENDED:M++,CDATA:M++,CDATA_ENDING:M++,CDATA_ENDING_2:M++,PROC_INST:M++,PROC_INST_BODY:M++,PROC_INST_ENDING:M++,OPEN_TAG:M++,OPEN_TAG_SLASH:M++,ATTRIB:M++,ATTRIB_NAME:M++,ATTRIB_NAME_SAW_WHITE:M++,ATTRIB_VALUE:M++,ATTRIB_VALUE_QUOTED:M++,ATTRIB_VALUE_CLOSED:M++,ATTRIB_VALUE_UNQUOTED:M++,ATTRIB_VALUE_ENTITY_Q:M++,ATTRIB_VALUE_ENTITY_U:M++,CLOSE_TAG:M++,CLOSE_TAG_SAW_WHITE:M++,SCRIPT:M++,SCRIPT_ENDING:M++},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,a.default)(w.ENTITIES).forEach(function(O){var W=w.ENTITIES[O],we=typeof W=="number"?String.fromCharCode(W):W;w.ENTITIES[O]=we});for(var le in w.STATE)w.STATE[w.STATE[le]]=le;M=w.STATE;function he(O,W,we){O[W]&&O[W](we)}function ve(O,W,we){O.textNode&&Ee(O),he(O,W,we)}function Ee(O){O.textNode=Se(O.opt,O.textNode),O.textNode&&he(O,"ontext",O.textNode),O.textNode=""}function Se(O,W){return O.trim&&(W=W.trim()),O.normalize&&(W=W.replace(/\s+/g," ")),W}function ae(O,W){return Ee(O),O.trackPosition&&(W+=`
Line: `+O.line+`
Column: `+O.column+`
Char: `+O.c),W=new Error(W),O.error=W,he(O,"onerror",W),O}function pe(O){return O.sawRoot&&!O.closedRoot&&me(O,"Unclosed root tag"),O.state!==M.BEGIN&&O.state!==M.BEGIN_WHITESPACE&&O.state!==M.TEXT&&ae(O,"Unexpected end"),Ee(O),O.c="",O.closed=!0,he(O,"onend"),k.call(O,O.strict,O.opt),O}function me(O,W){if((typeof O=="undefined"?"undefined":(0,d.default)(O))!=="object"||!(O instanceof k))throw new Error("bad call to strictFail");O.strict&&ae(O,W)}function ee(O){O.strict||(O.tagName=O.tagName[O.looseCase]());var W=O.tags[O.tags.length-1]||O,we=O.tag={name:O.tagName,attributes:{}};O.opt.xmlns&&(we.ns=W.ns),O.attribList.length=0,ve(O,"onopentagstart",we)}function ne(O,W){var we=O.indexOf(":"),be=we<0?["",O]:O.split(":"),Oe=be[0],Be=be[1];return W&&O==="xmlns"&&(Oe="xmlns",Be=""),{prefix:Oe,local:Be}}function Z(O){if(O.strict||(O.attribName=O.attribName[O.looseCase]()),O.attribList.indexOf(O.attribName)!==-1||O.tag.attributes.hasOwnProperty(O.attribName)){O.attribName=O.attribValue="";return}if(O.opt.xmlns){var W=ne(O.attribName,!0),we=W.prefix,be=W.local;if(we==="xmlns")if(be==="xml"&&O.attribValue!==F)me(O,"xml: prefix must be bound to "+F+`
Actual: `+O.attribValue);else if(be==="xmlns"&&O.attribValue!==X)me(O,"xmlns: prefix must be bound to "+X+`
Actual: `+O.attribValue);else{var Oe=O.tag,Be=O.tags[O.tags.length-1]||O;Oe.ns===Be.ns&&(Oe.ns=(0,m.default)(Be.ns)),Oe.ns[be]=O.attribValue}O.attribList.push([O.attribName,O.attribValue])}else O.tag.attributes[O.attribName]=O.attribValue,ve(O,"onattribute",{name:O.attribName,value:O.attribValue});O.attribName=O.attribValue=""}function ue(O,W){if(O.opt.xmlns){var we=O.tag,be=ne(O.tagName);we.prefix=be.prefix,we.local=be.local,we.uri=we.ns[be.prefix]||"",we.prefix&&!we.uri&&(me(O,"Unbound namespace prefix: "+(0,y.default)(O.tagName)),we.uri=be.prefix);var Oe=O.tags[O.tags.length-1]||O;we.ns&&Oe.ns!==we.ns&&(0,a.default)(we.ns).forEach(function(Ve){ve(O,"onopennamespace",{prefix:Ve,uri:we.ns[Ve]})});for(var Be=0,Fe=O.attribList.length;Be<Fe;Be++){var Ue=O.attribList[Be],Ge=Ue[0],Ye=Ue[1],Xe=ne(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(O,"Unbound namespace prefix: "+(0,y.default)(Je)),ot.uri=Je),O.tag.attributes[Ge]=ot,ve(O,"onattribute",ot)}O.attribList.length=0}O.tag.isSelfClosing=!!W,O.sawRoot=!0,O.tags.push(O.tag),ve(O,"onopentag",O.tag),W||(!O.noscript&&O.tagName.toLowerCase()==="script"?O.state=M.SCRIPT:O.state=M.TEXT,O.tag=null,O.tagName=""),O.attribName=O.attribValue="",O.attribList.length=0}function K(O){if(!O.tagName){me(O,"Weird empty close tag."),O.textNode+="</>",O.state=M.TEXT;return}if(O.script){if(O.tagName!=="script"){O.script+="</"+O.tagName+">",O.tagName="",O.state=M.SCRIPT;return}ve(O,"onscript",O.script),O.script=""}var W=O.tags.length,we=O.tagName;O.strict||(we=we[O.looseCase]());for(var be=we;W--;){var Oe=O.tags[W];if(Oe.name!==be)me(O,"Unexpected close tag");else break}if(W<0){me(O,"Unmatched closing tag: "+O.tagName),O.textNode+="</"+O.tagName+">",O.state=M.TEXT;return}O.tagName=we;for(var Be=O.tags.length;Be-- >W;){var Fe=O.tag=O.tags.pop();O.tagName=O.tag.name,ve(O,"onclosetag",O.tagName);var Ue={};for(var Ge in Fe.ns)Ue[Ge]=Fe.ns[Ge];var Ye=O.tags[O.tags.length-1]||O;O.opt.xmlns&&Fe.ns!==Ye.ns&&(0,a.default)(Fe.ns).forEach(function(Xe){var Je=Fe.ns[Xe];ve(O,"onclosenamespace",{prefix:Xe,uri:Je})})}W===0&&(O.closedRoot=!0),O.tagName=O.attribValue=O.attribName="",O.attribList.length=0,O.state=M.TEXT}function $(O){var W=O.entity,we=W.toLowerCase(),be,Oe="";return O.ENTITIES[W]?O.ENTITIES[W]:O.ENTITIES[we]?O.ENTITIES[we]:(W=we,W.charAt(0)==="#"&&(W.charAt(1)==="x"?(W=W.slice(2),be=parseInt(W,16),Oe=be.toString(16)):(W=W.slice(1),be=parseInt(W,10),Oe=be.toString(10))),W=W.replace(/^0+/,""),isNaN(be)||Oe.toLowerCase()!==W?(me(O,"Invalid character entity"),"&"+O.entity+";"):(0,S.default)(be))}function Ce(O,W){W==="<"?(O.state=M.OPEN_WAKA,O.startTagPosition=O.position):J(W)||(me(O,"Non-whitespace before first tag."),O.textNode=W,O.state=M.TEXT)}function q(O,W){var we="";return W<O.length&&(we=O.charAt(W)),we}function H(O){var W=this;if(this.error)throw this.error;if(W.closed)return ae(W,"Cannot write after close. Assign an onready handler.");if(O===null)return pe(W);(typeof O=="undefined"?"undefined":(0,d.default)(O))==="object"&&(O=O.toString());for(var we=0,be="";!(be=q(O,we++),W.c=be,!be);){W.trackPosition&&(W.position++,be===`
`?(W.line++,W.column=0):W.column++);switch(W.state){case M.BEGIN:if(W.state=M.BEGIN_WHITESPACE,be==="\uFEFF")continue;Ce(W,be);continue;case M.BEGIN_WHITESPACE:Ce(W,be);continue;case M.TEXT:if(W.sawRoot&&!W.closedRoot){for(var Oe=we-1;be&&be!=="<"&&be!=="&";)be=q(O,we++),be&&W.trackPosition&&(W.position++,be===`
`?(W.line++,W.column=0):W.column++);W.textNode+=O.substring(Oe,we-1)}be==="<"&&!(W.sawRoot&&W.closedRoot&&!W.strict)?(W.state=M.OPEN_WAKA,W.startTagPosition=W.position):(!J(be)&&(!W.sawRoot||W.closedRoot)&&me(W,"Text data outside of root node."),be==="&"?W.state=M.TEXT_ENTITY:W.textNode+=be);continue;case M.SCRIPT:be==="<"?W.state=M.SCRIPT_ENDING:W.script+=be;continue;case M.SCRIPT_ENDING:be==="/"?W.state=M.CLOSE_TAG:(W.script+="<"+be,W.state=M.SCRIPT);continue;case M.OPEN_WAKA:if(be==="!")W.state=M.SGML_DECL,W.sgmlDecl="";else if(!J(be))if(R(ce,be))W.state=M.OPEN_TAG,W.tagName=be;else if(be==="/")W.state=M.CLOSE_TAG,W.tagName="";else if(be==="?")W.state=M.PROC_INST,W.procInstName=W.procInstBody="";else{if(me(W,"Unencoded <"),W.startTagPosition+1<W.position){var Be=W.position-W.startTagPosition;be=new Array(Be).join(" ")+be}W.textNode+="<"+be,W.state=M.TEXT}continue;case M.SGML_DECL:(W.sgmlDecl+be).toUpperCase()===V?(ve(W,"onopencdata"),W.state=M.CDATA,W.sgmlDecl="",W.cdata=""):W.sgmlDecl+be==="--"?(W.state=M.COMMENT,W.comment="",W.sgmlDecl=""):(W.sgmlDecl+be).toUpperCase()===P?(W.state=M.DOCTYPE,(W.doctype||W.sawRoot)&&me(W,"Inappropriately located doctype declaration"),W.doctype="",W.sgmlDecl=""):be===">"?(ve(W,"onsgmldeclaration",W.sgmlDecl),W.sgmlDecl="",W.state=M.TEXT):(j(be)&&(W.state=M.SGML_DECL_QUOTED),W.sgmlDecl+=be);continue;case M.SGML_DECL_QUOTED:be===W.q&&(W.state=M.SGML_DECL,W.q=""),W.sgmlDecl+=be;continue;case M.DOCTYPE:be===">"?(W.state=M.TEXT,ve(W,"ondoctype",W.doctype),W.doctype=!0):(W.doctype+=be,be==="["?W.state=M.DOCTYPE_DTD:j(be)&&(W.state=M.DOCTYPE_QUOTED,W.q=be));continue;case M.DOCTYPE_QUOTED:W.doctype+=be,be===W.q&&(W.q="",W.state=M.DOCTYPE);continue;case M.DOCTYPE_DTD:W.doctype+=be,be==="]"?W.state=M.DOCTYPE:j(be)&&(W.state=M.DOCTYPE_DTD_QUOTED,W.q=be);continue;case M.DOCTYPE_DTD_QUOTED:W.doctype+=be,be===W.q&&(W.state=M.DOCTYPE_DTD,W.q="");continue;case M.COMMENT:be==="-"?W.state=M.COMMENT_ENDING:W.comment+=be;continue;case M.COMMENT_ENDING:be==="-"?(W.state=M.COMMENT_ENDED,W.comment=Se(W.opt,W.comment),W.comment&&ve(W,"oncomment",W.comment),W.comment=""):(W.comment+="-"+be,W.state=M.COMMENT);continue;case M.COMMENT_ENDED:be!==">"?(me(W,"Malformed comment"),W.comment+="--"+be,W.state=M.COMMENT):W.state=M.TEXT;continue;case M.CDATA:be==="]"?W.state=M.CDATA_ENDING:W.cdata+=be;continue;case M.CDATA_ENDING:be==="]"?W.state=M.CDATA_ENDING_2:(W.cdata+="]"+be,W.state=M.CDATA);continue;case M.CDATA_ENDING_2:be===">"?(W.cdata&&ve(W,"oncdata",W.cdata),ve(W,"onclosecdata"),W.cdata="",W.state=M.TEXT):be==="]"?W.cdata+="]":(W.cdata+="]]"+be,W.state=M.CDATA);continue;case M.PROC_INST:be==="?"?W.state=M.PROC_INST_ENDING:J(be)?W.state=M.PROC_INST_BODY:W.procInstName+=be;continue;case M.PROC_INST_BODY:if(!W.procInstBody&&J(be))continue;be==="?"?W.state=M.PROC_INST_ENDING:W.procInstBody+=be;continue;case M.PROC_INST_ENDING:be===">"?(ve(W,"onprocessinginstruction",{name:W.procInstName,body:W.procInstBody}),W.procInstName=W.procInstBody="",W.state=M.TEXT):(W.procInstBody+="?"+be,W.state=M.PROC_INST_BODY);continue;case M.OPEN_TAG:R(fe,be)?W.tagName+=be:(ee(W),be===">"?ue(W):be==="/"?W.state=M.OPEN_TAG_SLASH:(J(be)||me(W,"Invalid character in tag name"),W.state=M.ATTRIB));continue;case M.OPEN_TAG_SLASH:be===">"?(ue(W,!0),K(W)):(me(W,"Forward-slash in opening tag not followed by >"),W.state=M.ATTRIB);continue;case M.ATTRIB:if(J(be))continue;be===">"?ue(W):be==="/"?W.state=M.OPEN_TAG_SLASH:R(ce,be)?(W.attribName=be,W.attribValue="",W.state=M.ATTRIB_NAME):me(W,"Invalid attribute name");continue;case M.ATTRIB_NAME:be==="="?W.state=M.ATTRIB_VALUE:be===">"?(me(W,"Attribute without value"),W.attribValue=W.attribName,Z(W),ue(W)):J(be)?W.state=M.ATTRIB_NAME_SAW_WHITE:R(fe,be)?W.attribName+=be:me(W,"Invalid attribute name");continue;case M.ATTRIB_NAME_SAW_WHITE:if(be==="=")W.state=M.ATTRIB_VALUE;else{if(J(be))continue;me(W,"Attribute without value"),W.tag.attributes[W.attribName]="",W.attribValue="",ve(W,"onattribute",{name:W.attribName,value:""}),W.attribName="",be===">"?ue(W):R(ce,be)?(W.attribName=be,W.state=M.ATTRIB_NAME):(me(W,"Invalid attribute name"),W.state=M.ATTRIB)}continue;case M.ATTRIB_VALUE:if(J(be))continue;j(be)?(W.q=be,W.state=M.ATTRIB_VALUE_QUOTED):(me(W,"Unquoted attribute value"),W.state=M.ATTRIB_VALUE_UNQUOTED,W.attribValue=be);continue;case M.ATTRIB_VALUE_QUOTED:if(be!==W.q){be==="&"?W.state=M.ATTRIB_VALUE_ENTITY_Q:W.attribValue+=be;continue}Z(W),W.q="",W.state=M.ATTRIB_VALUE_CLOSED;continue;case M.ATTRIB_VALUE_CLOSED:J(be)?W.state=M.ATTRIB:be===">"?ue(W):be==="/"?W.state=M.OPEN_TAG_SLASH:R(ce,be)?(me(W,"No whitespace between attributes"),W.attribName=be,W.attribValue="",W.state=M.ATTRIB_NAME):me(W,"Invalid attribute name");continue;case M.ATTRIB_VALUE_UNQUOTED:if(!U(be)){be==="&"?W.state=M.ATTRIB_VALUE_ENTITY_U:W.attribValue+=be;continue}Z(W),be===">"?ue(W):W.state=M.ATTRIB;continue;case M.CLOSE_TAG:if(W.tagName)be===">"?K(W):R(fe,be)?W.tagName+=be:W.script?(W.script+="</"+W.tagName,W.tagName="",W.state=M.SCRIPT):(J(be)||me(W,"Invalid tagname in closing tag"),W.state=M.CLOSE_TAG_SAW_WHITE);else{if(J(be))continue;C(ce,be)?W.script?(W.script+="</"+be,W.state=M.SCRIPT):me(W,"Invalid tagname in closing tag."):W.tagName=be}continue;case M.CLOSE_TAG_SAW_WHITE:if(J(be))continue;be===">"?K(W):me(W,"Invalid characters in closing tag");continue;case M.TEXT_ENTITY:case M.ATTRIB_VALUE_ENTITY_Q:case M.ATTRIB_VALUE_ENTITY_U:var Fe,Ue;switch(W.state){case M.TEXT_ENTITY:Fe=M.TEXT,Ue="textNode";break;case M.ATTRIB_VALUE_ENTITY_Q:Fe=M.ATTRIB_VALUE_QUOTED,Ue="attribValue";break;case M.ATTRIB_VALUE_ENTITY_U:Fe=M.ATTRIB_VALUE_UNQUOTED,Ue="attribValue";break}be===";"?(W[Ue]+=$(W),W.entity="",W.state=Fe):R(W.entity.length?se:z,be)?W.entity+=be:(me(W,"Invalid character in entity name"),W[Ue]+="&"+W.entity+be,W.entity="",W.state=Fe);continue;default:throw new Error(W,"Unknown state: "+W.state)}}return W.position>=W.bufferCheckPosition&&T(W),W}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var O=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+=O.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,i=u("inherits");i(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(_,y){var p=this;function d(v){_.writable&&(_.write(v)===!1&&p.pause&&p.pause())}p.on("data",d);function o(){p.readable&&p.resume&&p.resume()}_.on("drain",o),!_._isStdio&&(!y||y.end!==!1)&&(p.on("end",l),p.on("close",a));var s=!1;function l(){if(s)return;s=!0,_.end()}function a(){if(s)return;s=!0,typeof _.destroy=="function"&&_.destroy()}function g(v){if(m(),h.listenerCount(this,"error")===0)throw v}p.on("error",g),_.on("error",g);function m(){p.removeListener("data",d),_.removeListener("drain",o),p.removeListener("end",l),p.removeListener("close",a),p.removeListener("error",g),_.removeListener("error",g),p.removeListener("end",m),p.removeListener("close",m),_.removeListener("close",m)}return p.on("end",m),p.on("close",m),_.on("close",m),_.emit("pipe",p),_}},{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 i=u("./lib/request"),S=u("./lib/response"),_=u("xtend"),y=u("builtin-status-codes"),p=u("url"),d=c;d.request=function(o,s){typeof o=="string"?o=p.parse(o):o=_(o);var l=h.location.protocol.search(/^https?:$/)===-1?"http:":"",a=o.protocol||l,g=o.hostname||o.host,m=o.port,v=o.path||"/";g&&g.indexOf(":")!==-1&&(g="["+g+"]"),o.url=(g?a+"//"+g:"")+(m?":"+m:"")+v,o.method=(o.method||"GET").toUpperCase(),o.headers=o.headers||{};var w=new i(o);return s&&w.on("response",s),w},d.get=function(s,l){var a=d.request(s,l);return a.end(),a},d.ClientRequest=i,d.IncomingMessage=S.IncomingMessage,d.Agent=function(){},d.Agent.defaultMaxSockets=4,d.globalAgent=new d.Agent,d.STATUS_CODES=y,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(o){}var i;function S(){if(i!==void 0)return i;if(h.XMLHttpRequest){i=new h.XMLHttpRequest;try{i.open("GET",h.XDomainRequest?"/":"https://example.com")}catch(o){i=null}}else i=null;return i}function _(o){var s=S();if(!s)return!1;try{return s.responseType=o,s.responseType===o}catch(l){}return!1}var y=typeof h.ArrayBuffer!="undefined",p=y&&d(h.ArrayBuffer.prototype.slice);c.arraybuffer=c.fetch||y&&_("arraybuffer"),c.msstream=!c.fetch&&p&&_("ms-stream"),c.mozchunkedarraybuffer=!c.fetch&&y&&_("moz-chunked-arraybuffer"),c.overrideMimeType=c.fetch||(S()?d(S().overrideMimeType):!1),c.vbArray=d(h.VBArray);function d(o){return typeof o=="function"}i=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(u,G,c){(function(h,i,S){"use strict";var _=u("babel-runtime/core-js/object/keys"),y=p(_);function p(T){return T&&T.__esModule?T:{default:T}}var d=u("./capability"),o=u("inherits"),s=u("./response"),l=u("readable-stream"),a=u("to-arraybuffer"),g=s.IncomingMessage,m=s.readyStates;function v(T,D){return d.fetch&&D?"fetch":d.mozchunkedarraybuffer?"moz-chunked-arraybuffer":d.msstream?"ms-stream":d.arraybuffer&&T?"arraybuffer":d.vbArray&&T?"text:vbarray":"text"}var w=G.exports=function(T){var D=this;l.Writable.call(D),D._opts=T,D._body=[],D._headers={},T.auth&&D.setHeader("Authorization","Basic "+new S(T.auth).toString("base64")),(0,y.default)(T.headers).forEach(function(N){D.setHeader(N,T.headers[N])});var I,B=!0;if(T.mode==="disable-fetch"||"requestTimeout"in T&&!d.abortController)B=!1,I=!0;else if(T.mode==="prefer-streaming")I=!1;else if(T.mode==="allow-wrong-content-type")I=!d.overrideMimeType;else if(!T.mode||T.mode==="default"||T.mode==="prefer-fast")I=!0;else throw new Error("Invalid value for opts.mode");D._mode=v(I,B),D._fetchTimer=null,D.on("finish",function(){D._onFinish()})};o(w,l.Writable),w.prototype.setHeader=function(T,D){var I=this,B=T.toLowerCase();if(k.indexOf(B)!==-1)return;I._headers[B]={name:T,value:D}},w.prototype.getHeader=function(T){var D=this._headers[T.toLowerCase()];return D?D.value:null},w.prototype.removeHeader=function(T){var D=this;delete D._headers[T.toLowerCase()]},w.prototype._onFinish=function(){var T=this;if(T._destroyed)return;var D=T._opts,I=T._headers,B=null;D.method!=="GET"&&D.method!=="HEAD"&&(d.arraybuffer?B=a(S.concat(T._body)):d.blobConstructor?B=new i.Blob(T._body.map(function(F){return a(F)}),{type:(I["content-type"]||{}).value||""}):B=S.concat(T._body).toString());var N=[];if((0,y.default)(I).forEach(function(F){var X=I[F].name,Q=I[F].value;Array.isArray(Q)?Q.forEach(function(ce){N.push([X,ce])}):N.push([X,Q])}),T._mode==="fetch"){var x=null,Y=null;if(d.abortController){var V=new AbortController;x=V.signal,T._fetchAbortController=V,"requestTimeout"in D&&D.requestTimeout!==0&&(T._fetchTimer=i.setTimeout(function(){T.emit("requestTimeout"),T._fetchAbortController&&T._fetchAbortController.abort()},D.requestTimeout))}i.fetch(T._opts.url,{method:T._opts.method,headers:N,body:B||void 0,mode:"cors",credentials:D.withCredentials?"include":"same-origin",signal:x}).then(function(F){T._fetchResponse=F,T._connect()},function(F){i.clearTimeout(T._fetchTimer),T._destroyed||T.emit("error",F)})}else{var P=T._xhr=new i.XMLHttpRequest;try{P.open(T._opts.method,T._opts.url,!0)}catch(F){h.nextTick(function(){T.emit("error",F)});return}"responseType"in P&&(P.responseType=T._mode.split(":")[0]),"withCredentials"in P&&(P.withCredentials=!!D.withCredentials),T._mode==="text"&&"overrideMimeType"in P&&P.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in D&&(P.timeout=D.requestTimeout,P.ontimeout=function(){T.emit("requestTimeout")}),N.forEach(function(F){P.setRequestHeader(F[0],F[1])}),T._response=null,P.onreadystatechange=function(){switch(P.readyState){case m.LOADING:case m.DONE:T._onXHRProgress();break}},T._mode==="moz-chunked-arraybuffer"&&(P.onprogress=function(){T._onXHRProgress()}),P.onerror=function(){if(T._destroyed)return;T.emit("error",new Error("XHR error"))};try{P.send(B)}catch(F){h.nextTick(function(){T.emit("error",F)});return}}};function E(T){try{var D=T.status;return D!==null&&D!==0}catch(I){return!1}}w.prototype._onXHRProgress=function(){var T=this;if(!E(T._xhr)||T._destroyed)return;T._response||T._connect(),T._response._onXHRProgress()},w.prototype._connect=function(){var T=this;if(T._destroyed)return;T._response=new g(T._xhr,T._fetchResponse,T._mode,T._fetchTimer),T._response.on("error",function(D){T.emit("error",D)}),T.emit("response",T._response)},w.prototype._write=function(T,D,I){var B=this;B._body.push(T),I()},w.prototype.abort=w.prototype.destroy=function(){var T=this;T._destroyed=!0,i.clearTimeout(T._fetchTimer),T._response&&(T._response._destroyed=!0),T._xhr?T._xhr.abort():T._fetchAbortController&&T._fetchAbortController.abort()},w.prototype.end=function(T,D,I){var B=this;typeof T=="function"&&(I=T,T=void 0),l.Writable.prototype.end.call(B,T,D,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,i,S){"use strict";var _=u("babel-runtime/core-js/promise"),y=p(_);function p(g){return g&&g.__esModule?g:{default:g}}var d=u("./capability"),o=u("inherits"),s=u("readable-stream"),l=c.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=c.IncomingMessage=function(g,m,v,w){var E=this;if(s.Readable.call(E),E._mode=v,E.headers={},E.rawHeaders=[],E.trailers={},E.rawTrailers=[],E.on("end",function(){h.nextTick(function(){E.emit("close")})}),v==="fetch"){var k=function x(){D.read().then(function(Y){if(E._destroyed)return;if(Y.done){i.clearTimeout(w),E.push(null);return}E.push(new S(Y.value)),x()}).catch(function(Y){i.clearTimeout(w),E._destroyed||E.emit("error",Y)})};if(E._fetchResponse=m,E.url=m.url,E.statusCode=m.status,E.statusMessage=m.statusText,m.headers.forEach(function(x,Y){E.headers[Y.toLowerCase()]=x,E.rawHeaders.push(Y,x)}),d.writableStream){var T=new WritableStream({write:function(Y){return new y.default(function(V,P){E._destroyed?P():E.push(new S(Y))?V():E._resumeFetch=V})},close:function(){i.clearTimeout(w),E._destroyed||E.push(null)},abort:function(Y){E._destroyed||E.emit("error",Y)}});try{m.body.pipeTo(T).catch(function(x){i.clearTimeout(w),E._destroyed||E.emit("error",x)});return}catch(x){}}var D=m.body.getReader();k()}else{E._xhr=g,E._pos=0,E.url=g.responseURL,E.statusCode=g.status,E.statusMessage=g.statusText;var I=g.getAllResponseHeaders().split(/\r?\n/);if(I.forEach(function(x){var Y=x.match(/^([^:]+):\s*(.*)/);if(Y){var V=Y[1].toLowerCase();V==="set-cookie"?(E.headers[V]===void 0&&(E.headers[V]=[]),E.headers[V].push(Y[2])):E.headers[V]!==void 0?E.headers[V]+=", "+Y[2]:E.headers[V]=Y[2],E.rawHeaders.push(Y[1],Y[2])}}),E._charset="x-user-defined",!d.overrideMimeType){var B=E.rawHeaders["mime-type"];if(B){var N=B.match(/;\s*charset=([^;])(;|$)/);N&&(E._charset=N[1].toLowerCase())}E._charset||(E._charset="utf-8")}}};o(a,s.Readable),a.prototype._read=function(){var g=this,m=g._resumeFetch;m&&(g._resumeFetch=null,m())},a.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 i.VBArray(m.responseBody).toArray()}catch(D){}if(v!==null){g.push(new S(v));break}case"text":try{v=m.responseText}catch(D){g._mode="text:vbarray";break}if(v.length>g._pos){var w=v.substr(g._pos);if(g._charset==="x-user-defined"){for(var E=new S(w.length),k=0;k<w.length;k++)E[k]=w.charCodeAt(k)&255;g.push(E)}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 T=new i.MSStreamReader;T.onprogress=function(){T.result.byteLength>g._pos&&(g.push(new S(new Uint8Array(T.result.slice(g._pos)))),g._pos=T.result.byteLength)},T.onload=function(){g.push(null)},T.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,i=h.isEncoding||function(T){T=""+T;switch(T&&T.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(T){if(!T)return"utf8";for(var D;;)switch(T){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 T;default:if(D)return;T=(""+T).toLowerCase(),D=!0}}function _(T){var D=S(T);if(typeof D!="string"&&(h.isEncoding===i||!i(T)))throw new Error("Unknown encoding: "+T);return D||T}c.StringDecoder=y;function y(T){this.encoding=_(T);var D;switch(this.encoding){case"utf16le":this.text=g,this.end=m,D=4;break;case"utf8":this.fillLast=s,D=4;break;case"base64":this.text=v,this.end=w,D=3;break;default:this.write=E,this.end=k;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(D)}y.prototype.write=function(T){if(T.length===0)return"";var D,I;if(this.lastNeed){if(D=this.fillLast(T),D===void 0)return"";I=this.lastNeed,this.lastNeed=0}else I=0;return I<T.length?D?D+this.text(T,I):this.text(T,I):D||""},y.prototype.end=a,y.prototype.text=l,y.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function p(T){return T<=127?0:T>>5===6?2:T>>4===14?3:T>>3===30?4:T>>6===2?-1:-2}function d(T,D,I){var B=D.length-1;if(B<I)return 0;var N=p(D[B]);return N>=0?(N>0&&(T.lastNeed=N-1),N):--B<I||N===-2?0:(N=p(D[B]),N>=0?(N>0&&(T.lastNeed=N-2),N):--B<I||N===-2?0:(N=p(D[B]),N>=0?(N>0&&(N===2?N=0:T.lastNeed=N-3),N):0))}function o(T,D,I){if((D[0]&192)!==128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&D.length>1){if((D[1]&192)!==128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&D.length>2&&(D[2]&192)!==128)return T.lastNeed=2,"\uFFFD"}}function s(T){var D=this.lastTotal-this.lastNeed,I=o(this,T,D);if(I!==void 0)return I;if(this.lastNeed<=T.length)return T.copy(this.lastChar,D,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,D,0,T.length),this.lastNeed-=T.length}function l(T,D){var I=d(this,T,D);if(!this.lastNeed)return T.toString("utf8",D);this.lastTotal=I;var B=T.length-(I-this.lastNeed);return T.copy(this.lastChar,0,B),T.toString("utf8",D,B)}function a(T){var D=T&&T.length?this.write(T):"";return this.lastNeed?D+"\uFFFD":D}function g(T,D){if((T.length-D)%2===0){var I=T.toString("utf16le",D);if(I){var B=I.charCodeAt(I.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],I.slice(0,-1)}return I}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",D,T.length-1)}function m(T){var D=T&&T.length?this.write(T):"";if(this.lastNeed){var I=this.lastTotal-this.lastNeed;return D+this.lastChar.toString("utf16le",0,I)}return D}function v(T,D){var I=(T.length-D)%3;return I===0?T.toString("base64",D):(this.lastNeed=3-I,this.lastTotal=3,I===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",D,T.length-I))}function w(T){var D=T&&T.length?this.write(T):"";return this.lastNeed?D+this.lastChar.toString("base64",0,3-this.lastNeed):D}function E(T){return T.toString(this.encoding)}function k(T){return T&&T.length?this.write(T):""}},{"safe-buffer":228}],236:[function(u,G,c){(function(h,i){var S=u("process/browser.js").nextTick,_=Function.prototype.apply,y=Array.prototype.slice,p={},d=0;c.setTimeout=function(){return new o(_.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new o(_.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(s){s.close()};function o(s,l){this._id=s,this._clearFn=l}o.prototype.unref=o.prototype.ref=function(){},o.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++,a=arguments.length<2?!1:y.call(arguments,1);return p[l]=!0,S(function(){p[l]&&(a?s.apply(null,a):s.call(null),c.clearImmediate(l))}),l},c.clearImmediate=typeof i=="function"?i: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(i){if(i instanceof Uint8Array){if(i.byteOffset===0&&i.byteLength===i.buffer.byteLength)return i.buffer;if(typeof i.buffer.slice=="function")return i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}if(h.isBuffer(i)){for(var S=new Uint8Array(i.length),_=i.length,y=0;y<_;y++)S[y]=i[y];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"),i=u("./util");c.parse=D,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 _=/^([a-z0-9.+-]+:)/i,y=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r",`
`," "],o=["{","}","|","\\","^","`"].concat(d),s=["'"].concat(o),l=["%","/","?",";","#"].concat(s),a=["/","?","#"],g=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},E={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},T=u("querystring");function D(x,Y,V){if(x&&i.isObject(x)&&x instanceof S)return x;var P=new S;return P.parse(x,Y,V),P}S.prototype.parse=function(x,Y,V){if(!i.isString(x))throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var P=x.indexOf("?"),F=P!==-1&&P<x.indexOf("#")?"?":"#",X=x.split(F),Q=/\\/g;X[0]=X[0].replace(Q,"/"),x=X.join(F);var ce=x;if(ce=ce.trim(),!V&&x.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=T.parse(this.search.substr(1)):this.query=this.search.substr(1)):Y&&(this.search="",this.query={}),this}var z=_.exec(ce);if(z){z=z[0];var se=z.toLowerCase();this.protocol=se,ce=ce.substr(z.length)}if(V||z||ce.match(/^\/\/[^@\/]+@[^@\/]+/)){var J=ce.substr(0,2)==="//";J&&!(z&&E[z])&&(ce=ce.substr(2),this.slashes=!0)}if(!E[z]&&(J||z&&!k[z])){for(var j=-1,U=0;U<a.length;U++){var R=ce.indexOf(a[U]);R!==-1&&(j===-1||R<j)&&(j=R)}var C,M;j===-1?M=ce.lastIndexOf("@"):M=ce.lastIndexOf("@",j),M!==-1&&(C=ce.slice(0,M),ce=ce.slice(M+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),ne=Ee.match(v);ne&&(me.push(ne[1]),ee.unshift(ne[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 K=s[U];if(ce.indexOf(K)===-1)continue;var $=encodeURIComponent(K);$===K&&($=escape(K)),ce=ce.split(K).join($)}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=T.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(x){return i.isString(x)&&(x=D(x)),x instanceof S?x.format():S.prototype.format.call(x)}S.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var Y=this.protocol||"",V=this.pathname||"",P=this.hash||"",F=!1,X="";this.host?F=x+this.host:this.hostname&&(F=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(F+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(X=T.stringify(this.query));var Q=this.search||X&&"?"+X||"";return Y&&Y.substr(-1)!==":"&&(Y+=":"),this.slashes||(!Y||k[Y])&&F!==!1?(F="//"+(F||""),V&&V.charAt(0)!=="/"&&(V="/"+V)):F||(F=""),P&&P.charAt(0)!=="#"&&(P="#"+P),Q&&Q.charAt(0)!=="?"&&(Q="?"+Q),V=V.replace(/[?#]/g,function(ce){return encodeURIComponent(ce)}),Q=Q.replace("#","%23"),Y+F+V+Q+P};function B(x,Y){return D(x,!1,!0).resolve(Y)}S.prototype.resolve=function(x){return this.resolveObject(D(x,!1,!0)).format()};function N(x,Y){return x?D(x,!1,!0).resolveObject(Y):Y}S.prototype.resolveObject=function(x){if(i.isString(x)){var Y=new S;Y.parse(x,!1,!0),x=Y}for(var V=new S,P=Object.keys(this),F=0;F<P.length;F++){var X=P[F];V[X]=this[X]}if(V.hash=x.hash,x.href==="")return V.href=V.format(),V;if(x.slashes&&!x.protocol){for(var Q=Object.keys(x),ce=0;ce<Q.length;ce++){var fe=Q[ce];fe!=="protocol"&&(V[fe]=x[fe])}return k[V.protocol]&&V.hostname&&!V.pathname&&(V.path=V.pathname="/"),V.href=V.format(),V}if(x.protocol&&x.protocol!==V.protocol){if(!k[x.protocol]){for(var z=Object.keys(x),se=0;se<z.length;se++){var J=z[se];V[J]=x[J]}return V.href=V.format(),V}if(V.protocol=x.protocol,!x.host&&!E[x.protocol]){for(var ve=(x.pathname||"").split("/");ve.length&&!(x.host=ve.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),ve[0]!==""&&ve.unshift(""),ve.length<2&&ve.unshift(""),V.pathname=ve.join("/")}else V.pathname=x.pathname;if(V.search=x.search,V.query=x.query,V.host=x.host||"",V.auth=x.auth,V.hostname=x.hostname||x.host,V.port=x.port,V.pathname||V.search){var j=V.pathname||"",U=V.search||"";V.path=j+U}return V.slashes=V.slashes||x.slashes,V.href=V.format(),V}var R=V.pathname&&V.pathname.charAt(0)==="/",C=x.host||x.pathname&&x.pathname.charAt(0)==="/",M=C||R||V.host&&x.pathname,le=M,he=V.pathname&&V.pathname.split("/")||[],ve=x.pathname&&x.pathname.split("/")||[],Ee=V.protocol&&!k[V.protocol];if(Ee&&(V.hostname="",V.port=null,V.host&&(he[0]===""?he[0]=V.host:he.unshift(V.host)),V.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&(ve[0]===""?ve[0]=x.host:ve.unshift(x.host)),x.host=null),M=M&&(ve[0]===""||he[0]==="")),C)V.host=x.host||x.host===""?x.host:V.host,V.hostname=x.hostname||x.hostname===""?x.hostname:V.hostname,V.search=x.search,V.query=x.query,he=ve;else if(ve.length)he||(he=[]),he.pop(),he=he.concat(ve),V.search=x.search,V.query=x.query;else if(!i.isNullOrUndefined(x.search)){if(Ee){V.hostname=V.host=he.shift();var Se=V.host&&V.host.indexOf("@")>0?V.host.split("@"):!1;Se&&(V.auth=Se.shift(),V.host=V.hostname=Se.shift())}return V.search=x.search,V.query=x.query,(!i.isNull(V.pathname)||!i.isNull(V.search))&&(V.path=(V.pathname?V.pathname:"")+(V.search?V.search:"")),V.href=V.format(),V}if(!he.length)return V.pathname=null,V.search?V.path="/"+V.search:V.path=null,V.href=V.format(),V;for(var ae=he.slice(-1)[0],pe=(V.host||x.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(!M&&!le)for(;me--;me)he.unshift("..");M&&he[0]!==""&&(!he[0]||he[0].charAt(0)!=="/")&&he.unshift(""),pe&&he.join("/").substr(-1)!=="/"&&he.push("");var ne=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(Ee){V.hostname=V.host=ne?"":he.length?he.shift():"";var Se=V.host&&V.host.indexOf("@")>0?V.host.split("@"):!1;Se&&(V.auth=Se.shift(),V.host=V.hostname=Se.shift())}return M=M||V.host&&he.length,M&&!ne&&he.unshift(""),he.length?V.pathname=he.join("/"):(V.pathname=null,V.path=null),(!i.isNull(V.pathname)||!i.isNull(V.search))&&(V.path=(V.pathname?V.pathname:"")+(V.search?V.search:"")),V.auth=x.auth||V.auth,V.slashes=V.slashes||x.slashes,V.href=V.format(),V},S.prototype.parseHost=function(){var x=this.host,Y=y.exec(x);Y&&(Y=Y[0],Y!==":"&&(this.port=Y.substr(1)),x=x.substr(0,x.length-Y.length)),x&&(this.hostname=x)}},{"./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=i;function i(_,y){if(S("noDeprecation"))return _;var p=!1;function d(){if(!p){if(S("throwDeprecation"))throw new Error(y);S("traceDeprecation")?console.trace(y):console.warn(y),p=!0}return _.apply(this,arguments)}return d}function S(_){try{if(!h.localStorage)return!1}catch(p){return!1}var y=h.localStorage[_];return y==null?!1:String(y).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(i,S){i.super_=S,i.prototype=Object.create(S.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})}:G.exports=function(i,S){i.super_=S;var _=function(){};_.prototype=S.prototype,i.prototype=new _,i.prototype.constructor=i}},{}],242:[function(u,G,c){G.exports=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}},{}],243:[function(u,G,c){(function(h,i){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,M=C.length,le=String(j).replace(S,function(ve){if(ve==="%%")return"%";if(R>=M)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<M;he=C[++R])T(he)||!V(he)?le+=" "+he:le+=" "+p(he);return le},c.deprecate=function(j,U){if(x(i.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 _={},y;c.debuglog=function(j){if(x(y)&&(y=h.env.NODE_DEBUG||""),j=j.toUpperCase(),!_[j])if(new RegExp("\\b"+j+"\\b","i").test(y)){var U=h.pid;_[j]=function(){var R=c.format.apply(c,arguments);console.error("%s %d: %s",j,U,R)}}else _[j]=function(){};return _[j]};function p(j,U){var R={seen:[],stylize:o};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),x(R.showHidden)&&(R.showHidden=!1),x(R.depth)&&(R.depth=2),x(R.colors)&&(R.colors=!1),x(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 o(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&&X(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 M=a(j,U);if(M)return M;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(X(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(E(U)&&(Se=!0,ae=["[","]"]),X(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 a(j,U){if(x(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(T(U))return j.stylize("null","null")}function g(j){return"["+Error.prototype.toString.call(j)+"]"}function m(j,U,R,C,M){for(var le=[],he=0,ve=U.length;he<ve;++he)J(U,String(he))?le.push(v(j,U,R,C,String(he),!0)):le.push("");return M.forEach(function(Ee){Ee.match(/^\d+$/)||le.push(v(j,U,R,C,Ee,!0))}),le}function v(j,U,R,C,M,le){var he,ve,Ee;if(Ee=Object.getOwnPropertyDescriptor(U,M)||{value:U[M]},Ee.get?Ee.set?ve=j.stylize("[Getter/Setter]","special"):ve=j.stylize("[Getter]","special"):Ee.set&&(ve=j.stylize("[Setter]","special")),J(C,M)||(he="["+M+"]"),ve||(j.seen.indexOf(Ee.value)<0?(T(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")),x(he)){if(le&&M.match(/^\d+$/))return ve;he=JSON.stringify(""+M),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,M=j.reduce(function(le,he){return C++,he.indexOf(`
`)>=0&&C++,le+he.replace(/\u001b\[\d\d?m/g,"").length+1},0);return M>60?R[0]+(U===""?"":U+`
`)+" "+j.join(`,
`)+" "+R[1]:R[0]+U+" "+j.join(", ")+" "+R[1]}function E(j){return Array.isArray(j)}c.isArray=E;function k(j){return typeof j=="boolean"}c.isBoolean=k;function T(j){return j===null}c.isNull=T;function D(j){return j==null}c.isNullOrUndefined=D;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 x(j){return j===void 0}c.isUndefined=x;function Y(j){return V(j)&&ce(j)==="[object RegExp]"}c.isRegExp=Y;function V(j){return typeof j=="object"&&j!==null}c.isObject=V;function P(j){return V(j)&&ce(j)==="[object Date]"}c.isDate=P;function F(j){return V(j)&&(ce(j)==="[object Error]"||j instanceof Error)}c.isError=F;function X(j){return typeof j=="function"}c.isFunction=X;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||!V(U))return j;for(var R=Object.keys(U),C=R.length;C--;)j[R[C]]=U[R[C]];return j};function J(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"),i=y(h),S=u("babel-runtime/core-js/object/keys"),_=y(S);function y(p){return p&&p.__esModule?p:{default:p}}(function(){"use strict";var p,d,o,s,l,a={}.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["+o(m)+"]]>"},o=function(m){return m.replace("]]>","]]]]><![CDATA[>")},c.Builder=function(){function g(m){var v,w,E;this.options={},w=d["0.2"];for(v in w){if(!a.call(w,v))continue;E=w[v],this.options[v]=E}for(v in m){if(!a.call(m,v))continue;E=m[v],this.options[v]=E}}return g.prototype.buildObject=function(m){var v,w,E,k,T;return v=this.options.attrkey,w=this.options.charkey,(0,_.default)(m).length===1&&this.options.rootName===d["0.2"].rootName?(T=(0,_.default)(m)[0],m=m[T]):T=this.options.rootName,E=function(D){return function(I,B){var N,x,Y,V,P,F;if((typeof B=="undefined"?"undefined":(0,i.default)(B))!=="object")D.options.cdata&&s(B)?I.raw(l(B)):I.txt(B);else if(Array.isArray(B))for(V in B){if(!a.call(B,V))continue;x=B[V];for(P in x)Y=x[P],I=E(I.ele(P),Y).up()}else for(P in B){if(!a.call(B,P))continue;if(x=B[P],P===v){if((typeof x=="undefined"?"undefined":(0,i.default)(x))==="object")for(N in x)F=x[N],I=I.att(N,F)}else if(P===w)D.options.cdata&&s(x)?I=I.raw(l(x)):I=I.txt(x);else if(Array.isArray(x))for(V in x){if(!a.call(x,V))continue;Y=x[V],typeof Y=="string"?D.options.cdata&&s(Y)?I=I.ele(P).raw(l(Y)).up():I=I.ele(P,Y).up():I=E(I.ele(P),Y).up()}else(typeof x=="undefined"?"undefined":(0,i.default)(x))==="object"?I=E(I.ele(P),x).up():typeof x=="string"&&D.options.cdata&&s(x)?I=I.ele(P).raw(l(x)).up():(x==null&&(x=""),I=I.ele(P,x.toString()).up())}return I}}(this),k=p.create(T,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),E(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"),i=s(h),S=u("babel-runtime/core-js/object/get-own-property-names"),_=s(S),y=u("babel-runtime/core-js/object/keys"),p=s(y),d=u("babel-runtime/helpers/typeof"),o=s(d);function s(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,a,g,m,v,w,E,k,T=function(N,x){return function(){return N.apply(x,arguments)}},D=function(N,x){for(var Y in x)I.call(x,Y)&&(N[Y]=x[Y]);function V(){this.constructor=N}return V.prototype=x.prototype,N.prototype=new V,N.__super__=x.prototype,N},I={}.hasOwnProperty;E=u("sax"),g=u("events"),l=u("./bom"),w=u("./processors"),k=u("timers").setImmediate,a=u("./defaults").defaults,m=function(N){return(typeof N=="undefined"?"undefined":(0,o.default)(N))==="object"&&N!=null&&(0,p.default)(N).length===0},v=function(N,x,Y){var V,P,F;for(V=0,P=N.length;V<P;V++)F=N[V],x=F(x,Y);return x},c.Parser=function(B){D(N,B);function N(x){this.parseStringPromise=T(this.parseStringPromise,this),this.parseString=T(this.parseString,this),this.reset=T(this.reset,this),this.assignOrPush=T(this.assignOrPush,this),this.processAsync=T(this.processAsync,this);var Y,V,P;if(!(this instanceof c.Parser))return new c.Parser(x);this.options={},V=a["0.2"];for(Y in V){if(!I.call(V,Y))continue;P=V[Y],this.options[Y]=P}for(Y in x){if(!I.call(x,Y))continue;P=x[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 x,Y;try{return this.remaining.length<=this.options.chunkSize?(x=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(x),this.saxParser.close()):(x=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(x),k(this.processAsync))}catch(V){if(Y=V,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Y)}},N.prototype.assignOrPush=function(x,Y,V){return Y in x?(x[Y]instanceof Array||(x[Y]=[x[Y]]),x[Y].push(V)):this.options.explicitArray?x[Y]=[V]:x[Y]=V},N.prototype.reset=function(){var x,Y,V,P;return this.removeAllListeners(),this.saxParser=E.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(F){return function(X){if(F.saxParser.resume(),!F.saxParser.errThrown)return F.saxParser.errThrown=!0,F.emit("error",X)}}(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=[],x=this.options.attrkey,Y=this.options.charkey,this.saxParser.onopentag=function(F){return function(X){var Q,ce,fe,z,se;if(fe={},fe[Y]="",!F.options.ignoreAttrs){se=X.attributes;for(Q in se){if(!I.call(se,Q))continue;!(x in fe)&&!F.options.mergeAttrs&&(fe[x]={}),ce=F.options.attrValueProcessors?v(F.options.attrValueProcessors,X.attributes[Q],Q):X.attributes[Q],z=F.options.attrNameProcessors?v(F.options.attrNameProcessors,Q):Q,F.options.mergeAttrs?F.assignOrPush(fe,z,ce):fe[x][z]=ce}}return fe["#name"]=F.options.tagNameProcessors?v(F.options.tagNameProcessors,X.name):X.name,F.options.xmlns&&(fe[F.options.xmlnskey]={uri:X.uri,local:X.local}),P.push(fe)}}(this),this.saxParser.onclosetag=function(F){return function(){var X,Q,ce,fe,z,se,J,j,U,R;if(se=P.pop(),z=se["#name"],(!F.options.explicitChildren||!F.options.preserveChildrenOrder)&&delete se["#name"],se.cdata===!0&&(X=se.cdata,delete se.cdata),U=P[P.length-1],se[Y].match(/^\s*$/)&&!X?(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,M,le;for(le=[],C=0,M=P.length;C<M;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(M){return C=M,F.emit("error",C)}}()),F.options.explicitChildren&&!F.options.mergeAttrs&&(typeof se=="undefined"?"undefined":(0,o.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,_.default)(se).length>0&&(fe[F.options.childkey]=se),se=fe;else if(U){U[F.options.childkey]=U[F.options.childkey]||[],J={};for(ce in se){if(!I.call(se,ce))continue;J[ce]=se[ce]}U[F.options.childkey].push(J),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),V=function(F){return function(X){var Q,ce;if(ce=P[P.length-1],ce)return ce[Y]+=X,F.options.explicitChildren&&F.options.preserveChildrenOrder&&F.options.charsAsChildren&&(F.options.includeWhiteChars||X.replace(/\\n/g,"").trim()!=="")&&(ce[F.options.childkey]=ce[F.options.childkey]||[],Q={"#name":"__text__"},Q[Y]=X,F.options.normalize&&(Q[Y]=Q[Y].replace(/\s{2,}/g," ").trim()),ce[F.options.childkey].push(Q)),ce}}(this),this.saxParser.ontext=V,this.saxParser.oncdata=function(F){return function(X){var Q;if(Q=V(X),Q)return Q.cdata=!0}}(this)},N.prototype.parseString=function(x,Y){var V;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 x=x.toString(),x.trim()===""?(this.emit("end",null),!0):(x=l.stripBOM(x),this.options.async?(this.remaining=x,k(this.processAsync),this.saxParser):this.saxParser.write(x).close())}catch(P){if(V=P,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw V}else return this.emit("error",V),this.saxParser.errThrown=!0}},N.prototype.parseStringPromise=function(x){return new i.default(function(Y){return function(V,P){return Y.parseString(x,function(F,X){return F?P(F):V(X)})}}(this))},N}(g),c.parseString=function(B,N,x){var Y,V,P;return x!=null?(typeof x=="function"&&(Y=x),(typeof N=="undefined"?"undefined":(0,o.default)(N))==="object"&&(V=N)):(typeof N=="function"&&(Y=N),V={}),P=new c.Parser(V),P.parseString(B,Y)},c.parseStringPromise=function(B,N){var x,Y;return(typeof N=="undefined"?"undefined":(0,o.default)(N))==="object"&&(x=N),Y=new c.Parser(x),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(i){return i.toLowerCase()},c.firstCharLowerCase=function(i){return i.charAt(0).toLowerCase()+i.slice(1)},c.stripPrefix=function(i){return i.replace(h,"")},c.parseNumbers=function(i){return isNaN(i)||(i=i%1===0?parseInt(i,10):parseFloat(i)),i},c.parseBooleans=function(i){return/^(?:true|false)$/i.test(i)&&(i=i.toLowerCase()==="true"),i}}).call(void 0)},{}],249:[function(u,G,c){"use strict";(function(){"use strict";var h,i,S,_,y=function(o,s){for(var l in s)p.call(s,l)&&(o[l]=s[l]);function a(){this.constructor=o}return a.prototype=s.prototype,o.prototype=new a,o.__super__=s.prototype,o},p={}.hasOwnProperty;i=u("./defaults"),h=u("./builder"),S=u("./parser"),_=u("./processors"),c.defaults=i.defaults,c.processors=_,c.ValidationError=function(d){y(o,d);function o(s){this.message=s}return o}(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"),i=d(h),S=u("babel-runtime/helpers/typeof"),_=d(S),y=u("babel-runtime/core-js/object/assign"),p=d(y);function d(o){return o&&o.__esModule?o:{default:o}}(function(){var o,s,l,a,g,m,v,w=[].slice,E={}.hasOwnProperty;o=function(){var T,D,I,B,N,x;if(x=arguments[0],N=2<=arguments.length?w.call(arguments,1):[],g(p.default))p.default.apply(null,arguments);else for(T=0,I=N.length;T<I;T++)if(B=N[T],B!=null)for(D in B){if(!E.call(B,D))continue;x[D]=B[D]}return x},g=function(T){return!!T&&Object.prototype.toString.call(T)==="[object Function]"},m=function(T){var D;return!!T&&((D=typeof T=="undefined"?"undefined":(0,_.default)(T))==="function"||D==="object")},l=function(T){return g(Array.isArray)?Array.isArray(T):Object.prototype.toString.call(T)==="[object Array]"},a=function(T){var D;if(l(T))return!T.length;for(D in T){if(!E.call(T,D))continue;return!1}return!0},v=function(T){var D,I;return m(T)&&(I=(0,i.default)(T))&&(D=I.constructor)&&typeof D=="function"&&D instanceof D&&Function.prototype.toString.call(D)===Function.prototype.toString.call(Object)},s=function(T){return g(T.valueOf)?T.valueOf():T},G.exports.assign=o,G.exports.isFunction=g,G.exports.isObject=m,G.exports.isArray=l,G.exports.isEmpty=a,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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p;_=u("./NodeType"),p=u("./XMLNode"),G.exports=y=function(){function d(o,s,l){if(this.parent=o,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=_.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,i.default)(this)},d.prototype.toString=function(o){return this.options.writer.attribute(this,this.options.writer.filterOptions(o))},d.prototype.debugInfo=function(o){return o=o||this.name,o==null?"parent: <"+this.parent.name+">":"attribute: {"+o+"}, parent: <"+this.parent.name+">"},d.prototype.isEqualNode=function(o){return o.namespaceURI!==this.namespaceURI||(o.prefix!==this.prefix||o.localName!==this.localName)?!1:!(o.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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d=function(l,a){for(var g in a)o.call(a,g)&&(l[g]=a[g]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},o={}.hasOwnProperty;_=u("./NodeType"),p=u("./XMLCharacterData"),G.exports=y=function(s){d(l,s);function l(a,g){if(l.__super__.constructor.call(this,a),g==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=_.CData,this.value=this.stringify.cdata(g)}return l.prototype.clone=function(){return(0,i.default)(this)},l.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p=function(s,l){for(var a in l)d.call(l,a)&&(s[a]=l[a]);function g(){this.constructor=s}return g.prototype=l.prototype,s.prototype=new g,s.__super__=l.prototype,s},d={}.hasOwnProperty;y=u("./XMLNode"),G.exports=_=function(o){p(s,o);function s(l){s.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(s.prototype,"data",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(s.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(s.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),s.prototype.clone=function(){return(0,i.default)(this)},s.prototype.substringData=function(l,a){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,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.deleteData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.replaceData=function(l,a,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}(y)}).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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d=function(l,a){for(var g in a)o.call(a,g)&&(l[g]=a[g]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},o={}.hasOwnProperty;_=u("./NodeType"),y=u("./XMLCharacterData"),G.exports=p=function(s){d(l,s);function l(a,g){if(l.__super__.constructor.call(this,a),g==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=_.Comment,this.value=this.stringify.comment(g)}return l.prototype.clone=function(){return(0,i.default)(this)},l.prototype.toString=function(a){return this.options.writer.comment(this,this.options.writer.filterOptions(a))},l}(y)}).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"),i=y(h),S=u("babel-runtime/core-js/object/create"),_=y(S);function y(p){return p&&p.__esModule?p:{default:p}}(function(){var p,d,o;d=u("./XMLDOMErrorHandler"),o=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,_.default)(this.defaultParams)}return Object.defineProperty(s.prototype,"parameterNames",{get:function(){return new o((0,i.default)(this.defaultParams))}}),s.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},s.prototype.canSetParameter=function(l,a){return!0},s.prototype.setParameter=function(l,a){return a!=null?this.params[l]=a: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 i(){}return i.prototype.handleError=function(S){throw new Error(S)},i}()}).call(void 0)},{}],260:[function(u,G,c){"use strict";(function(){var h;G.exports=h=function(){function i(){}return i.prototype.hasFeature=function(S,_){return!0},i.prototype.createDocumentType=function(S,_,y){throw new Error("This DOM method is not implemented.")},i.prototype.createDocument=function(S,_,y){throw new Error("This DOM method is not implemented.")},i.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},i.prototype.getFeature=function(S,_){throw new Error("This DOM method is not implemented.")},i}()}).call(void 0)},{}],261:[function(u,G,c){"use strict";(function(){var h;G.exports=h=function(){function i(S){this.arr=S||[]}return Object.defineProperty(i.prototype,"length",{get:function(){return this.arr.length}}),i.prototype.item=function(S){return this.arr[S]||null},i.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},i}()}).call(void 0)},{}],262:[function(u,G,c){"use strict";(function(){var h,i,S,_=function(d,o){for(var s in o)y.call(o,s)&&(d[s]=o[s]);function l(){this.constructor=d}return l.prototype=o.prototype,d.prototype=new l,d.__super__=o.prototype,d},y={}.hasOwnProperty;S=u("./XMLNode"),h=u("./NodeType"),G.exports=i=function(p){_(d,p);function d(o,s,l,a,g,m){if(d.__super__.constructor.call(this,o),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(!a)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(a),m&&(this.defaultValue=this.stringify.dtdAttDefault(m)),this.defaultValueType=g}return d.prototype.toString=function(o){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(o))},d}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(u,G,c){"use strict";(function(){var h,i,S,_=function(d,o){for(var s in o)y.call(o,s)&&(d[s]=o[s]);function l(){this.constructor=d}return l.prototype=o.prototype,d.prototype=new l,d.__super__=o.prototype,d},y={}.hasOwnProperty;S=u("./XMLNode"),h=u("./NodeType"),G.exports=i=function(p){_(d,p);function d(o,s,l){if(d.__super__.constructor.call(this,o),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(o){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(o))},d}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(u,G,c){"use strict";(function(){var h,i,S,_,y=function(o,s){for(var l in s)p.call(s,l)&&(o[l]=s[l]);function a(){this.constructor=o}return a.prototype=s.prototype,o.prototype=new a,o.__super__=s.prototype,o},p={}.hasOwnProperty;_=u("./Utility").isObject,S=u("./XMLNode"),h=u("./NodeType"),G.exports=i=function(d){y(o,d);function o(s,l,a,g){if(o.__super__.constructor.call(this,s),a==null)throw new Error("Missing DTD entity name. "+this.debugInfo(a));if(g==null)throw new Error("Missing DTD entity value. "+this.debugInfo(a));if(this.pe=!!l,this.name=this.stringify.name(a),this.type=h.EntityDeclaration,!_(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(a));if(g.pubID&&!g.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a));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(a))}}return Object.defineProperty(o.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(o.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(o.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(o.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"xmlVersion",{get:function(){return null}}),o.prototype.toString=function(s){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(s))},o}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(u,G,c){"use strict";(function(){var h,i,S,_=function(d,o){for(var s in o)y.call(o,s)&&(d[s]=o[s]);function l(){this.constructor=d}return l.prototype=o.prototype,d.prototype=new l,d.__super__=o.prototype,d},y={}.hasOwnProperty;S=u("./XMLNode"),h=u("./NodeType"),G.exports=i=function(p){_(d,p);function d(o,s,l){if(d.__super__.constructor.call(this,o),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(o){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(o))},d}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(u,G,c){"use strict";(function(){var h,i,S,_,y=function(o,s){for(var l in s)p.call(s,l)&&(o[l]=s[l]);function a(){this.constructor=o}return a.prototype=s.prototype,o.prototype=new a,o.__super__=s.prototype,o},p={}.hasOwnProperty;_=u("./Utility").isObject,S=u("./XMLNode"),h=u("./NodeType"),G.exports=i=function(d){y(o,d);function o(s,l,a,g){var m;o.__super__.constructor.call(this,s),_(l)&&(m=l,l=m.version,a=m.encoding,g=m.standalone),l||(l="1.0"),this.type=h.Declaration,this.version=this.stringify.xmlVersion(l),a!=null&&(this.encoding=this.stringify.xmlEncoding(a)),g!=null&&(this.standalone=this.stringify.xmlStandalone(g))}return o.prototype.toString=function(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))},o}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(u,G,c){"use strict";(function(){var h,i,S,_,y,p,d,o,s,l=function(m,v){for(var w in v)a.call(v,w)&&(m[w]=v[w]);function E(){this.constructor=m}return E.prototype=v.prototype,m.prototype=new E,m.__super__=v.prototype,m},a={}.hasOwnProperty;s=u("./Utility").isObject,o=u("./XMLNode"),h=u("./NodeType"),i=u("./XMLDTDAttList"),_=u("./XMLDTDEntity"),S=u("./XMLDTDElement"),y=u("./XMLDTDNotation"),d=u("./XMLNamedNodeMap"),G.exports=p=function(g){l(m,g);function m(v,w,E){var k,T,D,I,B,N;if(m.__super__.constructor.call(this,v),this.type=h.DocType,v.children){for(I=v.children,T=0,D=I.length;T<D;T++)if(k=I[T],k.type===h.Element){this.name=k.name;break}}this.documentObject=v,s(w)&&(B=w,w=B.pubID,E=B.sysID),E==null&&(N=[w,E],E=N[0],w=N[1]),w!=null&&(this.pubID=this.stringify.dtdPubID(w)),E!=null&&(this.sysID=this.stringify.dtdSysID(E))}return Object.defineProperty(m.prototype,"entities",{get:function(){var w,E,k,T,D;for(T={},D=this.children,E=0,k=D.length;E<k;E++)w=D[E],w.type===h.EntityDeclaration&&!w.pe&&(T[w.name]=w);return new d(T)}}),Object.defineProperty(m.prototype,"notations",{get:function(){var w,E,k,T,D;for(T={},D=this.children,E=0,k=D.length;E<k;E++)w=D[E],w.type===h.NotationDeclaration&&(T[w.name]=w);return new d(T)}}),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 E;return E=new S(this,v,w),this.children.push(E),this},m.prototype.attList=function(v,w,E,k,T){var D;return D=new i(this,v,w,E,k,T),this.children.push(D),this},m.prototype.entity=function(v,w){var E;return E=new _(this,!1,v,w),this.children.push(E),this},m.prototype.pEntity=function(v,w){var E;return E=new _(this,!0,v,w),this.children.push(E),this},m.prototype.notation=function(v,w){var E;return E=new y(this,v,w),this.children.push(E),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,E,k,T){return this.attList(v,w,E,k,T)},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}(o)}).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,i,S,_,y,p,d,o,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;o=u("./Utility").isPlainObject,S=u("./XMLDOMImplementation"),i=u("./XMLDOMConfiguration"),y=u("./XMLNode"),h=u("./NodeType"),d=u("./XMLStringifier"),p=u("./XMLStringWriter"),G.exports=_=function(a){s(g,a);function g(m){g.__super__.constructor.call(this,null),this.name="#document",this.type=h.Document,this.documentURI=null,this.domConfig=new i,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,E,k;for(k=this.children,w=0,E=k.length;w<E;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?o(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}(y)}).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,i,S,_,y,p,d,o,s,l,a,g,m,v,w,E,k,T,D,I,B,N,x,Y,V={}.hasOwnProperty;Y=u("./Utility"),N=Y.isObject,B=Y.isFunction,x=Y.isPlainObject,I=Y.getValue,h=u("./NodeType"),g=u("./XMLDocument"),v=u("./XMLElement"),_=u("./XMLCData"),y=u("./XMLComment"),E=u("./XMLRaw"),D=u("./XMLText"),w=u("./XMLProcessingInstruction"),l=u("./XMLDeclaration"),a=u("./XMLDocType"),p=u("./XMLDTDAttList"),o=u("./XMLDTDEntity"),d=u("./XMLDTDElement"),s=u("./XMLDTDNotation"),S=u("./XMLAttribute"),T=u("./XMLStringifier"),k=u("./XMLStringWriter"),i=u("./WriterState"),G.exports=m=function(){function P(F,X,Q){var ce;this.name="?xml",this.type=h.Document,F||(F={}),ce={},F.writer?x(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 T(F),this.onDataCallback=X||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 X,Q,ce,fe,z,se,J,j;switch(F.type){case h.CData:this.cdata(F.value);break;case h.Comment:this.comment(F.value);break;case h.Element:ce={},J=F.attribs;for(Q in J){if(!V.call(J,Q))continue;X=J[Q],ce[Q]=X.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,X,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),X==null&&(X={}),X=I(X),N(X)||(ce=[X,Q],Q=ce[0],X=ce[1]),this.currentNode=new v(this,F,X),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Q!=null&&this.text(Q),this},P.prototype.element=function(F,X,Q){var ce,fe,z,se,J,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=j.children,fe=0,z=J.length;fe<z;fe++)ce=J[fe],this.createChildNode(ce),ce.type===h.Element&&this.up();else this.node(F,X,Q);return this},P.prototype.attribute=function(F,X){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(!V.call(F,Q))continue;ce=F[Q],this.attribute(Q,ce)}else B(X)&&(X=X.apply()),this.options.keepNullAttributes&&X==null?this.currentNode.attribs[F]=new S(this,F,""):X!=null&&(this.currentNode.attribs[F]=new S(this,F,X));return this},P.prototype.text=function(F){var X;return this.openCurrent(),X=new D(this,F),this.onData(this.writer.text(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.cdata=function(F){var X;return this.openCurrent(),X=new _(this,F),this.onData(this.writer.cdata(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.comment=function(F){var X;return this.openCurrent(),X=new y(this,F),this.onData(this.writer.comment(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.raw=function(F){var X;return this.openCurrent(),X=new E(this,F),this.onData(this.writer.raw(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.instruction=function(F,X){var Q,ce,fe,z,se;if(this.openCurrent(),F!=null&&(F=I(F)),X!=null&&(X=I(X)),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(!V.call(F,ce))continue;fe=F[ce],this.instruction(ce,fe)}else B(X)&&(X=X.apply()),se=new w(this,F,X),this.onData(this.writer.processingInstruction(se,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},P.prototype.declaration=function(F,X,Q){var ce;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ce=new l(this,F,X,Q),this.onData(this.writer.declaration(ce,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.doctype=function(F,X,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 a(this,X,Q),this.currentNode.rootNodeName=F,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},P.prototype.dtdElement=function(F,X){var Q;return this.openCurrent(),Q=new d(this,F,X),this.onData(this.writer.dtdElement(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.attList=function(F,X,Q,ce,fe){var z;return this.openCurrent(),z=new p(this,F,X,Q,ce,fe),this.onData(this.writer.dtdAttList(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.entity=function(F,X){var Q;return this.openCurrent(),Q=new o(this,!1,F,X),this.onData(this.writer.dtdEntity(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.pEntity=function(F,X){var Q;return this.openCurrent(),Q=new o(this,!0,F,X),this.onData(this.writer.dtdEntity(Q,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},P.prototype.notation=function(F,X){var Q;return this.openCurrent(),Q=new s(this,F,X),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 X,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=i.OpenTag,Q=this.writer.indent(F,this.writerOptions,this.currentLevel)+"<"+F.name,fe=F.attribs;for(ce in fe){if(!V.call(fe,ce))continue;X=fe[ce],Q+=this.writer.attribute(X,this.writerOptions,this.currentLevel)}Q+=(F.children?">":"/>")+this.writer.endline(F,this.writerOptions,this.currentLevel),this.writerOptions.state=i.InsideTag}else this.writerOptions.state=i.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=i.InsideTag):(this.writerOptions.state=i.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 X;if(!F.isClosed)return X="",this.writerOptions.state=i.CloseTag,F.type===h.Element?X=this.writer.indent(F,this.writerOptions,this.currentLevel)+"</"+F.name+">"+this.writer.endline(F,this.writerOptions,this.currentLevel):X=this.writer.indent(F,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(F,this.writerOptions,this.currentLevel),this.writerOptions.state=i.None,this.onData(X,this.currentLevel),F.isClosed=!0},P.prototype.onData=function(F,X){return this.documentStarted=!0,this.onDataCallback(F,X+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,X,Q){return this.node(F,X,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,X){return this.instruction(F,X)},P.prototype.dec=function(F,X,Q){return this.declaration(F,X,Q)},P.prototype.dtd=function(F,X,Q){return this.doctype(F,X,Q)},P.prototype.e=function(F,X,Q){return this.element(F,X,Q)},P.prototype.n=function(F,X,Q){return this.node(F,X,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,X){return this.instruction(F,X)},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,X){return this.entity(F,X)},P.prototype.pent=function(F,X){return this.pEntity(F,X)},P.prototype.not=function(F,X){return this.notation(F,X)},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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d=function(l,a){for(var g in a)o.call(a,g)&&(l[g]=a[g]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},o={}.hasOwnProperty;p=u("./XMLNode"),_=u("./NodeType"),G.exports=y=function(s){d(l,s);function l(a){l.__super__.constructor.call(this,a),this.type=_.Dummy}return l.prototype.clone=function(){return(0,i.default)(this)},l.prototype.toString=function(a){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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d,o,s,l,a,g,m=function(E,k){for(var T in k)v.call(k,T)&&(E[T]=k[T]);function D(){this.constructor=E}return D.prototype=k.prototype,E.prototype=new D,E.__super__=k.prototype,E},v={}.hasOwnProperty;g=u("./Utility"),a=g.isObject,l=g.isFunction,s=g.getValue,o=u("./XMLNode"),_=u("./NodeType"),y=u("./XMLAttribute"),d=u("./XMLNamedNodeMap"),G.exports=p=function(w){m(E,w);function E(k,T,D){var I,B,N,x;if(E.__super__.constructor.call(this,k),T==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(T),this.type=_.Element,this.attribs={},this.schemaTypeInfo=null,D!=null&&this.attribute(D),k.type===_.Document&&(this.isRoot=!0,this.documentObject=k,k.rootObject=this,k.children)){for(x=k.children,B=0,N=x.length;B<N;B++)if(I=x[B],I.type===_.DocType){I.name=this.name;break}}}return Object.defineProperty(E.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(E.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(E.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(E.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new d(this.attribs)),this.attributeMap}}),E.prototype.clone=function(){var k,T,D,I;D=(0,i.default)(this),D.isRoot&&(D.documentObject=null),D.attribs={},I=this.attribs;for(T in I){if(!v.call(I,T))continue;k=I[T],D.attribs[T]=k.clone()}return D.children=[],this.children.forEach(function(B){var N;return N=B.clone(),N.parent=D,D.children.push(N)}),D},E.prototype.attribute=function(k,T){var D,I;if(k!=null&&(k=s(k)),a(k))for(D in k){if(!v.call(k,D))continue;I=k[D],this.attribute(D,I)}else l(T)&&(T=T.apply()),this.options.keepNullAttributes&&T==null?this.attribs[k]=new y(this,k,""):T!=null&&(this.attribs[k]=new y(this,k,T));return this},E.prototype.removeAttribute=function(k){var T,D,I;if(k==null)throw new Error("Missing attribute name. "+this.debugInfo());if(k=s(k),Array.isArray(k))for(D=0,I=k.length;D<I;D++)T=k[D],delete this.attribs[T];else delete this.attribs[k];return this},E.prototype.toString=function(k){return this.options.writer.element(this,this.options.writer.filterOptions(k))},E.prototype.att=function(k,T){return this.attribute(k,T)},E.prototype.a=function(k,T){return this.attribute(k,T)},E.prototype.getAttribute=function(k){return this.attribs.hasOwnProperty(k)?this.attribs[k].value:null},E.prototype.setAttribute=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNode=function(k){return this.attribs.hasOwnProperty(k)?this.attribs[k]:null},E.prototype.setAttributeNode=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeAttributeNode=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setAttributeNS=function(k,T,D){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeAttributeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getAttributeNodeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setAttributeNodeNS=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasAttribute=function(k){return this.attribs.hasOwnProperty(k)},E.prototype.hasAttributeNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setIdAttribute=function(k,T){return this.attribs.hasOwnProperty(k)?this.attribs[k].isId:T},E.prototype.setIdAttributeNS=function(k,T,D){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setIdAttributeNode=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(k,T){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByClassName=function(k){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(k){var T,D,I;if(!E.__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(T=D=0,I=this.attribs.length-1;0<=I?D<=I:D>=I;T=0<=I?++D:--D)if(!this.attribs[T].isEqualNode(k.attribs[T]))return!1;return!0},E}(o)}).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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _;G.exports=_=function(){function y(p){this.nodes=p}return Object.defineProperty(y.prototype,"length",{get:function(){return(0,i.default)(this.nodes).length||0}}),y.prototype.clone=function(){return this.nodes=null},y.prototype.getNamedItem=function(p){return this.nodes[p]},y.prototype.setNamedItem=function(p){var d;return d=this.nodes[p.nodeName],this.nodes[p.nodeName]=p,d||null},y.prototype.removeNamedItem=function(p){var d;return d=this.nodes[p],delete this.nodes[p],d||null},y.prototype.item=function(p){return this.nodes[(0,i.default)(this.nodes)[p]]||null},y.prototype.getNamedItemNS=function(p,d){throw new Error("This DOM method is not implemented.")},y.prototype.setNamedItemNS=function(p){throw new Error("This DOM method is not implemented.")},y.prototype.removeNamedItemNS=function(p,d){throw new Error("This DOM method is not implemented.")},y}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(u,G,c){"use strict";(function(){var h,i,S,_,y,p,d,o,s,l,a,g,m,v,w,E,k,T,D,I={}.hasOwnProperty;D=u("./Utility"),T=D.isObject,k=D.isFunction,E=D.isEmpty,w=D.getValue,o=null,S=null,_=null,y=null,p=null,m=null,v=null,g=null,d=null,i=null,a=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,o||(o=u("./XMLElement"),S=u("./XMLCData"),_=u("./XMLComment"),y=u("./XMLDeclaration"),p=u("./XMLDocType"),m=u("./XMLRaw"),v=u("./XMLText"),g=u("./XMLProcessingInstruction"),d=u("./XMLDummy"),i=u("./NodeType"),a=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 a(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 x;return x=this.parent.children.indexOf(this),this.parent.children[x-1]||null}}),Object.defineProperty(B.prototype,"nextSibling",{get:function(){var x;return x=this.parent.children.indexOf(this),this.parent.children[x+1]||null}}),Object.defineProperty(B.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(B.prototype,"textContent",{get:function(){var x,Y,V,P,F;if(this.nodeType===i.Element||this.nodeType===i.DocumentFragment){for(F="",P=this.children,Y=0,V=P.length;Y<V;Y++)x=P[Y],x.textContent&&(F+=x.textContent);return F}else return null},set:function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),B.prototype.setParent=function(N){var x,Y,V,P,F;for(this.parent=N,N&&(this.options=N.options,this.stringify=N.stringify),P=this.children,F=[],Y=0,V=P.length;Y<V;Y++)x=P[Y],F.push(x.setParent(this));return F},B.prototype.element=function(N,x,Y){var V,P,F,X,Q,ce,fe,z,se,J,j;if(ce=null,x===null&&Y==null&&(se=[{},null],x=se[0],Y=se[1]),x==null&&(x={}),x=w(x),T(x)||(J=[x,Y],Y=J[0],x=J[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(T(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)&&E(j))ce=this.dummy();else if(T(j)&&E(j))ce=this.element(Q);else if(!this.options.keepNullNodes&&j==null)ce=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(j))for(X=0,z=j.length;X<z;X++)P=j[X],V={},V[Q]=P,ce=this.element(V);else T(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,x,Y);if(ce==null)throw new Error("Could not create any elements with: "+N+". "+this.debugInfo());return ce},B.prototype.insertBefore=function(N,x,Y){var V,P,F,X,Q;if(N!=null?N.type:void 0)return F=N,X=x,F.setParent(this),X?(P=children.indexOf(X),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),V=this.parent.element(N,x,Y),Array.prototype.push.apply(this.parent.children,Q),V},B.prototype.insertAfter=function(N,x,Y){var V,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),V=this.parent.element(N,x,Y),Array.prototype.push.apply(this.parent.children,F),V},B.prototype.remove=function(){var N,x;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(x=[])),this.parent},B.prototype.node=function(N,x,Y){var V,P;return N!=null&&(N=w(N)),x||(x={}),x=w(x),T(x)||(P=[x,Y],Y=P[0],x=P[1]),V=new o(this,N,x),Y!=null&&V.text(Y),this.children.push(V),V},B.prototype.text=function(N){var x;return T(N)&&this.element(N),x=new v(this,N),this.children.push(x),this},B.prototype.cdata=function(N){var x;return x=new S(this,N),this.children.push(x),this},B.prototype.comment=function(N){var x;return x=new _(this,N),this.children.push(x),this},B.prototype.commentBefore=function(N){var x,Y,V;return Y=this.parent.children.indexOf(this),V=this.parent.children.splice(Y),x=this.parent.comment(N),Array.prototype.push.apply(this.parent.children,V),this},B.prototype.commentAfter=function(N){var x,Y,V;return Y=this.parent.children.indexOf(this),V=this.parent.children.splice(Y+1),x=this.parent.comment(N),Array.prototype.push.apply(this.parent.children,V),this},B.prototype.raw=function(N){var x;return x=new m(this,N),this.children.push(x),this},B.prototype.dummy=function(){var N;return N=new d(this),N},B.prototype.instruction=function(N,x){var Y,V,P,F,X;if(N!=null&&(N=w(N)),x!=null&&(x=w(x)),Array.isArray(N))for(F=0,X=N.length;F<X;F++)Y=N[F],this.instruction(Y);else if(T(N))for(Y in N){if(!I.call(N,Y))continue;V=N[Y],this.instruction(Y,V)}else k(x)&&(x=x.apply()),P=new g(this,N,x),this.children.push(P);return this},B.prototype.instructionBefore=function(N,x){var Y,V,P;return V=this.parent.children.indexOf(this),P=this.parent.children.splice(V),Y=this.parent.instruction(N,x),Array.prototype.push.apply(this.parent.children,P),this},B.prototype.instructionAfter=function(N,x){var Y,V,P;return V=this.parent.children.indexOf(this),P=this.parent.children.splice(V+1),Y=this.parent.instruction(N,x),Array.prototype.push.apply(this.parent.children,P),this},B.prototype.declaration=function(N,x,Y){var V,P;return V=this.document(),P=new y(V,N,x,Y),V.children.length===0?V.children.unshift(P):V.children[0].type===i.Declaration?V.children[0]=P:V.children.unshift(P),V.root()||V},B.prototype.dtd=function(N,x){var Y,V,P,F,X,Q,ce,fe,z,se;for(V=this.document(),P=new p(V,N,x),z=V.children,F=X=0,ce=z.length;X<ce;F=++X)if(Y=z[F],Y.type===i.DocType)return V.children[F]=P,P;for(se=V.children,F=Q=0,fe=se.length;Q<fe;F=++Q)if(Y=se[F],Y.isRoot)return V.children.splice(F,0,P),P;return V.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===i.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===i.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 x;return x=N.root().clone(),x.parent=this,x.isRoot=!1,this.children.push(x),this},B.prototype.debugInfo=function(N){var x,Y;return N=N||this.name,N==null&&!((x=this.parent)!=null?x.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,x,Y){return this.element(N,x,Y)},B.prototype.nod=function(N,x,Y){return this.node(N,x,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,x){return this.instruction(N,x)},B.prototype.doc=function(){return this.document()},B.prototype.dec=function(N,x,Y){return this.declaration(N,x,Y)},B.prototype.e=function(N,x,Y){return this.element(N,x,Y)},B.prototype.n=function(N,x,Y){return this.node(N,x,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,x){return this.instruction(N,x)},B.prototype.u=function(){return this.up()},B.prototype.importXMLBuilder=function(N){return this.importDocument(N)},B.prototype.replaceChild=function(N,x){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,x){return!0},B.prototype.hasAttributes=function(){return this.attribs.length!==0},B.prototype.compareDocumentPosition=function(N){var x,Y;return x=this,x===N?0:this.document()!==N.document()?(Y=h.Disconnected|h.ImplementationSpecific,Math.random()<.5?Y|=h.Preceding:Y|=h.Following,Y):x.isAncestor(N)?h.Contains|h.Preceding:x.isDescendant(N)?h.Contains|h.Following:x.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 x,Y,V;if(N.nodeType!==this.nodeType)return!1;if(N.children.length!==this.children.length)return!1;for(x=Y=0,V=this.children.length-1;0<=V?Y<=V:Y>=V;x=0<=V?++Y:--Y)if(!this.children[x].isEqualNode(N.children[x]))return!1;return!0},B.prototype.getFeature=function(N,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},B.prototype.setUserData=function(N,x,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 x,Y,V,P,F;for(F=this.children,V=0,P=F.length;V<P;V++){if(x=F[V],N===x)return!0;if(Y=x.isDescendant(N),Y)return!0}return!1},B.prototype.isAncestor=function(N){return N.isDescendant(this)},B.prototype.isPreceding=function(N){var x,Y;return x=this.treePosition(N),Y=this.treePosition(this),x===-1||Y===-1?!1:x<Y},B.prototype.isFollowing=function(N){var x,Y;return x=this.treePosition(N),Y=this.treePosition(this),x===-1||Y===-1?!1:x>Y},B.prototype.treePosition=function(N){var x,Y;return Y=0,x=!1,this.foreachTreeNode(this.document(),function(V){if(Y++,!x&&V===N)return x=!0}),x?Y:-1},B.prototype.foreachTreeNode=function(N,x){var Y,V,P,F,X;for(N||(N=this.document()),F=N.children,V=0,P=F.length;V<P;V++){if(Y=F[V],X=x(Y))return X;if(X=this.foreachTreeNode(Y,x),X)return X}},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 i(S){this.nodes=S}return Object.defineProperty(i.prototype,"length",{get:function(){return this.nodes.length||0}}),i.prototype.clone=function(){return this.nodes=null},i.prototype.item=function(S){return this.nodes[S]||null},i}()}).call(void 0)},{}],275:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d=function(l,a){for(var g in a)o.call(a,g)&&(l[g]=a[g]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},o={}.hasOwnProperty;_=u("./NodeType"),y=u("./XMLCharacterData"),G.exports=p=function(s){d(l,s);function l(a,g,m){if(l.__super__.constructor.call(this,a),g==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=_.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,i.default)(this)},l.prototype.toString=function(a){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(a))},l.prototype.isEqualNode=function(a){return l.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?!(a.target!==this.target):!1},l}(y)}).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"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d=function(l,a){for(var g in a)o.call(a,g)&&(l[g]=a[g]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},o={}.hasOwnProperty;_=u("./NodeType"),y=u("./XMLNode"),G.exports=p=function(s){d(l,s);function l(a,g){if(l.__super__.constructor.call(this,a),g==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=_.Raw,this.value=this.stringify.raw(g)}return l.prototype.clone=function(){return(0,i.default)(this)},l.prototype.toString=function(a){return this.options.writer.raw(this,this.options.writer.filterOptions(a))},l}(y)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(u,G,c){"use strict";(function(){var h,i,S,_,y=function(o,s){for(var l in s)p.call(s,l)&&(o[l]=s[l]);function a(){this.constructor=o}return a.prototype=s.prototype,o.prototype=new a,o.__super__=s.prototype,o},p={}.hasOwnProperty;h=u("./NodeType"),_=u("./XMLWriterBase"),i=u("./WriterState"),G.exports=S=function(d){y(o,d);function o(s,l){this.stream=s,o.__super__.constructor.call(this,l)}return o.prototype.endline=function(s,l,a){return s.isLastRootNode&&l.state===i.CloseTag?"":o.__super__.endline.call(this,s,l,a)},o.prototype.document=function(s,l){var a,g,m,v,w,E,k,T,D;for(k=s.children,g=m=0,w=k.length;m<w;g=++m)a=k[g],a.isLastRootNode=g===s.children.length-1;for(l=this.filterOptions(l),T=s.children,D=[],v=0,E=T.length;v<E;v++)a=T[v],D.push(this.writeChildNode(a,l,0));return D},o.prototype.attribute=function(s,l,a){return this.stream.write(o.__super__.attribute.call(this,s,l,a))},o.prototype.cdata=function(s,l,a){return this.stream.write(o.__super__.cdata.call(this,s,l,a))},o.prototype.comment=function(s,l,a){return this.stream.write(o.__super__.comment.call(this,s,l,a))},o.prototype.declaration=function(s,l,a){return this.stream.write(o.__super__.declaration.call(this,s,l,a))},o.prototype.docType=function(s,l,a){var g,m,v,w;if(a||(a=0),this.openNode(s,l,a),l.state=i.OpenTag,this.stream.write(this.indent(s,l,a)),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,a)),l.state=i.InsideTag,w=s.children,m=0,v=w.length;m<v;m++)g=w[m],this.writeChildNode(g,l,a+1);l.state=i.CloseTag,this.stream.write("]")}return l.state=i.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(s,l,a)),l.state=i.None,this.closeNode(s,l,a)},o.prototype.element=function(s,l,a){var g,m,v,w,E,k,T,D,I,B;a||(a=0),this.openNode(s,l,a),l.state=i.OpenTag,this.stream.write(this.indent(s,l,a)+"<"+s.name),I=s.attribs;for(T in I){if(!p.call(I,T))continue;g=I[T],this.attribute(g,l,a)}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=i.CloseTag,this.stream.write("</"+s.name+">")):(l.state=i.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=i.InsideTag,l.suppressPrettyCount++,D=!0,this.writeChildNode(w,l,a+1),l.suppressPrettyCount--,D=!1,l.state=i.CloseTag,this.stream.write("</"+s.name+">");else{for(this.stream.write(">"+this.endline(s,l,a)),l.state=i.InsideTag,B=s.children,E=0,k=B.length;E<k;E++)m=B[E],this.writeChildNode(m,l,a+1);l.state=i.CloseTag,this.stream.write(this.indent(s,l,a)+"</"+s.name+">")}return this.stream.write(this.endline(s,l,a)),l.state=i.None,this.closeNode(s,l,a)},o.prototype.processingInstruction=function(s,l,a){return this.stream.write(o.__super__.processingInstruction.call(this,s,l,a))},o.prototype.raw=function(s,l,a){return this.stream.write(o.__super__.raw.call(this,s,l,a))},o.prototype.text=function(s,l,a){return this.stream.write(o.__super__.text.call(this,s,l,a))},o.prototype.dtdAttList=function(s,l,a){return this.stream.write(o.__super__.dtdAttList.call(this,s,l,a))},o.prototype.dtdElement=function(s,l,a){return this.stream.write(o.__super__.dtdElement.call(this,s,l,a))},o.prototype.dtdEntity=function(s,l,a){return this.stream.write(o.__super__.dtdEntity.call(this,s,l,a))},o.prototype.dtdNotation=function(s,l,a){return this.stream.write(o.__super__.dtdNotation.call(this,s,l,a))},o}(_)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(u,G,c){"use strict";(function(){var h,i,S=function(p,d){for(var o in d)_.call(d,o)&&(p[o]=d[o]);function s(){this.constructor=p}return s.prototype=d.prototype,p.prototype=new s,p.__super__=d.prototype,p},_={}.hasOwnProperty;i=u("./XMLWriterBase"),G.exports=h=function(y){S(p,y);function p(d){p.__super__.constructor.call(this,d)}return p.prototype.document=function(d,o){var s,l,a,g,m;for(o=this.filterOptions(o),g="",m=d.children,l=0,a=m.length;l<a;l++)s=m[l],g+=this.writeChildNode(s,o,0);return o.pretty&&g.slice(-o.newline.length)===o.newline&&(g=g.slice(0,-o.newline.length)),g},p}(i)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(u,G,c){"use strict";(function(){var h,i=function(y,p){return function(){return y.apply(p,arguments)}},S={}.hasOwnProperty;G.exports=h=function(){function _(y){this.assertLegalName=i(this.assertLegalName,this),this.assertLegalChar=i(this.assertLegalChar,this);var p,d,o;y||(y={}),this.options=y,this.options.version||(this.options.version="1.0"),d=y.stringify||{};for(p in d){if(!S.call(d,p))continue;o=d[p],this[p]=o}}return _.prototype.name=function(y){return this.options.noValidation?y:this.assertLegalName(""+y||"")},_.prototype.text=function(y){return this.options.noValidation?y:this.assertLegalChar(this.textEscape(""+y||""))},_.prototype.cdata=function(y){return this.options.noValidation?y:(y=""+y||"",y=y.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(y))},_.prototype.comment=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+y);return this.assertLegalChar(y)},_.prototype.raw=function(y){return this.options.noValidation?y:""+y||""},_.prototype.attValue=function(y){return this.options.noValidation?y:this.assertLegalChar(this.attEscape(y=""+y||""))},_.prototype.insTarget=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.insValue=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/\?>/))throw new Error("Invalid processing instruction value: "+y);return this.assertLegalChar(y)},_.prototype.xmlVersion=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+y);return y},_.prototype.xmlEncoding=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+y);return this.assertLegalChar(y)},_.prototype.xmlStandalone=function(y){return this.options.noValidation?y:y?"yes":"no"},_.prototype.dtdPubID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.dtdSysID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.dtdElementValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.dtdAttType=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.dtdAttDefault=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.dtdEntityValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.dtdNData=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},_.prototype.convertAttKey="@",_.prototype.convertPIKey="?",_.prototype.convertTextKey="#text",_.prototype.convertCDataKey="#cdata",_.prototype.convertCommentKey="#comment",_.prototype.convertRawKey="#raw",_.prototype.assertLegalChar=function(y){var p,d;if(this.options.noValidation)return y;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=y.match(p))throw new Error("Invalid character in string: "+y+" at index "+d.index)}else if(this.options.version==="1.1"&&(p=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=y.match(p)))throw new Error("Invalid character in string: "+y+" at index "+d.index);return y},_.prototype.assertLegalName=function(y){var p;if(this.options.noValidation)return y;if(this.assertLegalChar(y),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])*$/,!y.match(p))throw new Error("Invalid character in name");return y},_.prototype.textEscape=function(y){var p;return this.options.noValidation?y:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(p,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},_.prototype.attEscape=function(y){var p;return this.options.noValidation?y:(p=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(p,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},_}()}).call(void 0)},{}],280:[function(u,G,c){"use strict";var h=u("babel-runtime/core-js/object/create"),i=S(h);function S(_){return _&&_.__esModule?_:{default:_}}(function(){var _,y,p,d=function(l,a){for(var g in a)o.call(a,g)&&(l[g]=a[g]);function m(){this.constructor=l}return m.prototype=a.prototype,l.prototype=new m,l.__super__=a.prototype,l},o={}.hasOwnProperty;_=u("./NodeType"),y=u("./XMLCharacterData"),G.exports=p=function(s){d(l,s);function l(a,g){if(l.__super__.constructor.call(this,a),g==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=_.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,i.default)(this)},l.prototype.toString=function(a){return this.options.writer.text(this,this.options.writer.filterOptions(a))},l.prototype.splitText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.replaceWholeText=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},l}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(u,G,c){"use strict";(function(){var h,i,S,_,y,p,d,o,s,l,a,g,m,v,w,E,k,T={}.hasOwnProperty;k=u("./Utility").assign,h=u("./NodeType"),s=u("./XMLDeclaration"),l=u("./XMLDocType"),S=u("./XMLCData"),_=u("./XMLComment"),g=u("./XMLElement"),v=u("./XMLRaw"),w=u("./XMLText"),m=u("./XMLProcessingInstruction"),a=u("./XMLDummy"),y=u("./XMLDTDAttList"),p=u("./XMLDTDElement"),d=u("./XMLDTDEntity"),o=u("./XMLDTDNotation"),i=u("./WriterState"),G.exports=E=function(){function D(I){var B,N,x;I||(I={}),this.options=I,N=I.writer||{};for(B in N){if(!T.call(N,B))continue;x=N[B],this["_"+B]=this[B],this[B]=x}}return D.prototype.filterOptions=function(I){var B,N,x,Y,V,P,F,X;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=(x=I.newline)!=null?x:`
`,B.offset=(Y=I.offset)!=null?Y:0,B.dontPrettyTextNodes=(V=(P=I.dontPrettyTextNodes)!=null?P:I.dontprettytextnodes)!=null?V:0,B.spaceBeforeSlash=(F=(X=I.spaceBeforeSlash)!=null?X:I.spacebeforeslash)!=null?F:"",B.spaceBeforeSlash===!0&&(B.spaceBeforeSlash=" "),B.suppressPrettyCount=0,B.user={},B.state=i.None,B},D.prototype.indent=function(I,B,N){var x;return!B.pretty||B.suppressPrettyCount?"":B.pretty&&(x=(N||0)+B.offset+1,x>0)?new Array(x).join(B.indent):""},D.prototype.endline=function(I,B,N){return!B.pretty||B.suppressPrettyCount?"":B.newline},D.prototype.attribute=function(I,B,N){var x;return this.openAttribute(I,B,N),x=" "+I.name+'="'+I.value+'"',this.closeAttribute(I,B,N),x},D.prototype.cdata=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<![CDATA[",B.state=i.InsideTag,x+=I.value,B.state=i.CloseTag,x+="]]>"+this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.comment=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<!-- ",B.state=i.InsideTag,x+=I.value,B.state=i.CloseTag,x+=" -->"+this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.declaration=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<?xml",B.state=i.InsideTag,x+=' version="'+I.version+'"',I.encoding!=null&&(x+=' encoding="'+I.encoding+'"'),I.standalone!=null&&(x+=' standalone="'+I.standalone+'"'),B.state=i.CloseTag,x+=B.spaceBeforeSlash+"?>",x+=this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.docType=function(I,B,N){var x,Y,V,P,F;if(N||(N=0),this.openNode(I,B,N),B.state=i.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=i.InsideTag,F=I.children,Y=0,V=F.length;Y<V;Y++)x=F[Y],P+=this.writeChildNode(x,B,N+1);B.state=i.CloseTag,P+="]"}return B.state=i.CloseTag,P+=B.spaceBeforeSlash+">",P+=this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),P},D.prototype.element=function(I,B,N){var x,Y,V,P,F,X,Q,ce,fe,z,se,J,j,U;N||(N=0),z=!1,se="",this.openNode(I,B,N),B.state=i.OpenTag,se+=this.indent(I,B,N)+"<"+I.name,J=I.attribs;for(fe in J){if(!T.call(J,fe))continue;x=J[fe],se+=this.attribute(x,B,N)}if(V=I.children.length,P=V===0?null:I.children[0],V===0||I.children.every(function(R){return(R.type===h.Text||R.type===h.Raw)&&R.value===""}))B.allowEmpty?(se+=">",B.state=i.CloseTag,se+="</"+I.name+">"+this.endline(I,B,N)):(B.state=i.CloseTag,se+=B.spaceBeforeSlash+"/>"+this.endline(I,B,N));else if(B.pretty&&V===1&&(P.type===h.Text||P.type===h.Raw)&&P.value!=null)se+=">",B.state=i.InsideTag,B.suppressPrettyCount++,z=!0,se+=this.writeChildNode(P,B,N+1),B.suppressPrettyCount--,z=!1,B.state=i.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=i.InsideTag,U=I.children,X=0,ce=U.length;X<ce;X++)Y=U[X],se+=this.writeChildNode(Y,B,N+1);B.state=i.CloseTag,se+=this.indent(I,B,N)+"</"+I.name+">",z&&B.suppressPrettyCount--,se+=this.endline(I,B,N),B.state=i.None}return this.closeNode(I,B,N),se},D.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)}},D.prototype.processingInstruction=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<?",B.state=i.InsideTag,x+=I.target,I.value&&(x+=" "+I.value),B.state=i.CloseTag,x+=B.spaceBeforeSlash+"?>",x+=this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.raw=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N),B.state=i.InsideTag,x+=I.value,B.state=i.CloseTag,x+=this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.text=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N),B.state=i.InsideTag,x+=I.value,B.state=i.CloseTag,x+=this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.dtdAttList=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<!ATTLIST",B.state=i.InsideTag,x+=" "+I.elementName+" "+I.attributeName+" "+I.attributeType,I.defaultValueType!=="#DEFAULT"&&(x+=" "+I.defaultValueType),I.defaultValue&&(x+=' "'+I.defaultValue+'"'),B.state=i.CloseTag,x+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.dtdElement=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<!ELEMENT",B.state=i.InsideTag,x+=" "+I.name+" "+I.value,B.state=i.CloseTag,x+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.dtdEntity=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<!ENTITY",B.state=i.InsideTag,I.pe&&(x+=" %"),x+=" "+I.name,I.value?x+=' "'+I.value+'"':(I.pubID&&I.sysID?x+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.sysID&&(x+=' SYSTEM "'+I.sysID+'"'),I.nData&&(x+=" NDATA "+I.nData)),B.state=i.CloseTag,x+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.dtdNotation=function(I,B,N){var x;return this.openNode(I,B,N),B.state=i.OpenTag,x=this.indent(I,B,N)+"<!NOTATION",B.state=i.InsideTag,x+=" "+I.name,I.pubID&&I.sysID?x+=' PUBLIC "'+I.pubID+'" "'+I.sysID+'"':I.pubID?x+=' PUBLIC "'+I.pubID+'"':I.sysID&&(x+=' SYSTEM "'+I.sysID+'"'),B.state=i.CloseTag,x+=B.spaceBeforeSlash+">"+this.endline(I,B,N),B.state=i.None,this.closeNode(I,B,N),x},D.prototype.openNode=function(I,B,N){},D.prototype.closeNode=function(I,B,N){},D.prototype.openAttribute=function(I,B,N){},D.prototype.closeAttribute=function(I,B,N){},D}()}).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,i,S,_,y,p,d,o,s,l;l=u("./Utility"),o=l.assign,s=l.isFunction,S=u("./XMLDOMImplementation"),_=u("./XMLDocument"),y=u("./XMLDocumentCB"),d=u("./XMLStringWriter"),p=u("./XMLStreamWriter"),h=u("./NodeType"),i=u("./WriterState"),G.exports.create=function(a,g,m,v){var w,E;if(a==null)throw new Error("Root element needs a name.");return v=o({},g,m,v),w=new _(v),E=w.element(a),v.headless||(w.declaration(v),(v.pubID!=null||v.sysID!=null)&&w.dtd(v)),E},G.exports.begin=function(a,g,m){var v;return s(a)&&(v=[a,g],g=v[0],m=v[1],a={}),g?new y(a,g,m):new _(a)},G.exports.stringWriter=function(a){return new d(a)},G.exports.streamWriter=function(a,g){return new p(a,g)},G.exports.implementation=new S,G.exports.nodeType=h,G.exports.writerState=i}).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=i;var h=Object.prototype.hasOwnProperty;function i(){for(var S={},_=0;_<arguments.length;_++){var y=arguments[_];for(var p in y)h.call(y,p)&&(S[p]=y[p])}return S}},{}],284:[function(u,G,c){"use strict";var h=u("buffer").Buffer,i=u("./sha"),S=u("./md5"),_={sha1:i,md5:S},y=64,p=h.alloc(y);p.fill(0);function d(l,a,g){h.isBuffer(a)||(a=h.from(a)),h.isBuffer(g)||(g=h.from(g)),a.length>y?a=l(a):a.length<y&&(a=h.concat([a,p],y));for(var m=h.alloc(y),v=h.alloc(y),w=0;w<y;w++)m[w]=a[w]^54,v[w]=a[w]^92;var E=l(h.concat([m,g]));return l(h.concat([v,E]))}function o(l,a){l=l||"sha1";var g=_[l],m=[],v=0;return g||s("algorithm:",l,"is not yet supported"),{update:function(E){return h.isBuffer(E)||(E=h.from(E)),m.push(E),v+=E.length,this},digest:function(E){var k=h.concat(m),T=a?d(g,a,k):g(k);return m=null,E?T.toString(E):T}}}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 o(l)},c.createHmac=function(l,a){return o(l,a)},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,i=4,S=h.alloc(i);S.fill(0);var _=8;function y(o,s){if(o.length%i!==0){var l=o.length+(i-o.length%i);o=h.concat([o,S],l)}for(var a=[],g=s?o.readInt32BE:o.readInt32LE,m=0;m<o.length;m+=i)a.push(g.call(o,m));return a}function p(o,s,l){for(var a=h.alloc(s),g=l?a.writeInt32BE:a.writeInt32LE,m=0;m<o.length;m++)g.call(a,o[m],m*4,!0);return a}function d(o,s,l,a){h.isBuffer(o)||(o=h.from(o));var g=s(y(o,a),o.length*_);return p(g,l,a)}G.exports={hash:d}},{buffer:73}],286:[function(u,G,c){"use strict";var h=u("./helpers");function i(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function S(a,g){a[g>>5]|=128<<g%32,a[(g+64>>>9<<4)+14]=g;for(var m=1732584193,v=-271733879,w=-1732584194,E=271733878,k=0;k<a.length;k+=16){var T=m,D=v,I=w,B=E;m=y(m,v,w,E,a[k+0],7,-680876936),E=y(E,m,v,w,a[k+1],12,-389564586),w=y(w,E,m,v,a[k+2],17,606105819),v=y(v,w,E,m,a[k+3],22,-1044525330),m=y(m,v,w,E,a[k+4],7,-176418897),E=y(E,m,v,w,a[k+5],12,1200080426),w=y(w,E,m,v,a[k+6],17,-1473231341),v=y(v,w,E,m,a[k+7],22,-45705983),m=y(m,v,w,E,a[k+8],7,1770035416),E=y(E,m,v,w,a[k+9],12,-1958414417),w=y(w,E,m,v,a[k+10],17,-42063),v=y(v,w,E,m,a[k+11],22,-1990404162),m=y(m,v,w,E,a[k+12],7,1804603682),E=y(E,m,v,w,a[k+13],12,-40341101),w=y(w,E,m,v,a[k+14],17,-1502002290),v=y(v,w,E,m,a[k+15],22,1236535329),m=p(m,v,w,E,a[k+1],5,-165796510),E=p(E,m,v,w,a[k+6],9,-1069501632),w=p(w,E,m,v,a[k+11],14,643717713),v=p(v,w,E,m,a[k+0],20,-373897302),m=p(m,v,w,E,a[k+5],5,-701558691),E=p(E,m,v,w,a[k+10],9,38016083),w=p(w,E,m,v,a[k+15],14,-660478335),v=p(v,w,E,m,a[k+4],20,-405537848),m=p(m,v,w,E,a[k+9],5,568446438),E=p(E,m,v,w,a[k+14],9,-1019803690),w=p(w,E,m,v,a[k+3],14,-187363961),v=p(v,w,E,m,a[k+8],20,1163531501),m=p(m,v,w,E,a[k+13],5,-1444681467),E=p(E,m,v,w,a[k+2],9,-51403784),w=p(w,E,m,v,a[k+7],14,1735328473),v=p(v,w,E,m,a[k+12],20,-1926607734),m=d(m,v,w,E,a[k+5],4,-378558),E=d(E,m,v,w,a[k+8],11,-2022574463),w=d(w,E,m,v,a[k+11],16,1839030562),v=d(v,w,E,m,a[k+14],23,-35309556),m=d(m,v,w,E,a[k+1],4,-1530992060),E=d(E,m,v,w,a[k+4],11,1272893353),w=d(w,E,m,v,a[k+7],16,-155497632),v=d(v,w,E,m,a[k+10],23,-1094730640),m=d(m,v,w,E,a[k+13],4,681279174),E=d(E,m,v,w,a[k+0],11,-358537222),w=d(w,E,m,v,a[k+3],16,-722521979),v=d(v,w,E,m,a[k+6],23,76029189),m=d(m,v,w,E,a[k+9],4,-640364487),E=d(E,m,v,w,a[k+12],11,-421815835),w=d(w,E,m,v,a[k+15],16,530742520),v=d(v,w,E,m,a[k+2],23,-995338651),m=o(m,v,w,E,a[k+0],6,-198630844),E=o(E,m,v,w,a[k+7],10,1126891415),w=o(w,E,m,v,a[k+14],15,-1416354905),v=o(v,w,E,m,a[k+5],21,-57434055),m=o(m,v,w,E,a[k+12],6,1700485571),E=o(E,m,v,w,a[k+3],10,-1894986606),w=o(w,E,m,v,a[k+10],15,-1051523),v=o(v,w,E,m,a[k+1],21,-2054922799),m=o(m,v,w,E,a[k+8],6,1873313359),E=o(E,m,v,w,a[k+15],10,-30611744),w=o(w,E,m,v,a[k+6],15,-1560198380),v=o(v,w,E,m,a[k+13],21,1309151649),m=o(m,v,w,E,a[k+4],6,-145523070),E=o(E,m,v,w,a[k+11],10,-1120210379),w=o(w,E,m,v,a[k+2],15,718787259),v=o(v,w,E,m,a[k+9],21,-343485551),m=s(m,T),v=s(v,D),w=s(w,I),E=s(E,B)}return Array(m,v,w,E)}function _(a,g,m,v,w,E){return s(l(s(s(g,a),s(v,E)),w),m)}function y(a,g,m,v,w,E,k){return _(g&m|~g&v,a,g,w,E,k)}function p(a,g,m,v,w,E,k){return _(g&v|m&~v,a,g,w,E,k)}function d(a,g,m,v,w,E,k){return _(g^m^v,a,g,w,E,k)}function o(a,g,m,v,w,E,k){return _(m^(g|~v),a,g,w,E,k)}function s(a,g){var m=(a&65535)+(g&65535),v=(a>>16)+(g>>16)+(m>>16);return v<<16|m&65535}function l(a,g){return a<<g|a>>>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 i(d,o){d[o>>5]|=128<<24-o%32,d[(o+64>>9<<4)+15]=o;for(var s=Array(80),l=1732584193,a=-271733879,g=-1732584194,m=271733878,v=-1009589776,w=0;w<d.length;w+=16){for(var E=l,k=a,T=g,D=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=y(y(p(l,5),S(B,a,g,m)),y(y(v,s[B]),_(B)));v=m,m=g,g=p(a,30),a=l,l=N}l=y(l,E),a=y(a,k),g=y(g,T),m=y(m,D),v=y(v,I)}return Array(l,a,g,m,v)}function S(d,o,s,l){return d<20?o&s|~o&l:d<40?o^s^l:d<60?o&s|o&l|s&l:o^s^l}function _(d){return d<20?1518500249:d<40?1859775393:d<60?-1894007588:-899497514}function y(d,o){var s=(d&65535)+(o&65535),l=(d>>16)+(o>>16)+(s>>16);return l<<16|s&65535}function p(d,o){return d<<o|d>>>32-o}G.exports=function(o){return h.hash(o,i,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 i=u("babel-runtime/helpers/typeof"),S=_(i);function _(l){return l&&l.__esModule?l:{default:l}}var y=u("stream"),p=y.Stream,d=u("../lib/common/utils/isArray"),o=d.isArray;G.exports.string=function(a){return typeof a=="string"},G.exports.array=o,G.exports.buffer=h.isBuffer;function s(l){return l instanceof p}G.exports.writableStream=function(a){return s(a)&&typeof a._write=="function"&&(0,S.default)(a._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(i){return h}},c.escape=u("escape-html"),c.timestamp=function(i){if(i){var S=i;return typeof S=="string"&&(S=Number(S)),String(i).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(u,G,c){(function(h,i){"use strict";var S=u("babel-runtime/core-js/json/stringify"),_=d(S),y=u("babel-runtime/helpers/typeof"),p=d(y);function d(B){return B&&B.__esModule?B:{default:B}}var o=u("util"),s=u("url"),l=u("http"),a=u("https"),g=u("debug")("urllib"),m=u("humanize-ms"),v,w=0,E=Math.pow(2,31)-10,k=/^https?:\/\//i;function T(B,N){return B===void 0?N:B}function D(B,N){return function(x,Y,V){if(x)return N(x);B({data:Y,status:V.statusCode,headers:V.headers,res:V})}}c.TIMEOUTS=[m("300s"),m("300s")];var I=["json","text"];c.request=function(N,x,Y){return arguments.length===2&&typeof x=="function"&&(Y=x,x=null),typeof Y=="function"?c.requestWithCallback(N,x,Y):(v||(v=u("any-promise")),new v(function(V,P){c.requestWithCallback(N,x,D(V,P))}))},c.requestWithCallback=function(N,x,Y){if(!N||typeof N!="string"&&(typeof N=="undefined"?"undefined":(0,p.default)(N))!=="object"){var V=o.format("expect request url to be a string or a http request options, but got %j",N);throw new Error(V)}arguments.length===2&&typeof x=="function"&&(Y=x,x=null),x=x||{},w>=E&&(w=0);var P=++w;x.requestUrls=x.requestUrls||[];var F={requestId:P,url:N,args:x,ctx:x.ctx};x.emitter&&x.emitter.emit("request",F),x.timeout=x.timeout||c.TIMEOUTS,x.maxRedirects=x.maxRedirects||10,x.streaming=x.streaming||x.customResponse;var X=Date.now(),Q;typeof N=="string"?(k.test(N)||(N="http://"+N),Q=s.parse(N)):Q=N;var ce=(x.type||x.method||Q.method||"GET").toUpperCase(),fe=Q.port||80,z=l,se=T(x.agent,c.agent),J=x.fixJSONCtlChars;Q.protocol==="https:"&&(z=a,se=T(x.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:x.headers||{},lookup:x.lookup};Array.isArray(x.timeout)?j.requestTimeout=x.timeout[x.timeout.length-1]:typeof x.timeout!="undefined"&&(j.requestTimeout=x.timeout);for(var U=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],R=0;R<U.length;R++){var C=U[R];x.hasOwnProperty(C)&&(j[C]=x[C])}j.rejectUnauthorized===!1&&!j.hasOwnProperty("secureOptions")&&(j.secureOptions=u("constants").SSL_OP_NO_TLSv1_2);var M=x.auth||Q.auth;M&&(j.auth=M);var le=x.content||x.data,he=ce==="GET"||ce==="HEAD"||x.dataAsQueryString;if(!x.content&&(le&&!(typeof le=="string"||i.isBuffer(le))))if(he)le=x.nestedQuerystring?qs.stringify(le):querystring.stringify(le);else{var ve=j.headers["Content-Type"]||j.headers["content-type"];ve||(x.contentType==="json"?ve="application/json":ve="application/x-www-form-urlencoded",j.headers["Content-Type"]=ve),parseContentType(ve).type==="application/json"?le=(0,_.default)(le):le=x.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;i.isBuffer(le)||(Se=i.byteLength(le)),Ee=j.headers["Content-Length"]=Se}x.dataType==="json"&&(j.headers.Accept="application/json"),typeof x.beforeRequest=="function"&&x.beforeRequest(j);var ae=null,pe=null,me=null,ee=!1,ne=!1,Z=0,ue=-1,K=!1,$="",Ce="",q=null;x.timing&&(q={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function H(){ae&&(clearTimeout(ae),ae=null)}function O(){pe&&(clearTimeout(pe),pe=null)}function W(Ne,nt,ot){if(O(),!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"]&&(!x.headers||!x.headers.Authorization)&&x.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),x.headers=x.headers||{},x.headers.Authorization=digestAuthHeader(j.method,j.path,Ie,x.digestAuth),g("Request#%d %s: auth with digest header: %s",P,N,x.headers.Authorization),ot.headers["set-cookie"]&&(x.headers.Cookie=ot.headers["set-cookie"].join(";")),c.requestWithCallback(N,x,Ve)}var De=Date.now()-X;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,ne,q);var Le={status:ue,statusCode:ue,headers:$e,size:Z,aborted:K,rt:De,keepAliveSocket:ne,data:nt,requestUrls:x.requestUrls,timing:q,remoteAddress:$,remotePort:Ce};if(Ne){var _e="";se&&typeof se.getCurrentStatus=="function"&&(_e=", agent status: "+(0,_.default)(se.getCurrentStatus())),Ne.message+=", "+j.method+" "+N+" "+ue+" (connected: "+ee+", keepalive socket: "+ne+_e+`)
headers: `+(0,_.default)($e),Ne.data=nt,Ne.path=j.path,Ne.status=ue,Ne.headers=$e,Ne.res=Le}Ve(Ne,nt,x.streaming?ot:Le),x.emitter&&(F.url=N,F.socket=Xe&&Xe.connection,F.options=j,F.size=Ee,x.emitter.emit("response",{requestId:P,error:Ne,ctx:x.ctx,req:F,res:Le}))}function we(Ne){var nt=null;if(x.followRedirect&&statuses.redirect[Ne.statusCode]){x._followRedirectCount=(x._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(x._followRedirectCount>x.maxRedirects)nt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+N),nt.name="MaxRedirectError";else{var Ve=x.formatRedirectUrl?x.formatRedirectUrl(N,ot):s.resolve(N,ot);g("Request#%d %s: `redirected` from %s to %s",P,j.path,N,Ve),O(),x.headers&&x.headers.Host&&k.test(ot)&&(x.headers.Host=null);var $e=Y;return Y=null,c.requestWithCallback(Ve,x,$e),{redirect:!0,error:null}}}return{redirect:!1,error:nt}}!j.headers["User-Agent"]&&!j.headers["user-agent"]&&(j.headers["User-Agent"]=navigator.userAgent),x.gzip&&(!j.headers["Accept-Encoding"]&&!j.headers["accept-encoding"]&&(j.headers["Accept-Encoding"]="gzip"));function be(Ne,nt,ot){var Ve=Ne.headers["content-encoding"];return ot(null,nt,Ve)}var Oe=x.writeStream;g("Request#%d %s %s with headers %j, options.path: %s",P,ce,N,j.headers,j.path),x.requestUrls.push(N);function Be(Ne){if(q&&(q.waiting=Date.now()-X),g("Request#%d %s `req response` event emit: status %d, headers: %j",P,N,Ne.statusCode,Ne.headers),x.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(){K=!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)):(x.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=i.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;be(Ne,Ve,function(Ie,De,Le){if(Ie)return W(Ie,Ve,Ne);if(!Le&&I.indexOf(x.dataType)>=0){try{De=decodeBodyByCharset(De,Ne)}catch(Te){return g("decodeBodyByCharset error: %s",Te),W(null,De,Ne)}if(x.dataType==="json")if(Z===0)De=null;else{var _e=parseJSON(De,J);_e.error?Ie=_e.error:De=_e.data}}K&&g("Request#%d %s: Remote socket was terminated before `response.end()` was called",P,N),W(Ie,De,Ne)})})}var Fe,Ue;Array.isArray(x.timeout)?(Fe=m(x.timeout[0]),Ue=m(x.timeout[1])):Fe=Ue=m(x.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=x.mode?x.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()-X}),Xe.once("socket",function(Ne){q&&(q.queuing=Date.now()-X),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()-X),Ve&&($=Ve)}),Ne.once("connect",function(){q&&(q.connected=Date.now()-X),H(),Ye(),g("Request#%d %s new socket connected",P,N),ee=!0,$||($=Ne.remoteAddress),Ce=Ne.remotePort});return}g("Request#%d %s reuse socket connected, readyState: %s",P,N,nt),ee=!0,ne=!0,$||($=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()}),x.stream?(x.stream.pipe(Xe),x.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,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.Iso10126={pad:function(i,S){var _=S*4,y=_-i.sigBytes%_;i.concat(h.lib.WordArray.random(y-1)).concat(h.lib.WordArray.create([y<<24],1))},unpad:function(i){var S=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=S}},h.pad.Iso10126})},osHv:function(u,G,c){(function(h){h(c("VrN/"))})(function(h){"use strict";var i=h.Pos;function S(k,T){return k.line-T.line||k.ch-T.ch}var _="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",y=_+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",p=new RegExp("<(/?)(["+_+"]["+y+"]*)","g");function d(k,T,D,I){this.line=T,this.ch=D,this.cm=k,this.text=k.getLine(T),this.min=I?Math.max(I.from,k.firstLine()):k.firstLine(),this.max=I?Math.min(I.to-1,k.lastLine()):k.lastLine()}function o(k,T){var D=k.cm.getTokenTypeAt(i(k.line,T));return D&&/\btag\b/.test(D)}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 a(k){for(;;){var T=k.text.indexOf(">",k.ch);if(T==-1){if(s(k))continue;return}if(!o(k,T+1)){k.ch=T+1;continue}var D=k.text.lastIndexOf("/",T),I=D>-1&&!/\S/.test(k.text.slice(D+1,T));return k.ch=T+1,I?"selfClose":"regular"}}function g(k){for(;;){var T=k.ch?k.text.lastIndexOf("<",k.ch-1):-1;if(T==-1){if(l(k))continue;return}if(!o(k,T+1)){k.ch=T;continue}p.lastIndex=T,k.ch=T;var D=p.exec(k.text);if(D&&D.index==T)return D}}function m(k){for(;;){p.lastIndex=k.ch;var T=p.exec(k.text);if(!T){if(s(k))continue;return}if(!o(k,T.index+1)){k.ch=T.index+1;continue}return k.ch=T.index+T[0].length,T}}function v(k){for(;;){var T=k.ch?k.text.lastIndexOf(">",k.ch-1):-1;if(T==-1){if(l(k))continue;return}if(!o(k,T+1)){k.ch=T;continue}var D=k.text.lastIndexOf("/",T),I=D>-1&&!/\S/.test(k.text.slice(D+1,T));return k.ch=T+1,I?"selfClose":"regular"}}function w(k,T){for(var D=[];;){var I=m(k),B,N=k.line,x=k.ch-(I?I[0].length:0);if(!I||!(B=a(k)))return;if(B=="selfClose")continue;if(I[1]){for(var Y=D.length-1;Y>=0;--Y)if(D[Y]==I[2]){D.length=Y;break}if(Y<0&&(!T||T==I[2]))return{tag:I[2],from:i(N,x),to:i(k.line,k.ch)}}else D.push(I[2])}}function E(k,T){for(var D=[];;){var I=v(k);if(!I)return;if(I=="selfClose"){g(k);continue}var B=k.line,N=k.ch,x=g(k);if(!x)return;if(x[1])D.push(x[2]);else{for(var Y=D.length-1;Y>=0;--Y)if(D[Y]==x[2]){D.length=Y;break}if(Y<0&&(!T||T==x[2]))return{tag:x[2],from:i(k.line,k.ch),to:i(B,N)}}}}h.registerHelper("fold","xml",function(k,T){for(var D=new d(k,T.line,0);;){var I=m(D);if(!I||D.line!=T.line)return;var B=a(D);if(!B)return;if(!I[1]&&B!="selfClose"){var N=i(D.line,D.ch),x=w(D,I[2]);return x&&S(x.from,N)>0?{from:N,to:x.from}:null}}}),h.findMatchingTag=function(k,T,D){var I=new d(k,T.line,T.ch,D);if(I.text.indexOf(">")==-1&&I.text.indexOf("<")==-1)return;var B=a(I),N=B&&i(I.line,I.ch),x=B&&g(I);if(!B||!x||S(I,T)>0)return;var Y={from:i(I.line,I.ch),to:N,tag:x[2]};return B=="selfClose"?{open:Y,close:null,at:"open"}:x[1]?{open:E(I,x[2]),close:Y,at:"close"}:(I=new d(k,N.line,N.ch,D),{open:Y,close:w(I,x[2]),at:"open"})},h.findEnclosingTag=function(k,T,D,I){for(var B=new d(k,T.line,T.ch,D);;){var N=E(B,I);if(!N)break;var x=new d(k,T.line,T.ch,D),Y=w(x,N.tag);if(Y)return{open:N,close:Y}}},h.scanForClosingTag=function(k,T,D,I){var B=new d(k,T.line,T.ch,I?{from:0,to:I}:null);return w(B,D)}})},p5ED:function(u,G,c){"use strict";var h=c("+L6B"),i=c("2/Rp"),S=c("5Dmo"),_=c("3S7+"),y=c("k1fw"),p=c("tJVT"),d=c("q1tI"),o=c.n(d),s=c("vHTk"),l=c.n(s),a=c("yEEn"),g=c("ZW9T"),m=c("1vsH");G.a=function(v){var w=v.name,E=v.data,k=v.theme,T=v.type,D=v.filename,I=v.monacoEditor,B=v.className,N=v.style,x=v.close,Y=v.onClose,V=v.hasMask,P=Object(d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),F=Object(p.a)(P,2),X=F[0],Q=F[1],ce=Object(d.useState)(""),fe=Object(p.a)(ce,2),z=fe[0],se=fe[1],J=Object(d.useRef)();D&&(I.filename=D),Object(d.useEffect)(function(){var R,C,M=(R=document.cookie)===null||R===void 0||((C=R.replace(/\s/g,""))===null||C===void 0)?void 0:C.split(";");M==null||M.map(function(le){var he=le.split("=");he[0]==="_educoder_session"&&se(he[1])})},[]);var j=function(){if(E.startsWith("http")||E.startsWith("/")){U();return}Object(m.x)(D||"educoder",E,D)},U=function(){Object(m.v)(D||w,E)};return console.log("data:",E,"fileanme:",D," name:",w),o.a.createElement("div",{style:Object(y.a)({},N||{}),className:"".concat(V&&l.a.bgBlack," ").concat(T?l.a.wrp:"hide")},x&&o.a.createElement("div",{className:l.a.close,ref:J},o.a.createElement(_.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},o.a.createElement("span",{onClick:U},o.a.createElement("i",{className:"icon-quxiaozhiding"}))),o.a.createElement(_.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},o.a.createElement("span",{className:"",onClick:Y},o.a.createElement("i",{className:"icon-guanbi1"})))),o.a.createElement("div",{className:"".concat(l.a[B]," ").concat(B," ").concat(l.a.monaco," ").concat(T==="txt"?"show":"hide")},T==="txt"&&o.a.createElement(g.b,I)),T==="audio"&&o.a.createElement("audio",{src:"".concat(E!=null&&E.startsWith("/")||(E==null?void 0:E.indexOf("https://"))>-1?E:"data:audio/mp3;base64,").concat(E),autoPlay:!0}),T==="video"&&o.a.createElement(o.a.Fragment,null,E!=null&&E.startsWith("/")?o.a.createElement("video",{controls:!0,src:"".concat(E),autoPlay:!0}):o.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(E),autoPlay:!0})),T==="html"&&o.a.createElement("iframe",{src:E+"&disposition=inline"}),T==="pdf"&&o.a.createElement("embed",{className:l.a.embed,src:E}),T==="image"&&o.a.createElement(o.a.Fragment,null,o.a.createElement("img",{src:"".concat(E!=null&&E.startsWith("/")||(E==null?void 0:E.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(E)})),T==="other"&&o.a.createElement("div",null,o.a.createElement(i.a,{type:"primary",size:"large",onClick:j},o.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(T==="download"||T==="office")&&o.a.createElement(i.a,{type:"primary",size:"large",onClick:j},o.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(u,G,c){},pA7S:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.WordArray,y=S.BlockCipher,p=i.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],o=[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}],a=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=p.DES=y.extend({_doReset:function(){for(var E=this._key,k=E.words,T=[],D=0;D<56;D++){var I=d[D]-1;T[D]=k[I>>>5]>>>31-I%32&1}for(var B=this._subKeys=[],N=0;N<16;N++){for(var x=B[N]=[],Y=s[N],D=0;D<24;D++)x[D/6|0]|=T[(o[D]-1+Y)%28]<<31-D%6,x[4+(D/6|0)]|=T[28+(o[D+24]-1+Y)%28]<<31-D%6;x[0]=x[0]<<1|x[0]>>>31;for(var D=1;D<7;D++)x[D]=x[D]>>>(D-1)*4+3;x[7]=x[7]<<5|x[7]>>>27}for(var V=this._invSubKeys=[],D=0;D<16;D++)V[D]=B[15-D]},encryptBlock:function(E,k){this._doCryptBlock(E,k,this._subKeys)},decryptBlock:function(E,k){this._doCryptBlock(E,k,this._invSubKeys)},_doCryptBlock:function(E,k,T){this._lBlock=E[k],this._rBlock=E[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 D=0;D<16;D++){for(var I=T[D],B=this._lBlock,N=this._rBlock,x=0,Y=0;Y<8;Y++)x|=l[Y][((N^I[Y])&a[Y])>>>0];this._lBlock=N,this._rBlock=B^x}var V=this._lBlock;this._lBlock=this._rBlock,this._rBlock=V,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),E[k]=this._lBlock,E[k+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function m(E,k){var T=(this._lBlock>>>E^this._rBlock)&k;this._rBlock^=T,this._lBlock^=T<<E}function v(E,k){var T=(this._rBlock>>>E^this._lBlock)&k;this._lBlock^=T,this._rBlock^=T<<E}i.DES=y._createHelper(g);var w=p.TripleDES=y.extend({_doReset:function(){var E=this._key,k=E.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 T=k.slice(0,2),D=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(_.create(T)),this._des2=g.createEncryptor(_.create(D)),this._des3=g.createEncryptor(_.create(I))},encryptBlock:function(E,k){this._des1.encryptBlock(E,k),this._des2.decryptBlock(E,k),this._des3.encryptBlock(E,k)},decryptBlock:function(E,k){this._des3.decryptBlock(E,k),this._des2.encryptBlock(E,k),this._des1.decryptBlock(E,k)},keySize:192/32,ivSize:64/32,blockSize:64/32});i.TripleDES=y._createHelper(w)}(),h.TripleDES})},qBft:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("OLod"))})(this,function(h){return h.pad.AnsiX923={pad:function(i,S){var _=i.sigBytes,y=S*4,p=y-_%y,d=_+p-1;i.clamp(),i.words[d>>>2]|=p<<24-d%4*8,i.sigBytes+=p},unpad:function(i){var S=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=S}},h.pad.Ansix923})},qM6L:function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.WordArray,y=i.enc,p=y.Utf16=y.Utf16BE={stringify:function(o){for(var s=o.words,l=o.sigBytes,a=[],g=0;g<l;g+=2){var m=s[g>>>2]>>>16-g%4*8&65535;a.push(String.fromCharCode(m))}return a.join("")},parse:function(o){for(var s=o.length,l=[],a=0;a<s;a++)l[a>>>1]|=o.charCodeAt(a)<<16-a%2*16;return _.create(l,s*2)}};y.Utf16LE={stringify:function(o){for(var s=o.words,l=o.sigBytes,a=[],g=0;g<l;g+=2){var m=d(s[g>>>2]>>>16-g%4*8&65535);a.push(String.fromCharCode(m))}return a.join("")},parse:function(o){for(var s=o.length,l=[],a=0;a<s;a++)l[a>>>1]|=d(o.charCodeAt(a)<<16-a%2*16);return _.create(l,s*2)}};function d(o){return o<<8&4278255360|o>>>8&16711935}}(),h.enc.Utf16})},qu8F:function(u,G,c){(function(h,i,S){u.exports=G=i(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 i=h.lib.BlockCipherMode.extend();function S(p){if((p>>24&255)===255){var d=p>>16&255,o=p>>8&255,s=p&255;d===255?(d=0,o===255?(o=0,s===255?s=0:++s):++o):++d,p=0,p+=d<<16,p+=o<<8,p+=s}else p+=1<<24;return p}function _(p){return(p[0]=S(p[0]))===0&&(p[1]=S(p[1])),p}var y=i.Encryptor=i.extend({processBlock:function(p,d){var o=this._cipher,s=o.blockSize,l=this._iv,a=this._counter;l&&(a=this._counter=l.slice(0),this._iv=void 0),_(a);var g=a.slice(0);o.encryptBlock(g,0);for(var m=0;m<s;m++)p[d+m]^=g[m]}});return i.Decryptor=y,i}(),h.mode.CTRGladman})},"rAM+":function(u,G,c){"use strict";c.d(G,"a",function(){return i});var h=c("Qw5x");function i(S,_){var y;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(y=Object(h.a)(S))||_&&S&&typeof S.length=="number"){y&&(S=y);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 o=!0,s=!1,l;return{s:function(){y=S[Symbol.iterator]()},n:function(){var g=y.next();return o=g.done,g},e:function(g){s=!0,l=g},f:function(){try{!o&&y.return!=null&&y.return()}finally{if(s)throw l}}}}},rUJ1:function(u,G){const c=/[&<>"']/,h=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},y=V=>_[V];function p(V,P){if(P){if(c.test(V))return V.replace(h,y)}else if(i.test(V))return V.replace(S,y);return V}const d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(V){return V.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(V,P){V=V.source||V,P=P||"";const F={replace:(X,Q)=>(Q=Q.source||Q,Q=Q.replace(s,"$1"),V=V.replace(X,Q),F),getRegex:()=>new RegExp(V,P)};return F}const a=/[^\w:]/g,g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(V,P,F){if(V){let X;try{X=decodeURIComponent(o(F)).replace(a,"").toLowerCase()}catch(Q){return null}if(X.indexOf("javascript:")===0||X.indexOf("vbscript:")===0||X.indexOf("data:")===0)return null}P&&!g.test(F)&&(F=T(P,F));try{F=encodeURI(F).replace(/%25/g,"%")}catch(X){return null}return F}const v={},w=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,k=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(V,P){v[" "+V]||(w.test(V)?v[" "+V]=V+"/":v[" "+V]=N(V,"/",!0)),V=v[" "+V];const F=V.indexOf(":")===-1;return P.substring(0,2)==="//"?F?P:V.replace(E,"$1")+P:P.charAt(0)==="/"?F?P:V.replace(k,"$1")+P:V+P}const D={exec:function(){}};function I(V){let P=1,F,X;for(;P<arguments.length;P++){F=arguments[P];for(X in F)Object.prototype.hasOwnProperty.call(F,X)&&(V[X]=F[X])}return V}function B(V,P){const F=V.replace(/\|/g,(ce,fe,z)=>{let se=!1,J=fe;for(;--J>=0&&z[J]==="\\";)se=!se;return se?"|":" |"}),X=F.split(/ \|/);let Q=0;if(X.length>P)X.splice(P);else for(;X.length<P;)X.push("");for(;Q<X.length;Q++)X[Q]=X[Q].trim().replace(/\\\|/g,"|");return X}function N(V,P,F){const X=V.length;if(X===0)return"";let Q=0;for(;Q<X;){const ce=V.charAt(X-Q-1);if(ce===P&&!F)Q++;else if(ce!==P&&F)Q++;else break}return V.substr(0,X-Q)}function x(V,P){if(V.indexOf(P[1])===-1)return-1;const F=V.length;let X=0,Q=0;for(;Q<F;Q++)if(V[Q]==="\\")Q++;else if(V[Q]===P[0])X++;else if(V[Q]===P[1]&&(X--,X<0))return Q;return-1}function Y(V){V&&V.sanitize&&!V.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:o,edit:l,cleanUrl:m,resolveUrl:T,noopTest:D,merge:I,splitCells:B,rtrim:N,findClosingBracket:x,checkSanitizeDeprecation:Y}},rcnY:function(u,G,c){var h=c("aRTE");function i(S,_){this.totalCount=S,this.dataCount=_}i.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]],i.getRSBlocks=function(S,_){var y=i.getRsBlockTable(S,_);if(y==null)throw new Error("bad rs block @ typeNumber:"+S+"/errorCorrectLevel:"+_);for(var p=y.length/3,d=new Array,o=0;o<p;o++)for(var s=y[o*3+0],l=y[o*3+1],a=y[o*3+2],g=0;g<s;g++)d.push(new i(l,a));return d},i.getRsBlockTable=function(S,_){switch(_){case h.L:return i.RS_BLOCK_TABLE[(S-1)*4+0];case h.M:return i.RS_BLOCK_TABLE[(S-1)*4+1];case h.Q:return i.RS_BLOCK_TABLE[(S-1)*4+2];case h.H:return i.RS_BLOCK_TABLE[(S-1)*4+3];default:return}},u.exports=i},rdUC:function(u,G,c){var h=c("MFOe"),i=h.Global;u.exports={name:"localStorage",read:_,write:y,each:p,remove:d,clearAll:o};function S(){return i.localStorage}function _(s){return S().getItem(s)}function y(s,l){return S().setItem(s,l)}function p(s){for(var l=S().length-1;l>=0;l--){var a=S().key(l);s(_(a),a)}}function d(s){return S().removeItem(s)}function o(){return S().clear()}},sboe:function(u,G,c){"use strict";c.d(G,"a",function(){return S});var h=c("q1tI"),i=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"),i=c("tsqr"),S=c("9og8"),_=c("5NDa"),y=c("5rEg"),p=c("2qtc"),d=c("kLXV"),o=c("oBTY"),s=c("tJVT"),l=c("OaEy"),a=c("2fM7"),g=c("WmNS"),m=c.n(g),v=c("q1tI"),w=c.n(v),E=c("ErOA"),k=c("i58Z"),T=c.n(k),D=c("T1X5"),I=c.n(D),B=a.a.Option,N=function(Y){var V=Y.subId,P=Y.value,F=Y.selectvalues,X=Y.disabled,Q=Y.knowledgeOptions,ce=Q===void 0?[]:Q,fe=Y.onChange,z=fe===void 0?function(){}:fe,se=Y.onAddKnowledgeFinish,J=se===void 0?function(){}:se,j=Object(v.useRef)(),U=Object(v.useState)([]),R=Object(s.a)(U,2),C=R[0],M=R[1];P=P||[];var le=function(Ee,Se){Ee?(M([Se.key]),z([Se.key])):(M([]),z([]))};Object(v.useEffect)(function(){(F==null?void 0:F.length)>0&&(M(Object(o.a)(F)),z(Object(o.a)(F)))},[ce]),Object(v.useEffect)(function(){var ve;((ve=P)===null||ve===void 0?void 0:ve.length)>0&&z(Object(o.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(y.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 ne,Z;return m.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:if(j.current){K.next=3;break}return i.b.warn("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),K.abrupt("return",ee());case 3:if(!(j.current.length>20)){K.next=6;break}return i.b.warn("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),K.abrupt("return",ee());case 6:return K.next=8,Object(E.a)("/api/tag_disciplines.json",{method:"post",body:{name:j.current,sub_discipline_id:V}});case 8:return ne=K.sent,(ne==null?void 0:ne.status)===0&&(J({id:ne.tag_discipline_id,name:j.current,type:"personal"}),Z=[],Z.push(ne.tag_discipline_id),z([].concat(Z)),M([ne.tag_discipline_id]),z([].concat(Z))),K.abrupt("return",me());case 11:case"end":return K.stop()}},pe)}));return function(pe,me){return ae.apply(this,arguments)}}())}})};return w.a.createElement("div",{className:T.a.wrap},w.a.createElement(a.a,{disabled:!V||X,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:!V,className:"".concat(T.a.addKnowledge," ").concat(V?"":T.a.disabled),onClick:he},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))}},uGsb:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("MlIO"),c("1uat"))})(this,function(h){return function(){var i=h,S=i.x64,_=S.Word,y=S.WordArray,p=i.algo,d=p.SHA512,o=p.SHA384=d.extend({_doReset:function(){this._hash=new y.init([new _.init(3418070365,3238371032),new _.init(1654270250,914150663),new _.init(2438529370,812702999),new _.init(355462360,4144912697),new _.init(1731405415,4290775857),new _.init(2394180231,1750603025),new _.init(3675008525,1694076839),new _.init(1203062813,3204075428)])},_doFinalize:function(){var s=d._doFinalize.call(this);return s.sigBytes-=16,s}});i.SHA384=d._createHelper(o),i.HmacSHA384=d._createHmacHelper(o)}(),h.SHA384})},uGxW:function(u,G,c){(function(h,i,S){u.exports=G=i(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,i){u.exports=i()})(this,function(){"use strict";function h(i,S,_){_=_||{},_.childrenKeyName=_.childrenKeyName||"children";var y=i||[],p=[],d=0;do{var o=y.filter(function(s){return S(s,d)})[0];if(!o)break;p.push(o),y=o[_.childrenKeyName]||[],d+=1}while(y.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,i,S){u.exports=G=i(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.StreamCipher,y=i.algo,p=y.RC4=_.extend({_doReset:function(){for(var s=this._key,l=s.words,a=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%a,E=l[w>>>2]>>>24-w%4*8&255;v=(v+g[m]+E)%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,a=this._j,g=0,m=0;m<4;m++){l=(l+1)%256,a=(a+s[l])%256;var v=s[l];s[l]=s[a],s[a]=v,g|=s[(s[l]+s[a])%256]<<24-m*8}return this._i=l,this._j=a,g}i.RC4=_._createHelper(p);var o=y.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)}});i.RC4Drop=_._createHelper(o)}(),h.RC4})},wU8J:function(u,G){function c(){this.buffer=new Array,this.length=0}c.prototype={get:function(h){var i=Math.floor(h/8);return(this.buffer[i]>>>7-h%8&1)==1},put:function(h,i){for(var S=0;S<i;S++)this.putBit((h>>>i-S-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(h){var i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),h&&(this.buffer[i]|=128>>>this.length%8),this.length++}},u.exports=c},wZgz:function(u,G,c){(function(h,i,S){u.exports=G=i(c("Ib8C"),c("ETIr"),c("cv67"),c("K3mO"),c("OLod"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.BlockCipher,y=i.algo,p=[],d=[],o=[],s=[],l=[],a=[],g=[],m=[],v=[],w=[];(function(){for(var T=[],D=0;D<256;D++)D<128?T[D]=D<<1:T[D]=D<<1^283;for(var I=0,B=0,D=0;D<256;D++){var N=B^B<<1^B<<2^B<<3^B<<4;N=N>>>8^N&255^99,p[I]=N,d[N]=I;var x=T[I],Y=T[x],V=T[Y],P=T[N]*257^N*16843008;o[I]=P<<24|P>>>8,s[I]=P<<16|P>>>16,l[I]=P<<8|P>>>24,a[I]=P;var P=V*16843009^Y*65537^x*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=x^T[T[T[V^x]]],B^=T[T[B]]):I=B=1}})();var E=[0,1,2,4,8,16,32,64,128,27,54],k=y.AES=_.extend({_doReset:function(){var T;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var D=this._keyPriorReset=this._key,I=D.words,B=D.sigBytes/4,N=this._nRounds=B+6,x=(N+1)*4,Y=this._keySchedule=[],V=0;V<x;V++)V<B?Y[V]=I[V]:(T=Y[V-1],V%B?B>6&&V%B==4&&(T=p[T>>>24]<<24|p[T>>>16&255]<<16|p[T>>>8&255]<<8|p[T&255]):(T=T<<8|T>>>24,T=p[T>>>24]<<24|p[T>>>16&255]<<16|p[T>>>8&255]<<8|p[T&255],T^=E[V/B|0]<<24),Y[V]=Y[V-B]^T);for(var P=this._invKeySchedule=[],F=0;F<x;F++){var V=x-F;if(F%4)var T=Y[V];else var T=Y[V-4];F<4||V<=4?P[F]=T:P[F]=g[p[T>>>24]]^m[p[T>>>16&255]]^v[p[T>>>8&255]]^w[p[T&255]]}},encryptBlock:function(T,D){this._doCryptBlock(T,D,this._keySchedule,o,s,l,a,p)},decryptBlock:function(T,D){var I=T[D+1];T[D+1]=T[D+3],T[D+3]=I,this._doCryptBlock(T,D,this._invKeySchedule,g,m,v,w,d);var I=T[D+1];T[D+1]=T[D+3],T[D+3]=I},_doCryptBlock:function(T,D,I,B,N,x,Y,V){for(var P=this._nRounds,F=T[D]^I[0],X=T[D+1]^I[1],Q=T[D+2]^I[2],ce=T[D+3]^I[3],fe=4,z=1;z<P;z++){var se=B[F>>>24]^N[X>>>16&255]^x[Q>>>8&255]^Y[ce&255]^I[fe++],J=B[X>>>24]^N[Q>>>16&255]^x[ce>>>8&255]^Y[F&255]^I[fe++],j=B[Q>>>24]^N[ce>>>16&255]^x[F>>>8&255]^Y[X&255]^I[fe++],U=B[ce>>>24]^N[F>>>16&255]^x[X>>>8&255]^Y[Q&255]^I[fe++];F=se,X=J,Q=j,ce=U}var se=(V[F>>>24]<<24|V[X>>>16&255]<<16|V[Q>>>8&255]<<8|V[ce&255])^I[fe++],J=(V[X>>>24]<<24|V[Q>>>16&255]<<16|V[ce>>>8&255]<<8|V[F&255])^I[fe++],j=(V[Q>>>24]<<24|V[ce>>>16&255]<<16|V[F>>>8&255]<<8|V[X&255])^I[fe++],U=(V[ce>>>24]<<24|V[F>>>16&255]<<16|V[X>>>8&255]<<8|V[Q&255])^I[fe++];T[D]=se,T[D+1]=J,T[D+2]=j,T[D+3]=U},keySize:256/32});i.AES=_._createHelper(k)}(),h.AES})},wbyO:function(u,G,c){(function(h,i){u.exports=G=i(c("Ib8C"))})(this,function(h){return function(){var i=h,S=i.lib,_=S.WordArray,y=i.enc,p=y.Base64url={stringify:function(o,s=!0){var l=o.words,a=o.sigBytes,g=s?this._safe_map:this._map;o.clamp();for(var m=[],v=0;v<a;v+=3)for(var w=l[v>>>2]>>>24-v%4*8&255,E=l[v+1>>>2]>>>24-(v+1)%4*8&255,k=l[v+2>>>2]>>>24-(v+2)%4*8&255,T=w<<16|E<<8|k,D=0;D<4&&v+D*.75<a;D++)m.push(g.charAt(T>>>6*(3-D)&63));var I=g.charAt(64);if(I)for(;m.length%4;)m.push(I);return m.join("")},parse:function(o,s=!0){var l=o.length,a=s?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var m=0;m<a.length;m++)g[a.charCodeAt(m)]=m}var v=a.charAt(64);if(v){var w=o.indexOf(v);w!==-1&&(l=w)}return d(o,l,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function d(o,s,l){for(var a=[],g=0,m=0;m<s;m++)if(m%4){var v=l[o.charCodeAt(m-1)]<<m%4*2,w=l[o.charCodeAt(m)]>>>6-m%4*2,E=v|w;a[g>>>2]|=E<<24-g%4*8,g++}return _.create(a,g)}}(),h.enc.Base64url})},ynwM:function(u,G,c){var h=c("MFOe"),i=h.Global;u.exports={name:"oldFF-globalStorage",read:_,write:y,each:p,remove:d,clearAll:o};var S=i.globalStorage;function _(s){return S[s]}function y(s,l){S[s]=l}function p(s){for(var l=S.length-1;l>=0;l--){var a=S.key(l);s(S[a],a)}}function d(s){return S.removeItem(s)}function o(){p(function(s,l){delete S[s]})}}}]);