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__Competitions__Detail.b76...

229 lines
1.5 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([[118,5,6,7,9,10,16],{"+NIl":function(j,J,k){(function(L){L(k("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(f,C){"use strict";function D(c,m){c.cmdState.push(m)}function u(c){return c.cmdState.length>0?c.cmdState[c.cmdState.length-1]:null}function h(c){var m=c.cmdState.pop();m&&m.closeBracket()}function w(c){for(var m=c.cmdState,g=m.length-1;g>=0;g--){var b=m[g];if(b.name=="DEFAULT")continue;return b}return{styleIdentifier:function(){return null}}}function d(c,m,g){return function(){this.name=c,this.bracketNo=0,this.style=m,this.styles=g,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var i={};i.importmodule=d("importmodule","tag",["string","builtin"]),i.documentclass=d("documentclass","tag",["","atom"]),i.usepackage=d("usepackage","tag",["atom"]),i.begin=d("begin","tag",["atom"]),i.end=d("end","tag",["atom"]),i.label=d("label","tag",["atom"]),i.ref=d("ref","tag",["atom"]),i.eqref=d("eqref","tag",["atom"]),i.cite=d("cite","tag",["atom"]),i.bibitem=d("bibitem","tag",["atom"]),i.Bibitem=d("Bibitem","tag",["atom"]),i.RBibitem=d("RBibitem","tag",["atom"]),i.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function l(c,m){c.f=m}function a(c,m){var g;if(c.match(/^\\[a-zA-Z@]+/)){var b=c.current().slice(1);return g=i.hasOwnProperty(b)?i[b]:i.DEFAULT,g=new g,D(m,g),l(m,p),g.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/\\]/))return"tag";if(c.match("\\["))return l(m,function(o,t){return _(o,t,"\\]")}),"keyword";if(c.match("\\("))return l(m,function(o,t){return _(o,t,"\\)")}),"keyword";if(c.match("$$"))return l(m,function(o,t){return _(o,t,"$$")}),"keyword";if(c.match("$"))return l(m,function(o,t){return _(o,t,"$")}),"keyword";var n=c.next();if(n=="%")return c.skipToEnd(),"comment";if(n=="}"||n=="]"){if(g=u(m),g)g.closeBracket(n),l(m,p);else return"error";return"bracket"}else return n=="{"||n=="["?(g=i.DEFAULT,g=new g,D(m,g),"bracket"):/\d/.test(n)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w\-_]/),g=w(m),g.name=="begin"&&(g.argument=c.current()),g.styleIdentifier())}function _(c,m,g){if(c.eatSpace())return null;if(g&&c.match(g))return l(m,a),"keyword";if(c.match(/^\\[a-zA-Z@]+/))return"tag";if(c.match(/^[a-zA-Z]+/))return"variable-2";if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";if(c.match(/^[\^_&]/))return"tag";if(c.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(c.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var b=c.next();return b=="{"||b=="}"||b=="["||b=="]"||b=="("||b==")"?"bracket":b=="%"?(c.skipToEnd(),"comment"):"error"}function p(c,m){var g=c.peek(),b;return g=="{"||g=="["?(b=u(m),b.openBracket(g),c.eat(g),l(m,a),"bracket"):/[ \t\r]/.test(g)?(c.eat(g),null):(l(m,a),h(m),a(c,m))}return{startState:function(){var c=C.inMathMode?function(m,g){return _(m,g)}:a;return{cmdState:[],f:c}},copyState:function(c){return{cmdState:c.cmdState.slice(),f:c.f}},token:function(c,m){return m.f(c,m)},blankLine:function(c){c.f=a,c.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"19Vz":function(j,J,k){(function(L){L(k("VrN/"))})(function(L){L.defineOption("placeholder","",function(d,i,l){var a=l&&l!=L.Init;if(i&&!a)d.on("blur",u),d.on("change",h),d.on("swapDoc",h),L.on(d.getInputField(),"compositionupdate",d.state.placeholderCompose=function(){D(d)}),h(d);else if(!i&&a){d.off("blur",u),d.off("change",h),d.off("swapDoc",h),L.off(d.getInputField(),"compositionupdate",d.state.placeholderCompose),f(d);var _=d.getWrapperElement();_.className=_.className.replace(" CodeMirror-empty","")}i&&!d.hasFocus()&&u(d)});function f(d){d.state.placeholder&&(d.state.placeholder.parentNode.removeChild(d.state.placeholder),d.state.placeholder=null)}function C(d){f(d);var i=d.state.placeholder=document.createElement("pre");i.style.cssText="height: 0; overflow: visible",i.style.direction=d.getOption("direction"),i.className="CodeMirror-placeholder CodeMirror-line-like";var l=d.getOption("placeholder");typeof l=="string"&&(l=document.createTextNode(l)),i.appendChild(l),d.display.lineSpace.insertBefore(i,d.display.lineSpace.firstChild)}function D(d){setTimeout(function(){var i=!1,l=d.getInputField();l.nodeName=="TEXTAREA"?i=!l.value:d.lineCount()==1&&(i=!/[^\u200b]/.test(l.querySelector(".CodeMirror-line").textContent)),i?C(d):f(d)},20)}function u(d){w(d)&&C(d)}function h(d){var i=d.getWrapperElement(),l=w(d);i.className=i.className.replace(" CodeMirror-empty","")+(l?" CodeMirror-empty":""),l?C(d):f(d)}function w(d){return d.lineCount()===1&&d.getLine(0)===""}})},"1ZF9":function(j,J,k){j.exports=k.p+"static/Authorize.cc9c212f.png"},"1eCo":function(j,J,k){(function(L){L(k("VrN/"))})(function(L){"use strict";var f={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},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(D,u){var h=D.indentUnit,w={},d=u.htmlMode?f:C;for(var i in d)w[i]=d[i];for(var i in u)w[i]=u[i];var l,a;function _(T,M){function N(H){return M.tokenize=H,H(T,M)}var I=T.next();if(I=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?N(m("atom","]]>")):null:T.match("--")?N(m("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),N(g(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),M.tokenize=m("meta","?>"),"meta"):(l=T.eat("/")?"closeTag":"openTag",M.tokenize=p,"tag bracket");if(I=="&"){var G;return T.eat("#")?T.eat("x")?G=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):G=T.eatWhile(/[\d]/)&&T.eat(";"):G=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),G?"atom":"error"}else return T.eatWhile(/[^&<]/),null}_.isInText=!0;function p(T,M){var N=T.next();if(N==">"||N=="/"&&T.eat(">"))return M.tokenize=_,l=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return l="equals",null;if(N=="<"){M.tokenize=_,M.state=t,M.tagName=M.tagStart=null;var I=M.tokenize(T,M);return I?I+" tag error":"tag error"}else return/[\'\"]/.test(N)?(M.tokenize=c(N),M.stringStartCol=T.column(),M.tokenize(T,M)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function c(T){var M=function(N,I){for(;!N.eol();)if(N.next()==T){I.tokenize=p;break}return"string"};return M.isInAttribute=!0,M}function m(T,M){return function(N,I){for(;!N.eol();){if(N.match(M)){I.tokenize=_;break}N.next()}return T}}function g(T){return function(M,N){for(var I;(I=M.next())!=null;){if(I=="<")return N.tokenize=g(T+1),N.tokenize(M,N);if(I==">")if(T==1){N.tokenize=_;break}else return N.tokenize=g(T-1),N.tokenize(M,N)}return"meta"}}function b(T,M,N){this.prev=T.context,this.tagName=M,this.indent=T.indented,this.startOfLine=N,(w.doNotIndent.hasOwnProperty(M)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function n(T){T.context&&(T.context=T.context.prev)}function o(T,M){for(var N;;){if(!T.context)return;if(N=T.context.tagName,!w.contextGrabbers.hasOwnProperty(N)||!w.contextGrabbers[N].hasOwnProperty(M))return;n(T)}}function t(T,M,N){return T=="openTag"?(N.tagStart=M.column(),S):T=="closeTag"?x:t}function S(T,M,N){return T=="word"?(N.tagName=M.current(),a="tag",O):w.allowMissingTagName&&T=="endTag"?(a="tag bracket",O(T,M,N)):(a="error",S)}function x(T,M,N){if(T=="word"){var I=M.current();return N.context&&N.context.tagName!=I&&w.implicitlyClosed.hasOwnProperty(N.context.tagName)&&n(N),N.context&&N.context.tagName==I||w.matchClosing===!1?(a="tag",s):(a="tag error",P)}else return w.allowMissingTagName&&T=="endTag"?(a="tag bracket",s(T,M,N)):(a="error",P)}function s(T,M,N){return T!="endTag"?(a="error",s):(n(N),t)}function P(T,M,N){return a="error",s(T,M,N)}function O(T,M,N){if(T=="word")return a="attribute",E;if(T=="endTag"||T=="selfcloseTag"){var I=N.tagName,G=N.tagStart;return N.tagName=N.tagStart=null,T=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(I)?o(N,I):(o(N,I),N.context=new b(N,I,G==N.indented)),t}return a="error",O}function E(T,M,N){return T=="equals"?v:(w.allowMissing||(a="error"),O(T,M,N))}function v(T,M,N){return T=="string"?y:T=="word"&&w.allowUnquoted?(a="string",O):(a="error",O(T,M,N))}function y(T,M,N){return T=="string"?y:O(T,M,N)}return{startState:function(T){var M={tokenize:_,state:t,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(M.baseIndent=T),M},token:function(T,M){if(!M.tagName&&T.sol()&&(M.indented=T.indentation()),T.eatSpace())return null;l=null;var N=M.tokenize(T,M);return(N||l)&&N!="comment"&&(a=null,M.state=M.state(l||N,T,M),a&&(N=a=="error"?N+" error":a)),N},indent:function(T,M,N){var I=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+h;if(I&&I.noIndent)return L.Pass;if(T.tokenize!=p&&T.tokenize!=_)return N?N.match(/^(\s*)/)[0].length:0;if(T.tagName)return w.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+h*(w.multilineTagIndentFactor||1);if(w.alignCDATA&&/<!\[CDATA\[/.test(M))return 0;var G=M&&/^<(\/)?([\w_:\.-]*)/.exec(M);if(G&&G[1])for(;I;)if(I.tagName==G[2]){I=I.prev;break}else if(w.implicitlyClosed.hasOwnProperty(I.tagName))I=I.prev;else break;else if(G)for(;I;){var H=w.contextGrabbers[I.tagName];if(H&&H.hasOwnProperty(G[2]))I=I.prev;else break}for(;I&&I.prev&&!I.startOfLine;)I=I.prev;return I?I.indent+h:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:w.htmlMode?"html":"xml",helperType:w.htmlMode?"html":"xml",skipAttribute:function(T){T.state==v&&(T.state=O)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var M=[],N=T.context;N;N=N.prev)N.tagName&&M.push(N.tagName);return M.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("MlIO"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.Hasher,u=f.x64,h=u.Word,w=u.WordArray,d=f.algo;function i(){return h.create.apply(h,arguments)}var l=[i(1116352408,3609767458),i(1899447441,602891725),i(3049323471,3964484399),i(3921009573,2173295548),i(961987163,4081628472),i(1508970993,3053834265),i(2453635748,2937671579),i(2870763221,3664609560),i(3624381080,2734883394),i(310598401,1164996542),i(607225278,1323610764),i(1426881987,3590304994),i(1925078388,4068182383),i(2162078206,991336113),i(2614888103,633803317),i(3248222580,3479774868),i(3835390401,2666613458),i(4022224774,944711139),i(264347078,2341262773),i(604807628,2007800933),i(770255983,1495990901),i(1249150122,1856431235),i(1555081692,3175218132),i(1996064986,2198950837),i(2554220882,3999719339),i(2821834349,766784016),i(2952996808,2566594879),i(3210313671,3203337956),i(3336571891,1034457026),i(3584528711,2466948901),i(113926993,3758326383),i(338241895,168717936),i(666307205,1188179964),i(773529912,1546045734),i(1294757372,1522805485),i(1396182291,2643833823),i(1695183700,2343527390),i(1986661051,1014477480),i(2177026350,1206759142),i(2456956037,344077627),i(2730485921,1290863460),i(2820302411,3158454273),i(3259730800,3505952657),i(3345764771,106217008),i(3516065817,3606008344),i(3600352804,1432725776),i(4094571909,1467031594),i(275423344,851169720),i(430227734,3100823752),i(506948616,1363258195),i(659060556,3750685593),i(883997877,3785050280),i(958139571,3318307427),i(1322822218,3812723403),i(1537002063,2003034995),i(1747873779,3602036899),i(1955562222,1575990012),i(2024104815,1125592928),i(2227730452,2716904306),i(2361852424,442776044),i(2428436474,593698344),i(2756734187,3733110249),i(3204031479,2999351573),i(3329325298,3815920427),i(3391569614,3928383900),i(3515267271,566280711),i(3940187606,3454069534),i(4118630271,4000239992),i(116418474,1914138554),i(174292421,2731055270),i(289380356,3203993006),i(460393269,320620315),i(685471733,587496836),i(852142971,1086792851),i(1017036298,365543100),i(1126000580,2618297676),i(1288033470,3409855158),i(1501505948,4234509866),i(1607167915,987167468),i(1816402316,1246189591)],a=[];(function(){for(var p=0;p<80;p++)a[p]=i()})();var _=d.SHA512=D.extend({_doReset:function(){this._hash=new w.init([new h.init(1779033703,4089235720),new h.init(3144134277,2227873595),new h.init(1013904242,4271175723),new h.init(2773480762,1595750129),new h.init(1359893119,2917565137),new h.init(2600822924,725511199),new h.init(528734635,4215389547),new h.init(1541459225,327033209)])},_doProcessBlock:function(p,c){for(var m=this._hash.words,g=m[0],b=m[1],n=m[2],o=m[3],t=m[4],S=m[5],x=m[6],s=m[7],P=g.high,O=g.low,E=b.high,v=b.low,y=n.high,T=n.low,M=o.high,N=o.low,I=t.high,G=t.low,H=S.high,W=S.low,z=x.high,U=x.low,B=s.high,K=s.low,q=P,ae=O,se=E,we=v,Te=y,de=T,xe=M,pe=N,ne=I,ie=G,ee=H,le=W,Q=z,Z=U,be=B,te=K,$=0;$<80;$++){var X,Y,ve=a[$];if($<16)Y=ve.high=p[c+$*2]|0,X=ve.low=p[c+$*2+1]|0;else{var ue=a[$-15],Ee=ue.high,Ke=ue.low,Ye=(Ee>>>1|Ke<<31)^(Ee>>>8|Ke<<24)^Ee>>>7,Je=(Ke>>>1|Ee<<31)^(Ke>>>8|Ee<<24)^(Ke>>>7|Ee<<25),tt=a[$-2],at=tt.high,lt=tt.low,je=(at>>>19|lt<<13)^(at<<3|lt>>>29)^at>>>6,Ce=(lt>>>19|at<<13)^(lt<<3|at>>>29)^(lt>>>6|at<<26),Qe=a[$-7],st=Qe.high,Ge=Qe.low,rt=a[$-16],Re=rt.high,Se=rt.low;X=Je+Ge,Y=Ye+st+(X>>>0<Je>>>0?1:0),X=X+Ce,Y=Y+je+(X>>>0<Ce>>>0?1:0),X=X+Se,Y=Y+Re+(X>>>0<Se>>>0?1:0),ve.high=Y,ve.low=X}var De=ne&ee^~ne&Q,fe=ie&le^~ie&Z,ye=q&se^q&Te^se&Te,_e=ae&we^ae&de^we&de,Ae=(q>>>28|ae<<4)^(q<<30|ae>>>2)^(q<<25|ae>>>7),We=(ae>>>28|q<<4)^(ae<<30|q>>>2)^(ae<<25|q>>>7),Xe=(ne>>>14|ie<<18)^(ne>>>18|ie<<14)^(ne<<23|ie>>>9),ft=(ie>>>14|ne<<18)^(ie>>>18|ne<<14)^(ie<<23|ne>>>9),vt=l[$],Kt=vt.high,kt=vt.low,Or=te+ft,pr=be+Xe+(Or>>>0<te>>>0?1:0),Or=Or+fe,pr=pr+De+(Or>>>0<fe>>>0?1:0),Or=Or+kt,pr=pr+Kt+(Or>>>0<kt>>>0?1:0),Or=Or+X,pr=pr+Y+(Or>>>0<X>>>0?1:0),Et=We+_e,Yr=Ae+ye+(Et>>>0<We>>>0?1:0);be=Q,te=Z,Q=ee,Z=le,ee=ne,le=ie,ie=pe+Or|0,ne=xe+pr+(ie>>>0<pe>>>0?1:0)|0,xe=Te,pe=de,Te=se,de=we,se=q,we=ae,ae=Or+Et|0,q=pr+Yr+(ae>>>0<Or>>>0?1:0)|0}O=g.low=O+ae,g.high=P+q+(O>>>0<ae>>>0?1:0),v=b.low=v+we,b.high=E+se+(v>>>0<we>>>0?1:0),T=n.low=T+de,n.high=y+Te+(T>>>0<de>>>0?1:0),N=o.low=N+pe,o.high=M+xe+(N>>>0<pe>>>0?1:0),G=t.low=G+ie,t.high=I+ne+(G>>>0<ie>>>0?1:0),W=S.low=W+le,S.high=H+ee+(W>>>0<le>>>0?1:0),U=x.low=U+Z,x.high=z+Q+(U>>>0<Z>>>0?1:0),K=s.low=K+te,s.high=B+be+(K>>>0<te>>>0?1:0)},_doFinalize:function(){var p=this._data,c=p.words,m=this._nDataBytes*8,g=p.sigBytes*8;c[g>>>5]|=128<<24-g%32,c[(g+128>>>10<<5)+30]=Math.floor(m/4294967296),c[(g+128>>>10<<5)+31]=m,p.sigBytes=c.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var p=D.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});f.SHA512=D._createHelper(_),f.HmacSHA512=D._createHmacHelper(_)}(),L.SHA512})},"3y9D":function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=C.Hasher,h=f.algo,w=[],d=h.SHA1=u.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(i,l){for(var a=this._hash.words,_=a[0],p=a[1],c=a[2],m=a[3],g=a[4],b=0;b<80;b++){if(b<16)w[b]=i[l+b]|0;else{var n=w[b-3]^w[b-8]^w[b-14]^w[b-16];w[b]=n<<1|n>>>31}var o=(_<<5|_>>>27)+g+w[b];b<20?o+=(p&c|~p&m)+1518500249:b<40?o+=(p^c^m)+1859775393:b<60?o+=(p&c|p&m|c&m)-1894007588:o+=(p^c^m)-899497514,g=m,m=c,c=p<<30|p>>>2,p=_,_=o}a[0]=a[0]+_|0,a[1]=a[1]+p|0,a[2]=a[2]+c|0,a[3]=a[3]+m|0,a[4]=a[4]+g|0},_doFinalize:function(){var i=this._data,l=i.words,a=this._nDataBytes*8,_=i.sigBytes*8;return l[_>>>5]|=128<<24-_%32,l[(_+64>>>9<<4)+14]=Math.floor(a/4294967296),l[(_+64>>>9<<4)+15]=a,i.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var i=u.clone.call(this);return i._hash=this._hash.clone(),i}});f.SHA1=u._createHelper(d),f.HmacSHA1=u._createHmacHelper(d)}(),L.SHA1})},4:function(j,J){},"55Ip":function(j,J,k){"use strict";k.d(J,"a",function(){return o}),k.d(J,"b",function(){return O});var L=k("Ty5D"),f=k("dI71"),C=k("cDcd"),D=k.n(C),u=k("YS25"),h=k("17x9"),w=k.n(h),d=k("wx14"),i=k("zLVn"),l=k("9R94"),a=function(v){Object(f.a)(y,v);function y(){for(var M,N=arguments.length,I=new Array(N),G=0;G<N;G++)I[G]=arguments[G];return M=v.call.apply(v,[this].concat(I))||this,M.history=Object(u.a)(M.props),M}var T=y.prototype;return T.render=function(){return D.a.createElement(L.c,{history:this.history,children:this.props.children})},y}(D.a.Component),_=function(v){Object(f.a)(y,v);function y(){for(var M,N=arguments.length,I=new Array(N),G=0;G<N;G++)I[G]=arguments[G];return M=v.call.apply(v,[this].concat(I))||this,M.history=Object(u.b)(M.props),M}var T=y.prototype;return T.render=function(){return D.a.createElement(L.c,{history:this.history,children:this.props.children})},y}(D.a.Component),p=function(y,T){return typeof y=="function"?y(T):y},c=function(y,T){return typeof y=="string"?Object(u.c)(y,null,null,T):y},m=function(y){return y},g=D.a.forwardRef;typeof g=="undefined"&&(g=m);function b(v){return!!(v.metaKey||v.altKey||v.ctrlKey||v.shiftKey)}var n=g(function(v,y){var T=v.innerRef,M=v.navigate,N=v.onClick,I=Object(i.a)(v,["innerRef","navigate","onClick"]),G=I.target,H=Object(d.a)({},I,{onClick:function(z){try{N&&N(z)}catch(U){throw z.preventDefault(),U}!z.defaultPrevented&&z.button===0&&(!G||G==="_self")&&!b(z)&&(z.preventDefault(),M())}});return m!==g?H.ref=y||T:H.ref=T,D.a.createElement("a",H)}),o=g(function(v,y){var T=v.component,M=T===void 0?n:T,N=v.replace,I=v.to,G=v.innerRef,H=Object(i.a)(v,["component","replace","to","innerRef"]);return D.a.createElement(L.e.Consumer,null,function(W){W||Object(l.a)(!1);var z=W.history,U=c(p(I,W.location),W.location),B=U?z.createHref(U):"",K=Object(d.a)({},H,{href:B,navigate:function(){var ae=p(I,W.location),se=N?z.replace:z.push;se(ae)}});return m!==g?K.ref=y||G:K.innerRef=G,D.a.createElement(M,K)})});if(!1)var t,S;var x=function(y){return y},s=D.a.forwardRef;typeof s=="undefined"&&(s=x);function P(){for(var v=arguments.length,y=new Array(v),T=0;T<v;T++)y[T]=arguments[T];return y.filter(function(M){return M}).join(" ")}var O=s(function(v,y){var T=v["aria-current"],M=T===void 0?"page":T,N=v.activeClassName,I=N===void 0?"active":N,G=v.activeStyle,H=v.className,W=v.exact,z=v.isActive,U=v.location,B=v.sensitive,K=v.strict,q=v.style,ae=v.to,se=v.innerRef,we=Object(i.a)(v,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return D.a.createElement(L.e.Consumer,null,function(Te){Te||Object(l.a)(!1);var de=U||Te.location,xe=c(p(ae,de),de),pe=xe.pathname,ne=pe&&pe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ie=ne?Object(L.f)(de.pathname,{path:ne,exact:W,sensitive:B,strict:K}):null,ee=!!(z?z(ie,de):ie),le=ee?P(H,I):H,Q=ee?Object(d.a)({},q,{},G):q,Z=Object(d.a)({"aria-current":ee&&M||null,className:le,style:Q,to:xe},we);return x!==s?Z.ref=y||se:Z.innerRef=se,D.a.createElement(o,Z)})});if(!1)var E},"5hvy":function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("MlIO"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.WordArray,h=D.Hasher,w=C.x64,d=w.Word,i=C.algo,l=[],a=[],_=[];(function(){for(var m=1,g=0,b=0;b<24;b++){l[m+5*g]=(b+1)*(b+2)/2%64;var n=g%5,o=(2*m+3*g)%5;m=n,g=o}for(var m=0;m<5;m++)for(var g=0;g<5;g++)a[m+5*g]=g+(2*m+3*g)%5*5;for(var t=1,S=0;S<24;S++){for(var x=0,s=0,P=0;P<7;P++){if(t&1){var O=(1<<P)-1;O<32?s^=1<<O:x^=1<<O-32}t&128?t=t<<1^113:t<<=1}_[S]=d.create(x,s)}})();var p=[];(function(){for(var m=0;m<25;m++)p[m]=d.create()})();var c=i.SHA3=h.extend({cfg:h.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],g=0;g<25;g++)m[g]=new d.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,g){for(var b=this._state,n=this.blockSize/2,o=0;o<n;o++){var t=m[g+2*o],S=m[g+2*o+1];t=(t<<8|t>>>24)&16711935|(t<<24|t>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360;var x=b[o];x.high^=S,x.low^=t}for(var s=0;s<24;s++){for(var P=0;P<5;P++){for(var O=0,E=0,v=0;v<5;v++){var x=b[P+5*v];O^=x.high,E^=x.low}var y=p[P];y.high=O,y.low=E}for(var P=0;P<5;P++)for(var T=p[(P+4)%5],M=p[(P+1)%5],N=M.high,I=M.low,O=T.high^(N<<1|I>>>31),E=T.low^(I<<1|N>>>31),v=0;v<5;v++){var x=b[P+5*v];x.high^=O,x.low^=E}for(var G=1;G<25;G++){var O,E,x=b[G],H=x.high,W=x.low,z=l[G];z<32?(O=H<<z|W>>>32-z,E=W<<z|H>>>32-z):(O=W<<z-32|H>>>64-z,E=H<<z-32|W>>>64-z);var U=p[a[G]];U.high=O,U.low=E}var B=p[0],K=b[0];B.high=K.high,B.low=K.low;for(var P=0;P<5;P++)for(var v=0;v<5;v++){var G=P+5*v,x=b[G],q=p[G],ae=p[(P+1)%5+5*v],se=p[(P+2)%5+5*v];x.high=q.high^~ae.high&se.high,x.low=q.low^~ae.low&se.low}var x=b[0],we=_[s];x.high^=we.high,x.low^=we.low}},_doFinalize:function(){var m=this._data,g=m.words,b=this._nDataBytes*8,n=m.sigBytes*8,o=this.blockSize*32;g[n>>>5]|=1<<24-n%32,g[(f.ceil((n+1)/o)*o>>>5)-1]|=128,m.sigBytes=g.length*4,this._process();for(var t=this._state,S=this.cfg.outputLength/8,x=S/8,s=[],P=0;P<x;P++){var O=t[P],E=O.high,v=O.low;E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,v=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,s.push(v),s.push(E)}return new u.init(s,S)},clone:function(){for(var m=h.clone.call(this),g=m._state=this._state.slice(0),b=0;b<25;b++)g[b]=g[b].clone();return m}});C.SHA3=h._createHelper(c),C.HmacSHA3=h._createHmacHelper(c)}(Math),L.SHA3})},"6+eU":function(j,J,k){"use strict";k.d(J,"a",function(){return s});var L=k("wx14"),f=k("rePB"),C=k("VTBJ"),D=k("1OyB"),u=k("vuIU"),h=k("Ji7U"),w=k("LK+K"),d=k("cDcd"),i=k.n(d),l=k("TSYQ"),a=k.n(l),_=function(O){var E,v="".concat(O.rootPrefixCls,"-item"),y=a()(v,"".concat(v,"-").concat(O.page),(E={},Object(f.a)(E,"".concat(v,"-active"),O.active),Object(f.a)(E,O.className,!!O.className),Object(f.a)(E,"".concat(v,"-disabled"),!O.page),E)),T=function(){O.onClick(O.page)},M=function(I){O.onKeyPress(I,O.onClick,O.page)};return i.a.createElement("li",{title:O.showTitle?O.page:null,className:y,onClick:T,onKeyPress:M,tabIndex:"0"},O.itemRender(O.page,"page",i.a.createElement("a",{rel:"nofollow"},O.page)))},p=_,c={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},m=function(P){Object(h.a)(E,P);var O=Object(w.a)(E);function E(){var v;Object(D.a)(this,E);for(var y=arguments.length,T=new Array(y),M=0;M<y;M++)T[M]=arguments[M];return v=O.call.apply(O,[this].concat(T)),v.state={goInputText:""},v.buildOptionText=function(N){return"".concat(N," ").concat(v.props.locale.items_per_page)},v.changeSize=function(N){v.props.changeSize(Number(N))},v.handleChange=function(N){v.setState({goInputText:N.target.value})},v.handleBlur=function(N){var I=v.props,G=I.goButton,H=I.quickGo,W=I.rootPrefixCls,z=v.state.goInputText;if(G||z==="")return;if(N.relatedTarget&&(N.relatedTarget.className.indexOf("".concat(W,"-prev"))>=0||N.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;v.setState({goInputText:""}),H(v.getValidValue())},v.go=function(N){var I=v.state.goInputText;if(I==="")return;(N.keyCode===c.ENTER||N.type==="click")&&(v.setState({goInputText:""}),v.props.quickGo(v.getValidValue()))},v}return Object(u.a)(E,[{key:"getValidValue",value:function(){var y=this.state,T=y.goInputText,M=y.current;return!T||isNaN(T)?M:Number(T)}},{key:"getPageSizeOptions",value:function(){var y=this.props,T=y.pageSize,M=y.pageSizeOptions;return M.some(function(N){return N.toString()===T.toString()})?M:M.concat([T.toString()]).sort(function(N,I){var G=isNaN(Number(N))?0:Number(N),H=isNaN(Number(I))?0:Number(I);return G-H})}},{key:"render",value:function(){var y=this,T=this.props,M=T.pageSize,N=T.locale,I=T.rootPrefixCls,G=T.changeSize,H=T.quickGo,W=T.goButton,z=T.selectComponentClass,U=T.buildOptionText,B=T.selectPrefixCls,K=T.disabled,q=this.state.goInputText,ae="".concat(I,"-options"),se=z,we=null,Te=null,de=null;if(!G&&!H)return null;var xe=this.getPageSizeOptions();if(G&&se){var pe=xe.map(function(ne,ie){return i.a.createElement(se.Option,{key:ie,value:ne.toString()},(U||y.buildOptionText)(ne))});we=i.a.createElement(se,{disabled:K,prefixCls:B,showSearch:!1,className:"".concat(ae,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(M||xe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ie){return ie.parentNode}},pe)}return H&&(W&&(de=typeof W=="boolean"?i.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:K,className:"".concat(ae,"-quick-jumper-button")},N.jump_to_confirm):i.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),Te=i.a.createElement("div",{className:"".concat(ae,"-quick-jumper")},N.jump_to,i.a.createElement("input",{disabled:K,type:"text",value:q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),N.page,de)),i.a.createElement("li",{className:"".concat(ae)},we,Te)}}]),E}(i.a.Component);m.defaultProps={pageSizeOptions:["10","20","50","100"]};var g=m,b=k("N2Kk");function n(){}function o(P){return typeof P=="number"&&isFinite(P)&&Math.floor(P)===P}function t(P,O,E){return E}function S(P,O,E){var v=typeof P=="undefined"?O.pageSize:P;return Math.floor((E.total-1)/v)+1}var x=function(P){Object(h.a)(E,P);var O=Object(w.a)(E);function E(v){var y;Object(D.a)(this,E),y=O.call(this,v),y.getJumpPrevPage=function(){return Math.max(1,y.state.current-(y.props.showLessItems?3:5))},y.getJumpNextPage=function(){return Math.min(S(void 0,y.state,y.props),y.state.current+(y.props.showLessItems?3:5))},y.getItemIcon=function(G,H){var W=y.props.prefixCls,z=G||i.a.createElement("button",{type:"button","aria-label":H,className:"".concat(W,"-item-link")});return typeof G=="function"&&(z=i.a.createElement(G,Object(C.a)({},y.props))),z},y.savePaginationNode=function(G){y.paginationNode=G},y.isValid=function(G){return o(G)&&G!==y.state.current},y.shouldDisplayQuickJumper=function(){var G=y.props,H=G.showQuickJumper,W=G.pageSize,z=G.total;return z<=W?!1:H},y.handleKeyDown=function(G){(G.keyCode===c.ARROW_UP||G.keyCode===c.ARROW_DOWN)&&G.preventDefault()},y.handleKeyUp=function(G){var H=y.getValidValue(G),W=y.state.currentInputValue;H!==W&&y.setState({currentInputValue:H}),G.keyCode===c.ENTER?y.handleChange(H):G.keyCode===c.ARROW_UP?y.handleChange(H-1):G.keyCode===c.ARROW_DOWN&&y.handleChange(H+1)},y.changePageSize=function(G){var H=y.state.current,W=S(G,y.state,y.props);H=H>W?W:H,W===0&&(H=y.state.current),typeof G=="number"&&("pageSize"in y.props||y.setState({pageSize:G}),"current"in y.props||y.setState({current:H,currentInputValue:H})),y.props.onShowSizeChange(H,G),"onChange"in y.props&&y.props.onChange&&y.props.onChange(H,G)},y.handleChange=function(G){var H=y.props.disabled,W=G;if(y.isValid(W)&&!H){var z=S(void 0,y.state,y.props);W>z?W=z:W<1&&(W=1),"current"in y.props||y.setState({current:W,currentInputValue:W});var U=y.state.pageSize;return y.props.onChange(W,U),W}return y.state.current},y.prev=function(){y.hasPrev()&&y.handleChange(y.state.current-1)},y.next=function(){y.hasNext()&&y.handleChange(y.state.current+1)},y.jumpPrev=function(){y.handleChange(y.getJumpPrevPage())},y.jumpNext=function(){y.handleChange(y.getJumpNextPage())},y.hasPrev=function(){return y.state.current>1},y.hasNext=function(){return y.state.current<S(void 0,y.state,y.props)},y.runIfEnter=function(G,H){if(G.key==="Enter"||G.charCode===13){for(var W=arguments.length,z=new Array(W>2?W-2:0),U=2;U<W;U++)z[U-2]=arguments[U];H.apply(void 0,z)}},y.runIfEnterPrev=function(G){y.runIfEnter(G,y.prev)},y.runIfEnterNext=function(G){y.runIfEnter(G,y.next)},y.runIfEnterJumpPrev=function(G){y.runIfEnter(G,y.jumpPrev)},y.runIfEnterJumpNext=function(G){y.runIfEnter(G,y.jumpNext)},y.handleGoTO=function(G){(G.keyCode===c.ENTER||G.type==="click")&&y.handleChange(y.state.currentInputValue)};var T=v.onChange!==n,M="current"in v;M&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var N=v.defaultCurrent;"current"in v&&(N=v.current);var I=v.defaultPageSize;return"pageSize"in v&&(I=v.pageSize),N=Math.min(N,S(I,void 0,v)),y.state={current:N,currentInputValue:N,pageSize:I},y}return Object(u.a)(E,[{key:"componentDidUpdate",value:function(y,T){var M=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var N=this.paginationNode.querySelector(".".concat(M,"-item-").concat(T.current));N&&document.activeElement===N&&N.blur()}}},{key:"getValidValue",value:function(y){var T=y.target.value,M=S(void 0,this.state,this.props),N=this.state.currentInputValue,I;return T===""?I=T:isNaN(Number(T))?I=N:T>=M?I=M:I=Number(T),I}},{key:"getShowSizeChanger",value:function(){var y=this.props,T=y.showSizeChanger,M=y.total,N=y.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:M>N}},{key:"renderPrev",value:function(y){var T=this.props,M=T.prevIcon,N=T.itemRender,I=N(y,"prev",this.getItemIcon(M,"prev page")),G=!this.hasPrev();return Object(d.isValidElement)(I)?Object(d.cloneElement)(I,{disabled:G}):I}},{key:"renderNext",value:function(y){var T=this.props,M=T.nextIcon,N=T.itemRender,I=N(y,"next",this.getItemIcon(M,"next page")),G=!this.hasNext();return Object(d.isValidElement)(I)?Object(d.cloneElement)(I,{disabled:G}):I}},{key:"render",value:function(){var y=this,T=this.props,M=T.prefixCls,N=T.className,I=T.style,G=T.disabled,H=T.hideOnSinglePage,W=T.total,z=T.locale,U=T.showQuickJumper,B=T.showLessItems,K=T.showTitle,q=T.showTotal,ae=T.simple,se=T.itemRender,we=T.showPrevNextJumpers,Te=T.jumpPrevIcon,de=T.jumpNextIcon,xe=T.selectComponentClass,pe=T.selectPrefixCls,ne=T.pageSizeOptions,ie=this.state,ee=ie.current,le=ie.pageSize,Q=ie.currentInputValue;if(H===!0&&W<=le)return null;var Z=S(void 0,this.state,this.props),be=[],te=null,$=null,X=null,Y=null,ve=null,ue=U&&U.goButton,Ee=B?1:2,Ke=ee-1>0?ee-1:0,Ye=ee+1<Z?ee+1:Z,Je=Object.keys(this.props).reduce(function(fe,ye){return(ye.substr(0,5)==="data-"||ye.substr(0,5)==="aria-"||ye==="role")&&(fe[ye]=y.props[ye]),fe},{});if(ae)return ue&&(typeof ue=="boolean"?ve=i.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):ve=i.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ue),ve=i.a.createElement("li",{title:K?"".concat(z.jump_to).concat(ee,"/").concat(Z):null,className:"".concat(M,"-simple-pager")},ve)),i.a.createElement("ul",Object(L.a)({className:a()(M,"".concat(M,"-simple"),Object(f.a)({},"".concat(M,"-disabled"),G),N),style:I,ref:this.savePaginationNode},Je),i.a.createElement("li",{title:K?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:a()("".concat(M,"-prev"),Object(f.a)({},"".concat(M,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ke)),i.a.createElement("li",{title:K?"".concat(ee,"/").concat(Z):null,className:"".concat(M,"-simple-pager")},i.a.createElement("input",{type:"text",value:Q,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),i.a.createElement("span",{className:"".concat(M,"-slash")},"/"),Z),i.a.createElement("li",{title:K?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:a()("".concat(M,"-next"),Object(f.a)({},"".concat(M,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ye)),ve);if(Z<=3+Ee*2){var tt={locale:z,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:K,itemRender:se};Z||be.push(i.a.createElement(p,Object(L.a)({},tt,{key:"noPager",page:Z,className:"".concat(M,"-disabled")})));for(var at=1;at<=Z;at+=1){var lt=ee===at;be.push(i.a.createElement(p,Object(L.a)({},tt,{key:at,page:at,active:lt})))}}else{var je=B?z.prev_3:z.prev_5,Ce=B?z.next_3:z.next_5;we&&(te=i.a.createElement("li",{title:K?je:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:a()("".concat(M,"-jump-prev"),Object(f.a)({},"".concat(M,"-jump-prev-custom-icon"),!!Te))},se(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Te,"prev page"))),$=i.a.createElement("li",{title:K?Ce:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:a()("".concat(M,"-jump-next"),Object(f.a)({},"".concat(M,"-jump-next-custom-icon"),!!de))},se(this.getJumpNextPage(),"jump-next",this.getItemIcon(de,"next page")))),Y=i.a.createElement(p,{locale:z,last:!0,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Z,page:Z,active:!1,showTitle:K,itemRender:se}),X=i.a.createElement(p,{locale:z,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:K,itemRender:se});var Qe=Math.max(1,ee-Ee),st=Math.min(ee+Ee,Z);ee-1<=Ee&&(st=1+Ee*2),Z-ee<=Ee&&(Qe=Z-Ee*2);for(var Ge=Qe;Ge<=st;Ge+=1){var rt=ee===Ge;be.push(i.a.createElement(p,{locale:z,rootPrefixCls:M,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ge,page:Ge,active:rt,showTitle:K,itemRender:se}))}ee-1>=Ee*2&&ee!==1+2&&(be[0]=Object(d.cloneElement)(be[0],{className:"".concat(M,"-item-after-jump-prev")}),be.unshift(te)),Z-ee>=Ee*2&&ee!==Z-2&&(be[be.length-1]=Object(d.cloneElement)(be[be.length-1],{className:"".concat(M,"-item-before-jump-next")}),be.push($)),Qe!==1&&be.unshift(X),st!==Z&&be.push(Y)}var Re=null;q&&(Re=i.a.createElement("li",{className:"".concat(M,"-total-text")},q(W,[W===0?0:(ee-1)*le+1,ee*le>W?W:ee*le])));var Se=!this.hasPrev()||!Z,De=!this.hasNext()||!Z;return i.a.createElement("ul",Object(L.a)({className:a()(M,N,Object(f.a)({},"".concat(M,"-disabled"),G)),style:I,unselectable:"unselectable",ref:this.savePaginationNode},Je),Re,i.a.createElement("li",{title:K?z.prev_page:null,onClick:this.prev,tabIndex:Se?null:0,onKeyPress:this.runIfEnterPrev,className:a()("".concat(M,"-prev"),Object(f.a)({},"".concat(M,"-disabled"),Se)),"aria-disabled":Se},this.renderPrev(Ke)),be,i.a.createElement("li",{title:K?z.next_page:null,onClick:this.next,tabIndex:De?null:0,onKeyPress:this.runIfEnterNext,className:a()("".concat(M,"-next"),Object(f.a)({},"".concat(M,"-disabled"),De)),"aria-disabled":De},this.renderNext(Ye)),i.a.createElement(g,{disabled:G,locale:z,rootPrefixCls:M,selectComponentClass:xe,selectPrefixCls:pe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ee,pageSize:le,pageSizeOptions:ne,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(y,T){var M={};if("current"in y&&(M.current=y.current,y.current!==T.current&&(M.currentInputValue=M.current)),"pageSize"in y&&y.pageSize!==T.pageSize){var N=T.current,I=S(y.pageSize,T,y);N=N>I?I:N,"current"in y||(M.current=N,M.currentInputValue=N),M.pageSize=y.pageSize}return M}}]),E}(i.a.Component);x.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:b.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var s=x},"6RRn":function(j,J,k){"use strict";var L=k("wCXF"),f=k("n6Qo");k.d(J,"b",function(){return f.a});var C=k("IBYe"),D=k("6eGT"),u=k("hW8S");k.d(J,"a",function(){return u.a}),J.c=L.b},"6eGT":function(j,J,k){"use strict";function L(f){return null}J.a=L},"7Cbv":function(j,J,k){"use strict";var L=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),f=new Uint8Array(16);function C(){if(!L)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(f)}var D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function u(p){return typeof p=="string"&&D.test(p)}for(var h=u,w=[],d=0;d<256;++d)w.push((d+256).toString(16).substr(1));function i(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,m=(w[p[c+0]]+w[p[c+1]]+w[p[c+2]]+w[p[c+3]]+"-"+w[p[c+4]]+w[p[c+5]]+"-"+w[p[c+6]]+w[p[c+7]]+"-"+w[p[c+8]]+w[p[c+9]]+"-"+w[p[c+10]]+w[p[c+11]]+w[p[c+12]]+w[p[c+13]]+w[p[c+14]]+w[p[c+15]]).toLowerCase();if(!h(m))throw TypeError("Stringified UUID is invalid");return m}var l=i;function a(p,c,m){p=p||{};var g=p.random||(p.rng||C)();if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,c){m=m||0;for(var b=0;b<16;++b)c[m+b]=g[b];return c}return l(g)}var _=J.a=a},"7ahc":function(j,J,k){"use strict";k.d(J,"a",function(){return S});var L=k("k1fw"),f=k("0Owb"),C=k("+L6B"),D=k("2/Rp"),u=k("y8nQ"),h=k("Vl3Y"),w=k("tJVT"),d=k("OaEy"),i=k("2fM7"),l=k("cDcd"),a=k.n(l),_=k("VrN/"),p=k.n(_),c=k("p77/"),m=k.n(c),g=k("c5Ni"),b=k.n(g),n=i.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},t={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};J.b=function(x){var s=x.callback,P=x.onCancel,O=Object(l.useState)("python"),E=Object(w.a)(O,2),v=E[0],y=E[1];function T(N){y(t[N][1])}function M(N){s(N)}return a.a.createElement(h.a,Object(f.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:M}),a.a.createElement(h.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},a.a.createElement(i.a,{onChange:T},Object.keys(t).map(function(N){return a.a.createElement(n,{key:N,value:N},t[N][0])}))),a.a.createElement(h.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},a.a.createElement(S,{mode:v})),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(D.a,{type:"ghost",onClick:P},"\u53D6\u6D88")))};function S(x){var s=x.value,P=x.onChange,O=x.mode,E=x.options,v=E===void 0?{}:E,y=Object(l.useRef)(),T=Object(l.useState)(),M=Object(w.a)(T,2),N=M[0],I=M[1];return Object(l.useEffect)(function(){if(N){function G(H){var W=H.getValue();P&&P(W)}return N.on("change",G),function(){N.off("change",G)}}},[N,P]),Object(l.useEffect)(function(){N&&N.setOption("mode",O)},[N,O]),Object(l.useEffect)(function(){N&&((s!==N.getValue()||s==="")&&setTimeout(function(){N.setValue(s||" ")},300))},[N,s]),Object(l.useEffect)(function(){if(y.current&&!N){var G=p.a.fromTextArea(y.current,Object(L.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},v));I(G)}},[y.current,N]),a.a.createElement("div",{className:"my-codemirror-container"},a.a.createElement("textarea",{ref:y}))}},"815F":function(j,J,k){"use strict";k.d(J,"e",function(){return w}),k.d(J,"c",function(){return i}),k.d(J,"d",function(){return l}),k.d(J,"a",function(){return _}),k.d(J,"f",function(){return p}),k.d(J,"b",function(){return c});var L=k("KQm4"),f=k("VTBJ"),C=k("Ff2n"),D=k("Zm9Q"),u=k("Kwbf"),h=k("OZM5");function w(m,g){return m!=null?m:g}function d(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=new Map;function b(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(t){var S=t.key,x=t.children;Object(u.a)(S!=null,"Tree node must have a certain key: [".concat(o).concat(S,"]"));var s=String(S);Object(u.a)(!g.has(s)||S===null||S===void 0,"Same 'key' exist in the Tree: ".concat(s)),g.set(s,!0),b(x,"".concat(o).concat(s," > "))})}b(m)}function i(m){function g(b){var n=Object(D.a)(b);return n.map(function(o){if(!Object(h.i)(o))return Object(u.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var t=o.key,S=o.props,x=S.children,s=Object(C.a)(S,["children"]),P=Object(f.a)({key:t},s),O=g(x);return O.length&&(P.children=O),P}).filter(function(o){return o})}return g(m)}function l(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=new Set(g===!0?[]:g),n=[];function o(t){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(x,s){var P=Object(h.h)(S?S.pos:"0",s),O=w(x.key,P),E=Object(f.a)(Object(f.a)({},x),{},{parent:S,pos:P,children:null,data:x,isStart:[].concat(Object(L.a)(S?S.isStart:[]),[s===0]),isEnd:[].concat(Object(L.a)(S?S.isEnd:[]),[s===t.length-1])});return n.push(E),g===!0||b.has(O)?E.children=o(x.children||[],E):E.children=[],E})}return o(m),n}function a(m,g,b){var n;b?typeof b=="string"?n=function(S){return S[b]}:typeof b=="function"&&(n=function(S){return b(S)}):n=function(S,x){return w(S.key,x)};function o(t,S,x){var s=t?t.children:m,P=t?Object(h.h)(x.pos,S):"0";if(t){var O=n(t,P),E={node:t,index:S,pos:P,key:O,parentPos:x.node?x.pos:null,level:x.level+1};g(E)}s&&s.forEach(function(v,y){o(v,y,{node:t,pos:P,level:x?x.level+1:-1})})}o(null)}function _(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=g.initWrapper,n=g.processEntity,o=g.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,S={},x={},s={posEntities:S,keyEntities:x};return b&&(s=b(s)||s),a(m,function(P){var O=P.node,E=P.index,v=P.pos,y=P.key,T=P.parentPos,M=P.level,N={node:O,index:E,key:y,pos:v,level:M},I=w(y,v);S[v]=N,x[I]=N,N.parent=S[T],N.parent&&(N.parent.children=N.parent.children||[],N.parent.children.push(N)),n&&n(N,s)},t),o&&o(s),s}function p(m,g){var b=g.expandedKeys,n=g.selectedKeys,o=g.loadedKeys,t=g.loadingKeys,S=g.checkedKeys,x=g.halfCheckedKeys,s=g.dragOverNodeKey,P=g.dropPosition,O=g.keyEntities,E=O[m],v={eventKey:m,expanded:b.indexOf(m)!==-1,selected:n.indexOf(m)!==-1,loaded:o.indexOf(m)!==-1,loading:t.indexOf(m)!==-1,checked:S.indexOf(m)!==-1,halfChecked:x.indexOf(m)!==-1,pos:String(E?E.pos:""),dragOver:s===m&&P===0,dragOverGapTop:s===m&&P===-1,dragOverGapBottom:s===m&&P===1};return v}function c(m){var g=m.data,b=m.expanded,n=m.selected,o=m.checked,t=m.loaded,S=m.loading,x=m.halfChecked,s=m.dragOver,P=m.dragOverGapTop,O=m.dragOverGapBottom,E=m.pos,v=m.active,y=Object(f.a)(Object(f.a)({},g),{},{expanded:b,selected:n,checked:o,loaded:t,loading:S,halfChecked:x,dragOver:s,dragOverGapTop:P,dragOverGapBottom:O,pos:E,active:v});return"props"in y||Object.defineProperty(y,"props",{get:function(){return Object(u.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),m}}),y}},"8EBN":function(j,J,k){(function(L){L(k("VrN/"))})(function(L){"use strict";L.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 f=0;f<L.modeInfo.length;f++){var C=L.modeInfo[f];C.mimes&&(C.mime=C.mimes[0])}L.findModeByMIME=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var h=L.modeInfo[u];if(h.mime==D)return h;if(h.mimes){for(var w=0;w<h.mimes.length;w++)if(h.mimes[w]==D)return h}}if(/\+xml$/.test(D))return L.findModeByMIME("application/xml");if(/\+json$/.test(D))return L.findModeByMIME("application/json")},L.findModeByExtension=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var h=L.modeInfo[u];if(h.ext){for(var w=0;w<h.ext.length;w++)if(h.ext[w]==D)return h}}},L.findModeByFileName=function(D){for(var u=0;u<L.modeInfo.length;u++){var h=L.modeInfo[u];if(h.file&&h.file.test(D))return h}var w=D.lastIndexOf("."),d=w>-1&&D.substring(w+1,D.length);if(d)return L.findModeByExtension(d)},L.findModeByName=function(D){D=D.toLowerCase();for(var u=0;u<L.modeInfo.length;u++){var h=L.modeInfo[u];if(h.name.toLowerCase()==D)return h;if(h.alias){for(var w=0;w<h.alias.length;w++)if(h.alias[w].toLowerCase()==D)return h}}}})},"9Bee":function(j,J,k){"use strict";var L=k("k1fw"),f=k("tJVT"),C=k("cDcd"),D=k.n(C),u=k("vg9a"),h=k("DlQD"),w=k.n(h),d=k("rUJ1");function i(K,q){var ae=K.match(/^(\s+)(?:```)/);if(ae===null)return q;var se=ae[1];return q.split(`
`).map(function(we){var Te=we.match(/^\s+/);if(Te===null)return we;var de=Object(f.a)(Te,1),xe=de[0];return xe.length>=se.length?we.slice(se.length):we}).join(`
`)}var l=[],a=["<ul>"],_=new w.a.Renderer,p=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function c(){l.length=0,a=["<ul>"]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(K,q,ae,se){if(q>=K.length||K[q].level<=ae)return q;var we=K[q];se.push("<li><a href='#"+we.anchor+"'>"+we.text+"</a>"),q++;var Te=[];return q=g(K,q,we.level,Te),Te.length>0&&(se.push("<ul>"),Te.forEach(function(de){se.push(de)}),se.push("</ul>")),se.push("</li>"),q=g(K,q,ae,se),q}function b(){return g(l,0,0,a),a.push("</ul>"),a.join("")}var n={heading:function(q){var ae=p.exec(q);if(ae)return{type:"heading",raw:ae[0],depth:ae[1].length,text:ae[2]}},fences:function(q){var ae=this.rules.block.fences.exec(q);if(ae){var se=ae[0],we=i(se,ae[3]||""),Te=ae[2]?ae[2].trim():ae[2];if(["latex","katex","math"].indexOf(Te)>=0){var de=S(),xe=we;we=de,x[de]={type:"block",expression:xe}}return{type:"code",raw:se,lang:Te,text:we}}}},o=/(?:\${2})([^\n`]+?)(?:\${2})/gi,t=0,S=function(){return"__special_katext_id_".concat(t++,"__")},x={};function s(){return x}function P(){t=0,x={}}function O(K){return K=K.replace(o,function(q,ae){var se=S();return x[se]={type:"inline",expression:ae},se}),K}var E=_.listitem;_.listitem=function(K){return E(O(K))};var v=_.paragraph;_.paragraph=function(K){return v(O(K))};var y=_.tablecell;_.tablecell=function(K,q){return y(O(K),q)},_.code=function(K,q,ae){var se=(q||"").match(/\S*/)[0];return se?["latex","katex","math"].indexOf(se)>=0?"<p class='editormd-tex'>".concat(K,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(q,'">').concat(ae?K:Object(d.escape)(K,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(ae?K:Object(d.escape)(K,!0))+"</code></pre>"},_.heading=function(K,q,ae){var se=this.options.headerPrefix+ae.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:se,level:q,text:K}),"<h"+q+' id="'+se+'">'+K+"</h"+q+">"},w.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),w.a.use({tokenizer:n,renderer:_});var T=w.a,M=k("SJMd"),N=k("ulZh"),I=k.n(N),G=k("m3rI"),H=k("Oy/b"),W=k("p5ED"),z=/<pre[^>]*>/g;function U(K){var q=document.createElement("div");return q.innerHTML=K,q.childNodes.length===0?"":q.childNodes[0].nodeValue}var B=J.a=function(K){var q=K.value,ae=q===void 0?"":q,se=K.className,we=K.showTextOnly,Te=K.showLines,de=K.style,xe=de===void 0?{}:de,pe=K.stylesPrev,ne=pe===void 0?{}:pe,ie=String(ae),ee=Object(C.useState)(""),le=Object(f.a)(ee,2),Q=le[0],Z=le[1],be=Object(C.useMemo)(function(){try{var Y=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ve=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ue=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ie=ie.replace(Y,"("+G.a.API_SERVER+"/api/attachments/").replace(ve,'"'+G.a.API_SERVER+"/api/attachments/").replace(ue,'"'+G.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,`
`),ie=ie.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Je){}var Ee=T(ie),Ke=s();if(ie.match(/\[TOC\]/)&&(Ee=Ee.replace("<p>[TOC]</p>",b()),c()),Ee=Ee.replace(/(__special_katext_id_\d+__)/g,function(Je,tt){var at=Ke[tt],lt=at.type,je=at.expression;return Object(H.renderToString)(U(je)||"",{displayMode:lt==="block",throwOnError:!1,output:"html"})}),Ee=Ee.replace(/▁/g,"\u2581\u2581\u2581"),P(),we){var Ye=document.createElement("div");return Ye.innerHTML=Ee,Ye.innerText}return setTimeout(function(){return X()},500),Ee},[ie]),te=Object(C.useRef)();m.WebkitLineClamp=Te,Te&&(xe=Object(L.a)(Object(L.a)({},xe),m));function $(Y){var ve=Y.target;if(ve.tagName.toUpperCase()==="A"){var ue=ve.getAttribute("href");if(ue.indexOf("office")>-1)Y.preventDefault(),Z(ue);else if(ue.startsWith("#")){Y.preventDefault();var Ee=document.getElementById(ue.replace("#",""));Ee&&Ee.scrollIntoView(!0)}}}var X=function(){var ve,ue=(ve=te.current)===null||ve===void 0?void 0:ve.querySelectorAll("video");ue==null||ue.forEach(function(Ee){if(Ee.oncontextmenu=function(){return!1},Ee.src.indexOf(".m3u8")>-1&&!Ee.canPlayType("application/vnd.apple.mpegurl")){if(I.a.isSupported()){var Ke=new I.a;Ke.loadSource(Ee.src),Ke.attachMedia(Ee)}}})};return Object(C.useEffect)(function(){if(te.current&&be&&(be.match(z)&&window.PR.prettyPrint()),te.current)return te.current.addEventListener("click",$),function(){te.current.removeEventListener("click",$),P(),c()}},[be,te.current,$]),D.a.createElement(D.a.Fragment,null,D.a.createElement("div",{ref:te,style:Object(L.a)({},xe),className:"".concat(se||""," markdown-body "),dangerouslySetInnerHTML:{__html:be}}),D.a.createElement(W.a,{close:!0,data:Q,type:Q!=null&&Q.length?"office":"",style:Object(L.a)({},ne),onClose:function(){return Z("")}}))}},"9OqN":function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.CTR=function(){var f=L.lib.BlockCipherMode.extend(),C=f.Encryptor=f.extend({processBlock:function(D,u){var h=this._cipher,w=h.blockSize,d=this._iv,i=this._counter;d&&(i=this._counter=d.slice(0),this._iv=void 0);var l=i.slice(0);h.encryptBlock(l,0),i[w-1]=i[w-1]+1|0;for(var a=0;a<w;a++)D[u+a]^=l[a]}});return f.Decryptor=C,f}(),L.mode.CTR})},"9VGf":function(j,J,k){"use strict";k.d(J,"a",function(){return C});var L=k("cDcd"),f=k.n(L);function C(D,u){var h=Object(L.useRef)();Object(L.useEffect)(function(){h.current=D}),Object(L.useEffect)(function(){function w(){h.current()}if(u!==null){var d=setInterval(w,u);return function(){return clearInterval(d)}}},[u])}},ALsQ:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.CFB=function(){var f=L.lib.BlockCipherMode.extend();f.Encryptor=f.extend({processBlock:function(D,u){var h=this._cipher,w=h.blockSize;C.call(this,D,u,w,h),this._prevBlock=D.slice(u,u+w)}}),f.Decryptor=f.extend({processBlock:function(D,u){var h=this._cipher,w=h.blockSize,d=D.slice(u,u+w);C.call(this,D,u,w,h),this._prevBlock=d}});function C(D,u,h,w){var d,i=this._iv;i?(d=i.slice(0),this._iv=void 0):d=this._prevBlock,w.encryptBlock(d,0);for(var l=0;l<h;l++)D[u+l]^=d[l]}return f}(),L.mode.CFB})},BJfS:function(j,J){var k=function(L){return L.replace(/[A-Z]/g,function(f){return"-"+f.toLowerCase()}).toLowerCase()};j.exports=k},BU3w:function(j,J,k){"use strict";k.d(J,"a",function(){return h});var L=k("MNnm"),f="rc-util-key";function C(w){if(w.attachTo)return w.attachTo;var d=document.querySelector("head");return d||document.body}function D(w){var d,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var l=document.createElement("style");if((d=i.csp)===null||d===void 0?void 0:d.nonce){var a;l.nonce=(a=i.csp)===null||a===void 0?void 0:a.nonce}l.innerHTML=w;var _=C(i),p=_.firstChild;return i.prepend&&_.prepend?_.prepend(l):i.prepend&&p?_.insertBefore(l,p):_.appendChild(l),l}var u=new Map;function h(w,d){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=C(i);if(!u.has(l)){var a=D("",i),_=a.parentNode;u.set(l,_),_.removeChild(a)}var p=Array.from(u.get(l).children).find(function(n){return n.tagName==="STYLE"&&n[f]===d});if(p){var c,m;if(((c=i.csp)===null||c===void 0?void 0:c.nonce)&&p.nonce!==((m=i.csp)===null||m===void 0?void 0:m.nonce)){var g;p.nonce=(g=i.csp)===null||g===void 0?void 0:g.nonce}return p.innerHTML!==w&&(p.innerHTML=w),p}var b=D(w,i);return b[f]=d,b}},Bd2K:function(j,J,k){(function(L){L(k("VrN/"),k("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(i,l,a){if(a!=L.Init&&a&&i.removeKeyMap("autoCloseTags"),!l)return;var _={name:"autoCloseTags"};(typeof l!="object"||l.whenClosing!==!1)&&(_["'/'"]=function(p){return h(p)}),(typeof l!="object"||l.whenOpening!==!1)&&(_["'>'"]=function(p){return D(p)}),i.addKeyMap(_)});var f=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function D(i){if(i.getOption("disableInput"))return L.Pass;for(var l=i.listSelections(),a=[],_=i.getOption("autoCloseTags"),p=0;p<l.length;p++){if(!l[p].empty())return L.Pass;var c=l[p].head,m=i.getTokenAt(c),g=L.innerMode(i.getMode(),m.state),b=g.state,n=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(b),o=n&&n.name;if(!o)return L.Pass;var t=g.mode.configuration=="html",S=typeof _=="object"&&_.dontCloseTags||t&&f,x=typeof _=="object"&&_.indentTags||t&&C;m.end>c.ch&&(o=o.slice(0,o.length-m.end+c.ch));var s=o.toLowerCase();if(!o||m.type=="string"&&(m.end!=c.ch||!/[\"\']/.test(m.string.charAt(m.string.length-1))||m.string.length==1)||m.type=="tag"&&n.close||m.string.indexOf("/")==c.ch-m.start-1||S&&w(S,s)>-1||d(i,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(b)||[],o,c,!0))return L.Pass;var P=typeof _=="object"&&_.emptyTags;if(P&&w(P,o)>-1){a[p]={text:"/>",newPos:L.Pos(c.line,c.ch+2)};continue}var O=x&&w(x,s)>-1;a[p]={indent:O,text:">"+(O?`
`:"")+"</"+o+">",newPos:O?L.Pos(c.line+1,0):L.Pos(c.line,c.ch+1)}}for(var E=typeof _=="object"&&_.dontIndentOnAutoClose,p=l.length-1;p>=0;p--){var v=a[p];i.replaceRange(v.text,l[p].head,l[p].anchor,"+insert");var y=i.listSelections().slice(0);y[p]={head:v.newPos,anchor:v.newPos},i.setSelections(y),!E&&v.indent&&(i.indentLine(v.newPos.line,null,!0),i.indentLine(v.newPos.line+1,null,!0))}}function u(i,l){for(var a=i.listSelections(),_=[],p=l?"/":"</",c=i.getOption("autoCloseTags"),m=typeof c=="object"&&c.dontIndentOnSlash,g=0;g<a.length;g++){if(!a[g].empty())return L.Pass;var b=a[g].head,n=i.getTokenAt(b),o=L.innerMode(i.getMode(),n.state),t=o.state;if(l&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=b.ch-1))return L.Pass;var S,x=o.mode.name!="xml"&&i.getMode().name=="htmlmixed";if(x&&o.mode.name=="javascript")S=p+"script";else if(x&&o.mode.name=="css")S=p+"style";else{var s=o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(t);if(!s||s.length&&d(i,s,s[s.length-1],b))return L.Pass;S=p+s[s.length-1]}i.getLine(b.line).charAt(n.end)!=">"&&(S+=">"),_[g]=S}if(i.replaceSelections(_),a=i.listSelections(),!m)for(var g=0;g<a.length;g++)(g==a.length-1||a[g].head.line<a[g+1].head.line)&&i.indentLine(a[g].head.line)}function h(i){return i.getOption("disableInput")?L.Pass:u(i,!0)}L.commands.closeTag=function(i){return u(i)};function w(i,l){if(i.indexOf)return i.indexOf(l);for(var a=0,_=i.length;a<_;++a)if(i[a]==l)return a;return-1}function d(i,l,a,_,p){if(!L.scanForClosingTag)return!1;var c=Math.min(i.lastLine()+1,_.line+500),m=L.scanForClosingTag(i,_,null,c);if(!m||m.tag!=a)return!1;for(var g=p?1:0,b=l.length-1;b>=0&&l[b]==a;b--)++g;_=m.to;for(var b=1;b<g;b++){var n=L.scanForClosingTag(i,_,null,c);if(!n||n.tag!=a)return!1;_=n.to}return!0}})},BjJ7:function(j,J,k){"use strict";k.d(J,"d",function(){return f}),k.d(J,"c",function(){return C}),k.d(J,"e",function(){return D}),k.d(J,"b",function(){return u}),k.d(J,"a",function(){return w});var L=k("m3rI");function f(d){var i=!0;if(d.length>0){for(var l=0;l<d.length;l++)if(d[l].compile_success==0||!d[l].compile_success){i=!1;break}}else i=!1;return i}function C(d){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=[],a=0;a<d.length;a++){var _=d[a],p=i?"".concat(i,"/").concat(_.name):"".concat(_.name);l.push({title:_.name,isLeaf:!(_.type==="tree"),key:p})}return l}function D(d,i,l){for(var a=0;a<d.length;a++){var _=d[a];if(_.key===i){_.children=l;break}_.children&&D(_.children,i,l)}return d}function u(d,i,l){var a;return function(){var _=this,p=arguments,c=function(){a=null,l||d.apply(_,p)},m=l&&!a;clearTimeout(a),a=setTimeout(c,i),m&&d.apply(_,p)}}var h=!0,w=L.a.API_SERVER},"C+DQ":function(j,J,k){},Dgm7:function(j,J,k){j.exports=k.p+"static/auth.ea067b42.png"},DlQD:function(j,J,k){(function(L,f){j.exports=f()})(this,function(){"use strict";function L(Re,Se){for(var De=0;De<Se.length;De++){var fe=Se[De];fe.enumerable=fe.enumerable||!1,fe.configurable=!0,"value"in fe&&(fe.writable=!0),Object.defineProperty(Re,fe.key,fe)}}function f(Re,Se,De){return Se&&L(Re.prototype,Se),De&&L(Re,De),Re}function C(Re,Se){if(!Re)return;if(typeof Re=="string")return D(Re,Se);var De=Object.prototype.toString.call(Re).slice(8,-1);if(De==="Object"&&Re.constructor&&(De=Re.constructor.name),De==="Map"||De==="Set")return Array.from(Re);if(De==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(De))return D(Re,Se)}function D(Re,Se){(Se==null||Se>Re.length)&&(Se=Re.length);for(var De=0,fe=new Array(Se);De<Se;De++)fe[De]=Re[De];return fe}function u(Re,Se){var De;if(typeof Symbol=="undefined"||Re[Symbol.iterator]==null){if(Array.isArray(Re)||(De=C(Re))||Se&&Re&&typeof Re.length=="number"){De&&(Re=De);var fe=0;return function(){return fe>=Re.length?{done:!0}:{done:!1,value:Re[fe++]}}}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 De=Re[Symbol.iterator](),De.next.bind(De)}function h(Re,Se){return Se={exports:{}},Re(Se,Se.exports),Se.exports}var w=h(function(Re){function Se(){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 De(fe){Re.exports.defaults=fe}Re.exports={defaults:Se(),getDefaults:Se,changeDefaults:De}}),d=w.defaults,i=w.getDefaults,l=w.changeDefaults,a=/[&<>"']/,_=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},g=function(Se){return m[Se]};function b(Re,Se){if(Se){if(a.test(Re))return Re.replace(_,g)}else if(p.test(Re))return Re.replace(c,g);return Re}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(Re){return Re.replace(n,function(Se,De){return De=De.toLowerCase(),De==="colon"?":":De.charAt(0)==="#"?De.charAt(1)==="x"?String.fromCharCode(parseInt(De.substring(2),16)):String.fromCharCode(+De.substring(1)):""})}var t=/(^|[^\[])\^/g;function S(Re,Se){Re=Re.source||Re,Se=Se||"";var De={replace:function(ye,_e){return _e=_e.source||_e,_e=_e.replace(t,"$1"),Re=Re.replace(ye,_e),De},getRegex:function(){return new RegExp(Re,Se)}};return De}var x=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(Re,Se,De){if(Re){var fe;try{fe=decodeURIComponent(o(De)).replace(x,"").toLowerCase()}catch(ye){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}Se&&!s.test(De)&&(De=T(Se,De));try{De=encodeURI(De).replace(/%25/g,"%")}catch(ye){return null}return De}var O={},E=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(Re,Se){O[" "+Re]||(E.test(Re)?O[" "+Re]=Re+"/":O[" "+Re]=G(Re,"/",!0)),Re=O[" "+Re];var De=Re.indexOf(":")===-1;return Se.substring(0,2)==="//"?De?Se:Re.replace(v,"$1")+Se:Se.charAt(0)==="/"?De?Se:Re.replace(y,"$1")+Se:Re+Se}var M={exec:function(){}};function N(Re){for(var Se=1,De,fe;Se<arguments.length;Se++){De=arguments[Se];for(fe in De)Object.prototype.hasOwnProperty.call(De,fe)&&(Re[fe]=De[fe])}return Re}function I(Re,Se){var De=Re.replace(/\|/g,function(_e,Ae,We){for(var Xe=!1,ft=Ae;--ft>=0&&We[ft]==="\\";)Xe=!Xe;return Xe?"|":" |"}),fe=De.split(/ \|/),ye=0;if(fe.length>Se)fe.splice(Se);else for(;fe.length<Se;)fe.push("");for(;ye<fe.length;ye++)fe[ye]=fe[ye].trim().replace(/\\\|/g,"|");return fe}function G(Re,Se,De){var fe=Re.length;if(fe===0)return"";for(var ye=0;ye<fe;){var _e=Re.charAt(fe-ye-1);if(_e===Se&&!De)ye++;else if(_e!==Se&&De)ye++;else break}return Re.substr(0,fe-ye)}function H(Re,Se){if(Re.indexOf(Se[1])===-1)return-1;for(var De=Re.length,fe=0,ye=0;ye<De;ye++)if(Re[ye]==="\\")ye++;else if(Re[ye]===Se[0])fe++;else if(Re[ye]===Se[1]&&(fe--,fe<0))return ye;return-1}function W(Re){Re&&Re.sanitize&&!Re.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 z={escape:b,unescape:o,edit:S,cleanUrl:P,resolveUrl:T,noopTest:M,merge:N,splitCells:I,rtrim:G,findClosingBracket:H,checkSanitizeDeprecation:W},U=w.defaults,B=z.rtrim,K=z.splitCells,q=z.escape,ae=z.findClosingBracket;function se(Re,Se,De){var fe=Se.href,ye=Se.title?q(Se.title):null,_e=Re[1].replace(/\\([\[\]])/g,"$1");return Re[0].charAt(0)!=="!"?{type:"link",raw:De,href:fe,title:ye,text:_e}:{type:"image",raw:De,href:fe,title:ye,text:q(_e)}}function we(Re,Se){var De=Re.match(/^(\s+)(?:```)/);if(De===null)return Se;var fe=De[1];return Se.split(`
`).map(function(ye){var _e=ye.match(/^\s+/);if(_e===null)return ye;var Ae=_e[0];return Ae.length>=fe.length?ye.slice(fe.length):ye}).join(`
`)}var Te=function(){function Re(De){this.options=De||U}var Se=Re.prototype;return Se.space=function(fe){var ye=this.rules.block.newline.exec(fe);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:`
`}},Se.code=function(fe,ye){var _e=this.rules.block.code.exec(fe);if(_e){var Ae=ye[ye.length-1];if(Ae&&Ae.type==="paragraph")return{raw:_e[0],text:_e[0].trimRight()};var We=_e[0].replace(/^ {4}/gm,"");return{type:"code",raw:_e[0],codeBlockStyle:"indented",text:this.options.pedantic?We:B(We,`
`)}}},Se.fences=function(fe){var ye=this.rules.block.fences.exec(fe);if(ye){var _e=ye[0],Ae=we(_e,ye[3]||"");return{type:"code",raw:_e,lang:ye[2]?ye[2].trim():ye[2],text:Ae}}},Se.heading=function(fe){var ye=this.rules.block.heading.exec(fe);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},Se.nptable=function(fe){var ye=this.rules.block.nptable.exec(fe);if(ye){var _e={type:"table",header:K(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[],raw:ye[0]};if(_e.header.length===_e.align.length){var Ae=_e.align.length,We;for(We=0;We<Ae;We++)/^ *-+: *$/.test(_e.align[We])?_e.align[We]="right":/^ *:-+: *$/.test(_e.align[We])?_e.align[We]="center":/^ *:-+ *$/.test(_e.align[We])?_e.align[We]="left":_e.align[We]=null;for(Ae=_e.cells.length,We=0;We<Ae;We++)_e.cells[We]=K(_e.cells[We],_e.header.length);return _e}}},Se.hr=function(fe){var ye=this.rules.block.hr.exec(fe);if(ye)return{type:"hr",raw:ye[0]}},Se.blockquote=function(fe){var ye=this.rules.block.blockquote.exec(fe);if(ye){var _e=ye[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ye[0],text:_e}}},Se.list=function(fe){var ye=this.rules.block.list.exec(fe);if(ye){for(var _e=ye[0],Ae=ye[2],We=Ae.length>1,Xe=Ae[Ae.length-1]===")",ft={type:"list",raw:_e,ordered:We,start:We?+Ae.slice(0,-1):"",loose:!1,items:[]},vt=ye[0].match(this.rules.block.item),Kt=!1,kt,Or,pr,Et,Yr,kr,Ur,dn=vt.length,br=0;br<dn;br++)kt=vt[br],_e=kt,Or=kt.length,kt=kt.replace(/^ *([*+-]|\d+[.)]) */,""),~kt.indexOf(`
`)&&(Or-=kt.length,kt=this.options.pedantic?kt.replace(/^ {1,4}/gm,""):kt.replace(new RegExp("^ {1,"+Or+"}","gm"),"")),br!==dn-1&&(pr=this.rules.block.bullet.exec(vt[br+1])[0],(We?pr.length===1||!Xe&&pr[pr.length-1]===")":pr.length>1||this.options.smartLists&&pr!==Ae)&&(Et=vt.slice(br+1).join(`
`),ft.raw=ft.raw.substring(0,ft.raw.length-Et.length),br=dn-1)),Yr=Kt||/\n\n(?!\s*$)/.test(kt),br!==dn-1&&(Kt=kt.charAt(kt.length-1)===`
`,Yr||(Yr=Kt)),Yr&&(ft.loose=!0),kr=/^\[[ xX]\] /.test(kt),Ur=void 0,kr&&(Ur=kt[1]!==" ",kt=kt.replace(/^\[[ xX]\] +/,"")),ft.items.push({type:"list_item",raw:_e,task:kr,checked:Ur,loose:Yr,text:kt});return ft}},Se.html=function(fe){var ye=this.rules.block.html.exec(fe);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):q(ye[0]):ye[0]}},Se.def=function(fe){var ye=this.rules.block.def.exec(fe);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var _e=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:_e,raw:ye[0],href:ye[2],title:ye[3]}}},Se.table=function(fe){var ye=this.rules.block.table.exec(fe);if(ye){var _e={type:"table",header:K(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[]};if(_e.header.length===_e.align.length){_e.raw=ye[0];var Ae=_e.align.length,We;for(We=0;We<Ae;We++)/^ *-+: *$/.test(_e.align[We])?_e.align[We]="right":/^ *:-+: *$/.test(_e.align[We])?_e.align[We]="center":/^ *:-+ *$/.test(_e.align[We])?_e.align[We]="left":_e.align[We]=null;for(Ae=_e.cells.length,We=0;We<Ae;We++)_e.cells[We]=K(_e.cells[We].replace(/^ *\| *| *\| *$/g,""),_e.header.length);return _e}}},Se.lheading=function(fe){var ye=this.rules.block.lheading.exec(fe);if(ye)return{type:"heading",raw:ye[0],depth:ye[2].charAt(0)==="="?1:2,text:ye[1]}},Se.paragraph=function(fe){var ye=this.rules.block.paragraph.exec(fe);if(ye)return{type:"paragraph",raw:ye[0],text:ye[1].charAt(ye[1].length-1)===`
`?ye[1].slice(0,-1):ye[1]}},Se.text=function(fe,ye){var _e=this.rules.block.text.exec(fe);if(_e){var Ae=ye[ye.length-1];return Ae&&Ae.type==="text"?{raw:_e[0],text:_e[0]}:{type:"text",raw:_e[0],text:_e[0]}}},Se.escape=function(fe){var ye=this.rules.inline.escape.exec(fe);if(ye)return{type:"escape",raw:ye[0],text:q(ye[1])}},Se.tag=function(fe,ye,_e){var Ae=this.rules.inline.tag.exec(fe);if(Ae)return!ye&&/^<a /i.test(Ae[0])?ye=!0:ye&&/^<\/a>/i.test(Ae[0])&&(ye=!1),!_e&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ae[0])?_e=!0:_e&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ae[0])&&(_e=!1),{type:this.options.sanitize?"text":"html",raw:Ae[0],inLink:ye,inRawBlock:_e,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):q(Ae[0]):Ae[0]}},Se.link=function(fe){var ye=this.rules.inline.link.exec(fe);if(ye){var _e=ae(ye[2],"()");if(_e>-1){var Ae=ye[0].indexOf("!")===0?5:4,We=Ae+ye[1].length+_e;ye[2]=ye[2].substring(0,_e),ye[0]=ye[0].substring(0,We).trim(),ye[3]=""}var Xe=ye[2],ft="";if(this.options.pedantic){var vt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Xe);vt?(Xe=vt[1],ft=vt[3]):ft=""}else ft=ye[3]?ye[3].slice(1,-1):"";Xe=Xe.trim().replace(/^<([\s\S]*)>$/,"$1");var Kt=se(ye,{href:Xe&&Xe.replace(this.rules.inline._escapes,"$1"),title:ft&&ft.replace(this.rules.inline._escapes,"$1")},ye[0]);return Kt}},Se.reflink=function(fe,ye){var _e;if((_e=this.rules.inline.reflink.exec(fe))||(_e=this.rules.inline.nolink.exec(fe))){var Ae=(_e[2]||_e[1]).replace(/\s+/g," ");if(Ae=ye[Ae.toLowerCase()],!Ae||!Ae.href){var We=_e[0].charAt(0);return{type:"text",raw:We,text:We}}var Xe=se(_e,Ae,_e[0]);return Xe}},Se.strong=function(fe,ye,_e){_e===void 0&&(_e="");var Ae=this.rules.inline.strong.start.exec(fe);if(Ae&&(!Ae[1]||Ae[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ye=ye.slice(-1*fe.length);var We=Ae[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;We.lastIndex=0;for(var Xe;(Ae=We.exec(ye))!=null;)if(Xe=this.rules.inline.strong.middle.exec(ye.slice(0,Ae.index+3)),Xe)return{type:"strong",raw:fe.slice(0,Xe[0].length),text:fe.slice(2,Xe[0].length-2)}}},Se.em=function(fe,ye,_e){_e===void 0&&(_e="");var Ae=this.rules.inline.em.start.exec(fe);if(Ae&&(!Ae[1]||Ae[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ye=ye.slice(-1*fe.length);var We=Ae[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;We.lastIndex=0;for(var Xe;(Ae=We.exec(ye))!=null;)if(Xe=this.rules.inline.em.middle.exec(ye.slice(0,Ae.index+2)),Xe)return{type:"em",raw:fe.slice(0,Xe[0].length),text:fe.slice(1,Xe[0].length-1)}}},Se.codespan=function(fe){var ye=this.rules.inline.code.exec(fe);if(ye){var _e=ye[2].replace(/\n/g," "),Ae=/[^ ]/.test(_e),We=_e.startsWith(" ")&&_e.endsWith(" ");return Ae&&We&&(_e=_e.substring(1,_e.length-1)),_e=q(_e,!0),{type:"codespan",raw:ye[0],text:_e}}},Se.br=function(fe){var ye=this.rules.inline.br.exec(fe);if(ye)return{type:"br",raw:ye[0]}},Se.del=function(fe){var ye=this.rules.inline.del.exec(fe);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},Se.autolink=function(fe,ye){var _e=this.rules.inline.autolink.exec(fe);if(_e){var Ae,We;return _e[2]==="@"?(Ae=q(this.options.mangle?ye(_e[1]):_e[1]),We="mailto:"+Ae):(Ae=q(_e[1]),We=Ae),{type:"link",raw:_e[0],text:Ae,href:We,tokens:[{type:"text",raw:Ae,text:Ae}]}}},Se.url=function(fe,ye){var _e;if(_e=this.rules.inline.url.exec(fe)){var Ae,We;if(_e[2]==="@")Ae=q(this.options.mangle?ye(_e[0]):_e[0]),We="mailto:"+Ae;else{var Xe;do Xe=_e[0],_e[0]=this.rules.inline._backpedal.exec(_e[0])[0];while(Xe!==_e[0]);Ae=q(_e[0]),_e[1]==="www."?We="http://"+Ae:We=Ae}return{type:"link",raw:_e[0],text:Ae,href:We,tokens:[{type:"text",raw:Ae,text:Ae}]}}},Se.inlineText=function(fe,ye,_e){var Ae=this.rules.inline.text.exec(fe);if(Ae){var We;return ye?We=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):q(Ae[0]):Ae[0]:We=q(this.options.smartypants?_e(Ae[0]):Ae[0]),{type:"text",raw:Ae[0],text:We}}},Re}(),de=z.noopTest,xe=z.edit,pe=z.merge,ne={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:de,table:de,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ne._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ne._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ne.def=xe(ne.def).replace("label",ne._label).replace("title",ne._title).getRegex(),ne.bullet=/(?:[*+-]|\d{1,9}[.)])/,ne.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ne.item=xe(ne.item,"gm").replace(/bull/g,ne.bullet).getRegex(),ne.list=xe(ne.list).replace(/bull/g,ne.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ne.def.source+")").getRegex(),ne._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",ne._comment=/<!--(?!-?>)[\s\S]*?-->/,ne.html=xe(ne.html,"i").replace("comment",ne._comment).replace("tag",ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne.paragraph=xe(ne._paragraph).replace("hr",ne.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",ne._tag).getRegex(),ne.blockquote=xe(ne.blockquote).replace("paragraph",ne.paragraph).getRegex(),ne.normal=pe({},ne),ne.gfm=pe({},ne.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*|$)"}),ne.gfm.nptable=xe(ne.gfm.nptable).replace("hr",ne.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",ne._tag).getRegex(),ne.gfm.table=xe(ne.gfm.table).replace("hr",ne.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",ne._tag).getRegex(),ne.pedantic=pe({},ne.normal,{html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne._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:de,paragraph:xe(ne.normal._paragraph).replace("hr",ne.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ne.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ie={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:de,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:de,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ie._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ie.punctuation=xe(ie.punctuation).replace(/punctuation/g,ie._punctuation).getRegex(),ie._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ie._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ie.em.start=xe(ie.em.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.middle=xe(ie.em.middle).replace(/punctuation/g,ie._punctuation).replace(/overlapSkip/g,ie._overlapSkip).getRegex(),ie.em.endAst=xe(ie.em.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.endUnd=xe(ie.em.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.start=xe(ie.strong.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.middle=xe(ie.strong.middle).replace(/punctuation/g,ie._punctuation).replace(/blockSkip/g,ie._blockSkip).getRegex(),ie.strong.endAst=xe(ie.strong.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.endUnd=xe(ie.strong.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.blockSkip=xe(ie._blockSkip,"g").getRegex(),ie.overlapSkip=xe(ie._overlapSkip,"g").getRegex(),ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ie._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])?)+(?![-_])/,ie.autolink=xe(ie.autolink).replace("scheme",ie._scheme).replace("email",ie._email).getRegex(),ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ie.tag=xe(ie.tag).replace("comment",ne._comment).replace("attribute",ie._attribute).getRegex(),ie._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ie.link=xe(ie.link).replace("label",ie._label).replace("href",ie._href).replace("title",ie._title).getRegex(),ie.reflink=xe(ie.reflink).replace("label",ie._label).getRegex(),ie.reflinkSearch=xe(ie.reflinkSearch,"g").replace("reflink",ie.reflink).replace("nolink",ie.nolink).getRegex(),ie.normal=pe({},ie),ie.pedantic=pe({},ie.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:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",ie._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie._label).getRegex()}),ie.gfm=pe({},ie.normal,{escape:xe(ie.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ie.gfm.url=xe(ie.gfm.url,"i").replace("email",ie.gfm._extended_email).getRegex(),ie.breaks=pe({},ie.gfm,{br:xe(ie.br).replace("{2,}","*").getRegex(),text:xe(ie.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ee={block:ne,inline:ie},le=w.defaults,Q=ee.block,Z=ee.inline;function be(Re){return Re.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 te(Re){var Se="",De,fe,ye=Re.length;for(De=0;De<ye;De++)fe=Re.charCodeAt(De),Math.random()>.5&&(fe="x"+fe.toString(16)),Se+="&#"+fe+";";return Se}var $=function(){function Re(De){this.tokens=[],this.tokens.links=Object.create(null),this.options=De||le,this.options.tokenizer=this.options.tokenizer||new Te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var fe={block:Q.normal,inline:Z.normal};this.options.pedantic?(fe.block=Q.pedantic,fe.inline=Z.pedantic):this.options.gfm&&(fe.block=Q.gfm,this.options.breaks?fe.inline=Z.breaks:fe.inline=Z.gfm),this.tokenizer.rules=fe}Re.lex=function(fe,ye){var _e=new Re(ye);return _e.lex(fe)};var Se=Re.prototype;return Se.lex=function(fe){return fe=fe.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(fe,this.tokens,!0),this.inline(this.tokens),this.tokens},Se.blockTokens=function(fe,ye,_e){ye===void 0&&(ye=[]),_e===void 0&&(_e=!0),fe=fe.replace(/^ +$/gm,"");for(var Ae,We,Xe,ft;fe;){if(Ae=this.tokenizer.space(fe)){fe=fe.substring(Ae.raw.length),Ae.type&&ye.push(Ae);continue}if(Ae=this.tokenizer.code(fe,ye)){fe=fe.substring(Ae.raw.length),Ae.type?ye.push(Ae):(ft=ye[ye.length-1],ft.raw+=`
`+Ae.raw,ft.text+=`
`+Ae.text);continue}if(Ae=this.tokenizer.fences(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(Ae=this.tokenizer.heading(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(Ae=this.tokenizer.nptable(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(Ae=this.tokenizer.hr(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(Ae=this.tokenizer.blockquote(fe)){fe=fe.substring(Ae.raw.length),Ae.tokens=this.blockTokens(Ae.text,[],_e),ye.push(Ae);continue}if(Ae=this.tokenizer.list(fe)){for(fe=fe.substring(Ae.raw.length),Xe=Ae.items.length,We=0;We<Xe;We++)Ae.items[We].tokens=this.blockTokens(Ae.items[We].text,[],!1);ye.push(Ae);continue}if(Ae=this.tokenizer.html(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(_e&&(Ae=this.tokenizer.def(fe))){fe=fe.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(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(Ae=this.tokenizer.lheading(fe)){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(_e&&(Ae=this.tokenizer.paragraph(fe))){fe=fe.substring(Ae.raw.length),ye.push(Ae);continue}if(Ae=this.tokenizer.text(fe,ye)){fe=fe.substring(Ae.raw.length),Ae.type?ye.push(Ae):(ft=ye[ye.length-1],ft.raw+=`
`+Ae.raw,ft.text+=`
`+Ae.text);continue}if(fe){var vt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return ye},Se.inline=function(fe){var ye,_e,Ae,We,Xe,ft,vt=fe.length;for(ye=0;ye<vt;ye++){ft=fe[ye];switch(ft.type){case"paragraph":case"text":case"heading":{ft.tokens=[],this.inlineTokens(ft.text,ft.tokens);break}case"table":{for(ft.tokens={header:[],cells:[]},We=ft.header.length,_e=0;_e<We;_e++)ft.tokens.header[_e]=[],this.inlineTokens(ft.header[_e],ft.tokens.header[_e]);for(We=ft.cells.length,_e=0;_e<We;_e++)for(Xe=ft.cells[_e],ft.tokens.cells[_e]=[],Ae=0;Ae<Xe.length;Ae++)ft.tokens.cells[_e][Ae]=[],this.inlineTokens(Xe[Ae],ft.tokens.cells[_e][Ae]);break}case"blockquote":{this.inline(ft.tokens);break}case"list":{for(We=ft.items.length,_e=0;_e<We;_e++)this.inline(ft.items[_e].tokens);break}}}return fe},Se.inlineTokens=function(fe,ye,_e,Ae,We){ye===void 0&&(ye=[]),_e===void 0&&(_e=!1),Ae===void 0&&(Ae=!1),We===void 0&&(We="");var Xe,ft=fe,vt;if(this.tokens.links){var Kt=Object.keys(this.tokens.links);if(Kt.length>0)for(;(vt=this.tokenizer.rules.inline.reflinkSearch.exec(ft))!=null;)Kt.includes(vt[0].slice(vt[0].lastIndexOf("[")+1,-1))&&(ft=ft.slice(0,vt.index)+"["+"a".repeat(vt[0].length-2)+"]"+ft.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(vt=this.tokenizer.rules.inline.blockSkip.exec(ft))!=null;)ft=ft.slice(0,vt.index)+"["+"a".repeat(vt[0].length-2)+"]"+ft.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;fe;){if(Xe=this.tokenizer.escape(fe)){fe=fe.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.tag(fe,_e,Ae)){fe=fe.substring(Xe.raw.length),_e=Xe.inLink,Ae=Xe.inRawBlock,ye.push(Xe);continue}if(Xe=this.tokenizer.link(fe)){fe=fe.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,Ae)),ye.push(Xe);continue}if(Xe=this.tokenizer.reflink(fe,this.tokens.links)){fe=fe.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,Ae)),ye.push(Xe);continue}if(Xe=this.tokenizer.strong(fe,ft,We)){fe=fe.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],_e,Ae),ye.push(Xe);continue}if(Xe=this.tokenizer.em(fe,ft,We)){fe=fe.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],_e,Ae),ye.push(Xe);continue}if(Xe=this.tokenizer.codespan(fe)){fe=fe.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.br(fe)){fe=fe.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.del(fe)){fe=fe.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],_e,Ae),ye.push(Xe);continue}if(Xe=this.tokenizer.autolink(fe,te)){fe=fe.substring(Xe.raw.length),ye.push(Xe);continue}if(!_e&&(Xe=this.tokenizer.url(fe,te))){fe=fe.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.inlineText(fe,Ae,be)){fe=fe.substring(Xe.raw.length),We=Xe.raw.slice(-1),ye.push(Xe);continue}if(fe){var kt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(kt);break}else throw new Error(kt)}}return ye},f(Re,null,[{key:"rules",get:function(){return{block:Q,inline:Z}}}]),Re}(),X=w.defaults,Y=z.cleanUrl,ve=z.escape,ue=function(){function Re(De){this.options=De||X}var Se=Re.prototype;return Se.code=function(fe,ye,_e){var Ae=(ye||"").match(/\S*/)[0];if(this.options.highlight){var We=this.options.highlight(fe,Ae);We!=null&&We!==fe&&(_e=!0,fe=We)}return Ae?'<pre><code class="'+this.options.langPrefix+ve(Ae,!0)+'">'+(_e?fe:ve(fe,!0))+`</code></pre>
`:"<pre><code>"+(_e?fe:ve(fe,!0))+`</code></pre>
`},Se.blockquote=function(fe){return`<blockquote>
`+fe+`</blockquote>
`},Se.html=function(fe){return fe},Se.heading=function(fe,ye,_e,Ae){return this.options.headerIds?"<h"+ye+' id="'+this.options.headerPrefix+Ae.slug(_e)+'">'+fe+"</h"+ye+`>
`:"<h"+ye+">"+fe+"</h"+ye+`>
`},Se.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Se.list=function(fe,ye,_e){var Ae=ye?"ol":"ul",We=ye&&_e!==1?' start="'+_e+'"':"";return"<"+Ae+We+`>
`+fe+"</"+Ae+`>
`},Se.listitem=function(fe){return"<li>"+fe+`</li>
`},Se.checkbox=function(fe){return"<input "+(fe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Se.paragraph=function(fe){return"<p>"+fe+`</p>
`},Se.table=function(fe,ye){return ye&&(ye="<tbody>"+ye+"</tbody>"),`<table>
<thead>
`+fe+`</thead>
`+ye+`</table>
`},Se.tablerow=function(fe){return`<tr>
`+fe+`</tr>
`},Se.tablecell=function(fe,ye){var _e=ye.header?"th":"td",Ae=ye.align?"<"+_e+' align="'+ye.align+'">':"<"+_e+">";return Ae+fe+"</"+_e+`>
`},Se.strong=function(fe){return"<strong>"+fe+"</strong>"},Se.em=function(fe){return"<em>"+fe+"</em>"},Se.codespan=function(fe){return"<code>"+fe+"</code>"},Se.br=function(){return this.options.xhtml?"<br/>":"<br>"},Se.del=function(fe){return"<del>"+fe+"</del>"},Se.link=function(fe,ye,_e){if(fe=Y(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var Ae='<a href="'+ve(fe)+'"';return ye&&(Ae+=' title="'+ye+'"'),Ae+=">"+_e+"</a>",Ae},Se.image=function(fe,ye,_e){if(fe=Y(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var Ae='<img src="'+fe+'" alt="'+_e+'"';return ye&&(Ae+=' title="'+ye+'"'),Ae+=this.options.xhtml?"/>":">",Ae},Se.text=function(fe){return fe},Re}(),Ee=function(){function Re(){}var Se=Re.prototype;return Se.strong=function(fe){return fe},Se.em=function(fe){return fe},Se.codespan=function(fe){return fe},Se.del=function(fe){return fe},Se.html=function(fe){return fe},Se.text=function(fe){return fe},Se.link=function(fe,ye,_e){return""+_e},Se.image=function(fe,ye,_e){return""+_e},Se.br=function(){return""},Re}(),Ke=function(){function Re(){this.seen={}}var Se=Re.prototype;return Se.slug=function(fe){var ye=fe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var _e=ye;do this.seen[_e]++,ye=_e+"-"+this.seen[_e];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},Re}(),Ye=w.defaults,Je=z.unescape,tt=function(){function Re(De){this.options=De||Ye,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Ke}Re.parse=function(fe,ye){var _e=new Re(ye);return _e.parse(fe)};var Se=Re.prototype;return Se.parse=function(fe,ye){ye===void 0&&(ye=!0);var _e="",Ae,We,Xe,ft,vt,Kt,kt,Or,pr,Et,Yr,kr,Ur,dn,br,qr,Zr,Ar,fn=fe.length;for(Ae=0;Ae<fn;Ae++){Et=fe[Ae];switch(Et.type){case"space":continue;case"hr":{_e+=this.renderer.hr();continue}case"heading":{_e+=this.renderer.heading(this.parseInline(Et.tokens),Et.depth,Je(this.parseInline(Et.tokens,this.textRenderer)),this.slugger);continue}case"code":{_e+=this.renderer.code(Et.text,Et.lang,Et.escaped);continue}case"table":{for(Or="",kt="",ft=Et.header.length,We=0;We<ft;We++)kt+=this.renderer.tablecell(this.parseInline(Et.tokens.header[We]),{header:!0,align:Et.align[We]});for(Or+=this.renderer.tablerow(kt),pr="",ft=Et.cells.length,We=0;We<ft;We++){for(Kt=Et.tokens.cells[We],kt="",vt=Kt.length,Xe=0;Xe<vt;Xe++)kt+=this.renderer.tablecell(this.parseInline(Kt[Xe]),{header:!1,align:Et.align[Xe]});pr+=this.renderer.tablerow(kt)}_e+=this.renderer.table(Or,pr);continue}case"blockquote":{pr=this.parse(Et.tokens),_e+=this.renderer.blockquote(pr);continue}case"list":{for(Yr=Et.ordered,kr=Et.start,Ur=Et.loose,ft=Et.items.length,pr="",We=0;We<ft;We++)br=Et.items[We],qr=br.checked,Zr=br.task,dn="",br.task&&(Ar=this.renderer.checkbox(qr),Ur?br.tokens.length>0&&br.tokens[0].type==="text"?(br.tokens[0].text=Ar+" "+br.tokens[0].text,br.tokens[0].tokens&&br.tokens[0].tokens.length>0&&br.tokens[0].tokens[0].type==="text"&&(br.tokens[0].tokens[0].text=Ar+" "+br.tokens[0].tokens[0].text)):br.tokens.unshift({type:"text",text:Ar}):dn+=Ar),dn+=this.parse(br.tokens,Ur),pr+=this.renderer.listitem(dn,Zr,qr);_e+=this.renderer.list(pr,Yr,kr);continue}case"html":{_e+=this.renderer.html(Et.text);continue}case"paragraph":{_e+=this.renderer.paragraph(this.parseInline(Et.tokens));continue}case"text":{for(pr=Et.tokens?this.parseInline(Et.tokens):Et.text;Ae+1<fn&&fe[Ae+1].type==="text";)Et=fe[++Ae],pr+=`
`+(Et.tokens?this.parseInline(Et.tokens):Et.text);_e+=ye?this.renderer.paragraph(pr):pr;continue}default:{var wn='Token with "'+Et.type+'" type was not found.';if(this.options.silent){console.error(wn);return}else throw new Error(wn)}}}return _e},Se.parseInline=function(fe,ye){ye=ye||this.renderer;var _e="",Ae,We,Xe=fe.length;for(Ae=0;Ae<Xe;Ae++){We=fe[Ae];switch(We.type){case"escape":{_e+=ye.text(We.text);break}case"html":{_e+=ye.html(We.text);break}case"link":{_e+=ye.link(We.href,We.title,this.parseInline(We.tokens,ye));break}case"image":{_e+=ye.image(We.href,We.title,We.text);break}case"strong":{_e+=ye.strong(this.parseInline(We.tokens,ye));break}case"em":{_e+=ye.em(this.parseInline(We.tokens,ye));break}case"codespan":{_e+=ye.codespan(We.text);break}case"br":{_e+=ye.br();break}case"del":{_e+=ye.del(this.parseInline(We.tokens,ye));break}case"text":{_e+=ye.text(We.text);break}default:{var ft='Token with "'+We.type+'" type was not found.';if(this.options.silent){console.error(ft);return}else throw new Error(ft)}}}return _e},Re}(),at=z.merge,lt=z.checkSanitizeDeprecation,je=z.escape,Ce=w.getDefaults,Qe=w.changeDefaults,st=w.defaults;function Ge(Re,Se,De){if(typeof Re=="undefined"||Re===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Re!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Re)+", string expected");if(typeof Se=="function"&&(De=Se,Se=null),Se=at({},Ge.defaults,Se||{}),lt(Se),De){var fe=Se.highlight,ye;try{ye=$.lex(Re,Se)}catch(Xe){return De(Xe)}var _e=function(ft){var vt;if(!ft)try{vt=tt.parse(ye,Se)}catch(Kt){ft=Kt}return Se.highlight=fe,ft?De(ft):De(null,vt)};if(!fe||fe.length<3)return _e();if(delete Se.highlight,!ye.length)return _e();var Ae=0;Ge.walkTokens(ye,function(Xe){Xe.type==="code"&&(Ae++,setTimeout(function(){fe(Xe.text,Xe.lang,function(ft,vt){if(ft)return _e(ft);vt!=null&&vt!==Xe.text&&(Xe.text=vt,Xe.escaped=!0),Ae--,Ae===0&&_e()})},0))}),Ae===0&&_e();return}try{var We=$.lex(Re,Se);return Se.walkTokens&&Ge.walkTokens(We,Se.walkTokens),tt.parse(We,Se)}catch(Xe){if(Xe.message+=`
Please report this to https://github.com/markedjs/marked.`,Se.silent)return"<p>An error occurred:</p><pre>"+je(Xe.message+"",!0)+"</pre>";throw Xe}}Ge.options=Ge.setOptions=function(Re){return at(Ge.defaults,Re),Qe(Ge.defaults),Ge},Ge.getDefaults=Ce,Ge.defaults=st,Ge.use=function(Re){var Se=at({},Re);if(Re.renderer&&function(){var fe=Ge.defaults.renderer||new ue,ye=function(We){var Xe=fe[We];fe[We]=function(){for(var ft=arguments.length,vt=new Array(ft),Kt=0;Kt<ft;Kt++)vt[Kt]=arguments[Kt];var kt=Re.renderer[We].apply(fe,vt);return kt===!1&&(kt=Xe.apply(fe,vt)),kt}};for(var _e in Re.renderer)ye(_e);Se.renderer=fe}(),Re.tokenizer&&function(){var fe=Ge.defaults.tokenizer||new Te,ye=function(We){var Xe=fe[We];fe[We]=function(){for(var ft=arguments.length,vt=new Array(ft),Kt=0;Kt<ft;Kt++)vt[Kt]=arguments[Kt];var kt=Re.tokenizer[We].apply(fe,vt);return kt===!1&&(kt=Xe.apply(fe,vt)),kt}};for(var _e in Re.tokenizer)ye(_e);Se.tokenizer=fe}(),Re.walkTokens){var De=Ge.defaults.walkTokens;Se.walkTokens=function(fe){Re.walkTokens(fe),De&&De(fe)}}Ge.setOptions(Se)},Ge.walkTokens=function(Re,Se){for(var De=u(Re),fe;!(fe=De()).done;){var ye=fe.value;Se(ye);switch(ye.type){case"table":{for(var _e=u(ye.tokens.header),Ae;!(Ae=_e()).done;){var We=Ae.value;Ge.walkTokens(We,Se)}for(var Xe=u(ye.tokens.cells),ft;!(ft=Xe()).done;)for(var vt=ft.value,Kt=u(vt),kt;!(kt=Kt()).done;){var Or=kt.value;Ge.walkTokens(Or,Se)}break}case"list":{Ge.walkTokens(ye.items,Se);break}default:ye.tokens&&Ge.walkTokens(ye.tokens,Se)}}},Ge.Parser=tt,Ge.parser=tt.parse,Ge.Renderer=ue,Ge.TextRenderer=Ee,Ge.Lexer=$,Ge.lexer=$.lex,Ge.Tokenizer=Te,Ge.Slugger=Ke,Ge.parse=Ge;var rt=Ge;return rt})},E4JC:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.StreamCipher,u=f.algo,h=[],w=[],d=[],i=u.Rabbit=D.extend({_doReset:function(){for(var a=this._key.words,_=this.cfg.iv,p=0;p<4;p++)a[p]=(a[p]<<8|a[p]>>>24)&16711935|(a[p]<<24|a[p]>>>8)&4278255360;var c=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],m=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 p=0;p<4;p++)l.call(this);for(var p=0;p<8;p++)m[p]^=c[p+4&7];if(_){var g=_.words,b=g[0],n=g[1],o=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,t=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=o>>>16|t&4294901760,x=t<<16|o&65535;m[0]^=o,m[1]^=S,m[2]^=t,m[3]^=x,m[4]^=o,m[5]^=S,m[6]^=t,m[7]^=x;for(var p=0;p<4;p++)l.call(this)}},_doProcessBlock:function(a,_){var p=this._X;l.call(this),h[0]=p[0]^p[5]>>>16^p[3]<<16,h[1]=p[2]^p[7]>>>16^p[5]<<16,h[2]=p[4]^p[1]>>>16^p[7]<<16,h[3]=p[6]^p[3]>>>16^p[1]<<16;for(var c=0;c<4;c++)h[c]=(h[c]<<8|h[c]>>>24)&16711935|(h[c]<<24|h[c]>>>8)&4278255360,a[_+c]^=h[c]},blockSize:128/32,ivSize:64/32});function l(){for(var a=this._X,_=this._C,p=0;p<8;p++)w[p]=_[p];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<w[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<w[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<w[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<w[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<w[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<w[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<w[6]>>>0?1:0)|0,this._b=_[7]>>>0<w[7]>>>0?1:0;for(var p=0;p<8;p++){var c=a[p]+_[p],m=c&65535,g=c>>>16,b=((m*m>>>17)+m*g>>>15)+g*g,n=((c&4294901760)*c|0)+((c&65535)*c|0);d[p]=b^n}a[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,a[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,a[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,a[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,a[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,a[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,a[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,a[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}f.Rabbit=D._createHelper(i)}(),L.Rabbit})},ELLl:function(j,J,k){(function(L){L(k("VrN/"))})(function(L){var f={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=L.Pos;L.defineOption("autoCloseBrackets",!1,function(m,g,b){b&&b!=L.Init&&(m.removeKeyMap(u),m.state.closeBrackets=null),g&&(h(D(g,"pairs")),m.state.closeBrackets=g,m.addKeyMap(u))});function D(m,g){return g=="pairs"&&typeof m=="string"?m:typeof m=="object"&&m[g]!=null?m[g]:f[g]}var u={Backspace:i,Enter:l};function h(m){for(var g=0;g<m.length;g++){var b=m.charAt(g),n="'"+b+"'";u[n]||(u[n]=w(b))}}h(f.pairs+"`");function w(m){return function(g){return _(g,m)}}function d(m){var g=m.state.closeBrackets;if(!g||g.override)return g;var b=m.getModeAt(m.getCursor());return b.closeBrackets||g}function i(m){var g=d(m);if(!g||m.getOption("disableInput"))return L.Pass;for(var b=D(g,"pairs"),n=m.listSelections(),o=0;o<n.length;o++){if(!n[o].empty())return L.Pass;var t=p(m,n[o].head);if(!t||b.indexOf(t)%2!=0)return L.Pass}for(var o=n.length-1;o>=0;o--){var S=n[o].head;m.replaceRange("",C(S.line,S.ch-1),C(S.line,S.ch+1),"+delete")}}function l(m){var g=d(m),b=g&&D(g,"explode");if(!b||m.getOption("disableInput"))return L.Pass;for(var n=m.listSelections(),o=0;o<n.length;o++){if(!n[o].empty())return L.Pass;var t=p(m,n[o].head);if(!t||b.indexOf(t)%2!=0)return L.Pass}m.operation(function(){var S=m.lineSeparator()||`
`;m.replaceSelection(S+S,null),m.execCommand("goCharLeft"),n=m.listSelections();for(var x=0;x<n.length;x++){var s=n[x].head.line;m.indentLine(s,null,!0),m.indentLine(s+1,null,!0)}})}function a(m){var g=L.cmpPos(m.anchor,m.head)>0;return{anchor:new C(m.anchor.line,m.anchor.ch+(g?-1:1)),head:new C(m.head.line,m.head.ch+(g?1:-1))}}function _(m,g){var b=d(m);if(!b||m.getOption("disableInput"))return L.Pass;var n=D(b,"pairs"),o=n.indexOf(g);if(o==-1)return L.Pass;for(var t=D(b,"closeBefore"),S=D(b,"triples"),x=n.charAt(o+1)==g,s=m.listSelections(),P=o%2==0,O,E=0;E<s.length;E++){var v=s[E],y=v.head,T,M=m.getRange(y,C(y.line,y.ch+1));if(P&&!v.empty())T="surround";else if((x||!P)&&M==g)x&&c(m,y)?T="both":S.indexOf(g)>=0&&m.getRange(y,C(y.line,y.ch+3))==g+g+g?T="skipThree":T="skip";else if(x&&y.ch>1&&S.indexOf(g)>=0&&m.getRange(C(y.line,y.ch-2),y)==g+g){if(y.ch>2&&/\bstring/.test(m.getTokenTypeAt(C(y.line,y.ch-2))))return L.Pass;T="addFour"}else if(x){var N=y.ch==0?" ":m.getRange(C(y.line,y.ch-1),y);if(!L.isWordChar(M)&&N!=g&&!L.isWordChar(N))T="both";else return L.Pass}else if(P&&(M.length===0||/\s/.test(M)||t.indexOf(M)>-1))T="both";else return L.Pass;if(!O)O=T;else if(O!=T)return L.Pass}var I=o%2?n.charAt(o-1):g,G=o%2?g:n.charAt(o+1);m.operation(function(){if(O=="skip")m.execCommand("goCharRight");else if(O=="skipThree")for(var H=0;H<3;H++)m.execCommand("goCharRight");else if(O=="surround"){for(var W=m.getSelections(),H=0;H<W.length;H++)W[H]=I+W[H]+G;m.replaceSelections(W,"around"),W=m.listSelections().slice();for(var H=0;H<W.length;H++)W[H]=a(W[H]);m.setSelections(W)}else O=="both"?(m.replaceSelection(I+G,null),m.triggerElectric(I+G),m.execCommand("goCharLeft")):O=="addFour"&&(m.replaceSelection(I+I+I+I,"before"),m.execCommand("goCharRight"))})}function p(m,g){var b=m.getRange(C(g.line,g.ch-1),C(g.line,g.ch+1));return b.length==2?b:null}function c(m,g){var b=m.getTokenAt(C(g.line,g.ch+1));return/\bstring/.test(b.type)&&b.start==g.ch&&(g.ch==0||!/\bstring/.test(m.getTokenTypeAt(g)))}})},ELcG:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){/** @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(f){var C=L,D=C.lib,u=D.WordArray,h=D.Hasher,w=C.algo,d=u.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]),i=u.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=u.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=u.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]),_=u.create([0,1518500249,1859775393,2400959708,2840853838]),p=u.create([1352829926,1548603684,1836072691,2053994217,0]),c=w.RIPEMD160=h.extend({_doReset:function(){this._hash=u.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(S,x){for(var s=0;s<16;s++){var P=x+s,O=S[P];S[P]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var E=this._hash.words,v=_.words,y=p.words,T=d.words,M=i.words,N=l.words,I=a.words,G,H,W,z,U,B,K,q,ae,se;B=G=E[0],K=H=E[1],q=W=E[2],ae=z=E[3],se=U=E[4];for(var we,s=0;s<80;s+=1)we=G+S[x+T[s]]|0,s<16?we+=m(H,W,z)+v[0]:s<32?we+=g(H,W,z)+v[1]:s<48?we+=b(H,W,z)+v[2]:s<64?we+=n(H,W,z)+v[3]:we+=o(H,W,z)+v[4],we=we|0,we=t(we,N[s]),we=we+U|0,G=U,U=z,z=t(W,10),W=H,H=we,we=B+S[x+M[s]]|0,s<16?we+=o(K,q,ae)+y[0]:s<32?we+=n(K,q,ae)+y[1]:s<48?we+=b(K,q,ae)+y[2]:s<64?we+=g(K,q,ae)+y[3]:we+=m(K,q,ae)+y[4],we=we|0,we=t(we,I[s]),we=we+se|0,B=se,se=ae,ae=t(q,10),q=K,K=we;we=E[1]+W+ae|0,E[1]=E[2]+z+se|0,E[2]=E[3]+U+B|0,E[3]=E[4]+G+K|0,E[4]=E[0]+H+q|0,E[0]=we},_doFinalize:function(){var S=this._data,x=S.words,s=this._nDataBytes*8,P=S.sigBytes*8;x[P>>>5]|=128<<24-P%32,x[(P+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,S.sigBytes=(x.length+1)*4,this._process();for(var O=this._hash,E=O.words,v=0;v<5;v++){var y=E[v];E[v]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}return O},clone:function(){var S=h.clone.call(this);return S._hash=this._hash.clone(),S}});function m(S,x,s){return S^x^s}function g(S,x,s){return S&x|~S&s}function b(S,x,s){return(S|~x)^s}function n(S,x,s){return S&s|x&~s}function o(S,x,s){return S^(x|~s)}function t(S,x){return S<<x|S>>>32-x}C.RIPEMD160=h._createHelper(c),C.HmacRIPEMD160=h._createHmacHelper(c)}(Math),L.RIPEMD160})},ETIr:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.enc,h=u.Base64={stringify:function(d){var i=d.words,l=d.sigBytes,a=this._map;d.clamp();for(var _=[],p=0;p<l;p+=3)for(var c=i[p>>>2]>>>24-p%4*8&255,m=i[p+1>>>2]>>>24-(p+1)%4*8&255,g=i[p+2>>>2]>>>24-(p+2)%4*8&255,b=c<<16|m<<8|g,n=0;n<4&&p+n*.75<l;n++)_.push(a.charAt(b>>>6*(3-n)&63));var o=a.charAt(64);if(o)for(;_.length%4;)_.push(o);return _.join("")},parse:function(d){var i=d.length,l=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var _=0;_<l.length;_++)a[l.charCodeAt(_)]=_}var p=l.charAt(64);if(p){var c=d.indexOf(p);c!==-1&&(i=c)}return w(d,i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function w(d,i,l){for(var a=[],_=0,p=0;p<i;p++)if(p%4){var c=l[d.charCodeAt(p-1)]<<p%4*2,m=l[d.charCodeAt(p)]>>>6-p%4*2,g=c|m;a[_>>>2]|=g<<24-_%4*8,_++}return D.create(a,_)}}(),L.enc.Base64})},"F+F2":function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var f=L,C=f.lib,D=C.WordArray,u=D.init,h=D.init=function(w){if(w instanceof ArrayBuffer&&(w=new Uint8Array(w)),(w instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&w instanceof Uint8ClampedArray||w instanceof Int16Array||w instanceof Uint16Array||w instanceof Int32Array||w instanceof Uint32Array||w instanceof Float32Array||w instanceof Float64Array)&&(w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength)),w instanceof Uint8Array){for(var d=w.byteLength,i=[],l=0;l<d;l++)i[l>>>2]|=w[l]<<24-l%4*8;u.call(this,i,d)}else u.apply(this,arguments)};h.prototype=D}(),L.lib.WordArray})},GRO8:function(j,J,k){"use strict";k.r(J);var L=k("k1fw"),f=k("2qtc"),C=k("kLXV"),D=k("lUTK"),u=k("BvKs"),h=k("+L6B"),w=k("2/Rp"),d=k("T2oS"),i=k("W9HT"),l=k("sPJy"),a=k("bE4q"),_=k("miYZ"),p=k("tsqr"),c=k("9og8"),m=k("tJVT"),g=k("PpiC"),b=k("WmNS"),n=k.n(b),o=k("cDcd"),t=k.n(o),S=k("Ty5D"),x=k("55Ip"),s=k("9kvl"),P=k("KeDT"),O=k.n(P),E=k("zrhs"),v=k("DZo9"),y=k("8z0m"),T=k("LtfV"),M=k("KhGG"),N=y.a.Dragger,I=function(Ze){var ht=Ze.user,gt=Ze.dispatch,Wt=Ze.classroomList,At=Ze.shixunsDetail,Jt=Ze.getResults,Lt=Object(S.i)(),ct=Object(o.useState)(),nt=Object(m.a)(ct,2),it=nt[0],_t=nt[1],Rt=Object(o.useState)([]),Ct=Object(m.a)(Rt,2),Ot=Ct[0],Pt=Ct[1],jt=Object(o.useState)(!1),Ve=Object(m.a)(jt,2),nr=Ve[0],Yt=Ve[1],Qt={onRemove:function(){Pt([])},beforeUpload:function(zt){if(console.log(zt),(zt==null?void 0:zt.size)>1024*1024*500)return p.b.info("\u6587\u4EF6\u8D85\u8FC7500M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;var Ut=[];return Ut.push(zt),Pt([].concat(Ut)),!1},fileList:Ot};return t.a.createElement(C.a,{title:"\u63D0\u4EA4\u6587\u4EF6",visible:At.actionTabs.key==="md-tab",confirmLoading:nr,onOk:Object(c.a)(n.a.mark(function It(){var zt,Ut,Ht;return n.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(!((Ot==null?void 0:Ot.length)<=0)){Nr.next=3;break}return p.b.info("\u8BF7\u5148\u9009\u62E9\u6587\u4EF6"),Nr.abrupt("return");case 3:return Yt(!0),Nr.next=6,Object(M.c)(Ot[0],{login:(zt=ht.userInfo)===null||zt===void 0?void 0:zt.login,container_type:"Competition",container_id:At.actionTabs.params.id,stage_type:At.actionTabs.params.value,file_name:(Ut=Ot[0])===null||Ut===void 0?void 0:Ut.name});case 6:Ht=Nr.sent,(Ht==null?void 0:Ht.status)===0?(p.b.info("\u63D0\u4EA4\u6210\u529F"),gt({type:"shixunsDetail/setActionTabs",payload:{key:""}}),Yt(!1),Pt([]),Jt(At.actionTabs.params.value)):(Yt(!1),p.b.info("\u63D0\u4EA4\u5931\u8D25"));case 8:case"end":return Nr.stop()}},It)})),onCancel:function(){Pt([]),gt({type:"shixunsDetail/setActionTabs",payload:{key:""}})}},t.a.createElement(N,Qt,t.a.createElement("p",{className:"ant-upload-drag-icon"},t.a.createElement(T.a,null)),t.a.createElement("p",{className:"ant-upload-hint"},"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20")))},G=Object(s.a)(function(pt){var Ze=pt.user,ht=pt.classroomList,gt=pt.shixunsDetail;return{user:Ze,classroomList:ht,shixunsDetail:gt}})(I),H=k("14J3"),W=k("BMrR"),z=k("5NDa"),U=k("5rEg"),B=k("9Bee"),K=k("m3rI"),q=k("ErOA"),ae=k("NLgs"),se=k("fV52"),we=k("3I+P"),Te=k("OaEy"),de=k("2fM7"),xe=k("5bA4"),pe=k("UESt"),ne=de.a.Option;function ie(pt){var Ze=pt.rewarddata,ht=pt.getlistdatas,gt=pt.is_signed,Wt=pt.dispatch,At=pt.userlist,Jt=Object(o.useRef)(null),Lt=Object(o.useState)(!1),ct=Object(m.a)(Lt,2),nt=ct[0],it=ct[1],_t=Object(o.useState)(void 0),Rt=Object(m.a)(_t,2),Ct=Rt[0],Ot=Rt[1],Pt=Object(o.useState)(""),jt=Object(m.a)(Pt,2),Ve=jt[0],nr=jt[1],Yt=Object(o.useState)(void 0),Qt=Object(m.a)(Yt,2),It=Qt[0],zt=Qt[1],Ut=Object(o.useState)(void 0),Ht=Object(m.a)(Ut,2),xr=Ht[0],Nr=Ht[1],Dr=Object(o.useState)(void 0),Br=Object(m.a)(Dr,2),Wr=Br[0],on=Br[1];function qe(mr){return er.apply(this,arguments)}function er(){return er=Object(c.a)(n.a.mark(function mr(dr){var vr;return n.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(!dr.user_received){Bt.next=3;break}return window.open(dr.click_info),Bt.abrupt("return");case 3:if(Object(ae.f)(Wt)){Bt.next=5;break}return Bt.abrupt("return");case 5:if(!(gt===!1)){Bt.next=8;break}return p.b.info("\u60A8\u5C1A\u672A\u62A5\u540D\u53C2\u8D5B\uFF0C\u8BF7\u62A5\u540D\u53C2\u8D5B\u540E\u9886\u53D6"),Bt.abrupt("return");case 8:if(!(dr.click_event==="Pop")){Bt.next=14;break}return nr(dr.id),it(!0),Bt.abrupt("return");case 14:Ot(void 0);case 15:return Bt.next=17,Wt({type:"competitions/Reward",payload:{competition_module_setting_id:dr.id}});case 17:vr=Bt.sent,vr&&vr.status===0&&(ht(),dr.click_event==="Link"?(p.b.info("\u9886\u53D6\u6210\u529F"),window.open(dr.click_info)):p.b.info(dr.click_info));case 19:case"end":return Bt.stop()}},mr)})),er.apply(this,arguments)}function sn(){return en.apply(this,arguments)}function en(){return en=Object(c.a)(n.a.mark(function mr(){var dr;return n.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(!(At&&!At.real_name)){wt.next=4;break}if(It){wt.next=4;break}return p.b.info("\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A"),wt.abrupt("return");case 4:if(!(At&&!At.email)){wt.next=8;break}if(xr){wt.next=8;break}return p.b.info("\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A"),wt.abrupt("return");case 8:if(!(At&&!At.phone)){wt.next=12;break}if(Wr){wt.next=12;break}return p.b.info("\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A"),wt.abrupt("return");case 12:if(Ct){wt.next=15;break}return p.b.info("\u8BF7\u9009\u62E9\u4F60\u7684\u5E74\u7EA7"),wt.abrupt("return");case 15:return wt.next=17,Wt({type:"competitions/Reward",payload:{competition_module_setting_id:Ve,className:Ct,name:It,mail:xr,phone:Wr}});case 17:dr=wt.sent,dr&&dr.status===0&&(it(!1),ht(),p.b.info("HCIA\u8BA4\u8BC1\u8003\u8BD5\u4EE3\u91D1\u52B5\u5C06\u7531Educoder\u5E73\u53F0\u7EDF\u4E00\u53D1\u653E\uFF0C\u8BF7\u53CA\u65F6\u5173\u6CE8\u90AE\u7BB1\u6216\u7AD9\u5185\u77ED\u4FE1\u67E5\u6536"));case 19:case"end":return wt.stop()}},mr)})),en.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement(C.a,{visible:nt,title:"\u5B8C\u5584\u4FE1\u606F",onCancel:function(){return it(!1)},onOk:function(){sn()}},t.a.createElement("p",null,"\u60A8\u7684\u59D3\u540D\uFF1A",t.a.createElement(U.a,{className:At&&At.real_name?"":O.a.bkfff,style:{width:"300px",marginLeft:"14px",background:At&&At.phone?"":"#ffffff!important"},value:At&&At.real_name||It,disabled:At&&At.real_name||!1,onChange:function(dr){return zt(dr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u90AE\u7BB1\uFF1A",t.a.createElement(U.a,{className:At&&At.email?"":"bkfff",style:{width:"300px",marginLeft:"14px",background:At&&At.phone?"":"#ffffff!important"},value:At&&At.email||xr,disabled:At&&At.email||!1,onChange:function(dr){return Nr(dr.target.value)}})),t.a.createElement("p",{style:{marginTop:"1em"}},"\u60A8\u7684\u624B\u673A\u53F7\uFF1A",t.a.createElement(U.a,{style:{width:"300px"},className:At&&At.phone?"":"bkfff",value:At&&At.phone||Wr,disabled:At&&At.phone||!1,onChange:function(dr){return on(dr.target.value)}})),"\u60A8\u7684\u5E74\u7EA7\uFF1A",t.a.createElement(de.a,{style:{width:"300px",marginTop:"1em",marginLeft:"14px"},onChange:function(dr){Ot(dr)}},t.a.createElement(ne,{value:"\u5927\u4E00"},"\u5927\u4E00"),t.a.createElement(ne,{value:"\u5927\u4E8C"},"\u5927\u4E8C"),t.a.createElement(ne,{value:"\u5927\u4E09"},"\u5927\u4E09"),t.a.createElement(ne,{value:"\u5927\u56DB"},"\u5927\u56DB"),t.a.createElement(ne,{value:"\u5927\u4E94"},"\u5927\u4E94"),t.a.createElement(ne,{value:"\u7855\u4E00"},"\u7855\u4E00"),t.a.createElement(ne,{value:"\u7855\u4E8C"},"\u7855\u4E8C"),t.a.createElement(ne,{value:"\u7855\u4E09"},"\u7855\u4E09"),t.a.createElement(ne,{value:"\u535A\u4E00"},"\u535A\u4E00"),t.a.createElement(ne,{value:"\u535A\u4E8C"},"\u535A\u4E8C"),t.a.createElement(ne,{value:"\u535A\u4E09"},"\u535A\u4E09"),t.a.createElement(ne,{value:"\u535A\u56DB"},"\u535A\u56DB"),t.a.createElement(ne,{value:"\u535A\u4E94"},"\u535A\u4E94")),t.a.createElement("p",{style:{marginTop:"1em"}},"\u63D0\u9192\uFF1A\u5982\u65E0\u534E\u4E3A\u4E91\u8D26\u53F7\uFF0C\u8BF7\u5C3D\u5FEB\u6CE8\u518C\u534E\u4E3A\u4E91\uFF01")),Ze&&Ze.length>3?t.a.createElement("div",{style:{position:"relative",marginBottom:"10px",marginTop:"10px"}},t.a.createElement("span",{className:O.a.spanprev,onClick:function(){Jt.current.prev()}},t.a.createElement(xe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"15px"}})),t.a.createElement(we.a,{ref:Jt,className:O.a.divwidth,slidesToShow:3,slidesToScroll:1},Ze&&Ze.map(function(mr,dr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:K.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(mr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})),t.a.createElement("span",{className:O.a.spannext,onClick:function(){Jt.current.next()}},t.a.createElement(pe.a,{style:{color:"#fff",fontSize:"20px",marginLeft:"5px"}}))):t.a.createElement("div",{className:O.a.divwidth,style:{justifyContent:"space-around",marginBottom:"10px",marginTop:"10px"}},Ze&&Ze.map(function(mr,dr){return t.a.createElement("div",{style:{textAlign:"center",position:"relative"}},t.a.createElement("img",{src:K.a.IMG_SERVER+"/".concat(mr.image_url)}),mr.user_received===!1||mr.click_event==="Link"?t.a.createElement("p",{className:O.a.receiveclick,onClick:function(){return qe(mr)}},"\u70B9\u51FB\u9886\u53D6"):t.a.createElement("p",{className:O.a.receivealready},"\u5DF2\u7ECF\u9886\u53D6"))})))}var ee=ie,le=function(Ze,ht){var gt=Ze.StaffDetail,Wt=Ze.HeaderDetail,At=Ze.ItemData,Jt=Ze.setIssee,Lt=Ze.ModelType,ct=Ze.dispatch,nt=Ze.userinfo,it=Ze.Editable,_t=Object(o.useState)(!1),Rt=Object(m.a)(_t,2),Ct=Rt[0],Ot=Rt[1],Pt=Object(o.useState)([]),jt=Object(m.a)(Pt,2),Ve=jt[0],nr=jt[1],Yt=Object(o.useState)(""),Qt=Object(m.a)(Yt,2),It=Qt[0],zt=Qt[1],Ut=Object(o.useState)(""),Ht=Object(m.a)(Ut,2),xr=Ht[0],Nr=Ht[1],Dr=Object(o.useState)(!1),Br=Object(m.a)(Dr,2),Wr=Br[0],on=Br[1],qe=Object(S.i)(),er=qe.identifier,sn=Object(o.useRef)(null),en=Object(o.useRef)(null);sn.current=gt==null?void 0:gt.enrolled,Object(o.useEffect)(function(){var wt;return(wt=en.current)===null||wt===void 0||wt.addEventListener("click",mr),function(){var Bt;(Bt=en.current)===null||Bt===void 0||Bt.removeEventListener("click",mr)}},[]);var mr=function(Bt){var tr;if((Bt==null||((tr=Bt.target)===null||tr===void 0)?void 0:tr.id)==="modal-upload"){if(!Object(ae.e)(ct))return;if(!sn.current){C.a.info({title:"\u63D0\u793A",centered:!0,okText:"\u6211\u77E5\u9053\u4E86",content:"\u8BF7\u5148\u62A5\u540D\uFF0C\u518D\u63D0\u4EA4\u4F5C\u54C1"});return}Ot(!0)}};Object(o.useEffect)(function(){if(Wt!=null&&Wt.upload_file){var wt,Bt,tr;nr([{name:Wt==null||((wt=Wt.upload_file)===null||wt===void 0)?void 0:wt.title,status:"done",uid:"123456789"}]),Nr(Wt==null?void 0:Wt.upload_file_url),zt(Wt==null||((Bt=Wt.upload_file)===null||Bt===void 0||((tr=Bt.url)===null||tr===void 0))?void 0:tr.split("/")[3])}},[Wt==null?void 0:Wt.upload_file]);var dr={name:"file",multiple:!1,withCredentials:!0,action:K.a.API_SERVER+"/api/attachments.json",showUploadList:{showRemoveIcon:!1},fileList:Ve,onChange:function(Bt){var tr=Bt.file.status,Gt=[Object(L.a)({},Bt.file)];if(nr(Gt),Bt.file.status==="uploading"&&on(!0),tr==="done"){var ut,dt;zt((ut=Gt[0])===null||ut===void 0||((dt=ut.response)===null||dt===void 0)?void 0:dt.id),on(!1)}tr==="error"&&(nr([]),on(!1))},beforeUpload:function(Bt){var tr=Bt.size/1024/1024<1e3;return tr?Promise.resolve():(p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E1000MB"),Promise.reject())}},vr=function(){Ot(!0)};return Object(o.useImperativeHandle)(ht,function(){return{handleVisible:vr}}),t.a.createElement("div",{ref:en},Lt==="reward"?t.a.createElement(ee,{userlist:nt,dispatch:ct,rewarddata:At.reward_setting,is_signed:At.is_signed}):null,t.a.createElement("div",{style:{textAlign:"right"}},((nt==null?void 0:nt.admin)||(nt==null?void 0:nt.business)||it)&&t.a.createElement(w.a,{onClick:function(){return Jt(!1)}},"\u7F16\u8F91")),t.a.createElement(B.a,{value:At.md_content}),At&&At.attachments&&At.attachments.map(function(wt,Bt){return t.a.createElement("div",null,t.a.createElement("a",{href:(K.a===null||K.a===void 0?void 0:K.a.API_SERVER)+wt.url,target:"_self",download:wt.title},t.a.createElement("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),t.a.createElement("span",{style:{color:"#000000"}},wt.title),t.a.createElement("span",{style:{color:"#000000",marginLeft:"10px"}},wt.filesize)))}),t.a.createElement(C.a,{centered:!0,title:"\u4E0A\u4F20\u4F5C\u54C1",visible:Ct,okText:"\u63D0\u4EA4\u4F5C\u54C1",cancelText:"\u53D6\u6D88",confirmLoading:Wr,onCancel:function(){return Ot(!1)},onOk:Object(c.a)(n.a.mark(function wt(){var Bt;return n.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(!(!It&&!xr)){Gt.next=3;break}return Ot(!1),Gt.abrupt("return");case 3:return on(!0),Gt.next=6,Object(q.a)("/api/competitions/".concat(er,"/upload_file.json"),{method:"post",body:{attachment_id:It,upload_file_url:xr}});case 6:Bt=Gt.sent,Bt.status===0&&(Ot(!1),on(!1));case 8:case"end":return Gt.stop()}},wt)}))},t.a.createElement("div",null,t.a.createElement(W.a,{align:"middle",className:"mb20"},t.a.createElement("span",null,"\u4F5C\u54C1\u94FE\u63A5\uFF1A"),t.a.createElement(U.a,{style:{width:416},value:xr,onChange:function(Bt){var tr;return Nr((tr=Bt.target)===null||tr===void 0?void 0:tr.value)}})),t.a.createElement(W.a,{align:"top"},t.a.createElement("span",{style:{lineHeight:"28px"}},"\u4F5C\u54C1\u6587\u4EF6\uFF1A"),t.a.createElement(y.a,dr,t.a.createElement(w.a,{type:"primary",className:"mb10"},"\u4E0A\u4F20\u4F5C\u54C1"))))))},Q=Object(o.forwardRef)(le),Z=k("Ot1p"),be=k("hJwl");function te(pt){var Ze=pt.ItemData,ht=pt.setIssee,gt=pt.MenuItem,Wt=pt.dispatch,At=pt.identifier,Jt=pt.ModelType,Lt=pt.userinfo,ct=pt.getrightdatas,nt=Object(o.useState)([]),it=Object(m.a)(nt,2),_t=it[0],Rt=it[1],Ct=Object(o.useState)(Ze.md_content),Ot=Object(m.a)(Ct,2),Pt=Ot[0],jt=Ot[1];Object(o.useEffect)(function(){var zt,Ut=[];Ze==null||((zt=Ze.attachments)===null||zt===void 0)||zt.map(function(Ht){var xr={uid:Ht.id,name:Ht.title,response:{id:Ht.id}};Ut.push(xr)}),Rt(Ut)},[Ze==null?void 0:Ze.attachments]);function Ve(){var zt,Ut=[];return Ze==null||((zt=Ze.attachments)===null||zt===void 0)||zt.map(function(Ht){var xr={uid:Ht==null?void 0:Ht.id,name:Ht.title,response:{id:Ht.id}};Ut.push(xr)}),Ut}var nr={name:"file",multiple:!0,withCredentials:!0,action:K.a.API_SERVER+"/api/attachments.json",defaultFileList:Ve(),onRemove:function(Ut){Object(be.t)({id:Ut.uid})},onChange:function(Ut){var Ht=Ut.file.status;Ht!=="uploading",Ht==="removed"&&Rt(Ut.fileList),Ht==="done"?(Rt(Ut.fileList),p.b.success("".concat(Ut.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))):Ht==="error"&&p.b.error("".concat(Ut.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Ut){var Ht=Ut.size/1024/1024<150;return Ht||p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Ht}};console.log(nr);function Yt(){return Qt.apply(this,arguments)}function Qt(){return Qt=Object(c.a)(n.a.mark(function zt(){var Ut;return n.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,Wt({type:"competitions/updateMdContent",payload:{attachment_ids:It(_t),competition_module_id:Ze.id,md_content_id:Ze.md_id,content:Pt,identifier:At}});case 2:Ut=xr.sent,Ut&&(p.b.info("\u63D0\u4EA4\u6210\u529F"),ht(!0),ct(gt));case 4:case"end":return xr.stop()}},zt)})),Qt.apply(this,arguments)}function It(zt){var Ut=[];return zt&&zt.map(function(Ht){Ut.push(Ht.response.id)}),Ut}return t.a.createElement("div",null,Jt==="reward"?t.a.createElement(ee,{userlist:Lt,dispatch:Wt,rewarddata:Ze.reward_setting,is_signed:Ze.is_signed}):null,t.a.createElement(Z.a,{defaultValue:Pt,onChange:function(Ut){return jt(Ut)}}),t.a.createElement(y.a,nr,t.a.createElement(w.a,{className:"uploadBtn"},"\u4E0A\u4F20\u9644\u4EF6"),"(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Yt()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return ht(!0)}},"\u53D6\u6D88")))}var $=te,X=k("g9YV"),Y=k("wCAj"),ve=k("Znn+"),ue=k("ZTPi");function Ee(){return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/competitions/trophy.png"}),t.a.createElement("p",null,"\u8981\u6293\u4F4F\u4E00\u5207\u673A\u4F1A\uFF0C\u5411\u6240\u6709\u4EBA\u8BC1\u660E\u81EA\u5DF1\uFF0C\u8BC1\u660E\u4F60\u80FD\u591F\u8FCE\u63A5\u8363\u8000")))}var Ke=Ee,Ye=k("5Dmo"),Je=k("3S7+"),tt=k("jCWc"),at=k("kPKH"),lt=k("IzEo"),je=k("bx4M");function Ce(pt){var Ze=pt.oneItem,ht=pt.towItem,gt=pt.threeItem;return t.a.createElement("div",{style:{textAlign:"center"}},t.a.createElement(W.a,{gutter:16,style:{justifyContent:"center"}},t.a.createElement(at.a,{span:6,style:{marginTop:"30px",marginRight:"20px"}},t.a.createElement(je.a,{title:t.a.createElement("div",{className:O.a.towtop},t.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan-two.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(ht==null?void 0:ht.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(ht==null?void 0:ht.user_image)}),(ht==null?void 0:ht.competition_prize)&&t.a.createElement("p",{className:O.a.prize},ht==null?void 0:ht.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},ht==null?void 0:ht.record_user_name)))),className:O.a.towdiv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},ht==null?void 0:ht.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},ht==null?void 0:ht.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(ht==null?void 0:ht.extra_score)+parseFloat(ht==null?void 0:ht.score),"\u5206"))),t.a.createElement(at.a,{span:6},t.a.createElement(je.a,{title:t.a.createElement("div",{className:O.a.onetop},t.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(Ze==null?void 0:Ze.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(Ze==null?void 0:Ze.user_image)}),(Ze==null?void 0:Ze.competition_prize)&&t.a.createElement("p",{className:O.a.prize},Ze==null?void 0:Ze.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},Ze==null?void 0:Ze.record_user_name)))),className:O.a.onediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},Ze==null?void 0:Ze.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},Ze==null?void 0:Ze.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(Ze==null?void 0:Ze.extra_score)+parseFloat(Ze==null?void 0:Ze.score),"\u5206"))),t.a.createElement(at.a,{span:6,style:{marginTop:"40px",marginLeft:"20px"}},t.a.createElement(je.a,{title:t.a.createElement("div",{className:O.a.threetop},t.a.createElement("img",{style:{marginTop:"20px"},src:K.a.IMG_SERVER+"/images/educoder/huangguan-three.png"}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(x.a,{to:"/users/".concat(gt==null?void 0:gt.user_login,"/classrooms")},t.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(gt==null?void 0:gt.user_image)}),(gt==null?void 0:gt.competition_prize)&&t.a.createElement("p",{className:O.a.prize},gt==null?void 0:gt.competition_prize),t.a.createElement("p",{style:{color:"#05101a",fontSize:"16px",marginTop:"10px"}},gt==null?void 0:gt.record_user_name)))),className:O.a.threediv,bordered:!1},t.a.createElement("p",{style:{fontSize:"14px"}},gt==null?void 0:gt.school_name),t.a.createElement("p",{style:{fontSize:"18px"}},gt==null?void 0:gt.spend_time),t.a.createElement("p",{style:{fontSize:"26px",color:"#a55b29"}},parseFloat(gt==null?void 0:gt.extra_score)+parseFloat(gt==null?void 0:gt.score),"\u5206")))))}var Qe=Ce;function st(pt){var Ze,ht,gt,Wt,At,Jt,Lt,ct,nt,it,_t,Rt,Ct,Ot,Pt,jt,Ve,nr,Yt,Qt,It,zt,Ut,Ht,xr,Nr,Dr,Br,Wr,on,qe=pt.ItemData;return t.a.createElement("div",null,t.a.createElement("p",{style:{fontSize:"24px",color:"#05101a"}},"\u603B\u6392\u884C"),t.a.createElement(Qe,{oneItem:qe==null?void 0:qe.teams[0],towItem:qe==null?void 0:qe.teams[1],threeItem:qe==null?void 0:qe.teams[2]}),(qe==null||((Ze=qe.user_ranks)===null||Ze===void 0)?void 0:Ze.length)>0&&t.a.createElement("div",{className:O.a.myTeam},(qe==null||((ht=qe.user_ranks)===null||ht===void 0||((gt=ht[0])===null||gt===void 0))?void 0:gt.success)===!1?t.a.createElement("span",{style:{marginRight:"70px",padding:"10px"}},t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u664B\u7EA7\uFF1A",t.a.createElement("span",{style:{color:(qe==null||((Wt=qe.user_ranks)===null||Wt===void 0||((At=Wt[0])===null||At===void 0))?void 0:At.success)===!1?"red":"green"}},(qe==null||((Jt=qe.user_ranks)===null||Jt===void 0||((Lt=Jt[0])===null||Lt===void 0))?void 0:Lt.success)===!1?"\u5426":qe!=null&&(ct=qe.user_ranks)!==null&&ct!==void 0&&(nt=ct[0])!==null&&nt!==void 0&&nt.success?"\u662F":"")),(qe==null||((it=qe.user_ranks)===null||it===void 0||((_t=it[0])===null||_t===void 0))?void 0:_t.awards)&&t.a.createElement("p",{style:{marginBottom:"0px"}}," \u662F\u5426\u83B7\u5956\uFF1A",t.a.createElement("span",null,(qe==null||((Rt=qe.user_ranks)===null||Rt===void 0||((Ct=Rt[0])===null||Ct===void 0))?void 0:Ct.awards)==="percent_20"?"\u4E8C\u7B49\u5956":(qe==null||((Ot=qe.user_ranks)===null||Ot===void 0||((Pt=Ot[0])===null||Pt===void 0))?void 0:Pt.awards)==="percent_30"?"\u4E09\u7B49\u5956":"\u6CA1\u6709\u83B7\u5F97\u5956\u9879"))):t.a.createElement("span",{style:{marginRight:"70px"}},"\u6211\u7684\u6392\u540D\uFF1A",qe==null||((jt=qe.user_ranks)===null||jt===void 0||((Ve=jt[0])===null||Ve===void 0))?void 0:Ve.rank),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Je.a,{title:"\u6218\u961F\u540D"},qe==null||((nr=qe.user_ranks)===null||nr===void 0||((Yt=nr[0])===null||Yt===void 0))?void 0:Yt.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Je.a,{title:"\u65F6\u95F4"},qe==null||((Qt=qe.user_ranks)===null||Qt===void 0||((It=Qt[0])===null||It===void 0))?void 0:It.cost_time)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Je.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},qe==null||((zt=qe.user_ranks)===null||zt===void 0||((Ut=zt[0])===null||Ut===void 0))?void 0:Ut.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Je.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},qe==null||((Ht=qe.user_ranks)===null||Ht===void 0||((xr=Ht[0])===null||xr===void 0))?void 0:xr.score)),t.a.createElement("span",null,t.a.createElement(Je.a,{title:"\u603B\u5206"},parseFloat(qe==null||((Nr=qe.user_ranks)===null||Nr===void 0||((Dr=Nr[0])===null||Dr===void 0))?void 0:Dr.extra_score)+parseFloat(qe==null||((Br=qe.user_ranks)===null||Br===void 0||((Wr=Br[0])===null||Wr===void 0))?void 0:Wr.score)||0))),qe==null||((on=qe.teams)===null||on===void 0)?void 0:on.map(function(er,sn){return t.a.createElement("div",{className:O.a.bottomItem},t.a.createElement("span",{style:{color:"#0152d9",marginRight:"20px"}},sn+1),t.a.createElement(x.a,{to:"/users/".concat(er==null?void 0:er.user_login,"/classrooms"),style:{marginRight:"80px",position:"relative"}},t.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(er==null?void 0:er.user_image)}),(er==null?void 0:er.competition_prize)&&t.a.createElement("span",{className:O.a.spanrightradius},er==null?void 0:er.competition_prize)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Je.a,{title:"\u6218\u961F\u540D"},er==null?void 0:er.team_name)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Je.a,{title:"\u5355\u4F4D/\u5B66\u6821\u540D"},er.school_name)),t.a.createElement("span",{style:{flex:1,textAlign:"center"}},t.a.createElement(Je.a,{title:"\u8D4B\u80FD\u8D5B\u52A0\u5206"},er.extra_score)),t.a.createElement("span",{style:{flex:1}},t.a.createElement(Je.a,{title:"\u6BD4\u8D5B\u6210\u7EE9"},er.score)),t.a.createElement("span",{style:{color:"#0152d9"}},t.a.createElement(Je.a,{title:"\u603B\u5206"},parseFloat(er.extra_score)+parseFloat(er.score))))}))}var Ge=st,rt=ue.a.TabPane;function Re(pt){var Ze,ht,gt,Wt,At,Jt,Lt=pt.ChartRules,ct=pt.ItemData,nt=pt.getCharts,it=pt.Selectkey,_t=pt.getChartRules,Rt=pt.userinfo,Ct=pt.Editable,Ot=pt.HeaderDetail,Pt=Object(o.useState)(!1),jt=Object(m.a)(Pt,2),Ve=jt[0],nr=jt[1],Yt=Object(o.useState)(""),Qt=Object(m.a)(Yt,2),It=Qt[0],zt=Qt[1],Ut=Object(o.useState)(!0),Ht=Object(m.a)(Ut,2),xr=Ht[0],Nr=Ht[1],Dr=Object(o.useState)(),Br=Object(m.a)(Dr,2),Wr=Br[0],on=Br[1],qe=Object(o.useState)(),er=Object(m.a)(qe,2),sn=er[0],en=er[1],mr=Object(S.i)(),dr=mr.identifier;Object(o.useEffect)(function(){if(xr){var tr,Gt=Lt==null||((tr=Lt.stages)===null||tr===void 0)?void 0:tr[0];if(on(Gt),Gt!=null&&Gt.id){var ut,dt,Dt;((Ot==null?void 0:Ot.task)==="mAP"||(Ot==null?void 0:Ot.task)==="dog")&&nt(Gt==null?void 0:Gt.id),zt(((ut=Lt.rule_contents)===null||ut===void 0||((dt=ut.filter(function(Hr){return parseInt(Hr.competition_stage_id)===parseInt(Gt==null?void 0:Gt.id)}))===null||dt===void 0||((Dt=dt[0])===null||Dt===void 0))?void 0:Dt.content)||"")}else{var bt,fr,jr;(Ot==null?void 0:Ot.task)==="mAP"||(Ot==null?void 0:Ot.task)==="dog",zt(((bt=Lt.rule_contents)===null||bt===void 0||((fr=bt.filter(function(Hr){return parseInt(Hr.competition_stage_id)===0}))===null||fr===void 0||((jr=fr[0])===null||jr===void 0))?void 0:jr.content)||"")}}},[Lt]);function vr(){return wt.apply(this,arguments)}function wt(){return wt=Object(c.a)(n.a.mark(function tr(){var Gt,ut,dt,Dt,bt,fr,jr,Hr,cr;return n.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:if(It){yr.next=3;break}return p.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),yr.abrupt("return");case 3:if(Nr(!1),Gt=Wr==null?void 0:Wr.id,!Gt){yr.next=12;break}return yr.next=8,Object(q.a)("/api/competitions/".concat(dr,"/update_md_content.json"),{method:"post",body:{competition_module_id:it,content:It,md_content_id:(ut=Lt.rule_contents)===null||ut===void 0||((dt=ut.filter(function(Xr){return parseInt(Xr.competition_stage_id)===parseInt(Gt)}))===null||dt===void 0||((Dt=dt[0])===null||Dt===void 0))?void 0:Dt.id,stage_id:Wr==null?void 0:Wr.id}});case 8:bt=yr.sent,bt.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),nr(!1),_t()),yr.next=16;break;case 12:return yr.next=14,Object(q.a)("/api/competitions/".concat(dr,"/update_md_content.json"),{method:"post",body:{competition_module_id:it,content:It,md_content_id:(fr=Lt.rule_contents)===null||fr===void 0||((jr=fr.filter(function(Xr){return parseInt(Xr.competition_stage_id)===0}))===null||jr===void 0||((Hr=jr[0])===null||Hr===void 0))?void 0:Hr.id,stage_id:Wr==null?void 0:Wr.id}});case 14:cr=yr.sent,cr.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),nr(!1),_t());case 16:case"end":return yr.stop()}},tr)})),wt.apply(this,arguments)}var Bt=[{title:"\u6392\u540D",dataIndex:"name",align:"center",key:"name",render:function(Gt,ut,dt){return t.a.createElement("span",null,dt+1)}},{title:"\u5934\u50CF",dataIndex:"user_image",align:"center",key:"user_image",render:function(Gt){return t.a.createElement("img",{className:O.a.imgradius,src:K.a.IMG_SERVER+"/images/".concat(Gt)})}},{title:"\u6218\u961F\u540D\u79F0",dataIndex:"team_name",key:"team_name",render:function(Gt){return t.a.createElement("span",{title:Gt},Gt&&(Gt==null?void 0:Gt.length)>=15?(Gt==null?void 0:Gt.substr(0,15))+"...":Gt||"--")}},{title:"\u5355\u4F4D",dataIndex:"school_name",key:"school_name",align:"center",render:function(Gt){return t.a.createElement("span",null,Gt||"--")}},{title:(Ot==null?void 0:Ot.task)==="mAP"?"mAP\u6307\u6807":(Ot==null?void 0:Ot.task)==="Jittor-3"?"\u603B\u5206":"top1\u6307\u6807",dataIndex:"score",key:"score",render:function(Gt){return t.a.createElement("span",null,Gt||"--")}}];return t.a.createElement("div",null,(Lt==null||((Ze=Lt.stages)===null||Ze===void 0)?void 0:Ze.length)>0?null:t.a.createElement(Ke,null),(Lt==null||((ht=Lt.stages)===null||ht===void 0)?void 0:ht.length)>0&&t.a.createElement(ue.a,{animated:!0,tabBarExtraContent:((Rt==null?void 0:Rt.admin)||(Rt==null?void 0:Rt.business)||Ct)&&t.a.createElement(w.a,{onClick:function(){nr(!0)}},"\u7F16\u8F91"),onChange:function(Gt){var ut,dt,Dt,bt,fr;nr(!1);var jr=Lt==null||((ut=Lt.stages)===null||ut===void 0)?void 0:ut.filter(function(cr){return parseInt(Gt)===parseInt(cr==null?void 0:cr.id)})[0];on(jr);var Hr=jr==null||((dt=jr.children)===null||dt===void 0)?void 0:dt[0];en(Hr),zt(((Dt=Lt.rule_contents)===null||Dt===void 0||((bt=Dt.filter(function(cr){return parseInt(cr.competition_stage_id)===parseInt(jr==null?void 0:jr.id)}))===null||bt===void 0||((fr=bt[0])===null||fr===void 0))?void 0:fr.content)||""),nt((Hr==null?void 0:Hr.id)||Gt)}},Lt&&Lt.stages.map(function(tr,Gt){return t.a.createElement(rt,{tab:tr.name,key:tr.id===null?0:tr.id},Ve===!1&&Lt&&Lt.rule_contents.map(function(ut,dt){if(tr.id===ut.competition_stage_id)return t.a.createElement(B.a,{key:dt,value:ut.content===void 0||ut.content===null?"":ut.content});if(tr.id===null&&ut.competition_stage_id===0)return t.a.createElement(B.a,{key:dt,value:ut.content===void 0||ut.content===null?"":ut.content})}))})),(Wr==null||((gt=Wr.children)===null||gt===void 0)?void 0:gt.length)>0&&t.a.createElement(ue.a,{activeKey:(sn==null?void 0:sn.id)+"",onChange:function(Gt){var ut,dt=Wr==null||((ut=Wr.children)===null||ut===void 0)?void 0:ut.filter(function(Dt){return parseInt(Gt)===parseInt(Dt==null?void 0:Dt.id)})[0];en(dt),nt(Gt)}},Wr==null||((Wt=Wr.children)===null||Wt===void 0)?void 0:Wt.map(function(tr,Gt){return t.a.createElement(rt,{tab:tr.name,key:tr.id===null?0:tr.id})})),Ve&&t.a.createElement("div",null,t.a.createElement(Z.a,{defaultValue:It,onChange:function(Gt){zt(Gt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return vr()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return nr(!1)}},"\u53D6\u6D88"))),(ct==null||((At=ct.teams)===null||At===void 0)?void 0:At.length)>0&&((Ot==null?void 0:Ot.task)==="mAP"||(Ot==null?void 0:Ot.task)==="dog"||(Ot==null?void 0:Ot.task)==="Jittor-3")?t.a.createElement(Y.a,{dataSource:ct==null?void 0:ct.teams,columns:Bt,pagination:!1}):(ct==null||((Jt=ct.teams)===null||Jt===void 0)?void 0:Jt.length)>0&&t.a.createElement(Ge,{ItemData:ct}))}var Se=Re,De=k("/zsF"),fe=k("PArb");function ye(pt){var Ze,ht,gt,Wt,At,Jt,Lt,ct=pt.Prize,nt=Object(S.i)(),it=Object(o.useState)([{type:1,name:"\u56E2\u4F53\u5956\u8BC1\u4E66"},{type:2,name:"\u4E2A\u4EBA\u5956\u8BC1\u4E66"},{type:3,name:"\u4F18\u79C0\u6307\u5BFC\u6559\u5E08\u8BC1\u4E66"}]),_t=Object(m.a)(it,2),Rt=_t[0],Ct=_t[1],Ot=function(){var Pt=Object(c.a)(n.a.mark(function jt(Ve){var nr;return n.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return Qt.next=2,Object(be.u)({type:Ve.type,id:nt.identifier});case 2:nr=Qt.sent,(nr==null?void 0:nr.status)===0&&(location.href="/competitions/exports?id=".concat(nt.identifier,"&type=").concat(Ve.type));case 4:case"end":return Qt.stop()}},jt)}));return function(Ve){return Pt.apply(this,arguments)}}();return t.a.createElement("div",null,t.a.createElement("p",{className:O.a.downloadpdf},"\u6E29\u99A8\u63D0\u793A\uFF1A\u586B\u5199\u7684\u4E2A\u4EBA\u4FE1\u606F\u7ECF\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u4E2A\u4EBA\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\uFF1B\u56E2\u961F\u961F\u5458\u4FE1\u606F\u5168\u90E8\u5BA1\u6279\u540E\uFF0C\u5C06\u63D0\u4F9B\u56E2\u961F\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D\u3002"),t.a.createElement("p",{style:{marginTop:"30px",fontSize:"16px",color:"#000"}},"\u8BC1\u4E66\u60C5\u51B5"),(ct==null||((Ze=ct.personal_certifications)===null||Ze===void 0)?void 0:Ze.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:K.a.API_SERVER+"".concat(ct==null||((ht=ct.personal_certifications[0])===null||ht===void 0)?void 0:ht.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u4E2A\u4EBA\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210"),t.a.createElement("span",{style:{marginLeft:"20px"}},"\u539F\u56E0\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u7EC4\u59D4\u4F1A\u672A\u5B8C\u6210\u8BC1\u4E66\u5BA1\u6279\uFF0C\u8BF7\u7A0D\u540E")),(ct==null||((gt=ct.team_certifications)===null||gt===void 0)?void 0:gt.length)>0?t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A"),t.a.createElement("img",{src:K.a.IMG_SERVER+"/images/educoder/pdfs.png"}),t.a.createElement("a",{style:{marginLeft:"5px"},href:K.a.API_SERVER+"".concat(ct==null||((Wt=ct.team_certifications[0])===null||Wt===void 0)?void 0:Wt.url)},"\u7ACB\u5373\u4E0B\u8F7D")):t.a.createElement("p",null,t.a.createElement("span",null,"\u56E2\u961F\u8BC1\u4E66\uFF1A")," ",t.a.createElement("span",{style:{color:"#000"}},"\u6682\u672A\u751F\u6210")),t.a.createElement(fe.a,null),(ct==null||((At=ct.teams)===null||At===void 0)?void 0:At.length)>0?t.a.createElement("div",null,t.a.createElement("p",null,(ct==null?void 0:ct.teams)&&(ct==null||((Jt=ct.teams[0])===null||Jt===void 0)?void 0:Jt.name),"\u6218\u961F\u4FE1\u606F\u586B\u62A5\u6982\u51B5"),t.a.createElement("p",{style:{display:"flex",height:"50px",background:"#f5f5f5",alignItems:"center",justifyContent:"space-around"}},t.a.createElement("span",{style:{width:"5%"}},"\u89D2\u8272"),t.a.createElement("span",{style:{width:"5%"}},"\u59D3\u540D"),t.a.createElement("span",{style:{width:"10%"}},"\u5B9E\u540D\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u804C\u4E1A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},"\u624B\u673A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},"\u90AE\u7BB1\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},"\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7\u4FE1\u606F\uFF08\u961F\u957F\u586B\u5199\uFF09")),(ct==null?void 0:ct.teams)&&(ct==null||((Lt=ct.teams[0])===null||Lt===void 0)?void 0:Lt.team_members.map(function(Pt,jt){var Ve,nr,Yt,Qt,It,zt;return t.a.createElement("p",{className:O.a.teamItem},t.a.createElement("span",{style:{width:"5%"}},Pt==null?void 0:Pt.role),t.a.createElement("span",{style:{width:"5%"}},Pt==null?void 0:Pt.name),t.a.createElement("span",{style:{width:"10%"}},(Pt==null?void 0:Pt.real_name_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Pt==null?void 0:Pt.real_name_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},(Pt==null?void 0:Pt.professional_auth)==="authed"?"\u5DF2\u8BA4\u8BC1":(Pt==null?void 0:Pt.professional_auth)==="authing"?"\u5F85\u5BA1\u6838":"\u672A\u8BA4\u8BC1"),t.a.createElement("span",{style:{width:"10%"}},Pt!=null&&Pt.phone_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),t.a.createElement("span",{style:{width:"10%"}},Pt!=null&&Pt.email_binded?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),(Pt==null?void 0:Pt.role)==="\u961F\u957F"?t.a.createElement("span",{style:{width:"50%",textAlign:"center"}},(ct==null?void 0:ct.teams)&&(ct==null||((Ve=ct.teams[0])===null||Ve===void 0||((nr=Ve.bank_account)===null||nr===void 0))?void 0:nr.bank),(ct==null?void 0:ct.teams)&&(ct==null||((Yt=ct.teams[0])===null||Yt===void 0||((Qt=Yt.bank_account)===null||Qt===void 0))?void 0:Qt.second_bank),(ct==null?void 0:ct.teams)&&(ct==null||((It=ct.teams[0])===null||It===void 0||((zt=It.bank_account)===null||zt===void 0))?void 0:zt.card_no)):t.a.createElement("span",{style:{width:"50%"}}))}))):null,t.a.createElement(W.a,{gutter:[20,20]},Rt.map(function(Pt,jt){return t.a.createElement(at.a,{key:jt},t.a.createElement(w.a,{type:"primary",onClick:function(){return Ot(Pt)}},Pt.name))})))}var _e=ye,Ae=k("0Owb"),We=k("7Kak"),Xe=k("9yH6"),ft=k("y8nQ"),vt=k("Vl3Y"),Kt=k("1vsH"),kt=k("Dgm7"),Or=k.n(kt),pr=k("NnUe"),Et=k.n(pr),Yr=y.a.Dragger,kr=10,Ur=function(Ze){var ht=Ze.user,gt=Ze.account,Wt=Ze.globalSetting,At=Ze.loading,Jt=Ze.dispatch,Lt=Object(g.a)(Ze,["user","account","globalSetting","loading","dispatch"]),ct=vt.a.useForm(),nt=Object(m.a)(ct,1),it=nt[0],_t=Object(o.useState)({}),Rt=Object(m.a)(_t,2),Ct=Rt[0],Ot=Rt[1],Pt=Object(o.useState)(!0),jt=Object(m.a)(Pt,2),Ve=jt[0],nr=jt[1],Yt=Object(o.useState)(),Qt=Object(m.a)(Yt,2),It=Qt[0],zt=Qt[1],Ut=Object(o.useState)(),Ht=Object(m.a)(Ut,2),xr=Ht[0],Nr=Ht[1],Dr=Object(o.useState)(),Br=Object(m.a)(Dr,2),Wr=Br[0],on=Br[1],qe=Object(o.useState)(),er=Object(m.a)(qe,2),sn=er[0],en=er[1];Object(o.useEffect)(function(){if(!gt.basicInfo)return;var Gt=gt.basicInfo,ut={name:Gt.show_realname?Gt.name:Object(Kt.F)(Gt.name),gender:Gt.gender};zt(Gt.name),nr(Gt.show_realname),it.setFieldsValue(ut),Ot(ut)},[gt.basicInfo]);var mr=function(ut){if(ut.file.status==="uploading"){en(!0);return}if(ut.file.status==="done"){var dt;console.log(ut.file,ut.file.response),on((dt=ut.file.response)===null||dt===void 0?void 0:dt.id),Object(Kt.C)(ut.file.originFileObj,function(Dt){Nr(Dt),en(!1)})}},dr=function(ut){Ot(Object(L.a)({},it.getFieldsValue())),"name"in ut&&zt(ut.name)},vr=function(){var ut=!Ve;nr(ut);var dt=ut?It:Object(Kt.F)(It);it.setFieldsValue({name:dt})},wt=function(){var Gt=Object(c.a)(n.a.mark(function ut(dt){var Dt,bt,fr,jr,Hr,cr,Lr,yr;return n.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:if(fr=dt||{},jr=fr.name,Hr=fr.gender,cr=fr.idNumber,xr){Tr.next=4;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Tr.abrupt("return");case 4:return Tr.next=6,Jt({type:"account/applyRealNameAuth",payload:{id:((Dt=gt.basicInfo)===null||Dt===void 0?void 0:Dt.id)||((bt=ht.userInfo)===null||bt===void 0?void 0:bt.login),name:jr,gender:Hr,id_number:cr,show_realname:Ve,attachment_ids:[Wr]}});case 6:Lr=Tr.sent,Bt(),Lr&&(p.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),Jt({type:"account/getBasicInfo",payload:{login:(yr=ht.userInfo)===null||yr===void 0?void 0:yr.login}}));case 9:case"end":return Tr.stop()}},ut)}));return function(dt){return Gt.apply(this,arguments)}}(),Bt=function(){Jt({type:"account/setActionTabs",payload:{}})},tr={data:{type:"real_name"},multiple:!0,showUploadList:!1,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),className:Et.a.uploader,onChange:mr,beforeUpload:function(ut){var dt=ut.type==="image/jpeg"||ut.type==="image/png"||ut.type==="image/jpg"||ut.type==="image/bmp";return dt||p.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),dt}};return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:gt.actionTabs.key==="Account-RealNameAuth",title:"\u4FEE\u6539\u5B9E\u540D\u4FE1\u606F",width:"600px",footer:null},t.a.createElement(i.a,{spinning:!!sn},t.a.createElement(vt.a,{className:Et.a.formWrap,form:it,layout:"horizontal",onValuesChange:dr,onFinish:wt},t.a.createElement(vt.a.Item,{label:"\u59D3\u540D",name:"name",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(kr,"\u4E2A\u5B57\u7B26")},{validator:Kt.I}],extra:t.a.createElement("span",null,Ve?"\uFF08\u663E\u793A\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u60A8\u7684\u771F\u5B9E\u59D3\u540D\uFF09":"\uFF08\u9690\u85CF\uFF1A\u5E73\u53F0\u5C06\u663E\u793A\u4F60\u7684\u6635\u79F0\uFF09")},t.a.createElement(U.a,{disabled:!Ve,placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(kr,"\u4E2A\u5B57\u7B26"),maxLength:kr,addonAfter:t.a.createElement("i",{className:"iconfont ".concat(Ve?"icon-xianshi":"icon-yincang"," font18 ").concat(Et.a.color0152d9),onClick:vr})})),t.a.createElement(vt.a.Item,{label:"\u6027\u522B\uFF1A",name:"gender",labelCol:{span:3},wrapperCol:{span:12},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B"}]},t.a.createElement(Xe.a.Group,null,t.a.createElement(Xe.a,{value:0},"\u7537"),t.a.createElement(Xe.a,{value:1},"\u5973"))),t.a.createElement(vt.a.Item,{label:"\u8BC1\u4EF6\u53F7\uFF1A",labelCol:{span:3},name:"idNumber",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7"})),t.a.createElement(vt.a.Item,{label:"\u8EAB\u4EFD\u8BC1\u4E0A\u4F20",labelCol:{span:3}},t.a.createElement("div",{className:Et.a.flexRow},t.a.createElement("div",{className:"".concat(Et.a.flexColumn," ").concat(Et.a.example)},t.a.createElement("span",{className:Et.a.exampleImg},t.a.createElement("img",{src:Or.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(Et.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:Et.a.flexColumn},t.a.createElement(Yr,Object(Ae.a)({},tr,{accept:".png,.jpg,.bmp,.jpeg"}),xr?t.a.createElement("img",{src:xr,className:Et.a.uploadImg}):t.a.createElement("div",{className:Et.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Et.a.uploadTipIcon)})),t.a.createElement("p",{className:Et.a.uploadTip},t.a.createElement("a",{className:Et.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:Et.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:Et.a.footerWrap},t.a.createElement(vt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:Bt},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:At["account/applyRealNameAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:Et.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u4F60\u9700\u8981\u51C6\u5907\u6709\u6548\u7684\u8EAB\u4EFD\u8BC1\u6B63\u9762\uFF08\u4EBA\u50CF\u9762\uFF09\u7684\u8BC1\u4EF6\u7167\u7167\u7247\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u7247\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u8BA4\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B"),t.a.createElement("p",null,"4.\u5B9E\u540D\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u8BC1\u4EF6\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u5B9E\u540D\u8BA4\u8BC1\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3EduCoder\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u63D0\u4EA4\u5B9E\u540D\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))))},dn=Object(s.a)(function(pt){var Ze=pt.user,ht=pt.account,gt=pt.loading,Wt=pt.globalSetting;return{user:Ze,account:ht,globalSetting:Wt,loading:gt.effects}})(Ur),br=k("O3gP"),qr=k("lrIw"),Zr=k("KXlV"),Ar=k.n(Zr),fn=k("Sjjz"),wn=k.n(fn),Kn=U.a.TextArea,nn=function(Ze){var ht=Ze.account,gt=Ze.globalSetting,Wt=Ze.loading,At=Ze.dispatch,Jt=Ze.schoolName,Lt=Ze.departmentName,ct=Ze.visible,nt=Ze.onClose,it=nt===void 0?function(){}:nt,_t=Ze.onSuccess,Rt=_t===void 0?function(){}:_t,Ct=Object(g.a)(Ze,["account","globalSetting","loading","dispatch","schoolName","departmentName","visible","onClose","onSuccess"]),Ot=vt.a.useForm(),Pt=Object(m.a)(Ot,1),jt=Pt[0],Ve=Object(o.useRef)();Object(o.useEffect)(function(){Ve.current=Ct.schoolId},[Ct.schoolId]),Object(o.useEffect)(function(){jt.setFieldsValue({department:Lt})},[Lt]);var nr=function(){var Yt=Object(c.a)(n.a.mark(function Qt(It){var zt,Ut,Ht,xr;return n.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return zt=It||{},Ut=zt.department,Ht=zt.remarks,Dr.next=3,At({type:"account/appplyDepartment",payload:{school_id:Ve.current,name:Ut,remarks:Ht}});case 3:xr=Dr.sent,it(),xr&&(p.b.success("\u65B0\u589E\u9662\u7CFB/\u90E8\u95E8\u6210\u529F\uFF01"),Rt(Ut));case 6:case"end":return Dr.stop()}},Qt)}));return function(It){return Yt.apply(this,arguments)}}();return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:ct,title:"\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(vt.a,{className:wn.a.formWrap,form:jt,labelCol:{span:4},wrapperCol:{span:20},onFinish:nr},t.a.createElement(vt.a.Item,{label:"\u5355\u4F4D\u540D\u79F0\uFF1A"},Jt),t.a.createElement(vt.a.Item,{label:"\u90E8\u95E8\u540D\u79F0\uFF1A",name:"department",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"}]},t.a.createElement(U.a,{placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"})),t.a.createElement(vt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(Kn,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:wn.a.footerWrap},t.a.createElement(vt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){it()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["account/appplyDepartment"]},"\u4FDD\u5B58")))))},ya=Object(s.a)(function(pt){var Ze=pt.account,ht=pt.loading,gt=pt.globalSetting;return{account:Ze,globalSetting:gt,loading:ht.effects}})(nn),Da=k("6UJt"),pn=k("DFOY"),qt=k("jO45"),Yn=k("jN4g"),ba=k("gJ3r"),zn=k("jwmR"),Gr=k.n(zn),kn=function(Ze,ht){return ht.some(function(gt){return gt.label.toLowerCase().indexOf(Ze.toLowerCase())>-1})},ha=U.a.TextArea,la=function(Ze){var ht=Ze.account,gt=Ze.globalSetting,Wt=Ze.loading,At=Ze.dispatch,Jt=Ze.schoolName,Lt=Ze.visible,ct=Ze.onClose,nt=ct===void 0?function(){}:ct,it=Ze.onSuccess,_t=it===void 0?function(){}:it,Rt=Object(g.a)(Ze,["account","globalSetting","loading","dispatch","schoolName","visible","onClose","onSuccess"]),Ct=vt.a.useForm(),Ot=Object(m.a)(Ct,1),Pt=Ot[0];Object(o.useEffect)(function(){Pt.setFieldsValue({name:Jt})},[Jt]);var jt=function(){var Ve=Object(c.a)(n.a.mark(function nr(Yt){var Qt,It,zt,Ut,Ht,xr,Nr;return n.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Qt=Yt||{},It=Qt.name,zt=Qt.city,Ut=zt===void 0?[]:zt,Ht=Qt.address,xr=Qt.remarks,Br.next=3,At({type:"account/appplySchool",payload:{name:It,province:Ut[0],city:Ut[1],address:Ht,remarks:xr}});case 3:Nr=Br.sent,nt(),Nr&&(p.b.success("\u65B0\u589E\u5B66\u6821/\u5355\u4F4D\u6210\u529F\uFF01"),_t(It));case 6:case"end":return Br.stop()}},nr)}));return function(Yt){return Ve.apply(this,arguments)}}();return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,visible:Lt,title:"\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",width:"600px",footer:null},t.a.createElement(vt.a,{className:Gr.a.formWrap,form:Pt,labelCol:{span:4},wrapperCol:{span:20},onFinish:jt},t.a.createElement(vt.a.Item,{label:"\u5355\u4F4D\u5168\u79F0\uFF1A",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"}]},t.a.createElement(U.a,{placeholder:"\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"})),t.a.createElement("div",{className:"".concat(Gr.a.flexRow," ").concat(Gr.a.example)},t.a.createElement("div",null,"\u793A\u4F8B\uFF1A"),t.a.createElement("div",{className:Gr.a.flexColumn},t.a.createElement("div",null,t.a.createElement(qt.a,{style:{color:"rgb(82, 196, 26)"}}),t.a.createElement("span",{className:"font14 ml5"},"\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784")),t.a.createElement("div",null,t.a.createElement(Yn.a,{style:{color:"red"}}),t.a.createElement("span",{className:"font14 ml5"},"\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625")))),t.a.createElement(vt.a.Item,{label:"\u5730\u533A\uFF1A",name:"city"},t.a.createElement(pn.a,{allowClear:!0,size:"large",options:ba.a,placeholder:"\u8BF7\u9009\u62E9\u6240\u5728\u5730",showSearch:{matchInputWidth:!0,filter:kn}})),t.a.createElement(vt.a.Item,{label:"\u8BE6\u7EC6\u5730\u5740\uFF1A",name:"address"},t.a.createElement(U.a,{placeholder:"\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"})),t.a.createElement(vt.a.Item,{label:"\u8BF4\u660E\uFF1A",name:"remarks"},t.a.createElement(ha,{placeholder:"\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"})),t.a.createElement("div",{className:Gr.a.footerWrap},t.a.createElement(vt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:function(){nt()}},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Wt["account/appplySchool"]},"\u4FDD\u5B58")))))},St=Object(s.a)(function(pt){var Ze=pt.account,ht=pt.loading,gt=pt.globalSetting;return{account:Ze,globalSetting:gt,loading:ht.effects}})(la),ir=de.a.Option,Mt=y.a.Dragger,wa=function(Ze){var ht,gt,Wt=Ze.user,At=Ze.account,Jt=Ze.globalSetting,Lt=Ze.loading,ct=Ze.dispatch,nt=Ze.Scoid,it=Object(g.a)(Ze,["user","account","globalSetting","loading","dispatch","Scoid"]),_t=vt.a.useForm(),Rt=Object(m.a)(_t,1),Ct=Rt[0],Ot=Object(o.useState)({}),Pt=Object(m.a)(Ot,2),jt=Pt[0],Ve=Pt[1],nr=Object(o.useState)([]),Yt=Object(m.a)(nr,2),Qt=Yt[0],It=Yt[1],zt=Object(o.useState)([]),Ut=Object(m.a)(zt,2),Ht=Ut[0],xr=Ut[1],Nr=Object(o.useState)([]),Dr=Object(m.a)(Nr,2),Br=Dr[0],Wr=Dr[1],on=Object(o.useState)([]),qe=Object(m.a)(on,2),er=qe[0],sn=qe[1],en=Object(o.useState)(),mr=Object(m.a)(en,2),dr=mr[0],vr=mr[1],wt=Object(o.useState)(),Bt=Object(m.a)(wt,2),tr=Bt[0],Gt=Bt[1],ut=Object(o.useState)(),dt=Object(m.a)(ut,2),Dt=dt[0],bt=dt[1],fr=Object(o.useState)(),jr=Object(m.a)(fr,2),Hr=jr[0],cr=jr[1],Lr=Object(o.useState)(),yr=Object(m.a)(Lr,2),Xr=yr[0],Tr=yr[1];Object(o.useEffect)(function(){Vr()},[]),Object(o.useEffect)(function(){Object(c.a)(n.a.mark(function Ue(){var ke;return n.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:if(nt){ot.next=2;break}return ot.abrupt("return");case 2:return ot.next=4,In(nt);case 4:ke=ot.sent,Wr(ke==null?void 0:ke.departments);case 6:case"end":return ot.stop()}},Ue)}))()},[nt]);var Vr=function(){var Ue=Object(c.a)(n.a.mark(function ke(){var ze;return n.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,ct({type:"account/getSchoolOption"});case 2:ze=yt.sent,It(ze==null?void 0:ze.schools);case 4:case"end":return yt.stop()}},ke)}));return function(){return Ue.apply(this,arguments)}}(),In=function(ke){return ct({type:"account/getDepartmentOption",payload:{id:ke}})};Object(o.useEffect)(function(){if(!At.basicInfo)return;var Ue=At.basicInfo,ke={identity:Ue.identity,school:Ue.school_name,department:Ue.department_name,studentNo:Ue.student_id,jobTitle:Ue.identity=="teacher"?Ue.technical_title:"\u6559\u6388",manager:Ue.identity=="professional"?Ue.technical_title:"\u4F01\u4E1A\u7BA1\u7406\u8005"};Ct.setFieldsValue(ke),Ve(ke)},[At.basicInfo]);var Pe=function(){cr(!0)},Fe=function(){if(!Qt.find(function(ke){return ke.name===jt.school})){p.b.info("\u8BF7\u5148\u9009\u62E9\u6B63\u786E\u7684\u5355\u4F4D\u6216\u8005\u5B66\u6821\uFF01");return}Tr(!0)},He=function(ke){if(Ve(Object(L.a)({},Ct.getFieldsValue())),"school"in ke){xr(Qt.filter(function(ot){return ot.name.includes(ke.school)}));var ze=(Qt.find(function(ot){return ot.name===ke.school})||{}).id;ze?Me(ke.school):(Ct.setFieldsValue({department:""}),Ve(Object(L.a)(Object(L.a)({},jt),{school:ke.school,department:""})))}},Me=function(){var Ue=Object(c.a)(n.a.mark(function ke(ze,ot){var yt,xt,Nt,hr,Cr,Sr;return n.a.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return hr=(yt=Qt.find(function(Mr){return Mr.name===ze}))===null||yt===void 0?void 0:yt.id,_r.next=3,In(hr);case 3:if(_r.t0=_r.sent,_r.t0){_r.next=6;break}_r.t0={};case 6:Cr=_r.t0,Wr(Cr==null?void 0:Cr.departments),Sr=ot||(Cr==null||((xt=Cr.departments)===null||xt===void 0||((Nt=xt[0])===null||Nt===void 0))?void 0:Nt.name),Ct.setFieldsValue({department:Sr}),Ve(Object(L.a)(Object(L.a)({},jt),{school:ze,department:Sr}));case 11:case"end":return _r.stop()}},ke)}));return function(ze,ot){return Ue.apply(this,arguments)}}(),he=function(){var Ue=Object(c.a)(n.a.mark(function ke(ze){return n.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,Vr();case 2:Ct.setFieldsValue({school:ze,department:""}),Ve(Object(L.a)(Object(L.a)({},jt),{school:ze,department:""}));case 4:case"end":return yt.stop()}},ke)}));return function(ze){return Ue.apply(this,arguments)}}(),Oe=function(ke){if(ke.file.status==="uploading"){bt(!0);return}if(ke.file.status==="done"){var ze;console.log(ke.file,ke.file.response),Gt((ze=ke.file.response)===null||ze===void 0?void 0:ze.id),Object(Kt.C)(ke.file.originFileObj,function(ot){vr(ot),bt(!1)})}},ge=function(){var Ue=Object(c.a)(n.a.mark(function ke(ze){var ot,yt,xt,Nt,hr,Cr,Sr,Pr,_r,Mr,Ir,Jr,Kr,gn,zr,gr;return n.a.wrap(function(Fr){for(;;)switch(Fr.prev=Fr.next){case 0:if(hr=ze||{},Cr=hr.school,Sr=hr.department,Pr=hr.identity,_r=hr.studentNo,Mr=hr.jobTitle,Ir=hr.manager,dr){Fr.next=4;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u7167\u7247\uFF01"),Fr.abrupt("return");case 4:return Jr=(ot=Qt.find(function($r){return $r.name===Cr}))===null||ot===void 0?void 0:ot.id,Kr=(yt=Br.find(function($r){return $r.name===Sr}))===null||yt===void 0?void 0:yt.id,Pr==="student"?gn=_r:Pr==="teacher"?gn=Mr:gn=Ir,Fr.next=9,ct({type:"account/applyProfessionalAuth",payload:{id:((xt=At.basicInfo)===null||xt===void 0?void 0:xt.id)||((Nt=Wt.userInfo)===null||Nt===void 0?void 0:Nt.login),school_id:Jr,department_id:Kr,identity:Pr,extra:gn,attachment_ids:[tr]}});case 9:zr=Fr.sent,Le(),zr&&(p.b.info("\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u8BF7\u7B49\u5F85\u5BA1\u6838!"),ct({type:"account/getBasicInfo",payload:{login:(gr=Wt.userInfo)===null||gr===void 0?void 0:gr.login}}));case 12:case"end":return Fr.stop()}},ke)}));return function(ze){return Ue.apply(this,arguments)}}(),Le=function(){ct({type:"account/setActionTabs",payload:{}})},Ne={data:{type:"professional"},multiple:!0,showUploadList:!1,action:"".concat(K.a.API_SERVER,"/api/attachments.json"),className:Et.a.uploader,onChange:Oe,beforeUpload:function(ke){var ze=ke.type==="image/jpeg"||ke.type==="image/png"||ke.type==="image/jpg"||ke.type==="image/bmp";return ze||p.b.info("\u8BF7\u4E0A\u4F20\u6B63\u786E\u6587\u4EF6\u683C\u5F0F"),ze}};return t.a.createElement(C.a,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,className:Et.a.modal,visible:At.actionTabs.key==="Account-ProfessionalAuth",title:t.a.createElement("div",null,t.a.createElement("i",{className:"iconfont icon-zhiyerenzheng font18 mr5 ".concat(Et.a.colorBlue)}),"\u804C\u4E1A\u8BA4\u8BC1"),width:"660px",footer:null},t.a.createElement(i.a,{spinning:!!Dt},t.a.createElement(vt.a,{className:Et.a.formWrap,form:Ct,layout:"horizontal",onValuesChange:He,onFinish:ge},t.a.createElement(W.a,{gutter:[10,0]},t.a.createElement(at.a,{flex:"300px"},t.a.createElement(vt.a.Item,{label:"\u804C\u4E1A",name:"identity",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u4E1A"}]},t.a.createElement(de.a,null,t.a.createElement(ir,{value:"teacher"},"\u6559\u5E08"),t.a.createElement(ir,{value:"student"},"\u5B66\u751F"),t.a.createElement(ir,{value:"professional"},"\u4E13\u4E1A\u4EBA\u58EB")))),jt.identity==="student"&&t.a.createElement(at.a,{flex:"200px"},t.a.createElement(vt.a.Item,{initialValue:jt.studentNo,name:"studentNo",rules:[{required:!0,message:"\u8BF7\u5148\u8F93\u5165\u5B66\u53F7"}]},t.a.createElement(U.a,{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5B66\u53F7"}))),jt.identity==="teacher"&&t.a.createElement(at.a,{flex:"200px"},t.a.createElement(vt.a.Item,{initialValue:jt.jobTitle,name:"jobTitle",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(de.a,null,t.a.createElement(ir,{value:"\u6559\u6388"},"\u6559\u6388"),t.a.createElement(ir,{value:"\u526F\u6559\u6388"},"\u526F\u6559\u6388"),t.a.createElement(ir,{value:"\u8BB2\u5E08"},"\u8BB2\u5E08"),t.a.createElement(ir,{value:"\u52A9\u6559"},"\u52A9\u6559")))),jt.identity==="professional"&&t.a.createElement(at.a,{flex:"200px"},t.a.createElement(vt.a.Item,{initialValue:jt.manager,name:"manager",rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u804C\u79F0"}]},t.a.createElement(de.a,null,t.a.createElement(ir,{value:"\u4F01\u4E1A\u7BA1\u7406\u8005"},"\u4F01\u4E1A\u7BA1\u7406\u8005"),t.a.createElement(ir,{value:"\u90E8\u95E8\u7BA1\u7406\u8005"},"\u90E8\u95E8\u7BA1\u7406\u8005"),t.a.createElement(ir,{value:"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"},"\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"),t.a.createElement(ir,{value:"\u5DE5\u7A0B\u5E08"},"\u5DE5\u7A0B\u5E08"),t.a.createElement(ir,{value:"\u52A9\u7406\u5DE5\u7A0B\u5E08"},"\u52A9\u7406\u5DE5\u7A0B\u5E08"))))),t.a.createElement(vt.a.Item,{label:"\u5B66\u6821/\u5355\u4F4D",name:"school",extra:jt.school&&!(Qt!=null&&Qt.find(function(Ue){return Ue.name===jt.school}))&&t.a.createElement("div",{className:Et.a.schoolHintWrap},t.a.createElement("span",{className:Et.a.colorCDCDCD},"\u672A\u627E\u5230\u5305\u542B\u201C",jt.school,"\u201D\u7684\u9AD8\u6821\uFF0C"),t.a.createElement("span",{className:"".concat(Et.a.color0152d9," current"),onClick:Pe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u5B66\u6821/\u5355\u4F4D"}]},t.a.createElement(qr.a,{showSearch:!0,options:Ht==null?void 0:Ht.map(function(Ue){return{value:Ue.name}})})),t.a.createElement(vt.a.Item,{label:"\u9662\u7CFB/\u90E8\u95E8",name:"department",extra:jt.department&&!(Br!=null&&Br.find(function(Ue){return Ue.name===jt.department}))&&t.a.createElement("div",{className:Et.a.schoolHintWrap},t.a.createElement("span",{className:Et.a.colorCDCDCD},jt.department?"\u672A\u627E\u5230\u5305\u542B\u201C".concat(jt.department,"\u201D\u7684\u9AD8\u6821\uFF0C"):"\u672A\u627E\u5230\u9662\u7CFB\uFF0C"),t.a.createElement("span",{className:"".concat(Et.a.color0152d9," current"),onClick:Fe},"\u7533\u8BF7\u65B0\u589E")),rules:[{required:!0,message:"\u8BF7\u5148\u9009\u62E9\u9662\u7CFB/\u90E8\u95E8"}]},t.a.createElement(qr.a,{showSearch:!0,onChange:function(ke){return sn(Br.filter(function(ze){return ze.name.includes(ke)}))},options:er==null?void 0:er.map(function(Ue){return{value:Ue.name}})})),t.a.createElement(vt.a.Item,{label:"\u804C\u4E1A\u8BC1\u4E0A\u4F20"},t.a.createElement("div",{className:Et.a.flexRow},t.a.createElement("div",{className:"".concat(Et.a.flexColumn," ").concat(Et.a.example)},t.a.createElement("span",{className:Et.a.exampleImg},t.a.createElement("img",{src:Ar.a})),t.a.createElement("span",{className:"tc"},t.a.createElement("p",null,"\u793A\u4F8B\u56FE\u7247"),t.a.createElement("p",{className:"".concat(Et.a.colorOrange," font12")},"\uFF08png/jpg/bmp\u683C\u5F0F\uFF0C\u4E0D\u8D85\u8FC72MB\uFF09"))),t.a.createElement("div",{className:Et.a.flexColumn},t.a.createElement(Mt,Object(Ae.a)({},Ne,{accept:".png,.jpg,.bmp,.jpeg"}),dr?t.a.createElement("img",{src:dr,className:Et.a.uploadImg}):t.a.createElement("div",{className:Et.a.imageTip},t.a.createElement("p",null,t.a.createElement("i",{className:"iconfont icon-cuban2shangchuanyunduan ".concat(Et.a.uploadTipIcon)})),t.a.createElement("p",{className:Et.a.uploadTip},t.a.createElement("a",{className:Et.a.color05101a},"\u70B9\u51FB\u6216\u62D6\u62FD\u4E0A\u4F20\u56FE\u7247")))),t.a.createElement("span",{className:"tc"},t.a.createElement("p",{className:Et.a.viewLargerImg},"\u67E5\u770B\u5927\u56FE"))))),t.a.createElement("div",{className:Et.a.footerWrap},t.a.createElement(vt.a.Item,null,t.a.createElement(w.a,{className:"mr5",size:"large",onClick:Le},"\u53D6\u6D88"),t.a.createElement(w.a,{size:"large",type:"primary",htmlType:"submit",loading:Lt["account/applyProfessionalAuth"]},"\u4FDD\u5B58"))),t.a.createElement("div",{className:Et.a.note},t.a.createElement("p",null,"\u8BA4\u8BC1\u987B\u77E5\uFF1A"),t.a.createElement("p",null,"1.\u6839\u636E\u804C\u4E1A\u4E0A\u4F20\u76F8\u5E94\u7684\u8BC1\u4EF6\u7167\uFF1A\u6559\u5E08\uFF08\u6559\u5E08\u8BC1\uFF09\uFF0C\u4E13\u4E1A\u4EBA\u58EB\uFF08\u5458\u5DE5\u8BC1\uFF09\u3001\u5B66\u751F\uFF08\u5B66\u751F\u8BC1\uFF09\uFF0C\u8BF7\u786E\u4FDD\u8BC1\u4EF6\u7167\u5185\u5BB9\u5B8C\u6574\u5E76\u4E14\u6E05\u6670\u53EF\u89C1\uFF0C\u4E25\u7981PS\uFF1B"),t.a.createElement("p",null,"2.\u6211\u4EEC\u5C06\u5728\u4F60\u63D0\u4EA4\u804C\u4E1A\u8BC1\u4FE1\u606F\u540E\u768424\u5C0F\u65F6\uFF08\u4E0D\u5305\u542B\u8282\u5047\u65E5\uFF09\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u5BA1\u6838\u7ED3\u679C\u5C06\u4F1A\u4EE5\u7CFB\u7EDF\u6D88\u606F\u7684\u5F62\u5F0F\u53D1\u9001\u7ED9\u4F60\uFF1B"),t.a.createElement("p",null,"3.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u65E0\u6CD5\u5220\u9664\uFF0C\u8BF7\u8C28\u614E\u586B\u5199\uFF1B\u804C\u4E1A\u53D8\u66F4\u8BF7\u9009\u62E9\u91CD\u65B0\u8BA4\u8BC1\uFF1B"),t.a.createElement("p",null,"4.\u804C\u4E1A\u8BA4\u8BC1\u5BA1\u6838\u5B8C\u6210\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u53D1\u653E500\u4E2A\u91D1\u5E01\u4F5C\u4E3A\u5956\u52B1\uFF1B"),t.a.createElement("p",null,"5.\u6211\u4EEC\u4F1A\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u7684\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732\uFF1B"),t.a.createElement("p",null,"6.\u5982\u5B58\u5728\u6076\u610F\u4E71\u586B\u5199\u59D3\u540D\uFF0C\u5B66\u53F7\uFF0C\u53CA\u4E0A\u4F20\u4E0E\u804C\u4E1A\u8BC1\u4EF6\u65E0\u5173\u56FE\u7247\u8005\uFF0C\u4E00\u7ECF\u53D1\u73B0\u5C06\u51BB\u7ED3",!(Jt!=null&&(ht=Jt.setting)!==null&&ht!==void 0&&ht.is_local)&&"EduCoder","\u8D26\u53F7\u3002"),t.a.createElement("p",null,"7.\u975E\u8001\u5E08\u8EAB\u4EFD\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1\u540E\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u5C06\u72B6\u6001\u6539\u4E3A\u5DF2\u8BA4\u8BC1\uFF0C\u4F60\u5C06\u53EF\u4EE5\u4F53\u9A8C\u5E73\u53F0\u9700\u8981\u804C\u4E1A\u8BA4\u8BC1\u7684\u529F\u80FD\uFF1B\u5982\u679C\u5728\u8BA4\u8BC1\u540E\u7684\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u672A\u901A\u8FC7\u5BA1\u6838\uFF0C\u4F60\u5C06\u4E0D\u80FD\u7EE7\u7EED\u4F53\u9A8C\u9700\u8981\u8BA4\u8BC1\u7684\u529F\u80FD\u3002")))),t.a.createElement(St,{visible:Hr,onClose:function(){return cr(!1)},schoolName:jt.school,onSuccess:he}),t.a.createElement(ya,{visible:Xr,onClose:function(){return Tr(!1)},schoolId:(gt=Qt.find(function(Ue){return Ue.name===jt.school}))===null||gt===void 0?void 0:gt.id,schoolName:jt.school,departmentName:jt.department,onSuccess:function(ke){return Me(jt.school,ke)}}))},Pa=Object(s.a)(function(pt){var Ze=pt.user,ht=pt.account,gt=pt.loading,Wt=pt.globalSetting;return{user:Ze,account:ht,globalSetting:Wt,loading:gt.effects}})(wa),pa=k("aCH8"),Ln=k.n(pa);function ur(pt){var Ze=pt.type,ht=pt.dispatch,gt=pt.userid,Wt=pt.isshow,At=pt.setPhoneshow,Jt=pt.setEmailshow,Lt="79e33abd4b6588941ab7622aed1e67e8",ct=Object(o.useState)(""),nt=Object(m.a)(ct,2),it=nt[0],_t=nt[1],Rt=Object(o.useState)("\u83B7\u53D6\u9A8C\u8BC1\u7801"),Ct=Object(m.a)(Rt,2),Ot=Ct[0],Pt=Ct[1],jt=Object(o.useState)(60),Ve=Object(m.a)(jt,2),nr=Ve[0],Yt=Ve[1],Qt=Object(o.useState)(!1),It=Object(m.a)(Qt,2),zt=It[0],Ut=It[1],Ht=Object(o.useState)(""),xr=Object(m.a)(Ht,2),Nr=xr[0],Dr=xr[1];function Br(){return Wr.apply(this,arguments)}function Wr(){return Wr=Object(c.a)(n.a.mark(function mr(){var dr;return n.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(it){wt.next=3;break}return Ze===3?p.b.info("\u624B\u673A\u53F7\u4E0D\u80FD\u4E3A\u7A7A"):p.b.info("\u90AE\u7BB1\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A"),wt.abrupt("return");case 3:return wt.next=5,ht({type:"competitions/getVerification",payload:{type:Ze,login:it,smscode:Ln()(Lt+it)}});case 5:dr=wt.sent,dr.status===1&&(p.b.info("\u83B7\u53D6\u9A8C\u8BC1\u7801\u6210\u529F"),on(),Ut(!0));case 7:case"end":return wt.stop()}},mr)})),Wr.apply(this,arguments)}function on(){Yt(60);var mr=setInterval(function(){--nr,nr>-1?Yt(nr):(clearInterval(mr),Ut(!1))},1e3)}function qe(){return er.apply(this,arguments)}function er(){return er=Object(c.a)(n.a.mark(function mr(){var dr;return n.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,ht({type:"competitions/PhoneBind",payload:{userid:gt,code:Nr,phone:it}});case 2:dr=wt.sent,dr.status===0&&(p.b.info("\u7ED1\u5B9A\u6210\u529F"),At("none"));case 4:case"end":return wt.stop()}},mr)})),er.apply(this,arguments)}function sn(){return en.apply(this,arguments)}function en(){return en=Object(c.a)(n.a.mark(function mr(){var dr;return n.a.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,ht({type:"competitions/EmailBind",payload:{userid:gt,code:Nr,email:it}});case 2:dr=wt.sent,dr.status===0&&(p.b.info("\u7ED1\u5B9A\u6210\u529F"),Jt("none"));case 4:case"end":return wt.stop()}},mr)})),en.apply(this,arguments)}return t.a.createElement("div",{style:{display:Wt}},t.a.createElement("p",null,t.a.createElement(U.a,{value:it,onChange:function(dr){return _t(dr.target.value)},placeholder:Ze===3?"\u8BF7\u8F93\u5165\u624B\u673A\u53F7":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u5730\u5740",style:{width:"370px"}})),t.a.createElement("span",null,t.a.createElement(U.a,{value:Nr,onChange:function(dr){return Dr(dr.target.value)},placeholder:Ze===3?"\u8BF7\u8F93\u5165\u624B\u673A\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801":"\u8BF7\u8F93\u5165\u90AE\u7BB1\u83B7\u53D6\u7684\u9A8C\u8BC1\u7801",style:{width:"250px"}}))," ",t.a.createElement(w.a,{disabled:zt,onClick:function(){return Br()},type:"primary",style:{marginLeft:"20px",width:"100px"}},zt?"\u91CD\u65B0\u53D1\u9001".concat(nr,"s"):Ot),t.a.createElement("p",{style:{marginTop:"30px",width:"370px",textAlign:"center"}},t.a.createElement(w.a,{type:"primary",style:{marginRight:"15px"},onClick:function(){if(!Nr){p.b.info("\u9A8C\u8BC1\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}Ze===3?qe():sn()}},"\u786E\u8BA4"),t.a.createElement(w.a,{style:{marginLeft:"20px"},onClick:function(){Ze===3?At("none"):Jt("none")}},"\u53D6\u6D88")))}var ua=ur;function Gn(pt){var Ze=pt.dispatch,ht=pt.userid,gt={wrapperCol:{offset:3,span:21}},Wt=vt.a.useForm(),At=Object(m.a)(Wt,1),Jt=At[0],Lt=Object(S.i)(),ct=Lt.identifier;return t.a.createElement("div",{style:{width:"500px"}},t.a.createElement(vt.a,{form:Jt,name:"basic"},t.a.createElement(vt.a.Item,Object(Ae.a)({},gt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u5F00\u6237\u884C"),name:"bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5F00\u6237\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(vt.a.Item,Object(Ae.a)({},gt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u652F\u884C"),name:"second_bank",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u652F\u884C"}]}),t.a.createElement(U.a,null)),t.a.createElement(vt.a.Item,Object(Ae.a)({},gt,{label:t.a.createElement("div",{style:{width:"30px"}},"\u8D26\u53F7"),name:"card_no",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8D26\u53F7"}]}),t.a.createElement(U.a,null)),t.a.createElement(vt.a.Item,null,t.a.createElement(w.a,{type:"primary",htmlType:"submit",onClick:Object(c.a)(n.a.mark(function nt(){return n.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:Jt.validateFields().then(function(){var Rt=Object(c.a)(n.a.mark(function Ct(Ot){var Pt;return n.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,Ze({type:"competitions/setleader",payload:Object(L.a)({identifier:ct,user_id:ht},Ot)});case 2:Pt=Ve.sent,Pt.status===0&&p.b.info("\u63D0\u4EA4\u6210\u529F");case 4:case"end":return Ve.stop()}},Ct)}));return function(Ct){return Rt.apply(this,arguments)}}());case 1:case"end":return _t.stop()}},nt)}))},"\u63D0\u4EA4"))))}var On=Gn,Mn={teacher:"\u6559\u5E08",student:"\u5B66\u751F",professional:"\u4E13\u4E1A\u4EBA\u58EB"};function Ga(pt){var Ze,ht,gt,Wt,At,Jt,Lt,ct,nt=pt.Prize,it=pt.Accounts,_t=pt.dispatch,Rt=pt.userid,Ct=Object(o.useState)("none"),Ot=Object(m.a)(Ct,2),Pt=Ot[0],jt=Ot[1],Ve=Object(o.useState)("none"),nr=Object(m.a)(Ve,2),Yt=nr[0],Qt=nr[1];function It(Ut){return zt.apply(this,arguments)}function zt(){return zt=Object(c.a)(n.a.mark(function Ut(Ht){var xr;return n.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(!(Ht==="1")){Dr.next=6;break}return Dr.next=3,_t({type:"competitions/Authentication"});case 3:xr=Dr.sent,Dr.next=9;break;case 6:return Dr.next=8,_t({type:"competitions/Professional"});case 8:xr=Dr.sent;case 9:xr.status===0&&p.b.info("\u64A4\u9500\u6210\u529F");case 10:case"end":return Dr.stop()}},Ut)})),zt.apply(this,arguments)}return t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u5B9E\u540D\u4FE1\u606F"),(it==null?void 0:it.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(it==null?void 0:it.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9",cursor:"pointer"},onClick:function(){_t({type:"account/setActionTabs",payload:{key:"Account-RealNameAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u59D3\u540D\uFF1A",t.a.createElement("span",null,it==null?void 0:it.name),(it==null?void 0:it.authentication)==="uncertified"?null:(it==null?void 0:it.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(w.a,{type:"primary",onClick:function(){return It("1")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-14 ml20"})," \u5DF2\u8BA4\u8BC1")),t.a.createElement("p",null,"\u6027\u522B\uFF1A",t.a.createElement("span",null,(it==null?void 0:it.gender)===0?"\u7537":"\u5973"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u804C\u4E1A\u4FE1\u606F"),(it==null?void 0:it.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px"}},"\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\u540E\u624D\u80FD\u83B7\u5F97\u8BC1\u4E66"):null,(it==null?void 0:it.authentication)==="uncertified"?t.a.createElement("span",{style:{fontSize:"14px",marginLeft:"20px",color:"#0152d9"},onClick:function(){_t({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})}},"\u7ACB\u5373\u8BA4\u8BC1"):null),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",null,"\u804C\u4E1A\uFF1A",t.a.createElement("span",null,it&&it.identity&&Mn[it.identity]),(it==null?void 0:it.authentication)==="uncertified"?null:(it==null?void 0:it.authentication)==="applying"?t.a.createElement("span",null,t.a.createElement("span",null,"\u5F85\u5BA1\u6838"),t.a.createElement(w.a,{type:"primary",onClick:function(){return It("2")},ghost:!0,style:{marginLeft:"20px"}},"\u64A4\u9500\u8BA4\u8BC1")):t.a.createElement("span",{style:{color:"#6ec76e"}},t.a.createElement("span",{className:"iconfont icon-wancheng font-12 ml20"}),t.a.createElement("span",null,"\u5DF2\u8BA4\u8BC1"),t.a.createElement(w.a,{type:"primary",onClick:function(){_t({type:"account/setActionTabs",payload:{key:"Account-ProfessionalAuth"}})},ghost:!0,style:{marginLeft:"20px"}},"\u91CD\u65B0\u8BA4\u8BC1"))),t.a.createElement("p",null,"\u5B66\u53F7\uFF1A",t.a.createElement("span",null,(it==null?void 0:it.student_id)||"--")),t.a.createElement("p",null,"\u5B66\u6821\uFF1A",t.a.createElement("span",null,(it==null?void 0:it.school_name)||"--")),t.a.createElement("p",null,"\u9662\u7CFB\uFF1A",t.a.createElement("span",null,(it==null?void 0:it.department_name)||"--"))),t.a.createElement("p",null,t.a.createElement("span",{style:{color:"red"}},"*"),t.a.createElement("span",{style:{fontSize:"16px"}},"\u8054\u7CFB\u65B9\u5F0F")),t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u624B\u673A\u53F7\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(it==null?void 0:it.phone)||"--"),Pt==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){jt("block")}},"\u66F4\u6362"):null),t.a.createElement(ua,{type:3,dispatch:_t,userid:it==null?void 0:it.id,isshow:Pt,setPhoneshow:jt,setEmailshow:Qt}),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"Email\uFF1A"),t.a.createElement("span",{style:{width:"150px"}},(it==null?void 0:it.mail)||"--"),Yt==="none"?t.a.createElement("span",{style:{color:"#0152d9",marginLeft:"20px",cursor:"pointer"},onClick:function(){Qt("block")}},"\u66F4\u6362"):null),t.a.createElement(ua,{type:4,dispatch:_t,userid:it==null?void 0:it.id,isshow:Yt,setEmailshow:Qt,setPhoneshow:jt})),nt!=null&&nt.leader&&nt!==null&&nt!==void 0&&nt.teams&&nt!==null&&nt!==void 0&&(Ze=nt.teams[0])!==null&&Ze!==void 0&&(ht=Ze.bank_account)!==null&&ht!==void 0&&ht.bank?t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")):t.a.createElement("div",null,t.a.createElement("p",null,t.a.createElement("span",{style:{fontSize:"16px"}},"\u7B7E/\u9886/\u5F00\u6237\u884C\u53CA\u94F6\u884C\u5361\u53F7"),t.a.createElement("span",{style:{fontSize:"12px",marginLeft:"20px"}},"\u4E3A\u4FDD\u969C\u5956\u91D1\u7684\u53CA\u65F6\u53D1\u653E\uFF0C\u8BF7\u961F\u957F\u5982\u5B9E\u586B\u5199\u4F60\u540D\u4E0B\u7684\u94F6\u884C\u5361\u4FE1\u606F")),t.a.createElement(On,{dispatch:_t,userid:Rt})),nt!=null&&nt.leader?t.a.createElement("div",{style:{padding:"20px"}},t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u5F00\u6237\u884C\uFF1A"),t.a.createElement("span",null,(nt==null?void 0:nt.teams)&&(nt==null||((gt=nt.teams[0])===null||gt===void 0||((Wt=gt.bank_account)===null||Wt===void 0))?void 0:Wt.bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u652F\u884C\uFF1A"),t.a.createElement("span",null,(nt==null?void 0:nt.teams)&&(nt==null||((At=nt.teams[0])===null||At===void 0||((Jt=At.bank_account)===null||Jt===void 0))?void 0:Jt.second_bank)||"--")),t.a.createElement("p",{style:{display:"flex"}},t.a.createElement("span",{style:{width:"60px",textAlign:"right"}},"\u8D26\u53F7\uFF1A"),t.a.createElement("span",null,(nt==null?void 0:nt.teams)&&(nt==null||((Lt=nt.teams[0])===null||Lt===void 0||((ct=Lt.bank_account)===null||ct===void 0))?void 0:ct.card_no)||"--"))):null,t.a.createElement(Pa,{Scoid:it==null?void 0:it.school_id}),t.a.createElement(dn,null))}var La=Ga,Un=ue.a.TabPane;function Xa(pt){var Ze=pt.Prize,ht=pt.Accounts,gt=pt.getAccounts,Wt=pt.dispatch,At=pt.userid;return t.a.createElement("div",{className:"fr"},t.a.createElement("div",{className:"mb100 "},t.a.createElement(ue.a,{defaultActiveKey:"1",onChange:function(Lt){Lt==="2"&&gt()}},t.a.createElement(Un,{tab:"\u83B7\u5956\u8BC1\u4E66\u4E0B\u8F7D",key:"1"},t.a.createElement(_e,{Prize:Ze})),t.a.createElement(Un,{tab:"\u5B8C\u5584\u4E2A\u4EBA\u4FE1\u606F",key:"2"},t.a.createElement(La,{userid:At,dispatch:Wt,Prize:Ze,Accounts:ht})))))}var oi=Xa,Ma=k("xKgJ"),mn=k("wd/R"),Nn=k.n(mn),Ba=ue.a.TabPane;function Qa(pt){var Ze,ht,gt,Wt,At,Jt,Lt=pt.ChartRules,ct=pt.ItemData,nt=pt.getCharts,it=pt.Selectkey,_t=pt.HeaderDetail,Rt=pt.getChartRules,Ct=pt.userinfo,Ot=pt.Editable,Pt=pt.dispatch,jt=pt.StaffDetail,Ve=Object(o.useState)(!1),nr=Object(m.a)(Ve,2),Yt=nr[0],Qt=nr[1],It=Object(o.useState)(""),zt=Object(m.a)(It,2),Ut=zt[0],Ht=zt[1],xr=Object(o.useState)(!0),Nr=Object(m.a)(xr,2),Dr=Nr[0],Br=Nr[1],Wr=Object(o.useState)(),on=Object(m.a)(Wr,2),qe=on[0],er=on[1],sn=Object(o.useState)(),en=Object(m.a)(sn,2),mr=en[0],dr=en[1],vr=Object(S.i)(),wt=vr.identifier;Object(o.useEffect)(function(){if(Dr){var ut,dt,Dt,bt,fr=Lt==null||((ut=Lt.stages)===null||ut===void 0)?void 0:ut[0];er(fr);var jr=Lt==null||((dt=Lt.stages)===null||dt===void 0||((Dt=dt[0])===null||Dt===void 0||((bt=Dt.children)===null||bt===void 0)))?void 0:bt[0];if(dr(jr),fr!=null&&fr.id){var Hr,cr,Lr;nt(fr==null?void 0:fr.id),Ht(((Hr=Lt.rule_contents)===null||Hr===void 0||((cr=Hr.filter(function(Vr){return parseInt(Vr.competition_stage_id)===parseInt(fr==null?void 0:fr.id)}))===null||cr===void 0||((Lr=cr[0])===null||Lr===void 0))?void 0:Lr.content)||"")}else{var yr,Xr,Tr;nt(0),Ht(((yr=Lt.rule_contents)===null||yr===void 0||((Xr=yr.filter(function(Vr){return parseInt(Vr.competition_stage_id)===0}))===null||Xr===void 0||((Tr=Xr[0])===null||Tr===void 0))?void 0:Tr.content)||"")}}},[Lt]);function Bt(){return tr.apply(this,arguments)}function tr(){return tr=Object(c.a)(n.a.mark(function ut(){var dt,Dt,bt,fr,jr,Hr,cr,Lr,yr;return n.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:if(Ut){Tr.next=3;break}return p.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),Tr.abrupt("return");case 3:if(Br(!1),dt=qe==null?void 0:qe.id,!dt){Tr.next=12;break}return Tr.next=8,Object(q.a)("/api/competitions/".concat(wt,"/update_md_content.json"),{method:"post",body:{competition_module_id:it,content:Ut,md_content_id:(Dt=Lt.rule_contents)===null||Dt===void 0||((bt=Dt.filter(function(Vr){return parseInt(Vr.competition_stage_id)===parseInt(dt)}))===null||bt===void 0||((fr=bt[0])===null||fr===void 0))?void 0:fr.id,stage_id:qe==null?void 0:qe.id}});case 8:jr=Tr.sent,jr.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),Qt(!1),Rt()),Tr.next=16;break;case 12:return Tr.next=14,Object(q.a)("/api/competitions/".concat(wt,"/update_md_content.json"),{method:"post",body:{competition_module_id:it,content:Ut,md_content_id:(Hr=Lt.rule_contents)===null||Hr===void 0||((cr=Hr.filter(function(Vr){return parseInt(Vr.competition_stage_id)===0}))===null||cr===void 0||((Lr=cr[0])===null||Lr===void 0))?void 0:Lr.id,stage_id:qe==null?void 0:qe.id}});case 14:yr=Tr.sent,yr.status===0&&(p.b.info("\u66F4\u65B0\u6210\u529F"),Qt(!1),Rt());case 16:case"end":return Tr.stop()}},ut)})),tr.apply(this,arguments)}var Gt=[{title:"request_id",dataIndex:"request_id",width:120,align:"center",key:"name",render:function(dt,Dt,bt){return t.a.createElement("span",null,dt)}},{title:"\u9644\u4EF6",dataIndex:"file_name",align:"center",width:150,key:"file_name",render:function(dt){return t.a.createElement(Je.a,{title:dt},t.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=10?(dt==null?void 0:dt.substr(0,10))+"...":dt||"--"))}},{title:"\u63D0\u4EA4\u4EBA",dataIndex:"user_name",key:"user_name",width:100,render:function(dt){return t.a.createElement("span",{title:dt},dt&&(dt==null?void 0:dt.length)>=6?(dt==null?void 0:dt.substr(0,6))+"...":dt||"--")}},{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center"},{title:"\u72B6\u6001",dataIndex:"status",key:"status",width:50,render:function(dt){return t.a.createElement("span",null,dt===1?"\u8BA1\u7B97\u4E2D":dt===2?"\u5B8C\u6210":dt===0?"\u5F85\u8BA1\u7B97":dt===3&&"\u9519\u8BEF")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68071",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(dt){return t.a.createElement("span",null,dt||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name)==="\u8BA1\u56FE\u6311\u6218\u70ED\u8EAB\u8D5B"&&{title:"\u6570\u636E\u6307\u68072",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){return(dt==null?void 0:dt.length)>0?dt==null?void 0:dt.map(function(Dt,bt){return t.a.createElement("span",null,Dt==null?void 0:Dt.name,"\uFF1A",Dt==null?void 0:Dt.value," ",t.a.createElement("br",null))}):t.a.createElement("span",null,"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"mask accuary",dataIndex:"data_ranking",key:"data_ranking",align:"left",render:function(dt){return t.a.createElement("span",null,dt||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u7F8E\u5B66\u8BC4\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="score"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"FID",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="fid"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},(qe==null?void 0:qe.display_four_indicators)&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"left",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="total_score"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Car",dataIndex:"data_ranking",key:"data_ranking",align:"center",render:function(dt){return t.a.createElement("span",null,dt||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Coffee",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="Coffee"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Easyship",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="Easyship"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scar",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="Scar"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"Scarf",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="Scarf"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},!(qe!=null&&qe.display_four_indicators)&&(qe==null?void 0:qe.name.includes("\u53EF\u5FAE\u6E32\u67D3\u65B0\u89C6\u89D2\u751F\u6210\u8D5B\u9898"))&&{title:"\u603B\u5206",dataIndex:"data_other",key:"data_other",align:"center",render:function(dt){var Dt;return t.a.createElement("span",null,(dt==null||((Dt=dt.find(function(bt){return(bt==null?void 0:bt.name)==="Total"}))===null||Dt===void 0)?void 0:Dt.value)||"--")}},{title:"\u64CD\u4F5C",dataIndex:"result_url",width:50,key:"result_url",render:function(dt){return t.a.createElement("a",{href:dt,target:"_blank",download:"\u9644\u4EF6"},"\u4E0B\u8F7D")}}].filter(function(ut){return!!ut});return t.a.createElement("div",null,(Lt==null||((Ze=Lt.stages)===null||Ze===void 0)?void 0:Ze.length)>0?null:t.a.createElement(Ke,null),(Lt==null||((ht=Lt.stages)===null||ht===void 0)?void 0:ht.length)>0&&t.a.createElement(ue.a,{animated:!0,tabBarExtraContent:Ct!=null&&Ct.admin||Ct!=null&&Ct.business||Ot?t.a.createElement(w.a,{onClick:function(){Qt(!0)}},"\u7F16\u8F91"):jt.enrolled&&(qe==null?void 0:qe.start_time)&&(qe==null?void 0:qe.end_time)&&t.a.createElement("span",null,"\u63D0\u4EA4\u65F6\u95F4\uFF1A",Nn()(qe==null?void 0:qe.start_time).format("YYYY-MM-DD HH:mm:ss"),"\u81F3",Nn()(qe==null?void 0:qe.end_time).format("YYYY-MM-DD HH:mm:ss"),t.a.createElement(w.a,{style:{marginLeft:"20px"},disabled:Nn()(qe==null?void 0:qe.start_time).unix()>Nn()(Nn()().format("YYYY-MM-DD HH:mm:s")).unix()||Nn()(Nn()().format("YYYY-MM-DD HH:mm:s")).unix()>Nn()(qe==null?void 0:qe.end_time).unix(),onClick:function(){Pt({type:"shixunsDetail/setActionTabs",payload:{key:"md-tab",params:{value:(mr==null?void 0:mr.id)||(qe==null?void 0:qe.id),id:_t==null?void 0:_t.id}}})}},"\u63D0\u4EA4\u7ED3\u679C")),onChange:function(dt){var Dt,bt,fr,jr,Hr;Qt(!1);var cr=Lt==null||((Dt=Lt.stages)===null||Dt===void 0)?void 0:Dt.filter(function(yr){return parseInt(dt)===parseInt(yr==null?void 0:yr.id)})[0],Lr=cr==null||((bt=cr.children)===null||bt===void 0)?void 0:bt[0];dr(Lr),er(cr),Ht(((fr=Lt.rule_contents)===null||fr===void 0||((jr=fr.filter(function(yr){return parseInt(yr.competition_stage_id)===parseInt(cr==null?void 0:cr.id)}))===null||jr===void 0||((Hr=jr[0])===null||Hr===void 0))?void 0:Hr.content)||""),nt((Lr==null?void 0:Lr.id)||dt)}},Lt&&Lt.stages.map(function(ut,dt){return t.a.createElement(Ba,{tab:ut.name,key:ut.id===null?0:ut.id},Yt===!1&&Lt&&Lt.rule_contents.map(function(Dt,bt){if(ut.id===Dt.competition_stage_id)return t.a.createElement(B.a,{key:bt,value:Dt.content===void 0||Dt.content===null?"":Dt.content});if(ut.id===null&&Dt.competition_stage_id===0)return t.a.createElement(B.a,{key:bt,value:Dt.content===void 0||Dt.content===null?"":Dt.content})}))})),(qe==null||((gt=qe.children)===null||gt===void 0)?void 0:gt.length)>0&&t.a.createElement(ue.a,{activeKey:(mr==null?void 0:mr.id)+"",onChange:function(dt){var Dt,bt=qe==null||((Dt=qe.children)===null||Dt===void 0)?void 0:Dt.filter(function(fr){return parseInt(dt)===parseInt(fr==null?void 0:fr.id)})[0];dr(bt),nt(dt)}},qe==null||((Wt=qe.children)===null||Wt===void 0)?void 0:Wt.map(function(ut,dt){return t.a.createElement(Ba,{tab:ut.name,key:ut.id===null?0:ut.id})})),Yt&&t.a.createElement("div",null,t.a.createElement(Z.a,{defaultValue:Ut,onChange:function(dt){Ht(dt)}}),t.a.createElement("p",{style:{marginTop:"10px"}},t.a.createElement(w.a,{style:{width:"90px"},type:"primary",onClick:function(){return Bt()}},"\u63D0\u4EA4"),t.a.createElement(w.a,{style:{marginLeft:"30px",width:"90px"},onClick:function(){return Qt(!1)}},"\u53D6\u6D88"))),((At=_t.competition_modules.filter(function(ut){return ut.id===it}))===null||At===void 0||((Jt=At[0])===null||Jt===void 0)?void 0:Jt.show_leaderboard)&&t.a.createElement(Y.a,{dataSource:ct==null?void 0:ct.results,columns:Gt}))}var qn=Qa,mi=k("DjyN"),Za=k("NUBc"),ea=ue.a.TabPane;function vi(pt){var Ze,ht,gt,Wt,At,Jt,Lt=pt.loading,ct=pt.ChartRules,nt=pt.ItemData,it=pt.getCharts,_t=pt.Selectkey,Rt=pt.HeaderDetail,Ct=pt.getChartRules,Ot=pt.userinfo,Pt=pt.Editable,jt=pt.dispatch,Ve=pt.StaffDetail,nr=Object(o.useState)(!1),Yt=Object(m.a)(nr,2),Qt=Yt[0],It=Yt[1],zt=Object(o.useState)(""),Ut=Object(m.a)(zt,2),Ht=Ut[0],xr=Ut[1],Nr=Object(o.useState)(!0),Dr=Object(m.a)(Nr,2),Br=Dr[0],Wr=Dr[1],on=Object(o.useState)(),qe=Object(m.a)(on,2),er=qe[0],sn=qe[1],en=Object(o.useState)(),mr=Object(m.a)(en,2),dr=mr[0],vr=mr[1],wt=Object(S.i)(),Bt=wt.identifier,tr=Object(o.useState)({page:1,limit:10,sort:"desc"}),Gt=Object(m.a)(tr,2),ut=Gt[0],dt=Gt[1];Object(o.useEffect)(function(){var bt;Br&&ct!==null&&ct!==void 0&&(bt=ct.stages)!==null&&bt!==void 0&&bt[0]&&Dt()},[ct==null||((Ze=ct.stages)===null||Ze===void 0)?void 0:Ze[0]]);var Dt=function(){var bt=Object(c.a)(n.a.mark(function fr(){var jr,Hr,cr,Lr,yr,Xr;return n.a.wrap(function(Vr){for(;;)switch(Vr.prev=Vr.next){case 0:return yr=ct==null||((jr=ct.stages)===null||jr===void 0)?void 0:jr[0],sn(yr),Xr=ct==null||((Hr=ct.stages)===null||Hr===void 0||((cr=Hr[0])===null||cr===void 0||((Lr=cr.children)===null||Lr===void 0)))?void 0:Lr[0],vr(Xr),ut.id=(Xr==null?void 0:Xr.id)||(yr==null?void 0:yr.id),dt(Object(L.a)({},ut)),Vr.next=7,it(Object(L.a)(Object(L.a)({},ut),{},{stage_id:ut.id}));case 7:case"end":return Vr.stop()}},fr)}));return function(){return bt.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((ht=ct.stages)===null||ht===void 0)?void 0:ht.length)>0?null:t.a.createElement(Ke,null),(ct==null||((gt=ct.stages)===null||gt===void 0)?void 0:gt.length)>0&&t.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var bt=Object(c.a)(n.a.mark(function fr(jr){var Hr,cr,Lr,yr,Xr,Tr,Vr;return n.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return It(!1),Tr=ct==null||((Hr=ct.stages)===null||Hr===void 0)?void 0:Hr.filter(function(Fe){return parseInt(jr)===parseInt(Fe==null?void 0:Fe.id)})[0],Vr=Tr==null||((cr=Tr.children)===null||cr===void 0)?void 0:cr[0],vr(Vr),sn(Tr),xr(((Lr=ct.rule_contents)===null||Lr===void 0||((yr=Lr.filter(function(Fe){return parseInt(Fe.competition_stage_id)===parseInt(Tr==null?void 0:Tr.id)}))===null||yr===void 0||((Xr=yr[0])===null||Xr===void 0))?void 0:Xr.content)||""),ut.page=1,ut.limit=10,ut.id=(Vr==null?void 0:Vr.id)||jr,dt(Object(L.a)({},ut)),Pe.next=9,it(Object(L.a)({},ut));case 9:case"end":return Pe.stop()}},fr)}));return function(fr){return bt.apply(this,arguments)}}()},ct&&ct.stages.map(function(bt,fr){return t.a.createElement(ea,{tab:bt.name,key:bt.id===null?0:bt.id})})),(er==null||((Wt=er.children)===null||Wt===void 0)?void 0:Wt.length)>0&&t.a.createElement(ue.a,{activeKey:(dr==null?void 0:dr.id)+"",onChange:function(){var bt=Object(c.a)(n.a.mark(function fr(jr){var Hr,cr;return n.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return cr=er==null||((Hr=er.children)===null||Hr===void 0)?void 0:Hr.filter(function(Xr){return parseInt(jr)===parseInt(Xr==null?void 0:Xr.id)})[0],vr(cr),ut.page=1,ut.limit=10,ut.id=jr,dt(Object(L.a)({},ut)),yr.next=5,it(Object(L.a)({},ut));case 5:case"end":return yr.stop()}},fr)}));return function(fr){return bt.apply(this,arguments)}}()},er==null||((At=er.children)===null||At===void 0)?void 0:At.map(function(bt,fr){return t.a.createElement(ea,{tab:bt.name,key:bt.id===null?0:bt.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("span",{style:{cursor:"pointer",marginRight:20},onClick:function(){ut.page=1,ut.sort=ut.sort==="desc"?"asc":"desc",dt(Object(L.a)({},ut)),it(Object(L.a)({},ut))}},"\u6309\u63D0\u4EA4\u65F6\u95F4",ut.sort==="asc"?"\u6B63":"\u5012","\u5E8F\u6392\u5E8F ",t.a.createElement("i",{className:"iconfont font14 ".concat(ut.sort==="asc"?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",t.a.createElement(U.a.Search,{onSearch:function(fr){ut.page=1,ut.search=fr,dt(Object(L.a)({},ut)),it(Object(L.a)({},ut))},style:{width:"82%"},placeholder:"\u8F93\u5165\u4EBA\u5458/\u6218\u961F\u540D\u79F0\u8FDB\u884C\u641C\u7D22"}),t.a.createElement(i.a,{spinning:Lt},nt==null||((Jt=nt.results)===null||Jt===void 0)?void 0:Jt.map(function(bt,fr){return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",height:100,borderRadius:"2px 2px 0px 0px",marginTop:fr===0?14:30}},t.a.createElement("div",{style:{height:60,padding:10,display:"flex",alignItems:"center"}},t.a.createElement("img",{src:K.a.IMG_SERVER+"/images/"+(bt==null?void 0:bt.image_url),style:{width:40,height:40,borderRadius:"50%"}}),t.a.createElement("div",{style:{marginLeft:10}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},bt==null?void 0:bt.user_name),t.a.createElement("span",{style:{color:"#999999",fontWeight:400,fontSize:"14px",marginLeft:60}},"\u6240\u5C5E\u6218\u961F",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(bt==null?void 0:bt.team_name)||"- -")),t.a.createElement("span",{style:{color:"#333333",fontWeight:400,fontSize:"14px",marginLeft:40}},"\u5B66\u6821 ",t.a.createElement("span",{style:{marginLeft:10,color:"#333"}},(bt==null?void 0:bt.school_name)||"- -")))),t.a.createElement("div",{style:{background:"#EEF2F8",height:40,borderRadius:"0px 0px 2px 2px",paddingLeft:60,paddingRight:40,display:"flex",alignItems:"center",justifyContent:"space-between"}},t.a.createElement("div",null,t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u63D0\u4EA4\u65F6\u95F4\uFF1A",bt==null?void 0:bt.created_at),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px",margin:"0px 40px"}},"\u6D88\u8017\u5185\u5B58\uFF1A",(bt==null?void 0:bt.ts_mem)||"- -","MB"),t.a.createElement("span",{style:{color:"#666666",fontSize:"12px"}},"\u4EE3\u7801\u6267\u884C\u65F6\u95F4\uFF1A",(bt==null?void 0:bt.ts_time)||"- -","\u79D2")),t.a.createElement("a",{style:{display:"flex",alignItems:"center"},href:"/tasks/".concat(bt==null?void 0:bt.game_identifier),target:"_blank"},t.a.createElement("i",{className:"iconfont icon-chakandaima",style:{marginRight:4}}),t.a.createElement("span",{style:{lineHeight:"14px"}},"\u67E5\u770B\u4EE3\u7801"))))})),t.a.createElement(Za.a,{total:nt==null?void 0:nt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ut.page,onChange:function(fr,jr){ut.page=fr,dt(Object(L.a)({},ut)),it(Object(L.a)({},ut))}})))}var gi=vi,Wa=function(Ze){var ht=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],gt=["","\u5341","\u767E","\u5343","\u4E07"];Ze=parseInt(Ze);var Wt=function(ct){for(var nt=ct.toString().split("").reverse(),it="",_t=0;_t<nt.length;_t++)it=(_t==0&&nt[_t]==0||_t>0&&nt[_t]==0&&nt[_t-1]==0?"":ht[nt[_t]]+(nt[_t]==0?gt[0]:gt[_t]))+it;return it},At=Math.floor(Ze/1e4),Jt=Ze%1e4;return Jt.toString().length<4&&(Jt="0"+Jt),At?Wt(At)+"\u4E07"+Wt(Jt):Wt(Ze)};function Ea(pt){var Ze,ht=pt.item,gt=pt.index,Wt=pt.StaffDetail,At=Object(o.useState)(!0),Jt=Object(m.a)(At,2),Lt=Jt[0],ct=Jt[1],nt=Object(o.useState)(!0),it=Object(m.a)(nt,2),_t=it[0],Rt=it[1],Ct=Object(o.useRef)();return t.a.createElement("div",{style:{border:"1px solid #E3EFFC",borderRadius:"2px",marginTop:20}},t.a.createElement("div",{style:{padding:10,display:"flex",position:"relative"}},t.a.createElement("img",{src:K.a.IMG_SERVER+"/"+(ht==null?void 0:ht.pic),style:{width:220,height:130,borderRadius:"4px"}}),t.a.createElement("div",{style:{marginLeft:20,width:"75%"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#333333",fontWeight:500,fontSize:"16px"}},"\u4EFB\u52A1",Wa(gt+1),"\uFF1A",t.a.createElement("span",{style:{color:"#333",fontWeight:"400"}},ht==null?void 0:ht.name)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u5173\u5361",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},ht==null?void 0:ht.challenges_count)," ")),t.a.createElement("div",{ref:Ct},t.a.createElement(B.a,{style:{maxHeight:Lt&&100},value:ht==null?void 0:ht.description})),t.a.createElement("div",{style:{textAlign:"center",color:"#145DFF",cursor:"pointer"},onClick:function(){ct(!Lt)}},Lt?"\u9605\u8BFB\u5168\u6587 ":"\u6536\u8D77\u5168\u6587 ",t.a.createElement("i",{className:"iconfont font14 ".concat(Lt?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})),t.a.createElement("div",{style:{marginTop:14,maxHeight:_t&&58,overflow:"hidden"}},ht==null||((Ze=ht.challenges)===null||Ze===void 0)?void 0:Ze.map(function(Ot,Pt){return t.a.createElement("div",{style:{marginTop:Pt===0?0:12}},t.a.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"}),t.a.createElement("span",{style:{marginLeft:10}},"\u7B2C",Pt+1,"\u5173",Ot==null?void 0:Ot.name))})),t.a.createElement("div",{style:{position:"absolute",bottom:14,right:10,color:"#145DFF",cursor:"pointer"}},t.a.createElement("span",{onClick:function(){Rt(!_t)}},_t?"\u5C55\u5F00":"\u6536\u8D77"," ",t.a.createElement("i",{className:"iconfont font14 ".concat(_t?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")}))," ",(Wt==null?void 0:Wt.enrolled)&&t.a.createElement(w.a,{onClick:function(){window.open("/shixuns/".concat(ht==null?void 0:ht.identifier,"/challenges"))},style:{marginLeft:30},type:"primary"},"\u5F00\u542F\u6311\u6218")))))}var Pi=Ea,qa=ue.a.TabPane;function Ha(pt){var Ze,ht,gt,Wt,At,Jt,Lt=pt.loading,ct=pt.ChartRules,nt=pt.ItemData,it=pt.getCharts,_t=pt.Selectkey,Rt=pt.HeaderDetail,Ct=pt.getChartRules,Ot=pt.userinfo,Pt=pt.Editable,jt=pt.dispatch,Ve=pt.StaffDetail,nr=Object(o.useState)(!1),Yt=Object(m.a)(nr,2),Qt=Yt[0],It=Yt[1],zt=Object(o.useState)(""),Ut=Object(m.a)(zt,2),Ht=Ut[0],xr=Ut[1],Nr=Object(o.useState)(!0),Dr=Object(m.a)(Nr,2),Br=Dr[0],Wr=Dr[1],on=Object(o.useState)(),qe=Object(m.a)(on,2),er=qe[0],sn=qe[1],en=Object(o.useState)(),mr=Object(m.a)(en,2),dr=mr[0],vr=mr[1],wt=Object(S.i)(),Bt=wt.identifier,tr=Object(o.useState)({page:1,limit:10}),Gt=Object(m.a)(tr,2),ut=Gt[0],dt=Gt[1],Dt=Object(o.useState)(),bt=Object(m.a)(Dt,2),fr=bt[0],jr=bt[1];Object(o.useEffect)(function(){var cr;Br&&ct!==null&&ct!==void 0&&(cr=ct.stages)!==null&&cr!==void 0&&cr[0]&&Hr()},[ct==null||((Ze=ct.stages)===null||Ze===void 0)?void 0:Ze[0]]);var Hr=function(){var cr=Object(c.a)(n.a.mark(function Lr(){var yr,Xr,Tr,Vr,In,Pe;return n.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:return In=ct==null||((yr=ct.stages)===null||yr===void 0)?void 0:yr[0],sn(In),Pe=ct==null||((Xr=ct.stages)===null||Xr===void 0||((Tr=Xr[0])===null||Tr===void 0||((Vr=Tr.children)===null||Vr===void 0)))?void 0:Vr[0],vr(Pe),ut.id=(Pe==null?void 0:Pe.id)||(In==null?void 0:In.id),dt(Object(L.a)({},ut)),He.next=7,it(Object(L.a)(Object(L.a)({},ut),{},{stage_id:ut.id}));case 7:case"end":return He.stop()}},Lr)}));return function(){return cr.apply(this,arguments)}}();return t.a.createElement("div",null,(ct==null||((ht=ct.stages)===null||ht===void 0)?void 0:ht.length)>0?null:t.a.createElement(Ke,null),(ct==null||((gt=ct.stages)===null||gt===void 0)?void 0:gt.length)>0&&t.a.createElement(ue.a,{tabBarStyle:{height:65,marginLeft:35,marginRight:30},animated:!0,onChange:function(){var cr=Object(c.a)(n.a.mark(function Lr(yr){var Xr,Tr,Vr,In,Pe,Fe,He;return n.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return It(!1),Fe=ct==null||((Xr=ct.stages)===null||Xr===void 0)?void 0:Xr.filter(function(Oe){return parseInt(yr)===parseInt(Oe==null?void 0:Oe.id)})[0],He=Fe==null||((Tr=Fe.children)===null||Tr===void 0)?void 0:Tr[0],vr(He),sn(Fe),xr(((Vr=ct.rule_contents)===null||Vr===void 0||((In=Vr.filter(function(Oe){return parseInt(Oe.competition_stage_id)===parseInt(Fe==null?void 0:Fe.id)}))===null||In===void 0||((Pe=In[0])===null||Pe===void 0))?void 0:Pe.content)||""),ut.page=1,ut.limit=10,ut.id=(He==null?void 0:He.id)||yr,dt(Object(L.a)({},ut)),he.next=9,it(Object(L.a)({},ut));case 9:case"end":return he.stop()}},Lr)}));return function(Lr){return cr.apply(this,arguments)}}()},ct&&ct.stages.map(function(cr,Lr){return t.a.createElement(qa,{tab:cr.name,key:cr.id===null?0:cr.id})})),(er==null||((Wt=er.children)===null||Wt===void 0)?void 0:Wt.length)>0&&t.a.createElement(ue.a,{activeKey:(dr==null?void 0:dr.id)+"",tabBarStyle:{height:65,marginLeft:35,marginRight:30},onChange:function(){var cr=Object(c.a)(n.a.mark(function Lr(yr){var Xr,Tr;return n.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return Tr=er==null||((Xr=er.children)===null||Xr===void 0)?void 0:Xr.filter(function(Pe){return parseInt(yr)===parseInt(Pe==null?void 0:Pe.id)})[0],vr(Tr),ut.page=1,ut.limit=10,ut.id=yr,dt(Object(L.a)({},ut)),In.next=5,it(Object(L.a)({},ut));case 5:case"end":return In.stop()}},Lr)}));return function(Lr){return cr.apply(this,arguments)}}()},er==null||((At=er.children)===null||At===void 0)?void 0:At.map(function(cr,Lr){return t.a.createElement(qa,{tab:cr.name,key:cr.id===null?0:cr.id})})),t.a.createElement("div",{style:{height:10,background:"#F5F5F5"}}),t.a.createElement("div",{style:{padding:"20px 30px"}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{color:"#9096A3"}},"\u4F5C\u54C1\u63D0\u4EA4\u65F6\u95F4",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},nt==null?void 0:nt.start_time,"~",nt==null?void 0:nt.end_time)),t.a.createElement("span",{style:{color:"#9096A3"}},"\u6210\u7EE9\u6765\u6E90",t.a.createElement("span",{style:{color:"#333333",marginLeft:5}},(nt==null?void 0:nt.score_source)===0?"\u7ECF\u9A8C\u503C":"\u9884\u6D4B\u51C6\u786E\u7387")," ")),t.a.createElement(i.a,{spinning:Lt},nt==null||((Jt=nt.results)===null||Jt===void 0)?void 0:Jt.map(function(cr,Lr){return t.a.createElement(Pi,{StaffDetail:Ve,item:cr,index:Lr})})),t.a.createElement(Za.a,{total:nt==null?void 0:nt.total_count,pageSize:10,hideOnSinglePage:!0,style:{marginTop:40,textAlign:"center"},showSizeChanger:!1,current:ut.page,onChange:function(Lr,yr){ut.page=Lr,dt(Object(L.a)({},ut)),it(Object(L.a)({},ut))}})))}var si=Ha,Ka=k("UfjD"),aa=k("qHvr"),ei=function(Ze){var ht,gt,Wt,At,Jt,Lt,ct,nt,it=Ze.globalSetting,_t=Ze.loading,Rt=Ze.dispatch,Ct=Ze.user,Ot=Object(g.a)(Ze,["globalSetting","loading","dispatch","user"]),Pt=Object(o.useState)({avatar_url:""}),jt=Object(m.a)(Pt,2),Ve=jt[0],nr=jt[1],Yt=Object(o.useState)([]),Qt=Object(m.a)(Yt,2),It=Qt[0],zt=Qt[1],Ut=Object(S.i)(),Ht=Ut.identifier,xr=Object(o.useState)([]),Nr=Object(m.a)(xr,2),Dr=Nr[0],Br=Nr[1],Wr=Object(o.useState)(!0),on=Object(m.a)(Wr,2),qe=on[0],er=on[1],sn=Object(o.useState)([]),en=Object(m.a)(sn,2),mr=en[0],dr=en[1],vr=Object(o.useState)([]),wt=Object(m.a)(vr,2),Bt=wt[0],tr=wt[1],Gt=Object(o.useState)(!1),ut=Object(m.a)(Gt,2),dt=ut[0],Dt=ut[1],bt=Object(o.useState)(!1),fr=Object(m.a)(bt,2),jr=fr[0],Hr=fr[1],cr=Object(o.useState)(!1),Lr=Object(m.a)(cr,2),yr=Lr[0],Xr=Lr[1],Tr=Object(o.useState)([]),Vr=Object(m.a)(Tr,2),In=Vr[0],Pe=Vr[1],Fe=Object(o.useState)([]),He=Object(m.a)(Fe,2),Me=He[0],he=He[1],Oe=Object(o.useState)([]),ge=Object(m.a)(Oe,2),Le=ge[0],Ne=ge[1],Ue=Object(o.useState)(!1),ke=Object(m.a)(Ue,2),ze=ke[0],ot=ke[1],yt=Object(o.useState)([]),xt=Object(m.a)(yt,2),Nt=xt[0],hr=xt[1],Cr=Object(o.useState)(),Sr=Object(m.a)(Cr,2),Pr=Sr[0],_r=Sr[1],Mr=Object(o.useState)(!0),Ir=Object(m.a)(Mr,2),Jr=Ir[0],Kr=Ir[1],gn=Object(o.useState)(!1),zr=Object(m.a)(gn,2),gr=zr[0],Er=zr[1],Fr=Object(o.useState)(!1),$r=Object(m.a)(Fr,2),or=$r[0],tn=$r[1],An=Object(o.useState)(!1),ln=Object(m.a)(An,2),En=ln[0],un=ln[1],jn=Object(o.useState)(!1),Xn=Object(m.a)(jn,2),Rn=Xn[0],ta=Xn[1],Ia=Object(o.useState)(!1),ca=Object(m.a)(Ia,2),Vn=ca[0],xn=ca[1],_n=Object(o.useState)(!0),Dn=Object(m.a)(_n,2),Cn=Dn[0],Bn=Dn[1],ma=Object(S.h)(),Va=Object(o.useRef)(null);Object(o.useEffect)(function(){Ht&&hn(),Object(Kt.V)("\u7ADE\u8D5B")},[Ht]);function hn(){return Ta.apply(this,arguments)}function Ta(){return Ta=Object(c.a)(n.a.mark(function ar(){var sr;return n.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return rn.t0=zt,rn.next=3,Rt({type:"competitions/getStaff",payload:{identifier:Ht}});case 3:return rn.t1=rn.sent,(0,rn.t0)(rn.t1),rn.next=7,Rt({type:"competitions/getHeader",payload:{identifier:Ht}});case 7:sr=rn.sent,nr(sr),Object(Kt.V)((sr==null?void 0:sr.name)||"\u7ADE\u8D5B");case 10:case"end":return rn.stop()}},ar)})),Ta.apply(this,arguments)}Object(o.useEffect)(function(){var ar;_r(parseInt(ma==null||((ar=ma.query)===null||ar===void 0)?void 0:ar.type)===1)},[ma]),Object(o.useEffect)(function(){var ar;if((Ve==null||((ar=Ve.competition_modules)===null||ar===void 0)?void 0:ar.length)>0){var sr,$t;if((ma==null||((sr=ma.query)===null||sr===void 0)?void 0:sr.active)==="\u8D5B\u9898\u53D1\u5E03"){var rn,Zt=Ve==null||((rn=Ve.competition_modules)===null||rn===void 0)?void 0:rn.find(function(ci){return ci.name==="\u8D5B\u9898\u53D1\u5E03"});if(Zt){Sa(Zt);return}}Sa(Ve==null||(($t=Ve.competition_modules)===null||$t===void 0)?void 0:$t[0])}},[Ve]);function Sa(ar){return yn.apply(this,arguments)}function yn(){return yn=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Ne(sr.id),Le=sr.id,dr(sr),!(sr.module_type==="entrance")){Zt.next=9;break}return Zt.next=6,Rt({type:"competitions/getItem",payload:{url:sr.module_url,module_type:"entrance"}});case 6:$t=Zt.sent,Zt.next=12;break;case 9:return Zt.next=11,Rt({type:"competitions/getItem",payload:{url:sr.module_url}});case 11:$t=Zt.sent;case 12:Dt(!1),Xr(!1),ot(!1),Br($t),Er(!1),tn(!1),tr(sr.module_type),sr.module_type==="chart"?(Dt(!0),er(!1),Bi()):sr.module_type==="certificate"?(Xr(!0),Dt(!1),er(!1),yi()):sr.module_type==="md_tab"?(ot(!0),er(!1),localStorage.setItem("issee","2"),Dt(!1),Xr(!1),ni()):sr.module_type==="md_shixun"?(Er(!0),er(!1),ni()):sr.module_type==="entrance"?(tn(!0),er(!1),ni()):(er(!0),localStorage.setItem("issee","1"));case 20:case"end":return Zt.stop()}},ar)})),yn.apply(this,arguments)}function cn(ar,sr,$t){return Wn.apply(this,arguments)}function Wn(){return Wn=Object(c.a)(n.a.mark(function ar(sr,$t,rn){var Zt,ci;return n.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(sr.stopPropagation(),Object(ae.e)(Rt)){Tn.next=3;break}return Tn.abrupt("return");case 3:if(!(Ve!=null&&Ve.is_authentication&&!(Ct!=null&&(Zt=Ct.userInfo)!==null&&Zt!==void 0&&Zt.authentication))){Tn.next=6;break}return Rt({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),Tn.abrupt("return");case 6:if(!(Ve!=null&&Ve.enroll_url)){Tn.next=9;break}return Object(Kt.Q)(Ve==null?void 0:Ve.enroll_url),Tn.abrupt("return");case 9:if(!(rn==="ismodel")){Tn.next=23;break}if(!($t.member_of_course===!0)){Tn.next=14;break}Object(Kt.Q)("/classrooms/".concat($t.course_id)),Tn.next=21;break;case 14:if($t.invite_code){Tn.next=17;break}return p.b.info("\u672C\u7ADE\u8D5B\u53EA\u9762\u5411\u90E8\u5206\u5B66\u6821/\u5355\u4F4D\u5F00\u653E\uFF0C\u4F60\u6682\u65F6\u6CA1\u6709\u53C2\u8D5B\u8D44\u683C"),Tn.abrupt("return");case 17:return Tn.next=19,Rt({type:"competitions/addApplytojoincourse",payload:{invite_code:$t.invite_code,student:1}});case 19:ci=Tn.sent,ci.status===0&&Object(Kt.Q)("/classrooms/".concat($t.course_id));case 21:Tn.next=27;break;case 23:if(!(It.enrolled===!0)){Tn.next=26;break}return Object(Kt.Q)(rn),Tn.abrupt("return");case 26:un(!0);case 27:case"end":return Tn.stop()}},ar)})),Wn.apply(this,arguments)}function Bi(){return _i.apply(this,arguments)}function _i(){return _i=Object(c.a)(n.a.mark(function ar(){return n.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.t0=Hr,$t.next=3,Rt({type:"competitions/ChartRules",payload:{identifier:Ht}});case 3:return $t.t1=$t.sent,$t.next=6,(0,$t.t0)($t.t1);case 6:case"end":return $t.stop()}},ar)})),_i.apply(this,arguments)}function ti(ar){return ri.apply(this,arguments)}function ri(){return ri=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Rt({type:"competitions/Charts",payload:{identifier:Ht,stage_id:sr}});case 2:$t=Zt.sent,Br($t);case 4:case"end":return Zt.stop()}},ar)})),ri.apply(this,arguments)}function Li(ar){return wi.apply(this,arguments)}function wi(){return wi=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Kr(!0),Zt.next=3,Rt({type:"competitions/Results",payload:Object(L.a)({identifier:Ht,stage_id:sr==null?void 0:sr.id},sr)});case 3:$t=Zt.sent,Br($t),Kr(!1);case 6:case"end":return Zt.stop()}},ar)})),wi.apply(this,arguments)}function Mi(ar){return Wi.apply(this,arguments)}function Wi(){return Wi=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Kr(!0),Zt.next=3,Rt({type:"competitions/Results",payload:Object(L.a)({identifier:Ht,stage_id:sr==null?void 0:sr.id,module_type:"entrance"},sr)});case 3:$t=Zt.sent,Br($t),Kr(!1);case 6:case"end":return Zt.stop()}},ar)})),Wi.apply(this,arguments)}function Vi(ar){return Ii.apply(this,arguments)}function Ii(){return Ii=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Rt({type:"competitions/Results",payload:{identifier:Ht,stage_id:sr}});case 2:if($t=Zt.sent,!(localStorage.getItem("issee")==="1")){Zt.next=5;break}return Zt.abrupt("return");case 5:Br($t);case 6:case"end":return Zt.stop()}},ar)})),Ii.apply(this,arguments)}function ni(){return Ti.apply(this,arguments)}function Ti(){return Ti=Object(c.a)(n.a.mark(function ar(){return n.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:return $t.t0=hr,$t.next=3,Rt({type:"competitions/TabResults",payload:{identifier:Ht,competition_module_id:Le}});case 3:$t.t1=$t.sent,(0,$t.t0)($t.t1);case 5:case"end":return $t.stop()}},ar)})),Ti.apply(this,arguments)}function yi(){return ai.apply(this,arguments)}function ai(){return ai=Object(c.a)(n.a.mark(function ar(){var sr,$t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Rt({type:"competitions/Prize",payload:{identifier:Ht,user_id:Ct==null||((sr=Ct.userInfo)===null||sr===void 0)?void 0:sr.user_id}});case 2:$t=Zt.sent,Pe($t);case 4:case"end":return Zt.stop()}},ar)})),ai.apply(this,arguments)}function co(){return bi.apply(this,arguments)}function bi(){return bi=Object(c.a)(n.a.mark(function ar(){var sr,$t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:return Zt.next=2,Rt({type:"competitions/Accounts",payload:{id:Ct==null||((sr=Ct.userInfo)===null||sr===void 0)?void 0:sr.user_id}});case 2:$t=Zt.sent,he($t);case 4:case"end":return Zt.stop()}},ar)})),bi.apply(this,arguments)}function Si(ar){return ii.apply(this,arguments)}function ii(){return ii=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Cn){Zt.next=2;break}return Zt.abrupt("return");case 2:if(Bn(!1),!ui()){Zt.next=5;break}return Zt.abrupt("return");case 5:return Zt.next=7,Rt({type:"competitions/AddTeam",payload:{identifier:Ht,name:sr}});case 7:$t=Zt.sent,$t&&$t.status===0?(p.b.info("\u521B\u5EFA\u6218\u961F\u6210\u529F"),hn(),ta(!1)):Bn(!0);case 9:case"end":return Zt.stop()}},ar)})),ii.apply(this,arguments)}function ui(){var ar,sr;if(Ct!=null&&(ar=Ct.userInfo)!==null&&ar!==void 0&&ar.is_teacher){var $t;if(It!=null&&($t=It.teacher_staff)!==null&&$t!==void 0&&$t.mutiple_limited&&(It!=null&&It.enrolled))return p.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Bn(!0),!0}else{var rn;if(It!=null&&(rn=It.member_staff)!==null&&rn!==void 0&&rn.mutiple_limited&&(It!=null&&It.enrolled))return p.b.info("\u4F60\u5DF2\u7ECF\u62A5\u540D\uFF0C\u4E0D\u80FD\u91CD\u590D\u62A5\u540D"),Bn(!0),!0}if(It!=null&&It.enroll_ended)return p.b.info("\u62A5\u540D\u5DF2\u622A\u6B62\uFF0C\u65E0\u9700\u62A5\u540D"),Bn(!0),!0;if(Ct!=null&&(sr=Ct.userInfo)!==null&&sr!==void 0&&sr.is_teacher){if(!It.teacher_staff)return p.b.info("\u5DF2\u7981\u6B62\u8001\u5E08\u62A5\u540D"),Bn(!0),!0}else if(!(It!=null&&It.member_staff))return p.b.info("\u5DF2\u7981\u6B62\u5B66\u751F\u62A5\u540D"),Bn(!0),!0}function ka(ar){return $a.apply(this,arguments)}function $a(){return $a=Object(c.a)(n.a.mark(function ar(sr){var $t;return n.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(Cn){Zt.next=2;break}return Zt.abrupt("return");case 2:if(!ui()){Zt.next=4;break}return Zt.abrupt("return");case 4:return Bn(!1),Zt.next=7,Rt({type:"competitions/JoinTeam",payload:{identifier:Ht,invite_code:sr}});case 7:$t=Zt.sent,$t&&$t.status===0?(p.b.info("\u52A0\u5165\u6218\u961F\u6210\u529F"),xn(!1),Bn(!0),hn()):Bn(!0);case 9:case"end":return Zt.stop()}},ar)})),$a.apply(this,arguments)}return t.a.createElement("div",{className:"edu-container minH500"},t.a.createElement(a.a,{className:"mt10",separator:">"},t.a.createElement(a.a.Item,null,t.a.createElement(x.a,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),t.a.createElement(a.a.Item,null,Ve.name,Ve.sub_title?"-"+Ve.sub_title:null)),t.a.createElement("div",{className:"mt10",style:{display:"flex",background:"#fff",position:"relative",padding:"20px 12px"}},t.a.createElement(i.a,{spinning:_t.effects["competitions/getHeader"]},t.a.createElement("div",{style:{height:"355px",width:"800px"}},(Ve==null?void 0:Ve.avatar_url)&&(Ve==null?void 0:Ve.avatar_url)!==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:K.a.IMG_SERVER+"/"+(Ve==null?void 0:Ve.avatar_url)}),!(Ve!=null&&Ve.avatar_url)&&(Ve==null?void 0:Ve.avatar_url)==null&&t.a.createElement("img",{style:{height:"355px",width:"800px"},src:K.a.IMG_SERVER+"/images/educoder/competitions/mainbanner.jpg"}))),t.a.createElement("div",{style:{marginLeft:"20px",width:"400px"}},t.a.createElement("p",{className:"".concat(O.a.titlesize)},Ve.name,Ve.sub_title?"-"+Ve.sub_title:null),t.a.createElement("p",{style:{display:"flex",justifyContent:"space-between",marginRight:18}},t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u5956\u91D1"),Ve!=null&&Ve.bonus?t.a.createElement("span",{style:{fontSize:"24px"}},"\xA5",parseInt(Ve&&Ve.bonus).toLocaleString()):t.a.createElement("span",{style:{fontSize:"24px"}},"\u6682\u65E0")),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u6D4F\u89C8"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Ve&&Ve.visits_count).toLocaleString())),t.a.createElement("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"}},t.a.createElement("span",null,"\u62A5\u540D"),t.a.createElement("span",{style:{fontSize:"24px"}},parseInt(Ve&&Ve.member_count).toLocaleString()))),t.a.createElement("p",{className:O.a.timesize,style:{marginTop:30}},t.a.createElement("span",{style:{color:"#9b9b9b",marginTop:"30px"}},"\u7ADE\u8D5B\u65F6\u95F4\uFF1A"),Ve.start_time,"~",Ve.end_time),t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u62A5\u540D\u622A\u6B62\uFF1A"),Ve.enroll_end_time),Ve.competition_status==="ended"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u5DF2\u7ED3\u675F"):null,Ve.competition_status==="nearly_published"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u672A\u53D1\u5E03"):null,Ve.competition_status==="progressing"?t.a.createElement("p",{className:O.a.timesize},t.a.createElement("span",{style:{color:"#9b9b9b"}},"\u7ADE\u8D5B\u72B6\u6001\uFF1A"),"\u8FDB\u884C\u4E2D"):null,t.a.createElement("div",{style:{display:"flex",justifyContent:"center"}},(Ve==null?void 0:Ve.mode)<=2&&It.enrolled&&t.a.createElement(w.a,{onClick:function(sr){if((Ve==null?void 0:Ve.mode)===1){var $t;Sa(($t=Ve.competition_modules)===null||$t===void 0?void 0:$t.find(function(rn){return rn.module_type==="entrance"}))}else cn(sr,Ve,"ismodel")},style:{background:"#07C160",color:"#fff",border:"1px solid #07C160",marginRight:20,display:(Ve==null?void 0:Ve.mode)===2||(Ve==null?void 0:Ve.mode)===1&&((ht=Ve.competition_modules)===null||ht===void 0||((gt=ht.filter(function(ar){return ar.module_type==="entrance"}))===null||gt===void 0)?void 0:gt.length)>0?"":"none"},className:O.a.buttonsize},(Ve==null?void 0:Ve.mode)===1&&"\u8D5B\u9898\u5165\u53E3",(Ve==null?void 0:Ve.mode)===2&&"\u8FDB\u5165\u8BFE\u5802"),Ve.competition_status==="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u5DF2\u7ED3\u675F"):null,Ve.competition_status==="nearly_published"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u672A\u53D1\u5E03"):null,Ve.competition_status!=="nearly_published"&&Ve.enroll_end&&Ve.competition_status!=="ended"?t.a.createElement(w.a,{type:"primary",className:O.a.buttonsize,disabled:!0},"\u62A5\u540D\u622A\u6B62"):null,Ve.competition_status==="progressing"&&Ve.enroll_end!=!0?t.a.createElement(w.a,{type:"primary",disabled:It.enrolled&&!Ve.need_attachment,className:O.a.buttonsize,onClick:function(sr){if(It.enrolled&&Ve.need_attachment){var $t;($t=Va.current)===null||$t===void 0||$t.handleVisible();return}cn(sr,Ve,Ve.mode===2?"ismodel":Ve.personal?"personal":"/competitions/index/".concat(Ve.identifier,"/enroll"))}},It.enrolled?Ve.need_attachment?"\u4E0A\u4F20\u4F5C\u54C1":"\u5DF2\u62A5\u540D":Ve!=null&&Ve.enroll_url?"\u524D\u5F80\u5927\u8D5B\u5B98\u7F51\u62A5\u540D":"\u7ACB\u5373\u62A5\u540D"):null),Ct.userInfo.real_name!="\u6E38\u5BA2"&&!(Ve!=null&&Ve.enroll_url)&&t.a.createElement("span",{onClick:function(sr){return cn(sr,Ve,Ve.mode===2?"ismodel":Ve.personal?"personal":"/competitions/index/".concat(Ve.identifier,"/enroll"))},className:O.a.myteam},Object(Ma.u)()?"\u53C2\u8D5B\u6218\u961F>>":"\u6211\u7684\u6218\u961F>>"))),t.a.createElement("div",{className:O.a.bootmdetail},t.a.createElement("div",{className:O.a.flex1},t.a.createElement(u.a,{selectedKeys:["".concat(Le)]},Ve&&Ve.competition_modules&&Ve.competition_modules.map(function(ar,sr){if(ar.module_type!="enroll")return t.a.createElement(u.a.Item,{className:O.a.menuItem,onClick:function(){if(ar!=null&&ar.is_authentication){if(!Object(ae.e)(Rt))return;p.b.info("\u52A0\u5165\u6218\u961F\u624D\u80FD\u67E5\u770B");return}Sa(ar)},key:ar.id},ar.name)}))),t.a.createElement("div",{className:O.a.flex6,style:{padding:(gr||or)&&0}},yr?t.a.createElement(oi,{dispatch:Rt,userid:Ct==null||((Wt=Ct.userInfo)===null||Wt===void 0)?void 0:Wt.user_id,Prize:In,Accounts:Me,getAccounts:co}):null,dt?t.a.createElement(Se,{HeaderDetail:Ve,userinfo:Ct.userInfo,Editable:Ve==null||((At=Ve.permission)===null||At===void 0)?void 0:At.editable,getCharts:ti,getChartRules:Bi,Selectkey:Le,ChartRules:jr,ItemData:Dr}):null,qe?t.a.createElement(Q,{ref:Va,StaffDetail:It,HeaderDetail:Ve,userinfo:Ct.userInfo,Editable:Ve==null||((Jt=Ve.permission)===null||Jt===void 0)?void 0:Jt.editable,ItemData:Dr,setIssee:er,ModelType:Bt,dispatch:Rt}):null,!qe&&!gr&&!or&&!dt&&!yr&&!ze?t.a.createElement($,{userinfo:Ct.userInfo,ModelType:Bt,getrightdatas:Sa,dispatch:Rt,MenuItem:mr,setIssee:er,identifier:Ht,ItemData:Dr}):null,ze&&t.a.createElement(qn,{dispatch:Rt,StaffDetail:It,userinfo:Ct.userInfo,HeaderDetail:Ve,Editable:Ve==null||((Lt=Ve.permission)===null||Lt===void 0)?void 0:Lt.editable,getCharts:Vi,getChartRules:ni,Selectkey:Le,ChartRules:Nt,ItemData:Dr}),gr&&t.a.createElement(gi,{loading:Jr,dispatch:Rt,StaffDetail:It,userinfo:Ct.userInfo,HeaderDetail:Ve,Editable:Ve==null||((ct=Ve.permission)===null||ct===void 0)?void 0:ct.editable,getCharts:Li,getChartRules:ni,Selectkey:Le,ChartRules:Nt,ItemData:Dr}),or&&t.a.createElement(si,{loading:Jr,dispatch:Rt,StaffDetail:It,userinfo:Ct.userInfo,HeaderDetail:Ve,Editable:Ve==null||((nt=Ve.permission)===null||nt===void 0)?void 0:nt.editable,getCharts:Mi,getChartRules:ni,Selectkey:Le,ChartRules:Nt,ItemData:Dr}))),t.a.createElement(E.a,null),t.a.createElement(G,{getResults:Vi}),t.a.createElement(C.a,{visible:Pr,footer:null,width:720,title:"\u63D0\u793A",centered:!0,onCancel:function(){return _r(!1)}},t.a.createElement("div",{className:O.a.modal},t.a.createElement("div",null,"\u534E\u4E3A\u6A21\u578B\u738B\u8005\u6311\u6218\u8D5B\u9EC4\u91D1\u8D5B\u6B63\u5F0F\u5F00\u542F\u5566"),t.a.createElement("div",null,"\u672C\u8D5B\u6BB5\u603B\u5956\u91D1\u9AD8\u8FBE",t.a.createElement("span",{style:{color:"#FF8C29"}},"300,000"),"\u5143"),t.a.createElement("div",null,"1\u3001\u7B26\u5408\u8D5B\u9898\u8981\u6C42\u7684\u961F\u4F0D\uFF08\u517125\u652F\uFF09\u53EF\u83B7\u5F97\u5956\u91D1\uFF1A12000RMB/\u961F \uFF1B"),t.a.createElement("div",null,"2\u3001\u53C2\u4E0E\u83B7\u5F97\u201C\u8363\u8000\u6BBF\u5802\u201D\u699C\u4E3B\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1\uFF1B"),t.a.createElement("div",null,"3\u3001\u5404\u8D5B\u9898\u7CBE\u5EA6\u6700\u9AD8\u7684\u961F\u4F0D\uFF0C\u53EF\u83B7\u5F97\u7531\u4E2D\u56FD\u8F6F\u4EF6\u5F00\u6E90\u521B\u65B0\u5927\u8D5B\u7EC4\u59D4\u4F1A\u9881\u53D1\u7684\u9EC4\u91D1\u5B9D\u7BB1+\u8363\u8A89\u8BC1\u4E66\uFF1B"),t.a.createElement("div",null,"\u5FC3\u52A8\u5427\uFF0C\u90A3\u5C31\u5FEB\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u62A5\u540D\u53C2\u8D5B"),t.a.createElement(w.a,{type:"primary",onClick:function(){return Object(Kt.Q)("https://competition.huaweicloud.com/information/1000041485/introduction")}},"\u524D\u5F80\u62A5\u540D\u53C2\u8D5B"))),t.a.createElement(C.a,{title:"\u9009\u62E9\u53C2\u8D5B\u65B9\u5F0F",visible:En,onCancel:function(){un(!1)},footer:!1},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-around",height:100,alignItems:"center"}},t.a.createElement(w.a,{type:"primary",style:{height:40},onClick:function(){xn(!0),un(!1)}},"\u52A0\u5165\u6218\u961F\u53C2\u8D5B"),t.a.createElement(w.a,{style:{height:40},onClick:function(){ta(!0),un(!1)}},"\u53BB\u521B\u5EFA\u6218\u961F\u53C2\u8D5B"))),Vn?t.a.createElement(Ka.a,{isjoin:Vn,setJoin:xn,JoinTeams:ka}):null,Rn?t.a.createElement(aa.a,{isAddmodle:Rn,setIsAdd:ta,createTeam:Si}):null)},li=J.default=Object(s.a)(function(pt){var Ze=pt.loading,ht=pt.globalSetting,gt=pt.user;return{globalSetting:ht,loading:Ze,user:gt}})(ei)},GRuw:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("lPiR"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.algo,h=u.SHA256,w=u.SHA224=h.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=h._doFinalize.call(this);return d.sigBytes-=4,d}});f.SHA224=h._createHelper(w),f.HmacSHA224=h._createHmacHelper(w)}(),L.SHA224})},GfqC:function(j,J,k){"use strict";var L=k("cDcd"),f=k.n(L),C=k("TSYQ"),D=k.n(C);function u(z,U){var B="cannot "+z.method+" "+z.action+" "+U.status+"'",K=new Error(B);return K.status=U.status,K.method=z.method,K.url=z.action,K}function h(z){var U=z.responseText||z.response;if(!U)return U;try{return JSON.parse(U)}catch(B){return U}}function w(z){var U=new XMLHttpRequest;z.onProgress&&U.upload&&(U.upload.onprogress=function(ae){ae.total>0&&(ae.percent=ae.loaded/ae.total*100),z.onProgress(ae)});var B=new FormData;z.data&&Object.keys(z.data).forEach(function(q){var ae=z.data[q];if(Array.isArray(ae)){ae.forEach(function(se){B.append(q+"[]",se)});return}B.append(q,z.data[q])}),z.file instanceof Blob?B.append(z.filename,z.file,z.file.name):B.append(z.filename,z.file),U.onerror=function(ae){z.onError(ae)},U.onload=function(){return U.status<200||U.status>=300?z.onError(u(z,U),h(U)):z.onSuccess(h(U),U)},U.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var K=z.headers||{};return K["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(K).forEach(function(q){K[q]!==null&&U.setRequestHeader(q,K[q])}),U.send(B),{abort:function(){U.abort()}}}var d=+new Date,i=0;function l(){return"rc-upload-"+d+"-"+ ++i}function a(z,U){return z.indexOf(U,z.length-U.length)!==-1}var _=function(z,U){if(z&&U){var B=Array.isArray(U)?U:U.split(","),K=z.name||"",q=z.type||"",ae=q.replace(/\/.*$/,"");return B.some(function(se){var we=se.trim();return we.charAt(0)==="."?a(K.toLowerCase(),we.toLowerCase()):/\/\*$/.test(we)?ae===we.replace(/\/.*$/,""):q===we})}return!0};function p(z,U){var B=z.createReader(),K=[];function q(){B.readEntries(function(ae){var se=Array.prototype.slice.apply(ae);K=K.concat(se);var we=!se.length;we?U(K):q()})}q()}var c=function(U,B,K){var q=function ae(se,we){we=we||"",se.isFile?se.file(function(Te){K(Te)&&(se.fullPath&&!Te.webkitRelativePath&&(Object.defineProperties(Te,{webkitRelativePath:{writable:!0}}),Te.webkitRelativePath=se.fullPath.replace(/^\//,""),Object.defineProperties(Te,{webkitRelativePath:{writable:!1}})),B([Te]))}):se.isDirectory&&p(se,function(Te){Te.forEach(function(de){ae(de,""+we+se.name+"/")})})};U.forEach(function(ae){q(ae.webkitGetAsEntry())})},m=c,g=Object.assign||function(z){for(var U=1;U<arguments.length;U++){var B=arguments[U];for(var K in B)Object.prototype.hasOwnProperty.call(B,K)&&(z[K]=B[K])}return z},b=function(){function z(U,B){var K=[],q=!0,ae=!1,se=void 0;try{for(var we=U[Symbol.iterator](),Te;!(q=(Te=we.next()).done)&&!(K.push(Te.value),B&&K.length===B);q=!0);}catch(de){ae=!0,se=de}finally{try{!q&&we.return&&we.return()}finally{if(ae)throw se}}return K}return function(U,B){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return z(U,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function z(U,B){for(var K=0;K<B.length;K++){var q=B[K];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,B,K){return B&&z(U.prototype,B),K&&z(U,K),U}}();function o(z,U,B){return U in z?Object.defineProperty(z,U,{value:B,enumerable:!0,configurable:!0,writable:!0}):z[U]=B,z}function t(z,U){var B={};for(var K in z){if(U.indexOf(K)>=0)continue;if(!Object.prototype.hasOwnProperty.call(z,K))continue;B[K]=z[K]}return B}function S(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function x(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function s(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}var P=function(U){return Object.keys(U).reduce(function(B,K){return(K.substr(0,5)==="data-"||K.substr(0,5)==="aria-"||K==="role")&&(B[K]=U[K]),B},{})},O=function(z){s(U,z);function U(){var B,K,q,ae;S(this,U);for(var se=arguments.length,we=Array(se),Te=0;Te<se;Te++)we[Te]=arguments[Te];return ae=(K=(q=x(this,(B=U.__proto__||Object.getPrototypeOf(U)).call.apply(B,[this].concat(we))),q),q.state={uid:l()},q.reqs={},q.onChange=function(de){var xe=de.target.files;q.uploadFiles(xe),q.reset()},q.onClick=function(de){var xe=q.fileInput;if(!xe)return;var pe=q.props,ne=pe.children,ie=pe.onClick;ne&&ne.type==="button"&&(xe.parentNode.focus(),xe.parentNode.querySelector("button").blur()),xe.click(),ie&&ie(de)},q.onKeyDown=function(de){de.key==="Enter"&&q.onClick()},q.onFileDrop=function(de){var xe=q.props.multiple;if(de.preventDefault(),de.type==="dragover")return;if(q.props.directory)m(Array.prototype.slice.call(de.dataTransfer.items),q.uploadFiles,function(ne){return _(ne,q.props.accept)});else{var pe=Array.prototype.slice.call(de.dataTransfer.files).filter(function(ne){return _(ne,q.props.accept)});xe===!1&&(pe=pe.slice(0,1)),q.uploadFiles(pe)}},q.uploadFiles=function(de){var xe=Array.prototype.slice.call(de);xe.map(function(pe){return pe.uid=l(),pe}).forEach(function(pe){q.upload(pe,xe)})},q.saveFileInput=function(de){q.fileInput=de},K),x(q,ae)}return n(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(K,q){var ae=this,se=this.props;if(!se.beforeUpload)return setTimeout(function(){return ae.post(K)},0);var we=se.beforeUpload(K,q);we&&we.then?we.then(function(Te){var de=Object.prototype.toString.call(Te);return de==="[object File]"||de==="[object Blob]"?ae.post(Te):ae.post(K)}).catch(function(Te){console.log(Te)}):we!==!1&&setTimeout(function(){return ae.post(K)},0);return}},{key:"post",value:function(K){var q=this;if(!this._isMounted)return;var ae=this.props,se=ae.onStart,we=ae.onProgress,Te=ae.transformFile,de=Te===void 0?function(xe){return xe}:Te;new Promise(function(xe){var pe=ae.action;return typeof pe=="function"&&(pe=pe(K)),xe(pe)}).then(function(xe){var pe=K.uid,ne=ae.customRequest||w,ie=Promise.resolve(de(K)).then(function(ee){var le=ae.data;return typeof le=="function"&&(le=le(ee)),Promise.all([ee,le])}).catch(function(ee){console.error(ee)});ie.then(function(ee){var le=b(ee,2),Q=le[0],Z=le[1],be={action:xe,filename:ae.name,data:Z,file:Q,headers:ae.headers,withCredentials:ae.withCredentials,method:ae.method||"post",onProgress:we?function(te){we(te,K)}:null,onSuccess:function($,X){delete q.reqs[pe],ae.onSuccess($,K,X)},onError:function($,X){delete q.reqs[pe],ae.onError($,X,K)}};se(K),q.reqs[pe]=ne(be)})})}},{key:"reset",value:function(){this.setState({uid:l()})}},{key:"abort",value:function(K){var q=this.reqs;if(K){var ae=K;K&&K.uid&&(ae=K.uid),q[ae]&&q[ae].abort&&q[ae].abort(),delete q[ae]}else Object.keys(q).forEach(function(se){q[se]&&q[se].abort&&q[se].abort(),delete q[se]})}},{key:"render",value:function(){var K,q=this.props,ae=q.component,se=q.prefixCls,we=q.className,Te=q.disabled,de=q.id,xe=q.style,pe=q.multiple,ne=q.accept,ie=q.children,ee=q.directory,le=q.openFileDialogOnClick,Q=q.onMouseEnter,Z=q.onMouseLeave,be=t(q,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),te=D()((K={},o(K,se,!0),o(K,se+"-disabled",Te),o(K,we,we),K)),$=Te?{}:{onClick:le?this.onClick:function(){},onKeyDown:le?this.onKeyDown:function(){},onMouseEnter:Q,onMouseLeave:Z,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return f.a.createElement(ae,g({},$,{className:te,role:"button",style:xe}),f.a.createElement("input",g({},P(be),{id:de,type:"file",ref:this.saveFileInput,onClick:function(Y){return Y.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ne,directory:ee?"directory":null,webkitdirectory:ee?"webkitdirectory":null,multiple:pe,onChange:this.onChange})),ie)}}]),U}(L.Component),E=O,v=Object.assign||function(z){for(var U=1;U<arguments.length;U++){var B=arguments[U];for(var K in B)Object.prototype.hasOwnProperty.call(B,K)&&(z[K]=B[K])}return z},y=function(){function z(U,B){for(var K=0;K<B.length;K++){var q=B[K];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(U,q.key,q)}}return function(U,B,K){return B&&z(U.prototype,B),K&&z(U,K),U}}();function T(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function M(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function N(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}function I(){}var G=function(z){N(U,z);function U(){var B,K,q,ae;T(this,U);for(var se=arguments.length,we=Array(se),Te=0;Te<se;Te++)we[Te]=arguments[Te];return ae=(K=(q=M(this,(B=U.__proto__||Object.getPrototypeOf(U)).call.apply(B,[this].concat(we))),q),q.saveUploader=function(de){q.uploader=de},K),M(q,ae)}return y(U,[{key:"abort",value:function(K){this.uploader.abort(K)}},{key:"render",value:function(){return f.a.createElement(E,v({},this.props,{ref:this.saveUploader}))}}]),U}(L.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:I,onError:I,onSuccess:I,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var H=G,W=J.a=H},HmJG:function(j,J,k){},IBYe:function(j,J,k){"use strict";function L(f){return null}J.a=L},Ib8C:function(j,J,k){(function(L){(function(f,C){j.exports=J=C()})(this,function(){var f=f||function(C,D){var u;if(typeof window!="undefined"&&window.crypto&&(u=window.crypto),typeof self!="undefined"&&self.crypto&&(u=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(u=globalThis.crypto),!u&&typeof window!="undefined"&&window.msCrypto&&(u=window.msCrypto),!u&&typeof L!="undefined"&&L.crypto&&(u=L.crypto),!u&&!0)try{u=k(4)}catch(o){}var h=function(){if(u){if(typeof u.getRandomValues=="function")try{return u.getRandomValues(new Uint32Array(1))[0]}catch(o){}if(typeof u.randomBytes=="function")try{return u.randomBytes(4).readInt32LE()}catch(o){}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function o(){}return function(t){var S;return o.prototype=t,S=new o,o.prototype=null,S}}(),d={},i=d.lib={},l=i.Base=function(){return{extend:function(o){var t=w(this);return o&&t.mixIn(o),(!t.hasOwnProperty("init")||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var t in o)o.hasOwnProperty(t)&&(this[t]=o[t]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=i.WordArray=l.extend({init:function(o,t){o=this.words=o||[],t!=D?this.sigBytes=t:this.sigBytes=o.length*4},toString:function(o){return(o||p).stringify(this)},concat:function(o){var t=this.words,S=o.words,x=this.sigBytes,s=o.sigBytes;if(this.clamp(),x%4)for(var P=0;P<s;P++){var O=S[P>>>2]>>>24-P%4*8&255;t[x+P>>>2]|=O<<24-(x+P)%4*8}else for(var E=0;E<s;E+=4)t[x+E>>>2]=S[E>>>2];return this.sigBytes+=s,this},clamp:function(){var o=this.words,t=this.sigBytes;o[t>>>2]&=4294967295<<32-t%4*8,o.length=C.ceil(t/4)},clone:function(){var o=l.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var t=[],S=0;S<o;S+=4)t.push(h());return new a.init(t,o)}}),_=d.enc={},p=_.Hex={stringify:function(o){for(var t=o.words,S=o.sigBytes,x=[],s=0;s<S;s++){var P=t[s>>>2]>>>24-s%4*8&255;x.push((P>>>4).toString(16)),x.push((P&15).toString(16))}return x.join("")},parse:function(o){for(var t=o.length,S=[],x=0;x<t;x+=2)S[x>>>3]|=parseInt(o.substr(x,2),16)<<24-x%8*4;return new a.init(S,t/2)}},c=_.Latin1={stringify:function(o){for(var t=o.words,S=o.sigBytes,x=[],s=0;s<S;s++){var P=t[s>>>2]>>>24-s%4*8&255;x.push(String.fromCharCode(P))}return x.join("")},parse:function(o){for(var t=o.length,S=[],x=0;x<t;x++)S[x>>>2]|=(o.charCodeAt(x)&255)<<24-x%4*8;return new a.init(S,t)}},m=_.Utf8={stringify:function(o){try{return decodeURIComponent(escape(c.stringify(o)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(o){return c.parse(unescape(encodeURIComponent(o)))}},g=i.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=m.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var t,S=this._data,x=S.words,s=S.sigBytes,P=this.blockSize,O=P*4,E=s/O;o?E=C.ceil(E):E=C.max((E|0)-this._minBufferSize,0);var v=E*P,y=C.min(v*4,s);if(v){for(var T=0;T<v;T+=P)this._doProcessBlock(x,T);t=x.splice(0,v),S.sigBytes-=y}return new a.init(t,y)},clone:function(){var o=l.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0}),b=i.Hasher=g.extend({cfg:l.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var t=this._doFinalize();return t},blockSize:512/32,_createHelper:function(o){return function(t,S){return new o.init(S).finalize(t)}},_createHmacHelper:function(o){return function(t,S){return new n.HMAC.init(o,S).finalize(t)}}}),n=d.algo={};return d}(Math);return f})}).call(this,k("IyRk"))},K3mO:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.Base,u=C.WordArray,h=f.algo,w=h.MD5,d=h.EvpKDF=D.extend({cfg:D.extend({keySize:128/32,hasher:w,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,l){for(var a,_=this.cfg,p=_.hasher.create(),c=u.create(),m=c.words,g=_.keySize,b=_.iterations;m.length<g;){a&&p.update(a),a=p.update(i).finalize(l),p.reset();for(var n=1;n<b;n++)a=p.finalize(a),p.reset();c.concat(a)}return c.sigBytes=g*4,c}});f.EvpKDF=function(i,l,a){return d.create(a).compute(i,l)}}(),L.EvpKDF})},KXlV:function(j,J,k){j.exports=k.p+"static/job.65c6034f.png"},KeDT:function(j,J,k){j.exports={flex_box_center:"flex_box_center___3otMp",flex_space_between:"flex_space_between___2nig-",flex_box_vertical_center:"flex_box_vertical_center___3opWF",flex_box_center_end:"flex_box_center_end___1u2JP",flex_box_column:"flex_box_column___1RMsI",wrp:"wrp___-Shy4",bg:"bg___3aDMI",commonimg:"commonimg___15xnD",titlesize:"titlesize___2x92E",timesize:"timesize___3GFem",flex1:"flex1___1D3Li",buttonsize:"buttonsize___3oghG",myteam:"myteam___v6SIK",bootmdetail:"bootmdetail___3hk9v",flex6:"flex6___2iMiQ",menuItem:"menuItem___20c2q",spanprev:"spanprev___1dQoJ",spannext:"spannext___3fFnS",divwidth:"divwidth___1Dk29",receiveclick:"receiveclick___3mYYR",receivealready:"receivealready___20cCL",bkfff:"bkfff___WkCDR","ant-input":"ant-input___Zl9Xd",onediv:"onediv___2hHLH",onetop:"onetop___73xTC",towdiv:"towdiv___nqi1b",towtop:"towtop___pPhtO",threediv:"threediv___2G0u0",threetop:"threetop___2DsrB",imgradius:"imgradius___2WlXC",prize:"prize___1al1u",spanrightradius:"spanrightradius___3VHYc",bottomItem:"bottomItem___1NfPd",myTeam:"myTeam___2A-RJ",downloadpdf:"downloadpdf___1BQ_n",teamItem:"teamItem___220Fc",dash:"dash___3pxuh",modal:"modal___27esx"}},KhGG:function(j,J,k){"use strict";k.d(J,"a",function(){return s}),k.d(J,"c",function(){return O});var L=k("0Owb"),f=k("miYZ"),C=k("tsqr"),D=k("oBTY"),u=k("tJVT"),h=k("PpiC"),w=k("k1fw"),d=k("9og8"),i=k("DZo9"),l=k("8z0m"),a=k("WmNS"),_=k.n(a),p=k("cDcd"),c=k.n(p),m=k("ErOA"),g=k("NFKh"),b=k.n(g),n=k("7Cbv"),o=k("9kvl"),t=k("mxV5"),S=k.n(t),x=l.a.Dragger,s=function(y){var T="bf3c199c2470cb477d907b1e0917c17b",M="5183666c72eec9e4",N=b.a.enc.Utf8.parse(T),I=b.a.enc.Utf8.parse(M),G=b.a.AES.decrypt(y,N,{iv:I,mode:b.a.mode.CBC});return G.toString(b.a.enc.Utf8)},P,O=function(){var v=Object(d.a)(_.a.mark(function y(T,M,N){var I,G,H,W,z,U,B,K,q;return _.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return M.file_name=T.name,se.next=3,Object(m.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return B=se.sent,console.log("decrypt(res.data):",s(B.data)),B.data=JSON.parse(s(B.data)),K=Object(n.a)(),q=new S.a({endpoint:B==null||((I=B.data)===null||I===void 0)?void 0:I.end_point,region:B==null||((G=B.data)===null||G===void 0)?void 0:G.region,accessKeyId:B==null||((H=B.data)===null||H===void 0)?void 0:H.access_key_id,accessKeySecret:B==null||((W=B.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:B==null||((z=B.data)===null||z===void 0)?void 0:z.bucket,stsToken:B==null||((U=B.data)===null||U===void 0)?void 0:U.security_token}),se.abrupt("return",new Promise(function(we,Te){var de;q.multipartUpload("".concat(K),new Blob([T],{type:T.type}),Object(w.a)(Object(w.a)({timeout:200*1e3,partSize:102400},N),{},{callback:{url:B==null||((de=B.data)===null||de===void 0)?void 0:de.callback_url,host:B==null?void 0:B.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(M)}})).then(function(xe){var pe;T.response=(pe=xe.data)===null||pe===void 0?void 0:pe.data,we(xe==null?void 0:xe.data)}).catch(function(xe){Te(xe),console.log("err:",xe)})}));case 9:case"end":return se.stop()}},y)}));return function(T,M,N){return v.apply(this,arguments)}}(),E=function(y){var T=y.user,M=y.cancelUpload,N=Object(h.a)(y,["user","cancelUpload"]),I=Object(p.useState)([]),G=Object(u.a)(I,2),H=G[0],W=G[1],z=Object(p.useState)(),U=Object(u.a)(z,2),B=U[0],K=U[1],q={onRemove:function(we){W(Object(D.a)(H.filter(function(Te){return Te.name!==we.name}))),N.onChange(H.filter(function(Te){return Te.name!==we.name}))},disabled:N.disabled,multiple:!0,fileList:H==null?void 0:H.map(function(se){return se.file}),customRequest:function(){},beforeUpload:function(){var se=Object(d.a)(_.a.mark(function Te(de){var xe;return _.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(xe=N.maxSize||1024*1024*1024*1,!H.filter(function(ie){return ie.name===de.name}).length){ne.next=4;break}return C.b.info("".concat(de.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ne.abrupt("return");case 4:if(!((de==null?void 0:de.size)>xe)){ne.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(xe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ne.abrupt("return",!1);case 7:return H.push({name:de.name,file:de}),W(Object(D.a)(H)),N.onChange(H),ne.abrupt("return",!1);case 11:case"end":return ne.stop()}},Te)}));function we(Te){return se.apply(this,arguments)}return we}()},ae=function(){var se=Object(d.a)(_.a.mark(function we(Te,de){var xe,pe,ne,ie,ee,le,Q,Z,be;return _.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return de.file_name=Te.name,Q=Te.name,$.next=4,Object(m.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Z=$.sent,Z.data=JSON.parse(s(Z.data)),!((Z==null?void 0:Z.status)!==0)){$.next=12;break}return H[H.findIndex(function(X){return X.name===Q})].status="error",H[H.findIndex(function(X){return X.name===Q})].file.status="error",N.onChange(H),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return B=new S.a({endpoint:Z==null||((xe=Z.data)===null||xe===void 0)?void 0:xe.end_point,region:Z==null||((pe=Z.data)===null||pe===void 0)?void 0:pe.region,accessKeyId:Z==null||((ne=Z.data)===null||ne===void 0)?void 0:ne.access_key_id,accessKeySecret:Z==null||((ie=Z.data)===null||ie===void 0)?void 0:ie.access_key_secret,bucket:Z==null||((ee=Z.data)===null||ee===void 0)?void 0:ee.bucket,stsToken:Z==null||((le=Z.data)===null||le===void 0)?void 0:le.security_token}),console.log(Te,"file"),K(B),be=Object(n.a)(),$.abrupt("return",new Promise(function(X,Y){try{var ve;B.multipartUpload("".concat(N.identifier,"/").concat(be).concat(Q.indexOf(".")>-1?"."+Q.split(".").pop():""),new Blob([Te.file],{type:Te.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Ee,Ke,Ye){try{console.log("\u8FDB\u5EA6",Ee,Ke,Ye);var Je=H.findIndex(function(tt){return tt.name===Q});H[Je].file.percent=Ee*100,H[Je].tempCheckpoint=Ke,W(Object(D.a)(H))}catch(tt){}},checkpoint:H[H.findIndex(function(ue){return ue.name===Q})].tempCheckpoint,callback:{customValue:{id:Q+""},url:Z==null||((ve=Z.data)===null||ve===void 0)?void 0:ve.callback_url,host:Z==null?void 0:Z.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(m.e)(de)}}).then(function(ue){var Ee,Ke=H.findIndex(function(lt){return lt.name===Q}),Ye="done";if(((Ee=ue.data)===null||Ee===void 0?void 0:Ee.status)===0){var Je;Te.response=(Je=ue.data)===null||Je===void 0?void 0:Je.data;var tt=H.findIndex(function(lt){return lt.name===Q});H[tt].status="done",H[tt].file.status="done"}else{var at;C.b.warn((at=ue.data)===null||at===void 0?void 0:at.message),Ye="error"}H[Ke].status=Ye,H[Ke].file.status=Ye,N.onChange(H),X(ue==null?void 0:ue.data)}).catch(function(ue){H[H.findIndex(function(Ee){return Ee.name===Q})].status="error",H[H.findIndex(function(Ee){return Ee.name===Q})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),W(Object(D.a)(H)),N.onChange(H),Y(ue),console.log("err:",ue)})}catch(ue){}}));case 17:case"end":return $.stop()}},we)}));return function(Te,de){return se.apply(this,arguments)}}();return Object(p.useEffect)(function(){H.every(function(se){return se==="done"||se==="error"})&&N.onComplete(H)},[H]),Object(p.useEffect)(function(){if(M){var se;(se=B)===null||se===void 0||se.cancel()}},[M]),Object(p.useEffect)(function(){N.uploading&&H.map(function(){var se=Object(d.a)(_.a.mark(function we(Te){var de,xe;return _.a.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(!((!Te.status||Te.status==="error")&&!M)){ne.next=6;break}return Te.status="uploading",Te.file.status="uploading",ne.next=5,ae(Te,{login:T==null||((de=T.userInfo)===null||de===void 0)?void 0:de.login,container_type:N.container_type,container_id:N.container_id,description:N.description});case 5:xe=ne.sent;case 6:case"end":return ne.stop()}},we)}));return function(we){return se.apply(this,arguments)}}())},[N.uploading]),c.a.createElement(x,Object(L.a)({},q,{height:N.height,className:N.className}),c.a.createElement("p",{className:"ant-upload-hint"},N.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(o.a)(function(v){var y=v.loading,T=v.globalSetting,M=v.user;return{globalSetting:T,loading:y.models.competitions,user:M}})(E)},KmYQ:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(f,C){var D=C*4;f.clamp(),f.sigBytes+=D-(f.sigBytes%D||D)},unpad:function(f){for(var C=f.words,D=f.sigBytes-1,D=f.sigBytes-1;D>=0;D--)if(C[D>>>2]>>>24-D%4*8&255){f.sigBytes=D+1;break}}},L.pad.ZeroPadding})},LdHM:function(j,J,k){"use strict";k.d(J,"b",function(){return t}),k.d(J,"a",function(){return x});var L=k("1OyB"),f=k("vuIU"),C=k("Ji7U"),D=k("LK+K"),u=k("cDcd"),h=k("rePB"),w=k("Ff2n"),d=k("ODXe"),i=k("4IlW"),l=k("bX4T"),a=k("YrtM"),_=k("TSYQ"),p=k.n(_),c=k("+nKL"),m=k("8OUc"),g=function(K,q){var ae=K.prefixCls,se=K.id,we=K.flattenOptions,Te=K.childrenAsData,de=K.values,xe=K.searchValue,pe=K.multiple,ne=K.defaultActiveFirstOption,ie=K.height,ee=K.itemHeight,le=K.notFoundContent,Q=K.open,Z=K.menuItemSelectedIcon,be=K.virtual,te=K.onSelect,$=K.onToggleOpen,X=K.onActiveValue,Y=K.onScroll,ve=K.onMouseEnter,ue="".concat(ae,"-item"),Ee=Object(a.a)(function(){return we},[Q,we],function(rt,Re){return Re[0]&&rt[1]!==Re[1]}),Ke=u.useRef(null),Ye=function(Re){Re.preventDefault()},Je=function(Re){Ke.current&&Ke.current.scrollTo({index:Re})},tt=function(Re){for(var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,De=Ee.length,fe=0;fe<De;fe+=1){var ye=(Re+fe*Se+De)%De,_e=Ee[ye],Ae=_e.group,We=_e.data;if(!Ae&&!We.disabled)return ye}return-1},at=u.useState(function(){return tt(0)}),lt=Object(d.a)(at,2),je=lt[0],Ce=lt[1],Qe=function(Re){Ce(Re);var Se=Ee[Re];if(!Se){X(null,-1);return}X(Se.data.value,Re)};u.useEffect(function(){Qe(ne!==!1?tt(0):-1)},[Ee.length,xe]),u.useEffect(function(){var rt=setTimeout(function(){if(!pe&&Q&&de.size===1){var Re=Array.from(de)[0],Se=Ee.findIndex(function(De){var fe=De.data;return fe.value===Re});Qe(Se),Je(Se)}});return function(){return clearTimeout(rt)}},[Q]);var st=function(Re){Re!==void 0&&te(Re,{selected:!de.has(Re)}),pe||$(!1)};if(u.useImperativeHandle(q,function(){return{onKeyDown:function(Re){var Se=Re.which;switch(Se){case i.a.UP:case i.a.DOWN:{var De=0;if(Se===i.a.UP?De=-1:Se===i.a.DOWN&&(De=1),De!==0){var fe=tt(je+De,De);Je(fe),Qe(fe)}break}case i.a.ENTER:{var ye=Ee[je];ye&&!ye.data.disabled?st(ye.data.value):st(void 0),Q&&Re.preventDefault();break}case i.a.ESC:$(!1)}},onKeyUp:function(){},scrollTo:function(Re){Je(Re)}}}),Ee.length===0)return u.createElement("div",{role:"listbox",id:"".concat(se,"_list"),className:"".concat(ue,"-empty"),onMouseDown:Ye},le);function Ge(rt){var Re=Ee[rt];if(!Re)return null;var Se=Re.data||{},De=Se.value,fe=Se.label,ye=Se.children,_e=Object(l.a)(Se,!0),Ae=Te?ye:fe;return Re?u.createElement("div",Object.assign({"aria-label":typeof Ae=="string"?Ae:null},_e,{key:rt,role:"option",id:"".concat(se,"_list_").concat(rt),"aria-selected":de.has(De)}),De):null}return u.createElement(u.Fragment,null,u.createElement("div",{role:"listbox",id:"".concat(se,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ge(je-1),Ge(je),Ge(je+1)),u.createElement(c.a,{itemKey:"key",ref:Ke,data:Ee,height:ie,itemHeight:ee,fullHeight:!1,onMouseDown:Ye,onScroll:Y,virtual:be,onMouseEnter:ve},function(rt,Re){var Se,De=rt.group,fe=rt.groupOption,ye=rt.data,_e=ye.label,Ae=ye.key;if(De)return u.createElement("div",{className:p()(ue,"".concat(ue,"-group"))},_e!==void 0?_e:Ae);var We=ye.disabled,Xe=ye.value,ft=ye.title,vt=ye.children,Kt=ye.style,kt=ye.className,Or=Object(w.a)(ye,["disabled","value","title","children","style","className"]),pr=de.has(Xe),Et="".concat(ue,"-option"),Yr=p()(ue,Et,kt,(Se={},Object(h.a)(Se,"".concat(Et,"-grouped"),fe),Object(h.a)(Se,"".concat(Et,"-active"),je===Re&&!We),Object(h.a)(Se,"".concat(Et,"-disabled"),We),Object(h.a)(Se,"".concat(Et,"-selected"),pr),Se)),kr=Te?vt:_e,Ur=!Z||typeof Z=="function"||pr;return u.createElement("div",Object.assign({},Or,{"aria-selected":pr,className:Yr,title:ft,onMouseMove:function(){if(je===Re||We)return;Qe(Re)},onClick:function(){We||st(Xe)},style:Kt}),u.createElement("div",{className:"".concat(Et,"-content")},kr||Xe),u.isValidElement(Z)||pr,Ur&&u.createElement(m.a,{className:"".concat(ue,"-option-state"),customizeIcon:Z,customizeIconProps:{isSelected:pr}},pr?"\u2713":null))}))},b=u.forwardRef(g);b.displayName="OptionList";var n=b,o=function(){return null};o.isSelectOption=!0;var t=o,S=function(){return null};S.isSelectOptGroup=!0;var x=S,s=k("VTBJ"),P=k("Zm9Q");function O(B){var K=B.key,q=B.props,ae=q.children,se=q.value,we=Object(w.a)(q,["children","value"]);return Object(s.a)({key:K,value:se!==void 0?se:K,children:ae},we)}function E(B){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(P.a)(B).map(function(q,ae){if(!u.isValidElement(q)||!q.type)return null;var se=q.type.isSelectOptGroup,we=q.key,Te=q.props,de=Te.children,xe=Object(w.a)(Te,["children"]);return K||!se?O(q):Object(s.a)(Object(s.a)({key:"__RC_SELECT_GRP__".concat(we===null?ae:we,"__"),label:we},xe),{},{options:E(de)})}).filter(function(q){return q})}var v=k("2Qr1"),y=k("qNPg"),T=k("U8pU"),M=k("Kwbf"),N=k("WKfj");function I(B){var K=B.mode,q=B.options,ae=B.children,se=B.backfill,we=B.allowClear,Te=B.placeholder,de=B.getInputElement,xe=B.showSearch,pe=B.onSearch,ne=B.defaultOpen,ie=B.autoFocus,ee=B.labelInValue,le=B.value,Q=B.inputValue,Z=B.optionLabelProp,be=K==="multiple"||K==="tags",te=xe!==void 0?xe:be||K==="combobox",$=q||E(ae);if(Object(M.a)(K!=="tags"||$.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),K==="tags"||K==="combobox"){var X=$.some(function(ue){return ue.options?ue.options.some(function(Ee){return typeof("value"in Ee?Ee.value:Ee.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(M.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(M.a)(K!=="combobox"||!Z,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(M.a)(K==="combobox"||!se,"`backfill` only works with `combobox` mode."),Object(M.a)(K==="combobox"||!de,"`getInputElement` only work with `combobox` mode."),Object(M.b)(K!=="combobox"||!de||!we||!Te,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),pe&&!te&&K!=="combobox"&&K!=="tags"&&Object(M.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(M.b)(!ne||ie,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),le!=null){var Y=Object(N.d)(le);Object(M.a)(!ee||Y.every(function(ue){return Object(T.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(M.a)(!be||Array.isArray(le),"`value` should be array when `mode` is `multiple` or `tags`")}if(ae){var ve=null;Object(P.a)(ae).some(function(ue){if(!u.isValidElement(ue)||!ue.type)return!1;var Ee=ue.type;if(Ee.isSelectOption)return!1;if(Ee.isSelectOptGroup){var Ke=Object(P.a)(ue.props.children).every(function(Ye){return!u.isValidElement(Ye)||!ue.type||Ye.type.isSelectOption?!0:(ve=Ye.type,!1)});return!Ke}return ve=Ee,!0}),ve&&Object(M.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ve.displayName||ve.name||ve,"`.")),Object(M.a)(Q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=I,H=Object(y.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:E,flattenOptions:v.d,getLabeledValue:v.e,filterOptions:v.b,isValueDisabled:v.g,findValueOption:v.c,warningProps:G,fillOptionsWithMissingValue:v.a}),W=function(B){Object(C.a)(q,B);var K=Object(D.a)(q);function q(){var ae;return Object(L.a)(this,q),ae=K.apply(this,arguments),ae.selectRef=u.createRef(),ae.focus=function(){ae.selectRef.current.focus()},ae.blur=function(){ae.selectRef.current.blur()},ae}return Object(f.a)(q,[{key:"render",value:function(){return u.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),q}(u.Component);W.Option=t,W.OptGroup=x;var z=W,U=J.c=z},M8RZ:function(j,J,k){"use strict";k.d(J,"a",function(){return i});var L=k("fWQN"),f=k("mtLc"),C=k("yKVA"),D=k("879j"),u=k("cDcd"),h=k.n(u),w=k("faye"),d=k.n(w),i=function(l){Object(C.a)(_,l);var a=Object(D.a)(_);function _(p){var c;Object(L.a)(this,_),c=a.call(this,p);var m=window.document;return c.node=m.createElement("div"),m.body.appendChild(c.node),c}return Object(f.a)(_,[{key:"render",value:function(){var c=this.props.children;return Object(w.createPortal)(c,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),_}(h.a.Component)},MlIO:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.Base,h=D.WordArray,w=C.x64={},d=w.Word=u.extend({init:function(l,a){this.high=l,this.low=a}}),i=w.WordArray=u.extend({init:function(l,a){l=this.words=l||[],a!=f?this.sigBytes=a:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,a=l.length,_=[],p=0;p<a;p++){var c=l[p];_.push(c.high),_.push(c.low)}return h.create(_,this.sigBytes)},clone:function(){for(var l=u.clone.call(this),a=l.words=this.words.slice(0),_=a.length,p=0;p<_;p++)a[p]=a[p].clone();return l}})}(),L})},NFKh:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("MlIO"),k("F+F2"),k("qM6L"),k("ETIr"),k("wbyO"),k("cv67"),k("3y9D"),k("lPiR"),k("GRuw"),k("1uat"),k("uGsb"),k("5hvy"),k("ELcG"),k("WYAk"),k("e7zE"),k("K3mO"),k("OLod"),k("ALsQ"),k("9OqN"),k("qu8F"),k("S6kV"),k("gb/T"),k("qBft"),k("oRuE"),k("jO9C"),k("KmYQ"),k("uGxW"),k("bQjk"),k("wZgz"),k("pA7S"),k("w7YG"),k("E4JC"),k("PVpz"))})(this,function(L){return L})},NLgs:function(j,J,k){"use strict";k.d(J,"e",function(){return S}),k.d(J,"f",function(){return x}),k.d(J,"d",function(){return P}),k.d(J,"c",function(){return O}),k.d(J,"a",function(){return E}),k.d(J,"b",function(){return v});var L=k("miYZ"),f=k("tsqr"),C=k("9og8"),D=k("2qtc"),u=k("kLXV"),h=k("WmNS"),w=k.n(h),d=k("cDcd"),i=k.n(d),l=k("9kvl"),a=k("xKgJ"),_=k("1vsH"),p=k("RCxd"),c=k("mOS8"),m=k.n(c),g=k("1ZF9"),b=k.n(g),n=k("WdTA"),o=k.n(n),t=k("m3rI"),S=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(x(T)&&s(M))},x=function(T){return Object(a.p)()?!0:(T({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},s=function(){var T,M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=Object(l.c)()._store.getState(),I=N.user;return(T=I.userInfo)!==null&&T!==void 0&&T.profile_completed?!0:(u.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:M?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){l.d.push("/account/profile/edit")}}),!1)},P=function(){var T,M=Object(l.c)()._store.getState(),N=M.user;return(T=N.userInfo)!==null&&T!==void 0&&T.professional_certification?!0:(u.a.confirm({title:"\u63D0\u793A",centered:!0,content:i.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(_.Q)("/account/certification")}}),!1)},O=function(){return Object(a.a)()?!0:(u.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:i.a.createElement("div",{className:"tc",style:{marginLeft:-38}},i.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),i.a.createElement("img",{src:Object(a.t)()?o.a:"".concat(t.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},E=function(T,M){return T?!0:(u.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:i.a.createElement("div",null,i.a.createElement("p",null,M||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),i.a.createElement("div",{style:{marginLeft:"110px"}},i.a.createElement("img",{src:b.a,width:200}),i.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(_.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},v=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",N=Object(l.c)()._store.getState(),I=N.shixunsDetail.detail;return(I==null?void 0:I.public)===2||(I==null?void 0:I.public)===1||(I==null?void 0:I.shixun_status)===3?(u.a.info({centered:!0,icon:i.a.createElement(p.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:i.a.createElement("div",{className:"tc",style:{marginLeft:-38}},i.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},i.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(I==null?void 0:I.public)===2?"\u5DF2\u516C\u5F00":(I==null?void 0:I.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",M,"\u3002"),i.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),i.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:m.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(I==null?void 0:I.shixun_status)===2?(u.a.confirm({centered:!0,icon:i.a.createElement(p.a,null),title:"\u63D0\u793A",content:i.a.createElement("div",null,i.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",M,"\u3002"),i.a.createElement("br",null),i.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){u.a.confirm({width:440,centered:!0,icon:i.a.createElement(p.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var H=Object(C.a)(w.a.mark(function z(){var U;return w.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,T({type:"shixunsDetail/cancelRelease",payload:{id:I==null?void 0:I.identifier}});case 2:U=K.sent,U.status!==401&&(f.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),T({type:"shixunsDetail/getShixunsDetail",payload:{id:I==null?void 0:I.identifier}}),T({type:"practiceSetting/getCommonData",payload:{id:I==null?void 0:I.identifier}}));case 4:case"end":return K.stop()}},z)}));function W(){return H.apply(this,arguments)}return W}()})}}),!0):!1}},NnUe:function(j,J,k){j.exports={modal:"modal___sZeHv",colorBlue:"colorBlue___3FmfG",formWrap:"formWrap___3YEqH",flexRow:"flexRow___37Sa0",flexColumn:"flexColumn___1ykGy",example:"example___7mYRk",exampleImg:"exampleImg___UGH9Y",colorOrange:"colorOrange___1IJLa",uploader:"uploader___3f2Sm",uploadImg:"uploadImg___3WCoA",imageTip:"imageTip___FhklW",uploadTipIcon:"uploadTipIcon___2YZJx",uploadTip:"uploadTip___1eikX",color05101a:"color05101a___1Nuwt",viewLargerImg:"viewLargerImg___Ek8jW",footerWrap:"footerWrap___F9F0q",note:"note___1U6xc",schoolHintWrap:"schoolHintWrap___31S22",colorCDCDCD:"colorCDCDCD___1KqvR",color0152d9:"color0152d9___1YXxu"}},NvD2:function(j,J,k){"use strict";k.d(J,"a",function(){return h});var L=k("Kwbf");function f(w,d){var i=new Set;return w.forEach(function(l){d.has(l)||i.add(l)}),i}function C(w){var d=w||{},i=d.disabled,l=d.disableCheckbox,a=d.checkable;return!!(i||l)||a===!1}function D(w,d,i,l){for(var a=new Set(w),_=new Set,p=0;p<=i;p+=1){var c=d.get(p)||new Set;c.forEach(function(n){var o=n.key,t=n.node,S=n.children,x=S===void 0?[]:S;a.has(o)&&!l(t)&&x.filter(function(s){return!l(s.node)}).forEach(function(s){a.add(s.key)})})}for(var m=new Set,g=i;g>=0;g-=1){var b=d.get(g)||new Set;b.forEach(function(n){var o=n.parent,t=n.node;if(l(t)||!n.parent||m.has(n.parent.key))return;if(l(n.parent.node)){m.add(o.key);return}var S=!0,x=!1;(o.children||[]).filter(function(s){return!l(s.node)}).forEach(function(s){var P=s.key,O=a.has(P);S&&!O&&(S=!1),!x&&(O||_.has(P))&&(x=!0)}),S&&a.add(o.key),x&&_.add(o.key),m.add(o.key)})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(f(_,a))}}function u(w,d,i,l,a){for(var _=new Set(w),p=new Set(d),c=0;c<=l;c+=1){var m=i.get(c)||new Set;m.forEach(function(o){var t=o.key,S=o.node,x=o.children,s=x===void 0?[]:x;!_.has(t)&&!p.has(t)&&!a(S)&&s.filter(function(P){return!a(P.node)}).forEach(function(P){_.delete(P.key)})})}p=new Set;for(var g=new Set,b=l;b>=0;b-=1){var n=i.get(b)||new Set;n.forEach(function(o){var t=o.parent,S=o.node;if(a(S)||!o.parent||g.has(o.parent.key))return;if(a(o.parent.node)){g.add(t.key);return}var x=!0,s=!1;(t.children||[]).filter(function(P){return!a(P.node)}).forEach(function(P){var O=P.key,E=_.has(O);x&&!E&&(x=!1),!s&&(E||p.has(O))&&(s=!0)}),x||_.delete(t.key),s&&p.add(t.key),g.add(t.key)})}return{checkedKeys:Array.from(_),halfCheckedKeys:Array.from(f(p,_))}}function h(w,d,i,l){var a=[],_;l?_=l:_=C;var p=new Set(w.filter(function(b){var n=!!i[b];return n||a.push(b),n})),c=new Map,m=0;Object.keys(i).forEach(function(b){var n=i[b],o=n.level,t=c.get(o);t||(t=new Set,c.set(o,t)),t.add(n),m=Math.max(m,o)}),Object(L.a)(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(b){return"'".concat(b,"'")}).join(", ")));var g;return d===!0?g=D(p,c,m,_):g=u(p,d.halfCheckedKeys,c,m,_),g}},OLod:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("K3mO"))})(this,function(L){L.lib.Cipher||function(f){var C=L,D=C.lib,u=D.Base,h=D.WordArray,w=D.BufferedBlockAlgorithm,d=C.enc,i=d.Utf8,l=d.Base64,a=C.algo,_=a.EvpKDF,p=D.Cipher=w.extend({cfg:u.extend(),createEncryptor:function(y,T){return this.create(this._ENC_XFORM_MODE,y,T)},createDecryptor:function(y,T){return this.create(this._DEC_XFORM_MODE,y,T)},init:function(y,T,M){this.cfg=this.cfg.extend(M),this._xformMode=y,this._key=T,this.reset()},reset:function(){w.reset.call(this),this._doReset()},process:function(y){return this._append(y),this._process()},finalize:function(y){y&&this._append(y);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function y(T){return typeof T=="string"?v:P}return function(T){return{encrypt:function(M,N,I){return y(N).encrypt(T,M,N,I)},decrypt:function(M,N,I){return y(N).decrypt(T,M,N,I)}}}}()}),c=D.StreamCipher=p.extend({_doFinalize:function(){var y=this._process(!0);return y},blockSize:1}),m=C.mode={},g=D.BlockCipherMode=u.extend({createEncryptor:function(y,T){return this.Encryptor.create(y,T)},createDecryptor:function(y,T){return this.Decryptor.create(y,T)},init:function(y,T){this._cipher=y,this._iv=T}}),b=m.CBC=function(){var y=g.extend();y.Encryptor=y.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize;T.call(this,M,N,G),I.encryptBlock(M,N),this._prevBlock=M.slice(N,N+G)}}),y.Decryptor=y.extend({processBlock:function(M,N){var I=this._cipher,G=I.blockSize,H=M.slice(N,N+G);I.decryptBlock(M,N),T.call(this,M,N,G),this._prevBlock=H}});function T(M,N,I){var G,H=this._iv;H?(G=H,this._iv=f):G=this._prevBlock;for(var W=0;W<I;W++)M[N+W]^=G[W]}return y}(),n=C.pad={},o=n.Pkcs7={pad:function(y,T){for(var M=T*4,N=M-y.sigBytes%M,I=N<<24|N<<16|N<<8|N,G=[],H=0;H<N;H+=4)G.push(I);var W=h.create(G,N);y.concat(W)},unpad:function(y){var T=y.words[y.sigBytes-1>>>2]&255;y.sigBytes-=T}},t=D.BlockCipher=p.extend({cfg:p.cfg.extend({mode:b,padding:o}),reset:function(){var y;p.reset.call(this);var T=this.cfg,M=T.iv,N=T.mode;this._xformMode==this._ENC_XFORM_MODE?y=N.createEncryptor:(y=N.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==y?this._mode.init(this,M&&M.words):(this._mode=y.call(N,this,M&&M.words),this._mode.__creator=y)},_doProcessBlock:function(y,T){this._mode.processBlock(y,T)},_doFinalize:function(){var y,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),y=this._process(!0)):(y=this._process(!0),T.unpad(y)),y},blockSize:128/32}),S=D.CipherParams=u.extend({init:function(y){this.mixIn(y)},toString:function(y){return(y||this.formatter).stringify(this)}}),x=C.format={},s=x.OpenSSL={stringify:function(y){var T,M=y.ciphertext,N=y.salt;return N?T=h.create([1398893684,1701076831]).concat(N).concat(M):T=M,T.toString(l)},parse:function(y){var T,M=l.parse(y),N=M.words;return N[0]==1398893684&&N[1]==1701076831&&(T=h.create(N.slice(2,4)),N.splice(0,4),M.sigBytes-=16),S.create({ciphertext:M,salt:T})}},P=D.SerializableCipher=u.extend({cfg:u.extend({format:s}),encrypt:function(y,T,M,N){N=this.cfg.extend(N);var I=y.createEncryptor(M,N),G=I.finalize(T),H=I.cfg;return S.create({ciphertext:G,key:M,iv:H.iv,algorithm:y,mode:H.mode,padding:H.padding,blockSize:y.blockSize,formatter:N.format})},decrypt:function(y,T,M,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var I=y.createDecryptor(M,N).finalize(T.ciphertext);return I},_parse:function(y,T){return typeof y=="string"?T.parse(y,this):y}}),O=C.kdf={},E=O.OpenSSL={execute:function(y,T,M,N){N||(N=h.random(64/8));var I=_.create({keySize:T+M}).compute(y,N),G=h.create(I.words.slice(T),M*4);return I.sigBytes=T*4,S.create({key:I,iv:G,salt:N})}},v=D.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:E}),encrypt:function(y,T,M,N){N=this.cfg.extend(N);var I=N.kdf.execute(M,y.keySize,y.ivSize);N.iv=I.iv;var G=P.encrypt.call(this,y,T,I.key,N);return G.mixIn(I),G},decrypt:function(y,T,M,N){N=this.cfg.extend(N),T=this._parse(T,N.format);var I=N.kdf.execute(M,y.keySize,y.ivSize,T.salt);N.iv=I.iv;var G=P.decrypt.call(this,y,T,I.key,N);return G}})}()})},OZM5:function(j,J,k){"use strict";k.d(J,"b",function(){return l}),k.d(J,"a",function(){return a}),k.d(J,"k",function(){return _}),k.d(J,"h",function(){return p}),k.d(J,"i",function(){return c}),k.d(J,"g",function(){return m}),k.d(J,"c",function(){return g}),k.d(J,"d",function(){return b}),k.d(J,"j",function(){return t}),k.d(J,"e",function(){return S}),k.d(J,"f",function(){return x});var L=k("KQm4"),f=k("U8pU"),C=k("Ff2n"),D=k("cDcd"),u=k.n(D),h=k("Kwbf"),w=k("WaYH"),d=.25,i=2;function l(s,P){var O=s.slice(),E=O.indexOf(P);return E>=0&&O.splice(E,1),O}function a(s,P){var O=s.slice();return O.indexOf(P)===-1&&O.push(P),O}function _(s){return s.split("-")}function p(s,P){return"".concat(s,"-").concat(P)}function c(s){return s&&s.type&&s.type.isTreeNode}function m(s,P){var O=[s],E=P[s];function v(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];y.forEach(function(T){var M=T.key,N=T.children;O.push(M),v(N)})}return v(E.children),O}function g(s,P){var O=s.clientY,E=P.selectHandle.getBoundingClientRect(),v=E.top,y=E.bottom,T=E.height,M=Math.max(T*d,i);return O<=v+M?-1:O>=y-M?1:0}function b(s,P){if(!s)return;var O=P.multiple;return O?s.slice():s.length?[s[0]]:s}var n=function(P){return P};function o(s,P){if(!s)return[];var O=P||{},E=O.processProps,v=E===void 0?n:E,y=Array.isArray(s)?s:[s];return y.map(function(T){var M=T.children,N=Object(C.a)(T,["children"]),I=o(M,P);return u.a.createElement(w.a,Object.assign({},v(N)),I)})}function t(s){if(!s)return null;var P;if(Array.isArray(s))P={checkedKeys:s,halfCheckedKeys:void 0};else if(Object(f.a)(s)==="object")P={checkedKeys:s.checked||void 0,halfCheckedKeys:s.halfChecked||void 0};else return Object(h.a)(!1,"`checkedKeys` is not an array or an object"),null;return P}function S(s,P){var O=new Set;function E(v){if(O.has(v))return;var y=P[v];if(!y)return;O.add(v);var T=y.parent,M=y.node;if(M.disabled)return;T&&E(T.key)}return(s||[]).forEach(function(v){E(v)}),Object(L.a)(O)}function x(s){var P={};return Object.keys(s).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(P[O]=s[O])}),P}},Ot1p:function(j,J,k){"use strict";var L=k("2qtc"),f=k("kLXV"),C=k("rAM+"),D=k("miYZ"),u=k("tsqr"),h=k("tJVT"),w=k("jrin"),d=k("cDcd"),i=k.n(d),l=k("VrN/"),a=k.n(l),_=k("bdgK"),p=k("p77/"),c=k("Bd2K"),m=k("ELLl"),g=k("19Vz"),b=k("lZu9"),n=k("+NIl"),o=k("kSUc"),t=k("9Bee"),S=function(Re){var Se=Re.value,De=Se===void 0?"":Se,fe=Re.className,ye=Re.showTextOnly,_e=Re.showLines,Ae=Re.style,We=Ae===void 0?{}:Ae,Xe=Object(d.useMemo)(function(){return""},[De]);return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{dangerouslySetInnerHTML:{__html:Xe}}))},x=k("0Owb"),s=k("dejd"),P=k("C+DQ"),O=[{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 E(Re){var Se=Re.onActionCallback,De=Re.title,fe=Re.icon,ye=Re.actionName,_e=Re.className,Ae=_e===void 0?"":_e,We=Re.children;function Xe(){Se(ye)}return i.a.createElement("a",{title:De,className:Ae,onClick:Xe},i.a.createElement("i",{className:"md-iconfont ".concat(fe)}),We)}var v=function(Re){var Se=Re.watch,De=Re.showNullButton,fe=Re.onActionCallback,ye=Re.fullScreen,_e=Re.insertTemp,Ae=Re.hidetoolBar,We=[].concat(O,[{title:"".concat(Se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Se?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return i.a.createElement("ul",{className:"markdown-toolbar-container"},!Ae&&We.map(function(Xe,ft){return i.a.createElement("li",{key:ft},Xe.actionName?i.a.createElement(E,Object(x.a)({},Xe,{onActionCallback:fe})):i.a.createElement("span",{className:"v-line"}))}),De?i.a.createElement("li",null,i.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:fe},i.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_e&&i.a.createElement("li",null,i.a.createElement(E,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_e),onActionCallback:fe},i.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),i.a.createElement("li",{className:"btn-full-screen"},i.a.createElement(E,{icon:"".concat(ye?"icon-shrink":"icon-enlarge"),title:ye?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:fe})))},y=k("M8RZ"),T=k("+L6B"),M=k("2/Rp"),N=k("y8nQ"),I=k("Vl3Y"),G=k("5NDa"),H=k("5rEg"),W={labelCol:{span:4},wrapperCol:{span:20}},z=function(Re){var Se=Re.callback,De=Re.onCancel;function fe(ye){Se(ye)}return i.a.createElement(I.a,Object(x.a)({},W,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:fe}),i.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},i.a.createElement(H.a,null)),i.a.createElement(I.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},i.a.createElement(H.a,null)),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(M.a,{type:"ghost",onClick:De},"\u53D6\u6D88")))},U=k("7ahc"),B=k("HmJG"),K=k("BjJ7"),q=I.a.useForm,ae={width:280,marginRight:10},se={labelCol:{span:5},wrapperCol:{span:19}},we=function(Re){var Se=Re.callback,De=Re.onCancel,fe=q(),ye=Object(h.a)(fe,1),_e=ye[0];function Ae(ft){Se(ft)}function We(ft,vt){_e.setFieldsValue({src:"/api/attachments/".concat(ft.id),type:vt.type})}function Xe(ft){var vt=ft.target.files[0];de(vt,We)}return i.a.createElement(I.a,Object(x.a)({form:_e},se,{className:"upload-image-panel",onFinish:Ae}),i.a.createElement(I.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},i.a.createElement("div",{className:"flex-container"},i.a.createElement(I.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},i.a.createElement(H.a,{style:ae})),i.a.createElement(Te,{onFileChange:Xe}))),i.a.createElement(I.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},i.a.createElement(H.a,{style:{width:264}})),i.a.createElement(I.a.Item,{style:{textAlign:"right"}},i.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(M.a,{type:"ghost",onClick:De},"\u53D6\u6D88")))};function Te(Re){var Se=Re.onFileChange;return i.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",i.a.createElement("input",{type:"file",onChange:Se}))}function de(Re,Se){if(!Re)throw new String("\u6CA1\u6709\u6587\u4EF6");var De=new FormData;De.append("editormd-image-file",Re),De.append("file_param_name","editormd-image-file"),De.append("byxhr","true");var fe=new window.XMLHttpRequest;fe.withCredentials=!0,fe.addEventListener("load",function(ye){Se(JSON.parse(ye.target.responseText),Re)},!1),fe.addEventListener("error",function(ye){console.error(ye)},!1),fe.open("POST","".concat(K.a,"/api/attachments.json")),fe.send(De)}var xe=k("giR+"),pe=k("fyUT"),ne=k("7Kak"),ie=k("9yH6"),ee=ie.a.Group,le={margin:"0 8px"},Q=function(Re){var Se=Re.callback,De=Re.onCancel;function fe(ye){Se(ye)}return i.a.createElement(I.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:fe},i.a.createElement("div",{className:"flex-container"},i.a.createElement("span",{style:le},"\u5355\u5143\u683C\u6570\uFF1A"),i.a.createElement("span",{style:le},"\u884C\u6570"),i.a.createElement(I.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},i.a.createElement(pe.a,null)),i.a.createElement("span",{style:le},"\u5217\u6570"),i.a.createElement(I.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},i.a.createElement(pe.a,null))),i.a.createElement("div",{className:"flex-container",style:{marginTop:12}},i.a.createElement("span",{style:le},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),i.a.createElement(I.a.Item,{name:"align"},i.a.createElement(ee,null,i.a.createElement(ie.a,{value:"default"},i.a.createElement("i",{className:"fa fa-align-justify"})),i.a.createElement(ie.a,{value:"left"},i.a.createElement("i",{className:"fa fa-align-left"})),i.a.createElement(ie.a,{value:"center"},i.a.createElement("i",{className:"fa fa-align-center"})),i.a.createElement(ie.a,{value:"right"},i.a.createElement("i",{className:"fa fa-align-right"}))))),i.a.createElement("div",{className:"flex-container flex-end"},i.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),i.a.createElement(M.a,{type:"ghost",onClick:De},"\u53D6\u6D88")))},Z=k("m3rI"),be="link",te="upload-image",$="code-block",X="add-table",Y="------------",ve={default:Y,left:":".concat(Y),center:":".concat(Y,":"),right:"".concat(Y,":")},ue=k("9VGf"),Ee,Ke;function Ye(){}var Je=0,tt=1e4,at="\u2581",lt=`
**\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 je(Re){return/^\d+$/.test(Re)?"".concat(Re,"px"):Re}var Ce=navigator.platform.toUpperCase().indexOf("MAC")>=0,Qe=Ce?"Cmd":"Ctrl",st=(Ee={},Object(w.a)(Ee,Qe+"-B","bold"),Object(w.a)(Ee,Qe+"-I","italic"),Ee),Ge=(Ke={},Object(w.a)(Ke,be,"\u6DFB\u52A0\u94FE\u63A5"),Object(w.a)(Ke,$,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(w.a)(Ke,te,"\u6DFB\u52A0\u56FE\u7247"),Object(w.a)(Ke,X,"\u6DFB\u52A0\u8868\u683C"),Ke),rt=J.a=function(Re){var Se=Re.defaultValue,De=Se===void 0?"":Se,fe=Re.onChange,ye=Re.width,_e=ye===void 0?"100%":ye,Ae=Re.height,We=Ae===void 0?400:Ae,Xe=Re.miniToolbar,ft=Xe===void 0?!1:Xe,vt=Re.isFocus,Kt=vt===void 0?!1:vt,kt=Re.watch,Or=Re.insertTemp,pr=Re.mode,Et=pr===void 0?"markdown":pr,Yr=Re.id,kr=Yr===void 0?"markdown-editor-id":Yr,Ur=Re.showResizeBar,dn=Ur===void 0?!1:Ur,br=Re.noStorage,qr=br===void 0?!1:br,Zr=Re.showNullButton,Ar=Zr===void 0?!1:Zr,fn=Re.hidetoolBar,wn=fn===void 0?!1:fn,Kn=Re.fullScreen,nn=Kn===void 0?!1:Kn,ya=Re.onBlur,Da=Re.onCMBeforeChange,pn=Re.onFullScreen,qt=Re.className,Yn=qt===void 0?"":qt,ba=Re.disablePaste,zn=ba===void 0?!1:ba,Gr=Re.placeholder,kn=Gr===void 0?"":Gr,ha=Re.values,la=ha===void 0?"":ha,St=Object(d.useState)(null),ir=Object(h.a)(St,2),Mt=ir[0],wa=ir[1],Pa=Object(d.useState)(De),pa=Object(h.a)(Pa,2),Ln=pa[0],ur=pa[1],ua=Object(d.useState)(kt),Gn=Object(h.a)(ua,2),On=Gn[0],Mn=Gn[1],Ga=Object(d.useState)(nn),La=Object(h.a)(Ga,2),Un=La[0],Xa=La[1],oi=Object(d.useState)(""),Ma=Object(h.a)(oi,2),mn=Ma[0],Nn=Ma[1],Ba=Object(d.useState)(0),Qa=Object(h.a)(Ba,2),qn=Qa[0],mi=Qa[1],Za=Object(d.useState)(We),ea=Object(h.a)(Za,2),vi=ea[0],gi=ea[1],Wa=Object(d.useState)(!1),Ea=Object(h.a)(Wa,2),Pi=Ea[0],qa=Ea[1],Ha=Object(d.useRef)(),si=Object(d.useRef)(),Ka=Object(d.useRef)(),aa=Object(d.useRef)();Object(d.useEffect)(function(){ur(la),Mt==null||Mt.setValue(la)},[la]),Object(d.useEffect)(function(){pn==null||pn(Un)},[Un]),Object(d.useEffect)(function(){if(Ha.current){var nt=a.a.fromTextArea(Ha.current,{mode:Et,lineNumbers:!ft,lineWrapping:!0,value:De,autoCloseTags:!0,autoCloseBrackets:!0});Kt&&nt.focus();function it(_t,Rt){if(zn){Rt.preventDefault();return}var Ct=Rt.clipboardData;if(Ct){var Ot=Ct.types.toString(),Pt=Ct.items,jt=["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"];if(Ot==="Files"||Ct.types.indexOf("Files")>-1){if(Rt.preventDefault(),Et=="stex")return;try{var Ve,nr=Pt[1];((Ve=Pt[0])===null||Ve===void 0?void 0:Ve.kind)==="file"&&(nr=Pt[0]);var Yt=nr.getAsFile(),Qt=Yt.name.split(".").pop();de(Yt,function(It){if(It.id){var zt,Ut,Ht;(Yt==null||((zt=Yt.type)===null||zt===void 0)?void 0:zt.indexOf("image"))>-1?nt.replaceSelection("![,](/api/attachments/".concat(It.id,"?type=").concat(It.content_type,")")):(Yt==null||((Ut=Yt.type)===null||Ut===void 0)?void 0:Ut.indexOf("video"))>-1?nt.replaceSelection('<video width="100%" controls src="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(It.id,'"></video>')):(Yt==null||((Ht=Yt.type)===null||Ht===void 0)?void 0:Ht.indexOf("pdf"))>-1?nt.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(It.id,"?type=").concat(Yt.type,'&disposition=inline" target="_blank">').concat(Yt.name,"</a>")):jt.includes(Qt)?nt.replaceSelection('<a href="'.concat(Z.a.API_SERVER,"/api/attachments/").concat(It.id,'?type=office&disposition=inline" target="_blank">').concat(Yt.name,"</a>")):nt.replaceSelection("[".concat(Yt.name,"](").concat(Z.a.API_SERVER,"/api/attachments/").concat(It.id,"?type=").concat(It.content_type,")"))}else(It==null?void 0:It.status)===401&&(document.location.href="/user/login")})}catch(It){u.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return nt.on("paste",it),wa(nt),function(){nt.off("paste",it)}}},[]);var ei=Object(d.useCallback)(function(){if(si.current)try{}catch(nt){console.log(nt,"---- to set md editor body height")}},[vi,si,Un]);Object(d.useEffect)(function(){function nt(){var _t=new _.default(function(Rt){var Ct=Object(C.a)(Rt),Ot;try{for(Ct.s();!(Ot=Ct.n()).done;){var Pt=Ot.value;(Pt.target.offsetHeight>0||Pt.target.offsetWidth>0)&&(ei(),Mt.setSize("100%","100%"),Mt.refresh())}}catch(jt){Ct.e(jt)}finally{Ct.f()}});return _t.observe(Ha.current.parentElement),_t}if(Mt){var it=nt();return function(){it.unobserve(Ha.current.parentElement)}}},[Mt,ei]),Object(d.useEffect)(function(){if(Mt){for(var nt=[],it=function(){var Pt=Rt[_t];Ct=Object(h.a)(Pt,2);var jt=Ct[0],Ve=Ct[1],nr=Object(w.a)({},jt,function(){li(Ve)});nt.push(nr),Mt.addKeyMap(nr)},_t=0,Rt=Object.entries(st);_t<Rt.length;_t++){var Ct;it()}return function(){var Ot=Object(C.a)(nt),Pt;try{for(Ot.s();!(Pt=Ot.n()).done;){var jt=Pt.value;Mt.removeKeyMap(jt)}}catch(Ve){Ot.e(Ve)}finally{Ot.f()}}}},[Mt]),Object(d.useEffect)(function(){nn!==Un&&Xa(nn)},[nn]),Object(ue.a)(function(){if(!qr&&qn>0){var nt=new Date().getTime(),it=window.sessionStorage.getItem(kr);nt>=qn+tt&&(!it||it!==Ln)&&(window.sessionStorage.setItem(kr,Ln),qa(!0))}},tt),Object(d.useEffect)(function(){Mn(kt)},[Mt,kt]),Object(d.useEffect)(function(){Mt&&(Kt&&Mt.focus())},[Mt,Kt]),Object(d.useEffect)(function(){if(On&&Mt){var nt=Mt.getScrollerElement();function it(_t){var Rt=_t.target;if(aa.current){var Ct=Rt.scrollTop/Rt.scrollHeight;aa.current.scrollTop=aa.current.scrollHeight*Ct}}return nt.addEventListener("scroll",it),function(){nt.removeEventListener("scroll",it)}}},[Mt,On]),Object(d.useEffect)(function(){if(Mt&&Da){function nt(it,_t){Da(it,_t)}return Mt.on("beforeChange",nt),function(){Mt.off("beforeChange",nt)}}},[Mt,Da]),Object(d.useEffect)(function(){if(Mt&&ya){function nt(){ya(Mt.getValue())}return Mt.on("blur",nt),function(){Mt.off("blur",nt)}}},[Mt,ya]),Object(d.useEffect)(function(){if(Mt){function nt(it){var _t=it.getValue();ur(_t),mi(new Date().getTime()),it.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),fe&&fe(_t)}return Mt.on("change",nt),function(){Mt.off("change",nt)}}},[Mt,fe]),Object(d.useEffect)(function(){Mt&&(De==null?(Mt.setValue(""),ur("")):De!==Mt.getValue()&&(Mt.setValue(De),ur(De),Mt.setCursor(Mt.lineCount(),0)))},[Mt,De]);var li=Object(d.useCallback)(function(nt){var it=Mt.getCursor(),_t=Mt.getSelection(),Rt=_t.split(`
`);switch(nt){case"bold":return Mt.replaceSelection("**"+_t+"**"),_t===""&&Mt.setCursor(it.line,it.ch+2),Mt.focus();case"italic":return Mt.replaceSelection("*"+_t+"*"),_t===""&&Mt.setCursor(it.line,it.ch+1),Mt.focus();case"code":return Mt.replaceSelection("`"+_t+"`"),_t===""&&Mt.setCursor(it.line,it.ch+1),Mt.focus();case"inline-latex":return Mt.replaceSelection("`$$"+_t+"$$`"),_t===""&&Mt.setCursor(it.line,it.ch+3),Mt.focus();case"latex":return Mt.replaceSelection("```latex\n"+_t+"\n```"),Mt.setCursor(it.line+1,_t.length+1),Mt.focus();case"line-break":return Mt.replaceSelection(`<br/>
`),Mt.focus();case"list-ul":return _t===""?Mt.replaceSelection("- "+_t):Mt.replaceSelection(Rt.map(function(Ct){return Ct===""?"":"- ".concat(Ct)}).join(`
`)),Mt.focus();case"list-ol":return _t===""?Mt.replaceSelection("1. "+_t):Mt.replaceSelection(Rt.map(function(Ct,Ot){return Ct===""?"":"".concat(Ot+1,". ").concat(Ct)}).join(`
`)),Mt.focus();case"add-null-ch":return _t===""&&Mt.setCursor(it.line,it.ch+1),Mt.replaceSelection(at),Mt.focus();case"inster-template-1":return _t===""&&Mt.setCursor(it.line,it.ch),Mt.replaceSelection(lt),Mt.focus();case"eraser":return Mt.setValue(""),Mt.focus();case"trigger-watch":return Mn(!On),Mt.focus();case"trigger-full-screen":return Xa(!Un),Mt.focus();case be:Nn(be);return;case $:Nn($);return;case te:Nn(te);return;case X:Nn(X);return;default:throw new Error}},[Mt,On,Un]),pt=Object(d.useCallback)(function(nt){Nn("");switch(mn){case be:var it=nt.title,_t=nt.link;return Mt.replaceSelection("[".concat(it,"](").concat(_t,")")),Mt.focus();case $:var Rt=nt.language,Ct=nt.content;return Mt.replaceSelection(["```"+Rt,Ct,"```"].join(`
`)),Mt.focus();case te:var Ot=nt.src,Pt=nt.alt;return Mt.replaceSelection("![ ".concat(Pt," ]( ").concat(Ot,' "').concat(Pt,'" )')),Mt.focus();case X:for(var jt=nt.row,Ve=nt.col,nr=nt.align,Yt=`
`,Qt=0;Qt<jt;Qt++){for(var It=[],zt=[],Ut=0;Ut<Ve;Ut++)Qt===1&&zt.push(ve[nr]),It.push(" ");Qt===1&&(Yt+="| ".concat(zt.join(" | "),` |
`)),Yt+="| ".concat(It.join(Ve===1?"":" | "),` |
`)}return Mt.replaceSelection(Yt+`
`),Mt.focus();default:throw new Error}},[Mt,mn]),Ze=Object(d.useMemo)(function(){switch(mn){case be:return i.a.createElement(z,{callback:pt,onCancel:ht});case $:return i.a.createElement(U.b,{callback:pt,onCancel:ht});case te:return i.a.createElement(we,{callback:pt,onCancel:ht});case X:return i.a.createElement(Q,{callback:pt,onCancel:ht});default:return null}},[mn]);function ht(){Nn("")}Object(d.useEffect)(function(){if(Ka.current){var nt=Ka.current,it=!1,_t=0;function Rt(Pt){it=!0,_t=Pt.pageY}function Ct(){it=!1}function Ot(Pt){if(it){var jt=Pt.pageY-_t;jt<0&&(jt=0),jt>300&&(jt=300);var Ve=We+jt+"px";gi(Ve)}}return nt.addEventListener("mousedown",Rt),document.addEventListener("mousemove",Ot),document.addEventListener("mouseup",Ct),function(){nt.removeEventListener("mousedown",Rt),document.removeEventListener("mousemove",Ot),document.removeEventListener("mouseup",Ct)}}},[Mt,Ka]),Object(d.useEffect)(function(){gi(We)},[We]);var gt=je(_e),Wt=je(vi),At={width:gt,height:Wt},Jt=Object(d.useMemo)(function(){if(qn){var nt=new Date(qn),it=nt.getHours(),_t=nt.getMinutes(),Rt=nt.getSeconds();return it=it<10?"0"+it:it,_t=_t<10?"0"+_t:_t,Rt=Rt<10?"0"+Rt:Rt,"".concat(it,":").concat(_t,":").concat(Rt)}return 0},[qn]);function Lt(){window.sessionStorage.removeItem(kr),qa(!1),mi(0)}function ct(){qa(!1),mi(0),Mt.setValue(window.sessionStorage.getItem(kr))}return i.a.createElement(d.Fragment,null,i.a.createElement("div",{className:"markdown-editor-wrapper",ref:si},i.a.createElement("div",{className:"markdown-editor-container ".concat(Yn," ").concat(On?"on-preview":""," ").concat(ft?"mini":""," ").concat(Un?"full-screen":""),style:At},i.a.createElement(v,{insertTemp:Or,watch:On,fullScreen:Un,showNullButton:Ar,onActionCallback:li,hidetoolBar:wn}),i.a.createElement("div",{className:"markdown-editor-body"},i.a.createElement("div",{className:"codemirror-container"},i.a.createElement("textarea",{ref:Ha,placeholder:kn})),On?i.a.createElement("div",{ref:aa,className:"preview-container"},Et==="stex"&&i.a.createElement(S,{value:Ln}),Et!=="stex"&&i.a.createElement(t.a,{value:Ln})):null))),dn?i.a.createElement("a",{ref:Ka,className:"editor-resize"}):null,i.a.createElement(y.a,null,Ge[mn]?i.a.createElement(f.a,{centered:!0,title:Ge[mn],visible:!0,onCancel:ht,footer:null},Ze):null))}},PVpz:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.StreamCipher,u=f.algo,h=[],w=[],d=[],i=u.RabbitLegacy=D.extend({_doReset:function(){var a=this._key.words,_=this.cfg.iv,p=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],c=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++)c[m]^=p[m+4&7];if(_){var g=_.words,b=g[0],n=g[1],o=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,t=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,S=o>>>16|t&4294901760,x=t<<16|o&65535;c[0]^=o,c[1]^=S,c[2]^=t,c[3]^=x,c[4]^=o,c[5]^=S,c[6]^=t,c[7]^=x;for(var m=0;m<4;m++)l.call(this)}},_doProcessBlock:function(a,_){var p=this._X;l.call(this),h[0]=p[0]^p[5]>>>16^p[3]<<16,h[1]=p[2]^p[7]>>>16^p[5]<<16,h[2]=p[4]^p[1]>>>16^p[7]<<16,h[3]=p[6]^p[3]>>>16^p[1]<<16;for(var c=0;c<4;c++)h[c]=(h[c]<<8|h[c]>>>24)&16711935|(h[c]<<24|h[c]>>>8)&4278255360,a[_+c]^=h[c]},blockSize:128/32,ivSize:64/32});function l(){for(var a=this._X,_=this._C,p=0;p<8;p++)w[p]=_[p];_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0<w[0]>>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0<w[1]>>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0<w[2]>>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0<w[3]>>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0<w[4]>>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0<w[5]>>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0<w[6]>>>0?1:0)|0,this._b=_[7]>>>0<w[7]>>>0?1:0;for(var p=0;p<8;p++){var c=a[p]+_[p],m=c&65535,g=c>>>16,b=((m*m>>>17)+m*g>>>15)+g*g,n=((c&4294901760)*c|0)+((c&65535)*c|0);d[p]=b^n}a[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,a[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,a[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,a[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,a[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,a[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,a[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,a[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}f.RabbitLegacy=D._createHelper(i)}(),L.RabbitLegacy})},RxwV:function(j,J,k){"use strict";var L=k("cDcd"),f=k("uciX"),C=k("2W6z"),D=k.n(C),u=k("4IlW"),h=k("uK0f"),w=k.n(h);function d(xe,pe){if(xe===pe)return!0;if(!xe||!pe)return!1;var ne=xe.length;if(pe.length!==ne)return!1;for(var ie=0;ie<ne;ie++)if(xe[ie]!==pe[ie])return!1;return!0}function i(xe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?i=function(ne){return typeof ne}:i=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},i(xe)}function l(xe,pe){if(!(xe instanceof pe))throw new TypeError("Cannot call a class as a function")}function a(xe,pe){for(var ne=0;ne<pe.length;ne++){var ie=pe[ne];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(xe,ie.key,ie)}}function _(xe,pe,ne){return pe&&a(xe.prototype,pe),ne&&a(xe,ne),xe}function p(xe,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(pe&&pe.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),pe&&c(xe,pe)}function c(xe,pe){return c=Object.setPrototypeOf||function(ie,ee){return ie.__proto__=ee,ie},c(xe,pe)}function m(xe){var pe=n();return function(){var ne=o(xe),ie;if(pe){var ee=o(this).constructor;ie=Reflect.construct(ne,arguments,ee)}else ie=ne.apply(this,arguments);return g(this,ie)}}function g(xe,pe){return pe&&(i(pe)==="object"||typeof pe=="function")?pe:b(xe)}function b(xe){if(xe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xe}function n(){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(xe){return!1}}function o(xe){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},o(xe)}var t=function(){var xe=function(pe){p(ie,pe);var ne=m(ie);function ie(){var ee;return l(this,ie),ee=ne.apply(this,arguments),ee.menuItems={},ee.saveMenuItem=function(le){return function(Q){ee.menuItems[le]=Q}},ee}return _(ie,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(le){!le.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(le){var Q=this.props,Z=Q.fieldNames,be=Q.defaultFieldNames;return Z[le]||be[le]}},{key:"getOption",value:function(le,Q){var Z=this.props,be=Z.prefixCls,te=Z.expandTrigger,$=Z.expandIcon,X=Z.loadingIcon,Y=this.props.onSelect.bind(this,le,Q),ve=this.props.onItemDoubleClick.bind(this,le,Q),ue={onClick:Y,onDoubleClick:ve},Ee="".concat(be,"-menu-item"),Ke=null,Ye=le[this.getFieldName("children")]&&le[this.getFieldName("children")].length>0;(Ye||le.isLeaf===!1)&&(Ee+=" ".concat(be,"-menu-item-expand"),le.loading||(Ke=L.createElement("span",{className:"".concat(be,"-menu-item-expand-icon")},$))),te==="hover"&&(Ye||le.isLeaf===!1)&&(ue={onMouseEnter:this.delayOnSelect.bind(this,Y),onMouseLeave:this.delayOnSelect.bind(this),onClick:Y}),this.isActiveOption(le,Q)&&(Ee+=" ".concat(be,"-menu-item-active"),ue.ref=this.saveMenuItem(Q)),le.disabled&&(Ee+=" ".concat(be,"-menu-item-disabled"));var Je=null;le.loading&&(Ee+=" ".concat(be,"-menu-item-loading"),Je=X||null);var tt="";return"title"in le?tt=le.title:typeof le[this.getFieldName("label")]=="string"&&(tt=le[this.getFieldName("label")]),L.createElement("li",Object.assign({key:le[this.getFieldName("value")],className:Ee,title:tt},ue,{role:"menuitem",onMouseDown:function(lt){return lt.preventDefault()}}),le[this.getFieldName("label")],Ke,Je)}},{key:"getActiveOptions",value:function(le){var Q=this,Z=this.props.options,be=le||this.props.activeValue;return w()(Z,function(te,$){return te[Q.getFieldName("value")]===be[$]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var le=this,Q=this.props.options,Z=this.getActiveOptions().map(function(be){return be[le.getFieldName("children")]}).filter(function(be){return!!be});return Z.unshift(Q),Z}},{key:"delayOnSelect",value:function(le){for(var Q=this,Z=arguments.length,be=new Array(Z>1?Z-1:0),te=1;te<Z;te++)be[te-1]=arguments[te];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof le=="function"&&(this.delayTimer=window.setTimeout(function(){le(be),Q.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var le=this.getShowOptions().length,Q=0;Q<le;Q++){var Z=this.menuItems[Q];Z&&Z.parentElement&&(Z.parentElement.scrollTop=Z.offsetTop)}}},{key:"isActiveOption",value:function(le,Q){var Z=this.props.activeValue,be=Z===void 0?[]:Z;return be[Q]===le[this.getFieldName("value")]}},{key:"render",value:function(){var le=this,Q=this.props,Z=Q.prefixCls,be=Q.dropdownMenuColumnStyle;return L.createElement("div",null,this.getShowOptions().map(function(te,$){return L.createElement("ul",{className:"".concat(Z,"-menu"),key:$,style:be},te.map(function(X){return le.getOption(X,$)}))}))}}]),ie}(L.Component);return xe.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},xe}(),S=t,x={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}}},s=x;function P(xe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?P=function(ne){return typeof ne}:P=function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},P(xe)}function O(xe,pe){if(xe==null)return{};var ne=E(xe,pe),ie,ee;if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(xe);for(ee=0;ee<le.length;ee++){if(ie=le[ee],pe.indexOf(ie)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(xe,ie))continue;ne[ie]=xe[ie]}}return ne}function E(xe,pe){if(xe==null)return{};var ne={},ie=Object.keys(xe),ee,le;for(le=0;le<ie.length;le++){if(ee=ie[le],pe.indexOf(ee)>=0)continue;ne[ee]=xe[ee]}return ne}function v(xe){return N(xe)||M(xe)||T(xe)||y()}function y(){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 T(xe,pe){if(!xe)return;if(typeof xe=="string")return I(xe,pe);var ne=Object.prototype.toString.call(xe).slice(8,-1);if(ne==="Object"&&xe.constructor&&(ne=xe.constructor.name),ne==="Map"||ne==="Set")return Array.from(xe);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return I(xe,pe)}function M(xe){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(xe))return Array.from(xe)}function N(xe){if(Array.isArray(xe))return I(xe)}function I(xe,pe){(pe==null||pe>xe.length)&&(pe=xe.length);for(var ne=0,ie=new Array(pe);ne<pe;ne++)ie[ne]=xe[ne];return ie}function G(xe,pe){if(!(xe instanceof pe))throw new TypeError("Cannot call a class as a function")}function H(xe,pe){for(var ne=0;ne<pe.length;ne++){var ie=pe[ne];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(xe,ie.key,ie)}}function W(xe,pe,ne){return pe&&H(xe.prototype,pe),ne&&H(xe,ne),xe}function z(xe,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(pe&&pe.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),pe&&U(xe,pe)}function U(xe,pe){return U=Object.setPrototypeOf||function(ie,ee){return ie.__proto__=ee,ie},U(xe,pe)}function B(xe){var pe=ae();return function(){var ne=se(xe),ie;if(pe){var ee=se(this).constructor;ie=Reflect.construct(ne,arguments,ee)}else ie=ne.apply(this,arguments);return K(this,ie)}}function K(xe,pe){return pe&&(P(pe)==="object"||typeof pe=="function")?pe:q(xe)}function q(xe){if(xe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xe}function ae(){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(xe){return!1}}function se(xe){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},se(xe)}var we=function(){var xe=function(pe){z(ie,pe);var ne=B(ie);function ie(ee){var le;G(this,ie),le=ne.call(this,ee),le.setPopupVisible=function(Z){var be=le.state.value;"popupVisible"in le.props||le.setState({popupVisible:Z}),Z&&!le.state.popupVisible&&le.setState({activeValue:be}),le.props.onPopupVisibleChange(Z)},le.handleChange=function(Z,be,te){var $=be.visible;(te.type!=="keydown"||te.keyCode===u.a.ENTER)&&(le.props.onChange(Z.map(function(X){return X[le.getFieldName("value")]}),Z),le.setPopupVisible($))},le.handlePopupVisibleChange=function(Z){le.setPopupVisible(Z)},le.handleMenuSelect=function(Z,be,te){var $=le.trigger.getRootDomNode();$&&$.focus&&$.focus();var X=le.props,Y=X.changeOnSelect,ve=X.loadData,ue=X.expandTrigger;if(!Z||Z.disabled)return;var Ee=le.state.activeValue;Ee=Ee.slice(0,be+1),Ee[be]=Z[le.getFieldName("value")];var Ke=le.getActiveOptions(Ee);if(Z.isLeaf===!1&&!Z[le.getFieldName("children")]&&ve){Y&&le.handleChange(Ke,{visible:!0},te),le.setState({activeValue:Ee}),ve(Ke);return}var Ye={};!Z[le.getFieldName("children")]||!Z[le.getFieldName("children")].length?(le.handleChange(Ke,{visible:!1},te),Ye.value=Ee):Y&&(te.type==="click"||te.type==="keydown")&&(ue==="hover"?le.handleChange(Ke,{visible:!1},te):le.handleChange(Ke,{visible:!0},te),Ye.value=Ee),Ye.activeValue=Ee,("value"in le.props||te.type==="keydown"&&te.keyCode!==u.a.ENTER)&&delete Ye.value,le.setState(Ye)},le.handleItemDoubleClick=function(){var Z=le.props.changeOnSelect;Z&&le.setPopupVisible(!1)},le.handleKeyDown=function(Z){var be=le.props.children;if(be&&be.props.onKeyDown){be.props.onKeyDown(Z);return}var te=v(le.state.activeValue),$=te.length-1<0?0:te.length-1,X=le.getCurrentLevelOptions(),Y=X.map(function(Ke){return Ke[le.getFieldName("value")]}).indexOf(te[$]);if(Z.keyCode!==u.a.DOWN&&Z.keyCode!==u.a.UP&&Z.keyCode!==u.a.LEFT&&Z.keyCode!==u.a.RIGHT&&Z.keyCode!==u.a.ENTER&&Z.keyCode!==u.a.SPACE&&Z.keyCode!==u.a.BACKSPACE&&Z.keyCode!==u.a.ESC&&Z.keyCode!==u.a.TAB)return;if(!le.state.popupVisible&&Z.keyCode!==u.a.BACKSPACE&&Z.keyCode!==u.a.LEFT&&Z.keyCode!==u.a.RIGHT&&Z.keyCode!==u.a.ESC&&Z.keyCode!==u.a.TAB){le.setPopupVisible(!0);return}if(Z.keyCode===u.a.DOWN||Z.keyCode===u.a.UP){Z.preventDefault();var ve=Y;ve!==-1?Z.keyCode===u.a.DOWN?(ve+=1,ve=ve>=X.length?0:ve):(ve-=1,ve=ve<0?X.length-1:ve):ve=0,te[$]=X[ve][le.getFieldName("value")]}else if(Z.keyCode===u.a.LEFT||Z.keyCode===u.a.BACKSPACE)Z.preventDefault(),te.splice(te.length-1,1);else if(Z.keyCode===u.a.RIGHT)Z.preventDefault(),X[Y]&&X[Y][le.getFieldName("children")]&&te.push(X[Y][le.getFieldName("children")][0][le.getFieldName("value")]);else if(Z.keyCode===u.a.ESC||Z.keyCode===u.a.TAB){le.setPopupVisible(!1);return}(!te||te.length===0)&&le.setPopupVisible(!1);var ue=le.getActiveOptions(te),Ee=ue[ue.length-1];le.handleMenuSelect(Ee,ue.length-1,Z),le.props.onKeyDown&&le.props.onKeyDown(Z)},le.saveTrigger=function(Z){le.trigger=Z};var Q=[];return"value"in ee?Q=ee.value||[]:"defaultValue"in ee&&(Q=ee.defaultValue||[]),D()(!("filedNames"in ee),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),le.state={popupVisible:ee.popupVisible,activeValue:Q,value:Q,prevProps:ee},le.defaultFieldNames={label:"label",value:"value",children:"children"},le}return W(ie,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(le){var Q=this.defaultFieldNames,Z=this.props,be=Z.fieldNames,te=Z.filedNames;return"filedNames"in this.props?te[le]||Q[le]:be[le]||Q[le]}},{key:"getFieldNames",value:function(){var le=this.props,Q=le.fieldNames,Z=le.filedNames;return"filedNames"in this.props?Z:Q}},{key:"getCurrentLevelOptions",value:function(){var le=this,Q=this.props.options,Z=Q===void 0?[]:Q,be=this.state.activeValue,te=be===void 0?[]:be,$=w()(Z,function(X,Y){return X[le.getFieldName("value")]===te[Y]},{childrenKeyName:this.getFieldName("children")});return $[$.length-2]?$[$.length-2][this.getFieldName("children")]:v(Z).filter(function(X){return!X.disabled})}},{key:"getActiveOptions",value:function(le){var Q=this;return w()(this.props.options||[],function(Z,be){return Z[Q.getFieldName("value")]===le[be]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var le=this.props,Q=le.prefixCls,Z=le.transitionName,be=le.popupClassName,te=le.options,$=te===void 0?[]:te,X=le.disabled,Y=le.builtinPlacements,ve=le.popupPlacement,ue=le.children,Ee=le.dropdownRender,Ke=O(le,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),Ye=L.createElement("div",null),Je="";$&&$.length>0?Ye=L.createElement(S,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Je=" ".concat(Q,"-menus-empty");var tt=Ye;return Ee&&(tt=Ee(Ye)),L.createElement(f.a,Object.assign({ref:this.saveTrigger},Ke,{popupPlacement:ve,builtinPlacements:Y,popupTransitionName:Z,action:X?[]:["click"],popupVisible:X?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(Q,"-menus"),popupClassName:be+Je,popup:tt}),L.cloneElement(ue,{onKeyDown:this.handleKeyDown,tabIndex:X?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(le,Q){var Z=Q.prevProps,be=Z===void 0?{}:Z,te={prevProps:le};return"value"in le&&!d(be.value,le.value)&&(te.value=le.value||[],"loadData"in le||(te.activeValue=le.value||[])),"popupVisible"in le&&(te.popupVisible=le.popupVisible),te}}]),ie}(L.Component);return xe.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:s,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},xe}(),Te=we,de=J.a=Te},S6kV:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.OFB=function(){var f=L.lib.BlockCipherMode.extend(),C=f.Encryptor=f.extend({processBlock:function(D,u){var h=this._cipher,w=h.blockSize,d=this._iv,i=this._keystream;d&&(i=this._keystream=d.slice(0),this._iv=void 0),h.encryptBlock(i,0);for(var l=0;l<w;l++)D[u+l]^=i[l]}});return f.Decryptor=C,f}(),L.mode.OFB})},"SA+Z":function(j,J,k){var L=k("wTVA"),f=k("EbDI"),C=k("ZhPi"),D=k("wkBT");function u(h){return L(h)||f(h)||C(h)||D()}j.exports=u,j.exports.__esModule=!0,j.exports.default=j.exports},SJMd:function(j,J){/**
* @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 k,L,f,C=!1,D,u;window.PR_SHOULD_USE_CONTINUATION=!0;var h,w;(function(){var d=window,i=["break,continue,do,else,for,if,return,while"],l=[i,"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"],_=[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"],p=[a,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],c=[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"],m="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",g=[a,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],b="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",n=[i,"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"],o=[i,"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"],t=[i,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[_,c,p,g,b,n,o,t],x=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,s="str",P="kwd",O="com",E="typ",v="lit",y="pun",T="pln",M="tag",N="dec",I="src",G="atn",H="atv",W="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(te){for(var $=0,X=!1,Y=!1,ve=0,ue=te.length;ve<ue;++ve){var Ee=te[ve];if(Ee.ignoreCase)Y=!0;else if(/[a-z]/i.test(Ee.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Y=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function Ye(je){var Ce=je.charCodeAt(0);if(Ce!==92)return Ce;var Qe=je.charAt(1);return Ce=Ke[Qe],Ce||("0"<=Qe&&Qe<="7"?parseInt(je.substring(1),8):Qe==="u"||Qe==="x"?parseInt(je.substring(2),16):je.charCodeAt(1))}function Je(je){if(je<32)return(je<16?"\\x0":"\\x")+je.toString(16);var Ce=String.fromCharCode(je);return Ce==="\\"||Ce==="-"||Ce==="]"||Ce==="^"?"\\"+Ce:Ce}function tt(je){var Ce=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")),Qe=[],st=Ce[0]==="^",Ge=["["];st&&Ge.push("^");for(var rt=st?1:0,Re=Ce.length;rt<Re;++rt){var Se=Ce[rt];if(/\\[bdsw]/i.test(Se))Ge.push(Se);else{var De=Ye(Se),fe;rt+2<Re&&Ce[rt+1]==="-"?(fe=Ye(Ce[rt+2]),rt+=2):fe=De,Qe.push([De,fe]),fe<65||De>122||(fe<65||De>90||Qe.push([Math.max(65,De)|32,Math.min(fe,90)|32]),fe<97||De>122||Qe.push([Math.max(97,De)&~32,Math.min(fe,122)&~32]))}}Qe.sort(function(We,Xe){return We[0]-Xe[0]||Xe[1]-We[1]});for(var ye=[],_e=[],rt=0;rt<Qe.length;++rt){var Ae=Qe[rt];Ae[0]<=_e[1]+1?_e[1]=Math.max(_e[1],Ae[1]):ye.push(_e=Ae)}for(var rt=0;rt<ye.length;++rt){var Ae=ye[rt];Ge.push(Je(Ae[0])),Ae[1]>Ae[0]&&(Ae[1]+1>Ae[0]&&Ge.push("-"),Ge.push(Je(Ae[1])))}return Ge.push("]"),Ge.join("")}function at(je){for(var Ce=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")),Qe=Ce.length,st=[],Ge=0,rt=0;Ge<Qe;++Ge){var Re=Ce[Ge];if(Re==="(")++rt;else if(Re.charAt(0)==="\\"){var Se=+Re.substring(1);Se&&(Se<=rt?st[Se]=-1:Ce[Ge]=Je(Se))}}for(var Ge=1;Ge<st.length;++Ge)st[Ge]===-1&&(st[Ge]=++$);for(var Ge=0,rt=0;Ge<Qe;++Ge){var Re=Ce[Ge];if(Re==="(")++rt,st[rt]||(Ce[Ge]="(?:");else if(Re.charAt(0)==="\\"){var Se=+Re.substring(1);Se&&Se<=rt&&(Ce[Ge]="\\"+st[Se])}}for(var Ge=0;Ge<Qe;++Ge)Ce[Ge]==="^"&&Ce[Ge+1]!=="^"&&(Ce[Ge]="");if(je.ignoreCase&&X)for(var Ge=0;Ge<Qe;++Ge){var Re=Ce[Ge],De=Re.charAt(0);Re.length>=2&&De==="["?Ce[Ge]=tt(Re):De!=="\\"&&(Ce[Ge]=Re.replace(/[a-zA-Z]/g,function(_e){var Ae=_e.charCodeAt(0);return"["+String.fromCharCode(Ae&~32,Ae|32)+"]"}))}return Ce.join("")}for(var lt=[],ve=0,ue=te.length;ve<ue;++ve){var Ee=te[ve];if(Ee.global||Ee.multiline)throw new Error(""+Ee);lt.push("(?:"+at(Ee)+")")}return new RegExp(lt.join("|"),Y?"gi":"g")}function B(te,$){var X=/(?:^|\s)nocode(?:\s|$)/,Y=[],ve=0,ue=[],Ee=0;function Ke(Ye){var Je=Ye.nodeType;if(Je==1){if(X.test(Ye.className))return;for(var tt=Ye.firstChild;tt;tt=tt.nextSibling)Ke(tt);var at=Ye.nodeName.toLowerCase();(at==="br"||at==="li")&&(Y[Ee]=`
`,ue[Ee<<1]=ve++,ue[Ee++<<1|1]=Ye)}else if(Je==3||Je==4){var lt=Ye.nodeValue;lt.length&&($?lt=lt.replace(/\r\n?/g,`
`):lt=lt.replace(/[ \t\r\n]+/g," "),Y[Ee]=lt,ue[Ee<<1]=ve,ve+=lt.length,ue[Ee++<<1|1]=Ye)}}return Ke(te),{sourceCode:Y.join("").replace(/\n$/,""),spans:ue}}function K(te,$,X,Y,ve){if(!X)return;var ue={sourceNode:te,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:$,decorations:null};Y(ue),ve.push.apply(ve,ue.decorations)}var q=/\S/;function ae(te){for(var $=void 0,X=te.firstChild;X;X=X.nextSibling){var Y=X.nodeType;$=Y===1?$?te:X:Y===3&&q.test(X.nodeValue)?te:$}return $===te?void 0:$}function se(te,$){var X={},Y;(function(){for(var Ee=te.concat($),Ke=[],Ye={},Je=0,tt=Ee.length;Je<tt;++Je){var at=Ee[Je],lt=at[3];if(lt)for(var je=lt.length;--je>=0;)X[lt.charAt(je)]=at;var Ce=at[1],Qe=""+Ce;Ye.hasOwnProperty(Qe)||(Ke.push(Ce),Ye[Qe]=null)}Ke.push(/[\0-\uffff]/),Y=U(Ke)})();var ve=$.length,ue=function(Ee){for(var Ke=Ee.sourceCode,Ye=Ee.basePos,Je=Ee.sourceNode,tt=[Ye,T],at=0,lt=Ke.match(Y)||[],je={},Ce=0,Qe=lt.length;Ce<Qe;++Ce){var st=lt[Ce],Ge=je[st],rt=void 0,Re;if(typeof Ge=="string")Re=!1;else{var Se=X[st.charAt(0)];if(Se)rt=st.match(Se[1]),Ge=Se[0];else{for(var De=0;De<ve;++De)if(Se=$[De],rt=st.match(Se[1]),rt){Ge=Se[0];break}rt||(Ge=T)}Re=Ge.length>=5&&Ge.substring(0,5)==="lang-",Re&&!(rt&&typeof rt[1]=="string")&&(Re=!1,Ge=I),Re||(je[st]=Ge)}var fe=at;if(at+=st.length,!Re)tt.push(Ye+fe,Ge);else{var ye=rt[1],_e=st.indexOf(ye),Ae=_e+ye.length;rt[2]&&(Ae=st.length-rt[2].length,_e=Ae-ye.length);var We=Ge.substring(5);K(Je,Ye+fe,st.substring(0,_e),ue,tt),K(Je,Ye+fe+_e,ye,ie(We,ye),tt),K(Je,Ye+fe+Ae,st.substring(Ae),ue,tt)}}Ee.decorations=tt};return ue}function we(te){var $=[],X=[];te.tripleQuotedStrings?$.push([s,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):te.multiLineStrings?$.push([s,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):$.push([s,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),te.verbatimStrings&&X.push([s,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=te.hashComments;Y&&(te.cStyleComments?(Y>1?$.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):$.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([s,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):$.push([O,/^#[^\r\n]*/,null,"#"])),te.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ve=te.regexLiterals;if(ve){var ue=ve>1?"":`
\r`,Ee=ue?".":"[\\S\\s]",Ke="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+Ee+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+Ee+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+Ke+")")])}var Ye=te.types;Ye&&X.push([E,Ye]);var Je=(""+te.keywords).replace(/^ | $/g,"");Je.length&&X.push([P,new RegExp("^(?:"+Je.replace(/[\s,]+/g,"|")+")\\b"),null]),$.push([T,/^\s+/,null,` \r
\xA0`]);var tt="^.[^\\s\\w.$@'\"`/\\\\]*";return te.regexLiterals&&(tt+="(?!s*/)"),X.push([v,/^@[a-z_$][a-z_$@0-9]*/i,null],[E,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[v,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[y,new RegExp(tt),null]),se($,X)}var Te=we({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function de(te,$,X){for(var Y=/(?:^|\s)nocode(?:\s|$)/,ve=/\r\n?|\n/,ue=te.ownerDocument,Ee=ue.createElement("li");te.firstChild;)Ee.appendChild(te.firstChild);var Ke=[Ee];function Ye(Ce){var Qe=Ce.nodeType;if(Qe==1&&!Y.test(Ce.className))if(Ce.nodeName==="br")Je(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var st=Ce.firstChild;st;st=st.nextSibling)Ye(st);else if((Qe==3||Qe==4)&&X){var Ge=Ce.nodeValue,rt=Ge.match(ve);if(rt){var Re=Ge.substring(0,rt.index);Ce.nodeValue=Re;var Se=Ge.substring(rt.index+rt[0].length);if(Se){var De=Ce.parentNode;De.insertBefore(ue.createTextNode(Se),Ce.nextSibling)}Je(Ce),Re||Ce.parentNode.removeChild(Ce)}}}function Je(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Qe(rt,Re){var Se=Re?rt.cloneNode(!1):rt,De=rt.parentNode;if(De){var fe=Qe(De,1),ye=rt.nextSibling;fe.appendChild(Se);for(var _e=ye;_e;_e=ye)ye=_e.nextSibling,fe.appendChild(_e)}return Se}for(var st=Qe(Ce.nextSibling,0),Ge;(Ge=st.parentNode)&&Ge.nodeType===1;)st=Ge;Ke.push(st)}for(var tt=0;tt<Ke.length;++tt)Ye(Ke[tt]);$===($|0)&&Ke[0].setAttribute("value",$);var at=ue.createElement("ol");at.className="linenums";for(var lt=Math.max(0,$-1|0)||0,tt=0,je=Ke.length;tt<je;++tt)Ee=Ke[tt],Ee.className="L"+(tt+lt)%10,Ee.firstChild||Ee.appendChild(ue.createTextNode("\xA0")),at.appendChild(Ee);te.appendChild(at)}function xe(te){var $=/\bMSIE\s(\d+)/.exec(navigator.userAgent);$=$&&+$[1]<=8;var X=/\n/g,Y=te.sourceCode,ve=Y.length,ue=0,Ee=te.spans,Ke=Ee.length,Ye=0,Je=te.decorations,tt=Je.length,at=0;Je[tt]=ve;var lt,je;for(je=lt=0;je<tt;)Je[je]!==Je[je+2]?(Je[lt++]=Je[je++],Je[lt++]=Je[je++]):je+=2;for(tt=lt,je=lt=0;je<tt;){for(var Ce=Je[je],Qe=Je[je+1],st=je+2;st+2<=tt&&Je[st+1]===Qe;)st+=2;Je[lt++]=Ce,Je[lt++]=Qe,je=st}tt=Je.length=lt;var Ge=te.sourceNode,rt="";Ge&&(rt=Ge.style.display,Ge.style.display="none");try{for(var Re=null;Ye<Ke;){var Se=Ee[Ye],De=Ee[Ye+2]||ve,fe=Je[at+2]||ve,st=Math.min(De,fe),ye=Ee[Ye+1],_e;if(ye.nodeType!==1&&(_e=Y.substring(ue,st))){$&&(_e=_e.replace(X,"\r")),ye.nodeValue=_e;var Ae=ye.ownerDocument,We=Ae.createElement("span");We.className=Je[at+1];var Xe=ye.parentNode;Xe.replaceChild(We,ye),We.appendChild(ye),ue<De&&(Ee[Ye+1]=ye=Ae.createTextNode(Y.substring(st,De)),Xe.insertBefore(ye,We.nextSibling))}ue=st,ue>=De&&(Ye+=2),ue>=fe&&(at+=2)}}finally{Ge&&(Ge.style.display=rt)}}var pe={};function ne(te,$){for(var X=$.length;--X>=0;){var Y=$[X];pe.hasOwnProperty(Y)?d.console&&console.warn("cannot override language handler %s",Y):pe[Y]=te}}function ie(te,$){return te&&pe.hasOwnProperty(te)||(te=/^\s*</.test($)?"default-markup":"default-code"),pe[te]}ne(Te,["default-code"]),ne(se([],[[T,/^[^<?]+/],[N,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["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"]),ne(se([[T,/^[\s]+/,null,` \r
`],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[M,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[y,/^[=<>\/]+/],["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"]),ne(se([],[[H,/^[\s\S]+/]]),["uq.val"]),ne(we({keywords:_,hashComments:!0,cStyleComments:!0,types:x}),["c","cc","cpp","cxx","cyc","m"]),ne(we({keywords:"null,true,false"}),["json"]),ne(we({keywords:c,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:x}),["cs"]),ne(we({keywords:p,cStyleComments:!0}),["java"]),ne(we({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ne(we({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ne(we({keywords:b,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ne(we({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ne(we({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ne(we({keywords:m,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ne(se([],[[s,/^[\s\S]+/]]),["regex"]);function ee(te){var $=te.langExtension;try{var X=B(te.sourceNode,te.pre),Y=X.sourceCode;te.sourceCode=Y,te.spans=X.spans,te.basePos=0,ie($,Y)(te),xe(te)}catch(ve){d.console&&console.log(ve&&ve.stack||ve)}}function le(te,$,X){var Y=X||!1,ve=$||null,ue=document.createElement("div");ue.innerHTML="<pre>"+te+"</pre>",ue=ue.firstChild,Y&&de(ue,Y,!0);var Ee={langExtension:ve,numberLines:Y,sourceNode:ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ee(Ee),ue.innerHTML}function Q(te,$){var X=$||document.body,Y=X.ownerDocument||document;function ve(Se){return X.getElementsByTagName(Se)}for(var ue=[ve("pre"),ve("code"),ve("xmp")],Ee=[],Ke=0;Ke<ue.length;++Ke)for(var Ye=0,Je=ue[Ke].length;Ye<Je;++Ye)Ee.push(ue[Ke][Ye]);ue=null;var tt=Date;tt.now||(tt={now:function(){return+new Date}});var at=0,lt=/\blang(?:uage)?-([\w.]+)(?!\S)/,je=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,Qe=/pre|xmp/i,st=/^code$/i,Ge=/^(?:pre|code|xmp)$/i,rt={};function Re(){for(var Se=d.PR_SHOULD_USE_CONTINUATION?tt.now()+250:Infinity;at<Ee.length&&tt.now()<Se;at++){for(var De=Ee[at],fe=rt,ye=De;ye=ye.previousSibling;){var _e=ye.nodeType,Ae=(_e===7||_e===8)&&ye.nodeValue;if(Ae?!/^\??prettify\b/.test(Ae):_e!==3||/\S/.test(ye.nodeValue))break;if(Ae){fe={},Ae.replace(/\b(\w+)=([\w:.%+-]+)/g,function(dn,br,qr){fe[br]=qr});break}}var We=De.className;if((fe!==rt||je.test(We))&&!Ce.test(We)){for(var Xe=!1,ft=De.parentNode;ft;ft=ft.parentNode){var vt=ft.tagName;if(Ge.test(vt)&&ft.className&&je.test(ft.className)){Xe=!0;break}}if(!Xe){De.className+=" prettyprinted";var Kt=fe.lang;if(!Kt){Kt=We.match(lt);var kt;!Kt&&(kt=ae(De))&&st.test(kt.tagName)&&(Kt=kt.className.match(lt)),Kt&&(Kt=Kt[1])}var Or;if(Qe.test(De.tagName))Or=1;else{var pr=De.currentStyle,Et=Y.defaultView,Yr=pr?pr.whiteSpace:Et&&Et.getComputedStyle?Et.getComputedStyle(De,null).getPropertyValue("white-space"):0;Or=Yr&&Yr.substring(0,3)==="pre"}var kr=fe.linenums;(kr=kr==="true"||+kr)||(kr=We.match(/\blinenums\b(?::(\d+))?/),kr=kr?kr[1]&&kr[1].length?+kr[1]:!0:!1),kr&&de(De,kr,Or);var Ur={langExtension:Kt,sourceNode:De,numberLines:kr,pre:Or,sourceCode:null,basePos:null,spans:null,decorations:null};ee(Ur)}}}at<Ee.length?d.setTimeout(Re,250):typeof te=="function"&&te()}Re()}var Z=d.PR={createSimpleLexer:se,registerLangHandler:ne,sourceDecorator:we,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:H,PR_COMMENT:O,PR_DECLARATION:N,PR_KEYWORD:P,PR_LITERAL:v,PR_NOCODE:W,PR_PLAIN:T,PR_PUNCTUATION:y,PR_SOURCE:I,PR_STRING:s,PR_TAG:M,PR_TYPE:E,prettyPrintOne:C?d.prettyPrintOne=le:h=le,prettyPrint:w=C?d.prettyPrint=Q:w=Q},be=d.define;typeof be=="function"&&be.amd&&be("google-code-prettify",[],function(){return Z})})()},Sjjz:function(j,J,k){j.exports={flexRow:"flexRow___1u_bL",flexColumn:"flexColumn___1kaUk",formWrap:"formWrap___31wys",example:"example___Cqoob",footerWrap:"footerWrap___2syNI"}},UfjD:function(j,J,k){"use strict";var L=k("2qtc"),f=k("kLXV"),C=k("5NDa"),D=k("5rEg"),u=k("miYZ"),h=k("tsqr"),w=k("tJVT"),d=k("cDcd"),i=k.n(d),l=k("4i/N");function a(_){var p=_.isjoin,c=_.setJoin,m=_.JoinTeams,g=Object(d.useState)(""),b=Object(w.a)(g,2),n=b[0],o=b[1];return i.a.createElement(f.a,{centered:!0,title:i.a.createElement("div",{style:{alignItems:"center",display:"flex"}},i.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u52A0\u5165\u6218\u961F"),i.a.createElement(l.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:p,closable:!1,destroyOnClose:!0,onOk:function(){if(!n){h.b.info("\u9080\u8BF7\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}m(n)},onCancel:function(){return c(!1)}},i.a.createElement("div",null,i.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px",display:"flex",alignItems:"center"}},i.a.createElement("span",{style:{flex:"none"}},"\u9080\u8BF7\u7801\uFF1A")," ",i.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801",value:n,maxLength:60,addonAfter:String(n&&n.length||0)+"/60",onChange:function(S){return o(S.target.value)}}))))}J.a=a},"VrN/":function(j,J,k){(function(L,f){j.exports=f()})(this,function(){"use strict";var L=navigator.userAgent,f=navigator.platform,C=/gecko\/\d/i.test(L),D=/MSIE \d/.test(L),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L),h=/Edge\/(\d+)/.exec(L),w=D||u||h,d=w&&(D?document.documentMode||6:+(h||u)[1]),i=!h&&/WebKit\//.test(L),l=i&&/Qt\/\d+\.\d+/.test(L),a=!h&&/Chrome\//.test(L),_=/Opera\//.test(L),p=/Apple Computer/.test(navigator.vendor),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(L),m=/PhantomJS/.test(L),g=!h&&/AppleWebKit/.test(L)&&/Mobile\/\w+/.test(L),b=/Android/.test(L),n=g||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(L),o=g||/Mac/.test(f),t=/\bCrOS\b/.test(L),S=/win/i.test(f),x=_&&L.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(_=!1,i=!0);var s=o&&(l||_&&(x==null||x<12.11)),P=C||w&&d>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E=function(e,r){var R=e.className,A=O(r).exec(R);if(A){var F=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(F?A[1]+F:"")}};function v(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function y(e,r){return v(e).appendChild(r)}function T(e,r,R,A){var F=document.createElement(e);if(R&&(F.className=R),A&&(F.style.cssText=A),typeof r=="string")F.appendChild(document.createTextNode(r));else if(r)for(var V=0;V<r.length;++V)F.appendChild(r[V]);return F}function M(e,r,R,A){var F=T(e,r,R,A);return F.setAttribute("role","presentation"),F}var N;document.createRange?N=function(e,r,R,A){var F=document.createRange();return F.setEnd(A||e,R),F.setStart(e,r),F}:N=function(e,r,R){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(F){return A}return A.collapse(!0),A.moveEnd("character",R),A.moveStart("character",r),A};function I(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function G(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,r){var R=e.className;O(r).test(R)||(e.className+=(R?" ":"")+r)}function W(e,r){for(var R=e.split(" "),A=0;A<R.length;A++)R[A]&&!O(R[A]).test(r)&&(r+=" "+R[A]);return r}var z=function(e){e.select()};g?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(z=function(e){try{e.select()}catch(r){}});function U(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function B(e,r,R){r||(r={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!r.hasOwnProperty(A))&&(r[A]=e[A]);return r}function K(e,r,R,A,F){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var V=A||0,re=F||0;;){var oe=e.indexOf(" ",V);if(oe<0||oe>=r)return re+(r-V);re+=oe-V,re+=R-re%R,V=oe+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=R)};function ae(e,r){for(var R=0;R<e.length;++R)if(e[R]==r)return R;return-1}var se=50,we={toString:function(){return"CodeMirror.Pass"}},Te={scroll:!1},de={origin:"*mouse"},xe={origin:"+move"};function pe(e,r,R){for(var A=0,F=0;;){var V=e.indexOf(" ",A);V==-1&&(V=e.length);var re=V-A;if(V==e.length||F+re>=r)return A+Math.min(re,r-F);if(F+=V-A,F+=R-F%R,A=V+1,F>=r)return A}}var ne=[""];function ie(e){for(;ne.length<=e;)ne.push(ee(ne)+" ");return ne[e]}function ee(e){return e[e.length-1]}function le(e,r){for(var R=[],A=0;A<e.length;A++)R[A]=r(e[A],A);return R}function Q(e,r,R){for(var A=0,F=R(r);A<e.length&&R(e[A])<=F;)A++;e.splice(A,0,r)}function Z(){}function be(e,r){var R;return Object.create?R=Object.create(e):(Z.prototype=e,R=new Z),r&&B(r,R),R}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function $(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function X(e,r){return r?r.source.indexOf("\\w")>-1&&$(e)?!0:r.test(e):$(e)}function Y(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ve=/[\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 ue(e){return e.charCodeAt(0)>=768&&ve.test(e)}function Ee(e,r,R){for(;(R<0?r>0:r<e.length)&&ue(e.charAt(r));)r+=R;return r}function Ke(e,r,R){for(var A=r>R?-1:1;;){if(r==R)return r;var F=(r+R)/2,V=A<0?Math.ceil(F):Math.floor(F);if(V==r)return e(V)?r:R;e(V)?R=V:r=V+A}}function Ye(e,r,R,A){if(!e)return A(r,R,"ltr",0);for(var F=!1,V=0;V<e.length;++V){var re=e[V];(re.from<R&&re.to>r||r==R&&re.to==r)&&(A(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",V),F=!0)}F||A(r,R,"ltr")}var Je=null;function tt(e,r,R){var A;Je=null;for(var F=0;F<e.length;++F){var V=e[F];if(V.from<r&&V.to>r)return F;V.to==r&&(V.from!=V.to&&R=="before"?A=F:Je=F),V.from==r&&(V.from!=V.to&&R!="before"?A=F:Je=F)}return A!=null?A:Je}var at=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(me){return me<=247?e.charAt(me):1424<=me&&me<=1524?"R":1536<=me&&me<=1785?r.charAt(me-1536):1774<=me&&me<=2220?"r":8192<=me&&me<=8203?"w":me==8204?"b":"L"}var A=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,F=/[stwN]/,V=/[LRr]/,re=/[Lb1n]/,oe=/[1n]/;function ce(me,Ie,Be){this.level=me,this.from=Ie,this.to=Be}return function(me,Ie){var Be=Ie=="ltr"?"L":"R";if(me.length==0||Ie=="ltr"&&!A.test(me))return!1;for(var et=me.length,$e=[],mt=0;mt<et;++mt)$e.push(R(me.charCodeAt(mt)));for(var Tt=0,Ft=Be;Tt<et;++Tt){var Xt=$e[Tt];Xt=="m"?$e[Tt]=Ft:Ft=Xt}for(var rr=0,Vt=Be;rr<et;++rr){var lr=$e[rr];lr=="1"&&Vt=="r"?$e[rr]="n":V.test(lr)&&(Vt=lr,lr=="r"&&($e[rr]="R"))}for(var Rr=1,wr=$e[0];Rr<et-1;++Rr){var Qr=$e[Rr];Qr=="+"&&wr=="1"&&$e[Rr+1]=="1"?$e[Rr]="1":Qr==","&&wr==$e[Rr+1]&&(wr=="1"||wr=="n")&&($e[Rr]=wr),wr=Qr}for(var Pn=0;Pn<et;++Pn){var da=$e[Pn];if(da==",")$e[Pn]="N";else if(da=="%"){var Hn=void 0;for(Hn=Pn+1;Hn<et&&$e[Hn]=="%";++Hn);for(var za=Pn&&$e[Pn-1]=="!"||Hn<et&&$e[Hn]=="1"?"1":"N",ja=Pn;ja<Hn;++ja)$e[ja]=za;Pn=Hn-1}}for(var ra=0,Fa=Be;ra<et;++ra){var ga=$e[ra];Fa=="L"&&ga=="1"?$e[ra]="L":V.test(ga)&&(Fa=ga)}for(var sa=0;sa<et;++sa)if(F.test($e[sa])){var na=void 0;for(na=sa+1;na<et&&F.test($e[na]);++na);for(var $n=(sa?$e[sa-1]:Be)=="L",Ua=(na<et?$e[na]:Be)=="L",lo=$n==Ua?$n?"L":"R":Be,Ui=sa;Ui<na;++Ui)$e[Ui]=lo;sa=na-1}for(var _a=[],xi,fa=0;fa<et;)if(re.test($e[fa])){var ps=fa;for(++fa;fa<et&&re.test($e[fa]);++fa);_a.push(new ce(0,ps,fa))}else{var Di=fa,Gi=_a.length,Xi=Ie=="rtl"?1:0;for(++fa;fa<et&&$e[fa]!="L";++fa);for(var Ra=Di;Ra<fa;)if(oe.test($e[Ra])){Di<Ra&&(_a.splice(Gi,0,new ce(1,Di,Ra)),Gi+=Xi);var uo=Ra;for(++Ra;Ra<fa&&oe.test($e[Ra]);++Ra);_a.splice(Gi,0,new ce(2,uo,Ra)),Gi+=Xi,Di=Ra}else++Ra;Di<fa&&_a.splice(Gi,0,new ce(1,Di,fa))}return Ie=="ltr"&&(_a[0].level==1&&(xi=me.match(/^\s+/))&&(_a[0].from=xi[0].length,_a.unshift(new ce(0,0,xi[0].length))),ee(_a).level==1&&(xi=me.match(/\s+$/))&&(ee(_a).to-=xi[0].length,_a.push(new ce(0,et-xi[0].length,et)))),Ie=="rtl"?_a.reverse():_a}}();function lt(e,r){var R=e.order;return R==null&&(R=e.order=at(e.text,r)),R}var je=[],Ce=function(e,r,R){if(e.addEventListener)e.addEventListener(r,R,!1);else if(e.attachEvent)e.attachEvent("on"+r,R);else{var A=e._handlers||(e._handlers={});A[r]=(A[r]||je).concat(R)}};function Qe(e,r){return e._handlers&&e._handlers[r]||je}function st(e,r,R){if(e.removeEventListener)e.removeEventListener(r,R,!1);else if(e.detachEvent)e.detachEvent("on"+r,R);else{var A=e._handlers,F=A&&A[r];if(F){var V=ae(F,R);V>-1&&(A[r]=F.slice(0,V).concat(F.slice(V+1)))}}}function Ge(e,r){var R=Qe(e,r);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),F=0;F<R.length;++F)R[F].apply(null,A)}function rt(e,r,R){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),Ge(e,R||r.type,e,r),_e(r)||r.codemirrorIgnore}function Re(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<r.length;++A)ae(R,r[A])==-1&&R.push(r[A])}function Se(e,r){return Qe(e,r).length>0}function De(e){e.prototype.on=function(r,R){Ce(this,r,R)},e.prototype.off=function(r,R){st(this,r,R)}}function fe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ye(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ae(e){fe(e),ye(e)}function We(e){return e.target||e.srcElement}function Xe(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),o&&e.ctrlKey&&r==1&&(r=3),r}var ft=function(){if(w&&d<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),vt;function Kt(e){if(vt==null){var r=T("span","\u200B");y(e,T("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vt=r.offsetWidth<=1&&r.offsetHeight>2&&!(w&&d<8))}var R=vt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var kt;function Or(e){if(kt!=null)return kt;var r=y(e,document.createTextNode("A\u062EA")),R=N(r,0,1).getBoundingClientRect(),A=N(r,1,2).getBoundingClientRect();return v(e),!R||R.left==R.right?!1:kt=A.right-R.right<3}var pr=`
b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],A=e.length;r<=A;){var F=e.indexOf(`
`,r);F==-1&&(F=e.length);var V=e.slice(r,e.charAt(F-1)=="\r"?F-1:F),re=V.indexOf("\r");re!=-1?(R.push(V.slice(0,re)),r+=re+1):(R.push(V),r=F+1)}return R}:function(e){return e.split(/\r\n?|\n/)},Et=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Yr=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),kr=null;function Ur(e){if(kr!=null)return kr;var r=y(e,T("span","x")),R=r.getBoundingClientRect(),A=N(r,0,1).getBoundingClientRect();return kr=Math.abs(R.left-A.left)>1}var dn={},br={};function qr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),dn[e]=r}function Zr(e,r){br[e]=r}function Ar(e){if(typeof e=="string"&&br.hasOwnProperty(e))e=br[e];else if(e&&typeof e.name=="string"&&br.hasOwnProperty(e.name)){var r=br[e.name];typeof r=="string"&&(r={name:r}),e=be(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ar("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ar("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function fn(e,r){r=Ar(r);var R=dn[r.name];if(!R)return fn(e,"text/plain");var A=R(e,r);if(wn.hasOwnProperty(r.name)){var F=wn[r.name];for(var V in F){if(!F.hasOwnProperty(V))continue;A.hasOwnProperty(V)&&(A["_"+V]=A[V]),A[V]=F[V]}}if(A.name=r.name,r.helperType&&(A.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)A[re]=r.modeProps[re];return A}var wn={};function Kn(e,r){var R=wn.hasOwnProperty(e)?wn[e]:wn[e]={};B(r,R)}function nn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var A in r){var F=r[A];F instanceof Array&&(F=F.concat([])),R[A]=F}return R}function ya(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function Da(e,r,R){return e.startState?e.startState(r,R):!0}var pn=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};pn.prototype.eol=function(){return this.pos>=this.string.length},pn.prototype.sol=function(){return this.pos==this.lineStart},pn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},pn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},pn.prototype.eat=function(e){var r=this.string.charAt(this.pos),R;if(typeof e=="string"?R=r==e:R=r&&(e.test?e.test(r):e(r)),R)return++this.pos,r},pn.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},pn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},pn.prototype.skipToEnd=function(){this.pos=this.string.length},pn.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},pn.prototype.backUp=function(e){this.pos-=e},pn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=K(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},pn.prototype.indentation=function(){return K(this.string,null,this.tabSize)-(this.lineStart?K(this.string,this.lineStart,this.tabSize):0)},pn.prototype.match=function(e,r,R){if(typeof e=="string"){var A=function(re){return R?re.toLowerCase():re},F=this.string.substr(this.pos,e.length);if(A(F)==A(e))return r!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&r!==!1&&(this.pos+=V[0].length),V)}},pn.prototype.current=function(){return this.string.slice(this.start,this.pos)},pn.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},pn.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},pn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function qt(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var A=0;;++A){var F=R.children[A],V=F.chunkSize();if(r<V){R=F;break}r-=V}return R.lines[r]}function Yn(e,r,R){var A=[],F=r.line;return e.iter(r.line,R.line+1,function(V){var re=V.text;F==R.line&&(re=re.slice(0,R.ch)),F==r.line&&(re=re.slice(r.ch)),A.push(re),++F}),A}function ba(e,r,R){var A=[];return e.iter(r,R,function(F){A.push(F.text)}),A}function zn(e,r){var R=r-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function Gr(e){if(e.parent==null)return null;for(var r=e.parent,R=ae(r.lines,e),A=r.parent;A;r=A,A=A.parent)for(var F=0;!(A.children[F]==r);++F)R+=A.children[F].chunkSize();return R+r.first}function kn(e,r){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var F=e.children[A],V=F.height;if(r<V){e=F;continue e}r-=V,R+=F.chunkSize()}return R}while(!e.lines);for(var re=0;re<e.lines.length;++re){var oe=e.lines[re],ce=oe.height;if(r<ce)break;r-=ce}return R+re}function ha(e,r){return r>=e.first&&r<e.first+e.size}function la(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function St(e,r,R){if(R===void 0&&(R=null),!(this instanceof St))return new St(e,r,R);this.line=e,this.ch=r,this.sticky=R}function ir(e,r){return e.line-r.line||e.ch-r.ch}function Mt(e,r){return e.sticky==r.sticky&&ir(e,r)==0}function wa(e){return St(e.line,e.ch)}function Pa(e,r){return ir(e,r)<0?r:e}function pa(e,r){return ir(e,r)<0?e:r}function Ln(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function ur(e,r){if(r.line<e.first)return St(e.first,0);var R=e.first+e.size-1;return r.line>R?St(R,qt(e,R).text.length):ua(r,qt(e,r.line).text.length)}function ua(e,r){var R=e.ch;return R==null||R>r?St(e.line,r):R<0?St(e.line,0):e}function Gn(e,r){for(var R=[],A=0;A<r.length;A++)R[A]=ur(e,r[A]);return R}var On=function(e,r){this.state=e,this.lookAhead=r},Mn=function(e,r,R,A){this.state=r,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};Mn.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},Mn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Mn.fromSaved=function(e,r,R){return r instanceof On?new Mn(e,nn(e.mode,r.state),R,r.lookAhead):new Mn(e,nn(e.mode,r),R)},Mn.prototype.save=function(e){var r=e!==!1?nn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new On(r,this.maxLookAhead):r};function Ga(e,r,R,A){var F=[e.state.modeGen],V={};Qa(e,r.text,e.doc.mode,R,function(me,Ie){return F.push(me,Ie)},V,A);for(var re=R.state,oe=function(me){R.baseTokens=F;var Ie=e.state.overlays[me],Be=1,et=0;R.state=!0,Qa(e,r.text,Ie.mode,R,function($e,mt){for(var Tt=Be;et<$e;){var Ft=F[Be];Ft>$e&&F.splice(Be,1,$e,F[Be+1],Ft),Be+=2,et=Math.min($e,Ft)}if(!mt)return;if(Ie.opaque)F.splice(Tt,Be-Tt,$e,"overlay "+mt),Be=Tt+2;else for(;Tt<Be;Tt+=2){var Xt=F[Tt+1];F[Tt+1]=(Xt?Xt+" ":"")+"overlay "+mt}},V),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ce=0;ce<e.state.overlays.length;++ce)oe(ce);return{styles:F,classes:V.bgClass||V.textClass?V:null}}function La(e,r,R){if(!r.styles||r.styles[0]!=e.state.modeGen){var A=Un(e,Gr(r)),F=r.text.length>e.options.maxHighlightLength&&nn(e.doc.mode,A.state),V=Ga(e,r,A);F&&(A.state=F),r.stateAfter=A.save(!F),r.styles=V.styles,V.classes?r.styleClasses=V.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function Un(e,r,R){var A=e.doc,F=e.display;if(!A.mode.startState)return new Mn(A,!0,r);var V=qn(e,r,R),re=V>A.first&&qt(A,V-1).stateAfter,oe=re?Mn.fromSaved(A,re,V):new Mn(A,Da(A.mode),V);return A.iter(V,r,function(ce){Xa(e,ce.text,oe);var me=oe.line;ce.stateAfter=me==r-1||me%5==0||me>=F.viewFrom&&me<F.viewTo?oe.save():null,oe.nextLine()}),R&&(A.modeFrontier=oe.line),oe}function Xa(e,r,R,A){var F=e.doc.mode,V=new pn(r,e.options.tabSize,R);for(V.start=V.pos=A||0,r==""&&oi(F,R.state);!V.eol();)Ma(F,V,R.state),V.start=V.pos}function oi(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var R=ya(e,r);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function Ma(e,r,R,A){for(var F=0;F<10;F++){A&&(A[0]=ya(e,R).mode);var V=e.token(r,R);if(r.pos>r.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var mn=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function Nn(e,r,R,A){var F=e.doc,V=F.mode,re;r=ur(F,r);var oe=qt(F,r.line),ce=Un(e,r.line,R),me=new pn(oe.text,e.options.tabSize,ce),Ie;for(A&&(Ie=[]);(A||me.pos<r.ch)&&!me.eol();)me.start=me.pos,re=Ma(V,me,ce.state),A&&Ie.push(new mn(me,re,nn(F.mode,ce.state)));return A?Ie:new mn(me,re,ce.state)}function Ba(e,r){if(e)for(;;){var R=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!R)break;e=e.slice(0,R.index)+e.slice(R.index+R[0].length);var A=R[1]?"bgClass":"textClass";r[A]==null?r[A]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(r[A])||(r[A]+=" "+R[2])}return e}function Qa(e,r,R,A,F,V,re){var oe=R.flattenSpans;oe==null&&(oe=e.options.flattenSpans);var ce=0,me=null,Ie=new pn(r,e.options.tabSize,A),Be,et=e.options.addModeClass&&[null];for(r==""&&Ba(oi(R,A.state),V);!Ie.eol();){if(Ie.pos>e.options.maxHighlightLength?(oe=!1,re&&Xa(e,r,A,Ie.pos),Ie.pos=r.length,Be=null):Be=Ba(Ma(R,Ie,A.state,et),V),et){var $e=et[0].name;$e&&(Be="m-"+(Be?$e+" "+Be:$e))}if(!oe||me!=Be){for(;ce<Ie.start;)ce=Math.min(Ie.start,ce+5e3),F(ce,me);me=Be}Ie.start=Ie.pos}for(;ce<Ie.pos;){var mt=Math.min(Ie.pos,ce+5e3);F(mt,me),ce=mt}}function qn(e,r,R){for(var A,F,V=e.doc,re=R?-1:r-(e.doc.mode.innerMode?1e3:100),oe=r;oe>re;--oe){if(oe<=V.first)return V.first;var ce=qt(V,oe-1),me=ce.stateAfter;if(me&&(!R||oe+(me instanceof On?me.lookAhead:0)<=V.modeFrontier))return oe;var Ie=K(ce.text,null,e.options.tabSize);(F==null||A>Ie)&&(F=oe-1,A=Ie)}return F}function mi(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var R=e.first,A=r-1;A>R;A--){var F=qt(e,A).stateAfter;if(F&&(!(F instanceof On)||A+F.lookAhead<r)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var Za=!1,ea=!1;function vi(){Za=!0}function gi(){ea=!0}function Wa(e,r,R){this.marker=e,this.from=r,this.to=R}function Ea(e,r){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==r)return A}}function Pi(e,r){for(var R,A=0;A<e.length;++A)e[A]!=r&&(R||(R=[])).push(e[A]);return R}function qa(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Ha(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],re=V.marker,oe=V.from==null||(re.inclusiveLeft?V.from<=r:V.from<r);if(oe||V.from==r&&re.type=="bookmark"&&(!R||!V.marker.insertLeft)){var ce=V.to==null||(re.inclusiveRight?V.to>=r:V.to>r);(A||(A=[])).push(new Wa(re,V.from,ce?null:V.to))}}return A}function si(e,r,R){var A;if(e)for(var F=0;F<e.length;++F){var V=e[F],re=V.marker,oe=V.to==null||(re.inclusiveRight?V.to>=r:V.to>r);if(oe||V.from==r&&re.type=="bookmark"&&(!R||V.marker.insertLeft)){var ce=V.from==null||(re.inclusiveLeft?V.from<=r:V.from<r);(A||(A=[])).push(new Wa(re,ce?null:V.from-r,V.to==null?null:V.to-r))}}return A}function Ka(e,r){if(r.full)return null;var R=ha(e,r.from.line)&&qt(e,r.from.line).markedSpans,A=ha(e,r.to.line)&&qt(e,r.to.line).markedSpans;if(!R&&!A)return null;var F=r.from.ch,V=r.to.ch,re=ir(r.from,r.to)==0,oe=Ha(R,F,re),ce=si(A,V,re),me=r.text.length==1,Ie=ee(r.text).length+(me?F:0);if(oe)for(var Be=0;Be<oe.length;++Be){var et=oe[Be];if(et.to==null){var $e=Ea(ce,et.marker);$e?me&&(et.to=$e.to==null?null:$e.to+Ie):et.to=F}}if(ce)for(var mt=0;mt<ce.length;++mt){var Tt=ce[mt];if(Tt.to!=null&&(Tt.to+=Ie),Tt.from==null){var Ft=Ea(oe,Tt.marker);Ft||(Tt.from=Ie,me&&(oe||(oe=[])).push(Tt))}else Tt.from+=Ie,me&&(oe||(oe=[])).push(Tt)}oe&&(oe=aa(oe)),ce&&ce!=oe&&(ce=aa(ce));var Xt=[oe];if(!me){var rr=r.text.length-2,Vt;if(rr>0&&oe)for(var lr=0;lr<oe.length;++lr)oe[lr].to==null&&(Vt||(Vt=[])).push(new Wa(oe[lr].marker,null,null));for(var Rr=0;Rr<rr;++Rr)Xt.push(Vt);Xt.push(ce)}return Xt}function aa(e){for(var r=0;r<e.length;++r){var R=e[r];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function ei(e,r,R){var A=null;if(e.iter(r.line,R.line+1,function($e){if($e.markedSpans)for(var mt=0;mt<$e.markedSpans.length;++mt){var Tt=$e.markedSpans[mt].marker;Tt.readOnly&&(!A||ae(A,Tt)==-1)&&(A||(A=[])).push(Tt)}}),!A)return null;for(var F=[{from:r,to:R}],V=0;V<A.length;++V)for(var re=A[V],oe=re.find(0),ce=0;ce<F.length;++ce){var me=F[ce];if(ir(me.to,oe.from)<0||ir(me.from,oe.to)>0)continue;var Ie=[ce,1],Be=ir(me.from,oe.from),et=ir(me.to,oe.to);(Be<0||!re.inclusiveLeft&&!Be)&&Ie.push({from:me.from,to:oe.from}),(et>0||!re.inclusiveRight&&!et)&&Ie.push({from:oe.to,to:me.to}),F.splice.apply(F,Ie),ce+=Ie.length-3}return F}function li(e){var r=e.markedSpans;if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.detachLine(e);e.markedSpans=null}function pt(e,r){if(!r)return;for(var R=0;R<r.length;++R)r[R].marker.attachLine(e);e.markedSpans=r}function Ze(e){return e.inclusiveLeft?-1:0}function ht(e){return e.inclusiveRight?1:0}function gt(e,r){var R=e.lines.length-r.lines.length;if(R!=0)return R;var A=e.find(),F=r.find(),V=ir(A.from,F.from)||Ze(e)-Ze(r);if(V)return-V;var re=ir(A.to,F.to)||ht(e)-ht(r);return re||r.id-e.id}function Wt(e,r){var R=ea&&e.markedSpans,A;if(R)for(var F=void 0,V=0;V<R.length;++V)F=R[V],F.marker.collapsed&&(r?F.from:F.to)==null&&(!A||gt(A,F.marker)<0)&&(A=F.marker);return A}function At(e){return Wt(e,!0)}function Jt(e){return Wt(e,!1)}function Lt(e,r){var R=ea&&e.markedSpans,A;if(R)for(var F=0;F<R.length;++F){var V=R[F];V.marker.collapsed&&(V.from==null||V.from<r)&&(V.to==null||V.to>r)&&(!A||gt(A,V.marker)<0)&&(A=V.marker)}return A}function ct(e,r,R,A,F){var V=qt(e,r),re=ea&&V.markedSpans;if(re)for(var oe=0;oe<re.length;++oe){var ce=re[oe];if(!ce.marker.collapsed)continue;var me=ce.marker.find(0),Ie=ir(me.from,R)||Ze(ce.marker)-Ze(F),Be=ir(me.to,A)||ht(ce.marker)-ht(F);if(Ie>=0&&Be<=0||Ie<=0&&Be>=0)continue;if(Ie<=0&&(ce.marker.inclusiveRight&&F.inclusiveLeft?ir(me.to,R)>=0:ir(me.to,R)>0)||Ie>=0&&(ce.marker.inclusiveRight&&F.inclusiveLeft?ir(me.from,A)<=0:ir(me.from,A)<0))return!0}}function nt(e){for(var r;r=At(e);)e=r.find(-1,!0).line;return e}function it(e){for(var r;r=Jt(e);)e=r.find(1,!0).line;return e}function _t(e){for(var r,R;r=Jt(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Rt(e,r){var R=qt(e,r),A=nt(R);return R==A?r:Gr(A)}function Ct(e,r){if(r>e.lastLine())return r;var R=qt(e,r),A;if(!Ot(e,R))return r;for(;A=Jt(R);)R=A.find(1,!0).line;return Gr(R)+1}function Ot(e,r){var R=ea&&r.markedSpans;if(R)for(var A=void 0,F=0;F<R.length;++F){if(A=R[F],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&Pt(e,r,A))return!0}}function Pt(e,r,R){if(R.to==null){var A=R.marker.find(1,!0);return Pt(e,A.line,Ea(A.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==r.text.length)return!0;for(var F=void 0,V=0;V<r.markedSpans.length;++V)if(F=r.markedSpans[V],F.marker.collapsed&&!F.marker.widgetNode&&F.from==R.to&&(F.to==null||F.to!=R.from)&&(F.marker.inclusiveLeft||R.marker.inclusiveRight)&&Pt(e,r,F))return!0}function jt(e){e=nt(e);for(var r=0,R=e.parent,A=0;A<R.lines.length;++A){var F=R.lines[A];if(F==e)break;r+=F.height}for(var V=R.parent;V;R=V,V=R.parent)for(var re=0;re<V.children.length;++re){var oe=V.children[re];if(oe==R)break;r+=oe.height}return r}function Ve(e){if(e.height==0)return 0;for(var r=e.text.length,R,A=e;R=At(A);){var F=R.find(0,!0);A=F.from.line,r+=F.from.ch-F.to.ch}for(A=e;R=Jt(A);){var V=R.find(0,!0);r-=A.text.length-V.from.ch,A=V.to.line,r+=A.text.length-V.to.ch}return r}function nr(e){var r=e.display,R=e.doc;r.maxLine=qt(R,R.first),r.maxLineLength=Ve(r.maxLine),r.maxLineChanged=!0,R.iter(function(A){var F=Ve(A);F>r.maxLineLength&&(r.maxLineLength=F,r.maxLine=A)})}var Yt=function(e,r,R){this.text=e,pt(this,r),this.height=R?R(this):1};Yt.prototype.lineNo=function(){return Gr(this)},De(Yt);function Qt(e,r,R,A){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),li(e),pt(e,R);var F=A?A(e):1;F!=e.height&&zn(e,F)}function It(e){e.parent=null,li(e)}var zt={},Ut={};function Ht(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?Ut:zt;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function xr(e,r){var R=M("span",null,null,i?"padding-right: .1px":null),A={pre:M("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var F=0;F<=(r.rest?r.rest.length:0);F++){var V=F?r.rest[F-1]:r.line,re=void 0;A.pos=0,A.addToken=Dr,Or(e.display.measure)&&(re=lt(V,e.doc.direction))&&(A.addToken=Wr(A.addToken,re)),A.map=[];var oe=r!=e.display.externalMeasured&&Gr(V);qe(V,A,La(e,V,oe)),V.styleClasses&&(V.styleClasses.bgClass&&(A.bgClass=W(V.styleClasses.bgClass,A.bgClass||"")),V.styleClasses.textClass&&(A.textClass=W(V.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(Kt(e.display.measure))),F==0?(r.measure.map=A.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(A.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(i){var ce=A.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ge(e,"renderLine",e,r.line,A.pre),A.pre.className&&(A.textClass=W(A.pre.className,A.textClass||"")),A}function Nr(e){var r=T("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Dr(e,r,R,A,F,V,re){if(!r)return;var oe=e.splitSpaces?Br(r,e.trailingSpace):r,ce=e.cm.state.specialChars,me=!1,Ie;if(!ce.test(r))e.col+=r.length,Ie=document.createTextNode(oe),e.map.push(e.pos,e.pos+r.length,Ie),w&&d<9&&(me=!0),e.pos+=r.length;else{Ie=document.createDocumentFragment();for(var Be=0;;){ce.lastIndex=Be;var et=ce.exec(r),$e=et?et.index-Be:r.length-Be;if($e){var mt=document.createTextNode(oe.slice(Be,Be+$e));w&&d<9?Ie.appendChild(T("span",[mt])):Ie.appendChild(mt),e.map.push(e.pos,e.pos+$e,mt),e.col+=$e,e.pos+=$e}if(!et)break;Be+=$e+1;var Tt=void 0;if(et[0]==" "){var Ft=e.cm.options.tabSize,Xt=Ft-e.col%Ft;Tt=Ie.appendChild(T("span",ie(Xt),"cm-tab")),Tt.setAttribute("role","presentation"),Tt.setAttribute("cm-text"," "),e.col+=Xt}else et[0]=="\r"||et[0]==`
`?(Tt=Ie.appendChild(T("span",et[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Tt.setAttribute("cm-text",et[0]),e.col+=1):(Tt=e.cm.options.specialCharPlaceholder(et[0]),Tt.setAttribute("cm-text",et[0]),w&&d<9?Ie.appendChild(T("span",[Tt])):Ie.appendChild(Tt),e.col+=1);e.map.push(e.pos,e.pos+1,Tt),e.pos++}}if(e.trailingSpace=oe.charCodeAt(r.length-1)==32,R||A||F||me||V||re){var rr=R||"";A&&(rr+=A),F&&(rr+=F);var Vt=T("span",[Ie],rr,V);if(re)for(var lr in re)re.hasOwnProperty(lr)&&lr!="style"&&lr!="class"&&Vt.setAttribute(lr,re[lr]);return e.content.appendChild(Vt)}e.content.appendChild(Ie)}function Br(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,A="",F=0;F<e.length;F++){var V=e.charAt(F);V==" "&&R&&(F==e.length-1||e.charCodeAt(F+1)==32)&&(V="\xA0"),A+=V,R=V==" "}return A}function Wr(e,r){return function(R,A,F,V,re,oe,ce){F=F?F+" cm-force-border":"cm-force-border";for(var me=R.pos,Ie=me+A.length;;){for(var Be=void 0,et=0;et<r.length&&!(Be=r[et],Be.to>me&&Be.from<=me);et++);if(Be.to>=Ie)return e(R,A,F,V,re,oe,ce);e(R,A.slice(0,Be.to-me),F,V,null,oe,ce),V=null,A=A.slice(Be.to-me),me=Be.to}}}function on(e,r,R,A){var F=!A&&R.widgetNode;F&&e.map.push(e.pos,e.pos+r,F),!A&&e.cm.display.input.needsContentAttribute&&(F||(F=e.content.appendChild(document.createElement("span"))),F.setAttribute("cm-marker",R.id)),F&&(e.cm.display.input.setUneditable(F),e.content.appendChild(F)),e.pos+=r,e.trailingSpace=!1}function qe(e,r,R){var A=e.markedSpans,F=e.text,V=0;if(!A){for(var re=1;re<R.length;re+=2)r.addToken(r,F.slice(V,V=R[re]),Ht(R[re+1],r.cm.options));return}for(var oe=F.length,ce=0,me=1,Ie="",Be,et,$e=0,mt,Tt,Ft,Xt,rr;;){if($e==ce){mt=Tt=Ft=et="",rr=null,Xt=null,$e=Infinity;for(var Vt=[],lr=void 0,Rr=0;Rr<A.length;++Rr){var wr=A[Rr],Qr=wr.marker;if(Qr.type=="bookmark"&&wr.from==ce&&Qr.widgetNode)Vt.push(Qr);else if(wr.from<=ce&&(wr.to==null||wr.to>ce||Qr.collapsed&&wr.to==ce&&wr.from==ce)){if(wr.to!=null&&wr.to!=ce&&$e>wr.to&&($e=wr.to,Tt=""),Qr.className&&(mt+=" "+Qr.className),Qr.css&&(et=(et?et+";":"")+Qr.css),Qr.startStyle&&wr.from==ce&&(Ft+=" "+Qr.startStyle),Qr.endStyle&&wr.to==$e&&(lr||(lr=[])).push(Qr.endStyle,wr.to),Qr.title&&((rr||(rr={})).title=Qr.title),Qr.attributes)for(var Pn in Qr.attributes)(rr||(rr={}))[Pn]=Qr.attributes[Pn];Qr.collapsed&&(!Xt||gt(Xt.marker,Qr)<0)&&(Xt=wr)}else wr.from>ce&&$e>wr.from&&($e=wr.from)}if(lr)for(var da=0;da<lr.length;da+=2)lr[da+1]==$e&&(Tt+=" "+lr[da]);if(!Xt||Xt.from==ce)for(var Hn=0;Hn<Vt.length;++Hn)on(r,0,Vt[Hn]);if(Xt&&(Xt.from||0)==ce){if(on(r,(Xt.to==null?oe+1:Xt.to)-ce,Xt.marker,Xt.from==null),Xt.to==null)return;Xt.to==ce&&(Xt=!1)}}if(ce>=oe)break;for(var za=Math.min(oe,$e);;){if(Ie){var ja=ce+Ie.length;if(!Xt){var ra=ja>za?Ie.slice(0,za-ce):Ie;r.addToken(r,ra,Be?Be+mt:mt,Ft,ce+ra.length==$e?Tt:"",et,rr)}if(ja>=za){Ie=Ie.slice(za-ce),ce=za;break}ce=ja,Ft=""}Ie=F.slice(V,V=R[me++]),Be=Ht(R[me++],r.cm.options)}}}function er(e,r,R){this.line=r,this.rest=_t(r),this.size=this.rest?Gr(ee(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Ot(e,r)}function sn(e,r,R){for(var A=[],F,V=r;V<R;V=F){var re=new er(e.doc,qt(e.doc,V),V);F=V+re.size,A.push(re)}return A}var en=null;function mr(e){en?en.ops.push(e):e.ownsGroup=en={ops:[e],delayedCallbacks:[]}}function dr(e){var r=e.delayedCallbacks,R=0;do{for(;R<r.length;R++)r[R].call(null);for(var A=0;A<e.ops.length;A++){var F=e.ops[A];if(F.cursorActivityHandlers)for(;F.cursorActivityCalled<F.cursorActivityHandlers.length;)F.cursorActivityHandlers[F.cursorActivityCalled++].call(null,F.cm)}}while(R<r.length)}function vr(e,r){var R=e.ownsGroup;if(!R)return;try{dr(R)}finally{en=null,r(R)}}var wt=null;function Bt(e,r){var R=Qe(e,r);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),F;en?F=en.delayedCallbacks:wt?F=wt:(F=wt=[],setTimeout(tr,0));for(var V=function(oe){F.push(function(){return R[oe].apply(null,A)})},re=0;re<R.length;++re)V(re)}function tr(){var e=wt;wt=null;for(var r=0;r<e.length;++r)e[r]()}function Gt(e,r,R,A){for(var F=0;F<r.changes.length;F++){var V=r.changes[F];V=="text"?bt(e,r):V=="gutter"?jr(e,r,R,A):V=="class"?fr(e,r):V=="widget"&&Hr(e,r,A)}r.changes=null}function ut(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&d<8&&(e.node.style.zIndex=2)),e.node}function dt(e,r){var R=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),r.background)R?r.background.className=R:(r.background.parentNode.removeChild(r.background),r.background=null);else if(R){var A=ut(r);r.background=A.insertBefore(T("div",null,R),A.firstChild),e.display.input.setUneditable(r.background)}}function Dt(e,r){var R=e.display.externalMeasured;return R&&R.line==r.line?(e.display.externalMeasured=null,r.measure=R.measure,R.built):xr(e,r)}function bt(e,r){var R=r.text.className,A=Dt(e,r);r.text==r.node&&(r.node=A.pre),r.text.parentNode.replaceChild(A.pre,r.text),r.text=A.pre,A.bgClass!=r.bgClass||A.textClass!=r.textClass?(r.bgClass=A.bgClass,r.textClass=A.textClass,fr(e,r)):R&&(r.text.className=R)}function fr(e,r){dt(e,r),r.line.wrapClass?ut(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var R=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=R||""}function jr(e,r,R,A){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var F=ut(r);r.gutterBackground=T("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),F.insertBefore(r.gutterBackground,r.text)}var V=r.line.gutterMarkers;if(e.options.lineNumbers||V){var re=ut(r),oe=r.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(oe),re.insertBefore(oe,r.text),r.line.gutterClass&&(oe.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(r.lineNumber=oe.appendChild(T("div",la(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var me=e.display.gutterSpecs[ce].className,Ie=V.hasOwnProperty(me)&&V[me];Ie&&oe.appendChild(T("div",[Ie],"CodeMirror-gutter-elt","left: "+A.gutterLeft[me]+"px; width: "+A.gutterWidth[me]+"px"))}}}function Hr(e,r,R){r.alignable&&(r.alignable=null);for(var A=O("CodeMirror-linewidget"),F=r.node.firstChild,V=void 0;F;F=V)V=F.nextSibling,A.test(F.className)&&r.node.removeChild(F);Lr(e,r,R)}function cr(e,r,R,A){var F=Dt(e,r);return r.text=r.node=F.pre,F.bgClass&&(r.bgClass=F.bgClass),F.textClass&&(r.textClass=F.textClass),fr(e,r),jr(e,r,R,A),Lr(e,r,A),r.node}function Lr(e,r,R){if(yr(e,r.line,r,R,!0),r.rest)for(var A=0;A<r.rest.length;A++)yr(e,r.rest[A],r,R,!1)}function yr(e,r,R,A,F){if(!r.widgets)return;for(var V=ut(R),re=0,oe=r.widgets;re<oe.length;++re){var ce=oe[re],me=T("div",[ce.node],"CodeMirror-linewidget"+(ce.className?" "+ce.className:""));ce.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),Xr(ce,me,R,A),e.display.input.setUneditable(me),F&&ce.above?V.insertBefore(me,R.gutter||R.text):V.appendChild(me),Bt(ce,"redraw")}}function Xr(e,r,R,A){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(r);var F=A.wrapperWidth;r.style.left=A.fixedPos+"px",e.coverGutter||(F-=A.gutterTotalWidth,r.style.paddingLeft=A.gutterTotalWidth+"px"),r.style.width=F+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-A.gutterTotalWidth+"px"))}function Tr(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!I(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+r.display.wrapper.clientWidth+"px;"),y(r.display.measure,T("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function Vr(e,r){for(var R=We(r);R!=e.wrapper;R=R.parentNode)if(!R||R.nodeType==1&&R.getAttribute("cm-ignore-events")=="true"||R.parentNode==e.sizer&&R!=e.mover)return!0}function In(e){return e.lineSpace.offsetTop}function Pe(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Fe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=y(e.measure,T("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,A={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function He(e){return se-e.display.nativeBarWidth}function Me(e){return e.display.scroller.clientWidth-He(e)-e.display.barWidth}function he(e){return e.display.scroller.clientHeight-He(e)-e.display.barHeight}function Oe(e,r,R){var A=e.options.lineWrapping,F=A&&Me(e);if(!r.measure.heights||A&&r.measure.width!=F){var V=r.measure.heights=[];if(A){r.measure.width=F;for(var re=r.text.firstChild.getClientRects(),oe=0;oe<re.length-1;oe++){var ce=re[oe],me=re[oe+1];Math.abs(ce.bottom-me.bottom)>2&&V.push((ce.bottom+me.top)/2-R.top)}}V.push(R.bottom-R.top)}}function ge(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==r)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var F=0;F<e.rest.length;F++)if(Gr(e.rest[F])>R)return{map:e.measure.maps[F],cache:e.measure.caches[F],before:!0}}function Le(e,r){r=nt(r);var R=Gr(r),A=e.display.externalMeasured=new er(e.doc,r,R);A.lineN=R;var F=A.built=xr(e,A);return A.text=F.pre,y(e.display.lineMeasure,F.pre),A}function Ne(e,r,R,A){return ze(e,ke(e,r),R,A)}function Ue(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[xn(e,r)];var R=e.display.externalMeasured;if(R&&r>=R.lineN&&r<R.lineN+R.size)return R}function ke(e,r){var R=Gr(r),A=Ue(e,R);A&&!A.text?A=null:A&&A.changes&&(Gt(e,A,R,Rn(e)),e.curOp.forceUpdate=!0),A||(A=Le(e,r));var F=ge(A,r,R);return{line:r,view:A,rect:null,map:F.map,cache:F.cache,before:F.before,hasHeights:!1}}function ze(e,r,R,A,F){r.before&&(R=-1);var V=R+(A||""),re;return r.cache.hasOwnProperty(V)?re=r.cache[V]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Oe(e,r.view,r.rect),r.hasHeights=!0),re=Nt(e,r,R,A),re.bogus||(r.cache[V]=re)),{left:re.left,right:re.right,top:F?re.rtop:re.top,bottom:F?re.rbottom:re.bottom}}var ot={left:0,right:0,top:0,bottom:0};function yt(e,r,R){for(var A,F,V,re,oe,ce,me=0;me<e.length;me+=3)if(oe=e[me],ce=e[me+1],r<oe?(F=0,V=1,re="left"):r<ce?(F=r-oe,V=F+1):(me==e.length-3||r==ce&&e[me+3]>r)&&(V=ce-oe,F=V-1,r>=ce&&(re="right")),F!=null){if(A=e[me+2],oe==ce&&R==(A.insertLeft?"left":"right")&&(re=R),R=="left"&&F==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)A=e[(me-=3)+2],re="left";if(R=="right"&&F==ce-oe)for(;me<e.length-3&&e[me+3]==e[me+4]&&!e[me+5].insertLeft;)A=e[(me+=3)+2],re="right";break}return{node:A,start:F,end:V,collapse:re,coverStart:oe,coverEnd:ce}}function xt(e,r){var R=ot;if(r=="left")for(var A=0;A<e.length&&!((R=e[A]).left!=R.right);A++);else for(var F=e.length-1;F>=0&&!((R=e[F]).left!=R.right);F--);return R}function Nt(e,r,R,A){var F=yt(r.map,R,A),V=F.node,re=F.start,oe=F.end,ce=F.collapse,me;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;re&&ue(r.line.text.charAt(F.coverStart+re));)--re;for(;F.coverStart+oe<F.coverEnd&&ue(r.line.text.charAt(F.coverStart+oe));)++oe;if(w&&d<9&&re==0&&oe==F.coverEnd-F.coverStart?me=V.parentNode.getBoundingClientRect():me=xt(N(V,re,oe).getClientRects(),A),me.left||me.right||re==0)break;oe=re,re=re-1,ce="right"}w&&d<11&&(me=hr(e.display.measure,me))}else{re>0&&(ce=A="right");var Be;e.options.lineWrapping&&(Be=V.getClientRects()).length>1?me=Be[A=="right"?Be.length-1:0]:me=V.getBoundingClientRect()}if(w&&d<9&&!re&&(!me||!me.left&&!me.right)){var et=V.parentNode.getClientRects()[0];et?me={left:et.left,right:et.left+Xn(e.display),top:et.top,bottom:et.bottom}:me=ot}for(var $e=me.top-r.rect.top,mt=me.bottom-r.rect.top,Tt=($e+mt)/2,Ft=r.view.measure.heights,Xt=0;Xt<Ft.length-1&&!(Tt<Ft[Xt]);Xt++);var rr=Xt?Ft[Xt-1]:0,Vt=Ft[Xt],lr={left:(ce=="right"?me.right:me.left)-r.rect.left,right:(ce=="left"?me.left:me.right)-r.rect.left,top:rr,bottom:Vt};return!me.left&&!me.right&&(lr.bogus=!0),e.options.singleCursorHeightPerLine||(lr.rtop=$e,lr.rbottom=mt),lr}function hr(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ur(e))return r;var R=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*R,right:r.right*R,top:r.top*A,bottom:r.bottom*A}}function Cr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function Sr(e){e.display.externalMeasure=null,v(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Cr(e.display.view[r])}function Pr(e){Sr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function _r(){return a&&b?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Mr(){return a&&b?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ir(e){var r=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(r+=Tr(e.widgets[R]));return r}function Jr(e,r,R,A,F){if(!F){var V=Ir(r);R.top+=V,R.bottom+=V}if(A=="line")return R;A||(A="local");var re=jt(r);if(A=="local"?re+=In(e.display):re-=e.display.viewOffset,A=="page"||A=="window"){var oe=e.display.lineSpace.getBoundingClientRect();re+=oe.top+(A=="window"?0:Mr());var ce=oe.left+(A=="window"?0:_r());R.left+=ce,R.right+=ce}return R.top+=re,R.bottom+=re,R}function Kr(e,r,R){if(R=="div")return r;var A=r.left,F=r.top;if(R=="page")A-=_r(),F-=Mr();else if(R=="local"||!R){var V=e.display.sizer.getBoundingClientRect();A+=V.left,F+=V.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:A-re.left,top:F-re.top}}function gn(e,r,R,A,F){return A||(A=qt(e.doc,r.line)),Jr(e,A,Ne(e,A,r.ch,F),R)}function zr(e,r,R,A,F,V){A=A||qt(e.doc,r.line),F||(F=ke(e,A));function re(mt,Tt){var Ft=ze(e,F,mt,Tt?"right":"left",V);return Tt?Ft.left=Ft.right:Ft.right=Ft.left,Jr(e,A,Ft,R)}var oe=lt(A,e.doc.direction),ce=r.ch,me=r.sticky;if(ce>=A.text.length?(ce=A.text.length,me="before"):ce<=0&&(ce=0,me="after"),!oe)return re(me=="before"?ce-1:ce,me=="before");function Ie(mt,Tt,Ft){var Xt=oe[Tt],rr=Xt.level==1;return re(Ft?mt-1:mt,rr!=Ft)}var Be=tt(oe,ce,me),et=Je,$e=Ie(ce,Be,me=="before");return et!=null&&($e.other=Ie(ce,et,me!="before")),$e}function gr(e,r){var R=0;r=ur(e.doc,r),e.options.lineWrapping||(R=Xn(e.display)*r.ch);var A=qt(e.doc,r.line),F=jt(A)+In(e.display);return{left:R,right:R,top:F,bottom:F+A.height}}function Er(e,r,R,A,F){var V=St(e,r,R);return V.xRel=F,A&&(V.outside=A),V}function Fr(e,r,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Er(A.first,0,null,-1,-1);var F=kn(A,R),V=A.first+A.size-1;if(F>V)return Er(A.first+A.size-1,qt(A,V).text.length,null,1,1);r<0&&(r=0);for(var re=qt(A,F);;){var oe=An(e,re,F,r,R),ce=Lt(re,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!ce)return oe;var me=ce.find(1);if(me.line==F)return me;re=qt(A,F=me.line)}}function $r(e,r,R,A){A-=Ir(r);var F=r.text.length,V=Ke(function(re){return ze(e,R,re-1).bottom<=A},F,0);return F=Ke(function(re){return ze(e,R,re).top>A},V,F),{begin:V,end:F}}function or(e,r,R,A){R||(R=ke(e,r));var F=Jr(e,r,ze(e,R,A),"line").top;return $r(e,r,R,F)}function tn(e,r,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>r}function An(e,r,R,A,F){F-=jt(r);var V=ke(e,r),re=Ir(r),oe=0,ce=r.text.length,me=!0,Ie=lt(r,e.doc.direction);if(Ie){var Be=(e.options.lineWrapping?En:ln)(e,r,R,V,Ie,A,F);me=Be.level!=1,oe=me?Be.from:Be.to-1,ce=me?Be.to:Be.from-1}var et=null,$e=null,mt=Ke(function(Rr){var wr=ze(e,V,Rr);return wr.top+=re,wr.bottom+=re,tn(wr,A,F,!1)?(wr.top<=F&&wr.left<=A&&(et=Rr,$e=wr),!0):!1},oe,ce),Tt,Ft,Xt=!1;if($e){var rr=A-$e.left<$e.right-A,Vt=rr==me;mt=et+(Vt?0:1),Ft=Vt?"after":"before",Tt=rr?$e.left:$e.right}else{!me&&(mt==ce||mt==oe)&&mt++,Ft=mt==0?"after":mt==r.text.length?"before":ze(e,V,mt-(me?1:0)).bottom+re<=F==me?"after":"before";var lr=zr(e,St(R,mt,Ft),"line",r,V);Tt=lr.left,Xt=F<lr.top?-1:F>=lr.bottom?1:0}return mt=Ee(r.text,mt,1),Er(R,mt,Ft,Xt,A-Tt)}function ln(e,r,R,A,F,V,re){var oe=Ke(function(Be){var et=F[Be],$e=et.level!=1;return tn(zr(e,St(R,$e?et.to:et.from,$e?"before":"after"),"line",r,A),V,re,!0)},0,F.length-1),ce=F[oe];if(oe>0){var me=ce.level!=1,Ie=zr(e,St(R,me?ce.from:ce.to,me?"after":"before"),"line",r,A);tn(Ie,V,re,!0)&&Ie.top>re&&(ce=F[oe-1])}return ce}function En(e,r,R,A,F,V,re){var oe=$r(e,r,A,re),ce=oe.begin,me=oe.end;/\s/.test(r.text.charAt(me-1))&&me--;for(var Ie=null,Be=null,et=0;et<F.length;et++){var $e=F[et];if($e.from>=me||$e.to<=ce)continue;var mt=$e.level!=1,Tt=ze(e,A,mt?Math.min(me,$e.to)-1:Math.max(ce,$e.from)).right,Ft=Tt<V?V-Tt+1e9:Tt-V;(!Ie||Be>Ft)&&(Ie=$e,Be=Ft)}return Ie||(Ie=F[F.length-1]),Ie.from<ce&&(Ie={from:ce,to:Ie.to,level:Ie.level}),Ie.to>me&&(Ie={from:Ie.from,to:me,level:Ie.level}),Ie}var un;function jn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(un==null){un=T("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)un.appendChild(document.createTextNode("x")),un.appendChild(T("br"));un.appendChild(document.createTextNode("x"))}y(e.measure,un);var R=un.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),v(e.measure),R||1}function Xn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=T("span","xxxxxxxxxx"),R=T("pre",[r],"CodeMirror-line-like");y(e.measure,R);var A=r.getBoundingClientRect(),F=(A.right-A.left)/10;return F>2&&(e.cachedCharWidth=F),F||10}function Rn(e){for(var r=e.display,R={},A={},F=r.gutters.clientLeft,V=r.gutters.firstChild,re=0;V;V=V.nextSibling,++re){var oe=e.display.gutterSpecs[re].className;R[oe]=V.offsetLeft+V.clientLeft+F,A[oe]=V.clientWidth}return{fixedPos:ta(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:r.wrapper.clientWidth}}function ta(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ia(e){var r=jn(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/Xn(e.display)-3);return function(F){if(Ot(e.doc,F))return 0;var V=0;if(F.widgets)for(var re=0;re<F.widgets.length;re++)F.widgets[re].height&&(V+=F.widgets[re].height);return R?V+(Math.ceil(F.text.length/A)||1)*r:V+r}}function ca(e){var r=e.doc,R=Ia(e);r.iter(function(A){var F=R(A);F!=A.height&&zn(A,F)})}function Vn(e,r,R,A){var F=e.display;if(!R&&We(r).getAttribute("cm-not-content")=="true")return null;var V,re,oe=F.lineSpace.getBoundingClientRect();try{V=r.clientX-oe.left,re=r.clientY-oe.top}catch(Be){return null}var ce=Fr(e,V,re),me;if(A&&ce.xRel>0&&(me=qt(e.doc,ce.line).text).length==ce.ch){var Ie=K(me,me.length,e.options.tabSize)-me.length;ce=St(ce.line,Math.max(0,Math.round((V-Fe(e.display).left)/Xn(e.display))-Ie))}return ce}function xn(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,A=0;A<R.length;A++)if(r-=R[A].size,r<0)return A}function _n(e,r,R,A){r==null&&(r=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),A||(A=0);var F=e.display;if(A&&R<F.viewTo&&(F.updateLineNumbers==null||F.updateLineNumbers>r)&&(F.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=F.viewTo)ea&&Rt(e.doc,r)<F.viewTo&&Cn(e);else if(R<=F.viewFrom)ea&&Ct(e.doc,R+A)>F.viewFrom?Cn(e):(F.viewFrom+=A,F.viewTo+=A);else if(r<=F.viewFrom&&R>=F.viewTo)Cn(e);else if(r<=F.viewFrom){var V=Bn(e,R,R+A,1);V?(F.view=F.view.slice(V.index),F.viewFrom=V.lineN,F.viewTo+=A):Cn(e)}else if(R>=F.viewTo){var re=Bn(e,r,r,-1);re?(F.view=F.view.slice(0,re.index),F.viewTo=re.lineN):Cn(e)}else{var oe=Bn(e,r,r,-1),ce=Bn(e,R,R+A,1);oe&&ce?(F.view=F.view.slice(0,oe.index).concat(sn(e,oe.lineN,ce.lineN)).concat(F.view.slice(ce.index)),F.viewTo+=A):Cn(e)}var me=F.externalMeasured;me&&(R<me.lineN?me.lineN+=A:r<me.lineN+me.size&&(F.externalMeasured=null))}function Dn(e,r,R){e.curOp.viewChanged=!0;var A=e.display,F=e.display.externalMeasured;if(F&&r>=F.lineN&&r<F.lineN+F.size&&(A.externalMeasured=null),r<A.viewFrom||r>=A.viewTo)return;var V=A.view[xn(e,r)];if(V.node==null)return;var re=V.changes||(V.changes=[]);ae(re,R)==-1&&re.push(R)}function Cn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bn(e,r,R,A){var F=xn(e,r),V,re=e.display.view;if(!ea||R==e.doc.first+e.doc.size)return{index:F,lineN:R};for(var oe=e.display.viewFrom,ce=0;ce<F;ce++)oe+=re[ce].size;if(oe!=r){if(A>0){if(F==re.length-1)return null;V=oe+re[F].size-r,F++}else V=oe-r;r+=V,R+=V}for(;Rt(e.doc,R)!=R;){if(F==(A<0?0:re.length-1))return null;R+=A*re[F-(A<0?1:0)].size,F+=A}return{index:F,lineN:R}}function ma(e,r,R){var A=e.display,F=A.view;F.length==0||r>=A.viewTo||R<=A.viewFrom?(A.view=sn(e,r,R),A.viewFrom=r):(A.viewFrom>r?A.view=sn(e,r,A.viewFrom).concat(A.view):A.viewFrom<r&&(A.view=A.view.slice(xn(e,r))),A.viewFrom=r,A.viewTo<R?A.view=A.view.concat(sn(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,xn(e,R)))),A.viewTo=R}function Va(e){for(var r=e.display.view,R=0,A=0;A<r.length;A++){var F=r[A];!F.hidden&&(!F.node||F.changes)&&++R}return R}function hn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ta(e,r){r===void 0&&(r=!0);for(var R=e.doc,A={},F=A.cursors=document.createDocumentFragment(),V=A.selection=document.createDocumentFragment(),re=0;re<R.sel.ranges.length;re++){if(!r&&re==R.sel.primIndex)continue;var oe=R.sel.ranges[re];if(oe.from().line>=e.display.viewTo||oe.to().line<e.display.viewFrom)continue;var ce=oe.empty();(ce||e.options.showCursorWhenSelecting)&&Sa(e,oe.head,F),ce||cn(e,oe,V)}return A}function Sa(e,r,R){var A=zr(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),F=R.appendChild(T("div","\xA0","CodeMirror-cursor"));if(F.style.left=A.left+"px",F.style.top=A.top+"px",F.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var V=R.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=A.other.left+"px",V.style.top=A.other.top+"px",V.style.height=(A.other.bottom-A.other.top)*.85+"px"}}function yn(e,r){return e.top-r.top||e.left-r.left}function cn(e,r,R){var A=e.display,F=e.doc,V=document.createDocumentFragment(),re=Fe(e.display),oe=re.left,ce=Math.max(A.sizerWidth,Me(e)-A.sizer.offsetLeft)-re.right,me=F.direction=="ltr";function Ie(Vt,lr,Rr,wr){lr<0&&(lr=0),lr=Math.round(lr),wr=Math.round(wr),V.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+Vt+`px;
top: `+lr+"px; width: "+(Rr==null?ce-Vt:Rr)+`px;
height: `+(wr-lr)+"px"))}function Be(Vt,lr,Rr){var wr=qt(F,Vt),Qr=wr.text.length,Pn,da;function Hn(ra,Fa){return gn(e,St(Vt,ra),"div",wr,Fa)}function za(ra,Fa,ga){var sa=or(e,wr,null,ra),na=Fa=="ltr"==(ga=="after")?"left":"right",$n=ga=="after"?sa.begin:sa.end-(/\s/.test(wr.text.charAt(sa.end-1))?2:1);return Hn($n,na)[na]}var ja=lt(wr,F.direction);return Ye(ja,lr||0,Rr==null?Qr:Rr,function(ra,Fa,ga,sa){var na=ga=="ltr",$n=Hn(ra,na?"left":"right"),Ua=Hn(Fa-1,na?"right":"left"),lo=lr==null&&ra==0,Ui=Rr==null&&Fa==Qr,_a=sa==0,xi=!ja||sa==ja.length-1;if(Ua.top-$n.top<=3){var fa=(me?lo:Ui)&&_a,ps=(me?Ui:lo)&&xi,Di=fa?oe:(na?$n:Ua).left,Gi=ps?ce:(na?Ua:$n).right;Ie(Di,$n.top,Gi-Di,$n.bottom)}else{var Xi,Ra,uo,ms;na?(Xi=me&&lo&&_a?oe:$n.left,Ra=me?ce:za(ra,ga,"before"),uo=me?oe:za(Fa,ga,"after"),ms=me&&Ui&&xi?ce:Ua.right):(Xi=me?za(ra,ga,"before"):oe,Ra=!me&&lo&&_a?ce:$n.right,uo=!me&&Ui&&xi?oe:Ua.left,ms=me?za(Fa,ga,"after"):ce),Ie(Xi,$n.top,Ra-Xi,$n.bottom),$n.bottom<Ua.top&&Ie(oe,$n.bottom,null,Ua.top),Ie(uo,Ua.top,ms-uo,Ua.bottom)}(!Pn||yn($n,Pn)<0)&&(Pn=$n),yn(Ua,Pn)<0&&(Pn=Ua),(!da||yn($n,da)<0)&&(da=$n),yn(Ua,da)<0&&(da=Ua)}),{start:Pn,end:da}}var et=r.from(),$e=r.to();if(et.line==$e.line)Be(et.line,et.ch,$e.ch);else{var mt=qt(F,et.line),Tt=qt(F,$e.line),Ft=nt(mt)==nt(Tt),Xt=Be(et.line,et.ch,Ft?mt.text.length+1:null).end,rr=Be($e.line,Ft?0:null,$e.ch).start;Ft&&(Xt.top<rr.top-2?(Ie(Xt.right,Xt.top,null,Xt.bottom),Ie(oe,rr.top,rr.left,rr.bottom)):Ie(Xt.right,Xt.top,rr.left-Xt.right,Xt.bottom)),Xt.bottom<rr.top&&Ie(oe,Xt.bottom,null,rr.top)}R.appendChild(V)}function Wn(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var R=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||ri(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Bi(e){e.state.focused||(e.display.input.focus(),ti(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ri(e))},100)}function ti(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ge(e,"focus",e,r),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),i&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wn(e)}function ri(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ge(e,"blur",e,r),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Li(e){for(var r=e.display,R=r.lineDiv.offsetTop,A=0;A<r.view.length;A++){var F=r.view[A],V=e.options.lineWrapping,re=void 0,oe=0;if(F.hidden)continue;if(w&&d<8){var ce=F.node.offsetTop+F.node.offsetHeight;re=ce-R,R=ce}else{var me=F.node.getBoundingClientRect();re=me.bottom-me.top,!V&&F.text.firstChild&&(oe=F.text.firstChild.getBoundingClientRect().right-me.left-1)}var Ie=F.line.height-re;if((Ie>.005||Ie<-.005)&&(zn(F.line,re),wi(F.line),F.rest))for(var Be=0;Be<F.rest.length;Be++)wi(F.rest[Be]);if(oe>e.display.sizerWidth){var et=Math.ceil(oe/Xn(e.display));et>e.display.maxLineLength&&(e.display.maxLineLength=et,e.display.maxLine=F.line,e.display.maxLineChanged=!0)}}}function wi(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var R=e.widgets[r],A=R.node.parentNode;A&&(R.height=A.offsetHeight)}}function Mi(e,r,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-In(e));var F=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,V=kn(r,A),re=kn(r,F);if(R&&R.ensure){var oe=R.ensure.from.line,ce=R.ensure.to.line;oe<V?(V=oe,re=kn(r,jt(qt(r,oe))+e.wrapper.clientHeight)):Math.min(ce,r.lastLine())>=re&&(V=kn(r,jt(qt(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:V,to:Math.max(re,V+1)}}function Wi(e,r){if(rt(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),F=null;if(r.top+A.top<0?F=!0:r.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(F=!1),F!=null&&!m){var V=T("div","\u200B",null,`position: absolute;
top: `+(r.top-R.viewOffset-In(e.display))+`px;
height: `+(r.bottom-r.top+He(e)+R.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(F),e.display.lineSpace.removeChild(V)}}function Vi(e,r,R,A){A==null&&(A=0);var F;!e.options.lineWrapping&&r==R&&(r=r.ch?St(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?St(r.line,r.ch+1,"before"):r);for(var V=0;V<5;V++){var re=!1,oe=zr(e,r),ce=!R||R==r?oe:zr(e,R);F={left:Math.min(oe.left,ce.left),top:Math.min(oe.top,ce.top)-A,right:Math.max(oe.left,ce.left),bottom:Math.max(oe.bottom,ce.bottom)+A};var me=ni(e,F),Ie=e.doc.scrollTop,Be=e.doc.scrollLeft;if(me.scrollTop!=null&&(ii(e,me.scrollTop),Math.abs(e.doc.scrollTop-Ie)>1&&(re=!0)),me.scrollLeft!=null&&(ka(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-Be)>1&&(re=!0)),!re)break}return F}function Ii(e,r){var R=ni(e,r);R.scrollTop!=null&&ii(e,R.scrollTop),R.scrollLeft!=null&&ka(e,R.scrollLeft)}function ni(e,r){var R=e.display,A=jn(e.display);r.top<0&&(r.top=0);var F=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,V=he(e),re={};r.bottom-r.top>V&&(r.bottom=r.top+V);var oe=e.doc.height+Pe(R),ce=r.top<A,me=r.bottom>oe-A;if(r.top<F)re.scrollTop=ce?0:r.top;else if(r.bottom>F+V){var Ie=Math.min(r.top,(me?oe:r.bottom)-V);Ie!=F&&(re.scrollTop=Ie)}var Be=e.options.fixedGutter?0:R.gutters.offsetWidth,et=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Be,$e=Me(e)-R.gutters.offsetWidth,mt=r.right-r.left>$e;return mt&&(r.right=r.left+$e),r.left<10?re.scrollLeft=0:r.left<et?re.scrollLeft=Math.max(0,r.left+Be-(mt?0:10)):r.right>$e+et-3&&(re.scrollLeft=r.right+(mt?0:10)-$e),re}function Ti(e,r){if(r==null)return;bi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function yi(e){bi(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function ai(e,r,R){(r!=null||R!=null)&&bi(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function co(e,r){bi(e),e.curOp.scrollToPos=r}function bi(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=gr(e,r.from),A=gr(e,r.to);Si(e,R,A,r.margin)}}function Si(e,r,R,A){var F=ni(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-A,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+A});ai(e,F.scrollLeft,F.scrollTop)}function ii(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;C||Ki(e,{top:r}),ui(e,r,!0),C&&Ki(e),Hi(e,100)}function ui(e,r,R){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!R)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function ka(e,r,R,A){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!A)return;e.doc.scrollLeft=r,an(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function $a(e){var r=e.display,R=r.gutters.offsetWidth,A=Math.round(e.doc.height+Pe(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:A,scrollHeight:A+He(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var ar=function(e,r,R){this.cm=R;var A=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),F=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=F.tabIndex=-1,e(A),e(F),Ce(A,"scroll",function(){A.clientHeight&&r(A.scrollTop,"vertical")}),Ce(F,"scroll",function(){F.clientWidth&&r(F.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ar.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,A=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?A+"px":"0";var F=e.viewHeight-(r?A: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(r){this.horiz.style.display="block",this.horiz.style.right=R?A+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(R?A:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(A==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?A:0,bottom:r?A:0}},ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ar.prototype.zeroWidthHack=function(){var e=o&&!c?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},ar.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function A(){var F=e.getBoundingClientRect(),V=R=="vert"?document.elementFromPoint(F.right-1,(F.top+F.bottom)/2):document.elementFromPoint((F.right+F.left)/2,F.bottom-1);V!=e?e.style.pointerEvents="none":r.set(1e3,A)}r.set(1e3,A)},ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var sr=function(){};sr.prototype.update=function(){return{bottom:0,right:0}},sr.prototype.setScrollLeft=function(){},sr.prototype.setScrollTop=function(){},sr.prototype.clear=function(){};function $t(e,r){r||(r=$a(e));var R=e.display.barWidth,A=e.display.barHeight;rn(e,r);for(var F=0;F<4&&R!=e.display.barWidth||A!=e.display.barHeight;F++)R!=e.display.barWidth&&e.options.lineWrapping&&Li(e),rn(e,$a(e)),R=e.display.barWidth,A=e.display.barHeight}function rn(e,r){var R=e.display,A=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=A.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=A.bottom)+"px",R.heightForcer.style.borderBottom=A.bottom+"px solid transparent",A.right&&A.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=A.bottom+"px",R.scrollbarFiller.style.width=A.right+"px"):R.scrollbarFiller.style.display="",A.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=A.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var Zt={native:ar,null:sr};function ci(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Zt[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Ce(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,R){R=="horizontal"?ka(e,r):ii(e,r)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var $i=0;function Tn(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:++$i},mr(e.curOp)}function Ci(e){var r=e.curOp;r&&vr(r,function(R){for(var A=0;A<R.ops.length;A++)R.ops[A].cm.curOp=null;Do(R)})}function Do(e){for(var r=e.ops,R=0;R<r.length;R++)Jo(r[R]);for(var A=0;A<r.length;A++)Qo(r[A]);for(var F=0;F<r.length;F++)Zo(r[F]);for(var V=0;V<r.length;V++)fo(r[V]);for(var re=0;re<r.length;re++)qo(r[re])}function Jo(e){var r=e.cm,R=r.display;Po(r),e.updateMaxLine&&nr(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<R.viewFrom||e.scrollToPos.to.line>=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new Ya(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&Oi(e.cm,e.update)}function Zo(e){var r=e.cm,R=r.display;e.updatedDisplay&&Li(r),e.barMeasure=$a(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Ne(r,R.maxLine,R.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+He(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-Me(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function fo(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&ka(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var R=e.focus&&e.focus==G();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=r.doc.height)&&$t(r,e.barMeasure),e.updatedDisplay&&bn(r,e.barMeasure),e.selectionChanged&&Wn(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),R&&Bi(e.cm)}function qo(e){var r=e.cm,R=r.display,A=r.doc;if(e.updatedDisplay&&Yi(r,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&ui(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ka(r,e.scrollLeft,!0,!0),e.scrollToPos){var F=Vi(r,ur(A,e.scrollToPos.from),ur(A,e.scrollToPos.to),e.scrollToPos.margin);Wi(r,F)}var V=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(V)for(var oe=0;oe<V.length;++oe)V[oe].lines.length||Ge(V[oe],"hide");if(re)for(var ce=0;ce<re.length;++ce)re[ce].lines.length&&Ge(re[ce],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&Ge(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Ca(e,r){if(e.curOp)return r();Tn(e);try{return r()}finally{Ci(e)}}function Jn(e,r){return function(){if(e.curOp)return r.apply(e,arguments);Tn(e);try{return r.apply(e,arguments)}finally{Ci(e)}}}function va(e){return function(){if(this.curOp)return e.apply(this,arguments);Tn(this);try{return e.apply(this,arguments)}finally{Ci(this)}}}function Qn(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);Tn(r);try{return e.apply(this,arguments)}finally{Ci(r)}}}function Hi(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,U(es,e))}function es(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=Un(e,r.highlightFrontier),F=[];r.iter(A.line,Math.min(r.first+r.size,e.display.viewTo+500),function(V){if(A.line>=e.display.viewFrom){var re=V.styles,oe=V.text.length>e.options.maxHighlightLength?nn(r.mode,A.state):null,ce=Ga(e,V,A,!0);oe&&(A.state=oe),V.styles=ce.styles;var me=V.styleClasses,Ie=ce.classes;Ie?V.styleClasses=Ie:me&&(V.styleClasses=null);for(var Be=!re||re.length!=V.styles.length||me!=Ie&&(!me||!Ie||me.bgClass!=Ie.bgClass||me.textClass!=Ie.textClass),et=0;!Be&&et<re.length;++et)Be=re[et]!=V.styles[et];Be&&F.push(A.line),V.stateAfter=A.save(),A.nextLine()}else V.text.length<=e.options.maxHighlightLength&&Xa(e,V.text,A),V.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return Hi(e,e.options.workDelay),!0}),r.highlightFrontier=A.line,r.modeFrontier=Math.max(r.modeFrontier,A.line),F.length&&Ca(e,function(){for(var V=0;V<F.length;V++)Dn(e,F[V],"text")})}var Ya=function(e,r,R){var A=e.display;this.viewport=r,this.visible=Mi(A,e.doc,r),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=Me(e),this.force=R,this.dims=Rn(e),this.events=[]};Ya.prototype.signal=function(e,r){Se(e,r)&&this.events.push(arguments)},Ya.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ge.apply(null,this.events[e])};function Po(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=He(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=He(e)+"px",r.scrollbarsClipped=!0)}function Lo(e){if(e.hasFocus())return null;var r=G();if(!r||!I(e.display.lineDiv,r))return null;var R={activeElt:r};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&I(e.display.lineDiv,A.anchorNode)&&(R.anchorNode=A.anchorNode,R.anchorOffset=A.anchorOffset,R.focusNode=A.focusNode,R.focusOffset=A.focusOffset)}return R}function Mo(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode)){var r=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),r.removeAllRanges(),r.addRange(R),r.extend(e.focusNode,e.focusOffset)}}function Oi(e,r){var R=e.display,A=e.doc;if(r.editorIsHidden)return Cn(e),!1;if(!r.force&&r.visible.from>=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&Va(e)==0)return!1;ia(e)&&(Cn(e),r.dims=Rn(e));var F=A.first+A.size,V=Math.max(r.visible.from-e.options.viewportMargin,A.first),re=Math.min(F,r.visible.to+e.options.viewportMargin);R.viewFrom<V&&V-R.viewFrom<20&&(V=Math.max(A.first,R.viewFrom)),R.viewTo>re&&R.viewTo-re<20&&(re=Math.min(F,R.viewTo)),ea&&(V=Rt(e.doc,V),re=Ct(e.doc,re));var oe=V!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;ma(e,V,re),R.viewOffset=jt(qt(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=Va(e);if(!oe&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var me=Lo(e);return ce>4&&(R.lineDiv.style.display="none"),Io(e,R.updateLineNumbers,r.dims),ce>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Mo(me),v(R.cursorDiv),v(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,oe&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Hi(e,400)),R.updateLineNumbers=null,!0}function Yi(e,r){for(var R=r.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||r.oldDisplayWidth==Me(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+Pe(e.display)-he(e),R.top)}),r.visible=Mi(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else A&&(r.visible=Mi(e.display,e.doc,R));if(!Oi(e,r))break;Li(e);var F=$a(e);hn(e),$t(e,F),bn(e,F),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ki(e,r){var R=new Ya(e,r);if(Oi(e,R)){Li(e),Yi(e,R);var A=$a(e);hn(e),$t(e,A),bn(e,A),R.finish()}}function Io(e,r,R){var A=e.display,F=e.options.lineNumbers,V=A.lineDiv,re=V.firstChild;function oe(mt){var Tt=mt.nextSibling;return i&&o&&e.display.currentWheelTarget==mt?mt.style.display="none":mt.parentNode.removeChild(mt),Tt}for(var ce=A.view,me=A.viewFrom,Ie=0;Ie<ce.length;Ie++){var Be=ce[Ie];if(!Be.hidden)if(!Be.node||Be.node.parentNode!=V){var et=cr(e,Be,me,R);V.insertBefore(et,re)}else{for(;re!=Be.node;)re=oe(re);var $e=F&&r!=null&&r<=me&&Be.lineNumber;Be.changes&&(ae(Be.changes,"gutter")>-1&&($e=!1),Gt(e,Be,me,R)),$e&&(v(Be.lineNumber),Be.lineNumber.appendChild(document.createTextNode(la(e.options,me)))),re=Be.node.nextSibling}me+=Be.size}for(;re;)re=oe(re)}function Ji(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function bn(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+He(e)+"px"}function an(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var A=ta(r)-r.scroller.scrollLeft+e.doc.scrollLeft,F=r.gutters.offsetWidth,V=A+"px",re=0;re<R.length;re++)if(!R[re].hidden){e.options.fixedGutter&&(R[re].gutter&&(R[re].gutter.style.left=V),R[re].gutterBackground&&(R[re].gutterBackground.style.left=V));var oe=R[re].alignable;if(oe)for(var ce=0;ce<oe.length;ce++)oe[ce].style.left=V}e.options.fixedGutter&&(r.gutters.style.left=A+F+"px")}function ia(e){if(!e.options.lineNumbers)return!1;var r=e.doc,R=la(e.options,r.first+r.size-1),A=e.display;if(R.length!=A.lineNumChars){var F=A.measure.appendChild(T("div",[T("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=F.firstChild.offsetWidth,re=F.offsetWidth-V;return A.lineGutter.style.width="",A.lineNumInnerWidth=Math.max(V,A.lineGutter.offsetWidth-re)+1,A.lineNumWidth=A.lineNumInnerWidth+re,A.lineNumChars=A.lineNumInnerWidth?R.length:-1,A.lineGutter.style.width=A.lineNumWidth+"px",Ji(e.display),!0}return!1}function Oa(e,r){for(var R=[],A=!1,F=0;F<e.length;F++){var V=e[F],re=null;if(typeof V!="string"&&(re=V.style,V=V.className),V=="CodeMirror-linenumbers")if(r)A=!0;else continue;R.push({className:V,style:re})}return r&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function ki(e){var r=e.gutters,R=e.gutterSpecs;v(r),e.lineGutter=null;for(var A=0;A<R.length;++A){var F=R[A],V=F.className,re=F.style,oe=r.appendChild(T("div",null,"CodeMirror-gutter "+V));re&&(oe.style.cssText=re),V=="CodeMirror-linenumbers"&&(e.lineGutter=oe,oe.style.width=(e.lineNumWidth||1)+"px")}r.style.display=R.length?"":"none",Ji(e)}function di(e){ki(e.display),_n(e),an(e)}function zi(e,r,R,A){var F=this;this.input=R,F.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),F.scrollbarFiller.setAttribute("cm-not-content","true"),F.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),F.gutterFiller.setAttribute("cm-not-content","true"),F.lineDiv=M("div",null,"CodeMirror-code"),F.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),F.cursorDiv=T("div",null,"CodeMirror-cursors"),F.measure=T("div",null,"CodeMirror-measure"),F.lineMeasure=T("div",null,"CodeMirror-measure"),F.lineSpace=M("div",[F.measure,F.lineMeasure,F.selectionDiv,F.cursorDiv,F.lineDiv],null,"position: relative; outline: none");var V=M("div",[F.lineSpace],"CodeMirror-lines");F.mover=T("div",[V],null,"position: relative"),F.sizer=T("div",[F.mover],"CodeMirror-sizer"),F.sizerWidth=null,F.heightForcer=T("div",null,null,"position: absolute; height: "+se+"px; width: 1px;"),F.gutters=T("div",null,"CodeMirror-gutters"),F.lineGutter=null,F.scroller=T("div",[F.sizer,F.heightForcer,F.gutters],"CodeMirror-scroll"),F.scroller.setAttribute("tabIndex","-1"),F.wrapper=T("div",[F.scrollbarFiller,F.gutterFiller,F.scroller],"CodeMirror"),w&&d<8&&(F.gutters.style.zIndex=-1,F.scroller.style.paddingRight=0),!i&&!(C&&n)&&(F.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(F.wrapper):e(F.wrapper)),F.viewFrom=F.viewTo=r.first,F.reportedViewFrom=F.reportedViewTo=r.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=Oa(A.gutters,A.lineNumbers),ki(F),R.init(F)}var Ei=0,oa=null;w?oa=-.53:C?oa=15:a?oa=-.7:p&&(oa=-1/3);function Qi(e){var r=e.wheelDeltaX,R=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),R==null&&e.detail&&e.axis==e.VERTICAL_AXIS?R=e.detail:R==null&&(R=e.wheelDelta),{x:r,y:R}}function ho(e){var r=Qi(e);return r.x*=oa,r.y*=oa,r}function po(e,r){var R=Qi(r),A=R.x,F=R.y,V=e.display,re=V.scroller,oe=re.scrollWidth>re.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(A&&oe||F&&ce))return;if(F&&o&&i){e:for(var me=r.target,Ie=V.view;me!=re;me=me.parentNode)for(var Be=0;Be<Ie.length;Be++)if(Ie[Be].node==me){e.display.currentWheelTarget=me;break e}}if(A&&!C&&!_&&oa!=null){F&&ce&&ii(e,Math.max(0,re.scrollTop+F*oa)),ka(e,Math.max(0,re.scrollLeft+A*oa)),(!F||F&&ce)&&fe(r),V.wheelStartX=null;return}if(F&&oa!=null){var et=F*oa,$e=e.doc.scrollTop,mt=$e+V.wrapper.clientHeight;et<0?$e=Math.max(0,$e+et-50):mt=Math.min(e.doc.height,mt+et+50),Ki(e,{top:$e,bottom:mt})}Ei<20&&(V.wheelStartX==null?(V.wheelStartX=re.scrollLeft,V.wheelStartY=re.scrollTop,V.wheelDX=A,V.wheelDY=F,setTimeout(function(){if(V.wheelStartX==null)return;var Tt=re.scrollLeft-V.wheelStartX,Ft=re.scrollTop-V.wheelStartY,Xt=Ft&&V.wheelDY&&Ft/V.wheelDY||Tt&&V.wheelDX&&Tt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!Xt)return;oa=(oa*Ei+Xt)/(Ei+1),++Ei},200)):(V.wheelDX+=A,V.wheelDY+=F))}var Aa=function(e,r){this.ranges=e,this.primIndex=r};Aa.prototype.primary=function(){return this.ranges[this.primIndex]},Aa.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var R=this.ranges[r],A=e.ranges[r];if(!Mt(R.anchor,A.anchor)||!Mt(R.head,A.head))return!1}return!0},Aa.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new vn(wa(this.ranges[r].anchor),wa(this.ranges[r].head));return new Aa(e,this.primIndex)},Aa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Aa.prototype.contains=function(e,r){r||(r=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(ir(r,A.from())>=0&&ir(e,A.to())<=0)return R}return-1};var vn=function(e,r){this.anchor=e,this.head=r};vn.prototype.from=function(){return pa(this.anchor,this.head)},vn.prototype.to=function(){return Pa(this.anchor,this.head)},vn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ja(e,r,R){var A=e&&e.options.selectionsMayTouch,F=r[R];r.sort(function(et,$e){return ir(et.from(),$e.from())}),R=ae(r,F);for(var V=1;V<r.length;V++){var re=r[V],oe=r[V-1],ce=ir(oe.to(),re.from());if(A&&!re.empty()?ce>0:ce>=0){var me=pa(oe.from(),re.from()),Ie=Pa(oe.to(),re.to()),Be=oe.empty()?re.from()==re.head:oe.from()==oe.head;V<=R&&--R,r.splice(--V,2,new vn(Be?Ie:me,Be?me:Ie))}}return new Aa(r,R)}function fi(e,r){return new Aa([new vn(e,r||e)],0)}function hi(e){return e.text?St(e.from.line+e.text.length-1,ee(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function mo(e,r){if(ir(e,r.from)<0)return e;if(ir(e,r.to)<=0)return hi(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,A=e.ch;return e.line==r.to.line&&(A+=hi(r).ch-r.to.ch),St(R,A)}function Zi(e,r){for(var R=[],A=0;A<e.sel.ranges.length;A++){var F=e.sel.ranges[A];R.push(new vn(mo(F.anchor,r),mo(F.head,r)))}return Ja(e.cm,R,e.sel.primIndex)}function ko(e,r,R){return e.line==r.line?St(R.line,e.ch-r.ch+R.ch):St(R.line+(e.line-r.line),e.ch)}function No(e,r,R){for(var A=[],F=St(e.first,0),V=F,re=0;re<r.length;re++){var oe=r[re],ce=ko(oe.from,F,V),me=ko(hi(oe),F,V);if(F=oe.to,V=me,R=="around"){var Ie=e.sel.ranges[re],Be=ir(Ie.head,Ie.anchor)<0;A[re]=new vn(Be?me:ce,Be?ce:me)}else A[re]=new vn(ce,ce)}return new Aa(A,e.sel.primIndex)}function Ai(e){e.doc.mode=fn(e.options,e.doc.modeOption),vo(e)}function vo(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Hi(e,100),e.state.modeGen++,e.curOp&&_n(e)}function vs(e,r){return r.from.ch==0&&r.to.ch==0&&ee(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,r,R,A){function F(rr){return R?R[rr]:null}function V(rr,Vt,lr){Qt(rr,Vt,lr,A),Bt(rr,"change",rr,r)}function re(rr,Vt){for(var lr=[],Rr=rr;Rr<Vt;++Rr)lr.push(new Yt(me[Rr],F(Rr),A));return lr}var oe=r.from,ce=r.to,me=r.text,Ie=qt(e,oe.line),Be=qt(e,ce.line),et=ee(me),$e=F(me.length-1),mt=ce.line-oe.line;if(r.full)e.insert(0,re(0,me.length)),e.remove(me.length,e.size-me.length);else if(vs(e,r)){var Tt=re(0,me.length-1);V(Be,Be.text,$e),mt&&e.remove(oe.line,mt),Tt.length&&e.insert(oe.line,Tt)}else if(Ie==Be)if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+et+Ie.text.slice(ce.ch),$e);else{var Ft=re(1,me.length-1);Ft.push(new Yt(et+Ie.text.slice(ce.ch),$e,A)),V(Ie,Ie.text.slice(0,oe.ch)+me[0],F(0)),e.insert(oe.line+1,Ft)}else if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+me[0]+Be.text.slice(ce.ch),F(0)),e.remove(oe.line+1,mt);else{V(Ie,Ie.text.slice(0,oe.ch)+me[0],F(0)),V(Be,et+Be.text.slice(ce.ch),$e);var Xt=re(1,me.length-1);mt>1&&e.remove(oe.line+1,mt-1),e.insert(oe.line+1,Xt)}Bt(e,"change",e,r)}function Ni(e,r,R){function A(F,V,re){if(F.linked)for(var oe=0;oe<F.linked.length;++oe){var ce=F.linked[oe];if(ce.doc==V)continue;var me=re&&ce.sharedHist;if(R&&!me)continue;r(ce.doc,me),A(ce.doc,F,me)}}A(e,null,!0)}function gs(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,ca(e),Ai(e),ys(e),e.options.lineWrapping||nr(e),e.options.mode=r.modeOption,_n(e)}function ys(e){(e.doc.direction=="rtl"?H:E)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Ca(e,function(){ys(e),_n(e)})}function jo(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 rs(e,r){var R={from:wa(r.from),to:hi(r),text:Yn(e,r.from,r.to)};return xs(e,R,r.from.line,r.to.line+1),Ni(e,function(A){return xs(A,R,r.from.line,r.to.line+1)},!0),R}function bs(e){for(;e.length;){var r=ee(e);if(r.ranges)e.pop();else break}}function ml(e,r){if(r)return bs(e.done),ee(e.done);if(e.done.length&&!ee(e.done).ranges)return ee(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ee(e.done)}function Es(e,r,R,A){var F=e.history;F.undone.length=0;var V=+new Date,re,oe;if((F.lastOp==A||F.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&F.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(F,F.lastOp==A)))oe=ee(re.changes),ir(r.from,r.to)==0&&ir(r.from,oe.to)==0?oe.to=hi(r):re.changes.push(rs(e,r));else{var ce=ee(F.done);for((!ce||!ce.ranges)&&Fo(e.sel,F.done),re={changes:[rs(e,r)],generation:F.generation},F.done.push(re);F.done.length>F.undoDepth;)F.done.shift(),F.done[0].ranges||F.done.shift()}F.done.push(R),F.generation=++F.maxGeneration,F.lastModTime=F.lastSelTime=V,F.lastOp=F.lastSelOp=A,F.lastOrigin=F.lastSelOrigin=r.origin,oe||Ge(e,"historyAdded")}function vl(e,r,R,A){var F=r.charAt(0);return F=="*"||F=="+"&&R.ranges.length==A.ranges.length&&R.somethingSelected()==A.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,A){var F=e.history,V=A&&A.origin;R==F.lastSelOp||V&&F.lastSelOrigin==V&&(F.lastModTime==F.lastSelTime&&F.lastOrigin==V||vl(e,V,ee(F.done),r))?F.done[F.done.length-1]=r:Fo(r,F.done),F.lastSelTime=+new Date,F.lastSelOrigin=V,F.lastSelOp=R,A&&A.clearRedo!==!1&&bs(F.undone)}function Fo(e,r){var R=ee(r);R&&R.ranges&&R.equals(e)||r.push(e)}function xs(e,r,R,A){var F=r["spans_"+e.id],V=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(re){re.markedSpans&&((F||(F=r["spans_"+e.id]={}))[V]=re.markedSpans),++V})}function yl(e){if(!e)return null;for(var r,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?r||(r=e.slice(0,R)):r&&r.push(e[R]);return r?r.length?r:null:e}function bl(e,r){var R=r["spans_"+e.id];if(!R)return null;for(var A=[],F=0;F<r.text.length;++F)A.push(yl(R[F]));return A}function _s(e,r){var R=bl(e,r),A=Ka(e,r);if(!R)return A;if(!A)return R;for(var F=0;F<R.length;++F){var V=R[F],re=A[F];if(V&&re){e:for(var oe=0;oe<re.length;++oe){for(var ce=re[oe],me=0;me<V.length;++me)if(V[me].marker==ce.marker)continue e;V.push(ce)}}else re&&(R[F]=re)}return R}function qi(e,r,R){for(var A=[],F=0;F<e.length;++F){var V=e[F];if(V.ranges){A.push(R?Aa.prototype.deepCopy.call(V):V);continue}var re=V.changes,oe=[];A.push({changes:oe});for(var ce=0;ce<re.length;++ce){var me=re[ce],Ie=void 0;if(oe.push({from:me.from,to:me.to,text:me.text}),r)for(var Be in me)(Ie=Be.match(/^spans_(\d+)$/))&&(ae(r,Number(Ie[1]))>-1&&(ee(oe)[Be]=me[Be],delete me[Be]))}}return A}function ns(e,r,R,A){if(A){var F=e.anchor;if(R){var V=ir(r,F)<0;V!=ir(R,F)<0?(F=r,r=R):V!=ir(r,R)<0&&(r=R)}return new vn(F,r)}else return new vn(R||r,r)}function Uo(e,r,R,A,F){F==null&&(F=e.cm&&(e.cm.display.shift||e.extend)),xa(e,new Aa([ns(e.sel.primary(),r,R,F)],0),A)}function ws(e,r,R){for(var A=[],F=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)A[V]=ns(e.sel.ranges[V],r[V],null,F);var re=Ja(e.cm,A,e.sel.primIndex);xa(e,re,R)}function as(e,r,R,A){var F=e.sel.ranges.slice(0);F[r]=R,xa(e,Ja(e.cm,F,e.sel.primIndex),A)}function Ts(e,r,R,A){xa(e,fi(r,R),A)}function El(e,r,R){var A={ranges:r.ranges,update:function(F){this.ranges=[];for(var V=0;V<F.length;V++)this.ranges[V]=new vn(ur(e,F[V].anchor),ur(e,F[V].head))},origin:R&&R.origin};return Ge(e,"beforeSelectionChange",e,A),e.cm&&Ge(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=r.ranges?Ja(e.cm,A.ranges,A.ranges.length-1):r}function Ss(e,r,R){var A=e.history.done,F=ee(A);F&&F.ranges?(A[A.length-1]=r,Bo(e,r,R)):xa(e,r,R)}function xa(e,r,R){Bo(e,r,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function Bo(e,r,R){(Se(e,"beforeSelectionChange")||e.cm&&Se(e.cm,"beforeSelectionChange"))&&(r=El(e,r,R));var A=R&&R.bias||(ir(r.primary().head,e.sel.primary().head)<0?-1:1);Cs(e,As(e,r,A,!0)),!(R&&R.scroll===!1)&&e.cm&&yi(e.cm)}function Cs(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Re(e.cm)),Bt(e,"cursorActivity",e)}function Os(e){Cs(e,As(e,e.sel,null,!1))}function As(e,r,R,A){for(var F,V=0;V<r.ranges.length;V++){var re=r.ranges[V],oe=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ce=Wo(e,re.anchor,oe&&oe.anchor,R,A),me=Wo(e,re.head,oe&&oe.head,R,A);(F||ce!=re.anchor||me!=re.head)&&(F||(F=r.ranges.slice(0,V)),F[V]=new vn(ce,me))}return F?Ja(e.cm,F,r.primIndex):r}function eo(e,r,R,A,F){var V=qt(e,r.line);if(V.markedSpans)for(var re=0;re<V.markedSpans.length;++re){var oe=V.markedSpans[re],ce=oe.marker,me="selectLeft"in ce?!ce.selectLeft:ce.inclusiveLeft,Ie="selectRight"in ce?!ce.selectRight:ce.inclusiveRight;if((oe.from==null||(me?oe.from<=r.ch:oe.from<r.ch))&&(oe.to==null||(Ie?oe.to>=r.ch:oe.to>r.ch))){if(F&&(Ge(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(V.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var Be=ce.find(A<0?1:-1),et=void 0;if((A<0?Ie:me)&&(Be=Rs(e,Be,-A,Be&&Be.line==r.line?V:null)),Be&&Be.line==r.line&&(et=ir(Be,R))&&(A<0?et<0:et>0))return eo(e,Be,r,A,F)}var $e=ce.find(A<0?-1:1);return(A<0?me:Ie)&&($e=Rs(e,$e,A,$e.line==r.line?V:null)),$e?eo(e,$e,r,A,F):null}}return r}function Wo(e,r,R,A,F){var V=A||1,re=eo(e,r,R,V,F)||!F&&eo(e,r,R,V,!0)||eo(e,r,R,-V,F)||!F&&eo(e,r,R,-V,!0);return re||(e.cantEdit=!0,St(e.first,0))}function Rs(e,r,R,A){return R<0&&r.ch==0?r.line>e.first?ur(e,St(r.line-1)):null:R>0&&r.ch==(A||qt(e,r.line)).text.length?r.line<e.first+e.size-1?St(r.line+1,0):null:new St(r.line,r.ch+R)}function Ds(e){e.setSelection(St(e.firstLine(),0),St(e.lastLine()),Te)}function Ps(e,r,R){var A={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return A.canceled=!0}};return R&&(A.update=function(F,V,re,oe){F&&(A.from=ur(e,F)),V&&(A.to=ur(e,V)),re&&(A.text=re),oe!==void 0&&(A.origin=oe)}),Ge(e,"beforeChange",e,A),e.cm&&Ge(e.cm,"beforeChange",e.cm,A),A.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:A.from,to:A.to,text:A.text,origin:A.origin}}function to(e,r,R){if(e.cm){if(!e.cm.curOp)return Jn(e.cm,to)(e,r,R);if(e.cm.state.suppressEdits)return}if((Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"))&&(r=Ps(e,r,!0),!r))return;var A=Za&&!R&&ei(e,r.from,r.to);if(A)for(var F=A.length-1;F>=0;--F)Ls(e,{from:A[F].from,to:A[F].to,text:F?[""]:r.text,origin:r.origin});else Ls(e,r)}function Ls(e,r){if(r.text.length==1&&r.text[0]==""&&ir(r.from,r.to)==0)return;var R=Zi(e,r);Es(e,r,R,e.cm?e.cm.curOp.id:NaN),go(e,r,R,Ka(e,r));var A=[];Ni(e,function(F,V){!V&&ae(A,F.history)==-1&&(Ns(F.history,r),A.push(F.history)),go(F,r,null,Ka(F,r))})}function Ho(e,r,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var F=e.history,V,re=e.sel,oe=r=="undo"?F.done:F.undone,ce=r=="undo"?F.undone:F.done,me=0;me<oe.length&&!(V=oe[me],R?V.ranges&&!V.equals(e.sel):!V.ranges);me++);if(me==oe.length)return;for(F.lastOrigin=F.lastSelOrigin=null;;)if(V=oe.pop(),V.ranges){if(Fo(V,ce),R&&!V.equals(e.sel)){xa(e,V,{clearRedo:!1});return}re=V}else if(A){oe.push(V);return}else break;var Ie=[];Fo(re,ce),ce.push({changes:Ie,generation:F.generation}),F.generation=V.generation||++F.maxGeneration;for(var Be=Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"),et=function(Tt){var Ft=V.changes[Tt];if(Ft.origin=r,Be&&!Ps(e,Ft,!1))return oe.length=0,{};Ie.push(rs(e,Ft));var Xt=Tt?Zi(e,Ft):ee(oe);go(e,Ft,Xt,_s(e,Ft)),!Tt&&e.cm&&e.cm.scrollIntoView({from:Ft.from,to:hi(Ft)});var rr=[];Ni(e,function(Vt,lr){!lr&&ae(rr,Vt.history)==-1&&(Ns(Vt.history,Ft),rr.push(Vt.history)),go(Vt,Ft,null,_s(Vt,Ft))})},$e=V.changes.length-1;$e>=0;--$e){var mt=et($e);if(mt)return mt.v}}function Ms(e,r){if(r==0)return;if(e.first+=r,e.sel=new Aa(le(e.sel.ranges,function(F){return new vn(St(F.anchor.line+r,F.anchor.ch),St(F.head.line+r,F.head.ch))}),e.sel.primIndex),e.cm){_n(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)Dn(e.cm,A,"gutter")}}function go(e,r,R,A){if(e.cm&&!e.cm.curOp)return Jn(e.cm,go)(e,r,R,A);if(r.to.line<e.first){Ms(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var F=r.text.length-1-(e.first-r.from.line);Ms(e,F),r={from:St(e.first,0),to:St(r.to.line+F,r.to.ch),text:[ee(r.text)],origin:r.origin}}var V=e.lastLine();r.to.line>V&&(r={from:r.from,to:St(V,qt(e,V).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Yn(e,r.from,r.to),R||(R=Zi(e,r)),e.cm?xl(e.cm,r,A):ts(e,r,A),Bo(e,R,Te),e.cantEdit&&Wo(e,St(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,r,R){var A=e.doc,F=e.display,V=r.from,re=r.to,oe=!1,ce=V.line;e.options.lineWrapping||(ce=Gr(nt(qt(A,V.line))),A.iter(ce,re.line+1,function($e){if($e==F.maxLine)return oe=!0,!0})),A.sel.contains(r.from,r.to)>-1&&Re(e),ts(A,r,R,Ia(e)),e.options.lineWrapping||(A.iter(ce,V.line+r.text.length,function($e){var mt=Ve($e);mt>F.maxLineLength&&(F.maxLine=$e,F.maxLineLength=mt,F.maxLineChanged=!0,oe=!1)}),oe&&(e.curOp.updateMaxLine=!0)),mi(A,V.line),Hi(e,400);var me=r.text.length-(re.line-V.line)-1;r.full?_n(e):V.line==re.line&&r.text.length==1&&!vs(e.doc,r)?Dn(e,V.line,"text"):_n(e,V.line,re.line+1,me);var Ie=Se(e,"changes"),Be=Se(e,"change");if(Be||Ie){var et={from:V,to:re,text:r.text,removed:r.removed,origin:r.origin};Be&&Bt(e,"change",e,et),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(et)}e.display.selForContextMenu=null}function ro(e,r,R,A,F){var V;A||(A=R),ir(A,R)<0&&(V=[A,R],R=V[0],A=V[1]),typeof r=="string"&&(r=e.splitLines(r)),to(e,{from:R,to:A,text:r,origin:F})}function Is(e,r,R,A){R<e.line?e.line+=A:r<e.line&&(e.line=r,e.ch=0)}function ks(e,r,R,A){for(var F=0;F<e.length;++F){var V=e[F],re=!0;if(V.ranges){V.copied||(V=e[F]=V.deepCopy(),V.copied=!0);for(var oe=0;oe<V.ranges.length;oe++)Is(V.ranges[oe].anchor,r,R,A),Is(V.ranges[oe].head,r,R,A);continue}for(var ce=0;ce<V.changes.length;++ce){var me=V.changes[ce];if(R<me.from.line)me.from=St(me.from.line+A,me.from.ch),me.to=St(me.to.line+A,me.to.ch);else if(r<=me.to.line){re=!1;break}}re||(e.splice(0,F+1),F=0)}}function Ns(e,r){var R=r.from.line,A=r.to.line,F=r.text.length-(A-R)-1;ks(e.done,R,A,F),ks(e.undone,R,A,F)}function yo(e,r,R,A){var F=r,V=r;return typeof r=="number"?V=qt(e,Ln(e,r)):F=Gr(r),F==null?null:(A(V,F)&&e.cm&&Dn(e.cm,F,R),V)}function bo(e){this.lines=e,this.parent=null;for(var r=0,R=0;R<e.length;++R)e[R].parent=this,r+=e[R].height;this.height=r}bo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var R=e,A=e+r;R<A;++R){var F=this.lines[R];this.height-=F.height,It(F),Bt(F,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,R){this.height+=R,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var A=0;A<r.length;++A)r[A].parent=this},iterN:function(e,r,R){for(var A=e+r;e<A;++e)if(R(this.lines[e]))return!0}};function Eo(e){this.children=e;for(var r=0,R=0,A=0;A<e.length;++A){var F=e[A];r+=F.chunkSize(),R+=F.height,F.parent=this}this.size=r,this.height=R,this.parent=null}Eo.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var R=0;R<this.children.length;++R){var A=this.children[R],F=A.chunkSize();if(e<F){var V=Math.min(r,F-e),re=A.height;if(A.removeInner(e,V),this.height-=re-A.height,F==V&&(this.children.splice(R--,1),A.parent=null),(r-=V)==0)break;e=0}else e-=F}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof bo))){var oe=[];this.collapse(oe),this.children=[new bo(oe)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,R){this.size+=r.length,this.height+=R;for(var A=0;A<this.children.length;++A){var F=this.children[A],V=F.chunkSize();if(e<=V){if(F.insertInner(e,r,R),F.lines&&F.lines.length>50){for(var re=F.lines.length%25+25,oe=re;oe<F.lines.length;){var ce=new bo(F.lines.slice(oe,oe+=25));F.height-=ce.height,this.children.splice(++A,0,ce),ce.parent=this}F.lines=F.lines.slice(0,re),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),R=new Eo(r);if(e.parent){e.size-=R.size,e.height-=R.height;var F=ae(e.parent.children,e);e.parent.children.splice(F+1,0,R)}else{var A=new Eo(e.children);A.parent=e,e.children=[A,R],e=A}R.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var A=0;A<this.children.length;++A){var F=this.children[A],V=F.chunkSize();if(e<V){var re=Math.min(r,V-e);if(F.iterN(e,re,R))return!0;if((r-=re)==0)break;e=0}else e-=V}}};var xo=function(e,r,R){if(R)for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A]);this.doc=e,this.node=r};xo.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,R=this.line,A=Gr(R);if(A==null||!r)return;for(var F=0;F<r.length;++F)r[F]==this&&r.splice(F--,1);r.length||(R.widgets=null);var V=Tr(this);zn(R,Math.max(0,R.height-V)),e&&(Ca(e,function(){js(e,R,-V),Dn(e,A,"widget")}),Bt(e,"lineWidgetCleared",e,this,A))},xo.prototype.changed=function(){var e=this,r=this.height,R=this.doc.cm,A=this.line;this.height=null;var F=Tr(this)-r;if(!F)return;Ot(this.doc,A)||zn(A,A.height+F),R&&Ca(R,function(){R.curOp.forceUpdate=!0,js(R,A,F),Bt(R,"lineWidgetChanged",R,e,Gr(A))})},De(xo);function js(e,r,R){jt(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ti(e,R)}function _l(e,r,R,A){var F=new xo(e,R,A),V=e.cm;return V&&F.noHScroll&&(V.display.alignWidgets=!0),yo(e,r,"widget",function(re){var oe=re.widgets||(re.widgets=[]);if(F.insertAt==null?oe.push(F):oe.splice(Math.min(oe.length-1,Math.max(0,F.insertAt)),0,F),F.line=re,V&&!Ot(e,re)){var ce=jt(re)<e.scrollTop;zn(re,re.height+Tr(F)),ce&&Ti(V,F.height),V.curOp.forceUpdate=!0}return!0}),V&&Bt(V,"lineWidgetAdded",V,F,typeof r=="number"?r:Gr(r)),F}var Fs=0,ji=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++Fs};ji.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&Tn(e),Se(this,"clear")){var R=this.find();R&&Bt(this,"clear",R.from,R.to)}for(var A=null,F=null,V=0;V<this.lines.length;++V){var re=this.lines[V],oe=Ea(re.markedSpans,this);e&&!this.collapsed?Dn(e,Gr(re),"text"):e&&(oe.to!=null&&(F=Gr(re)),oe.from!=null&&(A=Gr(re))),re.markedSpans=Pi(re.markedSpans,oe),oe.from==null&&this.collapsed&&!Ot(this.doc,re)&&e&&zn(re,jn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ce=0;ce<this.lines.length;++ce){var me=nt(this.lines[ce]),Ie=Ve(me);Ie>e.display.maxLineLength&&(e.display.maxLine=me,e.display.maxLineLength=Ie,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&_n(e,A,F+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&Bt(e,"markerCleared",e,this,A,F),r&&Ci(e),this.parent&&this.parent.clear()},ji.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,F=0;F<this.lines.length;++F){var V=this.lines[F],re=Ea(V.markedSpans,this);if(re.from!=null&&(R=St(r?V:Gr(V),re.from),e==-1))return R;if(re.to!=null&&(A=St(r?V:Gr(V),re.to),e==1))return A}return R&&{from:R,to:A}},ji.prototype.changed=function(){var e=this,r=this.find(-1,!0),R=this,A=this.doc.cm;if(!r||!A)return;Ca(A,function(){var F=r.line,V=Gr(r.line),re=Ue(A,V);if(re&&(Cr(re),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!Ot(R.doc,F)&&R.height!=null){var oe=R.height;R.height=null;var ce=Tr(R)-oe;ce&&zn(F,F.height+ce)}Bt(A,"markerChanged",A,e)})},ji.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||ae(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ji.prototype.detachLine=function(e){if(this.lines.splice(ae(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},De(ji);function no(e,r,R,A,F){if(A&&A.shared)return wl(e,r,R,A,F);if(e.cm&&!e.cm.curOp)return Jn(e.cm,no)(e,r,R,A,F);var V=new ji(e,F),re=ir(r,R);if(A&&B(A,V,!1),re>0||re==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=M("span",[V.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(ct(e,r.line,r,R,V)||r.line!=R.line&&ct(e,R.line,r,R,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");gi()}V.addToHistory&&Es(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var oe=r.line,ce=e.cm,me;if(e.iter(oe,R.line+1,function(Be){ce&&V.collapsed&&!ce.options.lineWrapping&&nt(Be)==ce.display.maxLine&&(me=!0),V.collapsed&&oe!=r.line&&zn(Be,0),qa(Be,new Wa(V,oe==r.line?r.ch:null,oe==R.line?R.ch:null)),++oe}),V.collapsed&&e.iter(r.line,R.line+1,function(Be){Ot(e,Be)&&zn(Be,0)}),V.clearOnEnter&&Ce(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(vi(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Fs,V.atomic=!0),ce){if(me&&(ce.curOp.updateMaxLine=!0),V.collapsed)_n(ce,r.line,R.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ie=r.line;Ie<=R.line;Ie++)Dn(ce,Ie,"text");V.atomic&&Os(ce.doc),Bt(ce,"markerAdded",ce,V)}return V}var _o=function(e,r){this.markers=e,this.primary=r;for(var R=0;R<e.length;++R)e[R].parent=this};_o.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Bt(this,"clear")},_o.prototype.find=function(e,r){return this.primary.find(e,r)},De(_o);function wl(e,r,R,A,F){A=B(A),A.shared=!1;var V=[no(e,r,R,A,F)],re=V[0],oe=A.widgetNode;return Ni(e,function(ce){oe&&(A.widgetNode=oe.cloneNode(!0)),V.push(no(ce,ur(ce,r),ur(ce,R),A,F));for(var me=0;me<ce.linked.length;++me)if(ce.linked[me].isParent)return;re=ee(V)}),new _o(V,re)}function Us(e){return e.findMarks(St(e.first,0),e.clipPos(St(e.lastLine())),function(r){return r.parent})}function Tl(e,r){for(var R=0;R<r.length;R++){var A=r[R],F=A.find(),V=e.clipPos(F.from),re=e.clipPos(F.to);if(ir(V,re)){var oe=no(e,V,re,A.primary,A.primary.type);A.markers.push(oe),oe.parent=A}}}function Sl(e){for(var r=function(A){var F=e[A],V=[F.primary.doc];Ni(F.primary.doc,function(ce){return V.push(ce)});for(var re=0;re<F.markers.length;re++){var oe=F.markers[re];ae(V,oe.doc)==-1&&(oe.parent=null,F.markers.splice(re--,1))}},R=0;R<e.length;R++)r(R)}var Cl=0,Na=function(e,r,R,A,F){if(!(this instanceof Na))return new Na(e,r,R,A,F);R==null&&(R=0),Eo.call(this,[new bo([new Yt("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var V=St(R,0);this.sel=fi(V),this.history=new jo(null),this.id=++Cl,this.modeOption=r,this.lineSep=A,this.direction=F=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:V,to:V,text:e}),xa(this,fi(V),Te)};Na.prototype=be(Eo.prototype,{constructor:Na,iter:function(e,r,R){R?this.iterN(e-this.first,r-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var R=0,A=0;A<r.length;++A)R+=r[A].height;this.insertInner(e-this.first,r,R)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=ba(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:Qn(function(e){var r=St(this.first,0),R=this.first+this.size-1;to(this,{from:r,to:St(R,qt(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ai(this.cm,0,0),xa(this,fi(r),Te)}),replaceRange:function(e,r,R,A){r=ur(this,r),R=R?ur(this,R):r,ro(this,e,r,R,A)},getRange:function(e,r,R){var A=Yn(this,ur(this,e),ur(this,r));return R===!1?A:A.join(R||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(ha(this,e))return qt(this,e)},getLineNumber:function(e){return Gr(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=qt(this,e)),nt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ur(this,e)},getCursor:function(e){var r=this.sel.primary(),R;return e==null||e=="head"?R=r.head:e=="anchor"?R=r.anchor:e=="end"||e=="to"||e===!1?R=r.to():R=r.from(),R},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Qn(function(e,r,R){Ts(this,ur(this,typeof e=="number"?St(e,r||0):e),null,R)}),setSelection:Qn(function(e,r,R){Ts(this,ur(this,e),ur(this,r||e),R)}),extendSelection:Qn(function(e,r,R){Uo(this,ur(this,e),r&&ur(this,r),R)}),extendSelections:Qn(function(e,r){ws(this,Gn(this,e),r)}),extendSelectionsBy:Qn(function(e,r){var R=le(this.sel.ranges,e);ws(this,Gn(this,R),r)}),setSelections:Qn(function(e,r,R){if(!e.length)return;for(var A=[],F=0;F<e.length;F++)A[F]=new vn(ur(this,e[F].anchor),ur(this,e[F].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),xa(this,Ja(this.cm,A,r),R)}),addSelection:Qn(function(e,r,R){var A=this.sel.ranges.slice(0);A.push(new vn(ur(this,e),ur(this,r||e))),xa(this,Ja(this.cm,A,A.length-1),R)}),getSelection:function(e){for(var r=this.sel.ranges,R,A=0;A<r.length;A++){var F=Yn(this,r[A].from(),r[A].to());R=R?R.concat(F):F}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],R=this.sel.ranges,A=0;A<R.length;A++){var F=Yn(this,R[A].from(),R[A].to());e!==!1&&(F=F.join(e||this.lineSeparator())),r[A]=F}return r},replaceSelection:function(e,r,R){for(var A=[],F=0;F<this.sel.ranges.length;F++)A[F]=e;this.replaceSelections(A,r,R||"+input")},replaceSelections:Qn(function(e,r,R){for(var A=[],F=this.sel,V=0;V<F.ranges.length;V++){var re=F.ranges[V];A[V]={from:re.from(),to:re.to(),text:this.splitLines(e[V]),origin:R}}for(var oe=r&&r!="end"&&No(this,A,r),ce=A.length-1;ce>=0;ce--)to(this,A[ce]);oe?Ss(this,oe):this.cm&&yi(this.cm)}),undo:Qn(function(){Ho(this,"undo")}),redo:Qn(function(){Ho(this,"redo")}),undoSelection:Qn(function(){Ho(this,"undo",!0)}),redoSelection:Qn(function(){Ho(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,R=0,A=0;A<e.done.length;A++)e.done[A].ranges||++r;for(var F=0;F<e.undone.length;F++)e.undone[F].ranges||++R;return{undo:r,redo:R}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),Ni(this,function(r){return r.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:qi(this.history.done),undone:qi(this.history.undone)}},setHistory:function(e){var r=this.history=new jo(this.history.maxGeneration);r.done=qi(e.done.slice(0),null,!0),r.undone=qi(e.undone.slice(0),null,!0)},setGutterMarker:Qn(function(e,r,R){return yo(this,e,"gutter",function(A){var F=A.gutterMarkers||(A.gutterMarkers={});return F[r]=R,!R&&Y(F)&&(A.gutterMarkers=null),!0})}),clearGutter:Qn(function(e){var r=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&yo(r,R,"gutter",function(){return R.gutterMarkers[e]=null,Y(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!ha(this,e))return null;if(r=e,e=qt(this,e),!e)return null}else if(r=Gr(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Qn(function(e,r,R){return yo(this,e,r=="gutter"?"gutter":"class",function(A){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!A[F])A[F]=R;else{if(O(R).test(A[F]))return!1;A[F]+=" "+R}return!0})}),removeLineClass:Qn(function(e,r,R){return yo(this,e,r=="gutter"?"gutter":"class",function(A){var F=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",V=A[F];if(V)if(R==null)A[F]=null;else{var re=V.match(O(R));if(!re)return!1;var oe=re.index+re[0].length;A[F]=V.slice(0,re.index)+(!re.index||oe==V.length?"":" ")+V.slice(oe)||null}else return!1;return!0})}),addLineWidget:Qn(function(e,r,R){return _l(this,e,r,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,R){return no(this,ur(this,e),ur(this,r),R,R&&R.type||"range")},setBookmark:function(e,r){var R={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=ur(this,e),no(this,e,e,R,"bookmark")},findMarksAt:function(e){e=ur(this,e);var r=[],R=qt(this,e.line).markedSpans;if(R)for(var A=0;A<R.length;++A){var F=R[A];(F.from==null||F.from<=e.ch)&&(F.to==null||F.to>=e.ch)&&r.push(F.marker.parent||F.marker)}return r},findMarks:function(e,r,R){e=ur(this,e),r=ur(this,r);var A=[],F=e.line;return this.iter(e.line,r.line+1,function(V){var re=V.markedSpans;if(re)for(var oe=0;oe<re.length;oe++){var ce=re[oe];!(ce.to!=null&&F==e.line&&e.ch>=ce.to||ce.from==null&&F!=e.line||ce.from!=null&&F==r.line&&ce.from>=r.ch)&&(!R||R(ce.marker))&&A.push(ce.marker.parent||ce.marker)}++F}),A},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var A=0;A<R.length;++A)R[A].from!=null&&e.push(R[A].marker)}),e},posFromIndex:function(e){var r,R=this.first,A=this.lineSeparator().length;return this.iter(function(F){var V=F.text.length+A;if(V>e)return r=e,!0;e-=V,++R}),ur(this,St(R,r))},indexFromPos:function(e){e=ur(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var R=this.lineSeparator().length;return this.iter(this.first,e.line,function(A){r+=A.text.length+R}),r},copy:function(e){var r=new Na(ba(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,R=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<R&&(R=e.to);var A=new Na(ba(this,r,R),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(A.history=this.history),(this.linked||(this.linked=[])).push({doc:A,sharedHist:e.sharedHist}),A.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(A,Us(this)),A},unlinkDoc:function(e){if(e instanceof Fn&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var R=this.linked[r];if(R.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var A=[e.id];Ni(e,function(F){return A.push(F.id)},!0),e.history=new jo(null),e.history.done=qi(this.history.done,A),e.history.undone=qi(this.history.undone,A)}},iterLinkedDocs:function(e){Ni(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):pr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Qn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&pl(this.cm)})}),Na.prototype.eachLine=Na.prototype.iter;var Bs=0;function Ol(e){var r=this;if(Ws(r),rt(r,e)||Vr(r.display,e))return;fe(e),w&&(Bs=+new Date);var R=Vn(r,e,!0),A=e.dataTransfer.files;if(!R||r.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var F=A.length,V=Array(F),re=0,oe=function(){++re==F&&Jn(r,function(){R=ur(r.doc,R);var $e={from:R,to:R,text:r.doc.splitLines(V.filter(function(mt){return mt!=null}).join(r.doc.lineSeparator())),origin:"paste"};to(r.doc,$e),Ss(r.doc,fi(ur(r.doc,R),ur(r.doc,hi($e))))})()},ce=function($e,mt){if(r.options.allowDropFileTypes&&ae(r.options.allowDropFileTypes,$e.type)==-1){oe();return}var Tt=new FileReader;Tt.onerror=function(){return oe()},Tt.onload=function(){var Ft=Tt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ft)){oe();return}V[mt]=Ft,oe()},Tt.readAsText($e)},me=0;me<A.length;me++)ce(A[me],me);else{if(r.state.draggingText&&r.doc.sel.contains(R)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Ie=e.dataTransfer.getData("Text");if(Ie){var Be;if(r.state.draggingText&&!r.state.draggingText.copy&&(Be=r.listSelections()),Bo(r.doc,fi(R,R)),Be)for(var et=0;et<Be.length;++et)ro(r.doc,"",Be[et].anchor,Be[et].head,"drag");r.replaceSelection(Ie,"around","paste"),r.display.input.focus()}}catch($e){}}}function Al(e,r){if(w&&(!e.state.draggingText||+new Date-Bs<100)){Ae(r);return}if(rt(e,r)||Vr(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!p){var R=T("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",_&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),r.dataTransfer.setDragImage(R,0,0),_&&R.parentNode.removeChild(R)}}function Rl(e,r){var R=Vn(e,r);if(!R)return;var A=document.createDocumentFragment();Sa(e,R,A),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),y(e.display.dragCursor,A)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),R=[],A=0;A<r.length;A++){var F=r[A].CodeMirror;F&&R.push(F)}R.length&&R[0].operation(function(){for(var V=0;V<R.length;V++)e(R[V])})}var Ks=!1;function Dl(){if(Ks)return;Pl(),Ks=!0}function Pl(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ll)},100))}),Ce(window,"blur",function(){return Hs(ri)})}function Ll(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var Fi={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"},wo=0;wo<10;wo++)Fi[wo+48]=Fi[wo+96]=String(wo);for(var Ko=65;Ko<=90;Ko++)Fi[Ko]=String.fromCharCode(Ko);for(var To=1;To<=12;To++)Fi[To+111]=Fi[To+63235]="F"+To;var Ri={};Ri.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"},Ri.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"},Ri.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"},Ri.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"]},Ri.default=o?Ri.macDefault:Ri.pcDefault;function Ml(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var R,A,F,V,re=0;re<r.length-1;re++){var oe=r[re];if(/^(cmd|meta|m)$/i.test(oe))V=!0;else if(/^a(lt)?$/i.test(oe))R=!0;else if(/^(c|ctrl|control)$/i.test(oe))A=!0;else if(/^s(hift)?$/i.test(oe))F=!0;else throw new Error("Unrecognized modifier name: "+oe)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),F&&(e="Shift-"+e),e}function Il(e){var r={};for(var R in e)if(e.hasOwnProperty(R)){var A=e[R];if(/^(name|fallthrough|(de|at)tach)$/.test(R))continue;if(A=="..."){delete e[R];continue}for(var F=le(R.split(" "),Ml),V=0;V<F.length;V++){var re=void 0,oe=void 0;V==F.length-1?(oe=F.join(" "),re=A):(oe=F.slice(0,V+1).join(" "),re="...");var ce=r[oe];if(!ce)r[oe]=re;else if(ce!=re)throw new Error("Inconsistent bindings for "+oe)}delete e[R]}for(var me in r)e[me]=r[me];return e}function ao(e,r,R,A){r=zo(r);var F=r.call?r.call(e,A):r[e];if(F===!1)return"nothing";if(F==="...")return"multi";if(F!=null&&R(F))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return ao(e,r.fallthrough,R,A);for(var V=0;V<r.fallthrough.length;V++){var re=ao(e,r.fallthrough[V],R,A);if(re)return re}}}function zs(e){var r=typeof e=="string"?e:Fi[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Gs(e,r,R){var A=e;return r.altKey&&A!="Alt"&&(e="Alt-"+e),(s?r.metaKey:r.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(s?r.ctrlKey:r.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&r.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Xs(e,r){if(_&&e.keyCode==34&&e.char)return!1;var R=Fi[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Gs(R,e,r))}function zo(e){return typeof e=="string"?Ri[e]:e}function io(e,r){for(var R=e.doc.sel.ranges,A=[],F=0;F<R.length;F++){for(var V=r(R[F]);A.length&&ir(V.from,ee(A).to)<=0;){var re=A.pop();if(ir(re.from,V.from)<0){V.from=re.from;break}}A.push(V)}Ca(e,function(){for(var oe=A.length-1;oe>=0;oe--)ro(e.doc,"",A[oe].from,A[oe].to,"+delete");yi(e)})}function is(e,r,R){var A=Ee(e.text,r+R,R);return A<0||A>e.text.length?null:A}function os(e,r,R){var A=is(e,r.ch,R);return A==null?null:new St(r.line,A,R<0?"after":"before")}function ss(e,r,R,A,F){if(e){r.doc.direction=="rtl"&&(F=-F);var V=lt(R,r.doc.direction);if(V){var re=F<0?ee(V):V[0],oe=F<0==(re.level==1),ce=oe?"after":"before",me;if(re.level>0||r.doc.direction=="rtl"){var Ie=ke(r,R);me=F<0?R.text.length-1:0;var Be=ze(r,Ie,me).top;me=Ke(function(et){return ze(r,Ie,et).top==Be},F<0==(re.level==1)?re.from:re.to-1,me),ce=="before"&&(me=is(R,me,1))}else me=F<0?re.to:re.from;return new St(A,me,ce)}}return new St(A,F<0?R.text.length:0,F<0?"before":"after")}function kl(e,r,R,A){var F=lt(r,e.doc.direction);if(!F)return os(r,R,A);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var V=tt(F,R.ch,R.sticky),re=F[V];if(e.doc.direction=="ltr"&&re.level%2==0&&(A>0?re.to>R.ch:re.from<R.ch))return os(r,R,A);var oe=function(Xt,rr){return is(r,Xt instanceof St?Xt.ch:Xt,rr)},ce,me=function(Xt){return e.options.lineWrapping?(ce=ce||ke(e,r),or(e,r,ce,Xt)):{begin:0,end:r.text.length}},Ie=me(R.sticky=="before"?oe(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var Be=re.level==1==A<0,et=oe(R,Be?1:-1);if(et!=null&&(Be?et<=re.to&&et<=Ie.end:et>=re.from&&et>=Ie.begin)){var $e=Be?"before":"after";return new St(R.line,et,$e)}}var mt=function(Xt,rr,Vt){for(var lr=function(Pn,da){return da?new St(R.line,oe(Pn,1),"before"):new St(R.line,Pn,"after")};Xt>=0&&Xt<F.length;Xt+=rr){var Rr=F[Xt],wr=rr>0==(Rr.level!=1),Qr=wr?Vt.begin:oe(Vt.end,-1);if(Rr.from<=Qr&&Qr<Rr.to)return lr(Qr,wr);if(Qr=wr?Rr.from:oe(Rr.to,-1),Vt.begin<=Qr&&Qr<Vt.end)return lr(Qr,wr)}},Tt=mt(V+A,A,Ie);if(Tt)return Tt;var Ft=A>0?Ie.end:oe(Ie.begin,-1);return Ft!=null&&!(A>0&&Ft==r.text.length)&&(Tt=mt(A>0?0:F.length-1,A,me(Ft)),Tt)?Tt:null}var So={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Te)},killLine:function(e){return io(e,function(r){if(r.empty()){var R=qt(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line<e.lastLine()?{from:r.head,to:St(r.head.line+1,0)}:{from:r.head,to:St(r.head.line,R)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return io(e,function(r){return{from:St(r.from().line,0),to:ur(e.doc,St(r.to().line+1,0))}})},delLineLeft:function(e){return io(e,function(r){return{from:St(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return io(e,function(r){var R=e.charCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return{from:A,to:r.from()}})},delWrappedLineRight:function(e){return io(e,function(r){var R=e.charCoords(r.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:r.from(),to:A}})},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(St(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(St(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Vs(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return $s(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return Nl(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div")},xe)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},xe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var R=e.cursorCoords(r.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return A.ch<e.getLine(A.line).search(/\S/)?$s(e,r.head):A},xe)},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 r=[],R=e.listSelections(),A=e.options.tabSize,F=0;F<R.length;F++){var V=R[F].from(),re=K(e.getLine(V.line),V.ch,A);r.push(ie(A-re%A))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ca(e,function(){for(var r=e.listSelections(),R=[],A=0;A<r.length;A++){if(!r[A].empty())continue;var F=r[A].head,V=qt(e.doc,F.line).text;if(V){if(F.ch==V.length&&(F=new St(F.line,F.ch-1)),F.ch>0)F=new St(F.line,F.ch+1),e.replaceRange(V.charAt(F.ch-1)+V.charAt(F.ch-2),St(F.line,F.ch-2),F,"+transpose");else if(F.line>e.doc.first){var re=qt(e.doc,F.line-1).text;re&&(F=new St(F.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),St(F.line-1,re.length-1),F,"+transpose"))}}R.push(new vn(F,F))}e.setSelections(R)})},newlineAndIndent:function(e){return Ca(e,function(){for(var r=e.listSelections(),R=r.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),r[R].anchor,r[R].head,"+input");r=e.listSelections();for(var A=0;A<r.length;A++)e.indentLine(r[A].from().line,null,!0);yi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,r){var R=qt(e.doc,r),A=nt(R);return A!=R&&(r=Gr(A)),ss(!0,e,A,r,1)}function Nl(e,r){var R=qt(e.doc,r),A=it(R);return A!=R&&(r=Gr(A)),ss(!0,e,R,r,-1)}function $s(e,r){var R=Vs(e,r.line),A=qt(e.doc,R.line),F=lt(A,e.doc.direction);if(!F||F[0].level==0){var V=Math.max(R.ch,A.text.search(/\S/)),re=r.line==R.line&&r.ch<=V&&r.ch;return St(R.line,re?0:V,R.sticky)}return R}function Go(e,r,R){if(typeof r=="string"&&(r=So[r],!r))return!1;e.display.input.ensurePolled();var A=e.display.shift,F=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),F=r(e)!=we}finally{e.display.shift=A,e.state.suppressEdits=!1}return F}function jl(e,r,R){for(var A=0;A<e.state.keyMaps.length;A++){var F=ao(r,e.state.keyMaps[A],R,e);if(F)return F}return e.options.extraKeys&&ao(r,e.options.extraKeys,R,e)||ao(r,e.options.keyMap,R,e)}var Fl=new q;function Co(e,r,R,A){var F=e.state.keySeq;if(F){if(zs(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==F&&(e.state.keySeq=null,e.display.input.reset())}),Ys(e,F+" "+r,R,A))return!0}return Ys(e,r,R,A)}function Ys(e,r,R,A){var F=jl(e,r,A);return F=="multi"&&(e.state.keySeq=r),F=="handled"&&Bt(e,"keyHandled",e,r,R),(F=="handled"||F=="multi")&&(fe(R),Wn(e)),!!F}function Js(e,r){var R=Xs(r,!0);return R?r.shiftKey&&!e.state.keySeq?Co(e,"Shift-"+R,r,function(A){return Go(e,A,!0)})||Co(e,R,r,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Go(e,A)}):Co(e,R,r,function(A){return Go(e,A)}):!1}function Ul(e,r,R){return Co(e,"'"+R+"'",r,function(A){return Go(e,A,!0)})}var ls=null;function Qs(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=G(),rt(r,e))return;w&&d<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;r.display.shift=R==16||e.shiftKey;var A=Js(r,e);_&&(ls=A?R:null,!A&&R==88&&!Yr&&(o?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),C&&!o&&!A&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Bl(r)}function Bl(e){var r=e.display.lineDiv;H(r,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(E(r,"CodeMirror-crosshair"),st(document,"keyup",R),st(document,"mouseover",R))}Ce(document,"keyup",R),Ce(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),rt(this,e)}function el(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Vr(r.display,e)||rt(r,e)||e.ctrlKey&&!e.altKey||o&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(_&&R==ls){ls=null,fe(e);return}if(_&&(!e.which||e.which<10)&&Js(r,e))return;var F=String.fromCharCode(A==null?R:A);if(F=="\b")return;if(Ul(r,e,F))return;r.display.input.onKeyPress(e)}var Wl=400,us=function(e,r,R){this.time=e,this.pos=r,this.button=R};us.prototype.compare=function(e,r,R){return this.time+Wl>e&&ir(r,this.pos)==0&&R==this.button};var Oo,Ao;function Hl(e,r){var R=+new Date;return Ao&&Ao.compare(R,e,r)?(Oo=Ao=null,"triple"):Oo&&Oo.compare(R,e,r)?(Ao=new us(R,e,r),Oo=null,"double"):(Oo=new us(R,e,r),Ao=null,"single")}function tl(e){var r=this,R=r.display;if(rt(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,Vr(R,e)){i||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(r,e))return;var A=Vn(r,e),F=Xe(e),V=A?Hl(A,F):"single";if(window.focus(),F==1&&r.state.selectingText&&r.state.selectingText(e),A&&Kl(r,F,A,V,e))return;F==1?A?Gl(r,A,V,e):We(e)==R.scroller&&fe(e):F==2?(A&&Uo(r.doc,A),setTimeout(function(){return R.input.focus()},20)):F==3&&(P?r.display.input.onContextMenu(e):_i(r))}function Kl(e,r,R,A,F){var V="Click";return A=="double"?V="Double"+V:A=="triple"&&(V="Triple"+V),V=(r==1?"Left":r==2?"Middle":"Right")+V,Co(e,Gs(V,F),F,function(re){if(typeof re=="string"&&(re=So[re]),!re)return!1;var oe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),oe=re(e,R)!=we}finally{e.state.suppressEdits=!1}return oe})}function zl(e,r,R){var A=e.getOption("configureMouse"),F=A?A(e,r,R):{};if(F.unit==null){var V=t?R.shiftKey&&R.metaKey:R.altKey;F.unit=V?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(F.extend==null||e.doc.extend)&&(F.extend=e.doc.extend||R.shiftKey),F.addNew==null&&(F.addNew=o?R.metaKey:R.ctrlKey),F.moveOnDrag==null&&(F.moveOnDrag=!(o?R.altKey:R.ctrlKey)),F}function Gl(e,r,R,A){w?setTimeout(U(Bi,e),0):e.curOp.focus=G();var F=zl(e,R,A),V=e.doc.sel,re;e.options.dragDrop&&ft&&!e.isReadOnly()&&R=="single"&&(re=V.contains(r))>-1&&(ir((re=V.ranges[re]).from(),r)<0||r.xRel>0)&&(ir(re.to(),r)>0||r.xRel<0)?Xl(e,A,r,F):Vl(e,A,r,F)}function Xl(e,r,R,A){var F=e.display,V=!1,re=Jn(e,function(me){i&&(F.scroller.draggable=!1),e.state.draggingText=!1,st(F.wrapper.ownerDocument,"mouseup",re),st(F.wrapper.ownerDocument,"mousemove",oe),st(F.scroller,"dragstart",ce),st(F.scroller,"drop",re),V||(fe(me),A.addNew||Uo(e.doc,R,null,null,A.extend),i&&!p||w&&d==9?setTimeout(function(){F.wrapper.ownerDocument.body.focus({preventScroll:!0}),F.input.focus()},20):F.input.focus())}),oe=function(me){V=V||Math.abs(r.clientX-me.clientX)+Math.abs(r.clientY-me.clientY)>=10},ce=function(){return V=!0};i&&(F.scroller.draggable=!0),e.state.draggingText=re,re.copy=!A.moveOnDrag,F.scroller.dragDrop&&F.scroller.dragDrop(),Ce(F.wrapper.ownerDocument,"mouseup",re),Ce(F.wrapper.ownerDocument,"mousemove",oe),Ce(F.scroller,"dragstart",ce),Ce(F.scroller,"drop",re),_i(e),setTimeout(function(){return F.input.focus()},20)}function rl(e,r,R){if(R=="char")return new vn(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new vn(St(r.line,0),ur(e.doc,St(r.line+1,0)));var A=R(e,r);return new vn(A.from,A.to)}function Vl(e,r,R,A){var F=e.display,V=e.doc;fe(r);var re,oe,ce=V.sel,me=ce.ranges;if(A.addNew&&!A.extend?(oe=V.sel.contains(R),oe>-1?re=me[oe]:re=new vn(R,R)):(re=V.sel.primary(),oe=V.sel.primIndex),A.unit=="rectangle")A.addNew||(re=new vn(R,R)),R=Vn(e,r,!0,!0),oe=-1;else{var Ie=rl(e,R,A.unit);A.extend?re=ns(re,Ie.anchor,Ie.head,A.extend):re=Ie}A.addNew?oe==-1?(oe=me.length,xa(V,Ja(e,me.concat([re]),oe),{scroll:!1,origin:"*mouse"})):me.length>1&&me[oe].empty()&&A.unit=="char"&&!A.extend?(xa(V,Ja(e,me.slice(0,oe).concat(me.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ce=V.sel):as(V,oe,re,de):(oe=0,xa(V,new Aa([re],0),de),ce=V.sel);var Be=R;function et(Vt){if(ir(Be,Vt)==0)return;if(Be=Vt,A.unit=="rectangle"){for(var lr=[],Rr=e.options.tabSize,wr=K(qt(V,R.line).text,R.ch,Rr),Qr=K(qt(V,Vt.line).text,Vt.ch,Rr),Pn=Math.min(wr,Qr),da=Math.max(wr,Qr),Hn=Math.min(R.line,Vt.line),za=Math.min(e.lastLine(),Math.max(R.line,Vt.line));Hn<=za;Hn++){var ja=qt(V,Hn).text,ra=pe(ja,Pn,Rr);Pn==da?lr.push(new vn(St(Hn,ra),St(Hn,ra))):ja.length>ra&&lr.push(new vn(St(Hn,ra),St(Hn,pe(ja,da,Rr))))}lr.length||lr.push(new vn(R,R)),xa(V,Ja(e,ce.ranges.slice(0,oe).concat(lr),oe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Vt)}else{var Fa=re,ga=rl(e,Vt,A.unit),sa=Fa.anchor,na;ir(ga.anchor,sa)>0?(na=ga.head,sa=pa(Fa.from(),ga.anchor)):(na=ga.anchor,sa=Pa(Fa.to(),ga.head));var $n=ce.ranges.slice(0);$n[oe]=$l(e,new vn(ur(V,sa),na)),xa(V,Ja(e,$n,oe),de)}}var $e=F.wrapper.getBoundingClientRect(),mt=0;function Tt(Vt){var lr=++mt,Rr=Vn(e,Vt,!0,A.unit=="rectangle");if(!Rr)return;if(ir(Rr,Be)!=0){e.curOp.focus=G(),et(Rr);var wr=Mi(F,V);(Rr.line>=wr.to||Rr.line<wr.from)&&setTimeout(Jn(e,function(){mt==lr&&Tt(Vt)}),150)}else{var Qr=Vt.clientY<$e.top?-20:Vt.clientY>$e.bottom?20:0;Qr&&setTimeout(Jn(e,function(){if(mt!=lr)return;F.scroller.scrollTop+=Qr,Tt(Vt)}),50)}}function Ft(Vt){e.state.selectingText=!1,mt=Infinity,Vt&&(fe(Vt),F.input.focus()),st(F.wrapper.ownerDocument,"mousemove",Xt),st(F.wrapper.ownerDocument,"mouseup",rr),V.history.lastSelOrigin=null}var Xt=Jn(e,function(Vt){Vt.buttons===0||!Xe(Vt)?Ft(Vt):Tt(Vt)}),rr=Jn(e,Ft);e.state.selectingText=rr,Ce(F.wrapper.ownerDocument,"mousemove",Xt),Ce(F.wrapper.ownerDocument,"mouseup",rr)}function $l(e,r){var R=r.anchor,A=r.head,F=qt(e.doc,R.line);if(ir(R,A)==0&&R.sticky==A.sticky)return r;var V=lt(F);if(!V)return r;var re=tt(V,R.ch,R.sticky),oe=V[re];if(oe.from!=R.ch&&oe.to!=R.ch)return r;var ce=re+(oe.from==R.ch==(oe.level!=1)?0:1);if(ce==0||ce==V.length)return r;var me;if(A.line!=R.line)me=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ie=tt(V,A.ch,A.sticky),Be=Ie-re||(A.ch-R.ch)*(oe.level==1?-1:1);Ie==ce-1||Ie==ce?me=Be<0:me=Be>0}var et=V[ce+(me?-1:0)],$e=me==(et.level==1),mt=$e?et.from:et.to,Tt=$e?"after":"before";return R.ch==mt&&R.sticky==Tt?r:new vn(new St(R.line,mt,Tt),A)}function nl(e,r,R,A){var F,V;if(r.touches)F=r.touches[0].clientX,V=r.touches[0].clientY;else try{F=r.clientX,V=r.clientY}catch(et){return!1}if(F>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&fe(r);var re=e.display,oe=re.lineDiv.getBoundingClientRect();if(V>oe.bottom||!Se(e,R))return _e(r);V-=oe.top-re.viewOffset;for(var ce=0;ce<e.display.gutterSpecs.length;++ce){var me=re.gutters.childNodes[ce];if(me&&me.getBoundingClientRect().right>=F){var Ie=kn(e.doc,V),Be=e.display.gutterSpecs[ce];return Ge(e,R,e,Ie,Be.className,r),_e(r)}}}function cs(e,r){return nl(e,r,"gutterClick",!0)}function al(e,r){if(Vr(e.display,r)||Yl(e,r))return;if(rt(e,r,"contextmenu"))return;P||e.display.input.onContextMenu(r)}function Yl(e,r){return Se(e,"gutterContextMenu")?nl(e,r,"gutterContextMenu",!1):!1}function il(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Pr(e)}var oo={toString:function(){return"CodeMirror.Init"}},ol={},Xo={};function Jl(e){var r=e.optionHandlers;function R(A,F,V,re){e.defaults[A]=F,V&&(r[A]=re?function(oe,ce,me){me!=oo&&V(oe,ce,me)}:V)}e.defineOption=R,e.Init=oo,R("value","",function(A,F){return A.setValue(F)},!0),R("mode",null,function(A,F){A.doc.modeOption=F,Ai(A)},!0),R("indentUnit",2,Ai,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){vo(A),Pr(A),_n(A)},!0),R("lineSeparator",null,function(A,F){if(A.doc.lineSep=F,!F)return;var V=[],re=A.doc.first;A.doc.iter(function(ce){for(var me=0;;){var Ie=ce.text.indexOf(F,me);if(Ie==-1)break;me=Ie+F.length,V.push(St(re,Ie))}re++});for(var oe=V.length-1;oe>=0;oe--)ro(A.doc,F,V[oe],St(V[oe].line,V[oe].ch+F.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,F,V){A.state.specialChars=new RegExp(F.source+(F.test(" ")?"":"| "),"g"),V!=oo&&A.refresh()}),R("specialCharPlaceholder",Nr,function(A){return A.refresh()},!0),R("electricChars",!0),R("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(A,F){return A.getInputField().spellcheck=F},!0),R("autocorrect",!1,function(A,F){return A.getInputField().autocorrect=F},!0),R("autocapitalize",!1,function(A,F){return A.getInputField().autocapitalize=F},!0),R("rtlMoveVisually",!S),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){il(A),di(A)},!0),R("keyMap","default",function(A,F,V){var re=zo(F),oe=V!=oo&&zo(V);oe&&oe.detach&&oe.detach(A,re),re.attach&&re.attach(A,oe||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,F){A.display.gutterSpecs=Oa(F,A.options.lineNumbers),di(A)},!0),R("fixedGutter",!0,function(A,F){A.display.gutters.style.left=F?ta(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return $t(A)},!0),R("scrollbarStyle","native",function(A){ci(A),$t(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,F){A.display.gutterSpecs=Oa(A.options.gutters,F),di(A)},!0),R("firstLineNumber",1,di,!0),R("lineNumberFormatter",function(A){return A},di,!0),R("showCursorWhenSelecting",!1,hn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,F){F=="nocursor"&&(ri(A),A.display.input.blur()),A.display.input.readOnlyChanged(F)}),R("screenReaderLabel",null,function(A,F){F=F===""?null:F,A.display.input.screenReaderLabelChanged(F)}),R("disableInput",!1,function(A,F){F||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,hn,!0),R("singleCursorHeightPerLine",!0,hn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,vo,!0),R("addModeClass",!1,vo,!0),R("pollInterval",100),R("undoDepth",200,function(A,F){return A.doc.history.undoDepth=F}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,vo,!0),R("moveInputWithCursor",!0,function(A,F){F||A.display.input.resetPosition()}),R("tabindex",null,function(A,F){return A.display.input.getField().tabIndex=F||""}),R("autofocus",null),R("direction","ltr",function(A,F){return A.doc.setDirection(F)},!0),R("phrases",null)}function Ql(e,r,R){var A=R&&R!=oo;if(!r!=!A){var F=e.display.dragFunctions,V=r?Ce:st;V(e.display.scroller,"dragstart",F.start),V(e.display.scroller,"dragenter",F.enter),V(e.display.scroller,"dragover",F.over),V(e.display.scroller,"dragleave",F.leave),V(e.display.scroller,"drop",F.drop)}}function Zl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),nr(e)),ca(e),_n(e),Pr(e),setTimeout(function(){return $t(e)},100)}function Fn(e,r){var R=this;if(!(this instanceof Fn))return new Fn(e,r);this.options=r=r?B(r):{},B(ol,r,!1);var A=r.value;typeof A=="string"?A=new Na(A,r.mode,null,r.lineSeparator,r.direction):r.mode&&(A.modeOption=r.mode),this.doc=A;var F=new Fn.inputStyles[r.inputStyle](this),V=this.display=new zi(e,A,F,r);V.wrapper.CodeMirror=this,il(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ci(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 q,keySeq:null,specialChars:null},r.autofocus&&!n&&V.input.focus(),w&&d<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),Tn(this),this.curOp.forceUpdate=!0,gs(this,A),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ti(R)},20):ri(this);for(var re in Xo)Xo.hasOwnProperty(re)&&Xo[re](this,r[re],oo);ia(this),r.finishInit&&r.finishInit(this);for(var oe=0;oe<ds.length;++oe)ds[oe](this);Ci(this),i&&r.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Fn.defaults=ol,Fn.optionHandlers=Xo;function ql(e){var r=e.display;Ce(r.scroller,"mousedown",Jn(e,tl)),w&&d<11?Ce(r.scroller,"dblclick",Jn(e,function(ce){if(rt(e,ce))return;var me=Vn(e,ce);if(!me||cs(e,ce)||Vr(e.display,ce))return;fe(ce);var Ie=e.findWordAt(me);Uo(e.doc,Ie.anchor,Ie.head)})):Ce(r.scroller,"dblclick",function(ce){return rt(e,ce)||fe(ce)}),Ce(r.scroller,"contextmenu",function(ce){return al(e,ce)}),Ce(r.input.getField(),"contextmenu",function(ce){r.scroller.contains(ce.target)||al(e,ce)});var R,A={end:0};function F(){r.activeTouch&&(R=setTimeout(function(){return r.activeTouch=null},1e3),A=r.activeTouch,A.end=+new Date)}function V(ce){if(ce.touches.length!=1)return!1;var me=ce.touches[0];return me.radiusX<=1&&me.radiusY<=1}function re(ce,me){if(me.left==null)return!0;var Ie=me.left-ce.left,Be=me.top-ce.top;return Ie*Ie+Be*Be>20*20}Ce(r.scroller,"touchstart",function(ce){if(!rt(e,ce)&&!V(ce)&&!cs(e,ce)){r.input.ensurePolled(),clearTimeout(R);var me=+new Date;r.activeTouch={start:me,moved:!1,prev:me-A.end<=300?A:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Ce(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ce(r.scroller,"touchend",function(ce){var me=r.activeTouch;if(me&&!Vr(r,ce)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ie=e.coordsChar(r.activeTouch,"page"),Be;!me.prev||re(me,me.prev)?Be=new vn(Ie,Ie):!me.prev.prev||re(me,me.prev.prev)?Be=e.findWordAt(Ie):Be=new vn(St(Ie.line,0),ur(e.doc,St(Ie.line+1,0))),e.setSelection(Be.anchor,Be.head),e.focus(),fe(ce)}F()}),Ce(r.scroller,"touchcancel",F),Ce(r.scroller,"scroll",function(){r.scroller.clientHeight&&(ii(e,r.scroller.scrollTop),ka(e,r.scroller.scrollLeft,!0),Ge(e,"scroll",e))}),Ce(r.scroller,"mousewheel",function(ce){return po(e,ce)}),Ce(r.scroller,"DOMMouseScroll",function(ce){return po(e,ce)}),Ce(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ce){rt(e,ce)||Ae(ce)},over:function(ce){rt(e,ce)||(Rl(e,ce),Ae(ce))},start:function(ce){return Al(e,ce)},drop:Jn(e,Ol),leave:function(ce){rt(e,ce)||Ws(e)}};var oe=r.input.getField();Ce(oe,"keyup",function(ce){return Zs.call(e,ce)}),Ce(oe,"keydown",Jn(e,Qs)),Ce(oe,"keypress",Jn(e,el)),Ce(oe,"focus",function(ce){return ti(e,ce)}),Ce(oe,"blur",function(ce){return ri(e,ce)})}var ds=[];Fn.defineInitHook=function(e){return ds.push(e)};function Ro(e,r,R,A){var F=e.doc,V;R==null&&(R="add"),R=="smart"&&(F.mode.indent?V=Un(e,r).state:R="prev");var re=e.options.tabSize,oe=qt(F,r),ce=K(oe.text,null,re);oe.stateAfter&&(oe.stateAfter=null);var me=oe.text.match(/^\s*/)[0],Ie;if(!A&&!/\S/.test(oe.text))Ie=0,R="not";else if(R=="smart"&&(Ie=F.mode.indent(V,oe.text.slice(me.length),oe.text),Ie==we||Ie>150)){if(!A)return;R="prev"}R=="prev"?r>F.first?Ie=K(qt(F,r-1).text,null,re):Ie=0:R=="add"?Ie=ce+e.options.indentUnit:R=="subtract"?Ie=ce-e.options.indentUnit:typeof R=="number"&&(Ie=ce+R),Ie=Math.max(0,Ie);var Be="",et=0;if(e.options.indentWithTabs)for(var $e=Math.floor(Ie/re);$e;--$e)et+=re,Be+=" ";if(et<Ie&&(Be+=ie(Ie-et)),Be!=me)return ro(F,Be,St(r,0),St(r,me.length),"+input"),oe.stateAfter=null,!0;for(var mt=0;mt<F.sel.ranges.length;mt++){var Tt=F.sel.ranges[mt];if(Tt.head.line==r&&Tt.head.ch<me.length){var Ft=St(r,me.length);as(F,mt,new vn(Ft,Ft));break}}}var pi=null;function Vo(e){pi=e}function fs(e,r,R,A,F){var V=e.doc;e.display.shift=!1,A||(A=V.sel);var re=+new Date-200,oe=F=="paste"||e.state.pasteIncoming>re,ce=pr(r),me=null;if(oe&&A.ranges.length>1)if(pi&&pi.text.join(`
`)==r){if(A.ranges.length%pi.text.length==0){me=[];for(var Ie=0;Ie<pi.text.length;Ie++)me.push(V.splitLines(pi.text[Ie]))}}else ce.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(me=le(ce,function(Xt){return[Xt]}));for(var Be=e.curOp.updateInput,et=A.ranges.length-1;et>=0;et--){var $e=A.ranges[et],mt=$e.from(),Tt=$e.to();$e.empty()&&(R&&R>0?mt=St(mt.line,mt.ch-R):e.state.overwrite&&!oe?Tt=St(Tt.line,Math.min(qt(V,Tt.line).text.length,Tt.ch+ee(ce).length)):oe&&pi&&pi.lineWise&&pi.text.join(`
`)==ce.join(`
`)&&(mt=Tt=St(mt.line,0)));var Ft={from:mt,to:Tt,text:me?me[et%me.length]:ce,origin:F||(oe?"paste":e.state.cutIncoming>re?"cut":"+input")};to(e.doc,Ft),Bt(e,"inputRead",e,Ft)}r&&!oe&&ll(e,r),yi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Be),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ca(r,function(){return fs(r,R,0,null,"paste")}),!0}function ll(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var F=R.ranges[A];if(F.head.ch>100||A&&R.ranges[A-1].head.line==F.head.line)continue;var V=e.getModeAt(F.head),re=!1;if(V.electricChars){for(var oe=0;oe<V.electricChars.length;oe++)if(r.indexOf(V.electricChars.charAt(oe))>-1){re=Ro(e,F.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(qt(e.doc,F.head.line).text.slice(0,F.head.ch))&&(re=Ro(e,F.head.line,"smart")));re&&Bt(e,"electricInput",e,F.head.line)}}function ul(e){for(var r=[],R=[],A=0;A<e.doc.sel.ranges.length;A++){var F=e.doc.sel.ranges[A].head.line,V={anchor:St(F,0),head:St(F+1,0)};R.push(V),r.push(e.getRange(V.anchor,V.head))}return{text:r,ranges:R}}function cl(e,r,R,A){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!r)}function dl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return i?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),cl(e),r}function eu(e){var r=e.optionHandlers,R=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,F){var V=this.options,re=V[A];if(V[A]==F&&A!="mode")return;V[A]=F,r.hasOwnProperty(A)&&Jn(this,r[A])(this,F,re),Ge(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,F){this.state.keyMaps[F?"push":"unshift"](zo(A))},removeKeyMap:function(A){for(var F=this.state.keyMaps,V=0;V<F.length;++V)if(F[V]==A||F[V].name==A)return F.splice(V,1),!0},addOverlay:va(function(A,F){var V=A.token?A:e.getMode(this.options,A);if(V.startState)throw new Error("Overlays may not be stateful.");Q(this.state.overlays,{mode:V,modeSpec:A,opaque:F&&F.opaque,priority:F&&F.priority||0},function(re){return re.priority}),this.state.modeGen++,_n(this)}),removeOverlay:va(function(A){for(var F=this.state.overlays,V=0;V<F.length;++V){var re=F[V].modeSpec;if(re==A||typeof A=="string"&&re.name==A){F.splice(V,1),this.state.modeGen++,_n(this);return}}}),indentLine:va(function(A,F,V){typeof F!="string"&&typeof F!="number"&&(F==null?F=this.options.smartIndent?"smart":"prev":F=F?"add":"subtract"),ha(this.doc,A)&&Ro(this,A,F,V)}),indentSelection:va(function(A){for(var F=this.doc.sel.ranges,V=-1,re=0;re<F.length;re++){var oe=F[re];if(oe.empty())oe.head.line>V&&(Ro(this,oe.head.line,A,!0),V=oe.head.line,re==this.doc.sel.primIndex&&yi(this));else{var ce=oe.from(),me=oe.to(),Ie=Math.max(V,ce.line);V=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var Be=Ie;Be<V;++Be)Ro(this,Be,A);var et=this.doc.sel.ranges;ce.ch==0&&F.length==et.length&&et[re].from().ch>0&&as(this.doc,re,new vn(ce,et[re].to()),Te)}}}),getTokenAt:function(A,F){return Nn(this,A,F)},getLineTokens:function(A,F){return Nn(this,St(A),F,!0)},getTokenTypeAt:function(A){A=ur(this.doc,A);var F=La(this,qt(this.doc,A.line)),V=0,re=(F.length-1)/2,oe=A.ch,ce;if(oe==0)ce=F[2];else for(;;){var me=V+re>>1;if((me?F[me*2-1]:0)>=oe)re=me;else if(F[me*2+1]<oe)V=me+1;else{ce=F[me*2+2];break}}var Ie=ce?ce.indexOf("overlay "):-1;return Ie<0?ce:Ie==0?null:ce.slice(0,Ie-1)},getModeAt:function(A){var F=this.doc.mode;return F.innerMode?e.innerMode(F,this.getTokenAt(A).state).mode:F},getHelper:function(A,F){return this.getHelpers(A,F)[0]},getHelpers:function(A,F){var V=[];if(!R.hasOwnProperty(F))return V;var re=R[F],oe=this.getModeAt(A);if(typeof oe[F]=="string")re[oe[F]]&&V.push(re[oe[F]]);else if(oe[F])for(var ce=0;ce<oe[F].length;ce++){var me=re[oe[F][ce]];me&&V.push(me)}else oe.helperType&&re[oe.helperType]?V.push(re[oe.helperType]):re[oe.name]&&V.push(re[oe.name]);for(var Ie=0;Ie<re._global.length;Ie++){var Be=re._global[Ie];Be.pred(oe,this)&&ae(V,Be.val)==-1&&V.push(Be.val)}return V},getStateAfter:function(A,F){var V=this.doc;return A=Ln(V,A==null?V.first+V.size-1:A),Un(this,A+1,F).state},cursorCoords:function(A,F){var V,re=this.doc.sel.primary();return A==null?V=re.head:typeof A=="object"?V=ur(this.doc,A):V=A?re.from():re.to(),zr(this,V,F||"page")},charCoords:function(A,F){return gn(this,ur(this.doc,A),F||"page")},coordsChar:function(A,F){return A=Kr(this,A,F||"page"),Fr(this,A.left,A.top)},lineAtHeight:function(A,F){return A=Kr(this,{top:A,left:0},F||"page").top,kn(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,F,V){var re=!1,oe;if(typeof A=="number"){var ce=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ce&&(A=ce,re=!0),oe=qt(this.doc,A)}else oe=A;return Jr(this,oe,{top:0,left:0},F||"page",V||re).top+(re?this.doc.height-jt(oe):0)},defaultTextHeight:function(){return jn(this.display)},defaultCharWidth:function(){return Xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,F,V,re,oe){var ce=this.display;A=zr(this,ur(this.doc,A));var me=A.bottom,Ie=A.left;if(F.style.position="absolute",F.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(F),ce.sizer.appendChild(F),re=="over")me=A.top;else if(re=="above"||re=="near"){var Be=Math.max(ce.wrapper.clientHeight,this.doc.height),et=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||A.bottom+F.offsetHeight>Be)&&A.top>F.offsetHeight?me=A.top-F.offsetHeight:A.bottom+F.offsetHeight<=Be&&(me=A.bottom),Ie+F.offsetWidth>et&&(Ie=et-F.offsetWidth)}F.style.top=me+"px",F.style.left=F.style.right="",oe=="right"?(Ie=ce.sizer.clientWidth-F.offsetWidth,F.style.right="0px"):(oe=="left"?Ie=0:oe=="middle"&&(Ie=(ce.sizer.clientWidth-F.offsetWidth)/2),F.style.left=Ie+"px"),V&&Ii(this,{left:Ie,top:me,right:Ie+F.offsetWidth,bottom:me+F.offsetHeight})},triggerOnKeyDown:va(Qs),triggerOnKeyPress:va(el),triggerOnKeyUp:Zs,triggerOnMouseDown:va(tl),execCommand:function(A){if(So.hasOwnProperty(A))return So[A].call(null,this)},triggerElectric:va(function(A){ll(this,A)}),findPosH:function(A,F,V,re){var oe=1;F<0&&(oe=-1,F=-F);for(var ce=ur(this.doc,A),me=0;me<F&&!(ce=hs(this.doc,ce,oe,V,re),ce.hitSide);++me);return ce},moveH:va(function(A,F){var V=this;this.extendSelectionsBy(function(re){return V.display.shift||V.doc.extend||re.empty()?hs(V.doc,re.head,A,F,V.options.rtlMoveVisually):A<0?re.from():re.to()},xe)}),deleteH:va(function(A,F){var V=this.doc.sel,re=this.doc;V.somethingSelected()?re.replaceSelection("",null,"+delete"):io(this,function(oe){var ce=hs(re,oe.head,A,F,!1);return A<0?{from:ce,to:oe.head}:{from:oe.head,to:ce}})}),findPosV:function(A,F,V,re){var oe=1,ce=re;F<0&&(oe=-1,F=-F);for(var me=ur(this.doc,A),Ie=0;Ie<F;++Ie){var Be=zr(this,me,"div");if(ce==null?ce=Be.left:Be.left=ce,me=fl(this,Be,oe,V),me.hitSide)break}return me},moveV:va(function(A,F){var V=this,re=this.doc,oe=[],ce=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Ie){if(ce)return A<0?Ie.from():Ie.to();var Be=zr(V,Ie.head,"div");Ie.goalColumn!=null&&(Be.left=Ie.goalColumn),oe.push(Be.left);var et=fl(V,Be,A,F);return F=="page"&&Ie==re.sel.primary()&&Ti(V,gn(V,et,"div").top-Be.top),et},xe),oe.length)for(var me=0;me<re.sel.ranges.length;me++)re.sel.ranges[me].goalColumn=oe[me]}),findWordAt:function(A){var F=this.doc,V=qt(F,A.line).text,re=A.ch,oe=A.ch;if(V){var ce=this.getHelper(A,"wordChars");(A.sticky=="before"||oe==V.length)&&re?--re:++oe;for(var me=V.charAt(re),Ie=X(me,ce)?function(Be){return X(Be,ce)}:/\s/.test(me)?function(Be){return/\s/.test(Be)}:function(Be){return!/\s/.test(Be)&&!X(Be)};re>0&&Ie(V.charAt(re-1));)--re;for(;oe<V.length&&Ie(V.charAt(oe));)++oe}return new vn(St(A.line,re),St(A.line,oe))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),Ge(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:va(function(A,F){ai(this,A,F)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-He(this)-this.display.barHeight,width:A.scrollWidth-He(this)-this.display.barWidth,clientHeight:he(this),clientWidth:Me(this)}},scrollIntoView:va(function(A,F){A==null?(A={from:this.doc.sel.primary().head,to:null},F==null&&(F=this.options.cursorScrollMargin)):typeof A=="number"?A={from:St(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=F||0,A.from.line!=null?co(this,A):Si(this,A.from,A.to,A.margin)}),setSize:va(function(A,F){var V=this,re=function(ce){return typeof ce=="number"||/^\d+$/.test(String(ce))?ce+"px":ce};A!=null&&(this.display.wrapper.style.width=re(A)),F!=null&&(this.display.wrapper.style.height=re(F)),this.options.lineWrapping&&Sr(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(ce){if(ce.widgets){for(var me=0;me<ce.widgets.length;me++)if(ce.widgets[me].noHScroll){Dn(V,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,Ge(this,"refresh",this)}),operation:function(A){return Ca(this,A)},startOperation:function(){return Tn(this)},endOperation:function(){return Ci(this)},refresh:va(function(){var A=this.display.cachedTextHeight;_n(this),this.curOp.forceUpdate=!0,Pr(this),ai(this,this.doc.scrollLeft,this.doc.scrollTop),Ji(this.display),(A==null||Math.abs(A-jn(this.display))>.5||this.options.lineWrapping)&&ca(this),Ge(this,"refresh",this)}),swapDoc:va(function(A){var F=this.doc;return F.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),Pr(this),this.display.input.reset(),ai(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,Bt(this,"swapDoc",this,F),F}),phrase:function(A){var F=this.options.phrases;return F&&Object.prototype.hasOwnProperty.call(F,A)?F[A]:A},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}},De(e),e.registerHelper=function(A,F,V){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][F]=V},e.registerGlobalHelper=function(A,F,V,re){e.registerHelper(A,F,re),R[A]._global.push({pred:V,val:re})}}function hs(e,r,R,A,F){var V=r,re=R,oe=qt(e,r.line),ce=F&&e.direction=="rtl"?-R:R;function me(){var rr=r.line+ce;return rr<e.first||rr>=e.first+e.size?!1:(r=new St(rr,r.ch,r.sticky),oe=qt(e,rr))}function Ie(rr){var Vt;if(A=="codepoint"){var lr=oe.text.charCodeAt(r.ch+(A>0?0:-1));isNaN(lr)?Vt=null:Vt=new St(r.line,Math.max(0,Math.min(oe.text.length,r.ch+R*(lr>=55296&&lr<56320?2:1))),-R)}else F?Vt=kl(e.cm,oe,r,R):Vt=os(oe,r,R);if(Vt==null)if(!rr&&me())r=ss(F,e.cm,oe,r.line,ce);else return!1;else r=Vt;return!0}if(A=="char"||A=="codepoint")Ie();else if(A=="column")Ie(!0);else if(A=="word"||A=="group")for(var Be=null,et=A=="group",$e=e.cm&&e.cm.getHelper(r,"wordChars"),mt=!0;!(R<0&&!Ie(!mt));mt=!1){var Tt=oe.text.charAt(r.ch)||`
`,Ft=X(Tt,$e)?"w":et&&Tt==`
`?"n":!et||/\s/.test(Tt)?null:"p";if(et&&!mt&&!Ft&&(Ft="s"),Be&&Be!=Ft){R<0&&(R=1,Ie(),r.sticky="after");break}if(Ft&&(Be=Ft),R>0&&!Ie(!mt))break}var Xt=Wo(e,r,V,re,!0);return Mt(V,Xt)&&(Xt.hitSide=!0),Xt}function fl(e,r,R,A){var F=e.doc,V=r.left,re;if(A=="page"){var oe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(oe-.5*jn(e.display),3);re=(R>0?r.bottom:r.top)+R*ce}else A=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var me;!(me=Fr(e,V,re),!me.outside);){if(R<0?re<=0:re>=F.height){me.hitSide=!0;break}re+=R*5}return me}var Sn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Sn.prototype.init=function(e){var r=this,R=this,A=R.cm,F=R.div=e.lineDiv;cl(F,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function V(oe){for(var ce=oe.target;ce;ce=ce.parentNode){if(ce==F)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Ce(F,"paste",function(oe){if(!V(oe)||rt(A,oe)||sl(oe,A))return;d<=11&&setTimeout(Jn(A,function(){return r.updateFromDOM()}),20)}),Ce(F,"compositionstart",function(oe){r.composing={data:oe.data,done:!1}}),Ce(F,"compositionupdate",function(oe){r.composing||(r.composing={data:oe.data,done:!1})}),Ce(F,"compositionend",function(oe){r.composing&&(oe.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ce(F,"touchstart",function(){return R.forceCompositionEnd()}),Ce(F,"input",function(){r.composing||r.readFromDOMSoon()});function re(oe){if(!V(oe)||rt(A,oe))return;if(A.somethingSelected())Vo({lineWise:!1,text:A.getSelections()}),oe.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var ce=ul(A);Vo({lineWise:!0,text:ce.text}),oe.type=="cut"&&A.operation(function(){A.setSelections(ce.ranges,0,Te),A.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var me=pi.text.join(`
`);if(oe.clipboardData.setData("Text",me),oe.clipboardData.getData("Text")==me){oe.preventDefault();return}}var Ie=dl(),Be=Ie.firstChild;A.display.lineSpace.insertBefore(Ie,A.display.lineSpace.firstChild),Be.value=pi.text.join(`
`);var et=document.activeElement;z(Be),setTimeout(function(){A.display.lineSpace.removeChild(Ie),et.focus(),et==F&&R.showPrimarySelection()},50)}Ce(F,"copy",re),Ce(F,"cut",re)},Sn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Sn.prototype.prepareSelection=function(){var e=Ta(this.cm,!1);return e.focus=document.activeElement==this.div,e},Sn.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Sn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Sn.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),A=R.from(),F=R.to();if(r.display.viewTo==r.display.viewFrom||A.line>=r.display.viewTo||F.line<r.display.viewFrom){e.removeAllRanges();return}var V=$o(r,e.anchorNode,e.anchorOffset),re=$o(r,e.focusNode,e.focusOffset);if(V&&!V.bad&&re&&!re.bad&&ir(pa(V,re),A)==0&&ir(Pa(V,re),F)==0)return;var oe=r.display.view,ce=A.line>=r.display.viewFrom&&hl(r,A)||{node:oe[0].measure.map[2],offset:0},me=F.line<r.display.viewTo&&hl(r,F);if(!me){var Ie=oe[oe.length-1].measure,Be=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;me={node:Be[Be.length-1],offset:Be[Be.length-2]-Be[Be.length-3]}}if(!ce||!me){e.removeAllRanges();return}var et=e.rangeCount&&e.getRangeAt(0),$e;try{$e=N(ce.node,ce.offset,me.offset,me.node)}catch(mt){}$e&&(!C&&r.state.focused?(e.collapse(ce.node,ce.offset),$e.collapsed||(e.removeAllRanges(),e.addRange($e))):(e.removeAllRanges(),e.addRange($e)),et&&e.anchorNode==null?e.addRange(et):C&&this.startGracePeriod()),this.rememberSelection()},Sn.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)},Sn.prototype.showMultipleSelections=function(e){y(this.cm.display.cursorDiv,e.cursors),y(this.cm.display.selectionDiv,e.selection)},Sn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Sn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return I(this.div,r)},Sn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Sn.prototype.blur=function(){this.div.blur()},Sn.prototype.getField=function(){return this.div},Sn.prototype.supportsTouch=function(){return!0},Sn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ca(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},Sn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Sn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(b&&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 R=$o(r,e.anchorNode,e.anchorOffset),A=$o(r,e.focusNode,e.focusOffset);R&&A&&Ca(r,function(){xa(r.doc,fi(R,A),Te),(R.bad||A.bad)&&(r.curOp.selectionChanged=!0)})},Sn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,R=e.doc.sel.primary(),A=R.from(),F=R.to();if(A.ch==0&&A.line>e.firstLine()&&(A=St(A.line-1,qt(e.doc,A.line-1).length)),F.ch==qt(e.doc,F.line).text.length&&F.line<e.lastLine()&&(F=St(F.line+1,0)),A.line<r.viewFrom||F.line>r.viewTo-1)return!1;var V,re,oe;A.line==r.viewFrom||(V=xn(e,A.line))==0?(re=Gr(r.view[0].line),oe=r.view[0].node):(re=Gr(r.view[V].line),oe=r.view[V-1].node.nextSibling);var ce=xn(e,F.line),me,Ie;if(ce==r.view.length-1?(me=r.viewTo-1,Ie=r.lineDiv.lastChild):(me=Gr(r.view[ce+1].line)-1,Ie=r.view[ce+1].node.previousSibling),!oe)return!1;for(var Be=e.doc.splitLines(ru(e,oe,Ie,re,me)),et=Yn(e.doc,St(re,0),St(me,qt(e.doc,me).text.length));Be.length>1&&et.length>1;)if(ee(Be)==ee(et))Be.pop(),et.pop(),me--;else if(Be[0]==et[0])Be.shift(),et.shift(),re++;else break;for(var $e=0,mt=0,Tt=Be[0],Ft=et[0],Xt=Math.min(Tt.length,Ft.length);$e<Xt&&Tt.charCodeAt($e)==Ft.charCodeAt($e);)++$e;for(var rr=ee(Be),Vt=ee(et),lr=Math.min(rr.length-(Be.length==1?$e:0),Vt.length-(et.length==1?$e:0));mt<lr&&rr.charCodeAt(rr.length-mt-1)==Vt.charCodeAt(Vt.length-mt-1);)++mt;if(Be.length==1&&et.length==1&&re==A.line)for(;$e&&$e>A.ch&&rr.charCodeAt(rr.length-mt-1)==Vt.charCodeAt(Vt.length-mt-1);)$e--,mt++;Be[Be.length-1]=rr.slice(0,rr.length-mt).replace(/^\u200b+/,""),Be[0]=Be[0].slice($e).replace(/\u200b+$/,"");var Rr=St(re,$e),wr=St(me,et.length?ee(et).length-mt:0);if(Be.length>1||Be[0]||ir(Rr,wr))return ro(e.doc,Be,Rr,wr,"+input"),!0},Sn.prototype.ensurePolled=function(){this.forceCompositionEnd()},Sn.prototype.reset=function(){this.forceCompositionEnd()},Sn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Sn.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)},Sn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ca(this.cm,function(){return _n(e.cm)})},Sn.prototype.setUneditable=function(e){e.contentEditable="false"},Sn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Jn(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Sn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Sn.prototype.onContextMenu=function(){},Sn.prototype.resetPosition=function(){},Sn.prototype.needsContentAttribute=!0;function hl(e,r){var R=Ue(e,r.line);if(!R||R.hidden)return null;var A=qt(e.doc,r.line),F=ge(R,A,r.line),V=lt(A,e.doc.direction),re="left";if(V){var oe=tt(V,r.ch);re=oe%2?"right":"left"}var ce=yt(F.map,r.ch,re);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function so(e,r){return r&&(e.bad=!0),e}function ru(e,r,R,A,F){var V="",re=!1,oe=e.doc.lineSeparator(),ce=!1;function me($e){return function(mt){return mt.id==$e}}function Ie(){re&&(V+=oe,ce&&(V+=oe),re=ce=!1)}function Be($e){$e&&(Ie(),V+=$e)}function et($e){if($e.nodeType==1){var mt=$e.getAttribute("cm-text");if(mt){Be(mt);return}var Tt=$e.getAttribute("cm-marker"),Ft;if(Tt){var Xt=e.findMarks(St(A,0),St(F+1,0),me(+Tt));Xt.length&&(Ft=Xt[0].find(0))&&Be(Yn(e.doc,Ft.from,Ft.to).join(oe));return}if($e.getAttribute("contenteditable")=="false")return;var rr=/^(pre|div|p|li|table|br)$/i.test($e.nodeName);if(!/^br$/i.test($e.nodeName)&&$e.textContent.length==0)return;rr&&Ie();for(var Vt=0;Vt<$e.childNodes.length;Vt++)et($e.childNodes[Vt]);/^(pre|p)$/i.test($e.nodeName)&&(ce=!0),rr&&(re=!0)}else $e.nodeType==3&&Be($e.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(et(r),r==R);)r=r.nextSibling,ce=!1;return V}function $o(e,r,R){var A;if(r==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return so(e.clipPos(St(e.display.viewTo-1)),!0);r=null,R=0}else for(A=r;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var F=0;F<e.display.view.length;F++){var V=e.display.view[F];if(V.node==A)return nu(V,r,R)}}function nu(e,r,R){var A=e.text.firstChild,F=!1;if(!r||!I(A,r))return so(St(Gr(e.line),0),!0);if(r==A&&(F=!0,r=A.childNodes[R],R=0,!r)){var V=e.rest?ee(e.rest):e.line;return so(St(Gr(V),V.text.length),F)}var re=r.nodeType==3?r:null,oe=r;for(!re&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(re=r.firstChild,R&&(R=re.nodeValue.length));oe.parentNode!=A;)oe=oe.parentNode;var ce=e.measure,me=ce.maps;function Ie(Ft,Xt,rr){for(var Vt=-1;Vt<(me?me.length:0);Vt++)for(var lr=Vt<0?ce.map:me[Vt],Rr=0;Rr<lr.length;Rr+=3){var wr=lr[Rr+2];if(wr==Ft||wr==Xt){var Qr=Gr(Vt<0?e.line:e.rest[Vt]),Pn=lr[Rr]+rr;return(rr<0||wr!=Ft)&&(Pn=lr[Rr+(rr?1:0)]),St(Qr,Pn)}}}var Be=Ie(re,oe,R);if(Be)return so(Be,F);for(var et=oe.nextSibling,$e=re?re.nodeValue.length-R:0;et;et=et.nextSibling){if(Be=Ie(et,et.firstChild,0),Be)return so(St(Be.line,Be.ch-$e),F);$e+=et.textContent.length}for(var mt=oe.previousSibling,Tt=R;mt;mt=mt.previousSibling){if(Be=Ie(mt,mt.firstChild,-1),Be)return so(St(Be.line,Be.ch+Tt),F);Tt+=mt.textContent.length}}var Zn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};Zn.prototype.init=function(e){var r=this,R=this,A=this.cm;this.createField(e);var F=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(F.style.width="0px"),Ce(F,"input",function(){w&&d>=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Ce(F,"paste",function(re){if(rt(A,re)||sl(re,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function V(re){if(rt(A,re))return;if(A.somethingSelected())Vo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var oe=ul(A);Vo({lineWise:!0,text:oe.text}),re.type=="cut"?A.setSelections(oe.ranges,null,Te):(R.prevInput="",F.value=oe.text.join(`
`),z(F))}else return;re.type=="cut"&&(A.state.cutIncoming=+new Date)}Ce(F,"cut",V),Ce(F,"copy",V),Ce(e.scroller,"paste",function(re){if(Vr(e,re)||rt(A,re))return;if(!F.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var oe=new Event("paste");oe.clipboardData=re.clipboardData,F.dispatchEvent(oe)}),Ce(e.lineSpace,"selectstart",function(re){Vr(e,re)||fe(re)}),Ce(F,"compositionstart",function(){var re=A.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:A.markText(re,A.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(F,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Zn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Zn.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,A=Ta(e);if(e.options.moveInputWithCursor){var F=zr(e,R.sel.primary().head,"div"),V=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,F.top+re.top-V.top)),A.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,F.left+re.left-V.left))}return A},Zn.prototype.showSelection=function(e){var r=this.cm,R=r.display;y(R.cursorDiv,e.cursors),y(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Zn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&z(this.textarea),w&&d>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",w&&d>=9&&(this.hasSelection=null))},Zn.prototype.getField=function(){return this.textarea},Zn.prototype.supportsTouch=function(){return!1},Zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},Zn.prototype.blur=function(){this.textarea.blur()},Zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Zn.prototype.receivedFocus=function(){this.slowPoll()},Zn.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()})},Zn.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var A=r.poll();!A&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},Zn.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!r.state.focused||Et(R)&&!A&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var F=R.value;if(F==A&&!r.somethingSelected())return!1;if(w&&d>=9&&this.hasSelection===F||o&&/[\uf700-\uf7ff]/.test(F))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var V=F.charCodeAt(0);if(V==8203&&!A&&(A="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,oe=Math.min(A.length,F.length);re<oe&&A.charCodeAt(re)==F.charCodeAt(re);)++re;return Ca(r,function(){fs(r,F.slice(re),A.length-re,null,e.composing?"*compose":null),F.length>1e3||F.indexOf(`
`)>-1?R.value=e.prevInput="":e.prevInput=F,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Zn.prototype.onKeyPress=function(){w&&d>=9&&(this.hasSelection=null),this.fastPoll()},Zn.prototype.onContextMenu=function(e){var r=this,R=r.cm,A=R.display,F=r.textarea;r.contextMenuPending&&r.contextMenuPending();var V=Vn(R,e),re=A.scroller.scrollTop;if(!V||_)return;var oe=R.options.resetSelectionOnContextMenu;oe&&R.doc.sel.contains(V)==-1&&Jn(R,xa)(R.doc,fi(V),Te);var ce=F.style.cssText,me=r.wrapper.style.cssText,Ie=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",F.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Ie.top-5)+"px; left: "+(e.clientX-Ie.left-5)+`px;
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Be;i&&(Be=window.scrollY),A.input.focus(),i&&window.scrollTo(null,Be),A.input.reset(),R.somethingSelected()||(F.value=r.prevInput=" "),r.contextMenuPending=$e,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function et(){if(F.selectionStart!=null){var Tt=R.somethingSelected(),Ft="\u200B"+(Tt?F.value:"");F.value="\u21DA",F.value=Ft,r.prevInput=Tt?"":"\u200B",F.selectionStart=1,F.selectionEnd=Ft.length,A.selForContextMenu=R.doc.sel}}function $e(){if(r.contextMenuPending!=$e)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=me,F.style.cssText=ce,w&&d<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=re),F.selectionStart!=null){(!w||w&&d<9)&&et();var Tt=0,Ft=function(){A.selForContextMenu==R.doc.sel&&F.selectionStart==0&&F.selectionEnd>0&&r.prevInput=="\u200B"?Jn(R,Ds)(R):Tt++<10?A.detectingSelectAll=setTimeout(Ft,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(Ft,200)}}if(w&&d>=9&&et(),P){Ae(e);var mt=function(){st(window,"mouseup",mt),setTimeout($e,20)};Ce(window,"mouseup",mt)}else setTimeout($e,50)},Zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Zn.prototype.setUneditable=function(){},Zn.prototype.needsContentAttribute=!1;function au(e,r){if(r=r?B(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=G();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=oe.getValue()}var F;if(e.form&&(Ce(e.form,"submit",A),!r.leaveSubmitMethodAlone)){var V=e.form;F=V.submit;try{var re=V.submit=function(){A(),V.submit=F,V.submit(),V.submit=re}}catch(ce){}}r.finishInit=function(ce){ce.save=A,ce.getTextArea=function(){return e},ce.toTextArea=function(){ce.toTextArea=isNaN,A(),e.parentNode.removeChild(ce.getWrapperElement()),e.style.display="",e.form&&(st(e.form,"submit",A),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=F))}},e.style.display="none";var oe=Fn(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return oe}function iu(e){e.off=st,e.on=Ce,e.wheelEventPixels=ho,e.Doc=Na,e.splitLines=pr,e.countColumn=K,e.findColumn=pe,e.isWordChar=$,e.Pass=we,e.signal=Ge,e.Line=Yt,e.changeEnd=hi,e.scrollbarModel=Zt,e.Pos=St,e.cmpPos=ir,e.modes=dn,e.mimeModes=br,e.resolveMode=Ar,e.getMode=fn,e.modeExtensions=wn,e.extendMode=Kn,e.copyState=nn,e.startState=Da,e.innerMode=ya,e.commands=So,e.keyMap=Ri,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=ao,e.normalizeKeyMap=Il,e.StringStream=pn,e.SharedTextMarker=_o,e.TextMarker=ji,e.LineWidget=xo,e.e_preventDefault=fe,e.e_stopPropagation=ye,e.e_stop=Ae,e.addClass=H,e.contains=I,e.rmClass=E,e.keyNames=Fi}Jl(Fn),eu(Fn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Yo in Na.prototype)Na.prototype.hasOwnProperty(Yo)&&ae(ou,Yo)<0&&(Fn.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Na.prototype[Yo]));return De(Na),Fn.inputStyles={textarea:Zn,contenteditable:Sn},Fn.defineMode=function(e){!Fn.defaults.mode&&e!="null"&&(Fn.defaults.mode=e),qr.apply(this,arguments)},Fn.defineMIME=Zr,Fn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Fn.defineMIME("text/plain","null"),Fn.defineExtension=function(e,r){Fn.prototype[e]=r},Fn.defineDocExtension=function(e,r){Na.prototype[e]=r},Fn.fromTextArea=au,iu(Fn),Fn.version="5.58.2",Fn})},WYAk:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){(function(){var f=L,C=f.lib,D=C.Base,u=f.enc,h=u.Utf8,w=f.algo,d=w.HMAC=D.extend({init:function(i,l){i=this._hasher=new i.init,typeof l=="string"&&(l=h.parse(l));var a=i.blockSize,_=a*4;l.sigBytes>_&&(l=i.finalize(l)),l.clamp();for(var p=this._oKey=l.clone(),c=this._iKey=l.clone(),m=p.words,g=c.words,b=0;b<a;b++)m[b]^=1549556828,g[b]^=909522486;p.sigBytes=c.sigBytes=_,this.reset()},reset:function(){var i=this._hasher;i.reset(),i.update(this._iKey)},update:function(i){return this._hasher.update(i),this},finalize:function(i){var l=this._hasher,a=l.finalize(i);l.reset();var _=l.finalize(this._oKey.clone().concat(a));return _}})})()})},WaYH:function(j,J,k){"use strict";var L=k("rePB"),f=k("Ff2n"),C=k("VTBJ"),D=k("1OyB"),u=k("vuIU"),h=k("JX7q"),w=k("Ji7U"),d=k("LK+K"),i=k("cDcd"),l=k("TSYQ"),a=k.n(l),_=k("sboe"),p=k("OZM5"),c=function(P){var O=P.prefixCls,E=P.level,v=P.isStart,y=P.isEnd;if(!E)return null;for(var T="".concat(O,"-indent-unit"),M=[],N=0;N<E;N+=1){var I;M.push(i.createElement("span",{key:N,className:a()(T,(I={},Object(L.a)(I,"".concat(T,"-start"),v[N+1]),Object(L.a)(I,"".concat(T,"-end"),y[N+1]),Object(L.a)(I,"".concat(T,"-end-first-level"),!N&&y[0]),I))}))}return i.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},M)},m=c,g=k("815F"),b="open",n="close",o="---",t=function(s){Object(w.a)(O,s);var P=Object(d.a)(O);function O(){var E;return Object(D.a)(this,O),E=P.apply(this,arguments),E.state={dragNodeHighlight:!1},E.onSelectorClick=function(v){var y=E.props.context.onNodeClick;y(v,Object(g.b)(E.props)),E.isSelectable()?E.onSelect(v):E.onCheck(v)},E.onSelectorDoubleClick=function(v){var y=E.props.context.onNodeDoubleClick;y(v,Object(g.b)(E.props))},E.onSelect=function(v){if(E.isDisabled())return;var y=E.props.context.onNodeSelect;v.preventDefault(),y(v,Object(g.b)(E.props))},E.onCheck=function(v){if(E.isDisabled())return;var y=E.props,T=y.disableCheckbox,M=y.checked,N=E.props.context.onNodeCheck;if(!E.isCheckable()||T)return;v.preventDefault();var I=!M;N(v,Object(g.b)(E.props),I)},E.onMouseEnter=function(v){var y=E.props.context.onNodeMouseEnter;y(v,Object(g.b)(E.props))},E.onMouseLeave=function(v){var y=E.props.context.onNodeMouseLeave;y(v,Object(g.b)(E.props))},E.onContextMenu=function(v){var y=E.props.context.onNodeContextMenu;y(v,Object(g.b)(E.props))},E.onDragStart=function(v){var y=E.props.context.onNodeDragStart;v.stopPropagation(),E.setState({dragNodeHighlight:!0}),y(v,Object(h.a)(E));try{v.dataTransfer.setData("text/plain","")}catch(T){}},E.onDragEnter=function(v){var y=E.props.context.onNodeDragEnter;v.preventDefault(),v.stopPropagation(),y(v,Object(h.a)(E))},E.onDragOver=function(v){var y=E.props.context.onNodeDragOver;v.preventDefault(),v.stopPropagation(),y(v,Object(h.a)(E))},E.onDragLeave=function(v){var y=E.props.context.onNodeDragLeave;v.stopPropagation(),y(v,Object(h.a)(E))},E.onDragEnd=function(v){var y=E.props.context.onNodeDragEnd;v.stopPropagation(),E.setState({dragNodeHighlight:!1}),y(v,Object(h.a)(E))},E.onDrop=function(v){var y=E.props.context.onNodeDrop;v.preventDefault(),v.stopPropagation(),E.setState({dragNodeHighlight:!1}),y(v,Object(h.a)(E))},E.onExpand=function(v){var y=E.props.context.onNodeExpand;y(v,Object(g.b)(E.props))},E.setSelectHandle=function(v){E.selectHandle=v},E.getNodeState=function(){var v=E.props.expanded;return E.isLeaf()?null:v?b:n},E.hasChildren=function(){var v=E.props.eventKey,y=E.props.context.keyEntities,T=y[v]||{},M=T.children;return!!(M||[]).length},E.isLeaf=function(){var v=E.props,y=v.isLeaf,T=v.loaded,M=E.props.context.loadData,N=E.hasChildren();return y===!1?!1:y||!M&&!N||M&&T&&!N},E.isDisabled=function(){var v=E.props.disabled,y=E.props.context.disabled;return!!(y||v)},E.isCheckable=function(){var v=E.props.checkable,y=E.props.context.checkable;return!y||v===!1?!1:y},E.syncLoadData=function(v){var y=v.expanded,T=v.loading,M=v.loaded,N=E.props.context,I=N.loadData,G=N.onNodeLoad;if(T)return;I&&y&&!E.isLeaf()&&(!E.hasChildren()&&!M&&G(Object(g.b)(E.props)))},E.renderSwitcher=function(){var v=E.props,y=v.expanded,T=v.switcherIcon,M=E.props.context,N=M.prefixCls,I=M.switcherIcon,G=T||I;if(E.isLeaf())return i.createElement("span",{className:a()("".concat(N,"-switcher"),"".concat(N,"-switcher-noop"))},typeof G=="function"?G(Object(C.a)(Object(C.a)({},E.props),{},{isLeaf:!0})):G);var H=a()("".concat(N,"-switcher"),"".concat(N,"-switcher_").concat(y?b:n));return i.createElement("span",{onClick:E.onExpand,className:H},typeof G=="function"?G(Object(C.a)(Object(C.a)({},E.props),{},{isLeaf:!1})):G)},E.renderCheckbox=function(){var v=E.props,y=v.checked,T=v.halfChecked,M=v.disableCheckbox,N=E.props.context.prefixCls,I=E.isDisabled(),G=E.isCheckable();if(!G)return null;var H=typeof G!="boolean"?G:null;return i.createElement("span",{className:a()("".concat(N,"-checkbox"),y&&"".concat(N,"-checkbox-checked"),!y&&T&&"".concat(N,"-checkbox-indeterminate"),(I||M)&&"".concat(N,"-checkbox-disabled")),onClick:E.onCheck},H)},E.renderIcon=function(){var v=E.props.loading,y=E.props.context.prefixCls;return i.createElement("span",{className:a()("".concat(y,"-iconEle"),"".concat(y,"-icon__").concat(E.getNodeState()||"docu"),v&&"".concat(y,"-icon_loading"))})},E.renderSelector=function(){var v=E.state.dragNodeHighlight,y=E.props,T=y.title,M=y.selected,N=y.icon,I=y.loading,G=y.data,H=E.props.context,W=H.prefixCls,z=H.showIcon,U=H.icon,B=H.draggable,K=H.loadData,q=H.titleRender,ae=E.isDisabled(),se="".concat(W,"-node-content-wrapper"),we;if(z){var Te=N||U;we=Te?i.createElement("span",{className:a()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof Te=="function"?Te(E.props):Te):E.renderIcon()}else K&&I&&(we=E.renderIcon());var de;typeof T=="function"?de=T(G):q?de=q(G):de=T;var xe=i.createElement("span",{className:"".concat(W,"-title")},de);return i.createElement("span",{ref:E.setSelectHandle,title:typeof T=="string"?T:"",className:a()("".concat(se),"".concat(se,"-").concat(E.getNodeState()||"normal"),!ae&&(M||v)&&"".concat(W,"-node-selected"),!ae&&B&&"draggable"),draggable:!ae&&B||void 0,"aria-grabbed":!ae&&B||void 0,onMouseEnter:E.onMouseEnter,onMouseLeave:E.onMouseLeave,onContextMenu:E.onContextMenu,onClick:E.onSelectorClick,onDoubleClick:E.onSelectorDoubleClick,onDragStart:B?E.onDragStart:void 0},we,xe)},E}return Object(u.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var v=this.props.selectable,y=this.props.context.selectable;return typeof v=="boolean"?v:y}},{key:"render",value:function(){var v,y=this.props,T=y.eventKey,M=y.className,N=y.style,I=y.dragOver,G=y.dragOverGapTop,H=y.dragOverGapBottom,W=y.isLeaf,z=y.isStart,U=y.isEnd,B=y.expanded,K=y.selected,q=y.checked,ae=y.halfChecked,se=y.loading,we=y.domRef,Te=y.active,de=y.onMouseMove,xe=Object(f.a)(y,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),pe=this.props.context,ne=pe.prefixCls,ie=pe.filterTreeNode,ee=pe.draggable,le=pe.keyEntities,Q=this.isDisabled(),Z=Object(p.f)(xe),be=le[T]||{},te=be.level,$=U[U.length-1];return i.createElement("div",Object.assign({ref:we,className:a()(M,"".concat(ne,"-treenode"),(v={},Object(L.a)(v,"".concat(ne,"-treenode-disabled"),Q),Object(L.a)(v,"".concat(ne,"-treenode-switcher-").concat(B?"open":"close"),!W),Object(L.a)(v,"".concat(ne,"-treenode-checkbox-checked"),q),Object(L.a)(v,"".concat(ne,"-treenode-checkbox-indeterminate"),ae),Object(L.a)(v,"".concat(ne,"-treenode-selected"),K),Object(L.a)(v,"".concat(ne,"-treenode-loading"),se),Object(L.a)(v,"".concat(ne,"-treenode-active"),Te),Object(L.a)(v,"".concat(ne,"-treenode-leaf-last"),$),Object(L.a)(v,"drag-over",!Q&&I),Object(L.a)(v,"drag-over-gap-top",!Q&&G),Object(L.a)(v,"drag-over-gap-bottom",!Q&&H),Object(L.a)(v,"filter-node",ie&&ie(Object(g.b)(this.props))),v)),style:N,onDragEnter:ee?this.onDragEnter:void 0,onDragOver:ee?this.onDragOver:void 0,onDragLeave:ee?this.onDragLeave:void 0,onDrop:ee?this.onDrop:void 0,onDragEnd:ee?this.onDragEnd:void 0,onMouseMove:de},Z),i.createElement(m,{prefixCls:ne,level:te,isStart:z,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(i.Component),S=function(P){return i.createElement(_.a.Consumer,null,function(O){return i.createElement(t,Object.assign({},P,{context:O}))})};S.displayName="TreeNode",S.defaultProps={title:o},S.isTreeNode=1;var x=J.a=S},WdTA:function(j,J,k){j.exports=k.p+"static/studnetqun.598eeb43.png"},Y1PL:function(j,J,k){"use strict";k.r(J),k.d(J,"ResizableTextArea",function(){return ae});var L=k("wx14"),f=k("1OyB"),C=k("vuIU"),D=k("Ji7U"),u=k("LK+K"),h=k("cDcd"),w=k("VTBJ"),d=k("rePB"),i=k("Zm9Q"),l=k("Kwbf"),a=k("c+Xe"),_=k("m+aA"),p=k("bdgK"),c=new Map;function m(Te){Te.forEach(function(de){var xe,pe=de.target;(xe=c.get(pe))===null||xe===void 0||xe.forEach(function(ne){return ne(pe)})})}var g=new p.default(m),b=null,n=null;function o(Te,de){c.has(Te)||(c.set(Te,new Set),g.observe(Te)),c.get(Te).add(de)}function t(Te,de){c.has(Te)&&(c.get(Te).delete(de),c.get(Te).size||(g.unobserve(Te),c.delete(Te)))}var S=function(Te){Object(D.a)(xe,Te);var de=Object(u.a)(xe);function xe(){return Object(f.a)(this,xe),de.apply(this,arguments)}return Object(C.a)(xe,[{key:"render",value:function(){return this.props.children}}]),xe}(h.Component),x=h.createContext(null);function s(Te){var de=Te.children,xe=Te.onBatchResize,pe=h.useRef(0),ne=h.useRef([]),ie=h.useContext(x),ee=h.useCallback(function(le,Q,Z){pe.current+=1;var be=pe.current;ne.current.push({size:le,element:Q,data:Z}),Promise.resolve().then(function(){be===pe.current&&(xe==null||xe(ne.current),ne.current=[])}),ie==null||ie(le,Q,Z)},[xe,ie]);return h.createElement(x.Provider,{value:ee},de)}function P(Te){var de=Te.children,xe=Te.disabled,pe=h.useRef(null),ne=h.useRef(null),ie=h.useContext(x),ee=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),le=h.isValidElement(de)&&Object(a.c)(de),Q=le?de.ref:null,Z=h.useMemo(function(){return Object(a.a)(Q,pe)},[Q,pe]),be=h.useRef(Te);be.current=Te;var te=h.useCallback(function($){var X=be.current,Y=X.onResize,ve=X.data,ue=$.getBoundingClientRect(),Ee=ue.width,Ke=ue.height,Ye=$.offsetWidth,Je=$.offsetHeight,tt=Math.floor(Ee),at=Math.floor(Ke);if(ee.current.width!==tt||ee.current.height!==at||ee.current.offsetWidth!==Ye||ee.current.offsetHeight!==Je){var lt={width:tt,height:at,offsetWidth:Ye,offsetHeight:Je};ee.current=lt;var je=Ye===Math.round(Ee)?Ee:Ye,Ce=Je===Math.round(Ke)?Ke:Je,Qe=Object(w.a)(Object(w.a)({},lt),{},{offsetWidth:je,offsetHeight:Ce});ie==null||ie(Qe,$,ve),Y&&Promise.resolve().then(function(){Y(Qe,$)})}},[]);return h.useEffect(function(){var $=Object(_.a)(pe.current)||Object(_.a)(ne.current);return $&&!xe&&o($,te),function(){return t($,te)}},[pe.current,xe]),h.createElement(S,{ref:ne},le?h.cloneElement(de,{ref:Z}):de)}var O="rc-observer-key";function E(Te){var de=Te.children,xe=Object(i.a)(de);return xe.map(function(pe,ne){var ie=(pe==null?void 0:pe.key)||"".concat(O,"-").concat(ne);return h.createElement(P,Object(L.a)({},Te,{key:ie}),pe)})}E.Collection=s;var v=E,y=k("bT9E"),T=k("TSYQ"),M=k.n(T),N=`
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
`,I=["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"],G={},H;function W(Te){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=Te.getAttribute("id")||Te.getAttribute("data-reactid")||Te.getAttribute("name");if(de&&G[xe])return G[xe];var pe=window.getComputedStyle(Te),ne=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),ie=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),ee=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),le=I.map(function(Z){return"".concat(Z,":").concat(pe.getPropertyValue(Z))}).join(";"),Q={sizingStyle:le,paddingSize:ie,borderSize:ee,boxSizing:ne};return de&&xe&&(G[xe]=Q),Q}function z(Te){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),Te.getAttribute("wrap")?H.setAttribute("wrap",Te.getAttribute("wrap")):H.removeAttribute("wrap");var ne=W(Te,de),ie=ne.paddingSize,ee=ne.borderSize,le=ne.boxSizing,Q=ne.sizingStyle;H.setAttribute("style","".concat(Q,";").concat(N)),H.value=Te.value||Te.placeholder||"";var Z=Number.MIN_SAFE_INTEGER,be=Number.MAX_SAFE_INTEGER,te=H.scrollHeight,$;if(le==="border-box"?te+=ee:le==="content-box"&&(te-=ie),xe!==null||pe!==null){H.value=" ";var X=H.scrollHeight-ie;xe!==null&&(Z=X*xe,le==="border-box"&&(Z=Z+ie+ee),te=Math.max(Z,te)),pe!==null&&(be=X*pe,le==="border-box"&&(be=be+ie+ee),$=te>be?"":"hidden",te=Math.min(be,te))}return{height:te,minHeight:Z,maxHeight:be,overflowY:$,resize:"none"}}var U=k("Gytx"),B=k.n(U),K;(function(Te){Te[Te.NONE=0]="NONE",Te[Te.RESIZING=1]="RESIZING",Te[Te.RESIZED=2]="RESIZED"})(K||(K={}));var q=function(Te){Object(D.a)(xe,Te);var de=Object(u.a)(xe);function xe(pe){var ne;return Object(f.a)(this,xe),ne=de.call(this,pe),ne.nextFrameActionId=void 0,ne.resizeFrameId=void 0,ne.textArea=void 0,ne.saveTextArea=function(ie){ne.textArea=ie},ne.handleResize=function(ie){var ee=ne.state.resizeStatus,le=ne.props,Q=le.autoSize,Z=le.onResize;if(ee!==K.NONE)return;typeof Z=="function"&&Z(ie),Q&&ne.resizeOnNextFrame()},ne.resizeOnNextFrame=function(){cancelAnimationFrame(ne.nextFrameActionId),ne.nextFrameActionId=requestAnimationFrame(ne.resizeTextarea)},ne.resizeTextarea=function(){var ie=ne.props.autoSize;if(!ie||!ne.textArea)return;var ee=ie.minRows,le=ie.maxRows,Q=z(ne.textArea,!1,ee,le);ne.setState({textareaStyles:Q,resizeStatus:K.RESIZING},function(){cancelAnimationFrame(ne.resizeFrameId),ne.resizeFrameId=requestAnimationFrame(function(){ne.setState({resizeStatus:K.RESIZED},function(){ne.resizeFrameId=requestAnimationFrame(function(){ne.setState({resizeStatus:K.NONE}),ne.fixFirefoxAutoScroll()})})})})},ne.renderTextArea=function(){var ie=ne.props,ee=ie.prefixCls,le=ee===void 0?"rc-textarea":ee,Q=ie.autoSize,Z=ie.onResize,be=ie.className,te=ie.disabled,$=ne.state,X=$.textareaStyles,Y=$.resizeStatus,ve=Object(y.a)(ne.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ue=M()(le,be,Object(d.a)({},"".concat(le,"-disabled"),te));"value"in ve&&(ve.value=ve.value||"");var Ee=Object(w.a)(Object(w.a)(Object(w.a)({},ne.props.style),X),Y===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return h.createElement(v,{onResize:ne.handleResize,disabled:!(Q||Z)},h.createElement("textarea",Object(L.a)({},ve,{className:ue,style:Ee,ref:ne.saveTextArea})))},ne.state={textareaStyles:{},resizeStatus:K.NONE},ne}return Object(C.a)(xe,[{key:"componentDidUpdate",value:function(ne){(ne.value!==this.props.value||!B()(ne.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 ne=this.textArea.selectionStart,ie=this.textArea.selectionEnd;this.textArea.setSelectionRange(ne,ie)}}catch(ee){}}},{key:"render",value:function(){return this.renderTextArea()}}]),xe}(h.Component),ae=q,se=function(Te){Object(D.a)(xe,Te);var de=Object(u.a)(xe);function xe(pe){var ne;Object(f.a)(this,xe),ne=de.call(this,pe),ne.resizableTextArea=void 0,ne.focus=function(){ne.resizableTextArea.textArea.focus()},ne.saveTextArea=function(ee){ne.resizableTextArea=ee},ne.handleChange=function(ee){var le=ne.props.onChange;ne.setValue(ee.target.value,function(){ne.resizableTextArea.resizeTextarea()}),le&&le(ee)},ne.handleKeyDown=function(ee){var le=ne.props,Q=le.onPressEnter,Z=le.onKeyDown;ee.keyCode===13&&Q&&Q(ee),Z&&Z(ee)};var ie=typeof pe.value=="undefined"||pe.value===null?pe.defaultValue:pe.value;return ne.state={value:ie},ne}return Object(C.a)(xe,[{key:"setValue",value:function(ne,ie){"value"in this.props||this.setState({value:ne},ie)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return h.createElement(ae,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ne){return"value"in ne?{value:ne.value}:null}}]),xe}(h.Component),we=J.default=se},ZW9T:function(j,J,k){"use strict";k.d(J,"a",function(){return S});var L=k("k1fw"),f=k("miYZ"),C=k("tsqr"),D=k("rAM+"),u=k("tJVT"),h=k("PpiC"),w=k("cDcd"),d=k.n(w),i=k("bdgK");function l(x,s,P,O,E){var v=s.getWordUntilPosition(P),y={startLineNumber:P.lineNumber,endLineNumber:P.lineNumber,startColumn:v.startColumn,endColumn:v.endColumn},T=O.map(function(M){return{label:M,kind:x.languages.CompletionItemKind.Keyword,insertText:M,insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:y}});return E.map(function(M){T.push(Object(L.a)(Object(L.a)({},M),{},{range:y}))}),T}var a=function(x){var s={label:"ifelse",kind:x.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet},P=["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"];x.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(y,T){var M=l(x,y,T,P,[s]);return{suggestions:M}}});var O=["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"];x.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(y,T){var M=[{label:"print",kind:x.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=l(x,y,T,O,M);return{suggestions:N}}});var E=["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"];x.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(y,T){var M=[s,{label:"main",kind:x.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:x.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:x.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=l(x,y,T,E,M);return{suggestions:N}}})},_="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=k("LvDl");function c(x){return/^\d+$/.test(x)?"".concat(x,"px"):x}function m(){}var g=!1,b={"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 n(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=x;if(Array.isArray(x)){for(var P=0;P<x.length;P++){var O=b[x[P]];if(O)return O}return s[0]}return b[s]||s}var o=null,t=J.b=function(x){var s=x.width,P=s===void 0?"100%":s,O=x.height,E=O===void 0?"100%":O,v=x.value,y=x.language,T=y===void 0?"javascript":y,M=x.style,N=M===void 0?{}:M,I=x.options,G=I===void 0?{}:I,H=x.overrideServices,W=H===void 0?{}:H,z=x.theme,U=z===void 0?"vs-dark":z,B=x.onEditBlur,K=x.onSave,q=x.autoHeight,ae=q===void 0?!1:q,se=x.forbidCopy,we=se===void 0?!1:se,Te=x.onChange,de=Te===void 0?m:Te,xe=x.editorDidMount,pe=xe===void 0?m:xe,ne=x.onFocus,ie=ne===void 0?m:ne,ee=x.filename,le=ee===void 0?"educoder.txt":ee,Q=Object(h.a)(x,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Z=Object(w.useRef)(),be=Object(w.useRef)({}),te=Object(w.useRef)(),$=Object(w.useRef)(!1),X=Object(w.useRef)(),Y=Object(w.useState)(!1),ve=Object(u.a)(Y,2),ue=ve[0],Ee=ve[1];function Ke(){var _e;return Z.current&&(_e=new i.default(function(Ae){var We=Object(D.a)(Ae),Xe;try{for(We.s();!(Xe=We.n()).done;){var ft=Xe.value;(ft.target.offsetHeight>0||ft.target.offsetWidth>0)&&be.current.instance.layout()}}catch(vt){We.e(vt)}finally{We.f()}}),_e.observe(Z.current)),_e}function Ye(){C.b.warn(decodeURIComponent(_))}var Je=function(){var Ae=be.current.instance;if(v!=null&&Ae&&ue){var We=Ae.getModel();We&&v!==We.getValue()&&(g=!0,We.setValue(v),Ae.layout(),g=!1)}};Object(w.useEffect)(function(){te.current&&clearTimeout(te.current),te.current=setTimeout(function(){Je()},500)},[v,ue,be.current]);function tt(){var _e=be.current.instance;if(_e){var Ae=_e.getSelection(),We=be.current.pastePos||{},Xe=new o.Range(We.startLineNumber||Ae.endLineNumber,We.startColumn||Ae.endColumn,We.endLineNumber||Ae.endLineNumber,We.endColumn||Ae.endColumn);setTimeout(function(){_e.executeEdits("",[{range:Xe,text:""}])},300)}}function at(_e){(window.navigator.platform.match("Mac")?_e.metaKey:_e.ctrlKey)&&_e.keyCode==83&&(_e.preventDefault(),K())}var lt=function(){if(ae&&be.current.instance){var Ae=be.current.instance.getContentHeight();fe(Ae<E?E:Ae)}else fe(E)};function je(_e){var Ae=document.createEvent("MouseEvents");Ae.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_e.dispatchEvent(Ae)}function Ce(_e,Ae){var We=window.URL||window.webkitURL||window,Xe=new Blob([Ae]),ft=document.createElementNS("http://www.w3.org/1999/xhtml","a");ft.href=We.createObjectURL(Xe),ft.download=_e,je(ft)}Object(w.useEffect)(function(){lt()},[lt]),Object(w.useEffect)(function(){Z.current&&!ue&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(_e){try{o=_e,be.current.instance=o.editor.create(Z.current,{value:v,language:n(T),theme:U,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},W);var Ae=be.current.instance;if(pe(Ae,o),setTimeout(function(){lt(),be.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ce(le||"educoder.txt",Ae.getValue())}})},500),be.current.subscription=Ae.onDidChangeModelContent(function(Xe){$.current?clearTimeout(X.current):(lt(),de(Ae.getValue(),Xe)),X.current=setTimeout(function(){$.current=!1},500)}),window.Monaco||a(o),we&&(Ae.addCommand(o.KeyMod.CtrlCmd|o.KeyMod.Shift|o.KeyCode.KEY_V,function(){return Ye(),null}),Ae.addCommand(o.KeyMod.CtrlCmd|o.KeyCode.KEY_C,function(){return Ye(),null})),window.Monaco=o,B&&Ae.onDidBlurEditorWidget(function(){B(Ae.getValue())}),ie&&Ae.onDidFocusEditorText(function(){ie(Ae.getValue())}),we){Ae.addCommand(o.KeyMod.CtrlCmd|o.KeyCode.KEY_V,function(){return Ye(),null}),Ae.onDidPaste(function(Xe){be.current.pastePos=Xe});try{window.addEventListener("paste",tt)}catch(Xe){}}var We=Ke();return Ee(!0),function(){var Xe=be.current.instance;Xe.dispose();var ft=Xe.getModel();ft&&ft.dispose(),be.current.subscription&&be.current.subscription.dispose(),we&&window.removeEventListener("paste",tt),We.unobserve(Z.current)}}catch(Xe){}})},[]),Object(w.useEffect)(function(){var _e=be.current.instance;if(_e&&ue)return document.addEventListener("keydown",at,!1),function(){document.removeEventListener("keydown",at)}},[K,ue]),Object(w.useEffect)(function(){var _e=be.current.instance;if(_e&&ue){var Ae=n(T);o.editor.setModelLanguage(_e.getModel(),Ae),console.log("language:",T,_e.getModel(),Ae)}},[T,ue]),Object(w.useEffect)(function(){var _e=be.current.instance;_e&&ue&&o.editor.setTheme(U)},[U,ue]),Object(w.useEffect)(function(){var _e=be.current.instance;_e&&ue&&(_e.updateOptions(Object(L.a)({},G)),setTimeout(function(){_e.getModel().updateOptions(Object(L.a)({},G))},200))},[JSON.stringify(G),ue]),Object(w.useEffect)(function(){var _e=be.current.instance;_e&&ue&&_e.layout()},[P,E,ue]);var Qe=Object(w.useState)(c(P)),st=Object(u.a)(Qe,2),Ge=st[0],rt=st[1],Re=Object(w.useState)(c(E)),Se=Object(u.a)(Re,2),De=Se[0],fe=Se[1],ye=Object(L.a)(Object(L.a)({},N),{},{width:Ge,height:De});return d.a.createElement("div",{className:"my-monaco-editor",ref:Z,style:ye})};function S(x){var s=x.width,P=s===void 0?"100%":s,O=x.height,E=O===void 0?"100%":O,v=x.original,y=x.modified,T=x.language,M=x.options,N=M===void 0?{}:M,I=Object(w.useRef)(),G=Object(w.useState)(null),H=Object(u.a)(G,2),W=H[0],z=H[1];function U(ae){var se;return I.current&&(se=new i.default(function(we){var Te=Object(D.a)(we),de;try{for(Te.s();!(de=Te.n()).done;){var xe=de.value;(xe.target.offsetHeight>0||xe.target.offsetWidth>0)&&ae.layout()}}catch(pe){Te.e(pe)}finally{Te.f()}}),se.observe(I.current)),se}Object(w.useEffect)(function(){I.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(ae){o=ae;var se=o.editor.createDiffEditor(I.current,Object(L.a)(Object(L.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},N),{},{wordWrap:!0}));z(se);var we=U(se);return function(){se.dispose();var Te=se.getModel();Te&&Te.dispose(),we.unobserve(I.current)}})},[]),Object(w.useEffect)(function(){W&&W.setModel({original:o.editor.createModel(v,T),modified:o.editor.createModel(y,T)})},[v,y,T,W]);var B=c(P),K=c(E),q={width:B,height:K};return d.a.createElement("div",{className:"my-diff-editor",ref:I,style:q})}},ZpRC:function(j,J,k){"use strict";function L(a){return typeof a=="object"&&a!=null&&a.nodeType===1}function f(a,_){return(!_||a!=="hidden")&&a!=="visible"&&a!=="clip"}function C(a,_){if(a.clientHeight<a.scrollHeight||a.clientWidth<a.scrollWidth){var p=getComputedStyle(a,null);return f(p.overflowY,_)||f(p.overflowX,_)||function(c){var m=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(b){return null}}(c);return!!m&&(m.clientHeight<c.scrollHeight||m.clientWidth<c.scrollWidth)}(a)}return!1}function D(a,_,p,c,m,g,b,n){return g<a&&b>_||g>a&&b<_?0:g<=a&&n<=p||b>=_&&n>=p?g-a-c:b>_&&n<p||g<a&&n>p?b-_+m:0}var u=function(a,_){var p=window,c=_.scrollMode,m=_.block,g=_.inline,b=_.boundary,n=_.skipOverflowHiddenElements,o=typeof b=="function"?b:function(X){return X!==b};if(!L(a))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,S=[],x=a;L(x)&&o(x);){if((x=x.parentElement)===t){S.push(x);break}x!=null&&x===document.body&&C(x)&&!C(document.documentElement)||x!=null&&C(x,n)&&S.push(x)}for(var s=p.visualViewport?p.visualViewport.width:innerWidth,P=p.visualViewport?p.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,v=a.getBoundingClientRect(),y=v.height,T=v.width,M=v.top,N=v.right,I=v.bottom,G=v.left,H=m==="start"||m==="nearest"?M:m==="end"?I:M+y/2,W=g==="center"?G+T/2:g==="end"?N:G,z=[],U=0;U<S.length;U++){var B=S[U],K=B.getBoundingClientRect(),q=K.height,ae=K.width,se=K.top,we=K.right,Te=K.bottom,de=K.left;if(c==="if-needed"&&M>=0&&G>=0&&I<=P&&N<=s&&M>=se&&I<=Te&&G>=de&&N<=we)return z;var xe=getComputedStyle(B),pe=parseInt(xe.borderLeftWidth,10),ne=parseInt(xe.borderTopWidth,10),ie=parseInt(xe.borderRightWidth,10),ee=parseInt(xe.borderBottomWidth,10),le=0,Q=0,Z="offsetWidth"in B?B.offsetWidth-B.clientWidth-pe-ie:0,be="offsetHeight"in B?B.offsetHeight-B.clientHeight-ne-ee:0;if(t===B)le=m==="start"?H:m==="end"?H-P:m==="nearest"?D(E,E+P,P,ne,ee,E+H,E+H+y,y):H-P/2,Q=g==="start"?W:g==="center"?W-s/2:g==="end"?W-s:D(O,O+s,s,pe,ie,O+W,O+W+T,T),le=Math.max(0,le+E),Q=Math.max(0,Q+O);else{le=m==="start"?H-se-ne:m==="end"?H-Te+ee+be:m==="nearest"?D(se,Te,q,ne,ee+be,H,H+y,y):H-(se+q/2)+be/2,Q=g==="start"?W-de-pe:g==="center"?W-(de+ae/2)+Z/2:g==="end"?W-we+ie+Z:D(de,we,ae,pe,ie+Z,W,W+T,T);var te=B.scrollLeft,$=B.scrollTop;H+=$-(le=Math.max(0,Math.min($+le,B.scrollHeight-q+be))),W+=te-(Q=Math.max(0,Math.min(te+Q,B.scrollWidth-ae+Z)))}z.push({el:B,top:le,left:Q})}return z};function h(a){return a===Object(a)&&Object.keys(a).length!==0}function w(a,_){_===void 0&&(_="auto");var p="scrollBehavior"in document.body.style;a.forEach(function(c){var m=c.el,g=c.top,b=c.left;m.scroll&&p?m.scroll({top:g,left:b,behavior:_}):(m.scrollTop=g,m.scrollLeft=b)})}function d(a){return a===!1?{block:"end",inline:"nearest"}:h(a)?a:{block:"start",inline:"nearest"}}function i(a,_){var p=!a.ownerDocument.documentElement.contains(a);if(h(_)&&typeof _.behavior=="function")return _.behavior(p?[]:u(a,_));if(p)return;var c=d(_);return w(u(a,c),c.behavior)}var l=J.a=i},Zss7:function(j,J,k){var L;(function(f){var C=/^\s+/,D=/\s+$/,u=0,h=f.round,w=f.min,d=f.max,i=f.random;function l(ee,le){if(ee=ee||"",le=le||{},ee instanceof l)return ee;if(!(this instanceof l))return new l(ee,le);var Q=a(ee);this._originalInput=ee,this._r=Q.r,this._g=Q.g,this._b=Q.b,this._a=Q.a,this._roundA=h(100*this._a)/100,this._format=le.format||Q.format,this._gradientType=le.gradientType,this._r<1&&(this._r=h(this._r)),this._g<1&&(this._g=h(this._g)),this._b<1&&(this._b=h(this._b)),this._ok=Q.ok,this._tc_id=u++}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 ee=this.toRgb();return(ee.r*299+ee.g*587+ee.b*114)/1e3},getLuminance:function(){var ee=this.toRgb(),le,Q,Z,be,te,$;return le=ee.r/255,Q=ee.g/255,Z=ee.b/255,le<=.03928?be=le/12.92:be=f.pow((le+.055)/1.055,2.4),Q<=.03928?te=Q/12.92:te=f.pow((Q+.055)/1.055,2.4),Z<=.03928?$=Z/12.92:$=f.pow((Z+.055)/1.055,2.4),.2126*be+.7152*te+.0722*$},setAlpha:function(ee){return this._a=z(ee),this._roundA=h(100*this._a)/100,this},toHsv:function(){var ee=m(this._r,this._g,this._b);return{h:ee.h*360,s:ee.s,v:ee.v,a:this._a}},toHsvString:function(){var ee=m(this._r,this._g,this._b),le=h(ee.h*360),Q=h(ee.s*100),Z=h(ee.v*100);return this._a==1?"hsv("+le+", "+Q+"%, "+Z+"%)":"hsva("+le+", "+Q+"%, "+Z+"%, "+this._roundA+")"},toHsl:function(){var ee=p(this._r,this._g,this._b);return{h:ee.h*360,s:ee.s,l:ee.l,a:this._a}},toHslString:function(){var ee=p(this._r,this._g,this._b),le=h(ee.h*360),Q=h(ee.s*100),Z=h(ee.l*100);return this._a==1?"hsl("+le+", "+Q+"%, "+Z+"%)":"hsla("+le+", "+Q+"%, "+Z+"%, "+this._roundA+")"},toHex:function(ee){return b(this._r,this._g,this._b,ee)},toHexString:function(ee){return"#"+this.toHex(ee)},toHex8:function(ee){return n(this._r,this._g,this._b,this._a,ee)},toHex8String:function(ee){return"#"+this.toHex8(ee)},toRgb:function(){return{r:h(this._r),g:h(this._g),b:h(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+h(this._r)+", "+h(this._g)+", "+h(this._b)+")":"rgba("+h(this._r)+", "+h(this._g)+", "+h(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:h(U(this._r,255)*100)+"%",g:h(U(this._g,255)*100)+"%",b:h(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+h(U(this._r,255)*100)+"%, "+h(U(this._g,255)*100)+"%, "+h(U(this._b,255)*100)+"%)":"rgba("+h(U(this._r,255)*100)+"%, "+h(U(this._g,255)*100)+"%, "+h(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[b(this._r,this._g,this._b,!0)]||!1},toFilter:function(ee){var le="#"+o(this._r,this._g,this._b,this._a),Q=le,Z=this._gradientType?"GradientType = 1, ":"";if(ee){var be=l(ee);Q="#"+o(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+Z+"startColorstr="+le+",endColorstr="+Q+")"},toString:function(ee){var le=!!ee;ee=ee||this._format;var Q=!1,Z=this._a<1&&this._a>=0,be=!le&&Z&&(ee==="hex"||ee==="hex6"||ee==="hex3"||ee==="hex4"||ee==="hex8"||ee==="name");return be?ee==="name"&&this._a===0?this.toName():this.toRgbString():(ee==="rgb"&&(Q=this.toRgbString()),ee==="prgb"&&(Q=this.toPercentageRgbString()),(ee==="hex"||ee==="hex6")&&(Q=this.toHexString()),ee==="hex3"&&(Q=this.toHexString(!0)),ee==="hex4"&&(Q=this.toHex8String(!0)),ee==="hex8"&&(Q=this.toHex8String()),ee==="name"&&(Q=this.toName()),ee==="hsl"&&(Q=this.toHslString()),ee==="hsv"&&(Q=this.toHsvString()),Q||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(ee,le){var Q=ee.apply(null,[this].concat([].slice.call(le)));return this._r=Q._r,this._g=Q._g,this._b=Q._b,this.setAlpha(Q._a),this},lighten:function(){return this._applyModification(s,arguments)},brighten:function(){return this._applyModification(P,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(t,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(ee,le){return ee.apply(null,[this].concat([].slice.call(le)))},analogous:function(){return this._applyCombination(N,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},l.fromRatio=function(ee,le){if(typeof ee=="object"){var Q={};for(var Z in ee)ee.hasOwnProperty(Z)&&(Z==="a"?Q[Z]=ee[Z]:Q[Z]=we(ee[Z]));ee=Q}return l(ee,le)};function a(ee){var le={r:0,g:0,b:0},Q=1,Z=null,be=null,te=null,$=!1,X=!1;return typeof ee=="string"&&(ee=ne(ee)),typeof ee=="object"&&(pe(ee.r)&&pe(ee.g)&&pe(ee.b)?(le=_(ee.r,ee.g,ee.b),$=!0,X=String(ee.r).substr(-1)==="%"?"prgb":"rgb"):pe(ee.h)&&pe(ee.s)&&pe(ee.v)?(Z=we(ee.s),be=we(ee.v),le=g(ee.h,Z,be),$=!0,X="hsv"):pe(ee.h)&&pe(ee.s)&&pe(ee.l)&&(Z=we(ee.s),te=we(ee.l),le=c(ee.h,Z,te),$=!0,X="hsl"),ee.hasOwnProperty("a")&&(Q=ee.a)),Q=z(Q),{ok:$,format:ee.format||X,r:w(255,d(le.r,0)),g:w(255,d(le.g,0)),b:w(255,d(le.b,0)),a:Q}}function _(ee,le,Q){return{r:U(ee,255)*255,g:U(le,255)*255,b:U(Q,255)*255}}function p(ee,le,Q){ee=U(ee,255),le=U(le,255),Q=U(Q,255);var Z=d(ee,le,Q),be=w(ee,le,Q),te,$,X=(Z+be)/2;if(Z==be)te=$=0;else{var Y=Z-be;$=X>.5?Y/(2-Z-be):Y/(Z+be);switch(Z){case ee:te=(le-Q)/Y+(le<Q?6:0);break;case le:te=(Q-ee)/Y+2;break;case Q:te=(ee-le)/Y+4;break}te/=6}return{h:te,s:$,l:X}}function c(ee,le,Q){var Z,be,te;ee=U(ee,360),le=U(le,100),Q=U(Q,100);function $(ve,ue,Ee){return Ee<0&&(Ee+=1),Ee>1&&(Ee-=1),Ee<1/6?ve+(ue-ve)*6*Ee:Ee<1/2?ue:Ee<2/3?ve+(ue-ve)*(2/3-Ee)*6:ve}if(le===0)Z=be=te=Q;else{var X=Q<.5?Q*(1+le):Q+le-Q*le,Y=2*Q-X;Z=$(Y,X,ee+1/3),be=$(Y,X,ee),te=$(Y,X,ee-1/3)}return{r:Z*255,g:be*255,b:te*255}}function m(ee,le,Q){ee=U(ee,255),le=U(le,255),Q=U(Q,255);var Z=d(ee,le,Q),be=w(ee,le,Q),te,$,X=Z,Y=Z-be;if($=Z===0?0:Y/Z,Z==be)te=0;else{switch(Z){case ee:te=(le-Q)/Y+(le<Q?6:0);break;case le:te=(Q-ee)/Y+2;break;case Q:te=(ee-le)/Y+4;break}te/=6}return{h:te,s:$,v:X}}function g(ee,le,Q){ee=U(ee,360)*6,le=U(le,100),Q=U(Q,100);var Z=f.floor(ee),be=ee-Z,te=Q*(1-le),$=Q*(1-be*le),X=Q*(1-(1-be)*le),Y=Z%6,ve=[Q,$,te,te,X,Q][Y],ue=[X,Q,Q,$,te,te][Y],Ee=[te,te,X,Q,Q,$][Y];return{r:ve*255,g:ue*255,b:Ee*255}}function b(ee,le,Q,Z){var be=[se(h(ee).toString(16)),se(h(le).toString(16)),se(h(Q).toString(16))];return Z&&be[0].charAt(0)==be[0].charAt(1)&&be[1].charAt(0)==be[1].charAt(1)&&be[2].charAt(0)==be[2].charAt(1)?be[0].charAt(0)+be[1].charAt(0)+be[2].charAt(0):be.join("")}function n(ee,le,Q,Z,be){var te=[se(h(ee).toString(16)),se(h(le).toString(16)),se(h(Q).toString(16)),se(Te(Z))];return be&&te[0].charAt(0)==te[0].charAt(1)&&te[1].charAt(0)==te[1].charAt(1)&&te[2].charAt(0)==te[2].charAt(1)&&te[3].charAt(0)==te[3].charAt(1)?te[0].charAt(0)+te[1].charAt(0)+te[2].charAt(0)+te[3].charAt(0):te.join("")}function o(ee,le,Q,Z){var be=[se(Te(Z)),se(h(ee).toString(16)),se(h(le).toString(16)),se(h(Q).toString(16))];return be.join("")}l.equals=function(ee,le){return!ee||!le?!1:l(ee).toRgbString()==l(le).toRgbString()},l.random=function(){return l.fromRatio({r:i(),g:i(),b:i()})};function t(ee,le){le=le===0?0:le||10;var Q=l(ee).toHsl();return Q.s-=le/100,Q.s=B(Q.s),l(Q)}function S(ee,le){le=le===0?0:le||10;var Q=l(ee).toHsl();return Q.s+=le/100,Q.s=B(Q.s),l(Q)}function x(ee){return l(ee).desaturate(100)}function s(ee,le){le=le===0?0:le||10;var Q=l(ee).toHsl();return Q.l+=le/100,Q.l=B(Q.l),l(Q)}function P(ee,le){le=le===0?0:le||10;var Q=l(ee).toRgb();return Q.r=d(0,w(255,Q.r-h(255*-(le/100)))),Q.g=d(0,w(255,Q.g-h(255*-(le/100)))),Q.b=d(0,w(255,Q.b-h(255*-(le/100)))),l(Q)}function O(ee,le){le=le===0?0:le||10;var Q=l(ee).toHsl();return Q.l-=le/100,Q.l=B(Q.l),l(Q)}function E(ee,le){var Q=l(ee).toHsl(),Z=(Q.h+le)%360;return Q.h=Z<0?360+Z:Z,l(Q)}function v(ee){var le=l(ee).toHsl();return le.h=(le.h+180)%360,l(le)}function y(ee){var le=l(ee).toHsl(),Q=le.h;return[l(ee),l({h:(Q+120)%360,s:le.s,l:le.l}),l({h:(Q+240)%360,s:le.s,l:le.l})]}function T(ee){var le=l(ee).toHsl(),Q=le.h;return[l(ee),l({h:(Q+90)%360,s:le.s,l:le.l}),l({h:(Q+180)%360,s:le.s,l:le.l}),l({h:(Q+270)%360,s:le.s,l:le.l})]}function M(ee){var le=l(ee).toHsl(),Q=le.h;return[l(ee),l({h:(Q+72)%360,s:le.s,l:le.l}),l({h:(Q+216)%360,s:le.s,l:le.l})]}function N(ee,le,Q){le=le||6,Q=Q||30;var Z=l(ee).toHsl(),be=360/Q,te=[l(ee)];for(Z.h=(Z.h-(be*le>>1)+720)%360;--le;)Z.h=(Z.h+be)%360,te.push(l(Z));return te}function I(ee,le){le=le||6;for(var Q=l(ee).toHsv(),Z=Q.h,be=Q.s,te=Q.v,$=[],X=1/le;le--;)$.push(l({h:Z,s:be,v:te})),te=(te+X)%1;return $}l.mix=function(ee,le,Q){Q=Q===0?0:Q||50;var Z=l(ee).toRgb(),be=l(le).toRgb(),te=Q/100,$={r:(be.r-Z.r)*te+Z.r,g:(be.g-Z.g)*te+Z.g,b:(be.b-Z.b)*te+Z.b,a:(be.a-Z.a)*te+Z.a};return l($)},l.readability=function(ee,le){var Q=l(ee),Z=l(le);return(f.max(Q.getLuminance(),Z.getLuminance())+.05)/(f.min(Q.getLuminance(),Z.getLuminance())+.05)},l.isReadable=function(ee,le,Q){var Z=l.readability(ee,le),be,te;te=!1,be=ie(Q);switch(be.level+be.size){case"AAsmall":case"AAAlarge":te=Z>=4.5;break;case"AAlarge":te=Z>=3;break;case"AAAsmall":te=Z>=7;break}return te},l.mostReadable=function(ee,le,Q){var Z=null,be=0,te,$,X,Y;Q=Q||{},$=Q.includeFallbackColors,X=Q.level,Y=Q.size;for(var ve=0;ve<le.length;ve++)te=l.readability(ee,le[ve]),te>be&&(be=te,Z=l(le[ve]));return l.isReadable(ee,Z,{level:X,size:Y})||!$?Z:(Q.includeFallbackColors=!1,l.mostReadable(ee,["#fff","#000"],Q))};var G=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"},H=l.hexNames=W(G);function W(ee){var le={};for(var Q in ee)ee.hasOwnProperty(Q)&&(le[ee[Q]]=Q);return le}function z(ee){return ee=parseFloat(ee),(isNaN(ee)||ee<0||ee>1)&&(ee=1),ee}function U(ee,le){q(ee)&&(ee="100%");var Q=ae(ee);return ee=w(le,d(0,parseFloat(ee))),Q&&(ee=parseInt(ee*le,10)/100),f.abs(ee-le)<1e-6?1:ee%le/parseFloat(le)}function B(ee){return w(1,d(0,ee))}function K(ee){return parseInt(ee,16)}function q(ee){return typeof ee=="string"&&ee.indexOf(".")!=-1&&parseFloat(ee)===1}function ae(ee){return typeof ee=="string"&&ee.indexOf("%")!=-1}function se(ee){return ee.length==1?"0"+ee:""+ee}function we(ee){return ee<=1&&(ee=ee*100+"%"),ee}function Te(ee){return f.round(parseFloat(ee)*255).toString(16)}function de(ee){return K(ee)/255}var xe=function(){var ee="[-\\+]?\\d+%?",le="[-\\+]?\\d*\\.\\d+%?",Q="(?:"+le+")|(?:"+ee+")",Z="[\\s|\\(]+("+Q+")[,|\\s]+("+Q+")[,|\\s]+("+Q+")\\s*\\)?",be="[\\s|\\(]+("+Q+")[,|\\s]+("+Q+")[,|\\s]+("+Q+")[,|\\s]+("+Q+")\\s*\\)?";return{CSS_UNIT:new RegExp(Q),rgb:new RegExp("rgb"+Z),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+Z),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+Z),hsva:new RegExp("hsva"+be),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 pe(ee){return!!xe.CSS_UNIT.exec(ee)}function ne(ee){ee=ee.replace(C,"").replace(D,"").toLowerCase();var le=!1;if(G[ee])ee=G[ee],le=!0;else if(ee=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Q;return(Q=xe.rgb.exec(ee))?{r:Q[1],g:Q[2],b:Q[3]}:(Q=xe.rgba.exec(ee))?{r:Q[1],g:Q[2],b:Q[3],a:Q[4]}:(Q=xe.hsl.exec(ee))?{h:Q[1],s:Q[2],l:Q[3]}:(Q=xe.hsla.exec(ee))?{h:Q[1],s:Q[2],l:Q[3],a:Q[4]}:(Q=xe.hsv.exec(ee))?{h:Q[1],s:Q[2],v:Q[3]}:(Q=xe.hsva.exec(ee))?{h:Q[1],s:Q[2],v:Q[3],a:Q[4]}:(Q=xe.hex8.exec(ee))?{r:K(Q[1]),g:K(Q[2]),b:K(Q[3]),a:de(Q[4]),format:le?"name":"hex8"}:(Q=xe.hex6.exec(ee))?{r:K(Q[1]),g:K(Q[2]),b:K(Q[3]),format:le?"name":"hex"}:(Q=xe.hex4.exec(ee))?{r:K(Q[1]+""+Q[1]),g:K(Q[2]+""+Q[2]),b:K(Q[3]+""+Q[3]),a:de(Q[4]+""+Q[4]),format:le?"name":"hex8"}:(Q=xe.hex3.exec(ee))?{r:K(Q[1]+""+Q[1]),g:K(Q[2]+""+Q[2]),b:K(Q[3]+""+Q[3]),format:le?"name":"hex"}:!1}function ie(ee){var le,Q;return ee=ee||{level:"AA",size:"small"},le=(ee.level||"AA").toUpperCase(),Q=(ee.size||"small").toLowerCase(),le!=="AA"&&le!=="AAA"&&(le="AA"),Q!=="small"&&Q!=="large"&&(Q="small"),{level:le,size:Q}}j.exports?j.exports=l:!(L=function(){return l}.call(J,k,J,j),L!==void 0&&(j.exports=L))})(Math)},bQjk:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.CipherParams,h=C.enc,w=h.Hex,d=C.format,i=d.Hex={stringify:function(l){return l.ciphertext.toString(w)},parse:function(l){var a=w.parse(l);return u.create({ciphertext:a})}}}(),L.format.Hex})},bT9E:function(j,J,k){"use strict";k.d(J,"a",function(){return f});var L=k("VTBJ");function f(C,D){var u=Object(L.a)({},C);return Array.isArray(D)&&D.forEach(function(h){delete u[h]}),u}},biw7:function(j,J,k){"use strict";var L=k("cDcd"),f=k.n(L),C=L.createContext(null);J.a=C},c5Ni:function(j,J,k){},cv67:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.WordArray,h=D.Hasher,w=C.algo,d=[];(function(){for(var c=0;c<64;c++)d[c]=f.abs(f.sin(c+1))*4294967296|0})();var i=w.MD5=h.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(c,m){for(var g=0;g<16;g++){var b=m+g,n=c[b];c[b]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var o=this._hash.words,t=c[m+0],S=c[m+1],x=c[m+2],s=c[m+3],P=c[m+4],O=c[m+5],E=c[m+6],v=c[m+7],y=c[m+8],T=c[m+9],M=c[m+10],N=c[m+11],I=c[m+12],G=c[m+13],H=c[m+14],W=c[m+15],z=o[0],U=o[1],B=o[2],K=o[3];z=l(z,U,B,K,t,7,d[0]),K=l(K,z,U,B,S,12,d[1]),B=l(B,K,z,U,x,17,d[2]),U=l(U,B,K,z,s,22,d[3]),z=l(z,U,B,K,P,7,d[4]),K=l(K,z,U,B,O,12,d[5]),B=l(B,K,z,U,E,17,d[6]),U=l(U,B,K,z,v,22,d[7]),z=l(z,U,B,K,y,7,d[8]),K=l(K,z,U,B,T,12,d[9]),B=l(B,K,z,U,M,17,d[10]),U=l(U,B,K,z,N,22,d[11]),z=l(z,U,B,K,I,7,d[12]),K=l(K,z,U,B,G,12,d[13]),B=l(B,K,z,U,H,17,d[14]),U=l(U,B,K,z,W,22,d[15]),z=a(z,U,B,K,S,5,d[16]),K=a(K,z,U,B,E,9,d[17]),B=a(B,K,z,U,N,14,d[18]),U=a(U,B,K,z,t,20,d[19]),z=a(z,U,B,K,O,5,d[20]),K=a(K,z,U,B,M,9,d[21]),B=a(B,K,z,U,W,14,d[22]),U=a(U,B,K,z,P,20,d[23]),z=a(z,U,B,K,T,5,d[24]),K=a(K,z,U,B,H,9,d[25]),B=a(B,K,z,U,s,14,d[26]),U=a(U,B,K,z,y,20,d[27]),z=a(z,U,B,K,G,5,d[28]),K=a(K,z,U,B,x,9,d[29]),B=a(B,K,z,U,v,14,d[30]),U=a(U,B,K,z,I,20,d[31]),z=_(z,U,B,K,O,4,d[32]),K=_(K,z,U,B,y,11,d[33]),B=_(B,K,z,U,N,16,d[34]),U=_(U,B,K,z,H,23,d[35]),z=_(z,U,B,K,S,4,d[36]),K=_(K,z,U,B,P,11,d[37]),B=_(B,K,z,U,v,16,d[38]),U=_(U,B,K,z,M,23,d[39]),z=_(z,U,B,K,G,4,d[40]),K=_(K,z,U,B,t,11,d[41]),B=_(B,K,z,U,s,16,d[42]),U=_(U,B,K,z,E,23,d[43]),z=_(z,U,B,K,T,4,d[44]),K=_(K,z,U,B,I,11,d[45]),B=_(B,K,z,U,W,16,d[46]),U=_(U,B,K,z,x,23,d[47]),z=p(z,U,B,K,t,6,d[48]),K=p(K,z,U,B,v,10,d[49]),B=p(B,K,z,U,H,15,d[50]),U=p(U,B,K,z,O,21,d[51]),z=p(z,U,B,K,I,6,d[52]),K=p(K,z,U,B,s,10,d[53]),B=p(B,K,z,U,M,15,d[54]),U=p(U,B,K,z,S,21,d[55]),z=p(z,U,B,K,y,6,d[56]),K=p(K,z,U,B,W,10,d[57]),B=p(B,K,z,U,E,15,d[58]),U=p(U,B,K,z,G,21,d[59]),z=p(z,U,B,K,P,6,d[60]),K=p(K,z,U,B,N,10,d[61]),B=p(B,K,z,U,x,15,d[62]),U=p(U,B,K,z,T,21,d[63]),o[0]=o[0]+z|0,o[1]=o[1]+U|0,o[2]=o[2]+B|0,o[3]=o[3]+K|0},_doFinalize:function(){var c=this._data,m=c.words,g=this._nDataBytes*8,b=c.sigBytes*8;m[b>>>5]|=128<<24-b%32;var n=f.floor(g/4294967296),o=g;m[(b+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,c.sigBytes=(m.length+1)*4,this._process();for(var t=this._hash,S=t.words,x=0;x<4;x++){var s=S[x];S[x]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return t},clone:function(){var c=h.clone.call(this);return c._hash=this._hash.clone(),c}});function l(c,m,g,b,n,o,t){var S=c+(m&g|~m&b)+n+t;return(S<<o|S>>>32-o)+m}function a(c,m,g,b,n,o,t){var S=c+(m&b|g&~b)+n+t;return(S<<o|S>>>32-o)+m}function _(c,m,g,b,n,o,t){var S=c+(m^g^b)+n+t;return(S<<o|S>>>32-o)+m}function p(c,m,g,b,n,o,t){var S=c+(g^(m|~b))+n+t;return(S<<o|S>>>32-o)+m}C.MD5=h._createHelper(i),C.HmacMD5=h._createHmacHelper(i)}(Math),L.MD5})},dejd:function(j,J,k){},dmUQ:function(j,J,k){"use strict";var L=k("Ff2n"),f=k("rePB"),C=k("1OyB"),D=k("vuIU"),u=k("Ji7U"),h=k("md7G"),w=k("foSv"),d=k("cDcd"),i=k.n(d),l=k("TSYQ"),a=k.n(l),_=k("4IlW");function p(y,T){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(y);T&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(y,I).enumerable})),M.push.apply(M,N)}return M}function c(y){for(var T=1;T<arguments.length;T++){var M=arguments[T]!=null?arguments[T]:{};T%2?p(Object(M),!0).forEach(function(N){Object(f.a)(y,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):p(Object(M)).forEach(function(N){Object.defineProperty(y,N,Object.getOwnPropertyDescriptor(M,N))})}return y}function m(y){var T=g();return function(){var N=Object(w.a)(y),I;if(T){var G=Object(w.a)(this).constructor;I=Reflect.construct(N,arguments,G)}else I=N.apply(this,arguments);return Object(h.a)(this,I)}}function g(){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(y){return!1}}function b(){}function n(y){y.preventDefault()}var o=function(T){return T.replace(/[^\w.-]+/g,"")},t=200,S=600,x=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,s=function(T){return T!=null},P=function(T,M){return M===T||typeof M=="number"&&typeof T=="number"&&isNaN(M)&&isNaN(T)},O=function(y){Object(u.a)(M,y);var T=m(M);function M(N){var I;Object(C.a)(this,M),I=T.call(this,N),I.onKeyDown=function(W){var z=I.props,U=z.onKeyDown,B=z.onPressEnter;if(W.keyCode===_.a.UP){var K=I.getRatio(W);I.up(W,K,null),I.stop()}else if(W.keyCode===_.a.DOWN){var q=I.getRatio(W);I.down(W,q,null),I.stop()}else W.keyCode===_.a.ENTER&&B&&B(W);if(I.recordCursorPosition(),I.lastKeyCode=W.keyCode,U){for(var ae=arguments.length,se=new Array(ae>1?ae-1:0),we=1;we<ae;we++)se[we-1]=arguments[we];U.apply(void 0,[W].concat(se))}},I.onKeyUp=function(W){var z=I.props.onKeyUp;if(I.stop(),I.recordCursorPosition(),z){for(var U=arguments.length,B=new Array(U>1?U-1:0),K=1;K<U;K++)B[K-1]=arguments[K];z.apply(void 0,[W].concat(B))}},I.onChange=function(W){var z=I.props.onChange;I.state.focused&&(I.inputting=!0),I.rawInput=I.props.parser(I.getValueFromEvent(W)),I.setState({inputValue:I.rawInput}),z(I.toNumber(I.rawInput))},I.onMouseUp=function(){var W=I.props.onMouseUp;I.recordCursorPosition(),W&&W.apply(void 0,arguments)},I.onFocus=function(){var W;I.setState({focused:!0}),(W=I.props).onFocus.apply(W,arguments)},I.onBlur=function(){var W=I.props.onBlur;I.inputting=!1,I.setState({focused:!1});var z=I.getCurrentValidValue(I.state.inputValue),U=I.setValue(z,b);if(W){var B=I.input.value,K=I.getInputDisplayValue({focus:!1,value:U});I.input.value=K&&Number(K),W.apply(void 0,arguments),I.input.value=B}},I.getRatio=function(W){var z=1;return W.metaKey||W.ctrlKey?z=.1:W.shiftKey&&(z=10),z},I.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},I.getPrecision=function(W){if(s(I.props.precision))return I.props.precision;var z=String(W);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var U=0;return z.indexOf(".")>=0&&(U=z.length-z.indexOf(".")-1),U},I.getInputDisplayValue=function(W){var z=W||I.state,U=z.focused,B=z.inputValue,K=z.value,q;U?q=B:q=I.toPrecisionAsStep(K),q==null&&(q="");var ae=I.formatWrapper(q);return s(I.props.decimalSeparator)&&(ae=ae.toString().replace(".",I.props.decimalSeparator)),ae},I.recordCursorPosition=function(){try{I.cursorStart=I.input.selectionStart,I.cursorEnd=I.input.selectionEnd,I.currentValue=I.input.value,I.cursorBefore=I.input.value.substring(0,I.cursorStart),I.cursorAfter=I.input.value.substring(I.cursorEnd)}catch(W){}},I.restoreByAfter=function(W){if(W===void 0)return!1;var z=I.input.value,U=z.lastIndexOf(W);if(U===-1)return!1;var B=I.cursorBefore.length;return I.lastKeyCode===_.a.DELETE&&I.cursorBefore.charAt(B-1)===W[0]?(I.fixCaret(B,B),!0):U+W.length===z.length?(I.fixCaret(U,U),!0):!1},I.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(z,U){var B=W.substring(U);return I.restoreByAfter(B)})},I.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},I.stop=function(){I.autoStepTimer&&clearTimeout(I.autoStepTimer)},I.down=function(W,z,U){I.pressingUpOrDown=!0,I.step("down",W,z,U)},I.up=function(W,z,U){I.pressingUpOrDown=!0,I.step("up",W,z,U)},I.saveInput=function(W){I.input=W};var G=N.value;G===void 0&&(G=N.defaultValue),I.state={focused:N.autoFocus};var H=I.getValidValue(I.toNumber(G));return I.state=c(c({},I.state),{},{inputValue:I.toPrecisionAsStep(H),value:H}),I}return Object(D.a)(M,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(I){var G=this.props,H=G.value,W=G.onChange,z=G.max,U=G.min,B=this.state.focused;if(I){if(!P(I.value,H)||!P(I.max,z)||!P(I.min,U)){var K=B?H:this.getValidValue(H),q;this.pressingUpOrDown?q=K:this.inputting?q=this.rawInput:q=this.toPrecisionAsStep(K),this.setState({value:K,inputValue:q})}var ae="value"in this.props?H:this.state.value;"max"in this.props&&I.max!==z&&typeof ae=="number"&&ae>z&&W&&W(z),"min"in this.props&&I.min!==U&&typeof ae=="number"&&ae<U&&W&&W(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var se=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===_.a.BACKSPACE?se=this.cursorStart-1:this.lastKeyCode===_.a.DELETE&&(se=this.cursorStart):se=this.input.value.length,this.fixCaret(se,se)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case _.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case _.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(we){}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(I){var G=I;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(I){var G=I.target.value.trim().replace(/。/g,".");return s(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(I);return isNaN(W)?I:(W<G&&(W=G),W>H&&(W=H),W)}},{key:"setValue",value:function(I,G){var H=this.props.precision,W=this.isNotCompleteNumber(parseFloat(I))?null:parseFloat(I),z=this.state.value,U=z===void 0?null:z,B=this.state.inputValue,K=B===void 0?null:B,q=typeof W=="number"?W.toFixed(H):"".concat(W),ae=W!==U||q!=="".concat(K);return"value"in this.props?(K=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:K},G)):this.setState({value:W,inputValue:this.toPrecisionAsStep(I)},G),ae&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,W=H.precision,z=H.step;if(s(W))return W;var U=this.getPrecision(G),B=this.getPrecision(z),K=this.getPrecision(I);return I?Math.max(K,U+B):U+B}},{key:"getPrecisionFactor",value:function(I){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(I,G);return Math.pow(10,H)}},{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(I){return this.props.formatter?this.props.formatter(I):I}},{key:"toPrecisionAsStep",value:function(I){if(this.isNotCompleteNumber(I)||I==="")return I;var G=Math.abs(this.getMaxPrecision(I));return isNaN(G)?I.toString():Number(I).toFixed(G)}},{key:"toNumber",value:function(I){var G=this.props.precision,H=this.state.focused,W=I&&I.length>16&&H;return this.isNotCompleteNumber(I)||W?I:s(G)?Math.round(I*Math.pow(10,G))/Math.pow(10,G):Number(I)}},{key:"upStep",value:function(I,G){var H=this.props.step,W=this.getPrecisionFactor(I,G),z=Math.abs(this.getMaxPrecision(I,G)),U=((W*I+W*H*G)/W).toFixed(z);return this.toNumber(U)}},{key:"downStep",value:function(I,G){var H=this.props.step,W=this.getPrecisionFactor(I,G),z=Math.abs(this.getMaxPrecision(I,G)),U=((W*I-W*H*G)/W).toFixed(z);return this.toNumber(U)}},{key:"step",value:function(I,G){var H=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var U=this.props;if(U.disabled)return;var B=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(B))return;var K=this["".concat(I,"Step")](B,W),q=K>U.max||K<U.min;if(K>U.max?K=U.max:K<U.min&&(K=U.min),this.setValue(K,null),this.setState({focused:!0},function(){H.pressingUpOrDown=!1}),q)return;this.autoStepTimer=setTimeout(function(){H[I](G,W,!0)},z?t:S)}},{key:"fixCaret",value:function(I,G){if(I===void 0||G===void 0||!this.input||!this.input.value)return;try{var H=this.input.selectionStart,W=this.input.selectionEnd;(I!==H||G!==W)&&this.input.setSelectionRange(I,G)}catch(z){}}},{key:"render",value:function(){var I,G=this.props,H=G.prefixCls,W=G.disabled,z=G.readOnly,U=G.useTouch,B=G.autoComplete,K=G.upHandler,q=G.downHandler,ae=G.className,se=G.max,we=G.min,Te=G.style,de=G.title,xe=G.onMouseEnter,pe=G.onMouseLeave,ne=G.onMouseOver,ie=G.onMouseOut,ee=G.required,le=G.onClick,Q=G.tabIndex,Z=G.type,be=G.placeholder,te=G.id,$=G.inputMode,X=G.pattern,Y=G.step,ve=G.maxLength,ue=G.autoFocus,Ee=G.name,Ke=G.onPaste,Ye=G.onInput,Je=Object(L.a)(G,["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"]),tt=this.state,at=tt.value,lt=tt.focused,je=a()(H,(I={},Object(f.a)(I,ae,!!ae),Object(f.a)(I,"".concat(H,"-disabled"),W),Object(f.a)(I,"".concat(H,"-focused"),lt),I)),Ce={};Object.keys(Je).forEach(function(Ae){(Ae.substr(0,5)==="data-"||Ae.substr(0,5)==="aria-"||Ae==="role")&&(Ce[Ae]=Je[Ae])});var Qe=!z&&!W,st=this.getInputDisplayValue(null),Ge=(at||at===0)&&(isNaN(at)||Number(at)>=se),rt=(at||at===0)&&(isNaN(at)||Number(at)<=we),Re=Ge||W||z,Se=rt||W||z,De=a()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(f.a)({},"".concat(H,"-handler-up-disabled"),Re)),fe=a()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(f.a)({},"".concat(H,"-handler-down-disabled"),Se)),ye=U?{onTouchStart:Re?b:this.up,onTouchEnd:this.stop}:{onMouseDown:Re?b:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_e=U?{onTouchStart:Se?b:this.down,onTouchEnd:this.stop}:{onMouseDown:Se?b:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return i.a.createElement("div",{className:je,style:Te,title:de,onMouseEnter:xe,onMouseLeave:pe,onMouseOver:ne,onMouseOut:ie,onFocus:function(){return null},onBlur:function(){return null}},i.a.createElement("div",{className:"".concat(H,"-handler-wrap")},i.a.createElement("span",Object.assign({unselectable:"on"},ye,{role:"button","aria-label":"Increase Value","aria-disabled":Re,className:De}),K||i.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:n})),i.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Decrease Value","aria-disabled":Se,className:fe}),q||i.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:n}))),i.a.createElement("div",{className:"".concat(H,"-input-wrap")},i.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":we,"aria-valuemax":se,"aria-valuenow":at,required:ee,type:Z,placeholder:be,onPaste:Ke,onClick:le,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:Q,autoComplete:B,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Qe?this.onKeyDown:b,onKeyUp:Qe?this.onKeyUp:b,autoFocus:ue,maxLength:ve,readOnly:z,disabled:W,max:se,min:we,step:Y,name:Ee,title:de,id:te,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(st),pattern:X,inputMode:$,onInput:Ye},Ce))))}}]),M}(i.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:x,min:-x,step:1,style:{},onChange:b,onKeyDown:b,onPressEnter:b,onFocus:b,onBlur:b,parser:o,required:!1,autoComplete:"off"};var E=O,v=J.a=E},e7zE:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.Base,u=C.WordArray,h=f.algo,w=h.SHA1,d=h.HMAC,i=h.PBKDF2=D.extend({cfg:D.extend({keySize:128/32,hasher:w,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,a){for(var _=this.cfg,p=d.create(_.hasher,l),c=u.create(),m=u.create([1]),g=c.words,b=m.words,n=_.keySize,o=_.iterations;g.length<n;){var t=p.update(a).finalize(m);p.reset();for(var S=t.words,x=S.length,s=t,P=1;P<o;P++){s=p.finalize(s),p.reset();for(var O=s.words,E=0;E<x;E++)S[E]^=O[E]}c.concat(t),b[0]++}return c.sigBytes=n*4,c}});f.PBKDF2=function(l,a,_){return i.create(_).compute(l,a)}}(),L.PBKDF2})},fyJ8:function(j,J,k){"use strict";var L=k("rePB"),f=k("VTBJ"),C=k("Ff2n"),D=k("U8pU"),u=k("cDcd"),h=k.n(u),w=k("TSYQ"),d=k.n(w),i=k("c+Xe"),l=k("sR1s");function a(g){return g&&Object(D.a)(g)==="object"&&!Array.isArray(g)&&!u.isValidElement(g)}function _(g){return typeof g=="string"?!0:Object(i.c)(g)}function p(g,b){var n,o=g.prefixCls,t=g.className,S=g.record,x=g.index,s=g.dataIndex,P=g.render,O=g.children,E=g.component,v=E===void 0?"td":E,y=g.colSpan,T=g.rowSpan,M=g.fixLeft,N=g.fixRight,I=g.firstFixLeft,G=g.lastFixLeft,H=g.firstFixRight,W=g.lastFixRight,z=g.appendNode,U=g.additionalProps,B=U===void 0?{}:U,K=g.ellipsis,q=g.align,ae=g.rowType,se=g.isSticky,we="".concat(o,"-cell"),Te,de;if(O)de=O;else{var xe=Object(l.b)(S,s);if(de=xe,P){var pe=P(xe,S,x);a(pe)?(de=pe.children,Te=pe.props):de=pe}}Object(D.a)(de)==="object"&&!Array.isArray(de)&&!u.isValidElement(de)&&(de=null),K&&(G||H)&&(de=u.createElement("span",{className:"".concat(we,"-content")},de));var ne=Te||{},ie=ne.colSpan,ee=ne.rowSpan,le=ne.style,Q=ne.className,Z=Object(C.a)(ne,["colSpan","rowSpan","style","className"]),be=ie!==void 0?ie:y,te=ee!==void 0?ee:T;if(be===0||te===0)return null;var $={},X=typeof M=="number",Y=typeof N=="number";X&&($.position="sticky",$.left=M),Y&&($.position="sticky",$.right=N);var ve={};q&&(ve.textAlign=q);var ue,Ee=K===!0?{showTitle:!0}:K;Ee&&(Ee.showTitle||ae==="header")&&(typeof de=="string"||typeof de=="number"?ue=de.toString():u.isValidElement(de)&&typeof de.props.children=="string"&&(ue=de.props.children));var Ke=Object(f.a)(Object(f.a)(Object(f.a)({title:ue},Z),B),{},{colSpan:be&&be!==1?be:null,rowSpan:te&&te!==1?te:null,className:d()(we,t,(n={},Object(L.a)(n,"".concat(we,"-fix-left"),X),Object(L.a)(n,"".concat(we,"-fix-left-first"),I),Object(L.a)(n,"".concat(we,"-fix-left-last"),G),Object(L.a)(n,"".concat(we,"-fix-right"),Y),Object(L.a)(n,"".concat(we,"-fix-right-first"),H),Object(L.a)(n,"".concat(we,"-fix-right-last"),W),Object(L.a)(n,"".concat(we,"-ellipsis"),K),Object(L.a)(n,"".concat(we,"-with-append"),z),Object(L.a)(n,"".concat(we,"-fix-sticky"),(X||Y)&&se),n),B.className,Q),style:Object(f.a)(Object(f.a)(Object(f.a)(Object(f.a)({},B.style),ve),$),le),ref:_(v)?b:null});return u.createElement(v,Object.assign({},Ke),z,de)}var c=u.forwardRef(p);c.displayName="Cell";var m=u.memo(c,function(g,b){return b.shouldCellUpdate?!b.shouldCellUpdate(b.record,g.record):!1});J.a=m},gJ3r:function(j,J,k){"use strict";k.d(J,"a",function(){return L});var L=[{value:"\u5317\u4EAC",label:"\u5317\u4EAC",children:[{value:"\u4E1C\u57CE",label:"\u4E1C\u57CE"},{value:"\u897F\u57CE",label:"\u897F\u57CE"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u4E30\u53F0",label:"\u4E30\u53F0"},{value:"\u77F3\u666F\u5C71",label:"\u77F3\u666F\u5C71"},{value:"\u6D77\u6DC0",label:"\u6D77\u6DC0"},{value:"\u95E8\u5934\u6C9F",label:"\u95E8\u5934\u6C9F"},{value:"\u623F\u5C71",label:"\u623F\u5C71"},{value:"\u901A\u5DDE",label:"\u901A\u5DDE"},{value:"\u987A\u4E49",label:"\u987A\u4E49"},{value:"\u660C\u5E73",label:"\u660C\u5E73"},{value:"\u5927\u5174",label:"\u5927\u5174"},{value:"\u5E73\u8C37",label:"\u5E73\u8C37"},{value:"\u6000\u67D4",label:"\u6000\u67D4"},{value:"\u5BC6\u4E91",label:"\u5BC6\u4E91"},{value:"\u5EF6\u5E86",label:"\u5EF6\u5E86"}]},{value:"\u4E0A\u6D77",label:"\u4E0A\u6D77",children:[{value:"\u5D07\u660E",label:"\u5D07\u660E"},{value:"\u9EC4\u6D66",label:"\u9EC4\u6D66"},{value:"\u5362\u6E7E",label:"\u5362\u6E7E"},{value:"\u5F90\u6C47",label:"\u5F90\u6C47"},{value:"\u957F\u5B81",label:"\u957F\u5B81"},{value:"\u9759\u5B89",label:"\u9759\u5B89"},{value:"\u666E\u9640",label:"\u666E\u9640"},{value:"\u95F8\u5317",label:"\u95F8\u5317"},{value:"\u8679\u53E3",label:"\u8679\u53E3"},{value:"\u6768\u6D66",label:"\u6768\u6D66"},{value:"\u95F5\u884C",label:"\u95F5\u884C"},{value:"\u5B9D\u5C71",label:"\u5B9D\u5C71"},{value:"\u5609\u5B9A",label:"\u5609\u5B9A"},{value:"\u6D66\u4E1C",label:"\u6D66\u4E1C"},{value:"\u91D1\u5C71",label:"\u91D1\u5C71"},{value:"\u677E\u6C5F",label:"\u677E\u6C5F"},{value:"\u9752\u6D66",label:"\u9752\u6D66"},{value:"\u5357\u6C47",label:"\u5357\u6C47"},{value:"\u5949\u8D24",label:"\u5949\u8D24"}]},{value:"\u5E7F\u4E1C",label:"\u5E7F\u4E1C",children:[{value:"\u5E7F\u5DDE",label:"\u5E7F\u5DDE"},{value:"\u6DF1\u5733",label:"\u6DF1\u5733"},{value:"\u73E0\u6D77",label:"\u73E0\u6D77"},{value:"\u4E1C\u839E",label:"\u4E1C\u839E"},{value:"\u4E2D\u5C71",label:"\u4E2D\u5C71"},{value:"\u4F5B\u5C71",label:"\u4F5B\u5C71"},{value:"\u60E0\u5DDE",label:"\u60E0\u5DDE"},{value:"\u6CB3\u6E90",label:"\u6CB3\u6E90"},{value:"\u6F6E\u5DDE",label:"\u6F6E\u5DDE"},{value:"\u6C5F\u95E8",label:"\u6C5F\u95E8"},{value:"\u63ED\u9633",label:"\u63ED\u9633"},{value:"\u8302\u540D",label:"\u8302\u540D"},{value:"\u6885\u5DDE",label:"\u6885\u5DDE"},{value:"\u6E05\u8FDC",label:"\u6E05\u8FDC"},{value:"\u6C55\u5934",label:"\u6C55\u5934"},{value:"\u6C55\u5C3E",label:"\u6C55\u5C3E"},{value:"\u97F6\u5173",label:"\u97F6\u5173"},{value:"\u987A\u5FB7",label:"\u987A\u5FB7"},{value:"\u9633\u6C5F",label:"\u9633\u6C5F"},{value:"\u4E91\u6D6E",label:"\u4E91\u6D6E"},{value:"\u6E5B\u6C5F",label:"\u6E5B\u6C5F"},{value:"\u8087\u5E86",label:"\u8087\u5E86"}]},{value:"\u6C5F\u82CF",label:"\u6C5F\u82CF",children:[{value:"\u5357\u4EAC",label:"\u5357\u4EAC"},{value:"\u5E38\u719F",label:"\u5E38\u719F"},{value:"\u5E38\u5DDE",label:"\u5E38\u5DDE"},{value:"\u6D77\u95E8",label:"\u6D77\u95E8"},{value:"\u6DEE\u5B89",label:"\u6DEE\u5B89"},{value:"\u6C5F\u90FD",label:"\u6C5F\u90FD"},{value:"\u6C5F\u9634",label:"\u6C5F\u9634"},{value:"\u6606\u5C71",label:"\u6606\u5C71"},{value:"\u8FDE\u4E91\u6E2F",label:"\u8FDE\u4E91\u6E2F"},{value:"\u5357\u901A",label:"\u5357\u901A"},{value:"\u542F\u4E1C",label:"\u542F\u4E1C"},{value:"\u6CAD\u9633",label:"\u6CAD\u9633"},{value:"\u5BBF\u8FC1",label:"\u5BBF\u8FC1"},{value:"\u82CF\u5DDE",label:"\u82CF\u5DDE"},{value:"\u592A\u4ED3",label:"\u592A\u4ED3"},{value:"\u6CF0\u5DDE",label:"\u6CF0\u5DDE"},{value:"\u540C\u91CC",label:"\u540C\u91CC"},{value:"\u65E0\u9521",label:"\u65E0\u9521"},{value:"\u5F90\u5DDE",label:"\u5F90\u5DDE"},{value:"\u76D0\u57CE",label:"\u76D0\u57CE"},{value:"\u626C\u5DDE",label:"\u626C\u5DDE"},{value:"\u5B9C\u5174",label:"\u5B9C\u5174"},{value:"\u4EEA\u5F81",label:"\u4EEA\u5F81"},{value:"\u5F20\u5BB6\u6E2F",label:"\u5F20\u5BB6\u6E2F"},{value:"\u9547\u6C5F",label:"\u9547\u6C5F"}]},{value:"\u91CD\u5E86",label:"\u91CD\u5E86",children:[{value:"\u4E07\u5DDE",label:"\u4E07\u5DDE"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u6E1D\u4E2D",label:"\u6E1D\u4E2D"},{value:"\u5927\u6E21\u53E3",label:"\u5927\u6E21\u53E3"},{value:"\u6C5F\u5317",label:"\u6C5F\u5317"},{value:"\u6C99\u576A\u575D",label:"\u6C99\u576A\u575D"},{value:"\u4E5D\u9F99\u5761",label:"\u4E5D\u9F99\u5761"},{value:"\u5357\u5CB8",label:"\u5357\u5CB8"},{value:"\u5317\u789A",label:"\u5317\u789A"},{value:"\u4E07\u76DB",label:"\u4E07\u76DB"},{value:"\u53CC\u6322",label:"\u53CC\u6322"},{value:"\u6E1D\u5317",label:"\u6E1D\u5317"},{value:"\u5DF4\u5357",label:"\u5DF4\u5357"},{value:"\u9ED4\u6C5F",label:"\u9ED4\u6C5F"},{value:"\u957F\u5BFF",label:"\u957F\u5BFF"},{value:"\u7DA6\u6C5F",label:"\u7DA6\u6C5F"},{value:"\u6F7C\u5357",label:"\u6F7C\u5357"},{value:"\u94DC\u6881",label:"\u94DC\u6881"},{value:"\u5927\u8DB3",label:"\u5927\u8DB3"},{value:"\u8363\u660C",label:"\u8363\u660C"},{value:"\u58C1\u5C71",label:"\u58C1\u5C71"},{value:"\u6881\u5E73",label:"\u6881\u5E73"},{value:"\u57CE\u53E3",label:"\u57CE\u53E3"},{value:"\u4E30\u90FD",label:"\u4E30\u90FD"},{value:"\u57AB\u6C5F",label:"\u57AB\u6C5F"},{value:"\u6B66\u9686",label:"\u6B66\u9686"},{value:"\u5FE0\u53BF",label:"\u5FE0\u53BF"},{value:"\u5F00\u53BF",label:"\u5F00\u53BF"},{value:"\u4E91\u9633",label:"\u4E91\u9633"},{value:"\u5949\u8282",label:"\u5949\u8282"},{value:"\u5DEB\u5C71",label:"\u5DEB\u5C71"},{value:"\u5DEB\u6EAA",label:"\u5DEB\u6EAA"},{value:"\u77F3\u67F1",label:"\u77F3\u67F1"},{value:"\u79C0\u5C71",label:"\u79C0\u5C71"},{value:"\u9149\u9633",label:"\u9149\u9633"},{value:"\u5F6D\u6C34",label:"\u5F6D\u6C34"},{value:"\u6C5F\u6D25",label:"\u6C5F\u6D25"},{value:"\u5408\u5DDD",label:"\u5408\u5DDD"},{value:"\u6C38\u5DDD",label:"\u6C38\u5DDD"},{value:"\u5357\u5DDD",label:"\u5357\u5DDD"}]},{value:"\u5B89\u5FBD",label:"\u5B89\u5FBD",children:[{value:"\u5408\u80A5",label:"\u5408\u80A5"},{value:"\u5B89\u5E86",label:"\u5B89\u5E86"},{value:"\u868C\u57E0",label:"\u868C\u57E0"},{value:"\u4EB3\u5DDE",label:"\u4EB3\u5DDE"},{value:"\u5DE2\u6E56",label:"\u5DE2\u6E56"},{value:"\u6EC1\u5DDE",label:"\u6EC1\u5DDE"},{value:"\u961C\u9633",label:"\u961C\u9633"},{value:"\u8D35\u6C60",label:"\u8D35\u6C60"},{value:"\u6DEE\u5317",label:"\u6DEE\u5317"},{value:"\u6DEE\u5316",label:"\u6DEE\u5316"},{value:"\u6DEE\u5357",label:"\u6DEE\u5357"},{value:"\u9EC4\u5C71",label:"\u9EC4\u5C71"},{value:"\u4E5D\u534E\u5C71",label:"\u4E5D\u534E\u5C71"},{value:"\u516D\u5B89",label:"\u516D\u5B89"},{value:"\u9A6C\u978D\u5C71",label:"\u9A6C\u978D\u5C71"},{value:"\u5BBF\u5DDE",label:"\u5BBF\u5DDE"},{value:"\u94DC\u9675",label:"\u94DC\u9675"},{value:"\u5C6F\u6EAA",label:"\u5C6F\u6EAA"},{value:"\u829C\u6E56",label:"\u829C\u6E56"},{value:"\u5BA3\u57CE",label:"\u5BA3\u57CE"}]},{value:"\u798F\u5EFA",label:"\u798F\u5EFA",children:[{value:"\u798F\u5DDE",label:"\u798F\u5DDE"},{value:"\u53A6\u95E8",label:"\u53A6\u95E8"},{value:"\u6CC9\u5DDE",label:"\u6CC9\u5DDE"},{value:"\u6F33\u5DDE",label:"\u6F33\u5DDE"},{value:"\u9F99\u5CA9",label:"\u9F99\u5CA9"},{value:"\u5357\u5E73",label:"\u5357\u5E73"},{value:"\u5B81\u5FB7",label:"\u5B81\u5FB7"},{value:"\u8386\u7530",label:"\u8386\u7530"},{value:"\u4E09\u660E",label:"\u4E09\u660E"}]},{value:"\u7518\u8083",label:"\u7518\u8083",children:[{value:"\u5170\u5DDE",label:"\u5170\u5DDE"},{value:"\u5609\u5CEA\u5173",label:"\u5609\u5CEA\u5173"},{value:"\u767D\u94F6",label:"\u767D\u94F6"},{value:"\u5B9A\u897F",label:"\u5B9A\u897F"},{value:"\u6566\u714C",label:"\u6566\u714C"},{value:"\u7518\u5357",label:"\u7518\u5357"},{value:"\u91D1\u660C",label:"\u91D1\u660C"},{value:"\u9152\u6CC9",label:"\u9152\u6CC9"},{value:"\u4E34\u590F",label:"\u4E34\u590F"},{value:"\u5E73\u51C9",label:"\u5E73\u51C9"},{value:"\u5929\u6C34",label:"\u5929\u6C34"},{value:"\u9647\u5357",label:"\u9647\u5357"},{value:"\u6B66\u5A01",label:"\u6B66\u5A01"},{value:"\u897F\u5CF0",label:"\u897F\u5CF0"},{value:"\u5F20\u6396",label:"\u5F20\u6396"}]},{value:"\u5E7F\u897F",label:"\u5E7F\u897F",children:[{value:"\u5357\u5B81",label:"\u5357\u5B81"},{value:"\u6765\u5BBE",label:"\u6765\u5BBE"},{value:"\u767E\u8272",label:"\u767E\u8272"},{value:"\u5317\u6D77",label:"\u5317\u6D77"},{value:"\u6842\u6797",label:"\u6842\u6797"},{value:"\u9632\u57CE\u6E2F",label:"\u9632\u57CE\u6E2F"},{value:"\u8D35\u6E2F",label:"\u8D35\u6E2F"},{value:"\u6CB3\u6C60",label:"\u6CB3\u6C60"},{value:"\u8D3A\u5DDE",label:"\u8D3A\u5DDE"},{value:"\u67F3\u5DDE",label:"\u67F3\u5DDE"},{value:"\u94A6\u5DDE",label:"\u94A6\u5DDE"},{value:"\u68A7\u5DDE",label:"\u68A7\u5DDE"},{value:"\u7389\u6797",label:"\u7389\u6797"}]},{value:"\u8D35\u5DDE",label:"\u8D35\u5DDE",children:[{value:"\u8D35\u9633",label:"\u8D35\u9633"},{value:"\u5B89\u987A",label:"\u5B89\u987A"},{value:"\u6BD5\u8282",label:"\u6BD5\u8282"},{value:"\u90FD\u5300",label:"\u90FD\u5300"},{value:"\u51EF\u91CC",label:"\u51EF\u91CC"},{value:"\u516D\u76D8\u6C34",label:"\u516D\u76D8\u6C34"},{value:"\u94DC\u4EC1",label:"\u94DC\u4EC1"},{value:"\u5174\u4E49",label:"\u5174\u4E49"},{value:"\u7389\u5C4F",label:"\u7389\u5C4F"},{value:"\u9075\u4E49",label:"\u9075\u4E49"}]},{value:"\u6D77\u5357",label:"\u6D77\u5357",children:[{value:"\u6D77\u53E3",label:"\u6D77\u53E3"},{value:"\u510B\u53BF",label:"\u510B\u53BF"},{value:"\u9675\u6C34",label:"\u9675\u6C34"},{value:"\u743C\u6D77",label:"\u743C\u6D77"},{value:"\u4E09\u4E9A",label:"\u4E09\u4E9A"},{value:"\u901A\u4EC0",label:"\u901A\u4EC0"},{value:"\u4E07\u5B81",label:"\u4E07\u5B81"}]},{value:"\u6CB3\u5317",label:"\u6CB3\u5317",children:[{value:"\u77F3\u5BB6\u5E84",label:"\u77F3\u5BB6\u5E84"},{value:"\u4FDD\u5B9A",label:"\u4FDD\u5B9A"},{value:"\u5317\u6234\u6CB3",label:"\u5317\u6234\u6CB3"},{value:"\u6CA7\u5DDE",label:"\u6CA7\u5DDE"},{value:"\u627F\u5FB7",label:"\u627F\u5FB7"},{value:"\u4E30\u6DA6",label:"\u4E30\u6DA6"},{value:"\u90AF\u90F8",label:"\u90AF\u90F8"},{value:"\u8861\u6C34",label:"\u8861\u6C34"},{value:"\u5ECA\u574A",label:"\u5ECA\u574A"},{value:"\u5357\u6234\u6CB3",label:"\u5357\u6234\u6CB3"},{value:"\u79E6\u7687\u5C9B",label:"\u79E6\u7687\u5C9B"},{value:"\u5510\u5C71",label:"\u5510\u5C71"},{value:"\u65B0\u57CE",label:"\u65B0\u57CE"},{value:"\u90A2\u53F0",label:"\u90A2\u53F0"},{value:"\u5F20\u5BB6\u53E3",label:"\u5F20\u5BB6\u53E3"}]},{value:"\u9ED1\u9F99\u6C5F",label:"\u9ED1\u9F99\u6C5F",children:[{value:"\u54C8\u5C14\u6EE8",label:"\u54C8\u5C14\u6EE8"},{value:"\u5317\u5B89",label:"\u5317\u5B89"},{value:"\u5927\u5E86",label:"\u5927\u5E86"},{value:"\u5927\u5174\u5B89\u5CAD",label:"\u5927\u5174\u5B89\u5CAD"},{value:"\u9E64\u5C97",label:"\u9E64\u5C97"},{value:"\u9ED1\u6CB3",label:"\u9ED1\u6CB3"},{value:"\u4F73\u6728\u65AF",label:"\u4F73\u6728\u65AF"},{value:"\u9E21\u897F",label:"\u9E21\u897F"},{value:"\u7261\u4E39\u6C5F",label:"\u7261\u4E39\u6C5F"},{value:"\u9F50\u9F50\u54C8\u5C14",label:"\u9F50\u9F50\u54C8\u5C14"},{value:"\u4E03\u53F0\u6CB3",label:"\u4E03\u53F0\u6CB3"},{value:"\u53CC\u9E2D\u5C71",label:"\u53CC\u9E2D\u5C71"},{value:"\u7EE5\u5316",label:"\u7EE5\u5316"},{value:"\u4F0A\u6625",label:"\u4F0A\u6625"}]},{value:"\u6CB3\u5357",label:"\u6CB3\u5357",children:[{value:"\u90D1\u5DDE",label:"\u90D1\u5DDE"},{value:"\u5B89\u9633",label:"\u5B89\u9633"},{value:"\u9E64\u58C1",label:"\u9E64\u58C1"},{value:"\u6F62\u5DDD",label:"\u6F62\u5DDD"},{value:"\u7126\u4F5C",label:"\u7126\u4F5C"},{value:"\u6D4E\u6E90",label:"\u6D4E\u6E90"},{value:"\u5F00\u5C01",label:"\u5F00\u5C01"},{value:"\u6F2F\u6CB3",label:"\u6F2F\u6CB3"},{value:"\u6D1B\u9633",label:"\u6D1B\u9633"},{value:"\u5357\u9633",label:"\u5357\u9633"},{value:"\u5E73\u9876\u5C71",label:"\u5E73\u9876\u5C71"},{value:"\u6FEE\u9633",label:"\u6FEE\u9633"},{value:"\u4E09\u95E8\u5CE1",label:"\u4E09\u95E8\u5CE1"},{value:"\u5546\u4E18",label:"\u5546\u4E18"},{value:"\u65B0\u4E61",label:"\u65B0\u4E61"},{value:"\u4FE1\u9633",label:"\u4FE1\u9633"},{value:"\u8BB8\u660C",label:"\u8BB8\u660C"},{value:"\u5468\u53E3",label:"\u5468\u53E3"},{value:"\u9A7B\u9A6C\u5E97",label:"\u9A7B\u9A6C\u5E97"}]},{value:"\u9999\u6E2F",label:"\u9999\u6E2F",children:[{value:"\u9999\u6E2F",label:"\u9999\u6E2F"},{value:"\u4E5D\u9F99",label:"\u4E5D\u9F99"},{value:"\u65B0\u754C",label:"\u65B0\u754C"}]},{value:"\u6E56\u5317",label:"\u6E56\u5317",children:[{value:"\u6B66\u6C49",label:"\u6B66\u6C49"},{value:"\u5929\u95E8",label:"\u5929\u95E8"},{value:"\u6069\u65BD",label:"\u6069\u65BD"},{value:"\u9102\u5DDE",label:"\u9102\u5DDE"},{value:"\u9EC4\u5188",label:"\u9EC4\u5188"},{value:"\u9EC4\u77F3",label:"\u9EC4\u77F3"},{value:"\u8346\u95E8",label:"\u8346\u95E8"},{value:"\u8346\u5DDE",label:"\u8346\u5DDE"},{value:"\u6F5C\u6C5F",label:"\u6F5C\u6C5F"},{value:"\u5341\u5830",label:"\u5341\u5830"},{value:"\u968F\u5DDE",label:"\u968F\u5DDE"},{value:"\u6B66\u7A74",label:"\u6B66\u7A74"},{value:"\u4ED9\u6843",label:"\u4ED9\u6843"},{value:"\u54B8\u5B81",label:"\u54B8\u5B81"},{value:"\u8944\u9633",label:"\u8944\u9633"},{value:"\u8944\u6A0A",label:"\u8944\u6A0A"},{value:"\u5B5D\u611F",label:"\u5B5D\u611F"},{value:"\u5B9C\u660C",label:"\u5B9C\u660C"}]},{value:"\u6E56\u5357",label:"\u6E56\u5357",children:[{value:"\u957F\u6C99",label:"\u957F\u6C99"},{value:"\u5E38\u5FB7",label:"\u5E38\u5FB7"},{value:"\u90F4\u5DDE",label:"\u90F4\u5DDE"},{value:"\u8861\u9633",label:"\u8861\u9633"},{value:"\u6000\u5316",label:"\u6000\u5316"},{value:"\u5409\u9996",label:"\u5409\u9996"},{value:"\u5A04\u5E95",label:"\u5A04\u5E95"},{value:"\u90B5\u9633",label:"\u90B5\u9633"},{value:"\u6E58\u6F6D",label:"\u6E58\u6F6D"},{value:"\u76CA\u9633",label:"\u76CA\u9633"},{value:"\u5CB3\u9633",label:"\u5CB3\u9633"},{value:"\u6C38\u5DDE",label:"\u6C38\u5DDE"},{value:"\u5F20\u5BB6\u754C",label:"\u5F20\u5BB6\u754C"},{value:"\u682A\u6D32",label:"\u682A\u6D32"}]},{value:"\u6C5F\u897F",label:"\u6C5F\u897F",children:[{value:"\u5357\u660C",label:"\u5357\u660C"},{value:"\u629A\u5DDE",label:"\u629A\u5DDE"},{value:"\u8D63\u5DDE",label:"\u8D63\u5DDE"},{value:"\u5409\u5B89",label:"\u5409\u5B89"},{value:"\u666F\u5FB7\u9547",label:"\u666F\u5FB7\u9547"},{value:"\u4E95\u5188\u5C71",label:"\u4E95\u5188\u5C71"},{value:"\u4E5D\u6C5F",label:"\u4E5D\u6C5F"},{value:"\u5E90\u5C71",label:"\u5E90\u5C71"},{value:"\u840D\u4E61",label:"\u840D\u4E61"},{value:"\u4E0A\u9976",label:"\u4E0A\u9976"},{value:"\u65B0\u4F59",label:"\u65B0\u4F59"},{value:"\u5B9C\u6625",label:"\u5B9C\u6625"},{value:"\u9E70\u6F6D",label:"\u9E70\u6F6D"}]},{value:"\u5409\u6797",label:"\u5409\u6797",children:[{value:"\u957F\u6625",label:"\u957F\u6625"},{value:"\u5409\u6797",label:"\u5409\u6797"},{value:"\u767D\u57CE",label:"\u767D\u57CE"},{value:"\u767D\u5C71",label:"\u767D\u5C71"},{value:"\u73F2\u6625",label:"\u73F2\u6625"},{value:"\u8FBD\u6E90",label:"\u8FBD\u6E90"},{value:"\u6885\u6CB3",label:"\u6885\u6CB3"},{value:"\u56DB\u5E73",label:"\u56DB\u5E73"},{value:"\u677E\u539F",label:"\u677E\u539F"},{value:"\u901A\u5316",label:"\u901A\u5316"},{value:"\u5EF6\u5409",label:"\u5EF6\u5409"}]},{value:"\u8FBD\u5B81",label:"\u8FBD\u5B81",children:[{value:"\u6C88\u9633",label:"\u6C88\u9633"},{value:"\u978D\u5C71",label:"\u978D\u5C71"},{value:"\u672C\u6EAA",label:"\u672C\u6EAA"},{value:"\u671D\u9633",label:"\u671D\u9633"},{value:"\u5927\u8FDE",label:"\u5927\u8FDE"},{value:"\u4E39\u4E1C",label:"\u4E39\u4E1C"},{value:"\u629A\u987A",label:"\u629A\u987A"},{value:"\u961C\u65B0",label:"\u961C\u65B0"},{value:"\u846B\u82A6\u5C9B",label:"\u846B\u82A6\u5C9B"},{value:"\u9526\u5DDE",label:"\u9526\u5DDE"},{value:"\u8FBD\u9633",label:"\u8FBD\u9633"},{value:"\u76D8\u9526",label:"\u76D8\u9526"},{value:"\u94C1\u5CAD",label:"\u94C1\u5CAD"},{value:"\u8425\u53E3",label:"\u8425\u53E3"}]},{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8",children:[{value:"\u6FB3\u95E8",label:"\u6FB3\u95E8"}]},{value:"\u5185\u8499\u53E4",label:"\u5185\u8499\u53E4",children:[{value:"\u547C\u548C\u6D69\u7279",label:"\u547C\u548C\u6D69\u7279"},{value:"\u963F\u62C9\u5584\u76DF",label:"\u963F\u62C9\u5584\u76DF"},{value:"\u5305\u5934",label:"\u5305\u5934"},{value:"\u8D64\u5CF0",label:"\u8D64\u5CF0"},{value:"\u4E1C\u80DC",label:"\u4E1C\u80DC"},{value:"\u6D77\u62C9\u5C14",label:"\u6D77\u62C9\u5C14"},{value:"\u96C6\u5B81",label:"\u96C6\u5B81"},{value:"\u4E34\u6CB3",label:"\u4E34\u6CB3"},{value:"\u901A\u8FBD",label:"\u901A\u8FBD"},{value:"\u4E4C\u6D77",label:"\u4E4C\u6D77"},{value:"\u4E4C\u5170\u6D69\u7279",label:"\u4E4C\u5170\u6D69\u7279"},{value:"\u9521\u6797\u6D69\u7279",label:"\u9521\u6797\u6D69\u7279"}]},{value:"\u5B81\u590F",label:"\u5B81\u590F",children:[{value:"\u94F6\u5DDD",label:"\u94F6\u5DDD"},{value:"\u56FA\u6E90",label:"\u56FA\u6E90"},{value:"\u77F3\u5634\u5C71",label:"\u77F3\u5634\u5C71"},{value:"\u5434\u5FE0",label:"\u5434\u5FE0"}]},{value:"\u9752\u6D77",label:"\u9752\u6D77",children:[{value:"\u897F\u5B81",label:"\u897F\u5B81"},{value:"\u5FB7\u4EE4\u54C8",label:"\u5FB7\u4EE4\u54C8"},{value:"\u683C\u5C14\u6728",label:"\u683C\u5C14\u6728"},{value:"\u5171\u548C",label:"\u5171\u548C"},{value:"\u6D77\u4E1C",label:"\u6D77\u4E1C"},{value:"\u6D77\u664F",label:"\u6D77\u664F"},{value:"\u739B\u6C81",label:"\u739B\u6C81"},{value:"\u540C\u4EC1",label:"\u540C\u4EC1"},{value:"\u7389\u6811",label:"\u7389\u6811"}]},{value:"\u5C71\u4E1C",label:"\u5C71\u4E1C",children:[{value:"\u6D4E\u5357",label:"\u6D4E\u5357"},{value:"\u6EE8\u5DDE",label:"\u6EE8\u5DDE"},{value:"\u5156\u5DDE",label:"\u5156\u5DDE"},{value:"\u5FB7\u5DDE",label:"\u5FB7\u5DDE"},{value:"\u4E1C\u8425",label:"\u4E1C\u8425"},{value:"\u83CF\u6CFD",label:"\u83CF\u6CFD"},{value:"\u6D4E\u5B81",label:"\u6D4E\u5B81"},{value:"\u83B1\u829C",label:"\u83B1\u829C"},{value:"\u804A\u57CE",label:"\u804A\u57CE"},{value:"\u4E34\u6C82",label:"\u4E34\u6C82"},{value:"\u84EC\u83B1",label:"\u84EC\u83B1"},{value:"\u9752\u5C9B",label:"\u9752\u5C9B"},{value:"\u66F2\u961C",label:"\u66F2\u961C"},{value:"\u65E5\u7167",label:"\u65E5\u7167"},{value:"\u6CF0\u5B89",label:"\u6CF0\u5B89"},{value:"\u6F4D\u574A",label:"\u6F4D\u574A"},{value:"\u5A01\u6D77",label:"\u5A01\u6D77"},{value:"\u70DF\u53F0",label:"\u70DF\u53F0"},{value:"\u67A3\u5E84",label:"\u67A3\u5E84"},{value:"\u6DC4\u535A",label:"\u6DC4\u535A"}]},{value:"\u5C71\u897F",label:"\u5C71\u897F",children:[{value:"\u592A\u539F",label:"\u592A\u539F"},{value:"\u5415\u6881",label:"\u5415\u6881"},{value:"\u957F\u6CBB",label:"\u957F\u6CBB"},{value:"\u5927\u540C",label:"\u5927\u540C"},{value:"\u5019\u9A6C",label:"\u5019\u9A6C"},{value:"\u664B\u57CE",label:"\u664B\u57CE"},{value:"\u79BB\u77F3",label:"\u79BB\u77F3"},{value:"\u4E34\u6C7E",label:"\u4E34\u6C7E"},{value:"\u5B81\u6B66",label:"\u5B81\u6B66"},{value:"\u6714\u5DDE",label:"\u6714\u5DDE"},{value:"\u5FFB\u5DDE",label:"\u5FFB\u5DDE"},{value:"\u9633\u6CC9",label:"\u9633\u6CC9"},{value:"\u6986\u6B21",label:"\u6986\u6B21"},{value:"\u664B\u4E2D",label:"\u664B\u4E2D"},{value:"\u8FD0\u57CE",label:"\u8FD0\u57CE"}]},{value:"\u9655\u897F",label:"\u9655\u897F",children:[{value:"\u897F\u5B89",label:"\u897F\u5B89"},{value:"\u5B89\u5EB7",label:"\u5B89\u5EB7"},{value:"\u5B9D\u9E21",label:"\u5B9D\u9E21"},{value:"\u6C49\u4E2D",label:"\u6C49\u4E2D"},{value:"\u6E2D\u5357",label:"\u6E2D\u5357"},{value:"\u5546\u5DDE",label:"\u5546\u5DDE"},{value:"\u7EE5\u5FB7",label:"\u7EE5\u5FB7"},{value:"\u94DC\u5DDD",label:"\u94DC\u5DDD"},{value:"\u54B8\u9633",label:"\u54B8\u9633"},{value:"\u5EF6\u5B89",label:"\u5EF6\u5B89"},{value:"\u6986\u6797",label:"\u6986\u6797"}]},{value:"\u56DB\u5DDD",label:"\u56DB\u5DDD",children:[{value:"\u6210\u90FD",label:"\u6210\u90FD"},{value:"\u5DF4\u4E2D",label:"\u5DF4\u4E2D"},{value:"\u8FBE\u5DDD",label:"\u8FBE\u5DDD"},{value:"\u5FB7\u9633",label:"\u5FB7\u9633"},{value:"\u90FD\u6C5F\u5830",label:"\u90FD\u6C5F\u5830"},{value:"\u5CE8\u7709\u5C71",label:"\u5CE8\u7709\u5C71"},{value:"\u6DAA\u9675",label:"\u6DAA\u9675"},{value:"\u5E7F\u5B89",label:"\u5E7F\u5B89"},{value:"\u5E7F\u5143",label:"\u5E7F\u5143"},{value:"\u4E5D\u5BE8\u6C9F",label:"\u4E5D\u5BE8\u6C9F"},{value:"\u5EB7\u5B9A",label:"\u5EB7\u5B9A"},{value:"\u4E50\u5C71",label:"\u4E50\u5C71"},{value:"\u6CF8\u5DDE",label:"\u6CF8\u5DDE"},{value:"\u9A6C\u5C14\u5EB7",label:"\u9A6C\u5C14\u5EB7"},{value:"\u7EF5\u9633",label:"\u7EF5\u9633"},{value:"\u7709\u5C71",label:"\u7709\u5C71"},{value:"\u5357\u5145",label:"\u5357\u5145"},{value:"\u5185\u6C5F",label:"\u5185\u6C5F"},{value:"\u6500\u679D\u82B1",label:"\u6500\u679D\u82B1"},{value:"\u9042\u5B81",label:"\u9042\u5B81"},{value:"\u6C76\u5DDD",label:"\u6C76\u5DDD"},{value:"\u897F\u660C",label:"\u897F\u660C"},{value:"\u96C5\u5B89",label:"\u96C5\u5B89"},{value:"\u5B9C\u5BBE",label:"\u5B9C\u5BBE"},{value:"\u81EA\u8D21",label:"\u81EA\u8D21"},{value:"\u8D44\u9633",label:"\u8D44\u9633"}]},{value:"\u53F0\u6E7E",label:"\u53F0\u6E7E",children:[{value:"\u53F0\u5317",label:"\u53F0\u5317"},{value:"\u57FA\u9686",label:"\u57FA\u9686"},{value:"\u53F0\u5357",label:"\u53F0\u5357"},{value:"\u53F0\u4E2D",label:"\u53F0\u4E2D"},{value:"\u9AD8\u96C4",label:"\u9AD8\u96C4"},{value:"\u5C4F\u4E1C",label:"\u5C4F\u4E1C"},{value:"\u5357\u6295",label:"\u5357\u6295"},{value:"\u4E91\u6797",label:"\u4E91\u6797"},{value:"\u65B0\u7AF9",label:"\u65B0\u7AF9"},{value:"\u5F70\u5316",label:"\u5F70\u5316"},{value:"\u82D7\u6817",label:"\u82D7\u6817"},{value:"\u5609\u4E49",label:"\u5609\u4E49"},{value:"\u6843\u56ED",label:"\u6843\u56ED"},{value:"\u5B9C\u5170",label:"\u5B9C\u5170"},{value:"\u53F0\u4E1C",label:"\u53F0\u4E1C"},{value:"\u91D1\u95E8",label:"\u91D1\u95E8"},{value:"\u9A6C\u7956",label:"\u9A6C\u7956"},{value:"\u6F8E\u6E56",label:"\u6F8E\u6E56"}]},{value:"\u5929\u6D25",label:"\u5929\u6D25",children:[{value:"\u5929\u6D25",label:"\u5929\u6D25"},{value:"\u548C\u5E73",label:"\u548C\u5E73"},{value:"\u4E1C\u4E3D",label:"\u4E1C\u4E3D"},{value:"\u6CB3\u4E1C",label:"\u6CB3\u4E1C"},{value:"\u897F\u9752",label:"\u897F\u9752"},{value:"\u6CB3\u897F",label:"\u6CB3\u897F"},{value:"\u6D25\u5357",label:"\u6D25\u5357"},{value:"\u5357\u5F00",label:"\u5357\u5F00"},{value:"\u5317\u8FB0",label:"\u5317\u8FB0"},{value:"\u6CB3\u5317",label:"\u6CB3\u5317"},{value:"\u6B66\u6E05",label:"\u6B66\u6E05"},{value:"\u7EA2\u6322",label:"\u7EA2\u6322"},{value:"\u5858\u6CBD",label:"\u5858\u6CBD"},{value:"\u6C49\u6CBD",label:"\u6C49\u6CBD"},{value:"\u5927\u6E2F",label:"\u5927\u6E2F"},{value:"\u5B81\u6CB3",label:"\u5B81\u6CB3"},{value:"\u9759\u6D77",label:"\u9759\u6D77"},{value:"\u5B9D\u577B",label:"\u5B9D\u577B"},{value:"\u84DF\u53BF",label:"\u84DF\u53BF"}]},{value:"\u65B0\u7586",label:"\u65B0\u7586",children:[{value:"\u4E4C\u9C81\u6728\u9F50",label:"\u4E4C\u9C81\u6728\u9F50"},{value:"\u963F\u514B\u82CF",label:"\u963F\u514B\u82CF"},{value:"\u963F\u52D2\u6CF0",label:"\u963F\u52D2\u6CF0"},{value:"\u963F\u56FE\u4EC0",label:"\u963F\u56FE\u4EC0"},{value:"\u535A\u4E50",label:"\u535A\u4E50"},{value:"\u660C\u5409",label:"\u660C\u5409"},{value:"\u4E1C\u5C71",label:"\u4E1C\u5C71"},{value:"\u54C8\u5BC6",label:"\u54C8\u5BC6"},{value:"\u548C\u7530",label:"\u548C\u7530"},{value:"\u5580\u4EC0",label:"\u5580\u4EC0"},{value:"\u514B\u62C9\u739B\u4F9D",label:"\u514B\u62C9\u739B\u4F9D"},{value:"\u5E93\u8F66",label:"\u5E93\u8F66"},{value:"\u5E93\u5C14\u52D2",label:"\u5E93\u5C14\u52D2"},{value:"\u594E\u5C6F",label:"\u594E\u5C6F"},{value:"\u77F3\u6CB3\u5B50",label:"\u77F3\u6CB3\u5B50"},{value:"\u5854\u57CE",label:"\u5854\u57CE"},{value:"\u5410\u9C81\u756A",label:"\u5410\u9C81\u756A"},{value:"\u4F0A\u5B81",label:"\u4F0A\u5B81"}]},{value:"\u897F\u85CF",label:"\u897F\u85CF",children:[{value:"\u62C9\u8428",label:"\u62C9\u8428"},{value:"\u963F\u91CC",label:"\u963F\u91CC"},{value:"\u660C\u90FD",label:"\u660C\u90FD"},{value:"\u6797\u829D",label:"\u6797\u829D"},{value:"\u90A3\u66F2",label:"\u90A3\u66F2"},{value:"\u65E5\u5580\u5219",label:"\u65E5\u5580\u5219"},{value:"\u5C71\u5357",label:"\u5C71\u5357"}]},{value:"\u4E91\u5357",label:"\u4E91\u5357",children:[{value:"\u6606\u660E",label:"\u6606\u660E"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4FDD\u5C71",label:"\u4FDD\u5C71"},{value:"\u695A\u96C4",label:"\u695A\u96C4"},{value:"\u5927\u7406",label:"\u5927\u7406"},{value:"\u4E1C\u5DDD",label:"\u4E1C\u5DDD"},{value:"\u4E2A\u65E7",label:"\u4E2A\u65E7"},{value:"\u666F\u6D2A",label:"\u666F\u6D2A"},{value:"\u5F00\u8FDC",label:"\u5F00\u8FDC"},{value:"\u4E34\u6CA7",label:"\u4E34\u6CA7"},{value:"\u4E3D\u6C5F",label:"\u4E3D\u6C5F"},{value:"\u516D\u5E93",label:"\u516D\u5E93"},{value:"\u6F5E\u897F",label:"\u6F5E\u897F"},{value:"\u66F2\u9756",label:"\u66F2\u9756"},{value:"\u601D\u8305",label:"\u601D\u8305"},{value:"\u6587\u5C71",label:"\u6587\u5C71"},{value:"\u897F\u53CC\u7248\u7EB3",label:"\u897F\u53CC\u7248\u7EB3"},{value:"\u7389\u6EAA",label:"\u7389\u6EAA"},{value:"\u4E2D\u7538",label:"\u4E2D\u7538"},{value:"\u662D\u901A",label:"\u662D\u901A"}]},{value:"\u6D59\u6C5F",label:"\u6D59\u6C5F",children:[{value:"\u676D\u5DDE",label:"\u676D\u5DDE"},{value:"\u6E29\u5DDE",label:"\u6E29\u5DDE"},{value:"\u5B89\u5409",label:"\u5B89\u5409"},{value:"\u6148\u6EAA",label:"\u6148\u6EAA"},{value:"\u5B9A\u6D77",label:"\u5B9A\u6D77"},{value:"\u5949\u5316",label:"\u5949\u5316"},{value:"\u6D77\u76D0",label:"\u6D77\u76D0"},{value:"\u9EC4\u5CA9",label:"\u9EC4\u5CA9"},{value:"\u6E56\u5DDE",label:"\u6E56\u5DDE"},{value:"\u5609\u5174",label:"\u5609\u5174"},{value:"\u91D1\u534E",label:"\u91D1\u534E"},{value:"\u4E34\u5B89",label:"\u4E34\u5B89"},{value:"\u4E34\u6D77",label:"\u4E34\u6D77"},{value:"\u4E3D\u6C34",label:"\u4E3D\u6C34"},{value:"\u5B81\u6CE2",label:"\u5B81\u6CE2"},{value:"\u74EF\u6D77",label:"\u74EF\u6D77"},{value:"\u5E73\u6E56",label:"\u5E73\u6E56"},{value:"\u5343\u5C9B\u6E56",label:"\u5343\u5C9B\u6E56"},{value:"\u8862\u5DDE",label:"\u8862\u5DDE"},{value:"\u6C5F\u5C71",label:"\u6C5F\u5C71"},{value:"\u745E\u5B89",label:"\u745E\u5B89"},{value:"\u7ECD\u5174",label:"\u7ECD\u5174"},{value:"\u5D4A\u5DDE",label:"\u5D4A\u5DDE"},{value:"\u53F0\u5DDE",label:"\u53F0\u5DDE"},{value:"\u6E29\u5CAD",label:"\u6E29\u5CAD"},{value:"\u4F59\u59DA",label:"\u4F59\u59DA"},{value:"\u821F\u5C71",label:"\u821F\u5C71"}]},{value:"\u6D77\u5916",label:"\u6D77\u5916",children:[{value:"\u7F8E\u56FD",label:"\u7F8E\u56FD"},{value:"\u65E5\u672C",label:"\u65E5\u672C"},{value:"\u82F1\u56FD",label:"\u82F1\u56FD"},{value:"\u6CD5\u56FD",label:"\u6CD5\u56FD"},{value:"\u5FB7\u56FD",label:"\u5FB7\u56FD"},{value:"\u5176\u4ED6",label:"\u5176\u4ED6"}]}]},"gb/T":function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.mode.ECB=function(){var f=L.lib.BlockCipherMode.extend();return f.Encryptor=f.extend({processBlock:function(C,D){this._cipher.encryptBlock(C,D)}}),f.Decryptor=f.extend({processBlock:function(C,D){this._cipher.decryptBlock(C,D)}}),f}(),L.mode.ECB})},h78n:function(j,J,k){"use strict";k.d(J,"a",function(){return I});var L=k("cDcd"),f=k.n(L),C=k("TSYQ"),D=k.n(C),u={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},h=function(W){var z=W.map(function(){return Object(L.useRef)()}),U=Object(L.useRef)();return Object(L.useEffect)(function(){var B=Date.now(),K=!1;Object.keys(z).forEach(function(q){var ae=z[q].current;if(!ae)return;K=!0;var se=ae.style;se.transitionDuration=".3s, .3s, .3s, .06s",U.current&&B-U.current<100&&(se.transitionDuration="0s, 0s")}),K&&(U.current=Date.now())}),[z]};function w(){return w=Object.assign||function(H){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&(H[U]=z[U])}return H},w.apply(this,arguments)}function d(H,W){return p(H)||_(H,W)||l(H,W)||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 l(H,W){if(!H)return;if(typeof H=="string")return a(H,W);var z=Object.prototype.toString.call(H).slice(8,-1);if(z==="Object"&&H.constructor&&(z=H.constructor.name),z==="Map"||z==="Set")return Array.from(H);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return a(H,W)}function a(H,W){(W==null||W>H.length)&&(W=H.length);for(var z=0,U=new Array(W);z<W;z++)U[z]=H[z];return U}function _(H,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(H)))return;var z=[],U=!0,B=!1,K=void 0;try{for(var q=H[Symbol.iterator](),ae;!(U=(ae=q.next()).done)&&!(z.push(ae.value),W&&z.length===W);U=!0);}catch(se){B=!0,K=se}finally{try{!U&&q.return!=null&&q.return()}finally{if(B)throw K}}return z}function p(H){if(Array.isArray(H))return H}function c(H,W){if(H==null)return{};var z=m(H,W),U,B;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(H);for(B=0;B<K.length;B++){if(U=K[B],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;z[U]=H[U]}}return z}function m(H,W){if(H==null)return{};var z={},U=Object.keys(H),B,K;for(K=0;K<U.length;K++){if(B=U[K],W.indexOf(B)>=0)continue;z[B]=H[B]}return z}var g=function(W){var z=W.className,U=W.percent,B=W.prefixCls,K=W.strokeColor,q=W.strokeLinecap,ae=W.strokeWidth,se=W.style,we=W.trailColor,Te=W.trailWidth,de=W.transition,xe=c(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete xe.gapPosition;var pe=Array.isArray(U)?U:[U],ne=Array.isArray(K)?K:[K],ie=h(pe),ee=d(ie,1),le=ee[0],Q=ae/2,Z=100-ae/2,be="M ".concat(q==="round"?Q:0,",").concat(Q,`
L `).concat(q==="round"?Z:100,",").concat(Q),te="0 0 100 ".concat(ae),$=0;return f.a.createElement("svg",w({className:D()("".concat(B,"-line"),z),viewBox:te,preserveAspectRatio:"none",style:se},xe),f.a.createElement("path",{className:"".concat(B,"-line-trail"),d:be,strokeLinecap:q,stroke:we,strokeWidth:Te||ae,fillOpacity:"0"}),pe.map(function(X,Y){var ve={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat($,"px"),transition:de||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ue=ne[Y]||ne[ne.length-1];return $+=X,f.a.createElement("path",{key:Y,className:"".concat(B,"-line-path"),d:be,strokeLinecap:q,stroke:ue,strokeWidth:ae,fillOpacity:"0",ref:le[Y],style:ve})}))};g.defaultProps=u;var b=g;function n(){return n=Object.assign||function(H){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&(H[U]=z[U])}return H},n.apply(this,arguments)}function o(H,W){return P(H)||s(H,W)||S(H,W)||t()}function t(){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 S(H,W){if(!H)return;if(typeof H=="string")return x(H,W);var z=Object.prototype.toString.call(H).slice(8,-1);if(z==="Object"&&H.constructor&&(z=H.constructor.name),z==="Map"||z==="Set")return Array.from(H);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return x(H,W)}function x(H,W){(W==null||W>H.length)&&(W=H.length);for(var z=0,U=new Array(W);z<W;z++)U[z]=H[z];return U}function s(H,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(H)))return;var z=[],U=!0,B=!1,K=void 0;try{for(var q=H[Symbol.iterator](),ae;!(U=(ae=q.next()).done)&&!(z.push(ae.value),W&&z.length===W);U=!0);}catch(se){B=!0,K=se}finally{try{!U&&q.return!=null&&q.return()}finally{if(B)throw K}}return z}function P(H){if(Array.isArray(H))return H}function O(H,W){if(H==null)return{};var z=E(H,W),U,B;if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(H);for(B=0;B<K.length;B++){if(U=K[B],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,U))continue;z[U]=H[U]}}return z}function E(H,W){if(H==null)return{};var z={},U=Object.keys(H),B,K;for(K=0;K<U.length;K++){if(B=U[K],W.indexOf(B)>=0)continue;z[B]=H[B]}return z}var v=0;function y(H){return+H.replace("%","")}function T(H){return Array.isArray(H)?H:[H]}function M(H,W,z,U){var B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,K=arguments.length>5?arguments[5]:void 0,q=50-U/2,ae=0,se=-q,we=0,Te=-2*q;switch(K){case"left":ae=-q,se=0,we=2*q,Te=0;break;case"right":ae=q,se=0,we=-2*q,Te=0;break;case"bottom":se=q,Te=2*q;break;default:}var de="M 50,50 m ".concat(ae,",").concat(se,`
a `).concat(q,",").concat(q," 0 1 1 ").concat(we,",").concat(-Te,`
a `).concat(q,",").concat(q," 0 1 1 ").concat(-we,",").concat(Te),xe=Math.PI*2*q,pe={stroke:z,strokeDasharray:"".concat(W/100*(xe-B),"px ").concat(xe,"px"),strokeDashoffset:"-".concat(B/2+H/100*(xe-B),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:de,pathStyle:pe}}var N=function(W){var z=W.prefixCls,U=W.strokeWidth,B=W.trailWidth,K=W.gapDegree,q=W.gapPosition,ae=W.trailColor,se=W.strokeLinecap,we=W.style,Te=W.className,de=W.strokeColor,xe=W.percent,pe=O(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ne=Object(L.useMemo)(function(){return v+=1,v},[]),ie=M(0,100,ae,U,K,q),ee=ie.pathString,le=ie.pathStyle,Q=T(xe),Z=T(de),be=Z.find(function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}),te=h(Q),$=o(te,1),X=$[0],Y=function(){var ue=0;return Q.map(function(Ee,Ke){var Ye=Z[Ke]||Z[Z.length-1],Je=Object.prototype.toString.call(Ye)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(ne,")"):"",tt=M(ue,Ee,Ye,U,K,q);return ue+=Ee,f.a.createElement("path",{key:Ke,className:"".concat(z,"-circle-path"),d:tt.pathString,stroke:Je,strokeLinecap:se,strokeWidth:U,opacity:Ee===0?0:1,fillOpacity:"0",style:tt.pathStyle,ref:X[Ke]})})};return f.a.createElement("svg",n({className:D()("".concat(z,"-circle"),Te),viewBox:"0 0 100 100",style:we},pe),be&&f.a.createElement("defs",null,f.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(ne),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(be).sort(function(ve,ue){return y(ve)-y(ue)}).map(function(ve,ue){return f.a.createElement("stop",{key:ue,offset:ve,stopColor:be[ve]})}))),f.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:ee,stroke:ae,strokeLinecap:se,strokeWidth:B||U,fillOpacity:"0",style:le}),Y().reverse())};N.defaultProps=u;var I=N,G={Line:b,Circle:I}},hW8S:function(j,J,k){"use strict";k.d(J,"a",function(){return D}),k.d(J,"c",function(){return u}),k.d(J,"b",function(){return h});var L=k("VTBJ"),f=k("Ff2n"),C=k("Kwbf"),D="RC_TABLE_INTERNAL_COL_DEFINE";function u(w){var d=w.expandable,i=Object(f.a)(w,["expandable"]);return"expandable"in w?Object(L.a)(Object(L.a)({},i),d):i}function h(w){return Object.keys(w).reduce(function(d,i){return(i.substr(0,5)==="data-"||i.substr(0,5)==="aria-")&&(d[i]=w[i]),d},{})}},jO9C:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(f,C){f.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(f,C)},unpad:function(f){L.pad.ZeroPadding.unpad(f),f.sigBytes--}},L.pad.Iso97971})},jwmR:function(j,J,k){j.exports={flexRow:"flexRow___3nMh-",flexColumn:"flexColumn___Xpn5L",formWrap:"formWrap___3t9mN",example:"example___5c8Eu",footerWrap:"footerWrap___20Wal"}},k3GJ:function(j,J,k){"use strict";k.d(J,"a",function(){return cr});var L=k("rePB"),f=k("ODXe"),C=k("Ff2n"),D=k("VTBJ"),u=k("cDcd"),h=k("TSYQ"),w=k.n(h),d=k("Zm9Q"),i=k("6cGi"),l=k("KQm4"),a=k("xEkU"),_=k.n(a),p=k("t23M");function c(Pe){var Fe=Object(u.useRef)(),He=Object(u.useRef)(!1);function Me(){for(var he=arguments.length,Oe=new Array(he),ge=0;ge<he;ge++)Oe[ge]=arguments[ge];He.current||(_.a.cancel(Fe.current),Fe.current=_()(function(){Pe.apply(void 0,Oe)}))}return Object(u.useEffect)(function(){return function(){He.current=!0,_.a.cancel(Fe.current)}},[]),Me}function m(Pe){var Fe=Object(u.useRef)([]),He=Object(u.useState)({}),Me=Object(f.a)(He,2),he=Me[1],Oe=Object(u.useRef)(typeof Pe=="function"?Pe():Pe),ge=c(function(){var Ne=Oe.current;Fe.current.forEach(function(Ue){Ne=Ue(Ne)}),Fe.current=[],Oe.current=Ne,he({})});function Le(Ne){Fe.current.push(Ne),ge()}return[Oe.current,Le]}var g=k("4IlW");function b(Pe,Fe){var He,Me=Pe.prefixCls,he=Pe.id,Oe=Pe.active,ge=Pe.rtl,Le=Pe.tab,Ne=Le.key,Ue=Le.tab,ke=Le.disabled,ze=Le.closeIcon,ot=Pe.tabBarGutter,yt=Pe.tabPosition,xt=Pe.closable,Nt=Pe.renderWrapper,hr=Pe.removeAriaLabel,Cr=Pe.editable,Sr=Pe.onClick,Pr=Pe.onRemove,_r=Pe.onFocus,Mr="".concat(Me,"-tab");u.useEffect(function(){return Pr},[]);var Ir={};yt==="top"||yt==="bottom"?Ir[ge?"marginLeft":"marginRight"]=ot:Ir.marginBottom=ot;var Jr=Cr&&xt!==!1&&!ke;function Kr(gr){if(ke)return;Sr(gr)}function gn(gr){gr.preventDefault(),gr.stopPropagation(),Cr.onEdit("remove",{key:Ne,event:gr})}var zr=u.createElement("div",{key:Ne,ref:Fe,className:w()(Mr,(He={},Object(L.a)(He,"".concat(Mr,"-with-remove"),Jr),Object(L.a)(He,"".concat(Mr,"-active"),Oe),Object(L.a)(He,"".concat(Mr,"-disabled"),ke),He)),style:Ir,onClick:Kr},u.createElement("div",{role:"tab","aria-selected":Oe,id:he&&"".concat(he,"-tab-").concat(Ne),className:"".concat(Mr,"-btn"),"aria-controls":he&&"".concat(he,"-panel-").concat(Ne),"aria-disabled":ke,tabIndex:ke?null:0,onClick:function(Er){Er.stopPropagation(),Kr(Er)},onKeyDown:function(Er){[g.a.SPACE,g.a.ENTER].includes(Er.which)&&(Er.preventDefault(),Kr(Er))},onFocus:_r},Ue),Jr&&u.createElement("button",{type:"button","aria-label":hr||"remove",tabIndex:0,className:"".concat(Mr,"-remove"),onClick:function(Er){Er.stopPropagation(),gn(Er)}},ze||Cr.removeIcon||"\xD7"));return Nt&&(zr=Nt(zr)),zr}var n=u.forwardRef(b),o={width:0,height:0,left:0,top:0};function t(Pe,Fe,He){return Object(u.useMemo)(function(){for(var Me,he=new Map,Oe=Fe.get((Me=Pe[0])===null||Me===void 0?void 0:Me.key)||o,ge=Oe.left+Oe.width,Le=0;Le<Pe.length;Le+=1){var Ne=Pe[Le].key,Ue=Fe.get(Ne);if(!Ue){var ke;Ue=Fe.get((ke=Pe[Le-1])===null||ke===void 0?void 0:ke.key)||o}var ze=he.get(Ne)||Object(D.a)({},Ue);ze.right=ge-ze.left-ze.width,he.set(Ne,ze)}return he},[Pe.map(function(Me){return Me.key}).join("_"),Fe,He])}var S={width:0,height:0,left:0,top:0,right:0};function x(Pe,Fe,He,Me,he){var Oe=he.tabs,ge=he.tabPosition,Le=he.rtl,Ne,Ue,ke;["top","bottom"].includes(ge)?(Ne="width",Ue=Le?"right":"left",ke=Math.abs(Fe.left)):(Ne="height",Ue="top",ke=-Fe.top);var ze=Fe[Ne],ot=He[Ne],yt=Me[Ne],xt=ze;return ot+yt>ze&&(xt=ze-yt),Object(u.useMemo)(function(){if(!Oe.length)return[0,0];for(var Nt=Oe.length,hr=Nt,Cr=0;Cr<Nt;Cr+=1){var Sr=Pe.get(Oe[Cr].key)||S;if(Sr[Ue]+Sr[Ne]>ke+xt){hr=Cr-1;break}}for(var Pr=0,_r=Nt-1;_r>=0;_r-=1){var Mr=Pe.get(Oe[_r].key)||S;if(Mr[Ue]<ke){Pr=_r+1;break}}return[Pr,hr]},[Pe,ke,xt,ge,Oe.map(function(Nt){return Nt.key}).join("_"),Le])}var s=k("wx14"),P=k("1OyB"),O=k("vuIU"),E=k("JX7q"),v=k("Ji7U"),y=k("LK+K"),T=k("I8Z2"),M=k("bT9E"),N=k("2GS6"),I=k("Gytx"),G=k.n(I),H=k("U8pU"),W=/iPhone/i,z=/iPod/i,U=/iPad/i,B=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,q=/\bAndroid(?:.+)SD4930UR\b/i,ae=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,se=/Windows Phone/i,we=/\bWindows(?:.+)ARM\b/i,Te=/BlackBerry/i,de=/BB10/i,xe=/Opera Mini/i,pe=/\b(CriOS|Chrome)(?:.+)Mobile/i,ne=/Mobile(?:.+)Firefox\b/i;function ie(Pe,Fe){return Pe.test(Fe)}function ee(Pe){var Fe=Pe||(typeof navigator!="undefined"?navigator.userAgent:""),He=(Fe||"").split("[FBAN");if(typeof He[1]!="undefined"){var Me=He,he=Object(f.a)(Me,1);Fe=he[0]}if(He=Fe.split("Twitter"),typeof He[1]!="undefined"){var Oe=He,ge=Object(f.a)(Oe,1);Fe=ge[0]}var Le={apple:{phone:ie(W,Fe)&&!ie(se,Fe),ipod:ie(z,Fe),tablet:!ie(W,Fe)&&ie(U,Fe)&&!ie(se,Fe),device:(ie(W,Fe)||ie(z,Fe)||ie(U,Fe))&&!ie(se,Fe)},amazon:{phone:ie(q,Fe),tablet:!ie(q,Fe)&&ie(ae,Fe),device:ie(q,Fe)||ie(ae,Fe)},android:{phone:!ie(se,Fe)&&ie(q,Fe)||!ie(se,Fe)&&ie(B,Fe),tablet:!ie(se,Fe)&&!ie(q,Fe)&&!ie(B,Fe)&&(ie(ae,Fe)||ie(K,Fe)),device:!ie(se,Fe)&&(ie(q,Fe)||ie(ae,Fe)||ie(B,Fe)||ie(K,Fe))||ie(/\bokhttp\b/i,Fe)},windows:{phone:ie(se,Fe),tablet:ie(we,Fe),device:ie(se,Fe)||ie(we,Fe)},other:{blackberry:ie(Te,Fe),blackberry10:ie(de,Fe),opera:ie(xe,Fe),firefox:ie(ne,Fe),chrome:ie(pe,Fe),device:ie(Te,Fe)||ie(de,Fe)||ie(xe,Fe)||ie(ne,Fe)||ie(pe,Fe)},any:null,phone:null,tablet:null};return Le.any=Le.apple.device||Le.android.device||Le.windows.device||Le.other.device,Le.phone=Le.apple.phone||Le.android.phone||Le.windows.phone,Le.tablet=Le.apple.tablet||Le.android.tablet||Le.windows.tablet,Le}var le=Object(D.a)(Object(D.a)({},ee()),{},{isMobile:ee}),Q=le;function Z(){}function be(Pe,Fe,He){var Me=Fe||"";return Pe.key||"".concat(Me,"item_").concat(He)}function te(Pe){return"".concat(Pe,"-menu-")}function $(Pe,Fe){var He=-1;u.Children.forEach(Pe,function(Me){He+=1,Me&&Me.type&&Me.type.isMenuItemGroup?u.Children.forEach(Me.props.children,function(he){He+=1,Fe(he,He)}):Fe(Me,He)})}function X(Pe,Fe,He){if(!Pe||He.find)return;u.Children.forEach(Pe,function(Me){if(Me){var he=Me.type;if(!he||!(he.isSubMenu||he.isMenuItem||he.isMenuItemGroup))return;Fe.indexOf(Me.key)!==-1?He.find=!0:Me.props.children&&X(Me.props.children,Fe,He)}})}var Y=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ve=function(Fe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Me=Fe&&typeof Fe.getBoundingClientRect=="function"&&Fe.getBoundingClientRect().width;if(Me){if(He){var he=getComputedStyle(Fe),Oe=he.marginLeft,ge=he.marginRight;Me+=+Oe.replace("px","")+ +ge.replace("px","")}Me=+Me.toFixed(6)}return Me||0},ue=function(Fe,He,Me){Fe&&Object(H.a)(Fe.style)==="object"&&(Fe.style[He]=Me)},Ee=function(){return Q.any},Ke=k("bdgK"),Ye=k("faye"),Je=k.n(Ye),tt=k("wgJM"),at=k("l4aY"),lt=k("m+aA"),je=k("c+Xe"),Ce=k("zT1h"),Qe=k("QC+M");function st(Pe,Fe,He){return He?Pe[0]===Fe[0]:Pe[0]===Fe[0]&&Pe[1]===Fe[1]}function Ge(Pe,Fe,He){var Me=Pe[Fe]||{};return Object(D.a)(Object(D.a)({},Me),He)}function rt(Pe,Fe,He,Me){for(var he=He.points,Oe=Object.keys(Pe),ge=0;ge<Oe.length;ge+=1){var Le=Oe[ge];if(st(Pe[Le].points,he,Me))return"".concat(Fe,"-placement-").concat(Le)}return""}var Re=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Pe=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Pe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Pe==null?void 0:Pe.substr(0,4)))},Se=k("MNnm");function De(Pe,Fe){var He={};return He[Pe.toLowerCase()]=Fe.toLowerCase(),He["Webkit".concat(Pe)]="webkit".concat(Fe),He["Moz".concat(Pe)]="moz".concat(Fe),He["ms".concat(Pe)]="MS".concat(Fe),He["O".concat(Pe)]="o".concat(Fe.toLowerCase()),He}function fe(Pe,Fe){var He={animationend:De("Animation","AnimationEnd"),transitionend:De("Transition","TransitionEnd")};return Pe&&("AnimationEvent"in Fe||delete He.animationend.animation,"TransitionEvent"in Fe||delete He.transitionend.transition),He}var ye=fe(Object(Se.a)(),typeof window!="undefined"?window:{}),_e={};if(Object(Se.a)()){var Ae=document.createElement("div");_e=Ae.style}var We={};function Xe(Pe){if(We[Pe])return We[Pe];var Fe=ye[Pe];if(Fe)for(var He=Object.keys(Fe),Me=He.length,he=0;he<Me;he+=1){var Oe=He[he];if(Object.prototype.hasOwnProperty.call(Fe,Oe)&&Oe in _e)return We[Pe]=Fe[Oe],We[Pe]}return""}var ft=Xe("animationend"),vt=Xe("transitionend"),Kt=!!(ft&&vt),kt=ft||"animationend",Or=vt||"transitionend";function pr(Pe,Fe){if(!Pe)return null;if(Object(H.a)(Pe)==="object"){var He=Fe.replace(/-\w/g,function(Me){return Me[1].toUpperCase()});return Pe[He]}return"".concat(Pe,"-").concat(Fe)}var Et="none",Yr="appear",kr="enter",Ur="leave",dn="none",br="prepare",qr="start",Zr="active",Ar="end";function fn(Pe){var Fe=Object(u.useRef)(!1),He=Object(u.useState)(Pe),Me=Object(f.a)(He,2),he=Me[0],Oe=Me[1];function ge(Le){Fe.current||Oe(Le)}return Object(u.useEffect)(function(){return function(){Fe.current=!0}},[]),[he,ge]}var wn=Object(Se.a)()?u.useLayoutEffect:u.useEffect,Kn=wn,nn=function(){var Pe=u.useRef(null);function Fe(){tt.a.cancel(Pe.current)}function He(Me){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Fe();var Oe=Object(tt.a)(function(){he<=1?Me({isCanceled:function(){return Oe!==Pe.current}}):He(Me,he-1)});Pe.current=Oe}return u.useEffect(function(){return function(){Fe()}},[]),[He,Fe]},ya=[br,qr,Zr,Ar],Da=!1,pn=!0;function qt(Pe){return Pe===Zr||Pe===Ar}var Yn=function(Pe,Fe){var He=u.useState(dn),Me=Object(f.a)(He,2),he=Me[0],Oe=Me[1],ge=nn(),Le=Object(f.a)(ge,2),Ne=Le[0],Ue=Le[1];function ke(){Oe(br)}return Kn(function(){if(he!==dn&&he!==Ar){var ze=ya.indexOf(he),ot=ya[ze+1],yt=Fe(he);yt===Da?Oe(ot):Ne(function(xt){function Nt(){if(xt.isCanceled())return;Oe(ot)}yt===!0?Nt():Promise.resolve(yt).then(Nt)})}},[Pe,he]),u.useEffect(function(){return function(){Ue()}},[]),[ke,he]},ba=function(Pe){var Fe=Object(u.useRef)(),He=Object(u.useRef)(Pe);He.current=Pe;var Me=u.useCallback(function(ge){He.current(ge)},[]);function he(ge){ge&&(ge.removeEventListener(Or,Me),ge.removeEventListener(kt,Me))}function Oe(ge){Fe.current&&Fe.current!==ge&&he(Fe.current),ge&&ge!==Fe.current&&(ge.addEventListener(Or,Me),ge.addEventListener(kt,Me),Fe.current=ge)}return u.useEffect(function(){return function(){he(Fe.current)}},[]),[Oe,he]};function zn(Pe,Fe,He,Me){var he=Me.motionEnter,Oe=he===void 0?!0:he,ge=Me.motionAppear,Le=ge===void 0?!0:ge,Ne=Me.motionLeave,Ue=Ne===void 0?!0:Ne,ke=Me.motionDeadline,ze=Me.motionLeaveImmediately,ot=Me.onAppearPrepare,yt=Me.onEnterPrepare,xt=Me.onLeavePrepare,Nt=Me.onAppearStart,hr=Me.onEnterStart,Cr=Me.onLeaveStart,Sr=Me.onAppearActive,Pr=Me.onEnterActive,_r=Me.onLeaveActive,Mr=Me.onAppearEnd,Ir=Me.onEnterEnd,Jr=Me.onLeaveEnd,Kr=Me.onVisibleChanged,gn=fn(),zr=Object(f.a)(gn,2),gr=zr[0],Er=zr[1],Fr=fn(Et),$r=Object(f.a)(Fr,2),or=$r[0],tn=$r[1],An=fn(null),ln=Object(f.a)(An,2),En=ln[0],un=ln[1],jn=Object(u.useRef)(!1),Xn=Object(u.useRef)(null),Rn=Object(u.useRef)(!1),ta=Object(u.useRef)(null);function Ia(){var yn=He();return yn||ta.current}var ca=Object(u.useRef)(!1);function Vn(yn){var cn=Ia();if(yn&&!yn.deadline&&yn.target!==cn)return;var Wn;or===Yr&&ca.current?Wn=Mr==null?void 0:Mr(cn,yn):or===kr&&ca.current?Wn=Ir==null?void 0:Ir(cn,yn):or===Ur&&ca.current&&(Wn=Jr==null?void 0:Jr(cn,yn)),Wn!==!1&&!Rn.current&&(tn(Et),un(null))}var xn=ba(Vn),_n=Object(f.a)(xn,1),Dn=_n[0],Cn=u.useMemo(function(){var yn,cn,Wn;switch(or){case"appear":return yn={},Object(L.a)(yn,br,ot),Object(L.a)(yn,qr,Nt),Object(L.a)(yn,Zr,Sr),yn;case"enter":return cn={},Object(L.a)(cn,br,yt),Object(L.a)(cn,qr,hr),Object(L.a)(cn,Zr,Pr),cn;case"leave":return Wn={},Object(L.a)(Wn,br,xt),Object(L.a)(Wn,qr,Cr),Object(L.a)(Wn,Zr,_r),Wn;default:return{}}},[or]),Bn=Yn(or,function(yn){if(yn===br){var cn=Cn[br];return cn?cn(Ia()):Da}if(hn in Cn){var Wn;un(((Wn=Cn[hn])===null||Wn===void 0?void 0:Wn.call(Cn,Ia(),null))||null)}return hn===Zr&&(Dn(Ia()),ke>0&&(clearTimeout(Xn.current),Xn.current=setTimeout(function(){Vn({deadline:!0})},ke))),pn}),ma=Object(f.a)(Bn,2),Va=ma[0],hn=ma[1],Ta=qt(hn);ca.current=Ta,Kn(function(){Er(Fe);var yn=jn.current;if(jn.current=!0,!Pe)return;var cn;!yn&&Fe&&Le&&(cn=Yr),yn&&Fe&&Oe&&(cn=kr),(yn&&!Fe&&Ue||!yn&&ze&&!Fe&&Ue)&&(cn=Ur),cn&&(tn(cn),Va())},[Fe]),Object(u.useEffect)(function(){(or===Yr&&!Le||or===kr&&!Oe||or===Ur&&!Ue)&&tn(Et)},[Le,Oe,Ue]),Object(u.useEffect)(function(){return function(){clearTimeout(Xn.current),Rn.current=!0}},[]),Object(u.useEffect)(function(){gr!==void 0&&or===Et&&(Kr==null||Kr(gr))},[gr,or]);var Sa=En;return Cn[br]&&hn===qr&&(Sa=Object(D.a)({transition:"none"},Sa)),[or,hn,Sa,gr!=null?gr:Fe]}var Gr=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(){return Object(P.a)(this,He),Fe.apply(this,arguments)}return Object(O.a)(He,[{key:"render",value:function(){return this.props.children}}]),He}(u.Component),kn=Gr;function ha(Pe){var Fe=Pe;Object(H.a)(Pe)==="object"&&(Fe=Pe.transitionSupport);function He(he){return!!(he.motionName&&Fe)}var Me=u.forwardRef(function(he,Oe){var ge=he.visible,Le=ge===void 0?!0:ge,Ne=he.removeOnLeave,Ue=Ne===void 0?!0:Ne,ke=he.forceRender,ze=he.children,ot=he.motionName,yt=he.leavedClassName,xt=he.eventProps,Nt=He(he),hr=Object(u.useRef)(),Cr=Object(u.useRef)();function Sr(){try{return Object(lt.a)(hr.current||Cr.current)}catch(tn){return null}}var Pr=zn(Nt,Le,Sr,he),_r=Object(f.a)(Pr,4),Mr=_r[0],Ir=_r[1],Jr=_r[2],Kr=_r[3],gn=u.useRef(Kr);Kr&&(gn.current=!0);var zr=Object(u.useRef)(Oe);zr.current=Oe;var gr=u.useCallback(function(tn){hr.current=tn,Object(je.b)(zr.current,tn)},[]),Er,Fr=Object(D.a)(Object(D.a)({},xt),{},{visible:Le});if(!ze)Er=null;else if(Mr===Et||!He(he))Kr?Er=ze(Object(D.a)({},Fr),gr):!Ue&&gn.current?Er=ze(Object(D.a)(Object(D.a)({},Fr),{},{className:yt}),gr):ke?Er=ze(Object(D.a)(Object(D.a)({},Fr),{},{style:{display:"none"}}),gr):Er=null;else{var $r,or;Ir===br?or="prepare":qt(Ir)?or="active":Ir===qr&&(or="start"),Er=ze(Object(D.a)(Object(D.a)({},Fr),{},{className:w()(pr(ot,Mr),($r={},Object(L.a)($r,pr(ot,"".concat(Mr,"-").concat(or)),or),Object(L.a)($r,ot,typeof ot=="string"),$r)),style:Jr}),gr)}return u.createElement(kn,{ref:Cr},Er)});return Me.displayName="CSSMotion",Me}var la=ha(Kt),St="add",ir="keep",Mt="remove",wa="removed";function Pa(Pe){var Fe;return Pe&&Object(H.a)(Pe)==="object"&&"key"in Pe?Fe=Pe:Fe={key:Pe},Object(D.a)(Object(D.a)({},Fe),{},{key:String(Fe.key)})}function pa(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Pe.map(Pa)}function Ln(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],He=[],Me=0,he=Fe.length,Oe=pa(Pe),ge=pa(Fe);Oe.forEach(function(Ue){for(var ke=!1,ze=Me;ze<he;ze+=1){var ot=ge[ze];if(ot.key===Ue.key){Me<ze&&(He=He.concat(ge.slice(Me,ze).map(function(yt){return Object(D.a)(Object(D.a)({},yt),{},{status:St})})),Me=ze),He.push(Object(D.a)(Object(D.a)({},ot),{},{status:ir})),Me+=1,ke=!0;break}}ke||He.push(Object(D.a)(Object(D.a)({},Ue),{},{status:Mt}))}),Me<he&&(He=He.concat(ge.slice(Me).map(function(Ue){return Object(D.a)(Object(D.a)({},Ue),{},{status:St})})));var Le={};He.forEach(function(Ue){var ke=Ue.key;Le[ke]=(Le[ke]||0)+1});var Ne=Object.keys(Le).filter(function(Ue){return Le[Ue]>1});return Ne.forEach(function(Ue){He=He.filter(function(ke){var ze=ke.key,ot=ke.status;return ze!==Ue||ot!==Mt}),He.forEach(function(ke){ke.key===Ue&&(ke.status=ir)})}),He}var ur=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ua(Pe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:la,He=function(Me){Object(v.a)(Oe,Me);var he=Object(y.a)(Oe);function Oe(){var ge;return Object(P.a)(this,Oe),ge=he.apply(this,arguments),ge.state={keyEntities:[]},ge.removeKey=function(Le){ge.setState(function(Ne){var Ue=Ne.keyEntities;return{keyEntities:Ue.map(function(ke){return ke.key!==Le?ke:Object(D.a)(Object(D.a)({},ke),{},{status:wa})})}})},ge}return Object(O.a)(Oe,[{key:"render",value:function(){var Le=this,Ne=this.state.keyEntities,Ue=this.props,ke=Ue.component,ze=Ue.children,ot=Ue.onVisibleChanged,yt=Object(C.a)(Ue,["component","children","onVisibleChanged"]),xt=ke||u.Fragment,Nt={};return ur.forEach(function(hr){Nt[hr]=yt[hr],delete yt[hr]}),delete yt.keys,u.createElement(xt,yt,Ne.map(function(hr){var Cr=hr.status,Sr=Object(C.a)(hr,["status"]),Pr=Cr===St||Cr===ir;return u.createElement(Fe,Object(s.a)({},Nt,{key:Sr.key,visible:Pr,eventProps:Sr,onVisibleChanged:function(Mr){ot==null||ot(Mr,{key:Sr.key}),Mr||Le.removeKey(Sr.key)}}),ze)}))}}],[{key:"getDerivedStateFromProps",value:function(Le,Ne){var Ue=Le.keys,ke=Ne.keyEntities,ze=pa(Ue),ot=Ln(ke,ze);return{keyEntities:ot.filter(function(yt){var xt=ke.find(function(Nt){var hr=Nt.key;return yt.key===hr});return!(xt&&xt.status===wa&&yt.status===Mt)})}}}]),Oe}(u.Component);return He.defaultProps={component:"div"},He}var Gn=ua(Kt),On=la;function Mn(Pe){var Fe=Pe.prefixCls,He=Pe.motion,Me=Pe.animation,he=Pe.transitionName;return He||(Me?{motionName:"".concat(Fe,"-").concat(Me)}:he?{motionName:he}:null)}function Ga(Pe){var Fe=Pe.prefixCls,He=Pe.visible,Me=Pe.zIndex,he=Pe.mask,Oe=Pe.maskMotion,ge=Pe.maskAnimation,Le=Pe.maskTransitionName;if(!he)return null;var Ne={};return(Oe||Le||ge)&&(Ne=Object(D.a)({motionAppear:!0},Mn({motion:Oe,prefixCls:Fe,transitionName:Le,animation:ge}))),u.createElement(On,Object(s.a)({},Ne,{visible:He,removeOnLeave:!0}),function(Ue){var ke=Ue.className;return u.createElement("div",{style:{zIndex:Me},className:w()("".concat(Fe,"-mask"),ke)})})}var La=k("9mu1"),Un=k("o0o1"),Xa=k.n(Un),oi=k("HaE+"),Ma=["measure","align",null,"motion"],mn=function(Pe,Fe){var He=Object(u.useState)(null),Me=Object(f.a)(He,2),he=Me[0],Oe=Me[1],ge=Object(u.useRef)(),Le=Object(u.useRef)(!1);function Ne(ze){Le.current||Oe(ze)}function Ue(){tt.a.cancel(ge.current)}function ke(ze){Ue(),ge.current=Object(tt.a)(function(){Ne(function(ot){switch(he){case"align":return"motion";case"motion":return"stable";default:}return ot}),ze==null||ze()})}return Object(u.useEffect)(function(){Ne("measure")},[Pe]),Object(u.useEffect)(function(){switch(he){case"measure":Fe();break;default:}he&&(ge.current=Object(tt.a)(Object(oi.a)(Xa.a.mark(function ze(){var ot,yt;return Xa.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:ot=Ma.indexOf(he),yt=Ma[ot+1],yt&&ot!==-1&&Ne(yt);case 3:case"end":return Nt.stop()}},ze)}))))},[he]),Object(u.useEffect)(function(){return function(){Le.current=!0,Ue()}},[]),[he,ke]},Nn=function(Pe){var Fe=u.useState({width:0,height:0}),He=Object(f.a)(Fe,2),Me=He[0],he=He[1];function Oe(Le){he({width:Le.offsetWidth,height:Le.offsetHeight})}var ge=u.useMemo(function(){var Le={};if(Pe){var Ne=Me.width,Ue=Me.height;Pe.indexOf("height")!==-1&&Ue?Le.height=Ue:Pe.indexOf("minHeight")!==-1&&Ue&&(Le.minHeight=Ue),Pe.indexOf("width")!==-1&&Ne?Le.width=Ne:Pe.indexOf("minWidth")!==-1&&Ne&&(Le.minWidth=Ne)}return Le},[Pe,Me]);return[ge,Oe]},Ba=u.forwardRef(function(Pe,Fe){var He=Pe.visible,Me=Pe.prefixCls,he=Pe.className,Oe=Pe.style,ge=Pe.children,Le=Pe.zIndex,Ne=Pe.stretch,Ue=Pe.destroyPopupOnHide,ke=Pe.forceRender,ze=Pe.align,ot=Pe.point,yt=Pe.getRootDomNode,xt=Pe.getClassNameFromAlign,Nt=Pe.onAlign,hr=Pe.onMouseEnter,Cr=Pe.onMouseLeave,Sr=Pe.onMouseDown,Pr=Pe.onTouchStart,_r=Object(u.useRef)(),Mr=Object(u.useRef)(),Ir=Object(u.useState)(),Jr=Object(f.a)(Ir,2),Kr=Jr[0],gn=Jr[1],zr=Nn(Ne),gr=Object(f.a)(zr,2),Er=gr[0],Fr=gr[1];function $r(){Ne&&Fr(yt())}var or=mn(He,$r),tn=Object(f.a)(or,2),An=tn[0],ln=tn[1],En=Object(u.useRef)();function un(){return ot||yt}function jn(){var xn;(xn=_r.current)===null||xn===void 0||xn.forceAlign()}function Xn(xn,_n){var Dn=xt(_n);Kr!==Dn&&gn(Dn),An==="align"&&(Kr!==Dn?Promise.resolve().then(function(){jn()}):ln(function(){var Cn;(Cn=En.current)===null||Cn===void 0||Cn.call(En)}),Nt==null||Nt(xn,_n))}var Rn=Object(D.a)({},Mn(Pe));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(xn){var _n=Rn[xn];Rn[xn]=function(Dn,Cn){return ln(),_n==null?void 0:_n(Dn,Cn)}});function ta(){return new Promise(function(xn){En.current=xn})}u.useEffect(function(){!Rn.motionName&&An==="motion"&&ln()},[Rn.motionName,An]),u.useImperativeHandle(Fe,function(){return{forceAlign:jn,getElement:function(){return Mr.current}}});var Ia=Object(D.a)(Object(D.a)({},Er),{},{zIndex:Le,opacity:An==="motion"||An==="stable"||!He?void 0:0,pointerEvents:An==="stable"?void 0:"none"},Oe),ca=!0;(ze==null?void 0:ze.points)&&(An==="align"||An==="stable")&&(ca=!1);var Vn=ge;return u.Children.count(ge)>1&&(Vn=u.createElement("div",{className:"".concat(Me,"-content")},ge)),u.createElement(On,Object(s.a)({visible:He,ref:Mr,leavedClassName:"".concat(Me,"-hidden")},Rn,{onAppearPrepare:ta,onEnterPrepare:ta,removeOnLeave:Ue,forceRender:ke}),function(xn,_n){var Dn=xn.className,Cn=xn.style,Bn=w()(Me,he,Kr,Dn);return u.createElement(La.a,{target:un(),key:"popup",ref:_r,monitorWindowResize:!0,disabled:ca,align:ze,onAlign:Xn},u.createElement("div",{ref:_n,className:Bn,onMouseEnter:hr,onMouseLeave:Cr,onMouseDownCapture:Sr,onTouchStartCapture:Pr,style:Object(D.a)(Object(D.a)({},Cn),Ia)},Vn))})});Ba.displayName="PopupInner";var Qa=Ba,qn=u.forwardRef(function(Pe,Fe){var He=Pe.prefixCls,Me=Pe.visible,he=Pe.zIndex,Oe=Pe.children,ge=Pe.mobile;ge=ge===void 0?{}:ge;var Le=ge.popupClassName,Ne=ge.popupStyle,Ue=ge.popupMotion,ke=Ue===void 0?{}:Ue,ze=ge.popupRender,ot=u.useRef();u.useImperativeHandle(Fe,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var yt=Object(D.a)({zIndex:he},Ne),xt=Oe;return u.Children.count(Oe)>1&&(xt=u.createElement("div",{className:"".concat(He,"-content")},Oe)),ze&&(xt=ze(xt)),u.createElement(On,Object(s.a)({visible:Me,ref:ot,removeOnLeave:!0},ke),function(Nt,hr){var Cr=Nt.className,Sr=Nt.style,Pr=w()(He,Le,Cr);return u.createElement("div",{ref:hr,className:Pr,style:Object(D.a)(Object(D.a)({},Sr),yt)},xt)})});qn.displayName="MobilePopupInner";var mi=qn,Za=["visible","mobile"],ea=u.forwardRef(function(Pe,Fe){var He=Pe.visible,Me=Pe.mobile,he=Object(C.a)(Pe,Za),Oe=Object(u.useState)(He),ge=Object(f.a)(Oe,2),Le=ge[0],Ne=ge[1],Ue=Object(u.useState)(!1),ke=Object(f.a)(Ue,2),ze=ke[0],ot=ke[1],yt=Object(D.a)(Object(D.a)({},he),{},{visible:Le});Object(u.useEffect)(function(){Ne(He),He&&Me&&ot(Re())},[He,Me]);var xt=ze?u.createElement(mi,Object(s.a)({},yt,{mobile:Me,ref:Fe})):u.createElement(Qa,Object(s.a)({},yt,{ref:Fe}));return u.createElement("div",null,u.createElement(Ga,yt),xt)});ea.displayName="Popup";var vi=ea,gi=u.createContext(null),Wa=gi;function Ea(){}function Pi(){return""}function qa(Pe){return Pe?Pe.ownerDocument:window.document}var Ha=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function si(Pe){var Fe=function(He){Object(v.a)(he,He);var Me=Object(y.a)(he);function he(Oe){var ge;Object(P.a)(this,he),ge=Me.call(this,Oe),ge.popupRef=u.createRef(),ge.triggerRef=u.createRef(),ge.attachId=void 0,ge.clickOutsideHandler=void 0,ge.touchOutsideHandler=void 0,ge.contextMenuOutsideHandler1=void 0,ge.contextMenuOutsideHandler2=void 0,ge.mouseDownTimeout=void 0,ge.focusTime=void 0,ge.preClickTime=void 0,ge.preTouchTime=void 0,ge.delayTimer=void 0,ge.hasPopupMouseDown=void 0,ge.onMouseEnter=function(Ne){var Ue=ge.props.mouseEnterDelay;ge.fireEvents("onMouseEnter",Ne),ge.delaySetPopupVisible(!0,Ue,Ue?null:Ne)},ge.onMouseMove=function(Ne){ge.fireEvents("onMouseMove",Ne),ge.setPoint(Ne)},ge.onMouseLeave=function(Ne){ge.fireEvents("onMouseLeave",Ne),ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onPopupMouseEnter=function(){ge.clearDelayTimer()},ge.onPopupMouseLeave=function(Ne){var Ue;if(Ne.relatedTarget&&!Ne.relatedTarget.setTimeout&&Object(at.a)((Ue=ge.popupRef.current)===null||Ue===void 0?void 0:Ue.getElement(),Ne.relatedTarget))return;ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onFocus=function(Ne){ge.fireEvents("onFocus",Ne),ge.clearDelayTimer(),ge.isFocusToShow()&&(ge.focusTime=Date.now(),ge.delaySetPopupVisible(!0,ge.props.focusDelay))},ge.onMouseDown=function(Ne){ge.fireEvents("onMouseDown",Ne),ge.preClickTime=Date.now()},ge.onTouchStart=function(Ne){ge.fireEvents("onTouchStart",Ne),ge.preTouchTime=Date.now()},ge.onBlur=function(Ne){ge.fireEvents("onBlur",Ne),ge.clearDelayTimer(),ge.isBlurToHide()&&ge.delaySetPopupVisible(!1,ge.props.blurDelay)},ge.onContextMenu=function(Ne){Ne.preventDefault(),ge.fireEvents("onContextMenu",Ne),ge.setPopupVisible(!0,Ne)},ge.onContextMenuClose=function(){ge.isContextMenuToShow()&&ge.close()},ge.onClick=function(Ne){if(ge.fireEvents("onClick",Ne),ge.focusTime){var Ue;if(ge.preClickTime&&ge.preTouchTime?Ue=Math.min(ge.preClickTime,ge.preTouchTime):ge.preClickTime?Ue=ge.preClickTime:ge.preTouchTime&&(Ue=ge.preTouchTime),Math.abs(Ue-ge.focusTime)<20)return;ge.focusTime=0}ge.preClickTime=0,ge.preTouchTime=0,ge.isClickToShow()&&(ge.isClickToHide()||ge.isBlurToHide())&&Ne&&Ne.preventDefault&&Ne.preventDefault();var ke=!ge.state.popupVisible;(ge.isClickToHide()&&!ke||ke&&ge.isClickToShow())&&ge.setPopupVisible(!ge.state.popupVisible,Ne)},ge.onPopupMouseDown=function(){if(ge.hasPopupMouseDown=!0,clearTimeout(ge.mouseDownTimeout),ge.mouseDownTimeout=window.setTimeout(function(){ge.hasPopupMouseDown=!1},0),ge.context){var Ne;(Ne=ge.context).onPopupMouseDown.apply(Ne,arguments)}},ge.onDocumentClick=function(Ne){if(ge.props.mask&&!ge.props.maskClosable)return;var Ue=Ne.target,ke=ge.getRootDomNode(),ze=ge.getPopupDomNode();(!Object(at.a)(ke,Ue)||ge.isContextMenuOnly())&&!Object(at.a)(ze,Ue)&&!ge.hasPopupMouseDown&&ge.close()},ge.getRootDomNode=function(){var Ne=ge.props.getTriggerDOMNode;if(Ne)return Ne(ge.triggerRef.current);try{var Ue=Object(lt.a)(ge.triggerRef.current);if(Ue)return Ue}catch(ke){}return Je.a.findDOMNode(Object(E.a)(ge))},ge.getPopupClassNameFromAlign=function(Ne){var Ue=[],ke=ge.props,ze=ke.popupPlacement,ot=ke.builtinPlacements,yt=ke.prefixCls,xt=ke.alignPoint,Nt=ke.getPopupClassNameFromAlign;return ze&&ot&&Ue.push(rt(ot,yt,Ne,xt)),Nt&&Ue.push(Nt(Ne)),Ue.join(" ")},ge.getComponent=function(){var Ne=ge.props,Ue=Ne.prefixCls,ke=Ne.destroyPopupOnHide,ze=Ne.popupClassName,ot=Ne.onPopupAlign,yt=Ne.popupMotion,xt=Ne.popupAnimation,Nt=Ne.popupTransitionName,hr=Ne.popupStyle,Cr=Ne.mask,Sr=Ne.maskAnimation,Pr=Ne.maskTransitionName,_r=Ne.maskMotion,Mr=Ne.zIndex,Ir=Ne.popup,Jr=Ne.stretch,Kr=Ne.alignPoint,gn=Ne.mobile,zr=Ne.forceRender,gr=ge.state,Er=gr.popupVisible,Fr=gr.point,$r=ge.getPopupAlign(),or={};return ge.isMouseEnterToShow()&&(or.onMouseEnter=ge.onPopupMouseEnter),ge.isMouseLeaveToHide()&&(or.onMouseLeave=ge.onPopupMouseLeave),or.onMouseDown=ge.onPopupMouseDown,or.onTouchStart=ge.onPopupMouseDown,u.createElement(vi,Object(s.a)({prefixCls:Ue,destroyPopupOnHide:ke,visible:Er,point:Kr&&Fr,className:ze,align:$r,onAlign:ot,animation:xt,getClassNameFromAlign:ge.getPopupClassNameFromAlign},or,{stretch:Jr,getRootDomNode:ge.getRootDomNode,style:hr,mask:Cr,zIndex:Mr,transitionName:Nt,maskAnimation:Sr,maskTransitionName:Pr,maskMotion:_r,ref:ge.popupRef,motion:yt,mobile:gn,forceRender:zr}),typeof Ir=="function"?Ir():Ir)},ge.attachParent=function(Ne){tt.a.cancel(ge.attachId);var Ue=ge.props,ke=Ue.getPopupContainer,ze=Ue.getDocument,ot=ge.getRootDomNode(),yt;ke?(ot||ke.length===0)&&(yt=ke(ot)):yt=ze(ge.getRootDomNode()).body,yt?yt.appendChild(Ne):ge.attachId=Object(tt.a)(function(){ge.attachParent(Ne)})},ge.getContainer=function(){var Ne=ge.props.getDocument,Ue=Ne(ge.getRootDomNode()).createElement("div");return Ue.style.position="absolute",Ue.style.top="0",Ue.style.left="0",Ue.style.width="100%",ge.attachParent(Ue),Ue},ge.setPoint=function(Ne){var Ue=ge.props.alignPoint;if(!Ue||!Ne)return;ge.setState({point:{pageX:Ne.pageX,pageY:Ne.pageY}})},ge.handlePortalUpdate=function(){ge.state.prevPopupVisible!==ge.state.popupVisible&&ge.props.afterPopupVisibleChange(ge.state.popupVisible)},ge.triggerContextValue={onPopupMouseDown:ge.onPopupMouseDown};var Le;return"popupVisible"in Oe?Le=!!Oe.popupVisible:Le=!!Oe.defaultPopupVisible,ge.state={prevPopupVisible:Le,popupVisible:Le},Ha.forEach(function(Ne){ge["fire".concat(Ne)]=function(Ue){ge.fireEvents(Ne,Ue)}}),ge}return Object(O.a)(he,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ge=this.props,Le=this.state;if(Le.popupVisible){var Ne;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ne=ge.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(Ne,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ne=Ne||ge.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(Ne,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ne=Ne||ge.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ce.a)(Ne,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ce.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),tt.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ge;return((ge=this.popupRef.current)===null||ge===void 0?void 0:ge.getElement())||null}},{key:"getPopupAlign",value:function(){var ge=this.props,Le=ge.popupPlacement,Ne=ge.popupAlign,Ue=ge.builtinPlacements;return Le&&Ue?Ge(Ue,Le,Ne):Ne}},{key:"setPopupVisible",value:function(ge,Le){var Ne=this.props.alignPoint,Ue=this.state.popupVisible;this.clearDelayTimer(),Ue!==ge&&("popupVisible"in this.props||this.setState({popupVisible:ge,prevPopupVisible:Ue}),this.props.onPopupVisibleChange(ge)),Ne&&Le&&ge&&this.setPoint(Le)}},{key:"delaySetPopupVisible",value:function(ge,Le,Ne){var Ue=this,ke=Le*1e3;if(this.clearDelayTimer(),ke){var ze=Ne?{pageX:Ne.pageX,pageY:Ne.pageY}:null;this.delayTimer=window.setTimeout(function(){Ue.setPopupVisible(ge,ze),Ue.clearDelayTimer()},ke)}else this.setPopupVisible(ge,Ne)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ge){var Le=this.props.children.props,Ne=this.props;return Le[ge]&&Ne[ge]?this["fire".concat(ge)]:Le[ge]||Ne[ge]}},{key:"isClickToShow",value:function(){var ge=this.props,Le=ge.action,Ne=ge.showAction;return Le.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ge=this.props.action;return ge==="contextMenu"||ge.length===1&&ge[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ge=this.props,Le=ge.action,Ne=ge.showAction;return Le.indexOf("contextMenu")!==-1||Ne.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ge=this.props,Le=ge.action,Ne=ge.hideAction;return Le.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ge=this.props,Le=ge.action,Ne=ge.showAction;return Le.indexOf("hover")!==-1||Ne.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ge=this.props,Le=ge.action,Ne=ge.hideAction;return Le.indexOf("hover")!==-1||Ne.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ge=this.props,Le=ge.action,Ne=ge.showAction;return Le.indexOf("focus")!==-1||Ne.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ge=this.props,Le=ge.action,Ne=ge.hideAction;return Le.indexOf("focus")!==-1||Ne.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ge;(ge=this.popupRef.current)===null||ge===void 0||ge.forceAlign()}}},{key:"fireEvents",value:function(ge,Le){var Ne=this.props.children.props[ge];Ne&&Ne(Le);var Ue=this.props[ge];Ue&&Ue(Le)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ge=this.state.popupVisible,Le=this.props,Ne=Le.children,Ue=Le.forceRender,ke=Le.alignPoint,ze=Le.className,ot=Le.autoDestroy,yt=u.Children.only(Ne),xt={key:"trigger"};this.isContextMenuToShow()?xt.onContextMenu=this.onContextMenu:xt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(xt.onClick=this.onClick,xt.onMouseDown=this.onMouseDown,xt.onTouchStart=this.onTouchStart):(xt.onClick=this.createTwoChains("onClick"),xt.onMouseDown=this.createTwoChains("onMouseDown"),xt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(xt.onMouseEnter=this.onMouseEnter,ke&&(xt.onMouseMove=this.onMouseMove)):xt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?xt.onMouseLeave=this.onMouseLeave:xt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(xt.onFocus=this.onFocus,xt.onBlur=this.onBlur):(xt.onFocus=this.createTwoChains("onFocus"),xt.onBlur=this.createTwoChains("onBlur"));var Nt=w()(yt&&yt.props&&yt.props.className,ze);Nt&&(xt.className=Nt);var hr=Object(D.a)({},xt);Object(je.c)(yt)&&(hr.ref=Object(je.a)(this.triggerRef,yt.ref));var Cr=u.cloneElement(yt,hr),Sr;return(ge||this.popupRef.current||Ue)&&(Sr=u.createElement(Pe,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ge&&ot&&(Sr=null),u.createElement(Wa.Provider,{value:this.triggerContextValue},Cr,Sr)}}],[{key:"getDerivedStateFromProps",value:function(ge,Le){var Ne=ge.popupVisible,Ue={};return Ne!==void 0&&Le.popupVisible!==Ne&&(Ue.popupVisible=Ne,Ue.prevPopupVisible=Le.popupVisible),Ue}}]),he}(u.Component);return Fe.contextType=Wa,Fe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Pi,getDocument:qa,onPopupVisibleChange:Ea,afterPopupVisibleChange:Ea,onPopupAlign:Ea,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Fe}var Ka=si(Qe.a),aa={adjustX:1,adjustY:1},ei={topLeft:{points:["bl","tl"],overflow:aa,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:aa,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:aa,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:aa,offset:[4,0]}},li={topLeft:{points:["bl","tl"],overflow:aa,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:aa,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:aa,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:aa,offset:[4,0]}},pt=ei,Ze=0,ht={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},gt=function(Fe,He,Me){var he=te(He),Oe=Fe.getState();Fe.setState({defaultActiveFirst:Object(D.a)(Object(D.a)({},Oe.defaultActiveFirst),{},Object(L.a)({},he,Me))})},Wt=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(Me){var he;Object(P.a)(this,He),he=Fe.call(this,Me),he.onDestroy=function(ke){he.props.onDestroy(ke)},he.onKeyDown=function(ke){var ze=ke.keyCode,ot=he.menuInstance,yt=he.props.store,xt=he.getVisible();if(ze===g.a.ENTER)return he.onTitleClick(ke),gt(yt,he.props.eventKey,!0),!0;if(ze===g.a.RIGHT)return xt?ot.onKeyDown(ke):(he.triggerOpenChange(!0),gt(yt,he.props.eventKey,!0)),!0;if(ze===g.a.LEFT){var Nt;if(xt)Nt=ot.onKeyDown(ke);else return;return Nt||(he.triggerOpenChange(!1),Nt=!0),Nt}return xt&&(ze===g.a.UP||ze===g.a.DOWN)?ot.onKeyDown(ke):void 0},he.onOpenChange=function(ke){he.props.onOpenChange(ke)},he.onPopupVisibleChange=function(ke){he.triggerOpenChange(ke,ke?"mouseenter":"mouseleave")},he.onMouseEnter=function(ke){var ze=he.props,ot=ze.eventKey,yt=ze.onMouseEnter,xt=ze.store;gt(xt,he.props.eventKey,!1),yt({key:ot,domEvent:ke})},he.onMouseLeave=function(ke){var ze=he.props,ot=ze.parentMenu,yt=ze.eventKey,xt=ze.onMouseLeave;ot.subMenuInstance=Object(E.a)(he),xt({key:yt,domEvent:ke})},he.onTitleMouseEnter=function(ke){var ze=he.props,ot=ze.eventKey,yt=ze.onItemHover,xt=ze.onTitleMouseEnter;yt({key:ot,hover:!0}),xt({key:ot,domEvent:ke})},he.onTitleMouseLeave=function(ke){var ze=he.props,ot=ze.parentMenu,yt=ze.eventKey,xt=ze.onItemHover,Nt=ze.onTitleMouseLeave;ot.subMenuInstance=Object(E.a)(he),xt({key:yt,hover:!1}),Nt({key:yt,domEvent:ke})},he.onTitleClick=function(ke){var ze=Object(E.a)(he),ot=ze.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:ke}),ot.triggerSubMenuAction==="hover")return;he.triggerOpenChange(!he.getVisible(),"click"),gt(ot.store,he.props.eventKey,!1)},he.onSubMenuClick=function(ke){typeof he.props.onClick=="function"&&he.props.onClick(he.addKeyPath(ke))},he.onSelect=function(ke){he.props.onSelect(ke)},he.onDeselect=function(ke){he.props.onDeselect(ke)},he.getPrefixCls=function(){return"".concat(he.props.rootPrefixCls,"-submenu")},he.getActiveClassName=function(){return"".concat(he.getPrefixCls(),"-active")},he.getDisabledClassName=function(){return"".concat(he.getPrefixCls(),"-disabled")},he.getSelectedClassName=function(){return"".concat(he.getPrefixCls(),"-selected")},he.getOpenClassName=function(){return"".concat(he.props.rootPrefixCls,"-submenu-open")},he.getVisible=function(){return he.state.isOpen},he.getMode=function(){return he.state.mode},he.saveMenuInstance=function(ke){he.menuInstance=ke},he.addKeyPath=function(ke){return Object(D.a)(Object(D.a)({},ke),{},{keyPath:(ke.keyPath||[]).concat(he.props.eventKey)})},he.triggerOpenChange=function(ke,ze){var ot=he.props.eventKey,yt=function(){he.onOpenChange({key:ot,item:Object(E.a)(he),trigger:ze,open:ke})};ze==="mouseenter"?he.mouseenterTimeout=setTimeout(function(){yt()},0):yt()},he.isChildrenSelected=function(){var ke={find:!1};return X(he.props.children,he.props.selectedKeys,ke),ke.find},he.isInlineMode=function(){return he.getMode()==="inline"},he.adjustWidth=function(){if(!he.subMenuTitle||!he.menuInstance)return;var ke=Ye.findDOMNode(he.menuInstance);if(ke.offsetWidth>=he.subMenuTitle.offsetWidth)return;ke.style.minWidth="".concat(he.subMenuTitle.offsetWidth,"px")},he.saveSubMenuTitle=function(ke){he.subMenuTitle=ke},he.getBaseProps=function(){var ke=Object(E.a)(he),ze=ke.props,ot=he.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:he.getVisible(),level:ze.level+1,inlineIndent:ze.inlineIndent,focusable:!1,onClick:he.onSubMenuClick,onSelect:he.onSelect,onDeselect:he.onDeselect,onDestroy:he.onDestroy,selectedKeys:ze.selectedKeys,eventKey:"".concat(ze.eventKey,"-menu-"),openKeys:ze.openKeys,motion:ze.motion,onOpenChange:he.onOpenChange,subMenuOpenDelay:ze.subMenuOpenDelay,parentMenu:Object(E.a)(he),subMenuCloseDelay:ze.subMenuCloseDelay,forceSubMenuRender:ze.forceSubMenuRender,triggerSubMenuAction:ze.triggerSubMenuAction,builtinPlacements:ze.builtinPlacements,defaultActiveFirst:ze.store.getState().defaultActiveFirst[te(ze.eventKey)],multiple:ze.multiple,prefixCls:ze.rootPrefixCls,id:he.internalMenuId,manualRef:he.saveMenuInstance,itemIcon:ze.itemIcon,expandIcon:ze.expandIcon,direction:ze.direction}},he.getMotion=function(ke,ze){var ot=Object(E.a)(he),yt=ot.haveRendered,xt=he.props,Nt=xt.motion,hr=xt.rootPrefixCls,Cr=Object(D.a)(Object(D.a)({},Nt),{},{leavedClassName:"".concat(hr,"-hidden"),removeOnLeave:!1,motionAppear:yt||!ze||ke!=="inline"});return Cr};var Oe=Me.store,ge=Me.eventKey,Le=Oe.getState(),Ne=Le.defaultActiveFirst;he.isRootMenu=!1;var Ue=!1;return Ne&&(Ue=Ne[ge]),gt(Oe,ge,Ue),he.state={mode:Me.mode,isOpen:Me.isOpen},he}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var he=this,Oe=this.props,ge=Oe.mode,Le=Oe.parentMenu,Ne=Oe.manualRef,Ue=Oe.isOpen,ke=function(){he.setState({mode:ge,isOpen:Ue})},ze=Ue!==this.state.isOpen,ot=ge!==this.state.mode;if((ot||ze)&&(tt.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(tt.a)(ke):ke()),Ne&&Ne(this),ge!=="horizontal"||!(Le==null?void 0:Le.isRootMenu)||!Ue)return;this.minWidthTimeout=setTimeout(function(){return he.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var he=this.props,Oe=he.onDestroy,ge=he.eventKey;Oe&&Oe(ge),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),tt.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(he,Oe){var ge=this.getBaseProps();return u.createElement(nr,Object(s.a)({},ge,{id:this.internalMenuId,className:he,style:Oe}),this.props.children)}},{key:"renderChildren",value:function(){var he=this,Oe=this.getBaseProps(),ge=Oe.mode,Le=Oe.visible,Ne=Oe.forceSubMenuRender,Ue=Oe.direction,ke=this.getMotion(ge,Le);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Le||Ne,!this.haveOpened)return u.createElement("div",null);var ze=w()("".concat(Oe.prefixCls,"-sub"),Object(L.a)({},"".concat(Oe.prefixCls,"-rtl"),Ue==="rtl"));return this.isInlineMode()?u.createElement(On,Object(s.a)({visible:Oe.visible,forceRender:Ne},ke),function(ot){var yt=ot.className,xt=ot.style,Nt=w()(ze,yt);return he.renderPopupMenu(Nt,xt)}):this.renderPopupMenu(ze)}},{key:"render",value:function(){var he,Oe,ge,Le=Object(D.a)({},this.props),Ne=this.getVisible(),Ue=this.getPrefixCls(),ke=this.isInlineMode(),ze=this.getMode(),ot=w()(Ue,"".concat(Ue,"-").concat(ze),(he={},Object(L.a)(he,Le.className,!!Le.className),Object(L.a)(he,this.getOpenClassName(),Ne),Object(L.a)(he,this.getActiveClassName(),Le.active||Ne&&!ke),Object(L.a)(he,this.getDisabledClassName(),Le.disabled),Object(L.a)(he,this.getSelectedClassName(),this.isChildrenSelected()),he));this.internalMenuId||(Le.eventKey?this.internalMenuId="".concat(Le.eventKey,"$Menu"):(Ze+=1,this.internalMenuId="$__$".concat(Ze,"$Menu")));var yt={},xt={},Nt={};Le.disabled||(yt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},xt={onClick:this.onTitleClick},Nt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var hr={},Cr=Le.direction,Sr=Cr==="rtl";ke&&(Sr?hr.paddingRight=Le.inlineIndent*Le.level:hr.paddingLeft=Le.inlineIndent*Le.level);var Pr={};this.getVisible()&&(Pr={"aria-owns":this.internalMenuId});var _r=null;ze!=="horizontal"&&(_r=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(_r=u.createElement(this.props.expandIcon,Object(D.a)({},this.props))));var Mr=u.createElement("div",Object(s.a)({ref:this.saveSubMenuTitle,style:hr,className:"".concat(Ue,"-title"),role:"button"},Nt,xt,{"aria-expanded":Ne},Pr,{"aria-haspopup":"true",title:typeof Le.title=="string"?Le.title:void 0}),Le.title,_r||u.createElement("i",{className:"".concat(Ue,"-arrow")})),Ir=this.renderChildren(),Jr=((Oe=Le.parentMenu)===null||Oe===void 0?void 0:Oe.isRootMenu)?Le.parentMenu.props.getPopupContainer:function(un){return un.parentNode},Kr=ht[ze],gn=Le.popupOffset?{offset:Le.popupOffset}:{},zr=w()((ge={},Object(L.a)(ge,Le.popupClassName,Le.popupClassName&&!ke),Object(L.a)(ge,"".concat(Ue,"-rtl"),Sr),ge)),gr=Le.disabled,Er=Le.triggerSubMenuAction,Fr=Le.subMenuOpenDelay,$r=Le.forceSubMenuRender,or=Le.subMenuCloseDelay,tn=Le.builtinPlacements;Y.forEach(function(un){return delete Le[un]}),delete Le.onClick;var An=Sr?Object(D.a)(Object(D.a)({},li),tn):Object(D.a)(Object(D.a)({},ei),tn);delete Le.direction;var ln=this.getBaseProps(),En=ke?null:this.getMotion(ln.mode,ln.visible);return u.createElement("li",Object(s.a)({},Le,yt,{className:ot,role:"menuitem"}),u.createElement(Ka,{prefixCls:Ue,popupClassName:w()("".concat(Ue,"-popup"),zr),getPopupContainer:Jr,builtinPlacements:An,popupPlacement:Kr,popupVisible:ke?!1:Ne,popupAlign:gn,popup:ke?null:Ir,action:gr||ke?[]:[Er],mouseEnterDelay:Fr,mouseLeaveDelay:or,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:$r,popupMotion:En},Mr),ke?Ir:null)}}]),He}(u.Component);Wt.defaultProps={onMouseEnter:Z,onMouseLeave:Z,onTitleMouseEnter:Z,onTitleMouseLeave:Z,onTitleClick:Z,manualRef:Z,mode:"vertical",title:""};var At=Object(T.b)(function(Pe,Fe){var He=Pe.openKeys,Me=Pe.activeKey,he=Pe.selectedKeys,Oe=Fe.eventKey,ge=Fe.subMenuKey;return{isOpen:He.indexOf(Oe)>-1,active:Me[ge]===Oe,selectedKeys:he}})(Wt);At.isSubMenu=!0;var Jt=At,Lt="menuitem-overflowed",ct=.5,nt=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(){var Me;return Object(P.a)(this,He),Me=Fe.apply(this,arguments),Me.resizeObserver=null,Me.mutationObserver=null,Me.originalTotalWidth=0,Me.overflowedItems=[],Me.menuItemSizes=[],Me.cancelFrameId=null,Me.state={lastVisibleIndex:void 0},Me.childRef=u.createRef(),Me.getMenuItemNodes=function(){var he=Me.props.prefixCls,Oe=Me.childRef.current;return Oe?[].slice.call(Oe.children).filter(function(ge){return ge.className.split(" ").indexOf("".concat(he,"-overflowed-submenu"))<0}):[]},Me.getOverflowedSubMenuItem=function(he,Oe,ge){var Le=Me.props,Ne=Le.overflowedIndicator,Ue=Le.level,ke=Le.mode,ze=Le.prefixCls,ot=Le.theme;if(Ue!==1||ke!=="horizontal")return null;var yt=Me.props.children[0],xt=yt.props,Nt=xt.children,hr=xt.title,Cr=xt.style,Sr=Object(C.a)(xt,["children","title","style"]),Pr=Object(D.a)({},Cr),_r="".concat(he,"-overflowed-indicator"),Mr="".concat(he,"-overflowed-indicator");Oe.length===0&&ge!==!0?Pr=Object(D.a)(Object(D.a)({},Pr),{},{display:"none"}):ge&&(Pr=Object(D.a)(Object(D.a)({},Pr),{},{visibility:"hidden",position:"absolute"}),_r="".concat(_r,"-placeholder"),Mr="".concat(Mr,"-placeholder"));var Ir=ot?"".concat(ze,"-").concat(ot):"",Jr={};return Y.forEach(function(Kr){Sr[Kr]!==void 0&&(Jr[Kr]=Sr[Kr])}),u.createElement(Jt,Object(s.a)({title:Ne,className:"".concat(ze,"-overflowed-submenu"),popupClassName:Ir},Jr,{key:_r,eventKey:Mr,disabled:!1,style:Pr}),Oe)},Me.setChildrenWidthAndResize=function(){if(Me.props.mode!=="horizontal")return;var he=Me.childRef.current;if(!he)return;var Oe=he.children;if(!Oe||Oe.length===0)return;var ge=he.children[Oe.length-1];ue(ge,"display","inline-block");var Le=Me.getMenuItemNodes(),Ne=Le.filter(function(Ue){return Ue.className.split(" ").indexOf(Lt)>=0});Ne.forEach(function(Ue){ue(Ue,"display","inline-block")}),Me.menuItemSizes=Le.map(function(Ue){return ve(Ue,!0)}),Ne.forEach(function(Ue){ue(Ue,"display","none")}),Me.overflowedIndicatorWidth=ve(he.children[he.children.length-1],!0),Me.originalTotalWidth=Me.menuItemSizes.reduce(function(Ue,ke){return Ue+ke},0),Me.handleResize(),ue(ge,"display","none")},Me.handleResize=function(){if(Me.props.mode!=="horizontal")return;var he=Me.childRef.current;if(!he)return;var Oe=ve(he);Me.overflowedItems=[];var ge=0,Le;Me.originalTotalWidth>Oe+ct&&(Le=-1,Me.menuItemSizes.forEach(function(Ne){ge+=Ne,ge+Me.overflowedIndicatorWidth<=Oe&&(Le+=1)})),Me.setState({lastVisibleIndex:Le})},Me}return Object(O.a)(He,[{key:"componentDidMount",value:function(){var he=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Oe=this.childRef.current;if(!Oe)return;this.resizeObserver=new Ke.default(function(ge){ge.forEach(function(){var Le=he.cancelFrameId;cancelAnimationFrame(Le),he.cancelFrameId=requestAnimationFrame(he.setChildrenWidthAndResize)})}),[].slice.call(Oe.children).concat(Oe).forEach(function(ge){he.resizeObserver.observe(ge)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){he.resizeObserver.disconnect(),[].slice.call(Oe.children).concat(Oe).forEach(function(ge){he.resizeObserver.observe(ge)}),he.setChildrenWidthAndResize()}),this.mutationObserver.observe(Oe,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(he){var Oe=this,ge=this.state.lastVisibleIndex;return(he||[]).reduce(function(Le,Ne,Ue){var ke=Ne;if(Oe.props.mode==="horizontal"){var ze=Oe.getOverflowedSubMenuItem(Ne.props.eventKey,[]);ge!==void 0&&Oe.props.className.indexOf("".concat(Oe.props.prefixCls,"-root"))!==-1&&(Ue>ge&&(ke=u.cloneElement(Ne,{style:{display:"none"},eventKey:"".concat(Ne.props.eventKey,"-hidden"),className:"".concat(Lt)})),Ue===ge+1&&(Oe.overflowedItems=he.slice(ge+1).map(function(yt){return u.cloneElement(yt,{key:yt.props.eventKey,mode:"vertical-left"})}),ze=Oe.getOverflowedSubMenuItem(Ne.props.eventKey,Oe.overflowedItems)));var ot=[].concat(Object(l.a)(Le),[ze,ke]);return Ue===he.length-1&&ot.push(Oe.getOverflowedSubMenuItem(Ne.props.eventKey,[],!0)),ot}return[].concat(Object(l.a)(Le),[ke])},[])}},{key:"render",value:function(){var he=this.props,Oe=he.visible,ge=he.prefixCls,Le=he.overflowedIndicator,Ne=he.mode,Ue=he.level,ke=he.tag,ze=he.children,ot=he.theme,yt=Object(C.a)(he,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),xt=ke;return u.createElement(xt,Object(s.a)({ref:this.childRef},yt),this.renderChildren(ze))}}]),He}(u.Component);nt.defaultProps={tag:"div",className:""};var it=nt;function _t(Pe){return Pe.length?Pe.every(function(Fe){return!!Fe.props.disabled}):!0}function Rt(Pe,Fe,He){var Me=Pe.getState();Pe.setState({activeKey:Object(D.a)(Object(D.a)({},Me.activeKey),{},Object(L.a)({},Fe,He))})}function Ct(Pe){return Pe.eventKey||"0-menu-"}function Ot(Pe,Fe){var He=Fe,Me=Pe.children,he=Pe.eventKey;if(He){var Oe;if($(Me,function(ge,Le){ge&&ge.props&&!ge.props.disabled&&He===be(ge,he,Le)&&(Oe=!0)}),Oe)return He}return He=null,Pe.defaultActiveFirst&&$(Me,function(ge,Le){!He&&ge&&!ge.props.disabled&&(He=be(ge,he,Le))}),He}function Pt(Pe){if(!Pe)return;var Fe=this.instanceArray.indexOf(Pe);Fe!==-1?this.instanceArray[Fe]=Pe:this.instanceArray.push(Pe)}var jt=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(Me){var he;return Object(P.a)(this,He),he=Fe.call(this,Me),he.onKeyDown=function(Oe,ge){var Le=Oe.keyCode,Ne;if(he.getFlatInstanceArray().forEach(function(ke){ke&&ke.props.active&&ke.onKeyDown&&(Ne=ke.onKeyDown(Oe))}),Ne)return 1;var Ue=null;return(Le===g.a.UP||Le===g.a.DOWN)&&(Ue=he.step(Le===g.a.UP?-1:1)),Ue?(Oe.preventDefault(),Rt(he.props.store,Ct(he.props),Ue.props.eventKey),typeof ge=="function"&&ge(Ue),1):void 0},he.onItemHover=function(Oe){var ge=Oe.key,Le=Oe.hover;Rt(he.props.store,Ct(he.props),Le?ge:null)},he.onDeselect=function(Oe){he.props.onDeselect(Oe)},he.onSelect=function(Oe){he.props.onSelect(Oe)},he.onClick=function(Oe){he.props.onClick(Oe)},he.onOpenChange=function(Oe){he.props.onOpenChange(Oe)},he.onDestroy=function(Oe){he.props.onDestroy(Oe)},he.getFlatInstanceArray=function(){return he.instanceArray},he.step=function(Oe){var ge=he.getFlatInstanceArray(),Le=he.props.store.getState().activeKey[Ct(he.props)],Ne=ge.length;if(!Ne)return null;Oe<0&&(ge=ge.concat().reverse());var Ue=-1;if(ge.every(function(yt,xt){return yt&&yt.props.eventKey===Le?(Ue=xt,!1):!0}),!he.props.defaultActiveFirst&&Ue!==-1&&_t(ge.slice(Ue,Ne-1)))return;var ke=(Ue+1)%Ne,ze=ke;do{var ot=ge[ze];if(!ot||ot.props.disabled)ze=(ze+1)%Ne;else return ot}while(ze!==ke);return null},he.renderCommonMenuItem=function(Oe,ge,Le){var Ne=he.props.store.getState(),Ue=Object(E.a)(he),ke=Ue.props,ze=be(Oe,ke.eventKey,ge),ot=Oe.props;if(!ot||typeof Oe.type=="string")return Oe;var yt=ze===Ne.activeKey,xt=Object(D.a)(Object(D.a)({mode:ot.mode||ke.mode,level:ke.level,inlineIndent:ke.inlineIndent,renderMenuItem:he.renderMenuItem,rootPrefixCls:ke.prefixCls,index:ge,parentMenu:ke.parentMenu,manualRef:ot.disabled?void 0:Object(N.a)(Oe.ref,Pt.bind(Object(E.a)(he))),eventKey:ze,active:!ot.disabled&&yt,multiple:ke.multiple,onClick:function(hr){(ot.onClick||Z)(hr),he.onClick(hr)},onItemHover:he.onItemHover,motion:ke.motion,subMenuOpenDelay:ke.subMenuOpenDelay,subMenuCloseDelay:ke.subMenuCloseDelay,forceSubMenuRender:ke.forceSubMenuRender,onOpenChange:he.onOpenChange,onDeselect:he.onDeselect,onSelect:he.onSelect,builtinPlacements:ke.builtinPlacements,itemIcon:ot.itemIcon||he.props.itemIcon,expandIcon:ot.expandIcon||he.props.expandIcon},Le),{},{direction:ke.direction});return(ke.mode==="inline"||Ee())&&(xt.triggerSubMenuAction="click"),u.cloneElement(Oe,Object(D.a)(Object(D.a)({},xt),{},{key:ze||ge}))},he.renderMenuItem=function(Oe,ge,Le){if(!Oe)return null;var Ne=he.props.store.getState(),Ue={openKeys:Ne.openKeys,selectedKeys:Ne.selectedKeys,triggerSubMenuAction:he.props.triggerSubMenuAction,subMenuKey:Le};return he.renderCommonMenuItem(Oe,ge,Ue)},Me.store.setState({activeKey:Object(D.a)(Object(D.a)({},Me.store.getState().activeKey),{},Object(L.a)({},Me.eventKey,Ot(Me,Me.activeKey)))}),he.instanceArray=[],he}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(he){return this.props.visible||he.visible||this.props.className!==he.className||!G()(this.props.style,he.style)}},{key:"componentDidUpdate",value:function(he){var Oe=this.props,ge="activeKey"in Oe?Oe.activeKey:Oe.store.getState().activeKey[Ct(Oe)],Le=Ot(Oe,ge);if(Le!==ge)Rt(Oe.store,Ct(Oe),Le);else if("activeKey"in he){var Ne=Ot(he,he.activeKey);Le!==Ne&&Rt(Oe.store,Ct(Oe),Le)}}},{key:"render",value:function(){var he=this,Oe=Object(s.a)({},this.props);this.instanceArray=[];var ge=w()(Oe.prefixCls,Oe.className,"".concat(Oe.prefixCls,"-").concat(Oe.mode)),Le={className:ge,role:Oe.role||"menu"};Oe.id&&(Le.id=Oe.id),Oe.focusable&&(Le.tabIndex=0,Le.onKeyDown=this.onKeyDown);var Ne=Oe.prefixCls,Ue=Oe.eventKey,ke=Oe.visible,ze=Oe.level,ot=Oe.mode,yt=Oe.overflowedIndicator,xt=Oe.theme;return Y.forEach(function(Nt){return delete Oe[Nt]}),delete Oe.onClick,u.createElement(it,Object(s.a)({},Oe,{prefixCls:Ne,mode:ot,tag:"ul",level:ze,theme:xt,visible:ke,overflowedIndicator:yt},Le),Object(d.a)(Oe.children).map(function(Nt,hr){return he.renderMenuItem(Nt,hr,Ue||"0-menu-")}))}}]),He}(u.Component);jt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Z};var Ve=Object(T.b)()(jt),nr=Ve,Yt=k("Kwbf");function Qt(Pe,Fe,He){var Me=Pe.prefixCls,he=Pe.motion,Oe=Pe.defaultMotions,ge=Oe===void 0?{}:Oe,Le=Pe.openAnimation,Ne=Pe.openTransitionName,Ue=Fe.switchingModeFromInline;if(he)return he;if(Object(H.a)(Le)==="object"&&Le)Object(Yt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Le=="string")return{motionName:"".concat(Me,"-open-").concat(Le)};if(Ne)return{motionName:Ne};var ke=ge[He];return ke||(Ue?null:ge.other)}var It=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(Me){var he;Object(P.a)(this,He),he=Fe.call(this,Me),he.onSelect=function(Le){var Ne=Object(E.a)(he),Ue=Ne.props;if(Ue.selectable){var ke=he.store.getState(),ze=ke.selectedKeys,ot=Le.key;Ue.multiple?ze=ze.concat([ot]):ze=[ot],"selectedKeys"in Ue||he.store.setState({selectedKeys:ze}),Ue.onSelect(Object(D.a)(Object(D.a)({},Le),{},{selectedKeys:ze}))}},he.onClick=function(Le){var Ne=he.getRealMenuMode(),Ue=Object(E.a)(he),ke=Ue.store,ze=Ue.props.onOpenChange;Ne!=="inline"&&!("openKeys"in he.props)&&(ke.setState({openKeys:[]}),ze([])),he.props.onClick(Le)},he.onKeyDown=function(Le,Ne){he.innerMenu.getWrappedInstance().onKeyDown(Le,Ne)},he.onOpenChange=function(Le){var Ne=Object(E.a)(he),Ue=Ne.props,ke=he.store.getState().openKeys.concat(),ze=!1,ot=function(xt){var Nt=!1;if(xt.open)Nt=ke.indexOf(xt.key)===-1,Nt&&ke.push(xt.key);else{var hr=ke.indexOf(xt.key);Nt=hr!==-1,Nt&&ke.splice(hr,1)}ze=ze||Nt};Array.isArray(Le)?Le.forEach(ot):ot(Le),ze&&("openKeys"in he.props||he.store.setState({openKeys:ke}),Ue.onOpenChange(ke))},he.onDeselect=function(Le){var Ne=Object(E.a)(he),Ue=Ne.props;if(Ue.selectable){var ke=he.store.getState().selectedKeys.concat(),ze=Le.key,ot=ke.indexOf(ze);ot!==-1&&ke.splice(ot,1),"selectedKeys"in Ue||he.store.setState({selectedKeys:ke}),Ue.onDeselect(Object(D.a)(Object(D.a)({},Le),{},{selectedKeys:ke}))}},he.onMouseEnter=function(Le){he.restoreModeVerticalFromInline();var Ne=he.props.onMouseEnter;Ne&&Ne(Le)},he.onTransitionEnd=function(Le){var Ne=Le.propertyName==="width"&&Le.target===Le.currentTarget,Ue=Le.target.className,ke=Object.prototype.toString.call(Ue)==="[object SVGAnimatedString]"?Ue.animVal:Ue,ze=Le.propertyName==="font-size"&&ke.indexOf("anticon")>=0;(Ne||ze)&&he.restoreModeVerticalFromInline()},he.setInnerMenu=function(Le){he.innerMenu=Le},he.isRootMenu=!0;var Oe=Me.defaultSelectedKeys,ge=Me.defaultOpenKeys;return"selectedKeys"in Me&&(Oe=Me.selectedKeys||[]),"openKeys"in Me&&(ge=Me.openKeys||[]),he.store=Object(T.c)({selectedKeys:Oe,openKeys:ge,activeKey:{"0-menu-":Ot(Me,Me.activeKey)}}),he.state={switchingModeFromInline:!1,prevProps:Me,inlineOpenKeys:[],store:he.store},he}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(he){var Oe=this.props,ge=Oe.siderCollapsed,Le=Oe.inlineCollapsed,Ne=Oe.onOpenChange;(!he.inlineCollapsed&&Le||!he.siderCollapsed&&ge)&&Ne([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var he=this.props.collapsedWidth,Oe=this.store,ge=this.prevOpenKeys,Le=this.getInlineCollapsed()&&(he===0||he==="0"||he==="0px");Le?(this.prevOpenKeys=Oe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ge&&(this.store.setState({openKeys:ge}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var he=this.props.mode,Oe=this.state.switchingModeFromInline,ge=this.getInlineCollapsed();return Oe&&ge?"inline":ge?"vertical":he}},{key:"getInlineCollapsed",value:function(){var he=this.props,Oe=he.inlineCollapsed,ge=he.siderCollapsed;return ge!==void 0?ge:Oe}},{key:"restoreModeVerticalFromInline",value:function(){var he=this.state.switchingModeFromInline;he&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var he=Object(D.a)({},Object(M.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Oe=this.getRealMenuMode();return he.className+=" ".concat(he.prefixCls,"-root"),he.direction==="rtl"&&(he.className+=" ".concat(he.prefixCls,"-rtl")),he=Object(D.a)(Object(D.a)({},he),{},{mode:Oe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Qt(this.props,this.state,Oe)}),delete he.openAnimation,delete he.openTransitionName,u.createElement(T.a,{store:this.store},u.createElement(nr,Object(s.a)({},he,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(he,Oe){var ge=Oe.prevProps,Le=Oe.store,Ne=Le.getState(),Ue={},ke={prevProps:he};return ge.mode==="inline"&&he.mode!=="inline"&&(ke.switchingModeFromInline=!0),"openKeys"in he?Ue.openKeys=he.openKeys||[]:((he.inlineCollapsed&&!ge.inlineCollapsed||he.siderCollapsed&&!ge.siderCollapsed)&&(ke.switchingModeFromInline=!0,ke.inlineOpenKeys=Ne.openKeys,Ue.openKeys=[]),(!he.inlineCollapsed&&ge.inlineCollapsed||!he.siderCollapsed&&ge.siderCollapsed)&&(Ue.openKeys=Oe.inlineOpenKeys,ke.inlineOpenKeys=[])),Object.keys(Ue).length&&Le.setState(Ue),ke}}]),He}(u.Component);It.defaultProps={selectable:!0,onClick:Z,onSelect:Z,onOpenChange:Z,onDeselect:Z,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:u.createElement("span",null,"\xB7\xB7\xB7")};var zt=It,Ut=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(){var Me;return Object(P.a)(this,He),Me=Fe.apply(this,arguments),Me.onKeyDown=function(he){var Oe=he.keyCode;return Oe===g.a.ENTER?(Me.onClick(he),!0):void 0},Me.onMouseLeave=function(he){var Oe=Me.props,ge=Oe.eventKey,Le=Oe.onItemHover,Ne=Oe.onMouseLeave;Le({key:ge,hover:!1}),Ne({key:ge,domEvent:he})},Me.onMouseEnter=function(he){var Oe=Me.props,ge=Oe.eventKey,Le=Oe.onItemHover,Ne=Oe.onMouseEnter;Le({key:ge,hover:!0}),Ne({key:ge,domEvent:he})},Me.onClick=function(he){var Oe=Me.props,ge=Oe.eventKey,Le=Oe.multiple,Ne=Oe.onClick,Ue=Oe.onSelect,ke=Oe.onDeselect,ze=Oe.isSelected,ot={key:ge,keyPath:[ge],item:Object(E.a)(Me),domEvent:he};Ne(ot),Le?ze?ke(ot):Ue(ot):ze||Ue(ot)},Me.saveNode=function(he){Me.node=he},Me}return Object(O.a)(He,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var he=this.props;he.onDestroy&&he.onDestroy(he.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var he,Oe=Object(D.a)({},this.props),ge=w()(this.getPrefixCls(),Oe.className,(he={},Object(L.a)(he,this.getActiveClassName(),!Oe.disabled&&Oe.active),Object(L.a)(he,this.getSelectedClassName(),Oe.isSelected),Object(L.a)(he,this.getDisabledClassName(),Oe.disabled),he)),Le=Object(D.a)(Object(D.a)({},Oe.attribute),{},{title:typeof Oe.title=="string"?Oe.title:void 0,className:ge,role:Oe.role||"menuitem","aria-disabled":Oe.disabled});Oe.role==="option"?Le=Object(D.a)(Object(D.a)({},Le),{},{role:"option","aria-selected":Oe.isSelected}):(Oe.role===null||Oe.role==="none")&&(Le.role="none");var Ne={onClick:Oe.disabled?null:this.onClick,onMouseLeave:Oe.disabled?null:this.onMouseLeave,onMouseEnter:Oe.disabled?null:this.onMouseEnter},Ue=Object(D.a)({},Oe.style);Oe.mode==="inline"&&(Oe.direction==="rtl"?Ue.paddingRight=Oe.inlineIndent*Oe.level:Ue.paddingLeft=Oe.inlineIndent*Oe.level),Y.forEach(function(ze){return delete Oe[ze]}),delete Oe.direction;var ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ke=u.createElement(this.props.itemIcon,this.props)),u.createElement("li",Object(s.a)({},Object(M.a)(Oe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Le,Ne,{style:Ue,ref:this.saveNode}),Oe.children,ke)}}]),He}(u.Component);Ut.isMenuItem=!0,Ut.defaultProps={onSelect:Z,onMouseEnter:Z,onMouseLeave:Z,manualRef:Z};var Ht=Object(T.b)(function(Pe,Fe){var He=Pe.activeKey,Me=Pe.selectedKeys,he=Fe.eventKey,Oe=Fe.subMenuKey;return{active:He[Oe]===he,isSelected:Array.isArray(Me)?Me.indexOf(he)!==-1:Me===he}})(Ut),xr=Ht,Nr=function(Pe){Object(v.a)(He,Pe);var Fe=Object(y.a)(He);function He(){var Me;return Object(P.a)(this,He),Me=Fe.apply(this,arguments),Me.renderInnerMenuItem=function(he){var Oe=Me.props,ge=Oe.renderMenuItem,Le=Oe.index;return ge(he,Le,Me.props.subMenuKey)},Me}return Object(O.a)(He,[{key:"render",value:function(){var he=Object(s.a)({},this.props),Oe=he.className,ge=Oe===void 0?"":Oe,Le=he.rootPrefixCls,Ne="".concat(Le,"-item-group-title"),Ue="".concat(Le,"-item-group-list"),ke=he.title,ze=he.children;return Y.forEach(function(ot){return delete he[ot]}),delete he.direction,u.createElement("li",Object(s.a)({},he,{onClick:function(yt){return yt.stopPropagation()},className:"".concat(ge," ").concat(Le,"-item-group")}),u.createElement("div",{className:Ne,title:typeof ke=="string"?ke:void 0},ke),u.createElement("ul",{className:Ue},u.Children.map(ze,this.renderInnerMenuItem)))}}]),He}(u.Component);Nr.isMenuItemGroup=!0,Nr.defaultProps={disabled:!0};var Dr=Nr,Br=function(Fe){var He=Fe.className,Me=Fe.rootPrefixCls,he=Fe.style;return u.createElement("li",{className:"".concat(He," ").concat(Me,"-item-divider"),style:he})};Br.defaultProps={disabled:!0,className:"",style:{}};var Wr=Br,on=zt,qe=k("eDIo");function er(Pe,Fe){var He=Pe.prefixCls,Me=Pe.editable,he=Pe.locale,Oe=Pe.style;return!Me||Me.showAdd===!1?null:u.createElement("button",{ref:Fe,type:"button",className:"".concat(He,"-nav-add"),style:Oe,"aria-label":(he==null?void 0:he.addAriaLabel)||"Add tab",onClick:function(Le){Me.onEdit("add",{event:Le})}},Me.addIcon||"+")}var sn=u.forwardRef(er);function en(Pe,Fe){var He=Pe.prefixCls,Me=Pe.id,he=Pe.tabs,Oe=Pe.locale,ge=Pe.mobile,Le=Pe.moreIcon,Ne=Le===void 0?"More":Le,Ue=Pe.moreTransitionName,ke=Pe.style,ze=Pe.className,ot=Pe.editable,yt=Pe.tabBarGutter,xt=Pe.rtl,Nt=Pe.onTabClick,hr=Object(u.useState)(!1),Cr=Object(f.a)(hr,2),Sr=Cr[0],Pr=Cr[1],_r=Object(u.useState)(null),Mr=Object(f.a)(_r,2),Ir=Mr[0],Jr=Mr[1],Kr="".concat(Me,"-more-popup"),gn="".concat(He,"-dropdown"),zr=Ir!==null?"".concat(Kr,"-").concat(Ir):null,gr=Oe==null?void 0:Oe.dropdownAriaLabel,Er=u.createElement(on,{onClick:function(En){var un=En.key,jn=En.domEvent;Nt(un,jn),Pr(!1)},id:Kr,tabIndex:-1,role:"listbox","aria-activedescendant":zr,selectedKeys:[Ir],"aria-label":gr!==void 0?gr:"expanded dropdown"},he.map(function(ln){return u.createElement(xr,{key:ln.key,id:"".concat(Kr,"-").concat(ln.key),role:"option","aria-controls":Me&&"".concat(Me,"-panel-").concat(ln.key),disabled:ln.disabled},ln.tab)}));function Fr(ln){for(var En=he.filter(function(ta){return!ta.disabled}),un=En.findIndex(function(ta){return ta.key===Ir})||0,jn=En.length,Xn=0;Xn<jn;Xn+=1){un=(un+ln+jn)%jn;var Rn=En[un];if(!Rn.disabled){Jr(Rn.key);return}}}function $r(ln){var En=ln.which;if(!Sr){[g.a.DOWN,g.a.SPACE,g.a.ENTER].includes(En)&&(Pr(!0),ln.preventDefault());return}switch(En){case g.a.UP:Fr(-1),ln.preventDefault();break;case g.a.DOWN:Fr(1),ln.preventDefault();break;case g.a.ESC:Pr(!1);break;case g.a.SPACE:case g.a.ENTER:Ir!==null&&Nt(Ir,ln);break}}Object(u.useEffect)(function(){var ln=document.getElementById(zr);ln&&ln.scrollIntoView&&ln.scrollIntoView(!1)},[Ir]),Object(u.useEffect)(function(){Sr||Jr(null)},[Sr]);var or=Object(L.a)({},xt?"marginLeft":"marginRight",yt);he.length||(or.visibility="hidden",or.order=1);var tn=w()(Object(L.a)({},"".concat(gn,"-rtl"),xt)),An=ge?null:u.createElement(qe.a,{prefixCls:gn,overlay:Er,trigger:["hover"],visible:Sr,transitionName:Ue,onVisibleChange:Pr,overlayClassName:tn,mouseEnterDelay:.1,mouseLeaveDelay:.1},u.createElement("button",{type:"button",className:"".concat(He,"-nav-more"),style:or,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Kr,id:"".concat(Me,"-more"),"aria-expanded":Sr,onKeyDown:$r},Ne));return u.createElement("div",{className:w()("".concat(He,"-nav-operations"),ze),style:ke,ref:Fe},An,u.createElement(sn,{prefixCls:He,locale:Oe,editable:ot}))}var mr=u.forwardRef(en),dr=Object(u.createContext)(null),vr=.1,wt=.01,Bt=20,tr=Math.pow(.995,Bt);function Gt(){var Pe=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Pe)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Pe.substr(0,4)))}function ut(Pe,Fe){var He=Object(u.useState)(),Me=Object(f.a)(He,2),he=Me[0],Oe=Me[1],ge=Object(u.useState)(0),Le=Object(f.a)(ge,2),Ne=Le[0],Ue=Le[1],ke=Object(u.useState)(0),ze=Object(f.a)(ke,2),ot=ze[0],yt=ze[1],xt=Object(u.useState)(),Nt=Object(f.a)(xt,2),hr=Nt[0],Cr=Nt[1],Sr=Object(u.useRef)();function Pr(gr){var Er=gr.touches[0],Fr=Er.screenX,$r=Er.screenY;Oe({x:Fr,y:$r}),window.clearInterval(Sr.current)}function _r(gr){if(!he)return;gr.preventDefault();var Er=gr.touches[0],Fr=Er.screenX,$r=Er.screenY;Oe({x:Fr,y:$r});var or=Fr-he.x,tn=$r-he.y;Fe(or,tn);var An=Date.now();Ue(An),yt(An-Ne),Cr({x:or,y:tn})}function Mr(){if(!he)return;if(Oe(null),Cr(null),hr){var gr=hr.x/ot,Er=hr.y/ot,Fr=Math.abs(gr),$r=Math.abs(Er);if(Math.max(Fr,$r)<vr)return;var or=gr,tn=Er;Sr.current=window.setInterval(function(){if(Math.abs(or)<wt&&Math.abs(tn)<wt){window.clearInterval(Sr.current);return}or*=tr,tn*=tr,Fe(or*Bt,tn*Bt)},Bt)}}var Ir=Object(u.useRef)(0),Jr=Object(u.useRef)(!1),Kr=Object(u.useRef)();function gn(gr){var Er=gr.deltaX,Fr=gr.deltaY,$r=0,or=Math.abs(Er),tn=Math.abs(Fr);or===tn?$r=Kr.current==="x"?Er:Fr:or>tn?($r=Er,Kr.current="x"):($r=Fr,Kr.current="y");var An=Date.now();An-Ir.current>100&&(Jr.current=!1),(Fe(-$r,-$r)||Jr.current)&&(gr.preventDefault(),Jr.current=!0),Ir.current=An}var zr=Object(u.useRef)(null);zr.current={onTouchStart:Pr,onTouchMove:_r,onTouchEnd:Mr,onWheel:gn},u.useEffect(function(){function gr(or){zr.current.onTouchStart(or)}function Er(or){zr.current.onTouchMove(or)}function Fr(or){zr.current.onTouchEnd(or)}function $r(or){zr.current.onWheel(or)}return document.addEventListener("touchmove",Er,{passive:!1}),document.addEventListener("touchend",Fr,{passive:!1}),Pe.current.addEventListener("touchstart",gr,{passive:!1}),Pe.current.addEventListener("wheel",$r),function(){document.removeEventListener("touchmove",Er),document.removeEventListener("touchend",Fr)}},[])}function dt(){var Pe=Object(u.useRef)(new Map);function Fe(Me){return Pe.current.has(Me)||Pe.current.set(Me,u.createRef()),Pe.current.get(Me)}function He(Me){Pe.current.delete(Me)}return[Fe,He]}function Dt(Pe,Fe){var He=u.useRef(Pe),Me=u.useState({}),he=Object(f.a)(Me,2),Oe=he[1];function ge(Le){var Ne=typeof Le=="function"?Le(He.current):Le;Ne!==He.current&&Fe(Ne,He.current),He.current=Ne,Oe({})}return[He.current,ge]}var bt=function(Fe){var He=Fe.position,Me=Fe.prefixCls,he=Fe.extra;if(!he)return null;var Oe,ge=he;return He==="right"&&(Oe=ge.right||!ge.left&&ge||null),He==="left"&&(Oe=ge.left||null),Oe?u.createElement("div",{className:"".concat(Me,"-extra-content")},Oe):null};function fr(Pe,Fe){var He,Me=u.useContext(dr),he=Me.prefixCls,Oe=Me.tabs,ge=Pe.className,Le=Pe.style,Ne=Pe.id,Ue=Pe.animated,ke=Pe.activeKey,ze=Pe.rtl,ot=Pe.extra,yt=Pe.editable,xt=Pe.locale,Nt=Pe.tabPosition,hr=Pe.tabBarGutter,Cr=Pe.children,Sr=Pe.onTabClick,Pr=Pe.onTabScroll,_r=Object(u.useRef)(),Mr=Object(u.useRef)(),Ir=Object(u.useRef)(),Jr=Object(u.useRef)(),Kr=dt(),gn=Object(f.a)(Kr,2),zr=gn[0],gr=gn[1],Er=Nt==="top"||Nt==="bottom",Fr=Dt(0,function(bn,an){Er&&Pr&&Pr({direction:bn>an?"left":"right"})}),$r=Object(f.a)(Fr,2),or=$r[0],tn=$r[1],An=Dt(0,function(bn,an){!Er&&Pr&&Pr({direction:bn>an?"top":"bottom"})}),ln=Object(f.a)(An,2),En=ln[0],un=ln[1],jn=Object(u.useState)(0),Xn=Object(f.a)(jn,2),Rn=Xn[0],ta=Xn[1],Ia=Object(u.useState)(0),ca=Object(f.a)(Ia,2),Vn=ca[0],xn=ca[1],_n=Object(u.useState)(0),Dn=Object(f.a)(_n,2),Cn=Dn[0],Bn=Dn[1],ma=Object(u.useState)(0),Va=Object(f.a)(ma,2),hn=Va[0],Ta=Va[1],Sa=Object(u.useState)(null),yn=Object(f.a)(Sa,2),cn=yn[0],Wn=yn[1],Bi=Object(u.useState)(null),_i=Object(f.a)(Bi,2),ti=_i[0],ri=_i[1],Li=Object(u.useState)(0),wi=Object(f.a)(Li,2),Mi=wi[0],Wi=wi[1],Vi=Object(u.useState)(0),Ii=Object(f.a)(Vi,2),ni=Ii[0],Ti=Ii[1],yi=m(new Map),ai=Object(f.a)(yi,2),co=ai[0],bi=ai[1],Si=t(Oe,co,Rn),ii="".concat(he,"-nav-operations-hidden"),ui=0,ka=0;Er?ze?(ui=0,ka=Math.max(0,Rn-cn)):(ui=Math.min(0,cn-Rn),ka=0):(ui=Math.min(0,ti-Vn),ka=0);function $a(bn){return bn<ui?[ui,!1]:bn>ka?[ka,!1]:[bn,!0]}var ar=Object(u.useRef)(),sr=Object(u.useState)(),$t=Object(f.a)(sr,2),rn=$t[0],Zt=$t[1];function ci(){Zt(Date.now())}function $i(){window.clearTimeout(ar.current)}ut(_r,function(bn,an){var ia=!1;function Oa(ki,di){ki(function(zi){var Ei=$a(zi+di),oa=Object(f.a)(Ei,2),Qi=oa[0],ho=oa[1];return ia=ho,Qi})}if(Er){if(cn>=Rn)return ia;Oa(tn,bn)}else{if(ti>=Vn)return ia;Oa(un,an)}return $i(),ci(),ia}),Object(u.useEffect)(function(){return $i(),rn&&(ar.current=window.setTimeout(function(){Zt(0)},100)),$i},[rn]);function Tn(){var bn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ke,an=Si.get(bn);if(!an)return;if(Er){var ia=or;ze?an.right<or?ia=an.right:an.right+an.width>or+cn&&(ia=an.right+an.width-cn):an.left<-or?ia=-an.left:an.left+an.width>-or+cn&&(ia=-(an.left+an.width-cn)),un(0),tn($a(ia)[0])}else{var Oa=En;an.top<-En?Oa=-an.top:an.top+an.height>-En+ti&&(Oa=-(an.top+an.height-ti)),tn(0),un($a(Oa)[0])}}var Ci=x(Si,{width:cn,height:ti,left:or,top:En},{width:Cn,height:hn},{width:Mi,height:ni},Object(D.a)(Object(D.a)({},Pe),{},{tabs:Oe})),Do=Object(f.a)(Ci,2),Jo=Do[0],Qo=Do[1],Zo=Oe.map(function(bn){var an=bn.key;return u.createElement(n,{id:Ne,prefixCls:he,key:an,rtl:ze,tab:bn,closable:bn.closable,editable:yt,active:an===ke,tabPosition:Nt,tabBarGutter:hr,renderWrapper:Cr,removeAriaLabel:xt==null?void 0:xt.removeAriaLabel,ref:zr(an),onClick:function(Oa){Sr(an,Oa)},onRemove:function(){gr(an)},onFocus:function(){Tn(an),ci(),ze||(_r.current.scrollLeft=0),_r.current.scrollTop=0}})}),fo=c(function(){var bn,an,ia,Oa,ki,di,zi,Ei,oa,Qi=((bn=_r.current)===null||bn===void 0?void 0:bn.offsetWidth)||0,ho=((an=_r.current)===null||an===void 0?void 0:an.offsetHeight)||0,po=((ia=Jr.current)===null||ia===void 0?void 0:ia.offsetWidth)||0,Aa=((Oa=Jr.current)===null||Oa===void 0?void 0:Oa.offsetHeight)||0,vn=((ki=Ir.current)===null||ki===void 0?void 0:ki.offsetWidth)||0,Ja=((di=Ir.current)===null||di===void 0?void 0:di.offsetHeight)||0;Wn(Qi),ri(ho),Wi(po),Ti(Aa);var fi=(((zi=Mr.current)===null||zi===void 0?void 0:zi.offsetWidth)||0)-po,hi=(((Ei=Mr.current)===null||Ei===void 0?void 0:Ei.offsetHeight)||0)-Aa;ta(fi),xn(hi);var mo=(oa=Ir.current)===null||oa===void 0?void 0:oa.className.includes(ii);Bn(fi-(mo?0:vn)),Ta(hi-(mo?0:Ja)),bi(function(){var Zi=new Map;return Oe.forEach(function(ko){var No=ko.key,Ai=zr(No).current;Ai&&Zi.set(No,{width:Ai.offsetWidth,height:Ai.offsetHeight,left:Ai.offsetLeft,top:Ai.offsetTop})}),Zi})}),qo=Oe.slice(0,Jo),Ca=Oe.slice(Qo+1),Jn=[].concat(Object(l.a)(qo),Object(l.a)(Ca)),va=Object(u.useState)(),Qn=Object(f.a)(va,2),Hi=Qn[0],es=Qn[1],Ya=Si.get(ke),Po=Object(u.useRef)();function Lo(){_.a.cancel(Po.current)}Object(u.useEffect)(function(){var bn={};return Ya&&(Er?(ze?bn.right=Ya.right:bn.left=Ya.left,bn.width=Ya.width):(bn.top=Ya.top,bn.height=Ya.height)),Lo(),Po.current=_()(function(){es(bn)}),Lo},[Ya,Er,ze]),Object(u.useEffect)(function(){Tn()},[ke,Ya,Si,Er]),Object(u.useEffect)(function(){fo()},[ze,hr,ke,Oe.map(function(bn){return bn.key}).join("_")]);var Mo=!!Jn.length,Oi="".concat(he,"-nav-wrap"),Yi,Ki,Io,Ji;return Er?ze?(Ki=or>0,Yi=or+cn<Rn):(Yi=or<0,Ki=-or+cn<Rn):(Io=En<0,Ji=-En+ti<Vn),u.createElement("div",{ref:Fe,role:"tablist",className:w()("".concat(he,"-nav"),ge),style:Le,onKeyDown:function(){ci()}},u.createElement(bt,{position:"left",extra:ot,prefixCls:he}),u.createElement(p.a,{onResize:fo},u.createElement("div",{className:w()(Oi,(He={},Object(L.a)(He,"".concat(Oi,"-ping-left"),Yi),Object(L.a)(He,"".concat(Oi,"-ping-right"),Ki),Object(L.a)(He,"".concat(Oi,"-ping-top"),Io),Object(L.a)(He,"".concat(Oi,"-ping-bottom"),Ji),He)),ref:_r},u.createElement(p.a,{onResize:fo},u.createElement("div",{ref:Mr,className:"".concat(he,"-nav-list"),style:{transform:"translate(".concat(or,"px, ").concat(En,"px)"),transition:rn?"none":void 0}},Zo,u.createElement(sn,{ref:Jr,prefixCls:he,locale:xt,editable:yt,style:{visibility:Mo?"hidden":null}}),u.createElement("div",{className:w()("".concat(he,"-ink-bar"),Object(L.a)({},"".concat(he,"-ink-bar-animated"),Ue.inkBar)),style:Hi}))))),u.createElement(mr,Object.assign({},Pe,{ref:Ir,prefixCls:he,tabs:Jn,className:!Mo&&ii})),u.createElement(bt,{position:"right",extra:ot,prefixCls:he}))}var jr=u.forwardRef(fr);function Hr(Pe){var Fe=Pe.id,He=Pe.activeKey,Me=Pe.animated,he=Pe.tabPosition,Oe=Pe.rtl,ge=Pe.destroyInactiveTabPane,Le=u.useContext(dr),Ne=Le.prefixCls,Ue=Le.tabs,ke=Me.tabPane,ze=Ue.findIndex(function(ot){return ot.key===He});return u.createElement("div",{className:w()("".concat(Ne,"-content-holder"))},u.createElement("div",{className:w()("".concat(Ne,"-content"),"".concat(Ne,"-content-").concat(he),Object(L.a)({},"".concat(Ne,"-content-animated"),ke)),style:ze&&ke?Object(L.a)({},Oe?"marginRight":"marginLeft","-".concat(ze,"00%")):null},Ue.map(function(ot){return u.cloneElement(ot.node,{key:ot.key,prefixCls:Ne,tabKey:ot.key,id:Fe,animated:ke,active:ot.key===He,destroyInactiveTabPane:ge})})))}function cr(Pe){var Fe=Pe.prefixCls,He=Pe.forceRender,Me=Pe.className,he=Pe.style,Oe=Pe.id,ge=Pe.active,Le=Pe.animated,Ne=Pe.destroyInactiveTabPane,Ue=Pe.tabKey,ke=Pe.children,ze=u.useState(He),ot=Object(f.a)(ze,2),yt=ot[0],xt=ot[1];u.useEffect(function(){ge?xt(!0):Ne&&xt(!1)},[ge,Ne]);var Nt={};return ge||(Le?(Nt.visibility="hidden",Nt.height=0,Nt.overflowY="hidden"):Nt.display="none"),u.createElement("div",{id:Oe&&"".concat(Oe,"-panel-").concat(Ue),role:"tabpanel",tabIndex:ge?0:-1,"aria-labelledby":Oe&&"".concat(Oe,"-tab-").concat(Ue),"aria-hidden":!ge,style:Object(D.a)(Object(D.a)({},Nt),he),className:w()("".concat(Fe,"-tabpane"),ge&&"".concat(Fe,"-tabpane-active"),Me)},(ge||yt||He)&&ke)}var Lr=0;function yr(Pe){return Object(d.a)(Pe).map(function(Fe){if(u.isValidElement(Fe)){var He=Fe.key!==void 0?String(Fe.key):void 0;return Object(D.a)(Object(D.a)({key:He},Fe.props),{},{node:Fe})}return null}).filter(function(Fe){return Fe})}function Xr(Pe,Fe){var He,Me=Pe.id,he=Pe.prefixCls,Oe=he===void 0?"rc-tabs":he,ge=Pe.className,Le=Pe.children,Ne=Pe.direction,Ue=Pe.activeKey,ke=Pe.defaultActiveKey,ze=Pe.editable,ot=Pe.animated,yt=Pe.tabPosition,xt=yt===void 0?"top":yt,Nt=Pe.tabBarGutter,hr=Pe.tabBarStyle,Cr=Pe.tabBarExtraContent,Sr=Pe.locale,Pr=Pe.moreIcon,_r=Pe.moreTransitionName,Mr=Pe.destroyInactiveTabPane,Ir=Pe.renderTabBar,Jr=Pe.onChange,Kr=Pe.onTabClick,gn=Pe.onTabScroll,zr=Object(C.a)(Pe,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),gr=yr(Le),Er=Ne==="rtl",Fr;ot===!1?Fr={inkBar:!1,tabPane:!1}:Fr=Object(D.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var $r=Object(u.useState)(!1),or=Object(f.a)($r,2),tn=or[0],An=or[1];Object(u.useEffect)(function(){An(Gt())},[]);var ln=Object(i.a)(function(){var hn;return(hn=gr[0])===null||hn===void 0?void 0:hn.key},{value:Ue,defaultValue:ke}),En=Object(f.a)(ln,2),un=En[0],jn=En[1],Xn=Object(u.useState)(function(){return gr.findIndex(function(hn){return hn.key===un})}),Rn=Object(f.a)(Xn,2),ta=Rn[0],Ia=Rn[1];Object(u.useEffect)(function(){var hn=gr.findIndex(function(Sa){return Sa.key===un});if(hn===-1){var Ta;hn=Math.max(0,Math.min(ta,gr.length-1)),jn((Ta=gr[hn])===null||Ta===void 0?void 0:Ta.key)}Ia(hn)},[gr.map(function(hn){return hn.key}).join("_"),un,ta]);var ca=Object(i.a)(null,{value:Me}),Vn=Object(f.a)(ca,2),xn=Vn[0],_n=Vn[1],Dn=xt;tn&&!["left","right"].includes(xt)&&(Dn="top"),Object(u.useEffect)(function(){Me||(_n("rc-tabs-".concat(Lr)),Lr+=1)},[]);function Cn(hn,Ta){Kr==null||Kr(hn,Ta),jn(hn),Jr==null||Jr(hn)}var Bn={id:xn,activeKey:un,animated:Fr,tabPosition:Dn,rtl:Er,mobile:tn},ma,Va=Object(D.a)(Object(D.a)({},Bn),{},{editable:ze,locale:Sr,moreIcon:Pr,moreTransitionName:_r,tabBarGutter:Nt,onTabClick:Cn,onTabScroll:gn,extra:Cr,style:hr,panes:Le});return Ir?ma=Ir(Va,jr):ma=u.createElement(jr,Object.assign({},Va)),u.createElement(dr.Provider,{value:{tabs:gr,prefixCls:Oe}},u.createElement("div",Object.assign({ref:Fe,id:Me,className:w()(Oe,"".concat(Oe,"-").concat(Dn),(He={},Object(L.a)(He,"".concat(Oe,"-mobile"),tn),Object(L.a)(He,"".concat(Oe,"-editable"),ze),Object(L.a)(He,"".concat(Oe,"-rtl"),Er),He),ge)},zr),ma,u.createElement(Hr,Object.assign({destroyInactiveTabPane:Mr},Bn,{animated:Fr}))))}var Tr=u.forwardRef(Xr);Tr.TabPane=cr;var Vr=Tr,In=J.b=Vr},kSUc:function(j,J,k){},lPiR:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(f){var C=L,D=C.lib,u=D.WordArray,h=D.Hasher,w=C.algo,d=[],i=[];(function(){function _(g){for(var b=f.sqrt(g),n=2;n<=b;n++)if(!(g%n))return!1;return!0}function p(g){return(g-(g|0))*4294967296|0}for(var c=2,m=0;m<64;)_(c)&&(m<8&&(d[m]=p(f.pow(c,1/2))),i[m]=p(f.pow(c,1/3)),m++),c++})();var l=[],a=w.SHA256=h.extend({_doReset:function(){this._hash=new u.init(d.slice(0))},_doProcessBlock:function(_,p){for(var c=this._hash.words,m=c[0],g=c[1],b=c[2],n=c[3],o=c[4],t=c[5],S=c[6],x=c[7],s=0;s<64;s++){if(s<16)l[s]=_[p+s]|0;else{var P=l[s-15],O=(P<<25|P>>>7)^(P<<14|P>>>18)^P>>>3,E=l[s-2],v=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10;l[s]=O+l[s-7]+v+l[s-16]}var y=o&t^~o&S,T=m&g^m&b^g&b,M=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),N=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),I=x+N+y+i[s]+l[s],G=M+T;x=S,S=t,t=o,o=n+I|0,n=b,b=g,g=m,m=I+G|0}c[0]=c[0]+m|0,c[1]=c[1]+g|0,c[2]=c[2]+b|0,c[3]=c[3]+n|0,c[4]=c[4]+o|0,c[5]=c[5]+t|0,c[6]=c[6]+S|0,c[7]=c[7]+x|0},_doFinalize:function(){var _=this._data,p=_.words,c=this._nDataBytes*8,m=_.sigBytes*8;return p[m>>>5]|=128<<24-m%32,p[(m+64>>>9<<4)+14]=f.floor(c/4294967296),p[(m+64>>>9<<4)+15]=c,_.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var _=h.clone.call(this);return _._hash=this._hash.clone(),_}});C.SHA256=h._createHelper(a),C.HmacSHA256=h._createHmacHelper(a)}(Math),L.SHA256})},lZu9:function(j,J,k){(function(L){L(k("VrN/"),k("1eCo"),k("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(f,C){var D=L.getMode(f,"text/html"),u=D.name=="null";function h(U){if(L.findModeByName){var B=L.findModeByName(U);B&&(U=B.mime||B.mimes[0])}var K=L.getMode(f,U);return K.name=="null"?null:K}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var w={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 d in w)w.hasOwnProperty(d)&&C.tokenTypeOverrides[d]&&(w[d]=C.tokenTypeOverrides[d]);var i=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,a=/^\[(x| )\](?=\s)/i,_=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,c=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,b=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,n=" ";function o(U,B,K){return B.f=B.inline=K,K(U,B)}function t(U,B,K){return B.f=B.block=K,K(U,B)}function S(U){return!U||!/\S/.test(U.string)}function x(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==P){var B=u;if(!B){var K=L.innerMode(D,U.htmlState);B=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}B&&(U.f=y,U.block=s,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function s(U,B){var K=U.column()===B.indentation,q=S(B.prevLine.stream),ae=B.indentedCode,se=B.prevLine.hr,we=B.list!==!1,Te=(B.listStack[B.listStack.length-1]||0)+3;B.indentedCode=!1;var de=B.indentation;if(B.indentationDiff===null&&(B.indentationDiff=B.indentation,we)){for(B.list=null;de<B.listStack[B.listStack.length-1];)B.listStack.pop(),B.listStack.length?B.indentation=B.listStack[B.listStack.length-1]:B.list=!1;B.list!==!1&&(B.indentationDiff=de-B.listStack[B.listStack.length-1])}var xe=!q&&!se&&!B.prevLine.header&&(!we||!ae)&&!B.prevLine.fencedCodeEnd,pe=(B.list===!1||se||q)&&B.indentation<=Te&&U.match(i),ne=null;if(B.indentationDiff>=4&&(ae||B.prevLine.fencedCodeEnd||B.prevLine.header||q))return U.skipToEnd(),B.indentedCode=!0,w.code;if(U.eatSpace())return null;if(K&&B.indentation<=Te&&(ne=U.match(_))&&ne[1].length<=6)return B.quote=0,B.header=ne[1].length,B.thisLine.header=!0,C.highlightFormatting&&(B.formatting="header"),B.f=B.inline,E(B);if(B.indentation<=Te&&U.eat(">"))return B.quote=K?1:B.quote+1,C.highlightFormatting&&(B.formatting="quote"),U.eatSpace(),E(B);if(!pe&&!B.setext&&K&&B.indentation<=Te&&(ne=U.match(l))){var ie=ne[1]?"ol":"ul";return B.indentation=de+U.current().length,B.list=!0,B.quote=0,B.listStack.push(B.indentation),B.em=!1,B.strong=!1,B.code=!1,B.strikethrough=!1,C.taskLists&&U.match(a,!1)&&(B.taskList=!0),B.f=B.inline,C.highlightFormatting&&(B.formatting=["list","list-"+ie]),E(B)}else{if(K&&B.indentation<=Te&&(ne=U.match(m,!0)))return B.quote=0,B.fencedEndRE=new RegExp(ne[1]+"+ *$"),B.localMode=C.fencedCodeBlockHighlighting&&h(ne[2]||C.fencedCodeBlockDefaultMode),B.localMode&&(B.localState=L.startState(B.localMode)),B.f=B.block=O,C.highlightFormatting&&(B.formatting="code-block"),B.code=-1,E(B);if(B.setext||(!xe||!we)&&!B.quote&&B.list===!1&&!B.code&&!pe&&!g.test(U.string)&&(ne=U.lookAhead(1))&&(ne=ne.match(p)))return B.setext?(B.header=B.setext,B.setext=0,U.skipToEnd(),C.highlightFormatting&&(B.formatting="header")):(B.header=ne[0].charAt(0)=="="?1:2,B.setext=B.header),B.thisLine.header=!0,B.f=B.inline,E(B);if(pe)return U.skipToEnd(),B.hr=!0,B.thisLine.hr=!0,w.hr;if(U.peek()==="[")return o(U,B,G)}return o(U,B,B.inline)}function P(U,B){var K=D.token(U,B.htmlState);if(!u){var q=L.innerMode(D,B.htmlState);(q.mode.name=="xml"&&q.state.tagStart===null&&!q.state.context&&q.state.tokenize.isInText||B.md_inside&&U.current().indexOf(">")>-1)&&(B.f=y,B.block=s,B.htmlState=null)}return K}function O(U,B){var K=B.listStack[B.listStack.length-1]||0,q=B.indentation<K,ae=K+3;if(B.fencedEndRE&&B.indentation<=ae&&(q||U.match(B.fencedEndRE))){C.highlightFormatting&&(B.formatting="code-block");var se;return q||(se=E(B)),B.localMode=B.localState=null,B.block=s,B.f=y,B.fencedEndRE=null,B.code=0,B.thisLine.fencedCodeEnd=!0,q?t(U,B,B.block):se}else return B.localMode?B.localMode.token(U,B.localState):(U.skipToEnd(),w.code)}function E(U){var B=[];if(U.formatting){B.push(w.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var K=0;K<U.formatting.length;K++)B.push(w.formatting+"-"+U.formatting[K]),U.formatting[K]==="header"&&B.push(w.formatting+"-"+U.formatting[K]+"-"+U.header),U.formatting[K]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?B.push(w.formatting+"-"+U.formatting[K]+"-"+U.quote):B.push("error"))}if(U.taskOpen)return B.push("meta"),B.length?B.join(" "):null;if(U.taskClosed)return B.push("property"),B.length?B.join(" "):null;if(U.linkHref?B.push(w.linkHref,"url"):(U.strong&&B.push(w.strong),U.em&&B.push(w.em),U.strikethrough&&B.push(w.strikethrough),U.emoji&&B.push(w.emoji),U.linkText&&B.push(w.linkText),U.code&&B.push(w.code),U.image&&B.push(w.image),U.imageAltText&&B.push(w.imageAltText,"link"),U.imageMarker&&B.push(w.imageMarker)),U.header&&B.push(w.header,w.header+"-"+U.header),U.quote&&(B.push(w.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=U.quote?B.push(w.quote+"-"+U.quote):B.push(w.quote+"-"+C.maxBlockquoteDepth)),U.list!==!1){var q=(U.listStack.length-1)%3;q?q===1?B.push(w.list2):B.push(w.list3):B.push(w.list1)}return U.trailingSpaceNewLine?B.push("trailing-space-new-line"):U.trailingSpace&&B.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),B.length?B.join(" "):null}function v(U,B){return U.match(c,!0)?E(B):void 0}function y(U,B){var K=B.text(U,B);if(typeof K!="undefined")return K;if(B.list)return B.list=null,E(B);if(B.taskList){var q=U.match(a,!0)[1]===" ";return q?B.taskOpen=!0:B.taskClosed=!0,C.highlightFormatting&&(B.formatting="task"),B.taskList=!1,E(B)}if(B.taskOpen=!1,B.taskClosed=!1,B.header&&U.match(/^#+$/,!0))return C.highlightFormatting&&(B.formatting="header"),E(B);var ae=U.next();if(B.linkTitle){B.linkTitle=!1;var se=ae;ae==="("&&(se=")"),se=(se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var we="^\\s*(?:[^"+se+"\\\\]+|\\\\\\\\|\\\\.)"+se;if(U.match(new RegExp(we),!0))return w.linkHref}if(ae==="`"){var Te=B.formatting;C.highlightFormatting&&(B.formatting="code"),U.eatWhile("`");var de=U.current().length;if(B.code==0&&(!B.quote||de==1))return B.code=de,E(B);if(de==B.code){var xe=E(B);return B.code=0,xe}else return B.formatting=Te,E(B)}else if(B.code)return E(B);if(ae==="\\"&&(U.next(),C.highlightFormatting)){var pe=E(B),ne=w.formatting+"-escape";return pe?pe+" "+ne:ne}if(ae==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return B.imageMarker=!0,B.image=!0,C.highlightFormatting&&(B.formatting="image"),E(B);if(ae==="["&&B.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return B.imageMarker=!1,B.imageAltText=!0,C.highlightFormatting&&(B.formatting="image"),E(B);if(ae==="]"&&B.imageAltText){C.highlightFormatting&&(B.formatting="image");var pe=E(B);return B.imageAltText=!1,B.image=!1,B.inline=B.f=M,pe}if(ae==="["&&!B.image)return B.linkText&&U.match(/^.*?\]/)||(B.linkText=!0,C.highlightFormatting&&(B.formatting="link")),E(B);if(ae==="]"&&B.linkText){C.highlightFormatting&&(B.formatting="link");var pe=E(B);return B.linkText=!1,B.inline=B.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?M:y,pe}if(ae==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=T,C.highlightFormatting&&(B.formatting="link");var pe=E(B);return pe?pe+=" ":pe="",pe+w.linkInline}if(ae==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){B.f=B.inline=T,C.highlightFormatting&&(B.formatting="link");var pe=E(B);return pe?pe+=" ":pe="",pe+w.linkEmail}if(C.xml&&ae==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ie=U.string.indexOf(">",U.pos);if(ie!=-1){var ee=U.string.substring(U.start,ie);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ee)&&(B.md_inside=!0)}return U.backUp(1),B.htmlState=L.startState(D),t(U,B,P)}if(C.xml&&ae==="<"&&U.match(/^\/\w*?>/))return B.md_inside=!1,"tag";if(ae==="*"||ae==="_"){for(var le=1,Q=U.pos==1?" ":U.string.charAt(U.pos-2);le<3&&U.eat(ae);)le++;var Z=U.peek()||" ",be=!/\s/.test(Z)&&(!b.test(Z)||/\s/.test(Q)||b.test(Q)),te=!/\s/.test(Q)&&(!b.test(Q)||/\s/.test(Z)||b.test(Z)),$=null,X=null;if(le%2&&(!B.em&&be&&(ae==="*"||!te||b.test(Q))?$=!0:B.em==ae&&te&&(ae==="*"||!be||b.test(Z))&&($=!1)),le>1&&(!B.strong&&be&&(ae==="*"||!te||b.test(Q))?X=!0:B.strong==ae&&te&&(ae==="*"||!be||b.test(Z))&&(X=!1)),X!=null||$!=null){C.highlightFormatting&&(B.formatting=$==null?"strong":X==null?"em":"strong em"),$===!0&&(B.em=ae),X===!0&&(B.strong=ae);var xe=E(B);return $===!1&&(B.em=!1),X===!1&&(B.strong=!1),xe}}else if(ae===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return E(B);U.backUp(1)}if(C.strikethrough){if(ae==="~"&&U.eatWhile(ae)){if(B.strikethrough){C.highlightFormatting&&(B.formatting="strikethrough");var xe=E(B);return B.strikethrough=!1,xe}else if(U.match(/^[^\s]/,!1))return B.strikethrough=!0,C.highlightFormatting&&(B.formatting="strikethrough"),E(B)}else if(ae===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return E(B);U.backUp(2)}}if(C.emoji&&ae===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){B.emoji=!0,C.highlightFormatting&&(B.formatting="emoji");var Y=E(B);return B.emoji=!1,Y}return ae===" "&&(U.match(/^ +$/,!1)?B.trailingSpace++:B.trailingSpace&&(B.trailingSpaceNewLine=!0)),E(B)}function T(U,B){var K=U.next();if(K===">"){B.f=B.inline=y,C.highlightFormatting&&(B.formatting="link");var q=E(B);return q?q+=" ":q="",q+w.linkInline}return U.match(/^[^>]+/,!0),w.linkInline}function M(U,B){if(U.eatSpace())return null;var K=U.next();return K==="("||K==="["?(B.f=B.inline=I(K==="("?")":"]"),C.highlightFormatting&&(B.formatting="link-string"),B.linkHref=!0,E(B)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(U){return function(B,K){var q=B.next();if(q===U){K.f=K.inline=y,C.highlightFormatting&&(K.formatting="link-string");var ae=E(K);return K.linkHref=!1,ae}return B.match(N[U]),K.linkHref=!0,E(K)}}function G(U,B){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(B.f=H,U.next(),C.highlightFormatting&&(B.formatting="link"),B.linkText=!0,E(B)):o(U,B,y)}function H(U,B){if(U.match(/^\]:/,!0)){B.f=B.inline=W,C.highlightFormatting&&(B.formatting="link");var K=E(B);return B.linkText=!1,K}return U.match(/^([^\]\\]|\\.)+/,!0),w.linkText}function W(U,B){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?B.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),B.f=B.inline=y,w.linkHref+" url")}var z={startState:function(){return{f:s,prevLine:{stream:null},thisLine:{stream:null},block:s,htmlState:null,indentation:0,inline:y,text:v,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&L.copyState(D,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?L.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,B){if(B.formatting=!1,U!=B.thisLine.stream){if(B.header=0,B.hr=!1,U.match(/^\s*$/,!0))return x(B),null;if(B.prevLine=B.thisLine,B.thisLine={stream:U},B.taskList=!1,B.trailingSpace=0,B.trailingSpaceNewLine=!1,!B.localState&&(B.f=B.block,B.f!=P)){var K=U.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(B.indentation=K,B.indentationDiff=null,K>0)return null}}return B.f(U,B)},innerMode:function(U){return U.block==P?{state:U.htmlState,mode:D}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:z}},indent:function(U,B,K){return U.block==P&&D.indent?D.indent(U.htmlState,B,K):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,B,K):L.Pass},blankLine:x,getType:E,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},mOS8:function(j,J,k){j.exports=k.p+"static/403Qrcode.6c17b6f4.png"},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(j){if(!0)module.exports=j();else var J})(function(){var define,module,exports;return function(){function j(J,k,L){function f(u,h){if(!k[u]){if(!J[u]){var w=typeof require=="function"&&require;if(!h&&w)return require(u,!0);if(C)return C(u,!0);var d=new Error("Cannot find module '"+u+"'");throw d.code="MODULE_NOT_FOUND",d}var i=k[u]={exports:{}};J[u][0].call(i.exports,function(l){var a=J[u][1][l];return f(a||l)},i,i.exports,j,J,k,L)}return k[u].exports}for(var C=typeof require=="function"&&require,D=0;D<L.length;D++)f(L[D]);return f}return j}()({1:[function(j,J,k){"use strict";var L=j("./browser/client");L.Buffer=j("buffer").Buffer,L.urllib=j("../shims/xhr"),L.version=j("./browser/version").version,J.exports=L},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(j,J,k){(function(L,f){"use strict";var C=j("babel-runtime/core-js/promise"),D=i(C),u=j("babel-runtime/regenerator"),h=i(u),w=j("babel-runtime/core-js/object/assign"),d=i(w);function i(G){return G&&G.__esModule?G:{default:G}}var l=j("debug")("ali-oss"),a=j("copy-to"),_=j("xml2js"),p=j("agentkeepalive"),c=j("merge-descriptors"),m=j("url"),g=j("is-type-of"),b=j("platform"),n=j("utility"),o=j("urllib"),t=j("./version"),S=j("bowser"),x=j("../common/signUtils"),s=j("../common/utils/isIP"),P=s.isIP,O=j("../common/client/initOptions"),E=j("../common/utils/createRequest"),v=E.createRequest,y=new p;function T(){var G=b.name,H=b.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&H.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&location.protocol==="https:"}function N(G,H){if(T(),!(this instanceof N))return new N(G,H);G&&G.inited?this.options=G:this.options=N.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=o,this.agent=this.options.agent||y),this.ctx=H,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}J.exports=N,N.initOptions=function(H){H.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var W=(0,d.default)({secure:M(),useFetch:!1},H);return O(W)};var I=N.prototype;I.debug=l,c(I,j("./object")),c(I,j("../common/bucket/getBucketWebsite")),c(I,j("../common/bucket/putBucketWebsite")),c(I,j("../common/bucket/deleteBucketWebsite")),c(I,j("../common/bucket/getBucketLifecycle")),c(I,j("../common/bucket/putBucketLifecycle")),c(I,j("../common/bucket/deleteBucketLifecycle")),c(I,j("../common/bucket/putBucketVersioning")),c(I,j("../common/bucket/getBucketVersioning")),c(I,j("./managed-upload")),c(I,j("../common/multipart")),c(I,j("../common/parallel")),I.signature=function(H){return this.debug("authorization stringToSign: %s",H,"info"),x.computeSignature(this.options.accessKeySecret,H)},I.authorization=function(H,W,z,U){var B=x.buildCanonicalString(H.toUpperCase(),W,{headers:U,parameters:z});return x.authorization(this.options.accessKeyId,this.options.accessKeySecret,B)},I.request=function(H){var W,z,U,B,K,q;return h.default.async(function(se){for(;;)switch(se.prev=se.next){case 0:return W=v.call(this,H),this.options.useFetch||(W.params.mode="disable-fetch"),z=void 0,U=void 0,B=!!H.stream,se.prev=5,se.next=8,h.default.awrap(this.urllib.request(W.url,W.params));case 8:z=se.sent,this.debug("response %s %s, got %s, headers: %j",H.method,W.url,z.status,z.headers,"info"),se.next=15;break;case 12:se.prev=12,se.t0=se.catch(5),U=se.t0;case 15:if(K=void 0,!(z&&H.successStatuses&&H.successStatuses.indexOf(z.status)===-1)){se.next=28;break}return se.next=19,h.default.awrap(this.requestError(z));case 19:if(K=se.sent,!(K.code==="RequestTimeTooSkewed"&&!B)){se.next=25;break}return this.options.amendTimeSkewed=+new Date(K.serverTime)-new Date,se.next=24,h.default.awrap(this.request(H));case 24:return se.abrupt("return",se.sent);case 25:K.params=H,se.next=32;break;case 28:if(!U){se.next=32;break}return se.next=31,h.default.awrap(this.requestError(U));case 31:K=se.sent;case 32:if(!K){se.next=34;break}throw K;case 34:if(!H.xmlResponse){se.next=39;break}return se.next=37,h.default.awrap(this.parseXML(z.data));case 37:q=se.sent,z.data=q;case 39:return se.abrupt("return",z);case 40:case"end":return se.stop()}},null,this,[[5,12]])},I._getResource=function(H){var W="/";return H.bucket&&(W+=H.bucket+"/"),H.object&&(W+=H.object),W},I._isIP=P,I._escape=function(H){return n.encodeURIComponent(H).replace(/%2F/g,"/")},I._getReqUrl=function(H){var W={};a(this.options.endpoint).to(W);var z=this._isIP(W.hostname),U=this.options.cname;H.bucket&&!U&&!z&&(W.host=H.bucket+"."+W.host);var B="/";H.bucket&&z&&(B+=H.bucket+"/"),H.object&&(B+=this._escape(H.object).replace(/\+/g,"%2B")),W.pathname=B;var K={};if(H.query&&c(K,H.query),H.subres){var q={};g.string(H.subres)?q[H.subres]="":g.array(H.subres)?H.subres.forEach(function(ae){q[ae]=""}):q=H.subres,c(K,q)}return W.query=K,m.format(W)},I._getUserAgent=function(){var H=f&&f.browser?"js":"nodejs",W="aliyun-sdk-"+H+"/"+t.version,z=b.description;return!z&&f&&(z="Node.js "+f.version.slice(1)+" on "+f.platform+" "+f.arch),this._checkUserAgent(W+" "+z)},I._checkUserAgent=function(H){var W=H.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return W},I.checkBrowserAndVersion=function(H,W){return S.name===H&&S.version.split(".")[0]===W},I.parseXML=function(H){return new D.default(function(W,z){L.isBuffer(H)&&(H=H.toString()),_.parseString(H,{explicitRoot:!1,explicitArray:!1},function(U,B){U?z(U):W(B)})})},I.requestError=function(H){var W,z,U,B;return h.default.async(function(q){for(;;)switch(q.prev=q.next){case 0:if(W=null,!(!H.data||!H.data.length)){q.next=5;break}H.status===-1||H.status===-2?(W=new Error(H.message),W.name=H.name,W.status=H.status,W.code=H.name):(H.status===404?(W=new Error("Object not exists"),W.name="NoSuchKeyError",W.status=404,W.code="NoSuchKey"):H.status===412?(W=new Error("Pre condition failed"),W.name="PreconditionFailedError",W.status=412,W.code="PreconditionFailed"):(W=new Error("Unknow error, status: "+H.status),W.name="UnknowError",W.status=H.status),W.requestId=H.headers["x-oss-request-id"],W.host=""),q.next=33;break;case 5:return z=String(H.data),this.debug("request response error data: %s",z,"error"),U=void 0,q.prev=8,q.next=11,h.default.awrap(this.parseXML(z));case 11:if(q.t0=q.sent,q.t0){q.next=14;break}q.t0={};case 14:U=q.t0,q.next=24;break;case 17:return q.prev=17,q.t1=q.catch(8),this.debug(z,"error"),q.t1.message+=`
raw xml: `+z,q.t1.status=H.status,q.t1.requestId=H.headers["x-oss-request-id"],q.abrupt("return",q.t1);case 24:B=U.Message||"unknow request error, status: "+H.status,U.Condition&&(B+=" (condition: "+U.Condition+")"),W=new Error(B),W.name=U.Code?U.Code+"Error":"UnknowError",W.status=H.status,W.code=U.Code,W.requestId=U.RequestId,W.hostId=U.HostId,W.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",W,"error"),q.abrupt("return",W);case 35:case"end":return q.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:j("../../node_modules/is-buffer/index.js")},j("_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(j,J,k){(function(L){"use strict";var f=j("babel-runtime/core-js/array/from"),C=d(f),D=j("babel-runtime/core-js/promise"),u=d(D),h=j("babel-runtime/regenerator"),w=d(h);function d(x){return x&&x.__esModule?x:{default:x}}var i=j("is-type-of"),l=j("util"),a=j("path"),_=j("mime"),p=j("copy-to"),c=j("../common/utils/isBlob"),m=c.isBlob,g=j("../common/utils/isFile"),b=g.isFile,n=k;n.multipartUpload=function(s,P,O){var E,v,y,T,M,N,I,G,H;return w.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){z.next=6;break}return z.next=5,w.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return z.abrupt("return",z.sent);case 6:return E=100*1024,O.mime||(b(P)?O.mime=_.getType(a.extname(P.name)):m(P)?O.mime=P.type:O.mime=_.getType(a.extname(P))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),z.next=12,w.default.awrap(this._getFileSize(P));case 12:if(v=z.sent,!(v<E)){z.next=25;break}return y=this._createStream(P,0,v),O.contentLength=v,z.next=18,w.default.awrap(this.putStream(s,y,O));case 18:if(T=z.sent,!(O&&O.progress)){z.next=22;break}return z.next=22,w.default.awrap(O.progress(1));case 22:return M={res:T.res,bucket:this.options.bucket,name:s,etag:T.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(M.data=T.data),z.abrupt("return",M);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<E)){z.next=29;break}throw new Error("partSize must not be smaller than "+E);case 29:return z.next=31,w.default.awrap(this.initMultipartUpload(s,O));case 31:if(N=z.sent,I=N.uploadId,G=this._getPartSize(v,O.partSize),H={file:P,name:s,fileSize:v,partSize:G,uploadId:I,doneParts:[]},!(O&&O.progress)){z.next=38;break}return z.next=38,w.default.awrap(O.progress(0,H,N.res));case 38:return z.next=40,w.default.awrap(this._resumeMultipart(H,O));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},n._resumeMultipart=function(s,P){var O,E,v,y,T,M,N,I,G,H,W,z,U,B,K,q,ae,se;return w.default.async(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(O=this,!this.isCancel()){Te.next=3;break}throw this._makeCancelEvent();case 3:return E=s.file,v=s.fileSize,y=s.partSize,T=s.uploadId,M=s.doneParts,N=s.name,I=[],M.length>0&&p(M).to(I),G=this._divideParts(v,y),H=G.length,W=!1,z=function(xe,pe){var ne=this;return new u.default(function(ee,le){var Q,Z,be,te;return w.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,xe.isCancel()){X.next=18;break}return Q=G[pe-1],Z={stream:xe._createStream(E,Q.start,Q.end),size:Q.end-Q.start},X.next=6,w.default.awrap(xe._uploadPart(N,T,pe,Z));case 6:if(be=X.sent,!(!xe.isCancel()&&!W)){X.next=15;break}if(s.doneParts.push({number:pe,etag:be.res.headers.etag}),!P.progress){X.next=12;break}return X.next=12,w.default.awrap(P.progress(M.length/H,s,be.res));case 12:ee({number:pe,etag:be.res.headers.etag}),X.next=16;break;case 15:ee();case 16:X.next=19;break;case 18:ee();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),te=new Error,te.name=X.t0.name,te.message=X.t0.message,te.stack=X.t0.stack,te.partNum=pe,p(X.t0).to(te),le(te);case 30:case"end":return X.stop()}},null,ne,[[0,21]])})},U=(0,C.default)(new Array(H),function(de,xe){return xe+1}),B=I.map(function(de){return de.number}),K=U.filter(function(de){return B.indexOf(de)<0}),q=5,ae=P.parallel||q,Te.next=17,w.default.awrap(this._parallel(K,ae,function(de){return new u.default(function(xe,pe){z(O,de).then(function(ne){ne&&I.push(ne),xe()}).catch(function(ne){pe(ne)})})}));case 17:if(se=Te.sent,W=!0,!this.isCancel()){Te.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(se&&se.length>0)){Te.next=25;break}throw se[0].message="Failed to upload some parts with error: "+se[0].toString()+" part_num: "+se[0].partNum,se[0];case 25:return Te.next=27,w.default.awrap(this.completeMultipartUpload(N,T,I,P));case 27:return Te.abrupt("return",Te.sent);case 28:case"end":return Te.stop()}},null,this)},n._getFileSize=function(s){return w.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!i.buffer(s)){O.next=4;break}return O.abrupt("return",s.length);case 4:if(!(m(s)||b(s))){O.next=6;break}return O.abrupt("return",s.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var o=j("stream"),t=o.Readable;function S(x,s){if(!(this instanceof S))return new S(x,s);t.call(this,s),this.file=x,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}l.inherits(S,t),S.prototype.readFileAndPush=function(s){if(this.fileBuffer)for(var P=!0;P&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,E=O+s;E=E>this.fileBuffer.length?this.fileBuffer.length:E,this.start=E,P=this.push(this.fileBuffer.slice(O,E))}},S.prototype._read=function(s){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 P=16*1024;s=s||P;var O=this;this.reader.onload=function(v){O.fileBuffer=L.from(new Uint8Array(v.target.result)),O.file=null,O.readFileAndPush(s)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(s)},n._createStream=function(s,P,O){if(m(s)||b(s))return new S(s.slice(P,O));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(s,P){var O=10*1e3,E=1024*1024;return P?Math.max(Math.ceil(s/O),P):E},n._divideParts=function(s,P){for(var O=Math.ceil(s/P),E=[],v=0;v<O;v++){var y=P*v,T=Math.min(y+P,s);E.push({start:y,end:T})}return E}}).call(this,j("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(j,J,k){"use strict";var L=j("babel-runtime/core-js/promise"),f=i(L),C=j("babel-runtime/core-js/object/keys"),D=i(C),u=j("babel-runtime/core-js/object/assign"),h=i(u),w=j("babel-runtime/regenerator"),d=i(w);function i(O){return O&&O.__esModule?O:{default:O}}var l=j("utility"),a=j("fs"),_=j("is-type-of"),p=j("url"),c=j("copy-to"),m=j("path"),g=j("mime"),b=j("../common/callback"),n=j("../common/signUtils"),o=j("merge-descriptors"),t=j("../common/utils/isBlob"),S=t.isBlob,x=j("../common/utils/isFile"),s=x.isFile,P=k;P.append=function(E,v,y){var T;return d.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return y=y||{},y.position===void 0&&(y.position="0"),y.subres={append:"",position:y.position},y.method="POST",N.next=6,d.default.awrap(this.put(E,v,y));case 6:return T=N.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],N.abrupt("return",T);case 9:case"end":return N.stop()}},null,this)},P.put=function(E,v,y){var T,M,N,I,G,H,W;return d.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,y=y||{},E=this._objectName(E),!_.buffer(v)){U.next=7;break}T=v,U.next=33;break;case 7:if(!(S(v)||s(v))){U.next=32;break}return y.mime||(s(v)?y.mime=g.getType(m.extname(v.name)):y.mime=v.type),M=this._createStream(v,0,v.size),U.next=12,d.default.awrap(this._getFileSize(v));case 12:return y.contentLength=U.sent,U.prev=13,U.next=16,d.default.awrap(this.putStream(E,M,y));case 16:return N=U.sent,U.abrupt("return",N);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,d.default.awrap(this.put(E,v,y));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return y.headers=y.headers||{},this._convertMetaToHeaders(y.meta,y.headers),I=y.method||"PUT",G=this._objectRequestParams(I,E,y),b.encodeCallback(G,y),G.mime=y.mime,G.content=T,G.successStatuses=[200],U.next=43,d.default.awrap(this.request(G));case 43:return H=U.sent,W={name:E,url:this._objectUrl(E),res:H.res},G.headers&&G.headers["x-oss-callback"]&&(W.data=JSON.parse(H.data.toString())),U.abrupt("return",W);case 47:case"end":return U.stop()}},null,this,[[13,20]])},P.putStream=function(E,v,y){var T,M,N,I;return d.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:return y=y||{},y.headers=y.headers||{},E=this._objectName(E),y.contentLength?y.headers["Content-Length"]=y.contentLength:y.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(y.meta,y.headers),T=y.method||"PUT",M=this._objectRequestParams(T,E,y),b.encodeCallback(M,y),M.mime=y.mime,M.stream=v,M.successStatuses=[200],H.next=13,d.default.awrap(this.request(M));case 13:return N=H.sent,I={name:E,url:this._objectUrl(E),res:N.res},M.headers&&M.headers["x-oss-callback"]&&(I.data=JSON.parse(N.data.toString())),H.abrupt("return",I);case 17:case"end":return H.stop()}},null,this)},o(P,j("../common/object/copyObject")),o(P,j("../common/object/getObjectTagging")),o(P,j("../common/object/putObjectTagging")),o(P,j("../common/object/deleteObjectTagging")),o(P,j("../common/image")),o(P,j("../common/object/getBucketVersions")),o(P,j("../common/object/getACL")),o(P,j("../common/object/putACL")),o(P,j("../common/object/head")),o(P,j("../common/object/delete")),o(P,j("../common/object/get")),o(P,j("../common/object/putSymlink")),o(P,j("../common/object/getSymlink")),o(P,j("../common/object/deleteMulti")),o(P,j("../common/object/getObjectMeta")),P.putMeta=function(E,v,y){var T;return d.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,d.default.awrap(this.copy(E,E,{meta:v||{},timeout:y&&y.timeout,ctx:y&&y.ctx}));case 2:return T=N.sent,N.abrupt("return",T);case 4:case"end":return N.stop()}},null,this)},P.list=function(E,v){var y,T,M,N,I;return d.default.async(function(H){for(;;)switch(H.prev=H.next){case 0:return y=this._objectRequestParams("GET","",v),y.query=E,y.xmlResponse=!0,y.successStatuses=[200],H.next=6,d.default.awrap(this.request(y));case 6:return T=H.sent,M=T.data.Contents,N=this,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(W){return{name:W.Key,url:N._objectUrl(W.Key),lastModified:W.LastModified,etag:W.ETag,type:W.Type,size:Number(W.Size),storageClass:W.StorageClass,owner:{id:W.Owner.ID,displayName:W.Owner.DisplayName}}})),I=T.data.CommonPrefixes||null,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(W){return W.Prefix})),H.abrupt("return",{res:T.res,objects:M,prefixes:I,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return H.stop()}},null,this)},P.restore=function(E,v){var y,T;return d.default.async(function(N){for(;;)switch(N.prev=N.next){case 0:return v=v||{},v.subres=(0,h.default)({restore:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),y=this._objectRequestParams("POST",E,v),y.successStatuses=[202],N.next=7,d.default.awrap(this.request(y));case 7:return T=N.sent,N.abrupt("return",{res:T.res});case 9:case"end":return N.stop()}},null,this)},P.signatureUrl=function(E,v){v=v||{},E=this._objectName(E),v.method=v.method||"GET";var y=l.timestamp()+(v.expires||1800),T={bucket:this.options.bucket,object:E},M=this._getResource(T);this.options.stsToken&&(v["security-token"]=this.options.stsToken);var N=n._signatureForURL(this.options.accessKeySecret,v,M,y),I=p.parse(this._getReqUrl(T));return I.query={OSSAccessKeyId:this.options.accessKeyId,Expires:y,Signature:N.Signature},c(N.subResource).to(I.query),I.format()},P.getObjectUrl=function(E,v){return v?v[v.length-1]!=="/"&&(v+="/"):v=this.options.endpoint.format(),v+this._escape(this._objectName(E))},P._objectUrl=function(E){return this._getReqUrl({bucket:this.options.bucket,object:E})},P.generateObjectUrl=function(O,E){if(E)E[E.length-1]!=="/"&&(E+="/");else{E=this.options.endpoint.format();var v=p.parse(E),y=this.options.bucket;v.hostname=y+"."+v.hostname,v.host=y+"."+v.host,E=v.format()}return E+this._escape(this._objectName(O))},P._objectRequestParams=function(E,v,y){if(!this.options.bucket)throw new Error("Please create a bucket first");y=y||{},v=this._objectName(v);var T={object:v,bucket:this.options.bucket,method:E,subres:y&&y.subres,timeout:y&&y.timeout,ctx:y&&y.ctx};return y.headers&&(T.headers={},c(y.headers).to(T.headers)),T},P._objectName=function(E){return E.replace(/^\/+/,"")},P._convertMetaToHeaders=function(E,v){if(!E)return;(0,D.default)(E).forEach(function(y){v["x-oss-meta-"+y]=E[y]})},P._deleteFileSafe=function(E){var v=this;return new f.default(function(y){a.exists(E,function(T){T?a.unlink(E,function(M){M&&v.debug("unlink %j error: %s",E,M,"error"),y()}):y()})})}},{"../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(j,J,k){"use strict";k.version="6.10.0"},{}],6:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=k;h.deleteBucketLifecycle=function(d,i){var l,a;return f.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return u(d),l=this._bucketRequestParams("DELETE",d,"lifecycle",i),l.successStatuses=[204],p.next=5,f.default.awrap(this.request(l));case 5:return a=p.sent,p.abrupt("return",{res:a.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=k;h.deleteBucketWebsite=function(d,i){var l,a;return f.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return u(d),l=this._bucketRequestParams("DELETE",d,"website",i),l.successStatuses=[204],p.next=5,f.default.awrap(this.request(l));case 5:return a=p.sent,p.abrupt("return",{res:a.res});case 7:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=j("../utils/isArray"),w=h.isArray,d=j("../utils/formatObjKey"),i=d.formatObjKey,l=k;l.getBucketLifecycle=function(_,p){var c,m,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return u(_),c=this._bucketRequestParams("GET",_,"lifecycle",p),c.successStatuses=[200],c.xmlResponse=!0,n.next=6,f.default.awrap(this.request(c));case 6:return m=n.sent,g=m.data.Rule||null,g&&(w(g)||(g=[g]),g=g.map(function(o){return o.ID&&(o.id=o.ID,delete o.ID),o.Tag&&!w(o.Tag)&&(o.Tag=[o.Tag]),i(o,"firstLowerCase")})),n.abrupt("return",{rules:g,res:m.res});case 10:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=k;h.getBucketVersioning=function(d,i){var l,a,_;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return u(d),l=this._bucketRequestParams("GET",d,"versioning",i),l.xmlResponse=!0,l.successStatuses=[200],c.next=6,f.default.awrap(this.request(l));case 6:return a=c.sent,_=a.data.Status,c.abrupt("return",{status:a.status,versionStatus:_,res:a.res});case 9:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(i){return i&&i.__esModule?i:{default:i}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=j("../utils/isObject"),w=h.isObject,d=k;d.getBucketWebsite=function(l,a){var _,p,c;return f.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return u(l),_=this._bucketRequestParams("GET",l,"website",a),_.successStatuses=[200],_.xmlResponse=!0,g.next=6,f.default.awrap(this.request(_));case 6:return p=g.sent,c=[],p.data.RoutingRules&&p.data.RoutingRules.RoutingRule&&(w(p.data.RoutingRules.RoutingRule)?c=[p.data.RoutingRules.RoutingRule]:c=p.data.RoutingRules.RoutingRule),g.abrupt("return",{index:p.data.IndexDocument&&p.data.IndexDocument.Suffix||"",supportSubDir:p.data.IndexDocument&&p.data.IndexDocument.SupportSubDir||"false",type:p.data.IndexDocument&&p.data.IndexDocument.Type,routingRules:c,error:p.data.ErrorDocument&&p.data.ErrorDocument.Key||null,res:p.res});case 10:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(s){return s&&s.__esModule?s:{default:s}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=j("../utils/isArray"),w=h.isArray,d=j("../utils/deepCopy"),i=d.deepCopy,l=j("../utils/isObject"),a=l.isObject,_=j("../utils/obj2xml"),p=_.obj2xml,c=j("../utils/checkObjectTag"),m=c.checkObjectTag,g=j("../utils/getStrBytesCount"),b=g.getStrBytesCount,n=k;n.putBucketLifecycle=function(P,O,E){var v,y,T,M,N;return f.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(u(P),w(O)){G.next=3;break}throw new Error("rules must be Array");case 3:return v=this._bucketRequestParams("PUT",P,"lifecycle",E),y=[],T={LifecycleConfiguration:{Rule:y}},O.forEach(function(H){o(H),x(H),H.id&&(H.ID=H.id,delete H.id),y.push(H)}),M=p(T,{headers:!0,firstUpperCase:!0}),v.content=M,v.mime="xml",v.successStatuses=[200],G.next=13,f.default.awrap(this.request(v));case 13:return N=G.sent,G.abrupt("return",{res:N.res});case 15:case"end":return G.stop()}},null,this)};function o(s){s.days&&(s.expiration={days:s.days}),s.date&&(s.expiration={createdBeforeDate:s.date})}function t(s,P){var O=s.days,E=s.createdBeforeDate;if(!O&&!E)throw new Error(P+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(E&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(E))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function S(s){if(!w(s)&&!a(s))throw new Error("tag must be Object or Array");s=a(s)?[s]:s;var P={},O=i(s);O.forEach(function(E){P[E.key]=E.value}),m(P)}function x(s){if(s.id&&b(s.id)>255)throw new Error("ID is composed of 255 bytes at most");if(s.prefix===""||s.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(s.status))throw new Error("Status must be Enabled or Disabled");if(s.transition){if(!["IA","Archive"].includes(s.transition.storageClass))throw new Error("StorageClass must be IA or Archive");t(s.transition,"Transition")}if(s.expiration){if(!s.expiration.expiredObjectDeleteMarker)t(s.expiration,"Expiration");else if(s.expiration.days||s.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(s.abortMultipartUpload&&t(s.abortMultipartUpload,"AbortMultipartUpload"),!s.expiration&&!s.abortMultipartUpload&&!s.transition&&!s.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(s.tag){if(s.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");S(s.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(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(i){return i&&i.__esModule?i:{default:i}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=j("../utils/obj2xml"),w=h.obj2xml,d=k;d.putBucketVersioning=function(l,a){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,c,m;return f.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(u(l),["Enabled","Suspended"].includes(a)){b.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",l,"versioning",_),c={VersioningConfiguration:{Status:a}},p.mime="xml",p.content=w(c,{headers:!0}),b.next=9,f.default.awrap(this.request(p));case 9:return m=b.sent,b.abrupt("return",{res:m.res,status:m.status});case 11:case"end":return b.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=j("../utils/obj2xml"),w=h.obj2xml,d=j("../utils/isArray"),i=d.isArray,l=k;l.putBucketWebsite=function(_){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],m,g,b,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:if(u(_),m=this._bucketRequestParams("PUT",_,"website",c),g={Suffix:p.index||"index.html"},b={IndexDocument:g},n={WebsiteConfiguration:b},p.supportSubDir&&(g.SupportSubDir=p.supportSubDir),p.type&&(g.Type=p.type),p.error&&(b.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){S.next=12;break}if(i(p.routingRules)){S.next=11;break}throw new Error("RoutingRules must be Array");case 11:b.RoutingRules={RoutingRule:p.routingRules};case 12:return n=w(n),m.content=n,m.mime="xml",m.successStatuses=[200],S.next=18,f.default.awrap(this.request(m));case 18:return o=S.sent,S.abrupt("return",{res:o.res});case 20:case"end":return S.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(j,J,k){(function(L){"use strict";var f=j("babel-runtime/core-js/object/keys"),C=h(f),D=j("babel-runtime/core-js/json/stringify"),u=h(D);function h(w){return w&&w.__esModule?w:{default:w}}k.encodeCallback=function(d,i){if(d.headers=d.headers||{},!Object.prototype.hasOwnProperty.call(d.headers,"x-oss-callback")&&i.callback){var l={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};i.callback.host&&(l.callbackHost=i.callback.host),i.callback.contentType&&(l.callbackBodyType=i.callback.contentType);var a=L.from((0,u.default)(l)).toString("base64");if(d.headers["x-oss-callback"]=a,i.callback.customValue){var _={};(0,C.default)(i.callback.customValue).forEach(function(p){_["x:"+p]=i.callback.customValue[p]}),d.headers["x-oss-callback-var"]=L.from((0,u.default)(_)).toString("base64")}}}}).call(this,j("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/assign"),f=C(L);function C(l){return l&&l.__esModule?l:{default:l}}var D=j("humanize-ms"),u=j("url"),h=j("../utils/checkBucketName"),w=h.checkBucketName;function d(l,a){var _=u.parse(l);if(_.protocol||(_=u.parse("http"+(a?"s":"")+"://"+l)),_.protocol!=="http:"&&_.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return _}function i(l,a,_){var p=_?"https://":"http://",c=a?"-internal.aliyuncs.com":".aliyuncs.com",m="vpc100-oss-cn-";return l.substr(0,m.length)===m&&(c=".aliyuncs.com"),u.parse(p+l+c)}J.exports=function(l){if(!l||!l.accessKeyId||!l.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");l.bucket&&w(l.bucket);var a=(0,f.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=D(a.timeout)),a.endpoint)a.endpoint=d(a.endpoint,a.secure);else if(a.region)a.endpoint=i(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(j,J,k){"use strict";var L=j("merge-descriptors"),f=k;L(f,j("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}var D=j("../utils/checkBucketName"),u=D.checkBucketName,h=j("querystring"),w=j("js-base64"),d=w.Base64.encode,i=k;i.processObjectSave=function(_,p,c,m){var g,b,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return l(_,"sourceObject"),l(p,"targetObject"),l(c,"process"),p=this._objectName(p),m&&u(m),g=this._objectRequestParams("POST",_,{subres:"x-oss-process"}),b=m?",b_"+d(m):"",p=d(p),n={"x-oss-process":c+"|sys/saveas,o_"+p+b},g.content=h.stringify(n),S.next=12,f.default.awrap(this.request(g));case 12:return o=S.sent,S.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return S.stop()}},null,this)};function l(a,_){if(!a)throw new Error(_+" is required");if(typeof a!="string")throw new Error(_+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=C(L);function C(i){return i&&i.__esModule?i:{default:i}}var D=j("copy-to"),u=j("./callback"),h=j("./utils/deepCopy"),w=h.deepCopy,d=k;d.listUploads=function(l,a){var _,p,c,m;return f.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return a=a||{},_={},D(a).to(_),_.subres="uploads",p=this._objectRequestParams("GET","",_),p.query=l,p.xmlResponse=!0,p.successStatuses=[200],b.next=10,f.default.awrap(this.request(p));case 10:return c=b.sent,m=c.data.Upload||[],Array.isArray(m)||(m=[m]),m=m.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),b.abrupt("return",{res:c.res,uploads:m,bucket:c.data.Bucket,nextKeyMarker:c.data.NextKeyMarker,nextUploadIdMarker:c.data.NextUploadIdMarker,isTruncated:c.data.IsTruncated==="true"});case 15:case"end":return b.stop()}},null,this)},d.listParts=function(l,a,_,p){var c,m,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=p||{},c={},D(p).to(c),c.subres={uploadId:a},m=this._objectRequestParams("GET",l,c),m.query=_,m.xmlResponse=!0,m.successStatuses=[200],n.next=10,f.default.awrap(this.request(m));case 10:return g=n.sent,n.abrupt("return",{res:g.res,uploadId:g.data.UploadId,bucket:g.data.Bucket,name:g.data.Key,partNumberMarker:g.data.PartNumberMarker,nextPartNumberMarker:g.data.NextPartNumberMarker,maxParts:g.data.MaxParts,isTruncated:g.data.IsTruncated,parts:g.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},d.abortMultipartUpload=function(l,a,_){var p,c,m;return f.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return this._stop(),_=_||{},p={},D(_).to(p),p.subres={uploadId:a},c=this._objectRequestParams("DELETE",l,p),c.successStatuses=[204],b.next=9,f.default.awrap(this.request(c));case 9:return m=b.sent,b.abrupt("return",{res:m.res});case 11:case"end":return b.stop()}},null,this)},d.initMultipartUpload=function(l,a){var _,p,c;return f.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a=a||{},_={},D(a).to(_),_.headers=_.headers||{},this._convertMetaToHeaders(a.meta,_.headers),_.subres="uploads",p=this._objectRequestParams("POST",l,_),p.mime=a.mime,p.xmlResponse=!0,p.successStatuses=[200],g.next=12,f.default.awrap(this.request(p));case 12:return c=g.sent,g.abrupt("return",{res:c.res,bucket:c.data.Bucket,name:c.data.Key,uploadId:c.data.UploadId});case 14:case"end":return g.stop()}},null,this)},d.uploadPart=function(l,a,_,p,c,m,g){var b;return f.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return b={stream:this._createStream(p,c,m),size:m-c},o.next=3,f.default.awrap(this._uploadPart(l,a,_,b,g));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},d.completeMultipartUpload=function(l,a,_,p){var c,m,g,b,n,o,t,S;return f.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:for(c=_.concat().sort(function(P,O){return P.number-O.number}).filter(function(P,O,E){return!O||P.number!==E[O-1].number}),m=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,g=0;g<c.length;g++)b=c[g],m+=`<Part>
`,m+="<PartNumber>"+b.number+`</PartNumber>
`,m+="<ETag>"+b.etag+`</ETag>
`,m+=`</Part>
`;return m+="</CompleteMultipartUpload>",p=p||{},n={},n=w(p),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:a},o=this._objectRequestParams("POST",l,n),u.encodeCallback(o,n),o.mime="xml",o.content=m,o.headers&&o.headers["x-oss-callback"]||(o.xmlResponse=!0),o.successStatuses=[200],s.next=17,f.default.awrap(this.request(o));case 17:return t=s.sent,S={res:t.res,bucket:o.bucket,name:l,etag:t.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(S.data=JSON.parse(t.data.toString())),s.abrupt("return",S);case 21:case"end":return s.stop()}},null,this)},d._uploadPart=function(l,a,_,p,c){var m,g,b;return f.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return c=c||{},m={},D(c).to(m),m.headers={"Content-Length":p.size},m.subres={partNumber:_,uploadId:a},g=this._objectRequestParams("PUT",l,m),g.mime=m.mime,g.stream=p.stream,g.successStatuses=[200],o.next=11,f.default.awrap(this.request(g));case 11:if(b=o.sent,b.res.headers.etag){o.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 p.stream=null,g.stream=null,o.abrupt("return",{name:l,etag:b.res.headers.etag,res:b.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/helpers/typeof"),h=w(u);function w(a){return a&&a.__esModule?a:{default:a}}var d=j("../utils/checkBucketName"),i=d.checkBucketName,l=k;l.copy=function(_,p,c,m){var g,b,n;return f.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return(typeof c=="undefined"?"undefined":(0,h.default)(c))==="object"&&(m=c),m=m||{},m.headers=m.headers||{},(0,D.default)(m.headers).forEach(function(S){m.headers["x-oss-copy-source-"+S.toLowerCase()]=m.headers[S]}),m.meta&&(m.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(m.meta,m.headers),p=this._getSourceName(p,c),m.versionId&&(p=p+"?versionId="+m.versionId),m.headers["x-oss-copy-source"]=p,g=this._objectRequestParams("PUT",_,m),g.xmlResponse=!0,g.successStatuses=[200,304],t.next=14,f.default.awrap(this.request(g));case 14:return b=t.sent,n=b.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),t.abrupt("return",{data:n,res:b.res});case 18:case"end":return t.stop()}},null,this)},l._getSourceName=function(_,p){return typeof p=="string"?_=this._objectName(_):_[0]!=="/"?p=this.options.bucket:(p=_.replace(/\/(.+?)(\/.*)/,"$1"),_=_.replace(/(\/.+?\/)(.*)/,"$2")),i(p),_=encodeURI(_),_="/"+p+"/"+_,_}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.delete=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return f.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i.subres=(0,D.default)({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),l=this._objectRequestParams("DELETE",d,i),l.successStatuses=[204],p.next=6,f.default.awrap(this.request(l));case 6:return a=p.sent,p.abrupt("return",{res:a.res});case 8:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(l){return l&&l.__esModule?l:{default:l}}var h=j("utility"),w=j("../utils/obj2xml"),d=w.obj2xml,i=k;i.deleteMulti=function(a){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,c,m,g,b,n,o,t,S,x,s,P;return f.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(p=[],!(!a||!a.length)){E.next=3;break}throw new Error("names is required");case 3:for(c=0;c<a.length;c++)m={},typeof a[c]=="string"?m.Key=h.escape(this._objectName(a[c])):(g=a[c],b=g.key,n=g.versionId,m.Key=h.escape(this._objectName(b)),m.VersionId=n),p.push(m);return o={Delete:{Quiet:!!_.quiet,Object:p}},t=d(o,{headers:!0}),_.subres=(0,D.default)({delete:""},_.subres),_.versionId&&(_.subres.versionId=_.versionId),S=this._objectRequestParams("POST","",_),S.mime="xml",S.content=t,S.xmlResponse=!0,S.successStatuses=[200],E.next=15,f.default.awrap(this.request(S));case 15:return x=E.sent,s=x.data,P=s&&s.Deleted||null,P&&(Array.isArray(P)||(P=[P])),E.abrupt("return",{res:x.res,deleted:P||[]});case 20:case"end":return E.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.deleteObjectTagging=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return f.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i.subres=(0,D.default)({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),d=this._objectName(d),l=this._objectRequestParams("DELETE",d,i),l.successStatuses=[204],p.next=7,f.default.awrap(this.request(l));case 7:return a=p.sent,p.abrupt("return",{status:a.status,res:a.res});case 9:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(i){return i&&i.__esModule?i:{default:i}}var h=j("fs"),w=j("is-type-of"),d=k;d.get=function(l,a){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,c,m,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=null,c=!1,w.writableStream(a)?p=a:w.string(a)?(p=h.createWriteStream(a),c=!0):_=a,_=_||{},_.subres=(0,D.default)({},_.subres),_.versionId&&(_.subres.versionId=_.versionId),_.process&&(_.subres["x-oss-process"]=_.process),m=void 0,n.prev=8,g=this._objectRequestParams("GET",l,_),g.writeStream=p,g.successStatuses=[200,206,304],n.next=14,f.default.awrap(this.request(g));case 14:m=n.sent,c&&p.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!c){n.next=24;break}return p.destroy(),n.next=24,f.default.awrap(this._deleteFileSafe(a));case 24:throw n.t0;case 25:return n.abrupt("return",{res:m.res,content:m.data});case 26:case"end":return n.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.getACL=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a;return f.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i.subres=(0,D.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,i),l.successStatuses=[200],l.xmlResponse=!0,p.next=8,f.default.awrap(this.request(l));case 8:return a=p.sent,p.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 p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=w(L),C=j("babel-runtime/regenerator"),D=w(C),u=j("babel-runtime/core-js/object/assign"),h=w(u);function w(g){return g&&g.__esModule?g:{default:g}}var d=k,i=j("../utils/isObject"),l=i.isObject,a=j("../utils/isArray"),_=a.isArray;d.getBucketVersions=p,d.listObjectVersions=p;function p(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,o,t,S,x,s;return D.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(g.versionIdMarker&&g.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return b.subres=(0,h.default)({versions:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),n=this._objectRequestParams("GET","",b),n.xmlResponse=!0,n.successStatuses=[200],n.query=m(g),O.next=10,D.default.awrap(this.request(n));case 10:return o=O.sent,t=o.data.Version||[],S=o.data.DeleteMarker||[],x=this,t&&(Array.isArray(t)||(t=[t]),t=t.map(function(E){return{name:E.Key,url:x._objectUrl(E.Key),lastModified:E.LastModified,isLatest:E.IsLatest==="true",versionId:E.VersionId,etag:E.ETag,type:E.Type,size:Number(E.Size),storageClass:E.StorageClass,owner:{id:E.Owner.ID,displayName:E.Owner.DisplayName}}})),S&&(_(S)||(S=[S]),S=S.map(function(E){return{name:E.Key,lastModified:E.LastModified,versionId:E.VersionId,owner:{id:E.Owner.ID,displayName:E.Owner.DisplayName}}})),s=o.data.CommonPrefixes||null,s&&(_(s)||(s=[s]),s=s.map(function(E){return E.Prefix})),O.abrupt("return",{res:o.res,objects:t,deleteMarker:S,prefixes:s,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function c(g){return g.replace(/([A-Z])/g,"-$1").toLowerCase()}function m(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},b={};return l(g)&&(0,f.default)(g).forEach(function(n){b[c(n)]=g[n]}),b}},{"../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(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.getObjectMeta=function(d,i){var l,a;return f.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return i=i||{},d=this._objectName(d),i.subres=(0,D.default)({objectMeta:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),l=this._objectRequestParams("HEAD",d,i),l.successStatuses=[200],p.next=8,f.default.awrap(this.request(l));case 8:return a=p.sent,p.abrupt("return",{status:a.status,res:a.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(i){return i&&i.__esModule?i:{default:i}}var h=k,w=j("../utils/isObject"),d=w.isObject;h.getObjectTagging=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_,p,c,m,g;return f.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return a.subres=(0,D.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),l=this._objectName(l),_=this._objectRequestParams("GET",l,a),_.successStatuses=[200],n.next=7,f.default.awrap(this.request(_));case 7:return p=n.sent,n.next=10,f.default.awrap(this.parseXML(p.data));case 10:return c=n.sent,m=c.TagSet.Tag,m=m&&d(m)?[m]:m||[],g={},m.forEach(function(o){g[o.Key]=o.Value}),n.abrupt("return",{status:p.status,res:p.res,tag:g});case 16:case"end":return n.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.getSymlink=function(d){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,a,_;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return i.subres=(0,D.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,i),l.successStatuses=[200],c.next=7,f.default.awrap(this.request(l));case 7:return a=c.sent,_=a.res.headers["x-oss-symlink-target"],c.abrupt("return",{targetName:decodeURIComponent(_),res:a.res});case 10:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/core-js/object/assign"),h=w(u);function w(i){return i&&i.__esModule?i:{default:i}}var d=k;d.head=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_,p,c;return f.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,h.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),_=this._objectRequestParams("HEAD",l,a),_.successStatuses=[200,304],g.next=6,f.default.awrap(this.request(_));case 6:return p=g.sent,c={meta:null,res:p.res,status:p.status},p.status===200&&(0,D.default)(p.headers).forEach(function(b){b.indexOf("x-oss-meta-")===0&&(c.meta||(c.meta={}),c.meta[b.substring(11)]=p.headers[b])}),g.abrupt("return",c);case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.putACL=function(d,i,l){var a,_;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l=l||{},l.subres=(0,D.default)({acl:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.headers=l.headers||{},l.headers["x-oss-object-acl"]=i,d=this._objectName(d),a=this._objectRequestParams("PUT",d,l),a.successStatuses=[200],c.next=10,f.default.awrap(this.request(a));case 10:return _=c.sent,c.abrupt("return",{res:_.res});case 12:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=w(L),C=j("babel-runtime/core-js/object/keys"),D=w(C),u=j("babel-runtime/core-js/object/assign"),h=w(u);function w(p){return p&&p.__esModule?p:{default:p}}var d=j("../utils/obj2xml"),i=d.obj2xml,l=j("../utils/checkObjectTag"),a=l.checkObjectTag,_=k;_.putObjectTagging=function(c,m){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:return a(m),g.subres=(0,h.default)({tagging:""},g.subres),g.versionId&&(g.subres.versionId=g.versionId),c=this._objectName(c),b=this._objectRequestParams("PUT",c,g),b.successStatuses=[200],m=(0,D.default)(m).map(function(x){return{Key:x,Value:m[x]}}),n={Tagging:{TagSet:{Tag:m}}},b.mime="xml",b.content=i(n),S.next=12,f.default.awrap(this.request(b));case 12:return o=S.sent,S.abrupt("return",{res:o.res,status:o.status});case 14:case"end":return S.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(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/object/assign"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h.putSymlink=function(d,i,l){var a,_;return f.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return l=l||{},l.headers=l.headers||{},i=this._escape(this._objectName(i)),this._convertMetaToHeaders(l.meta,l.headers),l.headers["x-oss-symlink-target"]=i,l.subres=(0,D.default)({symlink:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.storageClass&&(l.headers["x-oss-storage-class"]=l.storageClass),d=this._objectName(d),a=this._objectRequestParams("PUT",d,l),a.successStatuses=[200],c.next=13,f.default.awrap(this.request(a));case 13:return _=c.sent,c.abrupt("return",{res:_.res});case 15:case"end":return c.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(j,J,k){"use strict";var L=j("babel-runtime/regenerator"),f=u(L),C=j("babel-runtime/core-js/promise"),D=u(C);function u(w){return w&&w.__esModule?w:{default:w}}var h=k;h._parallelNode=function(d,i,l,a){var _,p,c,m,g,b,n,o;return f.default.async(function(S){for(;;)switch(S.prev=S.next){case 0:_=this,p=[],c=[],m=d.length/i,g=d.length%i,b=g===0?m:(d.length-g)/i+1,n=1,o=0;case 8:if(!(o<d.length)){S.next=26;break}if(!_.isCancel()){S.next=11;break}return S.abrupt("break",26);case 11:if(a?c.push(l(_,d[o],a)):c.push(l(_,d[o])),!(c.length===i||n===b&&o===d.length-1)){S.next=23;break}return S.prev=13,n+=1,S.next=17,f.default.awrap(D.default.all(c));case 17:S.next=22;break;case 19:S.prev=19,S.t0=S.catch(13),p.push(S.t0);case 22:c=[];case 23:o++,S.next=8;break;case 26:return S.abrupt("return",p);case 27:case"end":return S.stop()}},null,this,[[13,19]])},h._parallel=function(d,i,l){var a=this;return new D.default(function(_){var p=[];if(i<=0||!d){_(p);return}function c(s){return function(){if(s===null)throw new Error("Callback was already called.");var P=s;s=null;for(var O=arguments.length,E=Array(O),v=0;v<O;v++)E[v]=arguments[v];P.apply(this,E)}}function m(s){var P=-1,O=s.length;return function(){return++P<O&&!a.isCancel()?{value:s[P],key:P}:null}}var g=m(d),b=!1,n=0,o=!1;function t(s,P){n-=1,s?(b=!0,p.push(s),_(p)):P==={}||b&&n<=0?(b=!0,_(p)):o||(a.isCancel()?_(p):x())}function S(s,P){l(s).then(function(O){P(null,O)}).catch(function(O){P(O)})}function x(){for(o=!0;n<i&&!b&&!a.isCancel();){var s=g();if(s===null||p.length>0){b=!0,n<=0&&_(p);return}n+=1,S(s.value,c(t))}o=!1}x()})},h.cancel=function(d){this.options.cancelFlag=!0,d&&this.abortMultipartUpload(d.name,d.uploadId,d.options)},h.isCancel=function(){return this.options.cancelFlag},h.resetCancelFlag=function(){this.options.cancelFlag=!1},h._stop=function(){this.options.cancelFlag=!0},h._makeCancelEvent=function(){var d={status:0,name:"cancel"};return d}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(j,J,k){(function(L){"use strict";var f=j("babel-runtime/core-js/json/stringify"),C=h(f),D=j("babel-runtime/core-js/object/keys"),u=h(D);function h(i){return i&&i.__esModule?i:{default:i}}var w=j("./../../shims/crypto/crypto.js"),d=j("is-type-of");k.buildCanonicalizedResource=function(l,a){var _=""+l,p="?";if(d.string(a)&&a.trim()!=="")_+=p+a;else if(d.array(a))a.sort(),_+=p+a.join("&");else if(a){var c=function(b,n){return b[0]>n[0]?1:b[0]<n[0]?-1:0},m=function(b){_+=p+b,a[b]&&(_+="="+a[b]),p="&"};(0,u.default)(a).sort(c).forEach(m)}return _},k.buildCanonicalString=function(l,a,_,p){_=_||{};var c=_.headers||{},m="x-oss-",g=[],b={},n=[l.toUpperCase(),c["Content-Md5"]||"",c["Content-Type"]||c["Content-Type".toLowerCase()],p||c["x-oss-date"]];return(0,u.default)(c).forEach(function(o){var t=o.toLowerCase();t.indexOf(m)===0&&(b[t]=String(c[o]).trim())}),(0,u.default)(b).sort().forEach(function(o){g.push(o+":"+b[o])}),n=n.concat(g),n.push(this.buildCanonicalizedResource(a,_.parameters)),n.join(`
`)},k.computeSignature=function(l,a){var _=w.createHmac("sha1",l);return _.update(L.from(a,"utf8")).digest("base64")},k.authorization=function(l,a,_){return"OSS "+l+":"+this.computeSignature(a,_)},k._signatureForURL=function(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments[2],p=arguments[3],c={},m=a.subResource,g=m===void 0?{}:m;if(a.process){var b="x-oss-process";g[b]=a.process}if(a.trafficLimit){var n="x-oss-traffic-limit";g[n]=a.trafficLimit}if(a.response&&(0,u.default)(a.response).forEach(function(x){var s="response-"+x.toLowerCase();g[s]=a.response[x]}),(0,u.default)(a).forEach(function(x){var s=x.toLowerCase(),P=a[x];s.indexOf("x-oss-")===0?c[s]=P:(s.indexOf("content-md5")===0||s.indexOf("content-type")===0)&&(c[x]=P)}),Object.prototype.hasOwnProperty.call(a,"security-token")&&(g["security-token"]=a["security-token"]),Object.prototype.hasOwnProperty.call(a,"callback")){var o={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};if(a.callback.host&&(o.callbackHost=a.callback.host),a.callback.contentType&&(o.callbackBodyType=a.callback.contentType),g.callback=L.from((0,C.default)(o)).toString("base64"),a.callback.customValue){var t={};(0,u.default)(a.callback.customValue).forEach(function(x){t["x:"+x]=a.callback.customValue[x]}),g["callback-var"]=L.from((0,C.default)(t)).toString("base64")}}var S=this.buildCanonicalString(a.method,_,{headers:c,parameters:g},p.toString());return{Signature:this.computeSignature(l,S),subResource:g}}}).call(this,j("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(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkBucketName=void 0,k.checkBucketName=function(L,f){var C=f?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(L))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/entries"),f=C(L);function C(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(k,"__esModule",{value:!0}),k.checkObjectTag=void 0;var D=j("./checkValid"),u=D.checkValid,h=j("./isObject"),w=h.isObject,d=[{validator:function(_){if(typeof _!="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 (/)"}],i={key:[].concat(d,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(d,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function l(a){if(!w(a))throw new Error("tag must be Object");var _=(0,f.default)(a);if(_.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];_.forEach(function(c){c.forEach(function(m,g){u(m,i[p[g]])})})}k.checkObjectTag=l},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkValid=void 0;function L(f,C){C.forEach(function(D){if(D.validator)D.validator(f);else if(D.pattern&&!D.pattern.test(f))throw new Error(D.msg)})}k.checkValid=L},{}],38:[function(j,J,k){(function(L){"use strict";var f=j("babel-runtime/core-js/object/assign"),C=D(f);function D(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(k,"__esModule",{value:!0}),k.createRequest=void 0;var u=j("./../../../shims/crypto/crypto.js"),h=j("debug")("ali-oss"),w=j("mime"),d=j("dateformat"),i=j("copy-to"),l=j("path");function a(c,m){return c[m]||c[m.toLowerCase()]}function _(c,m){delete c[m],delete c[m.toLowerCase()]}function p(c){var m=new Date;this.options.amendTimeSkewed&&(m=+new Date+this.options.amendTimeSkewed);var g={"x-oss-date":d(m,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(g["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(g,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(g["x-oss-security-token"]=this.options.stsToken),i(c.headers).to(g),a(g,"Content-Type")||(c.mime&&c.mime.indexOf("/")>0?g["Content-Type"]=c.mime:g["Content-Type"]=w.getType(c.mime||l.extname(c.object||""))),a(g,"Content-Type")||_(g,"Content-Type"),c.content&&(g["Content-Md5"]=u.createHash("md5").update(L.from(c.content,"utf8")).digest("base64"),g["Content-Length"]||(g["Content-Length"]=c.content.length));var b=this._getResource(c);g.authorization=this.authorization(c.method,b,c.subres,g);var n=this._getReqUrl(c);h("request %s %s, with headers %j, !!stream: %s",c.method,n,g,!!c.stream);var o=c.timeout||this.options.timeout,t={method:c.method,content:c.content,stream:c.stream,headers:g,timeout:o,writeStream:c.writeStream,customResponse:c.customResponse,ctx:c.ctx||this.ctx};return this.agent&&(t.agent=this.agent),this.httpsAgent&&(t.httpsAgent=this.httpsAgent),{url:n,params:t}}k.createRequest=p}).call(this,j("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(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=u(L),C=j("babel-runtime/helpers/typeof"),D=u(C);function u(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(k,"__esModule",{value:!0}),k.deepCopy=void 0,k.deepCopy=function(h){if(h===null||(typeof h=="undefined"?"undefined":(0,D.default)(h))!=="object")return h;var w=Array.isArray(h)?[]:{};return(0,f.default)(h).forEach(function(d){w[d]=k.deepCopy(h[d])}),w}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=u(L),C=j("babel-runtime/helpers/typeof"),D=u(C);function u(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(k,"__esModule",{value:!0}),k.formatObjKey=void 0;function h(d,i){if(d===null||(typeof d=="undefined"?"undefined":(0,D.default)(d))!=="object")return d;var l=void 0;if(Array.isArray(d)){l=[];for(var a=0;a<d.length;a++)l.push(h(d[a],i))}else l={},(0,f.default)(d).forEach(function(_){l[w(_,i)]=h(d[_],i)});return l}k.formatObjKey=h;function w(d,i){return i==="firstUpperCase"?d=d.replace(/^./,function(l){return l.toUpperCase()}):i==="firstLowerCase"&&(d=d.replace(/^./,function(l){return l.toLowerCase()})),d}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.getStrBytesCount=void 0;function L(f){for(var C=0,D=0;D<f.length;D++){var u=f.charAt(D);/^[\u00-\uff]$/.test(u)?C+=1:C+=2}return C}k.getStrBytesCount=L},{}],42:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isArray=void 0,k.isArray=function(L){return Object.prototype.toString.call(L)==="[object Array]"}},{}],43:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isBlob=void 0;function L(f){return typeof Blob!="undefined"&&f instanceof Blob}k.isBlob=L},{}],44:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isFile=void 0,k.isFile=function(L){return typeof File!="undefined"&&L instanceof File}},{}],45:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isIP=void 0,k.isIP=function(L){var f=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,C=/^\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 f.test(L)||C.test(L)}},{}],46:[function(j,J,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isObject=void 0,k.isObject=function(L){return Object.prototype.toString.call(L)==="[object Object]"}},{}],47:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}Object.defineProperty(k,"__esModule",{value:!0}),k.obj2xml=void 0;var D=j("./formatObjKey");function u(w){return Object.prototype.toString.call(w).replace(/(.*? |])/g,"").toLowerCase()}function h(w,d){var i="";return d&&d.headers&&(i=`<?xml version="1.0" encoding="UTF-8"?>
`),d&&d.firstUpperCase&&(w=D.formatObjKey(w,"firstUpperCase")),u(w)==="object"?(0,f.default)(w).forEach(function(l){u(w[l])==="string"||u(w[l])==="number"?i+="<"+l+">"+w[l]+"</"+l+">":u(w[l])==="object"?i+="<"+l+">"+h(w[l])+"</"+l+">":u(w[l])==="array"?i+=w[l].map(function(a){return"<"+l+">"+h(a)+"</"+l+">"}).join(""):i+="<"+l+">"+w[l].toString()+"</"+l+">"}):i+=w.toString(),i}k.obj2xml=h},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(j,J,k){J.exports=L,J.exports.HttpsAgent=L;function L(){}},{}],49:[function(j,J,k){J.exports=j("./register")().Promise},{"./register":51}],50:[function(j,J,k){"use strict";var L="@@any-promise/REGISTRATION",f=null;J.exports=function(C,D){return function(h,w){h=h||null,w=w||{};var d=w.global!==!1;if(f===null&&d&&(f=C[L]||null),f!==null&&h!==null&&f.implementation!==h)throw new Error('any-promise already defined as "'+f.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return f===null&&(h!==null&&typeof w.Promise!="undefined"?f={Promise:w.Promise,implementation:h}:f=D(h),d&&(C[L]=f)),f}}},{}],51:[function(j,J,k){"use strict";J.exports=j("./loader")(window,L);function L(){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(j,J,k){J.exports={default:j("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(j,J,k){J.exports={default:j("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(j,J,k){J.exports={default:j("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(j,J,k){J.exports={default:j("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(j,J,k){J.exports={default:j("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(j,J,k){J.exports={default:j("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(j,J,k){J.exports={default:j("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(j,J,k){J.exports={default:j("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(j,J,k){J.exports={default:j("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(j,J,k){"use strict";k.__esModule=!0;var L=j("../core-js/symbol/iterator"),f=h(L),C=j("../core-js/symbol"),D=h(C),u=typeof D.default=="function"&&typeof f.default=="symbol"?function(w){return typeof w}:function(w){return w&&typeof D.default=="function"&&w.constructor===D.default&&w!==D.default.prototype?"symbol":typeof w};function h(w){return w&&w.__esModule?w:{default:w}}k.default=typeof D.default=="function"&&u(f.default)==="symbol"?function(w){return typeof w=="undefined"?"undefined":u(w)}:function(w){return w&&typeof D.default=="function"&&w.constructor===D.default&&w!==D.default.prototype?"symbol":typeof w=="undefined"?"undefined":u(w)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(j,J,k){J.exports=j("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(j,J,k){"use strict";k.byteLength=d,k.toByteArray=l,k.fromByteArray=p;for(var L=[],f=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,h=D.length;u<h;++u)L[u]=D[u],f[D.charCodeAt(u)]=u;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63;function w(c){var m=c.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=c.indexOf("=");g===-1&&(g=m);var b=g===m?0:4-g%4;return[g,b]}function d(c){var m=w(c),g=m[0],b=m[1];return(g+b)*3/4-b}function i(c,m,g){return(m+g)*3/4-g}function l(c){var m,g=w(c),b=g[0],n=g[1],o=new C(i(c,b,n)),t=0,S=n>0?b-4:b,x;for(x=0;x<S;x+=4)m=f[c.charCodeAt(x)]<<18|f[c.charCodeAt(x+1)]<<12|f[c.charCodeAt(x+2)]<<6|f[c.charCodeAt(x+3)],o[t++]=m>>16&255,o[t++]=m>>8&255,o[t++]=m&255;return n===2&&(m=f[c.charCodeAt(x)]<<2|f[c.charCodeAt(x+1)]>>4,o[t++]=m&255),n===1&&(m=f[c.charCodeAt(x)]<<10|f[c.charCodeAt(x+1)]<<4|f[c.charCodeAt(x+2)]>>2,o[t++]=m>>8&255,o[t++]=m&255),o}function a(c){return L[c>>18&63]+L[c>>12&63]+L[c>>6&63]+L[c&63]}function _(c,m,g){for(var b,n=[],o=m;o<g;o+=3)b=(c[o]<<16&16711680)+(c[o+1]<<8&65280)+(c[o+2]&255),n.push(a(b));return n.join("")}function p(c){for(var m,g=c.length,b=g%3,n=[],o=16383,t=0,S=g-b;t<S;t+=o)n.push(_(c,t,t+o>S?S:t+o));return b===1?(m=c[g-1],n.push(L[m>>2]+L[m<<4&63]+"==")):b===2&&(m=(c[g-2]<<8)+c[g-1],n.push(L[m>>10]+L[m>>4&63]+L[m<<2&63]+"=")),n.join("")}},{}],70:[function(j,J,k){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(L,f,C){typeof J!="undefined"&&J.exports?J.exports=C():typeof define=="function"&&define.amd?define(f,C):L[f]=C()}(this,"bowser",function(){var L=!0;function f(i){function l(z){var U=i.match(z);return U&&U.length>1&&U[1]||""}function a(z){var U=i.match(z);return U&&U.length>1&&U[2]||""}var _=l(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(i),c=!p&&/android/i.test(i),m=/nexus\s*[0-6]\s*/i.test(i),g=!m&&/nexus\s*[0-9]+/i.test(i),b=/CrOS/.test(i),n=/silk/i.test(i),o=/sailfish/i.test(i),t=/tizen/i.test(i),S=/(web|hpw)(o|0)s/i.test(i),x=/windows phone/i.test(i),s=/SamsungBrowser/i.test(i),P=!x&&/windows/i.test(i),O=!_&&!n&&/macintosh/i.test(i),E=!c&&!o&&!t&&!S&&/linux/i.test(i),v=a(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=l(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(i)&&!/tablet pc/i.test(i),M=!T&&/[^-]mobi/i.test(i),N=/xbox/i.test(i),I;/opera/i.test(i)?I={name:"Opera",opera:L,version:y||l(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(i)?I={name:"Opera",opera:L,version:l(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(i)?I={name:"Samsung Internet for Android",samsungBrowser:L,version:y||l(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(i)?I={name:"NAVER Whale browser",whale:L,version:l(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(i)?I={name:"MZ Browser",mzbrowser:L,version:l(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(i)?I={name:"Opera Coast",coast:L,version:y||l(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(i)?I={name:"Focus",focus:L,version:l(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(i)?I={name:"Yandex Browser",yandexbrowser:L,version:y||l(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(i)?I={name:"UC Browser",ucbrowser:L,version:l(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(i)?I={name:"Maxthon",maxthon:L,version:l(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(i)?I={name:"Epiphany",epiphany:L,version:l(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(i)?I={name:"Puffin",puffin:L,version:l(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(i)?I={name:"Sleipnir",sleipnir:L,version:l(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(i)?I={name:"K-Meleon",kMeleon:L,version:l(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(I={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},v?(I.msedge=L,I.version=v):(I.msie=L,I.version=l(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(i)?I={name:"Internet Explorer",msie:L,version:l(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:b?I={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(i)?I={name:"Microsoft Edge",msedge:L,version:v}:/vivaldi/i.test(i)?I={name:"Vivaldi",vivaldi:L,version:l(/vivaldi\/(\d+(\.\d+)?)/i)||y}:o?I={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:l(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(i)?I={name:"SeaMonkey",seamonkey:L,version:l(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(i)?(I={name:"Firefox",firefox:L,version:l(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(i)&&(I.firefoxos=L,I.osname="Firefox OS")):n?I={name:"Amazon Silk",silk:L,version:l(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(i)?I={name:"PhantomJS",phantom:L,version:l(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(i)?I={name:"SlimerJS",slimer:L,version:l(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(i)||/rim\stablet/i.test(i)?I={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:y||l(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:S?(I={name:"WebOS",osname:"WebOS",webos:L,version:y||l(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(i)&&(I.touchpad=L)):/bada/i.test(i)?I={name:"Bada",osname:"Bada",bada:L,version:l(/dolfin\/(\d+(\.\d+)?)/i)}:t?I={name:"Tizen",osname:"Tizen",tizen:L,version:l(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(i)?I={name:"QupZilla",qupzilla:L,version:l(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(i)?I={name:"Chromium",chromium:L,version:l(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(i)?I={name:"Chrome",chrome:L,version:l(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:c?I={name:"Android",version:y}:/safari|applewebkit/i.test(i)?(I={name:"Safari",safari:L},y&&(I.version=y)):_?(I={name:_=="iphone"?"iPhone":_=="ipad"?"iPad":"iPod"},y&&(I.version=y)):/googlebot/i.test(i)?I={name:"Googlebot",googlebot:L,version:l(/googlebot\/(\d+(\.\d+))/i)||y}:I={name:l(/^(.*)\/(.*) /),version:a(/^(.*)\/(.*) /)},!I.msedge&&/(apple)?webkit/i.test(i)?(/(apple)?webkit\/537\.36/i.test(i)?(I.name=I.name||"Blink",I.blink=L):(I.name=I.name||"Webkit",I.webkit=L),!I.version&&y&&(I.version=y)):!I.opera&&/gecko\//i.test(i)&&(I.name=I.name||"Gecko",I.gecko=L,I.version=I.version||l(/gecko\/(\d+(\.\d+)?)/i)),!I.windowsphone&&(c||I.silk)?(I.android=L,I.osname="Android"):!I.windowsphone&&_?(I[_]=L,I.ios=L,I.osname="iOS"):O?(I.mac=L,I.osname="macOS"):N?(I.xbox=L,I.osname="Xbox"):P?(I.windows=L,I.osname="Windows"):E&&(I.linux=L,I.osname="Linux");function G(z){switch(z){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 H="";I.windows?H=G(l(/Windows ((NT|XP)( \d\d?.\d)?)/i)):I.windowsphone?H=l(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):I.mac?(H=l(/Mac OS X (\d+([_\.\s]\d+)*)/i),H=H.replace(/[_\s]/g,".")):_?(H=l(/os (\d+([_\s]\d+)*) like mac os x/i),H=H.replace(/[_\s]/g,".")):c?H=l(/android[ \/-](\d+(\.\d+)*)/i):I.webos?H=l(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):I.blackberry?H=l(/rim\stablet\sos\s(\d+(\.\d+)*)/i):I.bada?H=l(/bada\/(\d+(\.\d+)*)/i):I.tizen&&(H=l(/tizen[\/\s](\d+(\.\d+)*)/i)),H&&(I.osversion=H);var W=!I.windows&&H.split(".")[0];return T||g||_=="ipad"||c&&(W==3||W>=4&&!M)||I.silk?I.tablet=L:(M||_=="iphone"||_=="ipod"||c||m||I.blackberry||I.webos||I.bada)&&(I.mobile=L),I.msedge||I.msie&&I.version>=10||I.yandexbrowser&&I.version>=15||I.vivaldi&&I.version>=1||I.chrome&&I.version>=20||I.samsungBrowser&&I.version>=4||I.whale&&h([I.version,"1.0"])===1||I.mzbrowser&&h([I.version,"6.0"])===1||I.focus&&h([I.version,"1.0"])===1||I.firefox&&I.version>=20||I.safari&&I.version>=6||I.opera&&I.version>=10||I.ios&&I.osversion&&I.osversion.split(".")[0]>=6||I.blackberry&&I.version>=10.1||I.chromium&&I.version>=20?I.a=L:I.msie&&I.version<10||I.chrome&&I.version<20||I.firefox&&I.version<20||I.safari&&I.version<6||I.opera&&I.version<10||I.ios&&I.osversion&&I.osversion.split(".")[0]<6||I.chromium&&I.version<20?I.c=L:I.x=L,I}var C=f(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(i){for(var l=0;l<i.length;++l){var a=i[l];if(typeof a=="string"&&a in C)return!0}return!1};function D(i){return i.split(".").length}function u(i,l){var a=[],_;if(Array.prototype.map)return Array.prototype.map.call(i,l);for(_=0;_<i.length;_++)a.push(l(i[_]));return a}function h(i){for(var l=Math.max(D(i[0]),D(i[1])),a=u(i,function(_){var p=l-D(_);return _=_+new Array(p+1).join(".0"),u(_.split("."),function(c){return new Array(20-c.length).join("0")+c}).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 w(i,l,a){var _=C;typeof l=="string"&&(a=l,l=void 0),l===void 0&&(l=!1),a&&(_=f(a));var p=""+_.version;for(var c in i)if(i.hasOwnProperty(c)&&_[c]){if(typeof i[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(i));return h([p,i[c]])<0}return l}function d(i,l,a){return!w(i,l,a)}return C.isUnsupportedBrowser=w,C.compareVersions=h,C.check=d,C._detect=f,C.detect=f,C})},{}],71:[function(j,J,k){},{}],72:[function(j,J,k){var L=j("buffer").Buffer,f=L.isEncoding||function(d){switch(d&&d.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 C(d){if(d&&!f(d))throw new Error("Unknown encoding: "+d)}var D=k.StringDecoder=function(d){this.encoding=(d||"utf8").toLowerCase().replace(/[-_]/,""),C(d);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=h;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=w;break;default:this.write=u;return}this.charBuffer=new L(6),this.charReceived=0,this.charLength=0};D.prototype.write=function(d){for(var i="";this.charLength;){var l=d.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:d.length;if(d.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";d=d.slice(l,d.length),i=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var _=i.charCodeAt(i.length-1);if(_>=55296&&_<=56319){this.charLength+=this.surrogateSize,i="";continue}if(this.charReceived=this.charLength=0,d.length===0)return i;break}this.detectIncompleteChar(d);var a=d.length;this.charLength&&(d.copy(this.charBuffer,0,d.length-this.charReceived,a),a-=this.charReceived),i+=d.toString(this.encoding,0,a);var a=i.length-1,_=i.charCodeAt(a);if(_>=55296&&_<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),d.copy(this.charBuffer,0,0,p),i.substring(0,a)}return i},D.prototype.detectIncompleteChar=function(d){for(var i=d.length>=3?3:d.length;i>0;i--){var l=d[d.length-i];if(i==1&&l>>5==6){this.charLength=2;break}if(i<=2&&l>>4==14){this.charLength=3;break}if(i<=3&&l>>3==30){this.charLength=4;break}}this.charReceived=i},D.prototype.end=function(d){var i="";if(d&&d.length&&(i=this.write(d)),this.charReceived){var l=this.charReceived,a=this.charBuffer,_=this.encoding;i+=a.slice(0,l).toString(_)}return i};function u(d){return d.toString(this.encoding)}function h(d){this.charReceived=d.length%2,this.charLength=this.charReceived?2:0}function w(d){this.charReceived=d.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(j,J,k){(function(L,f){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var C=j("base64-js"),D=j("ieee754"),u=j("isarray");k.Buffer=f,k.SlowBuffer=n,k.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:h(),k.kMaxLength=w();function h(){try{var te=new Uint8Array(1);return te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},te.foo()===42&&typeof te.subarray=="function"&&te.subarray(1,1).byteLength===0}catch($){return!1}}function w(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(te,$){if(w()<$)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(te=new Uint8Array($),te.__proto__=f.prototype):(te===null&&(te=new f($)),te.length=$),te}function f(te,$,X){if(!f.TYPED_ARRAY_SUPPORT&&!(this instanceof f))return new f(te,$,X);if(typeof te=="number"){if(typeof $=="string")throw new Error("If encoding is specified then the first argument must be a string");return _(this,te)}return i(this,te,$,X)}f.poolSize=8192,f._augment=function(te){return te.__proto__=f.prototype,te};function i(te,$,X,Y){if(typeof $=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&$ instanceof ArrayBuffer?m(te,$,X,Y):typeof $=="string"?p(te,$,X):g(te,$)}f.from=function(te,$,X){return i(null,te,$,X)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0}));function l(te){if(typeof te!="number")throw new TypeError('"size" argument must be a number');if(te<0)throw new RangeError('"size" argument must not be negative')}function a(te,$,X,Y){return l($),$<=0?d(te,$):X!==void 0?typeof Y=="string"?d(te,$).fill(X,Y):d(te,$).fill(X):d(te,$)}f.alloc=function(te,$,X){return a(null,te,$,X)};function _(te,$){if(l($),te=d(te,$<0?0:b($)|0),!f.TYPED_ARRAY_SUPPORT)for(var X=0;X<$;++X)te[X]=0;return te}f.allocUnsafe=function(te){return _(null,te)},f.allocUnsafeSlow=function(te){return _(null,te)};function p(te,$,X){if((typeof X!="string"||X==="")&&(X="utf8"),!f.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Y=o($,X)|0;te=d(te,Y);var ve=te.write($,X);return ve!==Y&&(te=te.slice(0,ve)),te}function c(te,$){var X=$.length<0?0:b($.length)|0;te=d(te,X);for(var Y=0;Y<X;Y+=1)te[Y]=$[Y]&255;return te}function m(te,$,X,Y){if($.byteLength,X<0||$.byteLength<X)throw new RangeError("'offset' is out of bounds");if($.byteLength<X+(Y||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Y===void 0?$=new Uint8Array($):Y===void 0?$=new Uint8Array($,X):$=new Uint8Array($,X,Y),f.TYPED_ARRAY_SUPPORT?(te=$,te.__proto__=f.prototype):te=c(te,$),te}function g(te,$){if(f.isBuffer($)){var X=b($.length)|0;return te=d(te,X),te.length===0||$.copy(te,0,0,X),te}if($){if(typeof ArrayBuffer!="undefined"&&$.buffer instanceof ArrayBuffer||"length"in $)return typeof $.length!="number"||be($.length)?d(te,0):c(te,$);if($.type==="Buffer"&&u($.data))return c(te,$.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(te){if(te>=w())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w().toString(16)+" bytes");return te|0}function n(te){return+te!=te&&(te=0),f.alloc(+te)}f.isBuffer=function($){return!!($!=null&&$._isBuffer)},f.compare=function($,X){if(!f.isBuffer($)||!f.isBuffer(X))throw new TypeError("Arguments must be Buffers");if($===X)return 0;for(var Y=$.length,ve=X.length,ue=0,Ee=Math.min(Y,ve);ue<Ee;++ue)if($[ue]!==X[ue]){Y=$[ue],ve=X[ue];break}return Y<ve?-1:ve<Y?1:0},f.isEncoding=function($){switch(String($).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}},f.concat=function($,X){if(!u($))throw new TypeError('"list" argument must be an Array of Buffers');if($.length===0)return f.alloc(0);var Y;if(X===void 0)for(X=0,Y=0;Y<$.length;++Y)X+=$[Y].length;var ve=f.allocUnsafe(X),ue=0;for(Y=0;Y<$.length;++Y){var Ee=$[Y];if(!f.isBuffer(Ee))throw new TypeError('"list" argument must be an Array of Buffers');Ee.copy(ve,ue),ue+=Ee.length}return ve};function o(te,$){if(f.isBuffer(te))return te.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(te)||te instanceof ArrayBuffer))return te.byteLength;typeof te!="string"&&(te=""+te);var X=te.length;if(X===0)return 0;for(var Y=!1;;)switch($){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return ie(te).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Q(te).length;default:if(Y)return ie(te).length;$=(""+$).toLowerCase(),Y=!0}}f.byteLength=o;function t(te,$,X){var Y=!1;if(($===void 0||$<0)&&($=0),$>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,$>>>=0,X<=$)return"";for(te||(te="utf8");;)switch(te){case"hex":return z(this,$,X);case"utf8":case"utf-8":return N(this,$,X);case"ascii":return H(this,$,X);case"latin1":case"binary":return W(this,$,X);case"base64":return M(this,$,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,$,X);default:if(Y)throw new TypeError("Unknown encoding: "+te);te=(te+"").toLowerCase(),Y=!0}}f.prototype._isBuffer=!0;function S(te,$,X){var Y=te[$];te[$]=te[X],te[X]=Y}f.prototype.swap16=function(){var $=this.length;if($%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<$;X+=2)S(this,X,X+1);return this},f.prototype.swap32=function(){var $=this.length;if($%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<$;X+=4)S(this,X,X+3),S(this,X+1,X+2);return this},f.prototype.swap64=function(){var $=this.length;if($%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<$;X+=8)S(this,X,X+7),S(this,X+1,X+6),S(this,X+2,X+5),S(this,X+3,X+4);return this},f.prototype.toString=function(){var $=this.length|0;return $===0?"":arguments.length===0?N(this,0,$):t.apply(this,arguments)},f.prototype.equals=function($){if(!f.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$?!0:f.compare(this,$)===0},f.prototype.inspect=function(){var $="",X=k.INSPECT_MAX_BYTES;return this.length>0&&($=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&($+=" ... ")),"<Buffer "+$+">"},f.prototype.compare=function($,X,Y,ve,ue){if(!f.isBuffer($))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Y===void 0&&(Y=$?$.length:0),ve===void 0&&(ve=0),ue===void 0&&(ue=this.length),X<0||Y>$.length||ve<0||ue>this.length)throw new RangeError("out of range index");if(ve>=ue&&X>=Y)return 0;if(ve>=ue)return-1;if(X>=Y)return 1;if(X>>>=0,Y>>>=0,ve>>>=0,ue>>>=0,this===$)return 0;for(var Ee=ue-ve,Ke=Y-X,Ye=Math.min(Ee,Ke),Je=this.slice(ve,ue),tt=$.slice(X,Y),at=0;at<Ye;++at)if(Je[at]!==tt[at]){Ee=Je[at],Ke=tt[at];break}return Ee<Ke?-1:Ke<Ee?1:0};function x(te,$,X,Y,ve){if(te.length===0)return-1;if(typeof X=="string"?(Y=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=ve?0:te.length-1),X<0&&(X=te.length+X),X>=te.length){if(ve)return-1;X=te.length-1}else if(X<0)if(ve)X=0;else return-1;if(typeof $=="string"&&($=f.from($,Y)),f.isBuffer($))return $.length===0?-1:s(te,$,X,Y,ve);if(typeof $=="number")return $=$&255,f.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(te,$,X):Uint8Array.prototype.lastIndexOf.call(te,$,X):s(te,[$],X,Y,ve);throw new TypeError("val must be string, number or Buffer")}function s(te,$,X,Y,ve){var ue=1,Ee=te.length,Ke=$.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(te.length<2||$.length<2)return-1;ue=2,Ee/=2,Ke/=2,X/=2}function Ye(je,Ce){return ue===1?je[Ce]:je.readUInt16BE(Ce*ue)}var Je;if(ve){var tt=-1;for(Je=X;Je<Ee;Je++)if(Ye(te,Je)===Ye($,tt===-1?0:Je-tt)){if(tt===-1&&(tt=Je),Je-tt+1===Ke)return tt*ue}else tt!==-1&&(Je-=Je-tt),tt=-1}else for(X+Ke>Ee&&(X=Ee-Ke),Je=X;Je>=0;Je--){for(var at=!0,lt=0;lt<Ke;lt++)if(Ye(te,Je+lt)!==Ye($,lt)){at=!1;break}if(at)return Je}return-1}f.prototype.includes=function($,X,Y){return this.indexOf($,X,Y)!==-1},f.prototype.indexOf=function($,X,Y){return x(this,$,X,Y,!0)},f.prototype.lastIndexOf=function($,X,Y){return x(this,$,X,Y,!1)};function P(te,$,X,Y){X=Number(X)||0;var ve=te.length-X;Y?(Y=Number(Y),Y>ve&&(Y=ve)):Y=ve;var ue=$.length;if(ue%2!==0)throw new TypeError("Invalid hex string");Y>ue/2&&(Y=ue/2);for(var Ee=0;Ee<Y;++Ee){var Ke=parseInt($.substr(Ee*2,2),16);if(isNaN(Ke))return Ee;te[X+Ee]=Ke}return Ee}function O(te,$,X,Y){return Z(ie($,te.length-X),te,X,Y)}function E(te,$,X,Y){return Z(ee($),te,X,Y)}function v(te,$,X,Y){return E(te,$,X,Y)}function y(te,$,X,Y){return Z(Q($),te,X,Y)}function T(te,$,X,Y){return Z(le($,te.length-X),te,X,Y)}f.prototype.write=function($,X,Y,ve){if(X===void 0)ve="utf8",Y=this.length,X=0;else if(Y===void 0&&typeof X=="string")ve=X,Y=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Y)?(Y=Y|0,ve===void 0&&(ve="utf8")):(ve=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-X;if((Y===void 0||Y>ue)&&(Y=ue),$.length>0&&(Y<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");for(var Ee=!1;;)switch(ve){case"hex":return P(this,$,X,Y);case"utf8":case"utf-8":return O(this,$,X,Y);case"ascii":return E(this,$,X,Y);case"latin1":case"binary":return v(this,$,X,Y);case"base64":return y(this,$,X,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,$,X,Y);default:if(Ee)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),Ee=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(te,$,X){return $===0&&X===te.length?C.fromByteArray(te):C.fromByteArray(te.slice($,X))}function N(te,$,X){X=Math.min(te.length,X);for(var Y=[],ve=$;ve<X;){var ue=te[ve],Ee=null,Ke=ue>239?4:ue>223?3:ue>191?2:1;if(ve+Ke<=X){var Ye,Je,tt,at;switch(Ke){case 1:ue<128&&(Ee=ue);break;case 2:Ye=te[ve+1],(Ye&192)===128&&(at=(ue&31)<<6|Ye&63,at>127&&(Ee=at));break;case 3:Ye=te[ve+1],Je=te[ve+2],(Ye&192)===128&&(Je&192)===128&&(at=(ue&15)<<12|(Ye&63)<<6|Je&63,at>2047&&(at<55296||at>57343)&&(Ee=at));break;case 4:Ye=te[ve+1],Je=te[ve+2],tt=te[ve+3],(Ye&192)===128&&(Je&192)===128&&(tt&192)===128&&(at=(ue&15)<<18|(Ye&63)<<12|(Je&63)<<6|tt&63,at>65535&&at<1114112&&(Ee=at))}}Ee===null?(Ee=65533,Ke=1):Ee>65535&&(Ee-=65536,Y.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),Y.push(Ee),ve+=Ke}return G(Y)}var I=4096;function G(te){var $=te.length;if($<=I)return String.fromCharCode.apply(String,te);for(var X="",Y=0;Y<$;)X+=String.fromCharCode.apply(String,te.slice(Y,Y+=I));return X}function H(te,$,X){var Y="";X=Math.min(te.length,X);for(var ve=$;ve<X;++ve)Y+=String.fromCharCode(te[ve]&127);return Y}function W(te,$,X){var Y="";X=Math.min(te.length,X);for(var ve=$;ve<X;++ve)Y+=String.fromCharCode(te[ve]);return Y}function z(te,$,X){var Y=te.length;(!$||$<0)&&($=0),(!X||X<0||X>Y)&&(X=Y);for(var ve="",ue=$;ue<X;++ue)ve+=ne(te[ue]);return ve}function U(te,$,X){for(var Y=te.slice($,X),ve="",ue=0;ue<Y.length;ue+=2)ve+=String.fromCharCode(Y[ue]+Y[ue+1]*256);return ve}f.prototype.slice=function($,X){var Y=this.length;$=~~$,X=X===void 0?Y:~~X,$<0?($+=Y,$<0&&($=0)):$>Y&&($=Y),X<0?(X+=Y,X<0&&(X=0)):X>Y&&(X=Y),X<$&&(X=$);var ve;if(f.TYPED_ARRAY_SUPPORT)ve=this.subarray($,X),ve.__proto__=f.prototype;else{var ue=X-$;ve=new f(ue,void 0);for(var Ee=0;Ee<ue;++Ee)ve[Ee]=this[Ee+$]}return ve};function B(te,$,X){if(te%1!==0||te<0)throw new RangeError("offset is not uint");if(te+$>X)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUIntLE=function($,X,Y){$=$|0,X=X|0,Y||B($,X,this.length);for(var ve=this[$],ue=1,Ee=0;++Ee<X&&(ue*=256);)ve+=this[$+Ee]*ue;return ve},f.prototype.readUIntBE=function($,X,Y){$=$|0,X=X|0,Y||B($,X,this.length);for(var ve=this[$+--X],ue=1;X>0&&(ue*=256);)ve+=this[$+--X]*ue;return ve},f.prototype.readUInt8=function($,X){return X||B($,1,this.length),this[$]},f.prototype.readUInt16LE=function($,X){return X||B($,2,this.length),this[$]|this[$+1]<<8},f.prototype.readUInt16BE=function($,X){return X||B($,2,this.length),this[$]<<8|this[$+1]},f.prototype.readUInt32LE=function($,X){return X||B($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216},f.prototype.readUInt32BE=function($,X){return X||B($,4,this.length),this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])},f.prototype.readIntLE=function($,X,Y){$=$|0,X=X|0,Y||B($,X,this.length);for(var ve=this[$],ue=1,Ee=0;++Ee<X&&(ue*=256);)ve+=this[$+Ee]*ue;return ue*=128,ve>=ue&&(ve-=Math.pow(2,8*X)),ve},f.prototype.readIntBE=function($,X,Y){$=$|0,X=X|0,Y||B($,X,this.length);for(var ve=X,ue=1,Ee=this[$+--ve];ve>0&&(ue*=256);)Ee+=this[$+--ve]*ue;return ue*=128,Ee>=ue&&(Ee-=Math.pow(2,8*X)),Ee},f.prototype.readInt8=function($,X){return X||B($,1,this.length),this[$]&128?(255-this[$]+1)*-1:this[$]},f.prototype.readInt16LE=function($,X){X||B($,2,this.length);var Y=this[$]|this[$+1]<<8;return Y&32768?Y|4294901760:Y},f.prototype.readInt16BE=function($,X){X||B($,2,this.length);var Y=this[$+1]|this[$]<<8;return Y&32768?Y|4294901760:Y},f.prototype.readInt32LE=function($,X){return X||B($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},f.prototype.readInt32BE=function($,X){return X||B($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},f.prototype.readFloatLE=function($,X){return X||B($,4,this.length),D.read(this,$,!0,23,4)},f.prototype.readFloatBE=function($,X){return X||B($,4,this.length),D.read(this,$,!1,23,4)},f.prototype.readDoubleLE=function($,X){return X||B($,8,this.length),D.read(this,$,!0,52,8)},f.prototype.readDoubleBE=function($,X){return X||B($,8,this.length),D.read(this,$,!1,52,8)};function K(te,$,X,Y,ve,ue){if(!f.isBuffer(te))throw new TypeError('"buffer" argument must be a Buffer instance');if($>ve||$<ue)throw new RangeError('"value" argument is out of bounds');if(X+Y>te.length)throw new RangeError("Index out of range")}f.prototype.writeUIntLE=function($,X,Y,ve){if($=+$,X=X|0,Y=Y|0,!ve){var ue=Math.pow(2,8*Y)-1;K(this,$,X,Y,ue,0)}var Ee=1,Ke=0;for(this[X]=$&255;++Ke<Y&&(Ee*=256);)this[X+Ke]=$/Ee&255;return X+Y},f.prototype.writeUIntBE=function($,X,Y,ve){if($=+$,X=X|0,Y=Y|0,!ve){var ue=Math.pow(2,8*Y)-1;K(this,$,X,Y,ue,0)}var Ee=Y-1,Ke=1;for(this[X+Ee]=$&255;--Ee>=0&&(Ke*=256);)this[X+Ee]=$/Ke&255;return X+Y},f.prototype.writeUInt8=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,1,255,0),f.TYPED_ARRAY_SUPPORT||($=Math.floor($)),this[X]=$&255,X+1};function q(te,$,X,Y){$<0&&($=65535+$+1);for(var ve=0,ue=Math.min(te.length-X,2);ve<ue;++ve)te[X+ve]=($&255<<8*(Y?ve:1-ve))>>>(Y?ve:1-ve)*8}f.prototype.writeUInt16LE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[X]=$&255,this[X+1]=$>>>8):q(this,$,X,!0),X+2},f.prototype.writeUInt16BE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[X]=$>>>8,this[X+1]=$&255):q(this,$,X,!1),X+2};function ae(te,$,X,Y){$<0&&($=4294967295+$+1);for(var ve=0,ue=Math.min(te.length-X,4);ve<ue;++ve)te[X+ve]=$>>>(Y?ve:3-ve)*8&255}f.prototype.writeUInt32LE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[X+3]=$>>>24,this[X+2]=$>>>16,this[X+1]=$>>>8,this[X]=$&255):ae(this,$,X,!0),X+4},f.prototype.writeUInt32BE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[X]=$>>>24,this[X+1]=$>>>16,this[X+2]=$>>>8,this[X+3]=$&255):ae(this,$,X,!1),X+4},f.prototype.writeIntLE=function($,X,Y,ve){if($=+$,X=X|0,!ve){var ue=Math.pow(2,8*Y-1);K(this,$,X,Y,ue-1,-ue)}var Ee=0,Ke=1,Ye=0;for(this[X]=$&255;++Ee<Y&&(Ke*=256);)$<0&&Ye===0&&this[X+Ee-1]!==0&&(Ye=1),this[X+Ee]=($/Ke>>0)-Ye&255;return X+Y},f.prototype.writeIntBE=function($,X,Y,ve){if($=+$,X=X|0,!ve){var ue=Math.pow(2,8*Y-1);K(this,$,X,Y,ue-1,-ue)}var Ee=Y-1,Ke=1,Ye=0;for(this[X+Ee]=$&255;--Ee>=0&&(Ke*=256);)$<0&&Ye===0&&this[X+Ee+1]!==0&&(Ye=1),this[X+Ee]=($/Ke>>0)-Ye&255;return X+Y},f.prototype.writeInt8=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,1,127,-128),f.TYPED_ARRAY_SUPPORT||($=Math.floor($)),$<0&&($=255+$+1),this[X]=$&255,X+1},f.prototype.writeInt16LE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[X]=$&255,this[X+1]=$>>>8):q(this,$,X,!0),X+2},f.prototype.writeInt16BE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[X]=$>>>8,this[X+1]=$&255):q(this,$,X,!1),X+2},f.prototype.writeInt32LE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[X]=$&255,this[X+1]=$>>>8,this[X+2]=$>>>16,this[X+3]=$>>>24):ae(this,$,X,!0),X+4},f.prototype.writeInt32BE=function($,X,Y){return $=+$,X=X|0,Y||K(this,$,X,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),f.TYPED_ARRAY_SUPPORT?(this[X]=$>>>24,this[X+1]=$>>>16,this[X+2]=$>>>8,this[X+3]=$&255):ae(this,$,X,!1),X+4};function se(te,$,X,Y,ve,ue){if(X+Y>te.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function we(te,$,X,Y,ve){return ve||se(te,$,X,4,34028234663852886e22,-34028234663852886e22),D.write(te,$,X,Y,23,4),X+4}f.prototype.writeFloatLE=function($,X,Y){return we(this,$,X,!0,Y)},f.prototype.writeFloatBE=function($,X,Y){return we(this,$,X,!1,Y)};function Te(te,$,X,Y,ve){return ve||se(te,$,X,8,17976931348623157e292,-17976931348623157e292),D.write(te,$,X,Y,52,8),X+8}f.prototype.writeDoubleLE=function($,X,Y){return Te(this,$,X,!0,Y)},f.prototype.writeDoubleBE=function($,X,Y){return Te(this,$,X,!1,Y)},f.prototype.copy=function($,X,Y,ve){if(Y||(Y=0),!ve&&ve!==0&&(ve=this.length),X>=$.length&&(X=$.length),X||(X=0),ve>0&&ve<Y&&(ve=Y),ve===Y)return 0;if($.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(Y<0||Y>=this.length)throw new RangeError("sourceStart out of bounds");if(ve<0)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),$.length-X<ve-Y&&(ve=$.length-X+Y);var ue=ve-Y,Ee;if(this===$&&Y<X&&X<ve)for(Ee=ue-1;Ee>=0;--Ee)$[Ee+X]=this[Ee+Y];else if(ue<1e3||!f.TYPED_ARRAY_SUPPORT)for(Ee=0;Ee<ue;++Ee)$[Ee+X]=this[Ee+Y];else Uint8Array.prototype.set.call($,this.subarray(Y,Y+ue),X);return ue},f.prototype.fill=function($,X,Y,ve){if(typeof $=="string"){if(typeof X=="string"?(ve=X,X=0,Y=this.length):typeof Y=="string"&&(ve=Y,Y=this.length),$.length===1){var ue=$.charCodeAt(0);ue<256&&($=ue)}if(ve!==void 0&&typeof ve!="string")throw new TypeError("encoding must be a string");if(typeof ve=="string"&&!f.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve)}else typeof $=="number"&&($=$&255);if(X<0||this.length<X||this.length<Y)throw new RangeError("Out of range index");if(Y<=X)return this;X=X>>>0,Y=Y===void 0?this.length:Y>>>0,$||($=0);var Ee;if(typeof $=="number")for(Ee=X;Ee<Y;++Ee)this[Ee]=$;else{var Ke=f.isBuffer($)?$:ie(new f($,ve).toString()),Ye=Ke.length;for(Ee=0;Ee<Y-X;++Ee)this[Ee+X]=Ke[Ee%Ye]}return this};var de=/[^+\/0-9A-Za-z-_]/g;function xe(te){if(te=pe(te).replace(de,""),te.length<2)return"";for(;te.length%4!==0;)te=te+"=";return te}function pe(te){return te.trim?te.trim():te.replace(/^\s+|\s+$/g,"")}function ne(te){return te<16?"0"+te.toString(16):te.toString(16)}function ie(te,$){$=$||Infinity;for(var X,Y=te.length,ve=null,ue=[],Ee=0;Ee<Y;++Ee){if(X=te.charCodeAt(Ee),X>55295&&X<57344){if(!ve){if(X>56319){($-=3)>-1&&ue.push(239,191,189);continue}else if(Ee+1===Y){($-=3)>-1&&ue.push(239,191,189);continue}ve=X;continue}if(X<56320){($-=3)>-1&&ue.push(239,191,189),ve=X;continue}X=(ve-55296<<10|X-56320)+65536}else ve&&(($-=3)>-1&&ue.push(239,191,189));if(ve=null,X<128){if(($-=1)<0)break;ue.push(X)}else if(X<2048){if(($-=2)<0)break;ue.push(X>>6|192,X&63|128)}else if(X<65536){if(($-=3)<0)break;ue.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if(($-=4)<0)break;ue.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ue}function ee(te){for(var $=[],X=0;X<te.length;++X)$.push(te.charCodeAt(X)&255);return $}function le(te,$){for(var X,Y,ve,ue=[],Ee=0;Ee<te.length&&!(($-=2)<0);++Ee)X=te.charCodeAt(Ee),Y=X>>8,ve=X%256,ue.push(ve),ue.push(Y);return ue}function Q(te){return C.toByteArray(xe(te))}function Z(te,$,X,Y){for(var ve=0;ve<Y&&!(ve+X>=$.length||ve>=te.length);++ve)$[ve+X]=te[ve];return ve}function be(te){return te!==te}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(j,J,k){J.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(j,J,k){J.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(j,J,k){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var L=Array.prototype.slice;J.exports=f;function f(D,u){if(!(this instanceof f))return new f(D,u);this.src=D,this._withAccess=u}f.prototype.withAccess=function(D){return this._withAccess=D!==!1,this},f.prototype.pick=function(D){return Array.isArray(D)||(D=L.call(arguments)),D.length&&(this.keys=D),this},f.prototype.to=function(D){if(D=D||{},!this.src)return D;var u=this.keys||Object.keys(this.src);if(!this._withAccess){for(var h=0;h<u.length;h++){if(w=u[h],D[w]!==void 0)continue;D[w]=this.src[w]}return D}for(var h=0;h<u.length;h++){var w=u[h];if(!C(D,w))continue;var d=this.src.__lookupGetter__(w),i=this.src.__lookupSetter__(w);d&&D.__defineGetter__(w,d),i&&D.__defineSetter__(w,i),!d&&!i&&(D[w]=this.src[w])}return D},f.prototype.toCover=function(D){for(var u=this.keys||Object.keys(this.src),h=0;h<u.length;h++){var w=u[h];delete D[w];var d=this.src.__lookupGetter__(w),i=this.src.__lookupSetter__(w);d&&D.__defineGetter__(w,d),i&&D.__defineSetter__(w,i),!d&&!i&&(D[w]=this.src[w])}},f.prototype.override=f.prototype.toCover,f.prototype.and=function(D){var u={};return this.to(u),this.src=D,this.to(u),this.src=u,this};function C(D,u){return D[u]===void 0&&D.__lookupGetter__(u)===void 0&&D.__lookupSetter__(u)===void 0}},{}],77:[function(j,J,k){j("../../modules/es6.string.iterator"),j("../../modules/es6.array.from"),J.exports=j("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(j,J,k){var L=j("../../modules/_core"),f=L.JSON||(L.JSON={stringify:JSON.stringify});J.exports=function(D){return f.stringify.apply(f,arguments)}},{"../../modules/_core":99}],79:[function(j,J,k){j("../../modules/es6.object.assign"),J.exports=j("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(j,J,k){j("../../modules/es6.object.create");var L=j("../../modules/_core").Object;J.exports=function(C,D){return L.create(C,D)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(j,J,k){j("../../modules/es6.object.define-property");var L=j("../../modules/_core").Object;J.exports=function(C,D,u){return L.defineProperty(C,D,u)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(j,J,k){j("../../modules/es7.object.entries"),J.exports=j("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(j,J,k){j("../../modules/es6.object.get-own-property-names");var L=j("../../modules/_core").Object;J.exports=function(C){return L.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(j,J,k){j("../../modules/es6.object.get-prototype-of"),J.exports=j("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(j,J,k){j("../../modules/es6.object.keys"),J.exports=j("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(j,J,k){j("../modules/es6.object.to-string"),j("../modules/es6.string.iterator"),j("../modules/web.dom.iterable"),j("../modules/es6.promise"),j("../modules/es7.promise.finally"),j("../modules/es7.promise.try"),J.exports=j("../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(j,J,k){j("../modules/web.immediate"),J.exports=j("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(j,J,k){j("../../modules/es6.string.from-code-point"),J.exports=j("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(j,J,k){j("../../modules/es6.function.has-instance"),J.exports=j("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(j,J,k){j("../../modules/es6.symbol"),j("../../modules/es6.object.to-string"),j("../../modules/es7.symbol.async-iterator"),j("../../modules/es7.symbol.observable"),J.exports=j("../../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(j,J,k){j("../../modules/es6.string.iterator"),j("../../modules/web.dom.iterable"),J.exports=j("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(j,J,k){J.exports=function(L){if(typeof L!="function")throw TypeError(L+" is not a function!");return L}},{}],93:[function(j,J,k){J.exports=function(){}},{}],94:[function(j,J,k){J.exports=function(L,f,C,D){if(!(L instanceof f)||D!==void 0&&D in L)throw TypeError(C+": incorrect invocation!");return L}},{}],95:[function(j,J,k){var L=j("./_is-object");J.exports=function(f){if(!L(f))throw TypeError(f+" is not an object!");return f}},{"./_is-object":119}],96:[function(j,J,k){var L=j("./_to-iobject"),f=j("./_to-length"),C=j("./_to-absolute-index");J.exports=function(D){return function(u,h,w){var d=L(u),i=f(d.length),l=C(w,i),a;if(D&&h!=h){for(;i>l;)if(a=d[l++],a!=a)return!0}else for(;i>l;l++)if((D||l in d)&&d[l]===h)return D||l||0;return!D&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(j,J,k){var L=j("./_cof"),f=j("./_wks")("toStringTag"),C=L(function(){return arguments}())=="Arguments",D=function(u,h){try{return u[h]}catch(w){}};J.exports=function(u){var h,w,d;return u===void 0?"Undefined":u===null?"Null":typeof(w=D(h=Object(u),f))=="string"?w:C?L(h):(d=L(h))=="Object"&&typeof h.callee=="function"?"Arguments":d}},{"./_cof":98,"./_wks":166}],98:[function(j,J,k){var L={}.toString;J.exports=function(f){return L.call(f).slice(8,-1)}},{}],99:[function(j,J,k){var L=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(j,J,k){"use strict";var L=j("./_object-dp"),f=j("./_property-desc");J.exports=function(C,D,u){D in C?L.f(C,D,f(0,u)):C[D]=u}},{"./_object-dp":132,"./_property-desc":146}],101:[function(j,J,k){var L=j("./_a-function");J.exports=function(f,C,D){if(L(f),C===void 0)return f;switch(D){case 1:return function(u){return f.call(C,u)};case 2:return function(u,h){return f.call(C,u,h)};case 3:return function(u,h,w){return f.call(C,u,h,w)}}return function(){return f.apply(C,arguments)}}},{"./_a-function":92}],102:[function(j,J,k){J.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(j,J,k){J.exports=!j("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(j,J,k){var L=j("./_is-object"),f=j("./_global").document,C=L(f)&&L(f.createElement);J.exports=function(D){return C?f.createElement(D):{}}},{"./_global":110,"./_is-object":119}],105:[function(j,J,k){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(j,J,k){var L=j("./_object-keys"),f=j("./_object-gops"),C=j("./_object-pie");J.exports=function(D){var u=L(D),h=f.f;if(h)for(var w=h(D),d=C.f,i=0,l;w.length>i;)d.call(D,l=w[i++])&&u.push(l);return u}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(j,J,k){var L=j("./_global"),f=j("./_core"),C=j("./_ctx"),D=j("./_hide"),u=j("./_has"),h="prototype",w=function(d,i,l){var a=d&w.F,_=d&w.G,p=d&w.S,c=d&w.P,m=d&w.B,g=d&w.W,b=_?f:f[i]||(f[i]={}),n=b[h],o=_?L:p?L[i]:(L[i]||{})[h],t,S,x;_&&(l=i);for(t in l){if(S=!a&&o&&o[t]!==void 0,S&&u(b,t))continue;x=S?o[t]:l[t],b[t]=_&&typeof o[t]!="function"?l[t]:m&&S?C(x,L):g&&o[t]==x?function(s){var P=function(O,E,v){if(this instanceof s){switch(arguments.length){case 0:return new s;case 1:return new s(O);case 2:return new s(O,E)}return new s(O,E,v)}return s.apply(this,arguments)};return P[h]=s[h],P}(x):c&&typeof x=="function"?C(Function.call,x):x,c&&((b.virtual||(b.virtual={}))[t]=x,d&w.R&&n&&!n[t]&&D(n,t,x))}};w.F=1,w.G=2,w.S=4,w.P=8,w.B=16,w.W=32,w.U=64,w.R=128,J.exports=w},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(j,J,k){J.exports=function(L){try{return!!L()}catch(f){return!0}}},{}],109:[function(j,J,k){var L=j("./_ctx"),f=j("./_iter-call"),C=j("./_is-array-iter"),D=j("./_an-object"),u=j("./_to-length"),h=j("./core.get-iterator-method"),w={},d={},k=J.exports=function(i,l,a,_,p){var c=p?function(){return i}:h(i),m=L(a,_,l?2:1),g=0,b,n,o,t;if(typeof c!="function")throw TypeError(i+" is not iterable!");if(C(c)){for(b=u(i.length);b>g;g++)if(t=l?m(D(n=i[g])[0],n[1]):m(i[g]),t===w||t===d)return t}else for(o=c.call(i);!(n=o.next()).done;)if(t=f(o,m,n.value,l),t===w||t===d)return t};k.BREAK=w,k.RETURN=d},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(j,J,k){var L=J.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=L)},{}],111:[function(j,J,k){var L={}.hasOwnProperty;J.exports=function(f,C){return L.call(f,C)}},{}],112:[function(j,J,k){var L=j("./_object-dp"),f=j("./_property-desc");J.exports=j("./_descriptors")?function(C,D,u){return L.f(C,D,f(1,u))}:function(C,D,u){return C[D]=u,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(j,J,k){var L=j("./_global").document;J.exports=L&&L.documentElement},{"./_global":110}],114:[function(j,J,k){J.exports=!j("./_descriptors")&&!j("./_fails")(function(){return Object.defineProperty(j("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(j,J,k){J.exports=function(L,f,C){var D=C===void 0;switch(f.length){case 0:return D?L():L.call(C);case 1:return D?L(f[0]):L.call(C,f[0]);case 2:return D?L(f[0],f[1]):L.call(C,f[0],f[1]);case 3:return D?L(f[0],f[1],f[2]):L.call(C,f[0],f[1],f[2]);case 4:return D?L(f[0],f[1],f[2],f[3]):L.call(C,f[0],f[1],f[2],f[3])}return L.apply(C,f)}},{}],116:[function(j,J,k){var L=j("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(f){return L(f)=="String"?f.split(""):Object(f)}},{"./_cof":98}],117:[function(j,J,k){var L=j("./_iterators"),f=j("./_wks")("iterator"),C=Array.prototype;J.exports=function(D){return D!==void 0&&(L.Array===D||C[f]===D)}},{"./_iterators":125,"./_wks":166}],118:[function(j,J,k){var L=j("./_cof");J.exports=Array.isArray||function(C){return L(C)=="Array"}},{"./_cof":98}],119:[function(j,J,k){J.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(j,J,k){var L=j("./_an-object");J.exports=function(f,C,D,u){try{return u?C(L(D)[0],D[1]):C(D)}catch(w){var h=f.return;throw h!==void 0&&L(h.call(f)),w}}},{"./_an-object":95}],121:[function(j,J,k){"use strict";var L=j("./_object-create"),f=j("./_property-desc"),C=j("./_set-to-string-tag"),D={};j("./_hide")(D,j("./_wks")("iterator"),function(){return this}),J.exports=function(u,h,w){u.prototype=L(D,{next:f(1,w)}),C(u,h+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(j,J,k){"use strict";var L=j("./_library"),f=j("./_export"),C=j("./_redefine"),D=j("./_hide"),u=j("./_iterators"),h=j("./_iter-create"),w=j("./_set-to-string-tag"),d=j("./_object-gpo"),i=j("./_wks")("iterator"),l=!([].keys&&"next"in[].keys()),a="@@iterator",_="keys",p="values",c=function(){return this};J.exports=function(m,g,b,n,o,t,S){h(b,g,n);var x=function(H){if(!l&&H in E)return E[H];switch(H){case _:return function(){return new b(this,H)};case p:return function(){return new b(this,H)}}return function(){return new b(this,H)}},s=g+" Iterator",P=o==p,O=!1,E=m.prototype,v=E[i]||E[a]||o&&E[o],y=v||x(o),T=o?P?x("entries"):y:void 0,M=g=="Array"&&E.entries||v,N,I,G;if(M&&(G=d(M.call(new m)),G!==Object.prototype&&G.next&&(w(G,s,!0),!L&&typeof G[i]!="function"&&D(G,i,c))),P&&v&&v.name!==p&&(O=!0,y=function(){return v.call(this)}),(!L||S)&&(l||O||!E[i])&&D(E,i,y),u[g]=y,u[s]=c,o)if(N={values:P?y:x(p),keys:t?y:x(_),entries:T},S)for(I in N)I in E||C(E,I,N[I]);else f(f.P+f.F*(l||O),g,N);return N}},{"./_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(j,J,k){var L=j("./_wks")("iterator"),f=!1;try{var C=[7][L]();C.return=function(){f=!0},Array.from(C,function(){throw 2})}catch(D){}J.exports=function(D,u){if(!u&&!f)return!1;var h=!1;try{var w=[7],d=w[L]();d.next=function(){return{done:h=!0}},w[L]=function(){return d},D(w)}catch(i){}return h}},{"./_wks":166}],124:[function(j,J,k){J.exports=function(L,f){return{value:f,done:!!L}}},{}],125:[function(j,J,k){J.exports={}},{}],126:[function(j,J,k){J.exports=!0},{}],127:[function(j,J,k){var L=j("./_uid")("meta"),f=j("./_is-object"),C=j("./_has"),D=j("./_object-dp").f,u=0,h=Object.isExtensible||function(){return!0},w=!j("./_fails")(function(){return h(Object.preventExtensions({}))}),d=function(p){D(p,L,{value:{i:"O"+ ++u,w:{}}})},i=function(p,c){if(!f(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!C(p,L)){if(!h(p))return"F";if(!c)return"E";d(p)}return p[L].i},l=function(p,c){if(!C(p,L)){if(!h(p))return!0;if(!c)return!1;d(p)}return p[L].w},a=function(p){return w&&_.NEED&&h(p)&&!C(p,L)&&d(p),p},_=J.exports={KEY:L,NEED:!1,fastKey:i,getWeak:l,onFreeze:a}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(j,J,k){var L=j("./_global"),f=j("./_task").set,C=L.MutationObserver||L.WebKitMutationObserver,D=L.process,u=L.Promise,h=j("./_cof")(D)=="process";J.exports=function(){var w,d,i,l=function(){var c,m;for(h&&(c=D.domain)&&c.exit();w;){m=w.fn,w=w.next;try{m()}catch(g){throw w?i():d=void 0,g}}d=void 0,c&&c.enter()};if(h)i=function(){D.nextTick(l)};else if(C&&!(L.navigator&&L.navigator.standalone)){var a=!0,_=document.createTextNode("");new C(l).observe(_,{characterData:!0}),i=function(){_.data=a=!a}}else if(u&&u.resolve){var p=u.resolve(void 0);i=function(){p.then(l)}}else i=function(){f.call(L,l)};return function(c){var m={fn:c,next:void 0};d&&(d.next=m),w||(w=m,i()),d=m}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(j,J,k){"use strict";var L=j("./_a-function");function f(C){var D,u;this.promise=new C(function(h,w){if(D!==void 0||u!==void 0)throw TypeError("Bad Promise constructor");D=h,u=w}),this.resolve=L(D),this.reject=L(u)}J.exports.f=function(C){return new f(C)}},{"./_a-function":92}],130:[function(j,J,k){"use strict";var L=j("./_descriptors"),f=j("./_object-keys"),C=j("./_object-gops"),D=j("./_object-pie"),u=j("./_to-object"),h=j("./_iobject"),w=Object.assign;J.exports=!w||j("./_fails")(function(){var d={},i={},l=Symbol(),a="abcdefghijklmnopqrst";return d[l]=7,a.split("").forEach(function(_){i[_]=_}),w({},d)[l]!=7||Object.keys(w({},i)).join("")!=a})?function(i,l){for(var a=u(i),_=arguments.length,p=1,c=C.f,m=D.f;_>p;)for(var g=h(arguments[p++]),b=c?f(g).concat(c(g)):f(g),n=b.length,o=0,t;n>o;)t=b[o++],(!L||m.call(g,t))&&(a[t]=g[t]);return a}:w},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(j,J,k){var L=j("./_an-object"),f=j("./_object-dps"),C=j("./_enum-bug-keys"),D=j("./_shared-key")("IE_PROTO"),u=function(){},h="prototype",w=function(){var d=j("./_dom-create")("iframe"),i=C.length,l="<",a=">",_;for(d.style.display="none",j("./_html").appendChild(d),d.src="javascript:",_=d.contentWindow.document,_.open(),_.write(l+"script"+a+"document.F=Object"+l+"/script"+a),_.close(),w=_.F;i--;)delete w[h][C[i]];return w()};J.exports=Object.create||function(i,l){var a;return i!==null?(u[h]=L(i),a=new u,u[h]=null,a[D]=i):a=w(),l===void 0?a:f(a,l)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(j,J,k){var L=j("./_an-object"),f=j("./_ie8-dom-define"),C=j("./_to-primitive"),D=Object.defineProperty;k.f=j("./_descriptors")?Object.defineProperty:function(h,w,d){if(L(h),w=C(w,!0),L(d),f)try{return D(h,w,d)}catch(i){}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(h[w]=d.value),h}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(j,J,k){var L=j("./_object-dp"),f=j("./_an-object"),C=j("./_object-keys");J.exports=j("./_descriptors")?Object.defineProperties:function(u,h){f(u);for(var w=C(h),d=w.length,i=0,l;d>i;)L.f(u,l=w[i++],h[l]);return u}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(j,J,k){var L=j("./_object-pie"),f=j("./_property-desc"),C=j("./_to-iobject"),D=j("./_to-primitive"),u=j("./_has"),h=j("./_ie8-dom-define"),w=Object.getOwnPropertyDescriptor;k.f=j("./_descriptors")?w:function(i,l){if(i=C(i),l=D(l,!0),h)try{return w(i,l)}catch(a){}if(u(i,l))return f(!L.f.call(i,l),i[l])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(j,J,k){var L=j("./_to-iobject"),f=j("./_object-gopn").f,C={}.toString,D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(h){try{return f(h)}catch(w){return D.slice()}};J.exports.f=function(w){return D&&C.call(w)=="[object Window]"?u(w):f(L(w))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(j,J,k){var L=j("./_object-keys-internal"),f=j("./_enum-bug-keys").concat("length","prototype");k.f=Object.getOwnPropertyNames||function(D){return L(D,f)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(j,J,k){k.f=Object.getOwnPropertySymbols},{}],138:[function(j,J,k){var L=j("./_has"),f=j("./_to-object"),C=j("./_shared-key")("IE_PROTO"),D=Object.prototype;J.exports=Object.getPrototypeOf||function(u){return u=f(u),L(u,C)?u[C]:typeof u.constructor=="function"&&u instanceof u.constructor?u.constructor.prototype:u instanceof Object?D:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(j,J,k){var L=j("./_has"),f=j("./_to-iobject"),C=j("./_array-includes")(!1),D=j("./_shared-key")("IE_PROTO");J.exports=function(u,h){var w=f(u),d=0,i=[],l;for(l in w)l!=D&&(L(w,l)&&i.push(l));for(;h.length>d;)L(w,l=h[d++])&&(~C(i,l)||i.push(l));return i}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(j,J,k){var L=j("./_object-keys-internal"),f=j("./_enum-bug-keys");J.exports=Object.keys||function(D){return L(D,f)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(j,J,k){k.f={}.propertyIsEnumerable},{}],142:[function(j,J,k){var L=j("./_export"),f=j("./_core"),C=j("./_fails");J.exports=function(D,u){var h=(f.Object||{})[D]||Object[D],w={};w[D]=u(h),L(L.S+L.F*C(function(){h(1)}),"Object",w)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(j,J,k){var L=j("./_descriptors"),f=j("./_object-keys"),C=j("./_to-iobject"),D=j("./_object-pie").f;J.exports=function(u){return function(h){for(var w=C(h),d=f(w),i=d.length,l=0,a=[],_;i>l;)_=d[l++],(!L||D.call(w,_))&&a.push(u?[_,w[_]]:w[_]);return a}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(j,J,k){J.exports=function(L){try{return{e:!1,v:L()}}catch(f){return{e:!0,v:f}}}},{}],145:[function(j,J,k){var L=j("./_an-object"),f=j("./_is-object"),C=j("./_new-promise-capability");J.exports=function(D,u){if(L(D),f(u)&&u.constructor===D)return u;var h=C.f(D),w=h.resolve;return w(u),h.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(j,J,k){J.exports=function(L,f){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:f}}},{}],147:[function(j,J,k){var L=j("./_hide");J.exports=function(f,C,D){for(var u in C)D&&f[u]?f[u]=C[u]:L(f,u,C[u]);return f}},{"./_hide":112}],148:[function(j,J,k){J.exports=j("./_hide")},{"./_hide":112}],149:[function(j,J,k){"use strict";var L=j("./_global"),f=j("./_core"),C=j("./_object-dp"),D=j("./_descriptors"),u=j("./_wks")("species");J.exports=function(h){var w=typeof f[h]=="function"?f[h]:L[h];D&&w&&!w[u]&&C.f(w,u,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(j,J,k){var L=j("./_object-dp").f,f=j("./_has"),C=j("./_wks")("toStringTag");J.exports=function(D,u,h){D&&!f(D=h?D:D.prototype,C)&&L(D,C,{configurable:!0,value:u})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(j,J,k){var L=j("./_shared")("keys"),f=j("./_uid");J.exports=function(C){return L[C]||(L[C]=f(C))}},{"./_shared":152,"./_uid":162}],152:[function(j,J,k){var L=j("./_core"),f=j("./_global"),C="__core-js_shared__",D=f[C]||(f[C]={});(J.exports=function(u,h){return D[u]||(D[u]=h!==void 0?h:{})})("versions",[]).push({version:L.version,mode:j("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(j,J,k){var L=j("./_an-object"),f=j("./_a-function"),C=j("./_wks")("species");J.exports=function(D,u){var h=L(D).constructor,w;return h===void 0||(w=L(h)[C])==null?u:f(w)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(j,J,k){var L=j("./_to-integer"),f=j("./_defined");J.exports=function(C){return function(D,u){var h=String(f(D)),w=L(u),d=h.length,i,l;return w<0||w>=d?C?"":void 0:(i=h.charCodeAt(w),i<55296||i>56319||w+1===d||(l=h.charCodeAt(w+1))<56320||l>57343?C?h.charAt(w):i:C?h.slice(w,w+2):(i-55296<<10)+(l-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(j,J,k){var L=j("./_ctx"),f=j("./_invoke"),C=j("./_html"),D=j("./_dom-create"),u=j("./_global"),h=u.process,w=u.setImmediate,d=u.clearImmediate,i=u.MessageChannel,l=u.Dispatch,a=0,_={},p="onreadystatechange",c,m,g,b=function(){var o=+this;if(_.hasOwnProperty(o)){var t=_[o];delete _[o],t()}},n=function(o){b.call(o.data)};(!w||!d)&&(w=function(t){for(var S=[],x=1;arguments.length>x;)S.push(arguments[x++]);return _[++a]=function(){f(typeof t=="function"?t:Function(t),S)},c(a),a},d=function(t){delete _[t]},j("./_cof")(h)=="process"?c=function(o){h.nextTick(L(b,o,1))}:l&&l.now?c=function(o){l.now(L(b,o,1))}:i?(m=new i,g=m.port2,m.port1.onmessage=n,c=L(g.postMessage,g,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(c=function(o){u.postMessage(o+"","*")},u.addEventListener("message",n,!1)):p in D("script")?c=function(o){C.appendChild(D("script"))[p]=function(){C.removeChild(this),b.call(o)}}:c=function(o){setTimeout(L(b,o,1),0)}),J.exports={set:w,clear:d}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(j,J,k){var L=j("./_to-integer"),f=Math.max,C=Math.min;J.exports=function(D,u){return D=L(D),D<0?f(D+u,0):C(D,u)}},{"./_to-integer":157}],157:[function(j,J,k){var L=Math.ceil,f=Math.floor;J.exports=function(C){return isNaN(C=+C)?0:(C>0?f:L)(C)}},{}],158:[function(j,J,k){var L=j("./_iobject"),f=j("./_defined");J.exports=function(C){return L(f(C))}},{"./_defined":102,"./_iobject":116}],159:[function(j,J,k){var L=j("./_to-integer"),f=Math.min;J.exports=function(C){return C>0?f(L(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(j,J,k){var L=j("./_defined");J.exports=function(f){return Object(L(f))}},{"./_defined":102}],161:[function(j,J,k){var L=j("./_is-object");J.exports=function(f,C){if(!L(f))return f;var D,u;if(C&&typeof(D=f.toString)=="function"&&!L(u=D.call(f)))return u;if(typeof(D=f.valueOf)=="function"&&!L(u=D.call(f)))return u;if(!C&&typeof(D=f.toString)=="function"&&!L(u=D.call(f)))return u;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(j,J,k){var L=0,f=Math.random();J.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++L+f).toString(36))}},{}],163:[function(j,J,k){var L=j("./_global"),f=L.navigator;J.exports=f&&f.userAgent||""},{"./_global":110}],164:[function(j,J,k){var L=j("./_global"),f=j("./_core"),C=j("./_library"),D=j("./_wks-ext"),u=j("./_object-dp").f;J.exports=function(h){var w=f.Symbol||(f.Symbol=C?{}:L.Symbol||{});h.charAt(0)!="_"&&!(h in w)&&u(w,h,{value:D.f(h)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(j,J,k){k.f=j("./_wks")},{"./_wks":166}],166:[function(j,J,k){var L=j("./_shared")("wks"),f=j("./_uid"),C=j("./_global").Symbol,D=typeof C=="function",u=J.exports=function(h){return L[h]||(L[h]=D&&C[h]||(D?C:f)("Symbol."+h))};u.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(j,J,k){var L=j("./_classof"),f=j("./_wks")("iterator"),C=j("./_iterators");J.exports=j("./_core").getIteratorMethod=function(D){if(D!=null)return D[f]||D["@@iterator"]||C[L(D)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(j,J,k){"use strict";var L=j("./_ctx"),f=j("./_export"),C=j("./_to-object"),D=j("./_iter-call"),u=j("./_is-array-iter"),h=j("./_to-length"),w=j("./_create-property"),d=j("./core.get-iterator-method");f(f.S+f.F*!j("./_iter-detect")(function(i){Array.from(i)}),"Array",{from:function(l){var a=C(l),_=typeof this=="function"?this:Array,p=arguments.length,c=p>1?arguments[1]:void 0,m=c!==void 0,g=0,b=d(a),n,o,t,S;if(m&&(c=L(c,p>2?arguments[2]:void 0,2)),b!=null&&!(_==Array&&u(b)))for(S=b.call(a),o=new _;!(t=S.next()).done;g++)w(o,g,m?D(S,c,[t.value,g],!0):t.value);else for(n=h(a.length),o=new _(n);n>g;g++)w(o,g,m?c(a[g],g):a[g]);return o.length=g,o}})},{"./_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(j,J,k){"use strict";var L=j("./_add-to-unscopables"),f=j("./_iter-step"),C=j("./_iterators"),D=j("./_to-iobject");J.exports=j("./_iter-define")(Array,"Array",function(u,h){this._t=D(u),this._i=0,this._k=h},function(){var u=this._t,h=this._k,w=this._i++;return!u||w>=u.length?(this._t=void 0,f(1)):h=="keys"?f(0,w):h=="values"?f(0,u[w]):f(0,[w,u[w]])},"values"),C.Arguments=C.Array,L("keys"),L("values"),L("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(j,J,k){"use strict";var L=j("./_is-object"),f=j("./_object-gpo"),C=j("./_wks")("hasInstance"),D=Function.prototype;C in D||j("./_object-dp").f(D,C,{value:function(u){if(typeof this!="function"||!L(u))return!1;if(!L(this.prototype))return u instanceof this;for(;u=f(u);)if(this.prototype===u)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(j,J,k){var L=j("./_export");L(L.S+L.F,"Object",{assign:j("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(j,J,k){var L=j("./_export");L(L.S,"Object",{create:j("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(j,J,k){var L=j("./_export");L(L.S+L.F*!j("./_descriptors"),"Object",{defineProperty:j("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(j,J,k){j("./_object-sap")("getOwnPropertyNames",function(){return j("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(j,J,k){var L=j("./_to-object"),f=j("./_object-gpo");j("./_object-sap")("getPrototypeOf",function(){return function(D){return f(L(D))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(j,J,k){var L=j("./_to-object"),f=j("./_object-keys");j("./_object-sap")("keys",function(){return function(D){return f(L(D))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(j,J,k){arguments[4][71][0].apply(k,arguments)},{dup:71}],178:[function(j,J,k){"use strict";var L=j("./_library"),f=j("./_global"),C=j("./_ctx"),D=j("./_classof"),u=j("./_export"),h=j("./_is-object"),w=j("./_a-function"),d=j("./_an-instance"),i=j("./_for-of"),l=j("./_species-constructor"),a=j("./_task").set,_=j("./_microtask")(),p=j("./_new-promise-capability"),c=j("./_perform"),m=j("./_user-agent"),g=j("./_promise-resolve"),b="Promise",n=f.TypeError,o=f.process,t=o&&o.versions,S=t&&t.v8||"",x=f[b],s=D(o)=="process",P=function(){},O,E,v,y,T=E=p.f,M=!!function(){try{var B=x.resolve(1),K=(B.constructor={})[j("./_wks")("species")]=function(q){q(P,P)};return(s||typeof PromiseRejectionEvent=="function")&&B.then(P)instanceof K&&S.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(q){}}(),N=function(B){var K;return h(B)&&typeof(K=B.then)=="function"?K:!1},I=function(B,K){if(B._n)return;B._n=!0;var q=B._c;_(function(){for(var ae=B._v,se=B._s==1,we=0,Te=function(de){var xe=se?de.ok:de.fail,pe=de.resolve,ne=de.reject,ie=de.domain,ee,le,Q;try{xe?(se||(B._h==2&&W(B),B._h=1),xe===!0?ee=ae:(ie&&ie.enter(),ee=xe(ae),ie&&(ie.exit(),Q=!0)),ee===de.promise?ne(n("Promise-chain cycle")):(le=N(ee))?le.call(ee,pe,ne):pe(ee)):ne(ae)}catch(Z){ie&&!Q&&ie.exit(),ne(Z)}};q.length>we;)Te(q[we++]);B._c=[],B._n=!1,K&&!B._h&&G(B)})},G=function(B){a.call(f,function(){var K=B._v,q=H(B),ae,se,we;if(q&&(ae=c(function(){s?o.emit("unhandledRejection",K,B):(se=f.onunhandledrejection)?se({promise:B,reason:K}):(we=f.console)&&we.error&&we.error("Unhandled promise rejection",K)}),B._h=s||H(B)?2:1),B._a=void 0,q&&ae.e)throw ae.v})},H=function(B){return B._h!==1&&(B._a||B._c).length===0},W=function(B){a.call(f,function(){var K;s?o.emit("rejectionHandled",B):(K=f.onrejectionhandled)&&K({promise:B,reason:B._v})})},z=function(B){var K=this;if(K._d)return;K._d=!0,K=K._w||K,K._v=B,K._s=2,K._a||(K._a=K._c.slice()),I(K,!0)},U=function(B){var K=this,q;if(K._d)return;K._d=!0,K=K._w||K;try{if(K===B)throw n("Promise can't be resolved itself");(q=N(B))?_(function(){var ae={_w:K,_d:!1};try{q.call(B,C(U,ae,1),C(z,ae,1))}catch(se){z.call(ae,se)}}):(K._v=B,K._s=1,I(K,!1))}catch(ae){z.call({_w:K,_d:!1},ae)}};M||(x=function(K){d(this,x,b,"_h"),w(K),O.call(this);try{K(C(U,this,1),C(z,this,1))}catch(q){z.call(this,q)}},O=function(K){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=j("./_redefine-all")(x.prototype,{then:function(K,q){var ae=T(l(this,x));return ae.ok=typeof K=="function"?K:!0,ae.fail=typeof q=="function"&&q,ae.domain=s?o.domain:void 0,this._c.push(ae),this._a&&this._a.push(ae),this._s&&I(this,!1),ae.promise},catch:function(B){return this.then(void 0,B)}}),v=function(){var B=new O;this.promise=B,this.resolve=C(U,B,1),this.reject=C(z,B,1)},p.f=T=function(B){return B===x||B===y?new v(B):E(B)}),u(u.G+u.W+u.F*!M,{Promise:x}),j("./_set-to-string-tag")(x,b),j("./_set-species")(b),y=j("./_core")[b],u(u.S+u.F*!M,b,{reject:function(K){var q=T(this),ae=q.reject;return ae(K),q.promise}}),u(u.S+u.F*(L||!M),b,{resolve:function(K){return g(L&&this===y?x:this,K)}}),u(u.S+u.F*!(M&&j("./_iter-detect")(function(B){x.all(B).catch(P)})),b,{all:function(K){var q=this,ae=T(q),se=ae.resolve,we=ae.reject,Te=c(function(){var de=[],xe=0,pe=1;i(K,!1,function(ne){var ie=xe++,ee=!1;de.push(void 0),pe++,q.resolve(ne).then(function(le){if(ee)return;ee=!0,de[ie]=le,--pe||se(de)},we)}),--pe||se(de)});return Te.e&&we(Te.v),ae.promise},race:function(K){var q=this,ae=T(q),se=ae.reject,we=c(function(){i(K,!1,function(Te){q.resolve(Te).then(ae.resolve,se)})});return we.e&&se(we.v),ae.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(j,J,k){var L=j("./_export"),f=j("./_to-absolute-index"),C=String.fromCharCode,D=String.fromCodePoint;L(L.S+L.F*(!!D&&D.length!=1),"String",{fromCodePoint:function(h){for(var w=[],d=arguments.length,i=0,l;d>i;){if(l=+arguments[i++],f(l,1114111)!==l)throw RangeError(l+" is not a valid code point");w.push(l<65536?C(l):C(((l-=65536)>>10)+55296,l%1024+56320))}return w.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(j,J,k){"use strict";var L=j("./_string-at")(!0);j("./_iter-define")(String,"String",function(f){this._t=String(f),this._i=0},function(){var f=this._t,C=this._i,D;return C>=f.length?{value:void 0,done:!0}:(D=L(f,C),this._i+=D.length,{value:D,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(j,J,k){"use strict";var L=j("./_global"),f=j("./_has"),C=j("./_descriptors"),D=j("./_export"),u=j("./_redefine"),h=j("./_meta").KEY,w=j("./_fails"),d=j("./_shared"),i=j("./_set-to-string-tag"),l=j("./_uid"),a=j("./_wks"),_=j("./_wks-ext"),p=j("./_wks-define"),c=j("./_enum-keys"),m=j("./_is-array"),g=j("./_an-object"),b=j("./_is-object"),n=j("./_to-object"),o=j("./_to-iobject"),t=j("./_to-primitive"),S=j("./_property-desc"),x=j("./_object-create"),s=j("./_object-gopn-ext"),P=j("./_object-gopd"),O=j("./_object-gops"),E=j("./_object-dp"),v=j("./_object-keys"),y=P.f,T=E.f,M=s.f,N=L.Symbol,I=L.JSON,G=I&&I.stringify,H="prototype",W=a("_hidden"),z=a("toPrimitive"),U={}.propertyIsEnumerable,B=d("symbol-registry"),K=d("symbols"),q=d("op-symbols"),ae=Object[H],se=typeof N=="function"&&!!O.f,we=L.QObject,Te=!we||!we[H]||!we[H].findChild,de=C&&w(function(){return x(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(ue,Ee,Ke){var Ye=y(ae,Ee);Ye&&delete ae[Ee],T(ue,Ee,Ke),Ye&&ue!==ae&&T(ae,Ee,Ye)}:T,xe=function(ue){var Ee=K[ue]=x(N[H]);return Ee._k=ue,Ee},pe=se&&typeof N.iterator=="symbol"?function(ue){return typeof ue=="symbol"}:function(ue){return ue instanceof N},ne=function(Ee,Ke,Ye){return Ee===ae&&ne(q,Ke,Ye),g(Ee),Ke=t(Ke,!0),g(Ye),f(K,Ke)?(Ye.enumerable?(f(Ee,W)&&Ee[W][Ke]&&(Ee[W][Ke]=!1),Ye=x(Ye,{enumerable:S(0,!1)})):(f(Ee,W)||T(Ee,W,S(1,{})),Ee[W][Ke]=!0),de(Ee,Ke,Ye)):T(Ee,Ke,Ye)},ie=function(Ee,Ke){g(Ee);for(var Ye=c(Ke=o(Ke)),Je=0,tt=Ye.length,at;tt>Je;)ne(Ee,at=Ye[Je++],Ke[at]);return Ee},ee=function(Ee,Ke){return Ke===void 0?x(Ee):ie(x(Ee),Ke)},le=function(Ee){var Ke=U.call(this,Ee=t(Ee,!0));return this===ae&&f(K,Ee)&&!f(q,Ee)?!1:Ke||!f(this,Ee)||!f(K,Ee)||f(this,W)&&this[W][Ee]?Ke:!0},Q=function(Ee,Ke){if(Ee=o(Ee),Ke=t(Ke,!0),Ee===ae&&f(K,Ke)&&!f(q,Ke))return;var Ye=y(Ee,Ke);return Ye&&f(K,Ke)&&!(f(Ee,W)&&Ee[W][Ke])&&(Ye.enumerable=!0),Ye},Z=function(Ee){for(var Ke=M(o(Ee)),Ye=[],Je=0,tt;Ke.length>Je;)!f(K,tt=Ke[Je++])&&tt!=W&&tt!=h&&Ye.push(tt);return Ye},be=function(Ee){for(var Ke=Ee===ae,Ye=M(Ke?q:o(Ee)),Je=[],tt=0,at;Ye.length>tt;)f(K,at=Ye[tt++])&&(Ke?f(ae,at):!0)&&Je.push(K[at]);return Je};se||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var Ee=l(arguments.length>0?arguments[0]:void 0),Ke=function(Ye){this===ae&&Ke.call(q,Ye),f(this,W)&&f(this[W],Ee)&&(this[W][Ee]=!1),de(this,Ee,S(1,Ye))};return C&&Te&&de(ae,Ee,{configurable:!0,set:Ke}),xe(Ee)},u(N[H],"toString",function(){return this._k}),P.f=Q,E.f=ne,j("./_object-gopn").f=s.f=Z,j("./_object-pie").f=le,O.f=be,C&&!j("./_library")&&u(ae,"propertyIsEnumerable",le,!0),_.f=function(ue){return xe(a(ue))}),D(D.G+D.W+D.F*!se,{Symbol:N});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),$=0;te.length>$;)a(te[$++]);for(var X=v(a.store),Y=0;X.length>Y;)p(X[Y++]);D(D.S+D.F*!se,"Symbol",{for:function(ue){return f(B,ue+="")?B[ue]:B[ue]=N(ue)},keyFor:function(Ee){if(!pe(Ee))throw TypeError(Ee+" is not a symbol!");for(var Ke in B)if(B[Ke]===Ee)return Ke},useSetter:function(){Te=!0},useSimple:function(){Te=!1}}),D(D.S+D.F*!se,"Object",{create:ee,defineProperty:ne,defineProperties:ie,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:be});var ve=w(function(){O.f(1)});D(D.S+D.F*ve,"Object",{getOwnPropertySymbols:function(Ee){return O.f(n(Ee))}}),I&&D(D.S+D.F*(!se||w(function(){var ue=N();return G([ue])!="[null]"||G({a:ue})!="{}"||G(Object(ue))!="{}"})),"JSON",{stringify:function(Ee){for(var Ke=[Ee],Ye=1,Je,tt;arguments.length>Ye;)Ke.push(arguments[Ye++]);return tt=Je=Ke[1],!b(Je)&&Ee===void 0||pe(Ee)?void 0:(m(Je)||(Je=function(at,lt){if(typeof tt=="function"&&(lt=tt.call(this,at,lt)),!pe(lt))return lt}),Ke[1]=Je,G.apply(I,Ke))}}),N[H][z]||j("./_hide")(N[H],z,N[H].valueOf),i(N,"Symbol"),i(Math,"Math",!0),i(L.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(j,J,k){var L=j("./_export"),f=j("./_object-to-array")(!0);L(L.S,"Object",{entries:function(D){return f(D)}})},{"./_export":107,"./_object-to-array":143}],183:[function(j,J,k){"use strict";var L=j("./_export"),f=j("./_core"),C=j("./_global"),D=j("./_species-constructor"),u=j("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(h){var w=D(this,f.Promise||C.Promise),d=typeof h=="function";return this.then(d?function(i){return u(w,h()).then(function(){return i})}:h,d?function(i){return u(w,h()).then(function(){throw i})}:h)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(j,J,k){"use strict";var L=j("./_export"),f=j("./_new-promise-capability"),C=j("./_perform");L(L.S,"Promise",{try:function(D){var u=f.f(this),h=C(D);return(h.e?u.reject:u.resolve)(h.v),u.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(j,J,k){j("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(j,J,k){j("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(j,J,k){j("./es6.array.iterator");for(var L=j("./_global"),f=j("./_hide"),C=j("./_iterators"),D=j("./_wks")("toStringTag"),u="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(","),h=0;h<u.length;h++){var w=u[h],d=L[w],i=d&&d.prototype;i&&!i[D]&&f(i,D,w),C[w]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(j,J,k){var L=j("./_export"),f=j("./_task");L(L.G+L.B,{setImmediate:f.set,clearImmediate:f.clear})},{"./_export":107,"./_task":155}],189:[function(j,J,k){(function(L){"use strict";var f=j("babel-runtime/helpers/typeof"),C=D(f);function D(t){return t&&t.__esModule?t:{default:t}}function u(t){return Array.isArray?Array.isArray(t):o(t)==="[object Array]"}k.isArray=u;function h(t){return typeof t=="boolean"}k.isBoolean=h;function w(t){return t===null}k.isNull=w;function d(t){return t==null}k.isNullOrUndefined=d;function i(t){return typeof t=="number"}k.isNumber=i;function l(t){return typeof t=="string"}k.isString=l;function a(t){return(typeof t=="undefined"?"undefined":(0,C.default)(t))==="symbol"}k.isSymbol=a;function _(t){return t===void 0}k.isUndefined=_;function p(t){return o(t)==="[object RegExp]"}k.isRegExp=p;function c(t){return(typeof t=="undefined"?"undefined":(0,C.default)(t))==="object"&&t!==null}k.isObject=c;function m(t){return o(t)==="[object Date]"}k.isDate=m;function g(t){return o(t)==="[object Error]"||t instanceof Error}k.isError=g;function b(t){return typeof t=="function"}k.isFunction=b;function n(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||(typeof t=="undefined"?"undefined":(0,C.default)(t))==="symbol"||typeof t=="undefined"}k.isPrimitive=n,k.isBuffer=L.isBuffer;function o(t){return Object.prototype.toString.call(t)}}).call(this,{isBuffer:j("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(j,J,k){"use strict";var L=j("babel-runtime/helpers/typeof"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(D){"use strict";var u=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,_=/[^-+\dA-Z]/g;return function(p,c,m,g){if(arguments.length===1&&i(p)==="string"&&!/\d/.test(p)&&(c=p,p=void 0),p=p||new Date,p instanceof Date||(p=new Date(p)),isNaN(p))throw TypeError("Invalid date");c=String(u.masks[c]||c||u.masks.default);var b=c.slice(0,4);(b==="UTC:"||b==="GMT:")&&(c=c.slice(4),m=!0,b==="GMT:"&&(g=!0));var n=m?"getUTC":"get",o=p[n+"Date"](),t=p[n+"Day"](),S=p[n+"Month"](),x=p[n+"FullYear"](),s=p[n+"Hours"](),P=p[n+"Minutes"](),O=p[n+"Seconds"](),E=p[n+"Milliseconds"](),v=m?0:p.getTimezoneOffset(),y=w(p),T=d(p),M={d:o,dd:h(o),ddd:u.i18n.dayNames[t],dddd:u.i18n.dayNames[t+7],m:S+1,mm:h(S+1),mmm:u.i18n.monthNames[S],mmmm:u.i18n.monthNames[S+12],yy:String(x).slice(2),yyyy:x,h:s%12||12,hh:h(s%12||12),H:s,HH:h(s),M:P,MM:h(P),s:O,ss:h(O),l:h(E,3),L:h(Math.round(E/10)),t:s<12?"a":"p",tt:s<12?"am":"pm",T:s<12?"A":"P",TT:s<12?"AM":"PM",Z:g?"GMT":m?"UTC":(String(p).match(a)||[""]).pop().replace(_,""),o:(v>0?"-":"+")+h(Math.floor(Math.abs(v)/60)*100+Math.abs(v)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:y,N:T};return c.replace(l,function(N){return N in M?M[N]:N.slice(1,N.length-1)})}}();u.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"},u.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 h(l,a){for(l=String(l),a=a||2;l.length<a;)l="0"+l;return l}function w(l){var a=new Date(l.getFullYear(),l.getMonth(),l.getDate());a.setDate(a.getDate()-(a.getDay()+6)%7+3);var _=new Date(a.getFullYear(),0,4);_.setDate(_.getDate()-(_.getDay()+6)%7+3);var p=a.getTimezoneOffset()-_.getTimezoneOffset();a.setHours(a.getHours()-p);var c=(a-_)/(864e5*7);return 1+Math.floor(c)}function d(l){var a=l.getDay();return a===0&&(a=7),a}function i(l){return l===null?"null":l===void 0?"undefined":(typeof l=="undefined"?"undefined":(0,f.default)(l))!=="object"?typeof l=="undefined"?"undefined":(0,f.default)(l):Array.isArray(l)?"array":{}.toString.call(l).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return u}):(typeof k=="undefined"?"undefined":(0,f.default)(k))==="object"?J.exports=u:D.dateFormat=u})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(j,J,k){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var L=/["'&<>]/;J.exports=f;function f(C){var D=""+C,u=L.exec(D);if(!u)return D;var h,w="",d=0,i=0;for(d=u.index;d<D.length;d++){switch(D.charCodeAt(d)){case 34:h="&quot;";break;case 38:h="&amp;";break;case 39:h="&#39;";break;case 60:h="&lt;";break;case 62:h="&gt;";break;default:continue}i!==d&&(w+=D.substring(i,d)),i=d+1,w+=h}return i!==d?w+D.substring(i,d):w}},{}],192:[function(j,J,k){function L(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}J.exports=L,L.EventEmitter=L,L.prototype._events=void 0,L.prototype._maxListeners=void 0,L.defaultMaxListeners=10,L.prototype.setMaxListeners=function(h){if(!C(h)||h<0||isNaN(h))throw TypeError("n must be a positive number");return this._maxListeners=h,this},L.prototype.emit=function(h){var w,d,i,l,a,_;if(this._events||(this._events={}),h==="error"&&(!this._events.error||D(this._events.error)&&!this._events.error.length)){if(w=arguments[1],w instanceof Error)throw w;var p=new Error('Uncaught, unspecified "error" event. ('+w+")");throw p.context=w,p}if(d=this._events[h],u(d))return!1;if(f(d))switch(arguments.length){case 1:d.call(this);break;case 2:d.call(this,arguments[1]);break;case 3:d.call(this,arguments[1],arguments[2]);break;default:l=Array.prototype.slice.call(arguments,1),d.apply(this,l)}else if(D(d))for(l=Array.prototype.slice.call(arguments,1),_=d.slice(),i=_.length,a=0;a<i;a++)_[a].apply(this,l);return!0},L.prototype.addListener=function(h,w){var d;if(!f(w))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",h,f(w.listener)?w.listener:w),this._events[h]?D(this._events[h])?this._events[h].push(w):this._events[h]=[this._events[h],w]:this._events[h]=w,D(this._events[h])&&!this._events[h].warned&&(u(this._maxListeners)?d=L.defaultMaxListeners:d=this._maxListeners,d&&d>0&&this._events[h].length>d&&(this._events[h].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[h].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(h,w){if(!f(w))throw TypeError("listener must be a function");var d=!1;function i(){this.removeListener(h,i),d||(d=!0,w.apply(this,arguments))}return i.listener=w,this.on(h,i),this},L.prototype.removeListener=function(h,w){var d,i,l,a;if(!f(w))throw TypeError("listener must be a function");if(!this._events||!this._events[h])return this;if(d=this._events[h],l=d.length,i=-1,d===w||f(d.listener)&&d.listener===w)delete this._events[h],this._events.removeListener&&this.emit("removeListener",h,w);else if(D(d)){for(a=l;a-- >0;)if(d[a]===w||d[a].listener&&d[a].listener===w){i=a;break}if(i<0)return this;d.length===1?(d.length=0,delete this._events[h]):d.splice(i,1),this._events.removeListener&&this.emit("removeListener",h,w)}return this},L.prototype.removeAllListeners=function(h){var w,d;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[h]&&delete this._events[h],this;if(arguments.length===0){for(w in this._events){if(w==="removeListener")continue;this.removeAllListeners(w)}return this.removeAllListeners("removeListener"),this._events={},this}if(d=this._events[h],f(d))this.removeListener(h,d);else if(d)for(;d.length;)this.removeListener(h,d[d.length-1]);return delete this._events[h],this},L.prototype.listeners=function(h){var w;return!this._events||!this._events[h]?w=[]:f(this._events[h])?w=[this._events[h]]:w=this._events[h].slice(),w},L.prototype.listenerCount=function(h){if(this._events){var w=this._events[h];if(f(w))return 1;if(w)return w.length}return 0},L.listenerCount=function(h,w){return h.listenerCount(w)};function f(h){return typeof h=="function"}function C(h){return typeof h=="number"}function D(h){return typeof h=="object"&&h!==null}function u(h){return h===void 0}},{}],193:[function(j,J,k){var L=j("http"),f=J.exports;for(var C in L)L.hasOwnProperty(C)&&(f[C]=L[C]);f.request=function(D,u){return D||(D={}),D.scheme="https",D.protocol="https:",L.request.call(this,D,u)}},{http:231}],194:[function(j,J,k){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var L=j("util"),f=j("ms");J.exports=function(C){if(typeof C=="number")return C;var D=f(C);if(D===void 0){var u=new Error(L.format("humanize-ms(%j) result undefined",C));console.warn(u.stack)}return D}},{ms:204,util:243}],195:[function(j,J,k){k.read=function(L,f,C,D,u){var h,w,d=u*8-D-1,i=(1<<d)-1,l=i>>1,a=-7,_=C?u-1:0,p=C?-1:1,c=L[f+_];for(_+=p,h=c&(1<<-a)-1,c>>=-a,a+=d;a>0;h=h*256+L[f+_],_+=p,a-=8);for(w=h&(1<<-a)-1,h>>=-a,a+=D;a>0;w=w*256+L[f+_],_+=p,a-=8);if(h===0)h=1-l;else{if(h===i)return w?NaN:(c?-1:1)*Infinity;w=w+Math.pow(2,D),h=h-l}return(c?-1:1)*w*Math.pow(2,h-D)},k.write=function(L,f,C,D,u,h){var w,d,i,l=h*8-u-1,a=(1<<l)-1,_=a>>1,p=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=D?0:h-1,m=D?1:-1,g=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===Infinity?(d=isNaN(f)?1:0,w=a):(w=Math.floor(Math.log(f)/Math.LN2),f*(i=Math.pow(2,-w))<1&&(w--,i*=2),w+_>=1?f+=p/i:f+=p*Math.pow(2,1-_),f*i>=2&&(w++,i/=2),w+_>=a?(d=0,w=a):w+_>=1?(d=(f*i-1)*Math.pow(2,u),w=w+_):(d=f*Math.pow(2,_-1)*Math.pow(2,u),w=0));u>=8;L[C+c]=d&255,c+=m,d/=256,u-=8);for(w=w<<u|d,l+=u;l>0;L[C+c]=w&255,c+=m,w/=256,l-=8);L[C+c-m]|=g*128}},{}],196:[function(j,J,k){typeof Object.create=="function"?J.exports=function(f,C){C&&(f.super_=C,f.prototype=Object.create(C.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:J.exports=function(f,C){if(C){f.super_=C;var D=function(){};D.prototype=C.prototype,f.prototype=new D,f.prototype.constructor=f}}},{}],197:[function(j,J,k){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/J.exports=function(C){return C!=null&&(L(C)||f(C)||!!C._isBuffer)};function L(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function f(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&L(C.slice(0,0))}},{}],198:[function(j,J,k){var L={}.toString;J.exports=Array.isArray||function(f){return L.call(f)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(j,J){typeof exports=="object"&&typeof module!="undefined"?module.exports=J(j):typeof define=="function"&&define.amd?define(J):J(j)})(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(j){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(j){for(var J={},k=0,L=j.length;k<L;k++)J[j.charAt(k)]=k;return J}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(j){if(j.length<2){var J=j.charCodeAt(0);return J<128?j:J<2048?fromCharCode(192|J>>>6)+fromCharCode(128|J&63):fromCharCode(224|J>>>12&15)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}else{var J=65536+(j.charCodeAt(0)-55296)*1024+(j.charCodeAt(1)-56320);return fromCharCode(240|J>>>18&7)+fromCharCode(128|J>>>12&63)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(j){return j.replace(re_utob,cb_utob)},cb_encode=function(j){var J=[0,2,1][j.length%3],k=j.charCodeAt(0)<<16|(j.length>1?j.charCodeAt(1):0)<<8|(j.length>2?j.charCodeAt(2):0),L=[b64chars.charAt(k>>>18),b64chars.charAt(k>>>12&63),J>=2?"=":b64chars.charAt(k>>>6&63),J>=1?"=":b64chars.charAt(k&63)];return L.join("")},btoa=global.btoa?function(j){return global.btoa(j)}:function(j){return j.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(j){var J=Object.prototype.toString.call(j)==="[object Uint8Array]";return J?j.toString("base64"):btoa(utob(String(j)))},encode=function(j,J){return J?_encode(String(j)).replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).replace(/=/g,""):_encode(j)},encodeURI=function(j){return encode(j,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(j){switch(j.length){case 4:var J=(7&j.charCodeAt(0))<<18|(63&j.charCodeAt(1))<<12|(63&j.charCodeAt(2))<<6|63&j.charCodeAt(3),k=J-65536;return fromCharCode((k>>>10)+55296)+fromCharCode((k&1023)+56320);case 3:return fromCharCode((15&j.charCodeAt(0))<<12|(63&j.charCodeAt(1))<<6|63&j.charCodeAt(2));default:return fromCharCode((31&j.charCodeAt(0))<<6|63&j.charCodeAt(1))}},btou=function(j){return j.replace(re_btou,cb_btou)},cb_decode=function(j){var J=j.length,k=J%4,L=(J>0?b64tab[j.charAt(0)]<<18:0)|(J>1?b64tab[j.charAt(1)]<<12:0)|(J>2?b64tab[j.charAt(2)]<<6:0)|(J>3?b64tab[j.charAt(3)]:0),f=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return f.length-=[0,0,2,1][k],f.join("")},_atob=global.atob?function(j){return global.atob(j)}:function(j){return j.replace(/\S{1,4}/g,cb_decode)},atob=function(j){return _atob(String(j).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(j){return(j.constructor===buffer.constructor?j:buffer.from(j,"base64")).toString()}:function(j){return(j.constructor===buffer.constructor?j:new buffer(j,"base64")).toString()}:function(j){return btou(_atob(j))},decode=function(j){return _decode(String(j).replace(/[-_]/g,function(J){return J=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var j=global.Base64;return global.Base64=_Base64,j};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(j){return{value:j,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(j){return encode(this,j)})),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(j,J,k){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";J.exports=f;var L=Object.prototype.hasOwnProperty;function f(C,D,u){if(!C)throw new TypeError("argument dest is required");if(!D)throw new TypeError("argument src is required");return u===void 0&&(u=!0),Object.getOwnPropertyNames(D).forEach(function(w){if(!u&&L.call(C,w))return;var d=Object.getOwnPropertyDescriptor(D,w);Object.defineProperty(C,w,d)}),C}},{}],201:[function(j,J,k){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var f=0;f<arguments.length;f++)this.define(arguments[f]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}L.prototype.define=function(f,C){for(var D in f){var u=f[D].map(function(d){return d.toLowerCase()});D=D.toLowerCase();for(var h=0;h<u.length;h++){var w=u[h];if(w[0]=="*")continue;if(!C&&w in this._types)throw new Error('Attempt to change mapping for "'+w+'" extension from "'+this._types[w]+'" to "'+D+'". Pass `force=true` to allow this, otherwise remove "'+w+'" from the list of extensions for "'+D+'".');this._types[w]=D}if(C||!this._extensions[D]){var w=u[0];this._extensions[D]=w[0]!="*"?w:w.substr(1)}}},L.prototype.getType=function(f){f=String(f);var C=f.replace(/^.*[/\\]/,"").toLowerCase(),D=C.replace(/^.*\./,"").toLowerCase(),u=C.length<f.length,h=D.length<C.length-1;return(h||!u)&&this._types[D]||null},L.prototype.getExtension=function(f){return f=/^\s*([^;\s]*)/.test(f)&&RegExp.$1,f&&this._extensions[f.toLowerCase()]||null},J.exports=L},{}],202:[function(j,J,k){"use strict";var L=j("./Mime");J.exports=new L(j("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(j,J,k){J.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(j,J,k){var L=1e3,f=L*60,C=f*60,D=C*24,u=D*7,h=D*365.25;J.exports=function(a,_){_=_||{};var p=typeof a;if(p==="string"&&a.length>0)return w(a);if(p==="number"&&isFinite(a))return _.long?i(a):d(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function w(a){if(a=String(a),a.length>100)return;var _=/^(-?(?:\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(!_)return;var p=parseFloat(_[1]),c=(_[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return p*h;case"weeks":case"week":case"w":return p*u;case"days":case"day":case"d":return p*D;case"hours":case"hour":case"hrs":case"hr":case"h":return p*C;case"minutes":case"minute":case"mins":case"min":case"m":return p*f;case"seconds":case"second":case"secs":case"sec":case"s":return p*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function d(a){var _=Math.abs(a);return _>=D?Math.round(a/D)+"d":_>=C?Math.round(a/C)+"h":_>=f?Math.round(a/f)+"m":_>=L?Math.round(a/L)+"s":a+"ms"}function i(a){var _=Math.abs(a);return _>=D?l(a,_,D,"day"):_>=C?l(a,_,C,"hour"):_>=f?l(a,_,f,"minute"):_>=L?l(a,_,L,"second"):a+" ms"}function l(a,_,p,c){var m=_>=p*1.5;return Math.round(a/p)+" "+c+(m?"s":"")}},{}],205:[function(j,J,k){(function(L){function f(h,w){for(var d=0,i=h.length-1;i>=0;i--){var l=h[i];l==="."?h.splice(i,1):l===".."?(h.splice(i,1),d++):d&&(h.splice(i,1),d--)}if(w)for(;d--;d)h.unshift("..");return h}k.resolve=function(){for(var h="",w=!1,d=arguments.length-1;d>=-1&&!w;d--){var i=d>=0?arguments[d]:L.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)continue;h=i+"/"+h,w=i.charAt(0)==="/"}return h=f(D(h.split("/"),function(l){return!!l}),!w).join("/"),(w?"/":"")+h||"."},k.normalize=function(h){var w=k.isAbsolute(h),d=u(h,-1)==="/";return h=f(D(h.split("/"),function(i){return!!i}),!w).join("/"),!h&&!w&&(h="."),h&&d&&(h+="/"),(w?"/":"")+h},k.isAbsolute=function(h){return h.charAt(0)==="/"},k.join=function(){var h=Array.prototype.slice.call(arguments,0);return k.normalize(D(h,function(w,d){if(typeof w!="string")throw new TypeError("Arguments to path.join must be strings");return w}).join("/"))},k.relative=function(h,w){h=k.resolve(h).substr(1),w=k.resolve(w).substr(1);function d(m){for(var g=0;g<m.length&&!(m[g]!=="");g++);for(var b=m.length-1;b>=0&&!(m[b]!=="");b--);return g>b?[]:m.slice(g,b-g+1)}for(var i=d(h.split("/")),l=d(w.split("/")),a=Math.min(i.length,l.length),_=a,p=0;p<a;p++)if(i[p]!==l[p]){_=p;break}for(var c=[],p=_;p<i.length;p++)c.push("..");return c=c.concat(l.slice(_)),c.join("/")},k.sep="/",k.delimiter=":",k.dirname=function(h){if(typeof h!="string"&&(h=h+""),h.length===0)return".";for(var w=h.charCodeAt(0),d=w===47,i=-1,l=!0,a=h.length-1;a>=1;--a)if(w=h.charCodeAt(a),w===47){if(!l){i=a;break}}else l=!1;return i===-1?d?"/":".":d&&i===1?"/":h.slice(0,i)};function C(h){typeof h!="string"&&(h=h+"");var w=0,d=-1,i=!0,l;for(l=h.length-1;l>=0;--l)if(h.charCodeAt(l)===47){if(!i){w=l+1;break}}else d===-1&&(i=!1,d=l+1);return d===-1?"":h.slice(w,d)}k.basename=function(h,w){var d=C(h);return w&&d.substr(-1*w.length)===w&&(d=d.substr(0,d.length-w.length)),d},k.extname=function(h){typeof h!="string"&&(h=h+"");for(var w=-1,d=0,i=-1,l=!0,a=0,_=h.length-1;_>=0;--_){var p=h.charCodeAt(_);if(p===47){if(!l){d=_+1;break}continue}i===-1&&(l=!1,i=_+1),p===46?w===-1?w=_:a!==1&&(a=1):w!==-1&&(a=-1)}return w===-1||i===-1||a===0||a===1&&w===i-1&&w===d+1?"":h.slice(w,i)};function D(h,w){if(h.filter)return h.filter(w);for(var d=[],i=0;i<h.length;i++)w(h[i],i,h)&&d.push(h[i]);return d}var u="ab".substr(-1)==="b"?function(h,w,d){return h.substr(w,d)}:function(h,w,d){return w<0&&(w=h.length+w),h.substr(w,d)}}).call(this,j("_process"))},{_process:208}],206:[function(j,J,k){(function(L){/*!
* 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 f={function:!0,object:!0},C=f[typeof window]&&window||this,D=C,u=f[typeof k]&&k,h=f[typeof J]&&J&&!J.nodeType&&J,w=u&&h&&typeof L=="object"&&L;w&&(w.global===w||w.window===w||w.self===w)&&(C=w);var d=Math.pow(2,53)-1,i=/\bOpera/,l=this,a=Object.prototype,_=a.hasOwnProperty,p=a.toString;function c(E){return E=String(E),E.charAt(0).toUpperCase()+E.slice(1)}function m(E,v,y){var T={"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 v&&y&&/^Win/i.test(E)&&!/^Windows Phone /i.test(E)&&(T=T[/[\d.]+$/.exec(E)])&&(E="Windows "+T),E=String(E),v&&y&&(E=E.replace(RegExp(v,"i"),y)),E=b(E.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]),E}function g(E,v){var y=-1,T=E?E.length:0;if(typeof T=="number"&&T>-1&&T<=d)for(;++y<T;)v(E[y],y,E);else n(E,v)}function b(E){return E=s(E),/^(?:webOS|i(?:OS|P))/.test(E)?E:c(E)}function n(E,v){for(var y in E)_.call(E,y)&&v(E[y],y,E)}function o(E){return E==null?c(E):p.call(E).slice(8,-1)}function t(E,v){var y=E!=null?typeof E[v]:"number";return!/^(?:boolean|number|string|undefined)$/.test(y)&&(y=="object"?!!E[v]:!0)}function S(E){return String(E).replace(/([ -])(?!$)/g,"$1?")}function x(E,v){var y=null;return g(E,function(T,M){y=v(y,T,M,E)}),y}function s(E){return String(E).replace(/^ +| +$/g,"")}function P(E){var v=C,y=E&&typeof E=="object"&&o(E)!="String";y&&(v=E,E=null);var T=v.navigator||{},M=T.userAgent||"";E||(E=M);var N=y||l==D,I=y?!!T.likeChrome:/\bChrome\b/.test(E)&&!/internal|\n/i.test(p.toString()),G="Object",H=y?G:"ScriptBridgingProxyObject",W=y?G:"Environment",z=y&&v.java?"JavaPackage":o(v.java),U=y?G:"RuntimeObject",B=/\bJava/.test(z)&&v.java,K=B&&o(v.environment)==W,q=B?"a":"\u03B1",ae=B?"b":"\u03B2",se=v.document||{},we=v.operamini||v.opera,Te=i.test(Te=y&&we?we["[[Class]]"]:o(we))?Te:we=null,de,xe=E,pe=[],ne=null,ie=E==M,ee=ie&&we&&typeof we.version=="function"&&we.version(),le,Q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Z=ve(["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"]),be=Ee([{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"]),te=Y({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}}),$=ue(["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 X(tt){return x(tt,function(at,lt){return at||RegExp("\\b"+(lt.pattern||S(lt))+"\\b","i").exec(E)&&(lt.label||lt)})}function Y(tt){return x(tt,function(at,lt,je){return at||(lt[be]||lt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(be)]||RegExp("\\b"+S(je)+"(?:\\b|\\w*\\d)","i").exec(E))&&je})}function ve(tt){return x(tt,function(at,lt){return at||RegExp("\\b"+(lt.pattern||S(lt))+"\\b","i").exec(E)&&(lt.label||lt)})}function ue(tt){return x(tt,function(at,lt){var je=lt.pattern||S(lt);return!at&&(at=RegExp("\\b"+je+"(?:/[\\d.]+|[ \\w.]*)","i").exec(E))&&(at=m(at,je,lt.label||lt)),at})}function Ee(tt){return x(tt,function(at,lt){var je=lt.pattern||S(lt);return!at&&(at=RegExp("\\b"+je+" *\\d+[.\\w_]*","i").exec(E)||RegExp("\\b"+je+" *\\w+-[\\w]*","i").exec(E)||RegExp("\\b"+je+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(E))&&((at=String(lt.label&&!RegExp(je,"i").test(lt.label)?lt.label:at).split("/"))[1]&&!/[\d.]+/.test(at[0])&&(at[0]+=" "+at[1]),lt=lt.label||lt,at=b(at[0].replace(RegExp(je,"i"),lt).replace(RegExp("; *(?:"+lt+"[_-])?","i")," ").replace(RegExp("("+lt+")[-_.]?(\\w)","i"),"$1 $2"))),at})}function Ke(tt){return x(tt,function(at,lt){return at||(RegExp(lt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(E)||0)[1]||null})}function Ye(){return this.description||""}if(Q&&(Q=[Q]),te&&!be&&(be=Ee([te])),(de=/\bGoogle TV\b/.exec(be))&&(be=de[0]),/\bSimulator\b/i.test(E)&&(be=(be?be+" ":"")+"Simulator"),Z=="Opera Mini"&&/\bOPiOS\b/.test(E)&&pe.push("running in Turbo/Uncompressed mode"),Z=="IE"&&/\blike iPhone OS\b/.test(E)?(de=P(E.replace(/like iPhone OS/,"")),te=de.manufacturer,be=de.product):/^iP/.test(be)?(Z||(Z="Safari"),$="iOS"+((de=/ OS ([\d_]+)/i.exec(E))?" "+de[1].replace(/_/g,"."):"")):Z=="Konqueror"&&!/buntu/i.test($)?$="Kubuntu":te&&te!="Google"&&(/Chrome/.test(Z)&&!/\bMobile Safari\b/i.test(E)||/\bVita\b/.test(be))||/\bAndroid\b/.test($)&&/^Chrome/.test(Z)&&/\bVersion\//i.test(E)?(Z="Android Browser",$=/\bAndroid\b/.test($)?$:"Android"):Z=="Silk"?(/\bMobi/i.test(E)||($="Android",pe.unshift("desktop mode")),/Accelerated *= *true/i.test(E)&&pe.unshift("accelerated")):Z=="PaleMoon"&&(de=/\bFirefox\/([\d.]+)\b/.exec(E))?pe.push("identifying as Firefox "+de[1]):Z=="Firefox"&&(de=/\b(Mobile|Tablet|TV)\b/i.exec(E))?($||($="Firefox OS"),be||(be=de[1])):!Z||(de=!/\bMinefield\b/i.test(E)&&/\b(?:Firefox|Safari)\b/.exec(Z))?(Z&&!be&&/[\/,]|^[^(]+?\)/.test(E.slice(E.indexOf(de+"/")+8))&&(Z=null),(de=be||te||$)&&(be||te||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test($))&&(Z=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test($)?$:de)+" Browser")):Z=="Electron"&&(de=(/\bChrome\/([\d.]+)\b/.exec(E)||0)[1])&&pe.push("Chromium "+de),ee||(ee=Ke(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",S(Z),"(?:Firefox|Minefield|NetFront)"])),(de=Q=="iCab"&&parseFloat(ee)>3&&"WebKit"||/\bOpera\b/.test(Z)&&(/\bOPR\b/.test(E)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(E)&&!/^(?:Trident|EdgeHTML)$/.test(Q)&&"WebKit"||!Q&&/\bMSIE\b/i.test(E)&&($=="Mac OS"?"Tasman":"Trident")||Q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Z)&&"NetFront")&&(Q=[de]),Z=="IE"&&(de=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(E)||0)[1])?(Z+=" Mobile",$="Windows Phone "+(/\+$/.test(de)?de:de+".x"),pe.unshift("desktop mode")):/\bWPDesktop\b/i.test(E)?(Z="IE Mobile",$="Windows Phone 8.x",pe.unshift("desktop mode"),ee||(ee=(/\brv:([\d.]+)/.exec(E)||0)[1])):Z!="IE"&&Q=="Trident"&&(de=/\brv:([\d.]+)/.exec(E))&&(Z&&pe.push("identifying as "+Z+(ee?" "+ee:"")),Z="IE",ee=de[1]),ie){if(t(v,"global"))if(B&&(de=B.lang.System,xe=de.getProperty("os.arch"),$=$||de.getProperty("os.name")+" "+de.getProperty("os.version")),K){try{ee=v.require("ringo/engine").version.join("."),Z="RingoJS"}catch(tt){(de=v.system)&&de.global.system==v.system&&(Z="Narwhal",$||($=de[0].os||null))}Z||(Z="Rhino")}else typeof v.process=="object"&&!v.process.browser&&(de=v.process)&&(typeof de.versions=="object"&&(typeof de.versions.electron=="string"?(pe.push("Node "+de.versions.node),Z="Electron",ee=de.versions.electron):typeof de.versions.nw=="string"&&(pe.push("Chromium "+ee,"Node "+de.versions.node),Z="NW.js",ee=de.versions.nw)),Z||(Z="Node.js",xe=de.arch,$=de.platform,ee=/[\d.]+/.exec(de.version),ee=ee?ee[0]:null));else o(de=v.runtime)==H?(Z="Adobe AIR",$=de.flash.system.Capabilities.os):o(de=v.phantom)==U?(Z="PhantomJS",ee=(de=de.version||null)&&de.major+"."+de.minor+"."+de.patch):typeof se.documentMode=="number"&&(de=/\bTrident\/(\d+)/i.exec(E))?(ee=[ee,se.documentMode],(de=+de[1]+4)!=ee[1]&&(pe.push("IE "+ee[1]+" mode"),Q&&(Q[1]=""),ee[1]=de),ee=Z=="IE"?String(ee[1].toFixed(1)):ee[0]):typeof se.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Z)&&(pe.push("masking as "+Z+" "+ee),Z="IE",ee="11.0",Q=["Trident"],$="Windows");$=$&&b($)}if(ee&&(de=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ee)||/(?:alpha|beta)(?: ?\d)?/i.exec(E+";"+(ie&&T.appMinorVersion))||/\bMinefield\b/i.test(E)&&"a")&&(ne=/b/i.test(de)?"beta":"alpha",ee=ee.replace(RegExp(de+"\\+?$"),"")+(ne=="beta"?ae:q)+(/\d+\+?/.exec(de)||"")),Z=="Fennec"||Z=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test($))Z="Firefox Mobile";else if(Z=="Maxthon"&&ee)ee=ee.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(be))be=="Xbox 360"&&($=null),be=="Xbox 360"&&/\bIEMobile\b/.test(E)&&pe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Z)||Z&&!be&&!/Browser|Mobi/.test(Z))&&($=="Windows CE"||/Mobi/i.test(E)))Z+=" Mobile";else if(Z=="IE"&&ie)try{v.external===null&&pe.unshift("platform preview")}catch(tt){pe.unshift("embedded")}else(/\bBlackBerry\b/.test(be)||/\bBB10\b/.test(E))&&(de=(RegExp(be.replace(/ +/g," *")+"/([.\\d]+)","i").exec(E)||0)[1]||ee)?(de=[de,/BB10/.test(E)],$=(de[1]?(be=null,te="BlackBerry"):"Device Software")+" "+de[0],ee=null):this!=n&&be!="Wii"&&(ie&&we||/Opera/.test(Z)&&/\b(?:MSIE|Firefox)\b/i.test(E)||Z=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test($)||Z=="IE"&&($&&!/^Win/.test($)&&ee>5.5||/\bWindows XP\b/.test($)&&ee>8||ee==8&&!/\bTrident\b/.test(E)))&&!i.test(de=P.call(n,E.replace(i,"")+";"))&&de.name&&(de="ing as "+de.name+((de=de.version)?" "+de:""),i.test(Z)?(/\bIE\b/.test(de)&&$=="Mac OS"&&($=null),de="identify"+de):(de="mask"+de,Te?Z=b(Te.replace(/([a-z])([A-Z])/g,"$1 $2")):Z="Opera",/\bIE\b/.test(de)&&($=null),ie||(ee=null)),Q=["Presto"],pe.push(de));(de=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(E)||0)[1])&&(de=[parseFloat(de.replace(/\.(\d)$/,".0$1")),de],Z=="Safari"&&de[1].slice(-1)=="+"?(Z="WebKit Nightly",ne="alpha",ee=de[1].slice(0,-1)):(ee==de[1]||ee==(de[2]=(/\bSafari\/([\d.]+\+?)/i.exec(E)||0)[1]))&&(ee=null),de[1]=(/\bChrome\/([\d.]+)/i.exec(E)||0)[1],de[0]==537.36&&de[2]==537.36&&parseFloat(de[1])>=28&&Q=="WebKit"&&(Q=["Blink"]),!ie||!I&&!de[1]?(Q&&(Q[1]="like Safari"),de=(de=de[0],de<400?1:de<500?2:de<526?3:de<533?4:de<534?"4+":de<535?5:de<537?6:de<538?7:de<601?8:"8")):(Q&&(Q[1]="like Chrome"),de=de[1]||(de=de[0],de<530?1:de<532?2:de<532.05?3:de<533?4:de<534.03?5:de<534.07?6:de<534.1?7:de<534.13?8:de<534.16?9:de<534.24?10:de<534.3?11:de<535.01?12:de<535.02?"13+":de<535.07?15:de<535.11?16:de<535.19?17:de<536.05?18:de<536.1?19:de<537.01?20:de<537.11?"21+":de<537.13?23:de<537.18?24:de<537.24?25:de<537.36?26:Q!="Blink"?"27":"28")),Q&&(Q[1]+=" "+(de+=typeof de=="number"?".x":/[.+]/.test(de)?"":"+")),Z=="Safari"&&(!ee||parseInt(ee)>45)&&(ee=de)),Z=="Opera"&&(de=/\bzbov|zvav$/.exec($))?(Z+=" ",pe.unshift("desktop mode"),de=="zvav"?(Z+="Mini",ee=null):Z+="Mobile",$=$.replace(RegExp(" *"+de+"$"),"")):Z=="Safari"&&/\bChrome\b/.exec(Q&&Q[1])&&(pe.unshift("desktop mode"),Z="Chrome Mobile",ee=null,/\bOS X\b/.test($)?(te="Apple",$="iOS 4.3+"):$=null),ee&&ee.indexOf(de=/[\d.]+$/.exec($))==0&&E.indexOf("/"+de+"-")>-1&&($=s($.replace(de,""))),Q&&!/\b(?:Avant|Nook)\b/.test(Z)&&(/Browser|Lunascape|Maxthon/.test(Z)||Z!="Safari"&&/^iOS/.test($)&&/\bSafari\b/.test(Q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Z)&&Q[1])&&((de=Q[Q.length-1])&&pe.push(de)),pe.length&&(pe=["("+pe.join("; ")+")"]),te&&be&&be.indexOf(te)<0&&pe.push("on "+te),be&&pe.push((/^on /.test(pe[pe.length-1])?"":"on ")+be),$&&(de=/ ([\d.+]+)$/.exec($),le=de&&$.charAt($.length-de[0].length-1)=="/",$={architecture:32,family:de&&!le?$.replace(de[0],""):$,version:de?de[1]:null,toString:function(){var tt=this.version;return this.family+(tt&&!le?" "+tt:"")+(this.architecture==64?" 64-bit":"")}}),(de=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(xe))&&!/\bi686\b/i.test(xe)?($&&($.architecture=64,$.family=$.family.replace(RegExp(" *"+de),"")),Z&&(/\bWOW64\b/i.test(E)||ie&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(E))&&pe.unshift("32-bit")):$&&/^OS X/.test($.family)&&Z=="Chrome"&&parseFloat(ee)>=39&&($.architecture=64),E||(E=null);var Je={};return Je.description=E,Je.layout=Q&&Q[0],Je.manufacturer=te,Je.name=Z,Je.prerelease=ne,Je.product=be,Je.ua=E,Je.version=Z&&ee,Je.os=$||{architecture:null,family:null,version:null,toString:function(){return"null"}},Je.parse=P,Je.toString=Ye,Je.version&&pe.unshift(ee),Je.name&&pe.unshift(Z),$&&Z&&!($==String($).split(" ")[0]&&($==Z.split(" ")[0]||be))&&pe.push(be?"("+$+")":"on "+$),pe.length&&(Je.description=pe.join(" ")),Je}var O=P();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=O,define(function(){return O})):u&&h?n(O,function(E,v){u[v]=E}):C.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(j,J,k){(function(L){"use strict";typeof L=="undefined"||!L.version||L.version.indexOf("v0.")===0||L.version.indexOf("v1.")===0&&L.version.indexOf("v1.8.")!==0?J.exports={nextTick:f}:J.exports=L;function f(C,D,u,h){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var w=arguments.length,d,i;switch(w){case 0:case 1:return L.nextTick(C);case 2:return L.nextTick(function(){C.call(null,D)});case 3:return L.nextTick(function(){C.call(null,D,u)});case 4:return L.nextTick(function(){C.call(null,D,u,h)});default:for(d=new Array(w-1),i=0;i<d.length;)d[i++]=arguments[i];return L.nextTick(function(){C.apply(null,d)})}}}).call(this,j("_process"))},{_process:208}],208:[function(j,J,k){var L=J.exports={},f,C;function D(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?f=setTimeout:f=D}catch(g){f=D}try{typeof clearTimeout=="function"?C=clearTimeout:C=u}catch(g){C=u}})();function h(g){if(f===setTimeout)return setTimeout(g,0);if((f===D||!f)&&setTimeout)return f=setTimeout,setTimeout(g,0);try{return f(g,0)}catch(b){try{return f.call(null,g,0)}catch(n){return f.call(this,g,0)}}}function w(g){if(C===clearTimeout)return clearTimeout(g);if((C===u||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(g);try{return C(g)}catch(b){try{return C.call(null,g)}catch(n){return C.call(this,g)}}}var d=[],i=!1,l,a=-1;function _(){if(!i||!l)return;i=!1,l.length?d=l.concat(d):a=-1,d.length&&p()}function p(){if(i)return;var g=h(_);i=!0;for(var b=d.length;b;){for(l=d,d=[];++a<b;)l&&l[a].run();a=-1,b=d.length}l=null,i=!1,w(g)}L.nextTick=function(g){var b=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)b[n-1]=arguments[n];d.push(new c(g,b)),d.length===1&&!i&&h(p)};function c(g,b){this.fun=g,this.array=b}c.prototype.run=function(){this.fun.apply(null,this.array)},L.title="browser",L.browser=!0,L.env={},L.argv=[],L.version="",L.versions={};function m(){}L.on=m,L.addListener=m,L.once=m,L.off=m,L.removeListener=m,L.removeAllListeners=m,L.emit=m,L.prependListener=m,L.prependOnceListener=m,L.listeners=function(g){return[]},L.binding=function(g){throw new Error("process.binding is not supported")},L.cwd=function(){return"/"},L.chdir=function(g){throw new Error("process.chdir is not supported")},L.umask=function(){return 0}},{}],209:[function(j,J,k){(function(L){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(f){var C=typeof k=="object"&&k&&!k.nodeType&&k,D=typeof J=="object"&&J&&!J.nodeType&&J,u=typeof L=="object"&&L;(u.global===u||u.window===u||u.self===u)&&(f=u);var h,w=2147483647,d=36,i=1,l=26,a=38,_=700,p=72,c=128,m="-",g=/^xn--/,b=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},t=d-i,S=Math.floor,x=String.fromCharCode,s;function P(z){throw new RangeError(o[z])}function O(z,U){for(var B=z.length,K=[];B--;)K[B]=U(z[B]);return K}function E(z,U){var B=z.split("@"),K="";B.length>1&&(K=B[0]+"@",z=B[1]),z=z.replace(n,".");var q=z.split("."),ae=O(q,U).join(".");return K+ae}function v(z){for(var U=[],B=0,K=z.length,q,ae;B<K;)q=z.charCodeAt(B++),q>=55296&&q<=56319&&B<K?(ae=z.charCodeAt(B++),(ae&64512)==56320?U.push(((q&1023)<<10)+(ae&1023)+65536):(U.push(q),B--)):U.push(q);return U}function y(z){return O(z,function(U){var B="";return U>65535&&(U-=65536,B+=x(U>>>10&1023|55296),U=56320|U&1023),B+=x(U),B}).join("")}function T(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:d}function M(z,U){return z+22+75*(z<26)-((U!=0)<<5)}function N(z,U,B){var K=0;for(z=B?S(z/_):z>>1,z+=S(z/U);z>t*l>>1;K+=d)z=S(z/t);return S(K+(t+1)*z/(z+a))}function I(z){var U=[],B=z.length,K,q=0,ae=c,se=p,we,Te,de,xe,pe,ne,ie,ee,le;for(we=z.lastIndexOf(m),we<0&&(we=0),Te=0;Te<we;++Te)z.charCodeAt(Te)>=128&&P("not-basic"),U.push(z.charCodeAt(Te));for(de=we>0?we+1:0;de<B;){for(xe=q,pe=1,ne=d;!(de>=B&&P("invalid-input"),ie=T(z.charCodeAt(de++)),(ie>=d||ie>S((w-q)/pe))&&P("overflow"),q+=ie*pe,ee=ne<=se?i:ne>=se+l?l:ne-se,ie<ee);ne+=d)le=d-ee,pe>S(w/le)&&P("overflow"),pe*=le;K=U.length+1,se=N(q-xe,K,xe==0),S(q/K)>w-ae&&P("overflow"),ae+=S(q/K),q%=K,U.splice(q++,0,ae)}return y(U)}function G(z){var U,B,K,q,ae,se,we,Te,de,xe,pe,ne=[],ie,ee,le,Q;for(z=v(z),ie=z.length,U=c,B=0,ae=p,se=0;se<ie;++se)pe=z[se],pe<128&&ne.push(x(pe));for(K=q=ne.length,q&&ne.push(m);K<ie;){for(we=w,se=0;se<ie;++se)pe=z[se],pe>=U&&pe<we&&(we=pe);for(ee=K+1,we-U>S((w-B)/ee)&&P("overflow"),B+=(we-U)*ee,U=we,se=0;se<ie;++se)if(pe=z[se],pe<U&&++B>w&&P("overflow"),pe==U){for(Te=B,de=d;!(xe=de<=ae?i:de>=ae+l?l:de-ae,Te<xe);de+=d)Q=Te-xe,le=d-xe,ne.push(x(M(xe+Q%le,0))),Te=S(Q/le);ne.push(x(M(Te,0))),ae=N(B,ee,K==q),B=0,++K}++B,++U}return ne.join("")}function H(z){return E(z,function(U){return g.test(U)?I(U.slice(4).toLowerCase()):U})}function W(z){return E(z,function(U){return b.test(U)?"xn--"+G(U):U})}if(h={version:"1.4.1",ucs2:{decode:v,encode:y},decode:I,encode:G,toASCII:W,toUnicode:H},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return h});else if(C&&D)if(J.exports==C)D.exports=h;else for(s in h)h.hasOwnProperty(s)&&(C[s]=h[s]);else f.punycode=h})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(j,J,k){"use strict";function L(C,D){return Object.prototype.hasOwnProperty.call(C,D)}J.exports=function(C,D,u,h){D=D||"&",u=u||"=";var w={};if(typeof C!="string"||C.length===0)return w;var d=/\+/g;C=C.split(D);var i=1e3;h&&typeof h.maxKeys=="number"&&(i=h.maxKeys);var l=C.length;i>0&&l>i&&(l=i);for(var a=0;a<l;++a){var _=C[a].replace(d,"%20"),p=_.indexOf(u),c,m,g,b;p>=0?(c=_.substr(0,p),m=_.substr(p+1)):(c=_,m=""),g=decodeURIComponent(c),b=decodeURIComponent(m),L(w,g)?f(w[g])?w[g].push(b):w[g]=[w[g],b]:w[g]=b}return w};var f=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(j,J,k){"use strict";var L=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};J.exports=function(u,h,w,d){return h=h||"&",w=w||"=",u===null&&(u=void 0),typeof u=="object"?C(D(u),function(i){var l=encodeURIComponent(L(i))+w;return f(u[i])?C(u[i],function(a){return l+encodeURIComponent(L(a))}).join(h):l+encodeURIComponent(L(u[i]))}).join(h):d?encodeURIComponent(L(d))+w+encodeURIComponent(L(u)):""};var f=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"};function C(u,h){if(u.map)return u.map(h);for(var w=[],d=0;d<u.length;d++)w.push(h(u[d],d));return w}var D=Object.keys||function(u){var h=[];for(var w in u)Object.prototype.hasOwnProperty.call(u,w)&&h.push(w);return h}},{}],212:[function(j,J,k){"use strict";k.decode=k.parse=j("./decode"),k.encode=k.stringify=j("./encode")},{"./decode":210,"./encode":211}],213:[function(j,J,k){J.exports=j("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=u(L),C=j("babel-runtime/core-js/object/keys"),D=u(C);function u(b){return b&&b.__esModule?b:{default:b}}var h=j("process-nextick-args"),w=D.default||function(b){var n=[];for(var o in b)n.push(o);return n};J.exports=c;var d=(0,f.default)(j("core-util-is"));d.inherits=j("inherits");var i=j("./_stream_readable"),l=j("./_stream_writable");d.inherits(c,i);for(var a=w(l.prototype),_=0;_<a.length;_++){var p=a[_];c.prototype[p]||(c.prototype[p]=l.prototype[p])}function c(b){if(!(this instanceof c))return new c(b);i.call(this,b),l.call(this,b),b&&b.readable===!1&&(this.readable=!1),b&&b.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,b&&b.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",m)}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m(){if(this.allowHalfOpen||this._writableState.ended)return;h.nextTick(g,this)}function g(b){b.end()}Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(n){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=n,this._writableState.destroyed=n}}),c.prototype._destroy=function(b,n){this.push(null),this.end(),h.nextTick(n,b)}},{"./_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(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(w){return w&&w.__esModule?w:{default:w}}J.exports=h;var D=j("./_stream_transform"),u=(0,f.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(h,D);function h(w){if(!(this instanceof h))return new h(w);D.call(this,w)}h.prototype._transform=function(w,d,i){i(null,w)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(j,J,k){(function(L,f){"use strict";var C=j("babel-runtime/core-js/object/get-prototype-of"),D=w(C),u=j("babel-runtime/core-js/object/create"),h=w(u);function w(Q){return Q&&Q.__esModule?Q:{default:Q}}var d=j("process-nextick-args");J.exports=v;var i=j("isarray"),l;v.ReadableState=E;var a=j("events").EventEmitter,_=function(Z,be){return Z.listeners(be).length},p=j("./internal/streams/stream"),c=j("safe-buffer").Buffer,m=f.Uint8Array||function(){};function g(Q){return c.from(Q)}function b(Q){return c.isBuffer(Q)||Q instanceof m}var n=(0,h.default)(j("core-util-is"));n.inherits=j("inherits");var o=j("util"),t=void 0;o&&o.debuglog?t=o.debuglog("stream"):t=function(){};var S=j("./internal/streams/BufferList"),x=j("./internal/streams/destroy"),s;n.inherits(v,p);var P=["error","close","destroy","pause","resume"];function O(Q,Z,be){if(typeof Q.prependListener=="function")return Q.prependListener(Z,be);!Q._events||!Q._events[Z]?Q.on(Z,be):i(Q._events[Z])?Q._events[Z].unshift(be):Q._events[Z]=[be,Q._events[Z]]}function E(Q,Z){l=l||j("./_stream_duplex"),Q=Q||{};var be=Z instanceof l;this.objectMode=!!Q.objectMode,be&&(this.objectMode=this.objectMode||!!Q.readableObjectMode);var te=Q.highWaterMark,$=Q.readableHighWaterMark,X=this.objectMode?16:16*1024;te||te===0?this.highWaterMark=te:be&&($||$===0)?this.highWaterMark=$:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new S,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=Q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Q.encoding&&(s||(s=j("string_decoder/").StringDecoder),this.decoder=new s(Q.encoding),this.encoding=Q.encoding)}function v(Q){if(l=l||j("./_stream_duplex"),!(this instanceof v))return new v(Q);this._readableState=new E(Q,this),this.readable=!0,Q&&(typeof Q.read=="function"&&(this._read=Q.read),typeof Q.destroy=="function"&&(this._destroy=Q.destroy)),p.call(this)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Z){if(!this._readableState)return;this._readableState.destroyed=Z}}),v.prototype.destroy=x.destroy,v.prototype._undestroy=x.undestroy,v.prototype._destroy=function(Q,Z){this.push(null),Z(Q)},v.prototype.push=function(Q,Z){var be=this._readableState,te;return be.objectMode?te=!0:typeof Q=="string"&&(Z=Z||be.defaultEncoding,Z!==be.encoding&&(Q=c.from(Q,Z),Z=""),te=!0),y(this,Q,Z,!1,te)},v.prototype.unshift=function(Q){return y(this,Q,null,!0,!1)};function y(Q,Z,be,te,$){var X=Q._readableState;if(Z===null)X.reading=!1,W(Q,X);else{var Y;$||(Y=M(X,Z)),Y?Q.emit("error",Y):X.objectMode||Z&&Z.length>0?(typeof Z!="string"&&!X.objectMode&&(0,D.default)(Z)!==c.prototype&&(Z=g(Z)),te?X.endEmitted?Q.emit("error",new Error("stream.unshift() after end event")):T(Q,X,Z,!0):X.ended?Q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!be?(Z=X.decoder.write(Z),X.objectMode||Z.length!==0?T(Q,X,Z,!1):B(Q,X)):T(Q,X,Z,!1))):te||(X.reading=!1)}return N(X)}function T(Q,Z,be,te){Z.flowing&&Z.length===0&&!Z.sync?(Q.emit("data",be),Q.read(0)):(Z.length+=Z.objectMode?1:be.length,te?Z.buffer.unshift(be):Z.buffer.push(be),Z.needReadable&&z(Q)),B(Q,Z)}function M(Q,Z){var be;return!b(Z)&&typeof Z!="string"&&Z!==void 0&&!Q.objectMode&&(be=new TypeError("Invalid non-string/buffer chunk")),be}function N(Q){return!Q.ended&&(Q.needReadable||Q.length<Q.highWaterMark||Q.length===0)}v.prototype.isPaused=function(){return this._readableState.flowing===!1},v.prototype.setEncoding=function(Q){return s||(s=j("string_decoder/").StringDecoder),this._readableState.decoder=new s(Q),this._readableState.encoding=Q,this};var I=8388608;function G(Q){return Q>=I?Q=I:(Q--,Q|=Q>>>1,Q|=Q>>>2,Q|=Q>>>4,Q|=Q>>>8,Q|=Q>>>16,Q++),Q}function H(Q,Z){return Q<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:Q!==Q?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:(Q>Z.highWaterMark&&(Z.highWaterMark=G(Q)),Q<=Z.length?Q:Z.ended?Z.length:(Z.needReadable=!0,0))}v.prototype.read=function(Q){t("read",Q),Q=parseInt(Q,10);var Z=this._readableState,be=Q;if(Q!==0&&(Z.emittedReadable=!1),Q===0&&Z.needReadable&&(Z.length>=Z.highWaterMark||Z.ended))return t("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?ie(this):z(this),null;if(Q=H(Q,Z),Q===0&&Z.ended)return Z.length===0&&ie(this),null;var te=Z.needReadable;t("need readable",te),(Z.length===0||Z.length-Q<Z.highWaterMark)&&(te=!0,t("length less than watermark",te)),Z.ended||Z.reading?(te=!1,t("reading or ended",te)):te&&(t("do read"),Z.reading=!0,Z.sync=!0,Z.length===0&&(Z.needReadable=!0),this._read(Z.highWaterMark),Z.sync=!1,Z.reading||(Q=H(be,Z)));var $;return Q>0?$=de(Q,Z):$=null,$===null?(Z.needReadable=!0,Q=0):Z.length-=Q,Z.length===0&&(Z.ended||(Z.needReadable=!0),be!==Q&&Z.ended&&ie(this)),$!==null&&this.emit("data",$),$};function W(Q,Z){if(Z.ended)return;if(Z.decoder){var be=Z.decoder.end();be&&be.length&&(Z.buffer.push(be),Z.length+=Z.objectMode?1:be.length)}Z.ended=!0,z(Q)}function z(Q){var Z=Q._readableState;Z.needReadable=!1,Z.emittedReadable||(t("emitReadable",Z.flowing),Z.emittedReadable=!0,Z.sync?d.nextTick(U,Q):U(Q))}function U(Q){t("emit readable"),Q.emit("readable"),Te(Q)}function B(Q,Z){Z.readingMore||(Z.readingMore=!0,d.nextTick(K,Q,Z))}function K(Q,Z){for(var be=Z.length;!Z.reading&&!Z.flowing&&!Z.ended&&Z.length<Z.highWaterMark&&!(t("maybeReadMore read 0"),Q.read(0),be===Z.length);)be=Z.length;Z.readingMore=!1}v.prototype._read=function(Q){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(Q,Z){var be=this,te=this._readableState;switch(te.pipesCount){case 0:te.pipes=Q;break;case 1:te.pipes=[te.pipes,Q];break;default:te.pipes.push(Q);break}te.pipesCount+=1,t("pipe count=%d opts=%j",te.pipesCount,Z);var $=(!Z||Z.end!==!1)&&Q!==L.stdout&&Q!==L.stderr,X=$?ve:je;te.endEmitted?d.nextTick(X):be.once("end",X),Q.on("unpipe",Y);function Y(Ce,Qe){t("onunpipe"),Ce===be&&(Qe&&Qe.hasUnpiped===!1&&(Qe.hasUnpiped=!0,Ke()))}function ve(){t("onend"),Q.end()}var ue=q(be);Q.on("drain",ue);var Ee=!1;function Ke(){t("cleanup"),Q.removeListener("close",at),Q.removeListener("finish",lt),Q.removeListener("drain",ue),Q.removeListener("error",tt),Q.removeListener("unpipe",Y),be.removeListener("end",ve),be.removeListener("end",je),be.removeListener("data",Je),Ee=!0,te.awaitDrain&&(!Q._writableState||Q._writableState.needDrain)&&ue()}var Ye=!1;be.on("data",Je);function Je(Ce){t("ondata"),Ye=!1;var Qe=Q.write(Ce);Qe===!1&&!Ye&&((te.pipesCount===1&&te.pipes===Q||te.pipesCount>1&&le(te.pipes,Q)!==-1)&&!Ee&&(t("false write response, pause",be._readableState.awaitDrain),be._readableState.awaitDrain++,Ye=!0),be.pause())}function tt(Ce){t("onerror",Ce),je(),Q.removeListener("error",tt),_(Q,"error")===0&&Q.emit("error",Ce)}O(Q,"error",tt);function at(){Q.removeListener("finish",lt),je()}Q.once("close",at);function lt(){t("onfinish"),Q.removeListener("close",at),je()}Q.once("finish",lt);function je(){t("unpipe"),be.unpipe(Q)}return Q.emit("pipe",be),te.flowing||(t("pipe resume"),be.resume()),Q};function q(Q){return function(){var Z=Q._readableState;t("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&_(Q,"data")&&(Z.flowing=!0,Te(Q))}}v.prototype.unpipe=function(Q){var Z=this._readableState,be={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return Q&&Q!==Z.pipes?this:(Q||(Q=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,Q&&Q.emit("unpipe",this,be),this);if(!Q){var te=Z.pipes,$=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var X=0;X<$;X++)te[X].emit("unpipe",this,be);return this}var Y=le(Z.pipes,Q);return Y===-1?this:(Z.pipes.splice(Y,1),Z.pipesCount-=1,Z.pipesCount===1&&(Z.pipes=Z.pipes[0]),Q.emit("unpipe",this,be),this)},v.prototype.on=function(Q,Z){var be=p.prototype.on.call(this,Q,Z);if(Q==="data")this._readableState.flowing!==!1&&this.resume();else if(Q==="readable"){var te=this._readableState;!te.endEmitted&&!te.readableListening&&(te.readableListening=te.needReadable=!0,te.emittedReadable=!1,te.reading?te.length&&z(this):d.nextTick(ae,this))}return be},v.prototype.addListener=v.prototype.on;function ae(Q){t("readable nexttick read 0"),Q.read(0)}v.prototype.resume=function(){var Q=this._readableState;return Q.flowing||(t("resume"),Q.flowing=!0,se(this,Q)),this};function se(Q,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,d.nextTick(we,Q,Z))}function we(Q,Z){Z.reading||(t("resume read 0"),Q.read(0)),Z.resumeScheduled=!1,Z.awaitDrain=0,Q.emit("resume"),Te(Q),Z.flowing&&!Z.reading&&Q.read(0)}v.prototype.pause=function(){return t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(t("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Te(Q){var Z=Q._readableState;for(t("flow",Z.flowing);Z.flowing&&Q.read()!==null;);}v.prototype.wrap=function(Q){var Z=this,be=this._readableState,te=!1;Q.on("end",function(){if(t("wrapped end"),be.decoder&&!be.ended){var Y=be.decoder.end();Y&&Y.length&&Z.push(Y)}Z.push(null)}),Q.on("data",function(Y){if(t("wrapped data"),be.decoder&&(Y=be.decoder.write(Y)),be.objectMode&&Y==null)return;if(!be.objectMode&&(!Y||!Y.length))return;var ve=Z.push(Y);ve||(te=!0,Q.pause())});for(var $ in Q)this[$]===void 0&&typeof Q[$]=="function"&&(this[$]=function(Y){return function(){return Q[Y].apply(Q,arguments)}}($));for(var X=0;X<P.length;X++)Q.on(P[X],this.emit.bind(this,P[X]));return this._read=function(Y){t("wrapped _read",Y),te&&(te=!1,Q.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=de;function de(Q,Z){if(Z.length===0)return null;var be;return Z.objectMode?be=Z.buffer.shift():!Q||Q>=Z.length?(Z.decoder?be=Z.buffer.join(""):Z.buffer.length===1?be=Z.buffer.head.data:be=Z.buffer.concat(Z.length),Z.buffer.clear()):be=xe(Q,Z.buffer,Z.decoder),be}function xe(Q,Z,be){var te;return Q<Z.head.data.length?(te=Z.head.data.slice(0,Q),Z.head.data=Z.head.data.slice(Q)):Q===Z.head.data.length?te=Z.shift():te=be?pe(Q,Z):ne(Q,Z),te}function pe(Q,Z){var be=Z.head,te=1,$=be.data;for(Q-=$.length;be=be.next;){var X=be.data,Y=Q>X.length?X.length:Q;if(Y===X.length?$+=X:$+=X.slice(0,Q),Q-=Y,Q===0){Y===X.length?(++te,be.next?Z.head=be.next:Z.head=Z.tail=null):(Z.head=be,be.data=X.slice(Y));break}++te}return Z.length-=te,$}function ne(Q,Z){var be=c.allocUnsafe(Q),te=Z.head,$=1;for(te.data.copy(be),Q-=te.data.length;te=te.next;){var X=te.data,Y=Q>X.length?X.length:Q;if(X.copy(be,be.length-Q,0,Y),Q-=Y,Q===0){Y===X.length?(++$,te.next?Z.head=te.next:Z.head=Z.tail=null):(Z.head=te,te.data=X.slice(Y));break}++$}return Z.length-=$,be}function ie(Q){var Z=Q._readableState;if(Z.length>0)throw new Error('"endReadable()" called on non-empty stream');Z.endEmitted||(Z.ended=!0,d.nextTick(ee,Z,Q))}function ee(Q,Z){!Q.endEmitted&&Q.length===0&&(Q.endEmitted=!0,Z.readable=!1,Z.emit("end"))}function le(Q,Z){for(var be=0,te=Q.length;be<te;be++)if(Q[be]===Z)return be;return-1}}).call(this,j("_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(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(l){return l&&l.__esModule?l:{default:l}}J.exports=w;var D=j("./_stream_duplex"),u=(0,f.default)(j("core-util-is"));u.inherits=j("inherits"),u.inherits(w,D);function h(l,a){var _=this._transformState;_.transforming=!1;var p=_.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));_.writechunk=null,_.writecb=null,a!=null&&this.push(a),p(l);var c=this._readableState;c.reading=!1,(c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}function w(l){if(!(this instanceof w))return new w(l);D.call(this,l),this._transformState={afterTransform:h.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",d)}function d(){var l=this;typeof this._flush=="function"?this._flush(function(a,_){i(l,a,_)}):i(this,null,null)}w.prototype.push=function(l,a){return this._transformState.needTransform=!1,D.prototype.push.call(this,l,a)},w.prototype._transform=function(l,a,_){throw new Error("_transform() is not implemented")},w.prototype._write=function(l,a,_){var p=this._transformState;if(p.writecb=_,p.writechunk=l,p.writeencoding=a,!p.transforming){var c=this._readableState;(p.needTransform||c.needReadable||c.length<c.highWaterMark)&&this._read(c.highWaterMark)}},w.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},w.prototype._destroy=function(l,a){var _=this;D.prototype._destroy.call(this,l,function(p){a(p),_.emit("close")})};function i(l,a,_){if(a)return l.emit("error",a);if(_!=null&&l.push(_),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(j,J,k){(function(L,f){"use strict";var C=j("babel-runtime/core-js/object/define-property"),D=p(C),u=j("babel-runtime/core-js/symbol/has-instance"),h=p(u),w=j("babel-runtime/core-js/symbol"),d=p(w),i=j("babel-runtime/core-js/object/create"),l=p(i),a=j("babel-runtime/core-js/set-immediate"),_=p(a);function p(ne){return ne&&ne.__esModule?ne:{default:ne}}var c=j("process-nextick-args");J.exports=M;function m(ne,ie,ee){this.chunk=ne,this.encoding=ie,this.callback=ee,this.next=null}function g(ne){var ie=this;this.next=null,this.entry=null,this.finish=function(){pe(ie,ne)}}var b=!L.browser&&["v0.10","v0.9."].indexOf(L.version.slice(0,5))>-1?_.default:c.nextTick,n;M.WritableState=y;var o=(0,l.default)(j("core-util-is"));o.inherits=j("inherits");var t={deprecate:j("util-deprecate")},S=j("./internal/streams/stream"),x=j("safe-buffer").Buffer,s=f.Uint8Array||function(){};function P(ne){return x.from(ne)}function O(ne){return x.isBuffer(ne)||ne instanceof s}var E=j("./internal/streams/destroy");o.inherits(M,S);function v(){}function y(ne,ie){n=n||j("./_stream_duplex"),ne=ne||{};var ee=ie instanceof n;this.objectMode=!!ne.objectMode,ee&&(this.objectMode=this.objectMode||!!ne.writableObjectMode);var le=ne.highWaterMark,Q=ne.writableHighWaterMark,Z=this.objectMode?16:16*1024;le||le===0?this.highWaterMark=le:ee&&(Q||Q===0)?this.highWaterMark=Q:this.highWaterMark=Z,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 be=ne.decodeStrings===!1;this.decodeStrings=!be,this.defaultEncoding=ne.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(te){B(ie,te)},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 g(this)}y.prototype.getBuffer=function(){for(var ie=this.bufferedRequest,ee=[];ie;)ee.push(ie),ie=ie.next;return ee},function(){try{Object.defineProperty(y.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ne){}}();var T;typeof d.default=="function"&&h.default&&typeof Function.prototype[h.default]=="function"?(T=Function.prototype[h.default],(0,D.default)(M,h.default,{value:function(ie){return T.call(this,ie)?!0:this!==M?!1:ie&&ie._writableState instanceof y}})):T=function(ie){return ie instanceof this};function M(ne){if(n=n||j("./_stream_duplex"),!T.call(M,this)&&!(this instanceof n))return new M(ne);this._writableState=new y(ne,this),this.writable=!0,ne&&(typeof ne.write=="function"&&(this._write=ne.write),typeof ne.writev=="function"&&(this._writev=ne.writev),typeof ne.destroy=="function"&&(this._destroy=ne.destroy),typeof ne.final=="function"&&(this._final=ne.final)),S.call(this)}M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function N(ne,ie){var ee=new Error("write after end");ne.emit("error",ee),c.nextTick(ie,ee)}function I(ne,ie,ee,le){var Q=!0,Z=!1;return ee===null?Z=new TypeError("May not write null values to stream"):typeof ee!="string"&&ee!==void 0&&!ie.objectMode&&(Z=new TypeError("Invalid non-string/buffer chunk")),Z&&(ne.emit("error",Z),c.nextTick(le,Z),Q=!1),Q}M.prototype.write=function(ne,ie,ee){var le=this._writableState,Q=!1,Z=!le.objectMode&&O(ne);return Z&&!x.isBuffer(ne)&&(ne=P(ne)),typeof ie=="function"&&(ee=ie,ie=null),Z?ie="buffer":ie||(ie=le.defaultEncoding),typeof ee!="function"&&(ee=v),le.ended?N(this,ee):(Z||I(this,le,ne,ee))&&(le.pendingcb++,Q=H(this,le,Z,ne,ie,ee)),Q},M.prototype.cork=function(){var ne=this._writableState;ne.corked++},M.prototype.uncork=function(){var ne=this._writableState;ne.corked&&(ne.corked--,!ne.writing&&!ne.corked&&!ne.finished&&!ne.bufferProcessing&&ne.bufferedRequest&&ae(this,ne))},M.prototype.setDefaultEncoding=function(ie){if(typeof ie=="string"&&(ie=ie.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ie+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ie);return this._writableState.defaultEncoding=ie,this};function G(ne,ie,ee){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof ie=="string"&&(ie=x.from(ie,ee)),ie}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(ne,ie,ee,le,Q,Z){if(!ee){var be=G(ie,le,Q);le!==be&&(ee=!0,Q="buffer",le=be)}var te=ie.objectMode?1:le.length;ie.length+=te;var $=ie.length<ie.highWaterMark;if($||(ie.needDrain=!0),ie.writing||ie.corked){var X=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:le,encoding:Q,isBuf:ee,callback:Z,next:null},X?X.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1}else W(ne,ie,!1,te,le,Q,Z);return $}function W(ne,ie,ee,le,Q,Z,be){ie.writelen=le,ie.writecb=be,ie.writing=!0,ie.sync=!0,ee?ne._writev(Q,ie.onwrite):ne._write(Q,Z,ie.onwrite),ie.sync=!1}function z(ne,ie,ee,le,Q){--ie.pendingcb,ee?(c.nextTick(Q,le),c.nextTick(de,ne,ie),ne._writableState.errorEmitted=!0,ne.emit("error",le)):(Q(le),ne._writableState.errorEmitted=!0,ne.emit("error",le),de(ne,ie))}function U(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function B(ne,ie){var ee=ne._writableState,le=ee.sync,Q=ee.writecb;if(U(ee),ie)z(ne,ee,le,ie,Q);else{var Z=se(ee);!Z&&!ee.corked&&!ee.bufferProcessing&&ee.bufferedRequest&&ae(ne,ee),le?b(K,ne,ee,Z,Q):K(ne,ee,Z,Q)}}function K(ne,ie,ee,le){ee||q(ne,ie),ie.pendingcb--,le(),de(ne,ie)}function q(ne,ie){ie.length===0&&ie.needDrain&&(ie.needDrain=!1,ne.emit("drain"))}function ae(ne,ie){ie.bufferProcessing=!0;var ee=ie.bufferedRequest;if(ne._writev&&ee&&ee.next){var le=ie.bufferedRequestCount,Q=new Array(le),Z=ie.corkedRequestsFree;Z.entry=ee;for(var be=0,te=!0;ee;)Q[be]=ee,ee.isBuf||(te=!1),ee=ee.next,be+=1;Q.allBuffers=te,W(ne,ie,!0,ie.length,Q,"",Z.finish),ie.pendingcb++,ie.lastBufferedRequest=null,Z.next?(ie.corkedRequestsFree=Z.next,Z.next=null):ie.corkedRequestsFree=new g(ie),ie.bufferedRequestCount=0}else{for(;ee;){var $=ee.chunk,X=ee.encoding,Y=ee.callback,ve=ie.objectMode?1:$.length;if(W(ne,ie,!1,ve,$,X,Y),ee=ee.next,ie.bufferedRequestCount--,ie.writing)break}ee===null&&(ie.lastBufferedRequest=null)}ie.bufferedRequest=ee,ie.bufferProcessing=!1}M.prototype._write=function(ne,ie,ee){ee(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(ne,ie,ee){var le=this._writableState;typeof ne=="function"?(ee=ne,ne=null,ie=null):typeof ie=="function"&&(ee=ie,ie=null),ne!=null&&this.write(ne,ie),le.corked&&(le.corked=1,this.uncork()),!le.ending&&!le.finished&&xe(this,le,ee)};function se(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function we(ne,ie){ne._final(function(ee){ie.pendingcb--,ee&&ne.emit("error",ee),ie.prefinished=!0,ne.emit("prefinish"),de(ne,ie)})}function Te(ne,ie){!ie.prefinished&&!ie.finalCalled&&(typeof ne._final=="function"?(ie.pendingcb++,ie.finalCalled=!0,c.nextTick(we,ne,ie)):(ie.prefinished=!0,ne.emit("prefinish")))}function de(ne,ie){var ee=se(ie);return ee&&(Te(ne,ie),ie.pendingcb===0&&(ie.finished=!0,ne.emit("finish"))),ee}function xe(ne,ie,ee){ie.ending=!0,de(ne,ie),ee&&(ie.finished?c.nextTick(ee):ne.once("finish",ee)),ie.ended=!0,ne.writable=!1}function pe(ne,ie,ee){var le=ne.entry;for(ne.entry=null;le;){var Q=le.callback;ie.pendingcb--,Q(ee),le=le.next}ie.corkedRequestsFree?ie.corkedRequestsFree.next=ne:ie.corkedRequestsFree=ne}Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ie){if(!this._writableState)return;this._writableState.destroyed=ie}}),M.prototype.destroy=E.destroy,M.prototype._undestroy=E.undestroy,M.prototype._destroy=function(ne,ie){this.end(),ie(ne)}}).call(this,j("_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(j,J,k){"use strict";function L(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}var f=j("safe-buffer").Buffer,C=j("util");function D(u,h,w){u.copy(h,w)}J.exports=function(){function u(){L(this,u),this.head=null,this.tail=null,this.length=0}return u.prototype.push=function(w){var d={data:w,next:null};this.length>0?this.tail.next=d:this.head=d,this.tail=d,++this.length},u.prototype.unshift=function(w){var d={data:w,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},u.prototype.shift=function(){if(this.length===0)return;var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w},u.prototype.clear=function(){this.head=this.tail=null,this.length=0},u.prototype.join=function(w){if(this.length===0)return"";for(var d=this.head,i=""+d.data;d=d.next;)i+=w+d.data;return i},u.prototype.concat=function(w){if(this.length===0)return f.alloc(0);if(this.length===1)return this.head.data;for(var d=f.allocUnsafe(w>>>0),i=this.head,l=0;i;)D(i.data,d,l),l+=i.data.length,i=i.next;return d},u}(),C&&C.inspect&&C.inspect.custom&&(J.exports.prototype[C.inspect.custom]=function(){var u=C.inspect({length:this.length});return this.constructor.name+" "+u})},{"safe-buffer":228,util:71}],220:[function(j,J,k){"use strict";var L=j("process-nextick-args");function f(u,h){var w=this,d=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return d||i?(h?h(u):u&&(!this._writableState||!this._writableState.errorEmitted)&&L.nextTick(D,this,u),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(l){!h&&l?(L.nextTick(D,w,l),w._writableState&&(w._writableState.errorEmitted=!0)):h&&h(l)}),this)}function C(){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 D(u,h){u.emit("error",h)}J.exports={destroy:f,undestroy:C}},{"process-nextick-args":207}],221:[function(j,J,k){"use strict";J.exports=j("events").EventEmitter},{events:192}],222:[function(j,J,k){J.exports=j("./readable").PassThrough},{"./readable":223}],223:[function(j,J,k){k=J.exports=j("./lib/_stream_readable.js"),k.Stream=k,k.Readable=k,k.Writable=j("./lib/_stream_writable.js"),k.Duplex=j("./lib/_stream_duplex.js"),k.Transform=j("./lib/_stream_transform.js"),k.PassThrough=j("./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(j,J,k){J.exports=j("./readable").Transform},{"./readable":223}],225:[function(j,J,k){J.exports=j("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(j,J,k){var L=function(){return this}()||Function("return this")(),f=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,C=f&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,J.exports=j("./runtime"),f)L.regeneratorRuntime=C;else try{delete L.regeneratorRuntime}catch(D){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(j,J,k){!function(L){"use strict";var f=Object.prototype,C=f.hasOwnProperty,D,u=typeof Symbol=="function"?Symbol:{},h=u.iterator||"@@iterator",w=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag",i=typeof J=="object",l=L.regeneratorRuntime;if(l){i&&(J.exports=l);return}l=L.regeneratorRuntime=i?J.exports:{};function a(H,W,z,U){var B=W&&W.prototype instanceof n?W:n,K=Object.create(B.prototype),q=new N(U||[]);return K._invoke=v(H,z,q),K}l.wrap=a;function _(H,W,z){try{return{type:"normal",arg:H.call(W,z)}}catch(U){return{type:"throw",arg:U}}}var p="suspendedStart",c="suspendedYield",m="executing",g="completed",b={};function n(){}function o(){}function t(){}var S={};S[h]=function(){return this};var x=Object.getPrototypeOf,s=x&&x(x(I([])));s&&s!==f&&C.call(s,h)&&(S=s);var P=t.prototype=n.prototype=Object.create(S);o.prototype=P.constructor=t,t.constructor=o,t[d]=o.displayName="GeneratorFunction";function O(H){["next","throw","return"].forEach(function(W){H[W]=function(z){return this._invoke(W,z)}})}l.isGeneratorFunction=function(H){var W=typeof H=="function"&&H.constructor;return W?W===o||(W.displayName||W.name)==="GeneratorFunction":!1},l.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,t):(H.__proto__=t,d in H||(H[d]="GeneratorFunction")),H.prototype=Object.create(P),H},l.awrap=function(H){return{__await:H}};function E(H){function W(B,K,q,ae){var se=_(H[B],H,K);if(se.type==="throw")ae(se.arg);else{var we=se.arg,Te=we.value;return Te&&typeof Te=="object"&&C.call(Te,"__await")?Promise.resolve(Te.__await).then(function(de){W("next",de,q,ae)},function(de){W("throw",de,q,ae)}):Promise.resolve(Te).then(function(de){we.value=de,q(we)},ae)}}var z;function U(B,K){function q(){return new Promise(function(ae,se){W(B,K,ae,se)})}return z=z?z.then(q,q):q()}this._invoke=U}O(E.prototype),E.prototype[w]=function(){return this},l.AsyncIterator=E,l.async=function(H,W,z,U){var B=new E(a(H,W,z,U));return l.isGeneratorFunction(W)?B:B.next().then(function(K){return K.done?K.value:B.next()})};function v(H,W,z){var U=p;return function(K,q){if(U===m)throw new Error("Generator is already running");if(U===g){if(K==="throw")throw q;return G()}for(z.method=K,z.arg=q;;){var ae=z.delegate;if(ae){var se=y(ae,z);if(se){if(se===b)continue;return se}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(U===p)throw U=g,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);U=m;var we=_(H,W,z);if(we.type==="normal"){if(U=z.done?g:c,we.arg===b)continue;return{value:we.arg,done:z.done}}else we.type==="throw"&&(U=g,z.method="throw",z.arg=we.arg)}}}function y(H,W){var z=H.iterator[W.method];if(z===D){if(W.delegate=null,W.method==="throw"){if(H.iterator.return&&(W.method="return",W.arg=D,y(H,W),W.method==="throw"))return b;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var U=_(z,H.iterator,W.arg);if(U.type==="throw")return W.method="throw",W.arg=U.arg,W.delegate=null,b;var B=U.arg;if(!B)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,b;if(B.done)W[H.resultName]=B.value,W.next=H.nextLoc,W.method!=="return"&&(W.method="next",W.arg=D);else return B;return W.delegate=null,b}O(P),P[d]="Generator",P[h]=function(){return this},P.toString=function(){return"[object Generator]"};function T(H){var W={tryLoc:H[0]};1 in H&&(W.catchLoc=H[1]),2 in H&&(W.finallyLoc=H[2],W.afterLoc=H[3]),this.tryEntries.push(W)}function M(H){var W=H.completion||{};W.type="normal",delete W.arg,H.completion=W}function N(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(T,this),this.reset(!0)}l.keys=function(H){var W=[];for(var z in H)W.push(z);return W.reverse(),function U(){for(;W.length;){var B=W.pop();if(B in H)return U.value=B,U.done=!1,U}return U.done=!0,U}};function I(H){if(H){var W=H[h];if(W)return W.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var z=-1,U=function B(){for(;++z<H.length;)if(C.call(H,z))return B.value=H[z],B.done=!1,B;return B.value=D,B.done=!0,B};return U.next=U}}return{next:G}}l.values=I;function G(){return{value:D,done:!0}}N.prototype={constructor:N,reset:function(H){if(this.prev=0,this.next=0,this.sent=this._sent=D,this.done=!1,this.delegate=null,this.method="next",this.arg=D,this.tryEntries.forEach(M),!H)for(var W in this)W.charAt(0)==="t"&&C.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=D)},stop:function(){this.done=!0;var H=this.tryEntries[0],W=H.completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(H){if(this.done)throw H;var W=this;function z(se,we){return K.type="throw",K.arg=H,W.next=se,we&&(W.method="next",W.arg=D),!!we}for(var U=this.tryEntries.length-1;U>=0;--U){var B=this.tryEntries[U],K=B.completion;if(B.tryLoc==="root")return z("end");if(B.tryLoc<=this.prev){var q=C.call(B,"catchLoc"),ae=C.call(B,"finallyLoc");if(q&&ae){if(this.prev<B.catchLoc)return z(B.catchLoc,!0);if(this.prev<B.finallyLoc)return z(B.finallyLoc)}else if(q){if(this.prev<B.catchLoc)return z(B.catchLoc,!0)}else if(ae){if(this.prev<B.finallyLoc)return z(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(H,W){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U.tryLoc<=this.prev&&C.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var B=U;break}}B&&(H==="break"||H==="continue")&&B.tryLoc<=W&&W<=B.finallyLoc&&(B=null);var K=B?B.completion:{};return K.type=H,K.arg=W,B?(this.method="next",this.next=B.finallyLoc,b):this.complete(K)},complete:function(H,W){if(H.type==="throw")throw H.arg;return H.type==="break"||H.type==="continue"?this.next=H.arg:H.type==="return"?(this.rval=this.arg=H.arg,this.method="return",this.next="end"):H.type==="normal"&&W&&(this.next=W),b},finish:function(H){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.finallyLoc===H)return this.complete(z.completion,z.afterLoc),M(z),b}},catch:function(H){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.tryLoc===H){var U=z.completion;if(U.type==="throw"){var B=U.arg;M(z)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(H,W,z){return this.delegate={iterator:I(H),resultName:W,nextLoc:z},this.method==="next"&&(this.arg=D),b}}}(function(){return this}()||Function("return this")())},{}],228:[function(j,J,k){var L=j("buffer"),f=L.Buffer;function C(u,h){for(var w in u)h[w]=u[w]}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?J.exports=L:(C(L,k),k.Buffer=D);function D(u,h,w){return f(u,h,w)}C(f,D),D.from=function(u,h,w){if(typeof u=="number")throw new TypeError("Argument must not be a number");return f(u,h,w)},D.alloc=function(u,h,w){if(typeof u!="number")throw new TypeError("Argument must be a number");var d=f(u);return h!==void 0?typeof w=="string"?d.fill(h,w):d.fill(h):d.fill(0),d},D.allocUnsafe=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return f(u)},D.allocUnsafeSlow=function(u){if(typeof u!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(u)}},{buffer:73}],229:[function(j,J,k){(function(L){"use strict";var f=j("babel-runtime/core-js/string/from-code-point"),C=c(f),D=j("babel-runtime/core-js/json/stringify"),u=c(D),h=j("babel-runtime/helpers/typeof"),w=c(h),d=j("babel-runtime/core-js/object/define-property"),i=c(d),l=j("babel-runtime/core-js/object/keys"),a=c(l),_=j("babel-runtime/core-js/object/create"),p=c(_);function c(m){return m&&m.__esModule?m:{default:m}}(function(m){m.parser=function(X,Y){return new b(X,Y)},m.SAXParser=b,m.SAXStream=P,m.createStream=s,m.MAX_BUFFER_LENGTH=64*1024;var g=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];m.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function b(X,Y){if(!(this instanceof b))return new b(X,Y);var ve=this;o(ve),ve.q=ve.c="",ve.bufferCheckPosition=m.MAX_BUFFER_LENGTH,ve.opt=Y||{},ve.opt.lowercase=ve.opt.lowercase||ve.opt.lowercasetags,ve.looseCase=ve.opt.lowercase?"toLowerCase":"toUpperCase",ve.tags=[],ve.closed=ve.closedRoot=ve.sawRoot=!1,ve.tag=ve.error=null,ve.strict=!!X,ve.noscript=!!(X||ve.opt.noscript),ve.state=K.BEGIN,ve.strictEntities=ve.opt.strictEntities,ve.ENTITIES=ve.strictEntities?(0,p.default)(m.XML_ENTITIES):(0,p.default)(m.ENTITIES),ve.attribList=[],ve.opt.xmlns&&(ve.ns=(0,p.default)(T)),ve.trackPosition=ve.opt.position!==!1,ve.trackPosition&&(ve.position=ve.line=ve.column=0),ae(ve,"onready")}p.default||(Object.create=function(X){function Y(){}Y.prototype=X;var ve=new Y;return ve}),a.default||(Object.keys=function(X){var Y=[];for(var ve in X)X.hasOwnProperty(ve)&&Y.push(ve);return Y});function n(X){for(var Y=Math.max(m.MAX_BUFFER_LENGTH,10),ve=0,ue=0,Ee=g.length;ue<Ee;ue++){var Ke=X[g[ue]].length;if(Ke>Y)switch(g[ue]){case"textNode":we(X);break;case"cdata":se(X,"oncdata",X.cdata),X.cdata="";break;case"script":se(X,"onscript",X.script),X.script="";break;default:de(X,"Max buffer length exceeded: "+g[ue])}ve=Math.max(ve,Ke)}var Ye=m.MAX_BUFFER_LENGTH-ve;X.bufferCheckPosition=Ye+X.position}function o(X){for(var Y=0,ve=g.length;Y<ve;Y++)X[g[Y]]=""}function t(X){we(X),X.cdata!==""&&(se(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(se(X,"onscript",X.script),X.script="")}b.prototype={end:function(){xe(this)},write:$,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){t(this)}};var S;try{S=j("stream").Stream}catch(X){S=function(){}}var x=m.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function s(X,Y){return new P(X,Y)}function P(X,Y){if(!(this instanceof P))return new P(X,Y);S.apply(this),this._parser=new b(X,Y),this.writable=!0,this.readable=!0;var ve=this;this._parser.onend=function(){ve.emit("end")},this._parser.onerror=function(ue){ve.emit("error",ue),ve._parser.error=null},this._decoder=null,x.forEach(function(ue){(0,i.default)(ve,"on"+ue,{get:function(){return ve._parser["on"+ue]},set:function(Ke){if(!Ke)return ve.removeAllListeners(ue),ve._parser["on"+ue]=Ke,Ke;ve.on(ue,Ke)},enumerable:!0,configurable:!1})})}P.prototype=(0,p.default)(S.prototype,{constructor:{value:P}}),P.prototype.write=function(X){if(typeof L=="function"&&typeof L.isBuffer=="function"&&L.isBuffer(X)){if(!this._decoder){var Y=j("string_decoder").StringDecoder;this._decoder=new Y("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},P.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},P.prototype.on=function(X,Y){var ve=this;return!ve._parser["on"+X]&&x.indexOf(X)!==-1&&(ve._parser["on"+X]=function(){var ue=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ue.splice(0,0,X),ve.emit.apply(ve,ue)}),S.prototype.on.call(ve,X,Y)};var O="[CDATA[",E="DOCTYPE",v="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",T={xml:v,xmlns:y},M=/[:_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]/,N=/[:_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-]/,I=/[#:_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]/,G=/[#:_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 H(X){return X===" "||X===`
`||X==="\r"||X===" "}function W(X){return X==='"'||X==="'"}function z(X){return X===">"||H(X)}function U(X,Y){return X.test(Y)}function B(X,Y){return!U(X,Y)}var K=0;m.STATE={BEGIN:K++,BEGIN_WHITESPACE:K++,TEXT:K++,TEXT_ENTITY:K++,OPEN_WAKA:K++,SGML_DECL:K++,SGML_DECL_QUOTED:K++,DOCTYPE:K++,DOCTYPE_QUOTED:K++,DOCTYPE_DTD:K++,DOCTYPE_DTD_QUOTED:K++,COMMENT_STARTING:K++,COMMENT:K++,COMMENT_ENDING:K++,COMMENT_ENDED:K++,CDATA:K++,CDATA_ENDING:K++,CDATA_ENDING_2:K++,PROC_INST:K++,PROC_INST_BODY:K++,PROC_INST_ENDING:K++,OPEN_TAG:K++,OPEN_TAG_SLASH:K++,ATTRIB:K++,ATTRIB_NAME:K++,ATTRIB_NAME_SAW_WHITE:K++,ATTRIB_VALUE:K++,ATTRIB_VALUE_QUOTED:K++,ATTRIB_VALUE_CLOSED:K++,ATTRIB_VALUE_UNQUOTED:K++,ATTRIB_VALUE_ENTITY_Q:K++,ATTRIB_VALUE_ENTITY_U:K++,CLOSE_TAG:K++,CLOSE_TAG_SAW_WHITE:K++,SCRIPT:K++,SCRIPT_ENDING:K++},m.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},m.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)(m.ENTITIES).forEach(function(X){var Y=m.ENTITIES[X],ve=typeof Y=="number"?String.fromCharCode(Y):Y;m.ENTITIES[X]=ve});for(var q in m.STATE)m.STATE[m.STATE[q]]=q;K=m.STATE;function ae(X,Y,ve){X[Y]&&X[Y](ve)}function se(X,Y,ve){X.textNode&&we(X),ae(X,Y,ve)}function we(X){X.textNode=Te(X.opt,X.textNode),X.textNode&&ae(X,"ontext",X.textNode),X.textNode=""}function Te(X,Y){return X.trim&&(Y=Y.trim()),X.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function de(X,Y){return we(X),X.trackPosition&&(Y+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),Y=new Error(Y),X.error=Y,ae(X,"onerror",Y),X}function xe(X){return X.sawRoot&&!X.closedRoot&&pe(X,"Unclosed root tag"),X.state!==K.BEGIN&&X.state!==K.BEGIN_WHITESPACE&&X.state!==K.TEXT&&de(X,"Unexpected end"),we(X),X.c="",X.closed=!0,ae(X,"onend"),b.call(X,X.strict,X.opt),X}function pe(X,Y){if((typeof X=="undefined"?"undefined":(0,w.default)(X))!=="object"||!(X instanceof b))throw new Error("bad call to strictFail");X.strict&&de(X,Y)}function ne(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Y=X.tags[X.tags.length-1]||X,ve=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(ve.ns=Y.ns),X.attribList.length=0,se(X,"onopentagstart",ve)}function ie(X,Y){var ve=X.indexOf(":"),ue=ve<0?["",X]:X.split(":"),Ee=ue[0],Ke=ue[1];return Y&&X==="xmlns"&&(Ee="xmlns",Ke=""),{prefix:Ee,local:Ke}}function ee(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var Y=ie(X.attribName,!0),ve=Y.prefix,ue=Y.local;if(ve==="xmlns")if(ue==="xml"&&X.attribValue!==v)pe(X,"xml: prefix must be bound to "+v+`
Actual: `+X.attribValue);else if(ue==="xmlns"&&X.attribValue!==y)pe(X,"xmlns: prefix must be bound to "+y+`
Actual: `+X.attribValue);else{var Ee=X.tag,Ke=X.tags[X.tags.length-1]||X;Ee.ns===Ke.ns&&(Ee.ns=(0,p.default)(Ke.ns)),Ee.ns[ue]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,se(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function le(X,Y){if(X.opt.xmlns){var ve=X.tag,ue=ie(X.tagName);ve.prefix=ue.prefix,ve.local=ue.local,ve.uri=ve.ns[ue.prefix]||"",ve.prefix&&!ve.uri&&(pe(X,"Unbound namespace prefix: "+(0,u.default)(X.tagName)),ve.uri=ue.prefix);var Ee=X.tags[X.tags.length-1]||X;ve.ns&&Ee.ns!==ve.ns&&(0,a.default)(ve.ns).forEach(function(Ge){se(X,"onopennamespace",{prefix:Ge,uri:ve.ns[Ge]})});for(var Ke=0,Ye=X.attribList.length;Ke<Ye;Ke++){var Je=X.attribList[Ke],tt=Je[0],at=Je[1],lt=ie(tt,!0),je=lt.prefix,Ce=lt.local,Qe=je===""?"":ve.ns[je]||"",st={name:tt,value:at,prefix:je,local:Ce,uri:Qe};je&&je!=="xmlns"&&!Qe&&(pe(X,"Unbound namespace prefix: "+(0,u.default)(je)),st.uri=je),X.tag.attributes[tt]=st,se(X,"onattribute",st)}X.attribList.length=0}X.tag.isSelfClosing=!!Y,X.sawRoot=!0,X.tags.push(X.tag),se(X,"onopentag",X.tag),Y||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=K.SCRIPT:X.state=K.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function Q(X){if(!X.tagName){pe(X,"Weird empty close tag."),X.textNode+="</>",X.state=K.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=K.SCRIPT;return}se(X,"onscript",X.script),X.script=""}var Y=X.tags.length,ve=X.tagName;X.strict||(ve=ve[X.looseCase]());for(var ue=ve;Y--;){var Ee=X.tags[Y];if(Ee.name!==ue)pe(X,"Unexpected close tag");else break}if(Y<0){pe(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=K.TEXT;return}X.tagName=ve;for(var Ke=X.tags.length;Ke-- >Y;){var Ye=X.tag=X.tags.pop();X.tagName=X.tag.name,se(X,"onclosetag",X.tagName);var Je={};for(var tt in Ye.ns)Je[tt]=Ye.ns[tt];var at=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Ye.ns!==at.ns&&(0,a.default)(Ye.ns).forEach(function(lt){var je=Ye.ns[lt];se(X,"onclosenamespace",{prefix:lt,uri:je})})}Y===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=K.TEXT}function Z(X){var Y=X.entity,ve=Y.toLowerCase(),ue,Ee="";return X.ENTITIES[Y]?X.ENTITIES[Y]:X.ENTITIES[ve]?X.ENTITIES[ve]:(Y=ve,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),ue=parseInt(Y,16),Ee=ue.toString(16)):(Y=Y.slice(1),ue=parseInt(Y,10),Ee=ue.toString(10))),Y=Y.replace(/^0+/,""),isNaN(ue)||Ee.toLowerCase()!==Y?(pe(X,"Invalid character entity"),"&"+X.entity+";"):(0,C.default)(ue))}function be(X,Y){Y==="<"?(X.state=K.OPEN_WAKA,X.startTagPosition=X.position):H(Y)||(pe(X,"Non-whitespace before first tag."),X.textNode=Y,X.state=K.TEXT)}function te(X,Y){var ve="";return Y<X.length&&(ve=X.charAt(Y)),ve}function $(X){var Y=this;if(this.error)throw this.error;if(Y.closed)return de(Y,"Cannot write after close. Assign an onready handler.");if(X===null)return xe(Y);(typeof X=="undefined"?"undefined":(0,w.default)(X))==="object"&&(X=X.toString());for(var ve=0,ue="";!(ue=te(X,ve++),Y.c=ue,!ue);){Y.trackPosition&&(Y.position++,ue===`
`?(Y.line++,Y.column=0):Y.column++);switch(Y.state){case K.BEGIN:if(Y.state=K.BEGIN_WHITESPACE,ue==="\uFEFF")continue;be(Y,ue);continue;case K.BEGIN_WHITESPACE:be(Y,ue);continue;case K.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var Ee=ve-1;ue&&ue!=="<"&&ue!=="&";)ue=te(X,ve++),ue&&Y.trackPosition&&(Y.position++,ue===`
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=X.substring(Ee,ve-1)}ue==="<"&&!(Y.sawRoot&&Y.closedRoot&&!Y.strict)?(Y.state=K.OPEN_WAKA,Y.startTagPosition=Y.position):(!H(ue)&&(!Y.sawRoot||Y.closedRoot)&&pe(Y,"Text data outside of root node."),ue==="&"?Y.state=K.TEXT_ENTITY:Y.textNode+=ue);continue;case K.SCRIPT:ue==="<"?Y.state=K.SCRIPT_ENDING:Y.script+=ue;continue;case K.SCRIPT_ENDING:ue==="/"?Y.state=K.CLOSE_TAG:(Y.script+="<"+ue,Y.state=K.SCRIPT);continue;case K.OPEN_WAKA:if(ue==="!")Y.state=K.SGML_DECL,Y.sgmlDecl="";else if(!H(ue))if(U(M,ue))Y.state=K.OPEN_TAG,Y.tagName=ue;else if(ue==="/")Y.state=K.CLOSE_TAG,Y.tagName="";else if(ue==="?")Y.state=K.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(pe(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var Ke=Y.position-Y.startTagPosition;ue=new Array(Ke).join(" ")+ue}Y.textNode+="<"+ue,Y.state=K.TEXT}continue;case K.SGML_DECL:(Y.sgmlDecl+ue).toUpperCase()===O?(se(Y,"onopencdata"),Y.state=K.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+ue==="--"?(Y.state=K.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+ue).toUpperCase()===E?(Y.state=K.DOCTYPE,(Y.doctype||Y.sawRoot)&&pe(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):ue===">"?(se(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=K.TEXT):(W(ue)&&(Y.state=K.SGML_DECL_QUOTED),Y.sgmlDecl+=ue);continue;case K.SGML_DECL_QUOTED:ue===Y.q&&(Y.state=K.SGML_DECL,Y.q=""),Y.sgmlDecl+=ue;continue;case K.DOCTYPE:ue===">"?(Y.state=K.TEXT,se(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=ue,ue==="["?Y.state=K.DOCTYPE_DTD:W(ue)&&(Y.state=K.DOCTYPE_QUOTED,Y.q=ue));continue;case K.DOCTYPE_QUOTED:Y.doctype+=ue,ue===Y.q&&(Y.q="",Y.state=K.DOCTYPE);continue;case K.DOCTYPE_DTD:Y.doctype+=ue,ue==="]"?Y.state=K.DOCTYPE:W(ue)&&(Y.state=K.DOCTYPE_DTD_QUOTED,Y.q=ue);continue;case K.DOCTYPE_DTD_QUOTED:Y.doctype+=ue,ue===Y.q&&(Y.state=K.DOCTYPE_DTD,Y.q="");continue;case K.COMMENT:ue==="-"?Y.state=K.COMMENT_ENDING:Y.comment+=ue;continue;case K.COMMENT_ENDING:ue==="-"?(Y.state=K.COMMENT_ENDED,Y.comment=Te(Y.opt,Y.comment),Y.comment&&se(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+ue,Y.state=K.COMMENT);continue;case K.COMMENT_ENDED:ue!==">"?(pe(Y,"Malformed comment"),Y.comment+="--"+ue,Y.state=K.COMMENT):Y.state=K.TEXT;continue;case K.CDATA:ue==="]"?Y.state=K.CDATA_ENDING:Y.cdata+=ue;continue;case K.CDATA_ENDING:ue==="]"?Y.state=K.CDATA_ENDING_2:(Y.cdata+="]"+ue,Y.state=K.CDATA);continue;case K.CDATA_ENDING_2:ue===">"?(Y.cdata&&se(Y,"oncdata",Y.cdata),se(Y,"onclosecdata"),Y.cdata="",Y.state=K.TEXT):ue==="]"?Y.cdata+="]":(Y.cdata+="]]"+ue,Y.state=K.CDATA);continue;case K.PROC_INST:ue==="?"?Y.state=K.PROC_INST_ENDING:H(ue)?Y.state=K.PROC_INST_BODY:Y.procInstName+=ue;continue;case K.PROC_INST_BODY:if(!Y.procInstBody&&H(ue))continue;ue==="?"?Y.state=K.PROC_INST_ENDING:Y.procInstBody+=ue;continue;case K.PROC_INST_ENDING:ue===">"?(se(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=K.TEXT):(Y.procInstBody+="?"+ue,Y.state=K.PROC_INST_BODY);continue;case K.OPEN_TAG:U(N,ue)?Y.tagName+=ue:(ne(Y),ue===">"?le(Y):ue==="/"?Y.state=K.OPEN_TAG_SLASH:(H(ue)||pe(Y,"Invalid character in tag name"),Y.state=K.ATTRIB));continue;case K.OPEN_TAG_SLASH:ue===">"?(le(Y,!0),Q(Y)):(pe(Y,"Forward-slash in opening tag not followed by >"),Y.state=K.ATTRIB);continue;case K.ATTRIB:if(H(ue))continue;ue===">"?le(Y):ue==="/"?Y.state=K.OPEN_TAG_SLASH:U(M,ue)?(Y.attribName=ue,Y.attribValue="",Y.state=K.ATTRIB_NAME):pe(Y,"Invalid attribute name");continue;case K.ATTRIB_NAME:ue==="="?Y.state=K.ATTRIB_VALUE:ue===">"?(pe(Y,"Attribute without value"),Y.attribValue=Y.attribName,ee(Y),le(Y)):H(ue)?Y.state=K.ATTRIB_NAME_SAW_WHITE:U(N,ue)?Y.attribName+=ue:pe(Y,"Invalid attribute name");continue;case K.ATTRIB_NAME_SAW_WHITE:if(ue==="=")Y.state=K.ATTRIB_VALUE;else{if(H(ue))continue;pe(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",se(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",ue===">"?le(Y):U(M,ue)?(Y.attribName=ue,Y.state=K.ATTRIB_NAME):(pe(Y,"Invalid attribute name"),Y.state=K.ATTRIB)}continue;case K.ATTRIB_VALUE:if(H(ue))continue;W(ue)?(Y.q=ue,Y.state=K.ATTRIB_VALUE_QUOTED):(pe(Y,"Unquoted attribute value"),Y.state=K.ATTRIB_VALUE_UNQUOTED,Y.attribValue=ue);continue;case K.ATTRIB_VALUE_QUOTED:if(ue!==Y.q){ue==="&"?Y.state=K.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=ue;continue}ee(Y),Y.q="",Y.state=K.ATTRIB_VALUE_CLOSED;continue;case K.ATTRIB_VALUE_CLOSED:H(ue)?Y.state=K.ATTRIB:ue===">"?le(Y):ue==="/"?Y.state=K.OPEN_TAG_SLASH:U(M,ue)?(pe(Y,"No whitespace between attributes"),Y.attribName=ue,Y.attribValue="",Y.state=K.ATTRIB_NAME):pe(Y,"Invalid attribute name");continue;case K.ATTRIB_VALUE_UNQUOTED:if(!z(ue)){ue==="&"?Y.state=K.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=ue;continue}ee(Y),ue===">"?le(Y):Y.state=K.ATTRIB;continue;case K.CLOSE_TAG:if(Y.tagName)ue===">"?Q(Y):U(N,ue)?Y.tagName+=ue:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=K.SCRIPT):(H(ue)||pe(Y,"Invalid tagname in closing tag"),Y.state=K.CLOSE_TAG_SAW_WHITE);else{if(H(ue))continue;B(M,ue)?Y.script?(Y.script+="</"+ue,Y.state=K.SCRIPT):pe(Y,"Invalid tagname in closing tag."):Y.tagName=ue}continue;case K.CLOSE_TAG_SAW_WHITE:if(H(ue))continue;ue===">"?Q(Y):pe(Y,"Invalid characters in closing tag");continue;case K.TEXT_ENTITY:case K.ATTRIB_VALUE_ENTITY_Q:case K.ATTRIB_VALUE_ENTITY_U:var Ye,Je;switch(Y.state){case K.TEXT_ENTITY:Ye=K.TEXT,Je="textNode";break;case K.ATTRIB_VALUE_ENTITY_Q:Ye=K.ATTRIB_VALUE_QUOTED,Je="attribValue";break;case K.ATTRIB_VALUE_ENTITY_U:Ye=K.ATTRIB_VALUE_UNQUOTED,Je="attribValue";break}ue===";"?(Y[Je]+=Z(Y),Y.entity="",Y.state=Ye):U(Y.entity.length?G:I,ue)?Y.entity+=ue:(pe(Y,"Invalid character in entity name"),Y[Je]+="&"+Y.entity+ue,Y.entity="",Y.state=Ye);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}}return Y.position>=Y.bufferCheckPosition&&n(Y),Y}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var X=String.fromCharCode,Y=Math.floor,ve=function(){var Ee=16384,Ke=[],Ye,Je,tt=-1,at=arguments.length;if(!at)return"";for(var lt="";++tt<at;){var je=Number(arguments[tt]);if(!isFinite(je)||je<0||je>1114111||Y(je)!==je)throw RangeError("Invalid code point: "+je);je<=65535?Ke.push(je):(je-=65536,Ye=(je>>10)+55296,Je=je%1024+56320,Ke.push(Ye,Je)),(tt+1===at||Ke.length>Ee)&&(lt+=X.apply(null,Ke),Ke.length=0)}return lt};i.default?Object.defineProperty(String,"fromCodePoint",{value:ve,configurable:!0,writable:!0}):String.fromCodePoint=ve}()})(typeof k=="undefined"?(void 0).sax={}:k)}).call(this,j("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(j,J,k){J.exports=C;var L=j("events").EventEmitter,f=j("inherits");f(C,L),C.Readable=j("readable-stream/readable.js"),C.Writable=j("readable-stream/writable.js"),C.Duplex=j("readable-stream/duplex.js"),C.Transform=j("readable-stream/transform.js"),C.PassThrough=j("readable-stream/passthrough.js"),C.Stream=C;function C(){L.call(this)}C.prototype.pipe=function(D,u){var h=this;function w(c){D.writable&&(D.write(c)===!1&&h.pause&&h.pause())}h.on("data",w);function d(){h.readable&&h.resume&&h.resume()}D.on("drain",d),!D._isStdio&&(!u||u.end!==!1)&&(h.on("end",l),h.on("close",a));var i=!1;function l(){if(i)return;i=!0,D.end()}function a(){if(i)return;i=!0,typeof D.destroy=="function"&&D.destroy()}function _(c){if(p(),L.listenerCount(this,"error")===0)throw c}h.on("error",_),D.on("error",_);function p(){h.removeListener("data",w),D.removeListener("drain",d),h.removeListener("end",l),h.removeListener("close",a),h.removeListener("error",_),D.removeListener("error",_),h.removeListener("end",p),h.removeListener("close",p),D.removeListener("close",p)}return h.on("end",p),h.on("close",p),D.on("close",p),D.emit("pipe",h),D}},{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(j,J,k){(function(L){var f=j("./lib/request"),C=j("./lib/response"),D=j("xtend"),u=j("builtin-status-codes"),h=j("url"),w=k;w.request=function(d,i){typeof d=="string"?d=h.parse(d):d=D(d);var l=L.location.protocol.search(/^https?:$/)===-1?"http:":"",a=d.protocol||l,_=d.hostname||d.host,p=d.port,c=d.path||"/";_&&_.indexOf(":")!==-1&&(_="["+_+"]"),d.url=(_?a+"//"+_:"")+(p?":"+p:"")+c,d.method=(d.method||"GET").toUpperCase(),d.headers=d.headers||{};var m=new f(d);return i&&m.on("response",i),m},w.get=function(i,l){var a=w.request(i,l);return a.end(),a},w.ClientRequest=f,w.IncomingMessage=C.IncomingMessage,w.Agent=function(){},w.Agent.defaultMaxSockets=4,w.globalAgent=new w.Agent,w.STATUS_CODES=u,w.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(j,J,k){(function(L){"use strict";k.fetch=w(L.fetch)&&w(L.ReadableStream),k.writableStream=w(L.WritableStream),k.abortController=w(L.AbortController),k.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),k.blobConstructor=!0}catch(d){}var f;function C(){if(f!==void 0)return f;if(L.XMLHttpRequest){f=new L.XMLHttpRequest;try{f.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(d){f=null}}else f=null;return f}function D(d){var i=C();if(!i)return!1;try{return i.responseType=d,i.responseType===d}catch(l){}return!1}var u=typeof L.ArrayBuffer!="undefined",h=u&&w(L.ArrayBuffer.prototype.slice);k.arraybuffer=k.fetch||u&&D("arraybuffer"),k.msstream=!k.fetch&&h&&D("ms-stream"),k.mozchunkedarraybuffer=!k.fetch&&u&&D("moz-chunked-arraybuffer"),k.overrideMimeType=k.fetch||(C()?w(C().overrideMimeType):!1),k.vbArray=w(L.VBArray);function w(d){return typeof d=="function"}f=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(j,J,k){(function(L,f,C){"use strict";var D=j("babel-runtime/core-js/object/keys"),u=h(D);function h(n){return n&&n.__esModule?n:{default:n}}var w=j("./capability"),d=j("inherits"),i=j("./response"),l=j("readable-stream"),a=j("to-arraybuffer"),_=i.IncomingMessage,p=i.readyStates;function c(n,o){return w.fetch&&o?"fetch":w.mozchunkedarraybuffer?"moz-chunked-arraybuffer":w.msstream?"ms-stream":w.arraybuffer&&n?"arraybuffer":w.vbArray&&n?"text:vbarray":"text"}var m=J.exports=function(n){var o=this;l.Writable.call(o),o._opts=n,o._body=[],o._headers={},n.auth&&o.setHeader("Authorization","Basic "+new C(n.auth).toString("base64")),(0,u.default)(n.headers).forEach(function(x){o.setHeader(x,n.headers[x])});var t,S=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!w.abortController)S=!1,t=!0;else if(n.mode==="prefer-streaming")t=!1;else if(n.mode==="allow-wrong-content-type")t=!w.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")t=!0;else throw new Error("Invalid value for opts.mode");o._mode=c(t,S),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};d(m,l.Writable),m.prototype.setHeader=function(n,o){var t=this,S=n.toLowerCase();if(b.indexOf(S)!==-1)return;t._headers[S]={name:n,value:o}},m.prototype.getHeader=function(n){var o=this._headers[n.toLowerCase()];return o?o.value:null},m.prototype.removeHeader=function(n){var o=this;delete o._headers[n.toLowerCase()]},m.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var o=n._opts,t=n._headers,S=null;o.method!=="GET"&&o.method!=="HEAD"&&(w.arraybuffer?S=a(C.concat(n._body)):w.blobConstructor?S=new f.Blob(n._body.map(function(v){return a(v)}),{type:(t["content-type"]||{}).value||""}):S=C.concat(n._body).toString());var x=[];if((0,u.default)(t).forEach(function(v){var y=t[v].name,T=t[v].value;Array.isArray(T)?T.forEach(function(M){x.push([y,M])}):x.push([y,T])}),n._mode==="fetch"){var s=null,P=null;if(w.abortController){var O=new AbortController;s=O.signal,n._fetchAbortController=O,"requestTimeout"in o&&o.requestTimeout!==0&&(n._fetchTimer=f.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},o.requestTimeout))}f.fetch(n._opts.url,{method:n._opts.method,headers:x,body:S||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:s}).then(function(v){n._fetchResponse=v,n._connect()},function(v){f.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",v)})}else{var E=n._xhr=new f.XMLHttpRequest;try{E.open(n._opts.method,n._opts.url,!0)}catch(v){L.nextTick(function(){n.emit("error",v)});return}"responseType"in E&&(E.responseType=n._mode.split(":")[0]),"withCredentials"in E&&(E.withCredentials=!!o.withCredentials),n._mode==="text"&&"overrideMimeType"in E&&E.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(E.timeout=o.requestTimeout,E.ontimeout=function(){n.emit("requestTimeout")}),x.forEach(function(v){E.setRequestHeader(v[0],v[1])}),n._response=null,E.onreadystatechange=function(){switch(E.readyState){case p.LOADING:case p.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(E.onprogress=function(){n._onXHRProgress()}),E.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{E.send(S)}catch(v){L.nextTick(function(){n.emit("error",v)});return}}};function g(n){try{var o=n.status;return o!==null&&o!==0}catch(t){return!1}}m.prototype._onXHRProgress=function(){var n=this;if(!g(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},m.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new _(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(o){n.emit("error",o)}),n.emit("response",n._response)},m.prototype._write=function(n,o,t){var S=this;S._body.push(n),t()},m.prototype.abort=m.prototype.destroy=function(){var n=this;n._destroyed=!0,f.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},m.prototype.end=function(n,o,t){var S=this;typeof n=="function"&&(t=n,n=void 0),l.Writable.prototype.end.call(S,n,o,t)},m.prototype.flushHeaders=function(){},m.prototype.setTimeout=function(){},m.prototype.setNoDelay=function(){},m.prototype.setSocketKeepAlive=function(){};var b=["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,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("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(j,J,k){(function(L,f,C){"use strict";var D=j("babel-runtime/core-js/promise"),u=h(D);function h(_){return _&&_.__esModule?_:{default:_}}var w=j("./capability"),d=j("inherits"),i=j("readable-stream"),l=k.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=k.IncomingMessage=function(_,p,c,m){var g=this;if(i.Readable.call(g),g._mode=c,g.headers={},g.rawHeaders=[],g.trailers={},g.rawTrailers=[],g.on("end",function(){L.nextTick(function(){g.emit("close")})}),c==="fetch"){var b=function s(){o.read().then(function(P){if(g._destroyed)return;if(P.done){f.clearTimeout(m),g.push(null);return}g.push(new C(P.value)),s()}).catch(function(P){f.clearTimeout(m),g._destroyed||g.emit("error",P)})};if(g._fetchResponse=p,g.url=p.url,g.statusCode=p.status,g.statusMessage=p.statusText,p.headers.forEach(function(s,P){g.headers[P.toLowerCase()]=s,g.rawHeaders.push(P,s)}),w.writableStream){var n=new WritableStream({write:function(P){return new u.default(function(O,E){g._destroyed?E():g.push(new C(P))?O():g._resumeFetch=O})},close:function(){f.clearTimeout(m),g._destroyed||g.push(null)},abort:function(P){g._destroyed||g.emit("error",P)}});try{p.body.pipeTo(n).catch(function(s){f.clearTimeout(m),g._destroyed||g.emit("error",s)});return}catch(s){}}var o=p.body.getReader();b()}else{g._xhr=_,g._pos=0,g.url=_.responseURL,g.statusCode=_.status,g.statusMessage=_.statusText;var t=_.getAllResponseHeaders().split(/\r?\n/);if(t.forEach(function(s){var P=s.match(/^([^:]+):\s*(.*)/);if(P){var O=P[1].toLowerCase();O==="set-cookie"?(g.headers[O]===void 0&&(g.headers[O]=[]),g.headers[O].push(P[2])):g.headers[O]!==void 0?g.headers[O]+=", "+P[2]:g.headers[O]=P[2],g.rawHeaders.push(P[1],P[2])}}),g._charset="x-user-defined",!w.overrideMimeType){var S=g.rawHeaders["mime-type"];if(S){var x=S.match(/;\s*charset=([^;])(;|$)/);x&&(g._charset=x[1].toLowerCase())}g._charset||(g._charset="utf-8")}}};d(a,i.Readable),a.prototype._read=function(){var _=this,p=_._resumeFetch;p&&(_._resumeFetch=null,p())},a.prototype._onXHRProgress=function(){var _=this,p=_._xhr,c=null;switch(_._mode){case"text:vbarray":if(p.readyState!==l.DONE)break;try{c=new f.VBArray(p.responseBody).toArray()}catch(o){}if(c!==null){_.push(new C(c));break}case"text":try{c=p.responseText}catch(o){_._mode="text:vbarray";break}if(c.length>_._pos){var m=c.substr(_._pos);if(_._charset==="x-user-defined"){for(var g=new C(m.length),b=0;b<m.length;b++)g[b]=m.charCodeAt(b)&255;_.push(g)}else _.push(m,_._charset);_._pos=c.length}break;case"arraybuffer":if(p.readyState!==l.DONE||!p.response)break;c=p.response,_.push(new C(new Uint8Array(c)));break;case"moz-chunked-arraybuffer":if(c=p.response,p.readyState!==l.LOADING||!c)break;_.push(new C(new Uint8Array(c)));break;case"ms-stream":if(c=p.response,p.readyState!==l.LOADING)break;var n=new f.MSStreamReader;n.onprogress=function(){n.result.byteLength>_._pos&&(_.push(new C(new Uint8Array(n.result.slice(_._pos)))),_._pos=n.result.byteLength)},n.onload=function(){_.push(null)},n.readAsArrayBuffer(c);break}_._xhr.readyState===l.DONE&&_._mode!=="ms-stream"&&_.push(null)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},j("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(j,J,k){"use strict";var L=j("safe-buffer").Buffer,f=L.isEncoding||function(n){n=""+n;switch(n&&n.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 C(n){if(!n)return"utf8";for(var o;;)switch(n){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 n;default:if(o)return;n=(""+n).toLowerCase(),o=!0}}function D(n){var o=C(n);if(typeof o!="string"&&(L.isEncoding===f||!f(n)))throw new Error("Unknown encoding: "+n);return o||n}k.StringDecoder=u;function u(n){this.encoding=D(n);var o;switch(this.encoding){case"utf16le":this.text=_,this.end=p,o=4;break;case"utf8":this.fillLast=i,o=4;break;case"base64":this.text=c,this.end=m,o=3;break;default:this.write=g,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(o)}u.prototype.write=function(n){if(n.length===0)return"";var o,t;if(this.lastNeed){if(o=this.fillLast(n),o===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<n.length?o?o+this.text(n,t):this.text(n,t):o||""},u.prototype.end=a,u.prototype.text=l,u.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function h(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function w(n,o,t){var S=o.length-1;if(S<t)return 0;var x=h(o[S]);return x>=0?(x>0&&(n.lastNeed=x-1),x):--S<t||x===-2?0:(x=h(o[S]),x>=0?(x>0&&(n.lastNeed=x-2),x):--S<t||x===-2?0:(x=h(o[S]),x>=0?(x>0&&(x===2?x=0:n.lastNeed=x-3),x):0))}function d(n,o,t){if((o[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function i(n){var o=this.lastTotal-this.lastNeed,t=d(this,n,o);if(t!==void 0)return t;if(this.lastNeed<=n.length)return n.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,o,0,n.length),this.lastNeed-=n.length}function l(n,o){var t=w(this,n,o);if(!this.lastNeed)return n.toString("utf8",o);this.lastTotal=t;var S=n.length-(t-this.lastNeed);return n.copy(this.lastChar,0,S),n.toString("utf8",o,S)}function a(n){var o=n&&n.length?this.write(n):"";return this.lastNeed?o+"\uFFFD":o}function _(n,o){if((n.length-o)%2===0){var t=n.toString("utf16le",o);if(t){var S=t.charCodeAt(t.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",o,n.length-1)}function p(n){var o=n&&n.length?this.write(n):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,t)}return o}function c(n,o){var t=(n.length-o)%3;return t===0?n.toString("base64",o):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",o,n.length-t))}function m(n){var o=n&&n.length?this.write(n):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function g(n){return n.toString(this.encoding)}function b(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(j,J,k){(function(L,f){var C=j("process/browser.js").nextTick,D=Function.prototype.apply,u=Array.prototype.slice,h={},w=0;k.setTimeout=function(){return new d(D.call(setTimeout,window,arguments),clearTimeout)},k.setInterval=function(){return new d(D.call(setInterval,window,arguments),clearInterval)},k.clearTimeout=k.clearInterval=function(i){i.close()};function d(i,l){this._id=i,this._clearFn=l}d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},k.enroll=function(i,l){clearTimeout(i._idleTimeoutId),i._idleTimeout=l},k.unenroll=function(i){clearTimeout(i._idleTimeoutId),i._idleTimeout=-1},k._unrefActive=k.active=function(i){clearTimeout(i._idleTimeoutId);var l=i._idleTimeout;l>=0&&(i._idleTimeoutId=setTimeout(function(){i._onTimeout&&i._onTimeout()},l))},k.setImmediate=typeof L=="function"?L:function(i){var l=w++,a=arguments.length<2?!1:u.call(arguments,1);return h[l]=!0,C(function(){h[l]&&(a?i.apply(null,a):i.call(null),k.clearImmediate(l))}),l},k.clearImmediate=typeof f=="function"?f:function(i){delete h[i]}}).call(this,j("timers").setImmediate,j("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(j,J,k){var L=j("buffer").Buffer;J.exports=function(f){if(f instanceof Uint8Array){if(f.byteOffset===0&&f.byteLength===f.buffer.byteLength)return f.buffer;if(typeof f.buffer.slice=="function")return f.buffer.slice(f.byteOffset,f.byteOffset+f.byteLength)}if(L.isBuffer(f)){for(var C=new Uint8Array(f.length),D=f.length,u=0;u<D;u++)C[u]=f[u];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(j,J,k){"use strict";var L=j("punycode"),f=j("./util");k.parse=o,k.resolve=S,k.resolveObject=x,k.format=t,k.Url=C;function C(){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 D=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["<",">",'"',"`"," ","\r",`
`," "],d=["{","}","|","\\","^","`"].concat(w),i=["'"].concat(d),l=["%","/","?",";","#"].concat(i),a=["/","?","#"],_=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=j("querystring");function o(s,P,O){if(s&&f.isObject(s)&&s instanceof C)return s;var E=new C;return E.parse(s,P,O),E}C.prototype.parse=function(s,P,O){if(!f.isString(s))throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var E=s.indexOf("?"),v=E!==-1&&E<s.indexOf("#")?"?":"#",y=s.split(v),T=/\\/g;y[0]=y[0].replace(T,"/"),s=y.join(v);var M=s;if(M=M.trim(),!O&&s.split("#").length===1){var N=h.exec(M);if(N)return this.path=M,this.href=M,this.pathname=N[1],N[2]?(this.search=N[2],P?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):P&&(this.search="",this.query={}),this}var I=D.exec(M);if(I){I=I[0];var G=I.toLowerCase();this.protocol=G,M=M.substr(I.length)}if(O||I||M.match(/^\/\/[^@\/]+@[^@\/]+/)){var H=M.substr(0,2)==="//";H&&!(I&&g[I])&&(M=M.substr(2),this.slashes=!0)}if(!g[I]&&(H||I&&!b[I])){for(var W=-1,z=0;z<a.length;z++){var U=M.indexOf(a[z]);U!==-1&&(W===-1||U<W)&&(W=U)}var B,K;W===-1?K=M.lastIndexOf("@"):K=M.lastIndexOf("@",W),K!==-1&&(B=M.slice(0,K),M=M.slice(K+1),this.auth=decodeURIComponent(B)),W=-1;for(var z=0;z<l.length;z++){var U=M.indexOf(l[z]);U!==-1&&(W===-1||U<W)&&(W=U)}W===-1&&(W=M.length),this.host=M.slice(0,W),M=M.slice(W),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var ae=this.hostname.split(/\./),z=0,se=ae.length;z<se;z++){var we=ae[z];if(!we)continue;if(!we.match(p)){for(var Te="",de=0,xe=we.length;de<xe;de++)we.charCodeAt(de)>127?Te+="x":Te+=we[de];if(!Te.match(p)){var pe=ae.slice(0,z),ne=ae.slice(z+1),ie=we.match(c);ie&&(pe.push(ie[1]),ne.unshift(ie[2])),ne.length&&(M="/"+ne.join(".")+M),this.hostname=pe.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=L.toASCII(this.hostname));var ee=this.port?":"+this.port:"",le=this.hostname||"";this.host=le+ee,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!m[G])for(var z=0,se=i.length;z<se;z++){var Q=i[z];if(M.indexOf(Q)===-1)continue;var Z=encodeURIComponent(Q);Z===Q&&(Z=escape(Q)),M=M.split(Q).join(Z)}var be=M.indexOf("#");be!==-1&&(this.hash=M.substr(be),M=M.slice(0,be));var te=M.indexOf("?");if(te!==-1?(this.search=M.substr(te),this.query=M.substr(te+1),P&&(this.query=n.parse(this.query)),M=M.slice(0,te)):P&&(this.search="",this.query={}),M&&(this.pathname=M),b[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ee=this.pathname||"",$=this.search||"";this.path=ee+$}return this.href=this.format(),this};function t(s){return f.isString(s)&&(s=o(s)),s instanceof C?s.format():C.prototype.format.call(s)}C.prototype.format=function(){var s=this.auth||"";s&&(s=encodeURIComponent(s),s=s.replace(/%3A/i,":"),s+="@");var P=this.protocol||"",O=this.pathname||"",E=this.hash||"",v=!1,y="";this.host?v=s+this.host:this.hostname&&(v=s+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(v+=":"+this.port)),this.query&&f.isObject(this.query)&&Object.keys(this.query).length&&(y=n.stringify(this.query));var T=this.search||y&&"?"+y||"";return P&&P.substr(-1)!==":"&&(P+=":"),this.slashes||(!P||b[P])&&v!==!1?(v="//"+(v||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):v||(v=""),E&&E.charAt(0)!=="#"&&(E="#"+E),T&&T.charAt(0)!=="?"&&(T="?"+T),O=O.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),T=T.replace("#","%23"),P+v+O+T+E};function S(s,P){return o(s,!1,!0).resolve(P)}C.prototype.resolve=function(s){return this.resolveObject(o(s,!1,!0)).format()};function x(s,P){return s?o(s,!1,!0).resolveObject(P):P}C.prototype.resolveObject=function(s){if(f.isString(s)){var P=new C;P.parse(s,!1,!0),s=P}for(var O=new C,E=Object.keys(this),v=0;v<E.length;v++){var y=E[v];O[y]=this[y]}if(O.hash=s.hash,s.href==="")return O.href=O.format(),O;if(s.slashes&&!s.protocol){for(var T=Object.keys(s),M=0;M<T.length;M++){var N=T[M];N!=="protocol"&&(O[N]=s[N])}return b[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(s.protocol&&s.protocol!==O.protocol){if(!b[s.protocol]){for(var I=Object.keys(s),G=0;G<I.length;G++){var H=I[G];O[H]=s[H]}return O.href=O.format(),O}if(O.protocol=s.protocol,!s.host&&!g[s.protocol]){for(var se=(s.pathname||"").split("/");se.length&&!(s.host=se.shift()););s.host||(s.host=""),s.hostname||(s.hostname=""),se[0]!==""&&se.unshift(""),se.length<2&&se.unshift(""),O.pathname=se.join("/")}else O.pathname=s.pathname;if(O.search=s.search,O.query=s.query,O.host=s.host||"",O.auth=s.auth,O.hostname=s.hostname||s.host,O.port=s.port,O.pathname||O.search){var W=O.pathname||"",z=O.search||"";O.path=W+z}return O.slashes=O.slashes||s.slashes,O.href=O.format(),O}var U=O.pathname&&O.pathname.charAt(0)==="/",B=s.host||s.pathname&&s.pathname.charAt(0)==="/",K=B||U||O.host&&s.pathname,q=K,ae=O.pathname&&O.pathname.split("/")||[],se=s.pathname&&s.pathname.split("/")||[],we=O.protocol&&!b[O.protocol];if(we&&(O.hostname="",O.port=null,O.host&&(ae[0]===""?ae[0]=O.host:ae.unshift(O.host)),O.host="",s.protocol&&(s.hostname=null,s.port=null,s.host&&(se[0]===""?se[0]=s.host:se.unshift(s.host)),s.host=null),K=K&&(se[0]===""||ae[0]==="")),B)O.host=s.host||s.host===""?s.host:O.host,O.hostname=s.hostname||s.hostname===""?s.hostname:O.hostname,O.search=s.search,O.query=s.query,ae=se;else if(se.length)ae||(ae=[]),ae.pop(),ae=ae.concat(se),O.search=s.search,O.query=s.query;else if(!f.isNullOrUndefined(s.search)){if(we){O.hostname=O.host=ae.shift();var Te=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Te&&(O.auth=Te.shift(),O.host=O.hostname=Te.shift())}return O.search=s.search,O.query=s.query,(!f.isNull(O.pathname)||!f.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ae.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var de=ae.slice(-1)[0],xe=(O.host||s.host||ae.length>1)&&(de==="."||de==="..")||de==="",pe=0,ne=ae.length;ne>=0;ne--)de=ae[ne],de==="."?ae.splice(ne,1):de===".."?(ae.splice(ne,1),pe++):pe&&(ae.splice(ne,1),pe--);if(!K&&!q)for(;pe--;pe)ae.unshift("..");K&&ae[0]!==""&&(!ae[0]||ae[0].charAt(0)!=="/")&&ae.unshift(""),xe&&ae.join("/").substr(-1)!=="/"&&ae.push("");var ie=ae[0]===""||ae[0]&&ae[0].charAt(0)==="/";if(we){O.hostname=O.host=ie?"":ae.length?ae.shift():"";var Te=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;Te&&(O.auth=Te.shift(),O.host=O.hostname=Te.shift())}return K=K||O.host&&ae.length,K&&!ie&&ae.unshift(""),ae.length?O.pathname=ae.join("/"):(O.pathname=null,O.path=null),(!f.isNull(O.pathname)||!f.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=s.auth||O.auth,O.slashes=O.slashes||s.slashes,O.href=O.format(),O},C.prototype.parseHost=function(){var s=this.host,P=u.exec(s);P&&(P=P[0],P!==":"&&(this.port=P.substr(1)),s=s.substr(0,s.length-P.length)),s&&(this.hostname=s)}},{"./util":239,punycode:209,querystring:212}],239:[function(j,J,k){"use strict";J.exports={isString:function(L){return typeof L=="string"},isObject:function(L){return typeof L=="object"&&L!==null},isNull:function(L){return L===null},isNullOrUndefined:function(L){return L==null}}},{}],240:[function(j,J,k){(function(L){J.exports=f;function f(D,u){if(C("noDeprecation"))return D;var h=!1;function w(){if(!h){if(C("throwDeprecation"))throw new Error(u);C("traceDeprecation")?console.trace(u):console.warn(u),h=!0}return D.apply(this,arguments)}return w}function C(D){try{if(!L.localStorage)return!1}catch(h){return!1}var u=L.localStorage[D];return u==null?!1:String(u).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(j,J,k){typeof Object.create=="function"?J.exports=function(f,C){f.super_=C,f.prototype=Object.create(C.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:J.exports=function(f,C){f.super_=C;var D=function(){};D.prototype=C.prototype,f.prototype=new D,f.prototype.constructor=f}},{}],242:[function(j,J,k){J.exports=function(f){return f&&typeof f=="object"&&typeof f.copy=="function"&&typeof f.fill=="function"&&typeof f.readUInt8=="function"}},{}],243:[function(j,J,k){(function(L,f){var C=/%[sdj%]/g;k.format=function(W){if(!S(W)){for(var z=[],U=0;U<arguments.length;U++)z.push(h(arguments[U]));return z.join(" ")}for(var U=1,B=arguments,K=B.length,q=String(W).replace(C,function(se){if(se==="%%")return"%";if(U>=K)return se;switch(se){case"%s":return String(B[U++]);case"%d":return Number(B[U++]);case"%j":try{return JSON.stringify(B[U++])}catch(we){return"[Circular]"}default:return se}}),ae=B[U];U<K;ae=B[++U])n(ae)||!O(ae)?q+=" "+ae:q+=" "+h(ae);return q},k.deprecate=function(W,z){if(s(f.process))return function(){return k.deprecate(W,z).apply(this,arguments)};if(L.noDeprecation===!0)return W;var U=!1;function B(){if(!U){if(L.throwDeprecation)throw new Error(z);L.traceDeprecation?console.trace(z):console.error(z),U=!0}return W.apply(this,arguments)}return B};var D={},u;k.debuglog=function(W){if(s(u)&&(u=L.env.NODE_DEBUG||""),W=W.toUpperCase(),!D[W])if(new RegExp("\\b"+W+"\\b","i").test(u)){var z=L.pid;D[W]=function(){var U=k.format.apply(k,arguments);console.error("%s %d: %s",W,z,U)}}else D[W]=function(){};return D[W]};function h(W,z){var U={seen:[],stylize:d};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),b(z)?U.showHidden=z:z&&k._extend(U,z),s(U.showHidden)&&(U.showHidden=!1),s(U.depth)&&(U.depth=2),s(U.colors)&&(U.colors=!1),s(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=w),l(U,W,U.depth)}k.inspect=h,h.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]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function w(W,z){var U=h.styles[z];return U?"["+h.colors[U][0]+"m"+W+"["+h.colors[U][1]+"m":W}function d(W,z){return W}function i(W){var z={};return W.forEach(function(U,B){z[U]=!0}),z}function l(W,z,U){if(W.customInspect&&z&&y(z.inspect)&&z.inspect!==k.inspect&&!(z.constructor&&z.constructor.prototype===z)){var B=z.inspect(U,W);return S(B)||(B=l(W,B,U)),B}var K=a(W,z);if(K)return K;var q=Object.keys(z),ae=i(q);if(W.showHidden&&(q=Object.getOwnPropertyNames(z)),v(z)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return _(z);if(q.length===0){if(y(z)){var se=z.name?": "+z.name:"";return W.stylize("[Function"+se+"]","special")}if(P(z))return W.stylize(RegExp.prototype.toString.call(z),"regexp");if(E(z))return W.stylize(Date.prototype.toString.call(z),"date");if(v(z))return _(z)}var we="",Te=!1,de=["{","}"];if(g(z)&&(Te=!0,de=["[","]"]),y(z)){var xe=z.name?": "+z.name:"";we=" [Function"+xe+"]"}if(P(z)&&(we=" "+RegExp.prototype.toString.call(z)),E(z)&&(we=" "+Date.prototype.toUTCString.call(z)),v(z)&&(we=" "+_(z)),q.length===0&&(!Te||z.length==0))return de[0]+we+de[1];if(U<0)return P(z)?W.stylize(RegExp.prototype.toString.call(z),"regexp"):W.stylize("[Object]","special");W.seen.push(z);var pe;return Te?pe=p(W,z,U,ae,q):pe=q.map(function(ne){return c(W,z,U,ae,ne,Te)}),W.seen.pop(),m(pe,we,de)}function a(W,z){if(s(z))return W.stylize("undefined","undefined");if(S(z)){var U="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(U,"string")}if(t(z))return W.stylize(""+z,"number");if(b(z))return W.stylize(""+z,"boolean");if(n(z))return W.stylize("null","null")}function _(W){return"["+Error.prototype.toString.call(W)+"]"}function p(W,z,U,B,K){for(var q=[],ae=0,se=z.length;ae<se;++ae)H(z,String(ae))?q.push(c(W,z,U,B,String(ae),!0)):q.push("");return K.forEach(function(we){we.match(/^\d+$/)||q.push(c(W,z,U,B,we,!0))}),q}function c(W,z,U,B,K,q){var ae,se,we;if(we=Object.getOwnPropertyDescriptor(z,K)||{value:z[K]},we.get?we.set?se=W.stylize("[Getter/Setter]","special"):se=W.stylize("[Getter]","special"):we.set&&(se=W.stylize("[Setter]","special")),H(B,K)||(ae="["+K+"]"),se||(W.seen.indexOf(we.value)<0?(n(U)?se=l(W,we.value,null):se=l(W,we.value,U-1),se.indexOf(`
`)>-1&&(q?se=se.split(`
`).map(function(Te){return" "+Te}).join(`
`).substr(2):se=`
`+se.split(`
`).map(function(Te){return" "+Te}).join(`
`))):se=W.stylize("[Circular]","special")),s(ae)){if(q&&K.match(/^\d+$/))return se;ae=JSON.stringify(""+K),ae.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ae=ae.substr(1,ae.length-2),ae=W.stylize(ae,"name")):(ae=ae.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ae=W.stylize(ae,"string"))}return ae+": "+se}function m(W,z,U){var B=0,K=W.reduce(function(q,ae){return B++,ae.indexOf(`
`)>=0&&B++,q+ae.replace(/\u001b\[\d\d?m/g,"").length+1},0);return K>60?U[0]+(z===""?"":z+`
`)+" "+W.join(`,
`)+" "+U[1]:U[0]+z+" "+W.join(", ")+" "+U[1]}function g(W){return Array.isArray(W)}k.isArray=g;function b(W){return typeof W=="boolean"}k.isBoolean=b;function n(W){return W===null}k.isNull=n;function o(W){return W==null}k.isNullOrUndefined=o;function t(W){return typeof W=="number"}k.isNumber=t;function S(W){return typeof W=="string"}k.isString=S;function x(W){return typeof W=="symbol"}k.isSymbol=x;function s(W){return W===void 0}k.isUndefined=s;function P(W){return O(W)&&M(W)==="[object RegExp]"}k.isRegExp=P;function O(W){return typeof W=="object"&&W!==null}k.isObject=O;function E(W){return O(W)&&M(W)==="[object Date]"}k.isDate=E;function v(W){return O(W)&&(M(W)==="[object Error]"||W instanceof Error)}k.isError=v;function y(W){return typeof W=="function"}k.isFunction=y;function T(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}k.isPrimitive=T,k.isBuffer=j("./support/isBuffer");function M(W){return Object.prototype.toString.call(W)}function N(W){return W<10?"0"+W.toString(10):W.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var W=new Date,z=[N(W.getHours()),N(W.getMinutes()),N(W.getSeconds())].join(":");return[W.getDate(),I[W.getMonth()],z].join(" ")}k.log=function(){console.log("%s - %s",G(),k.format.apply(k,arguments))},k.inherits=j("inherits"),k._extend=function(W,z){if(!z||!O(z))return W;for(var U=Object.keys(z),B=U.length;B--;)W[U[B]]=z[U[B]];return W};function H(W,z){return Object.prototype.hasOwnProperty.call(W,z)}}).call(this,j("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(j,J,k){"use strict";(function(){"use strict";k.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(j,J,k){"use strict";var L=j("babel-runtime/helpers/typeof"),f=u(L),C=j("babel-runtime/core-js/object/keys"),D=u(C);function u(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,w,d,i,l,a={}.hasOwnProperty;h=j("xmlbuilder"),w=j("./defaults").defaults,i=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},l=function(p){return"<![CDATA["+d(p)+"]]>"},d=function(p){return p.replace("]]>","]]]]><![CDATA[>")},k.Builder=function(){function _(p){var c,m,g;this.options={},m=w["0.2"];for(c in m){if(!a.call(m,c))continue;g=m[c],this.options[c]=g}for(c in p){if(!a.call(p,c))continue;g=p[c],this.options[c]=g}}return _.prototype.buildObject=function(p){var c,m,g,b,n;return c=this.options.attrkey,m=this.options.charkey,(0,D.default)(p).length===1&&this.options.rootName===w["0.2"].rootName?(n=(0,D.default)(p)[0],p=p[n]):n=this.options.rootName,g=function(o){return function(t,S){var x,s,P,O,E,v;if((typeof S=="undefined"?"undefined":(0,f.default)(S))!=="object")o.options.cdata&&i(S)?t.raw(l(S)):t.txt(S);else if(Array.isArray(S))for(O in S){if(!a.call(S,O))continue;s=S[O];for(E in s)P=s[E],t=g(t.ele(E),P).up()}else for(E in S){if(!a.call(S,E))continue;if(s=S[E],E===c){if((typeof s=="undefined"?"undefined":(0,f.default)(s))==="object")for(x in s)v=s[x],t=t.att(x,v)}else if(E===m)o.options.cdata&&i(s)?t=t.raw(l(s)):t=t.txt(s);else if(Array.isArray(s))for(O in s){if(!a.call(s,O))continue;P=s[O],typeof P=="string"?o.options.cdata&&i(P)?t=t.ele(E).raw(l(P)).up():t=t.ele(E,P).up():t=g(t.ele(E),P).up()}else(typeof s=="undefined"?"undefined":(0,f.default)(s))==="object"?t=g(t.ele(E),s).up():typeof s=="string"&&o.options.cdata&&i(s)?t=t.ele(E).raw(l(s)).up():(s==null&&(s=""),t=t.ele(E,s.toString()).up())}return t}}(this),b=h.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),g(b,p).end(this.options.renderOpts)},_}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(j,J,k){"use strict";(function(){k.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(j,J,k){"use strict";var L=j("babel-runtime/core-js/promise"),f=i(L),C=j("babel-runtime/core-js/object/get-own-property-names"),D=i(C),u=j("babel-runtime/core-js/object/keys"),h=i(u),w=j("babel-runtime/helpers/typeof"),d=i(w);function i(l){return l&&l.__esModule?l:{default:l}}(function(){"use strict";var l,a,_,p,c,m,g,b,n=function(x,s){return function(){return x.apply(s,arguments)}},o=function(x,s){for(var P in s)t.call(s,P)&&(x[P]=s[P]);function O(){this.constructor=x}return O.prototype=s.prototype,x.prototype=new O,x.__super__=s.prototype,x},t={}.hasOwnProperty;g=j("sax"),_=j("events"),l=j("./bom"),m=j("./processors"),b=j("timers").setImmediate,a=j("./defaults").defaults,p=function(x){return(typeof x=="undefined"?"undefined":(0,d.default)(x))==="object"&&x!=null&&(0,h.default)(x).length===0},c=function(x,s,P){var O,E,v;for(O=0,E=x.length;O<E;O++)v=x[O],s=v(s,P);return s},k.Parser=function(S){o(x,S);function x(s){this.parseStringPromise=n(this.parseStringPromise,this),this.parseString=n(this.parseString,this),this.reset=n(this.reset,this),this.assignOrPush=n(this.assignOrPush,this),this.processAsync=n(this.processAsync,this);var P,O,E;if(!(this instanceof k.Parser))return new k.Parser(s);this.options={},O=a["0.2"];for(P in O){if(!t.call(O,P))continue;E=O[P],this.options[P]=E}for(P in s){if(!t.call(s,P))continue;E=s[P],this.options[P]=E}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(m.normalize)),this.reset()}return x.prototype.processAsync=function(){var s,P;try{return this.remaining.length<=this.options.chunkSize?(s=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(s),this.saxParser.close()):(s=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(s),b(this.processAsync))}catch(O){if(P=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(P)}},x.prototype.assignOrPush=function(s,P,O){return P in s?(s[P]instanceof Array||(s[P]=[s[P]]),s[P].push(O)):this.options.explicitArray?s[P]=[O]:s[P]=O},x.prototype.reset=function(){var s,P,O,E;return this.removeAllListeners(),this.saxParser=g.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(v){return function(y){if(v.saxParser.resume(),!v.saxParser.errThrown)return v.saxParser.errThrown=!0,v.emit("error",y)}}(this),this.saxParser.onend=function(v){return function(){if(!v.saxParser.ended)return v.saxParser.ended=!0,v.emit("end",v.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,E=[],s=this.options.attrkey,P=this.options.charkey,this.saxParser.onopentag=function(v){return function(y){var T,M,N,I,G;if(N={},N[P]="",!v.options.ignoreAttrs){G=y.attributes;for(T in G){if(!t.call(G,T))continue;!(s in N)&&!v.options.mergeAttrs&&(N[s]={}),M=v.options.attrValueProcessors?c(v.options.attrValueProcessors,y.attributes[T],T):y.attributes[T],I=v.options.attrNameProcessors?c(v.options.attrNameProcessors,T):T,v.options.mergeAttrs?v.assignOrPush(N,I,M):N[s][I]=M}}return N["#name"]=v.options.tagNameProcessors?c(v.options.tagNameProcessors,y.name):y.name,v.options.xmlns&&(N[v.options.xmlnskey]={uri:y.uri,local:y.local}),E.push(N)}}(this),this.saxParser.onclosetag=function(v){return function(){var y,T,M,N,I,G,H,W,z,U;if(G=E.pop(),I=G["#name"],(!v.options.explicitChildren||!v.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(y=G.cdata,delete G.cdata),z=E[E.length-1],G[P].match(/^\s*$/)&&!y?(T=G[P],delete G[P]):(v.options.trim&&(G[P]=G[P].trim()),v.options.normalize&&(G[P]=G[P].replace(/\s{2,}/g," ").trim()),G[P]=v.options.valueProcessors?c(v.options.valueProcessors,G[P],I):G[P],(0,h.default)(G).length===1&&P in G&&!v.EXPLICIT_CHARKEY&&(G=G[P])),p(G)&&(G=v.options.emptyTag!==""?v.options.emptyTag:T),v.options.validator!=null&&(U="/"+function(){var B,K,q;for(q=[],B=0,K=E.length;B<K;B++)N=E[B],q.push(N["#name"]);return q}().concat(I).join("/"),function(){var B;try{return G=v.options.validator(U,z&&z[I],G)}catch(K){return B=K,v.emit("error",B)}}()),v.options.explicitChildren&&!v.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,d.default)(G))==="object"){if(!v.options.preserveChildrenOrder)N={},v.options.attrkey in G&&(N[v.options.attrkey]=G[v.options.attrkey],delete G[v.options.attrkey]),!v.options.charsAsChildren&&v.options.charkey in G&&(N[v.options.charkey]=G[v.options.charkey],delete G[v.options.charkey]),(0,D.default)(G).length>0&&(N[v.options.childkey]=G),G=N;else if(z){z[v.options.childkey]=z[v.options.childkey]||[],H={};for(M in G){if(!t.call(G,M))continue;H[M]=G[M]}z[v.options.childkey].push(H),delete G["#name"],(0,h.default)(G).length===1&&P in G&&!v.EXPLICIT_CHARKEY&&(G=G[P])}}return E.length>0?v.assignOrPush(z,I,G):(v.options.explicitRoot&&(W=G,G={},G[I]=W),v.resultObject=G,v.saxParser.ended=!0,v.emit("end",v.resultObject))}}(this),O=function(v){return function(y){var T,M;if(M=E[E.length-1],M)return M[P]+=y,v.options.explicitChildren&&v.options.preserveChildrenOrder&&v.options.charsAsChildren&&(v.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(M[v.options.childkey]=M[v.options.childkey]||[],T={"#name":"__text__"},T[P]=y,v.options.normalize&&(T[P]=T[P].replace(/\s{2,}/g," ").trim()),M[v.options.childkey].push(T)),M}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(v){return function(y){var T;if(T=O(y),T)return T.cdata=!0}}(this)},x.prototype.parseString=function(s,P){var O;P!=null&&typeof P=="function"&&(this.on("end",function(E){return this.reset(),P(null,E)}),this.on("error",function(E){return this.reset(),P(E)}));try{return s=s.toString(),s.trim()===""?(this.emit("end",null),!0):(s=l.stripBOM(s),this.options.async?(this.remaining=s,b(this.processAsync),this.saxParser):this.saxParser.write(s).close())}catch(E){if(O=E,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(s){return new f.default(function(P){return function(O,E){return P.parseString(s,function(v,y){return v?E(v):O(y)})}}(this))},x}(_),k.parseString=function(S,x,s){var P,O,E;return s!=null?(typeof s=="function"&&(P=s),(typeof x=="undefined"?"undefined":(0,d.default)(x))==="object"&&(O=x)):(typeof x=="function"&&(P=x),O={}),E=new k.Parser(O),E.parseString(S,P)},k.parseStringPromise=function(S,x){var s,P;return(typeof x=="undefined"?"undefined":(0,d.default)(x))==="object"&&(s=x),P=new k.Parser(s),P.parseStringPromise(S)}}).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(j,J,k){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),k.normalize=function(f){return f.toLowerCase()},k.firstCharLowerCase=function(f){return f.charAt(0).toLowerCase()+f.slice(1)},k.stripPrefix=function(f){return f.replace(L,"")},k.parseNumbers=function(f){return isNaN(f)||(f=f%1===0?parseInt(f,10):parseFloat(f)),f},k.parseBooleans=function(f){return/^(?:true|false)$/i.test(f)&&(f=f.toLowerCase()==="true"),f}}).call(void 0)},{}],249:[function(j,J,k){"use strict";(function(){"use strict";var L,f,C,D,u=function(d,i){for(var l in i)h.call(i,l)&&(d[l]=i[l]);function a(){this.constructor=d}return a.prototype=i.prototype,d.prototype=new a,d.__super__=i.prototype,d},h={}.hasOwnProperty;f=j("./defaults"),L=j("./builder"),C=j("./parser"),D=j("./processors"),k.defaults=f.defaults,k.processors=D,k.ValidationError=function(w){u(d,w);function d(i){this.message=i}return d}(Error),k.Builder=L.Builder,k.Parser=C.Parser,k.parseString=C.parseString,k.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(j,J,k){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(j,J,k){"use strict";(function(){J.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(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/get-prototype-of"),f=w(L),C=j("babel-runtime/helpers/typeof"),D=w(C),u=j("babel-runtime/core-js/object/assign"),h=w(u);function w(d){return d&&d.__esModule?d:{default:d}}(function(){var d,i,l,a,_,p,c,m=[].slice,g={}.hasOwnProperty;d=function(){var n,o,t,S,x,s;if(s=arguments[0],x=2<=arguments.length?m.call(arguments,1):[],_(h.default))h.default.apply(null,arguments);else for(n=0,t=x.length;n<t;n++)if(S=x[n],S!=null)for(o in S){if(!g.call(S,o))continue;s[o]=S[o]}return s},_=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},p=function(n){var o;return!!n&&((o=typeof n=="undefined"?"undefined":(0,D.default)(n))==="function"||o==="object")},l=function(n){return _(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},a=function(n){var o;if(l(n))return!n.length;for(o in n){if(!g.call(n,o))continue;return!1}return!0},c=function(n){var o,t;return p(n)&&(t=(0,f.default)(n))&&(o=t.constructor)&&typeof o=="function"&&o instanceof o&&Function.prototype.toString.call(o)===Function.prototype.toString.call(Object)},i=function(n){return _(n.valueOf)?n.valueOf():n},J.exports.assign=d,J.exports.isFunction=_,J.exports.isObject=p,J.exports.isArray=l,J.exports.isEmpty=a,J.exports.isPlainObject=c,J.exports.getValue=i}).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(j,J,k){"use strict";(function(){J.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h;D=j("./NodeType"),h=j("./XMLNode"),J.exports=u=function(){function w(d,i,l){if(this.parent=d,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),i==null)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(l),this.type=D.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defineProperty(w.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(w.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(w.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"specified",{get:function(){return!0}}),w.prototype.clone=function(){return(0,f.default)(this)},w.prototype.toString=function(d){return this.options.writer.attribute(this,this.options.writer.filterOptions(d))},w.prototype.debugInfo=function(d){return d=d||this.name,d==null?"parent: <"+this.parent.name+">":"attribute: {"+d+"}, parent: <"+this.parent.name+">"},w.prototype.isEqualNode=function(d){return d.namespaceURI!==this.namespaceURI||(d.prefix!==this.prefix||d.localName!==this.localName)?!1:!(d.value!==this.value)},w}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function p(){this.constructor=l}return p.prototype=a.prototype,l.prototype=new p,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),h=j("./XMLCharacterData"),J.exports=u=function(i){w(l,i);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=D.CData,this.value=this.stringify.cdata(_)}return l.prototype.clone=function(){return(0,f.default)(this)},l.prototype.toString=function(a){return this.options.writer.cdata(this,this.options.writer.filterOptions(a))},l}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h=function(i,l){for(var a in l)w.call(l,a)&&(i[a]=l[a]);function _(){this.constructor=i}return _.prototype=l.prototype,i.prototype=new _,i.__super__=l.prototype,i},w={}.hasOwnProperty;u=j("./XMLNode"),J.exports=D=function(d){h(i,d);function i(l){i.__super__.constructor.call(this,l),this.value=""}return Object.defineProperty(i.prototype,"data",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(i.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),i.prototype.clone=function(){return(0,f.default)(this)},i.prototype.substringData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.appendData=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.insertData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.deleteData=function(l,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceData=function(l,a,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(l){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(l)?!(l.data!==this.data):!1},i}(u)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function p(){this.constructor=l}return p.prototype=a.prototype,l.prototype=new p,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),J.exports=h=function(i){w(l,i);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=D.Comment,this.value=this.stringify.comment(_)}return l.prototype.clone=function(){return(0,f.default)(this)},l.prototype.toString=function(a){return this.options.writer.comment(this,this.options.writer.filterOptions(a))},l}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=u(L),C=j("babel-runtime/core-js/object/create"),D=u(C);function u(h){return h&&h.__esModule?h:{default:h}}(function(){var h,w,d;w=j("./XMLDOMErrorHandler"),d=j("./XMLDOMStringList"),J.exports=h=function(){function i(){var l;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new w,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,D.default)(this.defaultParams)}return Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new d((0,f.default)(this.defaultParams))}}),i.prototype.getParameter=function(l){return this.params.hasOwnProperty(l)?this.params[l]:null},i.prototype.canSetParameter=function(l,a){return!0},i.prototype.setParameter=function(l,a){return a!=null?this.params[l]=a:delete this.params[l]},i}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(j,J,k){"use strict";(function(){var L;J.exports=L=function(){function f(){}return f.prototype.handleError=function(C){throw new Error(C)},f}()}).call(void 0)},{}],260:[function(j,J,k){"use strict";(function(){var L;J.exports=L=function(){function f(){}return f.prototype.hasFeature=function(C,D){return!0},f.prototype.createDocumentType=function(C,D,u){throw new Error("This DOM method is not implemented.")},f.prototype.createDocument=function(C,D,u){throw new Error("This DOM method is not implemented.")},f.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},f.prototype.getFeature=function(C,D){throw new Error("This DOM method is not implemented.")},f}()}).call(void 0)},{}],261:[function(j,J,k){"use strict";(function(){var L;J.exports=L=function(){function f(C){this.arr=C||[]}return Object.defineProperty(f.prototype,"length",{get:function(){return this.arr.length}}),f.prototype.item=function(C){return this.arr[C]||null},f.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},f}()}).call(void 0)},{}],262:[function(j,J,k){"use strict";(function(){var L,f,C,D=function(w,d){for(var i in d)u.call(d,i)&&(w[i]=d[i]);function l(){this.constructor=w}return l.prototype=d.prototype,w.prototype=new l,w.__super__=d.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(h){D(w,h);function w(d,i,l,a,_,p){if(w.__super__.constructor.call(this,d),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(l==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(i));if(!a)throw new Error("Missing DTD attribute type. "+this.debugInfo(i));if(!_)throw new Error("Missing DTD attribute default. "+this.debugInfo(i));if(_.indexOf("#")!==0&&(_="#"+_),!_.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(i));if(p&&!_.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(i));this.elementName=this.stringify.name(i),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(l),this.attributeType=this.stringify.dtdAttType(a),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=_}return w.prototype.toString=function(d){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(d))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(j,J,k){"use strict";(function(){var L,f,C,D=function(w,d){for(var i in d)u.call(d,i)&&(w[i]=d[i]);function l(){this.constructor=w}return l.prototype=d.prototype,w.prototype=new l,w.__super__=d.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(h){D(w,h);function w(d,i,l){if(w.__super__.constructor.call(this,d),i==null)throw new Error("Missing DTD element name. "+this.debugInfo());l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.name(i),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(l)}return w.prototype.toString=function(d){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(d))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(j,J,k){"use strict";(function(){var L,f,C,D,u=function(d,i){for(var l in i)h.call(i,l)&&(d[l]=i[l]);function a(){this.constructor=d}return a.prototype=i.prototype,d.prototype=new a,d.__super__=i.prototype,d},h={}.hasOwnProperty;D=j("./Utility").isObject,C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(w){u(d,w);function d(i,l,a,_){if(d.__super__.constructor.call(this,i),a==null)throw new Error("Missing DTD entity name. "+this.debugInfo(a));if(_==null)throw new Error("Missing DTD entity value. "+this.debugInfo(a));if(this.pe=!!l,this.name=this.stringify.name(a),this.type=L.EntityDeclaration,!D(_))this.value=this.stringify.dtdEntityValue(_),this.internal=!0;else{if(!_.pubID&&!_.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(a));if(_.pubID&&!_.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(a));if(this.internal=!1,_.pubID!=null&&(this.pubID=this.stringify.dtdPubID(_.pubID)),_.sysID!=null&&(this.sysID=this.stringify.dtdSysID(_.sysID)),_.nData!=null&&(this.nData=this.stringify.dtdNData(_.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(a))}}return Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(d.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return null}}),d.prototype.toString=function(i){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(i))},d}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(j,J,k){"use strict";(function(){var L,f,C,D=function(w,d){for(var i in d)u.call(d,i)&&(w[i]=d[i]);function l(){this.constructor=w}return l.prototype=d.prototype,w.prototype=new l,w.__super__=d.prototype,w},u={}.hasOwnProperty;C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(h){D(w,h);function w(d,i,l){if(w.__super__.constructor.call(this,d),i==null)throw new Error("Missing DTD notation name. "+this.debugInfo(i));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i));this.name=this.stringify.name(i),this.type=L.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return Object.defineProperty(w.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(w.prototype,"systemId",{get:function(){return this.sysID}}),w.prototype.toString=function(d){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(d))},w}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(j,J,k){"use strict";(function(){var L,f,C,D,u=function(d,i){for(var l in i)h.call(i,l)&&(d[l]=i[l]);function a(){this.constructor=d}return a.prototype=i.prototype,d.prototype=new a,d.__super__=i.prototype,d},h={}.hasOwnProperty;D=j("./Utility").isObject,C=j("./XMLNode"),L=j("./NodeType"),J.exports=f=function(w){u(d,w);function d(i,l,a,_){var p;d.__super__.constructor.call(this,i),D(l)&&(p=l,l=p.version,a=p.encoding,_=p.standalone),l||(l="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(l),a!=null&&(this.encoding=this.stringify.xmlEncoding(a)),_!=null&&(this.standalone=this.stringify.xmlStandalone(_))}return d.prototype.toString=function(i){return this.options.writer.declaration(this,this.options.writer.filterOptions(i))},d}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(j,J,k){"use strict";(function(){var L,f,C,D,u,h,w,d,i,l=function(p,c){for(var m in c)a.call(c,m)&&(p[m]=c[m]);function g(){this.constructor=p}return g.prototype=c.prototype,p.prototype=new g,p.__super__=c.prototype,p},a={}.hasOwnProperty;i=j("./Utility").isObject,d=j("./XMLNode"),L=j("./NodeType"),f=j("./XMLDTDAttList"),D=j("./XMLDTDEntity"),C=j("./XMLDTDElement"),u=j("./XMLDTDNotation"),w=j("./XMLNamedNodeMap"),J.exports=h=function(_){l(p,_);function p(c,m,g){var b,n,o,t,S,x;if(p.__super__.constructor.call(this,c),this.type=L.DocType,c.children){for(t=c.children,n=0,o=t.length;n<o;n++)if(b=t[n],b.type===L.Element){this.name=b.name;break}}this.documentObject=c,i(m)&&(S=m,m=S.pubID,g=S.sysID),g==null&&(x=[m,g],g=x[0],m=x[1]),m!=null&&(this.pubID=this.stringify.dtdPubID(m)),g!=null&&(this.sysID=this.stringify.dtdSysID(g))}return Object.defineProperty(p.prototype,"entities",{get:function(){var m,g,b,n,o;for(n={},o=this.children,g=0,b=o.length;g<b;g++)m=o[g],m.type===L.EntityDeclaration&&!m.pe&&(n[m.name]=m);return new w(n)}}),Object.defineProperty(p.prototype,"notations",{get:function(){var m,g,b,n,o;for(n={},o=this.children,g=0,b=o.length;g<b;g++)m=o[g],m.type===L.NotationDeclaration&&(n[m.name]=m);return new w(n)}}),Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),p.prototype.element=function(c,m){var g;return g=new C(this,c,m),this.children.push(g),this},p.prototype.attList=function(c,m,g,b,n){var o;return o=new f(this,c,m,g,b,n),this.children.push(o),this},p.prototype.entity=function(c,m){var g;return g=new D(this,!1,c,m),this.children.push(g),this},p.prototype.pEntity=function(c,m){var g;return g=new D(this,!0,c,m),this.children.push(g),this},p.prototype.notation=function(c,m){var g;return g=new u(this,c,m),this.children.push(g),this},p.prototype.toString=function(c){return this.options.writer.docType(this,this.options.writer.filterOptions(c))},p.prototype.ele=function(c,m){return this.element(c,m)},p.prototype.att=function(c,m,g,b,n){return this.attList(c,m,g,b,n)},p.prototype.ent=function(c,m){return this.entity(c,m)},p.prototype.pent=function(c,m){return this.pEntity(c,m)},p.prototype.not=function(c,m){return this.notation(c,m)},p.prototype.up=function(){return this.root()||this.documentObject},p.prototype.isEqualNode=function(c){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)?c.name!==this.name||c.publicId!==this.publicId?!1:!(c.systemId!==this.systemId):!1},p}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(j,J,k){"use strict";(function(){var L,f,C,D,u,h,w,d,i=function(_,p){for(var c in p)l.call(p,c)&&(_[c]=p[c]);function m(){this.constructor=_}return m.prototype=p.prototype,_.prototype=new m,_.__super__=p.prototype,_},l={}.hasOwnProperty;d=j("./Utility").isPlainObject,C=j("./XMLDOMImplementation"),f=j("./XMLDOMConfiguration"),u=j("./XMLNode"),L=j("./NodeType"),w=j("./XMLStringifier"),h=j("./XMLStringWriter"),J.exports=D=function(a){i(_,a);function _(p){_.__super__.constructor.call(this,null),this.name="#document",this.type=L.Document,this.documentURI=null,this.domConfig=new f,p||(p={}),p.writer||(p.writer=new h),this.options=p,this.stringify=new w(p)}return Object.defineProperty(_.prototype,"implementation",{value:new C}),Object.defineProperty(_.prototype,"doctype",{get:function(){var c,m,g,b;for(b=this.children,m=0,g=b.length;m<g;m++)if(c=b[m],c.type===L.DocType)return c;return null}}),Object.defineProperty(_.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(_.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(_.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].encoding:null}}),Object.defineProperty(_.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(_.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===L.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(_.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(_.prototype,"origin",{get:function(){return null}}),Object.defineProperty(_.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(_.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(_.prototype,"contentType",{get:function(){return null}}),_.prototype.end=function(p){var c;return c={},p?d(p)&&(c=p,p=this.options.writer):p=this.options.writer,p.document(this,p.filterOptions(c))},_.prototype.toString=function(p){return this.options.writer.document(this,this.options.writer.filterOptions(p))},_.prototype.createElement=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createTextNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createComment=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createCDATASection=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createProcessingInstruction=function(p,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createAttribute=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createEntityReference=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.importNode=function(p,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createElementNS=function(p,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createAttributeNS=function(p,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByTagNameNS=function(p,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementById=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.adoptNode=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.renameNode=function(p,c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.getElementsByClassName=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createEvent=function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createNodeIterator=function(p,c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_.prototype.createTreeWalker=function(p,c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},_}(u)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(j,J,k){"use strict";(function(){var L,f,C,D,u,h,w,d,i,l,a,_,p,c,m,g,b,n,o,t,S,x,s,P,O={}.hasOwnProperty;P=j("./Utility"),x=P.isObject,S=P.isFunction,s=P.isPlainObject,t=P.getValue,L=j("./NodeType"),_=j("./XMLDocument"),c=j("./XMLElement"),D=j("./XMLCData"),u=j("./XMLComment"),g=j("./XMLRaw"),o=j("./XMLText"),m=j("./XMLProcessingInstruction"),l=j("./XMLDeclaration"),a=j("./XMLDocType"),h=j("./XMLDTDAttList"),d=j("./XMLDTDEntity"),w=j("./XMLDTDElement"),i=j("./XMLDTDNotation"),C=j("./XMLAttribute"),n=j("./XMLStringifier"),b=j("./XMLStringWriter"),f=j("./WriterState"),J.exports=p=function(){function E(v,y,T){var M;this.name="?xml",this.type=L.Document,v||(v={}),M={},v.writer?s(v.writer)&&(M=v.writer,v.writer=new b):v.writer=new b,this.options=v,this.writer=v.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new n(v),this.onDataCallback=y||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return E.prototype.createChildNode=function(v){var y,T,M,N,I,G,H,W;switch(v.type){case L.CData:this.cdata(v.value);break;case L.Comment:this.comment(v.value);break;case L.Element:M={},H=v.attribs;for(T in H){if(!O.call(H,T))continue;y=H[T],M[T]=y.value}this.node(v.name,M);break;case L.Dummy:this.dummy();break;case L.Raw:this.raw(v.value);break;case L.Text:this.text(v.value);break;case L.ProcessingInstruction:this.instruction(v.target,v.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+v.constructor.name)}for(W=v.children,I=0,G=W.length;I<G;I++)N=W[I],this.createChildNode(N),N.type===L.Element&&this.up();return this},E.prototype.dummy=function(){return this},E.prototype.node=function(v,y,T){var M;if(v==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(v));return this.openCurrent(),v=t(v),y==null&&(y={}),y=t(y),x(y)||(M=[y,T],T=M[0],y=M[1]),this.currentNode=new c(this,v,y),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},E.prototype.element=function(v,y,T){var M,N,I,G,H,W;if(this.currentNode&&this.currentNode.type===L.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(v)||x(v)||S(v))for(G=this.options.noValidation,this.options.noValidation=!0,W=new _(this.options).element("TEMP_ROOT"),W.element(v),this.options.noValidation=G,H=W.children,N=0,I=H.length;N<I;N++)M=H[N],this.createChildNode(M),M.type===L.Element&&this.up();else this.node(v,y,T);return this},E.prototype.attribute=function(v,y){var T,M;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(v));if(v!=null&&(v=t(v)),x(v))for(T in v){if(!O.call(v,T))continue;M=v[T],this.attribute(T,M)}else S(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[v]=new C(this,v,""):y!=null&&(this.currentNode.attribs[v]=new C(this,v,y));return this},E.prototype.text=function(v){var y;return this.openCurrent(),y=new o(this,v),this.onData(this.writer.text(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.cdata=function(v){var y;return this.openCurrent(),y=new D(this,v),this.onData(this.writer.cdata(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.comment=function(v){var y;return this.openCurrent(),y=new u(this,v),this.onData(this.writer.comment(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.raw=function(v){var y;return this.openCurrent(),y=new g(this,v),this.onData(this.writer.raw(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.instruction=function(v,y){var T,M,N,I,G;if(this.openCurrent(),v!=null&&(v=t(v)),y!=null&&(y=t(y)),Array.isArray(v))for(T=0,I=v.length;T<I;T++)M=v[T],this.instruction(M);else if(x(v))for(M in v){if(!O.call(v,M))continue;N=v[M],this.instruction(M,N)}else S(y)&&(y=y.apply()),G=new m(this,v,y),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},E.prototype.declaration=function(v,y,T){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new l(this,v,y,T),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.doctype=function(v,y,T){if(this.openCurrent(),v==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,y,T),this.currentNode.rootNodeName=v,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},E.prototype.dtdElement=function(v,y){var T;return this.openCurrent(),T=new w(this,v,y),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.attList=function(v,y,T,M,N){var I;return this.openCurrent(),I=new h(this,v,y,T,M,N),this.onData(this.writer.dtdAttList(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.entity=function(v,y){var T;return this.openCurrent(),T=new d(this,!1,v,y),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.pEntity=function(v,y){var T;return this.openCurrent(),T=new d(this,!0,v,y),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.prototype.notation=function(v,y){var T;return this.openCurrent(),T=new i(this,v,y),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},E.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},E.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},E.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},E.prototype.openNode=function(v){var y,T,M,N;if(!v.isOpen){if(!this.root&&this.currentLevel===0&&v.type===L.Element&&(this.root=v),T="",v.type===L.Element){this.writerOptions.state=f.OpenTag,T=this.writer.indent(v,this.writerOptions,this.currentLevel)+"<"+v.name,N=v.attribs;for(M in N){if(!O.call(N,M))continue;y=N[M],T+=this.writer.attribute(y,this.writerOptions,this.currentLevel)}T+=(v.children?">":"/>")+this.writer.endline(v,this.writerOptions,this.currentLevel),this.writerOptions.state=f.InsideTag}else this.writerOptions.state=f.OpenTag,T=this.writer.indent(v,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+v.rootNodeName,v.pubID&&v.sysID?T+=' PUBLIC "'+v.pubID+'" "'+v.sysID+'"':v.sysID&&(T+=' SYSTEM "'+v.sysID+'"'),v.children?(T+=" [",this.writerOptions.state=f.InsideTag):(this.writerOptions.state=f.CloseTag,T+=">"),T+=this.writer.endline(v,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),v.isOpen=!0}},E.prototype.closeNode=function(v){var y;if(!v.isClosed)return y="",this.writerOptions.state=f.CloseTag,v.type===L.Element?y=this.writer.indent(v,this.writerOptions,this.currentLevel)+"</"+v.name+">"+this.writer.endline(v,this.writerOptions,this.currentLevel):y=this.writer.indent(v,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(v,this.writerOptions,this.currentLevel),this.writerOptions.state=f.None,this.onData(y,this.currentLevel),v.isClosed=!0},E.prototype.onData=function(v,y){return this.documentStarted=!0,this.onDataCallback(v,y+1)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.debugInfo=function(v){return v==null?"":"node: <"+v+">"},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(v,y,T){return this.node(v,y,T)},E.prototype.txt=function(v){return this.text(v)},E.prototype.dat=function(v){return this.cdata(v)},E.prototype.com=function(v){return this.comment(v)},E.prototype.ins=function(v,y){return this.instruction(v,y)},E.prototype.dec=function(v,y,T){return this.declaration(v,y,T)},E.prototype.dtd=function(v,y,T){return this.doctype(v,y,T)},E.prototype.e=function(v,y,T){return this.element(v,y,T)},E.prototype.n=function(v,y,T){return this.node(v,y,T)},E.prototype.t=function(v){return this.text(v)},E.prototype.d=function(v){return this.cdata(v)},E.prototype.c=function(v){return this.comment(v)},E.prototype.r=function(v){return this.raw(v)},E.prototype.i=function(v,y){return this.instruction(v,y)},E.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.ent=function(v,y){return this.entity(v,y)},E.prototype.pent=function(v,y){return this.pEntity(v,y)},E.prototype.not=function(v,y){return this.notation(v,y)},E}()}).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(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function p(){this.constructor=l}return p.prototype=a.prototype,l.prototype=new p,l.__super__=a.prototype,l},d={}.hasOwnProperty;h=j("./XMLNode"),D=j("./NodeType"),J.exports=u=function(i){w(l,i);function l(a){l.__super__.constructor.call(this,a),this.type=D.Dummy}return l.prototype.clone=function(){return(0,f.default)(this)},l.prototype.toString=function(a){return""},l}(h)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w,d,i,l,a,_,p=function(g,b){for(var n in b)c.call(b,n)&&(g[n]=b[n]);function o(){this.constructor=g}return o.prototype=b.prototype,g.prototype=new o,g.__super__=b.prototype,g},c={}.hasOwnProperty;_=j("./Utility"),a=_.isObject,l=_.isFunction,i=_.getValue,d=j("./XMLNode"),D=j("./NodeType"),u=j("./XMLAttribute"),w=j("./XMLNamedNodeMap"),J.exports=h=function(m){p(g,m);function g(b,n,o){var t,S,x,s;if(g.__super__.constructor.call(this,b),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=D.Element,this.attribs={},this.schemaTypeInfo=null,o!=null&&this.attribute(o),b.type===D.Document&&(this.isRoot=!0,this.documentObject=b,b.rootObject=this,b.children)){for(s=b.children,S=0,x=s.length;S<x;S++)if(t=s[S],t.type===D.DocType){t.name=this.name;break}}}return Object.defineProperty(g.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(g.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(g.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(g.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new w(this.attribs)),this.attributeMap}}),g.prototype.clone=function(){var b,n,o,t;o=(0,f.default)(this),o.isRoot&&(o.documentObject=null),o.attribs={},t=this.attribs;for(n in t){if(!c.call(t,n))continue;b=t[n],o.attribs[n]=b.clone()}return o.children=[],this.children.forEach(function(S){var x;return x=S.clone(),x.parent=o,o.children.push(x)}),o},g.prototype.attribute=function(b,n){var o,t;if(b!=null&&(b=i(b)),a(b))for(o in b){if(!c.call(b,o))continue;t=b[o],this.attribute(o,t)}else l(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[b]=new u(this,b,""):n!=null&&(this.attribs[b]=new u(this,b,n));return this},g.prototype.removeAttribute=function(b){var n,o,t;if(b==null)throw new Error("Missing attribute name. "+this.debugInfo());if(b=i(b),Array.isArray(b))for(o=0,t=b.length;o<t;o++)n=b[o],delete this.attribs[n];else delete this.attribs[b];return this},g.prototype.toString=function(b){return this.options.writer.element(this,this.options.writer.filterOptions(b))},g.prototype.att=function(b,n){return this.attribute(b,n)},g.prototype.a=function(b,n){return this.attribute(b,n)},g.prototype.getAttribute=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b].value:null},g.prototype.setAttribute=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(b){return this.attribs.hasOwnProperty(b)?this.attribs[b]:null},g.prototype.setAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(b,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(b){return this.attribs.hasOwnProperty(b)},g.prototype.hasAttributeNS=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(b,n){return this.attribs.hasOwnProperty(b)?this.attribs[b].isId:n},g.prototype.setIdAttributeNS=function(b,n,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(b,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(b){var n,o,t;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(b))return!1;if(b.namespaceURI!==this.namespaceURI)return!1;if(b.prefix!==this.prefix)return!1;if(b.localName!==this.localName)return!1;if(b.attribs.length!==this.attribs.length)return!1;for(n=o=0,t=this.attribs.length-1;0<=t?o<=t:o>=t;n=0<=t?++o:--o)if(!this.attribs[n].isEqualNode(b.attribs[n]))return!1;return!0},g}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/keys"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D;J.exports=D=function(){function u(h){this.nodes=h}return Object.defineProperty(u.prototype,"length",{get:function(){return(0,f.default)(this.nodes).length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.getNamedItem=function(h){return this.nodes[h]},u.prototype.setNamedItem=function(h){var w;return w=this.nodes[h.nodeName],this.nodes[h.nodeName]=h,w||null},u.prototype.removeNamedItem=function(h){var w;return w=this.nodes[h],delete this.nodes[h],w||null},u.prototype.item=function(h){return this.nodes[(0,f.default)(this.nodes)[h]]||null},u.prototype.getNamedItemNS=function(h,w){throw new Error("This DOM method is not implemented.")},u.prototype.setNamedItemNS=function(h){throw new Error("This DOM method is not implemented.")},u.prototype.removeNamedItemNS=function(h,w){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(j,J,k){"use strict";(function(){var L,f,C,D,u,h,w,d,i,l,a,_,p,c,m,g,b,n,o,t={}.hasOwnProperty;o=j("./Utility"),n=o.isObject,b=o.isFunction,g=o.isEmpty,m=o.getValue,d=null,C=null,D=null,u=null,h=null,p=null,c=null,_=null,w=null,f=null,a=null,i=null,L=null,J.exports=l=function(){function S(x){this.parent=x,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,d||(d=j("./XMLElement"),C=j("./XMLCData"),D=j("./XMLComment"),u=j("./XMLDeclaration"),h=j("./XMLDocType"),p=j("./XMLRaw"),c=j("./XMLText"),_=j("./XMLProcessingInstruction"),w=j("./XMLDummy"),f=j("./NodeType"),a=j("./XMLNodeList"),i=j("./XMLNamedNodeMap"),L=j("./DocumentPosition"))}return Object.defineProperty(S.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(S.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new a(this.children)),this.childNodeList}}),Object.defineProperty(S.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(S.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(S.prototype,"previousSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s-1]||null}}),Object.defineProperty(S.prototype,"nextSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s+1]||null}}),Object.defineProperty(S.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(S.prototype,"textContent",{get:function(){var s,P,O,E,v;if(this.nodeType===f.Element||this.nodeType===f.DocumentFragment){for(v="",E=this.children,P=0,O=E.length;P<O;P++)s=E[P],s.textContent&&(v+=s.textContent);return v}else return null},set:function(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.setParent=function(x){var s,P,O,E,v;for(this.parent=x,x&&(this.options=x.options,this.stringify=x.stringify),E=this.children,v=[],P=0,O=E.length;P<O;P++)s=E[P],v.push(s.setParent(this));return v},S.prototype.element=function(x,s,P){var O,E,v,y,T,M,N,I,G,H,W;if(M=null,s===null&&P==null&&(G=[{},null],s=G[0],P=G[1]),s==null&&(s={}),s=m(s),n(s)||(H=[s,P],P=H[0],s=H[1]),x!=null&&(x=m(x)),Array.isArray(x))for(v=0,N=x.length;v<N;v++)E=x[v],M=this.element(E);else if(b(x))M=this.element(x.apply());else if(n(x))for(T in x){if(!t.call(x,T))continue;if(W=x[T],b(W)&&(W=W.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)M=this.attribute(T.substr(this.stringify.convertAttKey.length),W);else if(!this.options.separateArrayItems&&Array.isArray(W)&&g(W))M=this.dummy();else if(n(W)&&g(W))M=this.element(T);else if(!this.options.keepNullNodes&&W==null)M=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(W))for(y=0,I=W.length;y<I;y++)E=W[y],O={},O[T]=E,M=this.element(O);else n(W)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?M=this.element(W):(M=this.element(T),M.element(W)):M=this.element(T,W)}else!this.options.keepNullNodes&&P===null?M=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&x.indexOf(this.stringify.convertTextKey)===0?M=this.text(P):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&x.indexOf(this.stringify.convertCDataKey)===0?M=this.cdata(P):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&x.indexOf(this.stringify.convertCommentKey)===0?M=this.comment(P):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&x.indexOf(this.stringify.convertRawKey)===0?M=this.raw(P):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&x.indexOf(this.stringify.convertPIKey)===0?M=this.instruction(x.substr(this.stringify.convertPIKey.length),P):M=this.node(x,s,P);if(M==null)throw new Error("Could not create any elements with: "+x+". "+this.debugInfo());return M},S.prototype.insertBefore=function(x,s,P){var O,E,v,y,T;if(x!=null?x.type:void 0)return v=x,y=s,v.setParent(this),y?(E=children.indexOf(y),T=children.splice(E),children.push(v),Array.prototype.push.apply(children,T)):children.push(v),v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(x));return E=this.parent.children.indexOf(this),T=this.parent.children.splice(E),O=this.parent.element(x,s,P),Array.prototype.push.apply(this.parent.children,T),O},S.prototype.insertAfter=function(x,s,P){var O,E,v;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(x));return E=this.parent.children.indexOf(this),v=this.parent.children.splice(E+1),O=this.parent.element(x,s,P),Array.prototype.push.apply(this.parent.children,v),O},S.prototype.remove=function(){var x,s;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return x=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[x,x-x+1].concat(s=[])),this.parent},S.prototype.node=function(x,s,P){var O,E;return x!=null&&(x=m(x)),s||(s={}),s=m(s),n(s)||(E=[s,P],P=E[0],s=E[1]),O=new d(this,x,s),P!=null&&O.text(P),this.children.push(O),O},S.prototype.text=function(x){var s;return n(x)&&this.element(x),s=new c(this,x),this.children.push(s),this},S.prototype.cdata=function(x){var s;return s=new C(this,x),this.children.push(s),this},S.prototype.comment=function(x){var s;return s=new D(this,x),this.children.push(s),this},S.prototype.commentBefore=function(x){var s,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P),s=this.parent.comment(x),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.commentAfter=function(x){var s,P,O;return P=this.parent.children.indexOf(this),O=this.parent.children.splice(P+1),s=this.parent.comment(x),Array.prototype.push.apply(this.parent.children,O),this},S.prototype.raw=function(x){var s;return s=new p(this,x),this.children.push(s),this},S.prototype.dummy=function(){var x;return x=new w(this),x},S.prototype.instruction=function(x,s){var P,O,E,v,y;if(x!=null&&(x=m(x)),s!=null&&(s=m(s)),Array.isArray(x))for(v=0,y=x.length;v<y;v++)P=x[v],this.instruction(P);else if(n(x))for(P in x){if(!t.call(x,P))continue;O=x[P],this.instruction(P,O)}else b(s)&&(s=s.apply()),E=new _(this,x,s),this.children.push(E);return this},S.prototype.instructionBefore=function(x,s){var P,O,E;return O=this.parent.children.indexOf(this),E=this.parent.children.splice(O),P=this.parent.instruction(x,s),Array.prototype.push.apply(this.parent.children,E),this},S.prototype.instructionAfter=function(x,s){var P,O,E;return O=this.parent.children.indexOf(this),E=this.parent.children.splice(O+1),P=this.parent.instruction(x,s),Array.prototype.push.apply(this.parent.children,E),this},S.prototype.declaration=function(x,s,P){var O,E;return O=this.document(),E=new u(O,x,s,P),O.children.length===0?O.children.unshift(E):O.children[0].type===f.Declaration?O.children[0]=E:O.children.unshift(E),O.root()||O},S.prototype.dtd=function(x,s){var P,O,E,v,y,T,M,N,I,G;for(O=this.document(),E=new h(O,x,s),I=O.children,v=y=0,M=I.length;y<M;v=++y)if(P=I[v],P.type===f.DocType)return O.children[v]=E,E;for(G=O.children,v=T=0,N=G.length;T<N;v=++T)if(P=G[v],P.isRoot)return O.children.splice(v,0,E),E;return O.children.push(E),E},S.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},S.prototype.root=function(){var x;for(x=this;x;){if(x.type===f.Document)return x.rootObject;if(x.isRoot)return x;x=x.parent}},S.prototype.document=function(){var x;for(x=this;x;){if(x.type===f.Document)return x;x=x.parent}},S.prototype.end=function(x){return this.document().end(x)},S.prototype.prev=function(){var x;if(x=this.parent.children.indexOf(this),x<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[x-1]},S.prototype.next=function(){var x;if(x=this.parent.children.indexOf(this),x===-1||x===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[x+1]},S.prototype.importDocument=function(x){var s;return s=x.root().clone(),s.parent=this,s.isRoot=!1,this.children.push(s),this},S.prototype.debugInfo=function(x){var s,P;return x=x||this.name,x==null&&!((s=this.parent)!=null?s.name:void 0)?"":x==null?"parent: <"+this.parent.name+">":((P=this.parent)!=null?P.name:void 0)?"node: <"+x+">, parent: <"+this.parent.name+">":"node: <"+x+">"},S.prototype.ele=function(x,s,P){return this.element(x,s,P)},S.prototype.nod=function(x,s,P){return this.node(x,s,P)},S.prototype.txt=function(x){return this.text(x)},S.prototype.dat=function(x){return this.cdata(x)},S.prototype.com=function(x){return this.comment(x)},S.prototype.ins=function(x,s){return this.instruction(x,s)},S.prototype.doc=function(){return this.document()},S.prototype.dec=function(x,s,P){return this.declaration(x,s,P)},S.prototype.e=function(x,s,P){return this.element(x,s,P)},S.prototype.n=function(x,s,P){return this.node(x,s,P)},S.prototype.t=function(x){return this.text(x)},S.prototype.d=function(x){return this.cdata(x)},S.prototype.c=function(x){return this.comment(x)},S.prototype.r=function(x){return this.raw(x)},S.prototype.i=function(x,s){return this.instruction(x,s)},S.prototype.u=function(){return this.up()},S.prototype.importXMLBuilder=function(x){return this.importDocument(x)},S.prototype.replaceChild=function(x,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.appendChild=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasChildNodes=function(){return this.children.length!==0},S.prototype.cloneNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isSupported=function(x,s){return!0},S.prototype.hasAttributes=function(){return this.attribs.length!==0},S.prototype.compareDocumentPosition=function(x){var s,P;return s=this,s===x?0:this.document()!==x.document()?(P=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?P|=L.Preceding:P|=L.Following,P):s.isAncestor(x)?L.Contains|L.Preceding:s.isDescendant(x)?L.Contains|L.Following:s.isPreceding(x)?L.Preceding:L.Following},S.prototype.isSameNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupPrefix=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isDefaultNamespace=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.lookupNamespaceURI=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(x){var s,P,O;if(x.nodeType!==this.nodeType)return!1;if(x.children.length!==this.children.length)return!1;for(s=P=0,O=this.children.length-1;0<=O?P<=O:P>=O;s=0<=O?++P:--P)if(!this.children[s].isEqualNode(x.children[s]))return!1;return!0},S.prototype.getFeature=function(x,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setUserData=function(x,s,P){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getUserData=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.contains=function(x){return x?x===this||this.isDescendant(x):!1},S.prototype.isDescendant=function(x){var s,P,O,E,v;for(v=this.children,O=0,E=v.length;O<E;O++){if(s=v[O],x===s)return!0;if(P=s.isDescendant(x),P)return!0}return!1},S.prototype.isAncestor=function(x){return x.isDescendant(this)},S.prototype.isPreceding=function(x){var s,P;return s=this.treePosition(x),P=this.treePosition(this),s===-1||P===-1?!1:s<P},S.prototype.isFollowing=function(x){var s,P;return s=this.treePosition(x),P=this.treePosition(this),s===-1||P===-1?!1:s>P},S.prototype.treePosition=function(x){var s,P;return P=0,s=!1,this.foreachTreeNode(this.document(),function(O){if(P++,!s&&O===x)return s=!0}),s?P:-1},S.prototype.foreachTreeNode=function(x,s){var P,O,E,v,y;for(x||(x=this.document()),v=x.children,O=0,E=v.length;O<E;O++){if(P=v[O],y=s(P))return y;if(y=this.foreachTreeNode(P,s),y)return y}},S}()}).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(j,J,k){"use strict";(function(){var L;J.exports=L=function(){function f(C){this.nodes=C}return Object.defineProperty(f.prototype,"length",{get:function(){return this.nodes.length||0}}),f.prototype.clone=function(){return this.nodes=null},f.prototype.item=function(C){return this.nodes[C]||null},f}()}).call(void 0)},{}],275:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function p(){this.constructor=l}return p.prototype=a.prototype,l.prototype=new p,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),J.exports=h=function(i){w(l,i);function l(a,_,p){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=D.ProcessingInstruction,this.target=this.stringify.insTarget(_),this.name=this.target,p&&(this.value=this.stringify.insValue(p))}return l.prototype.clone=function(){return(0,f.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}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function p(){this.constructor=l}return p.prototype=a.prototype,l.prototype=new p,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLNode"),J.exports=h=function(i){w(l,i);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=D.Raw,this.value=this.stringify.raw(_)}return l.prototype.clone=function(){return(0,f.default)(this)},l.prototype.toString=function(a){return this.options.writer.raw(this,this.options.writer.filterOptions(a))},l}(u)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(j,J,k){"use strict";(function(){var L,f,C,D,u=function(d,i){for(var l in i)h.call(i,l)&&(d[l]=i[l]);function a(){this.constructor=d}return a.prototype=i.prototype,d.prototype=new a,d.__super__=i.prototype,d},h={}.hasOwnProperty;L=j("./NodeType"),D=j("./XMLWriterBase"),f=j("./WriterState"),J.exports=C=function(w){u(d,w);function d(i,l){this.stream=i,d.__super__.constructor.call(this,l)}return d.prototype.endline=function(i,l,a){return i.isLastRootNode&&l.state===f.CloseTag?"":d.__super__.endline.call(this,i,l,a)},d.prototype.document=function(i,l){var a,_,p,c,m,g,b,n,o;for(b=i.children,_=p=0,m=b.length;p<m;_=++p)a=b[_],a.isLastRootNode=_===i.children.length-1;for(l=this.filterOptions(l),n=i.children,o=[],c=0,g=n.length;c<g;c++)a=n[c],o.push(this.writeChildNode(a,l,0));return o},d.prototype.attribute=function(i,l,a){return this.stream.write(d.__super__.attribute.call(this,i,l,a))},d.prototype.cdata=function(i,l,a){return this.stream.write(d.__super__.cdata.call(this,i,l,a))},d.prototype.comment=function(i,l,a){return this.stream.write(d.__super__.comment.call(this,i,l,a))},d.prototype.declaration=function(i,l,a){return this.stream.write(d.__super__.declaration.call(this,i,l,a))},d.prototype.docType=function(i,l,a){var _,p,c,m;if(a||(a=0),this.openNode(i,l,a),l.state=f.OpenTag,this.stream.write(this.indent(i,l,a)),this.stream.write("<!DOCTYPE "+i.root().name),i.pubID&&i.sysID?this.stream.write(' PUBLIC "'+i.pubID+'" "'+i.sysID+'"'):i.sysID&&this.stream.write(' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(i,l,a)),l.state=f.InsideTag,m=i.children,p=0,c=m.length;p<c;p++)_=m[p],this.writeChildNode(_,l,a+1);l.state=f.CloseTag,this.stream.write("]")}return l.state=f.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(i,l,a)),l.state=f.None,this.closeNode(i,l,a)},d.prototype.element=function(i,l,a){var _,p,c,m,g,b,n,o,t,S;a||(a=0),this.openNode(i,l,a),l.state=f.OpenTag,this.stream.write(this.indent(i,l,a)+"<"+i.name),t=i.attribs;for(n in t){if(!h.call(t,n))continue;_=t[n],this.attribute(_,l,a)}if(c=i.children.length,m=c===0?null:i.children[0],c===0||i.children.every(function(x){return(x.type===L.Text||x.type===L.Raw)&&x.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=f.CloseTag,this.stream.write("</"+i.name+">")):(l.state=f.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&c===1&&(m.type===L.Text||m.type===L.Raw)&&m.value!=null)this.stream.write(">"),l.state=f.InsideTag,l.suppressPrettyCount++,o=!0,this.writeChildNode(m,l,a+1),l.suppressPrettyCount--,o=!1,l.state=f.CloseTag,this.stream.write("</"+i.name+">");else{for(this.stream.write(">"+this.endline(i,l,a)),l.state=f.InsideTag,S=i.children,g=0,b=S.length;g<b;g++)p=S[g],this.writeChildNode(p,l,a+1);l.state=f.CloseTag,this.stream.write(this.indent(i,l,a)+"</"+i.name+">")}return this.stream.write(this.endline(i,l,a)),l.state=f.None,this.closeNode(i,l,a)},d.prototype.processingInstruction=function(i,l,a){return this.stream.write(d.__super__.processingInstruction.call(this,i,l,a))},d.prototype.raw=function(i,l,a){return this.stream.write(d.__super__.raw.call(this,i,l,a))},d.prototype.text=function(i,l,a){return this.stream.write(d.__super__.text.call(this,i,l,a))},d.prototype.dtdAttList=function(i,l,a){return this.stream.write(d.__super__.dtdAttList.call(this,i,l,a))},d.prototype.dtdElement=function(i,l,a){return this.stream.write(d.__super__.dtdElement.call(this,i,l,a))},d.prototype.dtdEntity=function(i,l,a){return this.stream.write(d.__super__.dtdEntity.call(this,i,l,a))},d.prototype.dtdNotation=function(i,l,a){return this.stream.write(d.__super__.dtdNotation.call(this,i,l,a))},d}(D)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(j,J,k){"use strict";(function(){var L,f,C=function(h,w){for(var d in w)D.call(w,d)&&(h[d]=w[d]);function i(){this.constructor=h}return i.prototype=w.prototype,h.prototype=new i,h.__super__=w.prototype,h},D={}.hasOwnProperty;f=j("./XMLWriterBase"),J.exports=L=function(u){C(h,u);function h(w){h.__super__.constructor.call(this,w)}return h.prototype.document=function(w,d){var i,l,a,_,p;for(d=this.filterOptions(d),_="",p=w.children,l=0,a=p.length;l<a;l++)i=p[l],_+=this.writeChildNode(i,d,0);return d.pretty&&_.slice(-d.newline.length)===d.newline&&(_=_.slice(0,-d.newline.length)),_},h}(f)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(j,J,k){"use strict";(function(){var L,f=function(u,h){return function(){return u.apply(h,arguments)}},C={}.hasOwnProperty;J.exports=L=function(){function D(u){this.assertLegalName=f(this.assertLegalName,this),this.assertLegalChar=f(this.assertLegalChar,this);var h,w,d;u||(u={}),this.options=u,this.options.version||(this.options.version="1.0"),w=u.stringify||{};for(h in w){if(!C.call(w,h))continue;d=w[h],this[h]=d}}return D.prototype.name=function(u){return this.options.noValidation?u:this.assertLegalName(""+u||"")},D.prototype.text=function(u){return this.options.noValidation?u:this.assertLegalChar(this.textEscape(""+u||""))},D.prototype.cdata=function(u){return this.options.noValidation?u:(u=""+u||"",u=u.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(u))},D.prototype.comment=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+u);return this.assertLegalChar(u)},D.prototype.raw=function(u){return this.options.noValidation?u:""+u||""},D.prototype.attValue=function(u){return this.options.noValidation?u:this.assertLegalChar(this.attEscape(u=""+u||""))},D.prototype.insTarget=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.insValue=function(u){if(this.options.noValidation)return u;if(u=""+u||"",u.match(/\?>/))throw new Error("Invalid processing instruction value: "+u);return this.assertLegalChar(u)},D.prototype.xmlVersion=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+u);return u},D.prototype.xmlEncoding=function(u){if(this.options.noValidation)return u;if(u=""+u||"",!u.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+u);return this.assertLegalChar(u)},D.prototype.xmlStandalone=function(u){return this.options.noValidation?u:u?"yes":"no"},D.prototype.dtdPubID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdSysID=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdElementValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttType=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdAttDefault=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdEntityValue=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.dtdNData=function(u){return this.options.noValidation?u:this.assertLegalChar(""+u||"")},D.prototype.convertAttKey="@",D.prototype.convertPIKey="?",D.prototype.convertTextKey="#text",D.prototype.convertCDataKey="#cdata",D.prototype.convertCommentKey="#comment",D.prototype.convertRawKey="#raw",D.prototype.assertLegalChar=function(u){var h,w;if(this.options.noValidation)return u;if(h="",this.options.version==="1.0"){if(h=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=u.match(h))throw new Error("Invalid character in string: "+u+" at index "+w.index)}else if(this.options.version==="1.1"&&(h=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=u.match(h)))throw new Error("Invalid character in string: "+u+" at index "+w.index);return u},D.prototype.assertLegalName=function(u){var h;if(this.options.noValidation)return u;if(this.assertLegalChar(u),h=/^([: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])*$/,!u.match(h))throw new Error("Invalid character in name");return u},D.prototype.textEscape=function(u){var h;return this.options.noValidation?u:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(h,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},D.prototype.attEscape=function(u){var h;return this.options.noValidation?u:(h=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,u.replace(h,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},D}()}).call(void 0)},{}],280:[function(j,J,k){"use strict";var L=j("babel-runtime/core-js/object/create"),f=C(L);function C(D){return D&&D.__esModule?D:{default:D}}(function(){var D,u,h,w=function(l,a){for(var _ in a)d.call(a,_)&&(l[_]=a[_]);function p(){this.constructor=l}return p.prototype=a.prototype,l.prototype=new p,l.__super__=a.prototype,l},d={}.hasOwnProperty;D=j("./NodeType"),u=j("./XMLCharacterData"),J.exports=h=function(i){w(l,i);function l(a,_){if(l.__super__.constructor.call(this,a),_==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=D.Text,this.value=this.stringify.text(_)}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 _,p,c;for(c="",p=this.previousSibling;p;)c=p.data+c,p=p.previousSibling;for(c+=this.data,_=this.nextSibling;_;)c=c+_.data,_=_.nextSibling;return c}}),l.prototype.clone=function(){return(0,f.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}(u)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(j,J,k){"use strict";(function(){var L,f,C,D,u,h,w,d,i,l,a,_,p,c,m,g,b,n={}.hasOwnProperty;b=j("./Utility").assign,L=j("./NodeType"),i=j("./XMLDeclaration"),l=j("./XMLDocType"),C=j("./XMLCData"),D=j("./XMLComment"),_=j("./XMLElement"),c=j("./XMLRaw"),m=j("./XMLText"),p=j("./XMLProcessingInstruction"),a=j("./XMLDummy"),u=j("./XMLDTDAttList"),h=j("./XMLDTDElement"),w=j("./XMLDTDEntity"),d=j("./XMLDTDNotation"),f=j("./WriterState"),J.exports=g=function(){function o(t){var S,x,s;t||(t={}),this.options=t,x=t.writer||{};for(S in x){if(!n.call(x,S))continue;s=x[S],this["_"+S]=this[S],this[S]=s}}return o.prototype.filterOptions=function(t){var S,x,s,P,O,E,v,y;return t||(t={}),t=b({},this.options,t),S={writer:this},S.pretty=t.pretty||!1,S.allowEmpty=t.allowEmpty||!1,S.indent=(x=t.indent)!=null?x:" ",S.newline=(s=t.newline)!=null?s:`
`,S.offset=(P=t.offset)!=null?P:0,S.dontPrettyTextNodes=(O=(E=t.dontPrettyTextNodes)!=null?E:t.dontprettytextnodes)!=null?O:0,S.spaceBeforeSlash=(v=(y=t.spaceBeforeSlash)!=null?y:t.spacebeforeslash)!=null?v:"",S.spaceBeforeSlash===!0&&(S.spaceBeforeSlash=" "),S.suppressPrettyCount=0,S.user={},S.state=f.None,S},o.prototype.indent=function(t,S,x){var s;return!S.pretty||S.suppressPrettyCount?"":S.pretty&&(s=(x||0)+S.offset+1,s>0)?new Array(s).join(S.indent):""},o.prototype.endline=function(t,S,x){return!S.pretty||S.suppressPrettyCount?"":S.newline},o.prototype.attribute=function(t,S,x){var s;return this.openAttribute(t,S,x),s=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,S,x),s},o.prototype.cdata=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<![CDATA[",S.state=f.InsideTag,s+=t.value,S.state=f.CloseTag,s+="]]>"+this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.comment=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<!-- ",S.state=f.InsideTag,s+=t.value,S.state=f.CloseTag,s+=" -->"+this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.declaration=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<?xml",S.state=f.InsideTag,s+=' version="'+t.version+'"',t.encoding!=null&&(s+=' encoding="'+t.encoding+'"'),t.standalone!=null&&(s+=' standalone="'+t.standalone+'"'),S.state=f.CloseTag,s+=S.spaceBeforeSlash+"?>",s+=this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.docType=function(t,S,x){var s,P,O,E,v;if(x||(x=0),this.openNode(t,S,x),S.state=f.OpenTag,E=this.indent(t,S,x),E+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?E+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(E+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(E+=" [",E+=this.endline(t,S,x),S.state=f.InsideTag,v=t.children,P=0,O=v.length;P<O;P++)s=v[P],E+=this.writeChildNode(s,S,x+1);S.state=f.CloseTag,E+="]"}return S.state=f.CloseTag,E+=S.spaceBeforeSlash+">",E+=this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),E},o.prototype.element=function(t,S,x){var s,P,O,E,v,y,T,M,N,I,G,H,W,z;x||(x=0),I=!1,G="",this.openNode(t,S,x),S.state=f.OpenTag,G+=this.indent(t,S,x)+"<"+t.name,H=t.attribs;for(N in H){if(!n.call(H,N))continue;s=H[N],G+=this.attribute(s,S,x)}if(O=t.children.length,E=O===0?null:t.children[0],O===0||t.children.every(function(U){return(U.type===L.Text||U.type===L.Raw)&&U.value===""}))S.allowEmpty?(G+=">",S.state=f.CloseTag,G+="</"+t.name+">"+this.endline(t,S,x)):(S.state=f.CloseTag,G+=S.spaceBeforeSlash+"/>"+this.endline(t,S,x));else if(S.pretty&&O===1&&(E.type===L.Text||E.type===L.Raw)&&E.value!=null)G+=">",S.state=f.InsideTag,S.suppressPrettyCount++,I=!0,G+=this.writeChildNode(E,S,x+1),S.suppressPrettyCount--,I=!1,S.state=f.CloseTag,G+="</"+t.name+">"+this.endline(t,S,x);else{if(S.dontPrettyTextNodes){for(W=t.children,v=0,T=W.length;v<T;v++)if(P=W[v],(P.type===L.Text||P.type===L.Raw)&&P.value!=null){S.suppressPrettyCount++,I=!0;break}}for(G+=">"+this.endline(t,S,x),S.state=f.InsideTag,z=t.children,y=0,M=z.length;y<M;y++)P=z[y],G+=this.writeChildNode(P,S,x+1);S.state=f.CloseTag,G+=this.indent(t,S,x)+"</"+t.name+">",I&&S.suppressPrettyCount--,G+=this.endline(t,S,x),S.state=f.None}return this.closeNode(t,S,x),G},o.prototype.writeChildNode=function(t,S,x){switch(t.type){case L.CData:return this.cdata(t,S,x);case L.Comment:return this.comment(t,S,x);case L.Element:return this.element(t,S,x);case L.Raw:return this.raw(t,S,x);case L.Text:return this.text(t,S,x);case L.ProcessingInstruction:return this.processingInstruction(t,S,x);case L.Dummy:return"";case L.Declaration:return this.declaration(t,S,x);case L.DocType:return this.docType(t,S,x);case L.AttributeDeclaration:return this.dtdAttList(t,S,x);case L.ElementDeclaration:return this.dtdElement(t,S,x);case L.EntityDeclaration:return this.dtdEntity(t,S,x);case L.NotationDeclaration:return this.dtdNotation(t,S,x);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},o.prototype.processingInstruction=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<?",S.state=f.InsideTag,s+=t.target,t.value&&(s+=" "+t.value),S.state=f.CloseTag,s+=S.spaceBeforeSlash+"?>",s+=this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.raw=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x),S.state=f.InsideTag,s+=t.value,S.state=f.CloseTag,s+=this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.text=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x),S.state=f.InsideTag,s+=t.value,S.state=f.CloseTag,s+=this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.dtdAttList=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<!ATTLIST",S.state=f.InsideTag,s+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,t.defaultValueType!=="#DEFAULT"&&(s+=" "+t.defaultValueType),t.defaultValue&&(s+=' "'+t.defaultValue+'"'),S.state=f.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.dtdElement=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<!ELEMENT",S.state=f.InsideTag,s+=" "+t.name+" "+t.value,S.state=f.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.dtdEntity=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<!ENTITY",S.state=f.InsideTag,t.pe&&(s+=" %"),s+=" "+t.name,t.value?s+=' "'+t.value+'"':(t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),t.nData&&(s+=" NDATA "+t.nData)),S.state=f.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.dtdNotation=function(t,S,x){var s;return this.openNode(t,S,x),S.state=f.OpenTag,s=this.indent(t,S,x)+"<!NOTATION",S.state=f.InsideTag,s+=" "+t.name,t.pubID&&t.sysID?s+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?s+=' PUBLIC "'+t.pubID+'"':t.sysID&&(s+=' SYSTEM "'+t.sysID+'"'),S.state=f.CloseTag,s+=S.spaceBeforeSlash+">"+this.endline(t,S,x),S.state=f.None,this.closeNode(t,S,x),s},o.prototype.openNode=function(t,S,x){},o.prototype.closeNode=function(t,S,x){},o.prototype.openAttribute=function(t,S,x){},o.prototype.closeAttribute=function(t,S,x){},o}()}).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(j,J,k){"use strict";(function(){var L,f,C,D,u,h,w,d,i,l;l=j("./Utility"),d=l.assign,i=l.isFunction,C=j("./XMLDOMImplementation"),D=j("./XMLDocument"),u=j("./XMLDocumentCB"),w=j("./XMLStringWriter"),h=j("./XMLStreamWriter"),L=j("./NodeType"),f=j("./WriterState"),J.exports.create=function(a,_,p,c){var m,g;if(a==null)throw new Error("Root element needs a name.");return c=d({},_,p,c),m=new D(c),g=m.element(a),c.headless||(m.declaration(c),(c.pubID!=null||c.sysID!=null)&&m.dtd(c)),g},J.exports.begin=function(a,_,p){var c;return i(a)&&(c=[a,_],_=c[0],p=c[1],a={}),_?new u(a,_,p):new D(a)},J.exports.stringWriter=function(a){return new w(a)},J.exports.streamWriter=function(a,_){return new h(a,_)},J.exports.implementation=new C,J.exports.nodeType=L,J.exports.writerState=f}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(j,J,k){J.exports=f;var L=Object.prototype.hasOwnProperty;function f(){for(var C={},D=0;D<arguments.length;D++){var u=arguments[D];for(var h in u)L.call(u,h)&&(C[h]=u[h])}return C}},{}],284:[function(j,J,k){"use strict";var L=j("buffer").Buffer,f=j("./sha"),C=j("./md5"),D={sha1:f,md5:C},u=64,h=L.alloc(u);h.fill(0);function w(l,a,_){L.isBuffer(a)||(a=L.from(a)),L.isBuffer(_)||(_=L.from(_)),a.length>u?a=l(a):a.length<u&&(a=L.concat([a,h],u));for(var p=L.alloc(u),c=L.alloc(u),m=0;m<u;m++)p[m]=a[m]^54,c[m]=a[m]^92;var g=l(L.concat([p,_]));return l(L.concat([c,g]))}function d(l,a){l=l||"sha1";var _=D[l],p=[],c=0;return _||i("algorithm:",l,"is not yet supported"),{update:function(g){return L.isBuffer(g)||(g=L.from(g)),p.push(g),c+=g.length,this},digest:function(g){var b=L.concat(p),n=a?w(_,a,b):_(b);return p=null,g?n.toString(g):n}}}function i(){var l=[].slice.call(arguments).join(" ");throw new Error([l,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}k.createHash=function(l){return d(l)},k.createHmac=function(l,a){return d(l,a)},k.createCredentials=function(){i("sorry,createCredentials is not implemented yet")},k.createCipher=function(){i("sorry,createCipher is not implemented yet")},k.createCipheriv=function(){i("sorry,createCipheriv is not implemented yet")},k.createDecipher=function(){i("sorry,createDecipher is not implemented yet")},k.createDecipheriv=function(){i("sorry,createDecipheriv is not implemented yet")},k.createSign=function(){i("sorry,createSign is not implemented yet")},k.createVerify=function(){i("sorry,createVerify is not implemented yet")},k.createDiffieHellman=function(){i("sorry,createDiffieHellman is not implemented yet")},k.pbkdf2=function(){i("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(j,J,k){"use strict";var L=j("buffer").Buffer,f=4,C=L.alloc(f);C.fill(0);var D=8;function u(d,i){if(d.length%f!==0){var l=d.length+(f-d.length%f);d=L.concat([d,C],l)}for(var a=[],_=i?d.readInt32BE:d.readInt32LE,p=0;p<d.length;p+=f)a.push(_.call(d,p));return a}function h(d,i,l){for(var a=L.alloc(i),_=l?a.writeInt32BE:a.writeInt32LE,p=0;p<d.length;p++)_.call(a,d[p],p*4,!0);return a}function w(d,i,l,a){L.isBuffer(d)||(d=L.from(d));var _=i(u(d,a),d.length*D);return h(_,l,a)}J.exports={hash:w}},{buffer:73}],286:[function(j,J,k){"use strict";var L=j("./helpers");function f(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(a,_){a[_>>5]|=128<<_%32,a[(_+64>>>9<<4)+14]=_;for(var p=1732584193,c=-271733879,m=-1732584194,g=271733878,b=0;b<a.length;b+=16){var n=p,o=c,t=m,S=g;p=u(p,c,m,g,a[b+0],7,-680876936),g=u(g,p,c,m,a[b+1],12,-389564586),m=u(m,g,p,c,a[b+2],17,606105819),c=u(c,m,g,p,a[b+3],22,-1044525330),p=u(p,c,m,g,a[b+4],7,-176418897),g=u(g,p,c,m,a[b+5],12,1200080426),m=u(m,g,p,c,a[b+6],17,-1473231341),c=u(c,m,g,p,a[b+7],22,-45705983),p=u(p,c,m,g,a[b+8],7,1770035416),g=u(g,p,c,m,a[b+9],12,-1958414417),m=u(m,g,p,c,a[b+10],17,-42063),c=u(c,m,g,p,a[b+11],22,-1990404162),p=u(p,c,m,g,a[b+12],7,1804603682),g=u(g,p,c,m,a[b+13],12,-40341101),m=u(m,g,p,c,a[b+14],17,-1502002290),c=u(c,m,g,p,a[b+15],22,1236535329),p=h(p,c,m,g,a[b+1],5,-165796510),g=h(g,p,c,m,a[b+6],9,-1069501632),m=h(m,g,p,c,a[b+11],14,643717713),c=h(c,m,g,p,a[b+0],20,-373897302),p=h(p,c,m,g,a[b+5],5,-701558691),g=h(g,p,c,m,a[b+10],9,38016083),m=h(m,g,p,c,a[b+15],14,-660478335),c=h(c,m,g,p,a[b+4],20,-405537848),p=h(p,c,m,g,a[b+9],5,568446438),g=h(g,p,c,m,a[b+14],9,-1019803690),m=h(m,g,p,c,a[b+3],14,-187363961),c=h(c,m,g,p,a[b+8],20,1163531501),p=h(p,c,m,g,a[b+13],5,-1444681467),g=h(g,p,c,m,a[b+2],9,-51403784),m=h(m,g,p,c,a[b+7],14,1735328473),c=h(c,m,g,p,a[b+12],20,-1926607734),p=w(p,c,m,g,a[b+5],4,-378558),g=w(g,p,c,m,a[b+8],11,-2022574463),m=w(m,g,p,c,a[b+11],16,1839030562),c=w(c,m,g,p,a[b+14],23,-35309556),p=w(p,c,m,g,a[b+1],4,-1530992060),g=w(g,p,c,m,a[b+4],11,1272893353),m=w(m,g,p,c,a[b+7],16,-155497632),c=w(c,m,g,p,a[b+10],23,-1094730640),p=w(p,c,m,g,a[b+13],4,681279174),g=w(g,p,c,m,a[b+0],11,-358537222),m=w(m,g,p,c,a[b+3],16,-722521979),c=w(c,m,g,p,a[b+6],23,76029189),p=w(p,c,m,g,a[b+9],4,-640364487),g=w(g,p,c,m,a[b+12],11,-421815835),m=w(m,g,p,c,a[b+15],16,530742520),c=w(c,m,g,p,a[b+2],23,-995338651),p=d(p,c,m,g,a[b+0],6,-198630844),g=d(g,p,c,m,a[b+7],10,1126891415),m=d(m,g,p,c,a[b+14],15,-1416354905),c=d(c,m,g,p,a[b+5],21,-57434055),p=d(p,c,m,g,a[b+12],6,1700485571),g=d(g,p,c,m,a[b+3],10,-1894986606),m=d(m,g,p,c,a[b+10],15,-1051523),c=d(c,m,g,p,a[b+1],21,-2054922799),p=d(p,c,m,g,a[b+8],6,1873313359),g=d(g,p,c,m,a[b+15],10,-30611744),m=d(m,g,p,c,a[b+6],15,-1560198380),c=d(c,m,g,p,a[b+13],21,1309151649),p=d(p,c,m,g,a[b+4],6,-145523070),g=d(g,p,c,m,a[b+11],10,-1120210379),m=d(m,g,p,c,a[b+2],15,718787259),c=d(c,m,g,p,a[b+9],21,-343485551),p=i(p,n),c=i(c,o),m=i(m,t),g=i(g,S)}return Array(p,c,m,g)}function D(a,_,p,c,m,g){return i(l(i(i(_,a),i(c,g)),m),p)}function u(a,_,p,c,m,g,b){return D(_&p|~_&c,a,_,m,g,b)}function h(a,_,p,c,m,g,b){return D(_&c|p&~c,a,_,m,g,b)}function w(a,_,p,c,m,g,b){return D(_^p^c,a,_,m,g,b)}function d(a,_,p,c,m,g,b){return D(p^(_|~c),a,_,m,g,b)}function i(a,_){var p=(a&65535)+(_&65535),c=(a>>16)+(_>>16)+(p>>16);return c<<16|p&65535}function l(a,_){return a<<_|a>>>32-_}J.exports=function(_){return L.hash(_,C,16)}},{"./helpers":285}],287:[function(j,J,k){"use strict";var L=j("./helpers");function f(w,d){w[d>>5]|=128<<24-d%32,w[(d+64>>9<<4)+15]=d;for(var i=Array(80),l=1732584193,a=-271733879,_=-1732584194,p=271733878,c=-1009589776,m=0;m<w.length;m+=16){for(var g=l,b=a,n=_,o=p,t=c,S=0;S<80;S++){S<16?i[S]=w[m+S]:i[S]=h(i[S-3]^i[S-8]^i[S-14]^i[S-16],1);var x=u(u(h(l,5),C(S,a,_,p)),u(u(c,i[S]),D(S)));c=p,p=_,_=h(a,30),a=l,l=x}l=u(l,g),a=u(a,b),_=u(_,n),p=u(p,o),c=u(c,t)}return Array(l,a,_,p,c)}function C(w,d,i,l){return w<20?d&i|~d&l:w<40?d^i^l:w<60?d&i|d&l|i&l:d^i^l}function D(w){return w<20?1518500249:w<40?1859775393:w<60?-1894007588:-899497514}function u(w,d){var i=(w&65535)+(d&65535),l=(w>>16)+(d>>16)+(i>>16);return l<<16|i&65535}function h(w,d){return w<<d|w>>>32-d}J.exports=function(d){return L.hash(d,f,20,!0)}},{"./helpers":285}],288:[function(j,J,k){"use strict";J.exports=function(){return function(){}}},{}],289:[function(j,J,k){(function(L){"use strict";var f=j("babel-runtime/helpers/typeof"),C=D(f);function D(l){return l&&l.__esModule?l:{default:l}}var u=j("stream"),h=u.Stream,w=j("../lib/common/utils/isArray"),d=w.isArray;J.exports.string=function(a){return typeof a=="string"},J.exports.array=d,J.exports.buffer=L.isBuffer;function i(l){return l instanceof h}J.exports.writableStream=function(a){return i(a)&&typeof a._write=="function"&&(0,C.default)(a._writableState)==="object"}}).call(this,{isBuffer:j("../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(j,J,k){"use strict";k.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(f){return L}},k.escape=j("escape-html"),k.timestamp=function(f){if(f){var C=f;return typeof C=="string"&&(C=Number(C)),String(f).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(j,J,k){(function(L,f){"use strict";var C=j("babel-runtime/core-js/json/stringify"),D=w(C),u=j("babel-runtime/helpers/typeof"),h=w(u);function w(S){return S&&S.__esModule?S:{default:S}}var d=j("util"),i=j("url"),l=j("http"),a=j("https"),_=j("debug")("urllib"),p=j("humanize-ms"),c,m=0,g=Math.pow(2,31)-10,b=/^https?:\/\//i;function n(S,x){return S===void 0?x:S}function o(S,x){return function(s,P,O){if(s)return x(s);S({data:P,status:O.statusCode,headers:O.headers,res:O})}}k.TIMEOUTS=[p("300s"),p("300s")];var t=["json","text"];k.request=function(x,s,P){return arguments.length===2&&typeof s=="function"&&(P=s,s=null),typeof P=="function"?k.requestWithCallback(x,s,P):(c||(c=j("any-promise")),new c(function(O,E){k.requestWithCallback(x,s,o(O,E))}))},k.requestWithCallback=function(x,s,P){if(!x||typeof x!="string"&&(typeof x=="undefined"?"undefined":(0,h.default)(x))!=="object"){var O=d.format("expect request url to be a string or a http request options, but got %j",x);throw new Error(O)}arguments.length===2&&typeof s=="function"&&(P=s,s=null),s=s||{},m>=g&&(m=0);var E=++m;s.requestUrls=s.requestUrls||[];var v={requestId:E,url:x,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",v),s.timeout=s.timeout||k.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var y=Date.now(),T;typeof x=="string"?(b.test(x)||(x="http://"+x),T=i.parse(x)):T=x;var M=(s.type||s.method||T.method||"GET").toUpperCase(),N=T.port||80,I=l,G=n(s.agent,k.agent),H=s.fixJSONCtlChars;T.protocol==="https:"&&(I=a,G=n(s.httpsAgent,k.httpsAgent),T.port||(N=443));var W={host:T.hostname||T.host||"localhost",path:T.path||"/",method:M,port:N,agent:G,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?W.requestTimeout=s.timeout[s.timeout.length-1]:typeof s.timeout!="undefined"&&(W.requestTimeout=s.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<z.length;U++){var B=z[U];s.hasOwnProperty(B)&&(W[B]=s[B])}W.rejectUnauthorized===!1&&!W.hasOwnProperty("secureOptions")&&(W.secureOptions=j("constants").SSL_OP_NO_TLSv1_2);var K=s.auth||T.auth;K&&(W.auth=K);var q=s.content||s.data,ae=M==="GET"||M==="HEAD"||s.dataAsQueryString;if(!s.content&&(q&&!(typeof q=="string"||f.isBuffer(q))))if(ae)q=s.nestedQuerystring?qs.stringify(q):querystring.stringify(q);else{var se=W.headers["Content-Type"]||W.headers["content-type"];se||(s.contentType==="json"?se="application/json":se="application/x-www-form-urlencoded",W.headers["Content-Type"]=se),parseContentType(se).type==="application/json"?q=(0,D.default)(q):q=s.nestedQuerystring?qs.stringify(q):querystring.stringify(q)}ae&&q&&(W.path+=(T.query?"&":"?")+q,q=null);var we=0;if(q){var Te=q.length;f.isBuffer(q)||(Te=f.byteLength(q)),we=W.headers["Content-Length"]=Te}s.dataType==="json"&&(W.headers.Accept="application/json"),typeof s.beforeRequest=="function"&&s.beforeRequest(W);var de=null,xe=null,pe=null,ne=!1,ie=!1,ee=0,le=-1,Q=!1,Z="",be="",te=null;s.timing&&(te={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function $(){de&&(clearTimeout(de),de=null)}function X(){xe&&(clearTimeout(xe),xe=null)}function Y(Ce,Qe,st){if(X(),!P){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),E,L.pid,W.method,x),Ce&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),E,L.pid,Ce.name,Ce.message,Ce.stack);return}var Ge=P;P=null;var rt={};if(st&&(le=st.statusCode,rt=st.headers),le===401&&rt["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var Re=rt["www-authenticate"];if(Re.indexOf("Digest ")>=0)return _("Request#%d %s: got digest auth header WWW-Authenticate: %s",E,x,Re),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(W.method,W.path,Re,s.digestAuth),_("Request#%d %s: auth with digest header: %s",E,x,s.headers.Authorization),st.headers["set-cookie"]&&(s.headers.Cookie=st.headers["set-cookie"].join(";")),k.requestWithCallback(x,s,Ge)}var Se=Date.now()-y;te&&(te.contentDownload=Se),_("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Se,ee,le,W.method,W.host,W.path,ie,te);var De={status:le,statusCode:le,headers:rt,size:ee,aborted:Q,rt:Se,keepAliveSocket:ie,data:Qe,requestUrls:s.requestUrls,timing:te,remoteAddress:Z,remotePort:be};if(Ce){var fe="";G&&typeof G.getCurrentStatus=="function"&&(fe=", agent status: "+(0,D.default)(G.getCurrentStatus())),Ce.message+=", "+W.method+" "+x+" "+le+" (connected: "+ne+", keepalive socket: "+ie+fe+`)
headers: `+(0,D.default)(rt),Ce.data=Qe,Ce.path=W.path,Ce.status=le,Ce.headers=rt,Ce.res=De}Ge(Ce,Qe,s.streaming?st:De),s.emitter&&(v.url=x,v.socket=lt&&lt.connection,v.options=W,v.size=we,s.emitter.emit("response",{requestId:E,error:Ce,ctx:s.ctx,req:v,res:De}))}function ve(Ce){var Qe=null;if(s.followRedirect&&statuses.redirect[Ce.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var st=Ce.headers.location;if(!st)Qe=new Error("Got statusCode "+Ce.statusCode+" but cannot resolve next location from headers"),Qe.name="FollowRedirectError";else if(s._followRedirectCount>s.maxRedirects)Qe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+x),Qe.name="MaxRedirectError";else{var Ge=s.formatRedirectUrl?s.formatRedirectUrl(x,st):i.resolve(x,st);_("Request#%d %s: `redirected` from %s to %s",E,W.path,x,Ge),X(),s.headers&&s.headers.Host&&b.test(st)&&(s.headers.Host=null);var rt=P;return P=null,k.requestWithCallback(Ge,s,rt),{redirect:!0,error:null}}}return{redirect:!1,error:Qe}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),s.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function ue(Ce,Qe,st){var Ge=Ce.headers["content-encoding"];return st(null,Qe,Ge)}var Ee=s.writeStream;_("Request#%d %s %s with headers %j, options.path: %s",E,M,x,W.headers,W.path),s.requestUrls.push(x);function Ke(Ce){if(te&&(te.waiting=Date.now()-y),_("Request#%d %s `req response` event emit: status %d, headers: %j",E,x,Ce.statusCode,Ce.headers),s.streaming){var Qe=ve(Ce);if(Qe.redirect){Ce.resume();return}return Qe.error?(Ce.resume(),Y(Qe.error,null,Ce)):Y(null,null,Ce)}if(Ce.on("close",function(){_("Request#%d %s: `res close` event emit, total size %d",E,x,ee)}),Ce.on("error",function(){_("Request#%d %s: `res error` event emit, total size %d",E,x,ee)}),Ce.on("aborted",function(){Q=!0,_("Request#%d %s: `res aborted` event emit, total size %d",E,x,ee)}),Ee){var Qe=ve(Ce);if(Qe.redirect){Ce.resume();return}return Qe.error?(Ce.resume(),Ee.end(),Y(Qe.error,null,Ce)):(s.consumeWriteStream===!1?Ce.on("end",Y.bind(null,null,null,Ce)):isNode010||isNode012?first([[Ee,"close"],[Ce,"aborted"]],function(rt,Re,Se){_("Request#%d %s: writeStream or res %s event emitted",E,x,Se),Y(pe||null,null,Ce)}):Ee.on("close",function(){_("Request#%d %s: writeStream close event emitted",E,x),Y(pe||null,null,Ce)}),Ce.pipe(Ee))}var st=[];Ce.on("data",function(Ge){_("Request#%d %s: `res data` event emit, size %d",E,x,Ge.length),ee+=Ge.length,st.push(Ge)}),Ce.on("end",function(){var Ge=f.concat(st,ee);if(_("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",E,x,ee,Ce._dumped),pe)return Y(pe,Ge,Ce);var rt=ve(Ce);if(rt.error)return Y(rt.error,Ge,Ce);if(rt.redirect)return;ue(Ce,Ge,function(Re,Se,De){if(Re)return Y(Re,Ge,Ce);if(!De&&t.indexOf(s.dataType)>=0){try{Se=decodeBodyByCharset(Se,Ce)}catch(ye){return _("decodeBodyByCharset error: %s",ye),Y(null,Se,Ce)}if(s.dataType==="json")if(ee===0)Se=null;else{var fe=parseJSON(Se,H);fe.error?Re=fe.error:Se=fe.data}}Q&&_("Request#%d %s: Remote socket was terminated before `response.end()` was called",E,x),Y(Re,Se,Ce)})})}var Ye,Je;Array.isArray(s.timeout)?(Ye=p(s.timeout[0]),Je=p(s.timeout[1])):Ye=Je=p(s.timeout),_("ConnectTimeout: %d, ResponseTimeout: %d",Ye,Je);function tt(){_("Connect timer ticking, timeout: %d",Ye),de=setTimeout(function(){de=null,le===-1&&(le=-2);var Ce="Connect timeout for "+Ye+"ms",Qe="ConnectionTimeoutError";lt.socket||(Qe="SocketAssignTimeoutError",Ce+=", working sockets is full"),pe=new Error(Ce),pe.name=Qe,pe.requestId=E,_("ConnectTimeout: Request#%d %s %s: %s, connected: %s",E,x,pe.name,Ce,ne),je()},Ye)}function at(){_("Response timer ticking, timeout: %d",Je),xe=setTimeout(function(){xe=null;var Ce="Response timeout for "+Je+"ms",Qe="ResponseTimeoutError";pe=new Error(Ce),pe.name=Qe,pe.requestId=E,_("ResponseTimeout: Request#%d %s %s: %s, connected: %s",E,x,pe.name,Ce,ne),je()},Je)}var lt;W.mode=s.mode?s.mode:"";try{lt=I.request(W,Ke)}catch(Ce){return Y(Ce)}typeof window=="undefined"?tt():lt.on("requestTimeout",function(){le===-1&&(le=-2);var Ce="Connect timeout for "+Ye+"ms",Qe="ConnectionTimeoutError";pe=new Error(Ce),pe.name=Qe,pe.requestId=E,je()});function je(){_("Request#%d %s abort, connected: %s",E,x,ne),lt.socket||(pe.noSocket=!0,Y(pe)),lt.abort()}return te&&lt.on("finish",function(){te.requestSent=Date.now()-y}),lt.once("socket",function(Ce){te&&(te.queuing=Date.now()-y),isNode010&&Ce.socket&&(Ce=Ce.socket);var Qe=Ce.readyState;if(Qe==="opening"){Ce.once("lookup",function(st,Ge,rt){_("Request#%d %s lookup: %s, %s, %s",E,x,st,Ge,rt),te&&(te.dnslookup=Date.now()-y),Ge&&(Z=Ge)}),Ce.once("connect",function(){te&&(te.connected=Date.now()-y),$(),at(),_("Request#%d %s new socket connected",E,x),ne=!0,Z||(Z=Ce.remoteAddress),be=Ce.remotePort});return}_("Request#%d %s reuse socket connected, readyState: %s",E,x,Qe),ne=!0,ie=!0,Z||(Z=Ce.remoteAddress),be=Ce.remotePort,$(),at()}),lt.on("error",function(Ce){(Ce.name==="Error"||Ce.name==="TypeError")&&(Ce.name=ne?"ResponseError":"RequestError"),Ce.message+=' (req "error")',_("Request#%d %s `req error` event emit, %s: %s",E,x,Ce.name,Ce.message),Y(pe||Ce)}),Ee&&Ee.once("error",function(Ce){Ce.message+=' (writeStream "error")',pe=Ce,_("Request#%d %s `writeStream error` event emit, %s: %s",E,x,Ce.name,Ce.message),je()}),s.stream?(s.stream.pipe(lt),s.stream.once("error",function(Ce){Ce.message+=' (stream "error")',pe=Ce,_("Request#%d %s `readStream error` event emit, %s: %s",E,x,Ce.name,Ce.message),je()})):lt.end(q),lt.requestId=E,lt}}).call(this,j("_process"),j("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"))},n6Qo:function(j,J,k){"use strict";k.d(J,"a",function(){return d});var L=k("cDcd"),f=k("biw7"),C=k("fyJ8");function D(i){var l=i.className,a=i.index,_=i.children,p=i.colSpan,c=i.rowSpan,m=L.useContext(f.a),g=m.prefixCls,b=m.fixedInfoList,n=b[a];return L.createElement(C.a,Object.assign({className:l,index:a,component:"td",prefixCls:g,record:null,dataIndex:null,render:function(){return{children:_,props:{colSpan:p,rowSpan:c}}}},n))}function u(i){return L.createElement("tr",Object.assign({},i))}function h(i){var l=i.children,a=L.useContext(f.a),_=a.prefixCls;return L.createElement("tfoot",{className:"".concat(_,"-summary")},l)}var w=J.b=h,d={Cell:D,Row:u}},oRuE:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.Iso10126={pad:function(f,C){var D=C*4,u=D-f.sigBytes%D;f.concat(L.lib.WordArray.random(u-1)).concat(L.lib.WordArray.create([u<<24],1))},unpad:function(f){var C=f.words[f.sigBytes-1>>>2]&255;f.sigBytes-=C}},L.pad.Iso10126})},osHv:function(j,J,k){(function(L){L(k("VrN/"))})(function(L){"use strict";var f=L.Pos;function C(b,n){return b.line-n.line||b.ch-n.ch}var D="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",u=D+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",h=new RegExp("<(/?)(["+D+"]["+u+"]*)","g");function w(b,n,o,t){this.line=n,this.ch=o,this.cm=b,this.text=b.getLine(n),this.min=t?Math.max(t.from,b.firstLine()):b.firstLine(),this.max=t?Math.min(t.to-1,b.lastLine()):b.lastLine()}function d(b,n){var o=b.cm.getTokenTypeAt(f(b.line,n));return o&&/\btag\b/.test(o)}function i(b){return b.line>=b.max?void 0:(b.ch=0,b.text=b.cm.getLine(++b.line),!0)}function l(b){return b.line<=b.min?void 0:(b.text=b.cm.getLine(--b.line),b.ch=b.text.length,!0)}function a(b){for(;;){var n=b.text.indexOf(">",b.ch);if(n==-1){if(i(b))continue;return}if(!d(b,n+1)){b.ch=n+1;continue}var o=b.text.lastIndexOf("/",n),t=o>-1&&!/\S/.test(b.text.slice(o+1,n));return b.ch=n+1,t?"selfClose":"regular"}}function _(b){for(;;){var n=b.ch?b.text.lastIndexOf("<",b.ch-1):-1;if(n==-1){if(l(b))continue;return}if(!d(b,n+1)){b.ch=n;continue}h.lastIndex=n,b.ch=n;var o=h.exec(b.text);if(o&&o.index==n)return o}}function p(b){for(;;){h.lastIndex=b.ch;var n=h.exec(b.text);if(!n){if(i(b))continue;return}if(!d(b,n.index+1)){b.ch=n.index+1;continue}return b.ch=n.index+n[0].length,n}}function c(b){for(;;){var n=b.ch?b.text.lastIndexOf(">",b.ch-1):-1;if(n==-1){if(l(b))continue;return}if(!d(b,n+1)){b.ch=n;continue}var o=b.text.lastIndexOf("/",n),t=o>-1&&!/\S/.test(b.text.slice(o+1,n));return b.ch=n+1,t?"selfClose":"regular"}}function m(b,n){for(var o=[];;){var t=p(b),S,x=b.line,s=b.ch-(t?t[0].length:0);if(!t||!(S=a(b)))return;if(S=="selfClose")continue;if(t[1]){for(var P=o.length-1;P>=0;--P)if(o[P]==t[2]){o.length=P;break}if(P<0&&(!n||n==t[2]))return{tag:t[2],from:f(x,s),to:f(b.line,b.ch)}}else o.push(t[2])}}function g(b,n){for(var o=[];;){var t=c(b);if(!t)return;if(t=="selfClose"){_(b);continue}var S=b.line,x=b.ch,s=_(b);if(!s)return;if(s[1])o.push(s[2]);else{for(var P=o.length-1;P>=0;--P)if(o[P]==s[2]){o.length=P;break}if(P<0&&(!n||n==s[2]))return{tag:s[2],from:f(b.line,b.ch),to:f(S,x)}}}}L.registerHelper("fold","xml",function(b,n){for(var o=new w(b,n.line,0);;){var t=p(o);if(!t||o.line!=n.line)return;var S=a(o);if(!S)return;if(!t[1]&&S!="selfClose"){var x=f(o.line,o.ch),s=m(o,t[2]);return s&&C(s.from,x)>0?{from:x,to:s.from}:null}}}),L.findMatchingTag=function(b,n,o){var t=new w(b,n.line,n.ch,o);if(t.text.indexOf(">")==-1&&t.text.indexOf("<")==-1)return;var S=a(t),x=S&&f(t.line,t.ch),s=S&&_(t);if(!S||!s||C(t,n)>0)return;var P={from:f(t.line,t.ch),to:x,tag:s[2]};return S=="selfClose"?{open:P,close:null,at:"open"}:s[1]?{open:g(t,s[2]),close:P,at:"close"}:(t=new w(b,x.line,x.ch,o),{open:P,close:m(t,s[2]),at:"open"})},L.findEnclosingTag=function(b,n,o,t){for(var S=new w(b,n.line,n.ch,o);;){var x=g(S,t);if(!x)break;var s=new w(b,n.line,n.ch,o),P=m(s,x.tag);if(P)return{open:x,close:P}}},L.scanForClosingTag=function(b,n,o,t){var S=new w(b,n.line,n.ch,t?{from:0,to:t}:null);return m(S,o)}})},p5ED:function(j,J,k){"use strict";var L=k("+L6B"),f=k("2/Rp"),C=k("5Dmo"),D=k("3S7+"),u=k("k1fw"),h=k("tJVT"),w=k("cDcd"),d=k.n(w),i=k("vHTk"),l=k.n(i),a=k("yEEn"),_=k("ZW9T"),p=k("1vsH");J.a=function(c){var m=c.name,g=c.data,b=c.theme,n=c.type,o=c.filename,t=c.monacoEditor,S=c.className,x=c.style,s=c.close,P=c.onClose,O=c.hasMask,E=Object(w.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),v=Object(h.a)(E,2),y=v[0],T=v[1],M=Object(w.useState)(""),N=Object(h.a)(M,2),I=N[0],G=N[1],H=Object(w.useRef)();o&&(t.filename=o),Object(w.useEffect)(function(){var U,B,K=(U=document.cookie)===null||U===void 0||((B=U.replace(/\s/g,""))===null||B===void 0)?void 0:B.split(";");K==null||K.map(function(q){var ae=q.split("=");ae[0]==="_educoder_session"&&G(ae[1])})},[]);var W=function(){if(g.startsWith("http")||g.startsWith("/")){z();return}Object(p.x)(o||"educoder",g,o)},z=function(){Object(p.v)(o||m,g)};return console.log("data:",g,"fileanme:",o," name:",m),d.a.createElement("div",{style:Object(u.a)({},x||{}),className:"".concat(O&&l.a.bgBlack," ").concat(n?l.a.wrp:"hide")},s&&d.a.createElement("div",{className:l.a.close,ref:H},d.a.createElement(D.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return H.current}},d.a.createElement("span",{onClick:z},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(D.a,{title:"\u5173\u95ED",getPopupContainer:function(){return H.current}},d.a.createElement("span",{className:"",onClick:P},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(l.a[S]," ").concat(S," ").concat(l.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&d.a.createElement(_.b,t)),n==="audio"&&d.a.createElement("audio",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?g:"data:audio/mp3;base64,").concat(g),autoPlay:!0}),n==="video"&&d.a.createElement(d.a.Fragment,null,g!=null&&g.startsWith("/")?d.a.createElement("video",{controls:!0,src:"".concat(g),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(g),autoPlay:!0})),n==="pdf"&&d.a.createElement("embed",{className:l.a.embed,src:g}),n==="image"&&d.a.createElement(d.a.Fragment,null,d.a.createElement("img",{src:"".concat(g!=null&&g.startsWith("/")||(g==null?void 0:g.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(g)})),n==="other"&&d.a.createElement("div",null,d.a.createElement(f.a,{type:"primary",size:"large",onClick:W},d.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&d.a.createElement(f.a,{type:"primary",size:"large",onClick:W},d.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(j,J,k){},pA7S:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=C.BlockCipher,h=f.algo,w=[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],d=[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],i=[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],_=h.DES=u.extend({_doReset:function(){for(var g=this._key,b=g.words,n=[],o=0;o<56;o++){var t=w[o]-1;n[o]=b[t>>>5]>>>31-t%32&1}for(var S=this._subKeys=[],x=0;x<16;x++){for(var s=S[x]=[],P=i[x],o=0;o<24;o++)s[o/6|0]|=n[(d[o]-1+P)%28]<<31-o%6,s[4+(o/6|0)]|=n[28+(d[o+24]-1+P)%28]<<31-o%6;s[0]=s[0]<<1|s[0]>>>31;for(var o=1;o<7;o++)s[o]=s[o]>>>(o-1)*4+3;s[7]=s[7]<<5|s[7]>>>27}for(var O=this._invSubKeys=[],o=0;o<16;o++)O[o]=S[15-o]},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._subKeys)},decryptBlock:function(g,b){this._doCryptBlock(g,b,this._invSubKeys)},_doCryptBlock:function(g,b,n){this._lBlock=g[b],this._rBlock=g[b+1],p.call(this,4,252645135),p.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),p.call(this,1,1431655765);for(var o=0;o<16;o++){for(var t=n[o],S=this._lBlock,x=this._rBlock,s=0,P=0;P<8;P++)s|=l[P][((x^t[P])&a[P])>>>0];this._lBlock=x,this._rBlock=S^s}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,p.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),g[b]=this._lBlock,g[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(g,b){var n=(this._lBlock>>>g^this._rBlock)&b;this._rBlock^=n,this._lBlock^=n<<g}function c(g,b){var n=(this._rBlock>>>g^this._lBlock)&b;this._lBlock^=n,this._rBlock^=n<<g}f.DES=u._createHelper(_);var m=h.TripleDES=u.extend({_doReset:function(){var g=this._key,b=g.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=b.slice(0,2),o=b.length<4?b.slice(0,2):b.slice(2,4),t=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=_.createEncryptor(D.create(n)),this._des2=_.createEncryptor(D.create(o)),this._des3=_.createEncryptor(D.create(t))},encryptBlock:function(g,b){this._des1.encryptBlock(g,b),this._des2.decryptBlock(g,b),this._des3.encryptBlock(g,b)},decryptBlock:function(g,b){this._des3.decryptBlock(g,b),this._des2.encryptBlock(g,b),this._des1.decryptBlock(g,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});f.TripleDES=u._createHelper(m)}(),L.TripleDES})},pIsd:function(j,J,k){var L=k("BJfS"),f=function(u){var h=/[height|width]$/;return h.test(u)},C=function(u){var h="",w=Object.keys(u);return w.forEach(function(d,i){var l=u[d];d=L(d),f(d)&&typeof l=="number"&&(l=l+"px"),l===!0?h+=d:l===!1?h+="not "+d:h+="("+d+": "+l+")",i<w.length-1&&(h+=" and ")}),h},D=function(u){var h="";return typeof u=="string"?u:u instanceof Array?(u.forEach(function(w,d){h+=C(w),d<u.length-1&&(h+=", ")}),h):C(u)};j.exports=D},qBft:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.AnsiX923={pad:function(f,C){var D=f.sigBytes,u=C*4,h=u-D%u,w=D+h-1;f.clamp(),f.words[w>>>2]|=h<<24-w%4*8,f.sigBytes+=h},unpad:function(f){var C=f.words[f.sigBytes-1>>>2]&255;f.sigBytes-=C}},L.pad.Ansix923})},qHvr:function(j,J,k){"use strict";var L=k("2qtc"),f=k("kLXV"),C=k("5NDa"),D=k("5rEg"),u=k("miYZ"),h=k("tsqr"),w=k("tJVT"),d=k("cDcd"),i=k.n(d),l=k("4i/N");function a(_){var p=_.isAddmodle,c=_.setIsAdd,m=_.createTeam,g=Object(d.useState)(""),b=Object(w.a)(g,2),n=b[0],o=b[1];return i.a.createElement(f.a,{centered:!0,title:i.a.createElement("div",{style:{alignItems:"center",display:"flex"}},i.a.createElement("div",{style:{textAlign:"left",flex:"1"}},"\u521B\u5EFA\u6218\u961F"),i.a.createElement(l.a,{onClick:function(){return c(!1)},style:{cursor:"porint"}})),visible:p,closable:!1,destroyOnClose:!0,onOk:function(){if(!n){h.b.info("\u6218\u961F\u540D\u4E0D\u80FD\u4E3A\u7A7A");return}m(n)},onCancel:function(){return c(!1)}},i.a.createElement("div",null,i.a.createElement("span",{style:{fontSize:"14px",color:"#F73737"}},"*"),"\u961F\u540D\uFF1A",i.a.createElement("p",{style:{marginTop:"15px",marginLeft:"15px"}},i.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u961F\u540D",value:n,maxLength:60,addonAfter:String(n&&n.length||0)+"/60",onChange:function(S){return o(S.target.value)}}))))}J.a=a},qM6L:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.enc,h=u.Utf16=u.Utf16BE={stringify:function(d){for(var i=d.words,l=d.sigBytes,a=[],_=0;_<l;_+=2){var p=i[_>>>2]>>>16-_%4*8&65535;a.push(String.fromCharCode(p))}return a.join("")},parse:function(d){for(var i=d.length,l=[],a=0;a<i;a++)l[a>>>1]|=d.charCodeAt(a)<<16-a%2*16;return D.create(l,i*2)}};u.Utf16LE={stringify:function(d){for(var i=d.words,l=d.sigBytes,a=[],_=0;_<l;_+=2){var p=w(i[_>>>2]>>>16-_%4*8&65535);a.push(String.fromCharCode(p))}return a.join("")},parse:function(d){for(var i=d.length,l=[],a=0;a<i;a++)l[a>>>1]|=w(d.charCodeAt(a)<<16-a%2*16);return D.create(l,i*2)}};function w(d){return d<<8&4278255360|d>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return L.mode.CTRGladman=function(){var f=L.lib.BlockCipherMode.extend();function C(h){if((h>>24&255)===255){var w=h>>16&255,d=h>>8&255,i=h&255;w===255?(w=0,d===255?(d=0,i===255?i=0:++i):++d):++w,h=0,h+=w<<16,h+=d<<8,h+=i}else h+=1<<24;return h}function D(h){return(h[0]=C(h[0]))===0&&(h[1]=C(h[1])),h}var u=f.Encryptor=f.extend({processBlock:function(h,w){var d=this._cipher,i=d.blockSize,l=this._iv,a=this._counter;l&&(a=this._counter=l.slice(0),this._iv=void 0),D(a);var _=a.slice(0);d.encryptBlock(_,0);for(var p=0;p<i;p++)h[w+p]^=_[p]}});return f.Decryptor=u,f}(),L.mode.CTRGladman})},"rAM+":function(j,J,k){"use strict";k.d(J,"a",function(){return f});var L=k("Qw5x");function f(C,D){var u;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(u=Object(L.a)(C))||D&&C&&typeof C.length=="number"){u&&(C=u);var h=0,w=function(){};return{s:w,n:function(){return h>=C.length?{done:!0}:{done:!1,value:C[h++]}},e:function(_){throw _},f:w}}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 d=!0,i=!1,l;return{s:function(){u=C[Symbol.iterator]()},n:function(){var _=u.next();return d=_.done,_},e:function(_){i=!0,l=_},f:function(){try{!d&&u.return!=null&&u.return()}finally{if(i)throw l}}}}},rUJ1:function(j,J){const k=/[&<>"']/,L=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=O=>D[O];function h(O,E){if(E){if(k.test(O))return O.replace(L,u)}else if(f.test(O))return O.replace(C,u);return O}const w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(O){return O.replace(w,(E,v)=>(v=v.toLowerCase(),v==="colon"?":":v.charAt(0)==="#"?v.charAt(1)==="x"?String.fromCharCode(parseInt(v.substring(2),16)):String.fromCharCode(+v.substring(1)):""))}const i=/(^|[^\[])\^/g;function l(O,E){O=O.source||O,E=E||"";const v={replace:(y,T)=>(T=T.source||T,T=T.replace(i,"$1"),O=O.replace(y,T),v),getRegex:()=>new RegExp(O,E)};return v}const a=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(O,E,v){if(O){let y;try{y=decodeURIComponent(d(v)).replace(a,"").toLowerCase()}catch(T){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}E&&!_.test(v)&&(v=n(E,v));try{v=encodeURI(v).replace(/%25/g,"%")}catch(y){return null}return v}const c={},m=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(O,E){c[" "+O]||(m.test(O)?c[" "+O]=O+"/":c[" "+O]=x(O,"/",!0)),O=c[" "+O];const v=O.indexOf(":")===-1;return E.substring(0,2)==="//"?v?E:O.replace(g,"$1")+E:E.charAt(0)==="/"?v?E:O.replace(b,"$1")+E:O+E}const o={exec:function(){}};function t(O){let E=1,v,y;for(;E<arguments.length;E++){v=arguments[E];for(y in v)Object.prototype.hasOwnProperty.call(v,y)&&(O[y]=v[y])}return O}function S(O,E){const v=O.replace(/\|/g,(M,N,I)=>{let G=!1,H=N;for(;--H>=0&&I[H]==="\\";)G=!G;return G?"|":" |"}),y=v.split(/ \|/);let T=0;if(y.length>E)y.splice(E);else for(;y.length<E;)y.push("");for(;T<y.length;T++)y[T]=y[T].trim().replace(/\\\|/g,"|");return y}function x(O,E,v){const y=O.length;if(y===0)return"";let T=0;for(;T<y;){const M=O.charAt(y-T-1);if(M===E&&!v)T++;else if(M!==E&&v)T++;else break}return O.substr(0,y-T)}function s(O,E){if(O.indexOf(E[1])===-1)return-1;const v=O.length;let y=0,T=0;for(;T<v;T++)if(O[T]==="\\")T++;else if(O[T]===E[0])y++;else if(O[T]===E[1]&&(y--,y<0))return T;return-1}function P(O){O&&O.sanitize&&!O.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")}j.exports={escape:h,unescape:d,edit:l,cleanUrl:p,resolveUrl:n,noopTest:o,merge:t,splitCells:S,rtrim:x,findClosingBracket:s,checkSanitizeDeprecation:P}},sR1s:function(j,J,k){"use strict";k.d(J,"b",function(){return D}),k.d(J,"a",function(){return u}),k.d(J,"c",function(){return h}),k.d(J,"d",function(){return w});var L=k("U8pU"),f="RC_TABLE_KEY";function C(d){return d==null?[]:Array.isArray(d)?d:[d]}function D(d,i){if(!i&&typeof i!="number")return d;for(var l=C(i),a=d,_=0;_<l.length;_+=1){if(!a)return null;var p=l[_];a=a[p]}return a}function u(d){var i=[],l={};return d.forEach(function(a){for(var _=a||{},p=_.key,c=_.dataIndex,m=p||C(c).join("-")||f;l[m];)m="".concat(m,"_next");l[m]=!0,i.push(m)}),i}function h(){var d={};function i(p,c){c&&Object.keys(c).forEach(function(m){var g=c[m];g&&Object(L.a)(g)==="object"?(p[m]=p[m]||{},i(p[m],g)):p[m]=g})}for(var l=arguments.length,a=new Array(l),_=0;_<l;_++)a[_]=arguments[_];return a.forEach(function(p){i(d,p)}),d}function w(d){return d!=null}},sboe:function(j,J,k){"use strict";k.d(J,"a",function(){return C});var L=k("cDcd"),f=k.n(L),C=L.createContext(null)},t23M:function(j,J,k){"use strict";var L=k("VTBJ"),f=k("1OyB"),C=k("vuIU"),D=k("Ji7U"),u=k("LK+K"),h=k("cDcd"),w=k.n(h),d=k("m+aA"),i=k("Zm9Q"),l=k("Kwbf"),a=k("c+Xe"),_=k("bdgK"),p="rc-observer-key",c=function(m){Object(D.a)(b,m);var g=Object(u.a)(b);function b(){var n;return Object(f.a)(this,b),n=g.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(o){var t=n.props.onResize,S=o[0].target,x=S.getBoundingClientRect(),s=x.width,P=x.height,O=S.offsetWidth,E=S.offsetHeight,v=Math.floor(s),y=Math.floor(P);if(n.state.width!==v||n.state.height!==y||n.state.offsetWidth!==O||n.state.offsetHeight!==E){var T={width:v,height:y,offsetWidth:O,offsetHeight:E};n.setState(T),t&&Promise.resolve().then(function(){t(Object(L.a)(Object(L.a)({},T),{},{offsetWidth:O,offsetHeight:E}))})}},n.setChildNode=function(o){n.childNode=o},n}return Object(C.a)(b,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var o=this.props.disabled;if(o){this.destroyObserver();return}var t=Object(d.a)(this.childNode||this),S=t!==this.currentElement;S&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new _.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var o=this.props.children,t=Object(i.a)(o);if(t.length>1)Object(l.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(l.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var S=t[0];if(h.isValidElement(S)&&Object(a.c)(S)){var x=S.ref;t[0]=h.cloneElement(S,{ref:Object(a.a)(x,this.setChildNode)})}return t.length===1?t[0]:t.map(function(s,P){return!h.isValidElement(s)||"key"in s&&s.key!==null?s:h.cloneElement(s,{key:"".concat(p,"-").concat(P)})})}}]),b}(h.Component);c.displayName="ResizeObserver",J.a=c},uGsb:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("MlIO"),k("1uat"))})(this,function(L){return function(){var f=L,C=f.x64,D=C.Word,u=C.WordArray,h=f.algo,w=h.SHA512,d=h.SHA384=w.extend({_doReset:function(){this._hash=new u.init([new D.init(3418070365,3238371032),new D.init(1654270250,914150663),new D.init(2438529370,812702999),new D.init(355462360,4144912697),new D.init(1731405415,4290775857),new D.init(2394180231,1750603025),new D.init(3675008525,1694076839),new D.init(1203062813,3204075428)])},_doFinalize:function(){var i=w._doFinalize.call(this);return i.sigBytes-=16,i}});f.SHA384=w._createHelper(d),f.HmacSHA384=w._createHmacHelper(d)}(),L.SHA384})},uGxW:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uK0f:function(j,J,k){(function(L,f){j.exports=f()})(this,function(){"use strict";function L(f,C,D){D=D||{},D.childrenKeyName=D.childrenKeyName||"children";var u=f||[],h=[],w=0;do{var d=u.filter(function(i){return C(i,w)})[0];if(!d)break;h.push(d),u=d[D.childrenKeyName]||[],w+=1}while(u.length>0);return h}return L})},ulZh:function(j,J,k){typeof window!="undefined"&&function(f,C){j.exports=C()}(this,function(){return function(L){var f={};function C(D){if(f[D])return f[D].exports;var u=f[D]={i:D,l:!1,exports:{}};return L[D].call(u.exports,u,u.exports,C),u.l=!0,u.exports}return C.m=L,C.c=f,C.d=function(D,u,h){C.o(D,u)||Object.defineProperty(D,u,{enumerable:!0,get:h})},C.r=function(D){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})},C.t=function(D,u){if(u&1&&(D=C(D)),u&8)return D;if(u&4&&typeof D=="object"&&D&&D.__esModule)return D;var h=Object.create(null);if(C.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:D}),u&2&&typeof D!="string")for(var w in D)C.d(h,w,function(d){return D[d]}.bind(null,w));return h},C.n=function(D){var u=D&&D.__esModule?function(){return D.default}:function(){return D};return C.d(u,"a",u),u},C.o=function(D,u){return Object.prototype.hasOwnProperty.call(D,u)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(L,f,C){"use strict";var D=Object.prototype.hasOwnProperty,u="~";function h(){}Object.create&&(h.prototype=Object.create(null),new h().__proto__||(u=!1));function w(a,_,p){this.fn=a,this.context=_,this.once=p||!1}function d(a,_,p,c,m){if(typeof p!="function")throw new TypeError("The listener must be a function");var g=new w(p,c||a,m),b=u?u+_:_;return a._events[b]?a._events[b].fn?a._events[b]=[a._events[b],g]:a._events[b].push(g):(a._events[b]=g,a._eventsCount++),a}function i(a,_){--a._eventsCount===0?a._events=new h:delete a._events[_]}function l(){this._events=new h,this._eventsCount=0}l.prototype.eventNames=function(){var _=[],p,c;if(this._eventsCount===0)return _;for(c in p=this._events)D.call(p,c)&&_.push(u?c.slice(1):c);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(p)):_},l.prototype.listeners=function(_){var p=u?u+_:_,c=this._events[p];if(!c)return[];if(c.fn)return[c.fn];for(var m=0,g=c.length,b=new Array(g);m<g;m++)b[m]=c[m].fn;return b},l.prototype.listenerCount=function(_){var p=u?u+_:_,c=this._events[p];return c?c.fn?1:c.length:0},l.prototype.emit=function(_,p,c,m,g,b){var n=u?u+_:_;if(!this._events[n])return!1;var o=this._events[n],t=arguments.length,S,x;if(o.fn){o.once&&this.removeListener(_,o.fn,void 0,!0);switch(t){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,p),!0;case 3:return o.fn.call(o.context,p,c),!0;case 4:return o.fn.call(o.context,p,c,m),!0;case 5:return o.fn.call(o.context,p,c,m,g),!0;case 6:return o.fn.call(o.context,p,c,m,g,b),!0}for(x=1,S=new Array(t-1);x<t;x++)S[x-1]=arguments[x];o.fn.apply(o.context,S)}else{var s=o.length,P;for(x=0;x<s;x++){o[x].once&&this.removeListener(_,o[x].fn,void 0,!0);switch(t){case 1:o[x].fn.call(o[x].context);break;case 2:o[x].fn.call(o[x].context,p);break;case 3:o[x].fn.call(o[x].context,p,c);break;case 4:o[x].fn.call(o[x].context,p,c,m);break;default:if(!S)for(P=1,S=new Array(t-1);P<t;P++)S[P-1]=arguments[P];o[x].fn.apply(o[x].context,S)}}}return!0},l.prototype.on=function(_,p,c){return d(this,_,p,c,!1)},l.prototype.once=function(_,p,c){return d(this,_,p,c,!0)},l.prototype.removeListener=function(_,p,c,m){var g=u?u+_:_;if(!this._events[g])return this;if(!p)return i(this,g),this;var b=this._events[g];if(b.fn)b.fn===p&&(!m||b.once)&&(!c||b.context===c)&&i(this,g);else{for(var n=0,o=[],t=b.length;n<t;n++)(b[n].fn!==p||m&&!b[n].once||c&&b[n].context!==c)&&o.push(b[n]);o.length?this._events[g]=o.length===1?o[0]:o:i(this,g)}return this},l.prototype.removeAllListeners=function(_){var p;return _?(p=u?u+_:_,this._events[p]&&i(this,p)):(this._events=new h,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=u,l.EventEmitter=l,L.exports=l},"./node_modules/url-toolkit/src/url-toolkit.js":function(L,f,C){(function(D){var u=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,h=/^([^\/?#]*)([^]*)$/,w=/(?:\/|^)\.(?=\/)/g,d=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,i={buildAbsoluteURL:function(l,a,_){if(_=_||{},l=l.trim(),a=a.trim(),!a){if(!_.alwaysNormalize)return l;var p=i.parseURL(l);if(!p)throw new Error("Error trying to parse base URL.");return p.path=i.normalizePath(p.path),i.buildURLFromParts(p)}var c=i.parseURL(a);if(!c)throw new Error("Error trying to parse relative URL.");if(c.scheme)return _.alwaysNormalize?(c.path=i.normalizePath(c.path),i.buildURLFromParts(c)):a;var m=i.parseURL(l);if(!m)throw new Error("Error trying to parse base URL.");if(!m.netLoc&&m.path&&m.path[0]!=="/"){var g=h.exec(m.path);m.netLoc=g[1],m.path=g[2]}m.netLoc&&!m.path&&(m.path="/");var b={scheme:m.scheme,netLoc:c.netLoc,path:null,params:c.params,query:c.query,fragment:c.fragment};if(!c.netLoc&&(b.netLoc=m.netLoc,c.path[0]!=="/"))if(!c.path)b.path=m.path,c.params||(b.params=m.params,c.query||(b.query=m.query));else{var n=m.path,o=n.substring(0,n.lastIndexOf("/")+1)+c.path;b.path=i.normalizePath(o)}return b.path===null&&(b.path=_.alwaysNormalize?i.normalizePath(c.path):c.path),i.buildURLFromParts(b)},parseURL:function(l){var a=u.exec(l);return a?{scheme:a[1]||"",netLoc:a[2]||"",path:a[3]||"",params:a[4]||"",query:a[5]||"",fragment:a[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(w,"");l.length!==(l=l.replace(d,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};L.exports=i})(this)},"./node_modules/webworkify-webpack/index.js":function(L,f,C){function D(_){var p={};function c(g){if(p[g])return p[g].exports;var b=p[g]={i:g,l:!1,exports:{}};return _[g].call(b.exports,b,b.exports,c),b.l=!0,b.exports}c.m=_,c.c=p,c.i=function(g){return g},c.d=function(g,b,n){c.o(g,b)||Object.defineProperty(g,b,{configurable:!1,enumerable:!0,get:n})},c.r=function(g){Object.defineProperty(g,"__esModule",{value:!0})},c.n=function(g){var b=g&&g.__esModule?function(){return g.default}:function(){return g};return c.d(b,"a",b),b},c.o=function(g,b){return Object.prototype.hasOwnProperty.call(g,b)},c.p="/",c.oe=function(g){throw console.error(g),g};var m=c(c.s=ENTRY_MODULE);return m.default||m}var u="[\\.|\\-|\\+|\\w|/|@]+",h="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+u+").*?\\)";function w(_){return(_+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function d(_){return!isNaN(1*_)}function i(_,p,c){var m={};m[c]=[];var g=p.toString(),b=g.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!b)return m;for(var n=b[1],o=new RegExp("(\\\\n|\\W)"+w(n)+h,"g"),t;t=o.exec(g);){if(t[3]==="dll-reference")continue;m[c].push(t[3])}for(o=new RegExp("\\("+w(n)+'\\("(dll-reference\\s('+u+'))"\\)\\)'+h,"g");t=o.exec(g);)_[t[2]]||(m[c].push(t[1]),_[t[2]]=C(t[1]).m),m[t[2]]=m[t[2]]||[],m[t[2]].push(t[4]);for(var S=Object.keys(m),x=0;x<S.length;x++)for(var s=0;s<m[S[x]].length;s++)d(m[S[x]][s])&&(m[S[x]][s]=1*m[S[x]][s]);return m}function l(_){var p=Object.keys(_);return p.reduce(function(c,m){return c||_[m].length>0},!1)}function a(_,p){for(var c={main:[p]},m={main:[]},g={main:{}};l(c);)for(var b=Object.keys(c),n=0;n<b.length;n++){var o=b[n],t=c[o],S=t.pop();if(g[o]=g[o]||{},g[o][S]||!_[o][S])continue;g[o][S]=!0,m[o]=m[o]||[],m[o].push(S);for(var x=i(_,_[o][S],o),s=Object.keys(x),P=0;P<s.length;P++)c[s[P]]=c[s[P]]||[],c[s[P]]=c[s[P]].concat(x[s[P]])}return m}L.exports=function(_,p){p=p||{};var c={main:C.m},m=p.all?{main:Object.keys(c.main)}:a(c,_),g="";Object.keys(m).filter(function(S){return S!=="main"}).forEach(function(S){for(var x=0;m[S][x];)x++;m[S].push(x),c[S][x]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",g=g+"var "+S+" = ("+D.toString().replace("ENTRY_MODULE",JSON.stringify(x))+")({"+m[S].map(function(s){return""+JSON.stringify(s)+": "+c[S][s].toString()}).join(",")+`});
`}),g=g+"new (("+D.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+m.main.map(function(S){return""+JSON.stringify(S)+": "+c.main[S].toString()}).join(",")+"}))(self);";var b=new window.Blob([g],{type:"text/javascript"});if(p.bare)return b;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,o=n.createObjectURL(b),t=new window.Worker(o);return t.objectURL=o,t}},"./src/config.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"hlsDefaultConfig",function(){return P}),C.d(f,"mergeConfig",function(){return E}),C.d(f,"enableStreamingMode",function(){return v});var D=C("./src/controller/abr-controller.ts"),u=C("./src/controller/audio-stream-controller.ts"),h=C("./src/controller/audio-track-controller.ts"),w=C("./src/controller/subtitle-stream-controller.ts"),d=C("./src/controller/subtitle-track-controller.ts"),i=C("./src/controller/buffer-controller.ts"),l=C("./src/controller/timeline-controller.ts"),a=C("./src/controller/cap-level-controller.ts"),_=C("./src/controller/fps-controller.ts"),p=C("./src/controller/eme-controller.ts"),c=C("./src/controller/cmcd-controller.ts"),m=C("./src/utils/xhr-loader.ts"),g=C("./src/utils/fetch-loader.ts"),b=C("./src/utils/cues.ts"),n=C("./src/utils/mediakeys-helper.ts"),o=C("./src/utils/logger.ts");function t(){return t=Object.assign||function(y){for(var T=1;T<arguments.length;T++){var M=arguments[T];for(var N in M)Object.prototype.hasOwnProperty.call(M,N)&&(y[N]=M[N])}return y},t.apply(this,arguments)}function S(y,T){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(y);T&&(N=N.filter(function(I){return Object.getOwnPropertyDescriptor(y,I).enumerable})),M.push.apply(M,N)}return M}function x(y){for(var T=1;T<arguments.length;T++){var M=arguments[T]!=null?arguments[T]:{};T%2?S(Object(M),!0).forEach(function(N){s(y,N,M[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):S(Object(M)).forEach(function(N){Object.defineProperty(y,N,Object.getOwnPropertyDescriptor(M,N))})}return y}function s(y,T,M){return T in y?Object.defineProperty(y,T,{value:M,enumerable:!0,configurable:!0,writable:!0}):y[T]=M,y}var P=x(x({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:m.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:D.default,bufferController:i.default,capLevelController:a.default,fpsController:_.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},O()),{},{subtitleStreamController:w.SubtitleStreamController,subtitleTrackController:d.default,timelineController:l.TimelineController,audioStreamController:u.default,audioTrackController:h.default,emeController:p.default,cmcdController:c.default});function O(){return{cueHandler:b.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function E(y,T){if((T.liveSyncDurationCount||T.liveMaxLatencyDurationCount)&&(T.liveSyncDuration||T.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(T.liveMaxLatencyDurationCount!==void 0&&(T.liveSyncDurationCount===void 0||T.liveMaxLatencyDurationCount<=T.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(T.liveMaxLatencyDuration!==void 0&&(T.liveSyncDuration===void 0||T.liveMaxLatencyDuration<=T.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},y,T)}function v(y){var T=y.loader;if(T!==g.default&&T!==m.default)o.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),y.progressive=!1;else{var M=Object(g.fetchSupported)();M&&(y.loader=g.default,y.progressive=!0,y.enableSoftwareAES=!0,o.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/utils/ewma-bandwidth-estimator.ts"),h=C("./src/events.ts"),w=C("./src/utils/buffer-helper.ts"),d=C("./src/errors.ts"),i=C("./src/types/loader.ts"),l=C("./src/utils/logger.ts");function a(c,m){for(var g=0;g<m.length;g++){var b=m[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(c,b.key,b)}}function _(c,m,g){return m&&a(c.prototype,m),g&&a(c,g),c}var p=function(){function c(g){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=g;var b=g.config;this.bwEstimator=new u.default(b.abrEwmaSlowVoD,b.abrEwmaFastVoD,b.abrEwmaDefaultEstimate),this.registerListeners()}var m=c.prototype;return m.registerListeners=function(){var b=this.hls;b.on(h.Events.FRAG_LOADING,this.onFragLoading,this),b.on(h.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(h.Events.FRAG_BUFFERED,this.onFragBuffered,this),b.on(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(h.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var b=this.hls;b.off(h.Events.FRAG_LOADING,this.onFragLoading,this),b.off(h.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(h.Events.FRAG_BUFFERED,this.onFragBuffered,this),b.off(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(h.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},m.onFragLoading=function(b,n){var o=n.frag;if(o.type===i.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=o,this.partCurrent=(t=n.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},m.onLevelLoaded=function(b,n){var o=this.hls.config;n.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},m._abandonRulesCheck=function(){var b=this.fragCurrent,n=this.partCurrent,o=this.hls,t=o.autoLevelEnabled,S=o.config,x=o.media;if(!b||!x)return;var s=n?n.stats:b.stats,P=n?n.duration:b.duration;if(s.aborted){l.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||x.paused||!x.playbackRate||!x.readyState)return;var O=performance.now()-s.loading.start,E=Math.abs(x.playbackRate);if(O<=500*P/E)return;var v=o.levels,y=o.minAutoLevel,T=v[b.level],M=s.total||Math.max(s.loaded,Math.round(P*T.maxBitrate/8)),N=Math.max(1,s.bwEstimate?s.bwEstimate/8:s.loaded*1e3/O),I=(M-s.loaded)/N,G=x.currentTime,H=(w.BufferHelper.bufferInfo(x,G,S.maxBufferHole).end-G)/E;if(H>=2*P/E||I<=H)return;var W=Number.POSITIVE_INFINITY,z;for(z=b.level-1;z>y;z--){var U=v[z].maxBitrate;if(W=P*U/(8*.8*N),W<H)break}if(W>=I)return;var B=this.bwEstimator.getEstimate();l.logger.warn("Fragment "+b.sn+(n?" part "+n.index:"")+" of level "+b.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+`
Current BW estimate: `+(Object(D.isFiniteNumber)(B)?(B/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+I.toFixed(3)+` s
Estimated load time for the next fragment: `+W.toFixed(3)+` s
Time to underbuffer: `+H.toFixed(3)+" s"),o.nextLoadLevel=z,this.bwEstimator.sample(O,s.loaded),this.clearTimer(),b.loader&&(this.fragCurrent=this.partCurrent=null,b.loader.abort()),o.trigger(h.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:b,part:n,stats:s})},m.onFragLoaded=function(b,n){var o=n.frag,t=n.part;if(o.type===i.PlaylistLevelType.MAIN&&Object(D.isFiniteNumber)(o.sn)){var S=t?t.stats:o.stats,x=t?t.duration:o.duration;if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var s=this.hls.levels[o.level],P=(s.loaded?s.loaded.bytes:0)+S.loaded,O=(s.loaded?s.loaded.duration:0)+x;s.loaded={bytes:P,duration:O},s.realBitrate=Math.round(8*P/O)}if(o.bitrateTest){var E={stats:S,frag:o,part:t,id:o.type};this.onFragBuffered(h.Events.FRAG_BUFFERED,E),o.bitrateTest=!1}}},m.onFragBuffered=function(b,n){var o=n.frag,t=n.part,S=t?t.stats:o.stats;if(S.aborted)return;if(o.type!==i.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var x=S.parsing.end-S.loading.start;this.bwEstimator.sample(x,S.loaded),S.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=x/1e3:this.bitrateTestDelay=0},m.onError=function(b,n){switch(n.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},m.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},m.getNextABRAutoLevel=function(){var b=this.fragCurrent,n=this.partCurrent,o=this.hls,t=o.maxAutoLevel,S=o.config,x=o.minAutoLevel,s=o.media,P=n?n.duration:b?b.duration:0,O=s?s.currentTime:0,E=s&&s.playbackRate!==0?Math.abs(s.playbackRate):1,v=this.bwEstimator?this.bwEstimator.getEstimate():S.abrEwmaDefaultEstimate,y=(w.BufferHelper.bufferInfo(s,O,S.maxBufferHole).end-O)/E,T=this.findBestLevel(v,x,t,y,S.abrBandWidthFactor,S.abrBandWidthUpFactor);if(T>=0)return T;l.logger.trace((y?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var M=P?Math.min(P,S.maxStarvationDelay):S.maxStarvationDelay,N=S.abrBandWidthFactor,I=S.abrBandWidthUpFactor;if(!y){var G=this.bitrateTestDelay;if(G){var H=P?Math.min(P,S.maxLoadingDelay):S.maxLoadingDelay;M=H-G,l.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*M)+" ms"),N=I=1}}return T=this.findBestLevel(v,x,t,y+M,N,I),Math.max(T,0)},m.findBestLevel=function(b,n,o,t,S,x){for(var s,P=this.fragCurrent,O=this.partCurrent,E=this.lastLoadedFragLevel,v=this.hls.levels,y=v[E],T=!!(y!=null&&(s=y.details)!==null&&s!==void 0&&s.live),M=y==null?void 0:y.codecSet,N=O?O.duration:P?P.duration:0,I=o;I>=n;I--){var G=v[I];if(!G||M&&G.codecSet!==M)continue;var H=G.details,W=(O?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||N,z=void 0;I<=E?z=S*b:z=x*b;var U=v[I].maxBitrate,B=U*W/z;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+I+"/"+Math.round(z)+"/"+U+"/"+W+"/"+t+"/"+B),z>U&&(!B||T&&!this.bitrateTestDelay||B<t))return I}return-1},_(c,[{key:"nextAutoLevel",get:function(){var b=this._nextAutoLevel,n=this.bwEstimator;if(b!==-1&&(!n||!n.canEstimate()))return b;var o=this.getNextABRAutoLevel();return b!==-1&&(o=Math.min(b,o)),o},set:function(b){this._nextAutoLevel=b}}]),c}();f.default=p},"./src/controller/audio-stream-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/controller/base-stream-controller.ts"),h=C("./src/events.ts"),w=C("./src/utils/buffer-helper.ts"),d=C("./src/controller/fragment-tracker.ts"),i=C("./src/types/level.ts"),l=C("./src/types/loader.ts"),a=C("./src/loader/fragment.ts"),_=C("./src/demux/chunk-cache.ts"),p=C("./src/demux/transmuxer-interface.ts"),c=C("./src/types/transmuxer.ts"),m=C("./src/controller/fragment-finders.ts"),g=C("./src/utils/discontinuities.ts"),b=C("./src/errors.ts"),n=C("./src/utils/logger.ts");function o(){return o=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var E=arguments[O];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(P[v]=E[v])}return P},o.apply(this,arguments)}function t(P,O){P.prototype=Object.create(O.prototype),P.prototype.constructor=P,S(P,O)}function S(P,O){return S=Object.setPrototypeOf||function(v,y){return v.__proto__=y,v},S(P,O)}var x=100,s=function(P){t(O,P);function O(v,y){var T;return T=P.call(this,v,y,"[audio-stream-controller]")||this,T.videoBuffer=null,T.videoTrackCC=-1,T.waitingVideoCC=-1,T.audioSwitch=!1,T.trackId=-1,T.waitingData=null,T.mainDetails=null,T.bufferFlushed=!1,T._registerListeners(),T}var E=O.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var y=this.hls;y.on(h.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(h.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.on(h.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(h.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(h.Events.ERROR,this.onError,this),y.on(h.Events.BUFFER_RESET,this.onBufferReset,this),y.on(h.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(h.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.on(h.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E._unregisterListeners=function(){var y=this.hls;y.off(h.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(h.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.off(h.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(h.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(h.Events.ERROR,this.onError,this),y.off(h.Events.BUFFER_RESET,this.onBufferReset,this),y.off(h.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(h.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.off(h.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E.onInitPtsFound=function(y,T){var M=T.frag,N=T.id,I=T.initPTS;if(N==="main"){var G=M.cc;this.initPTS[M.cc]=I,this.log("InitPTS for cc: "+G+" found from main: "+I),this.videoTrackCC=G,this.state===u.State.WAITING_INIT_PTS&&this.tick()}},E.startLoad=function(y){if(!this.levels){this.startPosition=y,this.state=u.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(x),this.fragLoadError=0,T>0&&y===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=u.State.IDLE):(this.loadedmetadata=!1,this.state=u.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=y,this.tick()},E.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_TRACK:{var y,T=this.levels,M=this.trackId,N=T==null||((y=T[M])===null||y===void 0)?void 0:y.details;if(N){if(this.waitForCdnTuneIn(N))break;this.state=u.State.WAITING_INIT_PTS}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var I,G=performance.now(),H=this.retryDate;(!H||G>=H||(I=this.media)!==null&&I!==void 0&&I.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=u.State.IDLE);break}case u.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var z=W.frag,U=W.part,B=W.cache,K=W.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.FRAG_LOADING;var q=B.flush(),ae={frag:z,part:U,payload:q,networkDetails:null};this._handleFragmentLoadProgress(ae),K&&P.prototype._handleFragmentLoadComplete.call(this,ae)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var se=this.getLoadPosition(),we=w.BufferHelper.bufferInfo(this.mediaBuffer,se,this.config.maxBufferHole),Te=Object(m.fragmentWithinToleranceTest)(we.end,this.config.maxFragLookUpTolerance,z);Te<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+we.end+" is needed"),this.clearWaitingFragment())}}else this.state=u.State.IDLE}}this.onTickEnd()},E.clearWaitingFragment=function(){var y=this.waitingData;y&&(this.fragmentTracker.removeFragment(y.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=u.State.IDLE)},E.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:y,M=T.buffered;!this.loadedmetadata&&M.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},E.doTickIdle=function(){var y,T,M=this.hls,N=this.levels,I=this.media,G=this.trackId,H=M.config;if(!N||!N[G])return;if(!I&&(this.startFragRequested||!H.startFragPrefetch))return;var W=N[G],z=W.details;if(!z||z.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(z)){this.state=u.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,a.ElementaryStreamTypes.AUDIO,l.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,l.PlaylistLevelType.AUDIO);if(U===null)return;var B=U.len,K=this.getMaxBufferLength(),q=this.audioSwitch;if(B>=K&&!q)return;if(!q&&this._streamEnded(U,z)){M.trigger(h.Events.BUFFER_EOS,{type:"audio"}),this.state=u.State.ENDED;return}var ae=z.fragments,se=ae[0].start,we=U.end;if(q){var Te=this.getLoadPosition();we=Te,z.PTSKnown&&Te<se&&((U.end>se||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),I.currentTime=se+.05))}var de=this.getNextFragment(we,z);if(!de){this.bufferFlushed=!0;return}((y=de.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((T=de.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(de,z):this.loadFragment(de,z,we)},E.getMaxBufferLength=function(){var y=P.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,l.PlaylistLevelType.MAIN);return T===null?y:Math.max(y,T.len)},E.onMediaDetaching=function(){this.videoBuffer=null,P.prototype.onMediaDetaching.call(this)},E.onAudioTracksUpdated=function(y,T){var M=T.audioTracks;this.resetTransmuxer(),this.levels=M.map(function(N){return new i.Level(N)})},E.onAudioTrackSwitching=function(y,T){var M=!!T.url;this.trackId=T.id;var N=this.fragCurrent;N!=null&&N.loader&&N.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),M?this.setInterval(x):this.resetTransmuxer(),M?(this.audioSwitch=!0,this.state=u.State.IDLE):this.state=u.State.STOPPED,this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},E.onLevelLoaded=function(y,T){this.mainDetails=T.details},E.onAudioTrackLoaded=function(y,T){var M,N=this.levels,I=T.details,G=T.id;if(!N){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+I.startSN+","+I.endSN+"],duration:"+I.totalduration);var H=N[G],W=0;if(I.live||(M=H.details)!==null&&M!==void 0&&M.live){var z=this.mainDetails;if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed||!z)return;!H.details&&I.hasProgramDateTime&&z.hasProgramDateTime?(Object(g.alignMediaPlaylistByPDT)(I,z),W=I.fragments[0].start):W=this.alignPlaylists(I,H.details)}H.details=I,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!I.live)&&this.setStartPosition(H.details,W),this.state===u.State.WAITING_TRACK&&!this.waitForCdnTuneIn(I)&&(this.state=u.State.IDLE),this.tick()},E._handleFragmentLoadProgress=function(y){var T,M=y.frag,N=y.part,I=y.payload,G=this.config,H=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+M.sn+" of level "+M.level+" will not be buffered");return}var z=W[H];console.assert(z,"Audio track is defined on fragment load progress");var U=z.details;console.assert(U,"Audio track details are defined on fragment load progress");var B=G.defaultAudioCodec||z.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new p.default(this.hls,l.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var q=this.initPTS[M.cc],ae=(T=M.initSegment)===null||T===void 0?void 0:T.data;if(q!==void 0){var se=!1,we=N?N.index:-1,Te=we!==-1,de=new c.ChunkMetadata(M.level,M.sn,M.stats.chunkCount,I.byteLength,we,Te);K.push(I,ae,B,"",M,N,U.totalduration,se,de,q)}else{n.logger.log("Unknown video PTS for cc "+M.cc+", waiting for video PTS before demuxing audio frag "+M.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+H);var xe=this.waitingData=this.waitingData||{frag:M,part:N,cache:new _.default,complete:!1},pe=xe.cache;pe.push(new Uint8Array(I)),this.waitingVideoCC=this.videoTrackCC,this.state=u.State.WAITING_INIT_PTS}},E._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}P.prototype._handleFragmentLoadComplete.call(this,y)},E.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},E.onBufferCreated=function(y,T){var M=T.tracks.audio;M&&(this.mediaBuffer=M.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},E.onFragBuffered=function(y,T){var M=T.frag,N=T.part;if(M.type!==l.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(M)){this.warn("Fragment "+M.sn+(N?" p: "+N.index:"")+" of level "+M.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}M.sn!=="initSegment"&&(this.fragPrevious=M,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(h.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(M,N)},E.onError=function(y,T){switch(T.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:case b.ErrorDetails.KEY_LOAD_ERROR:case b.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.AUDIO,T);break;case b.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case b.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==u.State.ERROR&&this.state!==u.State.STOPPED&&(this.state=T.fatal?u.State.ERROR:u.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case b.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var M=!0,N=this.getFwdBufferInfo(this.mediaBuffer,l.PlaylistLevelType.AUDIO);N&&N.len>.5&&(M=!this.reduceMaxBufferLength(N.len)),M&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,P.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},E.onBufferFlushed=function(y,T){var M=T.type;M===a.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},E._handleTransmuxComplete=function(y){var T,M="audio",N=this.hls,I=y.remuxResult,G=y.chunkMeta,H=this.getCurrentContext(G);if(!H){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var W=H.frag,z=H.part,U=I.audio,B=I.text,K=I.id3,q=I.initSegment;if(this.fragContextChanged(W))return;if(this.state=u.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),q!=null&&q.tracks&&(this._bufferInitSegment(q.tracks,W,G),N.trigger(h.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:M,tracks:q.tracks})),U){var ae=U.startPTS,se=U.endPTS,we=U.startDTS,Te=U.endDTS;z&&(z.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ae,endPTS:se,startDTS:we,endDTS:Te}),W.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ae,se,we,Te),this.bufferFragmentData(U,W,z,G)}if(K!=null&&(T=K.samples)!==null&&T!==void 0&&T.length){var de=o({frag:W,id:M},K);N.trigger(h.Events.FRAG_PARSING_METADATA,de)}if(B){var xe=o({frag:W,id:M},B);N.trigger(h.Events.FRAG_PARSING_USERDATA,xe)}},E._bufferInitSegment=function(y,T,M){if(this.state!==u.State.PARSING)return;y.video&&delete y.video;var N=y.audio;if(!N)return;N.levelCodec=N.codec,N.id="audio",this.log("Init audio buffer, container:"+N.container+", codecs[parsed]=["+N.codec+"]"),this.hls.trigger(h.Events.BUFFER_CODECS,y);var I=N.initSegment;if(I!=null&&I.byteLength){var G={type:"audio",frag:T,part:null,chunkMeta:M,parent:T.type,data:I};this.hls.trigger(h.Events.BUFFER_APPENDING,G)}this.tick()},E.loadFragment=function(y,T,M){var N=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||N===d.FragmentState.NOT_LOADED||N===d.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):T.live&&!Object(D.isFiniteNumber)(this.initPTS[y.cc])?(this.log("Waiting for video PTS in continuity counter "+y.cc+" of live stream before loading audio fragment "+y.sn+" of level "+this.trackId),this.state=u.State.WAITING_INIT_PTS):(this.startFragRequested=!0,P.prototype.loadFragment.call(this,y,T,M)))},E.completeAudioSwitch=function(){var y=this.hls,T=this.media,M=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),P.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,y.trigger(h.Events.AUDIO_TRACK_SWITCHED,{id:M})},O}(u.default);f.default=s},"./src/controller/audio-track-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/errors.ts"),h=C("./src/controller/base-playlist-controller.ts"),w=C("./src/types/loader.ts");function d(p,c){for(var m=0;m<c.length;m++){var g=c[m];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}function i(p,c,m){return c&&d(p.prototype,c),m&&d(p,m),p}function l(p,c){p.prototype=Object.create(c.prototype),p.prototype.constructor=p,a(p,c)}function a(p,c){return a=Object.setPrototypeOf||function(g,b){return g.__proto__=b,g},a(p,c)}var _=function(p){l(c,p);function c(g){var b;return b=p.call(this,g,"[audio-track-controller]")||this,b.tracks=[],b.groupId=null,b.tracksInGroup=[],b.trackId=-1,b.trackName="",b.selectDefaultTrack=!0,b.registerListeners(),b}var m=c.prototype;return m.registerListeners=function(){var b=this.hls;b.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),b.on(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),b.on(D.Events.ERROR,this.onError,this)},m.unregisterListeners=function(){var b=this.hls;b.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),b.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),b.off(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),b.off(D.Events.ERROR,this.onError,this)},m.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,p.prototype.destroy.call(this)},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},m.onManifestParsed=function(b,n){this.tracks=n.audioTracks||[]},m.onAudioTrackLoaded=function(b,n){var o=n.id,t=n.details,S=this.tracksInGroup[o];if(!S){this.warn("Invalid audio track id "+o);return}var x=S.details;S.details=n.details,this.log("audioTrack "+o+" loaded ["+t.startSN+"-"+t.endSN+"]"),o===this.trackId&&(this.retryCount=0,this.playlistLoaded(o,n,x))},m.onLevelLoading=function(b,n){this.switchLevel(n.level)},m.onLevelSwitching=function(b,n){this.switchLevel(n.level)},m.switchLevel=function(b){var n=this.hls.levels[b];if(!(n!=null&&n.audioGroupIds))return;var o=n.audioGroupIds[n.urlId];if(this.groupId!==o){this.groupId=o;var t=this.tracks.filter(function(x){return!o||x.groupId===o});this.selectDefaultTrack&&!t.some(function(x){return x.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var S={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+o+'" group-id'),this.hls.trigger(D.Events.AUDIO_TRACKS_UPDATED,S),this.selectInitialTrack()}},m.onError=function(b,n){if(p.prototype.onError.call(this,b,n),n.fatal||!n.context)return;n.context.type===w.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},m.setAudioTrack=function(b){var n=this.tracksInGroup;if(b<0||b>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=n[this.trackId];this.log("Now switching to audio-track index "+b);var t=n[b],S=t.id,x=t.groupId,s=x===void 0?"":x,P=t.name,O=t.type,E=t.url;if(this.trackId=b,this.trackName=P,this.selectDefaultTrack=!1,this.hls.trigger(D.Events.AUDIO_TRACK_SWITCHING,{id:S,groupId:s,name:P,type:O,url:E}),t.details&&!t.details.live)return;var v=this.switchParams(t.url,o==null?void 0:o.details);this.loadPlaylist(v)},m.selectInitialTrack=function(){var b=this.tracksInGroup;console.assert(b.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,o=this.findTrackId(n)||this.findTrackId();o!==-1?this.setAudioTrack(o):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},m.findTrackId=function(b){for(var n=this.tracksInGroup,o=0;o<n.length;o++){var t=n[o];if((!this.selectDefaultTrack||t.default)&&(!b||b===t.name))return t.id}return-1},m.loadPlaylist=function(b){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var o=n.id,t=n.groupId,S=n.url;if(b)try{S=b.addDirectives(S)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("loading audio-track playlist for id: "+o),this.clearTimer(),this.hls.trigger(D.Events.AUDIO_TRACK_LOADING,{url:S,id:o,groupId:t,deliveryDirectives:b||null})}},i(c,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(b){this.selectDefaultTrack=!1,this.setAudioTrack(b)}}]),c}(h.default);f.default=_},"./src/controller/base-playlist-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return i});var D=C("./src/polyfills/number.ts"),u=C("./src/types/level.ts"),h=C("./src/controller/level-helper.ts"),w=C("./src/utils/logger.ts"),d=C("./src/errors.ts"),i=function(){function l(_,p){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=w.logger.log.bind(w.logger,p+":"),this.warn=w.logger.warn.bind(w.logger,p+":"),this.hls=_}var a=l.prototype;return a.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},a.onError=function(p,c){c.fatal&&c.type===d.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},a.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},a.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},a.stopLoad=function(){this.canLoad=!1,this.clearTimer()},a.switchParams=function(p,c){var m=c==null?void 0:c.renditionReports;if(m)for(var g=0;g<m.length;g++){var b=m[g],n=""+b.URI;if(n===p.substr(-n.length)){var o=parseInt(b["LAST-MSN"]),t=parseInt(b["LAST-PART"]);if(c&&this.hls.config.lowLatencyMode){var S=Math.min(c.age-c.partTarget,c.targetduration);t!==void 0&&S>c.partTarget&&(t+=1)}if(Object(D.isFiniteNumber)(o))return new u.HlsUrlParameters(o,Object(D.isFiniteNumber)(t)?t:void 0,u.HlsSkip.No)}}},a.loadPlaylist=function(p){},a.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},a.playlistLoaded=function(p,c,m){var g=this,b=c.details,n=c.stats,o=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(b.advancedDateTime=Date.now()-o,b.live||m!=null&&m.live){if(b.reloaded(m),m&&this.log("live playlist "+p+" "+(b.advanced?"REFRESHED "+b.lastPartSn+"-"+b.lastPartIndex:"MISSED")),m&&b.fragments.length>0&&Object(h.mergeDetails)(m,b),!this.canLoad||!b.live)return;var t,S=void 0,x=void 0;if(b.canBlockReload&&b.endSN&&b.advanced){var s=this.hls.config.lowLatencyMode,P=b.lastPartSn,O=b.endSN,E=b.lastPartIndex,v=E!==-1,y=P===O,T=s?0:E;v?(S=y?O+1:P,x=y?T:E+1):S=O+1;var M=b.age,N=M+b.ageHeader,I=Math.min(N-b.partTarget,b.targetduration*1.5);if(I>0){if(m&&I>m.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+m.tuneInGoal+" to: "+I+" with playlist age: "+b.age),I=0;else{var G=Math.floor(I/b.targetduration);if(S+=G,x!==void 0){var H=Math.round(I%b.targetduration/b.partTarget);x+=H}this.log("CDN Tune-in age: "+b.ageHeader+"s last advanced "+M.toFixed(2)+"s goal: "+I+" skip sn "+G+" to part "+x)}b.tuneInGoal=I}if(t=this.getDeliveryDirectives(b,c.deliveryDirectives,S,x),s||!y){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(b,c.deliveryDirectives,S,x);var W=Object(h.computeReloadInterval)(b,n);S!==void 0&&b.canBlockReload&&(W-=b.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return g.loadPlaylist(t)},W)}else this.clearTimer()},a.getDeliveryDirectives=function(p,c,m,g){var b=Object(u.getSkipValue)(p,m);return c!=null&&c.skip&&p.deltaUpdateFailed&&(m=c.msn,g=c.part,b=u.HlsSkip.No),new u.HlsUrlParameters(m,g,b)},a.retryLoadingOrFail=function(p){var c=this,m=this.hls.config,g=this.retryCount<m.levelLoadingMaxRetry;if(g){var b;if(this.retryCount++,p.details.indexOf("LoadTimeOut")>-1&&(b=p.context)!==null&&b!==void 0&&b.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*m.levelLoadingRetryDelay,m.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return c.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return g},l}()},"./src/controller/base-stream-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"State",function(){return O}),C.d(f,"default",function(){return E});var D=C("./src/polyfills/number.ts"),u=C("./src/task-loop.ts"),h=C("./src/controller/fragment-tracker.ts"),w=C("./src/utils/buffer-helper.ts"),d=C("./src/utils/logger.ts"),i=C("./src/events.ts"),l=C("./src/errors.ts"),a=C("./src/types/transmuxer.ts"),_=C("./src/utils/mp4-tools.ts"),p=C("./src/utils/discontinuities.ts"),c=C("./src/controller/fragment-finders.ts"),m=C("./src/controller/level-helper.ts"),g=C("./src/loader/fragment-loader.ts"),b=C("./src/crypt/decrypter.ts"),n=C("./src/utils/time-ranges.ts"),o=C("./src/types/loader.ts");function t(v,y){for(var T=0;T<y.length;T++){var M=y[T];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(v,M.key,M)}}function S(v,y,T){return y&&t(v.prototype,y),T&&t(v,T),v}function x(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function s(v,y){v.prototype=Object.create(y.prototype),v.prototype.constructor=v,P(v,y)}function P(v,y){return P=Object.setPrototypeOf||function(M,N){return M.__proto__=N,M},P(v,y)}var O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},E=function(v){s(y,v);function y(M,N,I){var G;return G=v.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=O.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=I,G.log=d.logger.log.bind(d.logger,I+":"),G.warn=d.logger.warn.bind(d.logger,I+":"),G.hls=M,G.fragmentLoader=new g.default(M.config),G.fragmentTracker=N,G.config=M.config,G.decrypter=new b.default(M,M.config),M.on(i.Events.KEY_LOADED,G.onKeyLoaded,x(G)),G}var T=y.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(N){},T.stopLoad=function(){this.fragmentLoader.abort();var N=this.fragCurrent;N&&this.fragmentTracker.removeFragment(N),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},T._streamEnded=function(N,I){var G=this.fragCurrent,H=this.fragmentTracker;if(!I.live&&G&&G.sn===I.endSN&&!N.nextStart){var W=H.getState(G);return W===h.FragmentState.PARTIAL||W===h.FragmentState.OK}return!1},T.onMediaAttached=function(N,I){var G=this.media=this.mediaBuffer=I.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var H=this.config;this.levels&&H.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(H.startPosition)},T.onMediaDetaching=function(){var N=this.media;N!=null&&N.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),N&&(N.removeEventListener("seeking",this.onvseeking),N.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},T.onMediaSeeking=function(){var N=this.config,I=this.fragCurrent,G=this.media,H=this.mediaBuffer,W=this.state,z=G?G.currentTime:0,U=w.BufferHelper.bufferInfo(H||G,z,N.maxBufferHole);if(this.log("media seeking to "+(Object(D.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+W),W===O.ENDED)this.resetLoadingState();else if(I&&!U.len){var B=N.maxFragLookUpTolerance,K=I.start-B,q=I.start+I.duration+B,ae=z>q;(z<K||ae)&&(ae&&I.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),I.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=z),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(N,I){if(this.state!==O.KEY_LOADING||I.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var G=this.levels[I.frag.level].details;G&&this.loadFragment(I.frag,G,I.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),v.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(i.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,v.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(N,I){this.log("Loading key for "+N.sn+" of ["+I.startSN+"-"+I.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level),this.state=O.KEY_LOADING,this.fragCurrent=N,this.hls.trigger(i.Events.KEY_LOADING,{frag:N})},T.loadFragment=function(N,I,G){this._loadFragForPlayback(N,I,G)},T._loadFragForPlayback=function(N,I,G){var H=this,W=function(U){if(H.fragContextChanged(N)){H.warn("Fragment "+N.sn+(U.part?" p: "+U.part.index:"")+" of level "+N.level+" was dropped during download."),H.fragmentTracker.removeFragment(N);return}N.stats.chunkCount++,H._handleFragmentLoadProgress(U)};this._doFragLoad(N,I,G,W).then(function(z){if(!z)return;H.fragLoadError=0;var U=H.state;if(H.fragContextChanged(N)){(U===O.FRAG_LOADING||U===O.BACKTRACKING||!H.fragCurrent&&U===O.PARSING)&&(H.fragmentTracker.removeFragment(N),H.state=O.IDLE);return}if("payload"in z&&(H.log("Loaded fragment "+N.sn+" of level "+N.level),H.hls.trigger(i.Events.FRAG_LOADED,z),H.state===O.BACKTRACKING)){H.fragmentTracker.backtrack(N,z),H.resetFragmentLoading(N);return}H._handleFragmentLoadComplete(z)}).catch(function(z){H.warn(z),H.resetFragmentLoading(N)})},T.flushMainBuffer=function(N,I,G){if(G===void 0&&(G=null),!(N-I))return;var H={startOffset:N,endOffset:I,type:G};this.fragLoadError=0,this.hls.trigger(i.Events.BUFFER_FLUSHING,H)},T._loadInitSegment=function(N){var I=this;this._doFragLoad(N).then(function(G){if(!G||I.fragContextChanged(N)||!I.levels)throw new Error("init load aborted");return G}).then(function(G){var H=I.hls,W=G.payload,z=N.decryptdata;if(W&&W.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var U=self.performance.now();return I.decrypter.webCryptoDecrypt(new Uint8Array(W),z.key.buffer,z.iv.buffer).then(function(B){var K=self.performance.now();return H.trigger(i.Events.FRAG_DECRYPTED,{frag:N,payload:B,stats:{tstart:U,tdecrypt:K}}),G.payload=B,G})}return G}).then(function(G){var H=I.fragCurrent,W=I.hls,z=I.levels;if(!z)throw new Error("init load aborted, missing levels");var U=z[N.level].details;console.assert(U,"Level details are defined when init segment is loaded");var B=N.stats;I.state=O.IDLE,I.fragLoadError=0,N.data=new Uint8Array(G.payload),B.parsing.start=B.buffering.start=self.performance.now(),B.parsing.end=B.buffering.end=self.performance.now(),G.frag===H&&W.trigger(i.Events.FRAG_BUFFERED,{stats:B,frag:H,part:null,id:N.type}),I.tick()}).catch(function(G){I.warn(G),I.resetFragmentLoading(N)})},T.fragContextChanged=function(N){var I=this.fragCurrent;return!N||!I||N.level!==I.level||N.sn!==I.sn||N.urlId!==I.urlId},T.fragBufferedComplete=function(N,I){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+N.type+" sn: "+N.sn+(I?" part: "+I.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+N.level+" "+n.default.toString(w.BufferHelper.getBuffered(G))),this.state=O.IDLE,this.tick()},T._handleFragmentLoadComplete=function(N){var I=this.transmuxer;if(!I)return;var G=N.frag,H=N.part,W=N.partsLoaded,z=!W||W.length===0||W.some(function(B){return!B}),U=new a.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,H?H.index:-1,!z);I.flush(U)},T._handleFragmentLoadProgress=function(N){},T._doFragLoad=function(N,I,G,H){var W=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(N.start,G||0),this.config.lowLatencyMode&&I){var z=I.partList;if(z&&H){G>N.end&&I.fragmentHint&&(N=I.fragmentHint);var U=this.getNextPart(z,N,G);if(U>-1){var B=z[U];return this.log("Loading part sn: "+N.sn+" p: "+B.index+" cc: "+N.cc+" of playlist ["+I.startSN+"-"+I.endSN+"] parts [0-"+U+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=B.start+B.duration,this.state=O.FRAG_LOADING,this.hls.trigger(i.Events.FRAG_LOADING,{frag:N,part:z[U],targetBufferTime:G}),this.doFragPartsLoad(N,z,U,H).catch(function(K){return W.handleFragLoadError(K)})}else if(!N.url||this.loadedEndOfParts(z,G))return Promise.resolve(null)}}return this.log("Loading fragment "+N.sn+" cc: "+N.cc+" "+(I?"of ["+I.startSN+"-"+I.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+N.level+", target: "+parseFloat(G.toFixed(3))),Object(D.isFiniteNumber)(N.sn)&&!this.bitrateTest&&(this.nextLoadPosition=N.start+N.duration),this.state=O.FRAG_LOADING,this.hls.trigger(i.Events.FRAG_LOADING,{frag:N,targetBufferTime:G}),this.fragmentLoader.load(N,H).catch(function(K){return W.handleFragLoadError(K)})},T.doFragPartsLoad=function(N,I,G,H){var W=this;return new Promise(function(z,U){var B=[],K=function q(ae){var se=I[ae];W.fragmentLoader.loadPart(N,se,H).then(function(we){B[se.index]=we;var Te=we.part;W.hls.trigger(i.Events.FRAG_LOADED,we);var de=I[ae+1];if(de&&de.fragment===N)q(ae+1);else return z({frag:N,part:Te,partsLoaded:B})}).catch(U)};K(G)})},T.handleFragLoadError=function(N){var I=N.data;return I&&I.details===l.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(I.frag,I.part):this.hls.trigger(i.Events.ERROR,I),null},T._handleTransmuxerFlush=function(N){var I=this.getCurrentContext(N);if(!I||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var G=I.frag,H=I.part,W=I.level,z=self.performance.now();G.stats.parsing.end=z,H&&(H.stats.parsing.end=z),this.updateLevelTiming(G,H,W,N.partial)},T.getCurrentContext=function(N){var I=this.levels,G=N.level,H=N.sn,W=N.part;if(!I||!I[G])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+G+". The current chunk will not be buffered."),null;var z=I[G],U=W>-1?Object(m.getPartWith)(z,H,W):null,B=U?U.fragment:Object(m.getFragmentWithSN)(z,H,this.fragCurrent);return B?{frag:B,part:U,level:z}:null},T.bufferFragmentData=function(N,I,G,H){if(!N||this.state!==O.PARSING)return;var W=N.data1,z=N.data2,U=W;if(W&&z&&(U=Object(_.appendUint8Array)(W,z)),!U||!U.length)return;var B={type:N.type,frag:I,part:G,chunkMeta:H,parent:I.type,data:U};this.hls.trigger(i.Events.BUFFER_APPENDING,B),N.dropped&&N.independent&&!G&&this.flushBufferGap(I)},T.flushBufferGap=function(N){var I=this.media;if(!I)return;if(!w.BufferHelper.isBuffered(I,I.currentTime)){this.flushMainBuffer(0,N.start);return}var G=I.currentTime,H=w.BufferHelper.bufferInfo(I,G,0),W=N.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),U=Math.max(Math.min(N.start-z,H.end-z),G+z);N.start-U>z&&this.flushMainBuffer(U,N.start)},T.getFwdBufferInfo=function(N,I){var G=this.config,H=this.getLoadPosition();if(!Object(D.isFiniteNumber)(H))return null;var W=w.BufferHelper.bufferInfo(N,H,G.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(H,I);if(z&&W.nextStart<z.end)return w.BufferHelper.bufferInfo(N,H,Math.max(W.nextStart,G.maxBufferHole))}return W},T.getMaxBufferLength=function(N){var I=this.config,G;return N?G=Math.max(8*I.maxBufferSize/N,I.maxBufferLength):G=I.maxBufferLength,Math.min(G,I.maxMaxBufferLength)},T.reduceMaxBufferLength=function(N){var I=this.config,G=N||I.maxBufferLength;return I.maxMaxBufferLength>=G?(I.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+I.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(N,I){var G,H,W=I.fragments,z=W.length;if(!z)return null;var U=this.config,B=W[0].start,K;if(I.live){var q=U.initialLiveManifestSize;if(z<q)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+q+")"),null;!I.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(K=this.getInitialLiveFragment(I,W),this.startPosition=K?this.hls.liveSyncPosition||K.start:N)}else N<=B&&(K=W[0]);if(!K){var ae=U.lowLatencyMode?I.partEnd:I.fragmentEnd;K=this.getFragmentAtPosition(N,ae,I)}return(G=K)!==null&&G!==void 0&&G.initSegment&&!((H=K)!==null&&H!==void 0&&H.initSegment.data)&&!this.bitrateTest&&(K=K.initSegment),K},T.getNextPart=function(N,I,G){for(var H=-1,W=!1,z=!0,U=0,B=N.length;U<B;U++){var K=N[U];if(z=z&&!K.independent,H>-1&&G<K.start)break;var q=K.loaded;!q&&(W||K.independent||z)&&K.fragment===I&&(H=U),W=q}return H},T.loadedEndOfParts=function(N,I){var G=N[N.length-1];return G&&I>G.start&&G.loaded},T.getInitialLiveFragment=function(N,I){var G=this.fragPrevious,H=null;if(G){if(N.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),H=Object(c.findFragmentByPDT)(I,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var W=G.sn+1;if(W>=N.startSN&&W<=N.endSN){var z=I[W-N.startSN];G.cc===z.cc&&(H=z,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(c.findFragWithCC)(I,G.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(H=this.getFragmentAtPosition(U,this.bitrateTest?N.fragmentEnd:N.edge,N))}return H},T.getFragmentAtPosition=function(N,I,G){var H=this.config,W=this.fragPrevious,z=G.fragments,U=G.endSN,B=G.fragmentHint,K=H.maxFragLookUpTolerance,q=!!(H.lowLatencyMode&&G.partList&&B);q&&B&&!this.bitrateTest&&(z=z.concat(B),U=B.sn);var ae;if(N<I){var se=N>I-K?0:K;ae=Object(c.findFragmentByPTS)(W,z,N,se)}else ae=z[z.length-1];if(ae){var we=ae.sn-G.startSN,Te=W&&ae.level===W.level,de=z[we+1],xe=this.fragmentTracker.getState(ae);if(xe===h.FragmentState.BACKTRACKED){ae=null;for(var pe=we;z[pe]&&this.fragmentTracker.getState(z[pe])===h.FragmentState.BACKTRACKED;)W?ae=z[pe--]:ae=z[--pe];ae||(ae=de)}else W&&ae.sn===W.sn&&!q&&(Te&&(ae.sn<U&&this.fragmentTracker.getState(de)!==h.FragmentState.OK?(this.log("SN "+ae.sn+" just loaded, load next one: "+de.sn),ae=de):ae=null))}return ae},T.synchronizeToLiveEdge=function(N){var I=this.config,G=this.media;if(!G)return;var H=this.hls.liveSyncPosition,W=G.currentTime,z=N.fragments[0].start,U=N.edge,B=W>=z-I.maxFragLookUpTolerance&&W<=U;if(H!==null&&G.duration>H&&(W<H||!B)){var K=I.liveMaxLatencyDuration!==void 0?I.liveMaxLatencyDuration:I.liveMaxLatencyDurationCount*N.targetduration;(!B&&G.readyState<4||W<U-K)&&(this.loadedmetadata||(this.nextLoadPosition=H),G.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+H.toFixed(3)),G.currentTime=H))}},T.alignPlaylists=function(N,I){var G=this.levels,H=this.levelLastLoaded,W=this.fragPrevious,z=H!==null?G[H]:null,U=N.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var B=N.fragments[0].start,K=!I,q=N.alignedSliding&&Object(D.isFiniteNumber)(B);if(K||!q&&!B){Object(p.alignStream)(W,z,N);var ae=N.fragments[0].start;return this.log("Live playlist sliding: "+ae.toFixed(2)+" start-sn: "+(I?I.startSN:"na")+"->"+N.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+U),ae}return B},T.waitForCdnTuneIn=function(N){var I=3;return N.live&&N.canBlockReload&&N.tuneInGoal>Math.max(N.partHoldBack,N.partTarget*I)},T.setStartPosition=function(N,I){var G=this.startPosition;if(G<I&&(G=-1),G===-1||this.lastCurrentTime===-1){var H=N.startTimeOffset;Object(D.isFiniteNumber)(H)?(G=I+H,H<0&&(G+=N.totalduration),G=Math.min(Math.max(I,G),I+N.totalduration),this.log("Start time offset "+H+" found in playlist, adjust startPosition to "+G),this.startPosition=G):N.live?G=this.hls.liveSyncPosition||I:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},T.getLoadPosition=function(){var N=this.media,I=0;return this.loadedmetadata&&N?I=N.currentTime:this.nextLoadPosition&&(I=this.nextLoadPosition),I},T.handleFragLoadAborted=function(N,I){this.transmuxer&&N.sn!=="initSegment"&&N.stats.aborted&&(this.warn("Fragment "+N.sn+(I?" part"+I.index:"")+" of level "+N.level+" was aborted"),this.resetFragmentLoading(N))},T.resetFragmentLoading=function(N){(!this.fragCurrent||!this.fragContextChanged(N))&&(this.state=O.IDLE)},T.onFragmentOrKeyLoadError=function(N,I){if(I.fatal)return;var G=I.frag;if(!G||G.type!==N)return;var H=this.fragCurrent;console.assert(H&&G.sn===H.sn&&G.level===H.level&&G.urlId===H.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+N+" "+G.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else I.levelRetry?(N===o.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(d.logger.error(I.details+" reaches max retry, redispatch as fatal ..."),I.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},T.afterBufferFlushed=function(N,I,G){if(!N)return;var H=w.BufferHelper.getBuffered(N);this.fragmentTracker.detectEvictedFragments(I,H,G),this.state===O.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},T.resetLiveStartWhenNotLoaded=function(N){if(!this.loadedmetadata){this.startFragRequested=!1;var I=this.levels?this.levels[N].details:null;if(I!=null&&I.live)return this.startPosition=-1,this.setStartPosition(I,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(N,I,G,H){var W=this,z=G.details;console.assert(!!z,"level.details must be defined");var U=Object.keys(N.elementaryStreams).reduce(function(B,K){var q=N.elementaryStreams[K];if(q){var ae=q.endPTS-q.startPTS;if(ae<=0)return W.warn("Could not parse fragment "+N.sn+" "+K+" duration reliably ("+ae+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),B||!1;var se=H?0:Object(m.updateFragPTSDTS)(z,N,q.startPTS,q.endPTS,q.startDTS,q.endDTS);return W.hls.trigger(i.Events.LEVEL_PTS_UPDATED,{details:z,level:G,drift:se,type:K,frag:N,start:q.startPTS,end:q.endPTS}),!0}return B},!1);U?(this.state=O.PARSED,this.hls.trigger(i.Events.FRAG_PARSED,{frag:N,part:I})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},S(y,[{key:"state",get:function(){return this._state},set:function(N){var I=this._state;I!==N&&(this._state=N,this.log(I+"->"+N))}}]),y}(u.default)},"./src/controller/buffer-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c});var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),h=C("./src/utils/logger.ts"),w=C("./src/errors.ts"),d=C("./src/utils/buffer-helper.ts"),i=C("./src/utils/mediasource-helper.ts"),l=C("./src/loader/fragment.ts"),a=C("./src/controller/buffer-operation-queue.ts"),_=Object(i.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,c=function(){function m(b){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var o=n.hls,t=n.media,S=n.mediaSource;h.logger.log("[buffer-controller]: Media source opened"),t&&(n.updateMediaElementDuration(),o.trigger(u.Events.MEDIA_ATTACHED,{media:t})),S&&S.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){h.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){h.logger.log("[buffer-controller]: Media source ended")},this.hls=b,this._initSourceBuffer(),this.registerListeners()}var g=m.prototype;return g.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},g.destroy=function(){this.unregisterListeners(),this.details=null},g.registerListeners=function(){var n=this.hls;n.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(u.Events.BUFFER_RESET,this.onBufferReset,this),n.on(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(u.Events.BUFFER_EOS,this.onBufferEos,this),n.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(u.Events.FRAG_PARSED,this.onFragParsed,this),n.on(u.Events.FRAG_CHANGED,this.onFragChanged,this)},g.unregisterListeners=function(){var n=this.hls;n.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(u.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(u.Events.BUFFER_RESET,this.onBufferReset,this),n.off(u.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(u.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(u.Events.BUFFER_EOS,this.onBufferEos,this),n.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(u.Events.FRAG_PARSED,this.onFragParsed,this),n.off(u.Events.FRAG_CHANGED,this.onFragChanged,this)},g._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new a.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},g.onManifestParsed=function(n,o){var t=2;(o.audio&&!o.video||!o.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,h.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},g.onMediaAttaching=function(n,o){var t=this.media=o.media;if(t&&_){var S=this.mediaSource=new _;S.addEventListener("sourceopen",this._onMediaSourceOpen),S.addEventListener("sourceended",this._onMediaSourceEnded),S.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(S),this._objectUrl=t.src}},g.onMediaDetaching=function(){var n=this.media,o=this.mediaSource,t=this._objectUrl;if(o){if(h.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(S){h.logger.warn("[buffer-controller]: onMediaDetaching: "+S.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(t&&self.URL.revokeObjectURL(t),n.src===t?(n.removeAttribute("src"),n.load()):h.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(u.Events.MEDIA_DETACHED,void 0)},g.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(o){var t=n.sourceBuffer[o];try{t&&(n.removeBufferListeners(o),n.mediaSource&&n.mediaSource.removeSourceBuffer(t),n.sourceBuffer[o]=void 0)}catch(S){h.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",S)}}),this._initSourceBuffer()},g.onBufferCodecs=function(n,o){var t=this,S=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(x){if(S){var s=t.tracks[x];if(s&&typeof s.buffer.changeType=="function"){var P=o[x],O=P.codec,E=P.levelCodec,v=P.container,y=(s.levelCodec||s.codec).replace(p,"$1"),T=(E||O).replace(p,"$1");if(y!==T){var M=v+";codecs="+(E||O);t.appendChangeType(x,M)}}}else t.pendingTracks[x]=o[x]}),S)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},g.appendChangeType=function(n,o){var t=this,S=this.operationQueue,x={execute:function(){var P=t.sourceBuffer[n];P&&(h.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+o),P.changeType(o)),S.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(P){h.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",P)}};S.append(x,n)},g.onBufferAppending=function(n,o){var t=this,S=this.hls,x=this.operationQueue,s=this.tracks,P=o.data,O=o.type,E=o.frag,v=o.part,y=o.chunkMeta,T=y.buffering[O],M=self.performance.now();T.start=M;var N=E.stats.buffering,I=v?v.stats.buffering:null;N.start===0&&(N.start=M),I&&I.start===0&&(I.start=M);var G=s.audio,H=O==="audio"&&y.id===1&&(G==null?void 0:G.container)==="audio/mpeg",W={execute:function(){if(T.executeStart=self.performance.now(),H){var U=t.sourceBuffer[O];if(U){var B=E.start-U.timestampOffset;Math.abs(B)>=.1&&(h.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+E.start+" (delta: "+B+") sn: "+E.sn+")"),U.timestampOffset=E.start)}}t.appendExecutor(P,O)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,N.first===0&&(N.first=U),I&&I.first===0&&(I.first=U);var B=t.sourceBuffer,K={};for(var q in B)K[q]=d.BufferHelper.getBuffered(B[q]);t.appendError=0,t.hls.trigger(u.Events.BUFFER_APPENDED,{type:O,frag:E,part:v,chunkMeta:y,parent:E.type,timeRanges:K})},onError:function(U){h.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",U);var B={type:w.ErrorTypes.MEDIA_ERROR,parent:E.type,details:w.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?B.details=w.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,B.details=w.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>S.config.appendErrorMaxRetry&&(h.logger.error("[buffer-controller]: Failed "+S.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),B.fatal=!0)),S.trigger(u.Events.ERROR,B)}};x.append(W,O)},g.onBufferFlushing=function(n,o){var t=this,S=this.operationQueue,x=function(P){return{execute:t.removeExecutor.bind(t,P,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(u.Events.BUFFER_FLUSHED,{type:P})},onError:function(E){h.logger.warn("[buffer-controller]: Failed to remove from "+P+" SourceBuffer",E)}}};o.type?S.append(x(o.type),o.type):this.getSourceBufferTypes().forEach(function(s){S.append(x(s),s)})},g.onFragParsed=function(n,o){var t=this,S=o.frag,x=o.part,s=[],P=x?x.elementaryStreams:S.elementaryStreams;P[l.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(P[l.ElementaryStreamTypes.AUDIO]&&s.push("audio"),P[l.ElementaryStreamTypes.VIDEO]&&s.push("video"));var O=function(){var v=self.performance.now();S.stats.buffering.end=v,x&&(x.stats.buffering.end=v);var y=x?x.stats:S.stats;t.hls.trigger(u.Events.FRAG_BUFFERED,{frag:S,part:x,stats:y,id:S.type})};s.length===0&&h.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+S.type+" level: "+S.level+" sn: "+S.sn),this.blockBuffers(O,s)},g.onFragChanged=function(n,o){this.flushBackBuffer()},g.onBufferEos=function(n,o){var t=this,S=this.getSourceBufferTypes().reduce(function(x,s){var P=t.sourceBuffer[s];return(!o.type||o.type===s)&&(P&&!P.ended&&(P.ended=!0,h.logger.log("[buffer-controller]: "+s+" sourceBuffer now EOS"))),x&&!!(!P||P.ended)},!0);S&&this.blockBuffers(function(){var x=t.mediaSource;if(!x||x.readyState!=="open")return;x.endOfStream()})},g.onLevelUpdated=function(n,o){var t=o.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},g.flushBackBuffer=function(){var n=this.hls,o=this.details,t=this.media,S=this.sourceBuffer;if(!t||o===null)return;var x=this.getSourceBufferTypes();if(!x.length)return;var s=o.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(D.isFiniteNumber)(s)||s<0)return;var P=t.currentTime,O=o.levelTargetDuration,E=Math.max(s,O),v=Math.floor(P/O)*O-E;x.forEach(function(y){var T=S[y];if(T){var M=d.BufferHelper.getBuffered(T);M.length>0&&v>M.start(0)&&(n.trigger(u.Events.BACK_BUFFER_REACHED,{bufferEnd:v}),o.live&&n.trigger(u.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:v}),n.trigger(u.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:v,type:y}))}})},g.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,o=this.hls,t=this.media,S=this.mediaSource,x=n.fragments[0].start+n.totalduration,s=t.duration,P=Object(D.isFiniteNumber)(S.duration)?S.duration:0;n.live&&o.config.liveDurationInfinity?(h.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),S.duration=Infinity,this.updateSeekableRange(n)):(x>P&&x>s||!Object(D.isFiniteNumber)(s))&&(h.logger.log("[buffer-controller]: Updating Media Source duration to "+x.toFixed(3)),S.duration=x)},g.updateSeekableRange=function(n){var o=this.mediaSource,t=n.fragments,S=t.length;if(S&&n.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var x=Math.max(0,t[0].start),s=Math.max(x,x+n.totalduration);o.setLiveSeekableRange(x,s)}},g.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,o=this.operationQueue,t=this.pendingTracks,S=Object.keys(t).length;if(S&&!n||S===2){this.createSourceBuffers(t),this.pendingTracks={};var x=this.getSourceBufferTypes();if(x.length===0){this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}x.forEach(function(s){o.executeNext(s)})}},g.createSourceBuffers=function(n){var o=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var S=0;for(var x in n)if(!o[x]){var s=n[x];if(!s)throw Error("source buffer exists for track "+x+", however track does not");var P=s.levelCodec||s.codec,O=s.container+";codecs="+P;h.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var E=o[x]=t.addSourceBuffer(O),v=x;this.addBufferListener(v,"updatestart",this._onSBUpdateStart),this.addBufferListener(v,"updateend",this._onSBUpdateEnd),this.addBufferListener(v,"error",this._onSBUpdateError),this.tracks[x]={buffer:E,codec:P,container:s.container,levelCodec:s.levelCodec,id:s.id},S++}catch(y){h.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,mimeType:O})}}S&&this.hls.trigger(u.Events.BUFFER_CREATED,{tracks:this.tracks})},g._onSBUpdateStart=function(n){var o=this.operationQueue,t=o.current(n);t.onStart()},g._onSBUpdateEnd=function(n){var o=this.operationQueue,t=o.current(n);t.onComplete(),o.shiftAndExecuteNext(n)},g._onSBUpdateError=function(n,o){h.logger.error("[buffer-controller]: "+n+" SourceBuffer error",o),this.hls.trigger(u.Events.ERROR,{type:w.ErrorTypes.MEDIA_ERROR,details:w.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(n);t&&t.onError(o)},g.removeExecutor=function(n,o,t){var S=this.media,x=this.mediaSource,s=this.operationQueue,P=this.sourceBuffer,O=P[n];if(!S||!x||!O){h.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(n);return}var E=Object(D.isFiniteNumber)(S.duration)?S.duration:Infinity,v=Object(D.isFiniteNumber)(x.duration)?x.duration:Infinity,y=Math.max(0,o),T=Math.min(t,E,v);T>y?(h.logger.log("[buffer-controller]: Removing ["+y+","+T+"] from the "+n+" SourceBuffer"),console.assert(!O.updating,n+" sourceBuffer must not be updating"),O.remove(y,T)):s.shiftAndExecuteNext(n)},g.appendExecutor=function(n,o){var t=this.operationQueue,S=this.sourceBuffer,x=S[o];if(!x){h.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(o);return}x.ended=!1,console.assert(!x.updating,o+" sourceBuffer must not be updating"),x.appendBuffer(n)},g.blockBuffers=function(n,o){var t=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){h.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var S=this.operationQueue,x=o.map(function(s){return S.appendBlocker(s)});Promise.all(x).then(function(){n(),o.forEach(function(s){var P=t.sourceBuffer[s];(!P||!P.updating)&&S.shiftAndExecuteNext(s)})})},g.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},g.addBufferListener=function(n,o,t){var S=this.sourceBuffer[n];if(!S)return;var x=t.bind(this,n);this.listeners[n].push({event:o,listener:x}),S.addEventListener(o,x)},g.removeBufferListeners=function(n){var o=this.sourceBuffer[n];if(!o)return;this.listeners[n].forEach(function(t){o.removeEventListener(t.event,t.listener)})},m}()},"./src/controller/buffer-operation-queue.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return u});var D=C("./src/utils/logger.ts"),u=function(){function h(d){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=d}var w=h.prototype;return w.append=function(i,l){var a=this.queues[l];a.push(i),a.length===1&&this.buffers[l]&&this.executeNext(l)},w.insertAbort=function(i,l){var a=this.queues[l];a.unshift(i),this.executeNext(l)},w.appendBlocker=function(i){var l,a=new Promise(function(p){l=p}),_={execute:l,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(_,i),a},w.executeNext=function(i){var l=this.buffers,a=this.queues,_=l[i],p=a[i];if(p.length){var c=p[0];try{c.execute()}catch(m){D.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),c.onError(m),(!_||!_.updating)&&(p.shift(),this.executeNext(i))}}},w.shiftAndExecuteNext=function(i){this.queues[i].shift(),this.executeNext(i)},w.current=function(i){return this.queues[i][0]},h}()},"./src/controller/cap-level-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts");function u(d,i){for(var l=0;l<i.length;l++){var a=i[l];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}function h(d,i,l){return i&&u(d.prototype,i),l&&u(d,l),d}var w=function(){function d(l){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=l,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var i=d.prototype;return i.setStreamController=function(a){this.streamController=a},i.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},i.registerListeners=function(){var a=this.hls;a.on(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},i.unregisterListener=function(){var a=this.hls;a.off(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),a.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},i.onFpsDropLevelCapping=function(a,_){d.isLevelAllowed(_.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(_.droppedLevel)},i.onMediaAttaching=function(a,_){this.media=_.media instanceof HTMLVideoElement?_.media:null},i.onManifestParsed=function(a,_){var p=this.hls;this.restrictedLevels=[],this.firstLevel=_.firstLevel,p.config.capLevelToPlayerSize&&_.video&&this.startCapping()},i.onBufferCodecs=function(a,_){var p=this.hls;p.config.capLevelToPlayerSize&&_.video&&this.startCapping()},i.onMediaDetaching=function(){this.stopCapping()},i.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var a=this.hls.levels;if(a.length){var _=this.hls;_.autoLevelCapping=this.getMaxLevel(a.length-1),_.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=_.autoLevelCapping}}},i.getMaxLevel=function(a){var _=this,p=this.hls.levels;if(!p.length)return-1;var c=p.filter(function(m,g){return d.isLevelAllowed(g,_.restrictedLevels)&&g<=a});return this.clientRect=null,d.getMaxLevelByMediaSize(c,this.mediaWidth,this.mediaHeight)},i.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},i.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},i.getDimensions=function(){if(this.clientRect)return this.clientRect;var a=this.media,_={width:0,height:0};if(a){var p=a.getBoundingClientRect();_.width=p.width,_.height=p.height,!_.width&&!_.height&&(_.width=p.right-p.left||a.width||0,_.height=p.bottom-p.top||a.height||0)}return this.clientRect=_,_},d.isLevelAllowed=function(a,_){return _===void 0&&(_=[]),_.indexOf(a)===-1},d.getMaxLevelByMediaSize=function(a,_,p){if(!a||!a.length)return-1;for(var c=function(o,t){return t?o.width!==t.width||o.height!==t.height:!0},m=a.length-1,g=0;g<a.length;g+=1){var b=a[g];if((b.width>=_||b.height>=p)&&c(b,a[g+1])){m=g;break}}return m},h(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*d.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*d.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var a=1;try{a=self.devicePixelRatio}catch(_){}return a}}]),d}();f.default=w},"./src/controller/cmcd-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c});var D=C("./src/events.ts"),u=C("./src/types/cmcd.ts"),h=C("./src/utils/buffer-helper.ts"),w=C("./src/utils/logger.ts");function d(m,g){for(var b=0;b<g.length;b++){var n=g[b];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(m,n.key,n)}}function i(m,g,b){return g&&d(m.prototype,g),b&&d(m,b),m}function l(m,g){var b=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(b)return(b=b.call(m)).next.bind(b);if(Array.isArray(m)||(b=a(m))||g&&m&&typeof m.length=="number"){b&&(m=b);var n=0;return function(){return n>=m.length?{done:!0}:{done:!1,value:m[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(m,g){if(!m)return;if(typeof m=="string")return _(m,g);var b=Object.prototype.toString.call(m).slice(8,-1);if(b==="Object"&&m.constructor&&(b=m.constructor.name),b==="Map"||b==="Set")return Array.from(m);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return _(m,g)}function _(m,g){(g==null||g>m.length)&&(g=m.length);for(var b=0,n=new Array(g);b<g;b++)n[b]=m[b];return n}function p(){return p=Object.assign||function(m){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var n in b)Object.prototype.hasOwnProperty.call(b,n)&&(m[n]=b[n])}return m},p.apply(this,arguments)}var c=function(){function m(b){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(S){try{n.apply(S,{ot:u.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(x){w.logger.warn("Could not generate manifest CMCD data.",x)}},this.applyFragmentData=function(S){try{var x=S.frag,s=n.hls.levels[x.level],P=n.getObjectType(x),O={d:x.duration*1e3,ot:P};(P===u.CMCDObjectType.VIDEO||P===u.CMCDObjectType.AUDIO||P==u.CMCDObjectType.MUXED)&&(O.br=s.bitrate/1e3,O.tb=n.getTopBandwidth(P),O.bl=n.getBufferLength(P)),n.apply(S,O)}catch(E){w.logger.warn("Could not generate segment CMCD data.",E)}},this.hls=b;var o=this.config=b.config,t=o.cmcd;t!=null&&(o.pLoader=this.createPlaylistLoader(),o.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||m.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var g=m.prototype;return g.registerListeners=function(){var n=this.hls;n.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(D.Events.BUFFER_CREATED,this.onBufferCreated,this)},g.unregisterListeners=function(){var n=this.hls;n.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(D.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},g.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},g.onMediaAttached=function(n,o){this.media=o.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},g.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},g.onBufferCreated=function(n,o){var t,S;this.audioBuffer=(t=o.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(S=o.tracks.video)===null||S===void 0?void 0:S.buffer},g.createData=function(){var n;return{v:u.CMCDVersion,sf:u.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},g.apply=function(n,o){o===void 0&&(o={}),p(o,this.createData());var t=o.ot===u.CMCDObjectType.INIT||o.ot===u.CMCDObjectType.VIDEO||o.ot===u.CMCDObjectType.MUXED;if(this.starved&&t&&(o.bs=!0,o.su=!0,this.starved=!1),o.su==null&&(o.su=this.buffering),this.useHeaders){var S=m.toHeaders(o);if(!Object.keys(S).length)return;n.headers||(n.headers={}),p(n.headers,S)}else{var x=m.toQuery(o);if(!x)return;n.url=m.appendQueryToUri(n.url,x)}},g.getObjectType=function(n){var o=n.type;return o==="subtitle"?u.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?u.CMCDObjectType.INIT:o==="audio"?u.CMCDObjectType.AUDIO:o==="main"?this.hls.audioTracks.length?u.CMCDObjectType.VIDEO:u.CMCDObjectType.MUXED:void 0},g.getTopBandwidth=function(n){for(var o=0,t=n===u.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,S=l(t),x;!(x=S()).done;){var s=x.value;s.bitrate>o&&(o=s.bitrate)}return o>0?o:NaN},g.getBufferLength=function(n){var o=this.hls.media,t=n===u.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!o)return NaN;var S=h.BufferHelper.bufferInfo(t,o.currentTime,this.config.maxBufferHole);return S.len*1e3},g.createPlaylistLoader=function(){var n=this.config.pLoader,o=this.applyPlaylistData,t=n||this.config.loader;return function(){function S(s){this.loader=void 0,this.loader=new t(s)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(P,O,E){o(P),this.loader.load(P,O,E)},i(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},g.createFragmentLoader=function(){var n=this.config.fLoader,o=this.applyFragmentData,t=n||this.config.loader;return function(){function S(s){this.loader=void 0,this.loader=new t(s)}var x=S.prototype;return x.destroy=function(){this.loader.destroy()},x.abort=function(){this.loader.abort()},x.load=function(P,O,E){o(P),this.loader.load(P,O,E)},i(S,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),S}()},m.uuid=function(){var n=URL.createObjectURL(new Blob),o=n.toString();return URL.revokeObjectURL(n),o.substr(o.lastIndexOf("/")+1)},m.serialize=function(n){for(var o=[],t=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},S=function(H){return Math.round(H)},x=function(H){return S(H/100)*100},s=function(H){return encodeURIComponent(H)},P={br:S,d:S,bl:x,dl:x,mtp:x,nor:s,rtp:x,tb:S},O=Object.keys(n||{}).sort(),E=l(O),v;!(v=E()).done;){var y=v.value,T=n[y];if(!t(T))continue;if(y==="v"&&T===1)continue;if(y=="pr"&&T===1)continue;var M=P[y];M&&(T=M(T));var N=typeof T,I=void 0;y==="ot"||y==="sf"||y==="st"?I=y+"="+T:N==="boolean"?I=y:N==="number"?I=y+"="+T:I=y+"="+JSON.stringify(T),o.push(I)}return o.join(",")},m.toHeaders=function(n){for(var o=Object.keys(n),t={},S=["Object","Request","Session","Status"],x=[{},{},{},{}],s={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},P=0,O=o;P<O.length;P++){var E=O[P],v=s[E]!=null?s[E]:1;x[v][E]=n[E]}for(var y=0;y<x.length;y++){var T=m.serialize(x[y]);T&&(t["CMCD-"+S[y]]=T)}return t},m.toQuery=function(n){return"CMCD="+encodeURIComponent(m.serialize(n))},m.appendQueryToUri=function(n,o){if(!o)return n;var t=n.includes("?")?"&":"?";return""+n+t+o},m}()},"./src/controller/eme-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/errors.ts"),h=C("./src/utils/logger.ts"),w=C("./src/utils/mediakeys-helper.ts");function d(c,m){for(var g=0;g<m.length;g++){var b=m[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(c,b.key,b)}}function i(c,m,g){return m&&d(c.prototype,m),g&&d(c,g),c}var l=3,a=function(m,g,b){var n={audioCapabilities:[],videoCapabilities:[]};return m.forEach(function(o){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+o+'"',robustness:b.audioRobustness||""})}),g.forEach(function(o){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"',robustness:b.videoRobustness||""})}),[n]},_=function(m,g,b,n){switch(m){case w.KeySystems.WIDEVINE:return a(g,b,n);default:throw new Error("Unknown key-system: "+m)}},p=function(){function c(g){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=g,this._config=g.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var m=c.prototype;return m.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},m._registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this)},m._unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(D.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this)},m.getLicenseServerUrl=function(b){switch(b){case w.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+b+'"')},m._attemptKeySystemAccess=function(b,n,o){var t=this,S=_(b,n,o,this._drmSystemOptions);h.logger.log("Requesting encrypted media key-system access");var x=this.requestMediaKeySystemAccess(b,S);this.mediaKeysPromise=x.then(function(s){return t._onMediaKeySystemAccessObtained(b,s)}),x.catch(function(s){h.logger.error('Failed to obtain key-system "'+b+'" access:',s)})},m._onMediaKeySystemAccessObtained=function(b,n){var o=this;h.logger.log('Access for key-system "'+b+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:b};this._mediaKeysList.push(t);var S=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(x){return t.mediaKeys=x,h.logger.log('Media-keys created for key-system "'+b+'"'),o._onMediaKeysCreated(),x});return S.catch(function(x){h.logger.error("Failed to create media-keys:",x)}),S},m._onMediaKeysCreated=function(){var b=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),b._onNewMediaKeySession(n.mediaKeysSession))})},m._onNewMediaKeySession=function(b){var n=this;h.logger.log("New key-system session "+b.sessionId),b.addEventListener("message",function(o){n._onKeySessionMessage(b,o.message)},!1)},m._onKeySessionMessage=function(b,n){h.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(o){h.logger.log("Received license data (length: "+(o&&o.byteLength)+"), updating key-session"),b.update(o)})},m.onMediaEncrypted=function(b){var n=this;if(h.logger.log('Media is encrypted using "'+b.initDataType+'" init data type'),!this.mediaKeysPromise){h.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var o=function(S){if(!n._media)return;n._attemptSetMediaKeys(S),n._generateRequestWithPreferredKeySession(b.initDataType,b.initData)};this.mediaKeysPromise.then(o).catch(o)},m._attemptSetMediaKeys=function(b){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){h.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}h.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},m._generateRequestWithPreferredKeySession=function(b,n){var o=this,t=this._mediaKeysList[0];if(!t){h.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){h.logger.warn("Key-Session already initialized but requested again");return}var S=t.mediaKeysSession;if(!S){h.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){h.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}h.logger.log('Generating key-session request for "'+b+'" init data type'),t.mediaKeysSessionInitialized=!0,S.generateRequest(b,n).then(function(){h.logger.debug("Key-session generation succeeded")}).catch(function(x){h.logger.error("Error generating key-session request:",x),o.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},m._createLicenseXhr=function(b,n,o){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,b,n,o);var S=this._licenseXhrSetup;if(S)try{S.call(this.hls,t,b),S=void 0}catch(x){h.logger.error(x)}try{t.readyState||t.open("POST",b,!0),S&&S.call(this.hls,t,b)}catch(x){throw new Error("issue setting up KeySystem license XHR "+x)}return t},m._onLicenseRequestReadyStageChange=function(b,n,o,t){switch(b.readyState){case 4:if(b.status===200){this._requestLicenseFailureCount=0,h.logger.log("License request succeeded");var S=b.response,x=this._licenseResponseCallback;if(x)try{S=x.call(this.hls,b,n)}catch(P){h.logger.error(P)}t(S)}else{if(h.logger.error("License Request XHR failed ("+n+"). Status: "+b.status+" ("+b.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l){this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var s=l-this._requestLicenseFailureCount+1;h.logger.warn("Retrying license request, "+s+" attempts left"),this._requestLicense(o,t)}break}},m._generateLicenseRequestChallenge=function(b,n){switch(b.mediaKeySystemDomain){case w.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+b.mediaKeySystemDomain)},m._requestLicense=function(b,n){h.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){h.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(o.mediaKeySystemDomain),S=this._createLicenseXhr(t,b,n);h.logger.log("Sending license request to URL: "+t);var x=this._generateLicenseRequestChallenge(o,b);S.send(x)}catch(s){h.logger.error("Failure requesting DRM license: "+s),this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.KEY_SYSTEM_ERROR,details:u.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},m.onMediaAttached=function(b,n){if(!this._emeEnabled)return;var o=n.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},m.onMediaDetached=function(){var b=this._media,n=this._mediaKeysList;if(!b)return;b.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return b.setMediaKeys(null)}).catch(function(){})},m.onManifestParsed=function(b,n){if(!this._emeEnabled)return;var o=n.levels.map(function(S){return S.audioCodec}).filter(function(S){return!!S}),t=n.levels.map(function(S){return S.videoCodec}).filter(function(S){return!!S});this._attemptKeySystemAccess(w.KeySystems.WIDEVINE,o,t)},i(c,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),c}();f.default=p},"./src/controller/fps-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/utils/logger.ts"),h=function(){function w(i){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=i,this.registerListeners()}var d=w.prototype;return d.setStreamController=function(l){this.streamController=l},d.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},d.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching)},d.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},d.onMediaAttaching=function(l,a){var _=this.hls.config;if(_.capLevelOnFPSDrop){var p=a.media instanceof self.HTMLVideoElement?a.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),_.fpsDroppedMonitoringPeriod)}},d.checkFPS=function(l,a,_){var p=performance.now();if(a){if(this.lastTime){var c=p-this.lastTime,m=_-this.lastDroppedFrames,g=a-this.lastDecodedFrames,b=1e3*m/c,n=this.hls;if(n.trigger(D.Events.FPS_DROP,{currentDropped:m,currentDecoded:g,totalDroppedFrames:_}),b>0&&m>n.config.fpsDroppedMonitoringThreshold*g){var o=n.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=o)&&(o=o-1,n.trigger(D.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:n.currentLevel}),n.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=_,this.lastDecodedFrames=a}},d.checkFPSInterval=function(){var l=this.media;if(l)if(this.isVideoPlaybackQualityAvailable){var a=l.getVideoPlaybackQuality();this.checkFPS(l,a.totalVideoFrames,a.droppedVideoFrames)}else this.checkFPS(l,l.webkitDecodedFrameCount,l.webkitDroppedFrameCount)},w}();f.default=h},"./src/controller/fragment-finders.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"findFragmentByPDT",function(){return h}),C.d(f,"findFragmentByPTS",function(){return w}),C.d(f,"fragmentWithinToleranceTest",function(){return d}),C.d(f,"pdtWithinToleranceTest",function(){return i}),C.d(f,"findFragWithCC",function(){return l});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/binary-search.ts");function h(a,_,p){if(_===null||!Array.isArray(a)||!a.length||!Object(D.isFiniteNumber)(_))return null;var c=a[0].programDateTime;if(_<(c||0))return null;var m=a[a.length-1].endProgramDateTime;if(_>=(m||0))return null;p=p||0;for(var g=0;g<a.length;++g){var b=a[g];if(i(_,p,b))return b}return null}function w(a,_,p,c){p===void 0&&(p=0),c===void 0&&(c=0);var m=null;if(a?m=_[a.sn-_[0].sn+1]||null:p===0&&_[0].start===0&&(m=_[0]),m&&d(p,c,m)===0)return m;var g=u.default.search(_,d.bind(null,p,c));return g||m}function d(a,_,p){a===void 0&&(a=0),_===void 0&&(_=0);var c=Math.min(_,p.duration+(p.deltaPTS?p.deltaPTS:0));return p.start+p.duration-c<=a?1:p.start-c>a&&p.start?-1:0}function i(a,_,p){var c=Math.min(_,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,m=p.endProgramDateTime||0;return m-c>a}function l(a,_){return u.default.search(a,function(p){return p.cc<_?1:p.cc>_?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"FragmentState",function(){return h}),C.d(f,"FragmentTracker",function(){return w});var D=C("./src/events.ts"),u=C("./src/types/loader.ts"),h;(function(l){l.NOT_LOADED="NOT_LOADED",l.BACKTRACKED="BACKTRACKED",l.APPENDING="APPENDING",l.PARTIAL="PARTIAL",l.OK="OK"})(h||(h={}));var w=function(){function l(_){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=_,this._registerListeners()}var a=l.prototype;return a._registerListeners=function(){var p=this.hls;p.on(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(D.Events.FRAG_LOADED,this.onFragLoaded,this)},a._unregisterListeners=function(){var p=this.hls;p.off(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(D.Events.FRAG_LOADED,this.onFragLoaded,this)},a.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},a.getAppendedFrag=function(p,c){if(c===u.PlaylistLevelType.MAIN){var m=this.activeFragment,g=this.activeParts;if(!m)return null;if(g)for(var b=g.length;b--;){var n=g[b],o=n?n.end:m.appendedPTS;if(n.start<=p&&o!==void 0&&p<=o)return b>9&&(this.activeParts=g.slice(b-9)),n}else if(m.start<=p&&m.appendedPTS!==void 0&&p<=m.appendedPTS)return m}return this.getBufferedFrag(p,c)},a.getBufferedFrag=function(p,c){for(var m=this.fragments,g=Object.keys(m),b=g.length;b--;){var n=m[g[b]];if((n==null?void 0:n.body.type)===c&&n.buffered){var o=n.body;if(o.start<=p&&p<=o.end)return o}}return null},a.detectEvictedFragments=function(p,c,m){var g=this;Object.keys(this.fragments).forEach(function(b){var n=g.fragments[b];if(!n)return;if(!n.buffered){n.body.type===m&&g.removeFragment(n.body);return}var o=n.range[p];if(!o)return;o.time.some(function(t){var S=!g.isTimeBuffered(t.startPTS,t.endPTS,c);return S&&g.removeFragment(n.body),S})})},a.detectPartialFragments=function(p){var c=this,m=this.timeRanges,g=p.frag,b=p.part;if(!m||g.sn==="initSegment")return;var n=i(g),o=this.fragments[n];if(!o)return;Object.keys(m).forEach(function(t){var S=g.elementaryStreams[t];if(!S)return;var x=m[t],s=b!==null||S.partial===!0;o.range[t]=c.getBufferedTimes(g,b,s,x)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},a.fragBuffered=function(p){var c=i(p),m=this.fragments[c];m&&(m.backtrack=m.loaded=null,m.buffered=!0)},a.getBufferedTimes=function(p,c,m,g){for(var b={time:[],partial:m},n=c?c.start:p.start,o=c?c.end:p.end,t=p.minEndPTS||o,S=p.maxStartPTS||n,x=0;x<g.length;x++){var s=g.start(x)-this.bufferPadding,P=g.end(x)+this.bufferPadding;if(S>=s&&t<=P){b.time.push({startPTS:Math.max(n,g.start(x)),endPTS:Math.min(o,g.end(x))});break}else if(n<P&&o>s)b.partial=!0,b.time.push({startPTS:Math.max(n,g.start(x)),endPTS:Math.min(o,g.end(x))});else if(o<=s)break}return b},a.getPartialFragment=function(p){var c=null,m,g,b,n=0,o=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(S){var x=t[S];if(!x)return;d(x)&&(g=x.body.start-o,b=x.body.end+o,p>=g&&p<=b&&(m=Math.min(p-g,b-p),n<=m&&(c=x.body,n=m)))}),c},a.getState=function(p){var c=i(p),m=this.fragments[c];return m?m.buffered?d(m)?h.PARTIAL:h.OK:m.backtrack?h.BACKTRACKED:h.APPENDING:h.NOT_LOADED},a.backtrack=function(p,c){var m=i(p),g=this.fragments[m];if(!g||g.backtrack)return null;var b=g.backtrack=c||g.loaded;return g.loaded=null,b},a.getBacktrackData=function(p){var c=i(p),m=this.fragments[c];if(m){var g,b=m.backtrack;if(b!=null&&(g=b.payload)!==null&&g!==void 0&&g.byteLength)return b;this.removeFragment(p)}return null},a.isTimeBuffered=function(p,c,m){for(var g,b,n=0;n<m.length;n++){if(g=m.start(n)-this.bufferPadding,b=m.end(n)+this.bufferPadding,p>=g&&c<=b)return!0;if(c<=g)return!1}return!1},a.onFragLoaded=function(p,c){var m=c.frag,g=c.part;if(m.sn==="initSegment"||m.bitrateTest||g)return;var b=i(m);this.fragments[b]={body:m,loaded:c,backtrack:null,buffered:!1,range:Object.create(null)}},a.onBufferAppended=function(p,c){var m=this,g=c.frag,b=c.part,n=c.timeRanges;if(g.type===u.PlaylistLevelType.MAIN)if(this.activeFragment=g,b){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(b)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(t){var S=n[t];if(m.detectEvictedFragments(t,S),!b)for(var x=0;x<S.length;x++)g.appendedPTS=Math.max(S.end(x),g.appendedPTS||0)})},a.onFragBuffered=function(p,c){this.detectPartialFragments(c)},a.hasFragment=function(p){var c=i(p);return!!this.fragments[c]},a.removeFragmentsInRange=function(p,c,m){var g=this;Object.keys(this.fragments).forEach(function(b){var n=g.fragments[b];if(!n)return;if(n.buffered){var o=n.body;o.type===m&&o.start<c&&o.end>p&&g.removeFragment(o)}})},a.removeFragment=function(p){var c=i(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[c]},a.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},l}();function d(l){var a,_;return l.buffered&&(((a=l.range.video)===null||a===void 0?void 0:a.partial)||((_=l.range.audio)===null||_===void 0?void 0:_.partial))}function i(l){return l.type+"_"+l.level+"_"+l.urlId+"_"+l.sn}},"./src/controller/gap-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"STALL_MINIMUM_DURATION_MS",function(){return d}),C.d(f,"MAX_START_GAP_JUMP",function(){return i}),C.d(f,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return l}),C.d(f,"SKIP_BUFFER_RANGE_START",function(){return a}),C.d(f,"default",function(){return _});var D=C("./src/utils/buffer-helper.ts"),u=C("./src/errors.ts"),h=C("./src/events.ts"),w=C("./src/utils/logger.ts"),d=250,i=2,l=.1,a=.05,_=function(){function p(m,g,b,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=m,this.media=g,this.fragmentTracker=b,this.hls=n}var c=p.prototype;return c.destroy=function(){this.hls=this.fragmentTracker=this.media=null},c.poll=function(g){var b=this.config,n=this.media,o=this.stalled,t=n.currentTime,S=n.seeking,x=this.seeking&&!S,s=!this.seeking&&S;if(this.seeking=S,t!==g){if(this.moved=!0,o!==null){if(this.stallReported){var P=self.performance.now()-o;w.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(P)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((s||x)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!D.BufferHelper.getBuffered(n).length)return;var O=D.BufferHelper.bufferInfo(n,t,0),E=O.len>0,v=O.nextStart||0;if(!E&&!v)return;if(S){var y=O.len>i,T=!v||v-t>i&&!this.fragmentTracker.getPartialFragment(t);if(y||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,N=Math.max(v,O.start||0)-t,I=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=I==null||((M=I.details)===null||M===void 0)?void 0:M.live,H=G?I.details.targetduration*2:i;if(N>0&&N<=H){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(o===null){this.stalled=W;return}var z=W-o;!S&&z>=d&&this._reportStall(O.len);var U=D.BufferHelper.bufferInfo(n,t,b.maxBufferHole);this._tryFixBufferStall(U,z)},c._tryFixBufferStall=function(g,b){var n=this.config,o=this.fragmentTracker,t=this.media,S=t.currentTime,x=o.getPartialFragment(S);if(x){var s=this._trySkipBufferHole(x);if(s)return}g.len>n.maxBufferHole&&b>n.highBufferWatchdogPeriod*1e3&&(w.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},c._reportStall=function(g){var b=this.hls,n=this.media,o=this.stallReported;o||(this.stallReported=!0,w.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+g+")"),b.trigger(h.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:g}))},c._trySkipBufferHole=function(g){for(var b=this.config,n=this.hls,o=this.media,t=o.currentTime,S=0,x=D.BufferHelper.getBuffered(o),s=0;s<x.length;s++){var P=x.start(s);if(t+b.maxBufferHole>=S&&t<P){var O=Math.max(P+a,o.currentTime+l);return w.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+O),this.moved=!0,this.stalled=null,o.currentTime=O,g&&n.trigger(h.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+O,frag:g}),O}S=x.end(s)}return 0},c._tryNudgeBuffer=function(){var g=this.config,b=this.hls,n=this.media,o=n.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<g.nudgeMaxRetry){var S=o+t*g.nudgeOffset;w.logger.warn("Nudging 'currentTime' from "+o+" to "+S),n.currentTime=S,b.trigger(h.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else w.logger.error("Playhead still not moving while enough data buffered @"+o+" after "+g.nudgeMaxRetry+" nudges"),b.trigger(h.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},p}()},"./src/controller/id3-track-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/utils/texttrack-utils.ts"),h=C("./src/demux/id3.ts"),w=.25,d=function(){function i(a){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=a,this._registerListeners()}var l=i.prototype;return l.destroy=function(){this._unregisterListeners()},l._registerListeners=function(){var _=this.hls;_.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.on(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),_.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l._unregisterListeners=function(){var _=this.hls;_.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),_.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),_.off(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),_.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},l.onMediaAttached=function(_,p){this.media=p.media},l.onMediaDetaching=function(){if(!this.id3Track)return;Object(u.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},l.getID3Track=function(_){if(!this.media)return;for(var p=0;p<_.length;p++){var c=_[p];if(c.kind==="metadata"&&c.label==="id3")return Object(u.sendAddTrackEvent)(c,this.media),c}return this.media.addTextTrack("metadata","id3")},l.onFragParsingMetadata=function(_,p){if(!this.media)return;var c=p.frag,m=p.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var g=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,b=0;b<m.length;b++){var n=h.getID3Frames(m[b].data);if(n){var o=m[b].pts,t=b<m.length-1?m[b+1].pts:c.end,S=t-o;S<=0&&(t=o+w);for(var x=0;x<n.length;x++){var s=n[x];if(!h.isTimeStampFrame(s)){var P=new g(o,t,"");P.value=s,this.id3Track.addCue(P)}}}}},l.onBufferFlushing=function(_,p){var c=p.startOffset,m=p.endOffset,g=p.type;if(!g||g==="audio"){var b=this.id3Track;b&&Object(u.removeCuesInRange)(b,c,m)}},i}();f.default=d},"./src/controller/latency-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return i});var D=C("./src/errors.ts"),u=C("./src/events.ts"),h=C("./src/utils/logger.ts");function w(l,a){for(var _=0;_<a.length;_++){var p=a[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(l,p.key,p)}}function d(l,a,_){return a&&w(l.prototype,a),_&&w(l,_),l}var i=function(){function l(_){var p=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return p.timeupdate()},this.hls=_,this.config=_.config,this.registerListeners()}var a=l.prototype;return a.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},a.registerListeners=function(){this.hls.on(u.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(u.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(u.Events.ERROR,this.onError,this)},a.unregisterListeners=function(){this.hls.off(u.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(u.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(u.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(u.Events.ERROR,this.onError)},a.onMediaAttached=function(p,c){this.media=c.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},a.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},a.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},a.onLevelUpdated=function(p,c){var m=c.details;this.levelDetails=m,m.advanced&&this.timeupdate(),!m.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},a.onError=function(p,c){if(c.details!==D.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,h.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},a.timeupdate=function(){var p=this.media,c=this.levelDetails;if(!p||!c)return;this.currentTime=p.currentTime;var m=this.computeLatency();if(m===null)return;this._latency=m;var g=this.config,b=g.lowLatencyMode,n=g.maxLiveSyncPlaybackRate;if(!b||n===1)return;var o=this.targetLatency;if(o===null)return;var t=m-o,S=Math.min(this.maxLatency,o+c.targetduration),x=t<S;if(c.live&&x&&t>.05&&this.forwardBufferLength>1){var s=Math.min(2,Math.max(1,n)),P=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;p.playbackRate=Math.min(s,Math.max(1,P))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},a.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},a.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},d(l,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,c=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:c?p.liveMaxLatencyDurationCount*c.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var c=p.holdBack,m=p.partHoldBack,g=p.targetduration,b=this.config,n=b.liveSyncDuration,o=b.liveSyncDurationCount,t=b.lowLatencyMode,S=this.hls.userConfig,x=t&&m||c;(S.liveSyncDuration||S.liveSyncDurationCount||x===0)&&(x=n!==void 0?n:o*g);var s=g,P=1;return x+Math.min(this.stallCount*P,s)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),c=this.targetLatency,m=this.levelDetails;if(p===null||c===null||m===null)return null;var g=m.edge,b=p-c-this.edgeStalled,n=g-m.totalduration,o=g-(this.config.lowLatencyMode&&m.partTarget||m.targetduration);return Math.min(Math.max(n,b),o)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var c=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-c,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,c=this.levelDetails;if(!p||!c)return 0;var m=p.buffered.length;return m?p.buffered.end(m-1):c.edge-this.currentTime}}]),l}()},"./src/controller/level-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return b});var D=C("./src/types/level.ts"),u=C("./src/events.ts"),h=C("./src/errors.ts"),w=C("./src/utils/codecs.ts"),d=C("./src/controller/level-helper.ts"),i=C("./src/controller/base-playlist-controller.ts"),l=C("./src/types/loader.ts");function a(){return a=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var t=arguments[o];for(var S in t)Object.prototype.hasOwnProperty.call(t,S)&&(n[S]=t[S])}return n},a.apply(this,arguments)}function _(n,o){for(var t=0;t<o.length;t++){var S=o[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(n,S.key,S)}}function p(n,o,t){return o&&_(n.prototype,o),t&&_(n,t),n}function c(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,m(n,o)}function m(n,o){return m=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S},m(n,o)}var g=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),b=function(n){c(o,n);function o(S){var x;return x=n.call(this,S,"[level-controller]")||this,x._levels=[],x._firstLevel=-1,x._startLevel=void 0,x.currentLevelIndex=-1,x.manualLevelIndex=-1,x.onParsedComplete=void 0,x._registerListeners(),x}var t=o.prototype;return t._registerListeners=function(){var x=this.hls;x.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.on(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),x.on(u.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var x=this.hls;x.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),x.off(u.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(u.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),x.off(u.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},t.startLoad=function(){var x=this._levels;x.forEach(function(s){s.loadError=0}),n.prototype.startLoad.call(this)},t.onManifestLoaded=function(x,s){var P=[],O=[],E=[],v,y={},T,M=!1,N=!1,I=!1;if(s.levels.forEach(function(z){var U=z.attrs;M=M||!!(z.width&&z.height),N=N||!!z.videoCodec,I=I||!!z.audioCodec,g&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var B=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;T=y[B],T?T.url.push(z.url):(T=new D.Level(z),y[B]=T,P.push(T)),U&&(U.AUDIO&&Object(d.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(d.addGroupId)(T,"text",U.SUBTITLES))}),(M||N)&&I&&(P=P.filter(function(z){var U=z.videoCodec,B=z.width,K=z.height;return!!U||!!(B&&K)})),P=P.filter(function(z){var U=z.audioCodec,B=z.videoCodec;return(!U||Object(w.isCodecSupportedInMp4)(U,"audio"))&&(!B||Object(w.isCodecSupportedInMp4)(B,"video"))}),s.audioTracks&&(O=s.audioTracks.filter(function(z){return!z.audioCodec||Object(w.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(d.assignTrackIdsByGroup)(O)),s.subtitles&&(E=s.subtitles,Object(d.assignTrackIdsByGroup)(E)),P.length>0){v=P[0].bitrate,P.sort(function(z,U){return z.bitrate-U.bitrate}),this._levels=P;for(var G=0;G<P.length;G++)if(P[G].bitrate===v){this._firstLevel=G,this.log("manifest loaded, "+P.length+" level(s) found, first bitrate: "+v);break}var H=I&&!N,W={levels:P,audioTracks:O,subtitleTracks:E,firstLevel:this._firstLevel,stats:s.stats,audio:I,video:N,altAudio:!H&&O.some(function(z){return!!z.url})};this.hls.trigger(u.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(u.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:s.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(x,s){if(n.prototype.onError.call(this,x,s),s.fatal)return;var P=s.context,O=this._levels[this.currentLevelIndex];if(P&&(P.type===l.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&P.groupId===O.audioGroupIds[O.urlId]||P.type===l.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&P.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var E=!1,v=!0,y;switch(s.details){case h.ErrorDetails.FRAG_LOAD_ERROR:case h.ErrorDetails.FRAG_LOAD_TIMEOUT:case h.ErrorDetails.KEY_LOAD_ERROR:case h.ErrorDetails.KEY_LOAD_TIMEOUT:if(s.frag){var T=this._levels[s.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(y=s.frag.level)):y=s.frag.level}break;case h.ErrorDetails.LEVEL_LOAD_ERROR:case h.ErrorDetails.LEVEL_LOAD_TIMEOUT:P&&(P.deliveryDirectives&&(v=!1),y=P.level),E=!0;break;case h.ErrorDetails.REMUX_ALLOC_ERROR:y=s.level,E=!0;break}y!==void 0&&this.recoverLevel(s,y,E,v)},t.recoverLevel=function(x,s,P,O){var E=x.details,v=this._levels[s];if(v.loadError++,P){var y=this.retryLoadingOrFail(x);if(y)x.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var T=v.url.length;if(T>1&&v.loadError<T)x.levelRetry=!0,this.redundantFailover(s);else if(this.manualLevelIndex===-1){var M=s===0?this._levels.length-1:s-1;this.currentLevelIndex!==M&&this._levels[M].loadError===0&&(this.warn(E+": switch to "+M),x.levelRetry=!0,this.hls.nextAutoLevel=M)}}},t.redundantFailover=function(x){var s=this._levels[x],P=s.url.length;if(P>1){var O=(s.urlId+1)%P;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(E){E.urlId=O}),this.level=x}},t.onFragLoaded=function(x,s){var P=s.frag;if(P!==void 0&&P.type===l.PlaylistLevelType.MAIN){var O=this._levels[P.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},t.onLevelLoaded=function(x,s){var P,O=s.level,E=s.details,v=this._levels[O];if(!v){var y;this.warn("Invalid level index "+O),(y=s.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(E.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(v.fragmentError===0&&(v.loadError=0,this.retryCount=0),this.playlistLoaded(O,s,v.details)):(P=s.deliveryDirectives)!==null&&P!==void 0&&P.skip&&(E.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(x,s){var P=this.hls.levels[this.currentLevelIndex];if(!P)return;if(P.audioGroupIds){for(var O=-1,E=this.hls.audioTracks[s.id].groupId,v=0;v<P.audioGroupIds.length;v++)if(P.audioGroupIds[v]===E){O=v;break}O!==P.urlId&&(P.urlId=O,this.startLoad())}},t.loadPlaylist=function(x){var s=this.currentLevelIndex,P=this._levels[s];if(this.canLoad&&P&&P.url.length>0){var O=P.urlId,E=P.url[O];if(x)try{E=x.addDirectives(E)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("Attempt loading level index "+s+(x?" at sn "+x.msn+" part "+x.part:"")+" with URL-id "+O+" "+E),this.clearTimer(),this.hls.trigger(u.Events.LEVEL_LOADING,{url:E,level:s,id:O,deliveryDirectives:x||null})}},t.removeLevel=function(x,s){var P=function(v,y){return y!==s},O=this._levels.filter(function(E,v){return v!==x?!0:E.url.length>1&&s!==void 0?(E.url=E.url.filter(P),E.audioGroupIds&&(E.audioGroupIds=E.audioGroupIds.filter(P)),E.textGroupIds&&(E.textGroupIds=E.textGroupIds.filter(P)),E.urlId=0,!0):!1}).map(function(E,v){var y=E.details;return y!=null&&y.fragments&&y.fragments.forEach(function(T){T.level=v}),E});this._levels=O,this.hls.trigger(u.Events.LEVELS_UPDATED,{levels:O})},p(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(x){var s,P=this._levels;if(P.length===0)return;if(this.currentLevelIndex===x&&(s=P[x])!==null&&s!==void 0&&s.details)return;if(x<0||x>=P.length){var O=x<0;if(this.hls.trigger(u.Events.ERROR,{type:h.ErrorTypes.OTHER_ERROR,details:h.ErrorDetails.LEVEL_SWITCH_ERROR,level:x,fatal:O,reason:"invalid level idx"}),O)return;x=Math.min(x,P.length-1)}this.clearTimer();var E=this.currentLevelIndex,v=P[E],y=P[x];this.log("switching to level "+x+" from "+E),this.currentLevelIndex=x;var T=a({},y,{level:x,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete T._urlId,this.hls.trigger(u.Events.LEVEL_SWITCHING,T);var M=y.details;if(!M||M.live){var N=this.switchParams(y.uri,v==null?void 0:v.details);this.loadPlaylist(N)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(x){this.manualLevelIndex=x,this._startLevel===void 0&&(this._startLevel=x),x!==-1&&(this.level=x)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(x){this._firstLevel=x}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var x=this.hls.config.startLevel;return x!==void 0?x:this._firstLevel}else return this._startLevel},set:function(x){this._startLevel=x}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(x){this.level=x,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=x)}}]),o}(i.default)},"./src/controller/level-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"addGroupId",function(){return h}),C.d(f,"assignTrackIdsByGroup",function(){return w}),C.d(f,"updatePTS",function(){return d}),C.d(f,"updateFragPTSDTS",function(){return l}),C.d(f,"mergeDetails",function(){return a}),C.d(f,"mapPartIntersection",function(){return _}),C.d(f,"mapFragmentIntersection",function(){return p}),C.d(f,"adjustSliding",function(){return c}),C.d(f,"addSliding",function(){return m}),C.d(f,"computeReloadInterval",function(){return g}),C.d(f,"getFragmentWithSN",function(){return b}),C.d(f,"getPartWith",function(){return n});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/logger.ts");function h(o,t,S){switch(t){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(S);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(S);break}}function w(o){var t={};o.forEach(function(S){var x=S.groupId||"";S.id=t[x]=t[x]||0,t[x]++})}function d(o,t,S){var x=o[t],s=o[S];i(x,s)}function i(o,t){var S=t.startPTS;if(Object(D.isFiniteNumber)(S)){var x=0,s;t.sn>o.sn?(x=S-o.start,s=o):(x=o.start-S,s=t),s.duration!==x&&(s.duration=x)}else if(t.sn>o.sn){var P=o.cc===t.cc;P&&o.minEndPTS?t.start=o.start+(o.minEndPTS-o.start):t.start=o.start+o.duration}else t.start=Math.max(o.start-t.duration,0)}function l(o,t,S,x,s,P){var O=x-S;O<=0&&(u.logger.warn("Fragment should have a positive duration",t),x=S+t.duration,P=s+t.duration);var E=S,v=x,y=t.startPTS,T=t.endPTS;if(Object(D.isFiniteNumber)(y)){var M=Math.abs(y-S);Object(D.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(M,t.deltaPTS):t.deltaPTS=M,E=Math.max(S,y),S=Math.min(S,y),s=Math.min(s,t.startDTS),v=Math.min(x,T),x=Math.max(x,T),P=Math.max(P,t.endDTS)}t.duration=x-S;var N=S-t.start;t.appendedPTS=x,t.start=t.startPTS=S,t.maxStartPTS=E,t.startDTS=s,t.endPTS=x,t.minEndPTS=v,t.endDTS=P;var I=t.sn;if(!o||I<o.startSN||I>o.endSN)return 0;var G,H=I-o.startSN,W=o.fragments;for(W[H]=t,G=H;G>0;G--)i(W[G],W[G-1]);for(G=H;G<W.length-1;G++)i(W[G],W[G+1]);return o.fragmentHint&&i(W[W.length-1],o.fragmentHint),o.PTSKnown=o.alignedSliding=!0,N}function a(o,t){for(var S=null,x=o.fragments,s=x.length-1;s>=0;s--){var P=x[s].initSegment;if(P){S=P;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var O=0,E;if(p(o,t,function(G,H){G.relurl&&(O=G.cc-H.cc),Object(D.isFiniteNumber)(G.startPTS)&&Object(D.isFiniteNumber)(G.endPTS)&&(H.start=H.startPTS=G.startPTS,H.startDTS=G.startDTS,H.appendedPTS=G.appendedPTS,H.maxStartPTS=G.maxStartPTS,H.endPTS=G.endPTS,H.endDTS=G.endDTS,H.minEndPTS=G.minEndPTS,H.duration=G.endPTS-G.startPTS,H.duration&&(E=H),t.PTSKnown=t.alignedSliding=!0),H.elementaryStreams=G.elementaryStreams,H.loader=G.loader,H.stats=G.stats,H.urlId=G.urlId,G.initSegment&&(H.initSegment=G.initSegment,S=G.initSegment)}),S){var v=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;v.forEach(function(G){var H;(!G.initSegment||G.initSegment.relurl===((H=S)===null||H===void 0?void 0:H.relurl))&&(G.initSegment=S)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(G){return!G}),t.deltaUpdateFailed)){u.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var y=t.skippedSegments;y--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var T=t.fragments;if(O){u.logger.warn("discontinuity sliding from playlist, take drift into account");for(var M=0;M<T.length;M++)T[M].cc+=O}t.skippedSegments&&(t.startCC=t.fragments[0].cc),_(o.partList,t.partList,function(G,H){H.elementaryStreams=G.elementaryStreams,H.stats=G.stats}),E?l(t,E,E.startPTS,E.endPTS,E.startDTS,E.endDTS):c(o,t),T.length&&(t.totalduration=t.edge-T[0].start),t.driftStartTime=o.driftStartTime,t.driftStart=o.driftStart;var N=t.advancedDateTime;if(t.advanced&&N){var I=t.edge;t.driftStart||(t.driftStartTime=N,t.driftStart=I),t.driftEndTime=N,t.driftEnd=I}else t.driftEndTime=o.driftEndTime,t.driftEnd=o.driftEnd,t.advancedDateTime=o.advancedDateTime}function _(o,t,S){if(o&&t)for(var x=0,s=0,P=o.length;s<=P;s++){var O=o[s],E=t[s+x];O&&E&&O.index===E.index&&O.fragment.sn===E.fragment.sn?S(O,E):x--}}function p(o,t,S){for(var x=t.skippedSegments,s=Math.max(o.startSN,t.startSN)-t.startSN,P=(o.fragmentHint?1:0)+(x?t.endSN:Math.min(o.endSN,t.endSN))-t.startSN,O=t.startSN-o.startSN,E=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,v=o.fragmentHint?o.fragments.concat(o.fragmentHint):o.fragments,y=s;y<=P;y++){var T=v[O+y],M=E[y];x&&!M&&y<x&&(M=t.fragments[y]=T),T&&M&&S(T,M)}}function c(o,t){var S=t.startSN+t.skippedSegments-o.startSN,x=o.fragments;if(S<0||S>=x.length)return;m(t,x[S].start)}function m(o,t){if(t){for(var S=o.fragments,x=o.skippedSegments;x<S.length;x++)S[x].start+=t;o.fragmentHint&&(o.fragmentHint.start+=t)}}function g(o,t){var S=1e3*o.levelTargetDuration,x=S/2,s=o.age,P=s>0&&s<S*3,O=t.loading.end-t.loading.start,E,v=o.availabilityDelay;if(o.updated===!1)if(P){var y=333*o.misses;E=Math.max(Math.min(x,O*2),y),o.availabilityDelay=(o.availabilityDelay||0)+E}else E=x;else P?(v=Math.min(v||S/2,s),o.availabilityDelay=v,E=v+S-s):E=S-O;return Math.round(E)}function b(o,t,S){if(!o||!o.details)return null;var x=o.details,s=x.fragments[t-x.startSN];return s||(s=x.fragmentHint,s&&s.sn===t?s:t<x.startSN&&S&&S.sn===t?S:null)}function n(o,t,S){if(!o||!o.details)return null;var x=o.details.partList;if(x)for(var s=x.length;s--;){var P=x[s];if(P.index===S&&P.fragment.sn===t)return P}return null}},"./src/controller/stream-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return x});var D=C("./src/polyfills/number.ts"),u=C("./src/controller/base-stream-controller.ts"),h=C("./src/is-supported.ts"),w=C("./src/events.ts"),d=C("./src/utils/buffer-helper.ts"),i=C("./src/controller/fragment-tracker.ts"),l=C("./src/types/loader.ts"),a=C("./src/loader/fragment.ts"),_=C("./src/demux/transmuxer-interface.ts"),p=C("./src/types/transmuxer.ts"),c=C("./src/controller/gap-controller.ts"),m=C("./src/errors.ts"),g=C("./src/utils/logger.ts");function b(s,P){for(var O=0;O<P.length;O++){var E=P[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(s,E.key,E)}}function n(s,P,O){return P&&b(s.prototype,P),O&&b(s,O),s}function o(s,P){s.prototype=Object.create(P.prototype),s.prototype.constructor=s,t(s,P)}function t(s,P){return t=Object.setPrototypeOf||function(E,v){return E.__proto__=v,E},t(s,P)}var S=100,x=function(s){o(P,s);function P(E,v){var y;return y=s.call(this,E,v,"[stream-controller]")||this,y.audioCodecSwap=!1,y.gapController=null,y.level=-1,y._forceStartLoad=!1,y.altAudio=!1,y.audioOnly=!1,y.fragPlaying=null,y.onvplaying=null,y.onvseeked=null,y.fragLastKbps=0,y.stalled=!1,y.couldBacktrack=!1,y.audioCodecSwitch=!1,y.videoBuffer=null,y._registerListeners(),y}var O=P.prototype;return O._registerListeners=function(){var v=this.hls;v.on(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.on(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(w.Events.LEVEL_LOADING,this.onLevelLoading,this),v.on(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),v.on(w.Events.ERROR,this.onError,this),v.on(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),v.on(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(w.Events.BUFFER_CREATED,this.onBufferCreated,this),v.on(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),v.on(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),v.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var v=this.hls;v.off(w.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(w.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(w.Events.MANIFEST_LOADING,this.onManifestLoading,this),v.off(w.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(w.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(w.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),v.off(w.Events.ERROR,this.onError,this),v.off(w.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),v.off(w.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(w.Events.BUFFER_CREATED,this.onBufferCreated,this),v.off(w.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),v.off(w.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),v.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(v){if(this.levels){var y=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(S),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var M=T.startLevel;M===-1&&(T.config.testBandwidth?(M=0,this.bitrateTest=!0):M=T.nextAutoLevel),this.level=T.nextLoadLevel=M,this.loadedmetadata=!1}y>0&&v===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),v=y),this.state=u.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=v,this.tick()}else this._forceStartLoad=!0,this.state=u.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,s.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case u.State.IDLE:this.doTickIdle();break;case u.State.WAITING_LEVEL:{var v,y=this.levels,T=this.level,M=y==null||((v=y[T])===null||v===void 0)?void 0:v.details;if(M&&(!M.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(M))break;this.state=u.State.IDLE;break}break}case u.State.FRAG_LOADING_WAITING_RETRY:{var N,I=self.performance.now(),G=this.retryDate;(!G||I>=G||(N=this.media)!==null&&N!==void 0&&N.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=u.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){s.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var v,y,T=this.hls,M=this.levelLastLoaded,N=this.levels,I=this.media,G=T.config,H=T.nextLoadLevel;if(M===null||!I&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!N||!N[H])return;var W=N[H];this.level=T.nextLoadLevel=H;var z=W.details;if(!z||this.state===u.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==H){this.state=u.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:I,l.PlaylistLevelType.MAIN);if(U===null)return;var B=U.len,K=this.getMaxBufferLength(W.maxBitrate);if(B>=K)return;if(this._streamEnded(U,z)){var q={};this.altAudio&&(q.type="video"),this.hls.trigger(w.Events.BUFFER_EOS,q),this.state=u.State.ENDED;return}var ae=U.end,se=this.getNextFragment(ae,z);if(this.couldBacktrack&&!this.fragPrevious&&se&&se.sn!=="initSegment"){var we=se.sn-z.startSN;we>1&&(se=z.fragments[we-1],this.fragmentTracker.removeFragment(se))}if(se&&this.fragmentTracker.getState(se)===i.FragmentState.OK&&this.nextLoadPosition>ae){var Te=this.audioOnly&&!this.altAudio?a.ElementaryStreamTypes.AUDIO:a.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(I,Te,l.PlaylistLevelType.MAIN),se=this.getNextFragment(this.nextLoadPosition,z)}if(!se)return;se.initSegment&&!se.initSegment.data&&!this.bitrateTest&&(se=se.initSegment),((v=se.decryptdata)===null||v===void 0?void 0:v.keyFormat)==="identity"&&!((y=se.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(se,z):this.loadFragment(se,z,ae)},O.loadFragment=function(v,y,T){var M,N=this.fragmentTracker.getState(v);if(this.fragCurrent=v,N===i.FragmentState.BACKTRACKED){var I=this.fragmentTracker.getBacktrackData(v);if(I){this._handleFragmentLoadProgress(I),this._handleFragmentLoadComplete(I);return}else N=i.FragmentState.NOT_LOADED}N===i.FragmentState.NOT_LOADED||N===i.FragmentState.PARTIAL?v.sn==="initSegment"?this._loadInitSegment(v):this.bitrateTest?(v.bitrateTest=!0,this.log("Fragment "+v.sn+" of level "+v.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(v)):(this.startFragRequested=!0,s.prototype.loadFragment.call(this,v,y,T)):N===i.FragmentState.APPENDING?this.reduceMaxBufferLength(v.duration)&&this.fragmentTracker.removeFragment(v):((M=this.media)===null||M===void 0?void 0:M.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(v){var y=this.fragmentTracker.getAppendedFrag(v,l.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},O.getBufferedFrag=function(v){return this.fragmentTracker.getBufferedFrag(v,l.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(v){return v?this.getBufferedFrag(v.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var v=this.levels,y=this.media;if(y!=null&&y.readyState){var T,M=this.getAppendedFrag(y.currentTime);if(M&&M.start>1&&this.flushMainBuffer(0,M.start-1),!y.paused&&v){var N=this.hls.nextLoadLevel,I=v[N],G=this.fragLastKbps;G&&this.fragCurrent?T=this.fragCurrent.duration*I.maxBitrate/(1e3*G)+1:T=0}else T=0;var H=this.getBufferedFrag(y.currentTime+T);if(H){var W=this.followingBufferedFrag(H);if(W){this.abortCurrentFrag();var z=W.maxStartPTS?W.maxStartPTS:W.start,U=W.duration,B=Math.max(H.end,z+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(B,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var v=this.fragCurrent;this.fragCurrent=null,v!=null&&v.loader&&v.loader.abort(),this.state===u.State.KEY_LOADING&&(this.state=u.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(v,y){s.prototype.flushMainBuffer.call(this,v,y,this.altAudio?"video":null)},O.onMediaAttached=function(v,y){s.prototype.onMediaAttached.call(this,v,y);var T=y.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new c.default(this.config,T,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var v=this.media;v&&(v.removeEventListener("playing",this.onvplaying),v.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),s.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var v=this.media,y=v?v.currentTime:null;Object(D.isFiniteNumber)(y)&&this.log("Media seeked to "+y.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(w.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(v,y){var T=!1,M=!1,N;y.levels.forEach(function(I){N=I.audioCodec,N&&(N.indexOf("mp4a.40.2")!==-1&&(T=!0),N.indexOf("mp4a.40.5")!==-1&&(M=!0))}),this.audioCodecSwitch=T&&M&&!Object(h.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=y.levels,this.startFragRequested=!1},O.onLevelLoading=function(v,y){var T=this.levels;if(!T||this.state!==u.State.IDLE)return;var M=T[y.level];(!M.details||M.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(M.details))&&(this.state=u.State.WAITING_LEVEL)},O.onLevelLoaded=function(v,y){var T,M=this.levels,N=y.level,I=y.details,G=I.totalduration;if(!M){this.warn("Levels were reset while loading level "+N);return}this.log("Level "+N+" loaded ["+I.startSN+","+I.endSN+"], cc ["+I.startCC+", "+I.endCC+"] duration:"+G);var H=this.fragCurrent;H&&(this.state===u.State.FRAG_LOADING||this.state===u.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==y.level&&H.loader&&(this.state=u.State.IDLE,H.loader.abort()));var W=M[N],z=0;if(I.live||(T=W.details)!==null&&T!==void 0&&T.live){if(I.fragments[0]||(I.deltaUpdateFailed=!0),I.deltaUpdateFailed)return;z=this.alignPlaylists(I,W.details)}if(W.details=I,this.levelLastLoaded=N,this.hls.trigger(w.Events.LEVEL_UPDATED,{details:I,level:N}),this.state===u.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(I))return;this.state=u.State.IDLE}this.startFragRequested?I.live&&this.synchronizeToLiveEdge(I):this.setStartPosition(I,z),this.tick()},O._handleFragmentLoadProgress=function(v){var y,T=v.frag,M=v.part,N=v.payload,I=this.levels;if(!I){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var G=I[T.level],H=G.details;if(!H){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var W=G.videoCodec,z=H.PTSKnown||!H.live,U=(y=T.initSegment)===null||y===void 0?void 0:y.data,B=this._getAudioCodec(G),K=this.transmuxer=this.transmuxer||new _.default(this.hls,l.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),q=M?M.index:-1,ae=q!==-1,se=new p.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,N.byteLength,q,ae),we=this.initPTS[T.cc];K.push(N,U,B,W,T,M,H.totalduration,z,se,we)},O.onAudioTrackSwitching=function(v,y){var T=this.altAudio,M=!!y.url,N=y.id;if(!M){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var I=this.fragCurrent;I!=null&&I.loader&&(this.log("Switching to main audio track, cancel main fragment load"),I.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;T&&G.trigger(w.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(w.Events.AUDIO_TRACK_SWITCHED,{id:N})}},O.onAudioTrackSwitched=function(v,y){var T=y.id,M=!!this.hls.audioTracks[T].url;if(M){var N=this.videoBuffer;N&&this.mediaBuffer!==N&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=N)}this.altAudio=M,this.tick()},O.onBufferCreated=function(v,y){var T=y.tracks,M,N,I=!1;for(var G in T){var H=T[G];if(H.id==="main"){if(N=G,M=H,G==="video"){var W=T[G];W&&(this.videoBuffer=W.buffer)}}else I=!0}I&&M?(this.log("Alternate track found, use "+N+".buffered to schedule main fragment loading"),this.mediaBuffer=M.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(v,y){var T=y.frag,M=y.part;if(T&&T.type!==l.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(M?" p: "+M.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===u.State.PARSED&&(this.state=u.State.IDLE);return}var N=M?M.stats:T.stats;this.fragLastKbps=Math.round(8*N.total/(N.buffering.end-N.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,M)},O.onError=function(v,y){switch(y.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(l.PlaylistLevelType.MAIN,y);break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==u.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=u.State.ERROR):!y.levelRetry&&this.state===u.State.WAITING_LEVEL&&(this.state=u.State.IDLE));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if(y.parent==="main"&&(this.state===u.State.PARSING||this.state===u.State.PARSED)){var T=!0,M=this.getFwdBufferInfo(this.media,l.PlaylistLevelType.MAIN);M&&M.len>.5&&(T=!this.reduceMaxBufferLength(M.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var v=this.media,y=this.gapController;if(!v||!y||!v.readyState)return;var T=d.BufferHelper.getBuffered(v);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):y.poll(this.lastCurrentTime),this.lastCurrentTime=v.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=u.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(v,y){var T=y.type;if(T!==a.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var M=(T===a.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(M,T,l.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(v,y){this.levels=y.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var v=this.media,y=v.currentTime,T=this.startPosition;if(T>=0&&y<T){if(v.seeking){g.logger.log("could not seek to "+T+", already seeking at "+y);return}var M=d.BufferHelper.getBuffered(v),N=M.length?M.start(0):0,I=N-T;I>0&&(I<this.config.maxBufferHole||I<this.config.maxFragLookUpTolerance)&&(g.logger.log("adjusting start position by "+I+" to match buffer start"),T+=I,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+y),v.currentTime=T}},O._getAudioCodec=function(v){var y=this.config.defaultAudioCodec||v.audioCodec;return this.audioCodecSwap&&y&&(this.log("Swapping audio codec"),y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),y},O._loadBitrateTestFrag=function(v){var y=this;this._doFragLoad(v).then(function(T){var M=y.hls;if(!T||M.nextLoadLevel||y.fragContextChanged(v))return;y.fragLoadError=0,y.state=u.State.IDLE,y.startFragRequested=!1,y.bitrateTest=!1;var N=v.stats;N.parsing.start=N.parsing.end=N.buffering.start=N.buffering.end=self.performance.now(),M.trigger(w.Events.FRAG_LOADED,T)})},O._handleTransmuxComplete=function(v){var y,T="main",M=this.hls,N=v.remuxResult,I=v.chunkMeta,G=this.getCurrentContext(I);if(!G){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var H=G.frag,W=G.part,z=G.level,U=N.video,B=N.text,K=N.id3,q=N.initSegment,ae=this.altAudio?void 0:N.audio;if(this.fragContextChanged(H))return;if(this.state=u.State.PARSING,q){q.tracks&&(this._bufferInitSegment(z,q.tracks,H,I),M.trigger(w.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:T,tracks:q.tracks}));var se=q.initPTS,we=q.timescale;Object(D.isFiniteNumber)(se)&&(this.initPTS[H.cc]=se,M.trigger(w.Events.INIT_PTS_FOUND,{frag:H,id:T,initPTS:se,timescale:we}))}if(U&&N.independent!==!1){if(z.details){var Te=U.startPTS,de=U.endPTS,xe=U.startDTS,pe=U.endDTS;if(W)W.elementaryStreams[U.type]={startPTS:Te,endPTS:de,startDTS:xe,endDTS:pe};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var ne=this.getLoadPosition()+this.config.maxBufferHole;if(ne<Te){this.backtrack(H);return}H.setElementaryStreamInfo(U.type,H.start,de,H.start,pe,!0)}H.setElementaryStreamInfo(U.type,Te,de,xe,pe),this.bufferFragmentData(U,H,W,I)}}else if(N.independent===!1){this.backtrack(H);return}if(ae){var ie=ae.startPTS,ee=ae.endPTS,le=ae.startDTS,Q=ae.endDTS;W&&(W.elementaryStreams[a.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:ee,startDTS:le,endDTS:Q}),H.setElementaryStreamInfo(a.ElementaryStreamTypes.AUDIO,ie,ee,le,Q),this.bufferFragmentData(ae,H,W,I)}if(K!=null&&(y=K.samples)!==null&&y!==void 0&&y.length){var Z={frag:H,id:T,samples:K.samples};M.trigger(w.Events.FRAG_PARSING_METADATA,Z)}if(B){var be={frag:H,id:T,samples:B.samples};M.trigger(w.Events.FRAG_PARSING_USERDATA,be)}},O._bufferInitSegment=function(v,y,T,M){var N=this;if(this.state!==u.State.PARSING)return;this.audioOnly=!!y.audio&&!y.video,this.altAudio&&!this.audioOnly&&delete y.audio;var I=y.audio,G=y.video,H=y.audiovideo;if(I){var W=v.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),I.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(W="mp4a.40.5")),z.indexOf("android")!==-1&&I.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),v.audioCodec&&v.audioCodec!==W&&this.log('Swapping manifest audio codec "'+v.audioCodec+'" for "'+W+'"'),I.levelCodec=W,I.id="main",this.log("Init audio buffer, container:"+I.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(v.audioCodec||"")+"/"+I.codec+"]")}G&&(G.levelCodec=v.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(v.videoCodec||"")+"/"+G.codec+"]")),H&&this.log("Init audiovideo buffer, container:"+H.container+", codecs[level/parsed]=["+(v.attrs.CODECS||"")+"/"+H.codec+"]"),this.hls.trigger(w.Events.BUFFER_CODECS,y),Object.keys(y).forEach(function(U){var B=y[U],K=B.initSegment;K!=null&&K.byteLength&&N.hls.trigger(w.Events.BUFFER_APPENDING,{type:U,data:K,frag:T,part:null,chunkMeta:M,parent:T.type})}),this.tick()},O.backtrack=function(v){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(v);var y=this.fragmentTracker.backtrack(v);this.fragPrevious=null,this.nextLoadPosition=v.start,y?this.resetFragmentLoading(v):this.state=u.State.BACKTRACKING},O.checkFragmentChanged=function(){var v=this.media,y=null;if(v&&v.readyState>1&&v.seeking===!1){var T=v.currentTime;if(d.BufferHelper.isBuffered(v,T)?y=this.getAppendedFrag(T):d.BufferHelper.isBuffered(v,T+.1)&&(y=this.getAppendedFrag(T+.1)),y){var M=this.fragPlaying,N=y.level;(!M||y.sn!==M.sn||M.level!==N||y.urlId!==M.urlId)&&(this.hls.trigger(w.Events.FRAG_CHANGED,{frag:y}),(!M||M.level!==N)&&this.hls.trigger(w.Events.LEVEL_SWITCHED,{level:N}),this.fragPlaying=y)}}},n(P,[{key:"nextLevel",get:function(){var v=this.nextBufferedFrag;return v?v.level:-1}},{key:"currentLevel",get:function(){var v=this.media;if(v){var y=this.getAppendedFrag(v.currentTime);if(y)return y.level}return-1}},{key:"nextBufferedFrag",get:function(){var v=this.media;if(v){var y=this.getAppendedFrag(v.currentTime);return this.followingBufferedFrag(y)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),P}(u.default)},"./src/controller/subtitle-stream-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"SubtitleStreamController",function(){return o});var D=C("./src/events.ts"),u=C("./src/utils/logger.ts"),h=C("./src/utils/buffer-helper.ts"),w=C("./src/controller/fragment-finders.ts"),d=C("./src/utils/discontinuities.ts"),i=C("./src/controller/level-helper.ts"),l=C("./src/controller/fragment-tracker.ts"),a=C("./src/controller/base-stream-controller.ts"),_=C("./src/types/loader.ts"),p=C("./src/types/level.ts");function c(t,S){for(var x=0;x<S.length;x++){var s=S[x];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function m(t,S,x){return S&&c(t.prototype,S),x&&c(t,x),t}function g(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,b(t,S)}function b(t,S){return b=Object.setPrototypeOf||function(s,P){return s.__proto__=P,s},b(t,S)}var n=500,o=function(t){g(S,t);function S(s,P){var O;return O=t.call(this,s,P,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var x=S.prototype;return x.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},x._registerListeners=function(){var P=this.hls;P.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.on(D.Events.ERROR,this.onError,this),P.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.on(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.on(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x._unregisterListeners=function(){var P=this.hls;P.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),P.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),P.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),P.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),P.off(D.Events.ERROR,this.onError,this),P.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),P.off(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),P.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),P.off(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),P.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},x.startLoad=function(){this.stopLoad(),this.state=a.State.IDLE,this.setInterval(n),this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},x.onLevelLoaded=function(P,O){this.mainDetails=O.details},x.onSubtitleFragProcessed=function(P,O){var E=O.frag,v=O.success;if(this.fragPrevious=E,this.state=a.State.IDLE,!v)return;var y=this.tracksBuffered[this.currentTrackId];if(!y)return;for(var T,M=E.start,N=0;N<y.length;N++)if(M>=y[N].start&&M<=y[N].end){T=y[N];break}var I=E.start+E.duration;T?T.end=I:(T={start:M,end:I},y.push(T)),this.fragmentTracker.fragBuffered(E)},x.onBufferFlushing=function(P,O){var E=O.startOffset,v=O.endOffset;if(E===0&&v!==Number.POSITIVE_INFINITY){var y=this.currentTrackId,T=this.levels;if(!T.length||!T[y]||!T[y].details)return;var M=T[y].details,N=M.targetduration,I=v-N;if(I<=0)return;O.endOffsetSubtitles=Math.max(0,I),this.tracksBuffered.forEach(function(G){for(var H=0;H<G.length;){if(G[H].end<=I){G.shift();continue}else if(G[H].start<I)G[H].start=I;else break;H++}}),this.fragmentTracker.removeFragmentsInRange(E,I,_.PlaylistLevelType.SUBTITLE)}},x.onError=function(P,O){var E,v=O.frag;if(!v||v.type!==_.PlaylistLevelType.SUBTITLE)return;(E=this.fragCurrent)!==null&&E!==void 0&&E.loader&&this.fragCurrent.loader.abort(),this.state=a.State.IDLE},x.onSubtitleTracksUpdated=function(P,O){var E=this,v=O.subtitleTracks;this.tracksBuffered=[],this.levels=v.map(function(y){return new p.Level(y)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(y){E.tracksBuffered[y.id]=[]}),this.mediaBuffer=null},x.onSubtitleTrackSwitch=function(P,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var E=this.levels[this.currentTrackId];E!=null&&E.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,E&&this.setInterval(n)},x.onSubtitleTrackLoaded=function(P,O){var E,v=O.details,y=O.id,T=this.currentTrackId,M=this.levels;if(!M.length)return;var N=M[T];if(y>=M.length||y!==T||!N)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,v.live||(E=N.details)!==null&&E!==void 0&&E.live){var I=this.mainDetails;if(v.deltaUpdateFailed||!I)return;var G=I.fragments[0];if(!N.details)v.hasProgramDateTime&&I.hasProgramDateTime?Object(d.alignMediaPlaylistByPDT)(v,I):G&&Object(i.addSliding)(v,G.start);else{var H=this.alignPlaylists(v,N.details);H===0&&G&&Object(i.addSliding)(v,G.start)}}if(N.details=v,this.levelLastLoaded=y,this.tick(),v.live&&!this.fragCurrent&&this.media&&this.state===a.State.IDLE){var W=Object(w.findFragmentByPTS)(null,v.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),N.details=void 0)}},x._handleFragmentLoadComplete=function(P){var O=P.frag,E=P.payload,v=O.decryptdata,y=this.hls;if(this.fragContextChanged(O))return;if(E&&E.byteLength>0&&v&&v.key&&v.iv&&v.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(E),v.key.buffer,v.iv.buffer).then(function(M){var N=performance.now();y.trigger(D.Events.FRAG_DECRYPTED,{frag:O,payload:M,stats:{tstart:T,tdecrypt:N}})})}},x.doTick=function(){if(!this.media){this.state=a.State.IDLE;return}if(this.state===a.State.IDLE){var P,O=this.currentTrackId,E=this.levels;if(!E.length||!E[O]||!E[O].details)return;var v=E[O].details,y=v.targetduration,T=this.config,M=this.media,N=h.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,M.currentTime-y,T.maxBufferHole),I=N.end,G=N.len,H=this.getMaxBufferLength()+y;if(G>H)return;console.assert(v,"Subtitle track details are defined on idle subtitle stream controller tick");var W=v.fragments,z=W.length,U=v.edge,B,K=this.fragPrevious;if(I<U){var q=T.maxFragLookUpTolerance;K&&v.hasProgramDateTime&&(B=Object(w.findFragmentByPDT)(W,K.endProgramDateTime,q)),B||(B=Object(w.findFragmentByPTS)(K,W,I,q),!B&&K&&K.start<W[0].start&&(B=W[0]))}else B=W[z-1];(P=B)!==null&&P!==void 0&&P.encrypted?(u.logger.log("Loading key for "+B.sn),this.state=a.State.KEY_LOADING,this.hls.trigger(D.Events.KEY_LOADING,{frag:B})):B&&this.fragmentTracker.getState(B)===l.FragmentState.NOT_LOADED&&this.loadFragment(B,v,I)}},x.loadFragment=function(P,O,E){this.fragCurrent=P,t.prototype.loadFragment.call(this,P,O,E)},m(S,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),S}(a.default)},"./src/controller/subtitle-track-controller.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/events.ts"),u=C("./src/utils/texttrack-utils.ts"),h=C("./src/controller/base-playlist-controller.ts"),w=C("./src/types/loader.ts");function d(c,m){for(var g=0;g<m.length;g++){var b=m[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(c,b.key,b)}}function i(c,m,g){return m&&d(c.prototype,m),g&&d(c,g),c}function l(c,m){c.prototype=Object.create(m.prototype),c.prototype.constructor=c,a(c,m)}function a(c,m){return a=Object.setPrototypeOf||function(b,n){return b.__proto__=n,b},a(c,m)}var _=function(c){l(m,c);function m(b){var n;return n=c.call(this,b,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var g=m.prototype;return g.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,c.prototype.destroy.call(this)},g.registerListeners=function(){var n=this.hls;n.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(D.Events.ERROR,this.onError,this)},g.unregisterListeners=function(){var n=this.hls;n.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(D.Events.ERROR,this.onError,this)},g.onMediaAttached=function(n,o){if(this.media=o.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},g.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},g.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=p(this.media.textTracks);n.forEach(function(o){Object(u.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},g.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},g.onManifestParsed=function(n,o){this.tracks=o.subtitleTracks},g.onSubtitleTrackLoaded=function(n,o){var t=o.id,S=o.details,x=this.trackId,s=this.tracksInGroup[x];if(!s){this.warn("Invalid subtitle track id "+t);return}var P=s.details;s.details=o.details,this.log("subtitle track "+t+" loaded ["+S.startSN+"-"+S.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,o,P))},g.onLevelLoading=function(n,o){this.switchLevel(o.level)},g.onLevelSwitching=function(n,o){this.switchLevel(o.level)},g.switchLevel=function(n){var o=this.hls.levels[n];if(!(o!=null&&o.textGroupIds))return;var t=o.textGroupIds[o.urlId];if(this.groupId!==t){var S=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,x=this.tracks.filter(function(O){return!t||O.groupId===t});this.tracksInGroup=x;var s=this.findTrackId(S==null?void 0:S.name)||this.findTrackId();this.groupId=t;var P={subtitleTracks:x};this.log("Updating subtitle tracks, "+x.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(D.Events.SUBTITLE_TRACKS_UPDATED,P),s!==-1&&this.setSubtitleTrack(s,S)}},g.findTrackId=function(n){for(var o=this.tracksInGroup,t=0;t<o.length;t++){var S=o[t];if((!this.selectDefaultTrack||S.default)&&(!n||n===S.name))return S.id}return-1},g.onError=function(n,o){if(c.prototype.onError.call(this,n,o),o.fatal||!o.context)return;o.context.type===w.PlaylistContextType.SUBTITLE_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},g.loadPlaylist=function(n){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var t=o.id,S=o.groupId,x=o.url;if(n)try{x=n.addDirectives(x)}catch(s){this.warn("Could not construct new URL with HLS Delivery Directives: "+s)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADING,{url:x,id:t,groupId:S,deliveryDirectives:n||null})}},g.toggleTrackModes=function(n){var o=this,t=this.media,S=this.subtitleDisplay,x=this.trackId;if(!t)return;var s=p(t.textTracks),P=s.filter(function(v){return v.groupId===o.groupId});if(n===-1)[].slice.call(s).forEach(function(v){v.mode="disabled"});else{var O=P[x];O&&(O.mode="disabled")}var E=P[n];E&&(E.mode=S?"showing":"hidden")},g.setSubtitleTrack=function(n,o){var t,S=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(t=S[n])!==null&&t!==void 0&&t.details)||n<-1||n>=S.length)return;this.clearTimer();var x=S[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,x){var s=x.id,P=x.groupId,O=P===void 0?"":P,E=x.name,v=x.type,y=x.url;this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:s,groupId:O,name:E,type:v,url:y});var T=this.switchParams(x.url,o==null?void 0:o.details);this.loadPlaylist(T)}else this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:n})},g.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,o=p(this.media.textTracks),t=0;t<o.length;t++)if(o[t].mode==="hidden")n=t;else if(o[t].mode==="showing"){n=t;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},i(m,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,o)}}]),m}(h.default);function p(c){for(var m=[],g=0;g<c.length;g++){var b=c[g];b.kind==="subtitles"&&b.label&&m.push(c[g])}return m}f.default=_},"./src/controller/timeline-controller.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"TimelineController",function(){return p});var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),h=C("./src/utils/cea-608-parser.ts"),w=C("./src/utils/output-filter.ts"),d=C("./src/utils/webvtt-parser.ts"),i=C("./src/utils/texttrack-utils.ts"),l=C("./src/utils/imsc1-ttml-parser.ts"),a=C("./src/types/loader.ts"),_=C("./src/utils/logger.ts"),p=function(){function b(o){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),this.captionsProperties=void 0,this.hls=o,this.config=o.config,this.Cues=o.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new w.default(this,"textTrack1"),S=new w.default(this,"textTrack2"),x=new w.default(this,"textTrack3"),s=new w.default(this,"textTrack4");this.cea608Parser1=new h.default(1,t,S),this.cea608Parser2=new h.default(3,x,s)}o.on(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),o.on(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),o.on(u.Events.FRAG_LOADING,this.onFragLoading,this),o.on(u.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),o.on(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),o.on(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),o.on(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=b.prototype;return n.destroy=function(){var t=this.hls;t.off(u.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(u.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(u.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(u.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(u.Events.FRAG_LOADING,this.onFragLoading,this),t.off(u.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(u.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(u.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(u.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(u.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(u.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(t,S,x,s,P){for(var O=!1,E=P.length;E--;){var v=P[E],y=m(v[0],v[1],S,x);if(y>=0&&(v[0]=Math.min(v[0],S),v[1]=Math.max(v[1],x),O=!0,y/(x-S)>.5))return}if(O||P.push([S,x]),this.config.renderTextTracksNatively){var T=this.captionsTracks[t];this.Cues.newCue(T,S,x,s)}else{var M=this.Cues.newCue(null,S,x,s);this.hls.trigger(u.Events.CUES_PARSED,{type:"captions",cues:M,track:t})}},n.onInitPtsFound=function(t,S){var x=this,s=S.frag,P=S.id,O=S.initPTS,E=S.timescale,v=this.unparsedVttFrags;P==="main"&&(this.initPTS[s.cc]=O,this.timescale[s.cc]=E),v.length&&(this.unparsedVttFrags=[],v.forEach(function(y){x.onFragLoaded(u.Events.FRAG_LOADED,y)}))},n.getExistingTrack=function(t){var S=this.media;if(S)for(var x=0;x<S.textTracks.length;x++){var s=S.textTracks[x];if(s[t])return s}return null},n.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},n.createNativeTrack=function(t){if(this.captionsTracks[t])return;var S=this.captionsProperties,x=this.captionsTracks,s=this.media,P=S[t],O=P.label,E=P.languageCode,v=this.getExistingTrack(t);if(v)x[t]=v,Object(i.clearCurrentCues)(x[t]),Object(i.sendAddTrackEvent)(x[t],s);else{var y=this.createTextTrack("captions",O,E);y&&(y[t]=!0,x[t]=y)}},n.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var S=this.captionsProperties[t];if(!S)return;var x=S.label,s={_id:t,label:x,kind:"captions",default:S.media?!!S.media.default:!1,closedCaptions:S.media};this.nonNativeCaptionsTracks[t]=s,this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})},n.createTextTrack=function(t,S,x){var s=this.media;return s?s.addTextTrack(t,S,x):void 0},n.onMediaAttaching=function(t,S){this.media=S.media,this._cleanTracks()},n.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(S){Object(i.clearCurrentCues)(t[S]),delete t[S]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=g(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var t=this.media;if(!t)return;var S=t.textTracks;if(S)for(var x=0;x<S.length;x++)Object(i.clearCurrentCues)(S[x])},n.onSubtitleTracksUpdated=function(t,S){var x=this;this.textTracks=[];var s=S.subtitleTracks||[],P=s.some(function(y){return y.textCodec===l.IMSC1_CODEC});if(this.config.enableWebVTT||P&&this.config.enableIMSC1){var O=this.tracks&&s&&this.tracks.length===s.length;if(this.tracks=s||[],this.config.renderTextTracksNatively){var E=this.media?this.media.textTracks:[];this.tracks.forEach(function(y,T){var M;if(T<E.length){for(var N=null,I=0;I<E.length;I++)if(c(E[I],y)){N=E[I];break}N&&(M=N)}M?Object(i.clearCurrentCues)(M):(M=x.createTextTrack("subtitles",y.name,y.lang),M&&(M.mode="disabled")),M&&(M.groupId=y.groupId,x.textTracks.push(M))})}else if(!O&&this.tracks&&this.tracks.length){var v=this.tracks.map(function(y){return{label:y.name,kind:y.type.toLowerCase(),default:y.default,subtitleTrack:y}});this.hls.trigger(u.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:v})}}},n.onManifestLoaded=function(t,S){var x=this;this.config.enableCEA708Captions&&S.captions&&S.captions.forEach(function(s){var P=/(?:CC|SERVICE)([1-4])/.exec(s.instreamId);if(!P)return;var O="textTrack"+P[1],E=x.captionsProperties[O];if(!E)return;E.label=s.name,s.lang&&(E.languageCode=s.lang),E.media=s})},n.onFragLoading=function(t,S){var x=this.cea608Parser1,s=this.cea608Parser2,P=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(x&&s))return;if(S.frag.type===a.PlaylistLevelType.MAIN){var E,v,y=S.frag.sn,T=(E=S==null||((v=S.part)===null||v===void 0)?void 0:v.index)!=null?E:-1;y===P+1||y===P&&T===O+1||(x.reset(),s.reset()),this.lastSn=y,this.lastPartIndex=T}},n.onFragLoaded=function(t,S){var x=S.frag,s=S.payload,P=this.initPTS,O=this.unparsedVttFrags;if(x.type===a.PlaylistLevelType.SUBTITLE)if(s.byteLength){if(!Object(D.isFiniteNumber)(P[x.cc])){O.push(S),P.length&&this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:x,error:new Error("Missing initial subtitle PTS")});return}var E=x.decryptdata;if(E==null||E.key==null||E.method!=="AES-128"){var v=this.tracks[x.level],y=this.vttCCs;y[x.cc]||(y[x.cc]={start:x.start,prevCC:this.prevCC,new:!0},this.prevCC=x.cc),v&&v.textCodec===l.IMSC1_CODEC?this._parseIMSC1(x,s):this._parseVTTs(x,s,y)}}else this.hls.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:x,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(t,S){var x=this,s=this.hls;Object(l.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(P){x._appendCues(P,t.level),s.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(P){_.logger.log("Failed to parse IMSC1: "+P),s.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:P})})},n._parseVTTs=function(t,S,x){var s=this,P=this.hls;Object(d.parseWebVTT)(S,this.initPTS[t.cc],this.timescale[t.cc],x,t.cc,t.start,function(O){s._appendCues(O,t.level),P.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(O){s._fallbackToIMSC1(t,S),_.logger.log("Failed to parse VTT cue: "+O),P.trigger(u.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:O})})},n._fallbackToIMSC1=function(t,S){var x=this,s=this.tracks[t.level];s.textCodec||Object(l.parseIMSC1)(S,this.initPTS[t.cc],this.timescale[t.cc],function(){s.textCodec=l.IMSC1_CODEC,x._parseIMSC1(t,S)},function(){s.textCodec="wvtt"})},n._appendCues=function(t,S){var x=this.hls;if(this.config.renderTextTracksNatively){var s=this.textTracks[S];if(s.mode==="disabled")return;t.forEach(function(E){return Object(i.addCueToTrack)(s,E)})}else{var P=this.tracks[S],O=P.default?"default":"subtitles"+S;x.trigger(u.Events.CUES_PARSED,{type:"subtitles",cues:t,track:O})}},n.onFragDecrypted=function(t,S){var x=S.frag;if(x.type===a.PlaylistLevelType.SUBTITLE){if(!Object(D.isFiniteNumber)(this.initPTS[x.cc])){this.unparsedVttFrags.push(S);return}this.onFragLoaded(u.Events.FRAG_LOADED,S)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(t,S){var x=this.cea608Parser1,s=this.cea608Parser2;if(!this.enabled||!(x&&s))return;for(var P=0;P<S.samples.length;P++){var O=S.samples[P].bytes;if(O){var E=this.extractCea608Data(O);x.addData(S.samples[P].pts,E[0]),s.addData(S.samples[P].pts,E[1])}}},n.onBufferFlushing=function(t,S){var x=S.startOffset,s=S.endOffset,P=S.endOffsetSubtitles,O=S.type,E=this.media;if(!E||E.currentTime<s)return;if(!O||O==="video"){var v=this.captionsTracks;Object.keys(v).forEach(function(T){return Object(i.removeCuesInRange)(v[T],x,s)})}if(this.config.renderTextTracksNatively&&(x===0&&P!==void 0)){var y=this.textTracks;Object.keys(y).forEach(function(T){return Object(i.removeCuesInRange)(y[T],x,P)})}},n.extractCea608Data=function(t){for(var S=t[0]&31,x=2,s=[[],[]],P=0;P<S;P++){var O=t[x++],E=127&t[x++],v=127&t[x++],y=(4&O)!==0,T=3&O;if(E===0&&v===0)continue;y&&((T===0||T===1)&&(s[T].push(E),s[T].push(v)))}return s},b}();function c(b,n){return b&&b.label===n.name&&!(b.textTrack1||b.textTrack2)}function m(b,n,o,t){return Math.min(n,t)-Math.max(b,o)}function g(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(w,d){this.subtle=void 0,this.aesIV=void 0,this.subtle=w,this.aesIV=d}var h=u.prototype;return h.decrypt=function(d,i){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},i,d)},u}()},"./src/crypt/aes-decryptor.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"removePadding",function(){return u}),C.d(f,"default",function(){return h});var D=C("./src/utils/typed-array.ts");function u(w){var d=w.byteLength,i=d&&new DataView(w.buffer).getUint8(d-1);return i?Object(D.sliceUint8)(w,0,d-i):w}var h=function(){function w(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var d=w.prototype;return d.uint8ArrayToUint32Array_=function(l){for(var a=new DataView(l),_=new Uint32Array(4),p=0;p<4;p++)_[p]=a.getUint32(p*4);return _},d.initTable=function(){var l=this.sBox,a=this.invSBox,_=this.subMix,p=_[0],c=_[1],m=_[2],g=_[3],b=this.invSubMix,n=b[0],o=b[1],t=b[2],S=b[3],x=new Uint32Array(256),s=0,P=0,O=0;for(O=0;O<256;O++)O<128?x[O]=O<<1:x[O]=O<<1^283;for(O=0;O<256;O++){var E=P^P<<1^P<<2^P<<3^P<<4;E=E>>>8^E&255^99,l[s]=E,a[E]=s;var v=x[s],y=x[v],T=x[y],M=x[E]*257^E*16843008;p[s]=M<<24|M>>>8,c[s]=M<<16|M>>>16,m[s]=M<<8|M>>>24,g[s]=M,M=T*16843009^y*65537^v*257^s*16843008,n[E]=M<<24|M>>>8,o[E]=M<<16|M>>>16,t[E]=M<<8|M>>>24,S[E]=M,s?(s=v^x[x[x[T^v]]],P^=x[x[P]]):s=P=1}},d.expandKey=function(l){for(var a=this.uint8ArrayToUint32Array_(l),_=!0,p=0;p<a.length&&_;)_=a[p]===this.key[p],p++;if(_)return;this.key=a;var c=this.keySize=a.length;if(c!==4&&c!==6&&c!==8)throw new Error("Invalid aes key size="+c);var m=this.ksRows=(c+6+1)*4,g,b,n=this.keySchedule=new Uint32Array(m),o=this.invKeySchedule=new Uint32Array(m),t=this.sBox,S=this.rcon,x=this.invSubMix,s=x[0],P=x[1],O=x[2],E=x[3],v,y;for(g=0;g<m;g++){if(g<c){v=n[g]=a[g];continue}y=v,g%c===0?(y=y<<8|y>>>24,y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255],y^=S[g/c|0]<<24):c>6&&g%c===4&&(y=t[y>>>24]<<24|t[y>>>16&255]<<16|t[y>>>8&255]<<8|t[y&255]),n[g]=v=(n[g-c]^y)>>>0}for(b=0;b<m;b++)g=m-b,b&3?y=n[g]:y=n[g-4],b<4||g<=4?o[b]=y:o[b]=s[t[y>>>24]]^P[t[y>>>16&255]]^O[t[y>>>8&255]]^E[t[y&255]],o[b]=o[b]>>>0},d.networkToHostOrderSwap=function(l){return l<<24|(l&65280)<<8|(l&16711680)>>8|l>>>24},d.decrypt=function(l,a,_){for(var p=this.keySize+6,c=this.invKeySchedule,m=this.invSBox,g=this.invSubMix,b=g[0],n=g[1],o=g[2],t=g[3],S=this.uint8ArrayToUint32Array_(_),x=S[0],s=S[1],P=S[2],O=S[3],E=new Int32Array(l),v=new Int32Array(E.length),y,T,M,N,I,G,H,W,z,U,B,K,q,ae,se=this.networkToHostOrderSwap;a<E.length;){for(z=se(E[a]),U=se(E[a+1]),B=se(E[a+2]),K=se(E[a+3]),I=z^c[0],G=K^c[1],H=B^c[2],W=U^c[3],q=4,ae=1;ae<p;ae++)y=b[I>>>24]^n[G>>16&255]^o[H>>8&255]^t[W&255]^c[q],T=b[G>>>24]^n[H>>16&255]^o[W>>8&255]^t[I&255]^c[q+1],M=b[H>>>24]^n[W>>16&255]^o[I>>8&255]^t[G&255]^c[q+2],N=b[W>>>24]^n[I>>16&255]^o[G>>8&255]^t[H&255]^c[q+3],I=y,G=T,H=M,W=N,q=q+4;y=m[I>>>24]<<24^m[G>>16&255]<<16^m[H>>8&255]<<8^m[W&255]^c[q],T=m[G>>>24]<<24^m[H>>16&255]<<16^m[W>>8&255]<<8^m[I&255]^c[q+1],M=m[H>>>24]<<24^m[W>>16&255]<<16^m[I>>8&255]<<8^m[G&255]^c[q+2],N=m[W>>>24]<<24^m[I>>16&255]<<16^m[G>>8&255]<<8^m[H&255]^c[q+3],v[a]=se(y^x),v[a+1]=se(N^s),v[a+2]=se(M^P),v[a+3]=se(T^O),x=z,s=U,P=B,O=K,a=a+4}return v.buffer},w}()},"./src/crypt/decrypter.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return a});var D=C("./src/crypt/aes-crypto.ts"),u=C("./src/crypt/fast-aes-key.ts"),h=C("./src/crypt/aes-decryptor.ts"),w=C("./src/utils/logger.ts"),d=C("./src/utils/mp4-tools.ts"),i=C("./src/utils/typed-array.ts"),l=16,a=function(){function _(c,m,g){var b=g===void 0?{}:g,n=b.removePKCS7Padding,o=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=c,this.config=m,this.removePKCS7Padding=o,o)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(S){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var p=_.prototype;return p.destroy=function(){this.observer=null},p.isSync=function(){return this.config.enableSoftwareAES},p.flush=function(){var m=this.currentResult;if(!m){this.reset();return}var g=new Uint8Array(m);return this.reset(),this.removePKCS7Padding?Object(h.removePadding)(g):g},p.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},p.decrypt=function(m,g,b,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(m),g,b);var o=this.flush();o&&n(o.buffer)}else this.webCryptoDecrypt(new Uint8Array(m),g,b).then(n)},p.softwareDecrypt=function(m,g,b){var n=this.currentIV,o=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(m=Object(d.appendUint8Array)(t,m),this.remainderData=null);var S=this.getValidChunk(m);if(!S.length)return null;n&&(b=n);var x=this.softwareDecrypter;x||(x=this.softwareDecrypter=new h.default),x.expandKey(g);var s=o;return this.currentResult=x.decrypt(S.buffer,0,b),this.currentIV=Object(i.sliceUint8)(S,-16).buffer,s||null},p.webCryptoDecrypt=function(m,g,b){var n=this,o=this.subtle;return(this.key!==g||!this.fastAesKey)&&(this.key=g,this.fastAesKey=new u.default(o,g)),this.fastAesKey.expandKey().then(function(t){if(!o)return Promise.reject(new Error("web crypto not initialized"));var S=new D.default(o,b);return S.decrypt(m.buffer,t)}).catch(function(t){return n.onWebCryptoError(t,m,g,b)})},p.onWebCryptoError=function(m,g,b,n){return w.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",m),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(g,b,n)},p.getValidChunk=function(m){var g=m,b=m.length-m.length%l;return b!==m.length&&(g=Object(i.sliceUint8)(m,0,b),this.remainderData=Object(i.sliceUint8)(m,b)),g},p.logOnce=function(m){if(!this.logEnabled)return;w.logger.log("[decrypter.ts]: "+m),this.logEnabled=!1},_}()},"./src/crypt/fast-aes-key.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(w,d){this.subtle=void 0,this.key=void 0,this.subtle=w,this.key=d}var h=u.prototype;return h.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},u}()},"./src/demux/aacdemuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/demux/base-audio-demuxer.ts"),u=C("./src/demux/adts.ts"),h=C("./src/utils/logger.ts"),w=C("./src/demux/id3.ts");function d(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,i(a,_)}function i(a,_){return i=Object.setPrototypeOf||function(c,m){return c.__proto__=m,c},i(a,_)}var l=function(a){d(_,a);function _(c,m){var g;return g=a.call(this)||this,g.observer=void 0,g.config=void 0,g.observer=c,g.config=m,g}var p=_.prototype;return p.resetInitSegment=function(m,g,b){a.prototype.resetInitSegment.call(this,m,g,b),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:m,duration:b,inputTimeScale:9e4,dropped:0}},_.probe=function(m){if(!m)return!1;for(var g=w.getID3Data(m,0)||[],b=g.length,n=m.length;b<n;b++)if(u.probe(m,b))return h.logger.log("ADTS sync word found !"),!0;return!1},p.canParse=function(m,g){return u.canParse(m,g)},p.appendFrame=function(m,g,b){u.initTrackConfig(m,this.observer,g,b,m.manifestCodec);var n=u.appendFrame(m,g,b,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},_}(D.default);l.minProbeByteLength=9,f.default=l},"./src/demux/adts.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"getAudioConfig",function(){return w}),C.d(f,"isHeaderPattern",function(){return d}),C.d(f,"getHeaderLength",function(){return i}),C.d(f,"getFullFrameLength",function(){return l}),C.d(f,"canGetFrameLength",function(){return a}),C.d(f,"isHeader",function(){return _}),C.d(f,"canParse",function(){return p}),C.d(f,"probe",function(){return c}),C.d(f,"initTrackConfig",function(){return m}),C.d(f,"getFrameDuration",function(){return g}),C.d(f,"parseFrameHeader",function(){return b}),C.d(f,"appendFrame",function(){return n});var D=C("./src/utils/logger.ts"),u=C("./src/errors.ts"),h=C("./src/events.ts");function w(o,t,S,x){var s,P,O,E,v=navigator.userAgent.toLowerCase(),y=x,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((t[S+2]&192)>>>6)+1;var M=(t[S+2]&60)>>>2;if(M>T.length-1){o.trigger(h.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+M});return}return O=(t[S+2]&1)<<2,O|=(t[S+3]&192)>>>6,D.logger.log("manifest codec:"+x+", ADTS type:"+s+", samplingIndex:"+M),/firefox/i.test(v)?M>=6?(s=5,E=new Array(4),P=M-3):(s=2,E=new Array(2),P=M):v.indexOf("android")!==-1?(s=2,E=new Array(2),P=M):(s=5,E=new Array(4),x&&(x.indexOf("mp4a.40.29")!==-1||x.indexOf("mp4a.40.5")!==-1)||!x&&M>=6?P=M-3:((x&&x.indexOf("mp4a.40.2")!==-1&&(M>=6&&O===1||/vivaldi/i.test(v))||!x&&O===1)&&(s=2,E=new Array(2)),P=M)),E[0]=s<<3,E[0]|=(M&14)>>1,E[1]|=(M&1)<<7,E[1]|=O<<3,s===5&&(E[1]|=(P&14)>>1,E[2]=(P&1)<<7,E[2]|=2<<2,E[3]=0),{config:E,samplerate:T[M],channelCount:O,codec:"mp4a.40."+s,manifestCodec:y}}function d(o,t){return o[t]===255&&(o[t+1]&246)===240}function i(o,t){return o[t+1]&1?7:9}function l(o,t){return(o[t+3]&3)<<11|o[t+4]<<3|(o[t+5]&224)>>>5}function a(o,t){return t+5<o.length}function _(o,t){return t+1<o.length&&d(o,t)}function p(o,t){return a(o,t)&&d(o,t)&&l(o,t)<=o.length-t}function c(o,t){if(_(o,t)){var S=i(o,t);if(t+S>=o.length)return!1;var x=l(o,t);if(x<=S)return!1;var s=t+x;return s===o.length||_(o,s)}return!1}function m(o,t,S,x,s){if(!o.samplerate){var P=w(t,S,x,s);if(!P)return;o.config=P.config,o.samplerate=P.samplerate,o.channelCount=P.channelCount,o.codec=P.codec,o.manifestCodec=P.manifestCodec,D.logger.log("parsed codec:"+o.codec+", rate:"+P.samplerate+", channels:"+P.channelCount)}}function g(o){return 1024*9e4/o}function b(o,t,S,x,s){var P=i(o,t),O=l(o,t);if(O-=P,O>0){var E=S+x*s;return{headerLength:P,frameLength:O,stamp:E}}}function n(o,t,S,x,s){var P=g(o.samplerate),O=b(t,S,x,s,P);if(O){var E=O.frameLength,v=O.headerLength,y=O.stamp,T=v+E,M=Math.max(0,S+T-t.length),N;M?(N=new Uint8Array(T-v),N.set(t.subarray(S+v,t.length),0)):N=t.subarray(S+v,S+T);var I={unit:N,pts:y};return M||o.samples.push(I),{sample:I,length:T,missing:M}}}},"./src/demux/base-audio-demuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"initPTSFn",function(){return l});var D=C("./src/polyfills/number.ts"),u=C("./src/demux/id3.ts"),h=C("./src/demux/dummy-demuxed-track.ts"),w=C("./src/utils/mp4-tools.ts"),d=C("./src/utils/typed-array.ts"),i=function(){function a(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var _=a.prototype;return _.resetInitSegment=function(c,m,g){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},_.resetTimeStamp=function(){},_.resetContiguity=function(){},_.canParse=function(c,m){return!1},_.appendFrame=function(c,m,g){},_.demux=function(c,m){this.cachedData&&(c=Object(w.appendUint8Array)(this.cachedData,c),this.cachedData=null);var g=u.getID3Data(c,0),b=g?g.length:0,n,o,t=this._audioTrack,S=this._id3Track,x=g?u.getTimeStamp(g):void 0,s=c.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=l(x,m)),g&&g.length>0&&S.samples.push({pts:this.initPTS,dts:this.initPTS,data:g}),o=this.initPTS;b<s;){if(this.canParse(c,b)){var P=this.appendFrame(t,c,b);P?(this.frameIndex++,o=P.sample.pts,b+=P.length,n=b):b=s}else u.canParse(c,b)?(g=u.getID3Data(c,b),S.samples.push({pts:o,dts:o,data:g}),b+=g.length,n=b):b++;if(b===s&&n!==s){var O=Object(d.sliceUint8)(c,n);this.cachedData?this.cachedData=Object(w.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:t,avcTrack:Object(h.dummyTrack)(),id3Track:S,textTrack:Object(h.dummyTrack)()}},_.demuxSampleAes=function(c,m,g){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},_.flush=function(c){var m=this.cachedData;return m&&(this.cachedData=null,this.demux(m,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(h.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(h.dummyTrack)()}},_.destroy=function(){},a}(),l=function(_,p){return Object(D.isFiniteNumber)(_)?_*90:p*9e4};f.default=i},"./src/demux/chunk-cache.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function h(){this.chunks=[],this.dataLength=0}var w=h.prototype;return w.push=function(i){this.chunks.push(i),this.dataLength+=i.length},w.flush=function(){var i=this.chunks,l=this.dataLength,a;if(i.length)i.length===1?a=i[0]:a=u(i,l);else return new Uint8Array(0);return this.reset(),a},w.reset=function(){this.chunks.length=0,this.dataLength=0},h}();function u(h,w){for(var d=new Uint8Array(w),i=0,l=0;l<h.length;l++){var a=h[l];d.set(a,i),i+=a.length}return d}},"./src/demux/dummy-demuxed-track.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"dummyTrack",function(){return D});function D(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/logger.ts"),u=function(){function h(d){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=d,this.bytesAvailable=d.byteLength,this.word=0,this.bitsAvailable=0}var w=h.prototype;return w.loadWord=function(){var i=this.data,l=this.bytesAvailable,a=i.byteLength-l,_=new Uint8Array(4),p=Math.min(4,l);if(p===0)throw new Error("no bytes available");_.set(i.subarray(a,a+p)),this.word=new DataView(_.buffer).getUint32(0),this.bitsAvailable=p*8,this.bytesAvailable-=p},w.skipBits=function(i){var l;this.bitsAvailable>i?(this.word<<=i,this.bitsAvailable-=i):(i-=this.bitsAvailable,l=i>>3,i-=l>>3,this.bytesAvailable-=l,this.loadWord(),this.word<<=i,this.bitsAvailable-=i)},w.readBits=function(i){var l=Math.min(this.bitsAvailable,i),a=this.word>>>32-l;return i>32&&D.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=l,this.bitsAvailable>0?this.word<<=l:this.bytesAvailable>0&&this.loadWord(),l=i-l,l>0&&this.bitsAvailable?a<<l|this.readBits(l):a},w.skipLZ=function(){var i;for(i=0;i<this.bitsAvailable;++i)if((this.word&2147483648>>>i)!==0)return this.word<<=i,this.bitsAvailable-=i,i;return this.loadWord(),i+this.skipLZ()},w.skipUEG=function(){this.skipBits(1+this.skipLZ())},w.skipEG=function(){this.skipBits(1+this.skipLZ())},w.readUEG=function(){var i=this.skipLZ();return this.readBits(i+1)-1},w.readEG=function(){var i=this.readUEG();return 1&i?1+i>>>1:-1*(i>>>1)},w.readBoolean=function(){return this.readBits(1)===1},w.readUByte=function(){return this.readBits(8)},w.readUShort=function(){return this.readBits(16)},w.readUInt=function(){return this.readBits(32)},w.skipScalingList=function(i){for(var l=8,a=8,_,p=0;p<i;p++)a!==0&&(_=this.readEG(),a=(l+_+256)%256),l=a===0?l:a},w.readSPS=function(){var i=0,l=0,a=0,_=0,p,c,m,g=this.readUByte.bind(this),b=this.readBits.bind(this),n=this.readUEG.bind(this),o=this.readBoolean.bind(this),t=this.skipBits.bind(this),S=this.skipEG.bind(this),x=this.skipUEG.bind(this),s=this.skipScalingList.bind(this);g();var P=g();if(b(5),t(3),g(),x(),P===100||P===110||P===122||P===244||P===44||P===83||P===86||P===118||P===128){var O=n();if(O===3&&t(1),x(),x(),t(1),o())for(c=O!==3?8:12,m=0;m<c;m++)o()&&(m<6?s(16):s(64))}x();var E=n();if(E===0)n();else if(E===1)for(t(1),S(),S(),p=n(),m=0;m<p;m++)S();x(),t(1);var v=n(),y=n(),T=b(1);T===0&&t(1),t(1),o()&&(i=n(),l=n(),a=n(),_=n());var M=[1,1];if(o()&&o()){var N=g();switch(N){case 1:M=[1,1];break;case 2:M=[12,11];break;case 3:M=[10,11];break;case 4:M=[16,11];break;case 5:M=[40,33];break;case 6:M=[24,11];break;case 7:M=[20,11];break;case 8:M=[32,11];break;case 9:M=[80,33];break;case 10:M=[18,11];break;case 11:M=[15,11];break;case 12:M=[64,33];break;case 13:M=[160,99];break;case 14:M=[4,3];break;case 15:M=[3,2];break;case 16:M=[2,1];break;case 255:{M=[g()<<8|g(),g()<<8|g()];break}}}return{width:Math.ceil((v+1)*16-i*2-l*2),height:(2-T)*(y+1)*16-(T?2:4)*(a+_),pixelRatio:M}},w.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},h}();f.default=u},"./src/demux/id3.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isHeader",function(){return D}),C.d(f,"isFooter",function(){return u}),C.d(f,"getID3Data",function(){return h}),C.d(f,"canParse",function(){return d}),C.d(f,"getTimeStamp",function(){return i}),C.d(f,"isTimeStampFrame",function(){return l}),C.d(f,"getID3Frames",function(){return _}),C.d(f,"decodeFrame",function(){return p}),C.d(f,"utf8ArrayToStr",function(){return n}),C.d(f,"testables",function(){return o});var D=function(s,P){return P+10<=s.length&&(s[P]===73&&s[P+1]===68&&s[P+2]===51&&(s[P+3]<255&&s[P+4]<255&&(s[P+6]<128&&s[P+7]<128&&s[P+8]<128&&s[P+9]<128)))},u=function(s,P){return P+10<=s.length&&(s[P]===51&&s[P+1]===68&&s[P+2]===73&&(s[P+3]<255&&s[P+4]<255&&(s[P+6]<128&&s[P+7]<128&&s[P+8]<128&&s[P+9]<128)))},h=function(s,P){for(var O=P,E=0;D(s,P);){E+=10;var v=w(s,P+6);E+=v,u(s,P+10)&&(E+=10),P+=E}return E>0?s.subarray(O,O+E):void 0},w=function(s,P){var O=0;return O=(s[P]&127)<<21,O|=(s[P+1]&127)<<14,O|=(s[P+2]&127)<<7,O|=s[P+3]&127,O},d=function(s,P){return D(s,P)&&w(s,P+6)+10<=s.length-P},i=function(s){for(var P=_(s),O=0;O<P.length;O++){var E=P[O];if(l(E))return b(E)}return},l=function(s){return s&&s.key==="PRIV"&&s.info==="com.apple.streaming.transportStreamTimestamp"},a=function(s){var P=String.fromCharCode(s[0],s[1],s[2],s[3]),O=w(s,4),E=10;return{type:P,size:O,data:s.subarray(E,E+O)}},_=function(s){for(var P=0,O=[];D(s,P);){var E=w(s,P+6);P+=10;for(var v=P+E;P+8<v;){var y=a(s.subarray(P)),T=p(y);T&&O.push(T),P+=y.size+10}u(s,P)&&(P+=10)}return O},p=function(s){return s.type==="PRIV"?c(s):s.type[0]==="W"?g(s):m(s)},c=function(s){if(s.size<2)return;var P=n(s.data,!0),O=new Uint8Array(s.data.subarray(P.length+1));return{key:s.type,info:P,data:O.buffer}},m=function(s){if(s.size<2)return;if(s.type==="TXXX"){var P=1,O=n(s.data.subarray(P),!0);P+=O.length+1;var E=n(s.data.subarray(P));return{key:s.type,info:O,data:E}}var v=n(s.data.subarray(1));return{key:s.type,data:v}},g=function(s){if(s.type==="WXXX"){if(s.size<2)return;var P=1,O=n(s.data.subarray(P),!0);P+=O.length+1;var E=n(s.data.subarray(P));return{key:s.type,info:O,data:E}}var v=n(s.data);return{key:s.type,data:v}},b=function(s){if(s.data.byteLength===8){var P=new Uint8Array(s.data),O=P[3]&1,E=(P[4]<<23)+(P[5]<<15)+(P[6]<<7)+P[7];return E/=45,O&&(E+=4772185884e-2),Math.round(E)}return},n=function(s,P){P===void 0&&(P=!1);var O=S();if(O){var E=O.decode(s);if(P){var v=E.indexOf("\0");return v!==-1?E.substring(0,v):E}return E.replace(/\0/g,"")}for(var y=s.length,T,M,N,I="",G=0;G<y;){if(T=s[G++],T===0&&P)return I;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:I+=String.fromCharCode(T);break;case 12:case 13:M=s[G++],I+=String.fromCharCode((T&31)<<6|M&63);break;case 14:M=s[G++],N=s[G++],I+=String.fromCharCode((T&15)<<12|(M&63)<<6|(N&63)<<0);break;default:}}return I},o={decodeTextFrame:m},t;function S(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/demux/base-audio-demuxer.ts"),u=C("./src/demux/id3.ts"),h=C("./src/utils/logger.ts"),w=C("./src/demux/mpegaudio.ts");function d(a,_){a.prototype=Object.create(_.prototype),a.prototype.constructor=a,i(a,_)}function i(a,_){return i=Object.setPrototypeOf||function(c,m){return c.__proto__=m,c},i(a,_)}var l=function(a){d(_,a);function _(){return a.apply(this,arguments)||this}var p=_.prototype;return p.resetInitSegment=function(m,g,b){a.prototype.resetInitSegment.call(this,m,g,b),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:m,duration:b,inputTimeScale:9e4,dropped:0}},_.probe=function(m){if(!m)return!1;for(var g=u.getID3Data(m,0)||[],b=g.length,n=m.length;b<n;b++)if(w.probe(m,b))return h.logger.log("MPEG Audio sync word found !"),!0;return!1},p.canParse=function(m,g){return w.canParse(m,g)},p.appendFrame=function(m,g,b){return this.initPTS===null?void 0:w.appendFrame(m,g,b,this.initPTS,this.frameIndex)},_}(D.default);l.minProbeByteLength=4,f.default=l},"./src/demux/mp4demuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/mp4-tools.ts"),u=C("./src/demux/dummy-demuxed-track.ts"),h=function(){function w(i,l){this.remainderData=null,this.config=void 0,this.config=l}var d=w.prototype;return d.resetTimeStamp=function(){},d.resetInitSegment=function(){},d.resetContiguity=function(){},w.probe=function(l){return Object(D.findBox)({data:l,start:0,end:Math.min(l.length,16384)},["moof"]).length>0},d.demux=function(l){var a=l,_=Object(u.dummyTrack)();if(this.config.progressive){this.remainderData&&(a=Object(D.appendUint8Array)(this.remainderData,l));var p=Object(D.segmentValidRange)(a);this.remainderData=p.remainder,_.samples=p.valid||new Uint8Array}else _.samples=a;return{audioTrack:Object(u.dummyTrack)(),avcTrack:_,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},d.flush=function(){var l=Object(u.dummyTrack)();return l.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(u.dummyTrack)(),avcTrack:l,id3Track:Object(u.dummyTrack)(),textTrack:Object(u.dummyTrack)()}},d.demuxSampleAes=function(l,a,_){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},d.destroy=function(){},w}();h.minProbeByteLength=1024,f.default=h},"./src/demux/mpegaudio.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"appendFrame",function(){return i}),C.d(f,"parseHeader",function(){return l}),C.d(f,"isHeaderPattern",function(){return a}),C.d(f,"isHeader",function(){return _}),C.d(f,"canParse",function(){return p}),C.d(f,"probe",function(){return c});var D=null,u=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],h=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],w=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d=[0,1,1,4];function i(m,g,b,n,o){if(b+24>g.length)return;var t=l(g,b);if(t&&b+t.frameLength<=g.length){var S=t.samplesPerFrame*9e4/t.sampleRate,x=n+o*S,s={unit:g.subarray(b,b+t.frameLength),pts:x,dts:x};return m.config=[],m.channelCount=t.channelCount,m.samplerate=t.sampleRate,m.samples.push(s),{sample:s,length:t.frameLength,missing:0}}}function l(m,g){var b=m[g+1]>>3&3,n=m[g+1]>>1&3,o=m[g+2]>>4&15,t=m[g+2]>>2&3;if(b!==1&&o!==0&&o!==15&&t!==3){var S=m[g+2]>>1&1,x=m[g+3]>>6,s=b===3?3-n:n===3?3:4,P=u[s*14+o-1]*1e3,O=b===3?0:b===2?1:2,E=h[O*3+t],v=x===3?1:2,y=w[b][n],T=d[n],M=y*8*T,N=Math.floor(y*P/E+S)*T;if(D===null){var I=navigator.userAgent||"",G=I.match(/Chrome\/(\d+)/i);D=G?parseInt(G[1]):0}var H=!!D&&D<=87;return H&&n===2&&P>=224e3&&x===0&&(m[g+3]=m[g+3]|128),{sampleRate:E,channelCount:v,frameLength:N,samplesPerFrame:M}}}function a(m,g){return m[g]===255&&(m[g+1]&224)===224&&(m[g+1]&6)!==0}function _(m,g){return g+1<m.length&&a(m,g)}function p(m,g){var b=4;return a(m,g)&&b<=m.length-g}function c(m,g){if(g+1<m.length&&a(m,g)){var b=4,n=l(m,g),o=b;n!=null&&n.frameLength&&(o=n.frameLength);var t=g+o;return t===m.length||_(m,t)}return!1}},"./src/demux/sample-aes.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/crypt/decrypter.ts"),u=C("./src/demux/tsdemuxer.ts"),h=function(){function w(i,l,a){this.keyData=void 0,this.decrypter=void 0,this.keyData=a,this.decrypter=new D.default(i,l,{removePKCS7Padding:!1})}var d=w.prototype;return d.decryptBuffer=function(l,a){this.decrypter.decrypt(l,this.keyData.key.buffer,this.keyData.iv.buffer,a)},d.decryptAacSample=function(l,a,_,p){var c=l[a].unit,m=c.subarray(16,c.length-c.length%16),g=m.buffer.slice(m.byteOffset,m.byteOffset+m.length),b=this;this.decryptBuffer(g,function(n){var o=new Uint8Array(n);c.set(o,16),p||b.decryptAacSamples(l,a+1,_)})},d.decryptAacSamples=function(l,a,_){for(;;a++){if(a>=l.length){_();return}if(l[a].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(l,a,_,p),!p)return}},d.getAvcEncryptedData=function(l){for(var a=Math.floor((l.length-48)/160)*16+16,_=new Int8Array(a),p=0,c=32;c<=l.length-16;c+=160,p+=16)_.set(l.subarray(c,c+16),p);return _},d.getAvcDecryptedUnit=function(l,a){for(var _=new Uint8Array(a),p=0,c=32;c<=l.length-16;c+=160,p+=16)l.set(_.subarray(p,p+16),c);return l},d.decryptAvcSample=function(l,a,_,p,c,m){var g=Object(u.discardEPB)(c.data),b=this.getAvcEncryptedData(g),n=this;this.decryptBuffer(b.buffer,function(o){c.data=n.getAvcDecryptedUnit(g,o),m||n.decryptAvcSamples(l,a,_+1,p)})},d.decryptAvcSamples=function(l,a,_,p){if(l instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;a++,_=0){if(a>=l.length){p();return}for(var c=l[a].units;!(_>=c.length);_++){var m=c[_];if(m.data.length<=48||m.type!==1&&m.type!==5)continue;var g=this.decrypter.isSync();if(this.decryptAvcSample(l,a,_,p,m,g),!g)return}}},w}();f.default=h},"./src/demux/transmuxer-interface.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c});var D=C("./node_modules/webworkify-webpack/index.js"),u=C.n(D),h=C("./src/events.ts"),w=C("./src/demux/transmuxer.ts"),d=C("./src/utils/logger.ts"),i=C("./src/errors.ts"),l=C("./src/utils/mediasource-helper.ts"),a=C("./node_modules/eventemitter3/index.js"),_=C.n(a),p=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},c=function(){function m(b,n,o,t){var S=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=b,this.id=n,this.onTransmuxComplete=o,this.onFlush=t;var x=b.config,s=function(y,T){T=T||{},T.frag=S.frag,T.id=S.id,b.trigger(y,T)};this.observer=new a.EventEmitter,this.observer.on(h.Events.FRAG_DECRYPTED,s),this.observer.on(h.Events.ERROR,s);var P={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(x.enableWorker&&typeof Worker!="undefined"){d.logger.log("demuxing in webworker");var E;try{E=this.worker=D("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),E.addEventListener("message",this.onwmsg),E.onerror=function(v){b.trigger(h.Events.ERROR,{type:i.ErrorTypes.OTHER_ERROR,details:i.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(v.message+" ("+v.filename+":"+v.lineno+")")})},E.postMessage({cmd:"init",typeSupported:P,vendor:O,id:n,config:JSON.stringify(x)})}catch(v){d.logger.warn("Error in worker:",v),d.logger.error("Error while initializing DemuxerWorker, fallback to inline"),E&&self.URL.revokeObjectURL(E.objectURL),this.transmuxer=new w.default(this.observer,P,x,O,n),this.worker=null}}else this.transmuxer=new w.default(this.observer,P,x,O,n)}var g=m.prototype;return g.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},g.push=function(n,o,t,S,x,s,P,O,E,v){var y=this;E.transmuxing.start=self.performance.now();var T=this.transmuxer,M=this.worker,N=s?s.start:x.start,I=x.decryptdata,G=this.frag,H=!(G&&x.cc===G.cc),W=!(G&&E.level===G.level),z=G?E.sn-G.sn:-1,U=this.part?E.part-this.part.index:1,B=!W&&(z===1||z===0&&U===1),K=self.performance.now();(W||z||x.stats.parsing.start===0)&&(x.stats.parsing.start=K),s&&(U||!B)&&(s.stats.parsing.start=K);var q=new w.TransmuxState(H,B,O,W,N);if(!B||H){d.logger.log("[transmuxer-interface, "+x.type+"]: Starting new transmux session for sn: "+E.sn+" p: "+E.part+" level: "+E.level+" id: "+E.id+`
discontinuity: `+H+`
trackSwitch: `+W+`
contiguous: `+B+`
accurateTimeOffset: `+O+`
timeOffset: `+N);var ae=new w.TransmuxConfig(t,S,o,P,v);this.configureTransmuxer(ae)}if(this.frag=x,this.part=s,M)M.postMessage({cmd:"demux",data:n,decryptdata:I,chunkMeta:E,state:q},n instanceof ArrayBuffer?[n]:[]);else if(T){var se=T.push(n,I,E,q);Object(w.isPromise)(se)?se.then(function(we){y.handleTransmuxComplete(we)}):this.handleTransmuxComplete(se)}},g.flush=function(n){var o=this;n.transmuxing.start=self.performance.now();var t=this.transmuxer,S=this.worker;if(S)S.postMessage({cmd:"flush",chunkMeta:n});else if(t){var x=t.flush(n);Object(w.isPromise)(x)?x.then(function(s){o.handleFlushResult(s,n)}):this.handleFlushResult(x,n)}},g.handleFlushResult=function(n,o){var t=this;n.forEach(function(S){t.handleTransmuxComplete(S)}),this.onFlush(o)},g.onWorkerMessage=function(n){var o=n.data,t=this.hls;switch(o.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,t.trigger(o.event,o.data);break}}},g.configureTransmuxer=function(n){var o=this.worker,t=this.transmuxer;o?o.postMessage({cmd:"configure",config:n}):t&&t.configure(n)},g.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},m}()},"./src/demux/transmuxer-worker.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return i});var D=C("./src/demux/transmuxer.ts"),u=C("./src/events.ts"),h=C("./src/utils/logger.ts"),w=C("./node_modules/eventemitter3/index.js"),d=C.n(w);function i(c){var m=new w.EventEmitter,g=function(n,o){c.postMessage({event:n,data:o})};m.on(u.Events.FRAG_DECRYPTED,g),m.on(u.Events.ERROR,g),c.addEventListener("message",function(b){var n=b.data;switch(n.cmd){case"init":{var o=JSON.parse(n.config);c.transmuxer=new D.default(m,n.typeSupported,o,n.vendor,n.id),Object(h.enableLogs)(o.debug),g("init",null);break}case"configure":{c.transmuxer.configure(n.config);break}case"demux":{var t=c.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(D.isPromise)(t)?t.then(function(s){l(c,s)}):l(c,t);break}case"flush":{var S=n.chunkMeta,x=c.transmuxer.flush(S);Object(D.isPromise)(x)?x.then(function(s){_(c,s,S)}):_(c,x,S);break}default:break}})}function l(c,m){if(p(m.remuxResult))return;var g=[],b=m.remuxResult,n=b.audio,o=b.video;n&&a(g,n),o&&a(g,o),c.postMessage({event:"transmuxComplete",data:m},g)}function a(c,m){m.data1&&c.push(m.data1.buffer),m.data2&&c.push(m.data2.buffer)}function _(c,m,g){m.forEach(function(b){l(c,b)}),c.postMessage({event:"flush",data:g})}function p(c){return!c.audio&&!c.video&&!c.text&&!c.id3&&!c.initSegment}},"./src/demux/transmuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return o}),C.d(f,"isPromise",function(){return x}),C.d(f,"TransmuxConfig",function(){return s}),C.d(f,"TransmuxState",function(){return P});var D=C("./src/events.ts"),u=C("./src/errors.ts"),h=C("./src/crypt/decrypter.ts"),w=C("./src/demux/aacdemuxer.ts"),d=C("./src/demux/mp4demuxer.ts"),i=C("./src/demux/tsdemuxer.ts"),l=C("./src/demux/mp3demuxer.ts"),a=C("./src/remux/mp4-remuxer.ts"),_=C("./src/remux/passthrough-remuxer.ts"),p=C("./src/demux/chunk-cache.ts"),c=C("./src/utils/mp4-tools.ts"),m=C("./src/utils/logger.ts"),g;try{g=self.performance.now.bind(self.performance)}catch(O){m.logger.debug("Unable to use Performance API on this environment"),g=self.Date.now}var b=[{demux:i.default,remux:a.default},{demux:d.default,remux:_.default},{demux:w.default,remux:a.default},{demux:l.default,remux:a.default}],n=1024;b.forEach(function(O){var E=O.demux;n=Math.max(n,E.minProbeByteLength)});var o=function(){function O(v,y,T,M,N){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new p.default,this.observer=v,this.typeSupported=y,this.config=T,this.vendor=M,this.id=N}var E=O.prototype;return E.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},E.push=function(y,T,M,N){var I=this,G=M.transmuxing;G.executeStart=g();var H=new Uint8Array(y),W=this.cache,z=this.config,U=this.currentTransmuxState,B=this.transmuxConfig;N&&(this.currentTransmuxState=N);var K=t(H,T);if(K&&K.method==="AES-128"){var q=this.getDecrypter();if(z.enableSoftwareAES){var ae=q.softwareDecrypt(H,K.key.buffer,K.iv.buffer);if(!ae)return G.executeEnd=g(),S(M);H=new Uint8Array(ae)}else return this.decryptionPromise=q.webCryptoDecrypt(H,K.key.buffer,K.iv.buffer).then(function($){var X=I.push($,null,M);return I.decryptionPromise=null,X}),this.decryptionPromise}var se=N||U,we=se.contiguous,Te=se.discontinuity,de=se.trackSwitch,xe=se.accurateTimeOffset,pe=se.timeOffset,ne=B.audioCodec,ie=B.videoCodec,ee=B.defaultInitPts,le=B.duration,Q=B.initSegmentData;if((Te||de)&&this.resetInitSegment(Q,ne,ie,le),Te&&this.resetInitialTimestamp(ee),we||this.resetContiguity(),this.needsProbing(H,Te,de)){if(W.dataLength){var Z=W.flush();H=Object(c.appendUint8Array)(Z,H)}this.configureTransmuxer(H,B)}var be=this.transmux(H,K,pe,xe,M),te=this.currentTransmuxState;return te.contiguous=!0,te.discontinuity=!1,te.trackSwitch=!1,G.executeEnd=g(),be},E.flush=function(y){var T=this,M=y.transmuxing;M.executeStart=g();var N=this.decrypter,I=this.cache,G=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return T.flush(y)});var W=[],z=G.timeOffset;if(N){var U=N.flush();U&&W.push(this.push(U,null,y))}var B=I.dataLength;I.reset();var K=this.demuxer,q=this.remuxer;if(!K||!q)return B>=n&&this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:u.ErrorTypes.MEDIA_ERROR,details:u.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),M.executeEnd=g(),[S(y)];var ae=K.flush(z);return x(ae)?ae.then(function(se){return T.flushRemux(W,se,y),W}):(this.flushRemux(W,ae,y),W)},E.flushRemux=function(y,T,M){var N=T.audioTrack,I=T.avcTrack,G=T.id3Track,H=T.textTrack,W=this.currentTransmuxState,z=W.accurateTimeOffset,U=W.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+M.sn+(M.part>-1?" p: "+M.part:"")+" of level "+M.level);var B=this.remuxer.remux(N,I,G,H,U,z,!0,this.id);y.push({remuxResult:B,chunkMeta:M}),M.transmuxing.executeEnd=g()},E.resetInitialTimestamp=function(y){var T=this.demuxer,M=this.remuxer;if(!T||!M)return;T.resetTimeStamp(y),M.resetTimeStamp(y)},E.resetContiguity=function(){var y=this.demuxer,T=this.remuxer;if(!y||!T)return;y.resetContiguity(),T.resetNextTimestamp()},E.resetInitSegment=function(y,T,M,N){var I=this.demuxer,G=this.remuxer;if(!I||!G)return;I.resetInitSegment(T,M,N),G.resetInitSegment(y,T,M)},E.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},E.transmux=function(y,T,M,N,I){var G;return T&&T.method==="SAMPLE-AES"?G=this.transmuxSampleAes(y,T,M,N,I):G=this.transmuxUnencrypted(y,M,N,I),G},E.transmuxUnencrypted=function(y,T,M,N){var I=this.demuxer.demux(y,T,!1,!this.config.progressive),G=I.audioTrack,H=I.avcTrack,W=I.id3Track,z=I.textTrack,U=this.remuxer.remux(G,H,W,z,T,M,!1,this.id);return{remuxResult:U,chunkMeta:N}},E.transmuxSampleAes=function(y,T,M,N,I){var G=this;return this.demuxer.demuxSampleAes(y,T,M).then(function(H){var W=G.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,M,N,!1,G.id);return{remuxResult:W,chunkMeta:I}})},E.configureTransmuxer=function(y,T){for(var M=this.config,N=this.observer,I=this.typeSupported,G=this.vendor,H=T.audioCodec,W=T.defaultInitPts,z=T.duration,U=T.initSegmentData,B=T.videoCodec,K,q=0,ae=b.length;q<ae;q++)if(b[q].demux.probe(y)){K=b[q];break}K||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),K={demux:d.default,remux:_.default});var se=this.demuxer,we=this.remuxer,Te=K.remux,de=K.demux;(!we||!(we instanceof Te))&&(this.remuxer=new Te(N,M,I,G)),(!se||!(se instanceof de))&&(this.demuxer=new de(N,M,I),this.probe=de.probe),this.resetInitSegment(U,H,B,z),this.resetInitialTimestamp(W)},E.needsProbing=function(y,T,M){return!this.demuxer||!this.remuxer||T||M},E.getDecrypter=function(){var y=this.decrypter;return y||(y=this.decrypter=new h.default(this.observer,this.config)),y},O}();function t(O,E){var v=null;return O.byteLength>0&&E!=null&&E.key!=null&&E.iv!==null&&E.method!=null&&(v=E),v}var S=function(E){return{remuxResult:{},chunkMeta:E}};function x(O){return"then"in O&&O.then instanceof Function}var s=function(E,v,y,T,M){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=E,this.videoCodec=v,this.initSegmentData=y,this.duration=T,this.defaultInitPts=M},P=function(E,v,y,T,M){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=E,this.contiguous=v,this.accurateTimeOffset=y,this.trackSwitch=T,this.timeOffset=M}},"./src/demux/tsdemuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"discardEPB",function(){return S});var D=C("./src/demux/adts.ts"),u=C("./src/demux/mpegaudio.ts"),h=C("./src/demux/exp-golomb.ts"),w=C("./src/demux/id3.ts"),d=C("./src/demux/sample-aes.ts"),i=C("./src/events.ts"),l=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/logger.ts"),_=C("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},c=function(){function x(P,O,E){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=P,this.config=O,this.typeSupported=E}x.probe=function(O){var E=x.syncOffset(O);return E<0?!1:(E&&a.logger.warn("MPEG2-TS detected but first sync word found @ offset "+E+", junk ahead ?"),!0)},x.syncOffset=function(O){for(var E=Math.min(1e3,O.length-3*188),v=0;v<E;){if(O[v]===71&&O[v+188]===71&&O[v+2*188]===71)return v;v++}return-1},x.createTrack=function(O,E){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:p[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?E:void 0}};var s=x.prototype;return s.resetInitSegment=function(O,E,v){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=x.createTrack("video",v),this._audioTrack=x.createTrack("audio",v),this._id3Track=x.createTrack("id3",v),this._txtTrack=x.createTrack("text",v),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=E,this._duration=v},s.resetTimeStamp=function(){},s.resetContiguity=function(){var O=this._audioTrack,E=this._avcTrack,v=this._id3Track;O&&(O.pesData=null),E&&(E.pesData=null),v&&(v.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},s.demux=function(O,E,v,y){v===void 0&&(v=!1),y===void 0&&(y=!1),v||(this.sampleAes=null);var T,M=this._avcTrack,N=this._audioTrack,I=this._id3Track,G=M.pid,H=M.pesData,W=N.pid,z=I.pid,U=N.pesData,B=I.pesData,K=!1,q=this.pmtParsed,ae=this._pmtId,se=O.length;if(this.remainderData&&(O=Object(l.appendUint8Array)(this.remainderData,O),se=O.length,this.remainderData=null),se<188&&!y)return this.remainderData=O,{audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};var we=Math.max(0,x.syncOffset(O));se-=(se+we)%188,se<O.byteLength&&!y&&(this.remainderData=new Uint8Array(O.buffer,se,O.buffer.byteLength-se));for(var Te=we;Te<se;Te+=188)if(O[Te]===71){var de=!!(O[Te+1]&64),xe=((O[Te+1]&31)<<8)+O[Te+2],pe=(O[Te+3]&48)>>4,ne=void 0;if(pe>1){if(ne=Te+5+O[Te+4],ne===Te+188)continue}else ne=Te+4;switch(xe){case G:de&&(H&&(T=n(H))&&this.parseAVCPES(T,!1),H={data:[],size:0}),H&&(H.data.push(O.subarray(ne,Te+188)),H.size+=Te+188-ne);break;case W:de&&(U&&(T=n(U))&&(N.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(O.subarray(ne,Te+188)),U.size+=Te+188-ne);break;case z:de&&(B&&(T=n(B))&&this.parseID3PES(T),B={data:[],size:0}),B&&(B.data.push(O.subarray(ne,Te+188)),B.size+=Te+188-ne);break;case 0:de&&(ne+=O[ne]+1),ae=this._pmtId=g(O,ne);break;case ae:{de&&(ne+=O[ne]+1);var ie=b(O,ne,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,v);G=ie.avc,G>0&&(M.pid=G),W=ie.audio,W>0&&(N.pid=W,N.isAAC=ie.isAAC),z=ie.id3,z>0&&(I.pid=z),K&&!q&&(a.logger.log("reparse from beginning"),K=!1,Te=we-188),q=this.pmtParsed=!0;break}case 17:case 8191:break;default:K=!0;break}}else this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});M.pesData=H,N.pesData=U,I.pesData=B;var ee={audioTrack:N,avcTrack:M,id3Track:I,textTrack:this._txtTrack};return y&&this.extractRemainingSamples(ee),ee},s.flush=function(){var O=this.remainderData;this.remainderData=null;var E;return O?E=this.demux(O,-1,!1,!0):E={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(E),this.sampleAes?this.decrypt(E,this.sampleAes):E},s.extractRemainingSamples=function(O){var E=O.audioTrack,v=O.avcTrack,y=O.id3Track,T=v.pesData,M=E.pesData,N=y.pesData,I;T&&(I=n(T))?(this.parseAVCPES(I,!0),v.pesData=null):v.pesData=T,M&&(I=n(M))?(E.isAAC?this.parseAACPES(I):this.parseMPEGPES(I),E.pesData=null):(M!=null&&M.size&&a.logger.log("last AAC PES packet truncated,might overlap between fragments"),E.pesData=M),N&&(I=n(N))?(this.parseID3PES(I),y.pesData=null):y.pesData=N},s.demuxSampleAes=function(O,E,v){var y=this.demux(O,v,!0,!this.config.progressive),T=this.sampleAes=new d.default(this.observer,this.config,E);return this.decrypt(y,T)},s.decrypt=function(O,E){return new Promise(function(v){var y=O.audioTrack,T=O.avcTrack;y.samples&&y.isAAC?E.decryptAacSamples(y.samples,0,function(){T.samples?E.decryptAvcSamples(T.samples,0,0,function(){v(O)}):v(O)}):T.samples&&E.decryptAvcSamples(T.samples,0,0,function(){v(O)})})},s.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},s.parseAVCPES=function(O,E){var v=this,y=this._avcTrack,T=this.parseAVCNALu(O.data),M=!1,N=this.avcSample,I,G=!1;O.data=null,N&&T.length&&!y.audFound&&(o(N,y),N=this.avcSample=m(!1,O.pts,O.dts,"")),T.forEach(function(H){switch(H.type){case 1:{I=!0,N||(N=v.avcSample=m(!0,O.pts,O.dts,"")),M&&(N.debug+="NDR "),N.frame=!0;var W=H.data;if(G&&W.length>4){var z=new h.default(W).readSliceType();(z===2||z===4||z===7||z===9)&&(N.key=!0)}break}case 5:I=!0,N||(N=v.avcSample=m(!0,O.pts,O.dts,"")),M&&(N.debug+="IDR "),N.key=!0,N.frame=!0;break;case 6:{I=!0,M&&N&&(N.debug+="SEI ");var U=new h.default(S(H.data));U.readUByte();for(var B=0,K=0,q=!1,ae=0;!q&&U.bytesAvailable>1;){B=0;do ae=U.readUByte(),B+=ae;while(ae===255);K=0;do ae=U.readUByte(),K+=ae;while(ae===255);if(B===4&&U.bytesAvailable!==0){q=!0;var se=U.readUByte();if(se===181){var we=U.readUShort();if(we===49){var Te=U.readUInt();if(Te===1195456820){var de=U.readUByte();if(de===3){for(var xe=U.readUByte(),pe=U.readUByte(),ne=31&xe,ie=[xe,pe],ee=0;ee<ne;ee++)ie.push(U.readUByte()),ie.push(U.readUByte()),ie.push(U.readUByte());t(v._txtTrack.samples,{type:3,pts:O.pts,bytes:ie})}}}}}else if(B===5&&U.bytesAvailable!==0){if(q=!0,K>16){for(var le=[],Q=0;Q<16;Q++)le.push(U.readUByte().toString(16)),(Q===3||Q===5||Q===7||Q===9)&&le.push("-");for(var Z=K-16,be=new Uint8Array(Z),te=0;te<Z;te++)be[te]=U.readUByte();t(v._txtTrack.samples,{pts:O.pts,payloadType:B,uuid:le.join(""),userData:Object(w.utf8ArrayToStr)(be),userDataBytes:be})}}else if(K<U.bytesAvailable)for(var $=0;$<K;$++)U.readUByte()}break}case 7:if(I=!0,G=!0,M&&N&&(N.debug+="SPS "),!y.sps){var X=new h.default(H.data),Y=X.readSPS();y.width=Y.width,y.height=Y.height,y.pixelRatio=Y.pixelRatio,y.sps=[H.data],y.duration=v._duration;for(var ve=H.data.subarray(1,4),ue="avc1.",Ee=0;Ee<3;Ee++){var Ke=ve[Ee].toString(16);Ke.length<2&&(Ke="0"+Ke),ue+=Ke}y.codec=ue}break;case 8:I=!0,M&&N&&(N.debug+="PPS "),y.pps||(y.pps=[H.data]);break;case 9:I=!1,y.audFound=!0,N&&o(N,y),N=v.avcSample=m(!1,O.pts,O.dts,M?"AUD ":"");break;case 12:I=!1;break;default:I=!1,N&&(N.debug+="unknown NAL "+H.type+" ");break}if(N&&I){var Ye=N.units;Ye.push(H)}}),E&&N&&(o(N,y),this.avcSample=null)},s.getLastNalUnit=function(){var O,E=this.avcSample,v;if(!E||E.units.length===0){var y=this._avcTrack.samples;E=y[y.length-1]}if((O=E)!==null&&O!==void 0&&O.units){var T=E.units;v=T[T.length-1]}return v},s.parseAVCNALu=function(O){var E=O.byteLength,v=this._avcTrack,y=v.naluState||0,T=y,M=[],N=0,I,G,H,W=-1,z=0;for(y===-1&&(W=0,z=O[0]&31,y=0,N=1);N<E;){if(I=O[N++],!y){y=I?0:1;continue}if(y===1){y=I?0:2;continue}if(!I)y=3;else if(I===1){if(W>=0){var U={data:O.subarray(W,N-y-1),type:z};M.push(U)}else{var B=this.getLastNalUnit();if(B&&(T&&N<=4-T&&(B.state&&(B.data=B.data.subarray(0,B.data.byteLength-T))),G=N-y-1,G>0)){var K=new Uint8Array(B.data.byteLength+G);K.set(B.data,0),K.set(O.subarray(0,G),B.data.byteLength),B.data=K,B.state=0}}N<E?(H=O[N]&31,W=N,z=H,y=0):y=-1}else y=0}if(W>=0&&y>=0){var q={data:O.subarray(W,E),type:z,state:y};M.push(q)}if(M.length===0){var ae=this.getLastNalUnit();if(ae){var se=new Uint8Array(ae.data.byteLength+O.byteLength);se.set(ae.data,0),se.set(O,ae.data.byteLength),ae.data=se}}return v.naluState=y,M},s.parseAACPES=function(O){var E=0,v=this._audioTrack,y=this.aacOverFlow,T=O.data;if(y){this.aacOverFlow=null;var M=y.sample.unit.byteLength,N=Math.min(y.missing,M),I=M-N;y.sample.unit.set(T.subarray(0,N),I),v.samples.push(y.sample),E=y.missing}var G,H;for(G=E,H=T.length;G<H-1&&!D.isHeader(T,G);G++);if(G!==E){var W,z;if(G<H-1?(W="AAC PES did not start with ADTS header,offset:"+G,z=!1):(W="no ADTS header found in AAC PES",z=!0),a.logger.warn("parsing error:"+W),this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:W}),z)return}D.initTrackConfig(v,this.observer,T,G,this.audioCodec);var U;if(O.pts!==void 0)U=O.pts;else if(y){var B=D.getFrameDuration(v.samplerate);U=y.sample.pts+B}else{a.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var K=0;G<H;)if(D.isHeader(T,G)){if(G+5<H){var q=D.appendFrame(v,T,G,U,K);if(q)if(q.missing)this.aacOverFlow=q;else{G+=q.length,K++;continue}}break}else G++},s.parseMPEGPES=function(O){var E=O.data,v=E.length,y=0,T=0,M=O.pts;if(M===void 0){a.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<v;)if(u.isHeader(E,T)){var N=u.appendFrame(this._audioTrack,E,T,M,y);if(N)T+=N.length,y++;else break}else T++},s.parseID3PES=function(O){if(O.pts===void 0){a.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},x}();c.minProbeByteLength=188;function m(x,s,P,O){return{key:x,frame:!1,pts:s,dts:P,units:[],debug:O,length:0}}function g(x,s){return(x[s+10]&31)<<8|x[s+11]}function b(x,s,P,O){var E={audio:-1,avc:-1,id3:-1,isAAC:!0},v=(x[s+1]&15)<<8|x[s+2],y=s+3+v-4,T=(x[s+10]&15)<<8|x[s+11];for(s+=12+T;s<y;){var M=(x[s+1]&31)<<8|x[s+2];switch(x[s]){case 207:if(!O){a.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:E.audio===-1&&(E.audio=M);break;case 21:E.id3===-1&&(E.id3=M);break;case 219:if(!O){a.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:E.avc===-1&&(E.avc=M);break;case 3:case 4:P?E.audio===-1&&(E.audio=M,E.isAAC=!1):a.logger.log("MPEG audio found, not supported in this browser");break;case 36:a.logger.warn("Unsupported HEVC stream type found");break;default:break}s+=((x[s+3]&15)<<8|x[s+4])+5}return E}function n(x){var s=0,P,O,E,v,y,T=x.data;if(!x||x.size===0)return null;for(;T[0].length<19&&T.length>1;){var M=new Uint8Array(T[0].length+T[1].length);M.set(T[0]),M.set(T[1],T[0].length),T[0]=M,T.splice(1,1)}P=T[0];var N=(P[0]<<16)+(P[1]<<8)+P[2];if(N===1){if(O=(P[4]<<8)+P[5],O&&O>x.size-6)return null;var I=P[7];I&192&&(v=(P[9]&14)*536870912+(P[10]&255)*4194304+(P[11]&254)*16384+(P[12]&255)*128+(P[13]&254)/2,I&64?(y=(P[14]&14)*536870912+(P[15]&255)*4194304+(P[16]&254)*16384+(P[17]&255)*128+(P[18]&254)/2,v-y>60*9e4&&(a.logger.warn(Math.round((v-y)/9e4)+"s delta between PTS and DTS, align them"),v=y)):y=v),E=P[8];var G=E+9;if(x.size<=G)return null;x.size-=G;for(var H=new Uint8Array(x.size),W=0,z=T.length;W<z;W++){P=T[W];var U=P.byteLength;if(G)if(G>U){G-=U;continue}else P=P.subarray(G),U-=G,G=0;H.set(P,s),s+=U}return O&&(O-=E+3),{data:H,pts:v,dts:y,len:O}}return null}function o(x,s){if(x.units.length&&x.frame){if(x.pts===void 0){var P=s.samples,O=P.length;if(O){var E=P[O-1];x.pts=E.pts,x.dts=E.dts}else{s.dropped++;return}}s.samples.push(x)}x.debug.length&&a.logger.log(x.pts+"/"+x.dts+":"+x.debug)}function t(x,s){var P=x.length;if(P>0){if(s.pts>=x[P-1].pts)x.push(s);else for(var O=P-1;O>=0;O--)if(s.pts<x[O].pts){x.splice(O,0,s);break}}else x.push(s)}function S(x){for(var s=x.byteLength,P=[],O=1;O<s-2;)x[O]===0&&x[O+1]===0&&x[O+2]===3?(P.push(O+2),O+=2):O++;if(P.length===0)return x;var E=s-P.length,v=new Uint8Array(E),y=0;for(O=0;O<E;y++,O++)y===P[0]&&(y++,P.shift()),v[O]=x[y];return v}f.default=c},"./src/errors.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"ErrorTypes",function(){return D}),C.d(f,"ErrorDetails",function(){return u});var D;(function(h){h.NETWORK_ERROR="networkError",h.MEDIA_ERROR="mediaError",h.KEY_SYSTEM_ERROR="keySystemError",h.MUX_ERROR="muxError",h.OTHER_ERROR="otherError"})(D||(D={}));var u;(function(h){h.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",h.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",h.KEY_SYSTEM_NO_SESSION="keySystemNoSession",h.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",h.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",h.MANIFEST_LOAD_ERROR="manifestLoadError",h.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",h.MANIFEST_PARSING_ERROR="manifestParsingError",h.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",h.LEVEL_EMPTY_ERROR="levelEmptyError",h.LEVEL_LOAD_ERROR="levelLoadError",h.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",h.LEVEL_SWITCH_ERROR="levelSwitchError",h.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",h.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",h.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",h.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",h.FRAG_LOAD_ERROR="fragLoadError",h.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",h.FRAG_DECRYPT_ERROR="fragDecryptError",h.FRAG_PARSING_ERROR="fragParsingError",h.REMUX_ALLOC_ERROR="remuxAllocError",h.KEY_LOAD_ERROR="keyLoadError",h.KEY_LOAD_TIMEOUT="keyLoadTimeOut",h.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",h.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",h.BUFFER_APPEND_ERROR="bufferAppendError",h.BUFFER_APPENDING_ERROR="bufferAppendingError",h.BUFFER_STALLED_ERROR="bufferStalledError",h.BUFFER_FULL_ERROR="bufferFullError",h.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",h.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",h.INTERNAL_EXCEPTION="internalException",h.INTERNAL_ABORTED="aborted",h.UNKNOWN="unknown"})(u||(u={}))},"./src/events.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"Events",function(){return D});var D;(function(u){u.MEDIA_ATTACHING="hlsMediaAttaching",u.MEDIA_ATTACHED="hlsMediaAttached",u.MEDIA_DETACHING="hlsMediaDetaching",u.MEDIA_DETACHED="hlsMediaDetached",u.BUFFER_RESET="hlsBufferReset",u.BUFFER_CODECS="hlsBufferCodecs",u.BUFFER_CREATED="hlsBufferCreated",u.BUFFER_APPENDING="hlsBufferAppending",u.BUFFER_APPENDED="hlsBufferAppended",u.BUFFER_EOS="hlsBufferEos",u.BUFFER_FLUSHING="hlsBufferFlushing",u.BUFFER_FLUSHED="hlsBufferFlushed",u.MANIFEST_LOADING="hlsManifestLoading",u.MANIFEST_LOADED="hlsManifestLoaded",u.MANIFEST_PARSED="hlsManifestParsed",u.LEVEL_SWITCHING="hlsLevelSwitching",u.LEVEL_SWITCHED="hlsLevelSwitched",u.LEVEL_LOADING="hlsLevelLoading",u.LEVEL_LOADED="hlsLevelLoaded",u.LEVEL_UPDATED="hlsLevelUpdated",u.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",u.LEVELS_UPDATED="hlsLevelsUpdated",u.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",u.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",u.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",u.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",u.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",u.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",u.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",u.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",u.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",u.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",u.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",u.CUES_PARSED="hlsCuesParsed",u.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",u.INIT_PTS_FOUND="hlsInitPtsFound",u.FRAG_LOADING="hlsFragLoading",u.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",u.FRAG_LOADED="hlsFragLoaded",u.FRAG_DECRYPTED="hlsFragDecrypted",u.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",u.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",u.FRAG_PARSING_METADATA="hlsFragParsingMetadata",u.FRAG_PARSED="hlsFragParsed",u.FRAG_BUFFERED="hlsFragBuffered",u.FRAG_CHANGED="hlsFragChanged",u.FPS_DROP="hlsFpsDrop",u.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",u.ERROR="hlsError",u.DESTROYING="hlsDestroying",u.KEY_LOADING="hlsKeyLoading",u.KEY_LOADED="hlsKeyLoaded",u.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",u.BACK_BUFFER_REACHED="hlsBackBufferReached"})(D||(D={}))},"./src/hls.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return x});var D=C("./node_modules/url-toolkit/src/url-toolkit.js"),u=C.n(D),h=C("./src/loader/playlist-loader.ts"),w=C("./src/loader/key-loader.ts"),d=C("./src/controller/id3-track-controller.ts"),i=C("./src/controller/latency-controller.ts"),l=C("./src/controller/level-controller.ts"),a=C("./src/controller/fragment-tracker.ts"),_=C("./src/controller/stream-controller.ts"),p=C("./src/is-supported.ts"),c=C("./src/utils/logger.ts"),m=C("./src/config.ts"),g=C("./node_modules/eventemitter3/index.js"),b=C.n(g),n=C("./src/events.ts"),o=C("./src/errors.ts");function t(s,P){for(var O=0;O<P.length;O++){var E=P[O];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(s,E.key,E)}}function S(s,P,O){return P&&t(s.prototype,P),O&&t(s,O),s}var x=function(){s.isSupported=function(){return Object(p.isSupported)()};function s(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new g.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var E=this.config=Object(m.mergeConfig)(s.DefaultConfig,O);this.userConfig=O,Object(c.enableLogs)(E.debug),this._autoLevelCapping=-1,E.progressive&&Object(m.enableStreamingMode)(E);var v=E.abrController,y=E.bufferController,T=E.capLevelController,M=E.fpsController,N=this.abrController=new v(this),I=this.bufferController=new y(this),G=this.capLevelController=new T(this),H=new M(this),W=new h.default(this),z=new w.default(this),U=new d.default(this),B=this.levelController=new l.default(this),K=new a.FragmentTracker(this),q=this.streamController=new _.default(this,K);G.setStreamController(q),H.setStreamController(q);var ae=[B,q];this.networkControllers=ae;var se=[W,z,N,I,G,H,U,K];this.audioTrackController=this.createController(E.audioTrackController,null,ae),this.createController(E.audioStreamController,K,ae),this.subtitleTrackController=this.createController(E.subtitleTrackController,null,ae),this.createController(E.subtitleStreamController,K,ae),this.createController(E.timelineController,null,se),this.emeController=this.createController(E.emeController,null,se),this.cmcdController=this.createController(E.cmcdController,null,se),this.latencyController=this.createController(i.default,null,se),this.coreComponents=se}var P=s.prototype;return P.createController=function(E,v,y){if(E){var T=v?new E(this,v):new E(this);return y&&y.push(T),T}return null},P.on=function(E,v,y){y===void 0&&(y=this),this._emitter.on(E,v,y)},P.once=function(E,v,y){y===void 0&&(y=this),this._emitter.once(E,v,y)},P.removeAllListeners=function(E){this._emitter.removeAllListeners(E)},P.off=function(E,v,y,T){y===void 0&&(y=this),this._emitter.off(E,v,y,T)},P.listeners=function(E){return this._emitter.listeners(E)},P.emit=function(E,v,y){return this._emitter.emit(E,v,y)},P.trigger=function(E,v){if(this.config.debug)return this.emit(E,E,v);try{return this.emit(E,E,v)}catch(y){c.logger.error("An internal error happened while handling event "+E+'. Error message: "'+y.message+'". Here is a stacktrace:',y),this.trigger(n.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:E,error:y})}return!1},P.listenerCount=function(E){return this._emitter.listenerCount(E)},P.destroy=function(){c.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(E){return E.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(E){return E.destroy()}),this.coreComponents.length=0},P.attachMedia=function(E){c.logger.log("attachMedia"),this._media=E,this.trigger(n.Events.MEDIA_ATTACHING,{media:E})},P.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},P.loadSource=function(E){this.stopLoad();var v=this.media,y=this.url,T=this.url=D.buildAbsoluteURL(self.location.href,E,{alwaysNormalize:!0});c.logger.log("loadSource:"+T),v&&y&&y!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(v)),this.trigger(n.Events.MANIFEST_LOADING,{url:E})},P.startLoad=function(E){E===void 0&&(E=-1),c.logger.log("startLoad("+E+")"),this.networkControllers.forEach(function(v){v.startLoad(E)})},P.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(E){E.stopLoad()})},P.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},P.recoverMediaError=function(){c.logger.log("recoverMediaError");var E=this._media;this.detachMedia(),E&&this.attachMedia(E)},P.removeLevel=function(E,v){v===void 0&&(v=0),this.levelController.removeLevel(E,v)},S(s,[{key:"levels",get:function(){var E=this.levelController.levels;return E||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(E){c.logger.log("set currentLevel:"+E),this.loadLevel=E,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(E){c.logger.log("set nextLevel:"+E),this.levelController.manualLevel=E,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(E){c.logger.log("set loadLevel:"+E),this.levelController.manualLevel=E}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(E){this.levelController.nextLoadLevel=E}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(E){c.logger.log("set firstLevel:"+E),this.levelController.firstLevel=E}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(E){c.logger.log("set startLevel:"+E),E!==-1&&(E=Math.max(E,this.minAutoLevel)),this.levelController.startLevel=E}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(E){var v=!!E;v!==this.config.capLevelToPlayerSize&&(v?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=v)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(E){this._autoLevelCapping!==E&&(c.logger.log("set autoLevelCapping:"+E),this._autoLevelCapping=E)}},{key:"bandwidthEstimate",get:function(){var E=this.abrController.bwEstimator;return E?E.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var E=this.levels,v=this.config.minAutoBitrate;if(!E)return 0;for(var y=E.length,T=0;T<y;T++)if(E[T].maxBitrate>v)return T;return 0}},{key:"maxAutoLevel",get:function(){var E=this.levels,v=this.autoLevelCapping,y;return v===-1&&E&&E.length?y=E.length-1:y=v,y}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(E){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,E)}},{key:"audioTracks",get:function(){var E=this.audioTrackController;return E?E.audioTracks:[]}},{key:"audioTrack",get:function(){var E=this.audioTrackController;return E?E.audioTrack:-1},set:function(E){var v=this.audioTrackController;v&&(v.audioTrack=E)}},{key:"subtitleTracks",get:function(){var E=this.subtitleTrackController;return E?E.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var E=this.subtitleTrackController;return E?E.subtitleTrack:-1},set:function(E){var v=this.subtitleTrackController;v&&(v.subtitleTrack=E)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var E=this.subtitleTrackController;return E?E.subtitleDisplay:!1},set:function(E){var v=this.subtitleTrackController;v&&(v.subtitleDisplay=E)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(E){this.config.lowLatencyMode=E}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return s.defaultConfig?s.defaultConfig:m.hlsDefaultConfig},set:function(E){s.defaultConfig=E}}]),s}();x.defaultConfig=void 0},"./src/is-supported.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isSupported",function(){return h}),C.d(f,"changeTypeSupported",function(){return w});var D=C("./src/utils/mediasource-helper.ts");function u(){return self.SourceBuffer||self.WebKitSourceBuffer}function h(){var d=Object(D.getMediaSource)();if(!d)return!1;var i=u(),l=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!i||i.prototype&&typeof i.prototype.appendBuffer=="function"&&typeof i.prototype.remove=="function";return!!l&&!!a}function w(){var d,i=u();return typeof(i==null||((d=i.prototype)===null||d===void 0)?void 0:d.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return c}),C.d(f,"LoadError",function(){return g});var D=C("./src/polyfills/number.ts"),u=C("./src/errors.ts");function h(b,n){b.prototype=Object.create(n.prototype),b.prototype.constructor=b,a(b,n)}function w(b){var n=typeof Map=="function"?new Map:void 0;return w=function(t){if(t===null||!l(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(t))return n.get(t);n.set(t,S)}function S(){return d(t,arguments,_(this).constructor)}return S.prototype=Object.create(t.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),a(S,t)},w(b)}function d(b,n,o){return i()?d=Reflect.construct:d=function(S,x,s){var P=[null];P.push.apply(P,x);var O=Function.bind.apply(S,P),E=new O;return s&&a(E,s.prototype),E},d.apply(null,arguments)}function i(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(b){return!1}}function l(b){return Function.toString.call(b).indexOf("[native code]")!==-1}function a(b,n){return a=Object.setPrototypeOf||function(t,S){return t.__proto__=S,t},a(b,n)}function _(b){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},_(b)}var p=Math.pow(2,17),c=function(){function b(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var n=b.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(t,S){var x=this,s=t.url;if(!s)return Promise.reject(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(s?"part list":"url")));this.abort();var P=this.config,O=P.fLoader,E=P.loader;return new Promise(function(v,y){x.loader&&x.loader.destroy();var T=x.loader=t.loader=O?new O(P):new E(P),M=m(t),N={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:p};t.stats=T.stats,T.load(M,N,{onSuccess:function(G,H,W,z){x.resetLoader(t,T),v({frag:t,part:null,payload:G.data,networkDetails:z})},onError:function(G,H,W){x.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:G,networkDetails:W}))},onAbort:function(G,H,W){x.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:W}))},onTimeout:function(G,H,W){x.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:W}))},onProgress:function(G,H,W,z){S&&S({frag:t,part:null,payload:W,networkDetails:z})}})})},n.loadPart=function(t,S,x){var s=this;this.abort();var P=this.config,O=P.fLoader,E=P.loader;return new Promise(function(v,y){s.loader&&s.loader.destroy();var T=s.loader=t.loader=O?new O(P):new E(P),M=m(t,S),N={timeout:P.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:P.fragLoadingMaxRetryTimeout,highWaterMark:p};S.stats=T.stats,T.load(M,N,{onSuccess:function(G,H,W,z){s.resetLoader(t,T),s.updateStatsFromPart(t,S);var U={frag:t,part:S,payload:G.data,networkDetails:z};x(U),v(U)},onError:function(G,H,W){s.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:S,response:G,networkDetails:W}))},onAbort:function(G,H,W){t.stats.aborted=S.stats.aborted,s.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:S,networkDetails:W}))},onTimeout:function(G,H,W){s.resetLoader(t,T),y(new g({type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:S,networkDetails:W}))}})})},n.updateStatsFromPart=function(t,S){var x=t.stats,s=S.stats,P=s.total;if(x.loaded+=s.loaded,P){var O=Math.round(t.duration/S.duration),E=Math.min(Math.round(x.loaded/P),O),v=O-E,y=v*Math.round(x.loaded/E);x.total=x.loaded+y}else x.total=Math.max(x.loaded,x.total);var T=x.loading,M=s.loading;T.start?T.first+=M.first-M.start:(T.start=M.start,T.first=M.first),T.end=M.end},n.resetLoader=function(t,S){t.loader=null,this.loader===S&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),S.destroy()},b}();function m(b,n){n===void 0&&(n=null);var o=n||b,t={frag:b,part:n,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},S=o.byteRangeStartOffset,x=o.byteRangeEndOffset;return Object(D.isFiniteNumber)(S)&&Object(D.isFiniteNumber)(x)&&(t.rangeStart=S,t.rangeEnd=x),t}var g=function(b){h(n,b);function n(o){for(var t,S=arguments.length,x=new Array(S>1?S-1:0),s=1;s<S;s++)x[s-1]=arguments[s];return t=b.call.apply(b,[this].concat(x))||this,t.data=void 0,t.data=o,t}return n}(w(Error))},"./src/loader/fragment.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"ElementaryStreamTypes",function(){return c}),C.d(f,"BaseSegment",function(){return m}),C.d(f,"Fragment",function(){return g}),C.d(f,"Part",function(){return b});var D=C("./src/polyfills/number.ts"),u=C("./node_modules/url-toolkit/src/url-toolkit.js"),h=C.n(u),w=C("./src/utils/logger.ts"),d=C("./src/loader/level-key.ts"),i=C("./src/loader/load-stats.ts");function l(n,o){n.prototype=Object.create(o.prototype),n.prototype.constructor=n,a(n,o)}function a(n,o){return a=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S},a(n,o)}function _(n,o){for(var t=0;t<o.length;t++){var S=o[t];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(n,S.key,S)}}function p(n,o,t){return o&&_(n.prototype,o),t&&_(n,t),n}var c;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(c||(c={}));var m=function(){function n(t){var S;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(S={},S[c.AUDIO]=null,S[c.VIDEO]=null,S[c.AUDIOVIDEO]=null,S),this.baseurl=t}var o=n.prototype;return o.setByteRange=function(S,x){var s=S.split("@",2),P=[];s.length===1?P[0]=x?x.byteRangeEndOffset:0:P[0]=parseInt(s[1]),P[1]=parseInt(s[0])+P[0],this._byteRange=P},p(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(u.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(S){this._url=S}}]),n}(),g=function(n){l(o,n);function o(S,x){var s;return s=n.call(this,x)||this,s._decryptdata=null,s.rawProgramDateTime=null,s.programDateTime=null,s.tagList=[],s.duration=0,s.sn=0,s.levelkey=void 0,s.type=void 0,s.loader=null,s.level=-1,s.cc=0,s.startPTS=void 0,s.endPTS=void 0,s.appendedPTS=void 0,s.startDTS=void 0,s.endDTS=void 0,s.start=0,s.deltaPTS=void 0,s.maxStartPTS=void 0,s.minEndPTS=void 0,s.stats=new i.LoadStats,s.urlId=0,s.data=void 0,s.bitrateTest=!1,s.title=null,s.initSegment=null,s.type=S,s}var t=o.prototype;return t.createInitializationVector=function(x){for(var s=new Uint8Array(16),P=12;P<16;P++)s[P]=x>>8*(15-P)&255;return s},t.setDecryptDataFromLevelKey=function(x,s){var P=x;return(x==null?void 0:x.method)==="AES-128"&&x.uri&&!x.iv&&(P=d.LevelKey.fromURI(x.uri),P.method=x.method,P.iv=this.createInitializationVector(s),P.keyFormat="identity"),P},t.setElementaryStreamInfo=function(x,s,P,O,E,v){v===void 0&&(v=!1);var y=this.elementaryStreams,T=y[x];if(!T){y[x]={startPTS:s,endPTS:P,startDTS:O,endDTS:E,partial:v};return}T.startPTS=Math.min(T.startPTS,s),T.endPTS=Math.max(T.endPTS,P),T.startDTS=Math.min(T.startDTS,O),T.endDTS=Math.max(T.endDTS,E)},t.clearElementaryStreamInfo=function(){var x=this.elementaryStreams;x[c.AUDIO]=null,x[c.VIDEO]=null,x[c.AUDIOVIDEO]=null},p(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var x=this.sn;typeof x!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&w.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),x=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,x)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(D.isFiniteNumber)(this.programDateTime))return null;var x=Object(D.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+x*1e3}},{key:"encrypted",get:function(){var x;return!!((x=this.decryptdata)!==null&&x!==void 0&&x.keyFormat&&this.decryptdata.uri)}}]),o}(m),b=function(n){l(o,n);function o(t,S,x,s,P){var O;O=n.call(this,x)||this,O.fragOffset=0,O.duration=0,O.gap=!1,O.independent=!1,O.relurl=void 0,O.fragment=void 0,O.index=void 0,O.stats=new i.LoadStats,O.duration=t.decimalFloatingPoint("DURATION"),O.gap=t.bool("GAP"),O.independent=t.bool("INDEPENDENT"),O.relurl=t.enumeratedString("URI"),O.fragment=S,O.index=s;var E=t.enumeratedString("BYTERANGE");return E&&O.setByteRange(E,P),P&&(O.fragOffset=P.fragOffset+P.duration),O}return p(o,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var S=this.elementaryStreams;return!!(S.audio||S.video||S.audiovideo)}}]),o}(m)},"./src/loader/key-loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return w});var D=C("./src/events.ts"),u=C("./src/errors.ts"),h=C("./src/utils/logger.ts"),w=function(){function d(l){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=l,this._registerListeners()}var i=d.prototype;return i._registerListeners=function(){this.hls.on(D.Events.KEY_LOADING,this.onKeyLoading,this)},i._unregisterListeners=function(){this.hls.off(D.Events.KEY_LOADING,this.onKeyLoading)},i.destroy=function(){this._unregisterListeners();for(var a in this.loaders){var _=this.loaders[a];_&&_.destroy()}this.loaders={}},i.onKeyLoading=function(a,_){var p=_.frag,c=p.type,m=this.loaders[c];if(!p.decryptdata){h.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var g=p.decryptdata.uri;if(g!==this.decrypturl||this.decryptkey===null){var b=this.hls.config;if(m&&(h.logger.warn("abort previous key loader for type:"+c),m.abort()),!g){h.logger.warn("key uri is falsy");return}var n=b.loader,o=p.loader=this.loaders[c]=new n(b);this.decrypturl=g,this.decryptkey=null;var t={url:g,frag:p,responseType:"arraybuffer"},S={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:b.fragLoadingRetryDelay,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:0},x={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(t,S,x)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(D.Events.KEY_LOADED,{frag:p}))},i.loadsuccess=function(a,_,p){var c=p.frag;if(!c.decryptdata){h.logger.error("after key load, decryptdata unset");return}this.decryptkey=c.decryptdata.key=new Uint8Array(a.data),c.loader=null,delete this.loaders[c.type],this.hls.trigger(D.Events.KEY_LOADED,{frag:c})},i.loaderror=function(a,_){var p=_.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:a})},i.loadtimeout=function(a,_){var p=_.frag,c=p.loader;c&&c.abort(),delete this.loaders[p.type],this.hls.trigger(D.Events.ERROR,{type:u.ErrorTypes.NETWORK_ERROR,details:u.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},d}()},"./src/loader/level-details.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"LevelDetails",function(){return d});var D=C("./src/polyfills/number.ts");function u(i,l){for(var a=0;a<l.length;a++){var _=l[a];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(i,_.key,_)}}function h(i,l,a){return l&&u(i.prototype,l),a&&u(i,a),i}var w=10,d=function(){function i(a){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=a}var l=i.prototype;return l.reloaded=function(_){if(!_){this.advanced=!0,this.updated=!0;return}var p=this.lastPartSn-_.lastPartSn,c=this.lastPartIndex-_.lastPartIndex;this.updated=this.endSN!==_.endSN||!!c||!!p,this.advanced=this.endSN>_.endSN||p>0||p===0&&c>0,this.updated||this.advanced?this.misses=Math.floor(_.misses*.6):this.misses=_.misses+1,this.availabilityDelay=_.availabilityDelay},h(i,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(D.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||w}},{key:"drift",get:function(){var _=this.driftEndTime-this.driftStartTime;if(_>0){var p=this.driftEnd-this.driftStart;return p*1e3/_}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var _;return(_=this.partList)!==null&&_!==void 0&&_.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var _;return(_=this.fragments)!==null&&_!==void 0&&_.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var _;return(_=this.partList)!==null&&_!==void 0&&_.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var _;return(_=this.partList)!==null&&_!==void 0&&_.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),i}()},"./src/loader/level-key.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"LevelKey",function(){return d});var D=C("./node_modules/url-toolkit/src/url-toolkit.js"),u=C.n(D);function h(i,l){for(var a=0;a<l.length;a++){var _=l[a];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(i,_.key,_)}}function w(i,l,a){return l&&h(i.prototype,l),a&&h(i,a),i}var d=function(){i.fromURL=function(a,_){return new i(a,_)},i.fromURI=function(a){return new i(a)};function i(l,a){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,a?this._uri=Object(D.buildAbsoluteURL)(l,a,{alwaysNormalize:!0}):this._uri=l}return w(i,[{key:"uri",get:function(){return this._uri}}]),i}()},"./src/loader/load-stats.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"LoadStats",function(){return D});var D=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return o});var D=C("./src/polyfills/number.ts"),u=C("./node_modules/url-toolkit/src/url-toolkit.js"),h=C.n(u),w=C("./src/loader/fragment.ts"),d=C("./src/loader/level-details.ts"),i=C("./src/loader/level-key.ts"),l=C("./src/utils/attr-list.ts"),a=C("./src/utils/logger.ts"),_=C("./src/utils/codecs.ts"),p=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,c=/#EXT-X-MEDIA:(.*)/g,m=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),g=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),b=/\.(mp4|m4s|m4v|m4a)$/i;function n(P){var O,E;return b.test((O=(E=u.parseURL(P))===null||E===void 0?void 0:E.path)!=null?O:"")}var o=function(){function P(){}return P.findGroup=function(E,v){for(var y=0;y<E.length;y++){var T=E[y];if(T.id===v)return T}},P.convertAVC1ToAVCOTI=function(E){var v=E.split(".");if(v.length>2){var y=v.shift()+".";return y+=parseInt(v.shift()).toString(16),y+=("000"+parseInt(v.shift()).toString(16)).substr(-4),y}return E},P.resolve=function(E,v){return u.buildAbsoluteURL(v,E,{alwaysNormalize:!0})},P.parseMasterPlaylist=function(E,v){var y=[],T={},M=!1;p.lastIndex=0;for(var N;(N=p.exec(E))!=null;)if(N[1]){var I=new l.AttrList(N[1]),G={attrs:I,bitrate:I.decimalInteger("AVERAGE-BANDWIDTH")||I.decimalInteger("BANDWIDTH"),name:I.NAME,url:P.resolve(N[2],v)},H=I.decimalResolution("RESOLUTION");H&&(G.width=H.width,G.height=H.height),t((I.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=P.convertAVC1ToAVCOTI(G.videoCodec)),y.push(G)}else if(N[3]){var W=new l.AttrList(N[3]);W["DATA-ID"]&&(M=!0,T[W["DATA-ID"]]=W)}return{levels:y,sessionData:M?T:null}},P.parseMasterPlaylistMedia=function(E,v,y,T){T===void 0&&(T=[]);var M,N=[],I=0;for(c.lastIndex=0;(M=c.exec(E))!==null;){var G=new l.AttrList(M[1]);if(G.TYPE===y){var H={attrs:G,bitrate:0,id:I++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:y,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?P.resolve(G.URI,v):""};if(T.length){var W=P.findGroup(T,H.groupId)||T[0];S(H,W,"audioCodec"),S(H,W,"textCodec")}N.push(H)}}return N},P.parseLevelPlaylist=function(E,v,y,T,M){var N=new d.LevelDetails(v),I=N.fragments,G=null,H=0,W=0,z=0,U=0,B=null,K=new w.Fragment(T,v),q,ae,se,we=-1,Te=!1;for(m.lastIndex=0,N.m3u8=E;(q=m.exec(E))!==null;){Te&&(Te=!1,K=new w.Fragment(T,v),K.start=z,K.sn=H,K.cc=U,K.level=y,G&&(K.initSegment=G,K.rawProgramDateTime=G.rawProgramDateTime));var de=q[1];if(de){K.duration=parseFloat(de);var xe=(" "+q[2]).slice(1);K.title=xe||null,K.tagList.push(xe?["INF",de,xe]:["INF",de])}else if(q[3])Object(D.isFiniteNumber)(K.duration)&&(K.start=z,se&&(K.levelkey=se),K.sn=H,K.level=y,K.cc=U,K.urlId=M,I.push(K),K.relurl=(" "+q[3]).slice(1),s(K,B),B=K,z+=K.duration,H++,W=0,Te=!0);else if(q[4]){var pe=(" "+q[4]).slice(1);B?K.setByteRange(pe,B):K.setByteRange(pe)}else if(q[5])K.rawProgramDateTime=(" "+q[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),we===-1&&(we=I.length);else{if(q=q[0].match(g),!q){a.logger.warn("No matches on slow regex match for level playlist!");continue}for(ae=1;ae<q.length&&!(typeof q[ae]!="undefined");ae++);var ne=(" "+q[ae]).slice(1),ie=(" "+q[ae+1]).slice(1),ee=q[ae+2]?(" "+q[ae+2]).slice(1):"";switch(ne){case"PLAYLIST-TYPE":N.type=ie.toUpperCase();break;case"MEDIA-SEQUENCE":H=N.startSN=parseInt(ie);break;case"SKIP":{var le=new l.AttrList(ie),Q=le.decimalInteger("SKIPPED-SEGMENTS");if(Object(D.isFiniteNumber)(Q)){N.skippedSegments=Q;for(var Z=Q;Z--;)I.unshift(null);H+=Q}var be=le.enumeratedString("RECENTLY-REMOVED-DATERANGES");be&&(N.recentlyRemovedDateranges=be.split(" "));break}case"TARGETDURATION":N.targetduration=parseFloat(ie);break;case"VERSION":N.version=parseInt(ie);break;case"EXTM3U":break;case"ENDLIST":N.live=!1;break;case"#":(ie||ee)&&K.tagList.push(ee?[ie,ee]:[ie]);break;case"DIS":U++;case"GAP":K.tagList.push([ne]);break;case"BITRATE":K.tagList.push([ne,ie]);break;case"DISCONTINUITY-SEQ":U=parseInt(ie);break;case"KEY":{var te,$=new l.AttrList(ie),X=$.enumeratedString("METHOD"),Y=$.URI,ve=$.hexadecimalInteger("IV"),ue=$.enumeratedString("KEYFORMATVERSIONS"),Ee=$.enumeratedString("KEYID"),Ke=(te=$.enumeratedString("KEYFORMAT"))!=null?te:"identity",Ye=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ye.indexOf(Ke)>-1){a.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;X&&(se=i.LevelKey.fromURL(v,Y),Y&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(se.method=X,se.keyFormat=Ke,Ee&&(se.keyID=Ee),ue&&(se.keyFormatVersions=ue),se.iv=ve));break}case"START":{var Je=new l.AttrList(ie),tt=Je.decimalFloatingPoint("TIME-OFFSET");Object(D.isFiniteNumber)(tt)&&(N.startTimeOffset=tt);break}case"MAP":{var at=new l.AttrList(ie);K.relurl=at.URI,at.BYTERANGE&&K.setByteRange(at.BYTERANGE),K.level=y,K.sn="initSegment",se&&(K.levelkey=se),K.initSegment=null,G=K,Te=!0;break}case"SERVER-CONTROL":{var lt=new l.AttrList(ie);N.canBlockReload=lt.bool("CAN-BLOCK-RELOAD"),N.canSkipUntil=lt.optionalFloat("CAN-SKIP-UNTIL",0),N.canSkipDateRanges=N.canSkipUntil>0&&lt.bool("CAN-SKIP-DATERANGES"),N.partHoldBack=lt.optionalFloat("PART-HOLD-BACK",0),N.holdBack=lt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var je=new l.AttrList(ie);N.partTarget=je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=N.partList;Ce||(Ce=N.partList=[]);var Qe=W>0?Ce[Ce.length-1]:void 0,st=W++,Ge=new w.Part(new l.AttrList(ie),K,v,st,Qe);Ce.push(Ge),K.duration+=Ge.duration;break}case"PRELOAD-HINT":{var rt=new l.AttrList(ie);N.preloadHint=rt;break}case"RENDITION-REPORT":{var Re=new l.AttrList(ie);N.renditionReports=N.renditionReports||[],N.renditionReports.push(Re);break}default:a.logger.warn("line parsed but not handled: "+q);break}}}B&&!B.relurl?(I.pop(),z-=B.duration,N.partList&&(N.fragmentHint=B)):N.partList&&(s(K,B),K.cc=U,N.fragmentHint=K);var Se=I.length,De=I[0],fe=I[Se-1];if(z+=N.skippedSegments*N.targetduration,z>0&&Se&&fe){N.averagetargetduration=z/Se;var ye=fe.sn;N.endSN=ye!=="initSegment"?ye:0,De&&(N.startCC=De.cc,De.initSegment||N.fragments.every(function(_e){return _e.relurl&&n(_e.relurl)})&&(a.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new w.Fragment(T,v),K.relurl=fe.relurl,K.level=y,K.sn="initSegment",De.initSegment=K,N.needSidxRanges=!0))}else N.endSN=0,N.startCC=0;return N.fragmentHint&&(z+=N.fragmentHint.duration),N.totalduration=z,N.endCC=U,we>0&&x(I,we),N},P}();function t(P,O){["video","audio","text"].forEach(function(E){var v=P.filter(function(T){return Object(_.isCodecType)(T,E)});if(v.length){var y=v.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});O[E+"Codec"]=y.length>0?y[0]:v[0],P=P.filter(function(T){return v.indexOf(T)===-1})}}),O.unknownCodecs=P}function S(P,O,E){var v=O[E];v&&(P[E]=v)}function x(P,O){for(var E=P[O],v=O;v--;){var y=P[v];if(!y)return;y.programDateTime=E.programDateTime-y.duration*1e3,E=y}}function s(P,O){P.rawProgramDateTime?P.programDateTime=Date.parse(P.rawProgramDateTime):O!=null&&O.programDateTime&&(P.programDateTime=O.endProgramDateTime),Object(D.isFiniteNumber)(P.programDateTime)||(P.programDateTime=null,P.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/events.ts"),h=C("./src/errors.ts"),w=C("./src/utils/logger.ts"),d=C("./src/utils/mp4-tools.ts"),i=C("./src/loader/m3u8-parser.ts"),l=C("./src/types/loader.ts"),a=C("./src/utils/attr-list.ts");function _(m){var g=m.type;switch(g){case l.PlaylistContextType.AUDIO_TRACK:return l.PlaylistLevelType.AUDIO;case l.PlaylistContextType.SUBTITLE_TRACK:return l.PlaylistLevelType.SUBTITLE;default:return l.PlaylistLevelType.MAIN}}function p(m,g){var b=m.url;return(b===void 0||b.indexOf("data:")===0)&&(b=g.url),b}var c=function(){function m(b){this.hls=void 0,this.loaders=Object.create(null),this.hls=b,this.registerListeners()}var g=m.prototype;return g.registerListeners=function(){var n=this.hls;n.on(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(u.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.unregisterListeners=function(){var n=this.hls;n.off(u.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(u.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(u.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(u.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},g.createInternalLoader=function(n){var o=this.hls.config,t=o.pLoader,S=o.loader,x=t||S,s=new x(o);return n.loader=s,this.loaders[n.type]=s,s},g.getInternalLoader=function(n){return this.loaders[n.type]},g.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},g.destroyInternalLoaders=function(){for(var n in this.loaders){var o=this.loaders[n];o&&o.destroy(),this.resetInternalLoader(n)}},g.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},g.onManifestLoading=function(n,o){var t=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:l.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},g.onLevelLoading=function(n,o){var t=o.id,S=o.level,x=o.url,s=o.deliveryDirectives;this.load({id:t,groupId:null,level:S,responseType:"text",type:l.PlaylistContextType.LEVEL,url:x,deliveryDirectives:s})},g.onAudioTrackLoading=function(n,o){var t=o.id,S=o.groupId,x=o.url,s=o.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:l.PlaylistContextType.AUDIO_TRACK,url:x,deliveryDirectives:s})},g.onSubtitleTrackLoading=function(n,o){var t=o.id,S=o.groupId,x=o.url,s=o.deliveryDirectives;this.load({id:t,groupId:S,level:null,responseType:"text",type:l.PlaylistContextType.SUBTITLE_TRACK,url:x,deliveryDirectives:s})},g.load=function(n){var o,t=this.hls.config,S=this.getInternalLoader(n);if(S){var x=S.context;if(x&&x.url===n.url){w.logger.trace("[playlist-loader]: playlist request ongoing");return}w.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),S.abort()}var s,P,O,E;switch(n.type){case l.PlaylistContextType.MANIFEST:s=t.manifestLoadingMaxRetry,P=t.manifestLoadingTimeOut,O=t.manifestLoadingRetryDelay,E=t.manifestLoadingMaxRetryTimeout;break;case l.PlaylistContextType.LEVEL:case l.PlaylistContextType.AUDIO_TRACK:case l.PlaylistContextType.SUBTITLE_TRACK:s=0,P=t.levelLoadingTimeOut;break;default:s=t.levelLoadingMaxRetry,P=t.levelLoadingTimeOut,O=t.levelLoadingRetryDelay,E=t.levelLoadingMaxRetryTimeout;break}if(S=this.createInternalLoader(n),(o=n.deliveryDirectives)!==null&&o!==void 0&&o.part){var v;if(n.type===l.PlaylistContextType.LEVEL&&n.level!==null?v=this.hls.levels[n.level].details:n.type===l.PlaylistContextType.AUDIO_TRACK&&n.id!==null?v=this.hls.audioTracks[n.id].details:n.type===l.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(v=this.hls.subtitleTracks[n.id].details),v){var y=v.partTarget,T=v.targetduration;y&&T&&(P=Math.min(Math.max(y*3,T*.8)*1e3,P))}}var M={timeout:P,maxRetry:s,retryDelay:O,maxRetryDelay:E,highWaterMark:0},N={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};S.load(n,M,N)},g.loadsuccess=function(n,o,t,S){if(S===void 0&&(S=null),t.isSidxRequest){this.handleSidxRequest(n,t),this.handlePlaylistLoaded(n,o,t,S);return}this.resetInternalLoader(t.type);var x=n.data;if(x.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,t,"no EXTM3U delimiter",S);return}o.parsing.start=performance.now(),x.indexOf("#EXTINF:")>0||x.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,o,t,S):this.handleMasterPlaylist(n,o,t,S)},g.loaderror=function(n,o,t){t===void 0&&(t=null),this.handleNetworkError(o,t,!1,n)},g.loadtimeout=function(n,o,t){t===void 0&&(t=null),this.handleNetworkError(o,t,!0)},g.handleMasterPlaylist=function(n,o,t,S){var x=this.hls,s=n.data,P=p(n,t),O=i.default.parseMasterPlaylist(s,P),E=O.levels,v=O.sessionData;if(!E.length){this.handleManifestParsingError(n,t,"no level found in manifest",S);return}var y=E.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),T=E.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),M=i.default.parseMasterPlaylistMedia(s,P,"AUDIO",y),N=i.default.parseMasterPlaylistMedia(s,P,"SUBTITLES",T),I=i.default.parseMasterPlaylistMedia(s,P,"CLOSED-CAPTIONS");if(M.length){var G=M.some(function(H){return!H.url});!G&&E[0].audioCodec&&!E[0].attrs.AUDIO&&(w.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),M.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new a.AttrList({}),bitrate:0,url:""}))}x.trigger(u.Events.MANIFEST_LOADED,{levels:E,audioTracks:M,subtitles:N,captions:I,url:P,stats:o,networkDetails:S,sessionData:v})},g.handleTrackOrLevelPlaylist=function(n,o,t,S){var x=this.hls,s=t.id,P=t.level,O=t.type,E=p(n,t),v=Object(D.isFiniteNumber)(s)?s:0,y=Object(D.isFiniteNumber)(P)?P:v,T=_(t),M=i.default.parseLevelPlaylist(n.data,E,y,T,v);if(!M.fragments.length){x.trigger(u.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:E,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(O===l.PlaylistContextType.MANIFEST){var N={attrs:new a.AttrList({}),bitrate:0,details:M,name:"",url:E};x.trigger(u.Events.MANIFEST_LOADED,{levels:[N],audioTracks:[],url:E,stats:o,networkDetails:S,sessionData:null})}if(o.parsing.end=performance.now(),M.needSidxRanges){var I,G=(I=M.fragments[0].initSegment)===null||I===void 0?void 0:I.url;this.load({url:G,isSidxRequest:!0,type:O,level:P,levelDetails:M,id:s,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=M,this.handlePlaylistLoaded(n,o,t,S)},g.handleSidxRequest=function(n,o){var t=Object(d.parseSegmentIndex)(new Uint8Array(n.data));if(!t)return;var S=t.references,x=o.levelDetails;S.forEach(function(s,P){var O=s.info,E=x.fragments[P];E.byteRange.length===0&&E.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),E.initSegment&&E.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},g.handleManifestParsingError=function(n,o,t,S){this.hls.trigger(u.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===l.PlaylistContextType.MANIFEST,url:n.url,reason:t,response:n,context:o,networkDetails:S})},g.handleNetworkError=function(n,o,t,S){t===void 0&&(t=!1),w.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var x=h.ErrorDetails.UNKNOWN,s=!1,P=this.getInternalLoader(n);switch(n.type){case l.PlaylistContextType.MANIFEST:x=t?h.ErrorDetails.MANIFEST_LOAD_TIMEOUT:h.ErrorDetails.MANIFEST_LOAD_ERROR,s=!0;break;case l.PlaylistContextType.LEVEL:x=t?h.ErrorDetails.LEVEL_LOAD_TIMEOUT:h.ErrorDetails.LEVEL_LOAD_ERROR,s=!1;break;case l.PlaylistContextType.AUDIO_TRACK:x=t?h.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,s=!1;break;case l.PlaylistContextType.SUBTITLE_TRACK:x=t?h.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:h.ErrorDetails.SUBTITLE_LOAD_ERROR,s=!1;break}P&&this.resetInternalLoader(n.type);var O={type:h.ErrorTypes.NETWORK_ERROR,details:x,fatal:s,url:n.url,loader:P,context:n,networkDetails:o};S&&(O.response=S),this.hls.trigger(u.Events.ERROR,O)},g.handlePlaylistLoaded=function(n,o,t,S){var x=t.type,s=t.level,P=t.id,O=t.groupId,E=t.loader,v=t.levelDetails,y=t.deliveryDirectives;if(!(v!=null&&v.targetduration)){this.handleManifestParsingError(n,t,"invalid target duration",S);return}if(!E)return;v.live&&(E.getCacheAge&&(v.ageHeader=E.getCacheAge()||0),(!E.getCacheAge||isNaN(v.ageHeader))&&(v.ageHeader=0));switch(x){case l.PlaylistContextType.MANIFEST:case l.PlaylistContextType.LEVEL:this.hls.trigger(u.Events.LEVEL_LOADED,{details:v,level:s||0,id:P||0,stats:o,networkDetails:S,deliveryDirectives:y});break;case l.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(u.Events.AUDIO_TRACK_LOADED,{details:v,id:P||0,groupId:O||"",stats:o,networkDetails:S,deliveryDirectives:y});break;case l.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(u.Events.SUBTITLE_TRACK_LOADED,{details:v,id:P||0,groupId:O||"",stats:o,networkDetails:S,deliveryDirectives:y});break}},m}();f.default=c},"./src/polyfills/number.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isFiniteNumber",function(){return D}),C.d(f,"MAX_SAFE_INTEGER",function(){return u});var D=Number.isFinite||function(h){return typeof h=="number"&&isFinite(h)},u=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,f,C){"use strict";C.r(f);var D=function(){function u(){}return u.getSilentFrame=function(w,d){switch(w){case"mp4a.40.2":if(d===1)return new Uint8Array([0,200,0,128,35,128]);if(d===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(d===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(d===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(d===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(d===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(d===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(d===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(d===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},u}();f.default=D},"./src/remux/mp4-generator.ts":function(L,f,C){"use strict";C.r(f);var D=Math.pow(2,32)-1,u=function(){function h(){}return h.init=function(){h.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var d;for(d in h.types)h.types.hasOwnProperty(d)&&(h.types[d]=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),l=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);h.HDLR_TYPES={video:i,audio:l};var a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),_=new Uint8Array([0,0,0,0,0,0,0,0]);h.STTS=h.STSC=h.STCO=_,h.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),h.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),h.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),h.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),m=new Uint8Array([0,0,0,1]);h.FTYP=h.box(h.types.ftyp,p,m,p,c),h.DINF=h.box(h.types.dinf,h.box(h.types.dref,a))},h.box=function(d){for(var i=8,l=arguments.length,a=new Array(l>1?l-1:0),_=1;_<l;_++)a[_-1]=arguments[_];for(var p=a.length,c=p;p--;)i+=a[p].byteLength;var m=new Uint8Array(i);for(m[0]=i>>24&255,m[1]=i>>16&255,m[2]=i>>8&255,m[3]=i&255,m.set(d,4),p=0,i=8;p<c;p++)m.set(a[p],i),i+=a[p].byteLength;return m},h.hdlr=function(d){return h.box(h.types.hdlr,h.HDLR_TYPES[d])},h.mdat=function(d){return h.box(h.types.mdat,d)},h.mdhd=function(d,i){i*=d;var l=Math.floor(i/(D+1)),a=Math.floor(i%(D+1));return h.box(h.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,l>>24,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255,85,196,0,0]))},h.mdia=function(d){return h.box(h.types.mdia,h.mdhd(d.timescale,d.duration),h.hdlr(d.type),h.minf(d))},h.mfhd=function(d){return h.box(h.types.mfhd,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255]))},h.minf=function(d){return d.type==="audio"?h.box(h.types.minf,h.box(h.types.smhd,h.SMHD),h.DINF,h.stbl(d)):h.box(h.types.minf,h.box(h.types.vmhd,h.VMHD),h.DINF,h.stbl(d))},h.moof=function(d,i,l){return h.box(h.types.moof,h.mfhd(d),h.traf(l,i))},h.moov=function(d){for(var i=d.length,l=[];i--;)l[i]=h.trak(d[i]);return h.box.apply(null,[h.types.moov,h.mvhd(d[0].timescale,d[0].duration)].concat(l).concat(h.mvex(d)))},h.mvex=function(d){for(var i=d.length,l=[];i--;)l[i]=h.trex(d[i]);return h.box.apply(null,[h.types.mvex].concat(l))},h.mvhd=function(d,i){i*=d;var l=Math.floor(i/(D+1)),a=Math.floor(i%(D+1)),_=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,l>>24,l>>16&255,l>>8&255,l&255,a>>24,a>>16&255,a>>8&255,a&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return h.box(h.types.mvhd,_)},h.sdtp=function(d){var i=d.samples||[],l=new Uint8Array(4+i.length),a,_;for(a=0;a<i.length;a++)_=i[a].flags,l[a+4]=_.dependsOn<<4|_.isDependedOn<<2|_.hasRedundancy;return h.box(h.types.sdtp,l)},h.stbl=function(d){return h.box(h.types.stbl,h.stsd(d),h.box(h.types.stts,h.STTS),h.box(h.types.stsc,h.STSC),h.box(h.types.stsz,h.STSZ),h.box(h.types.stco,h.STCO))},h.avc1=function(d){var i=[],l=[],a,_,p;for(a=0;a<d.sps.length;a++)_=d.sps[a],p=_.byteLength,i.push(p>>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(_));for(a=0;a<d.pps.length;a++)_=d.pps[a],p=_.byteLength,l.push(p>>>8&255),l.push(p&255),l=l.concat(Array.prototype.slice.call(_));var c=h.box(h.types.avcC,new Uint8Array([1,i[3],i[4],i[5],252|3,224|d.sps.length].concat(i).concat([d.pps.length]).concat(l))),m=d.width,g=d.height,b=d.pixelRatio[0],n=d.pixelRatio[1];return h.box(h.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,m>>8&255,m&255,g>>8&255,g&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,h.box(h.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),h.box(h.types.pasp,new Uint8Array([b>>24,b>>16&255,b>>8&255,b&255,n>>24,n>>16&255,n>>8&255,n&255])))},h.esds=function(d){var i=d.config.length;return new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(d.config).concat([6,1,2]))},h.mp4a=function(d){var i=d.samplerate;return h.box(h.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]),h.box(h.types.esds,h.esds(d)))},h.mp3=function(d){var i=d.samplerate;return h.box(h.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,i>>8&255,i&255,0,0]))},h.stsd=function(d){return d.type==="audio"?!d.isAAC&&d.codec==="mp3"?h.box(h.types.stsd,h.STSD,h.mp3(d)):h.box(h.types.stsd,h.STSD,h.mp4a(d)):h.box(h.types.stsd,h.STSD,h.avc1(d))},h.tkhd=function(d){var i=d.id,l=d.duration*d.timescale,a=d.width,_=d.height,p=Math.floor(l/(D+1)),c=Math.floor(l%(D+1));return h.box(h.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,i&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,c>>24,c>>16&255,c>>8&255,c&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,a>>8&255,a&255,0,0,_>>8&255,_&255,0,0]))},h.traf=function(d,i){var l=h.sdtp(d),a=d.id,_=Math.floor(i/(D+1)),p=Math.floor(i%(D+1));return h.box(h.types.traf,h.box(h.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255])),h.box(h.types.tfdt,new Uint8Array([1,0,0,0,_>>24,_>>16&255,_>>8&255,_&255,p>>24,p>>16&255,p>>8&255,p&255])),h.trun(d,l.length+16+20+8+16+8+8),l)},h.trak=function(d){return d.duration=d.duration||4294967295,h.box(h.types.trak,h.tkhd(d),h.mdia(d))},h.trex=function(d){var i=d.id;return h.box(h.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},h.trun=function(d,i){var l=d.samples||[],a=l.length,_=12+16*a,p=new Uint8Array(_),c,m,g,b,n,o;for(i+=8+_,p.set([0,0,15,1,a>>>24&255,a>>>16&255,a>>>8&255,a&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255],0),c=0;c<a;c++)m=l[c],g=m.duration,b=m.size,n=m.flags,o=m.cts,p.set([g>>>24&255,g>>>16&255,g>>>8&255,g&255,b>>>24&255,b>>>16&255,b>>>8&255,b&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*c);return h.box(h.types.trun,p)},h.initSegment=function(d){h.types||h.init();var i=h.moov(d),l=new Uint8Array(h.FTYP.byteLength+i.byteLength);return l.set(h.FTYP),l.set(i,h.FTYP.byteLength),l},h}();u.types=void 0,u.HDLR_TYPES=void 0,u.STTS=void 0,u.STSC=void 0,u.STCO=void 0,u.STSZ=void 0,u.VMHD=void 0,u.SMHD=void 0,u.STSD=void 0,u.FTYP=void 0,u.DINF=void 0,f.default=u},"./src/remux/mp4-remuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return o}),C.d(f,"normalizePts",function(){return t});var D=C("./src/polyfills/number.ts"),u=C("./src/remux/aac-helper.ts"),h=C("./src/remux/mp4-generator.ts"),w=C("./src/events.ts"),d=C("./src/errors.ts"),i=C("./src/utils/logger.ts"),l=C("./src/types/loader.ts"),a=C("./src/utils/timescale-conversion.ts");function _(){return _=Object.assign||function(P){for(var O=1;O<arguments.length;O++){var E=arguments[O];for(var v in E)Object.prototype.hasOwnProperty.call(E,v)&&(P[v]=E[v])}return P},_.apply(this,arguments)}var p=10*1e3,c=1024,m=1152,g=null,b=null,n=!1,o=function(){function P(E,v,y,T){if(T===void 0&&(T=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=E,this.config=v,this.typeSupported=y,this.ISGenerated=!1,g===null){var M=navigator.userAgent||"",N=M.match(/Chrome\/(\d+)/i);g=N?parseInt(N[1]):0}if(b===null){var I=navigator.userAgent.match(/Safari\/(\d+)/i);b=I?parseInt(I[1]):0}n=!!g&&g<75||!!b&&b<600}var O=P.prototype;return O.destroy=function(){},O.resetTimeStamp=function(v){i.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=v},O.resetNextTimestamp=function(){i.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){i.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(v){var y=!1,T=v.reduce(function(M,N){var I=N.pts-M;return I<-4294967296?(y=!0,t(M,N.pts)):I>0?M:N.pts},v[0].pts);return y&&i.logger.debug("PTS rollover detected"),T},O.remux=function(v,y,T,M,N,I,G,H){var W,z,U,B,K,q,ae=N,se=N,we=v.pid>-1,Te=y.pid>-1,de=y.samples.length,xe=v.samples.length>0,pe=de>1,ne=(!we||xe)&&(!Te||pe)||this.ISGenerated||G;if(ne){this.ISGenerated||(U=this.generateIS(v,y,N));var ie=this.isVideoContiguous,ee=-1;if(pe&&(ee=S(y.samples),!ie&&this.config.forceKeyFrameOnDiscontinuity))if(q=!0,ee>0){i.logger.warn("[mp4-remuxer]: Dropped "+ee+" out of "+de+" video samples due to a missing keyframe");var le=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(ee),y.dropped+=ee,se+=(y.samples[0].pts-le)/(y.timescale||9e4)}else ee===-1&&(i.logger.warn("[mp4-remuxer]: No keyframe found out of "+de+" video samples"),q=!1);if(this.ISGenerated){if(xe&&pe){var Q=this.getVideoStartPts(y.samples),Z=t(v.samples[0].pts,Q)-Q,be=Z/y.inputTimeScale;ae+=Math.max(0,be),se+=Math.max(0,-be)}if(xe){if(v.samplerate||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(v,y,N)),z=this.remuxAudio(v,ae,this.isAudioContiguous,I,Te||pe||H===l.PlaylistLevelType.AUDIO?se:void 0),pe){var te=z?z.endPTS-z.startPTS:0;y.inputTimeScale||(i.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(v,y,N)),W=this.remuxVideo(y,se,ie,te)}}else pe&&(W=this.remuxVideo(y,se,ie,0));W&&(W.firstKeyFrame=ee,W.independent=ee!==-1)}}return this.ISGenerated&&(T.samples.length&&(K=this.remuxID3(T,N)),M.samples.length&&(B=this.remuxText(M,N))),{audio:z,video:W,initSegment:U,independent:q,text:B,id3:K}},O.generateIS=function(v,y,T){var M=v.samples,N=y.samples,I=this.typeSupported,G={},H=!Object(D.isFiniteNumber)(this._initPTS),W="audio/mp4",z,U,B;if(H&&(z=U=Infinity),v.config&&M.length&&(v.timescale=v.samplerate,v.isAAC||(I.mpeg?(W="audio/mpeg",v.codec=""):I.mp3&&(v.codec="mp3")),G.audio={id:"audio",container:W,codec:v.codec,initSegment:!v.isAAC&&I.mpeg?new Uint8Array(0):h.default.initSegment([v]),metadata:{channelCount:v.channelCount}},H&&(B=v.inputTimeScale,z=U=M[0].pts-Math.round(B*T))),y.sps&&y.pps&&N.length&&(y.timescale=y.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:h.default.initSegment([y]),metadata:{width:y.width,height:y.height}},H)){B=y.inputTimeScale;var K=this.getVideoStartPts(N),q=Math.round(B*T);U=Math.min(U,t(N[0].dts,K)-q),z=Math.min(z,K-q)}if(Object.keys(G).length)return this.ISGenerated=!0,H&&(this._initPTS=z,this._initDTS=U),{tracks:G,initPTS:z,timescale:B}},O.remuxVideo=function(v,y,T,M){var N=v.inputTimeScale,I=v.samples,G=[],H=I.length,W=this._initPTS,z=this.nextAvcDts,U=8,B,K,q,ae=Number.POSITIVE_INFINITY,se=Number.NEGATIVE_INFINITY,we=0,Te=!1;if(!T||z===null){var de=y*N,xe=I[0].pts-t(I[0].dts,I[0].pts);z=de-xe}for(var pe=0;pe<H;pe++){var ne=I[pe];if(ne.pts=t(ne.pts-W,z),ne.dts=t(ne.dts-W,z),ne.dts>ne.pts){var ie=9e4*.2;we=Math.max(Math.min(we,ne.pts-ne.dts),-1*ie)}ne.dts<I[pe>0?pe-1:pe].dts&&(Te=!0)}Te&&I.sort(function(Or,pr){var Et=Or.dts-pr.dts,Yr=Or.pts-pr.pts;return Et||Yr}),K=I[0].dts,q=I[I.length-1].dts;var ee=Math.round((q-K)/(H-1));if(we<0){if(we<ee*-2){i.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(a.toMsFromMpegTsClock)(-ee,!0)+" ms");for(var le=we,Q=0;Q<H;Q++)I[Q].dts=le=Math.max(le,I[Q].pts-ee),I[Q].pts=Math.max(le,I[Q].pts)}else{i.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(a.toMsFromMpegTsClock)(we,!0)+" ms to overcome this issue");for(var Z=0;Z<H;Z++)I[Z].dts=I[Z].dts+we}K=I[0].dts}if(T){var be=K-z,te=be>ee,$=be<-1;if(te||$){te?i.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(be,!0)+" ms ("+be+"dts) hole between fragments detected, filling it"):i.logger.warn("AVC: "+Object(a.toMsFromMpegTsClock)(-be,!0)+" ms ("+be+"dts) overlapping between fragments detected"),K=z;var X=I[0].pts-be;I[0].dts=K,I[0].pts=X,i.logger.log("Video: First PTS/DTS adjusted: "+Object(a.toMsFromMpegTsClock)(X,!0)+"/"+Object(a.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(a.toMsFromMpegTsClock)(be,!0)+" ms")}}n&&(K=Math.max(0,K));for(var Y=0,ve=0,ue=0;ue<H;ue++){for(var Ee=I[ue],Ke=Ee.units,Ye=Ke.length,Je=0,tt=0;tt<Ye;tt++)Je+=Ke[tt].data.length;ve+=Je,Y+=Ye,Ee.length=Je,Ee.dts=Math.max(Ee.dts,K),Ee.pts=Math.max(Ee.pts,Ee.dts,0),ae=Math.min(Ee.pts,ae),se=Math.max(Ee.pts,se)}q=I[H-1].dts;var at=ve+4*Y+8,lt;try{lt=new Uint8Array(at)}catch(Or){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:at,reason:"fail allocating video mdat "+at});return}var je=new DataView(lt.buffer);je.setUint32(0,at),lt.set(h.default.types.mdat,4);for(var Ce=0;Ce<H;Ce++){for(var Qe=I[Ce],st=Qe.units,Ge=0,rt=0,Re=st.length;rt<Re;rt++){var Se=st[rt],De=Se.data,fe=Se.data.byteLength;je.setUint32(U,fe),U+=4,lt.set(De,U),U+=fe,Ge+=4+fe}if(Ce<H-1)B=I[Ce+1].dts-Qe.dts;else{var ye=this.config,_e=Qe.dts-I[Ce>0?Ce-1:Ce].dts;if(ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ae=Math.floor(ye.maxBufferHole*N),We=(M?ae+M*N:this.nextAudioPts)-Qe.pts;We>Ae?(B=We-_e,B<0&&(B=_e),i.logger.log("[mp4-remuxer]: It is approximately "+We/90+" ms to the next segment; using duration "+B/90+" ms for the last video frame.")):B=_e}else B=_e}var Xe=Math.round(Qe.pts-Qe.dts);G.push(new x(Qe.key,B,Ge,Xe))}if(G.length&&g&&g<70){var ft=G[0].flags;ft.dependsOn=2,ft.isNonSync=0}console.assert(B!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=q+B,this.isVideoContiguous=!0;var vt=h.default.moof(v.sequenceNumber++,K,_({},v,{samples:G})),Kt="video",kt={data1:vt,data2:lt,startPTS:ae/N,endPTS:(se+B)/N,startDTS:K/N,endDTS:z/N,type:Kt,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:v.dropped};return v.samples=[],v.dropped=0,console.assert(lt.length,"MDAT length must not be zero"),kt},O.remuxAudio=function(v,y,T,M,N){var I=v.inputTimeScale,G=v.samplerate?v.samplerate:I,H=I/G,W=v.isAAC?c:m,z=W*H,U=this._initPTS,B=!v.isAAC&&this.typeSupported.mpeg,K=[],q=v.samples,ae=B?0:8,se=this.nextAudioPts||-1,we=y*I;if(this.isAudioContiguous=T=T||q.length&&se>0&&(M&&Math.abs(we-se)<9e3||Math.abs(t(q[0].pts-U,we)-se)<20*z),q.forEach(function(De){De.pts=t(De.pts-U,we)}),!T||se<0){if(q=q.filter(function(De){return De.pts>=0}),!q.length)return;N===0?se=0:M?se=Math.max(0,we):se=q[0].pts}if(v.isAAC)for(var Te=N!==void 0,de=this.config.maxAudioFramesDrift,xe=0,pe=se;xe<q.length;xe++){var ne=q[xe],ie=ne.pts,ee=ie-pe,le=Math.abs(1e3*ee/I);if(ee<=-de*z&&Te)xe===0&&(i.logger.warn("Audio frame @ "+(ie/I).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ee/I)+" ms."),this.nextAudioPts=se=pe=ie);else if(ee>=de*z&&le<p&&Te){var Q=Math.round(ee/z);pe=ie-Q*z,pe<0&&(Q--,pe+=z),xe===0&&(this.nextAudioPts=se=pe),i.logger.warn("[mp4-remuxer]: Injecting "+Q+" audio frame @ "+(pe/I).toFixed(3)+"s due to "+Math.round(1e3*ee/I)+" ms gap.");for(var Z=0;Z<Q;Z++){var be=Math.max(pe,0),te=u.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);te||(i.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),te=ne.unit.subarray()),q.splice(xe,0,{unit:te,pts:be}),pe+=z,xe++}}ne.pts=pe,pe+=z}for(var $=null,X=null,Y,ve=0,ue=q.length;ue--;)ve+=q[ue].unit.byteLength;for(var Ee=0,Ke=q.length;Ee<Ke;Ee++){var Ye=q[Ee],Je=Ye.unit,tt=Ye.pts;if(X!==null){var at=K[Ee-1];at.duration=Math.round((tt-X)/H)}else if(T&&v.isAAC&&(tt=se),$=tt,ve>0){ve+=ae;try{Y=new Uint8Array(ve)}catch(De){this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ve,reason:"fail allocating audio mdat "+ve});return}if(!B){var lt=new DataView(Y.buffer);lt.setUint32(0,ve),Y.set(h.default.types.mdat,4)}}else return;Y.set(Je,ae);var je=Je.byteLength;ae+=je,K.push(new x(!0,W,je,0)),X=tt}var Ce=K.length;if(!Ce)return;var Qe=K[K.length-1];this.nextAudioPts=se=X+H*Qe.duration;var st=B?new Uint8Array(0):h.default.moof(v.sequenceNumber++,$/H,_({},v,{samples:K}));v.samples=[];var Ge=$/I,rt=se/I,Re="audio",Se={data1:st,data2:Y,startPTS:Ge,endPTS:rt,startDTS:Ge,endDTS:rt,type:Re,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(Y.length,"MDAT length must not be zero"),Se},O.remuxEmptyAudio=function(v,y,T,M){var N=v.inputTimeScale,I=v.samplerate?v.samplerate:N,G=N/I,H=this.nextAudioPts,W=(H!==null?H:M.startDTS*N)+this._initDTS,z=M.endDTS*N+this._initDTS,U=G*c,B=Math.ceil((z-W)/U),K=u.default.getSilentFrame(v.manifestCodec||v.codec,v.channelCount);if(i.logger.warn("[mp4-remuxer]: remux empty Audio"),!K){i.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var q=[],ae=0;ae<B;ae++){var se=W+ae*U;q.push({unit:K,pts:se,dts:se})}return v.samples=q,this.remuxAudio(v,y,T,!1)},O.remuxID3=function(v,y){var T=v.samples.length;if(!T)return;for(var M=v.inputTimeScale,N=this._initPTS,I=this._initDTS,G=0;G<T;G++){var H=v.samples[G];H.pts=t(H.pts-N,y*M)/M,H.dts=t(H.dts-I,y*M)/M}var W=v.samples;return v.samples=[],{samples:W}},O.remuxText=function(v,y){var T=v.samples.length;if(!T)return;for(var M=v.inputTimeScale,N=this._initPTS,I=0;I<T;I++){var G=v.samples[I];G.pts=t(G.pts-N,y*M)/M}v.samples.sort(function(W,z){return W.pts-z.pts});var H=v.samples;return v.samples=[],{samples:H}},P}();function t(P,O){var E;if(O===null)return P;for(O<P?E=-8589934592:E=8589934592;Math.abs(P-O)>4294967296;)P+=E;return P}function S(P){for(var O=0;O<P.length;O++)if(P[O].key)return O;return-1}var x=function(O,E,v,y){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=E,this.size=v,this.cts=y,this.flags=new s(O)},s=function(O){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=O?2:1,this.isNonSync=O?0:1}},"./src/remux/passthrough-remuxer.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/polyfills/number.ts"),u=C("./src/utils/mp4-tools.ts"),h=C("./src/loader/fragment.ts"),w=C("./src/utils/logger.ts"),d=function(){function a(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var _=a.prototype;return _.destroy=function(){},_.resetTimeStamp=function(c){this.initPTS=c,this.lastEndDTS=null},_.resetNextTimestamp=function(){this.lastEndDTS=null},_.resetInitSegment=function(c,m,g){this.audioCodec=m,this.videoCodec=g,this.generateInitSegment(c),this.emitInitSegment=!0},_.generateInitSegment=function(c){var m=this.audioCodec,g=this.videoCodec;if(!c||!c.byteLength){this.initTracks=void 0,this.initData=void 0;return}var b=this.initData=Object(u.parseInitSegment)(c);m||(m=l(b.audio,h.ElementaryStreamTypes.AUDIO)),g||(g=l(b.video,h.ElementaryStreamTypes.VIDEO));var n={};b.audio&&b.video?n.audiovideo={container:"video/mp4",codec:m+","+g,initSegment:c,id:"main"}:b.audio?n.audio={container:"audio/mp4",codec:m,initSegment:c,id:"audio"}:b.video?n.video={container:"video/mp4",codec:g,initSegment:c,id:"main"}:w.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},_.remux=function(c,m,g,b,n){var o=this.initPTS,t=this.lastEndDTS,S={audio:void 0,video:void 0,text:b,id3:g,initSegment:void 0};Object(D.isFiniteNumber)(t)||(t=this.lastEndDTS=n||0);var x=m.samples;if(!x||!x.length)return S;var s={initPTS:void 0,timescale:1},P=this.initData;if((!P||!P.length)&&(this.generateInitSegment(x),P=this.initData),!P||!P.length)return w.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),S;this.emitInitSegment&&(s.tracks=this.initTracks,this.emitInitSegment=!1),Object(D.isFiniteNumber)(o)||(this.initPTS=s.initPTS=o=i(P,x,t));var O=Object(u.getDuration)(x,P),E=t,v=O+E;Object(u.offsetStartDTS)(P,x,o),O>0?this.lastEndDTS=v:(w.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!P.audio,T=!!P.video,M="";y&&(M+="audio"),T&&(M+="video");var N={data1:x,startPTS:E,startDTS:E,endPTS:v,endDTS:v,type:M,hasAudio:y,hasVideo:T,nb:1,dropped:0};return S.audio=N.type==="audio"?N:void 0,S.video=N.type!=="audio"?N:void 0,S.text=b,S.id3=g,S.initSegment=s,S},a}(),i=function(_,p,c){return Object(u.getStartDTS)(_,p)-c};function l(a,_){var p=a==null?void 0:a.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||_===h.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}f.default=d},"./src/task-loop.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var h=u.prototype;return h.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},h.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},h.onHandlerDestroyed=function(){},h.hasInterval=function(){return!!this._tickInterval},h.hasNextTick=function(){return!!this._tickTimer},h.setInterval=function(d){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,d),!0)},h.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},h.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},h.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},h.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},h.doTick=function(){},u}()},"./src/types/cmcd.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"CMCDVersion",function(){return D}),C.d(f,"CMCDObjectType",function(){return u}),C.d(f,"CMCDStreamingFormat",function(){return h}),C.d(f,"CMCDStreamType",function(){return w});var D=1,u;(function(d){d.MANIFEST="m",d.AUDIO="a",d.VIDEO="v",d.MUXED="av",d.INIT="i",d.CAPTION="c",d.TIMED_TEXT="tt",d.KEY="k",d.OTHER="o"})(u||(u={}));var h;(function(d){d.DASH="d",d.HLS="h",d.SMOOTH="s",d.OTHER="o"})(h||(h={}));var w;(function(d){d.VOD="v",d.LIVE="l"})(w||(w={}))},"./src/types/level.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"HlsSkip",function(){return h}),C.d(f,"getSkipValue",function(){return w}),C.d(f,"HlsUrlParameters",function(){return d}),C.d(f,"Level",function(){return i});function D(l,a){for(var _=0;_<a.length;_++){var p=a[_];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(l,p.key,p)}}function u(l,a,_){return a&&D(l.prototype,a),_&&D(l,_),l}var h;(function(l){l.No="",l.Yes="YES",l.v2="v2"})(h||(h={}));function w(l,a){var _=l.canSkipUntil,p=l.canSkipDateRanges,c=l.endSN,m=a!==void 0?a-c:0;return _&&m<_?p?h.v2:h.Yes:h.No}var d=function(){function l(_,p,c){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=_,this.part=p,this.skip=c}var a=l.prototype;return a.addDirectives=function(p){var c=new self.URL(p);return this.msn!==void 0&&c.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&c.searchParams.set("_HLS_part",this.part.toString()),this.skip&&c.searchParams.set("_HLS_skip",this.skip),c.toString()},l}(),i=function(){function l(a){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[a.url],this.attrs=a.attrs,this.bitrate=a.bitrate,a.details&&(this.details=a.details),this.id=a.id||0,this.name=a.name,this.width=a.width||0,this.height=a.height||0,this.audioCodec=a.audioCodec,this.videoCodec=a.videoCodec,this.unknownCodecs=a.unknownCodecs,this.codecSet=[a.videoCodec,a.audioCodec].filter(function(_){return _}).join(",").replace(/\.[^.,]+/g,"")}return u(l,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(_){var p=_%this.url.length;this._urlId!==p&&(this.details=void 0,this._urlId=p)}}]),l}()},"./src/types/loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"PlaylistContextType",function(){return D}),C.d(f,"PlaylistLevelType",function(){return u});var D;(function(h){h.MANIFEST="manifest",h.LEVEL="level",h.AUDIO_TRACK="audioTrack",h.SUBTITLE_TRACK="subtitleTrack"})(D||(D={}));var u;(function(h){h.MAIN="main",h.AUDIO="audio",h.SUBTITLE="subtitle"})(u||(u={}))},"./src/types/transmuxer.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"ChunkMetadata",function(){return D});var D=function(w,d,i,l,a,_){l===void 0&&(l=0),a===void 0&&(a=-1),_===void 0&&(_=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=u(),this.buffering={audio:u(),video:u(),audiovideo:u()},this.level=w,this.sn=d,this.id=i,this.size=l,this.part=a,this.partial=_};function u(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"AttrList",function(){return h});var D=/^(\d+)x(\d+)$/,u=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,h=function(){function w(i){typeof i=="string"&&(i=w.parseAttrList(i));for(var l in i)i.hasOwnProperty(l)&&(this[l]=i[l])}var d=w.prototype;return d.decimalInteger=function(l){var a=parseInt(this[l],10);return a>Number.MAX_SAFE_INTEGER?Infinity:a},d.hexadecimalInteger=function(l){if(this[l]){var a=(this[l]||"0x").slice(2);a=(a.length&1?"0":"")+a;for(var _=new Uint8Array(a.length/2),p=0;p<a.length/2;p++)_[p]=parseInt(a.slice(p*2,p*2+2),16);return _}else return null},d.hexadecimalIntegerAsNumber=function(l){var a=parseInt(this[l],16);return a>Number.MAX_SAFE_INTEGER?Infinity:a},d.decimalFloatingPoint=function(l){return parseFloat(this[l])},d.optionalFloat=function(l,a){var _=this[l];return _?parseFloat(_):a},d.enumeratedString=function(l){return this[l]},d.bool=function(l){return this[l]==="YES"},d.decimalResolution=function(l){var a=D.exec(this[l]);return a===null?void 0:{width:parseInt(a[1],10),height:parseInt(a[2],10)}},w.parseAttrList=function(l){var a,_={},p='"';for(u.lastIndex=0;(a=u.exec(l))!==null;){var c=a[2];c.indexOf(p)===0&&c.lastIndexOf(p)===c.length-1&&(c=c.slice(1,-1)),_[a[1]]=c}return _},w}()},"./src/utils/binary-search.ts":function(L,f,C){"use strict";C.r(f);var D={search:function(h,w){for(var d=0,i=h.length-1,l=null,a=null;d<=i;){l=(d+i)/2|0,a=h[l];var _=w(a);if(_>0)d=l+1;else if(_<0)i=l-1;else return a}return null}};f.default=D},"./src/utils/buffer-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"BufferHelper",function(){return h});var D=C("./src/utils/logger.ts"),u={length:0,start:function(){return 0},end:function(){return 0}},h=function(){function w(){}return w.isBuffered=function(i,l){try{if(i){for(var a=w.getBuffered(i),_=0;_<a.length;_++)if(l>=a.start(_)&&l<=a.end(_))return!0}}catch(p){}return!1},w.bufferInfo=function(i,l,a){try{if(i){var _=w.getBuffered(i),p=[],c;for(c=0;c<_.length;c++)p.push({start:_.start(c),end:_.end(c)});return this.bufferedInfo(p,l,a)}}catch(m){}return{len:0,start:l,end:l,nextStart:void 0}},w.bufferedInfo=function(i,l,a){l=Math.max(0,l),i.sort(function(s,P){var O=s.start-P.start;return O||P.end-s.end});var _=[];if(a)for(var p=0;p<i.length;p++){var c=_.length;if(c){var m=_[c-1].end;i[p].start-m<a?i[p].end>m&&(_[c-1].end=i[p].end):_.push(i[p])}else _.push(i[p])}else _=i;for(var g=0,b,n=l,o=l,t=0;t<_.length;t++){var S=_[t].start,x=_[t].end;if(l+a>=S&&l<x)n=S,o=x,g=o-l;else if(l+a<S){b=S;break}}return{len:g,start:n||0,end:o||0,nextStart:b}},w.getBuffered=function(i){try{return i.buffered}catch(l){return D.logger.log("failed to get media.buffered",l),u}},w}()},"./src/utils/cea-608-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"Row",function(){return o}),C.d(f,"CaptionScreen",function(){return t});var D=C("./src/utils/logger.ts"),u={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},h=function(v){var y=v;return u.hasOwnProperty(v)&&(y=u[v]),String.fromCharCode(y)},w=15,d=100,i={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},a={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},_={25:2,26:4,29:6,30:8,31:10,27:13,28:15},p=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],c;(function(E){E[E.ERROR=0]="ERROR",E[E.TEXT=1]="TEXT",E[E.WARNING=2]="WARNING",E[E.INFO=2]="INFO",E[E.DEBUG=3]="DEBUG",E[E.DATA=3]="DATA"})(c||(c={}));var m=function(){function E(){this.time=null,this.verboseLevel=c.ERROR}var v=E.prototype;return v.log=function(T,M){this.verboseLevel>=T&&D.logger.log(this.time+" ["+T+"] "+M)},E}(),g=function(v){for(var y=[],T=0;T<v.length;T++)y.push(v[T].toString(16));return y},b=function(){function E(y,T,M,N,I){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=y||"white",this.underline=T||!1,this.italics=M||!1,this.background=N||"black",this.flash=I||!1}var v=E.prototype;return v.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},v.setStyles=function(T){for(var M=["foreground","underline","italics","background","flash"],N=0;N<M.length;N++){var I=M[N];T.hasOwnProperty(I)&&(this[I]=T[I])}},v.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},v.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},v.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},v.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},E}(),n=function(){function E(y,T,M,N,I,G){this.uchar=void 0,this.penState=void 0,this.uchar=y||" ",this.penState=new b(T,M,N,I,G)}var v=E.prototype;return v.reset=function(){this.uchar=" ",this.penState.reset()},v.setChar=function(T,M){this.uchar=T,this.penState.copy(M)},v.setPenState=function(T){this.penState.copy(T)},v.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},v.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},v.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},E}(),o=function(){function E(y){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var T=0;T<d;T++)this.chars.push(new n);this.logger=y,this.pos=0,this.currPenState=new b}var v=E.prototype;return v.equals=function(T){for(var M=!0,N=0;N<d;N++)if(!this.chars[N].equals(T.chars[N])){M=!1;break}return M},v.copy=function(T){for(var M=0;M<d;M++)this.chars[M].copy(T.chars[M])},v.isEmpty=function(){for(var T=!0,M=0;M<d;M++)if(!this.chars[M].isEmpty()){T=!1;break}return T},v.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(c.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>d&&(this.logger.log(c.DEBUG,"Too large cursor position "+this.pos),this.pos=d)},v.moveCursor=function(T){var M=this.pos+T;if(T>1)for(var N=this.pos+1;N<M+1;N++)this.chars[N].setPenState(this.currPenState);this.setCursor(M)},v.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},v.insertChar=function(T){T>=144&&this.backSpace();var M=h(T);if(this.pos>=d){this.logger.log(c.ERROR,"Cannot insert "+T.toString(16)+" ("+M+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(M,this.currPenState),this.moveCursor(1)},v.clearFromPos=function(T){var M;for(M=T;M<d;M++)this.chars[M].reset()},v.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},v.clearToEndOfRow=function(){this.clearFromPos(this.pos)},v.getTextString=function(){for(var T=[],M=!0,N=0;N<d;N++){var I=this.chars[N].uchar;I!==" "&&(M=!1),T.push(I)}return M?"":T.join("")},v.setPenStyles=function(T){this.currPenState.setStyles(T);var M=this.chars[this.pos];M.setPenState(this.currPenState)},E}(),t=function(){function E(y){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T<w;T++)this.rows.push(new o(y));this.logger=y,this.currRow=w-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var v=E.prototype;return v.reset=function(){for(var T=0;T<w;T++)this.rows[T].clear();this.currRow=w-1},v.equals=function(T){for(var M=!0,N=0;N<w;N++)if(!this.rows[N].equals(T.rows[N])){M=!1;break}return M},v.copy=function(T){for(var M=0;M<w;M++)this.rows[M].copy(T.rows[M])},v.isEmpty=function(){for(var T=!0,M=0;M<w;M++)if(!this.rows[M].isEmpty()){T=!1;break}return T},v.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},v.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},v.insertChar=function(T){var M=this.rows[this.currRow];M.insertChar(T)},v.setPen=function(T){var M=this.rows[this.currRow];M.setPenStyles(T)},v.moveCursor=function(T){var M=this.rows[this.currRow];M.moveCursor(T)},v.setCursor=function(T){this.logger.log(c.INFO,"setCursor: "+T);var M=this.rows[this.currRow];M.setCursor(T)},v.setPAC=function(T){this.logger.log(c.INFO,"pacData = "+JSON.stringify(T));var M=T.row-1;if(this.nrRollUpRows&&M<this.nrRollUpRows-1&&(M=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==M){for(var N=0;N<w;N++)this.rows[N].clear();var I=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var H=G.rows[I].cueStartTime,W=this.logger.time;if(H&&W!==null&&H<W)for(var z=0;z<this.nrRollUpRows;z++)this.rows[M-this.nrRollUpRows+z+1].copy(G.rows[I+z])}}this.currRow=M;var U=this.rows[this.currRow];if(T.indent!==null){var B=T.indent,K=Math.max(B-1,0);U.setCursor(T.indent),T.color=U.chars[K].penState.foreground}var q={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(q)},v.setBkgData=function(T){this.logger.log(c.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},v.setRollUpRows=function(T){this.nrRollUpRows=T},v.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(c.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(c.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,M=this.rows.splice(T,1)[0];M.clear(),this.rows.splice(this.currRow,0,M),this.logger.log(c.INFO,"Rolling up")},v.getDisplayText=function(T){T=T||!1;for(var M=[],N="",I=-1,G=0;G<w;G++){var H=this.rows[G].getTextString();H&&(I=G+1,T?M.push("Row "+I+": '"+H+"'"):M.push(H.trim()))}return M.length>0&&(T?N="["+M.join(" | ")+"]":N=M.join(`
`)),N},v.getTextAndFormat=function(){return this.rows},E}(),S=function(){function E(y,T,M){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=y,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new t(M),this.nonDisplayedMemory=new t(M),this.lastOutputScreen=new t(M),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=M}var v=E.prototype;return v.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[w-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},v.getHandler=function(){return this.outputFilter},v.setHandler=function(T){this.outputFilter=T},v.setPAC=function(T){this.writeScreen.setPAC(T)},v.setBkgData=function(T){this.writeScreen.setBkgData(T)},v.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(c.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},v.insertChars=function(T){for(var M=0;M<T.length;M++)this.writeScreen.insertChar(T[M]);var N=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(c.INFO,N+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(c.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},v.ccRCL=function(){this.logger.log(c.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},v.ccBS=function(){if(this.logger.log(c.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},v.ccAOF=function(){},v.ccAON=function(){},v.ccDER=function(){this.logger.log(c.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},v.ccRU=function(T){this.logger.log(c.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},v.ccFON=function(){this.logger.log(c.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},v.ccRDC=function(){this.logger.log(c.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},v.ccTR=function(){this.logger.log(c.INFO,"TR"),this.setMode("MODE_TEXT")},v.ccRTD=function(){this.logger.log(c.INFO,"RTD"),this.setMode("MODE_TEXT")},v.ccEDM=function(){this.logger.log(c.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},v.ccCR=function(){this.logger.log(c.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},v.ccENM=function(){this.logger.log(c.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},v.ccEOC=function(){if(this.logger.log(c.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(c.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},v.ccTO=function(T){this.logger.log(c.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},v.ccMIDROW=function(T){var M={flash:!1};if(M.underline=T%2===1,M.italics=T>=46,M.italics)M.foreground="white";else{var N=Math.floor(T/2)-16,I=["white","green","blue","cyan","red","yellow","magenta"];M.foreground=I[N]}this.logger.log(c.INFO,"MIDROW: "+JSON.stringify(M)),this.writeScreen.setPen(M)},v.outputDataUpdate=function(T){T===void 0&&(T=!1);var M=this.logger.time;if(M===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=M:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,M,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:M),this.lastOutputScreen.copy(this.displayedMemory))},v.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},E}(),x=function(){function E(y,T,M){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var N=new m;this.channels=[null,new S(y,T,N),new S(y+1,M,N)],this.cmdHistory=O(),this.logger=N}var v=E.prototype;return v.getHandler=function(T){return this.channels[T].getHandler()},v.setHandler=function(T,M){this.channels[T].setHandler(M)},v.addData=function(T,M){var N,I,G,H=!1;this.logger.time=T;for(var W=0;W<M.length;W+=2){if(I=M[W]&127,G=M[W+1]&127,I===0&&G===0)continue;if(this.logger.log(c.DATA,"["+g([M[W],M[W+1]])+"] -> ("+g([I,G])+")"),N=this.parseCmd(I,G),N||(N=this.parseMidrow(I,G)),N||(N=this.parsePAC(I,G)),N||(N=this.parseBackgroundAttributes(I,G)),!N&&(H=this.parseChars(I,G),H)){var z=this.currentChannel;if(z&&z>0){var U=this.channels[z];U.insertChars(H)}else this.logger.log(c.WARNING,"No channel found yet. TEXT-MODE?")}!N&&!H&&this.logger.log(c.WARNING,"Couldn't parse cleaned data "+g([I,G])+" orig: "+g([M[W],M[W+1]]))}},v.parseCmd=function(T,M){var N=this.cmdHistory,I=(T===20||T===28||T===21||T===29)&&M>=32&&M<=47,G=(T===23||T===31)&&M>=33&&M<=35;if(!(I||G))return!1;if(P(T,M,N))return s(null,null,N),this.logger.log(c.DEBUG,"Repeated command ("+g([T,M])+") is dropped"),!0;var H=T===20||T===21||T===23?1:2,W=this.channels[H];return T===20||T===21||T===28||T===29?M===32?W.ccRCL():M===33?W.ccBS():M===34?W.ccAOF():M===35?W.ccAON():M===36?W.ccDER():M===37?W.ccRU(2):M===38?W.ccRU(3):M===39?W.ccRU(4):M===40?W.ccFON():M===41?W.ccRDC():M===42?W.ccTR():M===43?W.ccRTD():M===44?W.ccEDM():M===45?W.ccCR():M===46?W.ccENM():M===47&&W.ccEOC():W.ccTO(M-32),s(T,M,N),this.currentChannel=H,!0},v.parseMidrow=function(T,M){var N=0;if((T===17||T===25)&&M>=32&&M<=47){if(T===17?N=1:N=2,N!==this.currentChannel)return this.logger.log(c.ERROR,"Mismatch channel in midrow parsing"),!1;var I=this.channels[N];return I?(I.ccMIDROW(M),this.logger.log(c.DEBUG,"MIDROW ("+g([T,M])+")"),!0):!1}return!1},v.parsePAC=function(T,M){var N,I=this.cmdHistory,G=(T>=17&&T<=23||T>=25&&T<=31)&&M>=64&&M<=127,H=(T===16||T===24)&&M>=64&&M<=95;if(!(G||H))return!1;if(P(T,M,I))return s(null,null,I),!0;var W=T<=23?1:2;M>=64&&M<=95?N=W===1?i[T]:a[T]:N=W===1?l[T]:_[T];var z=this.channels[W];return z?(z.setPAC(this.interpretPAC(N,M)),s(T,M,I),this.currentChannel=W,!0):!1},v.interpretPAC=function(T,M){var N,I={color:null,italics:!1,indent:null,underline:!1,row:T};return M>95?N=M-96:N=M-64,I.underline=(N&1)===1,N<=13?I.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(N/2)]:N<=15?(I.italics=!0,I.color="white"):I.indent=Math.floor((N-16)/2)*4,I},v.parseChars=function(T,M){var N,I=null,G=null;if(T>=25?(N=2,G=T-8):(N=1,G=T),G>=17&&G<=19){var H;G===17?H=M+80:G===18?H=M+112:H=M+144,this.logger.log(c.INFO,"Special char '"+h(H)+"' in channel "+N),I=[H]}else T>=32&&T<=127&&(I=M===0?[T]:[T,M]);if(I){var W=g(I);this.logger.log(c.DEBUG,"Char codes = "+W.join(",")),s(T,M,this.cmdHistory)}return I},v.parseBackgroundAttributes=function(T,M){var N=(T===16||T===24)&&M>=32&&M<=47,I=(T===23||T===31)&&M>=45&&M<=47;if(!(N||I))return!1;var G,H={};T===16||T===24?(G=Math.floor((M-32)/2),H.background=p[G],M%2===1&&(H.background=H.background+"_semi")):M===45?H.background="transparent":(H.foreground="black",M===47&&(H.underline=!0));var W=T<=23?1:2,z=this.channels[W];return z.setBkgData(H),s(T,M,this.cmdHistory),!0},v.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var M=this.channels[T];M&&M.reset()}this.cmdHistory=O()},v.cueSplitAtTime=function(T){for(var M=0;M<this.channels.length;M++){var N=this.channels[M];N&&N.cueSplitAtTime(T)}},E}();function s(E,v,y){y.a=E,y.b=v}function P(E,v,y){return y.a===E&&y.b===v}function O(){return{a:null,b:null}}f.default=x},"./src/utils/codecs.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"isCodecType",function(){return u}),C.d(f,"isCodecSupportedInMp4",function(){return h});var D={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function u(w,d){var i=D[d];return!!i&&i[w.slice(0,4)]===!0}function h(w,d){return MediaSource.isTypeSupported((d||"video")+'/mp4;codecs="'+w+'"')}},"./src/utils/cues.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/vttparser.ts"),u=C("./src/utils/webvtt-parser.ts"),h=C("./src/utils/texttrack-utils.ts"),w=/\s/,d={newCue:function(l,a,_,p){for(var c=[],m,g,b,n,o,t=self.VTTCue||self.TextTrackCue,S=0;S<p.rows.length;S++)if(m=p.rows[S],b=!0,n=0,o="",!m.isEmpty()){for(var x=0;x<m.chars.length;x++)w.test(m.chars[x].uchar)&&b?n++:(o+=m.chars[x].uchar,b=!1);m.cueStartTime=a,a===_&&(_+=1e-4),n>=16?n--:n++;var s=Object(D.fixLineBreaks)(o.trim()),P=Object(u.generateCueId)(a,_,s);(!l||!l.cues||!l.cues.getCueById(P))&&(g=new t(a,_,s),g.id=P,g.line=S+1,g.align="left",g.position=10+Math.min(80,Math.floor(n*8/32)*10),c.push(g))}return l&&c.length&&(c.sort(function(O,E){return O.line==="auto"||E.line==="auto"?0:O.line>8&&E.line>8?E.line-O.line:O.line-E.line}),c.forEach(function(O){return Object(h.addCueToTrack)(l,O)})),c}};f.default=d},"./src/utils/discontinuities.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"findFirstFragWithCC",function(){return w}),C.d(f,"shouldAlignOnDiscontinuities",function(){return d}),C.d(f,"findDiscontinuousReferenceFrag",function(){return i}),C.d(f,"adjustSlidingStart",function(){return a}),C.d(f,"alignStream",function(){return _}),C.d(f,"alignPDT",function(){return c}),C.d(f,"alignFragmentByPDTDelta",function(){return m}),C.d(f,"alignMediaPlaylistByPDT",function(){return g});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/logger.ts"),h=C("./src/controller/level-helper.ts");function w(b,n){for(var o=null,t=0,S=b.length;t<S;t++){var x=b[t];if(x&&x.cc===n){o=x;break}}return o}function d(b,n,o){return!!(n.details&&(o.endCC>o.startCC||b&&b.cc<o.startCC))}function i(b,n){var o=b.fragments,t=n.fragments;if(!t.length||!o.length){u.logger.log("No fragments to align");return}var S=w(o,t[0].cc);if(!S||S&&!S.startPTS){u.logger.log("No frag in previous level to align on");return}return S}function l(b,n){if(b){var o=b.start+n;b.start=b.startPTS=o,b.endPTS=o+b.duration}}function a(b,n){for(var o=n.fragments,t=0,S=o.length;t<S;t++)l(o[t],b);n.fragmentHint&&l(n.fragmentHint,b),n.alignedSliding=!0}function _(b,n,o){if(!n)return;p(b,o,n),!o.alignedSliding&&n.details&&c(o,n.details),!o.alignedSliding&&n.details&&!o.skippedSegments&&Object(h.adjustSliding)(n.details,o)}function p(b,n,o){if(d(b,o,n)){var t=i(o.details,n);t&&Object(D.isFiniteNumber)(t.start)&&(u.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),a(t.start,n))}}function c(b,n){if(!n.fragments.length||!b.hasProgramDateTime||!n.hasProgramDateTime)return;var o=n.fragments[0].programDateTime,t=b.fragments[0].programDateTime,S=(t-o)/1e3+n.fragments[0].start;S&&Object(D.isFiniteNumber)(S)&&(u.logger.log("Adjusting PTS using programDateTime delta "+(t-o)+"ms, sliding:"+S.toFixed(3)+" "+b.url+" "),a(S,b))}function m(b,n){var o=b.programDateTime;if(!o)return;var t=(o-n)/1e3;b.start=b.startPTS=t,b.endPTS=t+b.duration}function g(b,n){if(!n.fragments.length||!b.hasProgramDateTime||!n.hasProgramDateTime)return;var o=n.fragments[0].programDateTime,t=n.fragments[0].start,S=o-t*1e3;b.fragments.forEach(function(x){m(x,S)}),b.fragmentHint&&m(b.fragmentHint,S),b.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/ewma.ts"),u=function(){function h(d,i,l){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=l,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new D.default(d),this.fast_=new D.default(i)}var w=h.prototype;return w.update=function(i,l){var a=this.slow_,_=this.fast_;this.slow_.halfLife!==i&&(this.slow_=new D.default(i,a.getEstimate(),a.getTotalWeight())),this.fast_.halfLife!==l&&(this.fast_=new D.default(l,_.getEstimate(),_.getTotalWeight()))},w.sample=function(i,l){i=Math.max(i,this.minDelayMs_);var a=8*l,_=i/1e3,p=a/_;this.fast_.sample(_,p),this.slow_.sample(_,p)},w.canEstimate=function(){var i=this.fast_;return i&&i.getTotalWeight()>=this.minWeight_},w.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},w.destroy=function(){},h}();f.default=u},"./src/utils/ewma.ts":function(L,f,C){"use strict";C.r(f);var D=function(){function u(w,d,i){d===void 0&&(d=0),i===void 0&&(i=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=w,this.alpha_=w?Math.exp(Math.log(.5)/w):0,this.estimate_=d,this.totalWeight_=i}var h=u.prototype;return h.sample=function(d,i){var l=Math.pow(this.alpha_,d);this.estimate_=i*(1-l)+l*this.estimate_,this.totalWeight_+=d},h.getTotalWeight=function(){return this.totalWeight_},h.getEstimate=function(){if(this.alpha_){var d=1-Math.pow(this.alpha_,this.totalWeight_);if(d)return this.estimate_/d}return this.estimate_},u}();f.default=D},"./src/utils/fetch-loader.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"fetchSupported",function(){return m});var D=C("./src/polyfills/number.ts"),u=C("./src/loader/load-stats.ts"),h=C("./src/demux/chunk-cache.ts");function w(t,S){t.prototype=Object.create(S.prototype),t.prototype.constructor=t,_(t,S)}function d(t){var S=typeof Map=="function"?new Map:void 0;return d=function(s){if(s===null||!a(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof S!="undefined"){if(S.has(s))return S.get(s);S.set(s,P)}function P(){return i(s,arguments,p(this).constructor)}return P.prototype=Object.create(s.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),_(P,s)},d(t)}function i(t,S,x){return l()?i=Reflect.construct:i=function(P,O,E){var v=[null];v.push.apply(v,O);var y=Function.bind.apply(P,v),T=new y;return E&&_(T,E.prototype),T},i.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function a(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function _(t,S){return _=Object.setPrototypeOf||function(s,P){return s.__proto__=P,s},_(t,S)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},p(t)}function c(){return c=Object.assign||function(t){for(var S=1;S<arguments.length;S++){var x=arguments[S];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(t[s]=x[s])}return t},c.apply(this,arguments)}function m(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var g=function(){function t(x){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=x.fetchSetup||n,this.controller=new self.AbortController,this.stats=new u.LoadStats}var S=t.prototype;return S.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},S.abortInternal=function(){var s=this.response;(!s||!s.ok)&&(this.stats.aborted=!0,this.controller.abort())},S.abort=function(){var s;this.abortInternal(),(s=this.callbacks)!==null&&s!==void 0&&s.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},S.load=function(s,P,O){var E=this,v=this.stats;if(v.loading.start)throw new Error("Loader can only be used once.");v.loading.start=self.performance.now();var y=b(s,this.controller.signal),T=O.onProgress,M=s.responseType==="arraybuffer",N=M?"byteLength":"length";this.context=s,this.config=P,this.callbacks=O,this.request=this.fetchSetup(s,y),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){E.abortInternal(),O.onTimeout(v,s,E.response)},P.timeout),self.fetch(this.request).then(function(I){if(E.response=E.loader=I,!I.ok){var G=I.status,H=I.statusText;throw new o(H||"fetch, bad network response",G,I)}return v.loading.first=Math.max(self.performance.now(),v.loading.start),v.total=parseInt(I.headers.get("Content-Length")||"0"),T&&Object(D.isFiniteNumber)(P.highWaterMark)?E.loadProgressively(I,v,s,P.highWaterMark,T):M?I.arrayBuffer():I.text()}).then(function(I){var G=E.response;self.clearTimeout(E.requestTimeout),v.loading.end=Math.max(self.performance.now(),v.loading.first),v.loaded=v.total=I[N];var H={url:G.url,data:I};T&&!Object(D.isFiniteNumber)(P.highWaterMark)&&T(v,s,I,G),O.onSuccess(H,v,s,G)}).catch(function(I){if(self.clearTimeout(E.requestTimeout),v.aborted)return;var G=I.code||0;O.onError({code:G,text:I.message},s,I.details)})},S.getCacheAge=function(){var s=null;if(this.response){var P=this.response.headers.get("age");s=P?parseFloat(P):null}return s},S.loadProgressively=function(s,P,O,E,v){E===void 0&&(E=0);var y=new h.default,T=s.body.getReader(),M=function N(){return T.read().then(function(I){if(I.done)return y.dataLength&&v(P,O,y.flush(),s),Promise.resolve(new ArrayBuffer(0));var G=I.value,H=G.length;return P.loaded+=H,H<E||y.dataLength?(y.push(G),y.dataLength>=E&&v(P,O,y.flush(),s)):v(P,O,G,s),N()}).catch(function(){return Promise.reject()})};return M()},t}();function b(t,S){var x={method:"GET",mode:"cors",credentials:"same-origin",signal:S,headers:new self.Headers(c({},t.headers))};return t.rangeEnd&&x.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),x}function n(t,S){return new self.Request(t.url,S)}var o=function(t){w(S,t);function S(x,s,P){var O;return O=t.call(this,x)||this,O.code=void 0,O.details=void 0,O.code=s,O.details=P,O}return S}(d(Error));f.default=g},"./src/utils/imsc1-ttml-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"IMSC1_CODEC",function(){return a}),C.d(f,"parseIMSC1",function(){return m});var D=C("./src/utils/mp4-tools.ts"),u=C("./src/utils/vttparser.ts"),h=C("./src/utils/vttcue.ts"),w=C("./src/demux/id3.ts"),d=C("./src/utils/timescale-conversion.ts"),i=C("./src/utils/webvtt-parser.ts");function l(){return l=Object.assign||function(E){for(var v=1;v<arguments.length;v++){var y=arguments[v];for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&(E[T]=y[T])}return E},l.apply(this,arguments)}var a="stpp.ttml.im1t",_=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,p=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,c={left:"start",center:"center",right:"end",start:"start",end:"end"};function m(E,v,y,T,M){var N=Object(D.findBox)(new Uint8Array(E),["mdat"]);if(N.length===0){M(new Error("Could not parse IMSC1 mdat"));return}var I=N[0],G=Object(w.utf8ArrayToStr)(new Uint8Array(E,I.start,I.end-I.start)),H=Object(d.toTimescaleFromScale)(v,1,y);try{T(g(G,H))}catch(W){M(W)}}function g(E,v){var y=new DOMParser,T=y.parseFromString(E,"text/xml"),M=T.getElementsByTagName("tt")[0];if(!M)throw new Error("Invalid ttml");var N={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},I=Object.keys(N).reduce(function(U,B){return U[B]=M.getAttribute("ttp:"+B)||N[B],U},{}),G=M.getAttribute("xml:space")!=="preserve",H=n(b(M,"styling","style")),W=n(b(M,"layout","region")),z=b(M,"body","[begin]");return[].map.call(z,function(U){var B=o(U,G);if(!B||!U.hasAttribute("begin"))return null;var K=s(U.getAttribute("begin"),I),q=s(U.getAttribute("dur"),I),ae=s(U.getAttribute("end"),I);if(K===null)throw x(U);if(ae===null){if(q===null)throw x(U);ae=K+q}var se=new h.default(K-v,ae-v,B);se.id=Object(i.generateCueId)(se.startTime,se.endTime,se.text);var we=W[U.getAttribute("region")],Te=H[U.getAttribute("style")];se.position=10,se.size=80;var de=t(we,Te),xe=de.textAlign;if(xe){var pe=c[xe];pe&&(se.lineAlign=pe),se.align=xe}return l(se,de),se}).filter(function(U){return U!==null})}function b(E,v,y){var T=E.getElementsByTagName(v)[0];return T?[].slice.call(T.querySelectorAll(y)):[]}function n(E){return E.reduce(function(v,y){var T=y.getAttribute("xml:id");return T&&(v[T]=y),v},{})}function o(E,v){return[].slice.call(E.childNodes).reduce(function(y,T,M){var N;return T.nodeName==="br"&&M?y+`
`:(N=T.childNodes)!==null&&N!==void 0&&N.length?o(T,v):v?y+T.textContent.trim().replace(/\s+/g," "):y+T.textContent},"")}function t(E,v){var y="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(M,N){var I=S(v,y,N)||S(E,y,N);return I&&(M[N]=I),M},{})}function S(E,v,y){return E.hasAttributeNS(v,y)?E.getAttributeNS(v,y):null}function x(E){return new Error("Could not parse ttml timestamp "+E)}function s(E,v){if(!E)return null;var y=Object(u.parseTimeStamp)(E);return y===null&&(_.test(E)?y=P(E,v):p.test(E)&&(y=O(E,v))),y}function P(E,v){var y=_.exec(E),T=(y[4]|0)+(y[5]|0)/v.subFrameRate;return(y[1]|0)*3600+(y[2]|0)*60+(y[3]|0)+T/v.frameRate}function O(E,v){var y=p.exec(E),T=Number(y[1]),M=y[2];switch(M){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/v.frameRate;case"t":return T/v.tickRate}return T}},"./src/utils/logger.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"enableLogs",function(){return i}),C.d(f,"logger",function(){return l});var D=function(){},u={trace:D,debug:D,log:D,warn:D,info:D,error:D},h=u;function w(a){var _=self.console[a];return _?_.bind(self.console,"["+a+"] >"):D}function d(a){for(var _=arguments.length,p=new Array(_>1?_-1:0),c=1;c<_;c++)p[c-1]=arguments[c];p.forEach(function(m){h[m]=a[m]?a[m].bind(a):w(m)})}function i(a){if(self.console&&a===!0||typeof a=="object"){d(a,"debug","log","info","warn","error");try{h.log()}catch(_){h=u}}else h=u}var l=h},"./src/utils/mediakeys-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"KeySystems",function(){return D}),C.d(f,"requestMediaKeySystemAccess",function(){return u});var D;(function(h){h.WIDEVINE="com.widevine.alpha",h.PLAYREADY="com.microsoft.playready"})(D||(D={}));var u=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"getMediaSource",function(){return D});function D(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"bin2str",function(){return d}),C.d(f,"readUint16",function(){return i}),C.d(f,"readUint32",function(){return l}),C.d(f,"writeUint32",function(){return a}),C.d(f,"findBox",function(){return _}),C.d(f,"parseSegmentIndex",function(){return p}),C.d(f,"parseInitSegment",function(){return c}),C.d(f,"getStartDTS",function(){return m}),C.d(f,"getDuration",function(){return g}),C.d(f,"computeRawDurationFromSamples",function(){return b}),C.d(f,"offsetStartDTS",function(){return n}),C.d(f,"segmentValidRange",function(){return o}),C.d(f,"appendUint8Array",function(){return t});var D=C("./src/utils/typed-array.ts"),u=C("./src/loader/fragment.ts"),h=Math.pow(2,32)-1,w=[].push;function d(S){return String.fromCharCode.apply(null,S)}function i(S,x){"data"in S&&(x+=S.start,S=S.data);var s=S[x]<<8|S[x+1];return s<0?65536+s:s}function l(S,x){"data"in S&&(x+=S.start,S=S.data);var s=S[x]<<24|S[x+1]<<16|S[x+2]<<8|S[x+3];return s<0?4294967296+s:s}function a(S,x,s){"data"in S&&(x+=S.start,S=S.data),S[x]=s>>24,S[x+1]=s>>16&255,S[x+2]=s>>8&255,S[x+3]=s&255}function _(S,x){var s=[];if(!x.length)return s;var P,O,E;"data"in S?(P=S.data,O=S.start,E=S.end):(P=S,O=0,E=P.byteLength);for(var v=O;v<E;){var y=l(P,v),T=d(P.subarray(v+4,v+8)),M=y>1?v+y:E;if(T===x[0])if(x.length===1)s.push({data:P,start:v+8,end:M});else{var N=_({data:P,start:v+8,end:M},x.slice(1));N.length&&w.apply(s,N)}v=M}return s}function p(S){var x=_(S,["moov"]),s=x[0],P=s?s.end:null,O=_(S,["sidx"]);if(!O||!O[0])return null;var E=[],v=O[0],y=v.data[0],T=y===0?8:16,M=l(v,T);T+=4;var N=0,I=0;y===0?T+=8:T+=16,T+=2;var G=v.end+I,H=i(v,T);T+=2;for(var W=0;W<H;W++){var z=T,U=l(v,z);z+=4;var B=U&2147483647,K=(U&2147483648)>>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var q=l(v,z);z+=4,E.push({referenceSize:B,subsegmentDuration:q,info:{duration:q/M,start:G,end:G+B-1}}),G+=B,z+=4,T=z}return{earliestPresentationTime:N,timescale:M,version:y,referencesCount:H,references:E,moovEndOffset:P}}function c(S){for(var x=[],s=_(S,["moov","trak"]),P=0;P<s.length;P++){var O=s[P],E=_(O,["tkhd"])[0];if(E){var v=E.data[E.start],y=v===0?12:20,T=l(E,y),M=_(O,["mdia","mdhd"])[0];if(M){v=M.data[M.start],y=v===0?12:20;var N=l(M,y),I=_(O,["mdia","hdlr"])[0];if(I){var G=d(I.data.subarray(I.start+8,I.start+12)),H={soun:u.ElementaryStreamTypes.AUDIO,vide:u.ElementaryStreamTypes.VIDEO}[G];if(H){var W=_(O,["mdia","minf","stbl","stsd"])[0],z=void 0;W&&(z=d(W.data.subarray(W.start+12,W.start+16))),x[T]={timescale:N,type:H},x[H]={timescale:N,id:T,codec:z}}}}}}var U=_(S,["moov","mvex","trex"]);return U.forEach(function(B){var K=l(B,4),q=x[K];q&&(q.default={duration:l(B,12),flags:l(B,20)})}),x}function m(S,x){return _(x,["moof","traf"]).reduce(function(s,P){var O=_(P,["tfdt"])[0],E=O.data[O.start],v=_(P,["tfhd"]).reduce(function(y,T){var M=l(T,4),N=S[M];if(N){var I=l(O,4);E===1&&(I*=Math.pow(2,32),I+=l(O,8));var G=N.timescale||9e4,H=I/G;if(isFinite(H)&&(y===null||H<y))return H}return y},null);return v!==null&&isFinite(v)&&(s===null||v<s)?v:s},null)||0}function g(S,x){for(var s=0,P=0,O=0,E=_(S,["moof","traf"]),v=0;v<E.length;v++){var y=E[v],T=_(y,["tfhd"])[0],M=l(T,4),N=x[M];if(!N)continue;var I=N.default,G=l(T,0)|(I==null?void 0:I.flags),H=I==null?void 0:I.duration;G&8&&(G&2?H=l(T,12):H=l(T,8));for(var W=N.timescale||9e4,z=_(y,["trun"]),U=0;U<z.length;U++){if(H){var B=l(z[U],4);s=H*B}else s=b(z[U]);N.type===u.ElementaryStreamTypes.VIDEO?P+=s/W:N.type===u.ElementaryStreamTypes.AUDIO&&(O+=s/W)}}if(P===0&&O===0){var K=p(S);if(K!=null&&K.references)return K.references.reduce(function(q,ae){return q+ae.info.duration||0},0)}return P||O}function b(S){var x=l(S,0),s=8;x&1&&(s+=4),x&4&&(s+=4);for(var P=0,O=l(S,4),E=0;E<O;E++){if(x&256){var v=l(S,s);P+=v,s+=4}x&512&&(s+=4),x&1024&&(s+=4),x&2048&&(s+=4)}return P}function n(S,x,s){_(x,["moof","traf"]).forEach(function(P){_(P,["tfhd"]).forEach(function(O){var E=l(O,4),v=S[E];if(!v)return;var y=v.timescale||9e4;_(P,["tfdt"]).forEach(function(T){var M=T.data[T.start],N=l(T,4);if(M===0)a(T,4,N-s*y);else{N*=Math.pow(2,32),N+=l(T,8),N-=s*y,N=Math.max(N,0);var I=Math.floor(N/(h+1)),G=Math.floor(N%(h+1));a(T,4,I),a(T,8,G)}})})})}function o(S){var x={valid:null,remainder:null},s=_(S,["moof"]);if(s){if(s.length<2)return x.remainder=S,x}else return x;var P=s[s.length-1];return x.valid=Object(D.sliceUint8)(S,0,P.start-8),x.remainder=Object(D.sliceUint8)(S,P.start-8),x}function t(S,x){var s=new Uint8Array(S.length+x.length);return s.set(S),s.set(x,S.length),s}},"./src/utils/output-filter.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"default",function(){return D});var D=function(){function u(w,d){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=w,this.trackName=d}var h=u.prototype;return h.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},h.newCue=function(d,i,l){(this.startTime===null||this.startTime>d)&&(this.startTime=d),this.endTime=i,this.screen=l,this.timelineController.createCaptionsTrack(this.trackName)},h.reset=function(){this.cueRanges=[]},u}()},"./src/utils/texttrack-utils.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"sendAddTrackEvent",function(){return u}),C.d(f,"addCueToTrack",function(){return h}),C.d(f,"clearCurrentCues",function(){return w}),C.d(f,"removeCuesInRange",function(){return d}),C.d(f,"getCuesInRange",function(){return l});var D=C("./src/utils/logger.ts");function u(a,_){var p;try{p=new Event("addtrack")}catch(c){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=a,_.dispatchEvent(p)}function h(a,_){var p=a.mode;if(p==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(_.id))try{if(a.addCue(_),!a.cues.getCueById(_.id))throw new Error("addCue is failed for: "+_)}catch(m){D.logger.debug("[texttrack-utils]: "+m);var c=new self.TextTrackCue(_.startTime,_.endTime,_.text);c.id=_.id,a.addCue(c)}p==="disabled"&&(a.mode=p)}function w(a){var _=a.mode;if(_==="disabled"&&(a.mode="hidden"),a.cues)for(var p=a.cues.length;p--;)a.removeCue(a.cues[p]);_==="disabled"&&(a.mode=_)}function d(a,_,p){var c=a.mode;if(c==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0)for(var m=l(a.cues,_,p),g=0;g<m.length;g++)a.removeCue(m[g]);c==="disabled"&&(a.mode=c)}function i(a,_){if(_<a[0].startTime)return 0;var p=a.length-1;if(_>a[p].endTime)return-1;for(var c=0,m=p;c<=m;){var g=Math.floor((m+c)/2);if(_<a[g].startTime)m=g-1;else if(_>a[g].startTime&&c<p)c=g+1;else return g}return a[c].startTime-_<_-a[m].startTime?c:m}function l(a,_,p){var c=[],m=i(a,_);if(m>-1)for(var g=m,b=a.length;g<b;g++){var n=a[g];if(n.startTime>=_&&n.endTime<=p)c.push(n);else if(n.startTime>p)return c}return c}},"./src/utils/time-ranges.ts":function(L,f,C){"use strict";C.r(f);var D={toString:function(h){for(var w="",d=h.length,i=0;i<d;i++)w+="["+h.start(i).toFixed(3)+","+h.end(i).toFixed(3)+"]";return w}};f.default=D},"./src/utils/timescale-conversion.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"toTimescaleFromBase",function(){return u}),C.d(f,"toTimescaleFromScale",function(){return h}),C.d(f,"toMsFromMpegTsClock",function(){return w}),C.d(f,"toMpegTsClockFromTimescale",function(){return d});var D=9e4;function u(i,l,a,_){a===void 0&&(a=1),_===void 0&&(_=!1);var p=i*l*a;return _?Math.round(p):p}function h(i,l,a,_){return a===void 0&&(a=1),_===void 0&&(_=!1),u(i,l,1/a,_)}function w(i,l){return l===void 0&&(l=!1),u(i,1e3,1/D,l)}function d(i,l){return l===void 0&&(l=1),u(i,D,1/l)}},"./src/utils/typed-array.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"sliceUint8",function(){return D});function D(u,h,w){return Uint8Array.prototype.slice?u.slice(h,w):new Uint8Array(Array.prototype.slice.call(u,h,w))}},"./src/utils/vttcue.ts":function(L,f,C){"use strict";C.r(f),f.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var D=["","lr","rl"],u=["start","middle","end","left","right"];function h(a,_){if(typeof _!="string")return!1;if(!Array.isArray(a))return!1;var p=_.toLowerCase();return~a.indexOf(p)?p:!1}function w(a){return h(D,a)}function d(a){return h(u,a)}function i(a){for(var _=arguments.length,p=new Array(_>1?_-1:0),c=1;c<_;c++)p[c-1]=arguments[c];for(var m=1;m<arguments.length;m++){var g=arguments[m];for(var b in g)a[b]=g[b]}return a}function l(a,_,p){var c=this,m={enumerable:!0};c.hasBeenReset=!1;var g="",b=!1,n=a,o=_,t=p,S=null,x="",s=!0,P="auto",O="start",E=50,v="middle",y=50,T="middle";Object.defineProperty(c,"id",i({},m,{get:function(){return g},set:function(N){g=""+N}})),Object.defineProperty(c,"pauseOnExit",i({},m,{get:function(){return b},set:function(N){b=!!N}})),Object.defineProperty(c,"startTime",i({},m,{get:function(){return n},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");n=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",i({},m,{get:function(){return o},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");o=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",i({},m,{get:function(){return t},set:function(N){t=""+N,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",i({},m,{get:function(){return S},set:function(N){S=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",i({},m,{get:function(){return x},set:function(N){var I=w(N);if(I===!1)throw new SyntaxError("An invalid or illegal string was specified.");x=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",i({},m,{get:function(){return s},set:function(N){s=!!N,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",i({},m,{get:function(){return P},set:function(N){if(typeof N!="number"&&N!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");P=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",i({},m,{get:function(){return O},set:function(N){var I=d(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");O=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",i({},m,{get:function(){return E},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");E=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",i({},m,{get:function(){return v},set:function(N){var I=d(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");v=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",i({},m,{get:function(){return y},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");y=N,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",i({},m,{get:function(){return T},set:function(N){var I=d(N);if(!I)throw new SyntaxError("An invalid or illegal string was specified.");T=I,this.hasBeenReset=!0}})),c.displayState=void 0}return l.prototype.getCueAsHTML=function(){var a=self.WebVTT;return a.convertCueToDOMTree(self,this.text)},l}()},"./src/utils/vttparser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"parseTimeStamp",function(){return h}),C.d(f,"fixLineBreaks",function(){return _}),C.d(f,"VTTParser",function(){return p});var D=C("./src/utils/vttcue.ts"),u=function(){function c(){}var m=c.prototype;return m.decode=function(b,n){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))},c}();function h(c){function m(b,n,o,t){return(b|0)*3600+(n|0)*60+(o|0)+parseFloat(t||0)}var g=c.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return g?parseFloat(g[2])>59?m(g[2],g[3],0,g[4]):m(g[1],g[2],g[3],g[4]):null}var w=function(){function c(){this.values=Object.create(null)}var m=c.prototype;return m.set=function(b,n){!this.get(b)&&n!==""&&(this.values[b]=n)},m.get=function(b,n,o){return o?this.has(b)?this.values[b]:n[o]:this.has(b)?this.values[b]:n},m.has=function(b){return b in this.values},m.alt=function(b,n,o){for(var t=0;t<o.length;++t)if(n===o[t]){this.set(b,n);break}},m.integer=function(b,n){/^-?\d+$/.test(n)&&this.set(b,parseInt(n,10))},m.percent=function(b,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var o=parseFloat(n);if(o>=0&&o<=100)return this.set(b,o),!0}return!1},c}();function d(c,m,g,b){var n=b?c.split(b):[c];for(var o in n){if(typeof n[o]!="string")continue;var t=n[o].split(g);if(t.length!==2)continue;var S=t[0],x=t[1];m(S,x)}}var i=new D.default(0,0,""),l=i.align==="middle"?"middle":"center";function a(c,m,g){var b=c;function n(){var S=h(c);if(S===null)throw new Error("Malformed timestamp: "+b);return c=c.replace(/^[^\sa-zA-Z-]+/,""),S}function o(S,x){var s=new w;d(S,function(E,v){var y;switch(E){case"region":for(var T=g.length-1;T>=0;T--)if(g[T].id===v){s.set(E,g[T].region);break}break;case"vertical":s.alt(E,v,["rl","lr"]);break;case"line":y=v.split(","),s.integer(E,y[0]),s.percent(E,y[0])&&s.set("snapToLines",!1),s.alt(E,y[0],["auto"]),y.length===2&&s.alt("lineAlign",y[1],["start",l,"end"]);break;case"position":y=v.split(","),s.percent(E,y[0]),y.length===2&&s.alt("positionAlign",y[1],["start",l,"end","line-left","line-right","auto"]);break;case"size":s.percent(E,v);break;case"align":s.alt(E,v,["start",l,"end","left","right"]);break}},/:/,/\s/),x.region=s.get("region",null),x.vertical=s.get("vertical","");var P=s.get("line","auto");P==="auto"&&i.line===-1&&(P=-1),x.line=P,x.lineAlign=s.get("lineAlign","start"),x.snapToLines=s.get("snapToLines",!0),x.size=s.get("size",100),x.align=s.get("align",l);var O=s.get("position","auto");O==="auto"&&i.position===50&&(O=x.align==="start"||x.align==="left"?0:x.align==="end"||x.align==="right"?100:50),x.position=O}function t(){c=c.replace(/^\s+/,"")}if(t(),m.startTime=n(),t(),c.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+b);c=c.substr(3),t(),m.endTime=n(),t(),o(c,m)}function _(c){return c.replace(/<br(?: \/)?>/gi,`
`)}var p=function(){function c(){this.state="INITIAL",this.buffer="",this.decoder=new u,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var m=c.prototype;return m.parse=function(b){var n=this;b&&(n.buffer+=n.decoder.decode(b,{stream:!0}));function o(){var O=n.buffer,E=0;for(O=_(O);E<O.length&&O[E]!=="\r"&&O[E]!==`
`;)++E;var v=O.substr(0,E);return O[E]==="\r"&&++E,O[E]===`
`&&++E,n.buffer=O.substr(E),v}function t(O){d(O,function(E,v){},/:/)}try{var S="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;S=o();var x=S.match(/^()?WEBVTT([ \t].*)?$/);if(!x||!x[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var s=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;s?s=!1:S=o();switch(n.state){case"HEADER":/:/.test(S)?t(S):S||(n.state="ID");continue;case"NOTE":S||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(S)){n.state="NOTE";break}if(!S)continue;if(n.cue=new D.default(0,0,""),n.state="CUE",S.indexOf("-->")===-1){n.cue.id=S;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{a(S,n.cue,n.regionList)}catch(O){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var P=S.indexOf("-->")!==-1;if(!S||P&&(s=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
`),n.cue.text+=S}continue;case"BADCUE":S||(n.state="ID")}}}catch(O){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},m.flush=function(){var b=this;try{if((b.cue||b.state==="HEADER")&&(b.buffer+=`
`,b.parse()),b.state==="INITIAL"||b.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){b.onparsingerror&&b.onparsingerror(n)}return b.onflush&&b.onflush(),this},c}()},"./src/utils/webvtt-parser.ts":function(L,f,C){"use strict";C.r(f),C.d(f,"generateCueId",function(){return p}),C.d(f,"parseWebVTT",function(){return m});var D=C("./src/polyfills/number.ts"),u=C("./src/utils/vttparser.ts"),h=C("./src/demux/id3.ts"),w=C("./src/utils/timescale-conversion.ts"),d=C("./src/remux/mp4-remuxer.ts"),i=/\r\n|\n\r|\n|\r/g,l=function(b,n,o){return o===void 0&&(o=0),b.substr(o,n.length)===n},a=function(b){var n=parseInt(b.substr(-3)),o=parseInt(b.substr(-6,2)),t=parseInt(b.substr(-9,2)),S=b.length>9?parseInt(b.substr(0,b.indexOf(":"))):0;if(!Object(D.isFiniteNumber)(n)||!Object(D.isFiniteNumber)(o)||!Object(D.isFiniteNumber)(t)||!Object(D.isFiniteNumber)(S))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+b);return n+=1e3*o,n+=60*1e3*t,n+=60*60*1e3*S,n},_=function(b){for(var n=5381,o=b.length;o;)n=n*33^b.charCodeAt(--o);return(n>>>0).toString()};function p(g,b,n){return _(g.toString())+_(b.toString())+_(n)}var c=function(b,n,o){var t=b[n],S=b[t.prevCC];if(!S||!S.new&&t.new){b.ccOffset=b.presentationOffset=t.start,t.new=!1;return}for(;(x=S)!==null&&x!==void 0&&x.new;){var x;b.ccOffset+=t.start-S.start,t.new=!1,t=S,S=b[t.prevCC]}b.presentationOffset=o};function m(g,b,n,o,t,S,x,s){var P=new u.VTTParser,O=Object(h.utf8ArrayToStr)(new Uint8Array(g)).trim().replace(i,`
`).split(`
`),E=[],v=Object(w.toMpegTsClockFromTimescale)(b,n),y="00:00.000",T=0,M=0,N,I=!0,G=!1;P.oncue=function(H){var W=o[t],z=o.ccOffset,U=(T-v)/9e4;if(W!=null&&W.new&&(M!==void 0?z=o.ccOffset=W.start:c(o,t,U)),U&&(z=U-o.presentationOffset),G){var B=H.endTime-H.startTime,K=Object(d.normalizePts)((H.startTime+z-M)*9e4,S*9e4)/9e4;H.startTime=K,H.endTime=K+B}var q=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(q)),H.id||(H.id=p(H.startTime,H.endTime,q)),H.endTime>0&&E.push(H)},P.onparsingerror=function(H){N=H},P.onflush=function(){if(N){s(N);return}x(E)},O.forEach(function(H){if(I)if(l(H,"X-TIMESTAMP-MAP=")){I=!1,G=!0,H.substr(16).split(",").forEach(function(W){l(W,"LOCAL:")?y=W.substr(6):l(W,"MPEGTS:")&&(T=parseInt(W.substr(7)))});try{M=a(y)/1e3}catch(W){G=!1,N=W}return}else H===""&&(I=!1);P.parse(H+`
`)}),P.flush()}},"./src/utils/xhr-loader.ts":function(L,f,C){"use strict";C.r(f);var D=C("./src/utils/logger.ts"),u=C("./src/loader/load-stats.ts"),h=/^age:\s*[\d.]+\s*$/m,w=function(){function d(l){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=l?l.xhrSetup:null,this.stats=new u.LoadStats,this.retryDelay=0}var i=d.prototype;return i.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},i.abortInternal=function(){var a=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),a&&(a.onreadystatechange=null,a.onprogress=null,a.readyState!==4&&(this.stats.aborted=!0,a.abort()))},i.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},i.load=function(a,_,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=a,this.config=_,this.callbacks=p,this.retryDelay=_.retryDelay,this.loadInternal()},i.loadInternal=function(){var a=this.config,_=this.context;if(!a)return;var p=this.loader=new self.XMLHttpRequest,c=this.stats;c.loading.first=0,c.loaded=0;var m=this.xhrSetup;try{if(m)try{m(p,_.url)}catch(n){p.open("GET",_.url,!0),m(p,_.url)}p.readyState||p.open("GET",_.url,!0);var g=this.context.headers;if(g)for(var b in g)p.setRequestHeader(b,g[b])}catch(n){this.callbacks.onError({code:p.status,text:n.message},_,p);return}_.rangeEnd&&p.setRequestHeader("Range","bytes="+_.rangeStart+"-"+(_.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=_.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout),p.send()},i.readystatechange=function(){var a=this.context,_=this.loader,p=this.stats;if(!a||!_)return;var c=_.readyState,m=this.config;if(p.aborted)return;if(c>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),c===4){_.onreadystatechange=null,_.onprogress=null;var g=_.status;if(g>=200&&g<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var b,n;if(a.responseType==="arraybuffer"?(b=_.response,n=b.byteLength):(b=_.responseText,n=b.length),p.loaded=p.total=n,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(p,a,b,_),!this.callbacks)return;var t={url:_.responseURL,data:b};this.callbacks.onSuccess(t,p,a,_)}else p.retry>=m.maxRetry||g>=400&&g<499?(D.logger.error(g+" while loading "+a.url),this.callbacks.onError({code:g,text:_.statusText},a,_)):(D.logger.warn(g+" while loading "+a.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,m.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),m.timeout)},i.loadtimeout=function(){D.logger.warn("timeout while loading "+this.context.url);var a=this.callbacks;a&&(this.abortInternal(),a.onTimeout(this.stats,this.context,this.loader))},i.loadprogress=function(a){var _=this.stats;_.loaded=a.loaded,a.lengthComputable&&(_.total=a.total)},i.getCacheAge=function(){var a=null;if(this.loader&&h.test(this.loader.getAllResponseHeaders())){var _=this.loader.getResponseHeader("age");a=_?parseFloat(_):null}return a},d}();f.default=w}}).default})},vHTk:function(j,J,k){j.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.StreamCipher,u=f.algo,h=u.RC4=D.extend({_doReset:function(){for(var i=this._key,l=i.words,a=i.sigBytes,_=this._S=[],p=0;p<256;p++)_[p]=p;for(var p=0,c=0;p<256;p++){var m=p%a,g=l[m>>>2]>>>24-m%4*8&255;c=(c+_[p]+g)%256;var b=_[p];_[p]=_[c],_[c]=b}this._i=this._j=0},_doProcessBlock:function(i,l){i[l]^=w.call(this)},keySize:256/32,ivSize:0});function w(){for(var i=this._S,l=this._i,a=this._j,_=0,p=0;p<4;p++){l=(l+1)%256,a=(a+i[l])%256;var c=i[l];i[l]=i[a],i[a]=c,_|=i[(i[l]+i[a])%256]<<24-p*8}return this._i=l,this._j=a,_}f.RC4=D._createHelper(h);var d=u.RC4Drop=h.extend({cfg:h.cfg.extend({drop:192}),_doReset:function(){h._doReset.call(this);for(var i=this.cfg.drop;i>0;i--)w.call(this)}});f.RC4Drop=D._createHelper(d)}(),L.RC4})},wCXF:function(j,J,k){"use strict";k.d(J,"a",function(){return Je});var L=k("rePB"),f=k("VTBJ"),C=k("KQm4"),D=k("U8pU"),u=k("ODXe"),h=k("cDcd"),w=k("TSYQ"),d=k.n(w),i=k("Gytx"),l=k.n(i),a=k("Kwbf"),_=k("t23M"),p=k("qx4F"),c=k("6eGT"),m=k("IBYe"),g=k("Ff2n"),b=k("c+Xe"),n=k("fyJ8"),o=k("biw7");function t(je,Ce,Qe,st,Ge){var rt=Qe[je]||{},Re=Qe[Ce]||{},Se,De;rt.fixed==="left"?Se=st.left[je]:Re.fixed==="right"&&(De=st.right[Ce]);var fe=!1,ye=!1,_e=!1,Ae=!1,We=Qe[Ce+1],Xe=Qe[je-1];if(Ge==="rtl"){if(Se!==void 0){var ft=Xe&&Xe.fixed==="left";Ae=!ft}else if(De!==void 0){var vt=We&&We.fixed==="right";_e=!vt}}else if(Se!==void 0){var Kt=We&&We.fixed==="left";fe=!Kt}else if(De!==void 0){var kt=Xe&&Xe.fixed==="right";ye=!kt}return{fixLeft:Se,fixRight:De,lastFixLeft:fe,firstFixRight:ye,lastFixRight:_e,firstFixLeft:Ae,isSticky:st.isSticky}}var S=k("sR1s");function x(je){var Ce=je.cells,Qe=je.stickyOffsets,st=je.flattenColumns,Ge=je.rowComponent,rt=je.cellComponent,Re=je.onHeaderRow,Se=je.index,De=h.useContext(o.a),fe=De.prefixCls,ye=De.direction,_e;Re&&(_e=Re(Ce.map(function(We){return We.column}),Se));var Ae=Object(S.a)(Ce.map(function(We){return We.column}));return h.createElement(Ge,Object.assign({},_e),Ce.map(function(We,Xe){var ft=We.column,vt=t(We.colStart,We.colEnd,st,Qe,ye),Kt;return ft&&ft.onHeaderCell&&(Kt=We.column.onHeaderCell(ft)),h.createElement(n.a,Object.assign({},We,{ellipsis:ft.ellipsis,align:ft.align,component:rt,prefixCls:fe,key:Ae[Xe]},vt,{additionalProps:Kt,rowType:"header"}))}))}x.displayName="HeaderRow";var s=x;function P(je){var Ce=[];function Qe(Re,Se){var De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[De]=Ce[De]||[];var fe=Se,ye=Re.filter(Boolean).map(function(_e){var Ae={key:_e.key,className:_e.className||"",children:_e.title,column:_e,colStart:fe},We=1,Xe=_e.children;return Xe&&Xe.length>0&&(We=Qe(Xe,fe,De+1).reduce(function(ft,vt){return ft+vt},0),Ae.hasSubColumns=!0),"colSpan"in _e&&(We=_e.colSpan),"rowSpan"in _e&&(Ae.rowSpan=_e.rowSpan),Ae.colSpan=We,Ae.colEnd=Ae.colStart+We-1,Ce[De].push(Ae),fe+=We,We});return ye}Qe(je,0);for(var st=Ce.length,Ge=function(Se){Ce[Se].forEach(function(De){!("rowSpan"in De)&&!De.hasSubColumns&&(De.rowSpan=st-Se)})},rt=0;rt<st;rt+=1)Ge(rt);return Ce}function O(je){var Ce=je.stickyOffsets,Qe=je.columns,st=je.flattenColumns,Ge=je.onHeaderRow,rt=h.useContext(o.a),Re=rt.prefixCls,Se=rt.getComponent,De=h.useMemo(function(){return P(Qe)},[Qe]),fe=Se(["header","wrapper"],"thead"),ye=Se(["header","row"],"tr"),_e=Se(["header","cell"],"th");return h.createElement(fe,{className:"".concat(Re,"-thead")},De.map(function(Ae,We){var Xe=h.createElement(s,{key:We,flattenColumns:st,cells:Ae,stickyOffsets:Ce,rowComponent:ye,cellComponent:_e,onHeaderRow:Ge,index:We});return Xe}))}var E=O,v=k("hW8S");function y(je){for(var Ce=je.colWidths,Qe=je.columns,st=je.columCount,Ge=[],rt=st||Qe.length,Re=!1,Se=rt-1;Se>=0;Se-=1){var De=Ce[Se],fe=Qe&&Qe[Se],ye=fe&&fe[v.a];(De||ye||Re)&&(Ge.unshift(h.createElement("col",Object.assign({key:Se,style:{width:De,minWidth:De}},ye))),Re=!0)}return h.createElement("colgroup",null,Ge)}var T=y;function M(je,Ce){return Object(h.useMemo)(function(){for(var Qe=[],st=0;st<Ce;st+=1){var Ge=je[st];if(Ge!==void 0)Qe[st]=Ge;else return null}return Qe},[je.join("_"),Ce])}var N=h.forwardRef(function(je,Ce){var Qe=je.noData,st=je.columns,Ge=je.flattenColumns,rt=je.colWidths,Re=je.columCount,Se=je.stickyOffsets,De=je.direction,fe=je.fixHeader,ye=je.offsetHeader,_e=je.stickyClassName,Ae=je.onScroll,We=Object(g.a)(je,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Xe=h.useContext(o.a),ft=Xe.prefixCls,vt=Xe.scrollbarSize,Kt=Xe.isSticky,kt=Kt&&!fe?0:vt,Or=h.useRef(null),pr=h.useCallback(function(qr){Object(b.b)(Ce,qr),Object(b.b)(Or,qr)},[]);h.useEffect(function(){var qr;function Zr(Ar){var fn=Ar.currentTarget,wn=Ar.deltaX;wn&&(Ae({currentTarget:fn,scrollLeft:fn.scrollLeft+wn}),Ar.preventDefault())}return(qr=Or.current)===null||qr===void 0||qr.addEventListener("wheel",Zr),function(){var Ar;(Ar=Or.current)===null||Ar===void 0||Ar.removeEventListener("wheel",Zr)}},[]);var Et=Ge[Ge.length-1],Yr={fixed:Et?Et.fixed:null,onHeaderCell:function(){return{className:"".concat(ft,"-cell-scrollbar")}}},kr=Object(h.useMemo)(function(){return kt?[].concat(Object(C.a)(st),[Yr]):st},[kt,st]),Ur=Object(h.useMemo)(function(){return kt?[].concat(Object(C.a)(Ge),[Yr]):Ge},[kt,Ge]),dn=Object(h.useMemo)(function(){var qr=Se.right,Zr=Se.left;return Object(f.a)(Object(f.a)({},Se),{},{left:De==="rtl"?[].concat(Object(C.a)(Zr.map(function(Ar){return Ar+kt})),[0]):Zr,right:De==="rtl"?qr:[].concat(Object(C.a)(qr.map(function(Ar){return Ar+kt})),[0]),isSticky:Kt})},[kt,Se,Kt]),br=M(rt,Re);return h.createElement("div",{style:Object(f.a)({overflow:"hidden"},Kt?{top:ye}:{}),ref:pr,className:d()("".concat(ft,"-header"),Object(L.a)({},_e,!!_e))},h.createElement("table",{style:{tableLayout:"fixed",visibility:Qe||br?null:"hidden"}},h.createElement(T,{colWidths:br?[].concat(Object(C.a)(br),[kt]):[],columCount:Re+1,columns:Ur}),h.createElement(E,Object.assign({},We,{stickyOffsets:dn,columns:kr,flattenColumns:Ur}))))});N.displayName="FixedHeader";var I=N,G=h.createContext(null),H=G;function W(je){var Ce=je.prefixCls,Qe=je.children,st=je.component,Ge=je.cellComponent,rt=je.fixHeader,Re=je.fixColumn,Se=je.horizonScroll,De=je.className,fe=je.expanded,ye=je.componentWidth,_e=je.colSpan,Ae=h.useContext(o.a),We=Ae.scrollbarSize;return h.useMemo(function(){var Xe=Qe;return Re&&(Xe=h.createElement("div",{style:{width:ye-(rt?We:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Xe)),h.createElement(st,{className:De,style:{display:fe?null:"none"}},h.createElement(n.a,{component:Ge,prefixCls:Ce,colSpan:_e},Xe))},[Qe,st,rt,Se,De,fe,ye,_e,We])}var z=W;function U(je){var Ce=je.className,Qe=je.style,st=je.record,Ge=je.index,rt=je.rowKey,Re=je.getRowKey,Se=je.rowExpandable,De=je.expandedKeys,fe=je.onRow,ye=je.indent,_e=ye===void 0?0:ye,Ae=je.rowComponent,We=je.cellComponent,Xe=je.childrenColumnName,ft=h.useContext(o.a),vt=ft.prefixCls,Kt=ft.fixedInfoList,kt=h.useContext(H),Or=kt.fixHeader,pr=kt.fixColumn,Et=kt.horizonScroll,Yr=kt.componentWidth,kr=kt.flattenColumns,Ur=kt.expandableType,dn=kt.expandRowByClick,br=kt.onTriggerExpand,qr=kt.rowClassName,Zr=kt.expandedRowClassName,Ar=kt.indentSize,fn=kt.expandIcon,wn=kt.expandedRowRender,Kn=kt.expandIconColumnIndex,nn=h.useState(!1),ya=Object(u.a)(nn,2),Da=ya[0],pn=ya[1],qt=De&&De.has(je.recordKey);h.useEffect(function(){qt&&pn(!0)},[qt]);var Yn=Ur==="row"&&(!Se||Se(st)),ba=Ur==="nest",zn=Xe&&st&&st[Xe],Gr=Yn||ba,kn;fe&&(kn=fe(st,Ge));var ha=function(ur){if(dn&&Gr&&br(st,ur),kn&&kn.onClick){for(var ua,Gn=arguments.length,On=new Array(Gn>1?Gn-1:0),Mn=1;Mn<Gn;Mn++)On[Mn-1]=arguments[Mn];(ua=kn).onClick.apply(ua,[ur].concat(On))}},la;typeof qr=="string"?la=qr:typeof qr=="function"&&(la=qr(st,Ge,_e));var St=Object(S.a)(kr),ir=h.createElement(Ae,Object.assign({},kn,{"data-row-key":rt,className:d()(Ce,"".concat(vt,"-row"),"".concat(vt,"-row-level-").concat(_e),la,kn&&kn.className),style:Object(f.a)(Object(f.a)({},Qe),kn?kn.style:null),onClick:ha}),kr.map(function(Ln,ur){var ua=Ln.render,Gn=Ln.dataIndex,On=Ln.className,Mn=St[ur],Ga=Kt[ur],La;ur===(Kn||0)&&ba&&(La=h.createElement(h.Fragment,null,h.createElement("span",{style:{paddingLeft:"".concat(Ar*_e,"px")},className:"".concat(vt,"-row-indent indent-level-").concat(_e)}),fn({prefixCls:vt,expanded:qt,expandable:zn,record:st,onExpand:br})));var Un;return Ln.onCell&&(Un=Ln.onCell(st,Ge)),h.createElement(n.a,Object.assign({className:On,ellipsis:Ln.ellipsis,align:Ln.align,component:We,prefixCls:vt,key:Mn,record:st,index:Ge,dataIndex:Gn,render:ua,shouldCellUpdate:Ln.shouldCellUpdate},Ga,{appendNode:La,additionalProps:Un}))})),Mt;if(Yn&&(Da||qt)){var wa=wn(st,Ge,_e+1,qt),Pa=Zr&&Zr(st,Ge,_e);Mt=h.createElement(z,{expanded:qt,className:d()("".concat(vt,"-expanded-row"),"".concat(vt,"-expanded-row-level-").concat(_e+1),Pa),prefixCls:vt,fixHeader:Or,fixColumn:pr,horizonScroll:Et,component:Ae,componentWidth:Yr,cellComponent:We,colSpan:kr.length},wa)}var pa;return zn&&qt&&(pa=(st[Xe]||[]).map(function(Ln,ur){var ua=Re(Ln,ur);return h.createElement(U,Object.assign({},je,{key:ua,rowKey:ua,record:Ln,recordKey:ua,index:ur,indent:_e+1}))})),h.createElement(h.Fragment,null,ir,Mt,pa)}U.displayName="BodyRow";var B=U,K=h.createContext(null),q=K;function ae(je){var Ce=je.columnKey,Qe=je.onColumnResize,st=h.useRef();return h.useEffect(function(){st.current&&Qe(Ce,st.current.offsetWidth)},[]),h.createElement(_.a,{onResize:function(rt){var Re=rt.offsetWidth;Qe(Ce,Re)}},h.createElement("td",{ref:st,style:{padding:0,border:0,height:0}},h.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function se(je){var Ce=je.data,Qe=je.getRowKey,st=je.measureColumnWidth,Ge=je.expandedKeys,rt=je.onRow,Re=je.rowExpandable,Se=je.emptyNode,De=je.childrenColumnName,fe=h.useContext(q),ye=fe.onColumnResize,_e=h.useContext(o.a),Ae=_e.prefixCls,We=_e.getComponent,Xe=h.useContext(H),ft=Xe.fixHeader,vt=Xe.horizonScroll,Kt=Xe.flattenColumns,kt=Xe.componentWidth;return h.useMemo(function(){var Or=We(["body","wrapper"],"tbody"),pr=We(["body","row"],"tr"),Et=We(["body","cell"],"td"),Yr;Ce.length?Yr=Ce.map(function(Ur,dn){var br=Qe(Ur,dn);return h.createElement(B,{key:br,rowKey:br,record:Ur,recordKey:br,index:dn,rowComponent:pr,cellComponent:Et,expandedKeys:Ge,onRow:rt,getRowKey:Qe,rowExpandable:Re,childrenColumnName:De})}):Yr=h.createElement(z,{expanded:!0,className:"".concat(Ae,"-placeholder"),prefixCls:Ae,fixHeader:ft,fixColumn:vt,horizonScroll:vt,component:pr,componentWidth:kt,cellComponent:Et,colSpan:Kt.length},Se);var kr=Object(S.a)(Kt);return h.createElement(Or,{className:"".concat(Ae,"-tbody")},st&&h.createElement("tr",{"aria-hidden":"true",className:"".concat(Ae,"-measure-row"),style:{height:0}},kr.map(function(Ur){return h.createElement(ae,{key:Ur,columnKey:Ur,onColumnResize:ye})})),Yr)},[Ce,Ae,rt,st,Ge,Qe,We,kt,Se,Kt])}var we=h.memo(se);we.displayName="Body";var Te=we,de=k("wRmb"),xe=k("xEkU"),pe=k.n(xe);function ne(je){var Ce=Object(h.useRef)(je),Qe=Object(h.useState)({}),st=Object(u.a)(Qe,2),Ge=st[1],rt=Object(h.useRef)(null),Re=Object(h.useRef)([]);function Se(De){rt.current===null&&(Re.current=[],rt.current=pe()(function(){Re.current.forEach(function(fe){Ce.current=fe(Ce.current)}),rt.current=null,Ge({})})),Re.current.push(De)}return Object(h.useEffect)(function(){return function(){pe.a.cancel(rt.current)}},[]),[Ce.current,Se]}function ie(je){var Ce=Object(h.useRef)(je),Qe=Object(h.useRef)(null);function st(){window.clearTimeout(Qe.current)}function Ge(Re){Ce.current=Re,st(),Qe.current=window.setTimeout(function(){Ce.current=null,Qe.current=null},100)}function rt(){return Ce.current}return Object(h.useEffect)(function(){return st},[]),[Ge,rt]}function ee(je,Ce,Qe){var st=Object(h.useMemo)(function(){for(var Ge=[],rt=[],Re=0,Se=0,De=0;De<Ce;De+=1)if(Qe==="rtl"){rt[De]=Se,Se+=je[De]||0;var fe=Ce-De-1;Ge[fe]=Re,Re+=je[fe]||0}else{Ge[De]=Re,Re+=je[De]||0;var ye=Ce-De-1;rt[ye]=Se,Se+=je[ye]||0}return{left:Ge,right:rt}},[je,Ce,Qe]);return st}var le=ee;function Q(je){var Ce=je.className,Qe=je.children;return h.createElement("div",{className:Ce},Qe)}var Z=Q,be=k("n6Qo");function te(je){var Ce,Qe=je.prefixCls,st=je.record,Ge=je.onExpand,rt=je.expanded,Re=je.expandable,Se="".concat(Qe,"-row-expand-icon");if(!Re)return h.createElement("span",{className:d()(Se,"".concat(Qe,"-row-spaced"))});var De=function(ye){Ge(st,ye),ye.stopPropagation()};return h.createElement("span",{className:d()(Se,(Ce={},Object(L.a)(Ce,"".concat(Qe,"-row-expanded"),rt),Object(L.a)(Ce,"".concat(Qe,"-row-collapsed"),!rt),Ce)),onClick:De})}function $(je,Ce,Qe){var st=[];function Ge(rt){(rt||[]).forEach(function(Re,Se){st.push(Ce(Re,Se)),Ge(Re[Qe])})}return Ge(je),st}var X=k("zT1h"),Y=k("y0+3"),ve=function(Ce,Qe){var st,Ge,rt=Ce.scrollBodyRef,Re=Ce.onScroll,Se=Ce.offsetScroll,De=h.useContext(o.a),fe=De.prefixCls,ye=((st=rt.current)===null||st===void 0?void 0:st.scrollWidth)||0,_e=((Ge=rt.current)===null||Ge===void 0?void 0:Ge.clientWidth)||0,Ae=ye&&_e*(_e/ye),We=h.useRef(),Xe=ne({scrollLeft:0,isHiddenScrollBar:!1}),ft=Object(u.a)(Xe,2),vt=ft[0],Kt=ft[1],kt=h.useRef({delta:0,x:0}),Or=h.useState(!1),pr=Object(u.a)(Or,2),Et=pr[0],Yr=pr[1],kr=function(){Yr(!1)},Ur=function(Ar){Ar.persist(),kt.current.delta=Ar.pageX-vt.scrollLeft,kt.current.x=0,Yr(!0),Ar.preventDefault()},dn=function(Ar){var fn,wn=Ar||((fn=window)===null||fn===void 0?void 0:fn.event),Kn=wn.buttons;if(!Et||Kn===0){Et&&Yr(!1);return}var nn=kt.current.x+Ar.pageX-kt.current.x-kt.current.delta;nn<=0&&(nn=0),nn+Ae>=_e&&(nn=_e-Ae),Re({scrollLeft:nn/_e*(ye+2)}),kt.current.x=Ar.pageX},br=function(){var Ar=Object(Y.b)(rt.current).top,fn=Ar+rt.current.offsetHeight,wn=document.documentElement.scrollTop+window.innerHeight;fn-Object(p.a)()<=wn||Ar>=wn-Se?Kt(function(Kn){return Object(f.a)(Object(f.a)({},Kn),{},{isHiddenScrollBar:!0})}):Kt(function(Kn){return Object(f.a)(Object(f.a)({},Kn),{},{isHiddenScrollBar:!1})})},qr=function(Ar){Kt(function(fn){return Object(f.a)(Object(f.a)({},fn),{},{scrollLeft:Ar/ye*_e||0})})};return h.useImperativeHandle(Qe,function(){return{setScrollLeft:qr}}),h.useEffect(function(){var Zr=Object(X.a)(document.body,"mouseup",kr,!1),Ar=Object(X.a)(document.body,"mousemove",dn,!1);return br(),function(){Zr.remove(),Ar.remove()}},[Ae,Et]),h.useEffect(function(){var Zr=Object(X.a)(window,"scroll",br,!1),Ar=Object(X.a)(window,"resize",br,!1);return function(){Zr.remove(),Ar.remove()}},[]),h.useEffect(function(){vt.isHiddenScrollBar||Kt(function(Zr){var Ar,fn;return Object(f.a)(Object(f.a)({},Zr),{},{scrollLeft:rt.current.scrollLeft/((Ar=rt.current)===null||Ar===void 0?void 0:Ar.scrollWidth)*((fn=rt.current)===null||fn===void 0?void 0:fn.clientWidth)})})},[vt.isHiddenScrollBar]),ye<=_e||!Ae||vt.isHiddenScrollBar?null:h.createElement("div",{style:{height:Object(p.a)(),width:_e,bottom:Se},className:"".concat(fe,"-sticky-scroll")},h.createElement("div",{onMouseDown:Ur,ref:We,className:d()("".concat(fe,"-sticky-scroll-bar"),Object(L.a)({},"".concat(fe,"-sticky-scroll-bar-active"),Et)),style:{width:"".concat(Ae,"px"),transform:"translate3d(".concat(vt.scrollLeft,"px, 0, 0)")}}))},ue=h.forwardRef(ve);function Ee(je,Ce){return h.useMemo(function(){var Qe=!!je;return{isSticky:Qe,stickyClassName:Qe?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(D.a)(je)==="object"&&je.offsetHeader||0,offsetScroll:Object(D.a)(je)==="object"&&je.offsetScroll||0}},[je,Ce])}var Ke=[],Ye={},Je="rc-table-internal-hook",tt=h.memo(function(je){var Ce=je.children;return Ce},function(je,Ce){return l()(je.props,Ce.props)?je.pingLeft!==Ce.pingLeft||je.pingRight!==Ce.pingRight:!1});function at(je){var Ce,Qe=je.prefixCls,st=je.className,Ge=je.rowClassName,rt=je.style,Re=je.data,Se=je.rowKey,De=je.scroll,fe=je.tableLayout,ye=je.direction,_e=je.title,Ae=je.footer,We=je.summary,Xe=je.id,ft=je.showHeader,vt=je.components,Kt=je.emptyText,kt=je.onRow,Or=je.onHeaderRow,pr=je.internalHooks,Et=je.transformColumns,Yr=je.internalRefs,kr=je.sticky,Ur=Re||Ke,dn=!!Ur.length,br=h.useState(0),qr=Object(u.a)(br,2),Zr=qr[0],Ar=qr[1];h.useEffect(function(){Ar(Object(p.a)())});var fn=h.useMemo(function(){return Object(S.c)(vt,{})},[vt]),wn=h.useCallback(function(vr,wt){return Object(S.b)(fn,vr)||wt},[fn]),Kn=h.useMemo(function(){return typeof Se=="function"?Se:function(vr){var wt=vr&&vr[Se];return wt}},[Se]),nn=Object(v.c)(je),ya=nn.expandIcon,Da=nn.expandedRowKeys,pn=nn.defaultExpandedRowKeys,qt=nn.defaultExpandAllRows,Yn=nn.expandedRowRender,ba=nn.onExpand,zn=nn.onExpandedRowsChange,Gr=nn.expandRowByClick,kn=nn.rowExpandable,ha=nn.expandIconColumnIndex,la=nn.expandedRowClassName,St=nn.childrenColumnName,ir=nn.indentSize,Mt=ya||te,wa=St||"children",Pa=h.useMemo(function(){return Yn?"row":je.expandable&&pr===Je&&je.expandable.__PARENT_RENDER_ICON__||Ur.some(function(vr){return vr&&Object(D.a)(vr)==="object"&&vr[wa]})?"nest":!1},[!!Yn,Ur]),pa=h.useState(function(){return pn||(qt?$(Ur,Kn,wa):[])}),Ln=Object(u.a)(pa,2),ur=Ln[0],ua=Ln[1],Gn=h.useMemo(function(){return new Set(Da||ur||[])},[Da,ur]),On=h.useCallback(function(vr){var wt=Kn(vr,Ur.indexOf(vr)),Bt,tr=Gn.has(wt);tr?(Gn.delete(wt),Bt=Object(C.a)(Gn)):Bt=[].concat(Object(C.a)(Gn),[wt]),ua(Bt),ba&&ba(!tr,vr),zn&&zn(Bt)},[Kn,Gn,Ur,ba,zn]),Mn=h.useState(0),Ga=Object(u.a)(Mn,2),La=Ga[0],Un=Ga[1],Xa=Object(de.b)(Object(f.a)(Object(f.a)(Object(f.a)({},je),nn),{},{expandable:!!Yn,expandedKeys:Gn,getRowKey:Kn,onTriggerExpand:On,expandIcon:Mt,expandIconColumnIndex:ha,direction:ye}),pr===Je?Et:null),oi=Object(u.a)(Xa,2),Ma=oi[0],mn=oi[1],Nn=h.useMemo(function(){return{columns:Ma,flattenColumns:mn}},[Ma,mn]),Ba=h.useRef(),Qa=h.useRef(),qn=h.useRef(),mi=h.useState(!1),Za=Object(u.a)(mi,2),ea=Za[0],vi=Za[1],gi=h.useState(!1),Wa=Object(u.a)(gi,2),Ea=Wa[0],Pi=Wa[1],qa=ne(new Map),Ha=Object(u.a)(qa,2),si=Ha[0],Ka=Ha[1],aa=Object(S.a)(mn),ei=aa.map(function(vr){return si.get(vr)}),li=h.useMemo(function(){return ei},[ei.join("_")]),pt=le(li,mn.length,ye),Ze=De&&Object(S.d)(De.y),ht=De&&Object(S.d)(De.x),gt=ht&&mn.some(function(vr){var wt=vr.fixed;return wt}),Wt=h.useRef(),At=Ee(kr,Qe),Jt=At.isSticky,Lt=At.offsetHeader,ct=At.offsetScroll,nt=At.stickyClassName,it,_t,Rt;Ze&&(_t={overflowY:"scroll",maxHeight:De.y}),ht&&(it={overflowX:"auto"},Ze||(_t={overflowY:"hidden"}),Rt={width:De.x===!0?"auto":De.x,minWidth:"100%"});var Ct=h.useCallback(function(vr,wt){Ka(function(Bt){var tr=new Map(Bt);return tr.set(vr,wt),tr})},[]),Ot=ie(null),Pt=Object(u.a)(Ot,2),jt=Pt[0],Ve=Pt[1];function nr(vr,wt){if(!wt)return;typeof wt=="function"?wt(vr):wt.scrollLeft!==vr&&(wt.scrollLeft=vr)}var Yt=function(wt){var Bt=wt.currentTarget,tr=wt.scrollLeft,Gt=typeof tr=="number"?tr:Bt.scrollLeft,ut=Bt||Ye;if(!Ve()||Ve()===ut){var dt;jt(ut),nr(Gt,Qa.current),nr(Gt,qn.current),nr(Gt,(dt=Wt.current)===null||dt===void 0?void 0:dt.setScrollLeft)}if(Bt){var Dt=Bt.scrollWidth,bt=Bt.clientWidth;vi(Gt>0),Pi(Gt<Dt-bt)}},Qt=function(){qn.current&&Yt({currentTarget:qn.current})},It=function(wt){var Bt=wt.width;Qt(),Un(Ba.current?Ba.current.offsetWidth:Bt)};h.useEffect(function(){return Qt},[]),h.useEffect(function(){ht&&Qt()},[ht]),h.useEffect(function(){pr===Je&&Yr&&(Yr.body.current=qn.current)});var zt=wn(["table"],"table"),Ut=h.useMemo(function(){return fe||(gt?De.x==="max-content"?"auto":"fixed":Ze||mn.some(function(vr){var wt=vr.ellipsis;return wt})?"fixed":"auto")},[Ze,gt,mn,fe]),Ht,xr={colWidths:li,columCount:mn.length,stickyOffsets:pt,onHeaderRow:Or,fixHeader:Ze},Nr=h.useMemo(function(){return dn?null:typeof Kt=="function"?Kt():Kt},[dn,Kt]),Dr=h.createElement(Te,{data:Ur,measureColumnWidth:Ze||ht||Jt,expandedKeys:Gn,rowExpandable:kn,getRowKey:Kn,onRow:kt,emptyNode:Nr,childrenColumnName:wa}),Br=h.createElement(T,{colWidths:mn.map(function(vr){var wt=vr.width;return wt}),columns:mn}),Wr=We&&h.createElement(be.b,null,We(Ur)),on=wn(["body"]);if(Ze||Jt){var qe;typeof on=="function"?(qe=on(Ur,{scrollbarSize:Zr,ref:qn,onScroll:Yt}),xr.colWidths=mn.map(function(vr,wt){var Bt=vr.width,tr=wt===Ma.length-1?Bt-Zr:Bt;return typeof tr=="number"&&!Number.isNaN(tr)?tr:(Object(a.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):qe=h.createElement("div",{style:Object(f.a)(Object(f.a)({},it),_t),onScroll:Yt,ref:qn,className:d()("".concat(Qe,"-body"))},h.createElement(zt,{style:Object(f.a)(Object(f.a)({},Rt),{},{tableLayout:Ut})},Br,Dr,Wr),Jt&&h.createElement(ue,{ref:Wt,offsetScroll:ct,scrollBodyRef:qn,onScroll:Yt})),Ht=h.createElement(h.Fragment,null,ft!==!1&&h.createElement(I,Object.assign({noData:!Ur.length},xr,Nn,{direction:ye,offsetHeader:Lt,stickyClassName:nt,ref:Qa,onScroll:Yt})),qe)}else Ht=h.createElement("div",{style:Object(f.a)(Object(f.a)({},it),_t),className:d()("".concat(Qe,"-content")),onScroll:Yt,ref:qn},h.createElement(zt,{style:Object(f.a)(Object(f.a)({},Rt),{},{tableLayout:Ut})},Br,ft!==!1&&h.createElement(E,Object.assign({},xr,Nn)),Dr,Wr));var er=Object(v.b)(je),sn=h.createElement("div",Object.assign({className:d()(Qe,st,(Ce={},Object(L.a)(Ce,"".concat(Qe,"-rtl"),ye==="rtl"),Object(L.a)(Ce,"".concat(Qe,"-ping-left"),ea),Object(L.a)(Ce,"".concat(Qe,"-ping-right"),Ea),Object(L.a)(Ce,"".concat(Qe,"-layout-fixed"),fe==="fixed"),Object(L.a)(Ce,"".concat(Qe,"-fixed-header"),Ze),Object(L.a)(Ce,"".concat(Qe,"-fixed-column"),gt),Object(L.a)(Ce,"".concat(Qe,"-scroll-horizontal"),ht),Object(L.a)(Ce,"".concat(Qe,"-has-fix-left"),mn[0]&&mn[0].fixed),Object(L.a)(Ce,"".concat(Qe,"-has-fix-right"),mn[mn.length-1]&&mn[mn.length-1].fixed==="right"),Ce)),style:rt,id:Xe,ref:Ba},er),h.createElement(tt,{pingLeft:ea,pingRight:Ea,props:Object(f.a)(Object(f.a)({},je),{},{stickyOffsets:pt,mergedExpandedKeys:Gn})},_e&&h.createElement(Z,{className:"".concat(Qe,"-title")},_e(Ur)),h.createElement("div",{className:"".concat(Qe,"-container")},Ht),Ae&&h.createElement(Z,{className:"".concat(Qe,"-footer")},Ae(Ur))));ht&&(sn=h.createElement(_.a,{onResize:It},sn));var en=h.useMemo(function(){return{prefixCls:Qe,getComponent:wn,scrollbarSize:Zr,direction:ye,fixedInfoList:mn.map(function(vr,wt){return t(wt,wt,mn,pt,ye)}),isSticky:Jt}},[Qe,wn,Zr,ye,mn,pt,ye,Jt]),mr=h.useMemo(function(){return Object(f.a)(Object(f.a)({},Nn),{},{tableLayout:Ut,rowClassName:Ge,expandedRowClassName:la,componentWidth:La,fixHeader:Ze,fixColumn:gt,horizonScroll:ht,expandIcon:Mt,expandableType:Pa,expandRowByClick:Gr,expandedRowRender:Yn,onTriggerExpand:On,expandIconColumnIndex:ha,indentSize:ir})},[Nn,Ut,Ge,la,La,Ze,gt,ht,Mt,Pa,Gr,Yn,On,ha,ir]),dr=h.useMemo(function(){return{onColumnResize:Ct}},[Ct]);return h.createElement(o.a.Provider,{value:en},h.createElement(H.Provider,{value:mr},h.createElement(q.Provider,{value:dr},sn)))}at.Column=m.a,at.ColumnGroup=c.a,at.Summary=be.a,at.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var lt=J.b=at},wRmb:function(j,J,k){"use strict";k.d(J,"a",function(){return l});var L=k("rePB"),f=k("KQm4"),C=k("VTBJ"),D=k("Ff2n"),u=k("cDcd"),h=k.n(u),w=k("Kwbf"),d=k("Zm9Q"),i=k("hW8S");function l(m){return Object(d.a)(m).filter(function(g){return u.isValidElement(g)}).map(function(g){var b=g.key,n=g.props,o=n.children,t=Object(D.a)(n,["children"]),S=Object(C.a)({key:b},t);return o&&(S.children=l(o)),S})}function a(m){return m.reduce(function(g,b){var n=b.fixed,o=n===!0?"left":n,t=b.children;return t&&t.length>0?[].concat(Object(f.a)(g),Object(f.a)(a(t).map(function(S){return Object(C.a)({fixed:o},S)}))):[].concat(Object(f.a)(g),[Object(C.a)(Object(C.a)({},b),{},{fixed:o})])},[])}function _(m){for(var g=!0,b=0;b<m.length;b+=1){var n=m[b];if(g&&n.fixed!=="left")g=!1;else if(!g&&n.fixed==="left"){Object(w.a)(!1,"Index ".concat(b-1," of `columns` missing `fixed='left'` prop."));break}}for(var o=!0,t=m.length-1;t>=0;t-=1){var S=m[t];if(o&&S.fixed!=="right")o=!1;else if(!o&&S.fixed==="right"){Object(w.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function p(m){return m.map(function(g){var b=g.fixed,n=Object(D.a)(g,["fixed"]),o=b;return b==="left"?o="right":b==="right"&&(o="left"),Object(C.a)({fixed:o},n)})}function c(m,g){var b=m.prefixCls,n=m.columns,o=m.children,t=m.expandable,S=m.expandedKeys,x=m.getRowKey,s=m.onTriggerExpand,P=m.expandIcon,O=m.rowExpandable,E=m.expandIconColumnIndex,v=m.direction,y=m.expandRowByClick,T=u.useMemo(function(){return n||l(o)},[n,o]),M=u.useMemo(function(){if(t){var G,H=E||0,W=T[H],z=(G={},Object(L.a)(G,i.a,{className:"".concat(b,"-expand-icon-col")}),Object(L.a)(G,"title",""),Object(L.a)(G,"fixed",W?W.fixed:null),Object(L.a)(G,"className","".concat(b,"-row-expand-icon-cell")),Object(L.a)(G,"render",function(K,q,ae){var se=x(q,ae),we=S.has(se),Te=O?O(q):!0,de=P({prefixCls:b,expanded:we,expandable:Te,record:q,onExpand:s});return y?u.createElement("span",{onClick:function(pe){return pe.stopPropagation()}},de):de}),G),U=T.slice();return H>=0&&U.splice(H,0,z),U}return T},[t,T,x,S,P,v]),N=u.useMemo(function(){var G=M;return g&&(G=g(G)),G.length||(G=[{render:function(){return null}}]),G},[g,M,v]),I=u.useMemo(function(){return v==="rtl"?p(a(N)):a(N)},[N,v]);return[N,I]}J.b=c},wZgz:function(j,J,k){(function(L,f,C){j.exports=J=f(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.BlockCipher,u=f.algo,h=[],w=[],d=[],i=[],l=[],a=[],_=[],p=[],c=[],m=[];(function(){for(var n=[],o=0;o<256;o++)o<128?n[o]=o<<1:n[o]=o<<1^283;for(var t=0,S=0,o=0;o<256;o++){var x=S^S<<1^S<<2^S<<3^S<<4;x=x>>>8^x&255^99,h[t]=x,w[x]=t;var s=n[t],P=n[s],O=n[P],E=n[x]*257^x*16843008;d[t]=E<<24|E>>>8,i[t]=E<<16|E>>>16,l[t]=E<<8|E>>>24,a[t]=E;var E=O*16843009^P*65537^s*257^t*16843008;_[x]=E<<24|E>>>8,p[x]=E<<16|E>>>16,c[x]=E<<8|E>>>24,m[x]=E,t?(t=s^n[n[n[O^s]]],S^=n[n[S]]):t=S=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],b=u.AES=D.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,t=o.words,S=o.sigBytes/4,x=this._nRounds=S+6,s=(x+1)*4,P=this._keySchedule=[],O=0;O<s;O++)O<S?P[O]=t[O]:(n=P[O-1],O%S?S>6&&O%S==4&&(n=h[n>>>24]<<24|h[n>>>16&255]<<16|h[n>>>8&255]<<8|h[n&255]):(n=n<<8|n>>>24,n=h[n>>>24]<<24|h[n>>>16&255]<<16|h[n>>>8&255]<<8|h[n&255],n^=g[O/S|0]<<24),P[O]=P[O-S]^n);for(var E=this._invKeySchedule=[],v=0;v<s;v++){var O=s-v;if(v%4)var n=P[O];else var n=P[O-4];v<4||O<=4?E[v]=n:E[v]=_[h[n>>>24]]^p[h[n>>>16&255]]^c[h[n>>>8&255]]^m[h[n&255]]}},encryptBlock:function(n,o){this._doCryptBlock(n,o,this._keySchedule,d,i,l,a,h)},decryptBlock:function(n,o){var t=n[o+1];n[o+1]=n[o+3],n[o+3]=t,this._doCryptBlock(n,o,this._invKeySchedule,_,p,c,m,w);var t=n[o+1];n[o+1]=n[o+3],n[o+3]=t},_doCryptBlock:function(n,o,t,S,x,s,P,O){for(var E=this._nRounds,v=n[o]^t[0],y=n[o+1]^t[1],T=n[o+2]^t[2],M=n[o+3]^t[3],N=4,I=1;I<E;I++){var G=S[v>>>24]^x[y>>>16&255]^s[T>>>8&255]^P[M&255]^t[N++],H=S[y>>>24]^x[T>>>16&255]^s[M>>>8&255]^P[v&255]^t[N++],W=S[T>>>24]^x[M>>>16&255]^s[v>>>8&255]^P[y&255]^t[N++],z=S[M>>>24]^x[v>>>16&255]^s[y>>>8&255]^P[T&255]^t[N++];v=G,y=H,T=W,M=z}var G=(O[v>>>24]<<24|O[y>>>16&255]<<16|O[T>>>8&255]<<8|O[M&255])^t[N++],H=(O[y>>>24]<<24|O[T>>>16&255]<<16|O[M>>>8&255]<<8|O[v&255])^t[N++],W=(O[T>>>24]<<24|O[M>>>16&255]<<16|O[v>>>8&255]<<8|O[y&255])^t[N++],z=(O[M>>>24]<<24|O[v>>>16&255]<<16|O[y>>>8&255]<<8|O[T&255])^t[N++];n[o]=G,n[o+1]=H,n[o+2]=W,n[o+3]=z},keySize:256/32});f.AES=D._createHelper(b)}(),L.AES})},wbyO:function(j,J,k){(function(L,f){j.exports=J=f(k("Ib8C"))})(this,function(L){return function(){var f=L,C=f.lib,D=C.WordArray,u=f.enc,h=u.Base64url={stringify:function(d,i=!0){var l=d.words,a=d.sigBytes,_=i?this._safe_map:this._map;d.clamp();for(var p=[],c=0;c<a;c+=3)for(var m=l[c>>>2]>>>24-c%4*8&255,g=l[c+1>>>2]>>>24-(c+1)%4*8&255,b=l[c+2>>>2]>>>24-(c+2)%4*8&255,n=m<<16|g<<8|b,o=0;o<4&&c+o*.75<a;o++)p.push(_.charAt(n>>>6*(3-o)&63));var t=_.charAt(64);if(t)for(;p.length%4;)p.push(t);return p.join("")},parse:function(d,i=!0){var l=d.length,a=i?this._safe_map:this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var p=0;p<a.length;p++)_[a.charCodeAt(p)]=p}var c=a.charAt(64);if(c){var m=d.indexOf(c);m!==-1&&(l=m)}return w(d,l,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function w(d,i,l){for(var a=[],_=0,p=0;p<i;p++)if(p%4){var c=l[d.charCodeAt(p-1)]<<p%4*2,m=l[d.charCodeAt(p)]>>>6-p%4*2,g=c|m;a[_>>>2]|=g<<24-_%4*8,_++}return D.create(a,_)}}(),L.enc.Base64url})},"y0+3":function(j,J,k){"use strict";k.d(J,"a",function(){return a}),k.d(J,"b",function(){return p});var L=/margin|padding|width|height|max|min|offset/,f={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function D(c){return c.nodeType===1?c.ownerDocument.defaultView.getComputedStyle(c,null):{}}function u(c,m,g){if(m=m.toLowerCase(),g==="auto"){if(m==="height")return c.offsetHeight;if(m==="width")return c.offsetWidth}return m in f||(f[m]=L.test(m)),f[m]?parseFloat(g)||0:g}function h(c,m){var g=arguments.length,b=D(c);return m=C[m]?"cssFloat"in c.style?"cssFloat":"styleFloat":m,g===1?b:u(c,m,b[m]||c.style[m])}function w(c,m,g){var b=arguments.length;if(m=C[m]?"cssFloat"in c.style?"cssFloat":"styleFloat":m,b===3)return typeof g=="number"&&L.test(m)&&(g="".concat(g,"px")),c.style[m]=g,g;for(var n in m)m.hasOwnProperty(n)&&w(c,n,m[n]);return D(c)}function d(c){return c===document.body?document.documentElement.clientWidth:c.offsetWidth}function i(c){return c===document.body?window.innerHeight||document.documentElement.clientHeight:c.offsetHeight}function l(){var c=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),m=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:c,height:m}}function a(){var c=document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight;return{width:c,height:m}}function _(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(c){var m=c.getBoundingClientRect(),g=document.documentElement;return{left:m.left+(window.pageXOffset||g.scrollLeft)-(g.clientLeft||document.body.clientLeft||0),top:m.top+(window.pageYOffset||g.scrollTop)-(g.clientTop||document.body.clientTop||0)}}},zrhs:function(j,J,k){"use strict";var L=k("2qtc"),f=k("kLXV"),C=k("PpiC"),D=k("cDcd"),u=k.n(D),h=k("9kvl"),w=function(i){var l=i.shixunsDetail,a=i.globalSetting,_=i.loading,p=i.dispatch,c=Object(C.a)(i,["shixunsDetail","globalSetting","loading","dispatch"]);return u.a.createElement(f.a,{centered:!0,keyboard:!1,closable:!1,zIndex:6666,title:"\u63D0\u793A",visible:l.actionTabs.key==="Banner-Auth",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){p({type:"shixunsDetail/setActionTabs",payload:{}}),window.location.href="/account/certification"},onCancel:function(){p({type:"shixunsDetail/setActionTabs",payload:{}})}},u.a.createElement("p",{className:"tc font16"},"\u5F53\u524D\u7ADE\u8D5B\u9700\u8981\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u8BF7\u5148\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1\u540E\u518D\u62A5\u540D\u53C2\u8D5B",u.a.createElement("br",null),"\u8BF7\u95EE\u662F\u5426\u524D\u5F80\u8FDB\u884C\u8BA4\u8BC1\uFF1F"))};J.a=Object(h.a)(function(d){var i=d.shixunsDetail,l=d.loading,a=d.globalSetting;return{shixunsDetail:i,globalSetting:a,loading:l.models.index}})(w)}}]);