|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[211,5,6,7,8,13],{"+NIl":function(N,$,k){(function(P){P(k("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(c,_){"use strict";function D(g,w){g.cmdState.push(w)}function p(g){return g.cmdState.length>0?g.cmdState[g.cmdState.length-1]:null}function s(g){var w=g.cmdState.pop();w&&w.closeBracket()}function S(g){for(var w=g.cmdState,m=w.length-1;m>=0;m--){var d=w[m];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function v(g,w,m){return function(){this.name=g,this.bracketNo=0,this.style=w,this.styles=m,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};o.importmodule=v("importmodule","tag",["string","builtin"]),o.documentclass=v("documentclass","tag",["","atom"]),o.usepackage=v("usepackage","tag",["atom"]),o.begin=v("begin","tag",["atom"]),o.end=v("end","tag",["atom"]),o.label=v("label","tag",["atom"]),o.ref=v("ref","tag",["atom"]),o.eqref=v("eqref","tag",["atom"]),o.cite=v("cite","tag",["atom"]),o.bibitem=v("bibitem","tag",["atom"]),o.Bibitem=v("Bibitem","tag",["atom"]),o.RBibitem=v("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function i(g,w){g.f=w}function r(g,w){var m;if(g.match(/^\\[a-zA-Z@]+/)){var d=g.current().slice(1);return m=o.hasOwnProperty(d)?o[d]:o.DEFAULT,m=new m,D(w,m),i(w,y),m.style}if(g.match(/^\\[$&%#{}_]/))return"tag";if(g.match(/^\\[,;!\/\\]/))return"tag";if(g.match("\\["))return i(w,function(l,u){return h(l,u,"\\]")}),"keyword";if(g.match("\\("))return i(w,function(l,u){return h(l,u,"\\)")}),"keyword";if(g.match("$$"))return i(w,function(l,u){return h(l,u,"$$")}),"keyword";if(g.match("$"))return i(w,function(l,u){return h(l,u,"$")}),"keyword";var n=g.next();if(n=="%")return g.skipToEnd(),"comment";if(n=="}"||n=="]"){if(m=p(w),m)m.closeBracket(n),i(w,y);else return"error";return"bracket"}else return n=="{"||n=="["?(m=o.DEFAULT,m=new m,D(w,m),"bracket"):/\d/.test(n)?(g.eatWhile(/[\w.%]/),"atom"):(g.eatWhile(/[\w\-_]/),m=S(w),m.name=="begin"&&(m.argument=g.current()),m.styleIdentifier())}function h(g,w,m){if(g.eatSpace())return null;if(m&&g.match(m))return i(w,r),"keyword";if(g.match(/^\\[a-zA-Z@]+/))return"tag";if(g.match(/^[a-zA-Z]+/))return"variable-2";if(g.match(/^\\[$&%#{}_]/))return"tag";if(g.match(/^\\[,;!\/]/))return"tag";if(g.match(/^[\^_&]/))return"tag";if(g.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(g.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=g.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(g.skipToEnd(),"comment"):"error"}function y(g,w){var m=g.peek(),d;return m=="{"||m=="["?(d=p(w),d.openBracket(m),g.eat(m),i(w,r),"bracket"):/[ \t\r]/.test(m)?(g.eat(m),null):(i(w,r),s(w),r(g,w))}return{startState:function(){var g=_.inMathMode?function(w,m){return h(w,m)}:r;return{cmdState:[],f:g}},copyState:function(g){return{cmdState:g.cmdState.slice(),f:g.f}},token:function(g,w){return w.f(g,w)},blankLine:function(g){g.f=r,g.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"+ua5":function(N,$,k){},"19Vz":function(N,$,k){(function(P){P(k("VrN/"))})(function(P){P.defineOption("placeholder","",function(v,o,i){var r=i&&i!=P.Init;if(o&&!r)v.on("blur",p),v.on("change",s),v.on("swapDoc",s),P.on(v.getInputField(),"compositionupdate",v.state.placeholderCompose=function(){D(v)}),s(v);else if(!o&&r){v.off("blur",p),v.off("change",s),v.off("swapDoc",s),P.off(v.getInputField(),"compositionupdate",v.state.placeholderCompose),c(v);var h=v.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}o&&!v.hasFocus()&&p(v)});function c(v){v.state.placeholder&&(v.state.placeholder.parentNode.removeChild(v.state.placeholder),v.state.placeholder=null)}function _(v){c(v);var o=v.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=v.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var i=v.getOption("placeholder");typeof i=="string"&&(i=document.createTextNode(i)),o.appendChild(i),v.display.lineSpace.insertBefore(o,v.display.lineSpace.firstChild)}function D(v){setTimeout(function(){var o=!1,i=v.getInputField();i.nodeName=="TEXTAREA"?o=!i.value:v.lineCount()==1&&(o=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),o?_(v):c(v)},20)}function p(v){S(v)&&_(v)}function s(v){var o=v.getWrapperElement(),i=S(v);o.className=o.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?_(v):c(v)}function S(v){return v.lineCount()===1&&v.getLine(0)===""}})},"1T2W":function(N,$,k){N.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(N,$,k){(function(P){P(k("VrN/"))})(function(P){"use strict";var c={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},_={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(D,p){var s=D.indentUnit,S={},v=p.htmlMode?c:_;for(var o in v)S[o]=v[o];for(var o in p)S[o]=p[o];var i,r;function h(C,I){function j(G){return I.tokenize=G,G(C,I)}var M=C.next();if(M=="<")return C.eat("!")?C.eat("[")?C.match("CDATA[")?j(w("atom","]]>")):null:C.match("--")?j(w("comment","-->")):C.match("DOCTYPE",!0,!0)?(C.eatWhile(/[\w\._\-]/),j(m(1))):null:C.eat("?")?(C.eatWhile(/[\w\._\-]/),I.tokenize=w("meta","?>"),"meta"):(i=C.eat("/")?"closeTag":"openTag",I.tokenize=y,"tag bracket");if(M=="&"){var z;return C.eat("#")?C.eat("x")?z=C.eatWhile(/[a-fA-F\d]/)&&C.eat(";"):z=C.eatWhile(/[\d]/)&&C.eat(";"):z=C.eatWhile(/[\w\.\-:]/)&&C.eat(";"),z?"atom":"error"}else return C.eatWhile(/[^&<]/),null}h.isInText=!0;function y(C,I){var j=C.next();if(j==">"||j=="/"&&C.eat(">"))return I.tokenize=h,i=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return i="equals",null;if(j=="<"){I.tokenize=h,I.state=u,I.tagName=I.tagStart=null;var M=I.tokenize(C,I);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(j)?(I.tokenize=g(j),I.stringStartCol=C.column(),I.tokenize(C,I)):(C.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function g(C){var I=function(j,M){for(;!j.eol();)if(j.next()==C){M.tokenize=y;break}return"string"};return I.isInAttribute=!0,I}function w(C,I){return function(j,M){for(;!j.eol();){if(j.match(I)){M.tokenize=h;break}j.next()}return C}}function m(C){return function(I,j){for(var M;(M=I.next())!=null;){if(M=="<")return j.tokenize=m(C+1),j.tokenize(I,j);if(M==">")if(C==1){j.tokenize=h;break}else return j.tokenize=m(C-1),j.tokenize(I,j)}return"meta"}}function d(C,I,j){this.prev=C.context,this.tagName=I,this.indent=C.indented,this.startOfLine=j,(S.doNotIndent.hasOwnProperty(I)||C.context&&C.context.noIndent)&&(this.noIndent=!0)}function n(C){C.context&&(C.context=C.context.prev)}function l(C,I){for(var j;;){if(!C.context)return;if(j=C.context.tagName,!S.contextGrabbers.hasOwnProperty(j)||!S.contextGrabbers[j].hasOwnProperty(I))return;n(C)}}function u(C,I,j){return C=="openTag"?(j.tagStart=I.column(),T):C=="closeTag"?E:u}function T(C,I,j){return C=="word"?(j.tagName=I.current(),r="tag",O):S.allowMissingTagName&&C=="endTag"?(r="tag bracket",O(C,I,j)):(r="error",T)}function E(C,I,j){if(C=="word"){var M=I.current();return j.context&&j.context.tagName!=M&&S.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==M||S.matchClosing===!1?(r="tag",a):(r="tag error",L)}else return S.allowMissingTagName&&C=="endTag"?(r="tag bracket",a(C,I,j)):(r="error",L)}function a(C,I,j){return C!="endTag"?(r="error",a):(n(j),u)}function L(C,I,j){return r="error",a(C,I,j)}function O(C,I,j){if(C=="word")return r="attribute",f;if(C=="endTag"||C=="selfcloseTag"){var M=j.tagName,z=j.tagStart;return j.tagName=j.tagStart=null,C=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(M)?l(j,M):(l(j,M),j.context=new d(j,M,z==j.indented)),u}return r="error",O}function f(C,I,j){return C=="equals"?x:(S.allowMissing||(r="error"),O(C,I,j))}function x(C,I,j){return C=="string"?b:C=="word"&&S.allowUnquoted?(r="string",O):(r="error",O(C,I,j))}function b(C,I,j){return C=="string"?b:O(C,I,j)}return{startState:function(C){var I={tokenize:h,state:u,indented:C||0,tagName:null,tagStart:null,context:null};return C!=null&&(I.baseIndent=C),I},token:function(C,I){if(!I.tagName&&C.sol()&&(I.indented=C.indentation()),C.eatSpace())return null;i=null;var j=I.tokenize(C,I);return(j||i)&&j!="comment"&&(r=null,I.state=I.state(i||j,C,I),r&&(j=r=="error"?j+" error":r)),j},indent:function(C,I,j){var M=C.context;if(C.tokenize.isInAttribute)return C.tagStart==C.indented?C.stringStartCol+1:C.indented+s;if(M&&M.noIndent)return P.Pass;if(C.tokenize!=y&&C.tokenize!=h)return j?j.match(/^(\s*)/)[0].length:0;if(C.tagName)return S.multilineTagIndentPastTag!==!1?C.tagStart+C.tagName.length+2:C.tagStart+s*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(I))return 0;var z=I&&/^<(\/)?([\w_:\.-]*)/.exec(I);if(z&&z[1])for(;M;)if(M.tagName==z[2]){M=M.prev;break}else if(S.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(z)for(;M;){var G=S.contextGrabbers[M.tagName];if(G&&G.hasOwnProperty(z[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+s:C.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(C){C.state==x&&(C.state=O)},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(C){for(var I=[],j=C.context;j;j=j.prev)j.tagName&&I.push(j.tagName);return I.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("MlIO"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.Hasher,p=c.x64,s=p.Word,S=p.WordArray,v=c.algo;function o(){return s.create.apply(s,arguments)}var i=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],r=[];(function(){for(var y=0;y<80;y++)r[y]=o()})();var h=v.SHA512=D.extend({_doReset:function(){this._hash=new S.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(y,g){for(var w=this._hash.words,m=w[0],d=w[1],n=w[2],l=w[3],u=w[4],T=w[5],E=w[6],a=w[7],L=m.high,O=m.low,f=d.high,x=d.low,b=n.high,C=n.low,I=l.high,j=l.low,M=u.high,z=u.low,G=T.high,B=T.low,K=E.high,F=E.low,H=a.high,W=a.low,Q=L,ee=O,q=f,pe=x,ye=b,ie=C,Se=I,ge=j,oe=M,le=z,te=G,be=B,Z=K,ae=F,Ee=H,ne=W,J=0;J<80;J++){var X,Y,he=r[J];if(J<16)Y=he.high=y[g+J*2]|0,X=he.low=y[g+J*2+1]|0;else{var de=r[J-15],Te=de.high,ze=de.low,Ze=(Te>>>1|ze<<31)^(Te>>>8|ze<<24)^Te>>>7,Je=(ze>>>1|Te<<31)^(ze>>>8|Te<<24)^(ze>>>7|Te<<25),$e=r[J-2],tt=$e.high,nt=$e.low,Me=(tt>>>19|nt<<13)^(tt<<3|nt>>>29)^tt>>>6,Ce=(nt>>>19|tt<<13)^(nt<<3|tt>>>29)^(nt>>>6|tt<<26),Xe=r[J-7],et=Xe.high,Ue=Xe.low,Ve=r[J-16],Pe=Ve.high,we=Ve.low;X=Je+Ue,Y=Ze+et+(X>>>0<Je>>>0?1:0),X=X+Ce,Y=Y+Me+(X>>>0<Ce>>>0?1:0),X=X+we,Y=Y+Pe+(X>>>0<we>>>0?1:0),he.high=Y,he.low=X}var Ae=oe&te^~oe&Z,ce=le&be^~le&ae,xe=Q&q^Q&ye^q&ye,_e=ee&pe^ee&ie^pe&ie,Le=(Q>>>28|ee<<4)^(Q<<30|ee>>>2)^(Q<<25|ee>>>7),Re=(ee>>>28|Q<<4)^(ee<<30|Q>>>2)^(ee<<25|Q>>>7),Ge=(oe>>>14|le<<18)^(oe>>>18|le<<14)^(oe<<23|le>>>9),Ye=(le>>>14|oe<<18)^(le>>>18|oe<<14)^(le<<23|oe>>>9),at=i[J],it=at.high,ot=at.low,yt=ne+Ye,wt=Ee+Ge+(yt>>>0<ne>>>0?1:0),yt=yt+ce,wt=wt+Ae+(yt>>>0<ce>>>0?1:0),yt=yt+ot,wt=wt+it+(yt>>>0<ot>>>0?1:0),yt=yt+X,wt=wt+Y+(yt>>>0<X>>>0?1:0),ft=Re+_e,jt=Le+xe+(ft>>>0<Re>>>0?1:0);Ee=Z,ne=ae,Z=te,ae=be,te=oe,be=le,le=ge+yt|0,oe=Se+wt+(le>>>0<ge>>>0?1:0)|0,Se=ye,ge=ie,ye=q,ie=pe,q=Q,pe=ee,ee=yt+ft|0,Q=wt+jt+(ee>>>0<yt>>>0?1:0)|0}O=m.low=O+ee,m.high=L+Q+(O>>>0<ee>>>0?1:0),x=d.low=x+pe,d.high=f+q+(x>>>0<pe>>>0?1:0),C=n.low=C+ie,n.high=b+ye+(C>>>0<ie>>>0?1:0),j=l.low=j+ge,l.high=I+Se+(j>>>0<ge>>>0?1:0),z=u.low=z+le,u.high=M+oe+(z>>>0<le>>>0?1:0),B=T.low=B+be,T.high=G+te+(B>>>0<be>>>0?1:0),F=E.low=F+ae,E.high=K+Z+(F>>>0<ae>>>0?1:0),W=a.low=W+ne,a.high=H+Ee+(W>>>0<ne>>>0?1:0)},_doFinalize:function(){var y=this._data,g=y.words,w=this._nDataBytes*8,m=y.sigBytes*8;g[m>>>5]|=128<<24-m%32,g[(m+128>>>10<<5)+30]=Math.floor(w/4294967296),g[(m+128>>>10<<5)+31]=w,y.sigBytes=g.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var y=D.clone.call(this);return y._hash=this._hash.clone(),y},blockSize:1024/32});c.SHA512=D._createHelper(h),c.HmacSHA512=D._createHmacHelper(h)}(),P.SHA512})},"3y9D":function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.WordArray,p=_.Hasher,s=c.algo,S=[],v=s.SHA1=p.extend({_doReset:function(){this._hash=new D.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,i){for(var r=this._hash.words,h=r[0],y=r[1],g=r[2],w=r[3],m=r[4],d=0;d<80;d++){if(d<16)S[d]=o[i+d]|0;else{var n=S[d-3]^S[d-8]^S[d-14]^S[d-16];S[d]=n<<1|n>>>31}var l=(h<<5|h>>>27)+m+S[d];d<20?l+=(y&g|~y&w)+1518500249:d<40?l+=(y^g^w)+1859775393:d<60?l+=(y&g|y&w|g&w)-1894007588:l+=(y^g^w)-899497514,m=w,w=g,g=y<<30|y>>>2,y=h,h=l}r[0]=r[0]+h|0,r[1]=r[1]+y|0,r[2]=r[2]+g|0,r[3]=r[3]+w|0,r[4]=r[4]+m|0},_doFinalize:function(){var o=this._data,i=o.words,r=this._nDataBytes*8,h=o.sigBytes*8;return i[h>>>5]|=128<<24-h%32,i[(h+64>>>9<<4)+14]=Math.floor(r/4294967296),i[(h+64>>>9<<4)+15]=r,o.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var o=p.clone.call(this);return o._hash=this._hash.clone(),o}});c.SHA1=p._createHelper(v),c.HmacSHA1=p._createHmacHelper(v)}(),P.SHA1})},4:function(N,$){},"5hvy":function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("MlIO"))})(this,function(P){return function(c){var _=P,D=_.lib,p=D.WordArray,s=D.Hasher,S=_.x64,v=S.Word,o=_.algo,i=[],r=[],h=[];(function(){for(var w=1,m=0,d=0;d<24;d++){i[w+5*m]=(d+1)*(d+2)/2%64;var n=m%5,l=(2*w+3*m)%5;w=n,m=l}for(var w=0;w<5;w++)for(var m=0;m<5;m++)r[w+5*m]=m+(2*w+3*m)%5*5;for(var u=1,T=0;T<24;T++){for(var E=0,a=0,L=0;L<7;L++){if(u&1){var O=(1<<L)-1;O<32?a^=1<<O:E^=1<<O-32}u&128?u=u<<1^113:u<<=1}h[T]=v.create(E,a)}})();var y=[];(function(){for(var w=0;w<25;w++)y[w]=v.create()})();var g=o.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var w=this._state=[],m=0;m<25;m++)w[m]=new v.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(w,m){for(var d=this._state,n=this.blockSize/2,l=0;l<n;l++){var u=w[m+2*l],T=w[m+2*l+1];u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var E=d[l];E.high^=T,E.low^=u}for(var a=0;a<24;a++){for(var L=0;L<5;L++){for(var O=0,f=0,x=0;x<5;x++){var E=d[L+5*x];O^=E.high,f^=E.low}var b=y[L];b.high=O,b.low=f}for(var L=0;L<5;L++)for(var C=y[(L+4)%5],I=y[(L+1)%5],j=I.high,M=I.low,O=C.high^(j<<1|M>>>31),f=C.low^(M<<1|j>>>31),x=0;x<5;x++){var E=d[L+5*x];E.high^=O,E.low^=f}for(var z=1;z<25;z++){var O,f,E=d[z],G=E.high,B=E.low,K=i[z];K<32?(O=G<<K|B>>>32-K,f=B<<K|G>>>32-K):(O=B<<K-32|G>>>64-K,f=G<<K-32|B>>>64-K);var F=y[r[z]];F.high=O,F.low=f}var H=y[0],W=d[0];H.high=W.high,H.low=W.low;for(var L=0;L<5;L++)for(var x=0;x<5;x++){var z=L+5*x,E=d[z],Q=y[z],ee=y[(L+1)%5+5*x],q=y[(L+2)%5+5*x];E.high=Q.high^~ee.high&q.high,E.low=Q.low^~ee.low&q.low}var E=d[0],pe=h[a];E.high^=pe.high,E.low^=pe.low}},_doFinalize:function(){var w=this._data,m=w.words,d=this._nDataBytes*8,n=w.sigBytes*8,l=this.blockSize*32;m[n>>>5]|=1<<24-n%32,m[(c.ceil((n+1)/l)*l>>>5)-1]|=128,w.sigBytes=m.length*4,this._process();for(var u=this._state,T=this.cfg.outputLength/8,E=T/8,a=[],L=0;L<E;L++){var O=u[L],f=O.high,x=O.low;f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,a.push(x),a.push(f)}return new p.init(a,T)},clone:function(){for(var w=s.clone.call(this),m=w._state=this._state.slice(0),d=0;d<25;d++)m[d]=m[d].clone();return w}});_.SHA3=s._createHelper(g),_.HmacSHA3=s._createHmacHelper(g)}(Math),P.SHA3})},"5nXd":function(N,$,k){var P=k("MFOe"),c=P.slice,_=P.pluck,D=P.each,p=P.bind,s=P.create,S=P.isList,v=P.isFunction,o=P.isObject;N.exports={createStore:h};var i={version:"2.0.12",enabled:!1,get:function(y,g){var w=this.storage.read(this._namespacePrefix+y);return this._deserialize(w,g)},set:function(y,g){return g===void 0?this.remove(y):(this.storage.write(this._namespacePrefix+y,this._serialize(g)),g)},remove:function(y){this.storage.remove(this._namespacePrefix+y)},each:function(y){var g=this;this.storage.each(function(w,m){y.call(g,g._deserialize(w),(m||"").replace(g._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(y){return this._namespacePrefix=="__storejs_"+y+"_"},createStore:function(){return h.apply(this,arguments)},addPlugin:function(y){this._addPlugin(y)},namespace:function(y){return h(this.storage,this.plugins,y)}};function r(){var y=typeof console=="undefined"?null:console;if(!y)return;var g=y.warn?y.warn:y.log;g.apply(y,arguments)}function h(y,g,w){w||(w=""),y&&!S(y)&&(y=[y]),g&&!S(g)&&(g=[g]);var m=w?"__storejs_"+w+"_":"",d=w?new RegExp("^"+m):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(w))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var l={_namespacePrefix:m,_namespaceRegexp:d,_testStorage:function(T){try{var E="__storejs__test__";T.write(E,E);var a=T.read(E)===E;return T.remove(E),a}catch(L){return!1}},_assignPluginFnProp:function(T,E){var a=this[E];this[E]=function(){var O=c(arguments,0),f=this;function x(){return a?(D(arguments,function(C,I){O[I]=C}),a.apply(f,O)):void 0}var b=[x].concat(O);return T.apply(f,b)}},_serialize:function(T){return JSON.stringify(T)},_deserialize:function(T,E){if(!T)return E;var a="";try{a=JSON.parse(T)}catch(L){a=T}return a!==void 0?a:E},_addStorage:function(T){if(this.enabled)return;this._testStorage(T)&&(this.storage=T,this.enabled=!0)},_addPlugin:function(T){var E=this;if(S(T)){D(T,function(O){E._addPlugin(O)});return}var a=_(this.plugins,function(O){return T===O});if(a)return;if(this.plugins.push(T),!v(T))throw new Error("Plugins must be function values that return objects");var L=T.call(this);if(!o(L))throw new Error("Plugins must return an object of function properties");D(L,function(O,f){if(!v(O))throw new Error("Bad plugin property: "+f+" from plugin "+T.name+". Plugins should only return functions.");E._assignPluginFnProp(O,f)})},addStorage:function(T){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(T)}},u=s(l,i,{plugins:[]});return u.raw={},D(u,function(T,E){v(T)&&(u.raw[E]=p(u,T))}),D(y,function(T){u._addStorage(T)}),D(g,function(T){u._addPlugin(T)}),u}},"6+eU":function(N,$,k){"use strict";k.d($,"a",function(){return a});var P=k("wx14"),c=k("rePB"),_=k("VTBJ"),D=k("1OyB"),p=k("vuIU"),s=k("Ji7U"),S=k("LK+K"),v=k("cDcd"),o=k.n(v),i=k("TSYQ"),r=k.n(i),h=function(O){var f,x="".concat(O.rootPrefixCls,"-item"),b=r()(x,"".concat(x,"-").concat(O.page),(f={},Object(c.a)(f,"".concat(x,"-active"),O.active),Object(c.a)(f,O.className,!!O.className),Object(c.a)(f,"".concat(x,"-disabled"),!O.page),f)),C=function(){O.onClick(O.page)},I=function(M){O.onKeyPress(M,O.onClick,O.page)};return o.a.createElement("li",{title:O.showTitle?O.page:null,className:b,onClick:C,onKeyPress:I,tabIndex:"0"},O.itemRender(O.page,"page",o.a.createElement("a",{rel:"nofollow"},O.page)))},y=h,g={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},w=function(L){Object(s.a)(f,L);var O=Object(S.a)(f);function f(){var x;Object(D.a)(this,f);for(var b=arguments.length,C=new Array(b),I=0;I<b;I++)C[I]=arguments[I];return x=O.call.apply(O,[this].concat(C)),x.state={goInputText:""},x.buildOptionText=function(j){return"".concat(j," ").concat(x.props.locale.items_per_page)},x.changeSize=function(j){x.props.changeSize(Number(j))},x.handleChange=function(j){x.setState({goInputText:j.target.value})},x.handleBlur=function(j){var M=x.props,z=M.goButton,G=M.quickGo,B=M.rootPrefixCls,K=x.state.goInputText;if(z||K==="")return;if(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||j.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;x.setState({goInputText:""}),G(x.getValidValue())},x.go=function(j){var M=x.state.goInputText;if(M==="")return;(j.keyCode===g.ENTER||j.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(p.a)(f,[{key:"getValidValue",value:function(){var b=this.state,C=b.goInputText,I=b.current;return!C||isNaN(C)?I:Number(C)}},{key:"getPageSizeOptions",value:function(){var b=this.props,C=b.pageSize,I=b.pageSizeOptions;return I.some(function(j){return j.toString()===C.toString()})?I:I.concat([C.toString()]).sort(function(j,M){var z=isNaN(Number(j))?0:Number(j),G=isNaN(Number(M))?0:Number(M);return z-G})}},{key:"render",value:function(){var b=this,C=this.props,I=C.pageSize,j=C.locale,M=C.rootPrefixCls,z=C.changeSize,G=C.quickGo,B=C.goButton,K=C.selectComponentClass,F=C.buildOptionText,H=C.selectPrefixCls,W=C.disabled,Q=this.state.goInputText,ee="".concat(M,"-options"),q=K,pe=null,ye=null,ie=null;if(!z&&!G)return null;var Se=this.getPageSizeOptions();if(z&&q){var ge=Se.map(function(oe,le){return o.a.createElement(q.Option,{key:le,value:oe.toString()},(F||b.buildOptionText)(oe))});pe=o.a.createElement(q,{disabled:W,prefixCls:H,showSearch:!1,className:"".concat(ee,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(I||Se[0]).toString(),onChange:this.changeSize,getPopupContainer:function(le){return le.parentNode}},ge)}return G&&(B&&(ie=typeof B=="boolean"?o.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:W,className:"".concat(ee,"-quick-jumper-button")},j.jump_to_confirm):o.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),ye=o.a.createElement("div",{className:"".concat(ee,"-quick-jumper")},j.jump_to,o.a.createElement("input",{disabled:W,type:"text",value:Q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,ie)),o.a.createElement("li",{className:"".concat(ee)},pe,ye)}}]),f}(o.a.Component);w.defaultProps={pageSizeOptions:["10","20","50","100"]};var m=w,d=k("N2Kk");function n(){}function l(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function u(L,O,f){return f}function T(L,O,f){var x=typeof L=="undefined"?O.pageSize:L;return Math.floor((f.total-1)/x)+1}var E=function(L){Object(s.a)(f,L);var O=Object(S.a)(f);function f(x){var b;Object(D.a)(this,f),b=O.call(this,x),b.getJumpPrevPage=function(){return Math.max(1,b.state.current-(b.props.showLessItems?3:5))},b.getJumpNextPage=function(){return Math.min(T(void 0,b.state,b.props),b.state.current+(b.props.showLessItems?3:5))},b.getItemIcon=function(z,G){var B=b.props.prefixCls,K=z||o.a.createElement("button",{type:"button","aria-label":G,className:"".concat(B,"-item-link")});return typeof z=="function"&&(K=o.a.createElement(z,Object(_.a)({},b.props))),K},b.savePaginationNode=function(z){b.paginationNode=z},b.isValid=function(z){return l(z)&&z!==b.state.current},b.shouldDisplayQuickJumper=function(){var z=b.props,G=z.showQuickJumper,B=z.pageSize,K=z.total;return K<=B?!1:G},b.handleKeyDown=function(z){(z.keyCode===g.ARROW_UP||z.keyCode===g.ARROW_DOWN)&&z.preventDefault()},b.handleKeyUp=function(z){var G=b.getValidValue(z),B=b.state.currentInputValue;G!==B&&b.setState({currentInputValue:G}),z.keyCode===g.ENTER?b.handleChange(G):z.keyCode===g.ARROW_UP?b.handleChange(G-1):z.keyCode===g.ARROW_DOWN&&b.handleChange(G+1)},b.changePageSize=function(z){var G=b.state.current,B=T(z,b.state,b.props);G=G>B?B:G,B===0&&(G=b.state.current),typeof z=="number"&&("pageSize"in b.props||b.setState({pageSize:z}),"current"in b.props||b.setState({current:G,currentInputValue:G})),b.props.onShowSizeChange(G,z),"onChange"in b.props&&b.props.onChange&&b.props.onChange(G,z)},b.handleChange=function(z){var G=b.props.disabled,B=z;if(b.isValid(B)&&!G){var K=T(void 0,b.state,b.props);B>K?B=K:B<1&&(B=1),"current"in b.props||b.setState({current:B,currentInputValue:B});var F=b.state.pageSize;return b.props.onChange(B,F),B}return b.state.current},b.prev=function(){b.hasPrev()&&b.handleChange(b.state.current-1)},b.next=function(){b.hasNext()&&b.handleChange(b.state.current+1)},b.jumpPrev=function(){b.handleChange(b.getJumpPrevPage())},b.jumpNext=function(){b.handleChange(b.getJumpNextPage())},b.hasPrev=function(){return b.state.current>1},b.hasNext=function(){return b.state.current<T(void 0,b.state,b.props)},b.runIfEnter=function(z,G){if(z.key==="Enter"||z.charCode===13){for(var B=arguments.length,K=new Array(B>2?B-2:0),F=2;F<B;F++)K[F-2]=arguments[F];G.apply(void 0,K)}},b.runIfEnterPrev=function(z){b.runIfEnter(z,b.prev)},b.runIfEnterNext=function(z){b.runIfEnter(z,b.next)},b.runIfEnterJumpPrev=function(z){b.runIfEnter(z,b.jumpPrev)},b.runIfEnterJumpNext=function(z){b.runIfEnter(z,b.jumpNext)},b.handleGoTO=function(z){(z.keyCode===g.ENTER||z.type==="click")&&b.handleChange(b.state.currentInputValue)};var C=x.onChange!==n,I="current"in x;I&&!C&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var j=x.defaultCurrent;"current"in x&&(j=x.current);var M=x.defaultPageSize;return"pageSize"in x&&(M=x.pageSize),j=Math.min(j,T(M,void 0,x)),b.state={current:j,currentInputValue:j,pageSize:M},b}return Object(p.a)(f,[{key:"componentDidUpdate",value:function(b,C){var I=this.props.prefixCls;if(C.current!==this.state.current&&this.paginationNode){var j=this.paginationNode.querySelector(".".concat(I,"-item-").concat(C.current));j&&document.activeElement===j&&j.blur()}}},{key:"getValidValue",value:function(b){var C=b.target.value,I=T(void 0,this.state,this.props),j=this.state.currentInputValue,M;return C===""?M=C:isNaN(Number(C))?M=j:C>=I?M=I:M=Number(C),M}},{key:"getShowSizeChanger",value:function(){var b=this.props,C=b.showSizeChanger,I=b.total,j=b.totalBoundaryShowSizeChanger;return typeof C!="undefined"?C:I>j}},{key:"renderPrev",value:function(b){var C=this.props,I=C.prevIcon,j=C.itemRender,M=j(b,"prev",this.getItemIcon(I,"prev page")),z=!this.hasPrev();return Object(v.isValidElement)(M)?Object(v.cloneElement)(M,{disabled:z}):M}},{key:"renderNext",value:function(b){var C=this.props,I=C.nextIcon,j=C.itemRender,M=j(b,"next",this.getItemIcon(I,"next page")),z=!this.hasNext();return Object(v.isValidElement)(M)?Object(v.cloneElement)(M,{disabled:z}):M}},{key:"render",value:function(){var b=this,C=this.props,I=C.prefixCls,j=C.className,M=C.style,z=C.disabled,G=C.hideOnSinglePage,B=C.total,K=C.locale,F=C.showQuickJumper,H=C.showLessItems,W=C.showTitle,Q=C.showTotal,ee=C.simple,q=C.itemRender,pe=C.showPrevNextJumpers,ye=C.jumpPrevIcon,ie=C.jumpNextIcon,Se=C.selectComponentClass,ge=C.selectPrefixCls,oe=C.pageSizeOptions,le=this.state,te=le.current,be=le.pageSize,Z=le.currentInputValue;if(G===!0&&B<=be)return null;var ae=T(void 0,this.state,this.props),Ee=[],ne=null,J=null,X=null,Y=null,he=null,de=F&&F.goButton,Te=H?1:2,ze=te-1>0?te-1:0,Ze=te+1<ae?te+1:ae,Je=Object.keys(this.props).reduce(function(ce,xe){return(xe.substr(0,5)==="data-"||xe.substr(0,5)==="aria-"||xe==="role")&&(ce[xe]=b.props[xe]),ce},{});if(ee)return de&&(typeof de=="boolean"?he=o.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},K.jump_to_confirm):he=o.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},de),he=o.a.createElement("li",{title:W?"".concat(K.jump_to).concat(te,"/").concat(ae):null,className:"".concat(I,"-simple-pager")},he)),o.a.createElement("ul",Object(P.a)({className:r()(I,"".concat(I,"-simple"),Object(c.a)({},"".concat(I,"-disabled"),z),j),style:M,ref:this.savePaginationNode},Je),o.a.createElement("li",{title:W?K.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(c.a)({},"".concat(I,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ze)),o.a.createElement("li",{title:W?"".concat(te,"/").concat(ae):null,className:"".concat(I,"-simple-pager")},o.a.createElement("input",{type:"text",value:Z,disabled:z,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),o.a.createElement("span",{className:"".concat(I,"-slash")},"/"),ae),o.a.createElement("li",{title:W?K.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(c.a)({},"".concat(I,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ze)),he);if(ae<=3+Te*2){var $e={locale:K,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:W,itemRender:q};ae||Ee.push(o.a.createElement(y,Object(P.a)({},$e,{key:"noPager",page:ae,className:"".concat(I,"-disabled")})));for(var tt=1;tt<=ae;tt+=1){var nt=te===tt;Ee.push(o.a.createElement(y,Object(P.a)({},$e,{key:tt,page:tt,active:nt})))}}else{var Me=H?K.prev_3:K.prev_5,Ce=H?K.next_3:K.next_5;pe&&(ne=o.a.createElement("li",{title:W?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:r()("".concat(I,"-jump-prev"),Object(c.a)({},"".concat(I,"-jump-prev-custom-icon"),!!ye))},q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ye,"prev page"))),J=o.a.createElement("li",{title:W?Ce:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:r()("".concat(I,"-jump-next"),Object(c.a)({},"".concat(I,"-jump-next-custom-icon"),!!ie))},q(this.getJumpNextPage(),"jump-next",this.getItemIcon(ie,"next page")))),Y=o.a.createElement(y,{locale:K,last:!0,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ae,page:ae,active:!1,showTitle:W,itemRender:q}),X=o.a.createElement(y,{locale:K,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:W,itemRender:q});var Xe=Math.max(1,te-Te),et=Math.min(te+Te,ae);te-1<=Te&&(et=1+Te*2),ae-te<=Te&&(Xe=ae-Te*2);for(var Ue=Xe;Ue<=et;Ue+=1){var Ve=te===Ue;Ee.push(o.a.createElement(y,{locale:K,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ue,page:Ue,active:Ve,showTitle:W,itemRender:q}))}te-1>=Te*2&&te!==1+2&&(Ee[0]=Object(v.cloneElement)(Ee[0],{className:"".concat(I,"-item-after-jump-prev")}),Ee.unshift(ne)),ae-te>=Te*2&&te!==ae-2&&(Ee[Ee.length-1]=Object(v.cloneElement)(Ee[Ee.length-1],{className:"".concat(I,"-item-before-jump-next")}),Ee.push(J)),Xe!==1&&Ee.unshift(X),et!==ae&&Ee.push(Y)}var Pe=null;Q&&(Pe=o.a.createElement("li",{className:"".concat(I,"-total-text")},Q(B,[B===0?0:(te-1)*be+1,te*be>B?B:te*be])));var we=!this.hasPrev()||!ae,Ae=!this.hasNext()||!ae;return o.a.createElement("ul",Object(P.a)({className:r()(I,j,Object(c.a)({},"".concat(I,"-disabled"),z)),style:M,unselectable:"unselectable",ref:this.savePaginationNode},Je),Pe,o.a.createElement("li",{title:W?K.prev_page:null,onClick:this.prev,tabIndex:we?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(c.a)({},"".concat(I,"-disabled"),we)),"aria-disabled":we},this.renderPrev(ze)),Ee,o.a.createElement("li",{title:W?K.next_page:null,onClick:this.next,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(c.a)({},"".concat(I,"-disabled"),Ae)),"aria-disabled":Ae},this.renderNext(Ze)),o.a.createElement(m,{disabled:z,locale:K,rootPrefixCls:I,selectComponentClass:Se,selectPrefixCls:ge,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:be,pageSizeOptions:oe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:de}))}}],[{key:"getDerivedStateFromProps",value:function(b,C){var I={};if("current"in b&&(I.current=b.current,b.current!==C.current&&(I.currentInputValue=I.current)),"pageSize"in b&&b.pageSize!==C.pageSize){var j=C.current,M=T(b.pageSize,C,b);j=j>M?M:j,"current"in b||(I.current=j,I.currentInputValue=j),I.pageSize=b.pageSize}return I}}]),f}(o.a.Component);E.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:d.a,style:{},itemRender:u,totalBoundaryShowSizeChanger:50};var a=E},"6RRn":function(N,$,k){"use strict";var P=k("wCXF"),c=k("n6Qo");k.d($,"b",function(){return c.a});var _=k("IBYe"),D=k("6eGT"),p=k("hW8S");k.d($,"a",function(){return p.a}),$.c=P.b},"6eGT":function(N,$,k){"use strict";function P(c){return null}$.a=P},"7Cbv":function(N,$,k){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),c=new Uint8Array(16);function _(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(c)}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 p(y){return typeof y=="string"&&D.test(y)}for(var s=p,S=[],v=0;v<256;++v)S.push((v+256).toString(16).substr(1));function o(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(S[y[g+0]]+S[y[g+1]]+S[y[g+2]]+S[y[g+3]]+"-"+S[y[g+4]]+S[y[g+5]]+"-"+S[y[g+6]]+S[y[g+7]]+"-"+S[y[g+8]]+S[y[g+9]]+"-"+S[y[g+10]]+S[y[g+11]]+S[y[g+12]]+S[y[g+13]]+S[y[g+14]]+S[y[g+15]]).toLowerCase();if(!s(w))throw TypeError("Stringified UUID is invalid");return w}var i=o;function r(y,g,w){y=y||{};var m=y.random||(y.rng||_)();if(m[6]=m[6]&15|64,m[8]=m[8]&63|128,g){w=w||0;for(var d=0;d<16;++d)g[w+d]=m[d];return g}return i(m)}var h=$.a=r},"7ahc":function(N,$,k){"use strict";k.d($,"a",function(){return T});var P=k("k1fw"),c=k("0Owb"),_=k("+L6B"),D=k("2/Rp"),p=k("y8nQ"),s=k("Vl3Y"),S=k("tJVT"),v=k("OaEy"),o=k("2fM7"),i=k("cDcd"),r=k.n(i),h=k("VrN/"),y=k.n(h),g=k("p77/"),w=k.n(g),m=k("c5Ni"),d=k.n(m),n=o.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};$.b=function(E){var a=E.callback,L=E.onCancel,O=Object(i.useState)("python"),f=Object(S.a)(O,2),x=f[0],b=f[1];function C(j){b(u[j][1])}function I(j){a(j)}return r.a.createElement(s.a,Object(c.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:I}),r.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(o.a,{onChange:C},Object.keys(u).map(function(j){return r.a.createElement(n,{key:j,value:j},u[j][0])}))),r.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(T,{mode:x})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(D.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(D.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function T(E){var a=E.value,L=E.onChange,O=E.mode,f=E.options,x=f===void 0?{}:f,b=Object(i.useRef)(),C=Object(i.useState)(),I=Object(S.a)(C,2),j=I[0],M=I[1];return Object(i.useEffect)(function(){if(j){function z(G){var B=G.getValue();L&&L(B)}return j.on("change",z),function(){j.off("change",z)}}},[j,L]),Object(i.useEffect)(function(){j&&j.setOption("mode",O)},[j,O]),Object(i.useEffect)(function(){j&&((a!==j.getValue()||a==="")&&setTimeout(function(){j.setValue(a||" ")},300))},[j,a]),Object(i.useEffect)(function(){if(b.current&&!j){var z=y.a.fromTextArea(b.current,Object(P.a)({mode:O,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));M(z)}},[b.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:b}))}},"815F":function(N,$,k){"use strict";k.d($,"e",function(){return S}),k.d($,"c",function(){return o}),k.d($,"d",function(){return i}),k.d($,"a",function(){return h}),k.d($,"f",function(){return y}),k.d($,"b",function(){return g});var P=k("KQm4"),c=k("VTBJ"),_=k("Ff2n"),D=k("Zm9Q"),p=k("Kwbf"),s=k("OZM5");function S(w,m){return w!=null?w:m}function v(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=new Map;function d(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(u){var T=u.key,E=u.children;Object(p.a)(T!=null,"Tree node must have a certain key: [".concat(l).concat(T,"]"));var a=String(T);Object(p.a)(!m.has(a)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(a)),m.set(a,!0),d(E,"".concat(l).concat(a," > "))})}d(w)}function o(w){function m(d){var n=Object(D.a)(d);return n.map(function(l){if(!Object(s.i)(l))return Object(p.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var u=l.key,T=l.props,E=T.children,a=Object(_.a)(T,["children"]),L=Object(c.a)({key:u},a),O=m(E);return O.length&&(L.children=O),L}).filter(function(l){return l})}return m(w)}function i(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(m===!0?[]:m),n=[];function l(u){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(E,a){var L=Object(s.h)(T?T.pos:"0",a),O=S(E.key,L),f=Object(c.a)(Object(c.a)({},E),{},{parent:T,pos:L,children:null,data:E,isStart:[].concat(Object(P.a)(T?T.isStart:[]),[a===0]),isEnd:[].concat(Object(P.a)(T?T.isEnd:[]),[a===u.length-1])});return n.push(f),m===!0||d.has(O)?f.children=l(E.children||[],f):f.children=[],f})}return l(w),n}function r(w,m,d){var n;d?typeof d=="string"?n=function(T){return T[d]}:typeof d=="function"&&(n=function(T){return d(T)}):n=function(T,E){return S(T.key,E)};function l(u,T,E){var a=u?u.children:w,L=u?Object(s.h)(E.pos,T):"0";if(u){var O=n(u,L),f={node:u,index:T,pos:L,key:O,parentPos:E.node?E.pos:null,level:E.level+1};m(f)}a&&a.forEach(function(x,b){l(x,b,{node:u,pos:L,level:E?E.level+1:-1})})}l(null)}function h(w){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=m.initWrapper,n=m.processEntity,l=m.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,T={},E={},a={posEntities:T,keyEntities:E};return d&&(a=d(a)||a),r(w,function(L){var O=L.node,f=L.index,x=L.pos,b=L.key,C=L.parentPos,I=L.level,j={node:O,index:f,key:b,pos:x,level:I},M=S(b,x);T[x]=j,E[M]=j,j.parent=T[C],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,a)},u),l&&l(a),a}function y(w,m){var d=m.expandedKeys,n=m.selectedKeys,l=m.loadedKeys,u=m.loadingKeys,T=m.checkedKeys,E=m.halfCheckedKeys,a=m.dragOverNodeKey,L=m.dropPosition,O=m.keyEntities,f=O[w],x={eventKey:w,expanded:d.indexOf(w)!==-1,selected:n.indexOf(w)!==-1,loaded:l.indexOf(w)!==-1,loading:u.indexOf(w)!==-1,checked:T.indexOf(w)!==-1,halfChecked:E.indexOf(w)!==-1,pos:String(f?f.pos:""),dragOver:a===w&&L===0,dragOverGapTop:a===w&&L===-1,dragOverGapBottom:a===w&&L===1};return x}function g(w){var m=w.data,d=w.expanded,n=w.selected,l=w.checked,u=w.loaded,T=w.loading,E=w.halfChecked,a=w.dragOver,L=w.dragOverGapTop,O=w.dragOverGapBottom,f=w.pos,x=w.active,b=Object(c.a)(Object(c.a)({},m),{},{expanded:d,selected:n,checked:l,loaded:u,loading:T,halfChecked:E,dragOver:a,dragOverGapTop:L,dragOverGapBottom:O,pos:f,active:x});return"props"in b||Object.defineProperty(b,"props",{get:function(){return Object(p.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),w}}),b}},"8EBN":function(N,$,k){(function(P){P(k("VrN/"))})(function(P){"use strict";P.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var c=0;c<P.modeInfo.length;c++){var _=P.modeInfo[c];_.mimes&&(_.mime=_.mimes[0])}P.findModeByMIME=function(D){D=D.toLowerCase();for(var p=0;p<P.modeInfo.length;p++){var s=P.modeInfo[p];if(s.mime==D)return s;if(s.mimes){for(var S=0;S<s.mimes.length;S++)if(s.mimes[S]==D)return s}}if(/\+xml$/.test(D))return P.findModeByMIME("application/xml");if(/\+json$/.test(D))return P.findModeByMIME("application/json")},P.findModeByExtension=function(D){D=D.toLowerCase();for(var p=0;p<P.modeInfo.length;p++){var s=P.modeInfo[p];if(s.ext){for(var S=0;S<s.ext.length;S++)if(s.ext[S]==D)return s}}},P.findModeByFileName=function(D){for(var p=0;p<P.modeInfo.length;p++){var s=P.modeInfo[p];if(s.file&&s.file.test(D))return s}var S=D.lastIndexOf("."),v=S>-1&&D.substring(S+1,D.length);if(v)return P.findModeByExtension(v)},P.findModeByName=function(D){D=D.toLowerCase();for(var p=0;p<P.modeInfo.length;p++){var s=P.modeInfo[p];if(s.name.toLowerCase()==D)return s;if(s.alias){for(var S=0;S<s.alias.length;S++)if(s.alias[S].toLowerCase()==D)return s}}}})},"8hTe":function(N,$,k){N.exports={button:"button___1wy9m"}},"9Bee":function(N,$,k){"use strict";var P=k("DYRE"),c=k("zeV3"),_=k("+L6B"),D=k("2/Rp"),p=k("k1fw"),s=k("tJVT"),S=k("cDcd"),v=k.n(S),o=k("vg9a"),i=k("DlQD"),r=k.n(i),h=k("rUJ1");function y(ie,Se){var ge=ie.match(/^(\s+)(?:```)/);if(ge===null)return Se;var oe=ge[1];return Se.split(`
|
|
|
`).map(function(le){var te=le.match(/^\s+/);if(te===null)return le;var be=Object(s.a)(te,1),Z=be[0];return Z.length>=oe.length?le.slice(oe.length):le}).join(`
|
|
|
`)}var g=[],w=["<ul>"],m=new r.a.Renderer,d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){g.length=0,w=["<ul>"]}var l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function u(ie,Se,ge,oe){if(Se>=ie.length||ie[Se].level<=ge)return Se;var le=ie[Se];oe.push("<li><a href='#"+le.anchor+"'>"+le.text+"</a>"),Se++;var te=[];return Se=u(ie,Se,le.level,te),te.length>0&&(oe.push("<ul>"),te.forEach(function(be){oe.push(be)}),oe.push("</ul>")),oe.push("</li>"),Se=u(ie,Se,ge,oe),Se}function T(){return u(g,0,0,w),w.push("</ul>"),w.join("")}var E={heading:function(Se){var ge=d.exec(Se);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},fences:function(Se){var ge=this.rules.block.fences.exec(Se);if(ge){var oe=ge[0],le=y(oe,ge[3]||""),te=ge[2]?ge[2].trim():ge[2];if(["latex","katex","math"].indexOf(te)>=0){var be=O(),Z=le;le=be,f[be]={type:"block",expression:Z}}return{type:"code",raw:oe,lang:te,text:le}}}},a=/(?:\${2})([^\n`]+?)(?:\${2})/gi,L=0,O=function(){return"__special_katext_id_".concat(L++,"__")},f={};function x(){return f}function b(){L=0,f={}}function C(ie){return ie=ie.replace(a,function(Se,ge){var oe=O();return f[oe]={type:"inline",expression:ge},oe}),ie}var I=m.listitem;m.listitem=function(ie){return I(C(ie))};var j=m.paragraph;m.paragraph=function(ie){return j(C(ie))};var M=m.tablecell;m.tablecell=function(ie,Se){return M(C(ie),Se)},m.code=function(ie,Se,ge){var oe=(Se||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?"<p class='editormd-tex'>".concat(ie,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(Se,'">').concat(ge?ie:Object(h.escape)(ie,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(ge?ie:Object(h.escape)(ie,!0))+"</code></pre>"},m.heading=function(ie,Se,ge){var oe=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return g.push({anchor:oe,level:Se,text:ie}),"<h"+Se+' id="'+oe+'">'+ie+"</h"+Se+">"},r.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),r.a.use({tokenizer:E,renderer:m});var z=r.a,G=k("SJMd"),B=k("ulZh"),K=k.n(B),F=k("m3rI"),H=k("Oy/b"),W=k("p5ED"),Q=k("8hTe"),ee=k.n(Q),q=/<pre[^>]*>/g;function pe(ie){var Se=document.createElement("div");return Se.innerHTML=ie,Se.childNodes.length===0?"":Se.childNodes[0].nodeValue}var ye=$.a=function(ie){var Se=ie.value,ge=Se===void 0?"":Se,oe=ie.edit,le=oe===void 0?!1:oe,te=ie.className,be=ie.showTextOnly,Z=ie.showLines,ae=ie.replaces,Ee=ie.zoomImg,ne=ie.hasMask,J=ie.style,X=J===void 0?{}:J,Y=ie.stylesPrev,he=Y===void 0?{}:Y,de=String(ge),Te=Object(S.useRef)(),ze=Object(S.useRef)(),Ze=Object(S.useState)(""),Je=Object(s.a)(Ze,2),$e=Je[0],tt=Je[1],nt=Object(S.useState)("office"),Me=Object(s.a)(nt,2),Ce=Me[0],Xe=Me[1],et=Object(S.useMemo)(function(){try{var Ae=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ce=/\"\/api\/attachments\/|\"\/attachments\/download\//g,xe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;de=de.replace(Ae,"("+F.a.API_SERVER+"/api/attachments/").replace(ce,'"'+F.a.API_SERVER+"/api/attachments/").replace(xe,'"'+F.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,`
|
|
|
`)}catch(Ge){}var _e=z(de),Le=x();if(de.match(/\[TOC\]/)&&(_e=_e.replace("<p>[TOC]</p>",T()),n()),_e=_e.replace(/(__special_katext_id_\d+__)/g,function(Ge,Ye){var at=Le[Ye],it=at.type,ot=at.expression;return Object(H.renderToString)(pe(ot)||"",{displayMode:it==="block",throwOnError:!1,output:"html"})}),_e=_e.replace(/▁/g,"\u2581\u2581\u2581"),b(),be){var Re=document.createElement("div");return Re.innerHTML=_e,Re.innerText}return setTimeout(function(){return Pe()},500),_e},[de]),Ue=Object(S.useRef)();l.WebkitLineClamp=Z,Z&&(X=Object(p.a)(Object(p.a)({},X),l));function Ve(Ae){var ce=Ae.target;if(ce.tagName.toUpperCase()==="IMG"){if(Ee){var xe=ce.getAttribute("src");tt(xe),Xe("image")}}else if(ce.tagName.toUpperCase()==="A"){var _e=ce.getAttribute("href");if(_e.indexOf("office")>-1)Ae.preventDefault(),tt(_e),Xe("office");else if(_e.indexOf("application/pdf")>-1)Ae.preventDefault(),tt(_e),Xe("pdf");else if(_e.indexOf("text/html")>-1)Ae.preventDefault(),tt(_e),Xe("html");else if(_e.startsWith("#")){Ae.preventDefault();var Le=document.getElementById(_e.replace("#",""));Le&&Le.scrollIntoView(!0)}}}var Pe=function(){var ce,xe=(ce=Ue.current)===null||ce===void 0?void 0:ce.querySelectorAll("video");xe==null||xe.forEach(function(_e){if(_e.oncontextmenu=function(){return!1},_e.src.indexOf(".m3u8")>-1&&!_e.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var Le=new K.a;Le.loadSource(_e.src),Le.attachMedia(_e)}}})};Object(S.useEffect)(function(){if(Ue.current&&et&&(et.match(q)&&window.PR.prettyPrint()),Ue.current)return Ue.current.addEventListener("click",Ve),function(){Ue.current.removeEventListener("click",Ve),b(),n()}},[et,Ue.current,Ve]);var we=function(ce){if(!le)return;ce.target.nodeName==="IMG"?(Te.current.style.display="flex",Te.current.style.width=ce.target.clientWidth+"px",Te.current.style.height=ce.target.clientHeight+"px",Te.current.style.top=ce.target.offsetTop+"px",Te.current.style.left=ce.target.offsetLeft+"px",ze.current.src=ce.target.getAttribute("src")):Te.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:Ue,style:Object(p.a)({},X),className:"".concat(te||""," markdown-body ").concat(ee.a.mdBody),onMouseOver:we,dangerouslySetInnerHTML:{__html:et}}),v.a.createElement("div",{ref:Te,className:ee.a.button},v.a.createElement(c.a,null,v.a.createElement(D.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),v.a.createElement(D.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:ze,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),v.a.createElement(W.a,{close:!0,data:$e,type:$e!=null&&$e.length?Ce:"",style:Object(p.a)({},he),onClose:function(){return tt("")}}))}},"9OqN":function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.CTR=function(){var c=P.lib.BlockCipherMode.extend(),_=c.Encryptor=c.extend({processBlock:function(D,p){var s=this._cipher,S=s.blockSize,v=this._iv,o=this._counter;v&&(o=this._counter=v.slice(0),this._iv=void 0);var i=o.slice(0);s.encryptBlock(i,0),o[S-1]=o[S-1]+1|0;for(var r=0;r<S;r++)D[p+r]^=i[r]}});return c.Decryptor=_,c}(),P.mode.CTR})},"9VGf":function(N,$,k){"use strict";k.d($,"a",function(){return _});var P=k("cDcd"),c=k.n(P);function _(D,p){var s=Object(P.useRef)();Object(P.useEffect)(function(){s.current=D}),Object(P.useEffect)(function(){function S(){s.current()}if(p!==null){var v=setInterval(S,p);return function(){return clearInterval(v)}}},[p])}},ALsQ:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.CFB=function(){var c=P.lib.BlockCipherMode.extend();c.Encryptor=c.extend({processBlock:function(D,p){var s=this._cipher,S=s.blockSize;_.call(this,D,p,S,s),this._prevBlock=D.slice(p,p+S)}}),c.Decryptor=c.extend({processBlock:function(D,p){var s=this._cipher,S=s.blockSize,v=D.slice(p,p+S);_.call(this,D,p,S,s),this._prevBlock=v}});function _(D,p,s,S){var v,o=this._iv;o?(v=o.slice(0),this._iv=void 0):v=this._prevBlock,S.encryptBlock(v,0);for(var i=0;i<s;i++)D[p+i]^=v[i]}return c}(),P.mode.CFB})},B7Ph:function(N,$,k){"use strict";k.d($,"a",function(){return ee});var P=k("5NDa"),c=k("5rEg"),_=k("sRBo"),D=k("kaz8"),p=k("5Dmo"),s=k("3S7+"),S=k("14J3"),v=k("BMrR"),o=k("7Kak"),i=k("9yH6"),r=k("+L6B"),h=k("2/Rp"),y=k("2qtc"),g=k("kLXV"),w=k("miYZ"),m=k("tsqr"),d=k("k1fw"),n=k("9og8"),l=k("tJVT"),u=k("oBTY"),T=k("DZo9"),E=k("8z0m"),a=k("WmNS"),L=k.n(a),O=k("cDcd"),f=k.n(O),x=k("Bvq2"),b=k.n(x),C=k("nj2k"),I=k.n(C),j=k("mxV5"),M=k.n(j),z=k("KhGG"),G=k("ErOA"),B=k("7Cbv"),K=k("1vsH"),F=k("p5ED"),H=E.a.Dragger,W=function(pe){for(var ye=function(Ee){return Ee&&Ee.substring(0,Ee.lastIndexOf("."))},ie=Object(u.a)(pe),Se=0,ge=[],oe=0;oe<ie.length;oe++){for(var le="",te=0;te<ge.length;te++)if(ye(ge[te][0].name)==ye(ie[oe].name)){Se=1,le=te;break}if(Se==1)ge[le].push(ie[oe]),Se=0;else if(Se==0){var be=new Array;be.push(ie[oe]),ge.push(be)}}var Z=ge.map(function(ae){if(ae[0].name.includes(".in"))return ae.length===2?ae:[ae[0],{}];if(ae[0].name.includes(".out"))return ae.length===2?ae.reverse():[{},ae[0]]});return Z},Q=function(pe){var ye=pe.onClose,ie=pe.onOK,Se=pe.visible,ge=pe.wrapClassName,oe=pe.rootIdentifier,le=pe.multiple,te=le===void 0?!1:le,be=pe.defaultMultipleValue,Z=be===void 0?!0:be,ae=Object(O.useState)([]),Ee=Object(l.a)(ae,2),ne=Ee[0],J=Ee[1],X=Object(O.useState)({}),Y=Object(l.a)(X,2),he=Y[0],de=Y[1],Te=Object(O.useState)(!1),ze=Object(l.a)(Te,2),Ze=ze[0],Je=ze[1],$e=Object(O.useState)(!0),tt=Object(l.a)($e,2),nt=tt[0],Me=tt[1],Ce=Object(O.useRef)([]),Xe=Object(O.useRef)(0),et=function(){ye()};Object(O.useEffect)(function(){Ue()},[]),Object(O.useEffect)(function(){Se&&(Ce.current=[],Xe.current=0,J([]),Me(Z))},[Se]);var Ue=function(){var Le=Object(n.a)(L.a.mark(function Re(){var Ge,Ye;return L.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:return it.prev=0,it.next=3,Object(G.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:Ge=it.sent,Ye=JSON.parse(Object(z.a)(Ge.data)),de(Ye),it.next=10;break;case 8:it.prev=8,it.t0=it.catch(0);case 10:case"end":return it.stop()}},Re,null,[[0,8]])}));return function(){return Le.apply(this,arguments)}}(),Ve=function(Re){return Re&&Re.substring(0,Re.lastIndexOf("."))},Pe=function(Re){var Ge,Ye,at=Ve((Ge=Re[0])===null||Ge===void 0?void 0:Ge.name)||Ve((Ye=Re[1])===null||Ye===void 0?void 0:Ye.name),it=ne.filter(function(ot){return Ve(ot.name)!==at});Ce.current=Object(u.a)(it),J(Object(u.a)(it))},we=function(Re){if(!nt){var Ge=new FormData;Ge.append("file",Re.file);var Ye=Object(G.a)("/api/attachments/get_file_content.json",{method:"post",body:Ge},!0);Ye.then(function(ft){if(ft.status===0){Xe.current=Xe.current+1;var jt=Ce.current.map(function(Rt){if(Rt.name===Re.name){var Vt,Tt=Object(d.a)({},Rt);return Re!=null&&(Vt=Re.name)!==null&&Vt!==void 0&&Vt.includes(".in")?Tt.input=ft==null?void 0:ft.content:Tt.output=ft==null?void 0:ft.content,Tt}return Rt});if(Ce.current=Object(u.a)(jt),J(Object(u.a)(jt)),Xe.current>0&&Xe.current===ne.length){Je(!1);var kt=W(jt);kt=kt.filter(function(Rt){var Vt,Tt;return!!((Vt=Rt[0])!==null&&Vt!==void 0&&Vt.name&&(Tt=Rt[1])!==null&&Tt!==void 0&&Tt.name)}),kt=kt.map(function(Rt){return Object(d.a)(Object(d.a)(Object(d.a)({},Rt[0]),Rt[1]),{},{is_file:!1})}),ie(kt),ye()}}else Je(!1),ye()});return}var at=new M.a({endpoint:he.end_point,region:he.region,accessKeyId:he.access_key_id,accessKeySecret:he.access_key_secret,bucket:he.bucket,stsToken:he.security_token}),it=Re.name,ot={container_type:"TestSet",file_name:it},yt=Object(B.a)(),wt="testsets/".concat(oe,"/").concat(yt).concat(it.indexOf(".")>-1?"."+it.split(".").pop():"");oe===null&&(wt="testsets/".concat(yt).concat(it.indexOf(".")>-1?"."+it.split(".").pop():"")),at.multipartUpload(wt,new Blob([Re.file],{type:Re.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:it+""},url:he==null?void 0:he.callback_url,host:he==null?void 0:he.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(G.e)(ot)}}).then(function(ft){if(ft.data.status===0){Xe.current=Xe.current+1;var jt=Ce.current.map(function(Rt){var Vt,Tt;if(Rt.name===((Vt=ft.data)===null||Vt===void 0||((Tt=Vt.data)===null||Tt===void 0)?void 0:Tt.file_name)){var dr,tr,Wt,Bt=Object(d.a)({},Rt);if((dr=ft.data)!==null&&dr!==void 0&&(tr=dr.data)!==null&&tr!==void 0&&(Wt=tr.file_name)!==null&&Wt!==void 0&&Wt.includes(".in")){var Nr,dn,Er,qn,vt,Ct;Bt.in_object_key=(Nr=ft.data)===null||Nr===void 0||((dn=Nr.data)===null||dn===void 0)?void 0:dn.object,Bt.in_object_size=(Er=ft.data)===null||Er===void 0||((qn=Er.data)===null||qn===void 0)?void 0:qn.size,Bt.input=(vt=ft.data)===null||vt===void 0||((Ct=vt.data)===null||Ct===void 0)?void 0:Ct.file_name,Bt.in_file=Re}else{var mt,mr,wr,It,_t,vr;Bt.out_object_key=(mt=ft.data)===null||mt===void 0||((mr=mt.data)===null||mr===void 0)?void 0:mr.object,Bt.out_object_size=(wr=ft.data)===null||wr===void 0||((It=wr.data)===null||It===void 0)?void 0:It.size,Bt.output=(_t=ft.data)===null||_t===void 0||((vr=_t.data)===null||vr===void 0)?void 0:vr.file_name,Bt.out_file=Re}return Bt}return Rt});if(Ce.current=Object(u.a)(jt),J(Object(u.a)(jt)),Xe.current>0&&Xe.current===ne.length){Je(!1);var kt=W(jt);kt=kt.filter(function(Rt){var Vt,Tt;return!!((Vt=Rt[0])!==null&&Vt!==void 0&&Vt.name&&(Tt=Rt[1])!==null&&Tt!==void 0&&Tt.name)}),kt=kt.map(function(Rt){return Object(d.a)(Object(d.a)(Object(d.a)({},Rt[0]),Rt[1]),{},{is_file:!0})}),ie(kt),ye()}}})},Ae=function(Re){return new Promise(function(Ge,Ye){for(var at=0,it=[],ot=function(ft){Re[ft].file.slice(0,1).arrayBuffer().then(function(){at++,at===Re.length&&(it.length?(m.b.warn("".concat(it.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ye()):Ge(Re))}).catch(function(jt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",jt),at++,it.push(Re[ft].name),at===Re.length&&(it.length?(m.b.warn("".concat(it.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ye()):Ge(Re))})},yt=0;yt<Re.length;yt++)ot(yt)})},ce=function(){var Le=Object(n.a)(L.a.mark(function Re(){var Ge;return L.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(!(ne.length===0)){at.next=3;break}return m.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),at.abrupt("return");case 3:return at.next=5,Ae(ne);case 5:if(Je(!0),Ge=W(ne),!Ge.some(function(it){var ot,yt;return!((ot=it[0])!==null&&ot!==void 0&&ot.name&&(yt=it[1])!==null&&yt!==void 0&&yt.name)})){at.next=10;break}return g.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var it=Object(n.a)(L.a.mark(function yt(){return L.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:ne.map(function(){var jt=Object(n.a)(L.a.mark(function kt(Rt){return L.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:we(Rt);case 1:case"end":return Tt.stop()}},kt)}));return function(kt){return jt.apply(this,arguments)}}());case 1:case"end":return ft.stop()}},yt)}));function ot(){return it.apply(this,arguments)}return ot}(),onCancel:function(){Je(!1)}}),at.abrupt("return");case 10:ne.map(function(){var it=Object(n.a)(L.a.mark(function ot(yt){return L.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:we(yt);case 1:case"end":return ft.stop()}},ot)}));return function(ot){return it.apply(this,arguments)}}());case 11:case"end":return at.stop()}},Re)}));return function(){return Le.apply(this,arguments)}}(),xe={name:"file",fileList:ne,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Re){if(ne!=null&&ne.some(function(Ye){return Ye.name===Re.name}))return m.b.info("".concat(Re.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Re.size/1024/1024>100)return m.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Re.name))return m.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var Ge={name:Re.name,uid:Re.uid,file:Re,percent:0};return ne.push(Ge),Ce.current=Object(u.a)(ne),J(Object(u.a)(ne)),!1}},_e=W(ne);return console.log(ne,_e,"fileList"),f.a.createElement(g.a,{visible:Se,wrapClassName:ge,onOk:ce,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Ze},onCancel:et,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},f.a.createElement("div",{className:b.a.wrap},ne.length?f.a.createElement("div",null,f.a.createElement(v.a,{justify:"space-between",align:"middle",className:"mb20"},f.a.createElement("div",{style:{visibility:te?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",f.a.createElement(i.a.Group,{className:"ml10",value:nt,onChange:function(Re){return Me(Re.target.value)}},f.a.createElement(i.a,{value:!1},"\u6587\u672C"),f.a.createElement(i.a,{value:!0},"\u6587\u4EF6"))),f.a.createElement(E.a,xe,f.a.createElement(h.a,{className:b.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),f.a.createElement(ee,{data:_e,onRemove:Pe})):f.a.createElement("div",{className:b.a.noData},f.a.createElement("img",{src:I.a,alt:""}),f.a.createElement(E.a,xe,f.a.createElement(h.a,{className:b.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),f.a.createElement("div",{className:b.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",f.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",f.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",f.a.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",f.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",f.a.createElement("br",null))))},ee=function(pe){var ye=pe.data,ie=ye===void 0?[]:ye,Se=pe.onRemove,ge=pe.width,oe=ge===void 0?"auto":ge,le=pe.showScore,te=le===void 0?!1:le,be=pe.disabled,Z=be===void 0?!1:be,ae=pe.inputChange,Ee=pe.onEvaluatingChange,ne=pe.showEvaluatingSetting,J=ne===void 0?!1:ne,X={value:"",filename:"",dataUrl:""},Y=Object(O.useState)(Object(d.a)({},X)),he=Object(l.a)(Y,2),de=he[0],Te=he[1],ze=function(tt){var nt=document.createElement("a");document.body.appendChild(nt);var Me=URL.createObjectURL(tt.file);nt.href=Me,nt.download=tt.name,nt.click(),URL.revokeObjectURL(Me),document.body.removeChild(nt)},Ze=function(tt,nt){Object(K.y)(tt,nt)},Je=function(tt,nt){g.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:f.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){Se(tt,nt)},onCancel:function(){}})};return ie.length?f.a.createElement("div",{style:{width:oe}},f.a.createElement("div",{className:b.a.head},J&&f.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",f.a.createElement(s.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},f.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),f.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),f.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),f.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),te&&f.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),J&&f.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",f.a.createElement(s.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},f.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),J&&f.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",f.a.createElement(s.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},f.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),f.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ie.map(function($e,tt){var nt,Me,Ce,Xe;return f.a.createElement("div",{key:tt,className:b.a.list},J&&f.a.createElement("div",{style:{width:"10%"}},f.a.createElement(D.a,{checked:!!$e.hidden,onChange:function(Ue){Ee(Ue.target.checked?1:0,tt,"hidden")}})),f.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",tt+1),f.a.createElement("div",{className:b.a.info,style:{width:te?"25%":"35%"}},f.a.createElement("span",{title:$e.input||((nt=$e[0])===null||nt===void 0?void 0:nt.name),onClick:Object(n.a)(L.a.mark(function et(){var Ue,Ve;return L.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if($e.input?$e.input_file_url?Ue=$e.input_file_url:Ue=$e.in_file:Ue=$e[0],!(typeof Ue=="string")){we.next=14;break}return we.next=4,fetch(Ue,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ve=we.sent,we.t0=Te,we.next=8,Ve.text();case 8:we.t1=we.sent,we.t2=Ue,we.t3={value:we.t1,filename:"",dataUrl:we.t2},(0,we.t0)(we.t3),we.next=18;break;case 14:return we.next=16,Object(K.H)(Ue.file);case 16:Ve=we.sent,Te({value:Ve.text,filename:Ue.name,dataUrl:Ve.link});case 18:case"end":return we.stop()}},et)}))},$e.input||((Me=$e[0])===null||Me===void 0?void 0:Me.name))),f.a.createElement("div",{className:b.a.info,style:{width:te?"25%":"35%"}},f.a.createElement("span",{title:$e.output||((Ce=$e[1])===null||Ce===void 0?void 0:Ce.name),onClick:Object(n.a)(L.a.mark(function et(){var Ue,Ve;return L.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if($e.input?$e.output_file_url?Ue=$e.output_file_url:Ue=$e.out_file:Ue=$e[1],!(typeof Ue=="string")){we.next=14;break}return we.next=4,fetch(Ue,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ve=we.sent,we.t0=Te,we.next=8,Ve.text();case 8:we.t1=we.sent,we.t2=Ue,we.t3={value:we.t1,filename:"",dataUrl:we.t2},(0,we.t0)(we.t3),we.next=18;break;case 14:return we.next=16,Object(K.H)(Ue.file);case 16:Ve=we.sent,Te({value:Ve.text,filename:Ue.name,dataUrl:Ve.link});case 18:case"end":return we.stop()}},et)}))},$e.output||((Xe=$e[1])===null||Xe===void 0?void 0:Xe.name))),te&&f.a.createElement("div",{style:{width:"20%"}},f.a.createElement(c.a,{disabled:Z,style:{width:"70%"},onChange:function(Ue){return ae(Ue,tt)},value:$e.score}),f.a.createElement("span",null,"\xA0%")),J&&f.a.createElement("div",{style:{width:"20%"}},f.a.createElement(D.a,{checked:$e.is_invisible||!1,onChange:function(Ue){Ee(Ue.target.checked,tt,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),J&&f.a.createElement("div",{style:{width:"20%"}},f.a.createElement(D.a,{checked:$e.last_match_rule||!1,onChange:function(Ue){Ee(Ue.target.checked,tt,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),f.a.createElement("div",{onClick:function(){return Je($e,tt)},style:{width:"10%"}},f.a.createElement("span",{className:b.a.del},"\u5220\u9664")))}),f.a.createElement(F.a,{close:!0,data:de.dataUrl,filename:de.filename,type:de.dataUrl.length?"txt":"",onClose:function(){return Te(Object(d.a)({},X))},monacoEditor:{value:de.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):f.a.createElement(f.a.Fragment,null)};$.b=Q},BU3w:function(N,$,k){"use strict";k.d($,"a",function(){return s});var P=k("MNnm"),c="rc-util-key";function _(S){if(S.attachTo)return S.attachTo;var v=document.querySelector("head");return v||document.body}function D(S){var v,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var i=document.createElement("style");if((v=o.csp)===null||v===void 0?void 0:v.nonce){var r;i.nonce=(r=o.csp)===null||r===void 0?void 0:r.nonce}i.innerHTML=S;var h=_(o),y=h.firstChild;return o.prepend&&h.prepend?h.prepend(i):o.prepend&&y?h.insertBefore(i,y):h.appendChild(i),i}var p=new Map;function s(S,v){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=_(o);if(!p.has(i)){var r=D("",o),h=r.parentNode;p.set(i,h),h.removeChild(r)}var y=Array.from(p.get(i).children).find(function(n){return n.tagName==="STYLE"&&n[c]===v});if(y){var g,w;if(((g=o.csp)===null||g===void 0?void 0:g.nonce)&&y.nonce!==((w=o.csp)===null||w===void 0?void 0:w.nonce)){var m;y.nonce=(m=o.csp)===null||m===void 0?void 0:m.nonce}return y.innerHTML!==S&&(y.innerHTML=S),y}var d=D(S,o);return d[c]=v,d}},Bd2K:function(N,$,k){(function(P){P(k("VrN/"),k("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(o,i,r){if(r!=P.Init&&r&&o.removeKeyMap("autoCloseTags"),!i)return;var h={name:"autoCloseTags"};(typeof i!="object"||i.whenClosing!==!1)&&(h["'/'"]=function(y){return s(y)}),(typeof i!="object"||i.whenOpening!==!1)&&(h["'>'"]=function(y){return D(y)}),o.addKeyMap(h)});var c=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_=["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(o){if(o.getOption("disableInput"))return P.Pass;for(var i=o.listSelections(),r=[],h=o.getOption("autoCloseTags"),y=0;y<i.length;y++){if(!i[y].empty())return P.Pass;var g=i[y].head,w=o.getTokenAt(g),m=P.innerMode(o.getMode(),w.state),d=m.state,n=m.mode.xmlCurrentTag&&m.mode.xmlCurrentTag(d),l=n&&n.name;if(!l)return P.Pass;var u=m.mode.configuration=="html",T=typeof h=="object"&&h.dontCloseTags||u&&c,E=typeof h=="object"&&h.indentTags||u&&_;w.end>g.ch&&(l=l.slice(0,l.length-w.end+g.ch));var a=l.toLowerCase();if(!l||w.type=="string"&&(w.end!=g.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&n.close||w.string.indexOf("/")==g.ch-w.start-1||T&&S(T,a)>-1||v(o,m.mode.xmlCurrentContext&&m.mode.xmlCurrentContext(d)||[],l,g,!0))return P.Pass;var L=typeof h=="object"&&h.emptyTags;if(L&&S(L,l)>-1){r[y]={text:"/>",newPos:P.Pos(g.line,g.ch+2)};continue}var O=E&&S(E,a)>-1;r[y]={indent:O,text:">"+(O?`
|
|
|
|
|
|
`:"")+"</"+l+">",newPos:O?P.Pos(g.line+1,0):P.Pos(g.line,g.ch+1)}}for(var f=typeof h=="object"&&h.dontIndentOnAutoClose,y=i.length-1;y>=0;y--){var x=r[y];o.replaceRange(x.text,i[y].head,i[y].anchor,"+insert");var b=o.listSelections().slice(0);b[y]={head:x.newPos,anchor:x.newPos},o.setSelections(b),!f&&x.indent&&(o.indentLine(x.newPos.line,null,!0),o.indentLine(x.newPos.line+1,null,!0))}}function p(o,i){for(var r=o.listSelections(),h=[],y=i?"/":"</",g=o.getOption("autoCloseTags"),w=typeof g=="object"&&g.dontIndentOnSlash,m=0;m<r.length;m++){if(!r[m].empty())return P.Pass;var d=r[m].head,n=o.getTokenAt(d),l=P.innerMode(o.getMode(),n.state),u=l.state;if(i&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=d.ch-1))return P.Pass;var T,E=l.mode.name!="xml"&&o.getMode().name=="htmlmixed";if(E&&l.mode.name=="javascript")T=y+"script";else if(E&&l.mode.name=="css")T=y+"style";else{var a=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(u);if(!a||a.length&&v(o,a,a[a.length-1],d))return P.Pass;T=y+a[a.length-1]}o.getLine(d.line).charAt(n.end)!=">"&&(T+=">"),h[m]=T}if(o.replaceSelections(h),r=o.listSelections(),!w)for(var m=0;m<r.length;m++)(m==r.length-1||r[m].head.line<r[m+1].head.line)&&o.indentLine(r[m].head.line)}function s(o){return o.getOption("disableInput")?P.Pass:p(o,!0)}P.commands.closeTag=function(o){return p(o)};function S(o,i){if(o.indexOf)return o.indexOf(i);for(var r=0,h=o.length;r<h;++r)if(o[r]==i)return r;return-1}function v(o,i,r,h,y){if(!P.scanForClosingTag)return!1;var g=Math.min(o.lastLine()+1,h.line+500),w=P.scanForClosingTag(o,h,null,g);if(!w||w.tag!=r)return!1;for(var m=y?1:0,d=i.length-1;d>=0&&i[d]==r;d--)++m;h=w.to;for(var d=1;d<m;d++){var n=P.scanForClosingTag(o,h,null,g);if(!n||n.tag!=r)return!1;h=n.to}return!0}})},BjJ7:function(N,$,k){"use strict";k.d($,"d",function(){return c}),k.d($,"c",function(){return _}),k.d($,"e",function(){return D}),k.d($,"b",function(){return p}),k.d($,"a",function(){return S});var P=k("m3rI");function c(v){var o=!0;if(v.length>0){for(var i=0;i<v.length;i++)if(v[i].compile_success==0||!v[i].compile_success){o=!1;break}}else o=!1;return o}function _(v){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=[],r=0;r<v.length;r++){var h=v[r],y=o?"".concat(o,"/").concat(h.name):"".concat(h.name);i.push({title:h.name,isLeaf:!(h.type==="tree"),key:y})}return i}function D(v,o,i){for(var r=0;r<v.length;r++){var h=v[r];if(h.key===o){h.children=i;break}h.children&&D(h.children,o,i)}return v}function p(v,o,i){var r;return function(){var h=this,y=arguments,g=function(){r=null,i||v.apply(h,y)},w=i&&!r;clearTimeout(r),r=setTimeout(g,o),w&&v.apply(h,y)}}var s=!0,S=P.a.API_SERVER},Bvq2:function(N,$,k){N.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(N,$,k){},CrYA:function(N,$,k){var P=k("MFOe"),c=P.Global;N.exports={name:"sessionStorage",read:D,write:p,each:s,remove:S,clearAll:v};function _(){return c.sessionStorage}function D(o){return _().getItem(o)}function p(o,i){return _().setItem(o,i)}function s(o){for(var i=_().length-1;i>=0;i--){var r=_().key(i);o(D(r),r)}}function S(o){return _().removeItem(o)}function v(){return _().clear()}},DlQD:function(N,$,k){(function(P,c){N.exports=c()})(this,function(){"use strict";function P(Pe,we){for(var Ae=0;Ae<we.length;Ae++){var ce=we[Ae];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(Pe,ce.key,ce)}}function c(Pe,we,Ae){return we&&P(Pe.prototype,we),Ae&&P(Pe,Ae),Pe}function _(Pe,we){if(!Pe)return;if(typeof Pe=="string")return D(Pe,we);var Ae=Object.prototype.toString.call(Pe).slice(8,-1);if(Ae==="Object"&&Pe.constructor&&(Ae=Pe.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(Pe);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return D(Pe,we)}function D(Pe,we){(we==null||we>Pe.length)&&(we=Pe.length);for(var Ae=0,ce=new Array(we);Ae<we;Ae++)ce[Ae]=Pe[Ae];return ce}function p(Pe,we){var Ae;if(typeof Symbol=="undefined"||Pe[Symbol.iterator]==null){if(Array.isArray(Pe)||(Ae=_(Pe))||we&&Pe&&typeof Pe.length=="number"){Ae&&(Pe=Ae);var ce=0;return function(){return ce>=Pe.length?{done:!0}:{done:!1,value:Pe[ce++]}}}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 Ae=Pe[Symbol.iterator](),Ae.next.bind(Ae)}function s(Pe,we){return we={exports:{}},Pe(we,we.exports),we.exports}var S=s(function(Pe){function we(){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 Ae(ce){Pe.exports.defaults=ce}Pe.exports={defaults:we(),getDefaults:we,changeDefaults:Ae}}),v=S.defaults,o=S.getDefaults,i=S.changeDefaults,r=/[&<>"']/,h=/[&<>"']/g,y=/[<>"']|&(?!#?\w+;)/,g=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},m=function(we){return w[we]};function d(Pe,we){if(we){if(r.test(Pe))return Pe.replace(h,m)}else if(y.test(Pe))return Pe.replace(g,m);return Pe}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(Pe){return Pe.replace(n,function(we,Ae){return Ae=Ae.toLowerCase(),Ae==="colon"?":":Ae.charAt(0)==="#"?Ae.charAt(1)==="x"?String.fromCharCode(parseInt(Ae.substring(2),16)):String.fromCharCode(+Ae.substring(1)):""})}var u=/(^|[^\[])\^/g;function T(Pe,we){Pe=Pe.source||Pe,we=we||"";var Ae={replace:function(xe,_e){return _e=_e.source||_e,_e=_e.replace(u,"$1"),Pe=Pe.replace(xe,_e),Ae},getRegex:function(){return new RegExp(Pe,we)}};return Ae}var E=/[^\w:]/g,a=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(Pe,we,Ae){if(Pe){var ce;try{ce=decodeURIComponent(l(Ae)).replace(E,"").toLowerCase()}catch(xe){return null}if(ce.indexOf("javascript:")===0||ce.indexOf("vbscript:")===0||ce.indexOf("data:")===0)return null}we&&!a.test(Ae)&&(Ae=C(we,Ae));try{Ae=encodeURI(Ae).replace(/%25/g,"%")}catch(xe){return null}return Ae}var O={},f=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(Pe,we){O[" "+Pe]||(f.test(Pe)?O[" "+Pe]=Pe+"/":O[" "+Pe]=z(Pe,"/",!0)),Pe=O[" "+Pe];var Ae=Pe.indexOf(":")===-1;return we.substring(0,2)==="//"?Ae?we:Pe.replace(x,"$1")+we:we.charAt(0)==="/"?Ae?we:Pe.replace(b,"$1")+we:Pe+we}var I={exec:function(){}};function j(Pe){for(var we=1,Ae,ce;we<arguments.length;we++){Ae=arguments[we];for(ce in Ae)Object.prototype.hasOwnProperty.call(Ae,ce)&&(Pe[ce]=Ae[ce])}return Pe}function M(Pe,we){var Ae=Pe.replace(/\|/g,function(_e,Le,Re){for(var Ge=!1,Ye=Le;--Ye>=0&&Re[Ye]==="\\";)Ge=!Ge;return Ge?"|":" |"}),ce=Ae.split(/ \|/),xe=0;if(ce.length>we)ce.splice(we);else for(;ce.length<we;)ce.push("");for(;xe<ce.length;xe++)ce[xe]=ce[xe].trim().replace(/\\\|/g,"|");return ce}function z(Pe,we,Ae){var ce=Pe.length;if(ce===0)return"";for(var xe=0;xe<ce;){var _e=Pe.charAt(ce-xe-1);if(_e===we&&!Ae)xe++;else if(_e!==we&&Ae)xe++;else break}return Pe.substr(0,ce-xe)}function G(Pe,we){if(Pe.indexOf(we[1])===-1)return-1;for(var Ae=Pe.length,ce=0,xe=0;xe<Ae;xe++)if(Pe[xe]==="\\")xe++;else if(Pe[xe]===we[0])ce++;else if(Pe[xe]===we[1]&&(ce--,ce<0))return xe;return-1}function B(Pe){Pe&&Pe.sanitize&&!Pe.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 K={escape:d,unescape:l,edit:T,cleanUrl:L,resolveUrl:C,noopTest:I,merge:j,splitCells:M,rtrim:z,findClosingBracket:G,checkSanitizeDeprecation:B},F=S.defaults,H=K.rtrim,W=K.splitCells,Q=K.escape,ee=K.findClosingBracket;function q(Pe,we,Ae){var ce=we.href,xe=we.title?Q(we.title):null,_e=Pe[1].replace(/\\([\[\]])/g,"$1");return Pe[0].charAt(0)!=="!"?{type:"link",raw:Ae,href:ce,title:xe,text:_e}:{type:"image",raw:Ae,href:ce,title:xe,text:Q(_e)}}function pe(Pe,we){var Ae=Pe.match(/^(\s+)(?:```)/);if(Ae===null)return we;var ce=Ae[1];return we.split(`
|
|
|
`).map(function(xe){var _e=xe.match(/^\s+/);if(_e===null)return xe;var Le=_e[0];return Le.length>=ce.length?xe.slice(ce.length):xe}).join(`
|
|
|
`)}var ye=function(){function Pe(Ae){this.options=Ae||F}var we=Pe.prototype;return we.space=function(ce){var xe=this.rules.block.newline.exec(ce);if(xe)return xe[0].length>1?{type:"space",raw:xe[0]}:{raw:`
|
|
|
`}},we.code=function(ce,xe){var _e=this.rules.block.code.exec(ce);if(_e){var Le=xe[xe.length-1];if(Le&&Le.type==="paragraph")return{raw:_e[0],text:_e[0].trimRight()};var Re=_e[0].replace(/^ {4}/gm,"");return{type:"code",raw:_e[0],codeBlockStyle:"indented",text:this.options.pedantic?Re:H(Re,`
|
|
|
`)}}},we.fences=function(ce){var xe=this.rules.block.fences.exec(ce);if(xe){var _e=xe[0],Le=pe(_e,xe[3]||"");return{type:"code",raw:_e,lang:xe[2]?xe[2].trim():xe[2],text:Le}}},we.heading=function(ce){var xe=this.rules.block.heading.exec(ce);if(xe)return{type:"heading",raw:xe[0],depth:xe[1].length,text:xe[2]}},we.nptable=function(ce){var xe=this.rules.block.nptable.exec(ce);if(xe){var _e={type:"table",header:W(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:xe[0]};if(_e.header.length===_e.align.length){var Le=_e.align.length,Re;for(Re=0;Re<Le;Re++)/^ *-+: *$/.test(_e.align[Re])?_e.align[Re]="right":/^ *:-+: *$/.test(_e.align[Re])?_e.align[Re]="center":/^ *:-+ *$/.test(_e.align[Re])?_e.align[Re]="left":_e.align[Re]=null;for(Le=_e.cells.length,Re=0;Re<Le;Re++)_e.cells[Re]=W(_e.cells[Re],_e.header.length);return _e}}},we.hr=function(ce){var xe=this.rules.block.hr.exec(ce);if(xe)return{type:"hr",raw:xe[0]}},we.blockquote=function(ce){var xe=this.rules.block.blockquote.exec(ce);if(xe){var _e=xe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:xe[0],text:_e}}},we.list=function(ce){var xe=this.rules.block.list.exec(ce);if(xe){for(var _e=xe[0],Le=xe[2],Re=Le.length>1,Ge=Le[Le.length-1]===")",Ye={type:"list",raw:_e,ordered:Re,start:Re?+Le.slice(0,-1):"",loose:!1,items:[]},at=xe[0].match(this.rules.block.item),it=!1,ot,yt,wt,ft,jt,kt,Rt,Vt=at.length,Tt=0;Tt<Vt;Tt++)ot=at[Tt],_e=ot,yt=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
|
|
|
`)&&(yt-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+yt+"}","gm"),"")),Tt!==Vt-1&&(wt=this.rules.block.bullet.exec(at[Tt+1])[0],(Re?wt.length===1||!Ge&&wt[wt.length-1]===")":wt.length>1||this.options.smartLists&&wt!==Le)&&(ft=at.slice(Tt+1).join(`
|
|
|
`),Ye.raw=Ye.raw.substring(0,Ye.raw.length-ft.length),Tt=Vt-1)),jt=it||/\n\n(?!\s*$)/.test(ot),Tt!==Vt-1&&(it=ot.charAt(ot.length-1)===`
|
|
|
`,jt||(jt=it)),jt&&(Ye.loose=!0),kt=/^\[[ xX]\] /.test(ot),Rt=void 0,kt&&(Rt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),Ye.items.push({type:"list_item",raw:_e,task:kt,checked:Rt,loose:jt,text:ot});return Ye}},we.html=function(ce){var xe=this.rules.block.html.exec(ce);if(xe)return{type:this.options.sanitize?"paragraph":"html",raw:xe[0],pre:!this.options.sanitizer&&(xe[1]==="pre"||xe[1]==="script"||xe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):Q(xe[0]):xe[0]}},we.def=function(ce){var xe=this.rules.block.def.exec(ce);if(xe){xe[3]&&(xe[3]=xe[3].substring(1,xe[3].length-1));var _e=xe[1].toLowerCase().replace(/\s+/g," ");return{tag:_e,raw:xe[0],href:xe[2],title:xe[3]}}},we.table=function(ce){var xe=this.rules.block.table.exec(ce);if(xe){var _e={type:"table",header:W(xe[1].replace(/^ *| *\| *$/g,"")),align:xe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:xe[3]?xe[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(_e.header.length===_e.align.length){_e.raw=xe[0];var Le=_e.align.length,Re;for(Re=0;Re<Le;Re++)/^ *-+: *$/.test(_e.align[Re])?_e.align[Re]="right":/^ *:-+: *$/.test(_e.align[Re])?_e.align[Re]="center":/^ *:-+ *$/.test(_e.align[Re])?_e.align[Re]="left":_e.align[Re]=null;for(Le=_e.cells.length,Re=0;Re<Le;Re++)_e.cells[Re]=W(_e.cells[Re].replace(/^ *\| *| *\| *$/g,""),_e.header.length);return _e}}},we.lheading=function(ce){var xe=this.rules.block.lheading.exec(ce);if(xe)return{type:"heading",raw:xe[0],depth:xe[2].charAt(0)==="="?1:2,text:xe[1]}},we.paragraph=function(ce){var xe=this.rules.block.paragraph.exec(ce);if(xe)return{type:"paragraph",raw:xe[0],text:xe[1].charAt(xe[1].length-1)===`
|
|
|
`?xe[1].slice(0,-1):xe[1]}},we.text=function(ce,xe){var _e=this.rules.block.text.exec(ce);if(_e){var Le=xe[xe.length-1];return Le&&Le.type==="text"?{raw:_e[0],text:_e[0]}:{type:"text",raw:_e[0],text:_e[0]}}},we.escape=function(ce){var xe=this.rules.inline.escape.exec(ce);if(xe)return{type:"escape",raw:xe[0],text:Q(xe[1])}},we.tag=function(ce,xe,_e){var Le=this.rules.inline.tag.exec(ce);if(Le)return!xe&&/^<a /i.test(Le[0])?xe=!0:xe&&/^<\/a>/i.test(Le[0])&&(xe=!1),!_e&&/^<(pre|code|kbd|script)(\s|>)/i.test(Le[0])?_e=!0:_e&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Le[0])&&(_e=!1),{type:this.options.sanitize?"text":"html",raw:Le[0],inLink:xe,inRawBlock:_e,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):Q(Le[0]):Le[0]}},we.link=function(ce){var xe=this.rules.inline.link.exec(ce);if(xe){var _e=ee(xe[2],"()");if(_e>-1){var Le=xe[0].indexOf("!")===0?5:4,Re=Le+xe[1].length+_e;xe[2]=xe[2].substring(0,_e),xe[0]=xe[0].substring(0,Re).trim(),xe[3]=""}var Ge=xe[2],Ye="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ge);at?(Ge=at[1],Ye=at[3]):Ye=""}else Ye=xe[3]?xe[3].slice(1,-1):"";Ge=Ge.trim().replace(/^<([\s\S]*)>$/,"$1");var it=q(xe,{href:Ge&&Ge.replace(this.rules.inline._escapes,"$1"),title:Ye&&Ye.replace(this.rules.inline._escapes,"$1")},xe[0]);return it}},we.reflink=function(ce,xe){var _e;if((_e=this.rules.inline.reflink.exec(ce))||(_e=this.rules.inline.nolink.exec(ce))){var Le=(_e[2]||_e[1]).replace(/\s+/g," ");if(Le=xe[Le.toLowerCase()],!Le||!Le.href){var Re=_e[0].charAt(0);return{type:"text",raw:Re,text:Re}}var Ge=q(_e,Le,_e[0]);return Ge}},we.strong=function(ce,xe,_e){_e===void 0&&(_e="");var Le=this.rules.inline.strong.start.exec(ce);if(Le&&(!Le[1]||Le[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){xe=xe.slice(-1*ce.length);var Re=Le[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Re.lastIndex=0;for(var Ge;(Le=Re.exec(xe))!=null;)if(Ge=this.rules.inline.strong.middle.exec(xe.slice(0,Le.index+3)),Ge)return{type:"strong",raw:ce.slice(0,Ge[0].length),text:ce.slice(2,Ge[0].length-2)}}},we.em=function(ce,xe,_e){_e===void 0&&(_e="");var Le=this.rules.inline.em.start.exec(ce);if(Le&&(!Le[1]||Le[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){xe=xe.slice(-1*ce.length);var Re=Le[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Re.lastIndex=0;for(var Ge;(Le=Re.exec(xe))!=null;)if(Ge=this.rules.inline.em.middle.exec(xe.slice(0,Le.index+2)),Ge)return{type:"em",raw:ce.slice(0,Ge[0].length),text:ce.slice(1,Ge[0].length-1)}}},we.codespan=function(ce){var xe=this.rules.inline.code.exec(ce);if(xe){var _e=xe[2].replace(/\n/g," "),Le=/[^ ]/.test(_e),Re=_e.startsWith(" ")&&_e.endsWith(" ");return Le&&Re&&(_e=_e.substring(1,_e.length-1)),_e=Q(_e,!0),{type:"codespan",raw:xe[0],text:_e}}},we.br=function(ce){var xe=this.rules.inline.br.exec(ce);if(xe)return{type:"br",raw:xe[0]}},we.del=function(ce){var xe=this.rules.inline.del.exec(ce);if(xe)return{type:"del",raw:xe[0],text:xe[1]}},we.autolink=function(ce,xe){var _e=this.rules.inline.autolink.exec(ce);if(_e){var Le,Re;return _e[2]==="@"?(Le=Q(this.options.mangle?xe(_e[1]):_e[1]),Re="mailto:"+Le):(Le=Q(_e[1]),Re=Le),{type:"link",raw:_e[0],text:Le,href:Re,tokens:[{type:"text",raw:Le,text:Le}]}}},we.url=function(ce,xe){var _e;if(_e=this.rules.inline.url.exec(ce)){var Le,Re;if(_e[2]==="@")Le=Q(this.options.mangle?xe(_e[0]):_e[0]),Re="mailto:"+Le;else{var Ge;do Ge=_e[0],_e[0]=this.rules.inline._backpedal.exec(_e[0])[0];while(Ge!==_e[0]);Le=Q(_e[0]),_e[1]==="www."?Re="http://"+Le:Re=Le}return{type:"link",raw:_e[0],text:Le,href:Re,tokens:[{type:"text",raw:Le,text:Le}]}}},we.inlineText=function(ce,xe,_e){var Le=this.rules.inline.text.exec(ce);if(Le){var Re;return xe?Re=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Le[0]):Q(Le[0]):Le[0]:Re=Q(this.options.smartypants?_e(Le[0]):Le[0]),{type:"text",raw:Le[0],text:Re}}},Pe}(),ie=K.noopTest,Se=K.edit,ge=K.merge,oe={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:ie,table:ie,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=Se(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,oe.item=Se(oe.item,"gm").replace(/bull/g,oe.bullet).getRegex(),oe.list=Se(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._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",oe._comment=/<!--(?!-?>)[\s\S]*?-->/,oe.html=Se(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=Se(oe._paragraph).replace("hr",oe.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",oe._tag).getRegex(),oe.blockquote=Se(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=ge({},oe),oe.gfm=ge({},oe.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*|$)"}),oe.gfm.nptable=Se(oe.gfm.nptable).replace("hr",oe.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",oe._tag).getRegex(),oe.gfm.table=Se(oe.gfm.table).replace("hr",oe.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",oe._tag).getRegex(),oe.pedantic=ge({},oe.normal,{html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._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:ie,paragraph:Se(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var le={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ie,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:ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};le._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",le.punctuation=Se(le.punctuation).replace(/punctuation/g,le._punctuation).getRegex(),le._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",le._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",le.em.start=Se(le.em.start).replace(/punctuation/g,le._punctuation).getRegex(),le.em.middle=Se(le.em.middle).replace(/punctuation/g,le._punctuation).replace(/overlapSkip/g,le._overlapSkip).getRegex(),le.em.endAst=Se(le.em.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.em.endUnd=Se(le.em.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.start=Se(le.strong.start).replace(/punctuation/g,le._punctuation).getRegex(),le.strong.middle=Se(le.strong.middle).replace(/punctuation/g,le._punctuation).replace(/blockSkip/g,le._blockSkip).getRegex(),le.strong.endAst=Se(le.strong.endAst,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.strong.endUnd=Se(le.strong.endUnd,"g").replace(/punctuation/g,le._punctuation).getRegex(),le.blockSkip=Se(le._blockSkip,"g").getRegex(),le.overlapSkip=Se(le._overlapSkip,"g").getRegex(),le._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,le._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,le._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,le.autolink=Se(le.autolink).replace("scheme",le._scheme).replace("email",le._email).getRegex(),le._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,le.tag=Se(le.tag).replace("comment",oe._comment).replace("attribute",le._attribute).getRegex(),le._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,le._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,le._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,le.link=Se(le.link).replace("label",le._label).replace("href",le._href).replace("title",le._title).getRegex(),le.reflink=Se(le.reflink).replace("label",le._label).getRegex(),le.reflinkSearch=Se(le.reflinkSearch,"g").replace("reflink",le.reflink).replace("nolink",le.nolink).getRegex(),le.normal=ge({},le),le.pedantic=ge({},le.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",le._label).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",le._label).getRegex()}),le.gfm=ge({},le.normal,{escape:Se(le.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),le.gfm.url=Se(le.gfm.url,"i").replace("email",le.gfm._extended_email).getRegex(),le.breaks=ge({},le.gfm,{br:Se(le.br).replace("{2,}","*").getRegex(),text:Se(le.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var te={block:oe,inline:le},be=S.defaults,Z=te.block,ae=te.inline;function Ee(Pe){return Pe.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 ne(Pe){var we="",Ae,ce,xe=Pe.length;for(Ae=0;Ae<xe;Ae++)ce=Pe.charCodeAt(Ae),Math.random()>.5&&(ce="x"+ce.toString(16)),we+="&#"+ce+";";return we}var J=function(){function Pe(Ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ae||be,this.options.tokenizer=this.options.tokenizer||new ye,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ce={block:Z.normal,inline:ae.normal};this.options.pedantic?(ce.block=Z.pedantic,ce.inline=ae.pedantic):this.options.gfm&&(ce.block=Z.gfm,this.options.breaks?ce.inline=ae.breaks:ce.inline=ae.gfm),this.tokenizer.rules=ce}Pe.lex=function(ce,xe){var _e=new Pe(xe);return _e.lex(ce)};var we=Pe.prototype;return we.lex=function(ce){return ce=ce.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ce,this.tokens,!0),this.inline(this.tokens),this.tokens},we.blockTokens=function(ce,xe,_e){xe===void 0&&(xe=[]),_e===void 0&&(_e=!0),ce=ce.replace(/^ +$/gm,"");for(var Le,Re,Ge,Ye;ce;){if(Le=this.tokenizer.space(ce)){ce=ce.substring(Le.raw.length),Le.type&&xe.push(Le);continue}if(Le=this.tokenizer.code(ce,xe)){ce=ce.substring(Le.raw.length),Le.type?xe.push(Le):(Ye=xe[xe.length-1],Ye.raw+=`
|
|
|
`+Le.raw,Ye.text+=`
|
|
|
`+Le.text);continue}if(Le=this.tokenizer.fences(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.heading(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.nptable(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.hr(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.blockquote(ce)){ce=ce.substring(Le.raw.length),Le.tokens=this.blockTokens(Le.text,[],_e),xe.push(Le);continue}if(Le=this.tokenizer.list(ce)){for(ce=ce.substring(Le.raw.length),Ge=Le.items.length,Re=0;Re<Ge;Re++)Le.items[Re].tokens=this.blockTokens(Le.items[Re].text,[],!1);xe.push(Le);continue}if(Le=this.tokenizer.html(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(_e&&(Le=this.tokenizer.def(ce))){ce=ce.substring(Le.raw.length),this.tokens.links[Le.tag]||(this.tokens.links[Le.tag]={href:Le.href,title:Le.title});continue}if(Le=this.tokenizer.table(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.lheading(ce)){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(_e&&(Le=this.tokenizer.paragraph(ce))){ce=ce.substring(Le.raw.length),xe.push(Le);continue}if(Le=this.tokenizer.text(ce,xe)){ce=ce.substring(Le.raw.length),Le.type?xe.push(Le):(Ye=xe[xe.length-1],Ye.raw+=`
|
|
|
`+Le.raw,Ye.text+=`
|
|
|
`+Le.text);continue}if(ce){var at="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return xe},we.inline=function(ce){var xe,_e,Le,Re,Ge,Ye,at=ce.length;for(xe=0;xe<at;xe++){Ye=ce[xe];switch(Ye.type){case"paragraph":case"text":case"heading":{Ye.tokens=[],this.inlineTokens(Ye.text,Ye.tokens);break}case"table":{for(Ye.tokens={header:[],cells:[]},Re=Ye.header.length,_e=0;_e<Re;_e++)Ye.tokens.header[_e]=[],this.inlineTokens(Ye.header[_e],Ye.tokens.header[_e]);for(Re=Ye.cells.length,_e=0;_e<Re;_e++)for(Ge=Ye.cells[_e],Ye.tokens.cells[_e]=[],Le=0;Le<Ge.length;Le++)Ye.tokens.cells[_e][Le]=[],this.inlineTokens(Ge[Le],Ye.tokens.cells[_e][Le]);break}case"blockquote":{this.inline(Ye.tokens);break}case"list":{for(Re=Ye.items.length,_e=0;_e<Re;_e++)this.inline(Ye.items[_e].tokens);break}}}return ce},we.inlineTokens=function(ce,xe,_e,Le,Re){xe===void 0&&(xe=[]),_e===void 0&&(_e=!1),Le===void 0&&(Le=!1),Re===void 0&&(Re="");var Ge,Ye=ce,at;if(this.tokens.links){var it=Object.keys(this.tokens.links);if(it.length>0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(Ye))!=null;)it.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(Ye=Ye.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(Ye))!=null;)Ye=Ye.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+Ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ce;){if(Ge=this.tokenizer.escape(ce)){ce=ce.substring(Ge.raw.length),xe.push(Ge);continue}if(Ge=this.tokenizer.tag(ce,_e,Le)){ce=ce.substring(Ge.raw.length),_e=Ge.inLink,Le=Ge.inRawBlock,xe.push(Ge);continue}if(Ge=this.tokenizer.link(ce)){ce=ce.substring(Ge.raw.length),Ge.type==="link"&&(Ge.tokens=this.inlineTokens(Ge.text,[],!0,Le)),xe.push(Ge);continue}if(Ge=this.tokenizer.reflink(ce,this.tokens.links)){ce=ce.substring(Ge.raw.length),Ge.type==="link"&&(Ge.tokens=this.inlineTokens(Ge.text,[],!0,Le)),xe.push(Ge);continue}if(Ge=this.tokenizer.strong(ce,Ye,Re)){ce=ce.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],_e,Le),xe.push(Ge);continue}if(Ge=this.tokenizer.em(ce,Ye,Re)){ce=ce.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],_e,Le),xe.push(Ge);continue}if(Ge=this.tokenizer.codespan(ce)){ce=ce.substring(Ge.raw.length),xe.push(Ge);continue}if(Ge=this.tokenizer.br(ce)){ce=ce.substring(Ge.raw.length),xe.push(Ge);continue}if(Ge=this.tokenizer.del(ce)){ce=ce.substring(Ge.raw.length),Ge.tokens=this.inlineTokens(Ge.text,[],_e,Le),xe.push(Ge);continue}if(Ge=this.tokenizer.autolink(ce,ne)){ce=ce.substring(Ge.raw.length),xe.push(Ge);continue}if(!_e&&(Ge=this.tokenizer.url(ce,ne))){ce=ce.substring(Ge.raw.length),xe.push(Ge);continue}if(Ge=this.tokenizer.inlineText(ce,Le,Ee)){ce=ce.substring(Ge.raw.length),Re=Ge.raw.slice(-1),xe.push(Ge);continue}if(ce){var ot="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return xe},c(Pe,null,[{key:"rules",get:function(){return{block:Z,inline:ae}}}]),Pe}(),X=S.defaults,Y=K.cleanUrl,he=K.escape,de=function(){function Pe(Ae){this.options=Ae||X}var we=Pe.prototype;return we.code=function(ce,xe,_e){var Le=(xe||"").match(/\S*/)[0];if(this.options.highlight){var Re=this.options.highlight(ce,Le);Re!=null&&Re!==ce&&(_e=!0,ce=Re)}return Le?'<pre><code class="'+this.options.langPrefix+he(Le,!0)+'">'+(_e?ce:he(ce,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(_e?ce:he(ce,!0))+`</code></pre>
|
|
|
`},we.blockquote=function(ce){return`<blockquote>
|
|
|
`+ce+`</blockquote>
|
|
|
`},we.html=function(ce){return ce},we.heading=function(ce,xe,_e,Le){return this.options.headerIds?"<h"+xe+' id="'+this.options.headerPrefix+Le.slug(_e)+'">'+ce+"</h"+xe+`>
|
|
|
`:"<h"+xe+">"+ce+"</h"+xe+`>
|
|
|
`},we.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},we.list=function(ce,xe,_e){var Le=xe?"ol":"ul",Re=xe&&_e!==1?' start="'+_e+'"':"";return"<"+Le+Re+`>
|
|
|
`+ce+"</"+Le+`>
|
|
|
`},we.listitem=function(ce){return"<li>"+ce+`</li>
|
|
|
`},we.checkbox=function(ce){return"<input "+(ce?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},we.paragraph=function(ce){return"<p>"+ce+`</p>
|
|
|
`},we.table=function(ce,xe){return xe&&(xe="<tbody>"+xe+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ce+`</thead>
|
|
|
`+xe+`</table>
|
|
|
`},we.tablerow=function(ce){return`<tr>
|
|
|
`+ce+`</tr>
|
|
|
`},we.tablecell=function(ce,xe){var _e=xe.header?"th":"td",Le=xe.align?"<"+_e+' align="'+xe.align+'">':"<"+_e+">";return Le+ce+"</"+_e+`>
|
|
|
`},we.strong=function(ce){return"<strong>"+ce+"</strong>"},we.em=function(ce){return"<em>"+ce+"</em>"},we.codespan=function(ce){return"<code>"+ce+"</code>"},we.br=function(){return this.options.xhtml?"<br/>":"<br>"},we.del=function(ce){return"<del>"+ce+"</del>"},we.link=function(ce,xe,_e){if(ce=Y(this.options.sanitize,this.options.baseUrl,ce),ce===null)return _e;var Le='<a href="'+he(ce)+'"';return xe&&(Le+=' title="'+xe+'"'),Le+=">"+_e+"</a>",Le},we.image=function(ce,xe,_e){if(ce=Y(this.options.sanitize,this.options.baseUrl,ce),ce===null)return _e;var Le='<img src="'+ce+'" alt="'+_e+'"';return xe&&(Le+=' title="'+xe+'"'),Le+=this.options.xhtml?"/>":">",Le},we.text=function(ce){return ce},Pe}(),Te=function(){function Pe(){}var we=Pe.prototype;return we.strong=function(ce){return ce},we.em=function(ce){return ce},we.codespan=function(ce){return ce},we.del=function(ce){return ce},we.html=function(ce){return ce},we.text=function(ce){return ce},we.link=function(ce,xe,_e){return""+_e},we.image=function(ce,xe,_e){return""+_e},we.br=function(){return""},Pe}(),ze=function(){function Pe(){this.seen={}}var we=Pe.prototype;return we.slug=function(ce){var xe=ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(xe)){var _e=xe;do this.seen[_e]++,xe=_e+"-"+this.seen[_e];while(this.seen.hasOwnProperty(xe))}return this.seen[xe]=0,xe},Pe}(),Ze=S.defaults,Je=K.unescape,$e=function(){function Pe(Ae){this.options=Ae||Ze,this.options.renderer=this.options.renderer||new de,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new ze}Pe.parse=function(ce,xe){var _e=new Pe(xe);return _e.parse(ce)};var we=Pe.prototype;return we.parse=function(ce,xe){xe===void 0&&(xe=!0);var _e="",Le,Re,Ge,Ye,at,it,ot,yt,wt,ft,jt,kt,Rt,Vt,Tt,dr,tr,Wt,Bt=ce.length;for(Le=0;Le<Bt;Le++){ft=ce[Le];switch(ft.type){case"space":continue;case"hr":{_e+=this.renderer.hr();continue}case"heading":{_e+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,Je(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{_e+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(yt="",ot="",Ye=ft.header.length,Re=0;Re<Ye;Re++)ot+=this.renderer.tablecell(this.parseInline(ft.tokens.header[Re]),{header:!0,align:ft.align[Re]});for(yt+=this.renderer.tablerow(ot),wt="",Ye=ft.cells.length,Re=0;Re<Ye;Re++){for(it=ft.tokens.cells[Re],ot="",at=it.length,Ge=0;Ge<at;Ge++)ot+=this.renderer.tablecell(this.parseInline(it[Ge]),{header:!1,align:ft.align[Ge]});wt+=this.renderer.tablerow(ot)}_e+=this.renderer.table(yt,wt);continue}case"blockquote":{wt=this.parse(ft.tokens),_e+=this.renderer.blockquote(wt);continue}case"list":{for(jt=ft.ordered,kt=ft.start,Rt=ft.loose,Ye=ft.items.length,wt="",Re=0;Re<Ye;Re++)Tt=ft.items[Re],dr=Tt.checked,tr=Tt.task,Vt="",Tt.task&&(Wt=this.renderer.checkbox(dr),Rt?Tt.tokens.length>0&&Tt.tokens[0].type==="text"?(Tt.tokens[0].text=Wt+" "+Tt.tokens[0].text,Tt.tokens[0].tokens&&Tt.tokens[0].tokens.length>0&&Tt.tokens[0].tokens[0].type==="text"&&(Tt.tokens[0].tokens[0].text=Wt+" "+Tt.tokens[0].tokens[0].text)):Tt.tokens.unshift({type:"text",text:Wt}):Vt+=Wt),Vt+=this.parse(Tt.tokens,Rt),wt+=this.renderer.listitem(Vt,tr,dr);_e+=this.renderer.list(wt,jt,kt);continue}case"html":{_e+=this.renderer.html(ft.text);continue}case"paragraph":{_e+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(wt=ft.tokens?this.parseInline(ft.tokens):ft.text;Le+1<Bt&&ce[Le+1].type==="text";)ft=ce[++Le],wt+=`
|
|
|
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);_e+=xe?this.renderer.paragraph(wt):wt;continue}default:{var Nr='Token with "'+ft.type+'" type was not found.';if(this.options.silent){console.error(Nr);return}else throw new Error(Nr)}}}return _e},we.parseInline=function(ce,xe){xe=xe||this.renderer;var _e="",Le,Re,Ge=ce.length;for(Le=0;Le<Ge;Le++){Re=ce[Le];switch(Re.type){case"escape":{_e+=xe.text(Re.text);break}case"html":{_e+=xe.html(Re.text);break}case"link":{_e+=xe.link(Re.href,Re.title,this.parseInline(Re.tokens,xe));break}case"image":{_e+=xe.image(Re.href,Re.title,Re.text);break}case"strong":{_e+=xe.strong(this.parseInline(Re.tokens,xe));break}case"em":{_e+=xe.em(this.parseInline(Re.tokens,xe));break}case"codespan":{_e+=xe.codespan(Re.text);break}case"br":{_e+=xe.br();break}case"del":{_e+=xe.del(this.parseInline(Re.tokens,xe));break}case"text":{_e+=xe.text(Re.text);break}default:{var Ye='Token with "'+Re.type+'" type was not found.';if(this.options.silent){console.error(Ye);return}else throw new Error(Ye)}}}return _e},Pe}(),tt=K.merge,nt=K.checkSanitizeDeprecation,Me=K.escape,Ce=S.getDefaults,Xe=S.changeDefaults,et=S.defaults;function Ue(Pe,we,Ae){if(typeof Pe=="undefined"||Pe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Pe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Pe)+", string expected");if(typeof we=="function"&&(Ae=we,we=null),we=tt({},Ue.defaults,we||{}),nt(we),Ae){var ce=we.highlight,xe;try{xe=J.lex(Pe,we)}catch(Ge){return Ae(Ge)}var _e=function(Ye){var at;if(!Ye)try{at=$e.parse(xe,we)}catch(it){Ye=it}return we.highlight=ce,Ye?Ae(Ye):Ae(null,at)};if(!ce||ce.length<3)return _e();if(delete we.highlight,!xe.length)return _e();var Le=0;Ue.walkTokens(xe,function(Ge){Ge.type==="code"&&(Le++,setTimeout(function(){ce(Ge.text,Ge.lang,function(Ye,at){if(Ye)return _e(Ye);at!=null&&at!==Ge.text&&(Ge.text=at,Ge.escaped=!0),Le--,Le===0&&_e()})},0))}),Le===0&&_e();return}try{var Re=J.lex(Pe,we);return we.walkTokens&&Ue.walkTokens(Re,we.walkTokens),$e.parse(Re,we)}catch(Ge){if(Ge.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,we.silent)return"<p>An error occurred:</p><pre>"+Me(Ge.message+"",!0)+"</pre>";throw Ge}}Ue.options=Ue.setOptions=function(Pe){return tt(Ue.defaults,Pe),Xe(Ue.defaults),Ue},Ue.getDefaults=Ce,Ue.defaults=et,Ue.use=function(Pe){var we=tt({},Pe);if(Pe.renderer&&function(){var ce=Ue.defaults.renderer||new de,xe=function(Re){var Ge=ce[Re];ce[Re]=function(){for(var Ye=arguments.length,at=new Array(Ye),it=0;it<Ye;it++)at[it]=arguments[it];var ot=Pe.renderer[Re].apply(ce,at);return ot===!1&&(ot=Ge.apply(ce,at)),ot}};for(var _e in Pe.renderer)xe(_e);we.renderer=ce}(),Pe.tokenizer&&function(){var ce=Ue.defaults.tokenizer||new ye,xe=function(Re){var Ge=ce[Re];ce[Re]=function(){for(var Ye=arguments.length,at=new Array(Ye),it=0;it<Ye;it++)at[it]=arguments[it];var ot=Pe.tokenizer[Re].apply(ce,at);return ot===!1&&(ot=Ge.apply(ce,at)),ot}};for(var _e in Pe.tokenizer)xe(_e);we.tokenizer=ce}(),Pe.walkTokens){var Ae=Ue.defaults.walkTokens;we.walkTokens=function(ce){Pe.walkTokens(ce),Ae&&Ae(ce)}}Ue.setOptions(we)},Ue.walkTokens=function(Pe,we){for(var Ae=p(Pe),ce;!(ce=Ae()).done;){var xe=ce.value;we(xe);switch(xe.type){case"table":{for(var _e=p(xe.tokens.header),Le;!(Le=_e()).done;){var Re=Le.value;Ue.walkTokens(Re,we)}for(var Ge=p(xe.tokens.cells),Ye;!(Ye=Ge()).done;)for(var at=Ye.value,it=p(at),ot;!(ot=it()).done;){var yt=ot.value;Ue.walkTokens(yt,we)}break}case"list":{Ue.walkTokens(xe.items,we);break}default:xe.tokens&&Ue.walkTokens(xe.tokens,we)}}},Ue.Parser=$e,Ue.parser=$e.parse,Ue.Renderer=de,Ue.TextRenderer=Te,Ue.Lexer=J,Ue.lexer=J.lex,Ue.Tokenizer=ye,Ue.Slugger=ze,Ue.parse=Ue;var Ve=Ue;return Ve})},"DlR+":function(N,$,k){var P=k("MFOe"),c=P.Global,_=P.trim;N.exports={name:"cookieStorage",read:p,write:S,each:s,remove:v,clearAll:o};var D=c.document;function p(r){if(!r||!i(r))return null;var h="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(D.cookie.replace(new RegExp(h),"$1"))}function s(r){for(var h=D.cookie.split(/; ?/g),y=h.length-1;y>=0;y--){if(!_(h[y]))continue;var g=h[y].split("="),w=unescape(g[0]),m=unescape(g[1]);r(m,w)}}function S(r,h){if(!r)return;D.cookie=escape(r)+"="+escape(h)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function v(r){if(!r||!i(r))return;D.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function o(){s(function(r,h){v(h)})}function i(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(D.cookie)}},E4JC:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.StreamCipher,p=c.algo,s=[],S=[],v=[],o=p.Rabbit=D.extend({_doReset:function(){for(var r=this._key.words,h=this.cfg.iv,y=0;y<4;y++)r[y]=(r[y]<<8|r[y]>>>24)&16711935|(r[y]<<24|r[y]>>>8)&4278255360;var g=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],w=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var y=0;y<4;y++)i.call(this);for(var y=0;y<8;y++)w[y]^=g[y+4&7];if(h){var m=h.words,d=m[0],n=m[1],l=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=l>>>16|u&4294901760,E=u<<16|l&65535;w[0]^=l,w[1]^=T,w[2]^=u,w[3]^=E,w[4]^=l,w[5]^=T,w[6]^=u,w[7]^=E;for(var y=0;y<4;y++)i.call(this)}},_doProcessBlock:function(r,h){var y=this._X;i.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var g=0;g<4;g++)s[g]=(s[g]<<8|s[g]>>>24)&16711935|(s[g]<<24|s[g]>>>8)&4278255360,r[h+g]^=s[g]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,h=this._C,y=0;y<8;y++)S[y]=h[y];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<S[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<S[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<S[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<S[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<S[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<S[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<S[6]>>>0?1:0)|0,this._b=h[7]>>>0<S[7]>>>0?1:0;for(var y=0;y<8;y++){var g=r[y]+h[y],w=g&65535,m=g>>>16,d=((w*w>>>17)+w*m>>>15)+m*m,n=((g&4294901760)*g|0)+((g&65535)*g|0);v[y]=d^n}r[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,r[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,r[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,r[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,r[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,r[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,r[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,r[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}c.Rabbit=D._createHelper(o)}(),P.Rabbit})},ELLl:function(N,$,k){(function(P){P(k("VrN/"))})(function(P){var c={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},_=P.Pos;P.defineOption("autoCloseBrackets",!1,function(w,m,d){d&&d!=P.Init&&(w.removeKeyMap(p),w.state.closeBrackets=null),m&&(s(D(m,"pairs")),w.state.closeBrackets=m,w.addKeyMap(p))});function D(w,m){return m=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[m]!=null?w[m]:c[m]}var p={Backspace:o,Enter:i};function s(w){for(var m=0;m<w.length;m++){var d=w.charAt(m),n="'"+d+"'";p[n]||(p[n]=S(d))}}s(c.pairs+"`");function S(w){return function(m){return h(m,w)}}function v(w){var m=w.state.closeBrackets;if(!m||m.override)return m;var d=w.getModeAt(w.getCursor());return d.closeBrackets||m}function o(w){var m=v(w);if(!m||w.getOption("disableInput"))return P.Pass;for(var d=D(m,"pairs"),n=w.listSelections(),l=0;l<n.length;l++){if(!n[l].empty())return P.Pass;var u=y(w,n[l].head);if(!u||d.indexOf(u)%2!=0)return P.Pass}for(var l=n.length-1;l>=0;l--){var T=n[l].head;w.replaceRange("",_(T.line,T.ch-1),_(T.line,T.ch+1),"+delete")}}function i(w){var m=v(w),d=m&&D(m,"explode");if(!d||w.getOption("disableInput"))return P.Pass;for(var n=w.listSelections(),l=0;l<n.length;l++){if(!n[l].empty())return P.Pass;var u=y(w,n[l].head);if(!u||d.indexOf(u)%2!=0)return P.Pass}w.operation(function(){var T=w.lineSeparator()||`
|
|
|
`;w.replaceSelection(T+T,null),w.execCommand("goCharLeft"),n=w.listSelections();for(var E=0;E<n.length;E++){var a=n[E].head.line;w.indentLine(a,null,!0),w.indentLine(a+1,null,!0)}})}function r(w){var m=P.cmpPos(w.anchor,w.head)>0;return{anchor:new _(w.anchor.line,w.anchor.ch+(m?-1:1)),head:new _(w.head.line,w.head.ch+(m?1:-1))}}function h(w,m){var d=v(w);if(!d||w.getOption("disableInput"))return P.Pass;var n=D(d,"pairs"),l=n.indexOf(m);if(l==-1)return P.Pass;for(var u=D(d,"closeBefore"),T=D(d,"triples"),E=n.charAt(l+1)==m,a=w.listSelections(),L=l%2==0,O,f=0;f<a.length;f++){var x=a[f],b=x.head,C,I=w.getRange(b,_(b.line,b.ch+1));if(L&&!x.empty())C="surround";else if((E||!L)&&I==m)E&&g(w,b)?C="both":T.indexOf(m)>=0&&w.getRange(b,_(b.line,b.ch+3))==m+m+m?C="skipThree":C="skip";else if(E&&b.ch>1&&T.indexOf(m)>=0&&w.getRange(_(b.line,b.ch-2),b)==m+m){if(b.ch>2&&/\bstring/.test(w.getTokenTypeAt(_(b.line,b.ch-2))))return P.Pass;C="addFour"}else if(E){var j=b.ch==0?" ":w.getRange(_(b.line,b.ch-1),b);if(!P.isWordChar(I)&&j!=m&&!P.isWordChar(j))C="both";else return P.Pass}else if(L&&(I.length===0||/\s/.test(I)||u.indexOf(I)>-1))C="both";else return P.Pass;if(!O)O=C;else if(O!=C)return P.Pass}var M=l%2?n.charAt(l-1):m,z=l%2?m:n.charAt(l+1);w.operation(function(){if(O=="skip")w.execCommand("goCharRight");else if(O=="skipThree")for(var G=0;G<3;G++)w.execCommand("goCharRight");else if(O=="surround"){for(var B=w.getSelections(),G=0;G<B.length;G++)B[G]=M+B[G]+z;w.replaceSelections(B,"around"),B=w.listSelections().slice();for(var G=0;G<B.length;G++)B[G]=r(B[G]);w.setSelections(B)}else O=="both"?(w.replaceSelection(M+z,null),w.triggerElectric(M+z),w.execCommand("goCharLeft")):O=="addFour"&&(w.replaceSelection(M+M+M+M,"before"),w.execCommand("goCharRight"))})}function y(w,m){var d=w.getRange(_(m.line,m.ch-1),_(m.line,m.ch+1));return d.length==2?d:null}function g(w,m){var d=w.getTokenAt(_(m.line,m.ch+1));return/\bstring/.test(d.type)&&d.start==m.ch&&(m.ch==0||!/\bstring/.test(w.getTokenTypeAt(m)))}})},ELcG:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){/** @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(c){var _=P,D=_.lib,p=D.WordArray,s=D.Hasher,S=_.algo,v=p.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]),o=p.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]),i=p.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]),r=p.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=p.create([0,1518500249,1859775393,2400959708,2840853838]),y=p.create([1352829926,1548603684,1836072691,2053994217,0]),g=S.RIPEMD160=s.extend({_doReset:function(){this._hash=p.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,E){for(var a=0;a<16;a++){var L=E+a,O=T[L];T[L]=(O<<8|O>>>24)&16711935|(O<<24|O>>>8)&4278255360}var f=this._hash.words,x=h.words,b=y.words,C=v.words,I=o.words,j=i.words,M=r.words,z,G,B,K,F,H,W,Q,ee,q;H=z=f[0],W=G=f[1],Q=B=f[2],ee=K=f[3],q=F=f[4];for(var pe,a=0;a<80;a+=1)pe=z+T[E+C[a]]|0,a<16?pe+=w(G,B,K)+x[0]:a<32?pe+=m(G,B,K)+x[1]:a<48?pe+=d(G,B,K)+x[2]:a<64?pe+=n(G,B,K)+x[3]:pe+=l(G,B,K)+x[4],pe=pe|0,pe=u(pe,j[a]),pe=pe+F|0,z=F,F=K,K=u(B,10),B=G,G=pe,pe=H+T[E+I[a]]|0,a<16?pe+=l(W,Q,ee)+b[0]:a<32?pe+=n(W,Q,ee)+b[1]:a<48?pe+=d(W,Q,ee)+b[2]:a<64?pe+=m(W,Q,ee)+b[3]:pe+=w(W,Q,ee)+b[4],pe=pe|0,pe=u(pe,M[a]),pe=pe+q|0,H=q,q=ee,ee=u(Q,10),Q=W,W=pe;pe=f[1]+B+ee|0,f[1]=f[2]+K+q|0,f[2]=f[3]+F+H|0,f[3]=f[4]+z+W|0,f[4]=f[0]+G+Q|0,f[0]=pe},_doFinalize:function(){var T=this._data,E=T.words,a=this._nDataBytes*8,L=T.sigBytes*8;E[L>>>5]|=128<<24-L%32,E[(L+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,T.sigBytes=(E.length+1)*4,this._process();for(var O=this._hash,f=O.words,x=0;x<5;x++){var b=f[x];f[x]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}return O},clone:function(){var T=s.clone.call(this);return T._hash=this._hash.clone(),T}});function w(T,E,a){return T^E^a}function m(T,E,a){return T&E|~T&a}function d(T,E,a){return(T|~E)^a}function n(T,E,a){return T&a|E&~a}function l(T,E,a){return T^(E|~a)}function u(T,E){return T<<E|T>>>32-E}_.RIPEMD160=s._createHelper(g),_.HmacRIPEMD160=s._createHmacHelper(g)}(Math),P.RIPEMD160})},ETIr:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.WordArray,p=c.enc,s=p.Base64={stringify:function(v){var o=v.words,i=v.sigBytes,r=this._map;v.clamp();for(var h=[],y=0;y<i;y+=3)for(var g=o[y>>>2]>>>24-y%4*8&255,w=o[y+1>>>2]>>>24-(y+1)%4*8&255,m=o[y+2>>>2]>>>24-(y+2)%4*8&255,d=g<<16|w<<8|m,n=0;n<4&&y+n*.75<i;n++)h.push(r.charAt(d>>>6*(3-n)&63));var l=r.charAt(64);if(l)for(;h.length%4;)h.push(l);return h.join("")},parse:function(v){var o=v.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var h=0;h<i.length;h++)r[i.charCodeAt(h)]=h}var y=i.charAt(64);if(y){var g=v.indexOf(y);g!==-1&&(o=g)}return S(v,o,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(v,o,i){for(var r=[],h=0,y=0;y<o;y++)if(y%4){var g=i[v.charCodeAt(y-1)]<<y%4*2,w=i[v.charCodeAt(y)]>>>6-y%4*2,m=g|w;r[h>>>2]|=m<<24-h%4*8,h++}return D.create(r,h)}}(),P.enc.Base64})},"F+F2":function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var c=P,_=c.lib,D=_.WordArray,p=D.init,s=D.init=function(S){if(S instanceof ArrayBuffer&&(S=new Uint8Array(S)),(S instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)&&(S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),S instanceof Uint8Array){for(var v=S.byteLength,o=[],i=0;i<v;i++)o[i>>>2]|=S[i]<<24-i%4*8;p.call(this,o,v)}else p.apply(this,arguments)};s.prototype=D}(),P.lib.WordArray})},GRuw:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("lPiR"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.WordArray,p=c.algo,s=p.SHA256,S=p.SHA224=s.extend({_doReset:function(){this._hash=new D.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var v=s._doFinalize.call(this);return v.sigBytes-=4,v}});c.SHA224=s._createHelper(S),c.HmacSHA224=s._createHmacHelper(S)}(),P.SHA224})},GfqC:function(N,$,k){"use strict";var P=k("cDcd"),c=k.n(P),_=k("TSYQ"),D=k.n(_);function p(K,F){var H="cannot "+K.method+" "+K.action+" "+F.status+"'",W=new Error(H);return W.status=F.status,W.method=K.method,W.url=K.action,W}function s(K){var F=K.responseText||K.response;if(!F)return F;try{return JSON.parse(F)}catch(H){return F}}function S(K){var F=new XMLHttpRequest;K.onProgress&&F.upload&&(F.upload.onprogress=function(ee){ee.total>0&&(ee.percent=ee.loaded/ee.total*100),K.onProgress(ee)});var H=new FormData;K.data&&Object.keys(K.data).forEach(function(Q){var ee=K.data[Q];if(Array.isArray(ee)){ee.forEach(function(q){H.append(Q+"[]",q)});return}H.append(Q,K.data[Q])}),K.file instanceof Blob?H.append(K.filename,K.file,K.file.name):H.append(K.filename,K.file),F.onerror=function(ee){K.onError(ee)},F.onload=function(){return F.status<200||F.status>=300?K.onError(p(K,F),s(F)):K.onSuccess(s(F),F)},F.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in F&&(F.withCredentials=!0);var W=K.headers||{};return W["X-Requested-With"]!==null&&F.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(W).forEach(function(Q){W[Q]!==null&&F.setRequestHeader(Q,W[Q])}),F.send(H),{abort:function(){F.abort()}}}var v=+new Date,o=0;function i(){return"rc-upload-"+v+"-"+ ++o}function r(K,F){return K.indexOf(F,K.length-F.length)!==-1}var h=function(K,F){if(K&&F){var H=Array.isArray(F)?F:F.split(","),W=K.name||"",Q=K.type||"",ee=Q.replace(/\/.*$/,"");return H.some(function(q){var pe=q.trim();return pe.charAt(0)==="."?r(W.toLowerCase(),pe.toLowerCase()):/\/\*$/.test(pe)?ee===pe.replace(/\/.*$/,""):Q===pe})}return!0};function y(K,F){var H=K.createReader(),W=[];function Q(){H.readEntries(function(ee){var q=Array.prototype.slice.apply(ee);W=W.concat(q);var pe=!q.length;pe?F(W):Q()})}Q()}var g=function(F,H,W){var Q=function ee(q,pe){pe=pe||"",q.isFile?q.file(function(ye){W(ye)&&(q.fullPath&&!ye.webkitRelativePath&&(Object.defineProperties(ye,{webkitRelativePath:{writable:!0}}),ye.webkitRelativePath=q.fullPath.replace(/^\//,""),Object.defineProperties(ye,{webkitRelativePath:{writable:!1}})),H([ye]))}):q.isDirectory&&y(q,function(ye){ye.forEach(function(ie){ee(ie,""+pe+q.name+"/")})})};F.forEach(function(ee){Q(ee.webkitGetAsEntry())})},w=g,m=Object.assign||function(K){for(var F=1;F<arguments.length;F++){var H=arguments[F];for(var W in H)Object.prototype.hasOwnProperty.call(H,W)&&(K[W]=H[W])}return K},d=function(){function K(F,H){var W=[],Q=!0,ee=!1,q=void 0;try{for(var pe=F[Symbol.iterator](),ye;!(Q=(ye=pe.next()).done)&&!(W.push(ye.value),H&&W.length===H);Q=!0);}catch(ie){ee=!0,q=ie}finally{try{!Q&&pe.return&&pe.return()}finally{if(ee)throw q}}return W}return function(F,H){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return K(F,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function K(F,H){for(var W=0;W<H.length;W++){var Q=H[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(F,Q.key,Q)}}return function(F,H,W){return H&&K(F.prototype,H),W&&K(F,W),F}}();function l(K,F,H){return F in K?Object.defineProperty(K,F,{value:H,enumerable:!0,configurable:!0,writable:!0}):K[F]=H,K}function u(K,F){var H={};for(var W in K){if(F.indexOf(W)>=0)continue;if(!Object.prototype.hasOwnProperty.call(K,W))continue;H[W]=K[W]}return H}function T(K,F){if(!(K instanceof F))throw new TypeError("Cannot call a class as a function")}function E(K,F){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:K}function a(K,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);K.prototype=Object.create(F&&F.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(K,F):K.__proto__=F)}var L=function(F){return Object.keys(F).reduce(function(H,W){return(W.substr(0,5)==="data-"||W.substr(0,5)==="aria-"||W==="role")&&(H[W]=F[W]),H},{})},O=function(K){a(F,K);function F(){var H,W,Q,ee;T(this,F);for(var q=arguments.length,pe=Array(q),ye=0;ye<q;ye++)pe[ye]=arguments[ye];return ee=(W=(Q=E(this,(H=F.__proto__||Object.getPrototypeOf(F)).call.apply(H,[this].concat(pe))),Q),Q.state={uid:i()},Q.reqs={},Q.onChange=function(ie){var Se=ie.target.files;Q.uploadFiles(Se),Q.reset()},Q.onClick=function(ie){var Se=Q.fileInput;if(!Se)return;var ge=Q.props,oe=ge.children,le=ge.onClick;oe&&oe.type==="button"&&(Se.parentNode.focus(),Se.parentNode.querySelector("button").blur()),Se.click(),le&&le(ie)},Q.onKeyDown=function(ie){ie.key==="Enter"&&Q.onClick()},Q.onFileDrop=function(ie){var Se=Q.props.multiple;if(ie.preventDefault(),ie.type==="dragover")return;if(Q.props.directory)w(Array.prototype.slice.call(ie.dataTransfer.items),Q.uploadFiles,function(oe){return h(oe,Q.props.accept)});else{var ge=Array.prototype.slice.call(ie.dataTransfer.files).filter(function(oe){return h(oe,Q.props.accept)});Se===!1&&(ge=ge.slice(0,1)),Q.uploadFiles(ge)}},Q.uploadFiles=function(ie){var Se=Array.prototype.slice.call(ie);Se.map(function(ge){return ge.uid=i(),ge}).forEach(function(ge){Q.upload(ge,Se)})},Q.saveFileInput=function(ie){Q.fileInput=ie},W),E(Q,ee)}return n(F,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(W,Q){var ee=this,q=this.props;if(!q.beforeUpload)return setTimeout(function(){return ee.post(W)},0);var pe=q.beforeUpload(W,Q);pe&&pe.then?pe.then(function(ye){var ie=Object.prototype.toString.call(ye);return ie==="[object File]"||ie==="[object Blob]"?ee.post(ye):ee.post(W)}).catch(function(ye){console.log(ye)}):pe!==!1&&setTimeout(function(){return ee.post(W)},0);return}},{key:"post",value:function(W){var Q=this;if(!this._isMounted)return;var ee=this.props,q=ee.onStart,pe=ee.onProgress,ye=ee.transformFile,ie=ye===void 0?function(Se){return Se}:ye;new Promise(function(Se){var ge=ee.action;return typeof ge=="function"&&(ge=ge(W)),Se(ge)}).then(function(Se){var ge=W.uid,oe=ee.customRequest||S,le=Promise.resolve(ie(W)).then(function(te){var be=ee.data;return typeof be=="function"&&(be=be(te)),Promise.all([te,be])}).catch(function(te){console.error(te)});le.then(function(te){var be=d(te,2),Z=be[0],ae=be[1],Ee={action:Se,filename:ee.name,data:ae,file:Z,headers:ee.headers,withCredentials:ee.withCredentials,method:ee.method||"post",onProgress:pe?function(ne){pe(ne,W)}:null,onSuccess:function(J,X){delete Q.reqs[ge],ee.onSuccess(J,W,X)},onError:function(J,X){delete Q.reqs[ge],ee.onError(J,X,W)}};q(W),Q.reqs[ge]=oe(Ee)})})}},{key:"reset",value:function(){this.setState({uid:i()})}},{key:"abort",value:function(W){var Q=this.reqs;if(W){var ee=W;W&&W.uid&&(ee=W.uid),Q[ee]&&Q[ee].abort&&Q[ee].abort(),delete Q[ee]}else Object.keys(Q).forEach(function(q){Q[q]&&Q[q].abort&&Q[q].abort(),delete Q[q]})}},{key:"render",value:function(){var W,Q=this.props,ee=Q.component,q=Q.prefixCls,pe=Q.className,ye=Q.disabled,ie=Q.id,Se=Q.style,ge=Q.multiple,oe=Q.accept,le=Q.children,te=Q.directory,be=Q.openFileDialogOnClick,Z=Q.onMouseEnter,ae=Q.onMouseLeave,Ee=u(Q,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ne=D()((W={},l(W,q,!0),l(W,q+"-disabled",ye),l(W,pe,pe),W)),J=ye?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:Z,onMouseLeave:ae,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return c.a.createElement(ee,m({},J,{className:ne,role:"button",style:Se}),c.a.createElement("input",m({},L(Ee),{id:ie,type:"file",ref:this.saveFileInput,onClick:function(Y){return Y.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:oe,directory:te?"directory":null,webkitdirectory:te?"webkitdirectory":null,multiple:ge,onChange:this.onChange})),le)}}]),F}(P.Component),f=O,x=Object.assign||function(K){for(var F=1;F<arguments.length;F++){var H=arguments[F];for(var W in H)Object.prototype.hasOwnProperty.call(H,W)&&(K[W]=H[W])}return K},b=function(){function K(F,H){for(var W=0;W<H.length;W++){var Q=H[W];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(F,Q.key,Q)}}return function(F,H,W){return H&&K(F.prototype,H),W&&K(F,W),F}}();function C(K,F){if(!(K instanceof F))throw new TypeError("Cannot call a class as a function")}function I(K,F){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:K}function j(K,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);K.prototype=Object.create(F&&F.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(K,F):K.__proto__=F)}function M(){}var z=function(K){j(F,K);function F(){var H,W,Q,ee;C(this,F);for(var q=arguments.length,pe=Array(q),ye=0;ye<q;ye++)pe[ye]=arguments[ye];return ee=(W=(Q=I(this,(H=F.__proto__||Object.getPrototypeOf(F)).call.apply(H,[this].concat(pe))),Q),Q.saveUploader=function(ie){Q.uploader=ie},W),I(Q,ee)}return b(F,[{key:"abort",value:function(W){this.uploader.abort(W)}},{key:"render",value:function(){return c.a.createElement(f,x({},this.props,{ref:this.saveUploader}))}}]),F}(P.Component);z.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var G=z,B=$.a=G},HmJG:function(N,$,k){},IBYe:function(N,$,k){"use strict";function P(c){return null}$.a=P},Ib8C:function(N,$,k){(function(P){(function(c,_){N.exports=$=_()})(this,function(){var c=c||function(_,D){var p;if(typeof window!="undefined"&&window.crypto&&(p=window.crypto),typeof self!="undefined"&&self.crypto&&(p=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(p=globalThis.crypto),!p&&typeof window!="undefined"&&window.msCrypto&&(p=window.msCrypto),!p&&typeof P!="undefined"&&P.crypto&&(p=P.crypto),!p&&!0)try{p=k(4)}catch(l){}var s=function(){if(p){if(typeof p.getRandomValues=="function")try{return p.getRandomValues(new Uint32Array(1))[0]}catch(l){}if(typeof p.randomBytes=="function")try{return p.randomBytes(4).readInt32LE()}catch(l){}}throw new Error("Native crypto module could not be used to get secure random number.")},S=Object.create||function(){function l(){}return function(u){var T;return l.prototype=u,T=new l,l.prototype=null,T}}(),v={},o=v.lib={},i=o.Base=function(){return{extend:function(l){var u=S(this);return l&&u.mixIn(l),(!u.hasOwnProperty("init")||this.init===u.init)&&(u.init=function(){u.$super.init.apply(this,arguments)}),u.init.prototype=u,u.$super=this,u},create:function(){var l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var u in l)l.hasOwnProperty(u)&&(this[u]=l[u]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=o.WordArray=i.extend({init:function(l,u){l=this.words=l||[],u!=D?this.sigBytes=u:this.sigBytes=l.length*4},toString:function(l){return(l||y).stringify(this)},concat:function(l){var u=this.words,T=l.words,E=this.sigBytes,a=l.sigBytes;if(this.clamp(),E%4)for(var L=0;L<a;L++){var O=T[L>>>2]>>>24-L%4*8&255;u[E+L>>>2]|=O<<24-(E+L)%4*8}else for(var f=0;f<a;f+=4)u[E+f>>>2]=T[f>>>2];return this.sigBytes+=a,this},clamp:function(){var l=this.words,u=this.sigBytes;l[u>>>2]&=4294967295<<32-u%4*8,l.length=_.ceil(u/4)},clone:function(){var l=i.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var u=[],T=0;T<l;T+=4)u.push(s());return new r.init(u,l)}}),h=v.enc={},y=h.Hex={stringify:function(l){for(var u=l.words,T=l.sigBytes,E=[],a=0;a<T;a++){var L=u[a>>>2]>>>24-a%4*8&255;E.push((L>>>4).toString(16)),E.push((L&15).toString(16))}return E.join("")},parse:function(l){for(var u=l.length,T=[],E=0;E<u;E+=2)T[E>>>3]|=parseInt(l.substr(E,2),16)<<24-E%8*4;return new r.init(T,u/2)}},g=h.Latin1={stringify:function(l){for(var u=l.words,T=l.sigBytes,E=[],a=0;a<T;a++){var L=u[a>>>2]>>>24-a%4*8&255;E.push(String.fromCharCode(L))}return E.join("")},parse:function(l){for(var u=l.length,T=[],E=0;E<u;E++)T[E>>>2]|=(l.charCodeAt(E)&255)<<24-E%4*8;return new r.init(T,u)}},w=h.Utf8={stringify:function(l){try{return decodeURIComponent(escape(g.stringify(l)))}catch(u){throw new Error("Malformed UTF-8 data")}},parse:function(l){return g.parse(unescape(encodeURIComponent(l)))}},m=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=w.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var u,T=this._data,E=T.words,a=T.sigBytes,L=this.blockSize,O=L*4,f=a/O;l?f=_.ceil(f):f=_.max((f|0)-this._minBufferSize,0);var x=f*L,b=_.min(x*4,a);if(x){for(var C=0;C<x;C+=L)this._doProcessBlock(E,C);u=E.splice(0,x),T.sigBytes-=b}return new r.init(u,b)},clone:function(){var l=i.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0}),d=o.Hasher=m.extend({cfg:i.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var u=this._doFinalize();return u},blockSize:512/32,_createHelper:function(l){return function(u,T){return new l.init(T).finalize(u)}},_createHmacHelper:function(l){return function(u,T){return new n.HMAC.init(l,T).finalize(u)}}}),n=v.algo={};return v}(Math);return c})}).call(this,k("IyRk"))},J66h:function(N,$,k){(function(P){var c,_;(function(D,p){N.exports=p(D)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof P!="undefined"?P:this,function(D){"use strict";D=D||{};var p=D.Base64,s="2.6.4",S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=function(M){for(var z={},G=0,B=M.length;G<B;G++)z[M.charAt(G)]=G;return z}(S),o=String.fromCharCode,i=function(M){if(M.length<2){var z=M.charCodeAt(0);return z<128?M:z<2048?o(192|z>>>6)+o(128|z&63):o(224|z>>>12&15)+o(128|z>>>6&63)+o(128|z&63)}else{var z=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return o(240|z>>>18&7)+o(128|z>>>12&63)+o(128|z>>>6&63)+o(128|z&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(M){return M.replace(r,i)},y=function(M){var z=[0,2,1][M.length%3],G=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),B=[S.charAt(G>>>18),S.charAt(G>>>12&63),z>=2?"=":S.charAt(G>>>6&63),z>=1?"=":S.charAt(G&63)];return B.join("")},g=D.btoa&&typeof D.btoa=="function"?function(M){return D.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,y)},w=function(M){return g(h(String(M)))},m=function(M){return M.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},d=function(M,z){return z?m(w(M)):w(M)},n=function(M){return d(M,!0)},l;D.Uint8Array&&(l=function(M,z){for(var G="",B=0,K=M.length;B<K;B+=3){var F=M[B],H=M[B+1],W=M[B+2],Q=F<<16|H<<8|W;G+=S.charAt(Q>>>18)+S.charAt(Q>>>12&63)+(typeof H!="undefined"?S.charAt(Q>>>6&63):"=")+(typeof W!="undefined"?S.charAt(Q&63):"=")}return z?m(G):G});var u=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=function(M){switch(M.length){case 4:var z=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),G=z-65536;return o((G>>>10)+55296)+o((G&1023)+56320);case 3:return o((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return o((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},E=function(M){return M.replace(u,T)},a=function(M){var z=M.length,G=z%4,B=(z>0?v[M.charAt(0)]<<18:0)|(z>1?v[M.charAt(1)]<<12:0)|(z>2?v[M.charAt(2)]<<6:0)|(z>3?v[M.charAt(3)]:0),K=[o(B>>>16),o(B>>>8&255),o(B&255)];return K.length-=[0,0,2,1][G],K.join("")},L=D.atob&&typeof D.atob=="function"?function(M){return D.atob(M)}:function(M){return M.replace(/\S{1,4}/g,a)},O=function(M){return L(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},f=function(M){return E(L(M))},x=function(M){return String(M).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},b=function(M){return f(x(M))},C;D.Uint8Array&&(C=function(M){return Uint8Array.from(O(x(M)),function(z){return z.charCodeAt(0)})});var I=function(){var M=D.Base64;return D.Base64=p,M};if(D.Base64={VERSION:s,atob:O,btoa:g,fromBase64:b,toBase64:d,utob:h,encode:d,encodeURI:n,btou:E,decode:b,noConflict:I,fromUint8Array:l,toUint8Array:C},typeof Object.defineProperty=="function"){var j=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};D.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return b(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(M){return d(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return d(this,!0)}))}}return D.Meteor&&(Base64=D.Base64),N.exports?N.exports.Base64=D.Base64:!(c=[],_=function(){return D.Base64}.apply($,c),_!==void 0&&(N.exports=_)),{Base64:D.Base64}})}).call(this,k("IyRk"))},K3mO:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.Base,p=_.WordArray,s=c.algo,S=s.MD5,v=s.EvpKDF=D.extend({cfg:D.extend({keySize:128/32,hasher:S,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,i){for(var r,h=this.cfg,y=h.hasher.create(),g=p.create(),w=g.words,m=h.keySize,d=h.iterations;w.length<m;){r&&y.update(r),r=y.update(o).finalize(i),y.reset();for(var n=1;n<d;n++)r=y.finalize(r),y.reset();g.concat(r)}return g.sigBytes=m*4,g}});c.EvpKDF=function(o,i,r){return v.create(r).compute(o,i)}}(),P.EvpKDF})},KhGG:function(N,$,k){"use strict";k.d($,"a",function(){return a}),k.d($,"c",function(){return f});var P=k("0Owb"),c=k("miYZ"),_=k("tsqr"),D=k("oBTY"),p=k("tJVT"),s=k("PpiC"),S=k("k1fw"),v=k("9og8"),o=k("DZo9"),i=k("8z0m"),r=k("WmNS"),h=k.n(r),y=k("cDcd"),g=k.n(y),w=k("ErOA"),m=k("NFKh"),d=k.n(m),n=k("7Cbv"),l=k("9kvl"),u=k("mxV5"),T=k.n(u),E=i.a.Dragger,a=function(C){var I="bf3c199c2470cb477d907b1e0917c17b",j="5183666c72eec9e4",M=d.a.enc.Utf8.parse(I),z=d.a.enc.Utf8.parse(j),G=d.a.AES.decrypt(C,M,{iv:z,mode:d.a.mode.CBC});return G.toString(d.a.enc.Utf8)},L,O=function(){var b=Object(v.a)(h.a.mark(function C(I){var j,M,z,G,B,K,F,H,W,Q,ee;return h.a.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return F=I.identifier,H=I.oldFilename,W=I.newFilename,pe.next=3,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return Q=pe.sent,Q.data=JSON.parse(a(Q.data)),ee=new T.a({endpoint:Q==null||((j=Q.data)===null||j===void 0)?void 0:j.end_point,region:Q==null||((M=Q.data)===null||M===void 0)?void 0:M.region,accessKeyId:Q==null||((z=Q.data)===null||z===void 0)?void 0:z.access_key_id,accessKeySecret:Q==null||((G=Q.data)===null||G===void 0)?void 0:G.access_key_secret,bucket:Q==null||((B=Q.data)===null||B===void 0)?void 0:B.bucket,stsToken:Q==null||((K=Q.data)===null||K===void 0)?void 0:K.security_token}),pe.abrupt("return",new Promise(function(ye,ie){console.log(11111,"".concat(F,"/").concat(H),"".concat(F,"/").concat(W),Q.data),ee.copy("/".concat(F,"/").concat(H),"/".concat(F,"/").concat(W)).then(function(Se){console.log("\u62F7\u8D1D\u6210\u529F",Se)}).catch(function(Se){console.log(Se);debugger})}));case 7:case"end":return pe.stop()}},C)}));return function(I){return b.apply(this,arguments)}}(),f=function(){var b=Object(v.a)(h.a.mark(function C(I,j,M){var z,G,B,K,F,H,W,Q,ee,q;return h.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return j.file_name=I.name,ye.next=3,Object(w.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=ye.sent,console.log("decrypt(res.data):",a(W.data)),W.data=JSON.parse(a(W.data)),Q=I.name.split("."),Q.pop(),ee=j.realFileName?Q:Object(n.a)(),q=new T.a({endpoint:W==null||((z=W.data)===null||z===void 0)?void 0:z.end_point,region:W==null||((G=W.data)===null||G===void 0)?void 0:G.region,accessKeyId:W==null||((B=W.data)===null||B===void 0)?void 0:B.access_key_id,accessKeySecret:W==null||((K=W.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:W==null||((F=W.data)===null||F===void 0)?void 0:F.bucket,stsToken:W==null||((H=W.data)===null||H===void 0)?void 0:H.security_token}),ye.abrupt("return",new Promise(function(ie,Se){var ge;q.multipartUpload("".concat(ee),new Blob([I],{type:I.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},M),{},{callback:{url:W==null||((ge=W.data)===null||ge===void 0)?void 0:ge.callback_url,host:W==null?void 0:W.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(j)}})).then(function(oe){var le;I.response=(le=oe.data)===null||le===void 0?void 0:le.data,ie(oe==null?void 0:oe.data)}).catch(function(oe){Se(oe),console.log("err:",oe)})}));case 11:case"end":return ye.stop()}},C)}));return function(I,j,M){return b.apply(this,arguments)}}(),x=function(C){var I=C.user,j=C.cancelUpload,M=Object(s.a)(C,["user","cancelUpload"]),z=Object(y.useState)([]),G=Object(p.a)(z,2),B=G[0],K=G[1],F=Object(y.useState)(),H=Object(p.a)(F,2),W=H[0],Q=H[1],ee={onRemove:function(ye){K(Object(D.a)(B.filter(function(ie){return ie.name!==ye.name}))),M.onChange(B.filter(function(ie){return ie.name!==ye.name}))},disabled:M.disabled,multiple:!0,fileList:B==null?void 0:B.map(function(pe){return pe.file}),customRequest:function(){},beforeUpload:function(){var pe=Object(v.a)(h.a.mark(function ie(Se){var ge;return h.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(ge=M.maxSize||1024*1024*1024*1,!B.filter(function(te){return te.name===Se.name}).length){le.next=4;break}return _.b.info("".concat(Se.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),le.abrupt("return");case 4:if(!((Se==null?void 0:Se.size)>ge)){le.next=7;break}return _.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ge/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),le.abrupt("return",!1);case 7:return B.push({name:Se.name,file:Se}),K(Object(D.a)(B)),M.onChange(B),le.abrupt("return",!1);case 11:case"end":return le.stop()}},ie)}));function ye(ie){return pe.apply(this,arguments)}return ye}()},q=function(){var pe=Object(v.a)(h.a.mark(function ye(ie,Se){var ge,oe,le,te,be,Z,ae,Ee,ne,J;return h.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Se.file_name=ie.name,ae=ie.name,Y.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Ee=Y.sent,Ee.data=JSON.parse(a(Ee.data)),!((Ee==null?void 0:Ee.status)!==0)){Y.next=12;break}return B[B.findIndex(function(he){return he.name===ae})].status="error",B[B.findIndex(function(he){return he.name===ae})].file.status="error",M.onChange(B),_.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Y.abrupt("return");case 12:return W=new T.a({endpoint:Ee==null||((ge=Ee.data)===null||ge===void 0)?void 0:ge.end_point,region:Ee==null||((oe=Ee.data)===null||oe===void 0)?void 0:oe.region,accessKeyId:Ee==null||((le=Ee.data)===null||le===void 0)?void 0:le.access_key_id,accessKeySecret:Ee==null||((te=Ee.data)===null||te===void 0)?void 0:te.access_key_secret,bucket:Ee==null||((be=Ee.data)===null||be===void 0)?void 0:be.bucket,stsToken:Ee==null||((Z=Ee.data)===null||Z===void 0)?void 0:Z.security_token}),console.log(ie,"file"),Q(W),ne=ie.name.split("."),ne.pop(),J=Se.realFileName?ne:Object(n.a)(),Y.abrupt("return",new Promise(function(he,de){try{var Te;W.multipartUpload("".concat(M.identifier,"/").concat(J).concat(ae.indexOf(".")>-1?"."+ae.split(".").pop():""),new Blob([ie.file],{type:ie.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Ze,Je,$e){try{console.log("\u8FDB\u5EA6",Ze,Je,$e);var tt=B.findIndex(function(nt){return nt.name===ae});B[tt].file.percent=Ze*100,B[tt].tempCheckpoint=Je,K(Object(D.a)(B))}catch(nt){}},checkpoint:B[B.findIndex(function(ze){return ze.name===ae})].tempCheckpoint,callback:{customValue:{id:ae+""},url:Ee==null||((Te=Ee.data)===null||Te===void 0)?void 0:Te.callback_url,host:Ee==null?void 0:Ee.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(Se)}}).then(function(ze){var Ze,Je=B.findIndex(function(Ce){return Ce.name===ae}),$e="done";if(((Ze=ze.data)===null||Ze===void 0?void 0:Ze.status)===0){var tt;ie.response=(tt=ze.data)===null||tt===void 0?void 0:tt.data;var nt=B.findIndex(function(Ce){return Ce.name===ae});B[nt].status="done",B[nt].file.status="done"}else{var Me;_.b.warn((Me=ze.data)===null||Me===void 0?void 0:Me.message),$e="error"}B[Je].status=$e,B[Je].file.status=$e,M.onChange(B),he(ze==null?void 0:ze.data)}).catch(function(ze){B[B.findIndex(function(Ze){return Ze.name===ae})].status="error",B[B.findIndex(function(Ze){return Ze.name===ae})].file.status="error",_.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),K(Object(D.a)(B)),M.onChange(B),de(ze),console.log("err:",ze)})}catch(ze){}}));case 19:case"end":return Y.stop()}},ye)}));return function(ie,Se){return pe.apply(this,arguments)}}();return Object(y.useEffect)(function(){B.every(function(pe){return pe==="done"||pe==="error"})&&M.onComplete(B)},[B]),Object(y.useEffect)(function(){if(j){var pe;(pe=W)===null||pe===void 0||pe.cancel()}},[j]),Object(y.useEffect)(function(){M.uploading&&B.map(function(){var pe=Object(v.a)(h.a.mark(function ye(ie){var Se,ge;return h.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(!((!ie.status||ie.status==="error")&&!j)){le.next=6;break}return ie.status="uploading",ie.file.status="uploading",le.next=5,q(ie,{login:I==null||((Se=I.userInfo)===null||Se===void 0)?void 0:Se.login,container_type:M.container_type,container_id:M.container_id,description:M.description,realFileName:M.realFileName});case 5:ge=le.sent;case 6:case"end":return le.stop()}},ye)}));return function(ye){return pe.apply(this,arguments)}}())},[M.uploading]),g.a.createElement(E,Object(P.a)({},ee,{height:M.height,className:M.className}),g.a.createElement("p",{className:"ant-upload-hint"},M.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};$.b=Object(l.a)(function(b){var C=b.loading,I=b.globalSetting,j=b.user;return{globalSetting:I,loading:C.models.competitions,user:j}})(x)},KmYQ:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(c,_){var D=_*4;c.clamp(),c.sigBytes+=D-(c.sigBytes%D||D)},unpad:function(c){for(var _=c.words,D=c.sigBytes-1,D=c.sigBytes-1;D>=0;D--)if(_[D>>>2]>>>24-D%4*8&255){c.sigBytes=D+1;break}}},P.pad.ZeroPadding})},L9qf:function(N,$,k){N.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(N,$,k){"use strict";k.d($,"b",function(){return u}),k.d($,"a",function(){return E});var P=k("1OyB"),c=k("vuIU"),_=k("Ji7U"),D=k("LK+K"),p=k("cDcd"),s=k("rePB"),S=k("Ff2n"),v=k("ODXe"),o=k("4IlW"),i=k("bX4T"),r=k("YrtM"),h=k("TSYQ"),y=k.n(h),g=k("+nKL"),w=k("8OUc"),m=function(W,Q){var ee=W.prefixCls,q=W.id,pe=W.flattenOptions,ye=W.childrenAsData,ie=W.values,Se=W.searchValue,ge=W.multiple,oe=W.defaultActiveFirstOption,le=W.height,te=W.itemHeight,be=W.notFoundContent,Z=W.open,ae=W.menuItemSelectedIcon,Ee=W.virtual,ne=W.onSelect,J=W.onToggleOpen,X=W.onActiveValue,Y=W.onScroll,he=W.onMouseEnter,de="".concat(ee,"-item"),Te=Object(r.a)(function(){return pe},[Z,pe],function(Ve,Pe){return Pe[0]&&Ve[1]!==Pe[1]}),ze=p.useRef(null),Ze=function(Pe){Pe.preventDefault()},Je=function(Pe){ze.current&&ze.current.scrollTo({index:Pe})},$e=function(Pe){for(var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ae=Te.length,ce=0;ce<Ae;ce+=1){var xe=(Pe+ce*we+Ae)%Ae,_e=Te[xe],Le=_e.group,Re=_e.data;if(!Le&&!Re.disabled)return xe}return-1},tt=p.useState(function(){return $e(0)}),nt=Object(v.a)(tt,2),Me=nt[0],Ce=nt[1],Xe=function(Pe){Ce(Pe);var we=Te[Pe];if(!we){X(null,-1);return}X(we.data.value,Pe)};p.useEffect(function(){Xe(oe!==!1?$e(0):-1)},[Te.length,Se]),p.useEffect(function(){var Ve=setTimeout(function(){if(!ge&&Z&&ie.size===1){var Pe=Array.from(ie)[0],we=Te.findIndex(function(Ae){var ce=Ae.data;return ce.value===Pe});Xe(we),Je(we)}});return function(){return clearTimeout(Ve)}},[Z]);var et=function(Pe){Pe!==void 0&&ne(Pe,{selected:!ie.has(Pe)}),ge||J(!1)};if(p.useImperativeHandle(Q,function(){return{onKeyDown:function(Pe){var we=Pe.which;switch(we){case o.a.UP:case o.a.DOWN:{var Ae=0;if(we===o.a.UP?Ae=-1:we===o.a.DOWN&&(Ae=1),Ae!==0){var ce=$e(Me+Ae,Ae);Je(ce),Xe(ce)}break}case o.a.ENTER:{var xe=Te[Me];xe&&!xe.data.disabled?et(xe.data.value):et(void 0),Z&&Pe.preventDefault();break}case o.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(Pe){Je(Pe)}}}),Te.length===0)return p.createElement("div",{role:"listbox",id:"".concat(q,"_list"),className:"".concat(de,"-empty"),onMouseDown:Ze},be);function Ue(Ve){var Pe=Te[Ve];if(!Pe)return null;var we=Pe.data||{},Ae=we.value,ce=we.label,xe=we.children,_e=Object(i.a)(we,!0),Le=ye?xe:ce;return Pe?p.createElement("div",Object.assign({"aria-label":typeof Le=="string"?Le:null},_e,{key:Ve,role:"option",id:"".concat(q,"_list_").concat(Ve),"aria-selected":ie.has(Ae)}),Ae):null}return p.createElement(p.Fragment,null,p.createElement("div",{role:"listbox",id:"".concat(q,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ue(Me-1),Ue(Me),Ue(Me+1)),p.createElement(g.a,{itemKey:"key",ref:ze,data:Te,height:le,itemHeight:te,fullHeight:!1,onMouseDown:Ze,onScroll:Y,virtual:Ee,onMouseEnter:he},function(Ve,Pe){var we,Ae=Ve.group,ce=Ve.groupOption,xe=Ve.data,_e=xe.label,Le=xe.key;if(Ae)return p.createElement("div",{className:y()(de,"".concat(de,"-group"))},_e!==void 0?_e:Le);var Re=xe.disabled,Ge=xe.value,Ye=xe.title,at=xe.children,it=xe.style,ot=xe.className,yt=Object(S.a)(xe,["disabled","value","title","children","style","className"]),wt=ie.has(Ge),ft="".concat(de,"-option"),jt=y()(de,ft,ot,(we={},Object(s.a)(we,"".concat(ft,"-grouped"),ce),Object(s.a)(we,"".concat(ft,"-active"),Me===Pe&&!Re),Object(s.a)(we,"".concat(ft,"-disabled"),Re),Object(s.a)(we,"".concat(ft,"-selected"),wt),we)),kt=ye?at:_e,Rt=!ae||typeof ae=="function"||wt;return p.createElement("div",Object.assign({},yt,{"aria-selected":wt,className:jt,title:Ye,onMouseMove:function(){if(Me===Pe||Re)return;Xe(Pe)},onClick:function(){Re||et(Ge)},style:it}),p.createElement("div",{className:"".concat(ft,"-content")},kt||Ge),p.isValidElement(ae)||wt,Rt&&p.createElement(w.a,{className:"".concat(de,"-option-state"),customizeIcon:ae,customizeIconProps:{isSelected:wt}},wt?"\u2713":null))}))},d=p.forwardRef(m);d.displayName="OptionList";var n=d,l=function(){return null};l.isSelectOption=!0;var u=l,T=function(){return null};T.isSelectOptGroup=!0;var E=T,a=k("VTBJ"),L=k("Zm9Q");function O(H){var W=H.key,Q=H.props,ee=Q.children,q=Q.value,pe=Object(S.a)(Q,["children","value"]);return Object(a.a)({key:W,value:q!==void 0?q:W,children:ee},pe)}function f(H){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(H).map(function(Q,ee){if(!p.isValidElement(Q)||!Q.type)return null;var q=Q.type.isSelectOptGroup,pe=Q.key,ye=Q.props,ie=ye.children,Se=Object(S.a)(ye,["children"]);return W||!q?O(Q):Object(a.a)(Object(a.a)({key:"__RC_SELECT_GRP__".concat(pe===null?ee:pe,"__"),label:pe},Se),{},{options:f(ie)})}).filter(function(Q){return Q})}var x=k("2Qr1"),b=k("qNPg"),C=k("U8pU"),I=k("Kwbf"),j=k("WKfj");function M(H){var W=H.mode,Q=H.options,ee=H.children,q=H.backfill,pe=H.allowClear,ye=H.placeholder,ie=H.getInputElement,Se=H.showSearch,ge=H.onSearch,oe=H.defaultOpen,le=H.autoFocus,te=H.labelInValue,be=H.value,Z=H.inputValue,ae=H.optionLabelProp,Ee=W==="multiple"||W==="tags",ne=Se!==void 0?Se:Ee||W==="combobox",J=Q||f(ee);if(Object(I.a)(W!=="tags"||J.every(function(de){return!de.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var X=J.some(function(de){return de.options?de.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in de?de.value:de.key)=="number"});Object(I.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(I.a)(W!=="combobox"||!ae,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(I.a)(W==="combobox"||!q,"`backfill` only works with `combobox` mode."),Object(I.a)(W==="combobox"||!ie,"`getInputElement` only work with `combobox` mode."),Object(I.b)(W!=="combobox"||!ie||!pe||!ye,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!ne&&W!=="combobox"&&W!=="tags"&&Object(I.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(I.b)(!oe||le,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Y=Object(j.d)(be);Object(I.a)(!te||Y.every(function(de){return Object(C.a)(de)==="object"&&("key"in de||"value"in de)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(I.a)(!Ee||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var he=null;Object(L.a)(ee).some(function(de){if(!p.isValidElement(de)||!de.type)return!1;var Te=de.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var ze=Object(L.a)(de.props.children).every(function(Ze){return!p.isValidElement(Ze)||!de.type||Ze.type.isSelectOption?!0:(he=Ze.type,!1)});return!ze}return he=Te,!0}),he&&Object(I.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(he.displayName||he.name||he,"`.")),Object(I.a)(Z===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=M,G=Object(b.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:f,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:z,fillOptionsWithMissingValue:x.a}),B=function(H){Object(_.a)(Q,H);var W=Object(D.a)(Q);function Q(){var ee;return Object(P.a)(this,Q),ee=W.apply(this,arguments),ee.selectRef=p.createRef(),ee.focus=function(){ee.selectRef.current.focus()},ee.blur=function(){ee.selectRef.current.blur()},ee}return Object(c.a)(Q,[{key:"render",value:function(){return p.createElement(G,Object.assign({ref:this.selectRef},this.props))}}]),Q}(p.Component);B.Option=u,B.OptGroup=E;var K=B,F=$.c=K},M8RZ:function(N,$,k){"use strict";k.d($,"a",function(){return o});var P=k("fWQN"),c=k("mtLc"),_=k("yKVA"),D=k("879j"),p=k("cDcd"),s=k.n(p),S=k("faye"),v=k.n(S),o=function(i){Object(_.a)(h,i);var r=Object(D.a)(h);function h(y){var g;Object(P.a)(this,h),g=r.call(this,y);var w=window.document;return g.node=w.createElement("div"),w.body.appendChild(g.node),g}return Object(c.a)(h,[{key:"render",value:function(){var g=this.props.children;return Object(S.createPortal)(g,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),h}(s.a.Component)},MFOe:function(N,$,k){(function(P){var c=s(),_=S(),D=v(),p=typeof window!="undefined"?window:P;N.exports={assign:c,create:_,trim:D,bind:o,slice:i,each:r,map:h,pluck:y,isList:g,isFunction:w,isObject:m,Global:p};function s(){return Object.assign?Object.assign:function(n,l,u,T){for(var E=1;E<arguments.length;E++)r(Object(arguments[E]),function(a,L){n[L]=a});return n}}function S(){if(Object.create)return function(l,u,T,E){var a=i(arguments,1);return c.apply(this,[Object.create(l)].concat(a))};{function d(){}return function(l,u,T,E){var a=i(arguments,1);return d.prototype=l,c.apply(this,[new d].concat(a))}}}function v(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function o(d,n){return function(){return n.apply(d,Array.prototype.slice.call(arguments,0))}}function i(d,n){return Array.prototype.slice.call(d,n||0)}function r(d,n){y(d,function(l,u){return n(l,u),!1})}function h(d,n){var l=g(d)?[]:{};return y(d,function(u,T){return l[T]=n(u,T),!1}),l}function y(d,n){if(g(d)){for(var l=0;l<d.length;l++)if(n(d[l],l))return d[l]}else for(var u in d)if(d.hasOwnProperty(u)&&n(d[u],u))return d[u]}function g(d){return d!=null&&typeof d!="function"&&typeof d.length=="number"}function w(d){return d&&{}.toString.call(d)==="[object Function]"}function m(d){return d&&{}.toString.call(d)==="[object Object]"}}).call(this,k("IyRk"))},MlIO:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(c){var _=P,D=_.lib,p=D.Base,s=D.WordArray,S=_.x64={},v=S.Word=p.extend({init:function(i,r){this.high=i,this.low=r}}),o=S.WordArray=p.extend({init:function(i,r){i=this.words=i||[],r!=c?this.sigBytes=r:this.sigBytes=i.length*8},toX32:function(){for(var i=this.words,r=i.length,h=[],y=0;y<r;y++){var g=i[y];h.push(g.high),h.push(g.low)}return s.create(h,this.sigBytes)},clone:function(){for(var i=p.clone.call(this),r=i.words=this.words.slice(0),h=r.length,y=0;y<h;y++)r[y]=r[y].clone();return i}})}(),P})},NFKh:function(N,$,k){(function(P,c,_){N.exports=$=c(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(P){return P})},NvD2:function(N,$,k){"use strict";k.d($,"a",function(){return s});var P=k("Kwbf");function c(S,v){var o=new Set;return S.forEach(function(i){v.has(i)||o.add(i)}),o}function _(S){var v=S||{},o=v.disabled,i=v.disableCheckbox,r=v.checkable;return!!(o||i)||r===!1}function D(S,v,o,i){for(var r=new Set(S),h=new Set,y=0;y<=o;y+=1){var g=v.get(y)||new Set;g.forEach(function(n){var l=n.key,u=n.node,T=n.children,E=T===void 0?[]:T;r.has(l)&&!i(u)&&E.filter(function(a){return!i(a.node)}).forEach(function(a){r.add(a.key)})})}for(var w=new Set,m=o;m>=0;m-=1){var d=v.get(m)||new Set;d.forEach(function(n){var l=n.parent,u=n.node;if(i(u)||!n.parent||w.has(n.parent.key))return;if(i(n.parent.node)){w.add(l.key);return}var T=!0,E=!1;(l.children||[]).filter(function(a){return!i(a.node)}).forEach(function(a){var L=a.key,O=r.has(L);T&&!O&&(T=!1),!E&&(O||h.has(L))&&(E=!0)}),T&&r.add(l.key),E&&h.add(l.key),w.add(l.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(c(h,r))}}function p(S,v,o,i,r){for(var h=new Set(S),y=new Set(v),g=0;g<=i;g+=1){var w=o.get(g)||new Set;w.forEach(function(l){var u=l.key,T=l.node,E=l.children,a=E===void 0?[]:E;!h.has(u)&&!y.has(u)&&!r(T)&&a.filter(function(L){return!r(L.node)}).forEach(function(L){h.delete(L.key)})})}y=new Set;for(var m=new Set,d=i;d>=0;d-=1){var n=o.get(d)||new Set;n.forEach(function(l){var u=l.parent,T=l.node;if(r(T)||!l.parent||m.has(l.parent.key))return;if(r(l.parent.node)){m.add(u.key);return}var E=!0,a=!1;(u.children||[]).filter(function(L){return!r(L.node)}).forEach(function(L){var O=L.key,f=h.has(O);E&&!f&&(E=!1),!a&&(f||y.has(O))&&(a=!0)}),E||h.delete(u.key),a&&y.add(u.key),m.add(u.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(c(y,h))}}function s(S,v,o,i){var r=[],h;i?h=i:h=_;var y=new Set(S.filter(function(d){var n=!!o[d];return n||r.push(d),n})),g=new Map,w=0;Object.keys(o).forEach(function(d){var n=o[d],l=n.level,u=g.get(l);u||(u=new Set,g.set(l,u)),u.add(n),w=Math.max(w,l)}),Object(P.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var m;return v===!0?m=D(y,g,w,h):m=p(y,v.halfCheckedKeys,g,w,h),m}},OLod:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("K3mO"))})(this,function(P){P.lib.Cipher||function(c){var _=P,D=_.lib,p=D.Base,s=D.WordArray,S=D.BufferedBlockAlgorithm,v=_.enc,o=v.Utf8,i=v.Base64,r=_.algo,h=r.EvpKDF,y=D.Cipher=S.extend({cfg:p.extend(),createEncryptor:function(b,C){return this.create(this._ENC_XFORM_MODE,b,C)},createDecryptor:function(b,C){return this.create(this._DEC_XFORM_MODE,b,C)},init:function(b,C,I){this.cfg=this.cfg.extend(I),this._xformMode=b,this._key=C,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(b){return this._append(b),this._process()},finalize:function(b){b&&this._append(b);var C=this._doFinalize();return C},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function b(C){return typeof C=="string"?x:L}return function(C){return{encrypt:function(I,j,M){return b(j).encrypt(C,I,j,M)},decrypt:function(I,j,M){return b(j).decrypt(C,I,j,M)}}}}()}),g=D.StreamCipher=y.extend({_doFinalize:function(){var b=this._process(!0);return b},blockSize:1}),w=_.mode={},m=D.BlockCipherMode=p.extend({createEncryptor:function(b,C){return this.Encryptor.create(b,C)},createDecryptor:function(b,C){return this.Decryptor.create(b,C)},init:function(b,C){this._cipher=b,this._iv=C}}),d=w.CBC=function(){var b=m.extend();b.Encryptor=b.extend({processBlock:function(I,j){var M=this._cipher,z=M.blockSize;C.call(this,I,j,z),M.encryptBlock(I,j),this._prevBlock=I.slice(j,j+z)}}),b.Decryptor=b.extend({processBlock:function(I,j){var M=this._cipher,z=M.blockSize,G=I.slice(j,j+z);M.decryptBlock(I,j),C.call(this,I,j,z),this._prevBlock=G}});function C(I,j,M){var z,G=this._iv;G?(z=G,this._iv=c):z=this._prevBlock;for(var B=0;B<M;B++)I[j+B]^=z[B]}return b}(),n=_.pad={},l=n.Pkcs7={pad:function(b,C){for(var I=C*4,j=I-b.sigBytes%I,M=j<<24|j<<16|j<<8|j,z=[],G=0;G<j;G+=4)z.push(M);var B=s.create(z,j);b.concat(B)},unpad:function(b){var C=b.words[b.sigBytes-1>>>2]&255;b.sigBytes-=C}},u=D.BlockCipher=y.extend({cfg:y.cfg.extend({mode:d,padding:l}),reset:function(){var b;y.reset.call(this);var C=this.cfg,I=C.iv,j=C.mode;this._xformMode==this._ENC_XFORM_MODE?b=j.createEncryptor:(b=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==b?this._mode.init(this,I&&I.words):(this._mode=b.call(j,this,I&&I.words),this._mode.__creator=b)},_doProcessBlock:function(b,C){this._mode.processBlock(b,C)},_doFinalize:function(){var b,C=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(C.pad(this._data,this.blockSize),b=this._process(!0)):(b=this._process(!0),C.unpad(b)),b},blockSize:128/32}),T=D.CipherParams=p.extend({init:function(b){this.mixIn(b)},toString:function(b){return(b||this.formatter).stringify(this)}}),E=_.format={},a=E.OpenSSL={stringify:function(b){var C,I=b.ciphertext,j=b.salt;return j?C=s.create([1398893684,1701076831]).concat(j).concat(I):C=I,C.toString(i)},parse:function(b){var C,I=i.parse(b),j=I.words;return j[0]==1398893684&&j[1]==1701076831&&(C=s.create(j.slice(2,4)),j.splice(0,4),I.sigBytes-=16),T.create({ciphertext:I,salt:C})}},L=D.SerializableCipher=p.extend({cfg:p.extend({format:a}),encrypt:function(b,C,I,j){j=this.cfg.extend(j);var M=b.createEncryptor(I,j),z=M.finalize(C),G=M.cfg;return T.create({ciphertext:z,key:I,iv:G.iv,algorithm:b,mode:G.mode,padding:G.padding,blockSize:b.blockSize,formatter:j.format})},decrypt:function(b,C,I,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var M=b.createDecryptor(I,j).finalize(C.ciphertext);return M},_parse:function(b,C){return typeof b=="string"?C.parse(b,this):b}}),O=_.kdf={},f=O.OpenSSL={execute:function(b,C,I,j){j||(j=s.random(64/8));var M=h.create({keySize:C+I}).compute(b,j),z=s.create(M.words.slice(C),I*4);return M.sigBytes=C*4,T.create({key:M,iv:z,salt:j})}},x=D.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:f}),encrypt:function(b,C,I,j){j=this.cfg.extend(j);var M=j.kdf.execute(I,b.keySize,b.ivSize);j.iv=M.iv;var z=L.encrypt.call(this,b,C,M.key,j);return z.mixIn(M),z},decrypt:function(b,C,I,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var M=j.kdf.execute(I,b.keySize,b.ivSize,C.salt);j.iv=M.iv;var z=L.decrypt.call(this,b,C,M.key,j);return z}})}()})},OZM5:function(N,$,k){"use strict";k.d($,"b",function(){return i}),k.d($,"a",function(){return r}),k.d($,"k",function(){return h}),k.d($,"h",function(){return y}),k.d($,"i",function(){return g}),k.d($,"g",function(){return w}),k.d($,"c",function(){return m}),k.d($,"d",function(){return d}),k.d($,"j",function(){return u}),k.d($,"e",function(){return T}),k.d($,"f",function(){return E});var P=k("KQm4"),c=k("U8pU"),_=k("Ff2n"),D=k("cDcd"),p=k.n(D),s=k("Kwbf"),S=k("WaYH"),v=.25,o=2;function i(a,L){var O=a.slice(),f=O.indexOf(L);return f>=0&&O.splice(f,1),O}function r(a,L){var O=a.slice();return O.indexOf(L)===-1&&O.push(L),O}function h(a){return a.split("-")}function y(a,L){return"".concat(a,"-").concat(L)}function g(a){return a&&a.type&&a.type.isTreeNode}function w(a,L){var O=[a],f=L[a];function x(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];b.forEach(function(C){var I=C.key,j=C.children;O.push(I),x(j)})}return x(f.children),O}function m(a,L){var O=a.clientY,f=L.selectHandle.getBoundingClientRect(),x=f.top,b=f.bottom,C=f.height,I=Math.max(C*v,o);return O<=x+I?-1:O>=b-I?1:0}function d(a,L){if(!a)return;var O=L.multiple;return O?a.slice():a.length?[a[0]]:a}var n=function(L){return L};function l(a,L){if(!a)return[];var O=L||{},f=O.processProps,x=f===void 0?n:f,b=Array.isArray(a)?a:[a];return b.map(function(C){var I=C.children,j=Object(_.a)(C,["children"]),M=l(I,L);return p.a.createElement(S.a,Object.assign({},x(j)),M)})}function u(a){if(!a)return null;var L;if(Array.isArray(a))L={checkedKeys:a,halfCheckedKeys:void 0};else if(Object(c.a)(a)==="object")L={checkedKeys:a.checked||void 0,halfCheckedKeys:a.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function T(a,L){var O=new Set;function f(x){if(O.has(x))return;var b=L[x];if(!b)return;O.add(x);var C=b.parent,I=b.node;if(I.disabled)return;C&&f(C.key)}return(a||[]).forEach(function(x){f(x)}),Object(P.a)(O)}function E(a){var L={};return Object.keys(a).forEach(function(O){(O.startsWith("data-")||O.startsWith("aria-"))&&(L[O]=a[O])}),L}},Ot1p:function(N,$,k){"use strict";var P=k("2qtc"),c=k("kLXV"),_=k("rAM+"),D=k("miYZ"),p=k("tsqr"),s=k("9og8"),S=k("tJVT"),v=k("jrin"),o=k("WmNS"),i=k.n(o),r=k("cDcd"),h=k.n(r),y=k("VrN/"),g=k.n(y),w=k("bdgK"),m=k("p77/"),d=k("Bd2K"),n=k("ELLl"),l=k("19Vz"),u=k("lZu9"),T=k("+NIl"),E=k("kSUc"),a=k("9Bee"),L=function(Re){var Ge=Re.value,Ye=Ge===void 0?"":Ge,at=Re.className,it=Re.showTextOnly,ot=Re.showLines,yt=Re.style,wt=yt===void 0?{}:yt,ft=Object(r.useMemo)(function(){return""},[Ye]);return h.a.createElement(h.a.Fragment,null,h.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},O=k("0Owb"),f=k("dejd"),x=k("C+DQ"),b=k("1vsH"),C=k("m3rI"),I=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function j(Re){var Ge=Re.onActionCallback,Ye=Re.title,at=Re.icon,it=Re.actionName,ot=Re.className,yt=ot===void 0?"":ot,wt=Re.children;function ft(){Ge(it)}return h.a.createElement("a",{title:Ye,className:yt,onClick:ft},h.a.createElement("i",{className:"md-iconfont ".concat(at)}),wt)}var M=function(Re){var Ge=Re.watch,Ye=Re.showNullButton,at=Re.onActionCallback,it=Re.fullScreen,ot=Re.insertTemp,yt=Re.hidetoolBar,wt=Re.uuid,ft=Re.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(b.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(b.G)("_educoder_session"),"&key=").concat(wt,"&api=").concat(encodeURIComponent(C.a.PROXY_SERVER)));var jt=[].concat(I,[{title:"".concat(Ge?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ge?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return h.a.createElement("ul",{className:"markdown-toolbar-container"},!yt&&jt.map(function(kt,Rt){return h.a.createElement("li",{key:Rt},kt.actionName?h.a.createElement(j,Object(O.a)({},kt,{onActionCallback:at})):h.a.createElement("span",{className:"v-line"}))}),Ye?h.a.createElement("li",null,h.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:at},h.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ot&&h.a.createElement("li",null,h.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ot),onActionCallback:at},h.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),h.a.createElement("li",{className:"btn-full-screen"},h.a.createElement(j,{icon:"".concat(it?"icon-shrink":"icon-enlarge"),title:it?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:at})))},z=k("M8RZ"),G=k("+L6B"),B=k("2/Rp"),K=k("y8nQ"),F=k("Vl3Y"),H=k("5NDa"),W=k("5rEg"),Q={labelCol:{span:4},wrapperCol:{span:20}},ee=function(Re){var Ge=Re.callback,Ye=Re.onCancel;function at(it){Ge(it)}return h.a.createElement(F.a,Object(O.a)({},Q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:at}),h.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},h.a.createElement(W.a,null)),h.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},h.a.createElement(W.a,null)),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))},q=k("7ahc"),pe=k("HmJG"),ye=k("BjJ7"),ie=F.a.useForm,Se={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}},oe=function(Re){var Ge=Re.callback,Ye=Re.onCancel,at=ie(),it=Object(S.a)(at,1),ot=it[0];function yt(jt){Ge(jt)}function wt(jt,kt){if(jt.status===-1){p.b.error(jt.message);return}ot.setFieldsValue({src:"/api/attachments/".concat(jt.id),type:kt.type})}function ft(jt){var kt=jt.target.files[0];te(kt,wt)}return h.a.createElement(F.a,Object(O.a)({form:ot},ge,{className:"upload-image-panel",onFinish:yt}),h.a.createElement(F.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},h.a.createElement("div",{className:"flex-container"},h.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},h.a.createElement(W.a,{style:Se})),h.a.createElement(le,{onFileChange:ft}))),h.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},h.a.createElement(W.a,{style:{width:264}})),h.a.createElement(F.a.Item,{style:{textAlign:"right"}},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))};function le(Re){var Ge=Re.onFileChange;return h.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",h.a.createElement("input",{type:"file",onChange:Ge}))}function te(Re,Ge){if(!Re)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ye=new FormData;Ye.append("editormd-image-file",Re),Ye.append("file_param_name","editormd-image-file"),Ye.append("byxhr","true");var at=new window.XMLHttpRequest;at.withCredentials=!0,at.addEventListener("load",function(it){Ge(JSON.parse(it.target.responseText),Re)},!1),at.addEventListener("error",function(it){console.error(it)},!1),at.open("POST","".concat(ye.a,"/api/attachments.json")),at.send(Ye)}var be=k("giR+"),Z=k("fyUT"),ae=k("7Kak"),Ee=k("9yH6"),ne=Ee.a.Group,J={margin:"0 8px"},X=function(Re){var Ge=Re.callback,Ye=Re.onCancel;function at(it){Ge(it)}return h.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:at},h.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},h.a.createElement("span",{style:J},"\u5355\u5143\u683C\u6570\uFF1A"),h.a.createElement("span",{style:J},"\u884C\u6570"),h.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},h.a.createElement(Z.a,null)),h.a.createElement("span",{style:J},"\u5217\u6570"),h.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},h.a.createElement(Z.a,null))),h.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},h.a.createElement("span",{style:J},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),h.a.createElement(F.a.Item,{name:"align"},h.a.createElement(ne,null,h.a.createElement(Ee.a,{value:"default"},h.a.createElement("i",{className:"fa fa-align-justify"})),h.a.createElement(Ee.a,{value:"left"},h.a.createElement("i",{className:"fa fa-align-left"})),h.a.createElement(Ee.a,{value:"center"},h.a.createElement("i",{className:"fa fa-align-center"})),h.a.createElement(Ee.a,{value:"right"},h.a.createElement("i",{className:"fa fa-align-right"}))))),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(B.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(B.a,{type:"ghost",onClick:Ye},"\u53D6\u6D88")))},Y=k("ErOA"),he=k("7Cbv"),de="link",Te="upload-image",ze="code-block",Ze="add-table",Je="------------",$e={default:Je,left:":".concat(Je),center:":".concat(Je,":"),right:"".concat(Je,":")},tt=k("9VGf"),nt,Me;function Ce(){}var Xe=0,et=1e4,Ue="\u2581",Ve=`
|
|
|
**\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 Pe(Re){return/^\d+$/.test(Re)?"".concat(Re,"px"):Re}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ae=we?"Cmd":"Ctrl",ce=["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"],xe=(nt={},Object(v.a)(nt,Ae+"-B","bold"),Object(v.a)(nt,Ae+"-I","italic"),nt),_e=(Me={},Object(v.a)(Me,de,"\u6DFB\u52A0\u94FE\u63A5"),Object(v.a)(Me,ze,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(v.a)(Me,Te,"\u6DFB\u52A0\u6587\u4EF6"),Object(v.a)(Me,Ze,"\u6DFB\u52A0\u8868\u683C"),Me),Le=$.a=function(Re){var Ge=Re.defaultValue,Ye=Ge===void 0?"":Ge,at=Re.onChange,it=Re.width,ot=it===void 0?"100%":it,yt=Re.height,wt=yt===void 0?400:yt,ft=Re.miniToolbar,jt=ft===void 0?!1:ft,kt=Re.isFocus,Rt=kt===void 0?!1:kt,Vt=Re.watch,Tt=Re.insertTemp,dr=Re.mode,tr=dr===void 0?"markdown":dr,Wt=Re.id,Bt=Wt===void 0?"markdown-editor-id":Wt,Nr=Re.showResizeBar,dn=Nr===void 0?!1:Nr,Er=Re.noStorage,qn=Er===void 0?!1:Er,vt=Re.showNullButton,Ct=vt===void 0?!1:vt,mt=Re.hidetoolBar,mr=mt===void 0?!1:mt,wr=Re.fullScreen,It=wr===void 0?!1:wr,_t=Re.onBlur,vr=Re.onCMBeforeChange,un=Re.onFullScreen,jr=Re.className,ct=jr===void 0?"":jr,Dt=Re.disablePaste,Yr=Dt===void 0?!1:Dt,nn=Re.placeholder,An=nn===void 0?"":nn,fn=Re.values,Hr=fn===void 0?"":fn,Ot=Object(r.useState)(null),cn=Object(S.a)(Ot,2),ut=cn[0],Lr=cn[1],fr=Object(r.useState)(Ye),ea=Object(S.a)(fr,2),Sn=ea[0],bn=ea[1],da=Object(r.useState)(Vt),ta=Object(S.a)(da,2),an=ta[0],Fr=ta[1],fa=Object(r.useState)(It),hn=Object(S.a)(fa,2),Br=hn[0],ar=hn[1],en=Object(r.useState)(""),$t=Object(S.a)(en,2),Ft=$t[0],Jt=$t[1],Tr=Object(r.useState)(0),kr=Object(S.a)(Tr,2),Kr=kr[0],xn=kr[1],li=Object(r.useState)(wt),Ya=Object(S.a)(li,2),$a=Ya[0],_a=Ya[1],pn=Object(r.useState)(!1),Ka=Object(S.a)(pn,2),$r=Ka[0],ra=Ka[1],Pn=Object(r.useRef)(Object(he.a)()),on=Object(r.useRef)(!1),Cn=Object(r.useRef)(),ha=Object(r.useRef)(),Hn=Object(r.useRef)(),Kn=Object(r.useRef)(),Ma=Object(r.useRef)(),Pa=function(){var Lt=Object(s.a)(i.a.mark(function zt(){var Pt,Zt;return i.a.wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,Object(Y.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Pn.current}});case 2:Zt=_r.sent,Zt!=null&&(Pt=Zt.attachments)!==null&&Pt!==void 0&&Pt.length&&(console.log("cm:",ut,ha),Zt.attachments.map(function(sr){sr.content_type.indexOf("image")>-1?ut.replaceSelection(".concat(sr.content_type,")")):sr.content_type.indexOf("video")>-1?ut.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):sr.content_type.indexOf("pdf")>-1?ut.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(sr.id,"?type=").concat(sr.content_type,'&disposition=inline" target="_blank">').concat(sr.name,"</a>")):ut.replaceSelection("[".concat(sr.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(sr.id,"?type=").concat(sr.content_type,")"))}));case 4:case"end":return _r.stop()}},zt)}));return function(){return Lt.apply(this,arguments)}}();Object(r.useEffect)(function(){bn(Hr),ut==null||ut.setValue(Hr)},[Hr]),Object(r.useEffect)(function(){un==null||un(Br)},[Br]),Object(r.useEffect)(function(){if(ha.current){var Lt=g.a.fromTextArea(ha.current,{mode:tr,lineNumbers:!jt,lineWrapping:!0,value:Ye,autoCloseTags:!0,autoCloseBrackets:!0});Rt&&Lt.focus();function zt(Pt,Zt){if(Yr){Zt.preventDefault();return}var hr=Zt.clipboardData;if(hr){var _r=hr.types.toString(),sr=hr.items;if(_r==="Files"||hr.types.indexOf("Files")>-1){if(Zt.preventDefault(),tr=="stex")return;try{var Jr,Un=sr[1];((Jr=sr[0])===null||Jr===void 0?void 0:Jr.kind)==="file"&&(Un=sr[0]);var nr=Un.getAsFile(),ga=nr.name.split(".").pop();te(nr,function(Or){if(Or.id){var _n,Rn,la;(nr==null||((_n=nr.type)===null||_n===void 0)?void 0:_n.indexOf("image"))>-1?Lt.replaceSelection(".concat(Or.content_type,")")):(nr==null||((Rn=nr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Lt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,'"></video>')):(nr==null||((la=nr.type)===null||la===void 0)?void 0:la.indexOf("pdf"))>-1?Lt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,"?type=").concat(nr.type,'&disposition=inline" target="_blank">').concat(nr.name,"</a>")):ce.includes(ga)?Lt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,'?type=office&disposition=inline" target="_blank">').concat(nr.name,"</a>")):Lt.replaceSelection("[".concat(nr.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,"?type=").concat(Or.content_type,")"))}else(Or==null?void 0:Or.status)===401&&(document.location.href="/user/login")})}catch(Or){p.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Lt.on("paste",zt),Lt.on("dragleave",function(Pt,Zt){Hn.current.classList.remove("mouse-hover-md")}),Lt.on("dragover",function(Pt,Zt){Hn.current.classList.add("mouse-hover-md")}),Lt.on("drop",function(Pt,Zt){Hn.current.classList.add("mouse-hover-md");var hr;if(hr=Zt.dataTransfer.files,hr.length>0){Zt.preventDefault(),Zt.stopPropagation();for(var _r=function(Un){var nr=hr[Un],ga=nr.name.split(".").pop();te(nr,function(Or){if(Or.id){var _n,Rn,la;(nr==null||((_n=nr.type)===null||_n===void 0)?void 0:_n.indexOf("image"))>-1?Lt.replaceSelection(".concat(Or.content_type,")")):(nr==null||((Rn=nr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Lt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,'"></video>')):(nr==null||((la=nr.type)===null||la===void 0)?void 0:la.indexOf("pdf"))>-1?Lt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,"?type=").concat(nr.type,'&disposition=inline" target="_blank">').concat(nr.name,"</a>")):ce.includes(ga)?Lt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,'?type=office&disposition=inline" target="_blank">').concat(nr.name,"</a>")):Lt.replaceSelection("[".concat(nr.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(Or.id,"?type=").concat(Or.content_type,")"))}else(Or==null?void 0:Or.status)===401&&(document.location.href="/user/login")})},sr=0;sr<hr.length;sr++)_r(sr)}}),Lr(Lt),function(){Lt.off("paste",zt)}}},[]);var zn=Object(r.useCallback)(function(){if(Hn.current)try{}catch(Lt){console.log(Lt,"---- to set md editor body height")}},[$a,Hn,Br]);Object(r.useEffect)(function(){function Lt(){var Pt=new w.default(function(Zt){var hr=Object(_.a)(Zt),_r;try{for(hr.s();!(_r=hr.n()).done;){var sr=_r.value;(sr.target.offsetHeight>0||sr.target.offsetWidth>0)&&(zn(),ut.setSize("100%","100%"),ut.refresh())}}catch(Jr){hr.e(Jr)}finally{hr.f()}});return Pt.observe(ha.current.parentElement),Pt}if(ut){var zt=Lt();return function(){zt.unobserve(ha.current.parentElement)}}},[ut,zn]),Object(r.useEffect)(function(){if(ut){for(var Lt=[],zt=function(){var sr=Zt[Pt];hr=Object(S.a)(sr,2);var Jr=hr[0],Un=hr[1],nr=Object(v.a)({},Jr,function(){Na(Un)});Lt.push(nr),ut.addKeyMap(nr)},Pt=0,Zt=Object.entries(xe);Pt<Zt.length;Pt++){var hr;zt()}return Cn.current=setInterval(function(){on.current&&Pa()},4e3),function(){clearInterval(Cn.current);var _r=Object(_.a)(Lt),sr;try{for(_r.s();!(sr=_r.n()).done;){var Jr=sr.value;ut.removeKeyMap(Jr)}}catch(Un){_r.e(Un)}finally{_r.f()}}}},[ut]),Object(r.useEffect)(function(){It!==Br&&ar(It)},[It]),Object(tt.a)(function(){if(!qn&&Kr>0){var Lt=new Date().getTime(),zt=window.sessionStorage.getItem(Bt);Lt>=Kr+et&&(!zt||zt!==Sn)&&(window.sessionStorage.setItem(Bt,Sn),ra(!0))}},et),Object(r.useEffect)(function(){Fr(Vt)},[ut,Vt]),Object(r.useEffect)(function(){ut&&(Rt&&ut.focus())},[ut,Rt]),Object(r.useEffect)(function(){if(an&&ut){var Lt=ut.getScrollerElement();function zt(Pt){var Zt=Pt.target;if(Ma.current){var hr=Zt.scrollTop/Zt.scrollHeight;Ma.current.scrollTop=Ma.current.scrollHeight*hr}}return Lt.addEventListener("scroll",zt),function(){Lt.removeEventListener("scroll",zt)}}},[ut,an]),Object(r.useEffect)(function(){if(ut&&vr){function Lt(zt,Pt){vr(zt,Pt)}return ut.on("beforeChange",Lt),function(){ut.off("beforeChange",Lt)}}},[ut,vr]),Object(r.useEffect)(function(){if(ut&&_t){function Lt(){_t(ut.getValue())}return ut.on("blur",Lt),function(){ut.off("blur",Lt)}}},[ut,_t]),Object(r.useEffect)(function(){if(ut){function Lt(zt){var Pt=zt.getValue();bn(Pt),xn(new Date().getTime()),zt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),at&&at(Pt)}return ut.on("change",Lt),function(){ut.off("change",Lt)}}},[ut,at]),Object(r.useEffect)(function(){ut&&(Ye==null?(ut.setValue(""),bn("")):Ye!==ut.getValue()&&(ut.setValue(Ye),bn(Ye),ut.setCursor(ut.lineCount(),0)))},[ut,Ye]);var Na=Object(r.useCallback)(function(Lt){var zt=ut.getCursor(),Pt=ut.getSelection(),Zt=Pt.split(`
|
|
|
`);switch(Lt){case"bold":return ut.replaceSelection("**"+Pt+"**"),Pt===""&&ut.setCursor(zt.line,zt.ch+2),ut.focus();case"italic":return ut.replaceSelection("*"+Pt+"*"),Pt===""&&ut.setCursor(zt.line,zt.ch+1),ut.focus();case"code":return ut.replaceSelection("`"+Pt+"`"),Pt===""&&ut.setCursor(zt.line,zt.ch+1),ut.focus();case"inline-latex":return ut.replaceSelection("`$$"+Pt+"$$`"),Pt===""&&ut.setCursor(zt.line,zt.ch+3),ut.focus();case"latex":return ut.replaceSelection("```latex\n"+Pt+"\n```"),ut.setCursor(zt.line+1,Pt.length+1),ut.focus();case"line-break":return ut.replaceSelection(`<br/>
|
|
|
`),ut.focus();case"list-ul":return Pt===""?ut.replaceSelection("- "+Pt):ut.replaceSelection(Zt.map(function(hr){return hr===""?"":"- ".concat(hr)}).join(`
|
|
|
`)),ut.focus();case"list-ol":return Pt===""?ut.replaceSelection("1. "+Pt):ut.replaceSelection(Zt.map(function(hr,_r){return hr===""?"":"".concat(_r+1,". ").concat(hr)}).join(`
|
|
|
`)),ut.focus();case"add-null-ch":return Pt===""&&ut.setCursor(zt.line,zt.ch+1),ut.replaceSelection(Ue),ut.focus();case"inster-template-1":return Pt===""&&ut.setCursor(zt.line,zt.ch),ut.replaceSelection(Ve),ut.focus();case"eraser":return ut.setValue(""),ut.focus();case"trigger-watch":return Fr(!an),ut.focus();case"trigger-full-screen":return ar(!Br),ut.focus();case de:Jt(de);return;case ze:Jt(ze);return;case Te:Jt(Te);return;case Ze:Jt(Ze);return;default:throw new Error}},[ut,an,Br]),pa=Object(r.useCallback)(function(Lt){Jt("");switch(Ft){case de:var zt=Lt.title,Pt=Lt.link;return ut.replaceSelection("[".concat(zt,"](").concat(Pt,")")),ut.focus();case ze:var Zt=Lt.language,hr=Lt.content;return ut.replaceSelection(["```"+Zt,hr,"```"].join(`
|
|
|
`)),ut.focus();case Te:var _r=Lt.src,sr=Lt.alt;return sr?ut.replaceSelection(".concat(_r,' "').concat(sr,'" )')):ut.replaceSelection("")),ut.focus();case Ze:for(var Jr=Lt.row,Un=Lt.col,nr=Lt.align,ga=`
|
|
|
`,Or=0;Or<Jr;Or++){for(var _n=[],Rn=[],la=0;la<Un;la++)Or===1&&Rn.push($e[nr]),_n.push(" ");Or===1&&(ga+="| ".concat(Rn.join(" | "),` |
|
|
|
`)),ga+="| ".concat(_n.join(Un===1?"":" | "),` |
|
|
|
`)}return ut.replaceSelection(ga+`
|
|
|
`),ut.focus();default:throw new Error}},[ut,Ft]),ma=Object(r.useMemo)(function(){switch(Ft){case de:return h.a.createElement(ee,{callback:pa,onCancel:Gn});case ze:return h.a.createElement(q.b,{callback:pa,onCancel:Gn});case Te:return h.a.createElement(oe,{callback:pa,onCancel:Gn});case Ze:return h.a.createElement(X,{callback:pa,onCancel:Gn});default:return null}},[Ft]);function Gn(){Jt("")}Object(r.useEffect)(function(){if(Kn.current){var Lt=Kn.current,zt=!1,Pt=0;function Zt(sr){zt=!0,Pt=sr.pageY}function hr(){zt=!1}function _r(sr){if(zt){var Jr=sr.pageY-Pt;Jr<0&&(Jr=0),Jr>300&&(Jr=300);var Un=wt+Jr+"px";_a(Un)}}return Lt.addEventListener("mousedown",Zt),document.addEventListener("mousemove",_r),document.addEventListener("mouseup",hr),function(){Lt.removeEventListener("mousedown",Zt),document.removeEventListener("mousemove",_r),document.removeEventListener("mouseup",hr)}}},[ut,Kn]),Object(r.useEffect)(function(){_a(wt)},[wt]);var Xn=Pe(ot),ka=Pe($a),na={width:Xn,height:ka},va=Object(r.useMemo)(function(){if(Kr){var Lt=new Date(Kr),zt=Lt.getHours(),Pt=Lt.getMinutes(),Zt=Lt.getSeconds();return zt=zt<10?"0"+zt:zt,Pt=Pt<10?"0"+Pt:Pt,Zt=Zt<10?"0"+Zt:Zt,"".concat(zt,":").concat(Pt,":").concat(Zt)}return 0},[Kr]);function ja(){window.sessionStorage.removeItem(Bt),ra(!1),xn(0)}function aa(){ra(!1),xn(0),ut.setValue(window.sessionStorage.getItem(Bt))}function Mr(Lt,zt){var Pt=ut.getValue();Pt=Pt.replace(Lt,zt),bn(Pt),ut==null||ut.setValue(Pt)}return h.a.createElement(r.Fragment,null,h.a.createElement("div",{className:"markdown-editor-wrapper",ref:Hn},h.a.createElement("div",{className:"markdown-editor-container ".concat(ct," ").concat(an?"on-preview":""," ").concat(jt?"mini":""," ").concat(Br?"full-screen":""),style:na},h.a.createElement(M,{insertTemp:Tt,watch:an,fullScreen:Br,showNullButton:Ct,onActionCallback:Na,hidetoolBar:mr,uuid:Pn.current,setOpenPhones:function(){on.current=!0}}),h.a.createElement("div",{className:"markdown-editor-body"},h.a.createElement("div",{className:"codemirror-container"},h.a.createElement("textarea",{ref:ha,placeholder:An})),an?h.a.createElement("div",{ref:Ma,className:"preview-container"},tr==="stex"&&h.a.createElement(L,{value:Sn}),tr!=="stex"&&h.a.createElement(a.a,{edit:!0,value:Sn,replaces:Mr})):null))),dn?h.a.createElement("a",{ref:Kn,className:"editor-resize"}):null,h.a.createElement(z.a,null,_e[Ft]?h.a.createElement(c.a,{centered:!0,title:_e[Ft],visible:!0,onCancel:Gn,footer:null,className:"markdown-popup-form"},ma):null))}},PD8m:function(N,$){N.exports={name:"memoryStorage",read:P,write:c,each:_,remove:D,clearAll:p};var k={};function P(s){return k[s]}function c(s,S){k[s]=S}function _(s){for(var S in k)k.hasOwnProperty(S)&&s(k[S],S)}function D(s){delete k[s]}function p(s){k={}}},PVpz:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.StreamCipher,p=c.algo,s=[],S=[],v=[],o=p.RabbitLegacy=D.extend({_doReset:function(){var r=this._key.words,h=this.cfg.iv,y=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],g=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var w=0;w<4;w++)i.call(this);for(var w=0;w<8;w++)g[w]^=y[w+4&7];if(h){var m=h.words,d=m[0],n=m[1],l=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=l>>>16|u&4294901760,E=u<<16|l&65535;g[0]^=l,g[1]^=T,g[2]^=u,g[3]^=E,g[4]^=l,g[5]^=T,g[6]^=u,g[7]^=E;for(var w=0;w<4;w++)i.call(this)}},_doProcessBlock:function(r,h){var y=this._X;i.call(this),s[0]=y[0]^y[5]>>>16^y[3]<<16,s[1]=y[2]^y[7]>>>16^y[5]<<16,s[2]=y[4]^y[1]>>>16^y[7]<<16,s[3]=y[6]^y[3]>>>16^y[1]<<16;for(var g=0;g<4;g++)s[g]=(s[g]<<8|s[g]>>>24)&16711935|(s[g]<<24|s[g]>>>8)&4278255360,r[h+g]^=s[g]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,h=this._C,y=0;y<8;y++)S[y]=h[y];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<S[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<S[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<S[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<S[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<S[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<S[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<S[6]>>>0?1:0)|0,this._b=h[7]>>>0<S[7]>>>0?1:0;for(var y=0;y<8;y++){var g=r[y]+h[y],w=g&65535,m=g>>>16,d=((w*w>>>17)+w*m>>>15)+m*m,n=((g&4294901760)*g|0)+((g&65535)*g|0);v[y]=d^n}r[0]=v[0]+(v[7]<<16|v[7]>>>16)+(v[6]<<16|v[6]>>>16)|0,r[1]=v[1]+(v[0]<<8|v[0]>>>24)+v[7]|0,r[2]=v[2]+(v[1]<<16|v[1]>>>16)+(v[0]<<16|v[0]>>>16)|0,r[3]=v[3]+(v[2]<<8|v[2]>>>24)+v[1]|0,r[4]=v[4]+(v[3]<<16|v[3]>>>16)+(v[2]<<16|v[2]>>>16)|0,r[5]=v[5]+(v[4]<<8|v[4]>>>24)+v[3]|0,r[6]=v[6]+(v[5]<<16|v[5]>>>16)+(v[4]<<16|v[4]>>>16)|0,r[7]=v[7]+(v[6]<<8|v[6]>>>24)+v[5]|0}c.RabbitLegacy=D._createHelper(o)}(),P.RabbitLegacy})},RELg:function(N,$,k){var P=k("MFOe"),c=P.Global;N.exports={name:"oldIE-userDataStorage",write:S,read:v,each:o,remove:i,clearAll:r};var _="storejs",D=c.document,p=g(),s=(c.navigator?c.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(w,m){if(s)return;var d=y(w);p(function(n){n.setAttribute(d,m),n.save(_)})}function v(w){if(s)return;var m=y(w),d=null;return p(function(n){d=n.getAttribute(m)}),d}function o(w){p(function(m){for(var d=m.XMLDocument.documentElement.attributes,n=d.length-1;n>=0;n--){var l=d[n];w(m.getAttribute(l.name),l.name)}})}function i(w){var m=y(w);p(function(d){d.removeAttribute(m),d.save(_)})}function r(){p(function(w){var m=w.XMLDocument.documentElement.attributes;w.load(_);for(var d=m.length-1;d>=0;d--)w.removeAttribute(m[d].name);w.save(_)})}var h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function y(w){return w.replace(/^\d/,"___$&").replace(h,"___")}function g(){if(!D||!D.documentElement||!D.documentElement.addBehavior)return null;var w="script",m,d,n;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+w+">document.w=window</"+w+'><iframe src="/favicon.ico"></iframe>'),d.close(),m=d.w.frames[0].document,n=m.createElement("div")}catch(l){n=D.createElement("div"),m=D.body}return function(l){var u=[].slice.call(arguments,0);u.unshift(n),m.appendChild(n),n.addBehavior("#default#userData"),n.load(_),l.apply(this,u),m.removeChild(n);return}}},S6kV:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.OFB=function(){var c=P.lib.BlockCipherMode.extend(),_=c.Encryptor=c.extend({processBlock:function(D,p){var s=this._cipher,S=s.blockSize,v=this._iv,o=this._keystream;v&&(o=this._keystream=v.slice(0),this._iv=void 0),s.encryptBlock(o,0);for(var i=0;i<S;i++)D[p+i]^=o[i]}});return c.Decryptor=_,c}(),P.mode.OFB})},"SA+Z":function(N,$,k){var P=k("wTVA"),c=k("EbDI"),_=k("ZhPi"),D=k("wkBT");function p(s){return P(s)||c(s)||_(s)||D()}N.exports=p,N.exports.__esModule=!0,N.exports.default=N.exports},SJMd:function(N,$){/**
|
|
|
* @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,P,c,_=!1,D,p;window.PR_SHOULD_USE_CONTINUATION=!0;var s,S;(function(){var v=window,o=["break,continue,do,else,for,if,return,while"],i=[o,"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"],r=[i,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],h=[r,"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"],y=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],g=[r,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],w="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",m=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="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=[o,"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"],l=[o,"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"],u=[o,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[h,g,y,m,d,n,l,u],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,a="str",L="kwd",O="com",f="typ",x="lit",b="pun",C="pln",I="tag",j="dec",M="src",z="atn",G="atv",B="nocode",K="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(ne){for(var J=0,X=!1,Y=!1,he=0,de=ne.length;he<de;++he){var Te=ne[he];if(Te.ignoreCase)Y=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Y=!1;break}}var ze={b:8,t:9,n:10,v:11,f:12,r:13};function Ze(Me){var Ce=Me.charCodeAt(0);if(Ce!==92)return Ce;var Xe=Me.charAt(1);return Ce=ze[Xe],Ce||("0"<=Xe&&Xe<="7"?parseInt(Me.substring(1),8):Xe==="u"||Xe==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function Je(Me){if(Me<32)return(Me<16?"\\x0":"\\x")+Me.toString(16);var Ce=String.fromCharCode(Me);return Ce==="\\"||Ce==="-"||Ce==="]"||Ce==="^"?"\\"+Ce:Ce}function $e(Me){var Ce=Me.substring(1,Me.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")),Xe=[],et=Ce[0]==="^",Ue=["["];et&&Ue.push("^");for(var Ve=et?1:0,Pe=Ce.length;Ve<Pe;++Ve){var we=Ce[Ve];if(/\\[bdsw]/i.test(we))Ue.push(we);else{var Ae=Ze(we),ce;Ve+2<Pe&&Ce[Ve+1]==="-"?(ce=Ze(Ce[Ve+2]),Ve+=2):ce=Ae,Xe.push([Ae,ce]),ce<65||Ae>122||(ce<65||Ae>90||Xe.push([Math.max(65,Ae)|32,Math.min(ce,90)|32]),ce<97||Ae>122||Xe.push([Math.max(97,Ae)&~32,Math.min(ce,122)&~32]))}}Xe.sort(function(Re,Ge){return Re[0]-Ge[0]||Ge[1]-Re[1]});for(var xe=[],_e=[],Ve=0;Ve<Xe.length;++Ve){var Le=Xe[Ve];Le[0]<=_e[1]+1?_e[1]=Math.max(_e[1],Le[1]):xe.push(_e=Le)}for(var Ve=0;Ve<xe.length;++Ve){var Le=xe[Ve];Ue.push(Je(Le[0])),Le[1]>Le[0]&&(Le[1]+1>Le[0]&&Ue.push("-"),Ue.push(Je(Le[1])))}return Ue.push("]"),Ue.join("")}function tt(Me){for(var Ce=Me.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")),Xe=Ce.length,et=[],Ue=0,Ve=0;Ue<Xe;++Ue){var Pe=Ce[Ue];if(Pe==="(")++Ve;else if(Pe.charAt(0)==="\\"){var we=+Pe.substring(1);we&&(we<=Ve?et[we]=-1:Ce[Ue]=Je(we))}}for(var Ue=1;Ue<et.length;++Ue)et[Ue]===-1&&(et[Ue]=++J);for(var Ue=0,Ve=0;Ue<Xe;++Ue){var Pe=Ce[Ue];if(Pe==="(")++Ve,et[Ve]||(Ce[Ue]="(?:");else if(Pe.charAt(0)==="\\"){var we=+Pe.substring(1);we&&we<=Ve&&(Ce[Ue]="\\"+et[we])}}for(var Ue=0;Ue<Xe;++Ue)Ce[Ue]==="^"&&Ce[Ue+1]!=="^"&&(Ce[Ue]="");if(Me.ignoreCase&&X)for(var Ue=0;Ue<Xe;++Ue){var Pe=Ce[Ue],Ae=Pe.charAt(0);Pe.length>=2&&Ae==="["?Ce[Ue]=$e(Pe):Ae!=="\\"&&(Ce[Ue]=Pe.replace(/[a-zA-Z]/g,function(_e){var Le=_e.charCodeAt(0);return"["+String.fromCharCode(Le&~32,Le|32)+"]"}))}return Ce.join("")}for(var nt=[],he=0,de=ne.length;he<de;++he){var Te=ne[he];if(Te.global||Te.multiline)throw new Error(""+Te);nt.push("(?:"+tt(Te)+")")}return new RegExp(nt.join("|"),Y?"gi":"g")}function H(ne,J){var X=/(?:^|\s)nocode(?:\s|$)/,Y=[],he=0,de=[],Te=0;function ze(Ze){var Je=Ze.nodeType;if(Je==1){if(X.test(Ze.className))return;for(var $e=Ze.firstChild;$e;$e=$e.nextSibling)ze($e);var tt=Ze.nodeName.toLowerCase();(tt==="br"||tt==="li")&&(Y[Te]=`
|
|
|
`,de[Te<<1]=he++,de[Te++<<1|1]=Ze)}else if(Je==3||Je==4){var nt=Ze.nodeValue;nt.length&&(J?nt=nt.replace(/\r\n?/g,`
|
|
|
`):nt=nt.replace(/[ \t\r\n]+/g," "),Y[Te]=nt,de[Te<<1]=he,he+=nt.length,de[Te++<<1|1]=Ze)}}return ze(ne),{sourceCode:Y.join("").replace(/\n$/,""),spans:de}}function W(ne,J,X,Y,he){if(!X)return;var de={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:J,decorations:null};Y(de),he.push.apply(he,de.decorations)}var Q=/\S/;function ee(ne){for(var J=void 0,X=ne.firstChild;X;X=X.nextSibling){var Y=X.nodeType;J=Y===1?J?ne:X:Y===3&&Q.test(X.nodeValue)?ne:J}return J===ne?void 0:J}function q(ne,J){var X={},Y;(function(){for(var Te=ne.concat(J),ze=[],Ze={},Je=0,$e=Te.length;Je<$e;++Je){var tt=Te[Je],nt=tt[3];if(nt)for(var Me=nt.length;--Me>=0;)X[nt.charAt(Me)]=tt;var Ce=tt[1],Xe=""+Ce;Ze.hasOwnProperty(Xe)||(ze.push(Ce),Ze[Xe]=null)}ze.push(/[\0-\uffff]/),Y=F(ze)})();var he=J.length,de=function(Te){for(var ze=Te.sourceCode,Ze=Te.basePos,Je=Te.sourceNode,$e=[Ze,C],tt=0,nt=ze.match(Y)||[],Me={},Ce=0,Xe=nt.length;Ce<Xe;++Ce){var et=nt[Ce],Ue=Me[et],Ve=void 0,Pe;if(typeof Ue=="string")Pe=!1;else{var we=X[et.charAt(0)];if(we)Ve=et.match(we[1]),Ue=we[0];else{for(var Ae=0;Ae<he;++Ae)if(we=J[Ae],Ve=et.match(we[1]),Ve){Ue=we[0];break}Ve||(Ue=C)}Pe=Ue.length>=5&&Ue.substring(0,5)==="lang-",Pe&&!(Ve&&typeof Ve[1]=="string")&&(Pe=!1,Ue=M),Pe||(Me[et]=Ue)}var ce=tt;if(tt+=et.length,!Pe)$e.push(Ze+ce,Ue);else{var xe=Ve[1],_e=et.indexOf(xe),Le=_e+xe.length;Ve[2]&&(Le=et.length-Ve[2].length,_e=Le-xe.length);var Re=Ue.substring(5);W(Je,Ze+ce,et.substring(0,_e),de,$e),W(Je,Ze+ce+_e,xe,le(Re,xe),$e),W(Je,Ze+ce+Le,et.substring(Le),de,$e)}}Te.decorations=$e};return de}function pe(ne){var J=[],X=[];ne.tripleQuotedStrings?J.push([a,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?J.push([a,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([a,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&X.push([a,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=ne.hashComments;Y&&(ne.cStyleComments?(Y>1?J.push([O,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([O,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([a,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([O,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(X.push([O,/^\/\/[^\r\n]*/,null]),X.push([O,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var he=ne.regexLiterals;if(he){var de=he>1?"":`
|
|
|
\r`,Te=de?".":"[\\S\\s]",ze="/(?=[^/*"+de+"])(?:[^/\\x5B\\x5C"+de+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+de+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+K+"("+ze+")")])}var Ze=ne.types;Ze&&X.push([f,Ze]);var Je=(""+ne.keywords).replace(/^ | $/g,"");Je.length&&X.push([L,new RegExp("^(?:"+Je.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([C,/^\s+/,null,` \r
|
|
|
\xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&($e+="(?!s*/)"),X.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[C,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[C,/^\\[\s\S]?/,null],[b,new RegExp($e),null]),q(J,X)}var ye=pe({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ie(ne,J,X){for(var Y=/(?:^|\s)nocode(?:\s|$)/,he=/\r\n?|\n/,de=ne.ownerDocument,Te=de.createElement("li");ne.firstChild;)Te.appendChild(ne.firstChild);var ze=[Te];function Ze(Ce){var Xe=Ce.nodeType;if(Xe==1&&!Y.test(Ce.className))if(Ce.nodeName==="br")Je(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var et=Ce.firstChild;et;et=et.nextSibling)Ze(et);else if((Xe==3||Xe==4)&&X){var Ue=Ce.nodeValue,Ve=Ue.match(he);if(Ve){var Pe=Ue.substring(0,Ve.index);Ce.nodeValue=Pe;var we=Ue.substring(Ve.index+Ve[0].length);if(we){var Ae=Ce.parentNode;Ae.insertBefore(de.createTextNode(we),Ce.nextSibling)}Je(Ce),Pe||Ce.parentNode.removeChild(Ce)}}}function Je(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Xe(Ve,Pe){var we=Pe?Ve.cloneNode(!1):Ve,Ae=Ve.parentNode;if(Ae){var ce=Xe(Ae,1),xe=Ve.nextSibling;ce.appendChild(we);for(var _e=xe;_e;_e=xe)xe=_e.nextSibling,ce.appendChild(_e)}return we}for(var et=Xe(Ce.nextSibling,0),Ue;(Ue=et.parentNode)&&Ue.nodeType===1;)et=Ue;ze.push(et)}for(var $e=0;$e<ze.length;++$e)Ze(ze[$e]);J===(J|0)&&ze[0].setAttribute("value",J);var tt=de.createElement("ol");tt.className="linenums";for(var nt=Math.max(0,J-1|0)||0,$e=0,Me=ze.length;$e<Me;++$e)Te=ze[$e],Te.className="L"+($e+nt)%10,Te.firstChild||Te.appendChild(de.createTextNode("\xA0")),tt.appendChild(Te);ne.appendChild(tt)}function Se(ne){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var X=/\n/g,Y=ne.sourceCode,he=Y.length,de=0,Te=ne.spans,ze=Te.length,Ze=0,Je=ne.decorations,$e=Je.length,tt=0;Je[$e]=he;var nt,Me;for(Me=nt=0;Me<$e;)Je[Me]!==Je[Me+2]?(Je[nt++]=Je[Me++],Je[nt++]=Je[Me++]):Me+=2;for($e=nt,Me=nt=0;Me<$e;){for(var Ce=Je[Me],Xe=Je[Me+1],et=Me+2;et+2<=$e&&Je[et+1]===Xe;)et+=2;Je[nt++]=Ce,Je[nt++]=Xe,Me=et}$e=Je.length=nt;var Ue=ne.sourceNode,Ve="";Ue&&(Ve=Ue.style.display,Ue.style.display="none");try{for(var Pe=null;Ze<ze;){var we=Te[Ze],Ae=Te[Ze+2]||he,ce=Je[tt+2]||he,et=Math.min(Ae,ce),xe=Te[Ze+1],_e;if(xe.nodeType!==1&&(_e=Y.substring(de,et))){J&&(_e=_e.replace(X,"\r")),xe.nodeValue=_e;var Le=xe.ownerDocument,Re=Le.createElement("span");Re.className=Je[tt+1];var Ge=xe.parentNode;Ge.replaceChild(Re,xe),Re.appendChild(xe),de<Ae&&(Te[Ze+1]=xe=Le.createTextNode(Y.substring(et,Ae)),Ge.insertBefore(xe,Re.nextSibling))}de=et,de>=Ae&&(Ze+=2),de>=ce&&(tt+=2)}}finally{Ue&&(Ue.style.display=Ve)}}var ge={};function oe(ne,J){for(var X=J.length;--X>=0;){var Y=J[X];ge.hasOwnProperty(Y)?v.console&&console.warn("cannot override language handler %s",Y):ge[Y]=ne}}function le(ne,J){return ne&&ge.hasOwnProperty(ne)||(ne=/^\s*</.test(J)?"default-markup":"default-code"),ge[ne]}oe(ye,["default-code"]),oe(q([],[[C,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[O,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[b,/^(?:<[%?]|[%?]>)/],["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"]),oe(q([[C,/^[\s]+/,null,` \r
|
|
|
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[I,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[b,/^[=<>\/]+/],["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"]),oe(q([],[[G,/^[\s\S]+/]]),["uq.val"]),oe(pe({keywords:h,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),oe(pe({keywords:"null,true,false"}),["json"]),oe(pe({keywords:g,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),oe(pe({keywords:y,cStyleComments:!0}),["java"]),oe(pe({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),oe(pe({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),oe(pe({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),oe(pe({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),oe(pe({keywords:m,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),oe(pe({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),oe(q([],[[a,/^[\s\S]+/]]),["regex"]);function te(ne){var J=ne.langExtension;try{var X=H(ne.sourceNode,ne.pre),Y=X.sourceCode;ne.sourceCode=Y,ne.spans=X.spans,ne.basePos=0,le(J,Y)(ne),Se(ne)}catch(he){v.console&&console.log(he&&he.stack||he)}}function be(ne,J,X){var Y=X||!1,he=J||null,de=document.createElement("div");de.innerHTML="<pre>"+ne+"</pre>",de=de.firstChild,Y&&ie(de,Y,!0);var Te={langExtension:he,numberLines:Y,sourceNode:de,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(Te),de.innerHTML}function Z(ne,J){var X=J||document.body,Y=X.ownerDocument||document;function he(we){return X.getElementsByTagName(we)}for(var de=[he("pre"),he("code"),he("xmp")],Te=[],ze=0;ze<de.length;++ze)for(var Ze=0,Je=de[ze].length;Ze<Je;++Ze)Te.push(de[ze][Ze]);de=null;var $e=Date;$e.now||($e={now:function(){return+new Date}});var tt=0,nt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,Xe=/pre|xmp/i,et=/^code$/i,Ue=/^(?:pre|code|xmp)$/i,Ve={};function Pe(){for(var we=v.PR_SHOULD_USE_CONTINUATION?$e.now()+250:Infinity;tt<Te.length&&$e.now()<we;tt++){for(var Ae=Te[tt],ce=Ve,xe=Ae;xe=xe.previousSibling;){var _e=xe.nodeType,Le=(_e===7||_e===8)&&xe.nodeValue;if(Le?!/^\??prettify\b/.test(Le):_e!==3||/\S/.test(xe.nodeValue))break;if(Le){ce={},Le.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Vt,Tt,dr){ce[Tt]=dr});break}}var Re=Ae.className;if((ce!==Ve||Me.test(Re))&&!Ce.test(Re)){for(var Ge=!1,Ye=Ae.parentNode;Ye;Ye=Ye.parentNode){var at=Ye.tagName;if(Ue.test(at)&&Ye.className&&Me.test(Ye.className)){Ge=!0;break}}if(!Ge){Ae.className+=" prettyprinted";var it=ce.lang;if(!it){it=Re.match(nt);var ot;!it&&(ot=ee(Ae))&&et.test(ot.tagName)&&(it=ot.className.match(nt)),it&&(it=it[1])}var yt;if(Xe.test(Ae.tagName))yt=1;else{var wt=Ae.currentStyle,ft=Y.defaultView,jt=wt?wt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(Ae,null).getPropertyValue("white-space"):0;yt=jt&&jt.substring(0,3)==="pre"}var kt=ce.linenums;(kt=kt==="true"||+kt)||(kt=Re.match(/\blinenums\b(?::(\d+))?/),kt=kt?kt[1]&&kt[1].length?+kt[1]:!0:!1),kt&&ie(Ae,kt,yt);var Rt={langExtension:it,sourceNode:Ae,numberLines:kt,pre:yt,sourceCode:null,basePos:null,spans:null,decorations:null};te(Rt)}}}tt<Te.length?v.setTimeout(Pe,250):typeof ne=="function"&&ne()}Pe()}var ae=v.PR={createSimpleLexer:q,registerLangHandler:oe,sourceDecorator:pe,PR_ATTRIB_NAME:z,PR_ATTRIB_VALUE:G,PR_COMMENT:O,PR_DECLARATION:j,PR_KEYWORD:L,PR_LITERAL:x,PR_NOCODE:B,PR_PLAIN:C,PR_PUNCTUATION:b,PR_SOURCE:M,PR_STRING:a,PR_TAG:I,PR_TYPE:f,prettyPrintOne:_?v.prettyPrintOne=be:s=be,prettyPrint:S=_?v.prettyPrint=Z:S=Z},Ee=v.define;typeof Ee=="function"&&Ee.amd&&Ee("google-code-prettify",[],function(){return ae})})()},"VrN/":function(N,$,k){(function(P,c){N.exports=c()})(this,function(){"use strict";var P=navigator.userAgent,c=navigator.platform,_=/gecko\/\d/i.test(P),D=/MSIE \d/.test(P),p=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),s=/Edge\/(\d+)/.exec(P),S=D||p||s,v=S&&(D?document.documentMode||6:+(s||p)[1]),o=!s&&/WebKit\//.test(P),i=o&&/Qt\/\d+\.\d+/.test(P),r=!s&&/Chrome\//.test(P),h=/Opera\//.test(P),y=/Apple Computer/.test(navigator.vendor),g=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),w=/PhantomJS/.test(P),m=!s&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),d=/Android/.test(P),n=m||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),l=m||/Mac/.test(c),u=/\bCrOS\b/.test(P),T=/win/i.test(c),E=h&&P.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(h=!1,o=!0);var a=l&&(i||h&&(E==null||E<12.11)),L=_||S&&v>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var f=function(e,t){var R=e.className,A=O(t).exec(R);if(A){var U=R.slice(A.index+A[0].length);e.className=R.slice(0,A.index)+(U?A[1]+U:"")}};function x(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function b(e,t){return x(e).appendChild(t)}function C(e,t,R,A){var U=document.createElement(e);if(R&&(U.className=R),A&&(U.style.cssText=A),typeof t=="string")U.appendChild(document.createTextNode(t));else if(t)for(var V=0;V<t.length;++V)U.appendChild(t[V]);return U}function I(e,t,R,A){var U=C(e,t,R,A);return U.setAttribute("role","presentation"),U}var j;document.createRange?j=function(e,t,R,A){var U=document.createRange();return U.setEnd(A||e,R),U.setStart(e,t),U}:j=function(e,t,R){var A=document.body.createTextRange();try{A.moveToElementText(e.parentNode)}catch(U){return A}return A.collapse(!0),A.moveEnd("character",R),A.moveStart("character",t),A};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function z(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function G(e,t){var R=e.className;O(t).test(R)||(e.className+=(R?" ":"")+t)}function B(e,t){for(var R=e.split(" "),A=0;A<R.length;A++)R[A]&&!O(R[A]).test(t)&&(t+=" "+R[A]);return t}var K=function(e){e.select()};m?K=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(K=function(e){try{e.select()}catch(t){}});function F(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function H(e,t,R){t||(t={});for(var A in e)e.hasOwnProperty(A)&&(R!==!1||!t.hasOwnProperty(A))&&(t[A]=e[A]);return t}function W(e,t,R,A,U){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=A||0,re=U||0;;){var se=e.indexOf(" ",V);if(se<0||se>=t)return re+(t-V);re+=se-V,re+=R-re%R,V=se+1}}var Q=function(){this.id=null,this.f=null,this.time=0,this.handler=F(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,t){this.f=t;var R=+new Date+e;(!this.id||R<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=R)};function ee(e,t){for(var R=0;R<e.length;++R)if(e[R]==t)return R;return-1}var q=50,pe={toString:function(){return"CodeMirror.Pass"}},ye={scroll:!1},ie={origin:"*mouse"},Se={origin:"+move"};function ge(e,t,R){for(var A=0,U=0;;){var V=e.indexOf(" ",A);V==-1&&(V=e.length);var re=V-A;if(V==e.length||U+re>=t)return A+Math.min(re,t-U);if(U+=V-A,U+=R-U%R,A=V+1,U>=t)return A}}var oe=[""];function le(e){for(;oe.length<=e;)oe.push(te(oe)+" ");return oe[e]}function te(e){return e[e.length-1]}function be(e,t){for(var R=[],A=0;A<e.length;A++)R[A]=t(e[A],A);return R}function Z(e,t,R){for(var A=0,U=R(t);A<e.length&&R(e[A])<=U;)A++;e.splice(A,0,t)}function ae(){}function Ee(e,t){var R;return Object.create?R=Object.create(e):(ae.prototype=e,R=new ae),t&&H(t,R),R}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function X(e,t){return t?t.source.indexOf("\\w")>-1&&J(e)?!0:t.test(e):J(e)}function Y(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var he=/[\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 de(e){return e.charCodeAt(0)>=768&&he.test(e)}function Te(e,t,R){for(;(R<0?t>0:t<e.length)&&de(e.charAt(t));)t+=R;return t}function ze(e,t,R){for(var A=t>R?-1:1;;){if(t==R)return t;var U=(t+R)/2,V=A<0?Math.ceil(U):Math.floor(U);if(V==t)return e(V)?t:R;e(V)?R=V:t=V+A}}function Ze(e,t,R,A){if(!e)return A(t,R,"ltr",0);for(var U=!1,V=0;V<e.length;++V){var re=e[V];(re.from<R&&re.to>t||t==R&&re.to==t)&&(A(Math.max(re.from,t),Math.min(re.to,R),re.level==1?"rtl":"ltr",V),U=!0)}U||A(t,R,"ltr")}var Je=null;function $e(e,t,R){var A;Je=null;for(var U=0;U<e.length;++U){var V=e[U];if(V.from<t&&V.to>t)return U;V.to==t&&(V.from!=V.to&&R=="before"?A=U:Je=U),V.from==t&&(V.from!=V.to&&R!="before"?A=U:Je=U)}return A!=null?A:Je}var tt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(me){return me<=247?e.charAt(me):1424<=me&&me<=1524?"R":1536<=me&&me<=1785?t.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]/,U=/[stwN]/,V=/[LRr]/,re=/[Lb1n]/,se=/[1n]/;function ue(me,Ne,Fe){this.level=me,this.from=Ne,this.to=Fe}return function(me,Ne){var Fe=Ne=="ltr"?"L":"R";if(me.length==0||Ne=="ltr"&&!A.test(me))return!1;for(var rt=me.length,qe=[],lt=0;lt<rt;++lt)qe.push(R(me.charCodeAt(lt)));for(var dt=0,gt=Fe;dt<rt;++dt){var xt=qe[dt];xt=="m"?qe[dt]=gt:gt=xt}for(var At=0,Et=Fe;At<rt;++At){var Mt=qe[At];Mt=="1"&&Et=="r"?qe[At]="n":V.test(Mt)&&(Et=Mt,Mt=="r"&&(qe[At]="R"))}for(var Yt=1,Kt=qe[0];Yt<rt-1;++Yt){var yr=qe[Yt];yr=="+"&&Kt=="1"&&qe[Yt+1]=="1"?qe[Yt]="1":yr==","&&Kt==qe[Yt+1]&&(Kt=="1"||Kt=="n")&&(qe[Yt]=Kt),Kt=yr}for(var ln=0;ln<rt;++ln){var oa=qe[ln];if(oa==",")qe[ln]="N";else if(oa=="%"){var On=void 0;for(On=ln+1;On<rt&&qe[On]=="%";++On);for(var Ia=ln&&qe[ln-1]=="!"||On<rt&&qe[On]=="1"?"1":"N",Ra=ln;Ra<On;++Ra)qe[Ra]=Ia;ln=On-1}}for(var Bn=0,Da=Fe;Bn<rt;++Bn){var ca=qe[Bn];Da=="L"&&ca=="1"?qe[Bn]="L":V.test(ca)&&(Da=ca)}for(var Zn=0;Zn<rt;++Zn)if(U.test(qe[Zn])){var Wn=void 0;for(Wn=Zn+1;Wn<rt&&U.test(qe[Wn]);++Wn);for(var Mn=(Zn?qe[Zn-1]:Fe)=="L",La=(Wn<rt?qe[Wn]:Fe)=="L",Zi=Mn==La?Mn?"L":"R":Fe,_i=Zn;_i<Wn;++_i)qe[_i]=Zi;Zn=Wn-1}for(var xa=[],si,sa=0;sa<rt;)if(re.test(qe[sa])){var ps=sa;for(++sa;sa<rt&&re.test(qe[sa]);++sa);xa.push(new ue(0,ps,sa))}else{var vi=sa,Mi=xa.length,Pi=Ne=="rtl"?1:0;for(++sa;sa<rt&&qe[sa]!="L";++sa);for(var Ca=vi;Ca<sa;)if(se.test(qe[Ca])){vi<Ca&&(xa.splice(Mi,0,new ue(1,vi,Ca)),Mi+=Pi);var qi=Ca;for(++Ca;Ca<sa&&se.test(qe[Ca]);++Ca);xa.splice(Mi,0,new ue(2,qi,Ca)),Mi+=Pi,vi=Ca}else++Ca;vi<sa&&xa.splice(Mi,0,new ue(1,vi,sa))}return Ne=="ltr"&&(xa[0].level==1&&(si=me.match(/^\s+/))&&(xa[0].from=si[0].length,xa.unshift(new ue(0,0,si[0].length))),te(xa).level==1&&(si=me.match(/\s+$/))&&(te(xa).to-=si[0].length,xa.push(new ue(0,rt-si[0].length,rt)))),Ne=="rtl"?xa.reverse():xa}}();function nt(e,t){var R=e.order;return R==null&&(R=e.order=tt(e.text,t)),R}var Me=[],Ce=function(e,t,R){if(e.addEventListener)e.addEventListener(t,R,!1);else if(e.attachEvent)e.attachEvent("on"+t,R);else{var A=e._handlers||(e._handlers={});A[t]=(A[t]||Me).concat(R)}};function Xe(e,t){return e._handlers&&e._handlers[t]||Me}function et(e,t,R){if(e.removeEventListener)e.removeEventListener(t,R,!1);else if(e.detachEvent)e.detachEvent("on"+t,R);else{var A=e._handlers,U=A&&A[t];if(U){var V=ee(U,R);V>-1&&(A[t]=U.slice(0,V).concat(U.slice(V+1)))}}}function Ue(e,t){var R=Xe(e,t);if(!R.length)return;for(var A=Array.prototype.slice.call(arguments,2),U=0;U<R.length;++U)R[U].apply(null,A)}function Ve(e,t,R){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ue(e,R||t.type,e,t),_e(t)||t.codemirrorIgnore}function Pe(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var R=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),A=0;A<t.length;++A)ee(R,t[A])==-1&&R.push(t[A])}function we(e,t){return Xe(e,t).length>0}function Ae(e){e.prototype.on=function(t,R){Ce(this,t,R)},e.prototype.off=function(t,R){et(this,t,R)}}function ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Le(e){ce(e),xe(e)}function Re(e){return e.target||e.srcElement}function Ge(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),l&&e.ctrlKey&&t==1&&(t=3),t}var Ye=function(){if(S&&v<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}(),at;function it(e){if(at==null){var t=C("span","\u200B");b(e,C("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(at=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&v<8))}var R=at?C("span","\u200B"):C("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var ot;function yt(e){if(ot!=null)return ot;var t=b(e,document.createTextNode("A\u062EA")),R=j(t,0,1).getBoundingClientRect(),A=j(t,1,2).getBoundingClientRect();return x(e),!R||R.left==R.right?!1:ot=A.right-R.right<3}var wt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,R=[],A=e.length;t<=A;){var U=e.indexOf(`
|
|
|
`,t);U==-1&&(U=e.length);var V=e.slice(t,e.charAt(U-1)=="\r"?U-1:U),re=V.indexOf("\r");re!=-1?(R.push(V.slice(0,re)),t+=re+1):(R.push(V),t=U+1)}return R}:function(e){return e.split(/\r\n?|\n/)},ft=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(R){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},jt=function(){var e=C("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),kt=null;function Rt(e){if(kt!=null)return kt;var t=b(e,C("span","x")),R=t.getBoundingClientRect(),A=j(t,0,1).getBoundingClientRect();return kt=Math.abs(R.left-A.left)>1}var Vt={},Tt={};function dr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Vt[e]=t}function tr(e,t){Tt[e]=t}function Wt(e){if(typeof e=="string"&&Tt.hasOwnProperty(e))e=Tt[e];else if(e&&typeof e.name=="string"&&Tt.hasOwnProperty(e.name)){var t=Tt[e.name];typeof t=="string"&&(t={name:t}),e=Ee(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Wt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Wt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Bt(e,t){t=Wt(t);var R=Vt[t.name];if(!R)return Bt(e,"text/plain");var A=R(e,t);if(Nr.hasOwnProperty(t.name)){var U=Nr[t.name];for(var V in U){if(!U.hasOwnProperty(V))continue;A.hasOwnProperty(V)&&(A["_"+V]=A[V]),A[V]=U[V]}}if(A.name=t.name,t.helperType&&(A.helperType=t.helperType),t.modeProps)for(var re in t.modeProps)A[re]=t.modeProps[re];return A}var Nr={};function dn(e,t){var R=Nr.hasOwnProperty(e)?Nr[e]:Nr[e]={};H(t,R)}function Er(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var R={};for(var A in t){var U=t[A];U instanceof Array&&(U=U.concat([])),R[A]=U}return R}function qn(e,t){for(var R;e.innerMode&&!(R=e.innerMode(t),!R||R.mode==e);)t=R.state,e=R.mode;return R||{mode:e,state:t}}function vt(e,t,R){return e.startState?e.startState(t,R):!0}var Ct=function(e,t,R){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};Ct.prototype.eol=function(){return this.pos>=this.string.length},Ct.prototype.sol=function(){return this.pos==this.lineStart},Ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ct.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ct.prototype.eat=function(e){var t=this.string.charAt(this.pos),R;if(typeof e=="string"?R=t==e:R=t&&(e.test?e.test(t):e(t)),R)return++this.pos,t},Ct.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ct.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ct.prototype.skipToEnd=function(){this.pos=this.string.length},Ct.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ct.prototype.backUp=function(e){this.pos-=e},Ct.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.match=function(e,t,R){if(typeof e=="string"){var A=function(re){return R?re.toLowerCase():re},U=this.string.substr(this.pos,e.length);if(A(U)==A(e))return t!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},Ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ct.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ct.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ct.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function mt(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var R=e;!R.lines;)for(var A=0;;++A){var U=R.children[A],V=U.chunkSize();if(t<V){R=U;break}t-=V}return R.lines[t]}function mr(e,t,R){var A=[],U=t.line;return e.iter(t.line,R.line+1,function(V){var re=V.text;U==R.line&&(re=re.slice(0,R.ch)),U==t.line&&(re=re.slice(t.ch)),A.push(re),++U}),A}function wr(e,t,R){var A=[];return e.iter(t,R,function(U){A.push(U.text)}),A}function It(e,t){var R=t-e.height;if(R)for(var A=e;A;A=A.parent)A.height+=R}function _t(e){if(e.parent==null)return null;for(var t=e.parent,R=ee(t.lines,e),A=t.parent;A;t=A,A=A.parent)for(var U=0;!(A.children[U]==t);++U)R+=A.children[U].chunkSize();return R+t.first}function vr(e,t){var R=e.first;e:do{for(var A=0;A<e.children.length;++A){var U=e.children[A],V=U.height;if(t<V){e=U;continue e}t-=V,R+=U.chunkSize()}return R}while(!e.lines);for(var re=0;re<e.lines.length;++re){var se=e.lines[re],ue=se.height;if(t<ue)break;t-=ue}return R+re}function un(e,t){return t>=e.first&&t<e.first+e.size}function jr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ct(e,t,R){if(R===void 0&&(R=null),!(this instanceof ct))return new ct(e,t,R);this.line=e,this.ch=t,this.sticky=R}function Dt(e,t){return e.line-t.line||e.ch-t.ch}function Yr(e,t){return e.sticky==t.sticky&&Dt(e,t)==0}function nn(e){return ct(e.line,e.ch)}function An(e,t){return Dt(e,t)<0?t:e}function fn(e,t){return Dt(e,t)<0?e:t}function Hr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ot(e,t){if(t.line<e.first)return ct(e.first,0);var R=e.first+e.size-1;return t.line>R?ct(R,mt(e,R).text.length):cn(t,mt(e,t.line).text.length)}function cn(e,t){var R=e.ch;return R==null||R>t?ct(e.line,t):R<0?ct(e.line,0):e}function ut(e,t){for(var R=[],A=0;A<t.length;A++)R[A]=Ot(e,t[A]);return R}var Lr=function(e,t){this.state=e,this.lookAhead=t},fr=function(e,t,R,A){this.state=t,this.doc=e,this.line=R,this.maxLookAhead=A||0,this.baseTokens=null,this.baseTokenPos=1};fr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},fr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},fr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fr.fromSaved=function(e,t,R){return t instanceof Lr?new fr(e,Er(e.mode,t.state),R,t.lookAhead):new fr(e,Er(e.mode,t),R)},fr.prototype.save=function(e){var t=e!==!1?Er(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Lr(t,this.maxLookAhead):t};function ea(e,t,R,A){var U=[e.state.modeGen],V={};Br(e,t.text,e.doc.mode,R,function(me,Ne){return U.push(me,Ne)},V,A);for(var re=R.state,se=function(me){R.baseTokens=U;var Ne=e.state.overlays[me],Fe=1,rt=0;R.state=!0,Br(e,t.text,Ne.mode,R,function(qe,lt){for(var dt=Fe;rt<qe;){var gt=U[Fe];gt>qe&&U.splice(Fe,1,qe,U[Fe+1],gt),Fe+=2,rt=Math.min(qe,gt)}if(!lt)return;if(Ne.opaque)U.splice(dt,Fe-dt,qe,"overlay "+lt),Fe=dt+2;else for(;dt<Fe;dt+=2){var xt=U[dt+1];U[dt+1]=(xt?xt+" ":"")+"overlay "+lt}},V),R.state=re,R.baseTokens=null,R.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)se(ue);return{styles:U,classes:V.bgClass||V.textClass?V:null}}function Sn(e,t,R){if(!t.styles||t.styles[0]!=e.state.modeGen){var A=bn(e,_t(t)),U=t.text.length>e.options.maxHighlightLength&&Er(e.doc.mode,A.state),V=ea(e,t,A);U&&(A.state=U),t.stateAfter=A.save(!U),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bn(e,t,R){var A=e.doc,U=e.display;if(!A.mode.startState)return new fr(A,!0,t);var V=ar(e,t,R),re=V>A.first&&mt(A,V-1).stateAfter,se=re?fr.fromSaved(A,re,V):new fr(A,vt(A.mode),V);return A.iter(V,t,function(ue){da(e,ue.text,se);var me=se.line;ue.stateAfter=me==t-1||me%5==0||me>=U.viewFrom&&me<U.viewTo?se.save():null,se.nextLine()}),R&&(A.modeFrontier=se.line),se}function da(e,t,R,A){var U=e.doc.mode,V=new Ct(t,e.options.tabSize,R);for(V.start=V.pos=A||0,t==""&&ta(U,R.state);!V.eol();)an(U,V,R.state),V.start=V.pos}function ta(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var R=qn(e,t);if(R.mode.blankLine)return R.mode.blankLine(R.state)}function an(e,t,R,A){for(var U=0;U<10;U++){A&&(A[0]=qn(e,R).mode);var V=e.token(t,R);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Fr=function(e,t,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=R};function fa(e,t,R,A){var U=e.doc,V=U.mode,re;t=Ot(U,t);var se=mt(U,t.line),ue=bn(e,t.line,R),me=new Ct(se.text,e.options.tabSize,ue),Ne;for(A&&(Ne=[]);(A||me.pos<t.ch)&&!me.eol();)me.start=me.pos,re=an(V,me,ue.state),A&&Ne.push(new Fr(me,re,Er(U.mode,ue.state)));return A?Ne:new Fr(me,re,ue.state)}function hn(e,t){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";t[A]==null?t[A]=R[2]:new RegExp("(?:^|\\s)"+R[2]+"(?:$|\\s)").test(t[A])||(t[A]+=" "+R[2])}return e}function Br(e,t,R,A,U,V,re){var se=R.flattenSpans;se==null&&(se=e.options.flattenSpans);var ue=0,me=null,Ne=new Ct(t,e.options.tabSize,A),Fe,rt=e.options.addModeClass&&[null];for(t==""&&hn(ta(R,A.state),V);!Ne.eol();){if(Ne.pos>e.options.maxHighlightLength?(se=!1,re&&da(e,t,A,Ne.pos),Ne.pos=t.length,Fe=null):Fe=hn(an(R,Ne,A.state,rt),V),rt){var qe=rt[0].name;qe&&(Fe="m-"+(Fe?qe+" "+Fe:qe))}if(!se||me!=Fe){for(;ue<Ne.start;)ue=Math.min(Ne.start,ue+5e3),U(ue,me);me=Fe}Ne.start=Ne.pos}for(;ue<Ne.pos;){var lt=Math.min(Ne.pos,ue+5e3);U(lt,me),ue=lt}}function ar(e,t,R){for(var A,U,V=e.doc,re=R?-1:t-(e.doc.mode.innerMode?1e3:100),se=t;se>re;--se){if(se<=V.first)return V.first;var ue=mt(V,se-1),me=ue.stateAfter;if(me&&(!R||se+(me instanceof Lr?me.lookAhead:0)<=V.modeFrontier))return se;var Ne=W(ue.text,null,e.options.tabSize);(U==null||A>Ne)&&(U=se-1,A=Ne)}return U}function en(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var R=e.first,A=t-1;A>R;A--){var U=mt(e,A).stateAfter;if(U&&(!(U instanceof Lr)||A+U.lookAhead<t)){R=A+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,R)}var $t=!1,Ft=!1;function Jt(){$t=!0}function Tr(){Ft=!0}function kr(e,t,R){this.marker=e,this.from=t,this.to=R}function Kr(e,t){if(e)for(var R=0;R<e.length;++R){var A=e[R];if(A.marker==t)return A}}function xn(e,t){for(var R,A=0;A<e.length;++A)e[A]!=t&&(R||(R=[])).push(e[A]);return R}function li(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Ya(e,t,R){var A;if(e)for(var U=0;U<e.length;++U){var V=e[U],re=V.marker,se=V.from==null||(re.inclusiveLeft?V.from<=t:V.from<t);if(se||V.from==t&&re.type=="bookmark"&&(!R||!V.marker.insertLeft)){var ue=V.to==null||(re.inclusiveRight?V.to>=t:V.to>t);(A||(A=[])).push(new kr(re,V.from,ue?null:V.to))}}return A}function $a(e,t,R){var A;if(e)for(var U=0;U<e.length;++U){var V=e[U],re=V.marker,se=V.to==null||(re.inclusiveRight?V.to>=t:V.to>t);if(se||V.from==t&&re.type=="bookmark"&&(!R||V.marker.insertLeft)){var ue=V.from==null||(re.inclusiveLeft?V.from<=t:V.from<t);(A||(A=[])).push(new kr(re,ue?null:V.from-t,V.to==null?null:V.to-t))}}return A}function _a(e,t){if(t.full)return null;var R=un(e,t.from.line)&&mt(e,t.from.line).markedSpans,A=un(e,t.to.line)&&mt(e,t.to.line).markedSpans;if(!R&&!A)return null;var U=t.from.ch,V=t.to.ch,re=Dt(t.from,t.to)==0,se=Ya(R,U,re),ue=$a(A,V,re),me=t.text.length==1,Ne=te(t.text).length+(me?U:0);if(se)for(var Fe=0;Fe<se.length;++Fe){var rt=se[Fe];if(rt.to==null){var qe=Kr(ue,rt.marker);qe?me&&(rt.to=qe.to==null?null:qe.to+Ne):rt.to=U}}if(ue)for(var lt=0;lt<ue.length;++lt){var dt=ue[lt];if(dt.to!=null&&(dt.to+=Ne),dt.from==null){var gt=Kr(se,dt.marker);gt||(dt.from=Ne,me&&(se||(se=[])).push(dt))}else dt.from+=Ne,me&&(se||(se=[])).push(dt)}se&&(se=pn(se)),ue&&ue!=se&&(ue=pn(ue));var xt=[se];if(!me){var At=t.text.length-2,Et;if(At>0&&se)for(var Mt=0;Mt<se.length;++Mt)se[Mt].to==null&&(Et||(Et=[])).push(new kr(se[Mt].marker,null,null));for(var Yt=0;Yt<At;++Yt)xt.push(Et);xt.push(ue)}return xt}function pn(e){for(var t=0;t<e.length;++t){var R=e[t];R.from!=null&&R.from==R.to&&R.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ka(e,t,R){var A=null;if(e.iter(t.line,R.line+1,function(qe){if(qe.markedSpans)for(var lt=0;lt<qe.markedSpans.length;++lt){var dt=qe.markedSpans[lt].marker;dt.readOnly&&(!A||ee(A,dt)==-1)&&(A||(A=[])).push(dt)}}),!A)return null;for(var U=[{from:t,to:R}],V=0;V<A.length;++V)for(var re=A[V],se=re.find(0),ue=0;ue<U.length;++ue){var me=U[ue];if(Dt(me.to,se.from)<0||Dt(me.from,se.to)>0)continue;var Ne=[ue,1],Fe=Dt(me.from,se.from),rt=Dt(me.to,se.to);(Fe<0||!re.inclusiveLeft&&!Fe)&&Ne.push({from:me.from,to:se.from}),(rt>0||!re.inclusiveRight&&!rt)&&Ne.push({from:se.to,to:me.to}),U.splice.apply(U,Ne),ue+=Ne.length-3}return U}function $r(e){var t=e.markedSpans;if(!t)return;for(var R=0;R<t.length;++R)t[R].marker.detachLine(e);e.markedSpans=null}function ra(e,t){if(!t)return;for(var R=0;R<t.length;++R)t[R].marker.attachLine(e);e.markedSpans=t}function Pn(e){return e.inclusiveLeft?-1:0}function on(e){return e.inclusiveRight?1:0}function Cn(e,t){var R=e.lines.length-t.lines.length;if(R!=0)return R;var A=e.find(),U=t.find(),V=Dt(A.from,U.from)||Pn(e)-Pn(t);if(V)return-V;var re=Dt(A.to,U.to)||on(e)-on(t);return re||t.id-e.id}function ha(e,t){var R=Ft&&e.markedSpans,A;if(R)for(var U=void 0,V=0;V<R.length;++V)U=R[V],U.marker.collapsed&&(t?U.from:U.to)==null&&(!A||Cn(A,U.marker)<0)&&(A=U.marker);return A}function Hn(e){return ha(e,!0)}function Kn(e){return ha(e,!1)}function Ma(e,t){var R=Ft&&e.markedSpans,A;if(R)for(var U=0;U<R.length;++U){var V=R[U];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!A||Cn(A,V.marker)<0)&&(A=V.marker)}return A}function Pa(e,t,R,A,U){var V=mt(e,t),re=Ft&&V.markedSpans;if(re)for(var se=0;se<re.length;++se){var ue=re[se];if(!ue.marker.collapsed)continue;var me=ue.marker.find(0),Ne=Dt(me.from,R)||Pn(ue.marker)-Pn(U),Fe=Dt(me.to,A)||on(ue.marker)-on(U);if(Ne>=0&&Fe<=0||Ne<=0&&Fe>=0)continue;if(Ne<=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Dt(me.to,R)>=0:Dt(me.to,R)>0)||Ne>=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Dt(me.from,A)<=0:Dt(me.from,A)<0))return!0}}function zn(e){for(var t;t=Hn(e);)e=t.find(-1,!0).line;return e}function Na(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function pa(e){for(var t,R;t=Kn(e);)e=t.find(1,!0).line,(R||(R=[])).push(e);return R}function ma(e,t){var R=mt(e,t),A=zn(R);return R==A?t:_t(A)}function Gn(e,t){if(t>e.lastLine())return t;var R=mt(e,t),A;if(!Xn(e,R))return t;for(;A=Kn(R);)R=A.find(1,!0).line;return _t(R)+1}function Xn(e,t){var R=Ft&&t.markedSpans;if(R)for(var A=void 0,U=0;U<R.length;++U){if(A=R[U],!A.marker.collapsed)continue;if(A.from==null)return!0;if(A.marker.widgetNode)continue;if(A.from==0&&A.marker.inclusiveLeft&&ka(e,t,A))return!0}}function ka(e,t,R){if(R.to==null){var A=R.marker.find(1,!0);return ka(e,A.line,Kr(A.line.markedSpans,R.marker))}if(R.marker.inclusiveRight&&R.to==t.text.length)return!0;for(var U=void 0,V=0;V<t.markedSpans.length;++V)if(U=t.markedSpans[V],U.marker.collapsed&&!U.marker.widgetNode&&U.from==R.to&&(U.to==null||U.to!=R.from)&&(U.marker.inclusiveLeft||R.marker.inclusiveRight)&&ka(e,t,U))return!0}function na(e){e=zn(e);for(var t=0,R=e.parent,A=0;A<R.lines.length;++A){var U=R.lines[A];if(U==e)break;t+=U.height}for(var V=R.parent;V;R=V,V=R.parent)for(var re=0;re<V.children.length;++re){var se=V.children[re];if(se==R)break;t+=se.height}return t}function va(e){if(e.height==0)return 0;for(var t=e.text.length,R,A=e;R=Hn(A);){var U=R.find(0,!0);A=U.from.line,t+=U.from.ch-U.to.ch}for(A=e;R=Kn(A);){var V=R.find(0,!0);t-=A.text.length-V.from.ch,A=V.to.line,t+=A.text.length-V.to.ch}return t}function ja(e){var t=e.display,R=e.doc;t.maxLine=mt(R,R.first),t.maxLineLength=va(t.maxLine),t.maxLineChanged=!0,R.iter(function(A){var U=va(A);U>t.maxLineLength&&(t.maxLineLength=U,t.maxLine=A)})}var aa=function(e,t,R){this.text=e,ra(this,t),this.height=R?R(this):1};aa.prototype.lineNo=function(){return _t(this)},Ae(aa);function Mr(e,t,R,A){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),$r(e),ra(e,R);var U=A?A(e):1;U!=e.height&&It(e,U)}function Lt(e){e.parent=null,$r(e)}var zt={},Pt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var R=t.addModeClass?Pt:zt;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function hr(e,t){var R=I("span",null,null,o?"padding-right: .1px":null),A={pre:I("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var U=0;U<=(t.rest?t.rest.length:0);U++){var V=U?t.rest[U-1]:t.line,re=void 0;A.pos=0,A.addToken=sr,yt(e.display.measure)&&(re=nt(V,e.doc.direction))&&(A.addToken=Un(A.addToken,re)),A.map=[];var se=t!=e.display.externalMeasured&&_t(V);ga(V,A,Sn(e,V,se)),V.styleClasses&&(V.styleClasses.bgClass&&(A.bgClass=B(V.styleClasses.bgClass,A.bgClass||"")),V.styleClasses.textClass&&(A.textClass=B(V.styleClasses.textClass,A.textClass||""))),A.map.length==0&&A.map.push(0,0,A.content.appendChild(it(e.display.measure))),U==0?(t.measure.map=A.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(A.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(o){var ue=A.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(A.content.className="cm-tab-wrap-hack")}return Ue(e,"renderLine",e,t.line,A.pre),A.pre.className&&(A.textClass=B(A.pre.className,A.textClass||"")),A}function _r(e){var t=C("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function sr(e,t,R,A,U,V,re){if(!t)return;var se=e.splitSpaces?Jr(t,e.trailingSpace):t,ue=e.cm.state.specialChars,me=!1,Ne;if(!ue.test(t))e.col+=t.length,Ne=document.createTextNode(se),e.map.push(e.pos,e.pos+t.length,Ne),S&&v<9&&(me=!0),e.pos+=t.length;else{Ne=document.createDocumentFragment();for(var Fe=0;;){ue.lastIndex=Fe;var rt=ue.exec(t),qe=rt?rt.index-Fe:t.length-Fe;if(qe){var lt=document.createTextNode(se.slice(Fe,Fe+qe));S&&v<9?Ne.appendChild(C("span",[lt])):Ne.appendChild(lt),e.map.push(e.pos,e.pos+qe,lt),e.col+=qe,e.pos+=qe}if(!rt)break;Fe+=qe+1;var dt=void 0;if(rt[0]==" "){var gt=e.cm.options.tabSize,xt=gt-e.col%gt;dt=Ne.appendChild(C("span",le(xt),"cm-tab")),dt.setAttribute("role","presentation"),dt.setAttribute("cm-text"," "),e.col+=xt}else rt[0]=="\r"||rt[0]==`
|
|
|
`?(dt=Ne.appendChild(C("span",rt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dt.setAttribute("cm-text",rt[0]),e.col+=1):(dt=e.cm.options.specialCharPlaceholder(rt[0]),dt.setAttribute("cm-text",rt[0]),S&&v<9?Ne.appendChild(C("span",[dt])):Ne.appendChild(dt),e.col+=1);e.map.push(e.pos,e.pos+1,dt),e.pos++}}if(e.trailingSpace=se.charCodeAt(t.length-1)==32,R||A||U||me||V||re){var At=R||"";A&&(At+=A),U&&(At+=U);var Et=C("span",[Ne],At,V);if(re)for(var Mt in re)re.hasOwnProperty(Mt)&&Mt!="style"&&Mt!="class"&&Et.setAttribute(Mt,re[Mt]);return e.content.appendChild(Et)}e.content.appendChild(Ne)}function Jr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var R=t,A="",U=0;U<e.length;U++){var V=e.charAt(U);V==" "&&R&&(U==e.length-1||e.charCodeAt(U+1)==32)&&(V="\xA0"),A+=V,R=V==" "}return A}function Un(e,t){return function(R,A,U,V,re,se,ue){U=U?U+" cm-force-border":"cm-force-border";for(var me=R.pos,Ne=me+A.length;;){for(var Fe=void 0,rt=0;rt<t.length&&!(Fe=t[rt],Fe.to>me&&Fe.from<=me);rt++);if(Fe.to>=Ne)return e(R,A,U,V,re,se,ue);e(R,A.slice(0,Fe.to-me),U,V,null,se,ue),V=null,A=A.slice(Fe.to-me),me=Fe.to}}}function nr(e,t,R,A){var U=!A&&R.widgetNode;U&&e.map.push(e.pos,e.pos+t,U),!A&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",R.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=t,e.trailingSpace=!1}function ga(e,t,R){var A=e.markedSpans,U=e.text,V=0;if(!A){for(var re=1;re<R.length;re+=2)t.addToken(t,U.slice(V,V=R[re]),Zt(R[re+1],t.cm.options));return}for(var se=U.length,ue=0,me=1,Ne="",Fe,rt,qe=0,lt,dt,gt,xt,At;;){if(qe==ue){lt=dt=gt=rt="",At=null,xt=null,qe=Infinity;for(var Et=[],Mt=void 0,Yt=0;Yt<A.length;++Yt){var Kt=A[Yt],yr=Kt.marker;if(yr.type=="bookmark"&&Kt.from==ue&&yr.widgetNode)Et.push(yr);else if(Kt.from<=ue&&(Kt.to==null||Kt.to>ue||yr.collapsed&&Kt.to==ue&&Kt.from==ue)){if(Kt.to!=null&&Kt.to!=ue&&qe>Kt.to&&(qe=Kt.to,dt=""),yr.className&&(lt+=" "+yr.className),yr.css&&(rt=(rt?rt+";":"")+yr.css),yr.startStyle&&Kt.from==ue&&(gt+=" "+yr.startStyle),yr.endStyle&&Kt.to==qe&&(Mt||(Mt=[])).push(yr.endStyle,Kt.to),yr.title&&((At||(At={})).title=yr.title),yr.attributes)for(var ln in yr.attributes)(At||(At={}))[ln]=yr.attributes[ln];yr.collapsed&&(!xt||Cn(xt.marker,yr)<0)&&(xt=Kt)}else Kt.from>ue&&qe>Kt.from&&(qe=Kt.from)}if(Mt)for(var oa=0;oa<Mt.length;oa+=2)Mt[oa+1]==qe&&(dt+=" "+Mt[oa]);if(!xt||xt.from==ue)for(var On=0;On<Et.length;++On)nr(t,0,Et[On]);if(xt&&(xt.from||0)==ue){if(nr(t,(xt.to==null?se+1:xt.to)-ue,xt.marker,xt.from==null),xt.to==null)return;xt.to==ue&&(xt=!1)}}if(ue>=se)break;for(var Ia=Math.min(se,qe);;){if(Ne){var Ra=ue+Ne.length;if(!xt){var Bn=Ra>Ia?Ne.slice(0,Ia-ue):Ne;t.addToken(t,Bn,Fe?Fe+lt:lt,gt,ue+Bn.length==qe?dt:"",rt,At)}if(Ra>=Ia){Ne=Ne.slice(Ia-ue),ue=Ia;break}ue=Ra,gt=""}Ne=U.slice(V,V=R[me++]),Fe=Zt(R[me++],t.cm.options)}}}function Or(e,t,R){this.line=t,this.rest=pa(t),this.size=this.rest?_t(te(this.rest))-R+1:1,this.node=this.text=null,this.hidden=Xn(e,t)}function _n(e,t,R){for(var A=[],U,V=t;V<R;V=U){var re=new Or(e.doc,mt(e.doc,V),V);U=V+re.size,A.push(re)}return A}var Rn=null;function la(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function ui(e){var t=e.delayedCallbacks,R=0;do{for(;R<t.length;R++)t[R].call(null);for(var A=0;A<e.ops.length;A++){var U=e.ops[A];if(U.cursorActivityHandlers)for(;U.cursorActivityCalled<U.cursorActivityHandlers.length;)U.cursorActivityHandlers[U.cursorActivityCalled++].call(null,U.cm)}}while(R<t.length)}function Ar(e,t){var R=e.ownsGroup;if(!R)return;try{ui(R)}finally{Rn=null,t(R)}}var gr=null;function lr(e,t){var R=Xe(e,t);if(!R.length)return;var A=Array.prototype.slice.call(arguments,2),U;Rn?U=Rn.delayedCallbacks:gr?U=gr:(U=gr=[],setTimeout(ia,0));for(var V=function(se){U.push(function(){return R[se].apply(null,A)})},re=0;re<R.length;++re)V(re)}function ia(){var e=gr;gr=null;for(var t=0;t<e.length;++t)e[t]()}function za(e,t,R,A){for(var U=0;U<t.changes.length;U++){var V=t.changes[U];V=="text"?Qt(e,t):V=="gutter"?Ir(e,t,R,A):V=="class"?qt(e,t):V=="widget"&&ur(e,t,A)}t.changes=null}function Ga(e){return e.node==e.text&&(e.node=C("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&v<8&&(e.node.style.zIndex=2)),e.node}function Gt(e,t){var R=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(R&&(R+=" CodeMirror-linebackground"),t.background)R?t.background.className=R:(t.background.parentNode.removeChild(t.background),t.background=null);else if(R){var A=Ga(t);t.background=A.insertBefore(C("div",null,R),A.firstChild),e.display.input.setUneditable(t.background)}}function St(e,t){var R=e.display.externalMeasured;return R&&R.line==t.line?(e.display.externalMeasured=null,t.measure=R.measure,R.built):hr(e,t)}function Qt(e,t){var R=t.text.className,A=St(e,t);t.text==t.node&&(t.node=A.pre),t.text.parentNode.replaceChild(A.pre,t.text),t.text=A.pre,A.bgClass!=t.bgClass||A.textClass!=t.textClass?(t.bgClass=A.bgClass,t.textClass=A.textClass,qt(e,t)):R&&(t.text.className=R)}function qt(e,t){Gt(e,t),t.line.wrapClass?Ga(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var R=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=R||""}function Ir(e,t,R,A){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var U=Ga(t);t.gutterBackground=C("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px; width: "+A.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),U.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var re=Ga(t),se=t.gutter=C("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?A.fixedPos:-A.gutterTotalWidth)+"px");if(e.display.input.setUneditable(se),re.insertBefore(se,t.text),t.line.gutterClass&&(se.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=se.appendChild(C("div",jr(e.options,R),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+A.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var me=e.display.gutterSpecs[ue].className,Ne=V.hasOwnProperty(me)&&V[me];Ne&&se.appendChild(C("div",[Ne],"CodeMirror-gutter-elt","left: "+A.gutterLeft[me]+"px; width: "+A.gutterWidth[me]+"px"))}}}function ur(e,t,R){t.alignable&&(t.alignable=null);for(var A=O("CodeMirror-linewidget"),U=t.node.firstChild,V=void 0;U;U=V)V=U.nextSibling,A.test(U.className)&&t.node.removeChild(U);tn(e,t,R)}function mn(e,t,R,A){var U=St(e,t);return t.text=t.node=U.pre,U.bgClass&&(t.bgClass=U.bgClass),U.textClass&&(t.textClass=U.textClass),qt(e,t),Ir(e,t,R,A),tn(e,t,A),t.node}function tn(e,t,R){if(Oa(e,t.line,t,R,!0),t.rest)for(var A=0;A<t.rest.length;A++)Oa(e,t.rest[A],t,R,!1)}function Oa(e,t,R,A,U){if(!t.widgets)return;for(var V=Ga(R),re=0,se=t.widgets;re<se.length;++re){var ue=se[re],me=C("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),Dn(ue,me,R,A),e.display.input.setUneditable(me),U&&ue.above?V.insertBefore(me,R.gutter||R.text):V.appendChild(me),lr(ue,"redraw")}}function Dn(e,t,R,A){if(e.noHScroll){(R.alignable||(R.alignable=[])).push(t);var U=A.wrapperWidth;t.style.left=A.fixedPos+"px",e.coverGutter||(U-=A.gutterTotalWidth,t.style.paddingLeft=A.gutterTotalWidth+"px"),t.style.width=U+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-A.gutterTotalWidth+"px"))}function kn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var R="position: relative;";e.coverGutter&&(R+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(R+="width: "+t.display.wrapper.clientWidth+"px;"),b(t.display.measure,C("div",[e.node],null,R))}return e.height=e.node.parentNode.offsetHeight}function Fn(e,t){for(var R=Re(t);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 Xa(e){return e.lineSpace.offsetTop}function De(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Be(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=b(e.measure,C("pre","x","CodeMirror-line-like")),R=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,A={left:parseInt(R.paddingLeft),right:parseInt(R.paddingRight)};return!isNaN(A.left)&&!isNaN(A.right)&&(e.cachedPaddingH=A),A}function Ke(e){return q-e.display.nativeBarWidth}function ke(e){return e.display.scroller.clientWidth-Ke(e)-e.display.barWidth}function fe(e){return e.display.scroller.clientHeight-Ke(e)-e.display.barHeight}function Oe(e,t,R){var A=e.options.lineWrapping,U=A&&ke(e);if(!t.measure.heights||A&&t.measure.width!=U){var V=t.measure.heights=[];if(A){t.measure.width=U;for(var re=t.text.firstChild.getClientRects(),se=0;se<re.length-1;se++){var ue=re[se],me=re[se+1];Math.abs(ue.bottom-me.bottom)>2&&V.push((ue.bottom+me.top)/2-R.top)}}V.push(R.bottom-R.top)}}function ve(e,t,R){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var A=0;A<e.rest.length;A++)if(e.rest[A]==t)return{map:e.measure.maps[A],cache:e.measure.caches[A]};for(var U=0;U<e.rest.length;U++)if(_t(e.rest[U])>R)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function Ie(e,t){t=zn(t);var R=_t(t),A=e.display.externalMeasured=new Or(e.doc,t,R);A.lineN=R;var U=A.built=hr(e,A);return A.text=U.pre,b(e.display.lineMeasure,U.pre),A}function je(e,t,R,A){return Qe(e,We(e,t),R,A)}function He(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[sn(e,t)];var R=e.display.externalMeasured;if(R&&t>=R.lineN&&t<R.lineN+R.size)return R}function We(e,t){var R=_t(t),A=He(e,R);A&&!A.text?A=null:A&&A.changes&&(za(e,A,R,En(e)),e.curOp.forceUpdate=!0),A||(A=Ie(e,t));var U=ve(A,t,R);return{line:t,view:A,rect:null,map:U.map,cache:U.cache,before:U.before,hasHeights:!1}}function Qe(e,t,R,A,U){t.before&&(R=-1);var V=R+(A||""),re;return t.cache.hasOwnProperty(V)?re=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Oe(e,t.view,t.rect),t.hasHeights=!0),re=bt(e,t,R,A),re.bogus||(t.cache[V]=re)),{left:re.left,right:re.right,top:U?re.rtop:re.top,bottom:U?re.rbottom:re.bottom}}var st={left:0,right:0,top:0,bottom:0};function pt(e,t,R){for(var A,U,V,re,se,ue,me=0;me<e.length;me+=3)if(se=e[me],ue=e[me+1],t<se?(U=0,V=1,re="left"):t<ue?(U=t-se,V=U+1):(me==e.length-3||t==ue&&e[me+3]>t)&&(V=ue-se,U=V-1,t>=ue&&(re="right")),U!=null){if(A=e[me+2],se==ue&&R==(A.insertLeft?"left":"right")&&(re=R),R=="left"&&U==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)A=e[(me-=3)+2],re="left";if(R=="right"&&U==ue-se)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:U,end:V,collapse:re,coverStart:se,coverEnd:ue}}function ht(e,t){var R=st;if(t=="left")for(var A=0;A<e.length&&!((R=e[A]).left!=R.right);A++);else for(var U=e.length-1;U>=0&&!((R=e[U]).left!=R.right);U--);return R}function bt(e,t,R,A){var U=pt(t.map,R,A),V=U.node,re=U.start,se=U.end,ue=U.collapse,me;if(V.nodeType==3){for(var Ne=0;Ne<4;Ne++){for(;re&&de(t.line.text.charAt(U.coverStart+re));)--re;for(;U.coverStart+se<U.coverEnd&&de(t.line.text.charAt(U.coverStart+se));)++se;if(S&&v<9&&re==0&&se==U.coverEnd-U.coverStart?me=V.parentNode.getBoundingClientRect():me=ht(j(V,re,se).getClientRects(),A),me.left||me.right||re==0)break;se=re,re=re-1,ue="right"}S&&v<11&&(me=Ut(e.display.measure,me))}else{re>0&&(ue=A="right");var Fe;e.options.lineWrapping&&(Fe=V.getClientRects()).length>1?me=Fe[A=="right"?Fe.length-1:0]:me=V.getBoundingClientRect()}if(S&&v<9&&!re&&(!me||!me.left&&!me.right)){var rt=V.parentNode.getClientRects()[0];rt?me={left:rt.left,right:rt.left+Vn(e.display),top:rt.top,bottom:rt.bottom}:me=st}for(var qe=me.top-t.rect.top,lt=me.bottom-t.rect.top,dt=(qe+lt)/2,gt=t.view.measure.heights,xt=0;xt<gt.length-1&&!(dt<gt[xt]);xt++);var At=xt?gt[xt-1]:0,Et=gt[xt],Mt={left:(ue=="right"?me.right:me.left)-t.rect.left,right:(ue=="left"?me.left:me.right)-t.rect.left,top:At,bottom:Et};return!me.left&&!me.right&&(Mt.bogus=!0),e.options.singleCursorHeightPerLine||(Mt.rtop=qe,Mt.rbottom=lt),Mt}function Ut(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Rt(e))return t;var R=screen.logicalXDPI/screen.deviceXDPI,A=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*R,right:t.right*R,top:t.top*A,bottom:t.bottom*A}}function er(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function rr(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)er(e.display.view[t])}function ir(e){rr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function pr(){return r&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cr(){return r&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function or(e){var t=0;if(e.widgets)for(var R=0;R<e.widgets.length;++R)e.widgets[R].above&&(t+=kn(e.widgets[R]));return t}function Rr(e,t,R,A,U){if(!U){var V=or(t);R.top+=V,R.bottom+=V}if(A=="line")return R;A||(A="local");var re=na(t);if(A=="local"?re+=Xa(e.display):re-=e.display.viewOffset,A=="page"||A=="window"){var se=e.display.lineSpace.getBoundingClientRect();re+=se.top+(A=="window"?0:cr());var ue=se.left+(A=="window"?0:pr());R.left+=ue,R.right+=ue}return R.top+=re,R.bottom+=re,R}function br(e,t,R){if(R=="div")return t;var A=t.left,U=t.top;if(R=="page")A-=pr(),U-=cr();else if(R=="local"||!R){var V=e.display.sizer.getBoundingClientRect();A+=V.left,U+=V.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:A-re.left,top:U-re.top}}function vn(e,t,R,A,U){return A||(A=mt(e.doc,t.line)),Rr(e,A,je(e,A,t.ch,U),R)}function xr(e,t,R,A,U,V){A=A||mt(e.doc,t.line),U||(U=We(e,A));function re(lt,dt){var gt=Qe(e,U,lt,dt?"right":"left",V);return dt?gt.left=gt.right:gt.right=gt.left,Rr(e,A,gt,R)}var se=nt(A,e.doc.direction),ue=t.ch,me=t.sticky;if(ue>=A.text.length?(ue=A.text.length,me="before"):ue<=0&&(ue=0,me="after"),!se)return re(me=="before"?ue-1:ue,me=="before");function Ne(lt,dt,gt){var xt=se[dt],At=xt.level==1;return re(gt?lt-1:lt,At!=gt)}var Fe=$e(se,ue,me),rt=Je,qe=Ne(ue,Fe,me=="before");return rt!=null&&(qe.other=Ne(ue,rt,me!="before")),qe}function Xt(e,t){var R=0;t=Ot(e.doc,t),e.options.lineWrapping||(R=Vn(e.display)*t.ch);var A=mt(e.doc,t.line),U=na(A)+Xa(e.display);return{left:R,right:R,top:U,bottom:U+A.height}}function Ht(e,t,R,A,U){var V=ct(e,t,R);return V.xRel=U,A&&(V.outside=A),V}function Sr(e,t,R){var A=e.doc;if(R+=e.display.viewOffset,R<0)return Ht(A.first,0,null,-1,-1);var U=vr(A,R),V=A.first+A.size-1;if(U>V)return Ht(A.first+A.size-1,mt(A,V).text.length,null,1,1);t<0&&(t=0);for(var re=mt(A,U);;){var se=gn(e,re,U,t,R),ue=Ma(re,se.ch+(se.xRel>0||se.outside>0?1:0));if(!ue)return se;var me=ue.find(1);if(me.line==U)return me;re=mt(A,U=me.line)}}function Dr(e,t,R,A){A-=or(t);var U=t.text.length,V=ze(function(re){return Qe(e,R,re-1).bottom<=A},U,0);return U=ze(function(re){return Qe(e,R,re).top>A},V,U),{begin:V,end:U}}function Nt(e,t,R,A){R||(R=We(e,t));var U=Rr(e,t,Qe(e,R,A),"line").top;return Dr(e,t,R,U)}function Pr(e,t,R,A){return e.bottom<=R?!1:e.top>R?!0:(A?e.left:e.right)>t}function gn(e,t,R,A,U){U-=na(t);var V=We(e,t),re=or(t),se=0,ue=t.text.length,me=!0,Ne=nt(t,e.doc.direction);if(Ne){var Fe=(e.options.lineWrapping?Qr:Ur)(e,t,R,V,Ne,A,U);me=Fe.level!=1,se=me?Fe.from:Fe.to-1,ue=me?Fe.to:Fe.from-1}var rt=null,qe=null,lt=ze(function(Yt){var Kt=Qe(e,V,Yt);return Kt.top+=re,Kt.bottom+=re,Pr(Kt,A,U,!1)?(Kt.top<=U&&Kt.left<=A&&(rt=Yt,qe=Kt),!0):!1},se,ue),dt,gt,xt=!1;if(qe){var At=A-qe.left<qe.right-A,Et=At==me;lt=rt+(Et?0:1),gt=Et?"after":"before",dt=At?qe.left:qe.right}else{!me&&(lt==ue||lt==se)&<++,gt=lt==0?"after":lt==t.text.length?"before":Qe(e,V,lt-(me?1:0)).bottom+re<=U==me?"after":"before";var Mt=xr(e,ct(R,lt,gt),"line",t,V);dt=Mt.left,xt=U<Mt.top?-1:U>=Mt.bottom?1:0}return lt=Te(t.text,lt,1),Ht(R,lt,gt,xt,A-dt)}function Ur(e,t,R,A,U,V,re){var se=ze(function(Fe){var rt=U[Fe],qe=rt.level!=1;return Pr(xr(e,ct(R,qe?rt.to:rt.from,qe?"before":"after"),"line",t,A),V,re,!0)},0,U.length-1),ue=U[se];if(se>0){var me=ue.level!=1,Ne=xr(e,ct(R,me?ue.from:ue.to,me?"after":"before"),"line",t,A);Pr(Ne,V,re,!0)&&Ne.top>re&&(ue=U[se-1])}return ue}function Qr(e,t,R,A,U,V,re){var se=Dr(e,t,A,re),ue=se.begin,me=se.end;/\s/.test(t.text.charAt(me-1))&&me--;for(var Ne=null,Fe=null,rt=0;rt<U.length;rt++){var qe=U[rt];if(qe.from>=me||qe.to<=ue)continue;var lt=qe.level!=1,dt=Qe(e,A,lt?Math.min(me,qe.to)-1:Math.max(ue,qe.from)).right,gt=dt<V?V-dt+1e9:dt-V;(!Ne||Fe>gt)&&(Ne=qe,Fe=gt)}return Ne||(Ne=U[U.length-1]),Ne.from<ue&&(Ne={from:ue,to:Ne.to,level:Ne.level}),Ne.to>me&&(Ne={from:Ne.from,to:me,level:Ne.level}),Ne}var Xr;function Ln(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Xr==null){Xr=C("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Xr.appendChild(document.createTextNode("x")),Xr.appendChild(C("br"));Xr.appendChild(document.createTextNode("x"))}b(e.measure,Xr);var R=Xr.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),x(e.measure),R||1}function Vn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=C("span","xxxxxxxxxx"),R=C("pre",[t],"CodeMirror-line-like");b(e.measure,R);var A=t.getBoundingClientRect(),U=(A.right-A.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function En(e){for(var t=e.display,R={},A={},U=t.gutters.clientLeft,V=t.gutters.firstChild,re=0;V;V=V.nextSibling,++re){var se=e.display.gutterSpecs[re].className;R[se]=V.offsetLeft+V.clientLeft+U,A[se]=V.clientWidth}return{fixedPos:ya(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:R,gutterWidth:A,wrapperWidth:t.wrapper.clientWidth}}function ya(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ua(e){var t=Ln(e.display),R=e.options.lineWrapping,A=R&&Math.max(5,e.display.scroller.clientWidth/Vn(e.display)-3);return function(U){if(Xn(e.doc,U))return 0;var V=0;if(U.widgets)for(var re=0;re<U.widgets.length;re++)U.widgets[re].height&&(V+=U.widgets[re].height);return R?V+(Math.ceil(U.text.length/A)||1)*t:V+t}}function Ea(e){var t=e.doc,R=Ua(e);t.iter(function(A){var U=R(A);U!=A.height&&It(A,U)})}function Yn(e,t,R,A){var U=e.display;if(!R&&Re(t).getAttribute("cm-not-content")=="true")return null;var V,re,se=U.lineSpace.getBoundingClientRect();try{V=t.clientX-se.left,re=t.clientY-se.top}catch(Fe){return null}var ue=Sr(e,V,re),me;if(A&&ue.xRel>0&&(me=mt(e.doc,ue.line).text).length==ue.ch){var Ne=W(me,me.length,e.options.tabSize)-me.length;ue=ct(ue.line,Math.max(0,Math.round((V-Be(e.display).left)/Vn(e.display))-Ne))}return ue}function sn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var R=e.display.view,A=0;A<R.length;A++)if(t-=R[A].size,t<0)return A}function Zr(e,t,R,A){t==null&&(t=e.doc.first),R==null&&(R=e.doc.first+e.doc.size),A||(A=0);var U=e.display;if(A&&R<U.viewTo&&(U.updateLineNumbers==null||U.updateLineNumbers>t)&&(U.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=U.viewTo)Ft&&ma(e.doc,t)<U.viewTo&&yn(e);else if(R<=U.viewFrom)Ft&&Gn(e.doc,R+A)>U.viewFrom?yn(e):(U.viewFrom+=A,U.viewTo+=A);else if(t<=U.viewFrom&&R>=U.viewTo)yn(e);else if(t<=U.viewFrom){var V=Fa(e,R,R+A,1);V?(U.view=U.view.slice(V.index),U.viewFrom=V.lineN,U.viewTo+=A):yn(e)}else if(R>=U.viewTo){var re=Fa(e,t,t,-1);re?(U.view=U.view.slice(0,re.index),U.viewTo=re.lineN):yn(e)}else{var se=Fa(e,t,t,-1),ue=Fa(e,R,R+A,1);se&&ue?(U.view=U.view.slice(0,se.index).concat(_n(e,se.lineN,ue.lineN)).concat(U.view.slice(ue.index)),U.viewTo+=A):yn(e)}var me=U.externalMeasured;me&&(R<me.lineN?me.lineN+=A:t<me.lineN+me.size&&(U.externalMeasured=null))}function wn(e,t,R){e.curOp.viewChanged=!0;var A=e.display,U=e.display.externalMeasured;if(U&&t>=U.lineN&&t<U.lineN+U.size&&(A.externalMeasured=null),t<A.viewFrom||t>=A.viewTo)return;var V=A.view[sn(e,t)];if(V.node==null)return;var re=V.changes||(V.changes=[]);ee(re,R)==-1&&re.push(R)}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fa(e,t,R,A){var U=sn(e,t),V,re=e.display.view;if(!Ft||R==e.doc.first+e.doc.size)return{index:U,lineN:R};for(var se=e.display.viewFrom,ue=0;ue<U;ue++)se+=re[ue].size;if(se!=t){if(A>0){if(U==re.length-1)return null;V=se+re[U].size-t,U++}else V=se-t;t+=V,R+=V}for(;ma(e.doc,R)!=R;){if(U==(A<0?0:re.length-1))return null;R+=A*re[U-(A<0?1:0)].size,U+=A}return{index:U,lineN:R}}function ei(e,t,R){var A=e.display,U=A.view;U.length==0||t>=A.viewTo||R<=A.viewFrom?(A.view=_n(e,t,R),A.viewFrom=t):(A.viewFrom>t?A.view=_n(e,t,A.viewFrom).concat(A.view):A.viewFrom<t&&(A.view=A.view.slice(sn(e,t))),A.viewFrom=t,A.viewTo<R?A.view=A.view.concat(_n(e,A.viewTo,R)):A.viewTo>R&&(A.view=A.view.slice(0,sn(e,R)))),A.viewTo=R}function ti(e){for(var t=e.display.view,R=0,A=0;A<t.length;A++){var U=t[A];!U.hidden&&(!U.node||U.changes)&&++R}return R}function Vr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Va(e,t){t===void 0&&(t=!0);for(var R=e.doc,A={},U=A.cursors=document.createDocumentFragment(),V=A.selection=document.createDocumentFragment(),re=0;re<R.sel.ranges.length;re++){if(!t&&re==R.sel.primIndex)continue;var se=R.sel.ranges[re];if(se.from().line>=e.display.viewTo||se.to().line<e.display.viewFrom)continue;var ue=se.empty();(ue||e.options.showCursorWhenSelecting)&&ri(e,se.head,U),ue||Gr(e,se,V)}return A}function ri(e,t,R){var A=xr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),U=R.appendChild(C("div","\xA0","CodeMirror-cursor"));if(U.style.left=A.left+"px",U.style.top=A.top+"px",U.style.height=Math.max(0,A.bottom-A.top)*e.options.cursorHeight+"px",A.other){var V=R.appendChild(C("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 rn(e,t){return e.top-t.top||e.left-t.left}function Gr(e,t,R){var A=e.display,U=e.doc,V=document.createDocumentFragment(),re=Be(e.display),se=re.left,ue=Math.max(A.sizerWidth,ke(e)-A.sizer.offsetLeft)-re.right,me=U.direction=="ltr";function Ne(Et,Mt,Yt,Kt){Mt<0&&(Mt=0),Mt=Math.round(Mt),Kt=Math.round(Kt),V.appendChild(C("div",null,"CodeMirror-selected","position: absolute; left: "+Et+`px;
|
|
|
top: `+Mt+"px; width: "+(Yt==null?ue-Et:Yt)+`px;
|
|
|
height: `+(Kt-Mt)+"px"))}function Fe(Et,Mt,Yt){var Kt=mt(U,Et),yr=Kt.text.length,ln,oa;function On(Bn,Da){return vn(e,ct(Et,Bn),"div",Kt,Da)}function Ia(Bn,Da,ca){var Zn=Nt(e,Kt,null,Bn),Wn=Da=="ltr"==(ca=="after")?"left":"right",Mn=ca=="after"?Zn.begin:Zn.end-(/\s/.test(Kt.text.charAt(Zn.end-1))?2:1);return On(Mn,Wn)[Wn]}var Ra=nt(Kt,U.direction);return Ze(Ra,Mt||0,Yt==null?yr:Yt,function(Bn,Da,ca,Zn){var Wn=ca=="ltr",Mn=On(Bn,Wn?"left":"right"),La=On(Da-1,Wn?"right":"left"),Zi=Mt==null&&Bn==0,_i=Yt==null&&Da==yr,xa=Zn==0,si=!Ra||Zn==Ra.length-1;if(La.top-Mn.top<=3){var sa=(me?Zi:_i)&&xa,ps=(me?_i:Zi)&&si,vi=sa?se:(Wn?Mn:La).left,Mi=ps?ue:(Wn?La:Mn).right;Ne(vi,Mn.top,Mi-vi,Mn.bottom)}else{var Pi,Ca,qi,ms;Wn?(Pi=me&&Zi&&xa?se:Mn.left,Ca=me?ue:Ia(Bn,ca,"before"),qi=me?se:Ia(Da,ca,"after"),ms=me&&_i&&si?ue:La.right):(Pi=me?Ia(Bn,ca,"before"):se,Ca=!me&&Zi&&xa?ue:Mn.right,qi=!me&&_i&&si?se:La.left,ms=me?Ia(Da,ca,"after"):ue),Ne(Pi,Mn.top,Ca-Pi,Mn.bottom),Mn.bottom<La.top&&Ne(se,Mn.bottom,null,La.top),Ne(qi,La.top,ms-qi,La.bottom)}(!ln||rn(Mn,ln)<0)&&(ln=Mn),rn(La,ln)<0&&(ln=La),(!oa||rn(Mn,oa)<0)&&(oa=Mn),rn(La,oa)<0&&(oa=La)}),{start:ln,end:oa}}var rt=t.from(),qe=t.to();if(rt.line==qe.line)Fe(rt.line,rt.ch,qe.ch);else{var lt=mt(U,rt.line),dt=mt(U,qe.line),gt=zn(lt)==zn(dt),xt=Fe(rt.line,rt.ch,gt?lt.text.length+1:null).end,At=Fe(qe.line,gt?0:null,qe.ch).start;gt&&(xt.top<At.top-2?(Ne(xt.right,xt.top,null,xt.bottom),Ne(se,At.top,At.left,At.bottom)):Ne(xt.right,xt.top,At.left-xt.right,xt.bottom)),xt.bottom<At.top&&Ne(se,xt.bottom,null,At.top)}R.appendChild(V)}function $n(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var R=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||gi(e),t.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Co(e){e.state.focused||(e.display.input.focus(),ni(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,gi(e))},100)}function ni(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ue(e,"focus",e,t),e.state.focused=!0,G(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),o&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),$n(e)}function gi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ue(e,"blur",e,t),e.state.focused=!1,f(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ki(e){for(var t=e.display,R=t.lineDiv.offsetTop,A=0;A<t.view.length;A++){var U=t.view[A],V=e.options.lineWrapping,re=void 0,se=0;if(U.hidden)continue;if(S&&v<8){var ue=U.node.offsetTop+U.node.offsetHeight;re=ue-R,R=ue}else{var me=U.node.getBoundingClientRect();re=me.bottom-me.top,!V&&U.text.firstChild&&(se=U.text.firstChild.getBoundingClientRect().right-me.left-1)}var Ne=U.line.height-re;if((Ne>.005||Ne<-.005)&&(It(U.line,re),to(U.line),U.rest))for(var Fe=0;Fe<U.rest.length;Fe++)to(U.rest[Fe]);if(se>e.display.sizerWidth){var rt=Math.ceil(se/Vn(e.display));rt>e.display.maxLineLength&&(e.display.maxLineLength=rt,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var R=e.widgets[t],A=R.node.parentNode;A&&(R.height=A.offsetHeight)}}function Ii(e,t,R){var A=R&&R.top!=null?Math.max(0,R.top):e.scroller.scrollTop;A=Math.floor(A-Xa(e));var U=R&&R.bottom!=null?R.bottom:A+e.wrapper.clientHeight,V=vr(t,A),re=vr(t,U);if(R&&R.ensure){var se=R.ensure.from.line,ue=R.ensure.to.line;se<V?(V=se,re=vr(t,na(mt(t,se))+e.wrapper.clientHeight)):Math.min(ue,t.lastLine())>=re&&(V=vr(t,na(mt(t,ue))-e.wrapper.clientHeight),re=ue)}return{from:V,to:Math.max(re,V+1)}}function Vo(e,t){if(Ve(e,"scrollCursorIntoView"))return;var R=e.display,A=R.sizer.getBoundingClientRect(),U=null;if(t.top+A.top<0?U=!0:t.bottom+A.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!w){var V=C("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-R.viewOffset-Xa(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+Ke(e)+R.barHeight)+`px;
|
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(U),e.display.lineSpace.removeChild(V)}}function Yo(e,t,R,A){A==null&&(A=0);var U;!e.options.lineWrapping&&t==R&&(t=t.ch?ct(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,R=t.sticky=="before"?ct(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var re=!1,se=xr(e,t),ue=!R||R==t?se:xr(e,R);U={left:Math.min(se.left,ue.left),top:Math.min(se.top,ue.top)-A,right:Math.max(se.left,ue.left),bottom:Math.max(se.bottom,ue.bottom)+A};var me=ro(e,U),Ne=e.doc.scrollTop,Fe=e.doc.scrollLeft;if(me.scrollTop!=null&&(xi(e,me.scrollTop),Math.abs(e.doc.scrollTop-Ne)>1&&(re=!0)),me.scrollLeft!=null&&(Ba(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-Fe)>1&&(re=!0)),!re)break}return U}function _o(e,t){var R=ro(e,t);R.scrollTop!=null&&xi(e,R.scrollTop),R.scrollLeft!=null&&Ba(e,R.scrollLeft)}function ro(e,t){var R=e.display,A=Ln(e.display);t.top<0&&(t.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,V=fe(e),re={};t.bottom-t.top>V&&(t.bottom=t.top+V);var se=e.doc.height+De(R),ue=t.top<A,me=t.bottom>se-A;if(t.top<U)re.scrollTop=ue?0:t.top;else if(t.bottom>U+V){var Ne=Math.min(t.top,(me?se:t.bottom)-V);Ne!=U&&(re.scrollTop=Ne)}var Fe=e.options.fixedGutter?0:R.gutters.offsetWidth,rt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-Fe,qe=ke(e)-R.gutters.offsetWidth,lt=t.right-t.left>qe;return lt&&(t.right=t.left+qe),t.left<10?re.scrollLeft=0:t.left<rt?re.scrollLeft=Math.max(0,t.left+Fe-(lt?0:10)):t.right>qe+rt-3&&(re.scrollLeft=t.right+(lt?0:10)-qe),re}function no(e,t){if(t==null)return;Ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function yi(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function bi(e,t,R){(t!=null||R!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),R!=null&&(e.curOp.scrollTop=R)}function $o(e,t){Ni(e),e.curOp.scrollToPos=t}function Ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var R=Xt(e,t.from),A=Xt(e,t.to);Oi(e,R,A,t.margin)}}function Oi(e,t,R,A){var U=ro(e,{left:Math.min(t.left,R.left),top:Math.min(t.top,R.top)-A,right:Math.max(t.right,R.right),bottom:Math.max(t.bottom,R.bottom)+A});bi(e,U.scrollLeft,U.scrollTop)}function xi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;_||Di(e,{top:t}),Ei(e,t,!0),_&&Di(e),Ri(e,100)}function Ei(e,t,R){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!R)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Ba(e,t,R,A){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!A)return;e.doc.scrollLeft=t,Cr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ci(e){var t=e.display,R=t.gutters.offsetWidth,A=Math.round(e.doc.height+De(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:A,scrollHeight:A+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:R}}var ai=function(e,t,R){this.cm=R;var A=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");A.tabIndex=U.tabIndex=-1,e(A),e(U),Ce(A,"scroll",function(){A.clientHeight&&t(A.scrollTop,"vertical")}),Ce(U,"scroll",function(){U.clientWidth&&t(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ai.prototype.update=function(e){var t=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=t?A+"px":"0";var U=e.viewHeight-(t?A:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+U)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){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:t?A:0}},ai.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ai.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ai.prototype.zeroWidthHack=function(){var e=l&&!g?"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},ai.prototype.enableZeroWidthBar=function(e,t,R){e.style.pointerEvents="auto";function A(){var U=e.getBoundingClientRect(),V=R=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,A)}t.set(1e3,A)},ai.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ai=function(){};Ai.prototype.update=function(){return{bottom:0,right:0}},Ai.prototype.setScrollLeft=function(){},Ai.prototype.setScrollTop=function(){},Ai.prototype.clear=function(){};function di(e,t){t||(t=ci(e));var R=e.display.barWidth,A=e.display.barHeight;ji(e,t);for(var U=0;U<4&&R!=e.display.barWidth||A!=e.display.barHeight;U++)R!=e.display.barWidth&&e.options.lineWrapping&&ki(e),ji(e,ci(e)),R=e.display.barWidth,A=e.display.barHeight}function ji(e,t){var R=e.display,A=R.scrollbars.update(t);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=t.gutterWidth+"px"):R.gutterFiller.style.display=""}var ao={native:ai,null:Ai};function Ui(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&f(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ao[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,R){R=="horizontal"?Ba(e,t):xi(e,t)},e),e.display.scrollbars.addClass&&G(e.display.wrapper,e.display.scrollbars.addClass)}var io=0;function ii(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:++io},la(e.curOp)}function fi(e){var t=e.curOp;t&&Ar(t,function(R){for(var A=0;A<R.ops.length;A++)R.ops[A].cm.curOp=null;Oo(R)})}function Oo(e){for(var t=e.ops,R=0;R<t.length;R++)Jo(t[R]);for(var A=0;A<t.length;A++)Qo(t[A]);for(var U=0;U<t.length;U++)Zo(t[U]);for(var V=0;V<t.length;V++)oo(t[V]);for(var re=0;re<t.length;re++)qo(t[re])}function Jo(e){var t=e.cm,R=t.display;Ao(t),e.updateMaxLine&&ja(t),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&&t.options.lineWrapping,e.update=e.mustUpdate&&new Wa(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&hi(e.cm,e.update)}function Zo(e){var t=e.cm,R=t.display;e.updatedDisplay&&ki(t),e.barMeasure=ci(t),R.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=je(t,R.maxLine,R.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-ke(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function oo(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ba(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var R=e.focus&&e.focus==z();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,R),(e.updatedDisplay||e.startHeight!=t.doc.height)&&di(t,e.barMeasure),e.updatedDisplay&&zr(t,e.barMeasure),e.selectionChanged&&$n(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),R&&Co(e.cm)}function qo(e){var t=e.cm,R=t.display,A=t.doc;if(e.updatedDisplay&&Fi(t,e.update),R.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(R.wheelStartX=R.wheelStartY=null),e.scrollTop!=null&&Ei(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Ba(t,e.scrollLeft,!0,!0),e.scrollToPos){var U=Yo(t,Ot(A,e.scrollToPos.from),Ot(A,e.scrollToPos.to),e.scrollToPos.margin);Vo(t,U)}var V=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(V)for(var se=0;se<V.length;++se)V[se].lines.length||Ue(V[se],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&Ue(re[ue],"unhide");R.wrapper.offsetHeight&&(A.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ue(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function wa(e,t){if(e.curOp)return t();ii(e);try{return t()}finally{fi(e)}}function In(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ii(e);try{return t.apply(e,arguments)}finally{fi(e)}}}function ua(e){return function(){if(this.curOp)return e.apply(this,arguments);ii(this);try{return e.apply(this,arguments)}finally{fi(this)}}}function Nn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ii(t);try{return e.apply(this,arguments)}finally{fi(t)}}}function Ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,F(es,e))}function es(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var R=+new Date+e.options.workTime,A=bn(e,t.highlightFrontier),U=[];t.iter(A.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(A.line>=e.display.viewFrom){var re=V.styles,se=V.text.length>e.options.maxHighlightLength?Er(t.mode,A.state):null,ue=ea(e,V,A,!0);se&&(A.state=se),V.styles=ue.styles;var me=V.styleClasses,Ne=ue.classes;Ne?V.styleClasses=Ne:me&&(V.styleClasses=null);for(var Fe=!re||re.length!=V.styles.length||me!=Ne&&(!me||!Ne||me.bgClass!=Ne.bgClass||me.textClass!=Ne.textClass),rt=0;!Fe&&rt<re.length;++rt)Fe=re[rt]!=V.styles[rt];Fe&&U.push(A.line),V.stateAfter=A.save(),A.nextLine()}else V.text.length<=e.options.maxHighlightLength&&da(e,V.text,A),V.stateAfter=A.line%5==0?A.save():null,A.nextLine();if(+new Date>R)return Ri(e,e.options.workDelay),!0}),t.highlightFrontier=A.line,t.modeFrontier=Math.max(t.modeFrontier,A.line),U.length&&wa(e,function(){for(var V=0;V<U.length;V++)wn(e,U[V],"text")})}var Wa=function(e,t,R){var A=e.display;this.viewport=t,this.visible=Ii(A,e.doc,t),this.editorIsHidden=!A.wrapper.offsetWidth,this.wrapperHeight=A.wrapper.clientHeight,this.wrapperWidth=A.wrapper.clientWidth,this.oldDisplayWidth=ke(e),this.force=R,this.dims=En(e),this.events=[]};Wa.prototype.signal=function(e,t){we(e,t)&&this.events.push(arguments)},Wa.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ue.apply(null,this.events[e])};function Ao(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ke(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ke(e)+"px",t.scrollbarsClipped=!0)}function Ro(e){if(e.hasFocus())return null;var t=z();if(!t||!M(e.display.lineDiv,t))return null;var R={activeElt:t};if(window.getSelection){var A=window.getSelection();A.anchorNode&&A.extend&&M(e.display.lineDiv,A.anchorNode)&&(R.anchorNode=A.anchorNode,R.anchorOffset=A.anchorOffset,R.focusNode=A.focusNode,R.focusOffset=A.focusOffset)}return R}function Do(e){if(!e||!e.activeElt||e.activeElt==z())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode)){var t=window.getSelection(),R=document.createRange();R.setEnd(e.anchorNode,e.anchorOffset),R.collapse(!1),t.removeAllRanges(),t.addRange(R),t.extend(e.focusNode,e.focusOffset)}}function hi(e,t){var R=e.display,A=e.doc;if(t.editorIsHidden)return yn(e),!1;if(!t.force&&t.visible.from>=R.viewFrom&&t.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&ti(e)==0)return!1;Jn(e)&&(yn(e),t.dims=En(e));var U=A.first+A.size,V=Math.max(t.visible.from-e.options.viewportMargin,A.first),re=Math.min(U,t.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(U,R.viewTo)),Ft&&(V=ma(e.doc,V),re=Gn(e.doc,re));var se=V!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=t.wrapperHeight||R.lastWrapWidth!=t.wrapperWidth;ei(e,V,re),R.viewOffset=na(mt(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ue=ti(e);if(!se&&ue==0&&!t.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var me=Ro(e);return ue>4&&(R.lineDiv.style.display="none"),Lo(e,R.updateLineNumbers,t.dims),ue>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,Do(me),x(R.cursorDiv),x(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,se&&(R.lastWrapHeight=t.wrapperHeight,R.lastWrapWidth=t.wrapperWidth,Ri(e,400)),R.updateLineNumbers=null,!0}function Fi(e,t){for(var R=t.viewport,A=!0;;A=!1){if(!A||!e.options.lineWrapping||t.oldDisplayWidth==ke(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+De(e.display)-fe(e),R.top)}),t.visible=Ii(e.display,e.doc,R),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else A&&(t.visible=Ii(e.display,e.doc,R));if(!hi(e,t))break;ki(e);var U=ci(e);Vr(e),di(e,U),zr(e,U),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Di(e,t){var R=new Wa(e,t);if(hi(e,R)){ki(e),Fi(e,R);var A=ci(e);Vr(e),di(e,A),zr(e,A),R.finish()}}function Lo(e,t,R){var A=e.display,U=e.options.lineNumbers,V=A.lineDiv,re=V.firstChild;function se(lt){var dt=lt.nextSibling;return o&&l&&e.display.currentWheelTarget==lt?lt.style.display="none":lt.parentNode.removeChild(lt),dt}for(var ue=A.view,me=A.viewFrom,Ne=0;Ne<ue.length;Ne++){var Fe=ue[Ne];if(!Fe.hidden)if(!Fe.node||Fe.node.parentNode!=V){var rt=mn(e,Fe,me,R);V.insertBefore(rt,re)}else{for(;re!=Fe.node;)re=se(re);var qe=U&&t!=null&&t<=me&&Fe.lineNumber;Fe.changes&&(ee(Fe.changes,"gutter")>-1&&(qe=!1),za(e,Fe,me,R)),qe&&(x(Fe.lineNumber),Fe.lineNumber.appendChild(document.createTextNode(jr(e.options,me)))),re=Fe.node.nextSibling}me+=Fe.size}for(;re;)re=se(re)}function Bi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function zr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ke(e)+"px"}function Cr(e){var t=e.display,R=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var A=ya(t)-t.scroller.scrollLeft+e.doc.scrollLeft,U=t.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 se=R[re].alignable;if(se)for(var ue=0;ue<se.length;ue++)se[ue].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=A+U+"px")}function Jn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,R=jr(e.options,t.first+t.size-1),A=e.display;if(R.length!=A.lineNumChars){var U=A.measure.appendChild(C("div",[C("div",R)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=U.firstChild.offsetWidth,re=U.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",Bi(e.display),!0}return!1}function Ta(e,t){for(var R=[],A=!1,U=0;U<e.length;U++){var V=e[U],re=null;if(typeof V!="string"&&(re=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)A=!0;else continue;R.push({className:V,style:re})}return t&&!A&&R.push({className:"CodeMirror-linenumbers",style:null}),R}function wi(e){var t=e.gutters,R=e.gutterSpecs;x(t),e.lineGutter=null;for(var A=0;A<R.length;++A){var U=R[A],V=U.className,re=U.style,se=t.appendChild(C("div",null,"CodeMirror-gutter "+V));re&&(se.style.cssText=re),V=="CodeMirror-linenumbers"&&(e.lineGutter=se,se.style.width=(e.lineNumWidth||1)+"px")}t.style.display=R.length?"":"none",Bi(e)}function Ja(e){wi(e.display),Zr(e),Cr(e)}function Li(e,t,R,A){var U=this;this.input=R,U.scrollbarFiller=C("div",null,"CodeMirror-scrollbar-filler"),U.scrollbarFiller.setAttribute("cm-not-content","true"),U.gutterFiller=C("div",null,"CodeMirror-gutter-filler"),U.gutterFiller.setAttribute("cm-not-content","true"),U.lineDiv=I("div",null,"CodeMirror-code"),U.selectionDiv=C("div",null,null,"position: relative; z-index: 1"),U.cursorDiv=C("div",null,"CodeMirror-cursors"),U.measure=C("div",null,"CodeMirror-measure"),U.lineMeasure=C("div",null,"CodeMirror-measure"),U.lineSpace=I("div",[U.measure,U.lineMeasure,U.selectionDiv,U.cursorDiv,U.lineDiv],null,"position: relative; outline: none");var V=I("div",[U.lineSpace],"CodeMirror-lines");U.mover=C("div",[V],null,"position: relative"),U.sizer=C("div",[U.mover],"CodeMirror-sizer"),U.sizerWidth=null,U.heightForcer=C("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),U.gutters=C("div",null,"CodeMirror-gutters"),U.lineGutter=null,U.scroller=C("div",[U.sizer,U.heightForcer,U.gutters],"CodeMirror-scroll"),U.scroller.setAttribute("tabIndex","-1"),U.wrapper=C("div",[U.scrollbarFiller,U.gutterFiller,U.scroller],"CodeMirror"),S&&v<8&&(U.gutters.style.zIndex=-1,U.scroller.style.paddingRight=0),!o&&!(_&&n)&&(U.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(U.wrapper):e(U.wrapper)),U.viewFrom=U.viewTo=t.first,U.reportedViewFrom=U.reportedViewTo=t.first,U.view=[],U.renderedView=null,U.externalMeasured=null,U.viewOffset=0,U.lastWrapHeight=U.lastWrapWidth=0,U.updateLineNumbers=null,U.nativeBarWidth=U.barHeight=U.barWidth=0,U.scrollbarsClipped=!1,U.lineNumWidth=U.lineNumInnerWidth=U.lineNumChars=null,U.alignWidgets=!1,U.cachedCharWidth=U.cachedTextHeight=U.cachedPaddingH=null,U.maxLine=null,U.maxLineLength=0,U.maxLineChanged=!1,U.wheelDX=U.wheelDY=U.wheelStartX=U.wheelStartY=null,U.shift=!1,U.selForContextMenu=null,U.activeTouch=null,U.gutterSpecs=Ta(A.gutters,A.lineNumbers),wi(U),R.init(U)}var oi=0,Qn=null;S?Qn=-.53:_?Qn=15:r?Qn=-.7:y&&(Qn=-1/3);function Wi(e){var t=e.wheelDeltaX,R=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),R==null&&e.detail&&e.axis==e.VERTICAL_AXIS?R=e.detail:R==null&&(R=e.wheelDelta),{x:t,y:R}}function so(e){var t=Wi(e);return t.x*=Qn,t.y*=Qn,t}function lo(e,t){var R=Wi(t),A=R.x,U=R.y,V=e.display,re=V.scroller,se=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(!(A&&se||U&&ue))return;if(U&&l&&o){e:for(var me=t.target,Ne=V.view;me!=re;me=me.parentNode)for(var Fe=0;Fe<Ne.length;Fe++)if(Ne[Fe].node==me){e.display.currentWheelTarget=me;break e}}if(A&&!_&&!h&&Qn!=null){U&&ue&&xi(e,Math.max(0,re.scrollTop+U*Qn)),Ba(e,Math.max(0,re.scrollLeft+A*Qn)),(!U||U&&ue)&&ce(t),V.wheelStartX=null;return}if(U&&Qn!=null){var rt=U*Qn,qe=e.doc.scrollTop,lt=qe+V.wrapper.clientHeight;rt<0?qe=Math.max(0,qe+rt-50):lt=Math.min(e.doc.height,lt+rt+50),Di(e,{top:qe,bottom:lt})}oi<20&&(V.wheelStartX==null?(V.wheelStartX=re.scrollLeft,V.wheelStartY=re.scrollTop,V.wheelDX=A,V.wheelDY=U,setTimeout(function(){if(V.wheelStartX==null)return;var dt=re.scrollLeft-V.wheelStartX,gt=re.scrollTop-V.wheelStartY,xt=gt&&V.wheelDY&>/V.wheelDY||dt&&V.wheelDX&&dt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!xt)return;Qn=(Qn*oi+xt)/(oi+1),++oi},200)):(V.wheelDX+=A,V.wheelDY+=U))}var Sa=function(e,t){this.ranges=e,this.primIndex=t};Sa.prototype.primary=function(){return this.ranges[this.primIndex]},Sa.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var R=this.ranges[t],A=e.ranges[t];if(!Yr(R.anchor,A.anchor)||!Yr(R.head,A.head))return!1}return!0},Sa.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Wr(nn(this.ranges[t].anchor),nn(this.ranges[t].head));return new Sa(e,this.primIndex)},Sa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Sa.prototype.contains=function(e,t){t||(t=e);for(var R=0;R<this.ranges.length;R++){var A=this.ranges[R];if(Dt(t,A.from())>=0&&Dt(e,A.to())<=0)return R}return-1};var Wr=function(e,t){this.anchor=e,this.head=t};Wr.prototype.from=function(){return fn(this.anchor,this.head)},Wr.prototype.to=function(){return An(this.anchor,this.head)},Wr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ha(e,t,R){var A=e&&e.options.selectionsMayTouch,U=t[R];t.sort(function(rt,qe){return Dt(rt.from(),qe.from())}),R=ee(t,U);for(var V=1;V<t.length;V++){var re=t[V],se=t[V-1],ue=Dt(se.to(),re.from());if(A&&!re.empty()?ue>0:ue>=0){var me=fn(se.from(),re.from()),Ne=An(se.to(),re.to()),Fe=se.empty()?re.from()==re.head:se.from()==se.head;V<=R&&--R,t.splice(--V,2,new Wr(Fe?Ne:me,Fe?me:Ne))}}return new Sa(t,R)}function Qa(e,t){return new Sa([new Wr(e,t||e)],0)}function Za(e){return e.text?ct(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,t){if(Dt(e,t.from)<0)return e;if(Dt(e,t.to)<=0)return Za(t);var R=e.line+t.text.length-(t.to.line-t.from.line)-1,A=e.ch;return e.line==t.to.line&&(A+=Za(t).ch-t.to.ch),ct(R,A)}function Hi(e,t){for(var R=[],A=0;A<e.sel.ranges.length;A++){var U=e.sel.ranges[A];R.push(new Wr(uo(U.anchor,t),uo(U.head,t)))}return Ha(e.cm,R,e.sel.primIndex)}function Mo(e,t,R){return e.line==t.line?ct(R.line,e.ch-t.ch+R.ch):ct(R.line+(e.line-t.line),e.ch)}function Po(e,t,R){for(var A=[],U=ct(e.first,0),V=U,re=0;re<t.length;re++){var se=t[re],ue=Mo(se.from,U,V),me=Mo(Za(se),U,V);if(U=se.to,V=me,R=="around"){var Ne=e.sel.ranges[re],Fe=Dt(Ne.head,Ne.anchor)<0;A[re]=new Wr(Fe?me:ue,Fe?ue:me)}else A[re]=new Wr(ue,ue)}return new Sa(A,e.sel.primIndex)}function pi(e){e.doc.mode=Bt(e.options,e.doc.modeOption),co(e)}function co(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ri(e,100),e.state.modeGen++,e.curOp&&Zr(e)}function vs(e,t){return t.from.ch==0&&t.to.ch==0&&te(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,t,R,A){function U(At){return R?R[At]:null}function V(At,Et,Mt){Mr(At,Et,Mt,A),lr(At,"change",At,t)}function re(At,Et){for(var Mt=[],Yt=At;Yt<Et;++Yt)Mt.push(new aa(me[Yt],U(Yt),A));return Mt}var se=t.from,ue=t.to,me=t.text,Ne=mt(e,se.line),Fe=mt(e,ue.line),rt=te(me),qe=U(me.length-1),lt=ue.line-se.line;if(t.full)e.insert(0,re(0,me.length)),e.remove(me.length,e.size-me.length);else if(vs(e,t)){var dt=re(0,me.length-1);V(Fe,Fe.text,qe),lt&&e.remove(se.line,lt),dt.length&&e.insert(se.line,dt)}else if(Ne==Fe)if(me.length==1)V(Ne,Ne.text.slice(0,se.ch)+rt+Ne.text.slice(ue.ch),qe);else{var gt=re(1,me.length-1);gt.push(new aa(rt+Ne.text.slice(ue.ch),qe,A)),V(Ne,Ne.text.slice(0,se.ch)+me[0],U(0)),e.insert(se.line+1,gt)}else if(me.length==1)V(Ne,Ne.text.slice(0,se.ch)+me[0]+Fe.text.slice(ue.ch),U(0)),e.remove(se.line+1,lt);else{V(Ne,Ne.text.slice(0,se.ch)+me[0],U(0)),V(Fe,rt+Fe.text.slice(ue.ch),qe);var xt=re(1,me.length-1);lt>1&&e.remove(se.line+1,lt-1),e.insert(se.line+1,xt)}lr(e,"change",e,t)}function Ti(e,t,R){function A(U,V,re){if(U.linked)for(var se=0;se<U.linked.length;++se){var ue=U.linked[se];if(ue.doc==V)continue;var me=re&&ue.sharedHist;if(R&&!me)continue;t(ue.doc,me),A(ue.doc,U,me)}}A(e,null,!0)}function gs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ea(e),pi(e),ys(e),e.options.lineWrapping||ja(e),e.options.mode=t.modeOption,Zr(e)}function ys(e){(e.doc.direction=="rtl"?G:f)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){wa(e,function(){ys(e),Zr(e)})}function ko(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,t){var R={from:nn(t.from),to:Za(t),text:mr(e,t.from,t.to)};return Es(e,R,t.from.line,t.to.line+1),Ti(e,function(A){return Es(A,R,t.from.line,t.to.line+1)},!0),R}function bs(e){for(;e.length;){var t=te(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return bs(e.done),te(e.done);if(e.done.length&&!te(e.done).ranges)return te(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function xs(e,t,R,A){var U=e.history;U.undone.length=0;var V=+new Date,re,se;if((U.lastOp==A||U.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&U.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(re=ml(U,U.lastOp==A)))se=te(re.changes),Dt(t.from,t.to)==0&&Dt(t.from,se.to)==0?se.to=Za(t):re.changes.push(rs(e,t));else{var ue=te(U.done);for((!ue||!ue.ranges)&&Io(e.sel,U.done),re={changes:[rs(e,t)],generation:U.generation},U.done.push(re);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(R),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=V,U.lastOp=U.lastSelOp=A,U.lastOrigin=U.lastSelOrigin=t.origin,se||Ue(e,"historyAdded")}function vl(e,t,R,A){var U=t.charAt(0);return U=="*"||U=="+"&&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,t,R,A){var U=e.history,V=A&&A.origin;R==U.lastSelOp||V&&U.lastSelOrigin==V&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==V||vl(e,V,te(U.done),t))?U.done[U.done.length-1]=t:Io(t,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=V,U.lastSelOp=R,A&&A.clearRedo!==!1&&bs(U.undone)}function Io(e,t){var R=te(t);R&&R.ranges&&R.equals(e)||t.push(e)}function Es(e,t,R,A){var U=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,A),function(re){re.markedSpans&&((U||(U=t["spans_"+e.id]={}))[V]=re.markedSpans),++V})}function yl(e){if(!e)return null;for(var t,R=0;R<e.length;++R)e[R].marker.explicitlyCleared?t||(t=e.slice(0,R)):t&&t.push(e[R]);return t?t.length?t:null:e}function bl(e,t){var R=t["spans_"+e.id];if(!R)return null;for(var A=[],U=0;U<t.text.length;++U)A.push(yl(R[U]));return A}function ws(e,t){var R=bl(e,t),A=_a(e,t);if(!R)return A;if(!A)return R;for(var U=0;U<R.length;++U){var V=R[U],re=A[U];if(V&&re){e:for(var se=0;se<re.length;++se){for(var ue=re[se],me=0;me<V.length;++me)if(V[me].marker==ue.marker)continue e;V.push(ue)}}else re&&(R[U]=re)}return R}function Ki(e,t,R){for(var A=[],U=0;U<e.length;++U){var V=e[U];if(V.ranges){A.push(R?Sa.prototype.deepCopy.call(V):V);continue}var re=V.changes,se=[];A.push({changes:se});for(var ue=0;ue<re.length;++ue){var me=re[ue],Ne=void 0;if(se.push({from:me.from,to:me.to,text:me.text}),t)for(var Fe in me)(Ne=Fe.match(/^spans_(\d+)$/))&&(ee(t,Number(Ne[1]))>-1&&(te(se)[Fe]=me[Fe],delete me[Fe]))}}return A}function ns(e,t,R,A){if(A){var U=e.anchor;if(R){var V=Dt(t,U)<0;V!=Dt(R,U)<0?(U=t,t=R):V!=Dt(t,R)<0&&(t=R)}return new Wr(U,t)}else return new Wr(R||t,t)}function No(e,t,R,A,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),ba(e,new Sa([ns(e.sel.primary(),t,R,U)],0),A)}function Ts(e,t,R){for(var A=[],U=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)A[V]=ns(e.sel.ranges[V],t[V],null,U);var re=Ha(e.cm,A,e.sel.primIndex);ba(e,re,R)}function as(e,t,R,A){var U=e.sel.ranges.slice(0);U[t]=R,ba(e,Ha(e.cm,U,e.sel.primIndex),A)}function Ss(e,t,R,A){ba(e,Qa(t,R),A)}function xl(e,t,R){var A={ranges:t.ranges,update:function(U){this.ranges=[];for(var V=0;V<U.length;V++)this.ranges[V]=new Wr(Ot(e,U[V].anchor),Ot(e,U[V].head))},origin:R&&R.origin};return Ue(e,"beforeSelectionChange",e,A),e.cm&&Ue(e.cm,"beforeSelectionChange",e.cm,A),A.ranges!=t.ranges?Ha(e.cm,A.ranges,A.ranges.length-1):t}function Cs(e,t,R){var A=e.history.done,U=te(A);U&&U.ranges?(A[A.length-1]=t,jo(e,t,R)):ba(e,t,R)}function ba(e,t,R){jo(e,t,R),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,R)}function jo(e,t,R){(we(e,"beforeSelectionChange")||e.cm&&we(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,R));var A=R&&R.bias||(Dt(t.primary().head,e.sel.primary().head)<0?-1:1);_s(e,As(e,t,A,!0)),!(R&&R.scroll===!1)&&e.cm&&yi(e.cm)}function _s(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Pe(e.cm)),lr(e,"cursorActivity",e)}function Os(e){_s(e,As(e,e.sel,null,!1))}function As(e,t,R,A){for(var U,V=0;V<t.ranges.length;V++){var re=t.ranges[V],se=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ue=Uo(e,re.anchor,se&&se.anchor,R,A),me=Uo(e,re.head,se&&se.head,R,A);(U||ue!=re.anchor||me!=re.head)&&(U||(U=t.ranges.slice(0,V)),U[V]=new Wr(ue,me))}return U?Ha(e.cm,U,t.primIndex):t}function zi(e,t,R,A,U){var V=mt(e,t.line);if(V.markedSpans)for(var re=0;re<V.markedSpans.length;++re){var se=V.markedSpans[re],ue=se.marker,me="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ne="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((se.from==null||(me?se.from<=t.ch:se.from<t.ch))&&(se.to==null||(Ne?se.to>=t.ch:se.to>t.ch))){if(U&&(Ue(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(V.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(R){var Fe=ue.find(A<0?1:-1),rt=void 0;if((A<0?Ne:me)&&(Fe=Rs(e,Fe,-A,Fe&&Fe.line==t.line?V:null)),Fe&&Fe.line==t.line&&(rt=Dt(Fe,R))&&(A<0?rt<0:rt>0))return zi(e,Fe,t,A,U)}var qe=ue.find(A<0?-1:1);return(A<0?me:Ne)&&(qe=Rs(e,qe,A,qe.line==t.line?V:null)),qe?zi(e,qe,t,A,U):null}}return t}function Uo(e,t,R,A,U){var V=A||1,re=zi(e,t,R,V,U)||!U&&zi(e,t,R,V,!0)||zi(e,t,R,-V,U)||!U&&zi(e,t,R,-V,!0);return re||(e.cantEdit=!0,ct(e.first,0))}function Rs(e,t,R,A){return R<0&&t.ch==0?t.line>e.first?Ot(e,ct(t.line-1)):null:R>0&&t.ch==(A||mt(e,t.line)).text.length?t.line<e.first+e.size-1?ct(t.line+1,0):null:new ct(t.line,t.ch+R)}function Ds(e){e.setSelection(ct(e.firstLine(),0),ct(e.lastLine()),ye)}function Ls(e,t,R){var A={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return A.canceled=!0}};return R&&(A.update=function(U,V,re,se){U&&(A.from=Ot(e,U)),V&&(A.to=Ot(e,V)),re&&(A.text=re),se!==void 0&&(A.origin=se)}),Ue(e,"beforeChange",e,A),e.cm&&Ue(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 Gi(e,t,R){if(e.cm){if(!e.cm.curOp)return In(e.cm,Gi)(e,t,R);if(e.cm.state.suppressEdits)return}if((we(e,"beforeChange")||e.cm&&we(e.cm,"beforeChange"))&&(t=Ls(e,t,!0),!t))return;var A=$t&&!R&&Ka(e,t.from,t.to);if(A)for(var U=A.length-1;U>=0;--U)Ms(e,{from:A[U].from,to:A[U].to,text:U?[""]:t.text,origin:t.origin});else Ms(e,t)}function Ms(e,t){if(t.text.length==1&&t.text[0]==""&&Dt(t.from,t.to)==0)return;var R=Hi(e,t);xs(e,t,R,e.cm?e.cm.curOp.id:NaN),fo(e,t,R,_a(e,t));var A=[];Ti(e,function(U,V){!V&&ee(A,U.history)==-1&&(Ns(U.history,t),A.push(U.history)),fo(U,t,null,_a(U,t))})}function Fo(e,t,R){var A=e.cm&&e.cm.state.suppressEdits;if(A&&!R)return;for(var U=e.history,V,re=e.sel,se=t=="undo"?U.done:U.undone,ue=t=="undo"?U.undone:U.done,me=0;me<se.length&&!(V=se[me],R?V.ranges&&!V.equals(e.sel):!V.ranges);me++);if(me==se.length)return;for(U.lastOrigin=U.lastSelOrigin=null;;)if(V=se.pop(),V.ranges){if(Io(V,ue),R&&!V.equals(e.sel)){ba(e,V,{clearRedo:!1});return}re=V}else if(A){se.push(V);return}else break;var Ne=[];Io(re,ue),ue.push({changes:Ne,generation:U.generation}),U.generation=V.generation||++U.maxGeneration;for(var Fe=we(e,"beforeChange")||e.cm&&we(e.cm,"beforeChange"),rt=function(dt){var gt=V.changes[dt];if(gt.origin=t,Fe&&!Ls(e,gt,!1))return se.length=0,{};Ne.push(rs(e,gt));var xt=dt?Hi(e,gt):te(se);fo(e,gt,xt,ws(e,gt)),!dt&&e.cm&&e.cm.scrollIntoView({from:gt.from,to:Za(gt)});var At=[];Ti(e,function(Et,Mt){!Mt&&ee(At,Et.history)==-1&&(Ns(Et.history,gt),At.push(Et.history)),fo(Et,gt,null,ws(Et,gt))})},qe=V.changes.length-1;qe>=0;--qe){var lt=rt(qe);if(lt)return lt.v}}function Ps(e,t){if(t==0)return;if(e.first+=t,e.sel=new Sa(be(e.sel.ranges,function(U){return new Wr(ct(U.anchor.line+t,U.anchor.ch),ct(U.head.line+t,U.head.ch))}),e.sel.primIndex),e.cm){Zr(e.cm,e.first,e.first-t,t);for(var R=e.cm.display,A=R.viewFrom;A<R.viewTo;A++)wn(e.cm,A,"gutter")}}function fo(e,t,R,A){if(e.cm&&!e.cm.curOp)return In(e.cm,fo)(e,t,R,A);if(t.to.line<e.first){Ps(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var U=t.text.length-1-(e.first-t.from.line);Ps(e,U),t={from:ct(e.first,0),to:ct(t.to.line+U,t.to.ch),text:[te(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:ct(V,mt(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=mr(e,t.from,t.to),R||(R=Hi(e,t)),e.cm?El(e.cm,t,A):ts(e,t,A),jo(e,R,ye),e.cantEdit&&Uo(e,ct(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,R){var A=e.doc,U=e.display,V=t.from,re=t.to,se=!1,ue=V.line;e.options.lineWrapping||(ue=_t(zn(mt(A,V.line))),A.iter(ue,re.line+1,function(qe){if(qe==U.maxLine)return se=!0,!0})),A.sel.contains(t.from,t.to)>-1&&Pe(e),ts(A,t,R,Ua(e)),e.options.lineWrapping||(A.iter(ue,V.line+t.text.length,function(qe){var lt=va(qe);lt>U.maxLineLength&&(U.maxLine=qe,U.maxLineLength=lt,U.maxLineChanged=!0,se=!1)}),se&&(e.curOp.updateMaxLine=!0)),en(A,V.line),Ri(e,400);var me=t.text.length-(re.line-V.line)-1;t.full?Zr(e):V.line==re.line&&t.text.length==1&&!vs(e.doc,t)?wn(e,V.line,"text"):Zr(e,V.line,re.line+1,me);var Ne=we(e,"changes"),Fe=we(e,"change");if(Fe||Ne){var rt={from:V,to:re,text:t.text,removed:t.removed,origin:t.origin};Fe&&lr(e,"change",e,rt),Ne&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(rt)}e.display.selForContextMenu=null}function Xi(e,t,R,A,U){var V;A||(A=R),Dt(A,R)<0&&(V=[A,R],R=V[0],A=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Gi(e,{from:R,to:A,text:t,origin:U})}function ks(e,t,R,A){R<e.line?e.line+=A:t<e.line&&(e.line=t,e.ch=0)}function Is(e,t,R,A){for(var U=0;U<e.length;++U){var V=e[U],re=!0;if(V.ranges){V.copied||(V=e[U]=V.deepCopy(),V.copied=!0);for(var se=0;se<V.ranges.length;se++)ks(V.ranges[se].anchor,t,R,A),ks(V.ranges[se].head,t,R,A);continue}for(var ue=0;ue<V.changes.length;++ue){var me=V.changes[ue];if(R<me.from.line)me.from=ct(me.from.line+A,me.from.ch),me.to=ct(me.to.line+A,me.to.ch);else if(t<=me.to.line){re=!1;break}}re||(e.splice(0,U+1),U=0)}}function Ns(e,t){var R=t.from.line,A=t.to.line,U=t.text.length-(A-R)-1;Is(e.done,R,A,U),Is(e.undone,R,A,U)}function ho(e,t,R,A){var U=t,V=t;return typeof t=="number"?V=mt(e,Hr(e,t)):U=_t(t),U==null?null:(A(V,U)&&e.cm&&wn(e.cm,U,R),V)}function po(e){this.lines=e,this.parent=null;for(var t=0,R=0;R<e.length;++R)e[R].parent=this,t+=e[R].height;this.height=t}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var R=e,A=e+t;R<A;++R){var U=this.lines[R];this.height-=U.height,Lt(U),lr(U,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,R){this.height+=R,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var A=0;A<t.length;++A)t[A].parent=this},iterN:function(e,t,R){for(var A=e+t;e<A;++e)if(R(this.lines[e]))return!0}};function mo(e){this.children=e;for(var t=0,R=0,A=0;A<e.length;++A){var U=e[A];t+=U.chunkSize(),R+=U.height,U.parent=this}this.size=t,this.height=R,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var R=0;R<this.children.length;++R){var A=this.children[R],U=A.chunkSize();if(e<U){var V=Math.min(t,U-e),re=A.height;if(A.removeInner(e,V),this.height-=re-A.height,U==V&&(this.children.splice(R--,1),A.parent=null),(t-=V)==0)break;e=0}else e-=U}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof po))){var se=[];this.collapse(se),this.children=[new po(se)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,R){this.size+=t.length,this.height+=R;for(var A=0;A<this.children.length;++A){var U=this.children[A],V=U.chunkSize();if(e<=V){if(U.insertInner(e,t,R),U.lines&&U.lines.length>50){for(var re=U.lines.length%25+25,se=re;se<U.lines.length;){var ue=new po(U.lines.slice(se,se+=25));U.height-=ue.height,this.children.splice(++A,0,ue),ue.parent=this}U.lines=U.lines.slice(0,re),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),R=new mo(t);if(e.parent){e.size-=R.size,e.height-=R.height;var U=ee(e.parent.children,e);e.parent.children.splice(U+1,0,R)}else{var A=new mo(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,t,R){for(var A=0;A<this.children.length;++A){var U=this.children[A],V=U.chunkSize();if(e<V){var re=Math.min(t,V-e);if(U.iterN(e,re,R))return!0;if((t-=re)==0)break;e=0}else e-=V}}};var vo=function(e,t,R){if(R)for(var A in R)R.hasOwnProperty(A)&&(this[A]=R[A]);this.doc=e,this.node=t};vo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,R=this.line,A=_t(R);if(A==null||!t)return;for(var U=0;U<t.length;++U)t[U]==this&&t.splice(U--,1);t.length||(R.widgets=null);var V=kn(this);It(R,Math.max(0,R.height-V)),e&&(wa(e,function(){js(e,R,-V),wn(e,A,"widget")}),lr(e,"lineWidgetCleared",e,this,A))},vo.prototype.changed=function(){var e=this,t=this.height,R=this.doc.cm,A=this.line;this.height=null;var U=kn(this)-t;if(!U)return;Xn(this.doc,A)||It(A,A.height+U),R&&wa(R,function(){R.curOp.forceUpdate=!0,js(R,A,U),lr(R,"lineWidgetChanged",R,e,_t(A))})},Ae(vo);function js(e,t,R){na(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&no(e,R)}function wl(e,t,R,A){var U=new vo(e,R,A),V=e.cm;return V&&U.noHScroll&&(V.display.alignWidgets=!0),ho(e,t,"widget",function(re){var se=re.widgets||(re.widgets=[]);if(U.insertAt==null?se.push(U):se.splice(Math.min(se.length-1,Math.max(0,U.insertAt)),0,U),U.line=re,V&&!Xn(e,re)){var ue=na(re)<e.scrollTop;It(re,re.height+kn(U)),ue&&no(V,U.height),V.curOp.forceUpdate=!0}return!0}),V&&lr(V,"lineWidgetAdded",V,U,typeof t=="number"?t:_t(t)),U}var Us=0,Si=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Us};Si.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ii(e),we(this,"clear")){var R=this.find();R&&lr(this,"clear",R.from,R.to)}for(var A=null,U=null,V=0;V<this.lines.length;++V){var re=this.lines[V],se=Kr(re.markedSpans,this);e&&!this.collapsed?wn(e,_t(re),"text"):e&&(se.to!=null&&(U=_t(re)),se.from!=null&&(A=_t(re))),re.markedSpans=xn(re.markedSpans,se),se.from==null&&this.collapsed&&!Xn(this.doc,re)&&e&&It(re,Ln(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var me=zn(this.lines[ue]),Ne=va(me);Ne>e.display.maxLineLength&&(e.display.maxLine=me,e.display.maxLineLength=Ne,e.display.maxLineChanged=!0)}A!=null&&e&&this.collapsed&&Zr(e,A,U+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&lr(e,"markerCleared",e,this,A,U),t&&fi(e),this.parent&&this.parent.clear()},Si.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var R,A,U=0;U<this.lines.length;++U){var V=this.lines[U],re=Kr(V.markedSpans,this);if(re.from!=null&&(R=ct(t?V:_t(V),re.from),e==-1))return R;if(re.to!=null&&(A=ct(t?V:_t(V),re.to),e==1))return A}return R&&{from:R,to:A}},Si.prototype.changed=function(){var e=this,t=this.find(-1,!0),R=this,A=this.doc.cm;if(!t||!A)return;wa(A,function(){var U=t.line,V=_t(t.line),re=He(A,V);if(re&&(er(re),A.curOp.selectionChanged=A.curOp.forceUpdate=!0),A.curOp.updateMaxLine=!0,!Xn(R.doc,U)&&R.height!=null){var se=R.height;R.height=null;var ue=kn(R)-se;ue&&It(U,U.height+ue)}lr(A,"markerChanged",A,e)})},Si.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ee(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Si.prototype.detachLine=function(e){if(this.lines.splice(ee(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(Si);function Vi(e,t,R,A,U){if(A&&A.shared)return Tl(e,t,R,A,U);if(e.cm&&!e.cm.curOp)return In(e.cm,Vi)(e,t,R,A,U);var V=new Si(e,U),re=Dt(t,R);if(A&&H(A,V,!1),re>0||re==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=I("span",[V.replacedWith],"CodeMirror-widget"),A.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),A.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Pa(e,t.line,t,R,V)||t.line!=R.line&&Pa(e,R.line,t,R,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tr()}V.addToHistory&&xs(e,{from:t,to:R,origin:"markText"},e.sel,NaN);var se=t.line,ue=e.cm,me;if(e.iter(se,R.line+1,function(Fe){ue&&V.collapsed&&!ue.options.lineWrapping&&zn(Fe)==ue.display.maxLine&&(me=!0),V.collapsed&&se!=t.line&&It(Fe,0),li(Fe,new kr(V,se==t.line?t.ch:null,se==R.line?R.ch:null)),++se}),V.collapsed&&e.iter(t.line,R.line+1,function(Fe){Xn(e,Fe)&&It(Fe,0)}),V.clearOnEnter&&Ce(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Jt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Us,V.atomic=!0),ue){if(me&&(ue.curOp.updateMaxLine=!0),V.collapsed)Zr(ue,t.line,R.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ne=t.line;Ne<=R.line;Ne++)wn(ue,Ne,"text");V.atomic&&Os(ue.doc),lr(ue,"markerAdded",ue,V)}return V}var go=function(e,t){this.markers=e,this.primary=t;for(var R=0;R<e.length;++R)e[R].parent=this};go.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();lr(this,"clear")},go.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(go);function Tl(e,t,R,A,U){A=H(A),A.shared=!1;var V=[Vi(e,t,R,A,U)],re=V[0],se=A.widgetNode;return Ti(e,function(ue){se&&(A.widgetNode=se.cloneNode(!0)),V.push(Vi(ue,Ot(ue,t),Ot(ue,R),A,U));for(var me=0;me<ue.linked.length;++me)if(ue.linked[me].isParent)return;re=te(V)}),new go(V,re)}function Fs(e){return e.findMarks(ct(e.first,0),e.clipPos(ct(e.lastLine())),function(t){return t.parent})}function Sl(e,t){for(var R=0;R<t.length;R++){var A=t[R],U=A.find(),V=e.clipPos(U.from),re=e.clipPos(U.to);if(Dt(V,re)){var se=Vi(e,V,re,A.primary,A.primary.type);A.markers.push(se),se.parent=A}}}function Cl(e){for(var t=function(A){var U=e[A],V=[U.primary.doc];Ti(U.primary.doc,function(ue){return V.push(ue)});for(var re=0;re<U.markers.length;re++){var se=U.markers[re];ee(V,se.doc)==-1&&(se.parent=null,U.markers.splice(re--,1))}},R=0;R<e.length;R++)t(R)}var _l=0,Aa=function(e,t,R,A,U){if(!(this instanceof Aa))return new Aa(e,t,R,A,U);R==null&&(R=0),mo.call(this,[new po([new aa("",null)])]),this.first=R,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=R;var V=ct(R,0);this.sel=Qa(V),this.history=new ko(null),this.id=++_l,this.modeOption=t,this.lineSep=A,this.direction=U=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:V,to:V,text:e}),ba(this,Qa(V),ye)};Aa.prototype=Ee(mo.prototype,{constructor:Aa,iter:function(e,t,R){R?this.iterN(e-this.first,t-e,R):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var R=0,A=0;A<t.length;++A)R+=t[A].height;this.insertInner(e-this.first,t,R)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=wr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Nn(function(e){var t=ct(this.first,0),R=this.first+this.size-1;Gi(this,{from:t,to:ct(R,mt(this,R).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&bi(this.cm,0,0),ba(this,Qa(t),ye)}),replaceRange:function(e,t,R,A){t=Ot(this,t),R=R?Ot(this,R):t,Xi(this,e,t,R,A)},getRange:function(e,t,R){var A=mr(this,Ot(this,e),Ot(this,t));return R===!1?A:A.join(R||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(un(this,e))return mt(this,e)},getLineNumber:function(e){return _t(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=mt(this,e)),zn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ot(this,e)},getCursor:function(e){var t=this.sel.primary(),R;return e==null||e=="head"?R=t.head:e=="anchor"?R=t.anchor:e=="end"||e=="to"||e===!1?R=t.to():R=t.from(),R},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Nn(function(e,t,R){Ss(this,Ot(this,typeof e=="number"?ct(e,t||0):e),null,R)}),setSelection:Nn(function(e,t,R){Ss(this,Ot(this,e),Ot(this,t||e),R)}),extendSelection:Nn(function(e,t,R){No(this,Ot(this,e),t&&Ot(this,t),R)}),extendSelections:Nn(function(e,t){Ts(this,ut(this,e),t)}),extendSelectionsBy:Nn(function(e,t){var R=be(this.sel.ranges,e);Ts(this,ut(this,R),t)}),setSelections:Nn(function(e,t,R){if(!e.length)return;for(var A=[],U=0;U<e.length;U++)A[U]=new Wr(Ot(this,e[U].anchor),Ot(this,e[U].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ba(this,Ha(this.cm,A,t),R)}),addSelection:Nn(function(e,t,R){var A=this.sel.ranges.slice(0);A.push(new Wr(Ot(this,e),Ot(this,t||e))),ba(this,Ha(this.cm,A,A.length-1),R)}),getSelection:function(e){for(var t=this.sel.ranges,R,A=0;A<t.length;A++){var U=mr(this,t[A].from(),t[A].to());R=R?R.concat(U):U}return e===!1?R:R.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],R=this.sel.ranges,A=0;A<R.length;A++){var U=mr(this,R[A].from(),R[A].to());e!==!1&&(U=U.join(e||this.lineSeparator())),t[A]=U}return t},replaceSelection:function(e,t,R){for(var A=[],U=0;U<this.sel.ranges.length;U++)A[U]=e;this.replaceSelections(A,t,R||"+input")},replaceSelections:Nn(function(e,t,R){for(var A=[],U=this.sel,V=0;V<U.ranges.length;V++){var re=U.ranges[V];A[V]={from:re.from(),to:re.to(),text:this.splitLines(e[V]),origin:R}}for(var se=t&&t!="end"&&Po(this,A,t),ue=A.length-1;ue>=0;ue--)Gi(this,A[ue]);se?Cs(this,se):this.cm&&yi(this.cm)}),undo:Nn(function(){Fo(this,"undo")}),redo:Nn(function(){Fo(this,"redo")}),undoSelection:Nn(function(){Fo(this,"undo",!0)}),redoSelection:Nn(function(){Fo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,R=0,A=0;A<e.done.length;A++)e.done[A].ranges||++t;for(var U=0;U<e.undone.length;U++)e.undone[U].ranges||++R;return{undo:t,redo:R}},clearHistory:function(){var e=this;this.history=new ko(this.history.maxGeneration),Ti(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new ko(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:Nn(function(e,t,R){return ho(this,e,"gutter",function(A){var U=A.gutterMarkers||(A.gutterMarkers={});return U[t]=R,!R&&Y(U)&&(A.gutterMarkers=null),!0})}),clearGutter:Nn(function(e){var t=this;this.iter(function(R){R.gutterMarkers&&R.gutterMarkers[e]&&ho(t,R,"gutter",function(){return R.gutterMarkers[e]=null,Y(R.gutterMarkers)&&(R.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!un(this,e))return null;if(t=e,e=mt(this,e),!e)return null}else if(t=_t(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Nn(function(e,t,R){return ho(this,e,t=="gutter"?"gutter":"class",function(A){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!A[U])A[U]=R;else{if(O(R).test(A[U]))return!1;A[U]+=" "+R}return!0})}),removeLineClass:Nn(function(e,t,R){return ho(this,e,t=="gutter"?"gutter":"class",function(A){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=A[U];if(V)if(R==null)A[U]=null;else{var re=V.match(O(R));if(!re)return!1;var se=re.index+re[0].length;A[U]=V.slice(0,re.index)+(!re.index||se==V.length?"":" ")+V.slice(se)||null}else return!1;return!0})}),addLineWidget:Nn(function(e,t,R){return wl(this,e,t,R)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,R){return Vi(this,Ot(this,e),Ot(this,t),R,R&&R.type||"range")},setBookmark:function(e,t){var R={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ot(this,e),Vi(this,e,e,R,"bookmark")},findMarksAt:function(e){e=Ot(this,e);var t=[],R=mt(this,e.line).markedSpans;if(R)for(var A=0;A<R.length;++A){var U=R[A];(U.from==null||U.from<=e.ch)&&(U.to==null||U.to>=e.ch)&&t.push(U.marker.parent||U.marker)}return t},findMarks:function(e,t,R){e=Ot(this,e),t=Ot(this,t);var A=[],U=e.line;return this.iter(e.line,t.line+1,function(V){var re=V.markedSpans;if(re)for(var se=0;se<re.length;se++){var ue=re[se];!(ue.to!=null&&U==e.line&&e.ch>=ue.to||ue.from==null&&U!=e.line||ue.from!=null&&U==t.line&&ue.from>=t.ch)&&(!R||R(ue.marker))&&A.push(ue.marker.parent||ue.marker)}++U}),A},getAllMarks:function(){var e=[];return this.iter(function(t){var R=t.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 t,R=this.first,A=this.lineSeparator().length;return this.iter(function(U){var V=U.text.length+A;if(V>e)return t=e,!0;e-=V,++R}),Ot(this,ct(R,t))},indexFromPos:function(e){e=Ot(this,e);var t=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){t+=A.text.length+R}),t},copy:function(e){var t=new Aa(wr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,R=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<R&&(R=e.to);var A=new Aa(wr(this,t,R),e.mode||this.modeOption,t,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}],Sl(A,Fs(this)),A},unlinkDoc:function(e){if(e instanceof Tn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var R=this.linked[t];if(R.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Fs(this));break}if(e.history==this.history){var A=[e.id];Ti(e,function(U){return A.push(U.id)},!0),e.history=new ko(null),e.history.done=Ki(this.history.done,A),e.history.undone=Ki(this.history.undone,A)}},iterLinkedDocs:function(e){Ti(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Nn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pl(this.cm)})}),Aa.prototype.eachLine=Aa.prototype.iter;var Bs=0;function Ol(e){var t=this;if(Ws(t),Ve(t,e)||Fn(t.display,e))return;ce(e),S&&(Bs=+new Date);var R=Yn(t,e,!0),A=e.dataTransfer.files;if(!R||t.isReadOnly())return;if(A&&A.length&&window.FileReader&&window.File)for(var U=A.length,V=Array(U),re=0,se=function(){++re==U&&In(t,function(){R=Ot(t.doc,R);var qe={from:R,to:R,text:t.doc.splitLines(V.filter(function(lt){return lt!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gi(t.doc,qe),Cs(t.doc,Qa(Ot(t.doc,R),Ot(t.doc,Za(qe))))})()},ue=function(qe,lt){if(t.options.allowDropFileTypes&&ee(t.options.allowDropFileTypes,qe.type)==-1){se();return}var dt=new FileReader;dt.onerror=function(){return se()},dt.onload=function(){var gt=dt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(gt)){se();return}V[lt]=gt,se()},dt.readAsText(qe)},me=0;me<A.length;me++)ue(A[me],me);else{if(t.state.draggingText&&t.doc.sel.contains(R)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Ne=e.dataTransfer.getData("Text");if(Ne){var Fe;if(t.state.draggingText&&!t.state.draggingText.copy&&(Fe=t.listSelections()),jo(t.doc,Qa(R,R)),Fe)for(var rt=0;rt<Fe.length;++rt)Xi(t.doc,"",Fe[rt].anchor,Fe[rt].head,"drag");t.replaceSelection(Ne,"around","paste"),t.display.input.focus()}}catch(qe){}}}function Al(e,t){if(S&&(!e.state.draggingText||+new Date-Bs<100)){Le(t);return}if(Ve(e,t)||Fn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!y){var R=C("img",null,null,"position: fixed; left: 0; top: 0;");R.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(R.width=R.height=1,e.display.wrapper.appendChild(R),R._top=R.offsetTop),t.dataTransfer.setDragImage(R,0,0),h&&R.parentNode.removeChild(R)}}function Rl(e,t){var R=Yn(e,t);if(!R)return;var A=document.createDocumentFragment();ri(e,R,A),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),b(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 t=document.getElementsByClassName("CodeMirror"),R=[],A=0;A<t.length;A++){var U=t[A].CodeMirror;U&&R.push(U)}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;Ll(),Ks=!0}function Ll(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ml)},100))}),Ce(window,"blur",function(){return Hs(gi)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ci={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"},yo=0;yo<10;yo++)Ci[yo+48]=Ci[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Ci[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Ci[bo+111]=Ci[bo+63235]="F"+bo;var mi={};mi.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"},mi.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"},mi.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"},mi.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"]},mi.default=l?mi.macDefault:mi.pcDefault;function Pl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var R,A,U,V,re=0;re<t.length-1;re++){var se=t[re];if(/^(cmd|meta|m)$/i.test(se))V=!0;else if(/^a(lt)?$/i.test(se))R=!0;else if(/^(c|ctrl|control)$/i.test(se))A=!0;else if(/^s(hift)?$/i.test(se))U=!0;else throw new Error("Unrecognized modifier name: "+se)}return R&&(e="Alt-"+e),A&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),U&&(e="Shift-"+e),e}function kl(e){var t={};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 U=be(R.split(" "),Pl),V=0;V<U.length;V++){var re=void 0,se=void 0;V==U.length-1?(se=U.join(" "),re=A):(se=U.slice(0,V+1).join(" "),re="...");var ue=t[se];if(!ue)t[se]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+se)}delete e[R]}for(var me in t)e[me]=t[me];return e}function Yi(e,t,R,A){t=Wo(t);var U=t.call?t.call(e,A):t[e];if(U===!1)return"nothing";if(U==="...")return"multi";if(U!=null&&R(U))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yi(e,t.fallthrough,R,A);for(var V=0;V<t.fallthrough.length;V++){var re=Yi(e,t.fallthrough[V],R,A);if(re)return re}}}function zs(e){var t=typeof e=="string"?e:Ci[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Gs(e,t,R){var A=e;return t.altKey&&A!="Alt"&&(e="Alt-"+e),(a?t.metaKey:t.ctrlKey)&&A!="Ctrl"&&(e="Ctrl-"+e),(a?t.ctrlKey:t.metaKey)&&A!="Mod"&&(e="Cmd-"+e),!R&&t.shiftKey&&A!="Shift"&&(e="Shift-"+e),e}function Xs(e,t){if(h&&e.keyCode==34&&e.char)return!1;var R=Ci[e.keyCode];return R==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(R=e.code),Gs(R,e,t))}function Wo(e){return typeof e=="string"?mi[e]:e}function $i(e,t){for(var R=e.doc.sel.ranges,A=[],U=0;U<R.length;U++){for(var V=t(R[U]);A.length&&Dt(V.from,te(A).to)<=0;){var re=A.pop();if(Dt(re.from,V.from)<0){V.from=re.from;break}}A.push(V)}wa(e,function(){for(var se=A.length-1;se>=0;se--)Xi(e.doc,"",A[se].from,A[se].to,"+delete");yi(e)})}function is(e,t,R){var A=Te(e.text,t+R,R);return A<0||A>e.text.length?null:A}function os(e,t,R){var A=is(e,t.ch,R);return A==null?null:new ct(t.line,A,R<0?"after":"before")}function ss(e,t,R,A,U){if(e){t.doc.direction=="rtl"&&(U=-U);var V=nt(R,t.doc.direction);if(V){var re=U<0?te(V):V[0],se=U<0==(re.level==1),ue=se?"after":"before",me;if(re.level>0||t.doc.direction=="rtl"){var Ne=We(t,R);me=U<0?R.text.length-1:0;var Fe=Qe(t,Ne,me).top;me=ze(function(rt){return Qe(t,Ne,rt).top==Fe},U<0==(re.level==1)?re.from:re.to-1,me),ue=="before"&&(me=is(R,me,1))}else me=U<0?re.to:re.from;return new ct(A,me,ue)}}return new ct(A,U<0?R.text.length:0,U<0?"before":"after")}function Il(e,t,R,A){var U=nt(t,e.doc.direction);if(!U)return os(t,R,A);R.ch>=t.text.length?(R.ch=t.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var V=$e(U,R.ch,R.sticky),re=U[V];if(e.doc.direction=="ltr"&&re.level%2==0&&(A>0?re.to>R.ch:re.from<R.ch))return os(t,R,A);var se=function(xt,At){return is(t,xt instanceof ct?xt.ch:xt,At)},ue,me=function(xt){return e.options.lineWrapping?(ue=ue||We(e,t),Nt(e,t,ue,xt)):{begin:0,end:t.text.length}},Ne=me(R.sticky=="before"?se(R,-1):R.ch);if(e.doc.direction=="rtl"||re.level==1){var Fe=re.level==1==A<0,rt=se(R,Fe?1:-1);if(rt!=null&&(Fe?rt<=re.to&&rt<=Ne.end:rt>=re.from&&rt>=Ne.begin)){var qe=Fe?"before":"after";return new ct(R.line,rt,qe)}}var lt=function(xt,At,Et){for(var Mt=function(ln,oa){return oa?new ct(R.line,se(ln,1),"before"):new ct(R.line,ln,"after")};xt>=0&&xt<U.length;xt+=At){var Yt=U[xt],Kt=At>0==(Yt.level!=1),yr=Kt?Et.begin:se(Et.end,-1);if(Yt.from<=yr&&yr<Yt.to)return Mt(yr,Kt);if(yr=Kt?Yt.from:se(Yt.to,-1),Et.begin<=yr&&yr<Et.end)return Mt(yr,Kt)}},dt=lt(V+A,A,Ne);if(dt)return dt;var gt=A>0?Ne.end:se(Ne.begin,-1);return gt!=null&&!(A>0&>==t.text.length)&&(dt=lt(A>0?0:U.length-1,A,me(gt)),dt)?dt:null}var xo={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ye)},killLine:function(e){return $i(e,function(t){if(t.empty()){var R=mt(e.doc,t.head.line).text.length;return t.head.ch==R&&t.head.line<e.lastLine()?{from:t.head,to:ct(t.head.line+1,0)}:{from:t.head,to:ct(t.head.line,R)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $i(e,function(t){return{from:ct(t.from().line,0),to:Ot(e.doc,ct(t.to().line+1,0))}})},delLineLeft:function(e){return $i(e,function(t){return{from:ct(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $i(e,function(t){var R=e.charCoords(t.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return{from:A,to:t.from()}})},delWrappedLineRight:function(e){return $i(e,function(t){var R=e.charCoords(t.head,"div").top+5,A=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div");return{from:t.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(ct(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ct(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ys(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var R=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:R},"div")},Se)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var R=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:R},"div")},Se)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var R=e.cursorCoords(t.head,"div").top+5,A=e.coordsChar({left:0,top:R},"div");return A.ch<e.getLine(A.line).search(/\S/)?Ys(e,t.head):A},Se)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],R=e.listSelections(),A=e.options.tabSize,U=0;U<R.length;U++){var V=R[U].from(),re=W(e.getLine(V.line),V.ch,A);t.push(le(A-re%A))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return wa(e,function(){for(var t=e.listSelections(),R=[],A=0;A<t.length;A++){if(!t[A].empty())continue;var U=t[A].head,V=mt(e.doc,U.line).text;if(V){if(U.ch==V.length&&(U=new ct(U.line,U.ch-1)),U.ch>0)U=new ct(U.line,U.ch+1),e.replaceRange(V.charAt(U.ch-1)+V.charAt(U.ch-2),ct(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var re=mt(e.doc,U.line-1).text;re&&(U=new ct(U.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),ct(U.line-1,re.length-1),U,"+transpose"))}}R.push(new Wr(U,U))}e.setSelections(R)})},newlineAndIndent:function(e){return wa(e,function(){for(var t=e.listSelections(),R=t.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),t[R].anchor,t[R].head,"+input");t=e.listSelections();for(var A=0;A<t.length;A++)e.indentLine(t[A].from().line,null,!0);yi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,t){var R=mt(e.doc,t),A=zn(R);return A!=R&&(t=_t(A)),ss(!0,e,A,t,1)}function Nl(e,t){var R=mt(e.doc,t),A=Na(R);return A!=R&&(t=_t(A)),ss(!0,e,R,t,-1)}function Ys(e,t){var R=Vs(e,t.line),A=mt(e.doc,R.line),U=nt(A,e.doc.direction);if(!U||U[0].level==0){var V=Math.max(R.ch,A.text.search(/\S/)),re=t.line==R.line&&t.ch<=V&&t.ch;return ct(R.line,re?0:V,R.sticky)}return R}function Ho(e,t,R){if(typeof t=="string"&&(t=xo[t],!t))return!1;e.display.input.ensurePolled();var A=e.display.shift,U=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),R&&(e.display.shift=!1),U=t(e)!=pe}finally{e.display.shift=A,e.state.suppressEdits=!1}return U}function jl(e,t,R){for(var A=0;A<e.state.keyMaps.length;A++){var U=Yi(t,e.state.keyMaps[A],R,e);if(U)return U}return e.options.extraKeys&&Yi(t,e.options.extraKeys,R,e)||Yi(t,e.options.keyMap,R,e)}var Ul=new Q;function Eo(e,t,R,A){var U=e.state.keySeq;if(U){if(zs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==U&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,U+" "+t,R,A))return!0}return $s(e,t,R,A)}function $s(e,t,R,A){var U=jl(e,t,A);return U=="multi"&&(e.state.keySeq=t),U=="handled"&&lr(e,"keyHandled",e,t,R),(U=="handled"||U=="multi")&&(ce(R),$n(e)),!!U}function Js(e,t){var R=Xs(t,!0);return R?t.shiftKey&&!e.state.keySeq?Eo(e,"Shift-"+R,t,function(A){return Ho(e,A,!0)})||Eo(e,R,t,function(A){if(typeof A=="string"?/^go[A-Z]/.test(A):A.motion)return Ho(e,A)}):Eo(e,R,t,function(A){return Ho(e,A)}):!1}function Fl(e,t,R){return Eo(e,"'"+R+"'",t,function(A){return Ho(e,A,!0)})}var ls=null;function Qs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=z(),Ve(t,e))return;S&&v<11&&e.keyCode==27&&(e.returnValue=!1);var R=e.keyCode;t.display.shift=R==16||e.shiftKey;var A=Js(t,e);h&&(ls=A?R:null,!A&&R==88&&!jt&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),_&&!l&&!A&&R==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),R==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;G(t,"CodeMirror-crosshair");function R(A){(A.keyCode==18||!A.altKey)&&(f(t,"CodeMirror-crosshair"),et(document,"keyup",R),et(document,"mouseover",R))}Ce(document,"keyup",R),Ce(document,"mouseover",R)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ve(this,e)}function el(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Fn(t.display,e)||Ve(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var R=e.keyCode,A=e.charCode;if(h&&R==ls){ls=null,ce(e);return}if(h&&(!e.which||e.which<10)&&Js(t,e))return;var U=String.fromCharCode(A==null?R:A);if(U=="\b")return;if(Fl(t,e,U))return;t.display.input.onKeyPress(e)}var Wl=400,us=function(e,t,R){this.time=e,this.pos=t,this.button=R};us.prototype.compare=function(e,t,R){return this.time+Wl>e&&Dt(t,this.pos)==0&&R==this.button};var wo,To;function Hl(e,t){var R=+new Date;return To&&To.compare(R,e,t)?(wo=To=null,"triple"):wo&&wo.compare(R,e,t)?(To=new us(R,e,t),wo=null,"double"):(wo=new us(R,e,t),To=null,"single")}function tl(e){var t=this,R=t.display;if(Ve(t,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,Fn(R,e)){o||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(cs(t,e))return;var A=Yn(t,e),U=Ge(e),V=A?Hl(A,U):"single";if(window.focus(),U==1&&t.state.selectingText&&t.state.selectingText(e),A&&Kl(t,U,A,V,e))return;U==1?A?Gl(t,A,V,e):Re(e)==R.scroller&&ce(e):U==2?(A&&No(t.doc,A),setTimeout(function(){return R.input.focus()},20)):U==3&&(L?t.display.input.onContextMenu(e):eo(t))}function Kl(e,t,R,A,U){var V="Click";return A=="double"?V="Double"+V:A=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,Eo(e,Gs(V,U),U,function(re){if(typeof re=="string"&&(re=xo[re]),!re)return!1;var se=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),se=re(e,R)!=pe}finally{e.state.suppressEdits=!1}return se})}function zl(e,t,R){var A=e.getOption("configureMouse"),U=A?A(e,t,R):{};if(U.unit==null){var V=u?R.shiftKey&&R.metaKey:R.altKey;U.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||R.shiftKey),U.addNew==null&&(U.addNew=l?R.metaKey:R.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(l?R.altKey:R.ctrlKey)),U}function Gl(e,t,R,A){S?setTimeout(F(Co,e),0):e.curOp.focus=z();var U=zl(e,R,A),V=e.doc.sel,re;e.options.dragDrop&&Ye&&!e.isReadOnly()&&R=="single"&&(re=V.contains(t))>-1&&(Dt((re=V.ranges[re]).from(),t)<0||t.xRel>0)&&(Dt(re.to(),t)>0||t.xRel<0)?Xl(e,A,t,U):Vl(e,A,t,U)}function Xl(e,t,R,A){var U=e.display,V=!1,re=In(e,function(me){o&&(U.scroller.draggable=!1),e.state.draggingText=!1,et(U.wrapper.ownerDocument,"mouseup",re),et(U.wrapper.ownerDocument,"mousemove",se),et(U.scroller,"dragstart",ue),et(U.scroller,"drop",re),V||(ce(me),A.addNew||No(e.doc,R,null,null,A.extend),o&&!y||S&&v==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),se=function(me){V=V||Math.abs(t.clientX-me.clientX)+Math.abs(t.clientY-me.clientY)>=10},ue=function(){return V=!0};o&&(U.scroller.draggable=!0),e.state.draggingText=re,re.copy=!A.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Ce(U.wrapper.ownerDocument,"mouseup",re),Ce(U.wrapper.ownerDocument,"mousemove",se),Ce(U.scroller,"dragstart",ue),Ce(U.scroller,"drop",re),eo(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,t,R){if(R=="char")return new Wr(t,t);if(R=="word")return e.findWordAt(t);if(R=="line")return new Wr(ct(t.line,0),Ot(e.doc,ct(t.line+1,0)));var A=R(e,t);return new Wr(A.from,A.to)}function Vl(e,t,R,A){var U=e.display,V=e.doc;ce(t);var re,se,ue=V.sel,me=ue.ranges;if(A.addNew&&!A.extend?(se=V.sel.contains(R),se>-1?re=me[se]:re=new Wr(R,R)):(re=V.sel.primary(),se=V.sel.primIndex),A.unit=="rectangle")A.addNew||(re=new Wr(R,R)),R=Yn(e,t,!0,!0),se=-1;else{var Ne=rl(e,R,A.unit);A.extend?re=ns(re,Ne.anchor,Ne.head,A.extend):re=Ne}A.addNew?se==-1?(se=me.length,ba(V,Ha(e,me.concat([re]),se),{scroll:!1,origin:"*mouse"})):me.length>1&&me[se].empty()&&A.unit=="char"&&!A.extend?(ba(V,Ha(e,me.slice(0,se).concat(me.slice(se+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):as(V,se,re,ie):(se=0,ba(V,new Sa([re],0),ie),ue=V.sel);var Fe=R;function rt(Et){if(Dt(Fe,Et)==0)return;if(Fe=Et,A.unit=="rectangle"){for(var Mt=[],Yt=e.options.tabSize,Kt=W(mt(V,R.line).text,R.ch,Yt),yr=W(mt(V,Et.line).text,Et.ch,Yt),ln=Math.min(Kt,yr),oa=Math.max(Kt,yr),On=Math.min(R.line,Et.line),Ia=Math.min(e.lastLine(),Math.max(R.line,Et.line));On<=Ia;On++){var Ra=mt(V,On).text,Bn=ge(Ra,ln,Yt);ln==oa?Mt.push(new Wr(ct(On,Bn),ct(On,Bn))):Ra.length>Bn&&Mt.push(new Wr(ct(On,Bn),ct(On,ge(Ra,oa,Yt))))}Mt.length||Mt.push(new Wr(R,R)),ba(V,Ha(e,ue.ranges.slice(0,se).concat(Mt),se),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Et)}else{var Da=re,ca=rl(e,Et,A.unit),Zn=Da.anchor,Wn;Dt(ca.anchor,Zn)>0?(Wn=ca.head,Zn=fn(Da.from(),ca.anchor)):(Wn=ca.anchor,Zn=An(Da.to(),ca.head));var Mn=ue.ranges.slice(0);Mn[se]=Yl(e,new Wr(Ot(V,Zn),Wn)),ba(V,Ha(e,Mn,se),ie)}}var qe=U.wrapper.getBoundingClientRect(),lt=0;function dt(Et){var Mt=++lt,Yt=Yn(e,Et,!0,A.unit=="rectangle");if(!Yt)return;if(Dt(Yt,Fe)!=0){e.curOp.focus=z(),rt(Yt);var Kt=Ii(U,V);(Yt.line>=Kt.to||Yt.line<Kt.from)&&setTimeout(In(e,function(){lt==Mt&&dt(Et)}),150)}else{var yr=Et.clientY<qe.top?-20:Et.clientY>qe.bottom?20:0;yr&&setTimeout(In(e,function(){if(lt!=Mt)return;U.scroller.scrollTop+=yr,dt(Et)}),50)}}function gt(Et){e.state.selectingText=!1,lt=Infinity,Et&&(ce(Et),U.input.focus()),et(U.wrapper.ownerDocument,"mousemove",xt),et(U.wrapper.ownerDocument,"mouseup",At),V.history.lastSelOrigin=null}var xt=In(e,function(Et){Et.buttons===0||!Ge(Et)?gt(Et):dt(Et)}),At=In(e,gt);e.state.selectingText=At,Ce(U.wrapper.ownerDocument,"mousemove",xt),Ce(U.wrapper.ownerDocument,"mouseup",At)}function Yl(e,t){var R=t.anchor,A=t.head,U=mt(e.doc,R.line);if(Dt(R,A)==0&&R.sticky==A.sticky)return t;var V=nt(U);if(!V)return t;var re=$e(V,R.ch,R.sticky),se=V[re];if(se.from!=R.ch&&se.to!=R.ch)return t;var ue=re+(se.from==R.ch==(se.level!=1)?0:1);if(ue==0||ue==V.length)return t;var me;if(A.line!=R.line)me=(A.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ne=$e(V,A.ch,A.sticky),Fe=Ne-re||(A.ch-R.ch)*(se.level==1?-1:1);Ne==ue-1||Ne==ue?me=Fe<0:me=Fe>0}var rt=V[ue+(me?-1:0)],qe=me==(rt.level==1),lt=qe?rt.from:rt.to,dt=qe?"after":"before";return R.ch==lt&&R.sticky==dt?t:new Wr(new ct(R.line,lt,dt),A)}function nl(e,t,R,A){var U,V;if(t.touches)U=t.touches[0].clientX,V=t.touches[0].clientY;else try{U=t.clientX,V=t.clientY}catch(rt){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;A&&ce(t);var re=e.display,se=re.lineDiv.getBoundingClientRect();if(V>se.bottom||!we(e,R))return _e(t);V-=se.top-re.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var me=re.gutters.childNodes[ue];if(me&&me.getBoundingClientRect().right>=U){var Ne=vr(e.doc,V),Fe=e.display.gutterSpecs[ue];return Ue(e,R,e,Ne,Fe.className,t),_e(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function al(e,t){if(Fn(e.display,t)||$l(e,t))return;if(Ve(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function $l(e,t){return we(e,"gutterContextMenu")?nl(e,t,"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-"),ir(e)}var Ji={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var t=e.optionHandlers;function R(A,U,V,re){e.defaults[A]=U,V&&(t[A]=re?function(se,ue,me){me!=Ji&&V(se,ue,me)}:V)}e.defineOption=R,e.Init=Ji,R("value","",function(A,U){return A.setValue(U)},!0),R("mode",null,function(A,U){A.doc.modeOption=U,pi(A)},!0),R("indentUnit",2,pi,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(A){co(A),ir(A),Zr(A)},!0),R("lineSeparator",null,function(A,U){if(A.doc.lineSep=U,!U)return;var V=[],re=A.doc.first;A.doc.iter(function(ue){for(var me=0;;){var Ne=ue.text.indexOf(U,me);if(Ne==-1)break;me=Ne+U.length,V.push(ct(re,Ne))}re++});for(var se=V.length-1;se>=0;se--)Xi(A.doc,U,V[se],ct(V[se].line,V[se].ch+U.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(A,U,V){A.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),V!=Ji&&A.refresh()}),R("specialCharPlaceholder",_r,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,U){return A.getInputField().spellcheck=U},!0),R("autocorrect",!1,function(A,U){return A.getInputField().autocorrect=U},!0),R("autocapitalize",!1,function(A,U){return A.getInputField().autocapitalize=U},!0),R("rtlMoveVisually",!T),R("wholeLineUpdateBefore",!0),R("theme","default",function(A){il(A),Ja(A)},!0),R("keyMap","default",function(A,U,V){var re=Wo(U),se=V!=Ji&&Wo(V);se&&se.detach&&se.detach(A,re),re.attach&&re.attach(A,se||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Zl,!0),R("gutters",[],function(A,U){A.display.gutterSpecs=Ta(U,A.options.lineNumbers),Ja(A)},!0),R("fixedGutter",!0,function(A,U){A.display.gutters.style.left=U?ya(A.display)+"px":"0",A.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(A){return di(A)},!0),R("scrollbarStyle","native",function(A){Ui(A),di(A),A.display.scrollbars.setScrollTop(A.doc.scrollTop),A.display.scrollbars.setScrollLeft(A.doc.scrollLeft)},!0),R("lineNumbers",!1,function(A,U){A.display.gutterSpecs=Ta(A.options.gutters,U),Ja(A)},!0),R("firstLineNumber",1,Ja,!0),R("lineNumberFormatter",function(A){return A},Ja,!0),R("showCursorWhenSelecting",!1,Vr,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(A,U){U=="nocursor"&&(gi(A),A.display.input.blur()),A.display.input.readOnlyChanged(U)}),R("screenReaderLabel",null,function(A,U){U=U===""?null:U,A.display.input.screenReaderLabelChanged(U)}),R("disableInput",!1,function(A,U){U||A.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,Vr,!0),R("singleCursorHeightPerLine",!0,Vr,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,co,!0),R("addModeClass",!1,co,!0),R("pollInterval",100),R("undoDepth",200,function(A,U){return A.doc.history.undoDepth=U}),R("historyEventDelay",1250),R("viewportMargin",10,function(A){return A.refresh()},!0),R("maxHighlightLength",1e4,co,!0),R("moveInputWithCursor",!0,function(A,U){U||A.display.input.resetPosition()}),R("tabindex",null,function(A,U){return A.display.input.getField().tabIndex=U||""}),R("autofocus",null),R("direction","ltr",function(A,U){return A.doc.setDirection(U)},!0),R("phrases",null)}function Ql(e,t,R){var A=R&&R!=Ji;if(!t!=!A){var U=e.display.dragFunctions,V=t?Ce:et;V(e.display.scroller,"dragstart",U.start),V(e.display.scroller,"dragenter",U.enter),V(e.display.scroller,"dragover",U.over),V(e.display.scroller,"dragleave",U.leave),V(e.display.scroller,"drop",U.drop)}}function Zl(e){e.options.lineWrapping?(G(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(f(e.display.wrapper,"CodeMirror-wrap"),ja(e)),Ea(e),Zr(e),ir(e),setTimeout(function(){return di(e)},100)}function Tn(e,t){var R=this;if(!(this instanceof Tn))return new Tn(e,t);this.options=t=t?H(t):{},H(ol,t,!1);var A=t.value;typeof A=="string"?A=new Aa(A,t.mode,null,t.lineSeparator,t.direction):t.mode&&(A.modeOption=t.mode),this.doc=A;var U=new Tn.inputStyles[t.inputStyle](this),V=this.display=new Li(e,A,U,t);V.wrapper.CodeMirror=this,il(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ui(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},t.autofocus&&!n&&V.input.focus(),S&&v<11&&setTimeout(function(){return R.display.input.reset(!0)},20),ql(this),Dl(),ii(this),this.curOp.forceUpdate=!0,gs(this,A),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&ni(R)},20):gi(this);for(var re in Ko)Ko.hasOwnProperty(re)&&Ko[re](this,t[re],Ji);Jn(this),t.finishInit&&t.finishInit(this);for(var se=0;se<ds.length;++se)ds[se](this);fi(this),o&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Tn.defaults=ol,Tn.optionHandlers=Ko;function ql(e){var t=e.display;Ce(t.scroller,"mousedown",In(e,tl)),S&&v<11?Ce(t.scroller,"dblclick",In(e,function(ue){if(Ve(e,ue))return;var me=Yn(e,ue);if(!me||cs(e,ue)||Fn(e.display,ue))return;ce(ue);var Ne=e.findWordAt(me);No(e.doc,Ne.anchor,Ne.head)})):Ce(t.scroller,"dblclick",function(ue){return Ve(e,ue)||ce(ue)}),Ce(t.scroller,"contextmenu",function(ue){return al(e,ue)}),Ce(t.input.getField(),"contextmenu",function(ue){t.scroller.contains(ue.target)||al(e,ue)});var R,A={end:0};function U(){t.activeTouch&&(R=setTimeout(function(){return t.activeTouch=null},1e3),A=t.activeTouch,A.end=+new Date)}function V(ue){if(ue.touches.length!=1)return!1;var me=ue.touches[0];return me.radiusX<=1&&me.radiusY<=1}function re(ue,me){if(me.left==null)return!0;var Ne=me.left-ue.left,Fe=me.top-ue.top;return Ne*Ne+Fe*Fe>20*20}Ce(t.scroller,"touchstart",function(ue){if(!Ve(e,ue)&&!V(ue)&&!cs(e,ue)){t.input.ensurePolled(),clearTimeout(R);var me=+new Date;t.activeTouch={start:me,moved:!1,prev:me-A.end<=300?A:null},ue.touches.length==1&&(t.activeTouch.left=ue.touches[0].pageX,t.activeTouch.top=ue.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(ue){var me=t.activeTouch;if(me&&!Fn(t,ue)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ne=e.coordsChar(t.activeTouch,"page"),Fe;!me.prev||re(me,me.prev)?Fe=new Wr(Ne,Ne):!me.prev.prev||re(me,me.prev.prev)?Fe=e.findWordAt(Ne):Fe=new Wr(ct(Ne.line,0),Ot(e.doc,ct(Ne.line+1,0))),e.setSelection(Fe.anchor,Fe.head),e.focus(),ce(ue)}U()}),Ce(t.scroller,"touchcancel",U),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xi(e,t.scroller.scrollTop),Ba(e,t.scroller.scrollLeft,!0),Ue(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(ue){return lo(e,ue)}),Ce(t.scroller,"DOMMouseScroll",function(ue){return lo(e,ue)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ue){Ve(e,ue)||Le(ue)},over:function(ue){Ve(e,ue)||(Rl(e,ue),Le(ue))},start:function(ue){return Al(e,ue)},drop:In(e,Ol),leave:function(ue){Ve(e,ue)||Ws(e)}};var se=t.input.getField();Ce(se,"keyup",function(ue){return Zs.call(e,ue)}),Ce(se,"keydown",In(e,Qs)),Ce(se,"keypress",In(e,el)),Ce(se,"focus",function(ue){return ni(e,ue)}),Ce(se,"blur",function(ue){return gi(e,ue)})}var ds=[];Tn.defineInitHook=function(e){return ds.push(e)};function So(e,t,R,A){var U=e.doc,V;R==null&&(R="add"),R=="smart"&&(U.mode.indent?V=bn(e,t).state:R="prev");var re=e.options.tabSize,se=mt(U,t),ue=W(se.text,null,re);se.stateAfter&&(se.stateAfter=null);var me=se.text.match(/^\s*/)[0],Ne;if(!A&&!/\S/.test(se.text))Ne=0,R="not";else if(R=="smart"&&(Ne=U.mode.indent(V,se.text.slice(me.length),se.text),Ne==pe||Ne>150)){if(!A)return;R="prev"}R=="prev"?t>U.first?Ne=W(mt(U,t-1).text,null,re):Ne=0:R=="add"?Ne=ue+e.options.indentUnit:R=="subtract"?Ne=ue-e.options.indentUnit:typeof R=="number"&&(Ne=ue+R),Ne=Math.max(0,Ne);var Fe="",rt=0;if(e.options.indentWithTabs)for(var qe=Math.floor(Ne/re);qe;--qe)rt+=re,Fe+=" ";if(rt<Ne&&(Fe+=le(Ne-rt)),Fe!=me)return Xi(U,Fe,ct(t,0),ct(t,me.length),"+input"),se.stateAfter=null,!0;for(var lt=0;lt<U.sel.ranges.length;lt++){var dt=U.sel.ranges[lt];if(dt.head.line==t&&dt.head.ch<me.length){var gt=ct(t,me.length);as(U,lt,new Wr(gt,gt));break}}}var qa=null;function zo(e){qa=e}function fs(e,t,R,A,U){var V=e.doc;e.display.shift=!1,A||(A=V.sel);var re=+new Date-200,se=U=="paste"||e.state.pasteIncoming>re,ue=wt(t),me=null;if(se&&A.ranges.length>1)if(qa&&qa.text.join(`
|
|
|
`)==t){if(A.ranges.length%qa.text.length==0){me=[];for(var Ne=0;Ne<qa.text.length;Ne++)me.push(V.splitLines(qa.text[Ne]))}}else ue.length==A.ranges.length&&e.options.pasteLinesPerSelection&&(me=be(ue,function(xt){return[xt]}));for(var Fe=e.curOp.updateInput,rt=A.ranges.length-1;rt>=0;rt--){var qe=A.ranges[rt],lt=qe.from(),dt=qe.to();qe.empty()&&(R&&R>0?lt=ct(lt.line,lt.ch-R):e.state.overwrite&&!se?dt=ct(dt.line,Math.min(mt(V,dt.line).text.length,dt.ch+te(ue).length)):se&&qa&&qa.lineWise&&qa.text.join(`
|
|
|
`)==ue.join(`
|
|
|
`)&&(lt=dt=ct(lt.line,0)));var gt={from:lt,to:dt,text:me?me[rt%me.length]:ue,origin:U||(se?"paste":e.state.cutIncoming>re?"cut":"+input")};Gi(e.doc,gt),lr(e,"inputRead",e,gt)}t&&!se&&ll(e,t),yi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Fe),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&wa(t,function(){return fs(t,R,0,null,"paste")}),!0}function ll(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,A=R.ranges.length-1;A>=0;A--){var U=R.ranges[A];if(U.head.ch>100||A&&R.ranges[A-1].head.line==U.head.line)continue;var V=e.getModeAt(U.head),re=!1;if(V.electricChars){for(var se=0;se<V.electricChars.length;se++)if(t.indexOf(V.electricChars.charAt(se))>-1){re=So(e,U.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(mt(e.doc,U.head.line).text.slice(0,U.head.ch))&&(re=So(e,U.head.line,"smart")));re&&lr(e,"electricInput",e,U.head.line)}}function ul(e){for(var t=[],R=[],A=0;A<e.doc.sel.ranges.length;A++){var U=e.doc.sel.ranges[A].head.line,V={anchor:ct(U,0),head:ct(U+1,0)};R.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:R}}function cl(e,t,R,A){e.setAttribute("autocorrect",R?"":"off"),e.setAttribute("autocapitalize",A?"":"off"),e.setAttribute("spellcheck",!!t)}function dl(){var e=C("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=C("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return o?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),cl(e),t}function eu(e){var t=e.optionHandlers,R=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(A,U){var V=this.options,re=V[A];if(V[A]==U&&A!="mode")return;V[A]=U,t.hasOwnProperty(A)&&In(this,t[A])(this,U,re),Ue(this,"optionChange",this,A)},getOption:function(A){return this.options[A]},getDoc:function(){return this.doc},addKeyMap:function(A,U){this.state.keyMaps[U?"push":"unshift"](Wo(A))},removeKeyMap:function(A){for(var U=this.state.keyMaps,V=0;V<U.length;++V)if(U[V]==A||U[V].name==A)return U.splice(V,1),!0},addOverlay:ua(function(A,U){var V=A.token?A:e.getMode(this.options,A);if(V.startState)throw new Error("Overlays may not be stateful.");Z(this.state.overlays,{mode:V,modeSpec:A,opaque:U&&U.opaque,priority:U&&U.priority||0},function(re){return re.priority}),this.state.modeGen++,Zr(this)}),removeOverlay:ua(function(A){for(var U=this.state.overlays,V=0;V<U.length;++V){var re=U[V].modeSpec;if(re==A||typeof A=="string"&&re.name==A){U.splice(V,1),this.state.modeGen++,Zr(this);return}}}),indentLine:ua(function(A,U,V){typeof U!="string"&&typeof U!="number"&&(U==null?U=this.options.smartIndent?"smart":"prev":U=U?"add":"subtract"),un(this.doc,A)&&So(this,A,U,V)}),indentSelection:ua(function(A){for(var U=this.doc.sel.ranges,V=-1,re=0;re<U.length;re++){var se=U[re];if(se.empty())se.head.line>V&&(So(this,se.head.line,A,!0),V=se.head.line,re==this.doc.sel.primIndex&&yi(this));else{var ue=se.from(),me=se.to(),Ne=Math.max(V,ue.line);V=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var Fe=Ne;Fe<V;++Fe)So(this,Fe,A);var rt=this.doc.sel.ranges;ue.ch==0&&U.length==rt.length&&rt[re].from().ch>0&&as(this.doc,re,new Wr(ue,rt[re].to()),ye)}}}),getTokenAt:function(A,U){return fa(this,A,U)},getLineTokens:function(A,U){return fa(this,ct(A),U,!0)},getTokenTypeAt:function(A){A=Ot(this.doc,A);var U=Sn(this,mt(this.doc,A.line)),V=0,re=(U.length-1)/2,se=A.ch,ue;if(se==0)ue=U[2];else for(;;){var me=V+re>>1;if((me?U[me*2-1]:0)>=se)re=me;else if(U[me*2+1]<se)V=me+1;else{ue=U[me*2+2];break}}var Ne=ue?ue.indexOf("overlay "):-1;return Ne<0?ue:Ne==0?null:ue.slice(0,Ne-1)},getModeAt:function(A){var U=this.doc.mode;return U.innerMode?e.innerMode(U,this.getTokenAt(A).state).mode:U},getHelper:function(A,U){return this.getHelpers(A,U)[0]},getHelpers:function(A,U){var V=[];if(!R.hasOwnProperty(U))return V;var re=R[U],se=this.getModeAt(A);if(typeof se[U]=="string")re[se[U]]&&V.push(re[se[U]]);else if(se[U])for(var ue=0;ue<se[U].length;ue++){var me=re[se[U][ue]];me&&V.push(me)}else se.helperType&&re[se.helperType]?V.push(re[se.helperType]):re[se.name]&&V.push(re[se.name]);for(var Ne=0;Ne<re._global.length;Ne++){var Fe=re._global[Ne];Fe.pred(se,this)&&ee(V,Fe.val)==-1&&V.push(Fe.val)}return V},getStateAfter:function(A,U){var V=this.doc;return A=Hr(V,A==null?V.first+V.size-1:A),bn(this,A+1,U).state},cursorCoords:function(A,U){var V,re=this.doc.sel.primary();return A==null?V=re.head:typeof A=="object"?V=Ot(this.doc,A):V=A?re.from():re.to(),xr(this,V,U||"page")},charCoords:function(A,U){return vn(this,Ot(this.doc,A),U||"page")},coordsChar:function(A,U){return A=br(this,A,U||"page"),Sr(this,A.left,A.top)},lineAtHeight:function(A,U){return A=br(this,{top:A,left:0},U||"page").top,vr(this.doc,A+this.display.viewOffset)},heightAtLine:function(A,U,V){var re=!1,se;if(typeof A=="number"){var ue=this.doc.first+this.doc.size-1;A<this.doc.first?A=this.doc.first:A>ue&&(A=ue,re=!0),se=mt(this.doc,A)}else se=A;return Rr(this,se,{top:0,left:0},U||"page",V||re).top+(re?this.doc.height-na(se):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Vn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(A,U,V,re,se){var ue=this.display;A=xr(this,Ot(this.doc,A));var me=A.bottom,Ne=A.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),ue.sizer.appendChild(U),re=="over")me=A.top;else if(re=="above"||re=="near"){var Fe=Math.max(ue.wrapper.clientHeight,this.doc.height),rt=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||A.bottom+U.offsetHeight>Fe)&&A.top>U.offsetHeight?me=A.top-U.offsetHeight:A.bottom+U.offsetHeight<=Fe&&(me=A.bottom),Ne+U.offsetWidth>rt&&(Ne=rt-U.offsetWidth)}U.style.top=me+"px",U.style.left=U.style.right="",se=="right"?(Ne=ue.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(se=="left"?Ne=0:se=="middle"&&(Ne=(ue.sizer.clientWidth-U.offsetWidth)/2),U.style.left=Ne+"px"),V&&_o(this,{left:Ne,top:me,right:Ne+U.offsetWidth,bottom:me+U.offsetHeight})},triggerOnKeyDown:ua(Qs),triggerOnKeyPress:ua(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ua(tl),execCommand:function(A){if(xo.hasOwnProperty(A))return xo[A].call(null,this)},triggerElectric:ua(function(A){ll(this,A)}),findPosH:function(A,U,V,re){var se=1;U<0&&(se=-1,U=-U);for(var ue=Ot(this.doc,A),me=0;me<U&&!(ue=hs(this.doc,ue,se,V,re),ue.hitSide);++me);return ue},moveH:ua(function(A,U){var V=this;this.extendSelectionsBy(function(re){return V.display.shift||V.doc.extend||re.empty()?hs(V.doc,re.head,A,U,V.options.rtlMoveVisually):A<0?re.from():re.to()},Se)}),deleteH:ua(function(A,U){var V=this.doc.sel,re=this.doc;V.somethingSelected()?re.replaceSelection("",null,"+delete"):$i(this,function(se){var ue=hs(re,se.head,A,U,!1);return A<0?{from:ue,to:se.head}:{from:se.head,to:ue}})}),findPosV:function(A,U,V,re){var se=1,ue=re;U<0&&(se=-1,U=-U);for(var me=Ot(this.doc,A),Ne=0;Ne<U;++Ne){var Fe=xr(this,me,"div");if(ue==null?ue=Fe.left:Fe.left=ue,me=fl(this,Fe,se,V),me.hitSide)break}return me},moveV:ua(function(A,U){var V=this,re=this.doc,se=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(Ne){if(ue)return A<0?Ne.from():Ne.to();var Fe=xr(V,Ne.head,"div");Ne.goalColumn!=null&&(Fe.left=Ne.goalColumn),se.push(Fe.left);var rt=fl(V,Fe,A,U);return U=="page"&&Ne==re.sel.primary()&&no(V,vn(V,rt,"div").top-Fe.top),rt},Se),se.length)for(var me=0;me<re.sel.ranges.length;me++)re.sel.ranges[me].goalColumn=se[me]}),findWordAt:function(A){var U=this.doc,V=mt(U,A.line).text,re=A.ch,se=A.ch;if(V){var ue=this.getHelper(A,"wordChars");(A.sticky=="before"||se==V.length)&&re?--re:++se;for(var me=V.charAt(re),Ne=X(me,ue)?function(Fe){return X(Fe,ue)}:/\s/.test(me)?function(Fe){return/\s/.test(Fe)}:function(Fe){return!/\s/.test(Fe)&&!X(Fe)};re>0&&Ne(V.charAt(re-1));)--re;for(;se<V.length&&Ne(V.charAt(se));)++se}return new Wr(ct(A.line,re),ct(A.line,se))},toggleOverwrite:function(A){if(A!=null&&A==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?G(this.display.cursorDiv,"CodeMirror-overwrite"):f(this.display.cursorDiv,"CodeMirror-overwrite"),Ue(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ua(function(A,U){bi(this,A,U)}),getScrollInfo:function(){var A=this.display.scroller;return{left:A.scrollLeft,top:A.scrollTop,height:A.scrollHeight-Ke(this)-this.display.barHeight,width:A.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:fe(this),clientWidth:ke(this)}},scrollIntoView:ua(function(A,U){A==null?(A={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof A=="number"?A={from:ct(A,0),to:null}:A.from==null&&(A={from:A,to:null}),A.to||(A.to=A.from),A.margin=U||0,A.from.line!=null?$o(this,A):Oi(this,A.from,A.to,A.margin)}),setSize:ua(function(A,U){var V=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};A!=null&&(this.display.wrapper.style.width=re(A)),U!=null&&(this.display.wrapper.style.height=re(U)),this.options.lineWrapping&&rr(this);var se=this.display.viewFrom;this.doc.iter(se,this.display.viewTo,function(ue){if(ue.widgets){for(var me=0;me<ue.widgets.length;me++)if(ue.widgets[me].noHScroll){wn(V,se,"widget");break}}++se}),this.curOp.forceUpdate=!0,Ue(this,"refresh",this)}),operation:function(A){return wa(this,A)},startOperation:function(){return ii(this)},endOperation:function(){return fi(this)},refresh:ua(function(){var A=this.display.cachedTextHeight;Zr(this),this.curOp.forceUpdate=!0,ir(this),bi(this,this.doc.scrollLeft,this.doc.scrollTop),Bi(this.display),(A==null||Math.abs(A-Ln(this.display))>.5||this.options.lineWrapping)&&Ea(this),Ue(this,"refresh",this)}),swapDoc:ua(function(A){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),gs(this,A),ir(this),this.display.input.reset(),bi(this,A.scrollLeft,A.scrollTop),this.curOp.forceScroll=!0,lr(this,"swapDoc",this,U),U}),phrase:function(A){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,A)?U[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}},Ae(e),e.registerHelper=function(A,U,V){R.hasOwnProperty(A)||(R[A]=e[A]={_global:[]}),R[A][U]=V},e.registerGlobalHelper=function(A,U,V,re){e.registerHelper(A,U,re),R[A]._global.push({pred:V,val:re})}}function hs(e,t,R,A,U){var V=t,re=R,se=mt(e,t.line),ue=U&&e.direction=="rtl"?-R:R;function me(){var At=t.line+ue;return At<e.first||At>=e.first+e.size?!1:(t=new ct(At,t.ch,t.sticky),se=mt(e,At))}function Ne(At){var Et;if(A=="codepoint"){var Mt=se.text.charCodeAt(t.ch+(A>0?0:-1));isNaN(Mt)?Et=null:Et=new ct(t.line,Math.max(0,Math.min(se.text.length,t.ch+R*(Mt>=55296&&Mt<56320?2:1))),-R)}else U?Et=Il(e.cm,se,t,R):Et=os(se,t,R);if(Et==null)if(!At&&me())t=ss(U,e.cm,se,t.line,ue);else return!1;else t=Et;return!0}if(A=="char"||A=="codepoint")Ne();else if(A=="column")Ne(!0);else if(A=="word"||A=="group")for(var Fe=null,rt=A=="group",qe=e.cm&&e.cm.getHelper(t,"wordChars"),lt=!0;!(R<0&&!Ne(!lt));lt=!1){var dt=se.text.charAt(t.ch)||`
|
|
|
`,gt=X(dt,qe)?"w":rt&&dt==`
|
|
|
`?"n":!rt||/\s/.test(dt)?null:"p";if(rt&&!lt&&!gt&&(gt="s"),Fe&&Fe!=gt){R<0&&(R=1,Ne(),t.sticky="after");break}if(gt&&(Fe=gt),R>0&&!Ne(!lt))break}var xt=Uo(e,t,V,re,!0);return Yr(V,xt)&&(xt.hitSide=!0),xt}function fl(e,t,R,A){var U=e.doc,V=t.left,re;if(A=="page"){var se=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(se-.5*Ln(e.display),3);re=(R>0?t.bottom:t.top)+R*ue}else A=="line"&&(re=R>0?t.bottom+3:t.top-3);for(var me;!(me=Sr(e,V,re),!me.outside);){if(R<0?re<=0:re>=U.height){me.hitSide=!0;break}re+=R*5}return me}var qr=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};qr.prototype.init=function(e){var t=this,R=this,A=R.cm,U=R.div=e.lineDiv;cl(U,A.options.spellcheck,A.options.autocorrect,A.options.autocapitalize);function V(se){for(var ue=se.target;ue;ue=ue.parentNode){if(ue==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Ce(U,"paste",function(se){if(!V(se)||Ve(A,se)||sl(se,A))return;v<=11&&setTimeout(In(A,function(){return t.updateFromDOM()}),20)}),Ce(U,"compositionstart",function(se){t.composing={data:se.data,done:!1}}),Ce(U,"compositionupdate",function(se){t.composing||(t.composing={data:se.data,done:!1})}),Ce(U,"compositionend",function(se){t.composing&&(se.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(U,"touchstart",function(){return R.forceCompositionEnd()}),Ce(U,"input",function(){t.composing||t.readFromDOMSoon()});function re(se){if(!V(se)||Ve(A,se))return;if(A.somethingSelected())zo({lineWise:!1,text:A.getSelections()}),se.type=="cut"&&A.replaceSelection("",null,"cut");else if(A.options.lineWiseCopyCut){var ue=ul(A);zo({lineWise:!0,text:ue.text}),se.type=="cut"&&A.operation(function(){A.setSelections(ue.ranges,0,ye),A.replaceSelection("",null,"cut")})}else return;if(se.clipboardData){se.clipboardData.clearData();var me=qa.text.join(`
|
|
|
`);if(se.clipboardData.setData("Text",me),se.clipboardData.getData("Text")==me){se.preventDefault();return}}var Ne=dl(),Fe=Ne.firstChild;A.display.lineSpace.insertBefore(Ne,A.display.lineSpace.firstChild),Fe.value=qa.text.join(`
|
|
|
`);var rt=document.activeElement;K(Fe),setTimeout(function(){A.display.lineSpace.removeChild(Ne),rt.focus(),rt==U&&R.showPrimarySelection()},50)}Ce(U,"copy",re),Ce(U,"cut",re)},qr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},qr.prototype.prepareSelection=function(){var e=Va(this.cm,!1);return e.focus=document.activeElement==this.div,e},qr.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},qr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qr.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,R=t.doc.sel.primary(),A=R.from(),U=R.to();if(t.display.viewTo==t.display.viewFrom||A.line>=t.display.viewTo||U.line<t.display.viewFrom){e.removeAllRanges();return}var V=Go(t,e.anchorNode,e.anchorOffset),re=Go(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&re&&!re.bad&&Dt(fn(V,re),A)==0&&Dt(An(V,re),U)==0)return;var se=t.display.view,ue=A.line>=t.display.viewFrom&&hl(t,A)||{node:se[0].measure.map[2],offset:0},me=U.line<t.display.viewTo&&hl(t,U);if(!me){var Ne=se[se.length-1].measure,Fe=Ne.maps?Ne.maps[Ne.maps.length-1]:Ne.map;me={node:Fe[Fe.length-1],offset:Fe[Fe.length-2]-Fe[Fe.length-3]}}if(!ue||!me){e.removeAllRanges();return}var rt=e.rangeCount&&e.getRangeAt(0),qe;try{qe=j(ue.node,ue.offset,me.offset,me.node)}catch(lt){}qe&&(!_&&t.state.focused?(e.collapse(ue.node,ue.offset),qe.collapsed||(e.removeAllRanges(),e.addRange(qe))):(e.removeAllRanges(),e.addRange(qe)),rt&&e.anchorNode==null?e.addRange(rt):_&&this.startGracePeriod()),this.rememberSelection()},qr.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)},qr.prototype.showMultipleSelections=function(e){b(this.cm.display.cursorDiv,e.cursors),b(this.cm.display.selectionDiv,e.selection)},qr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},qr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},qr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},qr.prototype.blur=function(){this.div.blur()},qr.prototype.getField=function(){return this.div},qr.prototype.supportsTouch=function(){return!0},qr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():wa(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},qr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},qr.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(d&&r&&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=Go(t,e.anchorNode,e.anchorOffset),A=Go(t,e.focusNode,e.focusOffset);R&&A&&wa(t,function(){ba(t.doc,Qa(R,A),ye),(R.bad||A.bad)&&(t.curOp.selectionChanged=!0)})},qr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,R=e.doc.sel.primary(),A=R.from(),U=R.to();if(A.ch==0&&A.line>e.firstLine()&&(A=ct(A.line-1,mt(e.doc,A.line-1).length)),U.ch==mt(e.doc,U.line).text.length&&U.line<e.lastLine()&&(U=ct(U.line+1,0)),A.line<t.viewFrom||U.line>t.viewTo-1)return!1;var V,re,se;A.line==t.viewFrom||(V=sn(e,A.line))==0?(re=_t(t.view[0].line),se=t.view[0].node):(re=_t(t.view[V].line),se=t.view[V-1].node.nextSibling);var ue=sn(e,U.line),me,Ne;if(ue==t.view.length-1?(me=t.viewTo-1,Ne=t.lineDiv.lastChild):(me=_t(t.view[ue+1].line)-1,Ne=t.view[ue+1].node.previousSibling),!se)return!1;for(var Fe=e.doc.splitLines(ru(e,se,Ne,re,me)),rt=mr(e.doc,ct(re,0),ct(me,mt(e.doc,me).text.length));Fe.length>1&&rt.length>1;)if(te(Fe)==te(rt))Fe.pop(),rt.pop(),me--;else if(Fe[0]==rt[0])Fe.shift(),rt.shift(),re++;else break;for(var qe=0,lt=0,dt=Fe[0],gt=rt[0],xt=Math.min(dt.length,gt.length);qe<xt&&dt.charCodeAt(qe)==gt.charCodeAt(qe);)++qe;for(var At=te(Fe),Et=te(rt),Mt=Math.min(At.length-(Fe.length==1?qe:0),Et.length-(rt.length==1?qe:0));lt<Mt&&At.charCodeAt(At.length-lt-1)==Et.charCodeAt(Et.length-lt-1);)++lt;if(Fe.length==1&&rt.length==1&&re==A.line)for(;qe&&qe>A.ch&&At.charCodeAt(At.length-lt-1)==Et.charCodeAt(Et.length-lt-1);)qe--,lt++;Fe[Fe.length-1]=At.slice(0,At.length-lt).replace(/^\u200b+/,""),Fe[0]=Fe[0].slice(qe).replace(/\u200b+$/,"");var Yt=ct(re,qe),Kt=ct(me,rt.length?te(rt).length-lt:0);if(Fe.length>1||Fe[0]||Dt(Yt,Kt))return Xi(e.doc,Fe,Yt,Kt,"+input"),!0},qr.prototype.ensurePolled=function(){this.forceCompositionEnd()},qr.prototype.reset=function(){this.forceCompositionEnd()},qr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},qr.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)},qr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&wa(this.cm,function(){return Zr(e.cm)})},qr.prototype.setUneditable=function(e){e.contentEditable="false"},qr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||In(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},qr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},qr.prototype.onContextMenu=function(){},qr.prototype.resetPosition=function(){},qr.prototype.needsContentAttribute=!0;function hl(e,t){var R=He(e,t.line);if(!R||R.hidden)return null;var A=mt(e.doc,t.line),U=ve(R,A,t.line),V=nt(A,e.doc.direction),re="left";if(V){var se=$e(V,t.ch);re=se%2?"right":"left"}var ue=pt(U.map,t.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Qi(e,t){return t&&(e.bad=!0),e}function ru(e,t,R,A,U){var V="",re=!1,se=e.doc.lineSeparator(),ue=!1;function me(qe){return function(lt){return lt.id==qe}}function Ne(){re&&(V+=se,ue&&(V+=se),re=ue=!1)}function Fe(qe){qe&&(Ne(),V+=qe)}function rt(qe){if(qe.nodeType==1){var lt=qe.getAttribute("cm-text");if(lt){Fe(lt);return}var dt=qe.getAttribute("cm-marker"),gt;if(dt){var xt=e.findMarks(ct(A,0),ct(U+1,0),me(+dt));xt.length&&(gt=xt[0].find(0))&&Fe(mr(e.doc,gt.from,gt.to).join(se));return}if(qe.getAttribute("contenteditable")=="false")return;var At=/^(pre|div|p|li|table|br)$/i.test(qe.nodeName);if(!/^br$/i.test(qe.nodeName)&&qe.textContent.length==0)return;At&&Ne();for(var Et=0;Et<qe.childNodes.length;Et++)rt(qe.childNodes[Et]);/^(pre|p)$/i.test(qe.nodeName)&&(ue=!0),At&&(re=!0)}else qe.nodeType==3&&Fe(qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(rt(t),t==R);)t=t.nextSibling,ue=!1;return V}function Go(e,t,R){var A;if(t==e.display.lineDiv){if(A=e.display.lineDiv.childNodes[R],!A)return Qi(e.clipPos(ct(e.display.viewTo-1)),!0);t=null,R=0}else for(A=t;;A=A.parentNode){if(!A||A==e.display.lineDiv)return null;if(A.parentNode&&A.parentNode==e.display.lineDiv)break}for(var U=0;U<e.display.view.length;U++){var V=e.display.view[U];if(V.node==A)return nu(V,t,R)}}function nu(e,t,R){var A=e.text.firstChild,U=!1;if(!t||!M(A,t))return Qi(ct(_t(e.line),0),!0);if(t==A&&(U=!0,t=A.childNodes[R],R=0,!t)){var V=e.rest?te(e.rest):e.line;return Qi(ct(_t(V),V.text.length),U)}var re=t.nodeType==3?t:null,se=t;for(!re&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(re=t.firstChild,R&&(R=re.nodeValue.length));se.parentNode!=A;)se=se.parentNode;var ue=e.measure,me=ue.maps;function Ne(gt,xt,At){for(var Et=-1;Et<(me?me.length:0);Et++)for(var Mt=Et<0?ue.map:me[Et],Yt=0;Yt<Mt.length;Yt+=3){var Kt=Mt[Yt+2];if(Kt==gt||Kt==xt){var yr=_t(Et<0?e.line:e.rest[Et]),ln=Mt[Yt]+At;return(At<0||Kt!=gt)&&(ln=Mt[Yt+(At?1:0)]),ct(yr,ln)}}}var Fe=Ne(re,se,R);if(Fe)return Qi(Fe,U);for(var rt=se.nextSibling,qe=re?re.nodeValue.length-R:0;rt;rt=rt.nextSibling){if(Fe=Ne(rt,rt.firstChild,0),Fe)return Qi(ct(Fe.line,Fe.ch-qe),U);qe+=rt.textContent.length}for(var lt=se.previousSibling,dt=R;lt;lt=lt.previousSibling){if(Fe=Ne(lt,lt.firstChild,-1),Fe)return Qi(ct(Fe.line,Fe.ch+dt),U);dt+=lt.textContent.length}}var jn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Q,this.hasSelection=!1,this.composing=null};jn.prototype.init=function(e){var t=this,R=this,A=this.cm;this.createField(e);var U=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(U.style.width="0px"),Ce(U,"input",function(){S&&v>=9&&t.hasSelection&&(t.hasSelection=null),R.poll()}),Ce(U,"paste",function(re){if(Ve(A,re)||sl(re,A))return;A.state.pasteIncoming=+new Date,R.fastPoll()});function V(re){if(Ve(A,re))return;if(A.somethingSelected())zo({lineWise:!1,text:A.getSelections()});else if(A.options.lineWiseCopyCut){var se=ul(A);zo({lineWise:!0,text:se.text}),re.type=="cut"?A.setSelections(se.ranges,null,ye):(R.prevInput="",U.value=se.text.join(`
|
|
|
`),K(U))}else return;re.type=="cut"&&(A.state.cutIncoming=+new Date)}Ce(U,"cut",V),Ce(U,"copy",V),Ce(e.scroller,"paste",function(re){if(Fn(e,re)||Ve(A,re))return;if(!U.dispatchEvent){A.state.pasteIncoming=+new Date,R.focus();return}var se=new Event("paste");se.clipboardData=re.clipboardData,U.dispatchEvent(se)}),Ce(e.lineSpace,"selectstart",function(re){Fn(e,re)||ce(re)}),Ce(U,"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(U,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},jn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},jn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,R=e.doc,A=Va(e);if(e.options.moveInputWithCursor){var U=xr(e,R.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),re=t.lineDiv.getBoundingClientRect();A.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,U.top+re.top-V.top)),A.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,U.left+re.left-V.left))}return A},jn.prototype.showSelection=function(e){var t=this.cm,R=t.display;b(R.cursorDiv,e.cursors),b(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},jn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var R=t.getSelection();this.textarea.value=R,t.state.focused&&K(this.textarea),S&&v>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",S&&v>=9&&(this.hasSelection=null))},jn.prototype.getField=function(){return this.textarea},jn.prototype.supportsTouch=function(){return!1},jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||z()!=this.textarea))try{this.textarea.focus()}catch(e){}},jn.prototype.blur=function(){this.textarea.blur()},jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},jn.prototype.receivedFocus=function(){this.slowPoll()},jn.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()})},jn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function R(){var A=t.poll();!A&&!e?(e=!0,t.polling.set(60,R)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,R)},jn.prototype.poll=function(){var e=this,t=this.cm,R=this.textarea,A=this.prevInput;if(this.contextMenuPending||!t.state.focused||ft(R)&&!A&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var U=R.value;if(U==A&&!t.somethingSelected())return!1;if(S&&v>=9&&this.hasSelection===U||l&&/[\uf700-\uf7ff]/.test(U))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=U.charCodeAt(0);if(V==8203&&!A&&(A="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,se=Math.min(A.length,U.length);re<se&&A.charCodeAt(re)==U.charCodeAt(re);)++re;return wa(t,function(){fs(t,U.slice(re),A.length-re,null,e.composing?"*compose":null),U.length>1e3||U.indexOf(`
|
|
|
`)>-1?R.value=e.prevInput="":e.prevInput=U,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},jn.prototype.onKeyPress=function(){S&&v>=9&&(this.hasSelection=null),this.fastPoll()},jn.prototype.onContextMenu=function(e){var t=this,R=t.cm,A=R.display,U=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Yn(R,e),re=A.scroller.scrollTop;if(!V||h)return;var se=R.options.resetSelectionOnContextMenu;se&&R.doc.sel.contains(V)==-1&&In(R,ba)(R.doc,Qa(V),ye);var ue=U.style.cssText,me=t.wrapper.style.cssText,Ne=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",U.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Ne.top-5)+"px; left: "+(e.clientX-Ne.left-5)+`px;
|
|
|
z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Fe;o&&(Fe=window.scrollY),A.input.focus(),o&&window.scrollTo(null,Fe),A.input.reset(),R.somethingSelected()||(U.value=t.prevInput=" "),t.contextMenuPending=qe,A.selForContextMenu=R.doc.sel,clearTimeout(A.detectingSelectAll);function rt(){if(U.selectionStart!=null){var dt=R.somethingSelected(),gt="\u200B"+(dt?U.value:"");U.value="\u21DA",U.value=gt,t.prevInput=dt?"":"\u200B",U.selectionStart=1,U.selectionEnd=gt.length,A.selForContextMenu=R.doc.sel}}function qe(){if(t.contextMenuPending!=qe)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=me,U.style.cssText=ue,S&&v<9&&A.scrollbars.setScrollTop(A.scroller.scrollTop=re),U.selectionStart!=null){(!S||S&&v<9)&&rt();var dt=0,gt=function(){A.selForContextMenu==R.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&t.prevInput=="\u200B"?In(R,Ds)(R):dt++<10?A.detectingSelectAll=setTimeout(gt,500):(A.selForContextMenu=null,A.input.reset())};A.detectingSelectAll=setTimeout(gt,200)}}if(S&&v>=9&&rt(),L){Le(e);var lt=function(){et(window,"mouseup",lt),setTimeout(qe,20)};Ce(window,"mouseup",lt)}else setTimeout(qe,50)},jn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},jn.prototype.setUneditable=function(){},jn.prototype.needsContentAttribute=!1;function au(e,t){if(t=t?H(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var R=z();t.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function A(){e.value=se.getValue()}var U;if(e.form&&(Ce(e.form,"submit",A),!t.leaveSubmitMethodAlone)){var V=e.form;U=V.submit;try{var re=V.submit=function(){A(),V.submit=U,V.submit(),V.submit=re}}catch(ue){}}t.finishInit=function(ue){ue.save=A,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,A(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(et(e.form,"submit",A),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var se=Tn(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},t);return se}function iu(e){e.off=et,e.on=Ce,e.wheelEventPixels=so,e.Doc=Aa,e.splitLines=wt,e.countColumn=W,e.findColumn=ge,e.isWordChar=J,e.Pass=pe,e.signal=Ue,e.Line=aa,e.changeEnd=Za,e.scrollbarModel=ao,e.Pos=ct,e.cmpPos=Dt,e.modes=Vt,e.mimeModes=Tt,e.resolveMode=Wt,e.getMode=Bt,e.modeExtensions=Nr,e.extendMode=dn,e.copyState=Er,e.startState=vt,e.innerMode=qn,e.commands=xo,e.keyMap=mi,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Yi,e.normalizeKeyMap=kl,e.StringStream=Ct,e.SharedTextMarker=go,e.TextMarker=Si,e.LineWidget=vo,e.e_preventDefault=ce,e.e_stopPropagation=xe,e.e_stop=Le,e.addClass=G,e.contains=M,e.rmClass=f,e.keyNames=Ci}Jl(Tn),eu(Tn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in Aa.prototype)Aa.prototype.hasOwnProperty(Xo)&&ee(ou,Xo)<0&&(Tn.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Aa.prototype[Xo]));return Ae(Aa),Tn.inputStyles={textarea:jn,contenteditable:qr},Tn.defineMode=function(e){!Tn.defaults.mode&&e!="null"&&(Tn.defaults.mode=e),dr.apply(this,arguments)},Tn.defineMIME=tr,Tn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Tn.defineMIME("text/plain","null"),Tn.defineExtension=function(e,t){Tn.prototype[e]=t},Tn.defineDocExtension=function(e,t){Aa.prototype[e]=t},Tn.fromTextArea=au,iu(Tn),Tn.version="5.58.2",Tn})},WYAk:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){(function(){var c=P,_=c.lib,D=_.Base,p=c.enc,s=p.Utf8,S=c.algo,v=S.HMAC=D.extend({init:function(o,i){o=this._hasher=new o.init,typeof i=="string"&&(i=s.parse(i));var r=o.blockSize,h=r*4;i.sigBytes>h&&(i=o.finalize(i)),i.clamp();for(var y=this._oKey=i.clone(),g=this._iKey=i.clone(),w=y.words,m=g.words,d=0;d<r;d++)w[d]^=1549556828,m[d]^=909522486;y.sigBytes=g.sigBytes=h,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var i=this._hasher,r=i.finalize(o);i.reset();var h=i.finalize(this._oKey.clone().concat(r));return h}})})()})},WaYH:function(N,$,k){"use strict";var P=k("rePB"),c=k("Ff2n"),_=k("VTBJ"),D=k("1OyB"),p=k("vuIU"),s=k("JX7q"),S=k("Ji7U"),v=k("LK+K"),o=k("cDcd"),i=k("TSYQ"),r=k.n(i),h=k("sboe"),y=k("OZM5"),g=function(L){var O=L.prefixCls,f=L.level,x=L.isStart,b=L.isEnd;if(!f)return null;for(var C="".concat(O,"-indent-unit"),I=[],j=0;j<f;j+=1){var M;I.push(o.createElement("span",{key:j,className:r()(C,(M={},Object(P.a)(M,"".concat(C,"-start"),x[j+1]),Object(P.a)(M,"".concat(C,"-end"),b[j+1]),Object(P.a)(M,"".concat(C,"-end-first-level"),!j&&b[0]),M))}))}return o.createElement("span",{"aria-hidden":"true",className:"".concat(O,"-indent")},I)},w=g,m=k("815F"),d="open",n="close",l="---",u=function(a){Object(S.a)(O,a);var L=Object(v.a)(O);function O(){var f;return Object(D.a)(this,O),f=L.apply(this,arguments),f.state={dragNodeHighlight:!1},f.onSelectorClick=function(x){var b=f.props.context.onNodeClick;b(x,Object(m.b)(f.props)),f.isSelectable()?f.onSelect(x):f.onCheck(x)},f.onSelectorDoubleClick=function(x){var b=f.props.context.onNodeDoubleClick;b(x,Object(m.b)(f.props))},f.onSelect=function(x){if(f.isDisabled())return;var b=f.props.context.onNodeSelect;x.preventDefault(),b(x,Object(m.b)(f.props))},f.onCheck=function(x){if(f.isDisabled())return;var b=f.props,C=b.disableCheckbox,I=b.checked,j=f.props.context.onNodeCheck;if(!f.isCheckable()||C)return;x.preventDefault();var M=!I;j(x,Object(m.b)(f.props),M)},f.onMouseEnter=function(x){var b=f.props.context.onNodeMouseEnter;b(x,Object(m.b)(f.props))},f.onMouseLeave=function(x){var b=f.props.context.onNodeMouseLeave;b(x,Object(m.b)(f.props))},f.onContextMenu=function(x){var b=f.props.context.onNodeContextMenu;b(x,Object(m.b)(f.props))},f.onDragStart=function(x){var b=f.props.context.onNodeDragStart;x.stopPropagation(),f.setState({dragNodeHighlight:!0}),b(x,Object(s.a)(f));try{x.dataTransfer.setData("text/plain","")}catch(C){}},f.onDragEnter=function(x){var b=f.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),b(x,Object(s.a)(f))},f.onDragOver=function(x){var b=f.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),b(x,Object(s.a)(f))},f.onDragLeave=function(x){var b=f.props.context.onNodeDragLeave;x.stopPropagation(),b(x,Object(s.a)(f))},f.onDragEnd=function(x){var b=f.props.context.onNodeDragEnd;x.stopPropagation(),f.setState({dragNodeHighlight:!1}),b(x,Object(s.a)(f))},f.onDrop=function(x){var b=f.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),f.setState({dragNodeHighlight:!1}),b(x,Object(s.a)(f))},f.onExpand=function(x){var b=f.props.context.onNodeExpand;b(x,Object(m.b)(f.props))},f.setSelectHandle=function(x){f.selectHandle=x},f.getNodeState=function(){var x=f.props.expanded;return f.isLeaf()?null:x?d:n},f.hasChildren=function(){var x=f.props.eventKey,b=f.props.context.keyEntities,C=b[x]||{},I=C.children;return!!(I||[]).length},f.isLeaf=function(){var x=f.props,b=x.isLeaf,C=x.loaded,I=f.props.context.loadData,j=f.hasChildren();return b===!1?!1:b||!I&&!j||I&&C&&!j},f.isDisabled=function(){var x=f.props.disabled,b=f.props.context.disabled;return!!(b||x)},f.isCheckable=function(){var x=f.props.checkable,b=f.props.context.checkable;return!b||x===!1?!1:b},f.syncLoadData=function(x){var b=x.expanded,C=x.loading,I=x.loaded,j=f.props.context,M=j.loadData,z=j.onNodeLoad;if(C)return;M&&b&&!f.isLeaf()&&(!f.hasChildren()&&!I&&z(Object(m.b)(f.props)))},f.renderSwitcher=function(){var x=f.props,b=x.expanded,C=x.switcherIcon,I=f.props.context,j=I.prefixCls,M=I.switcherIcon,z=C||M;if(f.isLeaf())return o.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof z=="function"?z(Object(_.a)(Object(_.a)({},f.props),{},{isLeaf:!0})):z);var G=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(b?d:n));return o.createElement("span",{onClick:f.onExpand,className:G},typeof z=="function"?z(Object(_.a)(Object(_.a)({},f.props),{},{isLeaf:!1})):z)},f.renderCheckbox=function(){var x=f.props,b=x.checked,C=x.halfChecked,I=x.disableCheckbox,j=f.props.context.prefixCls,M=f.isDisabled(),z=f.isCheckable();if(!z)return null;var G=typeof z!="boolean"?z:null;return o.createElement("span",{className:r()("".concat(j,"-checkbox"),b&&"".concat(j,"-checkbox-checked"),!b&&C&&"".concat(j,"-checkbox-indeterminate"),(M||I)&&"".concat(j,"-checkbox-disabled")),onClick:f.onCheck},G)},f.renderIcon=function(){var x=f.props.loading,b=f.props.context.prefixCls;return o.createElement("span",{className:r()("".concat(b,"-iconEle"),"".concat(b,"-icon__").concat(f.getNodeState()||"docu"),x&&"".concat(b,"-icon_loading"))})},f.renderSelector=function(){var x=f.state.dragNodeHighlight,b=f.props,C=b.title,I=b.selected,j=b.icon,M=b.loading,z=b.data,G=f.props.context,B=G.prefixCls,K=G.showIcon,F=G.icon,H=G.draggable,W=G.loadData,Q=G.titleRender,ee=f.isDisabled(),q="".concat(B,"-node-content-wrapper"),pe;if(K){var ye=j||F;pe=ye?o.createElement("span",{className:r()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof ye=="function"?ye(f.props):ye):f.renderIcon()}else W&&M&&(pe=f.renderIcon());var ie;typeof C=="function"?ie=C(z):Q?ie=Q(z):ie=C;var Se=o.createElement("span",{className:"".concat(B,"-title")},ie);return o.createElement("span",{ref:f.setSelectHandle,title:typeof C=="string"?C:"",className:r()("".concat(q),"".concat(q,"-").concat(f.getNodeState()||"normal"),!ee&&(I||x)&&"".concat(B,"-node-selected"),!ee&&H&&"draggable"),draggable:!ee&&H||void 0,"aria-grabbed":!ee&&H||void 0,onMouseEnter:f.onMouseEnter,onMouseLeave:f.onMouseLeave,onContextMenu:f.onContextMenu,onClick:f.onSelectorClick,onDoubleClick:f.onSelectorDoubleClick,onDragStart:H?f.onDragStart:void 0},pe,Se)},f}return Object(p.a)(O,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,b=this.props.context.selectable;return typeof x=="boolean"?x:b}},{key:"render",value:function(){var x,b=this.props,C=b.eventKey,I=b.className,j=b.style,M=b.dragOver,z=b.dragOverGapTop,G=b.dragOverGapBottom,B=b.isLeaf,K=b.isStart,F=b.isEnd,H=b.expanded,W=b.selected,Q=b.checked,ee=b.halfChecked,q=b.loading,pe=b.domRef,ye=b.active,ie=b.onMouseMove,Se=Object(c.a)(b,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ge=this.props.context,oe=ge.prefixCls,le=ge.filterTreeNode,te=ge.draggable,be=ge.keyEntities,Z=this.isDisabled(),ae=Object(y.f)(Se),Ee=be[C]||{},ne=Ee.level,J=F[F.length-1];return o.createElement("div",Object.assign({ref:pe,className:r()(I,"".concat(oe,"-treenode"),(x={},Object(P.a)(x,"".concat(oe,"-treenode-disabled"),Z),Object(P.a)(x,"".concat(oe,"-treenode-switcher-").concat(H?"open":"close"),!B),Object(P.a)(x,"".concat(oe,"-treenode-checkbox-checked"),Q),Object(P.a)(x,"".concat(oe,"-treenode-checkbox-indeterminate"),ee),Object(P.a)(x,"".concat(oe,"-treenode-selected"),W),Object(P.a)(x,"".concat(oe,"-treenode-loading"),q),Object(P.a)(x,"".concat(oe,"-treenode-active"),ye),Object(P.a)(x,"".concat(oe,"-treenode-leaf-last"),J),Object(P.a)(x,"drag-over",!Z&&M),Object(P.a)(x,"drag-over-gap-top",!Z&&z),Object(P.a)(x,"drag-over-gap-bottom",!Z&&G),Object(P.a)(x,"filter-node",le&&le(Object(m.b)(this.props))),x)),style:j,onDragEnter:te?this.onDragEnter:void 0,onDragOver:te?this.onDragOver:void 0,onDragLeave:te?this.onDragLeave:void 0,onDrop:te?this.onDrop:void 0,onDragEnd:te?this.onDragEnd:void 0,onMouseMove:ie},ae),o.createElement(w,{prefixCls:oe,level:ne,isStart:K,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),O}(o.Component),T=function(L){return o.createElement(h.a.Consumer,null,function(O){return o.createElement(u,Object.assign({},L,{context:O}))})};T.displayName="TreeNode",T.defaultProps={title:l},T.isTreeNode=1;var E=$.a=T},XIdC:function(N,$,k){"use strict";var P=k("rePB"),c=k("ODXe"),_=k("Ff2n"),D=k("cDcd"),p=k.n(D),s=k("TSYQ"),S=k.n(s),v=k("6cGi"),o=k("4IlW"),i=D.forwardRef(function(r,h){var y,g=r.prefixCls,w=g===void 0?"rc-switch":g,m=r.className,d=r.checked,n=r.defaultChecked,l=r.disabled,u=r.loadingIcon,T=r.checkedChildren,E=r.unCheckedChildren,a=r.onClick,L=r.onChange,O=r.onKeyDown,f=Object(_.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(v.a)(!1,{value:d,defaultValue:n}),b=Object(c.a)(x,2),C=b[0],I=b[1];function j(B,K){var F=C;return l||(F=B,I(F),L==null||L(F,K)),F}function M(B){B.which===o.a.LEFT?j(!1,B):B.which===o.a.RIGHT&&j(!0,B),O==null||O(B)}function z(B){var K=j(!C,B);a==null||a(K,B)}var G=S()(w,m,(y={},Object(P.a)(y,"".concat(w,"-checked"),C),Object(P.a)(y,"".concat(w,"-disabled"),l),y));return D.createElement("button",Object.assign({},f,{type:"button",role:"switch","aria-checked":C,disabled:l,className:G,ref:h,onKeyDown:M,onClick:z}),u,D.createElement("span",{className:"".concat(w,"-inner")},C?T:E))});i.displayName="Switch",$.a=i},Y1PL:function(N,$,k){"use strict";k.r($),k.d($,"ResizableTextArea",function(){return ee});var P=k("wx14"),c=k("1OyB"),_=k("vuIU"),D=k("Ji7U"),p=k("LK+K"),s=k("cDcd"),S=k("VTBJ"),v=k("rePB"),o=k("Zm9Q"),i=k("Kwbf"),r=k("c+Xe"),h=k("m+aA"),y=k("bdgK"),g=new Map;function w(ye){ye.forEach(function(ie){var Se,ge=ie.target;(Se=g.get(ge))===null||Se===void 0||Se.forEach(function(oe){return oe(ge)})})}var m=new y.default(w),d=null,n=null;function l(ye,ie){g.has(ye)||(g.set(ye,new Set),m.observe(ye)),g.get(ye).add(ie)}function u(ye,ie){g.has(ye)&&(g.get(ye).delete(ie),g.get(ye).size||(m.unobserve(ye),g.delete(ye)))}var T=function(ye){Object(D.a)(Se,ye);var ie=Object(p.a)(Se);function Se(){return Object(c.a)(this,Se),ie.apply(this,arguments)}return Object(_.a)(Se,[{key:"render",value:function(){return this.props.children}}]),Se}(s.Component),E=s.createContext(null);function a(ye){var ie=ye.children,Se=ye.onBatchResize,ge=s.useRef(0),oe=s.useRef([]),le=s.useContext(E),te=s.useCallback(function(be,Z,ae){ge.current+=1;var Ee=ge.current;oe.current.push({size:be,element:Z,data:ae}),Promise.resolve().then(function(){Ee===ge.current&&(Se==null||Se(oe.current),oe.current=[])}),le==null||le(be,Z,ae)},[Se,le]);return s.createElement(E.Provider,{value:te},ie)}function L(ye){var ie=ye.children,Se=ye.disabled,ge=s.useRef(null),oe=s.useRef(null),le=s.useContext(E),te=s.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=s.isValidElement(ie)&&Object(r.c)(ie),Z=be?ie.ref:null,ae=s.useMemo(function(){return Object(r.a)(Z,ge)},[Z,ge]),Ee=s.useRef(ye);Ee.current=ye;var ne=s.useCallback(function(J){var X=Ee.current,Y=X.onResize,he=X.data,de=J.getBoundingClientRect(),Te=de.width,ze=de.height,Ze=J.offsetWidth,Je=J.offsetHeight,$e=Math.floor(Te),tt=Math.floor(ze);if(te.current.width!==$e||te.current.height!==tt||te.current.offsetWidth!==Ze||te.current.offsetHeight!==Je){var nt={width:$e,height:tt,offsetWidth:Ze,offsetHeight:Je};te.current=nt;var Me=Ze===Math.round(Te)?Te:Ze,Ce=Je===Math.round(ze)?ze:Je,Xe=Object(S.a)(Object(S.a)({},nt),{},{offsetWidth:Me,offsetHeight:Ce});le==null||le(Xe,J,he),Y&&Promise.resolve().then(function(){Y(Xe,J)})}},[]);return s.useEffect(function(){var J=Object(h.a)(ge.current)||Object(h.a)(oe.current);return J&&!Se&&l(J,ne),function(){return u(J,ne)}},[ge.current,Se]),s.createElement(T,{ref:oe},be?s.cloneElement(ie,{ref:ae}):ie)}var O="rc-observer-key";function f(ye){var ie=ye.children,Se=Object(o.a)(ie);return Se.map(function(ge,oe){var le=(ge==null?void 0:ge.key)||"".concat(O,"-").concat(oe);return s.createElement(L,Object(P.a)({},ye,{key:le}),ge)})}f.Collection=a;var x=f,b=k("bT9E"),C=k("TSYQ"),I=k.n(C),j=`
|
|
|
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
|
|
|
`,M=["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"],z={},G;function B(ye){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=ye.getAttribute("id")||ye.getAttribute("data-reactid")||ye.getAttribute("name");if(ie&&z[Se])return z[Se];var ge=window.getComputedStyle(ye),oe=ge.getPropertyValue("box-sizing")||ge.getPropertyValue("-moz-box-sizing")||ge.getPropertyValue("-webkit-box-sizing"),le=parseFloat(ge.getPropertyValue("padding-bottom"))+parseFloat(ge.getPropertyValue("padding-top")),te=parseFloat(ge.getPropertyValue("border-bottom-width"))+parseFloat(ge.getPropertyValue("border-top-width")),be=M.map(function(ae){return"".concat(ae,":").concat(ge.getPropertyValue(ae))}).join(";"),Z={sizingStyle:be,paddingSize:le,borderSize:te,boxSizing:oe};return ie&&Se&&(z[Se]=Z),Z}function K(ye){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;G||(G=document.createElement("textarea"),G.setAttribute("tab-index","-1"),G.setAttribute("aria-hidden","true"),document.body.appendChild(G)),ye.getAttribute("wrap")?G.setAttribute("wrap",ye.getAttribute("wrap")):G.removeAttribute("wrap");var oe=B(ye,ie),le=oe.paddingSize,te=oe.borderSize,be=oe.boxSizing,Z=oe.sizingStyle;G.setAttribute("style","".concat(Z,";").concat(j)),G.value=ye.value||ye.placeholder||"";var ae=Number.MIN_SAFE_INTEGER,Ee=Number.MAX_SAFE_INTEGER,ne=G.scrollHeight,J;if(be==="border-box"?ne+=te:be==="content-box"&&(ne-=le),Se!==null||ge!==null){G.value=" ";var X=G.scrollHeight-le;Se!==null&&(ae=X*Se,be==="border-box"&&(ae=ae+le+te),ne=Math.max(ae,ne)),ge!==null&&(Ee=X*ge,be==="border-box"&&(Ee=Ee+le+te),J=ne>Ee?"":"hidden",ne=Math.min(Ee,ne))}return{height:ne,minHeight:ae,maxHeight:Ee,overflowY:J,resize:"none"}}var F=k("Gytx"),H=k.n(F),W;(function(ye){ye[ye.NONE=0]="NONE",ye[ye.RESIZING=1]="RESIZING",ye[ye.RESIZED=2]="RESIZED"})(W||(W={}));var Q=function(ye){Object(D.a)(Se,ye);var ie=Object(p.a)(Se);function Se(ge){var oe;return Object(c.a)(this,Se),oe=ie.call(this,ge),oe.nextFrameActionId=void 0,oe.resizeFrameId=void 0,oe.textArea=void 0,oe.saveTextArea=function(le){oe.textArea=le},oe.handleResize=function(le){var te=oe.state.resizeStatus,be=oe.props,Z=be.autoSize,ae=be.onResize;if(te!==W.NONE)return;typeof ae=="function"&&ae(le),Z&&oe.resizeOnNextFrame()},oe.resizeOnNextFrame=function(){cancelAnimationFrame(oe.nextFrameActionId),oe.nextFrameActionId=requestAnimationFrame(oe.resizeTextarea)},oe.resizeTextarea=function(){var le=oe.props.autoSize;if(!le||!oe.textArea)return;var te=le.minRows,be=le.maxRows,Z=K(oe.textArea,!1,te,be);oe.setState({textareaStyles:Z,resizeStatus:W.RESIZING},function(){cancelAnimationFrame(oe.resizeFrameId),oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:W.RESIZED},function(){oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:W.NONE}),oe.fixFirefoxAutoScroll()})})})})},oe.renderTextArea=function(){var le=oe.props,te=le.prefixCls,be=te===void 0?"rc-textarea":te,Z=le.autoSize,ae=le.onResize,Ee=le.className,ne=le.disabled,J=oe.state,X=J.textareaStyles,Y=J.resizeStatus,he=Object(b.a)(oe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),de=I()(be,Ee,Object(v.a)({},"".concat(be,"-disabled"),ne));"value"in he&&(he.value=he.value||"");var Te=Object(S.a)(Object(S.a)(Object(S.a)({},oe.props.style),X),Y===W.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(x,{onResize:oe.handleResize,disabled:!(Z||ae)},s.createElement("textarea",Object(P.a)({},he,{className:de,style:Te,ref:oe.saveTextArea})))},oe.state={textareaStyles:{},resizeStatus:W.NONE},oe}return Object(_.a)(Se,[{key:"componentDidUpdate",value:function(oe){(oe.value!==this.props.value||!H()(oe.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 oe=this.textArea.selectionStart,le=this.textArea.selectionEnd;this.textArea.setSelectionRange(oe,le)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Se}(s.Component),ee=Q,q=function(ye){Object(D.a)(Se,ye);var ie=Object(p.a)(Se);function Se(ge){var oe;Object(c.a)(this,Se),oe=ie.call(this,ge),oe.resizableTextArea=void 0,oe.focus=function(){oe.resizableTextArea.textArea.focus()},oe.saveTextArea=function(te){oe.resizableTextArea=te},oe.handleChange=function(te){var be=oe.props.onChange;oe.setValue(te.target.value,function(){oe.resizableTextArea.resizeTextarea()}),be&&be(te)},oe.handleKeyDown=function(te){var be=oe.props,Z=be.onPressEnter,ae=be.onKeyDown;te.keyCode===13&&Z&&Z(te),ae&&ae(te)};var le=typeof ge.value=="undefined"||ge.value===null?ge.defaultValue:ge.value;return oe.state={value:le},oe}return Object(_.a)(Se,[{key:"setValue",value:function(oe,le){"value"in this.props||this.setState({value:oe},le)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return s.createElement(ee,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(oe){return"value"in oe?{value:oe.value}:null}}]),Se}(s.Component),pe=$.default=q},ZD9Y:function(N,$,k){"use strict";var P=k("BoS7"),c=k("Sdc0"),_=k("OaEy"),D=k("2fM7"),p=k("cDcd"),s=k.n(p),S=k("lOMy"),v=k.n(S),o=D.a.Option;$.a=function(i){var r=i.onFontSizeChange,h=i.cmFontSize,y=i.cmCodeMode,g=i.onCodeModeChange,w=i.onTabToSpace,m=i.className,d=m===void 0?"":m,n=i.tabToSpace,l=i.children;return s.a.createElement("div",{className:"tpi-code-setting ".concat(d)},s.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),s.a.createElement(D.a,{bordered:!1,size:"small",value:y,onChange:g},s.a.createElement(o,{value:"vs"},"\u767D\u8272\u80CC\u666F"),s.a.createElement(o,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),s.a.createElement(D.a,{bordered:!1,size:"small",value:h,onChange:r},s.a.createElement(o,{value:12},"12px"),s.a.createElement(o,{value:14},"14px"),s.a.createElement(o,{value:16},"16px"),s.a.createElement(o,{value:18},"18px"),s.a.createElement(o,{value:20},"20px"),s.a.createElement(o,{value:22},"22px"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"Tab\u8F6C\u6362"),s.a.createElement(c.a,{checked:n,onChange:w}))),s.a.createElement("h3",null,"\u5FEB\u6377\u952E"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),s.a.createElement("span",null,"Ctrl + S")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),s.a.createElement("span",null,"F1 / Alt + F1")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),s.a.createElement("span",null,"Ctrl + ]/[")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),s.a.createElement("span",null,"Ctrl + Shift + \\")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),s.a.createElement("span",null,"Home")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),s.a.createElement("span",null,"End"))),l)}},ZW9T:function(N,$,k){"use strict";k.d($,"a",function(){return E});var P=k("k1fw"),c=k("miYZ"),_=k("tsqr"),D=k("rAM+"),p=k("tJVT"),s=k("PpiC"),S=k("cDcd"),v=k.n(S),o=k("bdgK");function i(a,L,O,f,x){var b=L.getWordUntilPosition(O),C={startLineNumber:O.lineNumber,endLineNumber:O.lineNumber,startColumn:b.startColumn,endColumn:b.endColumn},I=f.map(function(j){return{label:j,kind:a.languages.CompletionItemKind.Keyword,insertText:j,insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:C}});return x.map(function(j){I.push(Object(P.a)(Object(P.a)({},j),{},{range:C}))}),I}var r=function(a){var L={label:"ifelse",kind:a.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},O=["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"];a.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(C,I){var j=i(a,C,I,O,[L]);return{suggestions:j}}});var f=["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"];a.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(C,I){var j=[{label:"print",kind:a.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
|
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}],M=i(a,C,I,f,j);return{suggestions:M}}});var x=["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"];a.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(C,I){var j=[L,{label:"main",kind:a.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:a.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
|
|
|
`),insertTextRules:a.languages.CompletionItemInsertTextRule.InsertAsSnippet}],M=i(a,C,I,x,j);return{suggestions:M}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",y=k("LvDl"),g=k("+ua5");function w(a){return/^\d+$/.test(a)?"".concat(a,"px"):a}function m(){}var d=!1,n={"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 l(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=a;if(Array.isArray(a)){for(var O=0;O<a.length;O++){var f=n[a[O]];if(f)return f}return L[0]}return n[L]||L}var u=null,T=$.b=function(a){var L=a.width,O=L===void 0?"100%":L,f=a.height,x=f===void 0?"100%":f,b=a.value,C=a.language,I=C===void 0?"javascript":C,j=a.style,M=j===void 0?{}:j,z=a.options,G=z===void 0?{}:z,B=a.overrideServices,K=B===void 0?{}:B,F=a.theme,H=F===void 0?"vs-dark":F,W=a.onEditBlur,Q=a.onSave,ee=a.autoHeight,q=ee===void 0?!1:ee,pe=a.forbidCopy,ye=pe===void 0?!1:pe,ie=a.onChange,Se=ie===void 0?m:ie,ge=a.editorDidMount,oe=ge===void 0?m:ge,le=a.onFocus,te=le===void 0?m:le,be=a.filename,Z=be===void 0?"educoder.txt":be,ae=a.errorLine,Ee=a.errorContent,ne=Ee===void 0?"":Ee,J=Object(s.a)(a,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),X=Object(S.useRef)(),Y=Object(S.useRef)({}),he=Object(S.useRef)(),de=Object(S.useRef)(!1),Te=Object(S.useRef)(),ze=Object(S.useState)(!1),Ze=Object(p.a)(ze,2),Je=Ze[0],$e=Ze[1];function tt(){var Ye;return X.current&&(Ye=new o.default(function(at){var it=Object(D.a)(at),ot;try{for(it.s();!(ot=it.n()).done;){var yt=ot.value;(yt.target.offsetHeight>0||yt.target.offsetWidth>0)&&Y.current.instance.layout()}}catch(wt){it.e(wt)}finally{it.f()}}),Ye.observe(X.current)),Ye}function nt(){_.b.warn(decodeURIComponent(h))}var Me=function(){var at=Y.current.instance;if(b!=null&&at&&Je){var it=at.getModel();it&&b!==it.getValue()&&(d=!0,it.setValue(b),at.layout(),d=!1)}};Object(S.useEffect)(function(){he.current&&clearTimeout(he.current),he.current=setTimeout(function(){Me()},500)},[b,Je,Y.current]),Object(S.useEffect)(function(){if(ae&&Y.current&&Y.current.instance){var Ye=Y.current.instance;Ye.changeViewZones(function(it){var ot=document.createElement("div");ot.style.padding="10px 20px",ot.style.width="calc(100% - 20px)",ot.className="my-error-line-wrp",ot.innerHTML=ne,it.addZone({afterLineNumber:ae||11,heightInLines:3,domNode:ot})});var at={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Ye.addOverlayWidget(at),Ye.revealPositionInCenter({lineNumber:20,column:1})}},[ae,Y.current,Je]);function Ce(){var Ye=Y.current.instance;if(Ye){var at=Ye.getSelection(),it=Y.current.pastePos||{},ot=new u.Range(it.startLineNumber||at.endLineNumber,it.startColumn||at.endColumn,it.endLineNumber||at.endLineNumber,it.endColumn||at.endColumn);setTimeout(function(){Ye.executeEdits("",[{range:ot,text:""}])},300)}}function Xe(Ye){(window.navigator.platform.match("Mac")?Ye.metaKey:Ye.ctrlKey)&&Ye.keyCode==83&&(Ye.preventDefault(),Q())}var et=function(){if(q&&Y.current.instance){var at=Y.current.instance.getContentHeight();Re(at<x?x:at)}else Re(x)};function Ue(Ye){var at=document.createEvent("MouseEvents");at.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ye.dispatchEvent(at)}function Ve(Ye,at){var it=window.URL||window.webkitURL||window,ot=new Blob([at]),yt=document.createElementNS("http://www.w3.org/1999/xhtml","a");yt.href=it.createObjectURL(ot),yt.download=Ye,Ue(yt)}Object(S.useEffect)(function(){et()},[et]),Object(S.useEffect)(function(){X.current&&!Je&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(Ye){try{u=Ye,Y.current.instance=u.editor.create(X.current,{value:b,language:l(I),theme:H,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},K);var at=Y.current.instance;if(oe(at,u),setTimeout(function(){et(),Y.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ve(Z||"educoder.txt",at.getValue())}})},500),Y.current.subscription=at.onDidChangeModelContent(function(ot){de.current?clearTimeout(Te.current):(et(),Se(at.getValue(),ot)),Te.current=setTimeout(function(){de.current=!1},500)}),window.Monaco||r(u),ye&&(at.addCommand(u.KeyMod.CtrlCmd|u.KeyMod.Shift|u.KeyCode.KEY_V,function(){return nt(),null}),at.addCommand(u.KeyMod.CtrlCmd|u.KeyCode.KEY_C,function(){return nt(),null})),window.Monaco=u,W&&at.onDidBlurEditorWidget(function(){W(at.getValue())}),te&&at.onDidFocusEditorText(function(){te(at.getValue())}),ye){at.addCommand(u.KeyMod.CtrlCmd|u.KeyCode.KEY_V,function(){return nt(),null}),at.onDidPaste(function(ot){Y.current.pastePos=ot});try{window.addEventListener("paste",Ce)}catch(ot){}}var it=tt();return $e(!0),function(){var ot=Y.current.instance;ot.dispose();var yt=ot.getModel();yt&&yt.dispose(),Y.current.subscription&&Y.current.subscription.dispose(),ye&&window.removeEventListener("paste",Ce),it.unobserve(X.current)}}catch(ot){}})},[]),Object(S.useEffect)(function(){var Ye=Y.current.instance;if(Ye&&Je)return document.addEventListener("keydown",Xe,!1),function(){document.removeEventListener("keydown",Xe)}},[Q,Je]),Object(S.useEffect)(function(){var Ye=Y.current.instance;if(Ye&&Je){var at=l(I);u.editor.setModelLanguage(Ye.getModel(),at),console.log("language:",I,Ye.getModel(),at)}},[I,Je]),Object(S.useEffect)(function(){var Ye=Y.current.instance;Ye&&Je&&u.editor.setTheme(H)},[H,Je]),Object(S.useEffect)(function(){var Ye=Y.current.instance;Ye&&Je&&(Ye.updateOptions(Object(P.a)({},G)),setTimeout(function(){Ye.getModel().updateOptions(Object(P.a)({},G))},200))},[JSON.stringify(G),Je]),Object(S.useEffect)(function(){var Ye=Y.current.instance;Ye&&Je&&Ye.layout()},[O,x,Je]);var Pe=Object(S.useState)(w(O)),we=Object(p.a)(Pe,2),Ae=we[0],ce=we[1],xe=Object(S.useState)(w(x)),_e=Object(p.a)(xe,2),Le=_e[0],Re=_e[1],Ge=Object(P.a)(Object(P.a)({},M),{},{width:Ae,height:Le});return v.a.createElement("div",{className:"my-monaco-editor",ref:X,style:Ge})};function E(a){var L=a.width,O=L===void 0?"100%":L,f=a.height,x=f===void 0?"100%":f,b=a.original,C=a.modified,I=a.language,j=a.options,M=j===void 0?{}:j,z=Object(S.useRef)(),G=Object(S.useState)(null),B=Object(p.a)(G,2),K=B[0],F=B[1];function H(q){var pe;return z.current&&(pe=new o.default(function(ye){var ie=Object(D.a)(ye),Se;try{for(ie.s();!(Se=ie.n()).done;){var ge=Se.value;(ge.target.offsetHeight>0||ge.target.offsetWidth>0)&&q.layout()}}catch(oe){ie.e(oe)}finally{ie.f()}}),pe.observe(z.current)),pe}Object(S.useEffect)(function(){z.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(q){u=q;var pe=u.editor.createDiffEditor(z.current,Object(P.a)(Object(P.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},M),{},{wordWrap:!0}));F(pe);var ye=H(pe);return function(){pe.dispose();var ie=pe.getModel();ie&&ie.dispose(),ye.unobserve(z.current)}})},[]),Object(S.useEffect)(function(){K&&K.setModel({original:u.editor.createModel(b,I),modified:u.editor.createModel(C,I)})},[b,C,I,K]);var W=w(O),Q=w(x),ee={width:W,height:Q};return v.a.createElement("div",{className:"my-diff-editor",ref:z,style:ee})}},ZpRC:function(N,$,k){"use strict";function P(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function c(r,h){return(!h||r!=="hidden")&&r!=="visible"&&r!=="clip"}function _(r,h){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var y=getComputedStyle(r,null);return c(y.overflowY,h)||c(y.overflowX,h)||function(g){var w=function(m){if(!m.ownerDocument||!m.ownerDocument.defaultView)return null;try{return m.ownerDocument.defaultView.frameElement}catch(d){return null}}(g);return!!w&&(w.clientHeight<g.scrollHeight||w.clientWidth<g.scrollWidth)}(r)}return!1}function D(r,h,y,g,w,m,d,n){return m<r&&d>h||m>r&&d<h?0:m<=r&&n<=y||d>=h&&n>=y?m-r-g:d>h&&n<y||m<r&&n>y?d-h+w:0}var p=function(r,h){var y=window,g=h.scrollMode,w=h.block,m=h.inline,d=h.boundary,n=h.skipOverflowHiddenElements,l=typeof d=="function"?d:function(X){return X!==d};if(!P(r))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,T=[],E=r;P(E)&&l(E);){if((E=E.parentElement)===u){T.push(E);break}E!=null&&E===document.body&&_(E)&&!_(document.documentElement)||E!=null&&_(E,n)&&T.push(E)}for(var a=y.visualViewport?y.visualViewport.width:innerWidth,L=y.visualViewport?y.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,f=window.scrollY||pageYOffset,x=r.getBoundingClientRect(),b=x.height,C=x.width,I=x.top,j=x.right,M=x.bottom,z=x.left,G=w==="start"||w==="nearest"?I:w==="end"?M:I+b/2,B=m==="center"?z+C/2:m==="end"?j:z,K=[],F=0;F<T.length;F++){var H=T[F],W=H.getBoundingClientRect(),Q=W.height,ee=W.width,q=W.top,pe=W.right,ye=W.bottom,ie=W.left;if(g==="if-needed"&&I>=0&&z>=0&&M<=L&&j<=a&&I>=q&&M<=ye&&z>=ie&&j<=pe)return K;var Se=getComputedStyle(H),ge=parseInt(Se.borderLeftWidth,10),oe=parseInt(Se.borderTopWidth,10),le=parseInt(Se.borderRightWidth,10),te=parseInt(Se.borderBottomWidth,10),be=0,Z=0,ae="offsetWidth"in H?H.offsetWidth-H.clientWidth-ge-le:0,Ee="offsetHeight"in H?H.offsetHeight-H.clientHeight-oe-te:0;if(u===H)be=w==="start"?G:w==="end"?G-L:w==="nearest"?D(f,f+L,L,oe,te,f+G,f+G+b,b):G-L/2,Z=m==="start"?B:m==="center"?B-a/2:m==="end"?B-a:D(O,O+a,a,ge,le,O+B,O+B+C,C),be=Math.max(0,be+f),Z=Math.max(0,Z+O);else{be=w==="start"?G-q-oe:w==="end"?G-ye+te+Ee:w==="nearest"?D(q,ye,Q,oe,te+Ee,G,G+b,b):G-(q+Q/2)+Ee/2,Z=m==="start"?B-ie-ge:m==="center"?B-(ie+ee/2)+ae/2:m==="end"?B-pe+le+ae:D(ie,pe,ee,ge,le+ae,B,B+C,C);var ne=H.scrollLeft,J=H.scrollTop;G+=J-(be=Math.max(0,Math.min(J+be,H.scrollHeight-Q+Ee))),B+=ne-(Z=Math.max(0,Math.min(ne+Z,H.scrollWidth-ee+ae)))}K.push({el:H,top:be,left:Z})}return K};function s(r){return r===Object(r)&&Object.keys(r).length!==0}function S(r,h){h===void 0&&(h="auto");var y="scrollBehavior"in document.body.style;r.forEach(function(g){var w=g.el,m=g.top,d=g.left;w.scroll&&y?w.scroll({top:m,left:d,behavior:h}):(w.scrollTop=m,w.scrollLeft=d)})}function v(r){return r===!1?{block:"end",inline:"nearest"}:s(r)?r:{block:"start",inline:"nearest"}}function o(r,h){var y=!r.ownerDocument.documentElement.contains(r);if(s(h)&&typeof h.behavior=="function")return h.behavior(y?[]:p(r,h));if(y)return;var g=v(h);return S(p(r,g),g.behavior)}var i=$.a=o},Zss7:function(N,$,k){var P;(function(c){var _=/^\s+/,D=/\s+$/,p=0,s=c.round,S=c.min,v=c.max,o=c.random;function i(te,be){if(te=te||"",be=be||{},te instanceof i)return te;if(!(this instanceof i))return new i(te,be);var Z=r(te);this._originalInput=te,this._r=Z.r,this._g=Z.g,this._b=Z.b,this._a=Z.a,this._roundA=s(100*this._a)/100,this._format=be.format||Z.format,this._gradientType=be.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=Z.ok,this._tc_id=p++}i.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 te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),be,Z,ae,Ee,ne,J;return be=te.r/255,Z=te.g/255,ae=te.b/255,be<=.03928?Ee=be/12.92:Ee=c.pow((be+.055)/1.055,2.4),Z<=.03928?ne=Z/12.92:ne=c.pow((Z+.055)/1.055,2.4),ae<=.03928?J=ae/12.92:J=c.pow((ae+.055)/1.055,2.4),.2126*Ee+.7152*ne+.0722*J},setAlpha:function(te){return this._a=K(te),this._roundA=s(100*this._a)/100,this},toHsv:function(){var te=w(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=w(this._r,this._g,this._b),be=s(te.h*360),Z=s(te.s*100),ae=s(te.v*100);return this._a==1?"hsv("+be+", "+Z+"%, "+ae+"%)":"hsva("+be+", "+Z+"%, "+ae+"%, "+this._roundA+")"},toHsl:function(){var te=y(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=y(this._r,this._g,this._b),be=s(te.h*360),Z=s(te.s*100),ae=s(te.l*100);return this._a==1?"hsl("+be+", "+Z+"%, "+ae+"%)":"hsla("+be+", "+Z+"%, "+ae+"%, "+this._roundA+")"},toHex:function(te){return d(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return n(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(F(this._r,255)*100)+"%",g:s(F(this._g,255)*100)+"%",b:s(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(F(this._r,255)*100)+"%, "+s(F(this._g,255)*100)+"%, "+s(F(this._b,255)*100)+"%)":"rgba("+s(F(this._r,255)*100)+"%, "+s(F(this._g,255)*100)+"%, "+s(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:G[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var be="#"+l(this._r,this._g,this._b,this._a),Z=be,ae=this._gradientType?"GradientType = 1, ":"";if(te){var Ee=i(te);Z="#"+l(Ee._r,Ee._g,Ee._b,Ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+ae+"startColorstr="+be+",endColorstr="+Z+")"},toString:function(te){var be=!!te;te=te||this._format;var Z=!1,ae=this._a<1&&this._a>=0,Ee=!be&&ae&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return Ee?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(Z=this.toRgbString()),te==="prgb"&&(Z=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(Z=this.toHexString()),te==="hex3"&&(Z=this.toHexString(!0)),te==="hex4"&&(Z=this.toHex8String(!0)),te==="hex8"&&(Z=this.toHex8String()),te==="name"&&(Z=this.toName()),te==="hsl"&&(Z=this.toHslString()),te==="hsv"&&(Z=this.toHsvString()),Z||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(te,be){var Z=te.apply(null,[this].concat([].slice.call(be)));return this._r=Z._r,this._g=Z._g,this._b=Z._b,this.setAlpha(Z._a),this},lighten:function(){return this._applyModification(a,arguments)},brighten:function(){return this._applyModification(L,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(f,arguments)},_applyCombination:function(te,be){return te.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(b,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},i.fromRatio=function(te,be){if(typeof te=="object"){var Z={};for(var ae in te)te.hasOwnProperty(ae)&&(ae==="a"?Z[ae]=te[ae]:Z[ae]=pe(te[ae]));te=Z}return i(te,be)};function r(te){var be={r:0,g:0,b:0},Z=1,ae=null,Ee=null,ne=null,J=!1,X=!1;return typeof te=="string"&&(te=oe(te)),typeof te=="object"&&(ge(te.r)&&ge(te.g)&&ge(te.b)?(be=h(te.r,te.g,te.b),J=!0,X=String(te.r).substr(-1)==="%"?"prgb":"rgb"):ge(te.h)&&ge(te.s)&&ge(te.v)?(ae=pe(te.s),Ee=pe(te.v),be=m(te.h,ae,Ee),J=!0,X="hsv"):ge(te.h)&&ge(te.s)&&ge(te.l)&&(ae=pe(te.s),ne=pe(te.l),be=g(te.h,ae,ne),J=!0,X="hsl"),te.hasOwnProperty("a")&&(Z=te.a)),Z=K(Z),{ok:J,format:te.format||X,r:S(255,v(be.r,0)),g:S(255,v(be.g,0)),b:S(255,v(be.b,0)),a:Z}}function h(te,be,Z){return{r:F(te,255)*255,g:F(be,255)*255,b:F(Z,255)*255}}function y(te,be,Z){te=F(te,255),be=F(be,255),Z=F(Z,255);var ae=v(te,be,Z),Ee=S(te,be,Z),ne,J,X=(ae+Ee)/2;if(ae==Ee)ne=J=0;else{var Y=ae-Ee;J=X>.5?Y/(2-ae-Ee):Y/(ae+Ee);switch(ae){case te:ne=(be-Z)/Y+(be<Z?6:0);break;case be:ne=(Z-te)/Y+2;break;case Z:ne=(te-be)/Y+4;break}ne/=6}return{h:ne,s:J,l:X}}function g(te,be,Z){var ae,Ee,ne;te=F(te,360),be=F(be,100),Z=F(Z,100);function J(he,de,Te){return Te<0&&(Te+=1),Te>1&&(Te-=1),Te<1/6?he+(de-he)*6*Te:Te<1/2?de:Te<2/3?he+(de-he)*(2/3-Te)*6:he}if(be===0)ae=Ee=ne=Z;else{var X=Z<.5?Z*(1+be):Z+be-Z*be,Y=2*Z-X;ae=J(Y,X,te+1/3),Ee=J(Y,X,te),ne=J(Y,X,te-1/3)}return{r:ae*255,g:Ee*255,b:ne*255}}function w(te,be,Z){te=F(te,255),be=F(be,255),Z=F(Z,255);var ae=v(te,be,Z),Ee=S(te,be,Z),ne,J,X=ae,Y=ae-Ee;if(J=ae===0?0:Y/ae,ae==Ee)ne=0;else{switch(ae){case te:ne=(be-Z)/Y+(be<Z?6:0);break;case be:ne=(Z-te)/Y+2;break;case Z:ne=(te-be)/Y+4;break}ne/=6}return{h:ne,s:J,v:X}}function m(te,be,Z){te=F(te,360)*6,be=F(be,100),Z=F(Z,100);var ae=c.floor(te),Ee=te-ae,ne=Z*(1-be),J=Z*(1-Ee*be),X=Z*(1-(1-Ee)*be),Y=ae%6,he=[Z,J,ne,ne,X,Z][Y],de=[X,Z,Z,J,ne,ne][Y],Te=[ne,ne,X,Z,Z,J][Y];return{r:he*255,g:de*255,b:Te*255}}function d(te,be,Z,ae){var Ee=[q(s(te).toString(16)),q(s(be).toString(16)),q(s(Z).toString(16))];return ae&&Ee[0].charAt(0)==Ee[0].charAt(1)&&Ee[1].charAt(0)==Ee[1].charAt(1)&&Ee[2].charAt(0)==Ee[2].charAt(1)?Ee[0].charAt(0)+Ee[1].charAt(0)+Ee[2].charAt(0):Ee.join("")}function n(te,be,Z,ae,Ee){var ne=[q(s(te).toString(16)),q(s(be).toString(16)),q(s(Z).toString(16)),q(ye(ae))];return Ee&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)&&ne[3].charAt(0)==ne[3].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0)+ne[3].charAt(0):ne.join("")}function l(te,be,Z,ae){var Ee=[q(ye(ae)),q(s(te).toString(16)),q(s(be).toString(16)),q(s(Z).toString(16))];return Ee.join("")}i.equals=function(te,be){return!te||!be?!1:i(te).toRgbString()==i(be).toRgbString()},i.random=function(){return i.fromRatio({r:o(),g:o(),b:o()})};function u(te,be){be=be===0?0:be||10;var Z=i(te).toHsl();return Z.s-=be/100,Z.s=H(Z.s),i(Z)}function T(te,be){be=be===0?0:be||10;var Z=i(te).toHsl();return Z.s+=be/100,Z.s=H(Z.s),i(Z)}function E(te){return i(te).desaturate(100)}function a(te,be){be=be===0?0:be||10;var Z=i(te).toHsl();return Z.l+=be/100,Z.l=H(Z.l),i(Z)}function L(te,be){be=be===0?0:be||10;var Z=i(te).toRgb();return Z.r=v(0,S(255,Z.r-s(255*-(be/100)))),Z.g=v(0,S(255,Z.g-s(255*-(be/100)))),Z.b=v(0,S(255,Z.b-s(255*-(be/100)))),i(Z)}function O(te,be){be=be===0?0:be||10;var Z=i(te).toHsl();return Z.l-=be/100,Z.l=H(Z.l),i(Z)}function f(te,be){var Z=i(te).toHsl(),ae=(Z.h+be)%360;return Z.h=ae<0?360+ae:ae,i(Z)}function x(te){var be=i(te).toHsl();return be.h=(be.h+180)%360,i(be)}function b(te){var be=i(te).toHsl(),Z=be.h;return[i(te),i({h:(Z+120)%360,s:be.s,l:be.l}),i({h:(Z+240)%360,s:be.s,l:be.l})]}function C(te){var be=i(te).toHsl(),Z=be.h;return[i(te),i({h:(Z+90)%360,s:be.s,l:be.l}),i({h:(Z+180)%360,s:be.s,l:be.l}),i({h:(Z+270)%360,s:be.s,l:be.l})]}function I(te){var be=i(te).toHsl(),Z=be.h;return[i(te),i({h:(Z+72)%360,s:be.s,l:be.l}),i({h:(Z+216)%360,s:be.s,l:be.l})]}function j(te,be,Z){be=be||6,Z=Z||30;var ae=i(te).toHsl(),Ee=360/Z,ne=[i(te)];for(ae.h=(ae.h-(Ee*be>>1)+720)%360;--be;)ae.h=(ae.h+Ee)%360,ne.push(i(ae));return ne}function M(te,be){be=be||6;for(var Z=i(te).toHsv(),ae=Z.h,Ee=Z.s,ne=Z.v,J=[],X=1/be;be--;)J.push(i({h:ae,s:Ee,v:ne})),ne=(ne+X)%1;return J}i.mix=function(te,be,Z){Z=Z===0?0:Z||50;var ae=i(te).toRgb(),Ee=i(be).toRgb(),ne=Z/100,J={r:(Ee.r-ae.r)*ne+ae.r,g:(Ee.g-ae.g)*ne+ae.g,b:(Ee.b-ae.b)*ne+ae.b,a:(Ee.a-ae.a)*ne+ae.a};return i(J)},i.readability=function(te,be){var Z=i(te),ae=i(be);return(c.max(Z.getLuminance(),ae.getLuminance())+.05)/(c.min(Z.getLuminance(),ae.getLuminance())+.05)},i.isReadable=function(te,be,Z){var ae=i.readability(te,be),Ee,ne;ne=!1,Ee=le(Z);switch(Ee.level+Ee.size){case"AAsmall":case"AAAlarge":ne=ae>=4.5;break;case"AAlarge":ne=ae>=3;break;case"AAAsmall":ne=ae>=7;break}return ne},i.mostReadable=function(te,be,Z){var ae=null,Ee=0,ne,J,X,Y;Z=Z||{},J=Z.includeFallbackColors,X=Z.level,Y=Z.size;for(var he=0;he<be.length;he++)ne=i.readability(te,be[he]),ne>Ee&&(Ee=ne,ae=i(be[he]));return i.isReadable(te,ae,{level:X,size:Y})||!J?ae:(Z.includeFallbackColors=!1,i.mostReadable(te,["#fff","#000"],Z))};var z=i.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"},G=i.hexNames=B(z);function B(te){var be={};for(var Z in te)te.hasOwnProperty(Z)&&(be[te[Z]]=Z);return be}function K(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function F(te,be){Q(te)&&(te="100%");var Z=ee(te);return te=S(be,v(0,parseFloat(te))),Z&&(te=parseInt(te*be,10)/100),c.abs(te-be)<1e-6?1:te%be/parseFloat(be)}function H(te){return S(1,v(0,te))}function W(te){return parseInt(te,16)}function Q(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function ee(te){return typeof te=="string"&&te.indexOf("%")!=-1}function q(te){return te.length==1?"0"+te:""+te}function pe(te){return te<=1&&(te=te*100+"%"),te}function ye(te){return c.round(parseFloat(te)*255).toString(16)}function ie(te){return W(te)/255}var Se=function(){var te="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",Z="(?:"+be+")|(?:"+te+")",ae="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?",Ee="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?";return{CSS_UNIT:new RegExp(Z),rgb:new RegExp("rgb"+ae),rgba:new RegExp("rgba"+Ee),hsl:new RegExp("hsl"+ae),hsla:new RegExp("hsla"+Ee),hsv:new RegExp("hsv"+ae),hsva:new RegExp("hsva"+Ee),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 ge(te){return!!Se.CSS_UNIT.exec(te)}function oe(te){te=te.replace(_,"").replace(D,"").toLowerCase();var be=!1;if(z[te])te=z[te],be=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Z;return(Z=Se.rgb.exec(te))?{r:Z[1],g:Z[2],b:Z[3]}:(Z=Se.rgba.exec(te))?{r:Z[1],g:Z[2],b:Z[3],a:Z[4]}:(Z=Se.hsl.exec(te))?{h:Z[1],s:Z[2],l:Z[3]}:(Z=Se.hsla.exec(te))?{h:Z[1],s:Z[2],l:Z[3],a:Z[4]}:(Z=Se.hsv.exec(te))?{h:Z[1],s:Z[2],v:Z[3]}:(Z=Se.hsva.exec(te))?{h:Z[1],s:Z[2],v:Z[3],a:Z[4]}:(Z=Se.hex8.exec(te))?{r:W(Z[1]),g:W(Z[2]),b:W(Z[3]),a:ie(Z[4]),format:be?"name":"hex8"}:(Z=Se.hex6.exec(te))?{r:W(Z[1]),g:W(Z[2]),b:W(Z[3]),format:be?"name":"hex"}:(Z=Se.hex4.exec(te))?{r:W(Z[1]+""+Z[1]),g:W(Z[2]+""+Z[2]),b:W(Z[3]+""+Z[3]),a:ie(Z[4]+""+Z[4]),format:be?"name":"hex8"}:(Z=Se.hex3.exec(te))?{r:W(Z[1]+""+Z[1]),g:W(Z[2]+""+Z[2]),b:W(Z[3]+""+Z[3]),format:be?"name":"hex"}:!1}function le(te){var be,Z;return te=te||{level:"AA",size:"small"},be=(te.level||"AA").toUpperCase(),Z=(te.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),Z!=="small"&&Z!=="large"&&(Z="small"),{level:be,size:Z}}N.exports?N.exports=i:!(P=function(){return i}.call($,k,$,N),P!==void 0&&(N.exports=P))})(Math)},bCnd:function(N,$,k){"use strict";k.d($,"b",function(){return D}),k.d($,"a",function(){return p});var P=k("je13"),c=k.n(P),_=!1;function D(s,S){var v=c.a.get("__ec");v||(v={}),v[s]=S,c.a.set("__ec",v)}function p(s,S){var v=c.a.get("__ec");return v?v[s]===void 0?S:v[s]:S}},bQjk:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return function(c){var _=P,D=_.lib,p=D.CipherParams,s=_.enc,S=s.Hex,v=_.format,o=v.Hex={stringify:function(i){return i.ciphertext.toString(S)},parse:function(i){var r=S.parse(i);return p.create({ciphertext:r})}}}(),P.format.Hex})},bT9E:function(N,$,k){"use strict";k.d($,"a",function(){return c});var P=k("VTBJ");function c(_,D){var p=Object(P.a)({},_);return Array.isArray(D)&&D.forEach(function(s){delete p[s]}),p}},biw7:function(N,$,k){"use strict";var P=k("cDcd"),c=k.n(P),_=P.createContext(null);$.a=_},c5Ni:function(N,$,k){},cDPC:function(N,$,k){"use strict";var P=k("tJVT"),c=k("cDcd"),_=k.n(c),D=k("i3hx"),p=k.n(D);$.a=function(s){var S=s.defaultX,v=S===void 0?"40%":S,o=s.leftChild,i=s.rightChild,r=s.className,h=s.hideResize,y=h===void 0?!1:h,g=Object(c.useState)(v),w=Object(P.a)(g,2),m=w[0],d=w[1],n=Object(c.useRef)();function l(){n.current=!0}Object(c.useEffect)(function(){function E(L){n.current&&d(L.pageX)}function a(){n.current=!1}return window.addEventListener("mousemove",E),window.addEventListener("mouseup",a),function(){window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",a)}},[]);var u=typeof m=="number"&&m!==.01?"".concat(m,"px"):v,T="calc(100% - ".concat(y?"0px":"4px"," - ").concat(u,")");return _.a.createElement("div",{className:"split-panel-container ".concat(r)},_.a.createElement("section",{style:{width:u,display:m===.01?"none":""}},o),_.a.createElement("section",{className:"resize-x-bar",onMouseDown:l},_.a.createElement("a",{className:"btn-resize"},_.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},_.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),_.a.createElement("section",{style:{width:T}},i))}},cv67:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(c){var _=P,D=_.lib,p=D.WordArray,s=D.Hasher,S=_.algo,v=[];(function(){for(var g=0;g<64;g++)v[g]=c.abs(c.sin(g+1))*4294967296|0})();var o=S.MD5=s.extend({_doReset:function(){this._hash=new p.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,w){for(var m=0;m<16;m++){var d=w+m,n=g[d];g[d]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var l=this._hash.words,u=g[w+0],T=g[w+1],E=g[w+2],a=g[w+3],L=g[w+4],O=g[w+5],f=g[w+6],x=g[w+7],b=g[w+8],C=g[w+9],I=g[w+10],j=g[w+11],M=g[w+12],z=g[w+13],G=g[w+14],B=g[w+15],K=l[0],F=l[1],H=l[2],W=l[3];K=i(K,F,H,W,u,7,v[0]),W=i(W,K,F,H,T,12,v[1]),H=i(H,W,K,F,E,17,v[2]),F=i(F,H,W,K,a,22,v[3]),K=i(K,F,H,W,L,7,v[4]),W=i(W,K,F,H,O,12,v[5]),H=i(H,W,K,F,f,17,v[6]),F=i(F,H,W,K,x,22,v[7]),K=i(K,F,H,W,b,7,v[8]),W=i(W,K,F,H,C,12,v[9]),H=i(H,W,K,F,I,17,v[10]),F=i(F,H,W,K,j,22,v[11]),K=i(K,F,H,W,M,7,v[12]),W=i(W,K,F,H,z,12,v[13]),H=i(H,W,K,F,G,17,v[14]),F=i(F,H,W,K,B,22,v[15]),K=r(K,F,H,W,T,5,v[16]),W=r(W,K,F,H,f,9,v[17]),H=r(H,W,K,F,j,14,v[18]),F=r(F,H,W,K,u,20,v[19]),K=r(K,F,H,W,O,5,v[20]),W=r(W,K,F,H,I,9,v[21]),H=r(H,W,K,F,B,14,v[22]),F=r(F,H,W,K,L,20,v[23]),K=r(K,F,H,W,C,5,v[24]),W=r(W,K,F,H,G,9,v[25]),H=r(H,W,K,F,a,14,v[26]),F=r(F,H,W,K,b,20,v[27]),K=r(K,F,H,W,z,5,v[28]),W=r(W,K,F,H,E,9,v[29]),H=r(H,W,K,F,x,14,v[30]),F=r(F,H,W,K,M,20,v[31]),K=h(K,F,H,W,O,4,v[32]),W=h(W,K,F,H,b,11,v[33]),H=h(H,W,K,F,j,16,v[34]),F=h(F,H,W,K,G,23,v[35]),K=h(K,F,H,W,T,4,v[36]),W=h(W,K,F,H,L,11,v[37]),H=h(H,W,K,F,x,16,v[38]),F=h(F,H,W,K,I,23,v[39]),K=h(K,F,H,W,z,4,v[40]),W=h(W,K,F,H,u,11,v[41]),H=h(H,W,K,F,a,16,v[42]),F=h(F,H,W,K,f,23,v[43]),K=h(K,F,H,W,C,4,v[44]),W=h(W,K,F,H,M,11,v[45]),H=h(H,W,K,F,B,16,v[46]),F=h(F,H,W,K,E,23,v[47]),K=y(K,F,H,W,u,6,v[48]),W=y(W,K,F,H,x,10,v[49]),H=y(H,W,K,F,G,15,v[50]),F=y(F,H,W,K,O,21,v[51]),K=y(K,F,H,W,M,6,v[52]),W=y(W,K,F,H,a,10,v[53]),H=y(H,W,K,F,I,15,v[54]),F=y(F,H,W,K,T,21,v[55]),K=y(K,F,H,W,b,6,v[56]),W=y(W,K,F,H,B,10,v[57]),H=y(H,W,K,F,f,15,v[58]),F=y(F,H,W,K,z,21,v[59]),K=y(K,F,H,W,L,6,v[60]),W=y(W,K,F,H,j,10,v[61]),H=y(H,W,K,F,E,15,v[62]),F=y(F,H,W,K,C,21,v[63]),l[0]=l[0]+K|0,l[1]=l[1]+F|0,l[2]=l[2]+H|0,l[3]=l[3]+W|0},_doFinalize:function(){var g=this._data,w=g.words,m=this._nDataBytes*8,d=g.sigBytes*8;w[d>>>5]|=128<<24-d%32;var n=c.floor(m/4294967296),l=m;w[(d+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w[(d+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,g.sigBytes=(w.length+1)*4,this._process();for(var u=this._hash,T=u.words,E=0;E<4;E++){var a=T[E];T[E]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}return u},clone:function(){var g=s.clone.call(this);return g._hash=this._hash.clone(),g}});function i(g,w,m,d,n,l,u){var T=g+(w&m|~w&d)+n+u;return(T<<l|T>>>32-l)+w}function r(g,w,m,d,n,l,u){var T=g+(w&d|m&~d)+n+u;return(T<<l|T>>>32-l)+w}function h(g,w,m,d,n,l,u){var T=g+(w^m^d)+n+u;return(T<<l|T>>>32-l)+w}function y(g,w,m,d,n,l,u){var T=g+(m^(w|~d))+n+u;return(T<<l|T>>>32-l)+w}_.MD5=s._createHelper(o),_.HmacMD5=s._createHmacHelper(o)}(Math),P.MD5})},dejd:function(N,$,k){},dmUQ:function(N,$,k){"use strict";var P=k("Ff2n"),c=k("rePB"),_=k("1OyB"),D=k("vuIU"),p=k("Ji7U"),s=k("md7G"),S=k("foSv"),v=k("cDcd"),o=k.n(v),i=k("TSYQ"),r=k.n(i),h=k("4IlW");function y(b,C){var I=Object.keys(b);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(b);C&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(b,M).enumerable})),I.push.apply(I,j)}return I}function g(b){for(var C=1;C<arguments.length;C++){var I=arguments[C]!=null?arguments[C]:{};C%2?y(Object(I),!0).forEach(function(j){Object(c.a)(b,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(I)):y(Object(I)).forEach(function(j){Object.defineProperty(b,j,Object.getOwnPropertyDescriptor(I,j))})}return b}function w(b){var C=m();return function(){var j=Object(S.a)(b),M;if(C){var z=Object(S.a)(this).constructor;M=Reflect.construct(j,arguments,z)}else M=j.apply(this,arguments);return Object(s.a)(this,M)}}function m(){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(b){return!1}}function d(){}function n(b){b.preventDefault()}var l=function(C){return C.replace(/[^\w.-]+/g,"")},u=200,T=600,E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,a=function(C){return C!=null},L=function(C,I){return I===C||typeof I=="number"&&typeof C=="number"&&isNaN(I)&&isNaN(C)},O=function(b){Object(p.a)(I,b);var C=w(I);function I(j){var M;Object(_.a)(this,I),M=C.call(this,j),M.onKeyDown=function(B){var K=M.props,F=K.onKeyDown,H=K.onPressEnter;if(B.keyCode===h.a.UP){var W=M.getRatio(B);M.up(B,W,null),M.stop()}else if(B.keyCode===h.a.DOWN){var Q=M.getRatio(B);M.down(B,Q,null),M.stop()}else B.keyCode===h.a.ENTER&&H&&H(B);if(M.recordCursorPosition(),M.lastKeyCode=B.keyCode,F){for(var ee=arguments.length,q=new Array(ee>1?ee-1:0),pe=1;pe<ee;pe++)q[pe-1]=arguments[pe];F.apply(void 0,[B].concat(q))}},M.onKeyUp=function(B){var K=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),K){for(var F=arguments.length,H=new Array(F>1?F-1:0),W=1;W<F;W++)H[W-1]=arguments[W];K.apply(void 0,[B].concat(H))}},M.onChange=function(B){var K=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(B)),M.setState({inputValue:M.rawInput}),K(M.toNumber(M.rawInput))},M.onMouseUp=function(){var B=M.props.onMouseUp;M.recordCursorPosition(),B&&B.apply(void 0,arguments)},M.onFocus=function(){var B;M.setState({focused:!0}),(B=M.props).onFocus.apply(B,arguments)},M.onBlur=function(){var B=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var K=M.getCurrentValidValue(M.state.inputValue),F=M.setValue(K,d);if(B){var H=M.input.value,W=M.getInputDisplayValue({focus:!1,value:F});M.input.value=W&&Number(W),B.apply(void 0,arguments),M.input.value=H}},M.getRatio=function(B){var K=1;return B.metaKey||B.ctrlKey?K=.1:B.shiftKey&&(K=10),K},M.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},M.getPrecision=function(B){if(a(M.props.precision))return M.props.precision;var K=String(B);if(K.indexOf("e-")>=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var F=0;return K.indexOf(".")>=0&&(F=K.length-K.indexOf(".")-1),F},M.getInputDisplayValue=function(B){var K=B||M.state,F=K.focused,H=K.inputValue,W=K.value,Q;F?Q=H:Q=M.toPrecisionAsStep(W),Q==null&&(Q="");var ee=M.formatWrapper(Q);return a(M.props.decimalSeparator)&&(ee=ee.toString().replace(".",M.props.decimalSeparator)),ee},M.recordCursorPosition=function(){try{M.cursorStart=M.input.selectionStart,M.cursorEnd=M.input.selectionEnd,M.currentValue=M.input.value,M.cursorBefore=M.input.value.substring(0,M.cursorStart),M.cursorAfter=M.input.value.substring(M.cursorEnd)}catch(B){}},M.restoreByAfter=function(B){if(B===void 0)return!1;var K=M.input.value,F=K.lastIndexOf(B);if(F===-1)return!1;var H=M.cursorBefore.length;return M.lastKeyCode===h.a.DELETE&&M.cursorBefore.charAt(H-1)===B[0]?(M.fixCaret(H,H),!0):F+B.length===K.length?(M.fixCaret(F,F),!0):!1},M.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(K,F){var H=B.substring(F);return M.restoreByAfter(H)})},M.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(B,K,F){M.pressingUpOrDown=!0,M.step("down",B,K,F)},M.up=function(B,K,F){M.pressingUpOrDown=!0,M.step("up",B,K,F)},M.saveInput=function(B){M.input=B};var z=j.value;z===void 0&&(z=j.defaultValue),M.state={focused:j.autoFocus};var G=M.getValidValue(M.toNumber(z));return M.state=g(g({},M.state),{},{inputValue:M.toPrecisionAsStep(G),value:G}),M}return Object(D.a)(I,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var z=this.props,G=z.value,B=z.onChange,K=z.max,F=z.min,H=this.state.focused;if(M){if(!L(M.value,G)||!L(M.max,K)||!L(M.min,F)){var W=H?G:this.getValidValue(G),Q;this.pressingUpOrDown?Q=W:this.inputting?Q=this.rawInput:Q=this.toPrecisionAsStep(W),this.setState({value:W,inputValue:Q})}var ee="value"in this.props?G:this.state.value;"max"in this.props&&M.max!==K&&typeof ee=="number"&&ee>K&&B&&B(K),"min"in this.props&&M.min!==F&&typeof ee=="number"&&ee<F&&B&&B(F)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var q=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===h.a.BACKSPACE?q=this.cursorStart-1:this.lastKeyCode===h.a.DELETE&&(q=this.cursorStart):q=this.input.value.length,this.fixCaret(q,q)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case h.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case h.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(pe){}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(M){var z=M;return z===""?z="":this.isNotCompleteNumber(parseFloat(z))?z=this.state.value:z=this.getValidValue(z),this.toNumber(z)}},{key:"getValueFromEvent",value:function(M){var z=M.target.value.trim().replace(/。/g,".");return a(this.props.decimalSeparator)&&(z=z.replace(this.props.decimalSeparator,".")),z}},{key:"getValidValue",value:function(M){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(M);return isNaN(B)?M:(B<z&&(B=z),B>G&&(B=G),B)}},{key:"setValue",value:function(M,z){var G=this.props.precision,B=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),K=this.state.value,F=K===void 0?null:K,H=this.state.inputValue,W=H===void 0?null:H,Q=typeof B=="number"?B.toFixed(G):"".concat(B),ee=B!==F||Q!=="".concat(W);return"value"in this.props?(W=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:W},z)):this.setState({value:B,inputValue:this.toPrecisionAsStep(M)},z),ee&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(M){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.props,B=G.precision,K=G.step;if(a(B))return B;var F=this.getPrecision(z),H=this.getPrecision(K),W=this.getPrecision(M);return M?Math.max(W,F+H):F+H}},{key:"getPrecisionFactor",value:function(M){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.getMaxPrecision(M,z);return Math.pow(10,G)}},{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(M){return this.props.formatter?this.props.formatter(M):M}},{key:"toPrecisionAsStep",value:function(M){if(this.isNotCompleteNumber(M)||M==="")return M;var z=Math.abs(this.getMaxPrecision(M));return isNaN(z)?M.toString():Number(M).toFixed(z)}},{key:"toNumber",value:function(M){var z=this.props.precision,G=this.state.focused,B=M&&M.length>16&&G;return this.isNotCompleteNumber(M)||B?M:a(z)?Math.round(M*Math.pow(10,z))/Math.pow(10,z):Number(M)}},{key:"upStep",value:function(M,z){var G=this.props.step,B=this.getPrecisionFactor(M,z),K=Math.abs(this.getMaxPrecision(M,z)),F=((B*M+B*G*z)/B).toFixed(K);return this.toNumber(F)}},{key:"downStep",value:function(M,z){var G=this.props.step,B=this.getPrecisionFactor(M,z),K=Math.abs(this.getMaxPrecision(M,z)),F=((B*M-B*G*z)/B).toFixed(K);return this.toNumber(F)}},{key:"step",value:function(M,z){var G=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var F=this.props;if(F.disabled)return;var H=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(H))return;var W=this["".concat(M,"Step")](H,B),Q=W>F.max||W<F.min;if(W>F.max?W=F.max:W<F.min&&(W=F.min),this.setValue(W,null),this.setState({focused:!0},function(){G.pressingUpOrDown=!1}),Q)return;this.autoStepTimer=setTimeout(function(){G[M](z,B,!0)},K?u:T)}},{key:"fixCaret",value:function(M,z){if(M===void 0||z===void 0||!this.input||!this.input.value)return;try{var G=this.input.selectionStart,B=this.input.selectionEnd;(M!==G||z!==B)&&this.input.setSelectionRange(M,z)}catch(K){}}},{key:"render",value:function(){var M,z=this.props,G=z.prefixCls,B=z.disabled,K=z.readOnly,F=z.useTouch,H=z.autoComplete,W=z.upHandler,Q=z.downHandler,ee=z.className,q=z.max,pe=z.min,ye=z.style,ie=z.title,Se=z.onMouseEnter,ge=z.onMouseLeave,oe=z.onMouseOver,le=z.onMouseOut,te=z.required,be=z.onClick,Z=z.tabIndex,ae=z.type,Ee=z.placeholder,ne=z.id,J=z.inputMode,X=z.pattern,Y=z.step,he=z.maxLength,de=z.autoFocus,Te=z.name,ze=z.onPaste,Ze=z.onInput,Je=Object(P.a)(z,["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"]),$e=this.state,tt=$e.value,nt=$e.focused,Me=r()(G,(M={},Object(c.a)(M,ee,!!ee),Object(c.a)(M,"".concat(G,"-disabled"),B),Object(c.a)(M,"".concat(G,"-focused"),nt),M)),Ce={};Object.keys(Je).forEach(function(Le){(Le.substr(0,5)==="data-"||Le.substr(0,5)==="aria-"||Le==="role")&&(Ce[Le]=Je[Le])});var Xe=!K&&!B,et=this.getInputDisplayValue(null),Ue=(tt||tt===0)&&(isNaN(tt)||Number(tt)>=q),Ve=(tt||tt===0)&&(isNaN(tt)||Number(tt)<=pe),Pe=Ue||B||K,we=Ve||B||K,Ae=r()("".concat(G,"-handler"),"".concat(G,"-handler-up"),Object(c.a)({},"".concat(G,"-handler-up-disabled"),Pe)),ce=r()("".concat(G,"-handler"),"".concat(G,"-handler-down"),Object(c.a)({},"".concat(G,"-handler-down-disabled"),we)),xe=F?{onTouchStart:Pe?d:this.up,onTouchEnd:this.stop}:{onMouseDown:Pe?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_e=F?{onTouchStart:we?d:this.down,onTouchEnd:this.stop}:{onMouseDown:we?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return o.a.createElement("div",{className:Me,style:ye,title:ie,onMouseEnter:Se,onMouseLeave:ge,onMouseOver:oe,onMouseOut:le,onFocus:function(){return null},onBlur:function(){return null}},o.a.createElement("div",{className:"".concat(G,"-handler-wrap")},o.a.createElement("span",Object.assign({unselectable:"on"},xe,{role:"button","aria-label":"Increase Value","aria-disabled":Pe,className:Ae}),W||o.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-up-inner"),onClick:n})),o.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Decrease Value","aria-disabled":we,className:ce}),Q||o.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-down-inner"),onClick:n}))),o.a.createElement("div",{className:"".concat(G,"-input-wrap")},o.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":pe,"aria-valuemax":q,"aria-valuenow":tt,required:te,type:ae,placeholder:Ee,onPaste:ze,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(G,"-input"),tabIndex:Z,autoComplete:H,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:d,onKeyUp:Xe?this.onKeyUp:d,autoFocus:de,maxLength:he,readOnly:K,disabled:B,max:q,min:pe,step:Y,name:Te,title:ie,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(et),pattern:X,inputMode:J,onInput:Ze},Ce))))}}]),I}(o.a.Component);O.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:l,required:!1,autoComplete:"off"};var f=O,x=$.a=f},e7zE:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.Base,p=_.WordArray,s=c.algo,S=s.SHA1,v=s.HMAC,o=s.PBKDF2=D.extend({cfg:D.extend({keySize:128/32,hasher:S,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,r){for(var h=this.cfg,y=v.create(h.hasher,i),g=p.create(),w=p.create([1]),m=g.words,d=w.words,n=h.keySize,l=h.iterations;m.length<n;){var u=y.update(r).finalize(w);y.reset();for(var T=u.words,E=T.length,a=u,L=1;L<l;L++){a=y.finalize(a),y.reset();for(var O=a.words,f=0;f<E;f++)T[f]^=O[f]}g.concat(u),d[0]++}return g.sigBytes=n*4,g}});c.PBKDF2=function(i,r,h){return o.create(h).compute(i,r)}}(),P.PBKDF2})},eRFJ:function(N,$,k){N.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},fcSX:function(N,$,k){"use strict";var P=k("Ff2n"),c=k("1OyB"),_=k("vuIU"),D=k("Ji7U"),p=k("md7G"),s=k("foSv"),S=k("1W/9"),v=k("cDcd"),o=k("rePB"),i=k("JX7q"),r=k("TSYQ"),h=k.n(r),y=k("qx4F"),g=k("4IlW");function w(B){return Array.isArray(B)?B:[B]}var m={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(m).filter(function(B){if(typeof document=="undefined")return!1;var K=document.getElementsByTagName("html")[0];return B in(K?K.style:{})})[0],n=m[d];function l(B,K,F,H){B.addEventListener?B.addEventListener(K,F,H):B.attachEvent&&B.attachEvent("on".concat(K),F)}function u(B,K,F,H){B.removeEventListener?B.removeEventListener(K,F,H):B.attachEvent&&B.detachEvent("on".concat(K),F)}function T(B,K){var F=typeof B=="function"?B(K):B;return Array.isArray(F)?F.length===2?F:[F[0],F[1]]:[F]}var E=function(K){return!isNaN(parseFloat(K))&&isFinite(K)},a=!(typeof window!="undefined"&&window.document&&window.document.createElement),L=function B(K,F,H,W){if(!F||F===document||F instanceof Document)return!1;if(F===K.parentNode)return!0;var Q=Math.max(Math.abs(H),Math.abs(W))===Math.abs(W),ee=Math.max(Math.abs(H),Math.abs(W))===Math.abs(H),q=F.scrollHeight-F.clientHeight,pe=F.scrollWidth-F.clientWidth,ye=document.defaultView.getComputedStyle(F),ie=ye.overflowY==="auto"||ye.overflowY==="scroll",Se=ye.overflowX==="auto"||ye.overflowX==="scroll",ge=q&&ie,oe=pe&&Se;return Q&&(!ge||ge&&(F.scrollTop>=q&&W<0||F.scrollTop<=0&&W>0))||ee&&(!oe||oe&&(F.scrollLeft>=pe&&H<0||F.scrollLeft<=0&&H>0))?B(K,F.parentNode,H,W):!1};function O(B){var K=f();return function(){var H=Object(s.a)(B),W;if(K){var Q=Object(s.a)(this).constructor;W=Reflect.construct(H,arguments,Q)}else W=H.apply(this,arguments);return Object(p.a)(this,W)}}function f(){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(B){return!1}}var x={},b=function(B){Object(D.a)(F,B);var K=O(F);function F(H){var W;return Object(c.a)(this,F),W=K.call(this,H),W.domFocus=function(){W.dom&&W.dom.focus()},W.removeStartHandler=function(Q){if(Q.touches.length>1)return;W.startPos={x:Q.touches[0].clientX,y:Q.touches[0].clientY}},W.removeMoveHandler=function(Q){if(Q.changedTouches.length>1)return;var ee=Q.currentTarget,q=Q.changedTouches[0].clientX-W.startPos.x,pe=Q.changedTouches[0].clientY-W.startPos.y;(ee===W.maskDom||ee===W.handlerDom||ee===W.contentDom&&L(ee,Q.target,q,pe))&&Q.cancelable&&Q.preventDefault()},W.transitionEnd=function(Q){var ee=Q.target;u(ee,n,W.transitionEnd),ee.style.transition=""},W.onKeyDown=function(Q){if(Q.keyCode===g.a.ESC){var ee=W.props.onClose;Q.stopPropagation(),ee&&ee(Q)}},W.onWrapperTransitionEnd=function(Q){var ee=W.props,q=ee.open,pe=ee.afterVisibleChange;Q.target===W.contentWrapper&&Q.propertyName.match(/transform$/)&&(W.dom.style.transition="",!q&&W.getCurrentDrawerSome()&&(document.body.style.overflowX="",W.maskDom&&(W.maskDom.style.left="",W.maskDom.style.width="")),pe&&pe(!!q))},W.openLevelTransition=function(){var Q=W.props,ee=Q.open,q=Q.width,pe=Q.height,ye=W.getHorizontalBoolAndPlacementName(),ie=ye.isHorizontal,Se=ye.placementName,ge=W.contentDom?W.contentDom.getBoundingClientRect()[ie?"width":"height"]:0,oe=(ie?q:pe)||ge;W.setLevelAndScrolling(ee,Se,oe)},W.setLevelTransform=function(Q,ee,q,pe){var ye=W.props,ie=ye.placement,Se=ye.levelMove,ge=ye.duration,oe=ye.ease,le=ye.showMask;W.levelDom.forEach(function(te){te.style.transition="transform ".concat(ge," ").concat(oe),l(te,n,W.transitionEnd);var be=Q?q:0;if(Se){var Z=T(Se,{target:te,open:Q});be=Q?Z[0]:Z[1]||0}var ae=typeof be=="number"?"".concat(be,"px"):be,Ee=ie==="left"||ie==="top"?ae:"-".concat(ae);Ee=le&&ie==="right"&&pe?"calc(".concat(Ee," + ").concat(pe,"px)"):Ee,te.style.transform=be?"".concat(ee,"(").concat(Ee,")"):""})},W.setLevelAndScrolling=function(Q,ee,q){var pe=W.props.onChange;if(!a){var ye=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(y.a)(!0):0;W.setLevelTransform(Q,ee,q,ye),W.toggleScrollingToDrawerAndBody(ye)}pe&&pe(Q)},W.toggleScrollingToDrawerAndBody=function(Q){var ee=W.props,q=ee.getOpenCount,pe=ee.getContainer,ye=ee.showMask,ie=ee.open,Se=pe&&pe(),ge=q&&q();if(Se&&Se.parentNode===document.body&&ye){var oe=["touchstart"],le=[document.body,W.maskDom,W.handlerDom,W.contentDom];ie&&document.body.style.overflow!=="hidden"?(Q&&W.addScrollingEffect(Q),ge===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",le.forEach(function(te,be){if(!te)return;l(te,oe[be]||"touchmove",be?W.removeMoveHandler:W.removeStartHandler,W.passive)})):W.getCurrentDrawerSome()&&(ge||(document.body.style.overflow=""),document.body.style.touchAction="",Q&&W.remScrollingEffect(Q),le.forEach(function(te,be){if(!te)return;u(te,oe[be]||"touchmove",be?W.removeMoveHandler:W.removeStartHandler,W.passive)}))}},W.addScrollingEffect=function(Q){var ee=W.props,q=ee.placement,pe=ee.duration,ye=ee.ease,ie=ee.getOpenCount,Se=ee.switchScrollingEffect,ge=ie&&ie();ge===1&&Se();var oe="width ".concat(pe," ").concat(ye),le="transform ".concat(pe," ").concat(ye);W.dom.style.transition="none";switch(q){case"right":W.dom.style.transform="translateX(-".concat(Q,"px)");break;case"top":case"bottom":W.dom.style.width="calc(100% - ".concat(Q,"px)"),W.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(le,",").concat(oe),W.dom.style.width="",W.dom.style.transform="")})},W.remScrollingEffect=function(Q){var ee=W.props,q=ee.placement,pe=ee.duration,ye=ee.ease,ie=ee.getOpenCount,Se=ee.switchScrollingEffect,ge=ie&&ie();ge||Se(!0),d&&(document.body.style.overflowX="hidden"),W.dom.style.transition="none";var oe,le="width ".concat(pe," ").concat(ye),te="transform ".concat(pe," ").concat(ye);switch(q){case"left":{W.dom.style.width="100%",le="width 0s ".concat(ye," ").concat(pe);break}case"right":{W.dom.style.transform="translateX(".concat(Q,"px)"),W.dom.style.width="100%",le="width 0s ".concat(ye," ").concat(pe),W.maskDom&&(W.maskDom.style.left="-".concat(Q,"px"),W.maskDom.style.width="calc(100% + ".concat(Q,"px)"));break}case"top":case"bottom":{W.dom.style.width="calc(100% + ".concat(Q,"px)"),W.dom.style.height="100%",W.dom.style.transform="translateZ(0)",oe="height 0s ".concat(ye," ").concat(pe);break}default:break}clearTimeout(W.timeout),W.timeout=setTimeout(function(){W.dom&&(W.dom.style.transition="".concat(te,",").concat(oe?"".concat(oe,","):"").concat(le),W.dom.style.transform="",W.dom.style.width="",W.dom.style.height="")})},W.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(Q){return x[Q]})},W.getLevelDom=function(Q){var ee=Q.level,q=Q.getContainer;if(a)return;var pe=q&&q(),ye=pe?pe.parentNode:null;if(W.levelDom=[],ee==="all"){var ie=ye?Array.prototype.slice.call(ye.children):[];ie.forEach(function(Se){Se.nodeName!=="SCRIPT"&&Se.nodeName!=="STYLE"&&Se.nodeName!=="LINK"&&Se!==pe&&W.levelDom.push(Se)})}else ee&&w(ee).forEach(function(Se){document.querySelectorAll(Se).forEach(function(ge){W.levelDom.push(ge)})})},W.getHorizontalBoolAndPlacementName=function(){var Q=W.props.placement,ee=Q==="left"||Q==="right",q="translate".concat(ee?"X":"Y");return{isHorizontal:ee,placementName:q}},W.state={_self:Object(i.a)(W)},W}return Object(_.a)(F,[{key:"componentDidMount",value:function(){var W=this;if(!a){var Q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Q=!0,null}}))}catch(ie){}this.passive=Q?{passive:!1}:!1}var ee=this.props,q=ee.open,pe=ee.getContainer,ye=pe&&pe();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),q&&(ye&&ye.parentNode===document.body&&(x[this.drawerId]=q),this.openLevelTransition(),this.forceUpdate(function(){W.domFocus()}))}},{key:"componentDidUpdate",value:function(W){var Q=this.props,ee=Q.open,q=Q.getContainer,pe=q&&q();ee!==W.open&&(ee&&this.domFocus(),pe&&pe.parentNode===document.body&&(x[this.drawerId]=!!ee),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var W=this.props,Q=W.getOpenCount,ee=W.open,q=W.switchScrollingEffect,pe=typeof Q=="function"&&Q();delete x[this.drawerId],ee&&(this.setLevelTransform(!1),document.body.style.touchAction=""),pe||(document.body.style.overflow="",q(!0))}},{key:"render",value:function(){var W,Q=this,ee=this.props,q=ee.className,pe=ee.children,ye=ee.style,ie=ee.width,Se=ee.height,ge=ee.defaultOpen,oe=ee.open,le=ee.prefixCls,te=ee.placement,be=ee.level,Z=ee.levelMove,ae=ee.ease,Ee=ee.duration,ne=ee.getContainer,J=ee.handler,X=ee.onChange,Y=ee.afterVisibleChange,he=ee.showMask,de=ee.maskClosable,Te=ee.maskStyle,ze=ee.onClose,Ze=ee.onHandleClick,Je=ee.keyboard,$e=ee.getOpenCount,tt=ee.switchScrollingEffect,nt=Object(P.a)(ee,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Me=this.dom?oe:!1,Ce=h()(le,(W={},Object(o.a)(W,"".concat(le,"-").concat(te),!0),Object(o.a)(W,"".concat(le,"-open"),Me),Object(o.a)(W,q||"",!!q),Object(o.a)(W,"no-mask",!he),W)),Xe=this.getHorizontalBoolAndPlacementName(),et=Xe.placementName,Ue=te==="left"||te==="top"?"-100%":"100%",Ve=Me?"":"".concat(et,"(").concat(Ue,")"),Pe=J&&v.cloneElement(J,{onClick:function(Ae){J.props.onClick&&J.props.onClick(),Ze&&Ze(Ae)},ref:function(Ae){Q.handlerDom=Ae}});return v.createElement("div",Object.assign({},nt,{tabIndex:-1,className:Ce,style:ye,ref:function(Ae){Q.dom=Ae},onKeyDown:Me&&Je?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),he&&v.createElement("div",{className:"".concat(le,"-mask"),onClick:de?ze:void 0,style:Te,ref:function(Ae){Q.maskDom=Ae}}),v.createElement("div",{className:"".concat(le,"-content-wrapper"),style:{transform:Ve,msTransform:Ve,width:E(ie)?"".concat(ie,"px"):ie,height:E(Se)?"".concat(Se,"px"):Se},ref:function(Ae){Q.contentWrapper=Ae}},v.createElement("div",{className:"".concat(le,"-content"),ref:function(Ae){Q.contentDom=Ae},onTouchStart:Me&&he?this.removeStartHandler:void 0,onTouchMove:Me&&he?this.removeMoveHandler:void 0},pe),Pe))}}],[{key:"getDerivedStateFromProps",value:function(W,Q){var ee=Q.prevProps,q=Q._self,pe={prevProps:W};if(ee!==void 0){var ye=W.placement,ie=W.level;ye!==ee.placement&&(q.contentDom=null),ie!==ee.level&&q.getLevelDom(W)}return pe}}]),F}(v.Component);b.defaultProps={switchScrollingEffect:function(){}};var C=b;function I(B){var K=j();return function(){var H=Object(s.a)(B),W;if(K){var Q=Object(s.a)(this).constructor;W=Reflect.construct(H,arguments,Q)}else W=H.apply(this,arguments);return Object(p.a)(this,W)}}function j(){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(B){return!1}}var M=function(B){Object(D.a)(F,B);var K=I(F);function F(H){var W;Object(c.a)(this,F),W=K.call(this,H),W.onHandleClick=function(ee){var q=W.props,pe=q.onHandleClick,ye=q.open;if(pe&&pe(ee),typeof ye=="undefined"){var ie=W.state.open;W.setState({open:!ie})}},W.onClose=function(ee){var q=W.props,pe=q.onClose,ye=q.open;pe&&pe(ee),typeof ye=="undefined"&&W.setState({open:!1})};var Q=typeof H.open!="undefined"?H.open:!!H.defaultOpen;return W.state={open:Q},"onMaskClick"in H&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),W}return Object(_.a)(F,[{key:"render",value:function(){var W=this,Q=this.props,ee=Q.defaultOpen,q=Q.getContainer,pe=Q.wrapperClassName,ye=Q.forceRender,ie=Q.handler,Se=Object(P.a)(Q,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ge=this.state.open;if(!q)return v.createElement("div",{className:pe,ref:function(te){W.dom=te}},v.createElement(C,Object.assign({},Se,{open:ge,handler:ie,getContainer:function(){return W.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var oe=!!ie||ye;return v.createElement(S.a,{visible:ge,forceRender:oe,getContainer:q,wrapperClassName:pe},function(le){var te=le.visible,be=le.afterClose,Z=Object(P.a)(le,["visible","afterClose"]);return v.createElement(C,Object.assign({},Se,Z,{open:te!==void 0?te:ge,afterVisibleChange:be!==void 0?be:Se.afterVisibleChange,handler:ie,onClose:W.onClose,onHandleClick:W.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(W,Q){var ee=Q.prevProps,q={prevProps:W};return typeof ee!="undefined"&&W.open!==ee.open&&(q.open=W.open),q}}]),F}(v.Component);M.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:v.createElement("div",{className:"drawer-handle"},v.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var z=M,G=$.a=z},fyJ8:function(N,$,k){"use strict";var P=k("rePB"),c=k("VTBJ"),_=k("Ff2n"),D=k("U8pU"),p=k("cDcd"),s=k.n(p),S=k("TSYQ"),v=k.n(S),o=k("c+Xe"),i=k("sR1s");function r(m){return m&&Object(D.a)(m)==="object"&&!Array.isArray(m)&&!p.isValidElement(m)}function h(m){return typeof m=="string"?!0:Object(o.c)(m)}function y(m,d){var n,l=m.prefixCls,u=m.className,T=m.record,E=m.index,a=m.dataIndex,L=m.render,O=m.children,f=m.component,x=f===void 0?"td":f,b=m.colSpan,C=m.rowSpan,I=m.fixLeft,j=m.fixRight,M=m.firstFixLeft,z=m.lastFixLeft,G=m.firstFixRight,B=m.lastFixRight,K=m.appendNode,F=m.additionalProps,H=F===void 0?{}:F,W=m.ellipsis,Q=m.align,ee=m.rowType,q=m.isSticky,pe="".concat(l,"-cell"),ye,ie;if(O)ie=O;else{var Se=Object(i.b)(T,a);if(ie=Se,L){var ge=L(Se,T,E);r(ge)?(ie=ge.children,ye=ge.props):ie=ge}}Object(D.a)(ie)==="object"&&!Array.isArray(ie)&&!p.isValidElement(ie)&&(ie=null),W&&(z||G)&&(ie=p.createElement("span",{className:"".concat(pe,"-content")},ie));var oe=ye||{},le=oe.colSpan,te=oe.rowSpan,be=oe.style,Z=oe.className,ae=Object(_.a)(oe,["colSpan","rowSpan","style","className"]),Ee=le!==void 0?le:b,ne=te!==void 0?te:C;if(Ee===0||ne===0)return null;var J={},X=typeof I=="number",Y=typeof j=="number";X&&(J.position="sticky",J.left=I),Y&&(J.position="sticky",J.right=j);var he={};Q&&(he.textAlign=Q);var de,Te=W===!0?{showTitle:!0}:W;Te&&(Te.showTitle||ee==="header")&&(typeof ie=="string"||typeof ie=="number"?de=ie.toString():p.isValidElement(ie)&&typeof ie.props.children=="string"&&(de=ie.props.children));var ze=Object(c.a)(Object(c.a)(Object(c.a)({title:de},ae),H),{},{colSpan:Ee&&Ee!==1?Ee:null,rowSpan:ne&&ne!==1?ne:null,className:v()(pe,u,(n={},Object(P.a)(n,"".concat(pe,"-fix-left"),X),Object(P.a)(n,"".concat(pe,"-fix-left-first"),M),Object(P.a)(n,"".concat(pe,"-fix-left-last"),z),Object(P.a)(n,"".concat(pe,"-fix-right"),Y),Object(P.a)(n,"".concat(pe,"-fix-right-first"),G),Object(P.a)(n,"".concat(pe,"-fix-right-last"),B),Object(P.a)(n,"".concat(pe,"-ellipsis"),W),Object(P.a)(n,"".concat(pe,"-with-append"),K),Object(P.a)(n,"".concat(pe,"-fix-sticky"),(X||Y)&&q),n),H.className,Z),style:Object(c.a)(Object(c.a)(Object(c.a)(Object(c.a)({},H.style),he),J),be),ref:h(x)?d:null});return p.createElement(x,Object.assign({},ze),K,ie)}var g=p.forwardRef(y);g.displayName="Cell";var w=p.memo(g,function(m,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,m.record):!1});$.a=w},gRFJ:function(N,$,k){N.exports=[k("rdUC"),k("ynwM"),k("RELg"),k("DlR+"),k("CrYA"),k("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(N){return N<10?"0"+N:N}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(N){return rx_escapable.lastIndex=0,rx_escapable.test(N)?'"'+N.replace(rx_escapable,function($){var k=meta[$];return typeof k=="string"?k:"\\u"+("0000"+$.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+N+'"'}function str(N,$){var k,P,c,_,D=gap,p,s=$[N];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(N)),typeof rep=="function"&&(s=rep.call($,N,s));switch(typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,p=[],Object.prototype.toString.apply(s)==="[object Array]"){for(_=s.length,k=0;k<_;k+=1)p[k]=str(k,s)||"null";return c=p.length===0?"[]":gap?`[
|
|
|
`+gap+p.join(`,
|
|
|
`+gap)+`
|
|
|
`+D+"]":"["+p.join(",")+"]",gap=D,c}if(rep&&typeof rep=="object")for(_=rep.length,k=0;k<_;k+=1)typeof rep[k]=="string"&&(P=rep[k],c=str(P,s),c&&p.push(quote(P)+(gap?": ":":")+c));else for(P in s)Object.prototype.hasOwnProperty.call(s,P)&&(c=str(P,s),c&&p.push(quote(P)+(gap?": ":":")+c));return c=p.length===0?"{}":gap?`{
|
|
|
`+gap+p.join(`,
|
|
|
`+gap)+`
|
|
|
`+D+"}":"{"+p.join(",")+"}",gap=D,c}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(N,$,k){var P;if(gap="",indent="",typeof k=="number")for(P=0;P<k;P+=1)indent+=" ";else typeof k=="string"&&(indent=k);if(rep=$,$&&typeof $!="function"&&(typeof $!="object"||typeof $.length!="number"))throw new Error("JSON.stringify");return str("",{"":N})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(N,$){var k,P,c=N[$];if(c&&typeof c=="object")for(k in c)Object.prototype.hasOwnProperty.call(c,k)&&(P=walk(c,k),P!==void 0?c[k]=P:delete c[k]);return reviver.call(N,$,c)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(N){return"\\u"+("0000"+N.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.ECB=function(){var c=P.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(_,D){this._cipher.encryptBlock(_,D)}}),c.Decryptor=c.extend({processBlock:function(_,D){this._cipher.decryptBlock(_,D)}}),c}(),P.mode.ECB})},h78n:function(N,$,k){"use strict";k.d($,"a",function(){return M});var P=k("cDcd"),c=k.n(P),_=k("TSYQ"),D=k.n(_),p={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=function(B){var K=B.map(function(){return Object(P.useRef)()}),F=Object(P.useRef)();return Object(P.useEffect)(function(){var H=Date.now(),W=!1;Object.keys(K).forEach(function(Q){var ee=K[Q].current;if(!ee)return;W=!0;var q=ee.style;q.transitionDuration=".3s, .3s, .3s, .06s",F.current&&H-F.current<100&&(q.transitionDuration="0s, 0s")}),W&&(F.current=Date.now())}),[K]};function S(){return S=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var F in K)Object.prototype.hasOwnProperty.call(K,F)&&(G[F]=K[F])}return G},S.apply(this,arguments)}function v(G,B){return y(G)||h(G,B)||i(G,B)||o()}function o(){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 i(G,B){if(!G)return;if(typeof G=="string")return r(G,B);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return r(G,B)}function r(G,B){(B==null||B>G.length)&&(B=G.length);for(var K=0,F=new Array(B);K<B;K++)F[K]=G[K];return F}function h(G,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var K=[],F=!0,H=!1,W=void 0;try{for(var Q=G[Symbol.iterator](),ee;!(F=(ee=Q.next()).done)&&!(K.push(ee.value),B&&K.length===B);F=!0);}catch(q){H=!0,W=q}finally{try{!F&&Q.return!=null&&Q.return()}finally{if(H)throw W}}return K}function y(G){if(Array.isArray(G))return G}function g(G,B){if(G==null)return{};var K=w(G,B),F,H;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(G);for(H=0;H<W.length;H++){if(F=W[H],B.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,F))continue;K[F]=G[F]}}return K}function w(G,B){if(G==null)return{};var K={},F=Object.keys(G),H,W;for(W=0;W<F.length;W++){if(H=F[W],B.indexOf(H)>=0)continue;K[H]=G[H]}return K}var m=function(B){var K=B.className,F=B.percent,H=B.prefixCls,W=B.strokeColor,Q=B.strokeLinecap,ee=B.strokeWidth,q=B.style,pe=B.trailColor,ye=B.trailWidth,ie=B.transition,Se=g(B,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Se.gapPosition;var ge=Array.isArray(F)?F:[F],oe=Array.isArray(W)?W:[W],le=s(ge),te=v(le,1),be=te[0],Z=ee/2,ae=100-ee/2,Ee="M ".concat(Q==="round"?Z:0,",").concat(Z,`
|
|
|
L `).concat(Q==="round"?ae:100,",").concat(Z),ne="0 0 100 ".concat(ee),J=0;return c.a.createElement("svg",S({className:D()("".concat(H,"-line"),K),viewBox:ne,preserveAspectRatio:"none",style:q},Se),c.a.createElement("path",{className:"".concat(H,"-line-trail"),d:Ee,strokeLinecap:Q,stroke:pe,strokeWidth:ye||ee,fillOpacity:"0"}),ge.map(function(X,Y){var he={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:ie||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},de=oe[Y]||oe[oe.length-1];return J+=X,c.a.createElement("path",{key:Y,className:"".concat(H,"-line-path"),d:Ee,strokeLinecap:Q,stroke:de,strokeWidth:ee,fillOpacity:"0",ref:be[Y],style:he})}))};m.defaultProps=p;var d=m;function n(){return n=Object.assign||function(G){for(var B=1;B<arguments.length;B++){var K=arguments[B];for(var F in K)Object.prototype.hasOwnProperty.call(K,F)&&(G[F]=K[F])}return G},n.apply(this,arguments)}function l(G,B){return L(G)||a(G,B)||T(G,B)||u()}function u(){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 T(G,B){if(!G)return;if(typeof G=="string")return E(G,B);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return E(G,B)}function E(G,B){(B==null||B>G.length)&&(B=G.length);for(var K=0,F=new Array(B);K<B;K++)F[K]=G[K];return F}function a(G,B){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var K=[],F=!0,H=!1,W=void 0;try{for(var Q=G[Symbol.iterator](),ee;!(F=(ee=Q.next()).done)&&!(K.push(ee.value),B&&K.length===B);F=!0);}catch(q){H=!0,W=q}finally{try{!F&&Q.return!=null&&Q.return()}finally{if(H)throw W}}return K}function L(G){if(Array.isArray(G))return G}function O(G,B){if(G==null)return{};var K=f(G,B),F,H;if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(G);for(H=0;H<W.length;H++){if(F=W[H],B.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,F))continue;K[F]=G[F]}}return K}function f(G,B){if(G==null)return{};var K={},F=Object.keys(G),H,W;for(W=0;W<F.length;W++){if(H=F[W],B.indexOf(H)>=0)continue;K[H]=G[H]}return K}var x=0;function b(G){return+G.replace("%","")}function C(G){return Array.isArray(G)?G:[G]}function I(G,B,K,F){var H=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,W=arguments.length>5?arguments[5]:void 0,Q=50-F/2,ee=0,q=-Q,pe=0,ye=-2*Q;switch(W){case"left":ee=-Q,q=0,pe=2*Q,ye=0;break;case"right":ee=Q,q=0,pe=-2*Q,ye=0;break;case"bottom":q=Q,ye=2*Q;break;default:}var ie="M 50,50 m ".concat(ee,",").concat(q,`
|
|
|
a `).concat(Q,",").concat(Q," 0 1 1 ").concat(pe,",").concat(-ye,`
|
|
|
a `).concat(Q,",").concat(Q," 0 1 1 ").concat(-pe,",").concat(ye),Se=Math.PI*2*Q,ge={stroke:K,strokeDasharray:"".concat(B/100*(Se-H),"px ").concat(Se,"px"),strokeDashoffset:"-".concat(H/2+G/100*(Se-H),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ie,pathStyle:ge}}var j=function(B){var K=B.prefixCls,F=B.strokeWidth,H=B.trailWidth,W=B.gapDegree,Q=B.gapPosition,ee=B.trailColor,q=B.strokeLinecap,pe=B.style,ye=B.className,ie=B.strokeColor,Se=B.percent,ge=O(B,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),oe=Object(P.useMemo)(function(){return x+=1,x},[]),le=I(0,100,ee,F,W,Q),te=le.pathString,be=le.pathStyle,Z=C(Se),ae=C(ie),Ee=ae.find(function(he){return Object.prototype.toString.call(he)==="[object Object]"}),ne=s(Z),J=l(ne,1),X=J[0],Y=function(){var de=0;return Z.map(function(Te,ze){var Ze=ae[ze]||ae[ae.length-1],Je=Object.prototype.toString.call(Ze)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(oe,")"):"",$e=I(de,Te,Ze,F,W,Q);return de+=Te,c.a.createElement("path",{key:ze,className:"".concat(K,"-circle-path"),d:$e.pathString,stroke:Je,strokeLinecap:q,strokeWidth:F,opacity:Te===0?0:1,fillOpacity:"0",style:$e.pathStyle,ref:X[ze]})})};return c.a.createElement("svg",n({className:D()("".concat(K,"-circle"),ye),viewBox:"0 0 100 100",style:pe},ge),Ee&&c.a.createElement("defs",null,c.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(oe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ee).sort(function(he,de){return b(he)-b(de)}).map(function(he,de){return c.a.createElement("stop",{key:de,offset:he,stopColor:Ee[he]})}))),c.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:te,stroke:ee,strokeLinecap:q,strokeWidth:H||F,fillOpacity:"0",style:be}),Y().reverse())};j.defaultProps=p;var M=j,z={Line:d,Circle:M}},hW8S:function(N,$,k){"use strict";k.d($,"a",function(){return D}),k.d($,"c",function(){return p}),k.d($,"b",function(){return s});var P=k("VTBJ"),c=k("Ff2n"),_=k("Kwbf"),D="RC_TABLE_INTERNAL_COL_DEFINE";function p(S){var v=S.expandable,o=Object(c.a)(S,["expandable"]);return"expandable"in S?Object(P.a)(Object(P.a)({},o),v):o}function s(S){return Object.keys(S).reduce(function(v,o){return(o.substr(0,5)==="data-"||o.substr(0,5)==="aria-")&&(v[o]=S[o]),v},{})}},i3hx:function(N,$,k){},jO9C:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(c,_){c.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(c,_)},unpad:function(c){P.pad.ZeroPadding.unpad(c),c.sigBytes--}},P.pad.Iso97971})},je13:function(N,$,k){var P=k("5nXd"),c=k("gRFJ"),_=[k("uQRt")];N.exports=P.createStore(c,_)},k3GJ:function(N,$,k){"use strict";k.d($,"a",function(){return mn});var P=k("rePB"),c=k("ODXe"),_=k("Ff2n"),D=k("VTBJ"),p=k("cDcd"),s=k("TSYQ"),S=k.n(s),v=k("Zm9Q"),o=k("6cGi"),i=k("KQm4"),r=k("xEkU"),h=k.n(r),y=k("t23M");function g(De){var Be=Object(p.useRef)(),Ke=Object(p.useRef)(!1);function ke(){for(var fe=arguments.length,Oe=new Array(fe),ve=0;ve<fe;ve++)Oe[ve]=arguments[ve];Ke.current||(h.a.cancel(Be.current),Be.current=h()(function(){De.apply(void 0,Oe)}))}return Object(p.useEffect)(function(){return function(){Ke.current=!0,h.a.cancel(Be.current)}},[]),ke}function w(De){var Be=Object(p.useRef)([]),Ke=Object(p.useState)({}),ke=Object(c.a)(Ke,2),fe=ke[1],Oe=Object(p.useRef)(typeof De=="function"?De():De),ve=g(function(){var je=Oe.current;Be.current.forEach(function(He){je=He(je)}),Be.current=[],Oe.current=je,fe({})});function Ie(je){Be.current.push(je),ve()}return[Oe.current,Ie]}var m=k("4IlW");function d(De,Be){var Ke,ke=De.prefixCls,fe=De.id,Oe=De.active,ve=De.rtl,Ie=De.tab,je=Ie.key,He=Ie.tab,We=Ie.disabled,Qe=Ie.closeIcon,st=De.tabBarGutter,pt=De.tabPosition,ht=De.closable,bt=De.renderWrapper,Ut=De.removeAriaLabel,er=De.editable,rr=De.onClick,ir=De.onRemove,pr=De.onFocus,cr="".concat(ke,"-tab");p.useEffect(function(){return ir},[]);var or={};pt==="top"||pt==="bottom"?or[ve?"marginLeft":"marginRight"]=st:or.marginBottom=st;var Rr=er&&ht!==!1&&!We;function br(Xt){if(We)return;rr(Xt)}function vn(Xt){Xt.preventDefault(),Xt.stopPropagation(),er.onEdit("remove",{key:je,event:Xt})}var xr=p.createElement("div",{key:je,ref:Be,className:S()(cr,(Ke={},Object(P.a)(Ke,"".concat(cr,"-with-remove"),Rr),Object(P.a)(Ke,"".concat(cr,"-active"),Oe),Object(P.a)(Ke,"".concat(cr,"-disabled"),We),Ke)),style:or,onClick:br},p.createElement("div",{role:"tab","aria-selected":Oe,id:fe&&"".concat(fe,"-tab-").concat(je),className:"".concat(cr,"-btn"),"aria-controls":fe&&"".concat(fe,"-panel-").concat(je),"aria-disabled":We,tabIndex:We?null:0,onClick:function(Ht){Ht.stopPropagation(),br(Ht)},onKeyDown:function(Ht){[m.a.SPACE,m.a.ENTER].includes(Ht.which)&&(Ht.preventDefault(),br(Ht))},onFocus:pr},He),Rr&&p.createElement("button",{type:"button","aria-label":Ut||"remove",tabIndex:0,className:"".concat(cr,"-remove"),onClick:function(Ht){Ht.stopPropagation(),vn(Ht)}},Qe||er.removeIcon||"\xD7"));return bt&&(xr=bt(xr)),xr}var n=p.forwardRef(d),l={width:0,height:0,left:0,top:0};function u(De,Be,Ke){return Object(p.useMemo)(function(){for(var ke,fe=new Map,Oe=Be.get((ke=De[0])===null||ke===void 0?void 0:ke.key)||l,ve=Oe.left+Oe.width,Ie=0;Ie<De.length;Ie+=1){var je=De[Ie].key,He=Be.get(je);if(!He){var We;He=Be.get((We=De[Ie-1])===null||We===void 0?void 0:We.key)||l}var Qe=fe.get(je)||Object(D.a)({},He);Qe.right=ve-Qe.left-Qe.width,fe.set(je,Qe)}return fe},[De.map(function(ke){return ke.key}).join("_"),Be,Ke])}var T={width:0,height:0,left:0,top:0,right:0};function E(De,Be,Ke,ke,fe){var Oe=fe.tabs,ve=fe.tabPosition,Ie=fe.rtl,je,He,We;["top","bottom"].includes(ve)?(je="width",He=Ie?"right":"left",We=Math.abs(Be.left)):(je="height",He="top",We=-Be.top);var Qe=Be[je],st=Ke[je],pt=ke[je],ht=Qe;return st+pt>Qe&&(ht=Qe-pt),Object(p.useMemo)(function(){if(!Oe.length)return[0,0];for(var bt=Oe.length,Ut=bt,er=0;er<bt;er+=1){var rr=De.get(Oe[er].key)||T;if(rr[He]+rr[je]>We+ht){Ut=er-1;break}}for(var ir=0,pr=bt-1;pr>=0;pr-=1){var cr=De.get(Oe[pr].key)||T;if(cr[He]<We){ir=pr+1;break}}return[ir,Ut]},[De,We,ht,ve,Oe.map(function(bt){return bt.key}).join("_"),Ie])}var a=k("wx14"),L=k("1OyB"),O=k("vuIU"),f=k("JX7q"),x=k("Ji7U"),b=k("LK+K"),C=k("I8Z2"),I=k("bT9E"),j=k("2GS6"),M=k("Gytx"),z=k.n(M),G=k("U8pU"),B=/iPhone/i,K=/iPod/i,F=/iPad/i,H=/\bAndroid(?:.+)Mobile\b/i,W=/Android/i,Q=/\bAndroid(?:.+)SD4930UR\b/i,ee=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,q=/Windows Phone/i,pe=/\bWindows(?:.+)ARM\b/i,ye=/BlackBerry/i,ie=/BB10/i,Se=/Opera Mini/i,ge=/\b(CriOS|Chrome)(?:.+)Mobile/i,oe=/Mobile(?:.+)Firefox\b/i;function le(De,Be){return De.test(Be)}function te(De){var Be=De||(typeof navigator!="undefined"?navigator.userAgent:""),Ke=(Be||"").split("[FBAN");if(typeof Ke[1]!="undefined"){var ke=Ke,fe=Object(c.a)(ke,1);Be=fe[0]}if(Ke=Be.split("Twitter"),typeof Ke[1]!="undefined"){var Oe=Ke,ve=Object(c.a)(Oe,1);Be=ve[0]}var Ie={apple:{phone:le(B,Be)&&!le(q,Be),ipod:le(K,Be),tablet:!le(B,Be)&&le(F,Be)&&!le(q,Be),device:(le(B,Be)||le(K,Be)||le(F,Be))&&!le(q,Be)},amazon:{phone:le(Q,Be),tablet:!le(Q,Be)&&le(ee,Be),device:le(Q,Be)||le(ee,Be)},android:{phone:!le(q,Be)&&le(Q,Be)||!le(q,Be)&&le(H,Be),tablet:!le(q,Be)&&!le(Q,Be)&&!le(H,Be)&&(le(ee,Be)||le(W,Be)),device:!le(q,Be)&&(le(Q,Be)||le(ee,Be)||le(H,Be)||le(W,Be))||le(/\bokhttp\b/i,Be)},windows:{phone:le(q,Be),tablet:le(pe,Be),device:le(q,Be)||le(pe,Be)},other:{blackberry:le(ye,Be),blackberry10:le(ie,Be),opera:le(Se,Be),firefox:le(oe,Be),chrome:le(ge,Be),device:le(ye,Be)||le(ie,Be)||le(Se,Be)||le(oe,Be)||le(ge,Be)},any:null,phone:null,tablet:null};return Ie.any=Ie.apple.device||Ie.android.device||Ie.windows.device||Ie.other.device,Ie.phone=Ie.apple.phone||Ie.android.phone||Ie.windows.phone,Ie.tablet=Ie.apple.tablet||Ie.android.tablet||Ie.windows.tablet,Ie}var be=Object(D.a)(Object(D.a)({},te()),{},{isMobile:te}),Z=be;function ae(){}function Ee(De,Be,Ke){var ke=Be||"";return De.key||"".concat(ke,"item_").concat(Ke)}function ne(De){return"".concat(De,"-menu-")}function J(De,Be){var Ke=-1;p.Children.forEach(De,function(ke){Ke+=1,ke&&ke.type&&ke.type.isMenuItemGroup?p.Children.forEach(ke.props.children,function(fe){Ke+=1,Be(fe,Ke)}):Be(ke,Ke)})}function X(De,Be,Ke){if(!De||Ke.find)return;p.Children.forEach(De,function(ke){if(ke){var fe=ke.type;if(!fe||!(fe.isSubMenu||fe.isMenuItem||fe.isMenuItemGroup))return;Be.indexOf(ke.key)!==-1?Ke.find=!0:ke.props.children&&X(ke.props.children,Be,Ke)}})}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"],he=function(Be){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke=Be&&typeof Be.getBoundingClientRect=="function"&&Be.getBoundingClientRect().width;if(ke){if(Ke){var fe=getComputedStyle(Be),Oe=fe.marginLeft,ve=fe.marginRight;ke+=+Oe.replace("px","")+ +ve.replace("px","")}ke=+ke.toFixed(6)}return ke||0},de=function(Be,Ke,ke){Be&&Object(G.a)(Be.style)==="object"&&(Be.style[Ke]=ke)},Te=function(){return Z.any},ze=k("bdgK"),Ze=k("faye"),Je=k.n(Ze),$e=k("wgJM"),tt=k("l4aY"),nt=k("m+aA"),Me=k("c+Xe"),Ce=k("zT1h"),Xe=k("QC+M");function et(De,Be,Ke){return Ke?De[0]===Be[0]:De[0]===Be[0]&&De[1]===Be[1]}function Ue(De,Be,Ke){var ke=De[Be]||{};return Object(D.a)(Object(D.a)({},ke),Ke)}function Ve(De,Be,Ke,ke){for(var fe=Ke.points,Oe=Object.keys(De),ve=0;ve<Oe.length;ve+=1){var Ie=Oe[ve];if(et(De[Ie].points,fe,ke))return"".concat(Be,"-placement-").concat(Ie)}return""}var Pe=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var De=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(De)||/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(De==null?void 0:De.substr(0,4)))},we=k("MNnm");function Ae(De,Be){var Ke={};return Ke[De.toLowerCase()]=Be.toLowerCase(),Ke["Webkit".concat(De)]="webkit".concat(Be),Ke["Moz".concat(De)]="moz".concat(Be),Ke["ms".concat(De)]="MS".concat(Be),Ke["O".concat(De)]="o".concat(Be.toLowerCase()),Ke}function ce(De,Be){var Ke={animationend:Ae("Animation","AnimationEnd"),transitionend:Ae("Transition","TransitionEnd")};return De&&("AnimationEvent"in Be||delete Ke.animationend.animation,"TransitionEvent"in Be||delete Ke.transitionend.transition),Ke}var xe=ce(Object(we.a)(),typeof window!="undefined"?window:{}),_e={};if(Object(we.a)()){var Le=document.createElement("div");_e=Le.style}var Re={};function Ge(De){if(Re[De])return Re[De];var Be=xe[De];if(Be)for(var Ke=Object.keys(Be),ke=Ke.length,fe=0;fe<ke;fe+=1){var Oe=Ke[fe];if(Object.prototype.hasOwnProperty.call(Be,Oe)&&Oe in _e)return Re[De]=Be[Oe],Re[De]}return""}var Ye=Ge("animationend"),at=Ge("transitionend"),it=!!(Ye&&at),ot=Ye||"animationend",yt=at||"transitionend";function wt(De,Be){if(!De)return null;if(Object(G.a)(De)==="object"){var Ke=Be.replace(/-\w/g,function(ke){return ke[1].toUpperCase()});return De[Ke]}return"".concat(De,"-").concat(Be)}var ft="none",jt="appear",kt="enter",Rt="leave",Vt="none",Tt="prepare",dr="start",tr="active",Wt="end";function Bt(De){var Be=Object(p.useRef)(!1),Ke=Object(p.useState)(De),ke=Object(c.a)(Ke,2),fe=ke[0],Oe=ke[1];function ve(Ie){Be.current||Oe(Ie)}return Object(p.useEffect)(function(){return function(){Be.current=!0}},[]),[fe,ve]}var Nr=Object(we.a)()?p.useLayoutEffect:p.useEffect,dn=Nr,Er=function(){var De=p.useRef(null);function Be(){$e.a.cancel(De.current)}function Ke(ke){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Be();var Oe=Object($e.a)(function(){fe<=1?ke({isCanceled:function(){return Oe!==De.current}}):Ke(ke,fe-1)});De.current=Oe}return p.useEffect(function(){return function(){Be()}},[]),[Ke,Be]},qn=[Tt,dr,tr,Wt],vt=!1,Ct=!0;function mt(De){return De===tr||De===Wt}var mr=function(De,Be){var Ke=p.useState(Vt),ke=Object(c.a)(Ke,2),fe=ke[0],Oe=ke[1],ve=Er(),Ie=Object(c.a)(ve,2),je=Ie[0],He=Ie[1];function We(){Oe(Tt)}return dn(function(){if(fe!==Vt&&fe!==Wt){var Qe=qn.indexOf(fe),st=qn[Qe+1],pt=Be(fe);pt===vt?Oe(st):je(function(ht){function bt(){if(ht.isCanceled())return;Oe(st)}pt===!0?bt():Promise.resolve(pt).then(bt)})}},[De,fe]),p.useEffect(function(){return function(){He()}},[]),[We,fe]},wr=function(De){var Be=Object(p.useRef)(),Ke=Object(p.useRef)(De);Ke.current=De;var ke=p.useCallback(function(ve){Ke.current(ve)},[]);function fe(ve){ve&&(ve.removeEventListener(yt,ke),ve.removeEventListener(ot,ke))}function Oe(ve){Be.current&&Be.current!==ve&&fe(Be.current),ve&&ve!==Be.current&&(ve.addEventListener(yt,ke),ve.addEventListener(ot,ke),Be.current=ve)}return p.useEffect(function(){return function(){fe(Be.current)}},[]),[Oe,fe]};function It(De,Be,Ke,ke){var fe=ke.motionEnter,Oe=fe===void 0?!0:fe,ve=ke.motionAppear,Ie=ve===void 0?!0:ve,je=ke.motionLeave,He=je===void 0?!0:je,We=ke.motionDeadline,Qe=ke.motionLeaveImmediately,st=ke.onAppearPrepare,pt=ke.onEnterPrepare,ht=ke.onLeavePrepare,bt=ke.onAppearStart,Ut=ke.onEnterStart,er=ke.onLeaveStart,rr=ke.onAppearActive,ir=ke.onEnterActive,pr=ke.onLeaveActive,cr=ke.onAppearEnd,or=ke.onEnterEnd,Rr=ke.onLeaveEnd,br=ke.onVisibleChanged,vn=Bt(),xr=Object(c.a)(vn,2),Xt=xr[0],Ht=xr[1],Sr=Bt(ft),Dr=Object(c.a)(Sr,2),Nt=Dr[0],Pr=Dr[1],gn=Bt(null),Ur=Object(c.a)(gn,2),Qr=Ur[0],Xr=Ur[1],Ln=Object(p.useRef)(!1),Vn=Object(p.useRef)(null),En=Object(p.useRef)(!1),ya=Object(p.useRef)(null);function Ua(){var rn=Ke();return rn||ya.current}var Ea=Object(p.useRef)(!1);function Yn(rn){var Gr=Ua();if(rn&&!rn.deadline&&rn.target!==Gr)return;var $n;Nt===jt&&Ea.current?$n=cr==null?void 0:cr(Gr,rn):Nt===kt&&Ea.current?$n=or==null?void 0:or(Gr,rn):Nt===Rt&&Ea.current&&($n=Rr==null?void 0:Rr(Gr,rn)),$n!==!1&&!En.current&&(Pr(ft),Xr(null))}var sn=wr(Yn),Zr=Object(c.a)(sn,1),wn=Zr[0],yn=p.useMemo(function(){var rn,Gr,$n;switch(Nt){case"appear":return rn={},Object(P.a)(rn,Tt,st),Object(P.a)(rn,dr,bt),Object(P.a)(rn,tr,rr),rn;case"enter":return Gr={},Object(P.a)(Gr,Tt,pt),Object(P.a)(Gr,dr,Ut),Object(P.a)(Gr,tr,ir),Gr;case"leave":return $n={},Object(P.a)($n,Tt,ht),Object(P.a)($n,dr,er),Object(P.a)($n,tr,pr),$n;default:return{}}},[Nt]),Fa=mr(Nt,function(rn){if(rn===Tt){var Gr=yn[Tt];return Gr?Gr(Ua()):vt}if(Vr in yn){var $n;Xr((($n=yn[Vr])===null||$n===void 0?void 0:$n.call(yn,Ua(),null))||null)}return Vr===tr&&(wn(Ua()),We>0&&(clearTimeout(Vn.current),Vn.current=setTimeout(function(){Yn({deadline:!0})},We))),Ct}),ei=Object(c.a)(Fa,2),ti=ei[0],Vr=ei[1],Va=mt(Vr);Ea.current=Va,dn(function(){Ht(Be);var rn=Ln.current;if(Ln.current=!0,!De)return;var Gr;!rn&&Be&&Ie&&(Gr=jt),rn&&Be&&Oe&&(Gr=kt),(rn&&!Be&&He||!rn&&Qe&&!Be&&He)&&(Gr=Rt),Gr&&(Pr(Gr),ti())},[Be]),Object(p.useEffect)(function(){(Nt===jt&&!Ie||Nt===kt&&!Oe||Nt===Rt&&!He)&&Pr(ft)},[Ie,Oe,He]),Object(p.useEffect)(function(){return function(){clearTimeout(Vn.current),En.current=!0}},[]),Object(p.useEffect)(function(){Xt!==void 0&&Nt===ft&&(br==null||br(Xt))},[Xt,Nt]);var ri=Qr;return yn[Tt]&&Vr===dr&&(ri=Object(D.a)({transition:"none"},ri)),[Nt,Vr,ri,Xt!=null?Xt:Be]}var _t=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(){return Object(L.a)(this,Ke),Be.apply(this,arguments)}return Object(O.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(p.Component),vr=_t;function un(De){var Be=De;Object(G.a)(De)==="object"&&(Be=De.transitionSupport);function Ke(fe){return!!(fe.motionName&&Be)}var ke=p.forwardRef(function(fe,Oe){var ve=fe.visible,Ie=ve===void 0?!0:ve,je=fe.removeOnLeave,He=je===void 0?!0:je,We=fe.forceRender,Qe=fe.children,st=fe.motionName,pt=fe.leavedClassName,ht=fe.eventProps,bt=Ke(fe),Ut=Object(p.useRef)(),er=Object(p.useRef)();function rr(){try{return Object(nt.a)(Ut.current||er.current)}catch(Pr){return null}}var ir=It(bt,Ie,rr,fe),pr=Object(c.a)(ir,4),cr=pr[0],or=pr[1],Rr=pr[2],br=pr[3],vn=p.useRef(br);br&&(vn.current=!0);var xr=Object(p.useRef)(Oe);xr.current=Oe;var Xt=p.useCallback(function(Pr){Ut.current=Pr,Object(Me.b)(xr.current,Pr)},[]),Ht,Sr=Object(D.a)(Object(D.a)({},ht),{},{visible:Ie});if(!Qe)Ht=null;else if(cr===ft||!Ke(fe))br?Ht=Qe(Object(D.a)({},Sr),Xt):!He&&vn.current?Ht=Qe(Object(D.a)(Object(D.a)({},Sr),{},{className:pt}),Xt):We?Ht=Qe(Object(D.a)(Object(D.a)({},Sr),{},{style:{display:"none"}}),Xt):Ht=null;else{var Dr,Nt;or===Tt?Nt="prepare":mt(or)?Nt="active":or===dr&&(Nt="start"),Ht=Qe(Object(D.a)(Object(D.a)({},Sr),{},{className:S()(wt(st,cr),(Dr={},Object(P.a)(Dr,wt(st,"".concat(cr,"-").concat(Nt)),Nt),Object(P.a)(Dr,st,typeof st=="string"),Dr)),style:Rr}),Xt)}return p.createElement(vr,{ref:er},Ht)});return ke.displayName="CSSMotion",ke}var jr=un(it),ct="add",Dt="keep",Yr="remove",nn="removed";function An(De){var Be;return De&&Object(G.a)(De)==="object"&&"key"in De?Be=De:Be={key:De},Object(D.a)(Object(D.a)({},Be),{},{key:String(Be.key)})}function fn(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return De.map(An)}function Hr(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],ke=0,fe=Be.length,Oe=fn(De),ve=fn(Be);Oe.forEach(function(He){for(var We=!1,Qe=ke;Qe<fe;Qe+=1){var st=ve[Qe];if(st.key===He.key){ke<Qe&&(Ke=Ke.concat(ve.slice(ke,Qe).map(function(pt){return Object(D.a)(Object(D.a)({},pt),{},{status:ct})})),ke=Qe),Ke.push(Object(D.a)(Object(D.a)({},st),{},{status:Dt})),ke+=1,We=!0;break}}We||Ke.push(Object(D.a)(Object(D.a)({},He),{},{status:Yr}))}),ke<fe&&(Ke=Ke.concat(ve.slice(ke).map(function(He){return Object(D.a)(Object(D.a)({},He),{},{status:ct})})));var Ie={};Ke.forEach(function(He){var We=He.key;Ie[We]=(Ie[We]||0)+1});var je=Object.keys(Ie).filter(function(He){return Ie[He]>1});return je.forEach(function(He){Ke=Ke.filter(function(We){var Qe=We.key,st=We.status;return Qe!==He||st!==Yr}),Ke.forEach(function(We){We.key===He&&(We.status=Dt)})}),Ke}var Ot=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function cn(De){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jr,Ke=function(ke){Object(x.a)(Oe,ke);var fe=Object(b.a)(Oe);function Oe(){var ve;return Object(L.a)(this,Oe),ve=fe.apply(this,arguments),ve.state={keyEntities:[]},ve.removeKey=function(Ie){ve.setState(function(je){var He=je.keyEntities;return{keyEntities:He.map(function(We){return We.key!==Ie?We:Object(D.a)(Object(D.a)({},We),{},{status:nn})})}})},ve}return Object(O.a)(Oe,[{key:"render",value:function(){var Ie=this,je=this.state.keyEntities,He=this.props,We=He.component,Qe=He.children,st=He.onVisibleChanged,pt=Object(_.a)(He,["component","children","onVisibleChanged"]),ht=We||p.Fragment,bt={};return Ot.forEach(function(Ut){bt[Ut]=pt[Ut],delete pt[Ut]}),delete pt.keys,p.createElement(ht,pt,je.map(function(Ut){var er=Ut.status,rr=Object(_.a)(Ut,["status"]),ir=er===ct||er===Dt;return p.createElement(Be,Object(a.a)({},bt,{key:rr.key,visible:ir,eventProps:rr,onVisibleChanged:function(cr){st==null||st(cr,{key:rr.key}),cr||Ie.removeKey(rr.key)}}),Qe)}))}}],[{key:"getDerivedStateFromProps",value:function(Ie,je){var He=Ie.keys,We=je.keyEntities,Qe=fn(He),st=Hr(We,Qe);return{keyEntities:st.filter(function(pt){var ht=We.find(function(bt){var Ut=bt.key;return pt.key===Ut});return!(ht&&ht.status===nn&&pt.status===Yr)})}}}]),Oe}(p.Component);return Ke.defaultProps={component:"div"},Ke}var ut=cn(it),Lr=jr;function fr(De){var Be=De.prefixCls,Ke=De.motion,ke=De.animation,fe=De.transitionName;return Ke||(ke?{motionName:"".concat(Be,"-").concat(ke)}:fe?{motionName:fe}:null)}function ea(De){var Be=De.prefixCls,Ke=De.visible,ke=De.zIndex,fe=De.mask,Oe=De.maskMotion,ve=De.maskAnimation,Ie=De.maskTransitionName;if(!fe)return null;var je={};return(Oe||Ie||ve)&&(je=Object(D.a)({motionAppear:!0},fr({motion:Oe,prefixCls:Be,transitionName:Ie,animation:ve}))),p.createElement(Lr,Object(a.a)({},je,{visible:Ke,removeOnLeave:!0}),function(He){var We=He.className;return p.createElement("div",{style:{zIndex:ke},className:S()("".concat(Be,"-mask"),We)})})}var Sn=k("9mu1"),bn=k("o0o1"),da=k.n(bn),ta=k("HaE+"),an=["measure","align",null,"motion"],Fr=function(De,Be){var Ke=Object(p.useState)(null),ke=Object(c.a)(Ke,2),fe=ke[0],Oe=ke[1],ve=Object(p.useRef)(),Ie=Object(p.useRef)(!1);function je(Qe){Ie.current||Oe(Qe)}function He(){$e.a.cancel(ve.current)}function We(Qe){He(),ve.current=Object($e.a)(function(){je(function(st){switch(fe){case"align":return"motion";case"motion":return"stable";default:}return st}),Qe==null||Qe()})}return Object(p.useEffect)(function(){je("measure")},[De]),Object(p.useEffect)(function(){switch(fe){case"measure":Be();break;default:}fe&&(ve.current=Object($e.a)(Object(ta.a)(da.a.mark(function Qe(){var st,pt;return da.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:st=an.indexOf(fe),pt=an[st+1],pt&&st!==-1&&je(pt);case 3:case"end":return bt.stop()}},Qe)}))))},[fe]),Object(p.useEffect)(function(){return function(){Ie.current=!0,He()}},[]),[fe,We]},fa=function(De){var Be=p.useState({width:0,height:0}),Ke=Object(c.a)(Be,2),ke=Ke[0],fe=Ke[1];function Oe(Ie){fe({width:Ie.offsetWidth,height:Ie.offsetHeight})}var ve=p.useMemo(function(){var Ie={};if(De){var je=ke.width,He=ke.height;De.indexOf("height")!==-1&&He?Ie.height=He:De.indexOf("minHeight")!==-1&&He&&(Ie.minHeight=He),De.indexOf("width")!==-1&&je?Ie.width=je:De.indexOf("minWidth")!==-1&&je&&(Ie.minWidth=je)}return Ie},[De,ke]);return[ve,Oe]},hn=p.forwardRef(function(De,Be){var Ke=De.visible,ke=De.prefixCls,fe=De.className,Oe=De.style,ve=De.children,Ie=De.zIndex,je=De.stretch,He=De.destroyPopupOnHide,We=De.forceRender,Qe=De.align,st=De.point,pt=De.getRootDomNode,ht=De.getClassNameFromAlign,bt=De.onAlign,Ut=De.onMouseEnter,er=De.onMouseLeave,rr=De.onMouseDown,ir=De.onTouchStart,pr=Object(p.useRef)(),cr=Object(p.useRef)(),or=Object(p.useState)(),Rr=Object(c.a)(or,2),br=Rr[0],vn=Rr[1],xr=fa(je),Xt=Object(c.a)(xr,2),Ht=Xt[0],Sr=Xt[1];function Dr(){je&&Sr(pt())}var Nt=Fr(Ke,Dr),Pr=Object(c.a)(Nt,2),gn=Pr[0],Ur=Pr[1],Qr=Object(p.useRef)();function Xr(){return st||pt}function Ln(){var sn;(sn=pr.current)===null||sn===void 0||sn.forceAlign()}function Vn(sn,Zr){var wn=ht(Zr);br!==wn&&vn(wn),gn==="align"&&(br!==wn?Promise.resolve().then(function(){Ln()}):Ur(function(){var yn;(yn=Qr.current)===null||yn===void 0||yn.call(Qr)}),bt==null||bt(sn,Zr))}var En=Object(D.a)({},fr(De));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(sn){var Zr=En[sn];En[sn]=function(wn,yn){return Ur(),Zr==null?void 0:Zr(wn,yn)}});function ya(){return new Promise(function(sn){Qr.current=sn})}p.useEffect(function(){!En.motionName&&gn==="motion"&&Ur()},[En.motionName,gn]),p.useImperativeHandle(Be,function(){return{forceAlign:Ln,getElement:function(){return cr.current}}});var Ua=Object(D.a)(Object(D.a)({},Ht),{},{zIndex:Ie,opacity:gn==="motion"||gn==="stable"||!Ke?void 0:0,pointerEvents:gn==="stable"?void 0:"none"},Oe),Ea=!0;(Qe==null?void 0:Qe.points)&&(gn==="align"||gn==="stable")&&(Ea=!1);var Yn=ve;return p.Children.count(ve)>1&&(Yn=p.createElement("div",{className:"".concat(ke,"-content")},ve)),p.createElement(Lr,Object(a.a)({visible:Ke,ref:cr,leavedClassName:"".concat(ke,"-hidden")},En,{onAppearPrepare:ya,onEnterPrepare:ya,removeOnLeave:He,forceRender:We}),function(sn,Zr){var wn=sn.className,yn=sn.style,Fa=S()(ke,fe,br,wn);return p.createElement(Sn.a,{target:Xr(),key:"popup",ref:pr,monitorWindowResize:!0,disabled:Ea,align:Qe,onAlign:Vn},p.createElement("div",{ref:Zr,className:Fa,onMouseEnter:Ut,onMouseLeave:er,onMouseDownCapture:rr,onTouchStartCapture:ir,style:Object(D.a)(Object(D.a)({},yn),Ua)},Yn))})});hn.displayName="PopupInner";var Br=hn,ar=p.forwardRef(function(De,Be){var Ke=De.prefixCls,ke=De.visible,fe=De.zIndex,Oe=De.children,ve=De.mobile;ve=ve===void 0?{}:ve;var Ie=ve.popupClassName,je=ve.popupStyle,He=ve.popupMotion,We=He===void 0?{}:He,Qe=ve.popupRender,st=p.useRef();p.useImperativeHandle(Be,function(){return{forceAlign:function(){},getElement:function(){return st.current}}});var pt=Object(D.a)({zIndex:fe},je),ht=Oe;return p.Children.count(Oe)>1&&(ht=p.createElement("div",{className:"".concat(Ke,"-content")},Oe)),Qe&&(ht=Qe(ht)),p.createElement(Lr,Object(a.a)({visible:ke,ref:st,removeOnLeave:!0},We),function(bt,Ut){var er=bt.className,rr=bt.style,ir=S()(Ke,Ie,er);return p.createElement("div",{ref:Ut,className:ir,style:Object(D.a)(Object(D.a)({},rr),pt)},ht)})});ar.displayName="MobilePopupInner";var en=ar,$t=["visible","mobile"],Ft=p.forwardRef(function(De,Be){var Ke=De.visible,ke=De.mobile,fe=Object(_.a)(De,$t),Oe=Object(p.useState)(Ke),ve=Object(c.a)(Oe,2),Ie=ve[0],je=ve[1],He=Object(p.useState)(!1),We=Object(c.a)(He,2),Qe=We[0],st=We[1],pt=Object(D.a)(Object(D.a)({},fe),{},{visible:Ie});Object(p.useEffect)(function(){je(Ke),Ke&&ke&&st(Pe())},[Ke,ke]);var ht=Qe?p.createElement(en,Object(a.a)({},pt,{mobile:ke,ref:Be})):p.createElement(Br,Object(a.a)({},pt,{ref:Be}));return p.createElement("div",null,p.createElement(ea,pt),ht)});Ft.displayName="Popup";var Jt=Ft,Tr=p.createContext(null),kr=Tr;function Kr(){}function xn(){return""}function li(De){return De?De.ownerDocument:window.document}var Ya=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function $a(De){var Be=function(Ke){Object(x.a)(fe,Ke);var ke=Object(b.a)(fe);function fe(Oe){var ve;Object(L.a)(this,fe),ve=ke.call(this,Oe),ve.popupRef=p.createRef(),ve.triggerRef=p.createRef(),ve.attachId=void 0,ve.clickOutsideHandler=void 0,ve.touchOutsideHandler=void 0,ve.contextMenuOutsideHandler1=void 0,ve.contextMenuOutsideHandler2=void 0,ve.mouseDownTimeout=void 0,ve.focusTime=void 0,ve.preClickTime=void 0,ve.preTouchTime=void 0,ve.delayTimer=void 0,ve.hasPopupMouseDown=void 0,ve.onMouseEnter=function(je){var He=ve.props.mouseEnterDelay;ve.fireEvents("onMouseEnter",je),ve.delaySetPopupVisible(!0,He,He?null:je)},ve.onMouseMove=function(je){ve.fireEvents("onMouseMove",je),ve.setPoint(je)},ve.onMouseLeave=function(je){ve.fireEvents("onMouseLeave",je),ve.delaySetPopupVisible(!1,ve.props.mouseLeaveDelay)},ve.onPopupMouseEnter=function(){ve.clearDelayTimer()},ve.onPopupMouseLeave=function(je){var He;if(je.relatedTarget&&!je.relatedTarget.setTimeout&&Object(tt.a)((He=ve.popupRef.current)===null||He===void 0?void 0:He.getElement(),je.relatedTarget))return;ve.delaySetPopupVisible(!1,ve.props.mouseLeaveDelay)},ve.onFocus=function(je){ve.fireEvents("onFocus",je),ve.clearDelayTimer(),ve.isFocusToShow()&&(ve.focusTime=Date.now(),ve.delaySetPopupVisible(!0,ve.props.focusDelay))},ve.onMouseDown=function(je){ve.fireEvents("onMouseDown",je),ve.preClickTime=Date.now()},ve.onTouchStart=function(je){ve.fireEvents("onTouchStart",je),ve.preTouchTime=Date.now()},ve.onBlur=function(je){ve.fireEvents("onBlur",je),ve.clearDelayTimer(),ve.isBlurToHide()&&ve.delaySetPopupVisible(!1,ve.props.blurDelay)},ve.onContextMenu=function(je){je.preventDefault(),ve.fireEvents("onContextMenu",je),ve.setPopupVisible(!0,je)},ve.onContextMenuClose=function(){ve.isContextMenuToShow()&&ve.close()},ve.onClick=function(je){if(ve.fireEvents("onClick",je),ve.focusTime){var He;if(ve.preClickTime&&ve.preTouchTime?He=Math.min(ve.preClickTime,ve.preTouchTime):ve.preClickTime?He=ve.preClickTime:ve.preTouchTime&&(He=ve.preTouchTime),Math.abs(He-ve.focusTime)<20)return;ve.focusTime=0}ve.preClickTime=0,ve.preTouchTime=0,ve.isClickToShow()&&(ve.isClickToHide()||ve.isBlurToHide())&&je&&je.preventDefault&&je.preventDefault();var We=!ve.state.popupVisible;(ve.isClickToHide()&&!We||We&&ve.isClickToShow())&&ve.setPopupVisible(!ve.state.popupVisible,je)},ve.onPopupMouseDown=function(){if(ve.hasPopupMouseDown=!0,clearTimeout(ve.mouseDownTimeout),ve.mouseDownTimeout=window.setTimeout(function(){ve.hasPopupMouseDown=!1},0),ve.context){var je;(je=ve.context).onPopupMouseDown.apply(je,arguments)}},ve.onDocumentClick=function(je){if(ve.props.mask&&!ve.props.maskClosable)return;var He=je.target,We=ve.getRootDomNode(),Qe=ve.getPopupDomNode();(!Object(tt.a)(We,He)||ve.isContextMenuOnly())&&!Object(tt.a)(Qe,He)&&!ve.hasPopupMouseDown&&ve.close()},ve.getRootDomNode=function(){var je=ve.props.getTriggerDOMNode;if(je)return je(ve.triggerRef.current);try{var He=Object(nt.a)(ve.triggerRef.current);if(He)return He}catch(We){}return Je.a.findDOMNode(Object(f.a)(ve))},ve.getPopupClassNameFromAlign=function(je){var He=[],We=ve.props,Qe=We.popupPlacement,st=We.builtinPlacements,pt=We.prefixCls,ht=We.alignPoint,bt=We.getPopupClassNameFromAlign;return Qe&&st&&He.push(Ve(st,pt,je,ht)),bt&&He.push(bt(je)),He.join(" ")},ve.getComponent=function(){var je=ve.props,He=je.prefixCls,We=je.destroyPopupOnHide,Qe=je.popupClassName,st=je.onPopupAlign,pt=je.popupMotion,ht=je.popupAnimation,bt=je.popupTransitionName,Ut=je.popupStyle,er=je.mask,rr=je.maskAnimation,ir=je.maskTransitionName,pr=je.maskMotion,cr=je.zIndex,or=je.popup,Rr=je.stretch,br=je.alignPoint,vn=je.mobile,xr=je.forceRender,Xt=ve.state,Ht=Xt.popupVisible,Sr=Xt.point,Dr=ve.getPopupAlign(),Nt={};return ve.isMouseEnterToShow()&&(Nt.onMouseEnter=ve.onPopupMouseEnter),ve.isMouseLeaveToHide()&&(Nt.onMouseLeave=ve.onPopupMouseLeave),Nt.onMouseDown=ve.onPopupMouseDown,Nt.onTouchStart=ve.onPopupMouseDown,p.createElement(Jt,Object(a.a)({prefixCls:He,destroyPopupOnHide:We,visible:Ht,point:br&&Sr,className:Qe,align:Dr,onAlign:st,animation:ht,getClassNameFromAlign:ve.getPopupClassNameFromAlign},Nt,{stretch:Rr,getRootDomNode:ve.getRootDomNode,style:Ut,mask:er,zIndex:cr,transitionName:bt,maskAnimation:rr,maskTransitionName:ir,maskMotion:pr,ref:ve.popupRef,motion:pt,mobile:vn,forceRender:xr}),typeof or=="function"?or():or)},ve.attachParent=function(je){$e.a.cancel(ve.attachId);var He=ve.props,We=He.getPopupContainer,Qe=He.getDocument,st=ve.getRootDomNode(),pt;We?(st||We.length===0)&&(pt=We(st)):pt=Qe(ve.getRootDomNode()).body,pt?pt.appendChild(je):ve.attachId=Object($e.a)(function(){ve.attachParent(je)})},ve.getContainer=function(){var je=ve.props.getDocument,He=je(ve.getRootDomNode()).createElement("div");return He.style.position="absolute",He.style.top="0",He.style.left="0",He.style.width="100%",ve.attachParent(He),He},ve.setPoint=function(je){var He=ve.props.alignPoint;if(!He||!je)return;ve.setState({point:{pageX:je.pageX,pageY:je.pageY}})},ve.handlePortalUpdate=function(){ve.state.prevPopupVisible!==ve.state.popupVisible&&ve.props.afterPopupVisibleChange(ve.state.popupVisible)},ve.triggerContextValue={onPopupMouseDown:ve.onPopupMouseDown};var Ie;return"popupVisible"in Oe?Ie=!!Oe.popupVisible:Ie=!!Oe.defaultPopupVisible,ve.state={prevPopupVisible:Ie,popupVisible:Ie},Ya.forEach(function(je){ve["fire".concat(je)]=function(He){ve.fireEvents(je,He)}}),ve}return Object(O.a)(fe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ve=this.props,Ie=this.state;if(Ie.popupVisible){var je;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(je=ve.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(je,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(je=je||ve.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(je,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(je=je||ve.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ce.a)(je,"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),$e.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ve;return((ve=this.popupRef.current)===null||ve===void 0?void 0:ve.getElement())||null}},{key:"getPopupAlign",value:function(){var ve=this.props,Ie=ve.popupPlacement,je=ve.popupAlign,He=ve.builtinPlacements;return Ie&&He?Ue(He,Ie,je):je}},{key:"setPopupVisible",value:function(ve,Ie){var je=this.props.alignPoint,He=this.state.popupVisible;this.clearDelayTimer(),He!==ve&&("popupVisible"in this.props||this.setState({popupVisible:ve,prevPopupVisible:He}),this.props.onPopupVisibleChange(ve)),je&&Ie&&ve&&this.setPoint(Ie)}},{key:"delaySetPopupVisible",value:function(ve,Ie,je){var He=this,We=Ie*1e3;if(this.clearDelayTimer(),We){var Qe=je?{pageX:je.pageX,pageY:je.pageY}:null;this.delayTimer=window.setTimeout(function(){He.setPopupVisible(ve,Qe),He.clearDelayTimer()},We)}else this.setPopupVisible(ve,je)}},{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(ve){var Ie=this.props.children.props,je=this.props;return Ie[ve]&&je[ve]?this["fire".concat(ve)]:Ie[ve]||je[ve]}},{key:"isClickToShow",value:function(){var ve=this.props,Ie=ve.action,je=ve.showAction;return Ie.indexOf("click")!==-1||je.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ve=this.props.action;return ve==="contextMenu"||ve.length===1&&ve[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ve=this.props,Ie=ve.action,je=ve.showAction;return Ie.indexOf("contextMenu")!==-1||je.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ve=this.props,Ie=ve.action,je=ve.hideAction;return Ie.indexOf("click")!==-1||je.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ve=this.props,Ie=ve.action,je=ve.showAction;return Ie.indexOf("hover")!==-1||je.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ve=this.props,Ie=ve.action,je=ve.hideAction;return Ie.indexOf("hover")!==-1||je.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ve=this.props,Ie=ve.action,je=ve.showAction;return Ie.indexOf("focus")!==-1||je.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ve=this.props,Ie=ve.action,je=ve.hideAction;return Ie.indexOf("focus")!==-1||je.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ve;(ve=this.popupRef.current)===null||ve===void 0||ve.forceAlign()}}},{key:"fireEvents",value:function(ve,Ie){var je=this.props.children.props[ve];je&&je(Ie);var He=this.props[ve];He&&He(Ie)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ve=this.state.popupVisible,Ie=this.props,je=Ie.children,He=Ie.forceRender,We=Ie.alignPoint,Qe=Ie.className,st=Ie.autoDestroy,pt=p.Children.only(je),ht={key:"trigger"};this.isContextMenuToShow()?ht.onContextMenu=this.onContextMenu:ht.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(ht.onClick=this.onClick,ht.onMouseDown=this.onMouseDown,ht.onTouchStart=this.onTouchStart):(ht.onClick=this.createTwoChains("onClick"),ht.onMouseDown=this.createTwoChains("onMouseDown"),ht.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(ht.onMouseEnter=this.onMouseEnter,We&&(ht.onMouseMove=this.onMouseMove)):ht.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?ht.onMouseLeave=this.onMouseLeave:ht.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(ht.onFocus=this.onFocus,ht.onBlur=this.onBlur):(ht.onFocus=this.createTwoChains("onFocus"),ht.onBlur=this.createTwoChains("onBlur"));var bt=S()(pt&&pt.props&&pt.props.className,Qe);bt&&(ht.className=bt);var Ut=Object(D.a)({},ht);Object(Me.c)(pt)&&(Ut.ref=Object(Me.a)(this.triggerRef,pt.ref));var er=p.cloneElement(pt,Ut),rr;return(ve||this.popupRef.current||He)&&(rr=p.createElement(De,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ve&&st&&(rr=null),p.createElement(kr.Provider,{value:this.triggerContextValue},er,rr)}}],[{key:"getDerivedStateFromProps",value:function(ve,Ie){var je=ve.popupVisible,He={};return je!==void 0&&Ie.popupVisible!==je&&(He.popupVisible=je,He.prevPopupVisible=Ie.popupVisible),He}}]),fe}(p.Component);return Be.contextType=kr,Be.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:xn,getDocument:li,onPopupVisibleChange:Kr,afterPopupVisibleChange:Kr,onPopupAlign:Kr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Be}var _a=$a(Xe.a),pn={adjustX:1,adjustY:1},Ka={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},$r={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},ra=Ka,Pn=0,on={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Cn=function(Be,Ke,ke){var fe=ne(Ke),Oe=Be.getState();Be.setState({defaultActiveFirst:Object(D.a)(Object(D.a)({},Oe.defaultActiveFirst),{},Object(P.a)({},fe,ke))})},ha=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(ke){var fe;Object(L.a)(this,Ke),fe=Be.call(this,ke),fe.onDestroy=function(We){fe.props.onDestroy(We)},fe.onKeyDown=function(We){var Qe=We.keyCode,st=fe.menuInstance,pt=fe.props.store,ht=fe.getVisible();if(Qe===m.a.ENTER)return fe.onTitleClick(We),Cn(pt,fe.props.eventKey,!0),!0;if(Qe===m.a.RIGHT)return ht?st.onKeyDown(We):(fe.triggerOpenChange(!0),Cn(pt,fe.props.eventKey,!0)),!0;if(Qe===m.a.LEFT){var bt;if(ht)bt=st.onKeyDown(We);else return;return bt||(fe.triggerOpenChange(!1),bt=!0),bt}return ht&&(Qe===m.a.UP||Qe===m.a.DOWN)?st.onKeyDown(We):void 0},fe.onOpenChange=function(We){fe.props.onOpenChange(We)},fe.onPopupVisibleChange=function(We){fe.triggerOpenChange(We,We?"mouseenter":"mouseleave")},fe.onMouseEnter=function(We){var Qe=fe.props,st=Qe.eventKey,pt=Qe.onMouseEnter,ht=Qe.store;Cn(ht,fe.props.eventKey,!1),pt({key:st,domEvent:We})},fe.onMouseLeave=function(We){var Qe=fe.props,st=Qe.parentMenu,pt=Qe.eventKey,ht=Qe.onMouseLeave;st.subMenuInstance=Object(f.a)(fe),ht({key:pt,domEvent:We})},fe.onTitleMouseEnter=function(We){var Qe=fe.props,st=Qe.eventKey,pt=Qe.onItemHover,ht=Qe.onTitleMouseEnter;pt({key:st,hover:!0}),ht({key:st,domEvent:We})},fe.onTitleMouseLeave=function(We){var Qe=fe.props,st=Qe.parentMenu,pt=Qe.eventKey,ht=Qe.onItemHover,bt=Qe.onTitleMouseLeave;st.subMenuInstance=Object(f.a)(fe),ht({key:pt,hover:!1}),bt({key:pt,domEvent:We})},fe.onTitleClick=function(We){var Qe=Object(f.a)(fe),st=Qe.props;if(st.onTitleClick({key:st.eventKey,domEvent:We}),st.triggerSubMenuAction==="hover")return;fe.triggerOpenChange(!fe.getVisible(),"click"),Cn(st.store,fe.props.eventKey,!1)},fe.onSubMenuClick=function(We){typeof fe.props.onClick=="function"&&fe.props.onClick(fe.addKeyPath(We))},fe.onSelect=function(We){fe.props.onSelect(We)},fe.onDeselect=function(We){fe.props.onDeselect(We)},fe.getPrefixCls=function(){return"".concat(fe.props.rootPrefixCls,"-submenu")},fe.getActiveClassName=function(){return"".concat(fe.getPrefixCls(),"-active")},fe.getDisabledClassName=function(){return"".concat(fe.getPrefixCls(),"-disabled")},fe.getSelectedClassName=function(){return"".concat(fe.getPrefixCls(),"-selected")},fe.getOpenClassName=function(){return"".concat(fe.props.rootPrefixCls,"-submenu-open")},fe.getVisible=function(){return fe.state.isOpen},fe.getMode=function(){return fe.state.mode},fe.saveMenuInstance=function(We){fe.menuInstance=We},fe.addKeyPath=function(We){return Object(D.a)(Object(D.a)({},We),{},{keyPath:(We.keyPath||[]).concat(fe.props.eventKey)})},fe.triggerOpenChange=function(We,Qe){var st=fe.props.eventKey,pt=function(){fe.onOpenChange({key:st,item:Object(f.a)(fe),trigger:Qe,open:We})};Qe==="mouseenter"?fe.mouseenterTimeout=setTimeout(function(){pt()},0):pt()},fe.isChildrenSelected=function(){var We={find:!1};return X(fe.props.children,fe.props.selectedKeys,We),We.find},fe.isInlineMode=function(){return fe.getMode()==="inline"},fe.adjustWidth=function(){if(!fe.subMenuTitle||!fe.menuInstance)return;var We=Ze.findDOMNode(fe.menuInstance);if(We.offsetWidth>=fe.subMenuTitle.offsetWidth)return;We.style.minWidth="".concat(fe.subMenuTitle.offsetWidth,"px")},fe.saveSubMenuTitle=function(We){fe.subMenuTitle=We},fe.getBaseProps=function(){var We=Object(f.a)(fe),Qe=We.props,st=fe.getMode();return{mode:st==="horizontal"?"vertical":st,visible:fe.getVisible(),level:Qe.level+1,inlineIndent:Qe.inlineIndent,focusable:!1,onClick:fe.onSubMenuClick,onSelect:fe.onSelect,onDeselect:fe.onDeselect,onDestroy:fe.onDestroy,selectedKeys:Qe.selectedKeys,eventKey:"".concat(Qe.eventKey,"-menu-"),openKeys:Qe.openKeys,motion:Qe.motion,onOpenChange:fe.onOpenChange,subMenuOpenDelay:Qe.subMenuOpenDelay,parentMenu:Object(f.a)(fe),subMenuCloseDelay:Qe.subMenuCloseDelay,forceSubMenuRender:Qe.forceSubMenuRender,triggerSubMenuAction:Qe.triggerSubMenuAction,builtinPlacements:Qe.builtinPlacements,defaultActiveFirst:Qe.store.getState().defaultActiveFirst[ne(Qe.eventKey)],multiple:Qe.multiple,prefixCls:Qe.rootPrefixCls,id:fe.internalMenuId,manualRef:fe.saveMenuInstance,itemIcon:Qe.itemIcon,expandIcon:Qe.expandIcon,direction:Qe.direction}},fe.getMotion=function(We,Qe){var st=Object(f.a)(fe),pt=st.haveRendered,ht=fe.props,bt=ht.motion,Ut=ht.rootPrefixCls,er=Object(D.a)(Object(D.a)({},bt),{},{leavedClassName:"".concat(Ut,"-hidden"),removeOnLeave:!1,motionAppear:pt||!Qe||We!=="inline"});return er};var Oe=ke.store,ve=ke.eventKey,Ie=Oe.getState(),je=Ie.defaultActiveFirst;fe.isRootMenu=!1;var He=!1;return je&&(He=je[ve]),Cn(Oe,ve,He),fe.state={mode:ke.mode,isOpen:ke.isOpen},fe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var fe=this,Oe=this.props,ve=Oe.mode,Ie=Oe.parentMenu,je=Oe.manualRef,He=Oe.isOpen,We=function(){fe.setState({mode:ve,isOpen:He})},Qe=He!==this.state.isOpen,st=ve!==this.state.mode;if((st||Qe)&&($e.a.cancel(this.updateStateRaf),st?this.updateStateRaf=Object($e.a)(We):We()),je&&je(this),ve!=="horizontal"||!(Ie==null?void 0:Ie.isRootMenu)||!He)return;this.minWidthTimeout=setTimeout(function(){return fe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var fe=this.props,Oe=fe.onDestroy,ve=fe.eventKey;Oe&&Oe(ve),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),$e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(fe,Oe){var ve=this.getBaseProps();return p.createElement(ja,Object(a.a)({},ve,{id:this.internalMenuId,className:fe,style:Oe}),this.props.children)}},{key:"renderChildren",value:function(){var fe=this,Oe=this.getBaseProps(),ve=Oe.mode,Ie=Oe.visible,je=Oe.forceSubMenuRender,He=Oe.direction,We=this.getMotion(ve,Ie);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Ie||je,!this.haveOpened)return p.createElement("div",null);var Qe=S()("".concat(Oe.prefixCls,"-sub"),Object(P.a)({},"".concat(Oe.prefixCls,"-rtl"),He==="rtl"));return this.isInlineMode()?p.createElement(Lr,Object(a.a)({visible:Oe.visible,forceRender:je},We),function(st){var pt=st.className,ht=st.style,bt=S()(Qe,pt);return fe.renderPopupMenu(bt,ht)}):this.renderPopupMenu(Qe)}},{key:"render",value:function(){var fe,Oe,ve,Ie=Object(D.a)({},this.props),je=this.getVisible(),He=this.getPrefixCls(),We=this.isInlineMode(),Qe=this.getMode(),st=S()(He,"".concat(He,"-").concat(Qe),(fe={},Object(P.a)(fe,Ie.className,!!Ie.className),Object(P.a)(fe,this.getOpenClassName(),je),Object(P.a)(fe,this.getActiveClassName(),Ie.active||je&&!We),Object(P.a)(fe,this.getDisabledClassName(),Ie.disabled),Object(P.a)(fe,this.getSelectedClassName(),this.isChildrenSelected()),fe));this.internalMenuId||(Ie.eventKey?this.internalMenuId="".concat(Ie.eventKey,"$Menu"):(Pn+=1,this.internalMenuId="$__$".concat(Pn,"$Menu")));var pt={},ht={},bt={};Ie.disabled||(pt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},ht={onClick:this.onTitleClick},bt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Ut={},er=Ie.direction,rr=er==="rtl";We&&(rr?Ut.paddingRight=Ie.inlineIndent*Ie.level:Ut.paddingLeft=Ie.inlineIndent*Ie.level);var ir={};this.getVisible()&&(ir={"aria-owns":this.internalMenuId});var pr=null;Qe!=="horizontal"&&(pr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(pr=p.createElement(this.props.expandIcon,Object(D.a)({},this.props))));var cr=p.createElement("div",Object(a.a)({ref:this.saveSubMenuTitle,style:Ut,className:"".concat(He,"-title"),role:"button"},bt,ht,{"aria-expanded":je},ir,{"aria-haspopup":"true",title:typeof Ie.title=="string"?Ie.title:void 0}),Ie.title,pr||p.createElement("i",{className:"".concat(He,"-arrow")})),or=this.renderChildren(),Rr=((Oe=Ie.parentMenu)===null||Oe===void 0?void 0:Oe.isRootMenu)?Ie.parentMenu.props.getPopupContainer:function(Xr){return Xr.parentNode},br=on[Qe],vn=Ie.popupOffset?{offset:Ie.popupOffset}:{},xr=S()((ve={},Object(P.a)(ve,Ie.popupClassName,Ie.popupClassName&&!We),Object(P.a)(ve,"".concat(He,"-rtl"),rr),ve)),Xt=Ie.disabled,Ht=Ie.triggerSubMenuAction,Sr=Ie.subMenuOpenDelay,Dr=Ie.forceSubMenuRender,Nt=Ie.subMenuCloseDelay,Pr=Ie.builtinPlacements;Y.forEach(function(Xr){return delete Ie[Xr]}),delete Ie.onClick;var gn=rr?Object(D.a)(Object(D.a)({},$r),Pr):Object(D.a)(Object(D.a)({},Ka),Pr);delete Ie.direction;var Ur=this.getBaseProps(),Qr=We?null:this.getMotion(Ur.mode,Ur.visible);return p.createElement("li",Object(a.a)({},Ie,pt,{className:st,role:"menuitem"}),p.createElement(_a,{prefixCls:He,popupClassName:S()("".concat(He,"-popup"),xr),getPopupContainer:Rr,builtinPlacements:gn,popupPlacement:br,popupVisible:We?!1:je,popupAlign:vn,popup:We?null:or,action:Xt||We?[]:[Ht],mouseEnterDelay:Sr,mouseLeaveDelay:Nt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Dr,popupMotion:Qr},cr),We?or:null)}}]),Ke}(p.Component);ha.defaultProps={onMouseEnter:ae,onMouseLeave:ae,onTitleMouseEnter:ae,onTitleMouseLeave:ae,onTitleClick:ae,manualRef:ae,mode:"vertical",title:""};var Hn=Object(C.b)(function(De,Be){var Ke=De.openKeys,ke=De.activeKey,fe=De.selectedKeys,Oe=Be.eventKey,ve=Be.subMenuKey;return{isOpen:Ke.indexOf(Oe)>-1,active:ke[ve]===Oe,selectedKeys:fe}})(ha);Hn.isSubMenu=!0;var Kn=Hn,Ma="menuitem-overflowed",Pa=.5,zn=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(){var ke;return Object(L.a)(this,Ke),ke=Be.apply(this,arguments),ke.resizeObserver=null,ke.mutationObserver=null,ke.originalTotalWidth=0,ke.overflowedItems=[],ke.menuItemSizes=[],ke.cancelFrameId=null,ke.state={lastVisibleIndex:void 0},ke.childRef=p.createRef(),ke.getMenuItemNodes=function(){var fe=ke.props.prefixCls,Oe=ke.childRef.current;return Oe?[].slice.call(Oe.children).filter(function(ve){return ve.className.split(" ").indexOf("".concat(fe,"-overflowed-submenu"))<0}):[]},ke.getOverflowedSubMenuItem=function(fe,Oe,ve){var Ie=ke.props,je=Ie.overflowedIndicator,He=Ie.level,We=Ie.mode,Qe=Ie.prefixCls,st=Ie.theme;if(He!==1||We!=="horizontal")return null;var pt=ke.props.children[0],ht=pt.props,bt=ht.children,Ut=ht.title,er=ht.style,rr=Object(_.a)(ht,["children","title","style"]),ir=Object(D.a)({},er),pr="".concat(fe,"-overflowed-indicator"),cr="".concat(fe,"-overflowed-indicator");Oe.length===0&&ve!==!0?ir=Object(D.a)(Object(D.a)({},ir),{},{display:"none"}):ve&&(ir=Object(D.a)(Object(D.a)({},ir),{},{visibility:"hidden",position:"absolute"}),pr="".concat(pr,"-placeholder"),cr="".concat(cr,"-placeholder"));var or=st?"".concat(Qe,"-").concat(st):"",Rr={};return Y.forEach(function(br){rr[br]!==void 0&&(Rr[br]=rr[br])}),p.createElement(Kn,Object(a.a)({title:je,className:"".concat(Qe,"-overflowed-submenu"),popupClassName:or},Rr,{key:pr,eventKey:cr,disabled:!1,style:ir}),Oe)},ke.setChildrenWidthAndResize=function(){if(ke.props.mode!=="horizontal")return;var fe=ke.childRef.current;if(!fe)return;var Oe=fe.children;if(!Oe||Oe.length===0)return;var ve=fe.children[Oe.length-1];de(ve,"display","inline-block");var Ie=ke.getMenuItemNodes(),je=Ie.filter(function(He){return He.className.split(" ").indexOf(Ma)>=0});je.forEach(function(He){de(He,"display","inline-block")}),ke.menuItemSizes=Ie.map(function(He){return he(He,!0)}),je.forEach(function(He){de(He,"display","none")}),ke.overflowedIndicatorWidth=he(fe.children[fe.children.length-1],!0),ke.originalTotalWidth=ke.menuItemSizes.reduce(function(He,We){return He+We},0),ke.handleResize(),de(ve,"display","none")},ke.handleResize=function(){if(ke.props.mode!=="horizontal")return;var fe=ke.childRef.current;if(!fe)return;var Oe=he(fe);ke.overflowedItems=[];var ve=0,Ie;ke.originalTotalWidth>Oe+Pa&&(Ie=-1,ke.menuItemSizes.forEach(function(je){ve+=je,ve+ke.overflowedIndicatorWidth<=Oe&&(Ie+=1)})),ke.setState({lastVisibleIndex:Ie})},ke}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){var fe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Oe=this.childRef.current;if(!Oe)return;this.resizeObserver=new ze.default(function(ve){ve.forEach(function(){var Ie=fe.cancelFrameId;cancelAnimationFrame(Ie),fe.cancelFrameId=requestAnimationFrame(fe.setChildrenWidthAndResize)})}),[].slice.call(Oe.children).concat(Oe).forEach(function(ve){fe.resizeObserver.observe(ve)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){fe.resizeObserver.disconnect(),[].slice.call(Oe.children).concat(Oe).forEach(function(ve){fe.resizeObserver.observe(ve)}),fe.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(fe){var Oe=this,ve=this.state.lastVisibleIndex;return(fe||[]).reduce(function(Ie,je,He){var We=je;if(Oe.props.mode==="horizontal"){var Qe=Oe.getOverflowedSubMenuItem(je.props.eventKey,[]);ve!==void 0&&Oe.props.className.indexOf("".concat(Oe.props.prefixCls,"-root"))!==-1&&(He>ve&&(We=p.cloneElement(je,{style:{display:"none"},eventKey:"".concat(je.props.eventKey,"-hidden"),className:"".concat(Ma)})),He===ve+1&&(Oe.overflowedItems=fe.slice(ve+1).map(function(pt){return p.cloneElement(pt,{key:pt.props.eventKey,mode:"vertical-left"})}),Qe=Oe.getOverflowedSubMenuItem(je.props.eventKey,Oe.overflowedItems)));var st=[].concat(Object(i.a)(Ie),[Qe,We]);return He===fe.length-1&&st.push(Oe.getOverflowedSubMenuItem(je.props.eventKey,[],!0)),st}return[].concat(Object(i.a)(Ie),[We])},[])}},{key:"render",value:function(){var fe=this.props,Oe=fe.visible,ve=fe.prefixCls,Ie=fe.overflowedIndicator,je=fe.mode,He=fe.level,We=fe.tag,Qe=fe.children,st=fe.theme,pt=Object(_.a)(fe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ht=We;return p.createElement(ht,Object(a.a)({ref:this.childRef},pt),this.renderChildren(Qe))}}]),Ke}(p.Component);zn.defaultProps={tag:"div",className:""};var Na=zn;function pa(De){return De.length?De.every(function(Be){return!!Be.props.disabled}):!0}function ma(De,Be,Ke){var ke=De.getState();De.setState({activeKey:Object(D.a)(Object(D.a)({},ke.activeKey),{},Object(P.a)({},Be,Ke))})}function Gn(De){return De.eventKey||"0-menu-"}function Xn(De,Be){var Ke=Be,ke=De.children,fe=De.eventKey;if(Ke){var Oe;if(J(ke,function(ve,Ie){ve&&ve.props&&!ve.props.disabled&&Ke===Ee(ve,fe,Ie)&&(Oe=!0)}),Oe)return Ke}return Ke=null,De.defaultActiveFirst&&J(ke,function(ve,Ie){!Ke&&ve&&!ve.props.disabled&&(Ke=Ee(ve,fe,Ie))}),Ke}function ka(De){if(!De)return;var Be=this.instanceArray.indexOf(De);Be!==-1?this.instanceArray[Be]=De:this.instanceArray.push(De)}var na=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(ke){var fe;return Object(L.a)(this,Ke),fe=Be.call(this,ke),fe.onKeyDown=function(Oe,ve){var Ie=Oe.keyCode,je;if(fe.getFlatInstanceArray().forEach(function(We){We&&We.props.active&&We.onKeyDown&&(je=We.onKeyDown(Oe))}),je)return 1;var He=null;return(Ie===m.a.UP||Ie===m.a.DOWN)&&(He=fe.step(Ie===m.a.UP?-1:1)),He?(Oe.preventDefault(),ma(fe.props.store,Gn(fe.props),He.props.eventKey),typeof ve=="function"&&ve(He),1):void 0},fe.onItemHover=function(Oe){var ve=Oe.key,Ie=Oe.hover;ma(fe.props.store,Gn(fe.props),Ie?ve:null)},fe.onDeselect=function(Oe){fe.props.onDeselect(Oe)},fe.onSelect=function(Oe){fe.props.onSelect(Oe)},fe.onClick=function(Oe){fe.props.onClick(Oe)},fe.onOpenChange=function(Oe){fe.props.onOpenChange(Oe)},fe.onDestroy=function(Oe){fe.props.onDestroy(Oe)},fe.getFlatInstanceArray=function(){return fe.instanceArray},fe.step=function(Oe){var ve=fe.getFlatInstanceArray(),Ie=fe.props.store.getState().activeKey[Gn(fe.props)],je=ve.length;if(!je)return null;Oe<0&&(ve=ve.concat().reverse());var He=-1;if(ve.every(function(pt,ht){return pt&&pt.props.eventKey===Ie?(He=ht,!1):!0}),!fe.props.defaultActiveFirst&&He!==-1&&pa(ve.slice(He,je-1)))return;var We=(He+1)%je,Qe=We;do{var st=ve[Qe];if(!st||st.props.disabled)Qe=(Qe+1)%je;else return st}while(Qe!==We);return null},fe.renderCommonMenuItem=function(Oe,ve,Ie){var je=fe.props.store.getState(),He=Object(f.a)(fe),We=He.props,Qe=Ee(Oe,We.eventKey,ve),st=Oe.props;if(!st||typeof Oe.type=="string")return Oe;var pt=Qe===je.activeKey,ht=Object(D.a)(Object(D.a)({mode:st.mode||We.mode,level:We.level,inlineIndent:We.inlineIndent,renderMenuItem:fe.renderMenuItem,rootPrefixCls:We.prefixCls,index:ve,parentMenu:We.parentMenu,manualRef:st.disabled?void 0:Object(j.a)(Oe.ref,ka.bind(Object(f.a)(fe))),eventKey:Qe,active:!st.disabled&&pt,multiple:We.multiple,onClick:function(Ut){(st.onClick||ae)(Ut),fe.onClick(Ut)},onItemHover:fe.onItemHover,motion:We.motion,subMenuOpenDelay:We.subMenuOpenDelay,subMenuCloseDelay:We.subMenuCloseDelay,forceSubMenuRender:We.forceSubMenuRender,onOpenChange:fe.onOpenChange,onDeselect:fe.onDeselect,onSelect:fe.onSelect,builtinPlacements:We.builtinPlacements,itemIcon:st.itemIcon||fe.props.itemIcon,expandIcon:st.expandIcon||fe.props.expandIcon},Ie),{},{direction:We.direction});return(We.mode==="inline"||Te())&&(ht.triggerSubMenuAction="click"),p.cloneElement(Oe,Object(D.a)(Object(D.a)({},ht),{},{key:Qe||ve}))},fe.renderMenuItem=function(Oe,ve,Ie){if(!Oe)return null;var je=fe.props.store.getState(),He={openKeys:je.openKeys,selectedKeys:je.selectedKeys,triggerSubMenuAction:fe.props.triggerSubMenuAction,subMenuKey:Ie};return fe.renderCommonMenuItem(Oe,ve,He)},ke.store.setState({activeKey:Object(D.a)(Object(D.a)({},ke.store.getState().activeKey),{},Object(P.a)({},ke.eventKey,Xn(ke,ke.activeKey)))}),fe.instanceArray=[],fe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(fe){return this.props.visible||fe.visible||this.props.className!==fe.className||!z()(this.props.style,fe.style)}},{key:"componentDidUpdate",value:function(fe){var Oe=this.props,ve="activeKey"in Oe?Oe.activeKey:Oe.store.getState().activeKey[Gn(Oe)],Ie=Xn(Oe,ve);if(Ie!==ve)ma(Oe.store,Gn(Oe),Ie);else if("activeKey"in fe){var je=Xn(fe,fe.activeKey);Ie!==je&&ma(Oe.store,Gn(Oe),Ie)}}},{key:"render",value:function(){var fe=this,Oe=Object(a.a)({},this.props);this.instanceArray=[];var ve=S()(Oe.prefixCls,Oe.className,"".concat(Oe.prefixCls,"-").concat(Oe.mode)),Ie={className:ve,role:Oe.role||"menu"};Oe.id&&(Ie.id=Oe.id),Oe.focusable&&(Ie.tabIndex=0,Ie.onKeyDown=this.onKeyDown);var je=Oe.prefixCls,He=Oe.eventKey,We=Oe.visible,Qe=Oe.level,st=Oe.mode,pt=Oe.overflowedIndicator,ht=Oe.theme;return Y.forEach(function(bt){return delete Oe[bt]}),delete Oe.onClick,p.createElement(Na,Object(a.a)({},Oe,{prefixCls:je,mode:st,tag:"ul",level:Qe,theme:ht,visible:We,overflowedIndicator:pt},Ie),Object(v.a)(Oe.children).map(function(bt,Ut){return fe.renderMenuItem(bt,Ut,He||"0-menu-")}))}}]),Ke}(p.Component);na.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ae};var va=Object(C.b)()(na),ja=va,aa=k("Kwbf");function Mr(De,Be,Ke){var ke=De.prefixCls,fe=De.motion,Oe=De.defaultMotions,ve=Oe===void 0?{}:Oe,Ie=De.openAnimation,je=De.openTransitionName,He=Be.switchingModeFromInline;if(fe)return fe;if(Object(G.a)(Ie)==="object"&&Ie)Object(aa.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ie=="string")return{motionName:"".concat(ke,"-open-").concat(Ie)};if(je)return{motionName:je};var We=ve[Ke];return We||(He?null:ve.other)}var Lt=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(ke){var fe;Object(L.a)(this,Ke),fe=Be.call(this,ke),fe.onSelect=function(Ie){var je=Object(f.a)(fe),He=je.props;if(He.selectable){var We=fe.store.getState(),Qe=We.selectedKeys,st=Ie.key;He.multiple?Qe=Qe.concat([st]):Qe=[st],"selectedKeys"in He||fe.store.setState({selectedKeys:Qe}),He.onSelect(Object(D.a)(Object(D.a)({},Ie),{},{selectedKeys:Qe}))}},fe.onClick=function(Ie){var je=fe.getRealMenuMode(),He=Object(f.a)(fe),We=He.store,Qe=He.props.onOpenChange;je!=="inline"&&!("openKeys"in fe.props)&&(We.setState({openKeys:[]}),Qe([])),fe.props.onClick(Ie)},fe.onKeyDown=function(Ie,je){fe.innerMenu.getWrappedInstance().onKeyDown(Ie,je)},fe.onOpenChange=function(Ie){var je=Object(f.a)(fe),He=je.props,We=fe.store.getState().openKeys.concat(),Qe=!1,st=function(ht){var bt=!1;if(ht.open)bt=We.indexOf(ht.key)===-1,bt&&We.push(ht.key);else{var Ut=We.indexOf(ht.key);bt=Ut!==-1,bt&&We.splice(Ut,1)}Qe=Qe||bt};Array.isArray(Ie)?Ie.forEach(st):st(Ie),Qe&&("openKeys"in fe.props||fe.store.setState({openKeys:We}),He.onOpenChange(We))},fe.onDeselect=function(Ie){var je=Object(f.a)(fe),He=je.props;if(He.selectable){var We=fe.store.getState().selectedKeys.concat(),Qe=Ie.key,st=We.indexOf(Qe);st!==-1&&We.splice(st,1),"selectedKeys"in He||fe.store.setState({selectedKeys:We}),He.onDeselect(Object(D.a)(Object(D.a)({},Ie),{},{selectedKeys:We}))}},fe.onMouseEnter=function(Ie){fe.restoreModeVerticalFromInline();var je=fe.props.onMouseEnter;je&&je(Ie)},fe.onTransitionEnd=function(Ie){var je=Ie.propertyName==="width"&&Ie.target===Ie.currentTarget,He=Ie.target.className,We=Object.prototype.toString.call(He)==="[object SVGAnimatedString]"?He.animVal:He,Qe=Ie.propertyName==="font-size"&&We.indexOf("anticon")>=0;(je||Qe)&&fe.restoreModeVerticalFromInline()},fe.setInnerMenu=function(Ie){fe.innerMenu=Ie},fe.isRootMenu=!0;var Oe=ke.defaultSelectedKeys,ve=ke.defaultOpenKeys;return"selectedKeys"in ke&&(Oe=ke.selectedKeys||[]),"openKeys"in ke&&(ve=ke.openKeys||[]),fe.store=Object(C.c)({selectedKeys:Oe,openKeys:ve,activeKey:{"0-menu-":Xn(ke,ke.activeKey)}}),fe.state={switchingModeFromInline:!1,prevProps:ke,inlineOpenKeys:[],store:fe.store},fe}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(fe){var Oe=this.props,ve=Oe.siderCollapsed,Ie=Oe.inlineCollapsed,je=Oe.onOpenChange;(!fe.inlineCollapsed&&Ie||!fe.siderCollapsed&&ve)&&je([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var fe=this.props.collapsedWidth,Oe=this.store,ve=this.prevOpenKeys,Ie=this.getInlineCollapsed()&&(fe===0||fe==="0"||fe==="0px");Ie?(this.prevOpenKeys=Oe.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ve&&(this.store.setState({openKeys:ve}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var fe=this.props.mode,Oe=this.state.switchingModeFromInline,ve=this.getInlineCollapsed();return Oe&&ve?"inline":ve?"vertical":fe}},{key:"getInlineCollapsed",value:function(){var fe=this.props,Oe=fe.inlineCollapsed,ve=fe.siderCollapsed;return ve!==void 0?ve:Oe}},{key:"restoreModeVerticalFromInline",value:function(){var fe=this.state.switchingModeFromInline;fe&&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 fe=Object(D.a)({},Object(I.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Oe=this.getRealMenuMode();return fe.className+=" ".concat(fe.prefixCls,"-root"),fe.direction==="rtl"&&(fe.className+=" ".concat(fe.prefixCls,"-rtl")),fe=Object(D.a)(Object(D.a)({},fe),{},{mode:Oe,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Mr(this.props,this.state,Oe)}),delete fe.openAnimation,delete fe.openTransitionName,p.createElement(C.a,{store:this.store},p.createElement(ja,Object(a.a)({},fe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(fe,Oe){var ve=Oe.prevProps,Ie=Oe.store,je=Ie.getState(),He={},We={prevProps:fe};return ve.mode==="inline"&&fe.mode!=="inline"&&(We.switchingModeFromInline=!0),"openKeys"in fe?He.openKeys=fe.openKeys||[]:((fe.inlineCollapsed&&!ve.inlineCollapsed||fe.siderCollapsed&&!ve.siderCollapsed)&&(We.switchingModeFromInline=!0,We.inlineOpenKeys=je.openKeys,He.openKeys=[]),(!fe.inlineCollapsed&&ve.inlineCollapsed||!fe.siderCollapsed&&ve.siderCollapsed)&&(He.openKeys=Oe.inlineOpenKeys,We.inlineOpenKeys=[])),Object.keys(He).length&&Ie.setState(He),We}}]),Ke}(p.Component);Lt.defaultProps={selectable:!0,onClick:ae,onSelect:ae,onOpenChange:ae,onDeselect:ae,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:p.createElement("span",null,"\xB7\xB7\xB7")};var zt=Lt,Pt=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(){var ke;return Object(L.a)(this,Ke),ke=Be.apply(this,arguments),ke.onKeyDown=function(fe){var Oe=fe.keyCode;return Oe===m.a.ENTER?(ke.onClick(fe),!0):void 0},ke.onMouseLeave=function(fe){var Oe=ke.props,ve=Oe.eventKey,Ie=Oe.onItemHover,je=Oe.onMouseLeave;Ie({key:ve,hover:!1}),je({key:ve,domEvent:fe})},ke.onMouseEnter=function(fe){var Oe=ke.props,ve=Oe.eventKey,Ie=Oe.onItemHover,je=Oe.onMouseEnter;Ie({key:ve,hover:!0}),je({key:ve,domEvent:fe})},ke.onClick=function(fe){var Oe=ke.props,ve=Oe.eventKey,Ie=Oe.multiple,je=Oe.onClick,He=Oe.onSelect,We=Oe.onDeselect,Qe=Oe.isSelected,st={key:ve,keyPath:[ve],item:Object(f.a)(ke),domEvent:fe};je(st),Ie?Qe?We(st):He(st):Qe||He(st)},ke.saveNode=function(fe){ke.node=fe},ke}return Object(O.a)(Ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var fe=this.props;fe.onDestroy&&fe.onDestroy(fe.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 fe,Oe=Object(D.a)({},this.props),ve=S()(this.getPrefixCls(),Oe.className,(fe={},Object(P.a)(fe,this.getActiveClassName(),!Oe.disabled&&Oe.active),Object(P.a)(fe,this.getSelectedClassName(),Oe.isSelected),Object(P.a)(fe,this.getDisabledClassName(),Oe.disabled),fe)),Ie=Object(D.a)(Object(D.a)({},Oe.attribute),{},{title:typeof Oe.title=="string"?Oe.title:void 0,className:ve,role:Oe.role||"menuitem","aria-disabled":Oe.disabled});Oe.role==="option"?Ie=Object(D.a)(Object(D.a)({},Ie),{},{role:"option","aria-selected":Oe.isSelected}):(Oe.role===null||Oe.role==="none")&&(Ie.role="none");var je={onClick:Oe.disabled?null:this.onClick,onMouseLeave:Oe.disabled?null:this.onMouseLeave,onMouseEnter:Oe.disabled?null:this.onMouseEnter},He=Object(D.a)({},Oe.style);Oe.mode==="inline"&&(Oe.direction==="rtl"?He.paddingRight=Oe.inlineIndent*Oe.level:He.paddingLeft=Oe.inlineIndent*Oe.level),Y.forEach(function(Qe){return delete Oe[Qe]}),delete Oe.direction;var We=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(We=p.createElement(this.props.itemIcon,this.props)),p.createElement("li",Object(a.a)({},Object(I.a)(Oe,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ie,je,{style:He,ref:this.saveNode}),Oe.children,We)}}]),Ke}(p.Component);Pt.isMenuItem=!0,Pt.defaultProps={onSelect:ae,onMouseEnter:ae,onMouseLeave:ae,manualRef:ae};var Zt=Object(C.b)(function(De,Be){var Ke=De.activeKey,ke=De.selectedKeys,fe=Be.eventKey,Oe=Be.subMenuKey;return{active:Ke[Oe]===fe,isSelected:Array.isArray(ke)?ke.indexOf(fe)!==-1:ke===fe}})(Pt),hr=Zt,_r=function(De){Object(x.a)(Ke,De);var Be=Object(b.a)(Ke);function Ke(){var ke;return Object(L.a)(this,Ke),ke=Be.apply(this,arguments),ke.renderInnerMenuItem=function(fe){var Oe=ke.props,ve=Oe.renderMenuItem,Ie=Oe.index;return ve(fe,Ie,ke.props.subMenuKey)},ke}return Object(O.a)(Ke,[{key:"render",value:function(){var fe=Object(a.a)({},this.props),Oe=fe.className,ve=Oe===void 0?"":Oe,Ie=fe.rootPrefixCls,je="".concat(Ie,"-item-group-title"),He="".concat(Ie,"-item-group-list"),We=fe.title,Qe=fe.children;return Y.forEach(function(st){return delete fe[st]}),delete fe.direction,p.createElement("li",Object(a.a)({},fe,{onClick:function(pt){return pt.stopPropagation()},className:"".concat(ve," ").concat(Ie,"-item-group")}),p.createElement("div",{className:je,title:typeof We=="string"?We:void 0},We),p.createElement("ul",{className:He},p.Children.map(Qe,this.renderInnerMenuItem)))}}]),Ke}(p.Component);_r.isMenuItemGroup=!0,_r.defaultProps={disabled:!0};var sr=_r,Jr=function(Be){var Ke=Be.className,ke=Be.rootPrefixCls,fe=Be.style;return p.createElement("li",{className:"".concat(Ke," ").concat(ke,"-item-divider"),style:fe})};Jr.defaultProps={disabled:!0,className:"",style:{}};var Un=Jr,nr=zt,ga=k("eDIo");function Or(De,Be){var Ke=De.prefixCls,ke=De.editable,fe=De.locale,Oe=De.style;return!ke||ke.showAdd===!1?null:p.createElement("button",{ref:Be,type:"button",className:"".concat(Ke,"-nav-add"),style:Oe,"aria-label":(fe==null?void 0:fe.addAriaLabel)||"Add tab",onClick:function(Ie){ke.onEdit("add",{event:Ie})}},ke.addIcon||"+")}var _n=p.forwardRef(Or);function Rn(De,Be){var Ke=De.prefixCls,ke=De.id,fe=De.tabs,Oe=De.locale,ve=De.mobile,Ie=De.moreIcon,je=Ie===void 0?"More":Ie,He=De.moreTransitionName,We=De.style,Qe=De.className,st=De.editable,pt=De.tabBarGutter,ht=De.rtl,bt=De.onTabClick,Ut=Object(p.useState)(!1),er=Object(c.a)(Ut,2),rr=er[0],ir=er[1],pr=Object(p.useState)(null),cr=Object(c.a)(pr,2),or=cr[0],Rr=cr[1],br="".concat(ke,"-more-popup"),vn="".concat(Ke,"-dropdown"),xr=or!==null?"".concat(br,"-").concat(or):null,Xt=Oe==null?void 0:Oe.dropdownAriaLabel,Ht=p.createElement(nr,{onClick:function(Qr){var Xr=Qr.key,Ln=Qr.domEvent;bt(Xr,Ln),ir(!1)},id:br,tabIndex:-1,role:"listbox","aria-activedescendant":xr,selectedKeys:[or],"aria-label":Xt!==void 0?Xt:"expanded dropdown"},fe.map(function(Ur){return p.createElement(hr,{key:Ur.key,id:"".concat(br,"-").concat(Ur.key),role:"option","aria-controls":ke&&"".concat(ke,"-panel-").concat(Ur.key),disabled:Ur.disabled},Ur.tab)}));function Sr(Ur){for(var Qr=fe.filter(function(ya){return!ya.disabled}),Xr=Qr.findIndex(function(ya){return ya.key===or})||0,Ln=Qr.length,Vn=0;Vn<Ln;Vn+=1){Xr=(Xr+Ur+Ln)%Ln;var En=Qr[Xr];if(!En.disabled){Rr(En.key);return}}}function Dr(Ur){var Qr=Ur.which;if(!rr){[m.a.DOWN,m.a.SPACE,m.a.ENTER].includes(Qr)&&(ir(!0),Ur.preventDefault());return}switch(Qr){case m.a.UP:Sr(-1),Ur.preventDefault();break;case m.a.DOWN:Sr(1),Ur.preventDefault();break;case m.a.ESC:ir(!1);break;case m.a.SPACE:case m.a.ENTER:or!==null&&bt(or,Ur);break}}Object(p.useEffect)(function(){var Ur=document.getElementById(xr);Ur&&Ur.scrollIntoView&&Ur.scrollIntoView(!1)},[or]),Object(p.useEffect)(function(){rr||Rr(null)},[rr]);var Nt=Object(P.a)({},ht?"marginLeft":"marginRight",pt);fe.length||(Nt.visibility="hidden",Nt.order=1);var Pr=S()(Object(P.a)({},"".concat(vn,"-rtl"),ht)),gn=ve?null:p.createElement(ga.a,{prefixCls:vn,overlay:Ht,trigger:["hover"],visible:rr,transitionName:He,onVisibleChange:ir,overlayClassName:Pr,mouseEnterDelay:.1,mouseLeaveDelay:.1},p.createElement("button",{type:"button",className:"".concat(Ke,"-nav-more"),style:Nt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":br,id:"".concat(ke,"-more"),"aria-expanded":rr,onKeyDown:Dr},je));return p.createElement("div",{className:S()("".concat(Ke,"-nav-operations"),Qe),style:We,ref:Be},gn,p.createElement(_n,{prefixCls:Ke,locale:Oe,editable:st}))}var la=p.forwardRef(Rn),ui=Object(p.createContext)(null),Ar=.1,gr=.01,lr=20,ia=Math.pow(.995,lr);function za(){var De=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(De)||/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(De.substr(0,4)))}function Ga(De,Be){var Ke=Object(p.useState)(),ke=Object(c.a)(Ke,2),fe=ke[0],Oe=ke[1],ve=Object(p.useState)(0),Ie=Object(c.a)(ve,2),je=Ie[0],He=Ie[1],We=Object(p.useState)(0),Qe=Object(c.a)(We,2),st=Qe[0],pt=Qe[1],ht=Object(p.useState)(),bt=Object(c.a)(ht,2),Ut=bt[0],er=bt[1],rr=Object(p.useRef)();function ir(Xt){var Ht=Xt.touches[0],Sr=Ht.screenX,Dr=Ht.screenY;Oe({x:Sr,y:Dr}),window.clearInterval(rr.current)}function pr(Xt){if(!fe)return;Xt.preventDefault();var Ht=Xt.touches[0],Sr=Ht.screenX,Dr=Ht.screenY;Oe({x:Sr,y:Dr});var Nt=Sr-fe.x,Pr=Dr-fe.y;Be(Nt,Pr);var gn=Date.now();He(gn),pt(gn-je),er({x:Nt,y:Pr})}function cr(){if(!fe)return;if(Oe(null),er(null),Ut){var Xt=Ut.x/st,Ht=Ut.y/st,Sr=Math.abs(Xt),Dr=Math.abs(Ht);if(Math.max(Sr,Dr)<Ar)return;var Nt=Xt,Pr=Ht;rr.current=window.setInterval(function(){if(Math.abs(Nt)<gr&&Math.abs(Pr)<gr){window.clearInterval(rr.current);return}Nt*=ia,Pr*=ia,Be(Nt*lr,Pr*lr)},lr)}}var or=Object(p.useRef)(0),Rr=Object(p.useRef)(!1),br=Object(p.useRef)();function vn(Xt){var Ht=Xt.deltaX,Sr=Xt.deltaY,Dr=0,Nt=Math.abs(Ht),Pr=Math.abs(Sr);Nt===Pr?Dr=br.current==="x"?Ht:Sr:Nt>Pr?(Dr=Ht,br.current="x"):(Dr=Sr,br.current="y");var gn=Date.now();gn-or.current>100&&(Rr.current=!1),(Be(-Dr,-Dr)||Rr.current)&&(Xt.preventDefault(),Rr.current=!0),or.current=gn}var xr=Object(p.useRef)(null);xr.current={onTouchStart:ir,onTouchMove:pr,onTouchEnd:cr,onWheel:vn},p.useEffect(function(){function Xt(Nt){xr.current.onTouchStart(Nt)}function Ht(Nt){xr.current.onTouchMove(Nt)}function Sr(Nt){xr.current.onTouchEnd(Nt)}function Dr(Nt){xr.current.onWheel(Nt)}return document.addEventListener("touchmove",Ht,{passive:!1}),document.addEventListener("touchend",Sr,{passive:!1}),De.current.addEventListener("touchstart",Xt,{passive:!1}),De.current.addEventListener("wheel",Dr),function(){document.removeEventListener("touchmove",Ht),document.removeEventListener("touchend",Sr)}},[])}function Gt(){var De=Object(p.useRef)(new Map);function Be(ke){return De.current.has(ke)||De.current.set(ke,p.createRef()),De.current.get(ke)}function Ke(ke){De.current.delete(ke)}return[Be,Ke]}function St(De,Be){var Ke=p.useRef(De),ke=p.useState({}),fe=Object(c.a)(ke,2),Oe=fe[1];function ve(Ie){var je=typeof Ie=="function"?Ie(Ke.current):Ie;je!==Ke.current&&Be(je,Ke.current),Ke.current=je,Oe({})}return[Ke.current,ve]}var Qt=function(Be){var Ke=Be.position,ke=Be.prefixCls,fe=Be.extra;if(!fe)return null;var Oe,ve=fe;return Ke==="right"&&(Oe=ve.right||!ve.left&&ve||null),Ke==="left"&&(Oe=ve.left||null),Oe?p.createElement("div",{className:"".concat(ke,"-extra-content")},Oe):null};function qt(De,Be){var Ke,ke=p.useContext(ui),fe=ke.prefixCls,Oe=ke.tabs,ve=De.className,Ie=De.style,je=De.id,He=De.animated,We=De.activeKey,Qe=De.rtl,st=De.extra,pt=De.editable,ht=De.locale,bt=De.tabPosition,Ut=De.tabBarGutter,er=De.children,rr=De.onTabClick,ir=De.onTabScroll,pr=Object(p.useRef)(),cr=Object(p.useRef)(),or=Object(p.useRef)(),Rr=Object(p.useRef)(),br=Gt(),vn=Object(c.a)(br,2),xr=vn[0],Xt=vn[1],Ht=bt==="top"||bt==="bottom",Sr=St(0,function(zr,Cr){Ht&&ir&&ir({direction:zr>Cr?"left":"right"})}),Dr=Object(c.a)(Sr,2),Nt=Dr[0],Pr=Dr[1],gn=St(0,function(zr,Cr){!Ht&&ir&&ir({direction:zr>Cr?"top":"bottom"})}),Ur=Object(c.a)(gn,2),Qr=Ur[0],Xr=Ur[1],Ln=Object(p.useState)(0),Vn=Object(c.a)(Ln,2),En=Vn[0],ya=Vn[1],Ua=Object(p.useState)(0),Ea=Object(c.a)(Ua,2),Yn=Ea[0],sn=Ea[1],Zr=Object(p.useState)(0),wn=Object(c.a)(Zr,2),yn=wn[0],Fa=wn[1],ei=Object(p.useState)(0),ti=Object(c.a)(ei,2),Vr=ti[0],Va=ti[1],ri=Object(p.useState)(null),rn=Object(c.a)(ri,2),Gr=rn[0],$n=rn[1],Co=Object(p.useState)(null),eo=Object(c.a)(Co,2),ni=eo[0],gi=eo[1],ki=Object(p.useState)(0),to=Object(c.a)(ki,2),Ii=to[0],Vo=to[1],Yo=Object(p.useState)(0),_o=Object(c.a)(Yo,2),ro=_o[0],no=_o[1],yi=w(new Map),bi=Object(c.a)(yi,2),$o=bi[0],Ni=bi[1],Oi=u(Oe,$o,En),xi="".concat(fe,"-nav-operations-hidden"),Ei=0,Ba=0;Ht?Qe?(Ei=0,Ba=Math.max(0,En-Gr)):(Ei=Math.min(0,Gr-En),Ba=0):(Ei=Math.min(0,ni-Yn),Ba=0);function ci(zr){return zr<Ei?[Ei,!1]:zr>Ba?[Ba,!1]:[zr,!0]}var ai=Object(p.useRef)(),Ai=Object(p.useState)(),di=Object(c.a)(Ai,2),ji=di[0],ao=di[1];function Ui(){ao(Date.now())}function io(){window.clearTimeout(ai.current)}Ga(pr,function(zr,Cr){var Jn=!1;function Ta(wi,Ja){wi(function(Li){var oi=ci(Li+Ja),Qn=Object(c.a)(oi,2),Wi=Qn[0],so=Qn[1];return Jn=so,Wi})}if(Ht){if(Gr>=En)return Jn;Ta(Pr,zr)}else{if(ni>=Yn)return Jn;Ta(Xr,Cr)}return io(),Ui(),Jn}),Object(p.useEffect)(function(){return io(),ji&&(ai.current=window.setTimeout(function(){ao(0)},100)),io},[ji]);function ii(){var zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:We,Cr=Oi.get(zr);if(!Cr)return;if(Ht){var Jn=Nt;Qe?Cr.right<Nt?Jn=Cr.right:Cr.right+Cr.width>Nt+Gr&&(Jn=Cr.right+Cr.width-Gr):Cr.left<-Nt?Jn=-Cr.left:Cr.left+Cr.width>-Nt+Gr&&(Jn=-(Cr.left+Cr.width-Gr)),Xr(0),Pr(ci(Jn)[0])}else{var Ta=Qr;Cr.top<-Qr?Ta=-Cr.top:Cr.top+Cr.height>-Qr+ni&&(Ta=-(Cr.top+Cr.height-ni)),Pr(0),Xr(ci(Ta)[0])}}var fi=E(Oi,{width:Gr,height:ni,left:Nt,top:Qr},{width:yn,height:Vr},{width:Ii,height:ro},Object(D.a)(Object(D.a)({},De),{},{tabs:Oe})),Oo=Object(c.a)(fi,2),Jo=Oo[0],Qo=Oo[1],Zo=Oe.map(function(zr){var Cr=zr.key;return p.createElement(n,{id:je,prefixCls:fe,key:Cr,rtl:Qe,tab:zr,closable:zr.closable,editable:pt,active:Cr===We,tabPosition:bt,tabBarGutter:Ut,renderWrapper:er,removeAriaLabel:ht==null?void 0:ht.removeAriaLabel,ref:xr(Cr),onClick:function(Ta){rr(Cr,Ta)},onRemove:function(){Xt(Cr)},onFocus:function(){ii(Cr),Ui(),Qe||(pr.current.scrollLeft=0),pr.current.scrollTop=0}})}),oo=g(function(){var zr,Cr,Jn,Ta,wi,Ja,Li,oi,Qn,Wi=((zr=pr.current)===null||zr===void 0?void 0:zr.offsetWidth)||0,so=((Cr=pr.current)===null||Cr===void 0?void 0:Cr.offsetHeight)||0,lo=((Jn=Rr.current)===null||Jn===void 0?void 0:Jn.offsetWidth)||0,Sa=((Ta=Rr.current)===null||Ta===void 0?void 0:Ta.offsetHeight)||0,Wr=((wi=or.current)===null||wi===void 0?void 0:wi.offsetWidth)||0,Ha=((Ja=or.current)===null||Ja===void 0?void 0:Ja.offsetHeight)||0;$n(Wi),gi(so),Vo(lo),no(Sa);var Qa=(((Li=cr.current)===null||Li===void 0?void 0:Li.offsetWidth)||0)-lo,Za=(((oi=cr.current)===null||oi===void 0?void 0:oi.offsetHeight)||0)-Sa;ya(Qa),sn(Za);var uo=(Qn=or.current)===null||Qn===void 0?void 0:Qn.className.includes(xi);Fa(Qa-(uo?0:Wr)),Va(Za-(uo?0:Ha)),Ni(function(){var Hi=new Map;return Oe.forEach(function(Mo){var Po=Mo.key,pi=xr(Po).current;pi&&Hi.set(Po,{width:pi.offsetWidth,height:pi.offsetHeight,left:pi.offsetLeft,top:pi.offsetTop})}),Hi})}),qo=Oe.slice(0,Jo),wa=Oe.slice(Qo+1),In=[].concat(Object(i.a)(qo),Object(i.a)(wa)),ua=Object(p.useState)(),Nn=Object(c.a)(ua,2),Ri=Nn[0],es=Nn[1],Wa=Oi.get(We),Ao=Object(p.useRef)();function Ro(){h.a.cancel(Ao.current)}Object(p.useEffect)(function(){var zr={};return Wa&&(Ht?(Qe?zr.right=Wa.right:zr.left=Wa.left,zr.width=Wa.width):(zr.top=Wa.top,zr.height=Wa.height)),Ro(),Ao.current=h()(function(){es(zr)}),Ro},[Wa,Ht,Qe]),Object(p.useEffect)(function(){ii()},[We,Wa,Oi,Ht]),Object(p.useEffect)(function(){oo()},[Qe,Ut,We,Oe.map(function(zr){return zr.key}).join("_")]);var Do=!!In.length,hi="".concat(fe,"-nav-wrap"),Fi,Di,Lo,Bi;return Ht?Qe?(Di=Nt>0,Fi=Nt+Gr<En):(Fi=Nt<0,Di=-Nt+Gr<En):(Lo=Qr<0,Bi=-Qr+ni<Yn),p.createElement("div",{ref:Be,role:"tablist",className:S()("".concat(fe,"-nav"),ve),style:Ie,onKeyDown:function(){Ui()}},p.createElement(Qt,{position:"left",extra:st,prefixCls:fe}),p.createElement(y.a,{onResize:oo},p.createElement("div",{className:S()(hi,(Ke={},Object(P.a)(Ke,"".concat(hi,"-ping-left"),Fi),Object(P.a)(Ke,"".concat(hi,"-ping-right"),Di),Object(P.a)(Ke,"".concat(hi,"-ping-top"),Lo),Object(P.a)(Ke,"".concat(hi,"-ping-bottom"),Bi),Ke)),ref:pr},p.createElement(y.a,{onResize:oo},p.createElement("div",{ref:cr,className:"".concat(fe,"-nav-list"),style:{transform:"translate(".concat(Nt,"px, ").concat(Qr,"px)"),transition:ji?"none":void 0}},Zo,p.createElement(_n,{ref:Rr,prefixCls:fe,locale:ht,editable:pt,style:{visibility:Do?"hidden":null}}),p.createElement("div",{className:S()("".concat(fe,"-ink-bar"),Object(P.a)({},"".concat(fe,"-ink-bar-animated"),He.inkBar)),style:Ri}))))),p.createElement(la,Object.assign({},De,{ref:or,prefixCls:fe,tabs:In,className:!Do&&xi})),p.createElement(Qt,{position:"right",extra:st,prefixCls:fe}))}var Ir=p.forwardRef(qt);function ur(De){var Be=De.id,Ke=De.activeKey,ke=De.animated,fe=De.tabPosition,Oe=De.rtl,ve=De.destroyInactiveTabPane,Ie=p.useContext(ui),je=Ie.prefixCls,He=Ie.tabs,We=ke.tabPane,Qe=He.findIndex(function(st){return st.key===Ke});return p.createElement("div",{className:S()("".concat(je,"-content-holder"))},p.createElement("div",{className:S()("".concat(je,"-content"),"".concat(je,"-content-").concat(fe),Object(P.a)({},"".concat(je,"-content-animated"),We)),style:Qe&&We?Object(P.a)({},Oe?"marginRight":"marginLeft","-".concat(Qe,"00%")):null},He.map(function(st){return p.cloneElement(st.node,{key:st.key,prefixCls:je,tabKey:st.key,id:Be,animated:We,active:st.key===Ke,destroyInactiveTabPane:ve})})))}function mn(De){var Be=De.prefixCls,Ke=De.forceRender,ke=De.className,fe=De.style,Oe=De.id,ve=De.active,Ie=De.animated,je=De.destroyInactiveTabPane,He=De.tabKey,We=De.children,Qe=p.useState(Ke),st=Object(c.a)(Qe,2),pt=st[0],ht=st[1];p.useEffect(function(){ve?ht(!0):je&&ht(!1)},[ve,je]);var bt={};return ve||(Ie?(bt.visibility="hidden",bt.height=0,bt.overflowY="hidden"):bt.display="none"),p.createElement("div",{id:Oe&&"".concat(Oe,"-panel-").concat(He),role:"tabpanel",tabIndex:ve?0:-1,"aria-labelledby":Oe&&"".concat(Oe,"-tab-").concat(He),"aria-hidden":!ve,style:Object(D.a)(Object(D.a)({},bt),fe),className:S()("".concat(Be,"-tabpane"),ve&&"".concat(Be,"-tabpane-active"),ke)},(ve||pt||Ke)&&We)}var tn=0;function Oa(De){return Object(v.a)(De).map(function(Be){if(p.isValidElement(Be)){var Ke=Be.key!==void 0?String(Be.key):void 0;return Object(D.a)(Object(D.a)({key:Ke},Be.props),{},{node:Be})}return null}).filter(function(Be){return Be})}function Dn(De,Be){var Ke,ke=De.id,fe=De.prefixCls,Oe=fe===void 0?"rc-tabs":fe,ve=De.className,Ie=De.children,je=De.direction,He=De.activeKey,We=De.defaultActiveKey,Qe=De.editable,st=De.animated,pt=De.tabPosition,ht=pt===void 0?"top":pt,bt=De.tabBarGutter,Ut=De.tabBarStyle,er=De.tabBarExtraContent,rr=De.locale,ir=De.moreIcon,pr=De.moreTransitionName,cr=De.destroyInactiveTabPane,or=De.renderTabBar,Rr=De.onChange,br=De.onTabClick,vn=De.onTabScroll,xr=Object(_.a)(De,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Xt=Oa(Ie),Ht=je==="rtl",Sr;st===!1?Sr={inkBar:!1,tabPane:!1}:Sr=Object(D.a)({inkBar:!0,tabPane:!1},st!==!0?st:null);var Dr=Object(p.useState)(!1),Nt=Object(c.a)(Dr,2),Pr=Nt[0],gn=Nt[1];Object(p.useEffect)(function(){gn(za())},[]);var Ur=Object(o.a)(function(){var Vr;return(Vr=Xt[0])===null||Vr===void 0?void 0:Vr.key},{value:He,defaultValue:We}),Qr=Object(c.a)(Ur,2),Xr=Qr[0],Ln=Qr[1],Vn=Object(p.useState)(function(){return Xt.findIndex(function(Vr){return Vr.key===Xr})}),En=Object(c.a)(Vn,2),ya=En[0],Ua=En[1];Object(p.useEffect)(function(){var Vr=Xt.findIndex(function(ri){return ri.key===Xr});if(Vr===-1){var Va;Vr=Math.max(0,Math.min(ya,Xt.length-1)),Ln((Va=Xt[Vr])===null||Va===void 0?void 0:Va.key)}Ua(Vr)},[Xt.map(function(Vr){return Vr.key}).join("_"),Xr,ya]);var Ea=Object(o.a)(null,{value:ke}),Yn=Object(c.a)(Ea,2),sn=Yn[0],Zr=Yn[1],wn=ht;Pr&&!["left","right"].includes(ht)&&(wn="top"),Object(p.useEffect)(function(){ke||(Zr("rc-tabs-".concat(tn)),tn+=1)},[]);function yn(Vr,Va){br==null||br(Vr,Va),Ln(Vr),Rr==null||Rr(Vr)}var Fa={id:sn,activeKey:Xr,animated:Sr,tabPosition:wn,rtl:Ht,mobile:Pr},ei,ti=Object(D.a)(Object(D.a)({},Fa),{},{editable:Qe,locale:rr,moreIcon:ir,moreTransitionName:pr,tabBarGutter:bt,onTabClick:yn,onTabScroll:vn,extra:er,style:Ut,panes:Ie});return or?ei=or(ti,Ir):ei=p.createElement(Ir,Object.assign({},ti)),p.createElement(ui.Provider,{value:{tabs:Xt,prefixCls:Oe}},p.createElement("div",Object.assign({ref:Be,id:ke,className:S()(Oe,"".concat(Oe,"-").concat(wn),(Ke={},Object(P.a)(Ke,"".concat(Oe,"-mobile"),Pr),Object(P.a)(Ke,"".concat(Oe,"-editable"),Qe),Object(P.a)(Ke,"".concat(Oe,"-rtl"),Ht),Ke),ve)},xr),ei,p.createElement(ur,Object.assign({destroyInactiveTabPane:cr},Fa,{animated:Sr}))))}var kn=p.forwardRef(Dn);kn.TabPane=mn;var Fn=kn,Xa=$.b=Fn},kSUc:function(N,$,k){},lOMy:function(N,$,k){},lPiR:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(c){var _=P,D=_.lib,p=D.WordArray,s=D.Hasher,S=_.algo,v=[],o=[];(function(){function h(m){for(var d=c.sqrt(m),n=2;n<=d;n++)if(!(m%n))return!1;return!0}function y(m){return(m-(m|0))*4294967296|0}for(var g=2,w=0;w<64;)h(g)&&(w<8&&(v[w]=y(c.pow(g,1/2))),o[w]=y(c.pow(g,1/3)),w++),g++})();var i=[],r=S.SHA256=s.extend({_doReset:function(){this._hash=new p.init(v.slice(0))},_doProcessBlock:function(h,y){for(var g=this._hash.words,w=g[0],m=g[1],d=g[2],n=g[3],l=g[4],u=g[5],T=g[6],E=g[7],a=0;a<64;a++){if(a<16)i[a]=h[y+a]|0;else{var L=i[a-15],O=(L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3,f=i[a-2],x=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;i[a]=O+i[a-7]+x+i[a-16]}var b=l&u^~l&T,C=w&m^w&d^m&d,I=(w<<30|w>>>2)^(w<<19|w>>>13)^(w<<10|w>>>22),j=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),M=E+j+b+o[a]+i[a],z=I+C;E=T,T=u,u=l,l=n+M|0,n=d,d=m,m=w,w=M+z|0}g[0]=g[0]+w|0,g[1]=g[1]+m|0,g[2]=g[2]+d|0,g[3]=g[3]+n|0,g[4]=g[4]+l|0,g[5]=g[5]+u|0,g[6]=g[6]+T|0,g[7]=g[7]+E|0},_doFinalize:function(){var h=this._data,y=h.words,g=this._nDataBytes*8,w=h.sigBytes*8;return y[w>>>5]|=128<<24-w%32,y[(w+64>>>9<<4)+14]=c.floor(g/4294967296),y[(w+64>>>9<<4)+15]=g,h.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var h=s.clone.call(this);return h._hash=this._hash.clone(),h}});_.SHA256=s._createHelper(r),_.HmacSHA256=s._createHmacHelper(r)}(Math),P.SHA256})},lZu9:function(N,$,k){(function(P){P(k("VrN/"),k("1eCo"),k("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(c,_){var D=P.getMode(c,"text/html"),p=D.name=="null";function s(F){if(P.findModeByName){var H=P.findModeByName(F);H&&(F=H.mime||H.mimes[0])}var W=P.getMode(c,F);return W.name=="null"?null:W}_.highlightFormatting===void 0&&(_.highlightFormatting=!1),_.maxBlockquoteDepth===void 0&&(_.maxBlockquoteDepth=0),_.taskLists===void 0&&(_.taskLists=!1),_.strikethrough===void 0&&(_.strikethrough=!1),_.emoji===void 0&&(_.emoji=!1),_.fencedCodeBlockHighlighting===void 0&&(_.fencedCodeBlockHighlighting=!0),_.fencedCodeBlockDefaultMode===void 0&&(_.fencedCodeBlockDefaultMode="text/plain"),_.xml===void 0&&(_.xml=!0),_.tokenTypeOverrides===void 0&&(_.tokenTypeOverrides={});var S={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 v in S)S.hasOwnProperty(v)&&_.tokenTypeOverrides[v]&&(S[v]=_.tokenTypeOverrides[v]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,i=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,h=_.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,y=/^ {0,3}(?:\={1,}|-{2,})\s*$/,g=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 l(F,H,W){return H.f=H.inline=W,W(F,H)}function u(F,H,W){return H.f=H.block=W,W(F,H)}function T(F){return!F||!/\S/.test(F.string)}function E(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==L){var H=p;if(!H){var W=P.innerMode(D,F.htmlState);H=W.mode.name=="xml"&&W.state.tagStart===null&&!W.state.context&&W.state.tokenize.isInText}H&&(F.f=b,F.block=a,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function a(F,H){var W=F.column()===H.indentation,Q=T(H.prevLine.stream),ee=H.indentedCode,q=H.prevLine.hr,pe=H.list!==!1,ye=(H.listStack[H.listStack.length-1]||0)+3;H.indentedCode=!1;var ie=H.indentation;if(H.indentationDiff===null&&(H.indentationDiff=H.indentation,pe)){for(H.list=null;ie<H.listStack[H.listStack.length-1];)H.listStack.pop(),H.listStack.length?H.indentation=H.listStack[H.listStack.length-1]:H.list=!1;H.list!==!1&&(H.indentationDiff=ie-H.listStack[H.listStack.length-1])}var Se=!Q&&!q&&!H.prevLine.header&&(!pe||!ee)&&!H.prevLine.fencedCodeEnd,ge=(H.list===!1||q||Q)&&H.indentation<=ye&&F.match(o),oe=null;if(H.indentationDiff>=4&&(ee||H.prevLine.fencedCodeEnd||H.prevLine.header||Q))return F.skipToEnd(),H.indentedCode=!0,S.code;if(F.eatSpace())return null;if(W&&H.indentation<=ye&&(oe=F.match(h))&&oe[1].length<=6)return H.quote=0,H.header=oe[1].length,H.thisLine.header=!0,_.highlightFormatting&&(H.formatting="header"),H.f=H.inline,f(H);if(H.indentation<=ye&&F.eat(">"))return H.quote=W?1:H.quote+1,_.highlightFormatting&&(H.formatting="quote"),F.eatSpace(),f(H);if(!ge&&!H.setext&&W&&H.indentation<=ye&&(oe=F.match(i))){var le=oe[1]?"ol":"ul";return H.indentation=ie+F.current().length,H.list=!0,H.quote=0,H.listStack.push(H.indentation),H.em=!1,H.strong=!1,H.code=!1,H.strikethrough=!1,_.taskLists&&F.match(r,!1)&&(H.taskList=!0),H.f=H.inline,_.highlightFormatting&&(H.formatting=["list","list-"+le]),f(H)}else{if(W&&H.indentation<=ye&&(oe=F.match(w,!0)))return H.quote=0,H.fencedEndRE=new RegExp(oe[1]+"+ *$"),H.localMode=_.fencedCodeBlockHighlighting&&s(oe[2]||_.fencedCodeBlockDefaultMode),H.localMode&&(H.localState=P.startState(H.localMode)),H.f=H.block=O,_.highlightFormatting&&(H.formatting="code-block"),H.code=-1,f(H);if(H.setext||(!Se||!pe)&&!H.quote&&H.list===!1&&!H.code&&!ge&&!m.test(F.string)&&(oe=F.lookAhead(1))&&(oe=oe.match(y)))return H.setext?(H.header=H.setext,H.setext=0,F.skipToEnd(),_.highlightFormatting&&(H.formatting="header")):(H.header=oe[0].charAt(0)=="="?1:2,H.setext=H.header),H.thisLine.header=!0,H.f=H.inline,f(H);if(ge)return F.skipToEnd(),H.hr=!0,H.thisLine.hr=!0,S.hr;if(F.peek()==="[")return l(F,H,z)}return l(F,H,H.inline)}function L(F,H){var W=D.token(F,H.htmlState);if(!p){var Q=P.innerMode(D,H.htmlState);(Q.mode.name=="xml"&&Q.state.tagStart===null&&!Q.state.context&&Q.state.tokenize.isInText||H.md_inside&&F.current().indexOf(">")>-1)&&(H.f=b,H.block=a,H.htmlState=null)}return W}function O(F,H){var W=H.listStack[H.listStack.length-1]||0,Q=H.indentation<W,ee=W+3;if(H.fencedEndRE&&H.indentation<=ee&&(Q||F.match(H.fencedEndRE))){_.highlightFormatting&&(H.formatting="code-block");var q;return Q||(q=f(H)),H.localMode=H.localState=null,H.block=a,H.f=b,H.fencedEndRE=null,H.code=0,H.thisLine.fencedCodeEnd=!0,Q?u(F,H,H.block):q}else return H.localMode?H.localMode.token(F,H.localState):(F.skipToEnd(),S.code)}function f(F){var H=[];if(F.formatting){H.push(S.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var W=0;W<F.formatting.length;W++)H.push(S.formatting+"-"+F.formatting[W]),F.formatting[W]==="header"&&H.push(S.formatting+"-"+F.formatting[W]+"-"+F.header),F.formatting[W]==="quote"&&(!_.maxBlockquoteDepth||_.maxBlockquoteDepth>=F.quote?H.push(S.formatting+"-"+F.formatting[W]+"-"+F.quote):H.push("error"))}if(F.taskOpen)return H.push("meta"),H.length?H.join(" "):null;if(F.taskClosed)return H.push("property"),H.length?H.join(" "):null;if(F.linkHref?H.push(S.linkHref,"url"):(F.strong&&H.push(S.strong),F.em&&H.push(S.em),F.strikethrough&&H.push(S.strikethrough),F.emoji&&H.push(S.emoji),F.linkText&&H.push(S.linkText),F.code&&H.push(S.code),F.image&&H.push(S.image),F.imageAltText&&H.push(S.imageAltText,"link"),F.imageMarker&&H.push(S.imageMarker)),F.header&&H.push(S.header,S.header+"-"+F.header),F.quote&&(H.push(S.quote),!_.maxBlockquoteDepth||_.maxBlockquoteDepth>=F.quote?H.push(S.quote+"-"+F.quote):H.push(S.quote+"-"+_.maxBlockquoteDepth)),F.list!==!1){var Q=(F.listStack.length-1)%3;Q?Q===1?H.push(S.list2):H.push(S.list3):H.push(S.list1)}return F.trailingSpaceNewLine?H.push("trailing-space-new-line"):F.trailingSpace&&H.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),H.length?H.join(" "):null}function x(F,H){return F.match(g,!0)?f(H):void 0}function b(F,H){var W=H.text(F,H);if(typeof W!="undefined")return W;if(H.list)return H.list=null,f(H);if(H.taskList){var Q=F.match(r,!0)[1]===" ";return Q?H.taskOpen=!0:H.taskClosed=!0,_.highlightFormatting&&(H.formatting="task"),H.taskList=!1,f(H)}if(H.taskOpen=!1,H.taskClosed=!1,H.header&&F.match(/^#+$/,!0))return _.highlightFormatting&&(H.formatting="header"),f(H);var ee=F.next();if(H.linkTitle){H.linkTitle=!1;var q=ee;ee==="("&&(q=")"),q=(q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pe="^\\s*(?:[^"+q+"\\\\]+|\\\\\\\\|\\\\.)"+q;if(F.match(new RegExp(pe),!0))return S.linkHref}if(ee==="`"){var ye=H.formatting;_.highlightFormatting&&(H.formatting="code"),F.eatWhile("`");var ie=F.current().length;if(H.code==0&&(!H.quote||ie==1))return H.code=ie,f(H);if(ie==H.code){var Se=f(H);return H.code=0,Se}else return H.formatting=ye,f(H)}else if(H.code)return f(H);if(ee==="\\"&&(F.next(),_.highlightFormatting)){var ge=f(H),oe=S.formatting+"-escape";return ge?ge+" "+oe:oe}if(ee==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return H.imageMarker=!0,H.image=!0,_.highlightFormatting&&(H.formatting="image"),f(H);if(ee==="["&&H.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return H.imageMarker=!1,H.imageAltText=!0,_.highlightFormatting&&(H.formatting="image"),f(H);if(ee==="]"&&H.imageAltText){_.highlightFormatting&&(H.formatting="image");var ge=f(H);return H.imageAltText=!1,H.image=!1,H.inline=H.f=I,ge}if(ee==="["&&!H.image)return H.linkText&&F.match(/^.*?\]/)||(H.linkText=!0,_.highlightFormatting&&(H.formatting="link")),f(H);if(ee==="]"&&H.linkText){_.highlightFormatting&&(H.formatting="link");var ge=f(H);return H.linkText=!1,H.inline=H.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?I:b,ge}if(ee==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){H.f=H.inline=C,_.highlightFormatting&&(H.formatting="link");var ge=f(H);return ge?ge+=" ":ge="",ge+S.linkInline}if(ee==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){H.f=H.inline=C,_.highlightFormatting&&(H.formatting="link");var ge=f(H);return ge?ge+=" ":ge="",ge+S.linkEmail}if(_.xml&&ee==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var le=F.string.indexOf(">",F.pos);if(le!=-1){var te=F.string.substring(F.start,le);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(H.md_inside=!0)}return F.backUp(1),H.htmlState=P.startState(D),u(F,H,L)}if(_.xml&&ee==="<"&&F.match(/^\/\w*?>/))return H.md_inside=!1,"tag";if(ee==="*"||ee==="_"){for(var be=1,Z=F.pos==1?" ":F.string.charAt(F.pos-2);be<3&&F.eat(ee);)be++;var ae=F.peek()||" ",Ee=!/\s/.test(ae)&&(!d.test(ae)||/\s/.test(Z)||d.test(Z)),ne=!/\s/.test(Z)&&(!d.test(Z)||/\s/.test(ae)||d.test(ae)),J=null,X=null;if(be%2&&(!H.em&&Ee&&(ee==="*"||!ne||d.test(Z))?J=!0:H.em==ee&&ne&&(ee==="*"||!Ee||d.test(ae))&&(J=!1)),be>1&&(!H.strong&&Ee&&(ee==="*"||!ne||d.test(Z))?X=!0:H.strong==ee&&ne&&(ee==="*"||!Ee||d.test(ae))&&(X=!1)),X!=null||J!=null){_.highlightFormatting&&(H.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(H.em=ee),X===!0&&(H.strong=ee);var Se=f(H);return J===!1&&(H.em=!1),X===!1&&(H.strong=!1),Se}}else if(ee===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return f(H);F.backUp(1)}if(_.strikethrough){if(ee==="~"&&F.eatWhile(ee)){if(H.strikethrough){_.highlightFormatting&&(H.formatting="strikethrough");var Se=f(H);return H.strikethrough=!1,Se}else if(F.match(/^[^\s]/,!1))return H.strikethrough=!0,_.highlightFormatting&&(H.formatting="strikethrough"),f(H)}else if(ee===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return f(H);F.backUp(2)}}if(_.emoji&&ee===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){H.emoji=!0,_.highlightFormatting&&(H.formatting="emoji");var Y=f(H);return H.emoji=!1,Y}return ee===" "&&(F.match(/^ +$/,!1)?H.trailingSpace++:H.trailingSpace&&(H.trailingSpaceNewLine=!0)),f(H)}function C(F,H){var W=F.next();if(W===">"){H.f=H.inline=b,_.highlightFormatting&&(H.formatting="link");var Q=f(H);return Q?Q+=" ":Q="",Q+S.linkInline}return F.match(/^[^>]+/,!0),S.linkInline}function I(F,H){if(F.eatSpace())return null;var W=F.next();return W==="("||W==="["?(H.f=H.inline=M(W==="("?")":"]"),_.highlightFormatting&&(H.formatting="link-string"),H.linkHref=!0,f(H)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(F){return function(H,W){var Q=H.next();if(Q===F){W.f=W.inline=b,_.highlightFormatting&&(W.formatting="link-string");var ee=f(W);return W.linkHref=!1,ee}return H.match(j[F]),W.linkHref=!0,f(W)}}function z(F,H){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(H.f=G,F.next(),_.highlightFormatting&&(H.formatting="link"),H.linkText=!0,f(H)):l(F,H,b)}function G(F,H){if(F.match(/^\]:/,!0)){H.f=H.inline=B,_.highlightFormatting&&(H.formatting="link");var W=f(H);return H.linkText=!1,W}return F.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function B(F,H){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?H.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),H.f=H.inline=b,S.linkHref+" url")}var K={startState:function(){return{f:a,prevLine:{stream:null},thisLine:{stream:null},block:a,htmlState:null,indentation:0,inline:b,text:x,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(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&P.copyState(D,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?P.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,H){if(H.formatting=!1,F!=H.thisLine.stream){if(H.header=0,H.hr=!1,F.match(/^\s*$/,!0))return E(H),null;if(H.prevLine=H.thisLine,H.thisLine={stream:F},H.taskList=!1,H.trailingSpace=0,H.trailingSpaceNewLine=!1,!H.localState&&(H.f=H.block,H.f!=L)){var W=F.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(H.indentation=W,H.indentationDiff=null,W>0)return null}}return H.f(F,H)},innerMode:function(F){return F.block==L?{state:F.htmlState,mode:D}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:K}},indent:function(F,H,W){return F.block==L&&D.indent?D.indent(F.htmlState,H,W):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,H,W):P.Pass},blankLine:E,getType:f,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(N){if(!0)module.exports=N();else var $})(function(){var define,module,exports;return function(){function N($,k,P){function c(p,s){if(!k[p]){if(!$[p]){var S=typeof require=="function"&&require;if(!s&&S)return require(p,!0);if(_)return _(p,!0);var v=new Error("Cannot find module '"+p+"'");throw v.code="MODULE_NOT_FOUND",v}var o=k[p]={exports:{}};$[p][0].call(o.exports,function(i){var r=$[p][1][i];return c(r||i)},o,o.exports,N,$,k,P)}return k[p].exports}for(var _=typeof require=="function"&&require,D=0;D<P.length;D++)c(P[D]);return c}return N}()({1:[function(N,$,k){"use strict";var P=N("./browser/client");P.Buffer=N("buffer").Buffer,P.urllib=N("../shims/xhr"),P.version=N("./browser/version").version,$.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(N,$,k){(function(P,c){"use strict";var _=N("babel-runtime/core-js/promise"),D=o(_),p=N("babel-runtime/regenerator"),s=o(p),S=N("babel-runtime/core-js/object/assign"),v=o(S);function o(z){return z&&z.__esModule?z:{default:z}}var i=N("debug")("ali-oss"),r=N("copy-to"),h=N("xml2js"),y=N("agentkeepalive"),g=N("merge-descriptors"),w=N("url"),m=N("is-type-of"),d=N("platform"),n=N("utility"),l=N("urllib"),u=N("./version"),T=N("bowser"),E=N("../common/signUtils"),a=N("../common/utils/isIP"),L=a.isIP,O=N("../common/client/initOptions"),f=N("../common/utils/createRequest"),x=f.createRequest,b=new y;function C(){var z=d.name,G=d.version;z&&z.toLowerCase&&z.toLowerCase()==="ie"&&G.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function I(){return location&&location.protocol==="https:"}function j(z,G){if(C(),!(this instanceof j))return new j(z,G);z&&z.inited?this.options=z:this.options=j.initOptions(z),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=l,this.agent=this.options.agent||b),this.ctx=G,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}$.exports=j,j.initOptions=function(G){G.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var B=(0,v.default)({secure:I(),useFetch:!1},G);return O(B)};var M=j.prototype;M.debug=i,g(M,N("./object")),g(M,N("../common/bucket/getBucketWebsite")),g(M,N("../common/bucket/putBucketWebsite")),g(M,N("../common/bucket/deleteBucketWebsite")),g(M,N("../common/bucket/getBucketLifecycle")),g(M,N("../common/bucket/putBucketLifecycle")),g(M,N("../common/bucket/deleteBucketLifecycle")),g(M,N("../common/bucket/putBucketVersioning")),g(M,N("../common/bucket/getBucketVersioning")),g(M,N("./managed-upload")),g(M,N("../common/multipart")),g(M,N("../common/parallel")),M.signature=function(G){return this.debug("authorization stringToSign: %s",G,"info"),E.computeSignature(this.options.accessKeySecret,G)},M.authorization=function(G,B,K,F){var H=E.buildCanonicalString(G.toUpperCase(),B,{headers:F,parameters:K});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,H)},M.request=function(G){var B,K,F,H,W,Q;return s.default.async(function(q){for(;;)switch(q.prev=q.next){case 0:return B=x.call(this,G),this.options.useFetch||(B.params.mode="disable-fetch"),K=void 0,F=void 0,H=!!G.stream,q.prev=5,q.next=8,s.default.awrap(this.urllib.request(B.url,B.params));case 8:K=q.sent,this.debug("response %s %s, got %s, headers: %j",G.method,B.url,K.status,K.headers,"info"),q.next=15;break;case 12:q.prev=12,q.t0=q.catch(5),F=q.t0;case 15:if(W=void 0,!(K&&G.successStatuses&&G.successStatuses.indexOf(K.status)===-1)){q.next=28;break}return q.next=19,s.default.awrap(this.requestError(K));case 19:if(W=q.sent,!(W.code==="RequestTimeTooSkewed"&&!H)){q.next=25;break}return this.options.amendTimeSkewed=+new Date(W.serverTime)-new Date,q.next=24,s.default.awrap(this.request(G));case 24:return q.abrupt("return",q.sent);case 25:W.params=G,q.next=32;break;case 28:if(!F){q.next=32;break}return q.next=31,s.default.awrap(this.requestError(F));case 31:W=q.sent;case 32:if(!W){q.next=34;break}throw W;case 34:if(!G.xmlResponse){q.next=39;break}return q.next=37,s.default.awrap(this.parseXML(K.data));case 37:Q=q.sent,K.data=Q;case 39:return q.abrupt("return",K);case 40:case"end":return q.stop()}},null,this,[[5,12]])},M._getResource=function(G){var B="/";return G.bucket&&(B+=G.bucket+"/"),G.object&&(B+=G.object),B},M._isIP=L,M._escape=function(G){return n.encodeURIComponent(G).replace(/%2F/g,"/")},M._getReqUrl=function(G){var B={};r(this.options.endpoint).to(B);var K=this._isIP(B.hostname),F=this.options.cname;G.bucket&&!F&&!K&&(B.host=G.bucket+"."+B.host);var H="/";G.bucket&&K&&(H+=G.bucket+"/"),G.object&&(H+=this._escape(G.object).replace(/\+/g,"%2B")),B.pathname=H;var W={};if(G.query&&g(W,G.query),G.subres){var Q={};m.string(G.subres)?Q[G.subres]="":m.array(G.subres)?G.subres.forEach(function(ee){Q[ee]=""}):Q=G.subres,g(W,Q)}return B.query=W,w.format(B)},M._getUserAgent=function(){var G=c&&c.browser?"js":"nodejs",B="aliyun-sdk-"+G+"/"+u.version,K=d.description;return!K&&c&&(K="Node.js "+c.version.slice(1)+" on "+c.platform+" "+c.arch),this._checkUserAgent(B+" "+K)},M._checkUserAgent=function(G){var B=G.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return B},M.checkBrowserAndVersion=function(G,B){return T.name===G&&T.version.split(".")[0]===B},M.parseXML=function(G){return new D.default(function(B,K){P.isBuffer(G)&&(G=G.toString()),h.parseString(G,{explicitRoot:!1,explicitArray:!1},function(F,H){F?K(F):B(H)})})},M.requestError=function(G){var B,K,F,H;return s.default.async(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(B=null,!(!G.data||!G.data.length)){Q.next=5;break}G.status===-1||G.status===-2?(B=new Error(G.message),B.name=G.name,B.status=G.status,B.code=G.name):(G.status===404?(B=new Error("Object not exists"),B.name="NoSuchKeyError",B.status=404,B.code="NoSuchKey"):G.status===412?(B=new Error("Pre condition failed"),B.name="PreconditionFailedError",B.status=412,B.code="PreconditionFailed"):(B=new Error("Unknow error, status: "+G.status),B.name="UnknowError",B.status=G.status),B.requestId=G.headers["x-oss-request-id"],B.host=""),Q.next=33;break;case 5:return K=String(G.data),this.debug("request response error data: %s",K,"error"),F=void 0,Q.prev=8,Q.next=11,s.default.awrap(this.parseXML(K));case 11:if(Q.t0=Q.sent,Q.t0){Q.next=14;break}Q.t0={};case 14:F=Q.t0,Q.next=24;break;case 17:return Q.prev=17,Q.t1=Q.catch(8),this.debug(K,"error"),Q.t1.message+=`
|
|
|
raw xml: `+K,Q.t1.status=G.status,Q.t1.requestId=G.headers["x-oss-request-id"],Q.abrupt("return",Q.t1);case 24:H=F.Message||"unknow request error, status: "+G.status,F.Condition&&(H+=" (condition: "+F.Condition+")"),B=new Error(H),B.name=F.Code?F.Code+"Error":"UnknowError",B.status=G.status,B.code=F.Code,B.requestId=F.RequestId,B.hostId=F.HostId,B.serverTime=F.ServerTime;case 33:return this.debug("generate error %j",B,"error"),Q.abrupt("return",B);case 35:case"end":return Q.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:N("../../node_modules/is-buffer/index.js")},N("_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(N,$,k){(function(P){"use strict";var c=N("babel-runtime/core-js/array/from"),_=v(c),D=N("babel-runtime/core-js/promise"),p=v(D),s=N("babel-runtime/regenerator"),S=v(s);function v(E){return E&&E.__esModule?E:{default:E}}var o=N("is-type-of"),i=N("util"),r=N("path"),h=N("mime"),y=N("copy-to"),g=N("../common/utils/isBlob"),w=g.isBlob,m=N("../common/utils/isFile"),d=m.isFile,n=k;n.multipartUpload=function(a,L,O){var f,x,b,C,I,j,M,z,G;return S.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),O=O||{},!(O.checkpoint&&O.checkpoint.uploadId)){K.next=6;break}return K.next=5,S.default.awrap(this._resumeMultipart(O.checkpoint,O));case 5:return K.abrupt("return",K.sent);case 6:return f=100*1024,O.mime||(d(L)?O.mime=h.getType(r.extname(L.name)):w(L)?O.mime=L.type:O.mime=h.getType(r.extname(L))),O.headers=O.headers||{},this._convertMetaToHeaders(O.meta,O.headers),K.next=12,S.default.awrap(this._getFileSize(L));case 12:if(x=K.sent,!(x<f)){K.next=25;break}return b=this._createStream(L,0,x),O.contentLength=x,K.next=18,S.default.awrap(this.putStream(a,b,O));case 18:if(C=K.sent,!(O&&O.progress)){K.next=22;break}return K.next=22,S.default.awrap(O.progress(1));case 22:return I={res:C.res,bucket:this.options.bucket,name:a,etag:C.res.headers.etag},(O.headers&&O.headers["x-oss-callback"]||O.callback)&&(I.data=C.data),K.abrupt("return",I);case 25:if(!(O.partSize&&!(parseInt(O.partSize,10)===O.partSize))){K.next=27;break}throw new Error("partSize must be int number");case 27:if(!(O.partSize&&O.partSize<f)){K.next=29;break}throw new Error("partSize must not be smaller than "+f);case 29:return K.next=31,S.default.awrap(this.initMultipartUpload(a,O));case 31:if(j=K.sent,M=j.uploadId,z=this._getPartSize(x,O.partSize),G={file:L,name:a,fileSize:x,partSize:z,uploadId:M,doneParts:[]},!(O&&O.progress)){K.next=38;break}return K.next=38,S.default.awrap(O.progress(0,G,j.res));case 38:return K.next=40,S.default.awrap(this._resumeMultipart(G,O));case 40:return K.abrupt("return",K.sent);case 41:case"end":return K.stop()}},null,this)},n._resumeMultipart=function(a,L){var O,f,x,b,C,I,j,M,z,G,B,K,F,H,W,Q,ee,q;return S.default.async(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(O=this,!this.isCancel()){ye.next=3;break}throw this._makeCancelEvent();case 3:return f=a.file,x=a.fileSize,b=a.partSize,C=a.uploadId,I=a.doneParts,j=a.name,M=[],I.length>0&&y(I).to(M),z=this._divideParts(x,b),G=z.length,B=!1,K=function(Se,ge){var oe=this;return new p.default(function(te,be){var Z,ae,Ee,ne;return S.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Se.isCancel()){X.next=18;break}return Z=z[ge-1],ae={stream:Se._createStream(f,Z.start,Z.end),size:Z.end-Z.start},X.next=6,S.default.awrap(Se._uploadPart(j,C,ge,ae));case 6:if(Ee=X.sent,!(!Se.isCancel()&&!B)){X.next=15;break}if(a.doneParts.push({number:ge,etag:Ee.res.headers.etag}),!L.progress){X.next=12;break}return X.next=12,S.default.awrap(L.progress(I.length/G,a,Ee.res));case 12:te({number:ge,etag:Ee.res.headers.etag}),X.next=16;break;case 15:te();case 16:X.next=19;break;case 18:te();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ne=new Error,ne.name=X.t0.name,ne.message=X.t0.message,ne.stack=X.t0.stack,ne.partNum=ge,y(X.t0).to(ne),be(ne);case 30:case"end":return X.stop()}},null,oe,[[0,21]])})},F=(0,_.default)(new Array(G),function(ie,Se){return Se+1}),H=M.map(function(ie){return ie.number}),W=F.filter(function(ie){return H.indexOf(ie)<0}),Q=5,ee=L.parallel||Q,ye.next=17,S.default.awrap(this._parallel(W,ee,function(ie){return new p.default(function(Se,ge){K(O,ie).then(function(oe){oe&&M.push(oe),Se()}).catch(function(oe){ge(oe)})})}));case 17:if(q=ye.sent,B=!0,!this.isCancel()){ye.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(q&&q.length>0)){ye.next=25;break}throw q[0].message="Failed to upload some parts with error: "+q[0].toString()+" part_num: "+q[0].partNum,q[0];case 25:return ye.next=27,S.default.awrap(this.completeMultipartUpload(j,C,M,L));case 27:return ye.abrupt("return",ye.sent);case 28:case"end":return ye.stop()}},null,this)},n._getFileSize=function(a){return S.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!o.buffer(a)){O.next=4;break}return O.abrupt("return",a.length);case 4:if(!(w(a)||d(a))){O.next=6;break}return O.abrupt("return",a.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return O.stop()}},null,this)};var l=N("stream"),u=l.Readable;function T(E,a){if(!(this instanceof T))return new T(E,a);u.call(this,a),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}i.inherits(T,u),T.prototype.readFileAndPush=function(a){if(this.fileBuffer)for(var L=!0;L&&this.fileBuffer&&this.start<this.fileBuffer.length;){var O=this.start,f=O+a;f=f>this.fileBuffer.length?this.fileBuffer.length:f,this.start=f,L=this.push(this.fileBuffer.slice(O,f))}},T.prototype._read=function(a){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 L=16*1024;a=a||L;var O=this;this.reader.onload=function(x){O.fileBuffer=P.from(new Uint8Array(x.target.result)),O.file=null,O.readFileAndPush(a)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(a)},n._createStream=function(a,L,O){if(w(a)||d(a))return new T(a.slice(L,O));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(a,L){var O=10*1e3,f=1024*1024;return L?Math.max(Math.ceil(a/O),L):f},n._divideParts=function(a,L){for(var O=Math.ceil(a/L),f=[],x=0;x<O;x++){var b=L*x,C=Math.min(b+L,a);f.push({start:b,end:C})}return f}}).call(this,N("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(N,$,k){"use strict";var P=N("babel-runtime/core-js/promise"),c=o(P),_=N("babel-runtime/core-js/object/keys"),D=o(_),p=N("babel-runtime/core-js/object/assign"),s=o(p),S=N("babel-runtime/regenerator"),v=o(S);function o(O){return O&&O.__esModule?O:{default:O}}var i=N("utility"),r=N("fs"),h=N("is-type-of"),y=N("url"),g=N("copy-to"),w=N("path"),m=N("mime"),d=N("../common/callback"),n=N("../common/signUtils"),l=N("merge-descriptors"),u=N("../common/utils/isBlob"),T=u.isBlob,E=N("../common/utils/isFile"),a=E.isFile,L=k;L.append=function(f,x,b){var C;return v.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return b=b||{},b.position===void 0&&(b.position="0"),b.subres={append:"",position:b.position},b.method="POST",j.next=6,v.default.awrap(this.put(f,x,b));case 6:return C=j.sent,C.nextAppendPosition=C.res.headers["x-oss-next-append-position"],j.abrupt("return",C);case 9:case"end":return j.stop()}},null,this)},L.put=function(f,x,b){var C,I,j,M,z,G,B;return v.default.async(function(F){for(;;)switch(F.prev=F.next){case 0:if(C=void 0,b=b||{},f=this._objectName(f),!h.buffer(x)){F.next=7;break}C=x,F.next=33;break;case 7:if(!(T(x)||a(x))){F.next=32;break}return b.mime||(a(x)?b.mime=m.getType(w.extname(x.name)):b.mime=x.type),I=this._createStream(x,0,x.size),F.next=12,v.default.awrap(this._getFileSize(x));case 12:return b.contentLength=F.sent,F.prev=13,F.next=16,v.default.awrap(this.putStream(f,I,b));case 16:return j=F.sent,F.abrupt("return",j);case 20:if(F.prev=20,F.t0=F.catch(13),!(F.t0.code==="RequestTimeTooSkewed")){F.next=29;break}return this.options.amendTimeSkewed=+new Date(F.t0.serverTime)-new Date,F.next=26,v.default.awrap(this.put(f,x,b));case 26:return F.abrupt("return",F.sent);case 29:throw F.t0;case 30:F.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return b.headers=b.headers||{},this._convertMetaToHeaders(b.meta,b.headers),M=b.method||"PUT",z=this._objectRequestParams(M,f,b),d.encodeCallback(z,b),z.mime=b.mime,z.content=C,z.successStatuses=[200],F.next=43,v.default.awrap(this.request(z));case 43:return G=F.sent,B={name:f,url:this._objectUrl(f),res:G.res},z.headers&&z.headers["x-oss-callback"]&&(B.data=JSON.parse(G.data.toString())),F.abrupt("return",B);case 47:case"end":return F.stop()}},null,this,[[13,20]])},L.putStream=function(f,x,b){var C,I,j,M;return v.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:return b=b||{},b.headers=b.headers||{},f=this._objectName(f),b.contentLength?b.headers["Content-Length"]=b.contentLength:b.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(b.meta,b.headers),C=b.method||"PUT",I=this._objectRequestParams(C,f,b),d.encodeCallback(I,b),I.mime=b.mime,I.stream=x,I.successStatuses=[200],G.next=13,v.default.awrap(this.request(I));case 13:return j=G.sent,M={name:f,url:this._objectUrl(f),res:j.res},I.headers&&I.headers["x-oss-callback"]&&(M.data=JSON.parse(j.data.toString())),G.abrupt("return",M);case 17:case"end":return G.stop()}},null,this)},l(L,N("../common/object/copyObject")),l(L,N("../common/object/getObjectTagging")),l(L,N("../common/object/putObjectTagging")),l(L,N("../common/object/deleteObjectTagging")),l(L,N("../common/image")),l(L,N("../common/object/getBucketVersions")),l(L,N("../common/object/getACL")),l(L,N("../common/object/putACL")),l(L,N("../common/object/head")),l(L,N("../common/object/delete")),l(L,N("../common/object/get")),l(L,N("../common/object/putSymlink")),l(L,N("../common/object/getSymlink")),l(L,N("../common/object/deleteMulti")),l(L,N("../common/object/getObjectMeta")),L.putMeta=function(f,x,b){var C;return v.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,v.default.awrap(this.copy(f,f,{meta:x||{},timeout:b&&b.timeout,ctx:b&&b.ctx}));case 2:return C=j.sent,j.abrupt("return",C);case 4:case"end":return j.stop()}},null,this)},L.list=function(f,x){var b,C,I,j,M;return v.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:return b=this._objectRequestParams("GET","",x),b.query=f,b.xmlResponse=!0,b.successStatuses=[200],G.next=6,v.default.awrap(this.request(b));case 6:return C=G.sent,I=C.data.Contents,j=this,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(B){return{name:B.Key,url:j._objectUrl(B.Key),lastModified:B.LastModified,etag:B.ETag,type:B.Type,size:Number(B.Size),storageClass:B.StorageClass,owner:{id:B.Owner.ID,displayName:B.Owner.DisplayName}}})),M=C.data.CommonPrefixes||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(B){return B.Prefix})),G.abrupt("return",{res:C.res,objects:I,prefixes:M,nextMarker:C.data.NextMarker||null,isTruncated:C.data.IsTruncated==="true"});case 13:case"end":return G.stop()}},null,this)},L.restore=function(f,x){var b,C;return v.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return x=x||{},x.subres=(0,s.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),b=this._objectRequestParams("POST",f,x),b.successStatuses=[202],j.next=7,v.default.awrap(this.request(b));case 7:return C=j.sent,j.abrupt("return",{res:C.res});case 9:case"end":return j.stop()}},null,this)},L.signatureUrl=function(f,x){x=x||{},f=this._objectName(f),x.method=x.method||"GET";var b=i.timestamp()+(x.expires||1800),C={bucket:this.options.bucket,object:f},I=this._getResource(C);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var j=n._signatureForURL(this.options.accessKeySecret,x,I,b),M=y.parse(this._getReqUrl(C));return M.query={OSSAccessKeyId:this.options.accessKeyId,Expires:b,Signature:j.Signature},g(j.subResource).to(M.query),M.format()},L.getObjectUrl=function(f,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(f))},L._objectUrl=function(f){return this._getReqUrl({bucket:this.options.bucket,object:f})},L.generateObjectUrl=function(O,f){if(f)f[f.length-1]!=="/"&&(f+="/");else{f=this.options.endpoint.format();var x=y.parse(f),b=this.options.bucket;x.hostname=b+"."+x.hostname,x.host=b+"."+x.host,f=x.format()}return f+this._escape(this._objectName(O))},L._objectRequestParams=function(f,x,b){if(!this.options.bucket)throw new Error("Please create a bucket first");b=b||{},x=this._objectName(x);var C={object:x,bucket:this.options.bucket,method:f,subres:b&&b.subres,timeout:b&&b.timeout,ctx:b&&b.ctx};return b.headers&&(C.headers={},g(b.headers).to(C.headers)),C},L._objectName=function(f){return f.replace(/^\/+/,"")},L._convertMetaToHeaders=function(f,x){if(!f)return;(0,D.default)(f).forEach(function(b){x["x-oss-meta-"+b]=f[b]})},L._deleteFileSafe=function(f){var x=this;return new c.default(function(b){r.exists(f,function(C){C?r.unlink(f,function(I){I&&x.debug("unlink %j error: %s",f,I,"error"),b()}):b()})})}},{"../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(N,$,k){"use strict";k.version="6.10.0"},{}],6:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(S){return S&&S.__esModule?S:{default:S}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=k;s.deleteBucketLifecycle=function(v,o){var i,r;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return p(v),i=this._bucketRequestParams("DELETE",v,"lifecycle",o),i.successStatuses=[204],y.next=5,c.default.awrap(this.request(i));case 5:return r=y.sent,y.abrupt("return",{res:r.res});case 7:case"end":return y.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(S){return S&&S.__esModule?S:{default:S}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=k;s.deleteBucketWebsite=function(v,o){var i,r;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return p(v),i=this._bucketRequestParams("DELETE",v,"website",o),i.successStatuses=[204],y.next=5,c.default.awrap(this.request(i));case 5:return r=y.sent,y.abrupt("return",{res:r.res});case 7:case"end":return y.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(r){return r&&r.__esModule?r:{default:r}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=N("../utils/isArray"),S=s.isArray,v=N("../utils/formatObjKey"),o=v.formatObjKey,i=k;i.getBucketLifecycle=function(h,y){var g,w,m;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p(h),g=this._bucketRequestParams("GET",h,"lifecycle",y),g.successStatuses=[200],g.xmlResponse=!0,n.next=6,c.default.awrap(this.request(g));case 6:return w=n.sent,m=w.data.Rule||null,m&&(S(m)||(m=[m]),m=m.map(function(l){return l.ID&&(l.id=l.ID,delete l.ID),l.Tag&&!S(l.Tag)&&(l.Tag=[l.Tag]),o(l,"firstLowerCase")})),n.abrupt("return",{rules:m,res:w.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(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(S){return S&&S.__esModule?S:{default:S}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=k;s.getBucketVersioning=function(v,o){var i,r,h;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return p(v),i=this._bucketRequestParams("GET",v,"versioning",o),i.xmlResponse=!0,i.successStatuses=[200],g.next=6,c.default.awrap(this.request(i));case 6:return r=g.sent,h=r.data.Status,g.abrupt("return",{status:r.status,versionStatus:h,res:r.res});case 9:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(o){return o&&o.__esModule?o:{default:o}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=N("../utils/isObject"),S=s.isObject,v=k;v.getBucketWebsite=function(i,r){var h,y,g;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return p(i),h=this._bucketRequestParams("GET",i,"website",r),h.successStatuses=[200],h.xmlResponse=!0,m.next=6,c.default.awrap(this.request(h));case 6:return y=m.sent,g=[],y.data.RoutingRules&&y.data.RoutingRules.RoutingRule&&(S(y.data.RoutingRules.RoutingRule)?g=[y.data.RoutingRules.RoutingRule]:g=y.data.RoutingRules.RoutingRule),m.abrupt("return",{index:y.data.IndexDocument&&y.data.IndexDocument.Suffix||"",supportSubDir:y.data.IndexDocument&&y.data.IndexDocument.SupportSubDir||"false",type:y.data.IndexDocument&&y.data.IndexDocument.Type,routingRules:g,error:y.data.ErrorDocument&&y.data.ErrorDocument.Key||null,res:y.res});case 10:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(a){return a&&a.__esModule?a:{default:a}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=N("../utils/isArray"),S=s.isArray,v=N("../utils/deepCopy"),o=v.deepCopy,i=N("../utils/isObject"),r=i.isObject,h=N("../utils/obj2xml"),y=h.obj2xml,g=N("../utils/checkObjectTag"),w=g.checkObjectTag,m=N("../utils/getStrBytesCount"),d=m.getStrBytesCount,n=k;n.putBucketLifecycle=function(L,O,f){var x,b,C,I,j;return c.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(p(L),S(O)){z.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",L,"lifecycle",f),b=[],C={LifecycleConfiguration:{Rule:b}},O.forEach(function(G){l(G),E(G),G.id&&(G.ID=G.id,delete G.id),b.push(G)}),I=y(C,{headers:!0,firstUpperCase:!0}),x.content=I,x.mime="xml",x.successStatuses=[200],z.next=13,c.default.awrap(this.request(x));case 13:return j=z.sent,z.abrupt("return",{res:j.res});case 15:case"end":return z.stop()}},null,this)};function l(a){a.days&&(a.expiration={days:a.days}),a.date&&(a.expiration={createdBeforeDate:a.date})}function u(a,L){var O=a.days,f=a.createdBeforeDate;if(!O&&!f)throw new Error(L+" must includes days or createdBeforeDate");if(O&&!/^[1-9][0-9]*$/.test(O))throw new Error("days must be a positive integer");if(f&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(f))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function T(a){if(!S(a)&&!r(a))throw new Error("tag must be Object or Array");a=r(a)?[a]:a;var L={},O=o(a);O.forEach(function(f){L[f.key]=f.value}),w(L)}function E(a){if(a.id&&d(a.id)>255)throw new Error("ID is composed of 255 bytes at most");if(a.prefix===""||a.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(a.status))throw new Error("Status must be Enabled or Disabled");if(a.transition){if(!["IA","Archive"].includes(a.transition.storageClass))throw new Error("StorageClass must be IA or Archive");u(a.transition,"Transition")}if(a.expiration){if(!a.expiration.expiredObjectDeleteMarker)u(a.expiration,"Expiration");else if(a.expiration.days||a.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(a.abortMultipartUpload&&u(a.abortMultipartUpload,"AbortMultipartUpload"),!a.expiration&&!a.abortMultipartUpload&&!a.transition&&!a.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(a.tag){if(a.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");T(a.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(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(o){return o&&o.__esModule?o:{default:o}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=N("../utils/obj2xml"),S=s.obj2xml,v=k;v.putBucketVersioning=function(i,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y,g,w;return c.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(p(i),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return y=this._bucketRequestParams("PUT",i,"versioning",h),g={VersioningConfiguration:{Status:r}},y.mime="xml",y.content=S(g,{headers:!0}),d.next=9,c.default.awrap(this.request(y));case 9:return w=d.sent,d.abrupt("return",{res:w.res,status:w.status});case 11:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(r){return r&&r.__esModule?r:{default:r}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=N("../utils/obj2xml"),S=s.obj2xml,v=N("../utils/isArray"),o=v.isArray,i=k;i.putBucketWebsite=function(h){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=arguments[2],w,m,d,n,l;return c.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(p(h),w=this._bucketRequestParams("PUT",h,"website",g),m={Suffix:y.index||"index.html"},d={IndexDocument:m},n={WebsiteConfiguration:d},y.supportSubDir&&(m.SupportSubDir=y.supportSubDir),y.type&&(m.Type=y.type),y.error&&(d.ErrorDocument={Key:y.error}),!(y.routingRules!==void 0)){T.next=12;break}if(o(y.routingRules)){T.next=11;break}throw new Error("RoutingRules must be Array");case 11:d.RoutingRules={RoutingRule:y.routingRules};case 12:return n=S(n),w.content=n,w.mime="xml",w.successStatuses=[200],T.next=18,c.default.awrap(this.request(w));case 18:return l=T.sent,T.abrupt("return",{res:l.res});case 20:case"end":return T.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(N,$,k){(function(P){"use strict";var c=N("babel-runtime/core-js/object/keys"),_=s(c),D=N("babel-runtime/core-js/json/stringify"),p=s(D);function s(S){return S&&S.__esModule?S:{default:S}}k.encodeCallback=function(v,o){if(v.headers=v.headers||{},!Object.prototype.hasOwnProperty.call(v.headers,"x-oss-callback")&&o.callback){var i={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(i.callbackHost=o.callback.host),o.callback.contentType&&(i.callbackBodyType=o.callback.contentType);var r=P.from((0,p.default)(i)).toString("base64");if(v.headers["x-oss-callback"]=r,o.callback.customValue){var h={};(0,_.default)(o.callback.customValue).forEach(function(y){h["x:"+y]=o.callback.customValue[y]}),v.headers["x-oss-callback-var"]=P.from((0,p.default)(h)).toString("base64")}}}}).call(this,N("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/assign"),c=_(P);function _(i){return i&&i.__esModule?i:{default:i}}var D=N("humanize-ms"),p=N("url"),s=N("../utils/checkBucketName"),S=s.checkBucketName;function v(i,r){var h=p.parse(i);if(h.protocol||(h=p.parse("http"+(r?"s":"")+"://"+i)),h.protocol!=="http:"&&h.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return h}function o(i,r,h){var y=h?"https://":"http://",g=r?"-internal.aliyuncs.com":".aliyuncs.com",w="vpc100-oss-cn-";return i.substr(0,w.length)===w&&(g=".aliyuncs.com"),p.parse(y+i+g)}$.exports=function(i){if(!i||!i.accessKeyId||!i.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");i.bucket&&S(i.bucket);var r=(0,c.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},i);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=D(r.timeout)),r.endpoint)r.endpoint=v(r.endpoint,r.secure);else if(r.region)r.endpoint=o(r.region,r.internal,r.secure);else throw new Error("require options.endpoint or options.region");return r.inited=!0,r}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(N,$,k){"use strict";var P=N("merge-descriptors"),c=k;P(c,N("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(r){return r&&r.__esModule?r:{default:r}}var D=N("../utils/checkBucketName"),p=D.checkBucketName,s=N("querystring"),S=N("js-base64"),v=S.Base64.encode,o=k;o.processObjectSave=function(h,y,g,w){var m,d,n,l;return c.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return i(h,"sourceObject"),i(y,"targetObject"),i(g,"process"),y=this._objectName(y),w&&p(w),m=this._objectRequestParams("POST",h,{subres:"x-oss-process"}),d=w?",b_"+v(w):"",y=v(y),n={"x-oss-process":g+"|sys/saveas,o_"+y+d},m.content=s.stringify(n),T.next=12,c.default.awrap(this.request(m));case 12:return l=T.sent,T.abrupt("return",{res:l.res,status:l.res.status});case 14:case"end":return T.stop()}},null,this)};function i(r,h){if(!r)throw new Error(h+" is required");if(typeof r!="string")throw new Error(h+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=_(P);function _(o){return o&&o.__esModule?o:{default:o}}var D=N("copy-to"),p=N("./callback"),s=N("./utils/deepCopy"),S=s.deepCopy,v=k;v.listUploads=function(i,r){var h,y,g,w;return c.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},h={},D(r).to(h),h.subres="uploads",y=this._objectRequestParams("GET","",h),y.query=i,y.xmlResponse=!0,y.successStatuses=[200],d.next=10,c.default.awrap(this.request(y));case 10:return g=d.sent,w=g.data.Upload||[],Array.isArray(w)||(w=[w]),w=w.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),d.abrupt("return",{res:g.res,uploads:w,bucket:g.data.Bucket,nextKeyMarker:g.data.NextKeyMarker,nextUploadIdMarker:g.data.NextUploadIdMarker,isTruncated:g.data.IsTruncated==="true"});case 15:case"end":return d.stop()}},null,this)},v.listParts=function(i,r,h,y){var g,w,m;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return y=y||{},g={},D(y).to(g),g.subres={uploadId:r},w=this._objectRequestParams("GET",i,g),w.query=h,w.xmlResponse=!0,w.successStatuses=[200],n.next=10,c.default.awrap(this.request(w));case 10:return m=n.sent,n.abrupt("return",{res:m.res,uploadId:m.data.UploadId,bucket:m.data.Bucket,name:m.data.Key,partNumberMarker:m.data.PartNumberMarker,nextPartNumberMarker:m.data.NextPartNumberMarker,maxParts:m.data.MaxParts,isTruncated:m.data.IsTruncated,parts:m.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},v.abortMultipartUpload=function(i,r,h){var y,g,w;return c.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return this._stop(),h=h||{},y={},D(h).to(y),y.subres={uploadId:r},g=this._objectRequestParams("DELETE",i,y),g.successStatuses=[204],d.next=9,c.default.awrap(this.request(g));case 9:return w=d.sent,d.abrupt("return",{res:w.res});case 11:case"end":return d.stop()}},null,this)},v.initMultipartUpload=function(i,r){var h,y,g;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return r=r||{},h={},D(r).to(h),h.headers=h.headers||{},this._convertMetaToHeaders(r.meta,h.headers),h.subres="uploads",y=this._objectRequestParams("POST",i,h),y.mime=r.mime,y.xmlResponse=!0,y.successStatuses=[200],m.next=12,c.default.awrap(this.request(y));case 12:return g=m.sent,m.abrupt("return",{res:g.res,bucket:g.data.Bucket,name:g.data.Key,uploadId:g.data.UploadId});case 14:case"end":return m.stop()}},null,this)},v.uploadPart=function(i,r,h,y,g,w,m){var d;return c.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return d={stream:this._createStream(y,g,w),size:w-g},l.next=3,c.default.awrap(this._uploadPart(i,r,h,d,m));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},v.completeMultipartUpload=function(i,r,h,y){var g,w,m,d,n,l,u,T;return c.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:for(g=h.concat().sort(function(L,O){return L.number-O.number}).filter(function(L,O,f){return!O||L.number!==f[O-1].number}),w=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,m=0;m<g.length;m++)d=g[m],w+=`<Part>
|
|
|
`,w+="<PartNumber>"+d.number+`</PartNumber>
|
|
|
`,w+="<ETag>"+d.etag+`</ETag>
|
|
|
`,w+=`</Part>
|
|
|
`;return w+="</CompleteMultipartUpload>",y=y||{},n={},n=S(y),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},l=this._objectRequestParams("POST",i,n),p.encodeCallback(l,n),l.mime="xml",l.content=w,l.headers&&l.headers["x-oss-callback"]||(l.xmlResponse=!0),l.successStatuses=[200],a.next=17,c.default.awrap(this.request(l));case 17:return u=a.sent,T={res:u.res,bucket:l.bucket,name:i,etag:u.res.headers.etag},l.headers&&l.headers["x-oss-callback"]&&(T.data=JSON.parse(u.data.toString())),a.abrupt("return",T);case 21:case"end":return a.stop()}},null,this)},v._uploadPart=function(i,r,h,y,g){var w,m,d;return c.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return g=g||{},w={},D(g).to(w),w.headers={"Content-Length":y.size},w.subres={partNumber:h,uploadId:r},m=this._objectRequestParams("PUT",i,w),m.mime=w.mime,m.stream=y.stream,m.successStatuses=[200],l.next=11,c.default.awrap(this.request(m));case 11:if(d=l.sent,d.res.headers.etag){l.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 y.stream=null,m.stream=null,l.abrupt("return",{name:i,etag:d.res.headers.etag,res:d.res});case 17:case"end":return l.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=S(P),_=N("babel-runtime/core-js/object/keys"),D=S(_),p=N("babel-runtime/helpers/typeof"),s=S(p);function S(r){return r&&r.__esModule?r:{default:r}}var v=N("../utils/checkBucketName"),o=v.checkBucketName,i=k;i.copy=function(h,y,g,w){var m,d,n;return c.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return(typeof g=="undefined"?"undefined":(0,s.default)(g))==="object"&&(w=g),w=w||{},w.headers=w.headers||{},(0,D.default)(w.headers).forEach(function(T){w.headers["x-oss-copy-source-"+T.toLowerCase()]=w.headers[T]}),w.meta&&(w.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(w.meta,w.headers),y=this._getSourceName(y,g),w.versionId&&(y=y+"?versionId="+w.versionId),w.headers["x-oss-copy-source"]=y,m=this._objectRequestParams("PUT",h,w),m.xmlResponse=!0,m.successStatuses=[200,304],u.next=14,c.default.awrap(this.request(m));case 14:return d=u.sent,n=d.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),u.abrupt("return",{data:n,res:d.res});case 18:case"end":return u.stop()}},null,this)},i._getSourceName=function(h,y){return typeof y=="string"?h=this._objectName(h):h[0]!=="/"?y=this.options.bucket:(y=h.replace(/\/(.+?)(\/.*)/,"$1"),h=h.replace(/(\/.+?\/)(.*)/,"$2")),o(y),h=encodeURI(h),h="/"+y+"/"+h,h}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.delete=function(v){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return o.subres=(0,D.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("DELETE",v,o),i.successStatuses=[204],y.next=6,c.default.awrap(this.request(i));case 6:return r=y.sent,y.abrupt("return",{res:r.res});case 8:case"end":return y.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(i){return i&&i.__esModule?i:{default:i}}var s=N("utility"),S=N("../utils/obj2xml"),v=S.obj2xml,o=k;o.deleteMulti=function(r){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y,g,w,m,d,n,l,u,T,E,a,L;return c.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:if(y=[],!(!r||!r.length)){f.next=3;break}throw new Error("names is required");case 3:for(g=0;g<r.length;g++)w={},typeof r[g]=="string"?w.Key=s.escape(this._objectName(r[g])):(m=r[g],d=m.key,n=m.versionId,w.Key=s.escape(this._objectName(d)),w.VersionId=n),y.push(w);return l={Delete:{Quiet:!!h.quiet,Object:y}},u=v(l,{headers:!0}),h.subres=(0,D.default)({delete:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),T=this._objectRequestParams("POST","",h),T.mime="xml",T.content=u,T.xmlResponse=!0,T.successStatuses=[200],f.next=15,c.default.awrap(this.request(T));case 15:return E=f.sent,a=E.data,L=a&&a.Deleted||null,L&&(Array.isArray(L)||(L=[L])),f.abrupt("return",{res:E.res,deleted:L||[]});case 20:case"end":return f.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.deleteObjectTagging=function(v){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return o.subres=(0,D.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),v=this._objectName(v),i=this._objectRequestParams("DELETE",v,o),i.successStatuses=[204],y.next=7,c.default.awrap(this.request(i));case 7:return r=y.sent,y.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return y.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(o){return o&&o.__esModule?o:{default:o}}var s=N("fs"),S=N("is-type-of"),v=k;v.get=function(i,r){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y,g,w,m;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return y=null,g=!1,S.writableStream(r)?y=r:S.string(r)?(y=s.createWriteStream(r),g=!0):h=r,h=h||{},h.subres=(0,D.default)({},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.process&&(h.subres["x-oss-process"]=h.process),w=void 0,n.prev=8,m=this._objectRequestParams("GET",i,h),m.writeStream=y,m.successStatuses=[200,206,304],n.next=14,c.default.awrap(this.request(m));case 14:w=n.sent,g&&y.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!g){n.next=24;break}return y.destroy(),n.next=24,c.default.awrap(this._deleteFileSafe(r));case 24:throw n.t0;case 25:return n.abrupt("return",{res:w.res,content:w.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(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getACL=function(v){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return o.subres=(0,D.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),v=this._objectName(v),i=this._objectRequestParams("GET",v,o),i.successStatuses=[200],i.xmlResponse=!0,y.next=8,c.default.awrap(this.request(i));case 8:return r=y.sent,y.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.res});case 10:case"end":return y.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=S(P),_=N("babel-runtime/regenerator"),D=S(_),p=N("babel-runtime/core-js/object/assign"),s=S(p);function S(m){return m&&m.__esModule?m:{default:m}}var v=k,o=N("../utils/isObject"),i=o.isObject,r=N("../utils/isArray"),h=r.isArray;v.getBucketVersions=y,v.listObjectVersions=y;function y(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,l,u,T,E,a;return D.default.async(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(m.versionIdMarker&&m.keyMarker===void 0)){O.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return d.subres=(0,s.default)({versions:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),n=this._objectRequestParams("GET","",d),n.xmlResponse=!0,n.successStatuses=[200],n.query=w(m),O.next=10,D.default.awrap(this.request(n));case 10:return l=O.sent,u=l.data.Version||[],T=l.data.DeleteMarker||[],E=this,u&&(Array.isArray(u)||(u=[u]),u=u.map(function(f){return{name:f.Key,url:E._objectUrl(f.Key),lastModified:f.LastModified,isLatest:f.IsLatest==="true",versionId:f.VersionId,etag:f.ETag,type:f.Type,size:Number(f.Size),storageClass:f.StorageClass,owner:{id:f.Owner.ID,displayName:f.Owner.DisplayName}}})),T&&(h(T)||(T=[T]),T=T.map(function(f){return{name:f.Key,lastModified:f.LastModified,versionId:f.VersionId,owner:{id:f.Owner.ID,displayName:f.Owner.DisplayName}}})),a=l.data.CommonPrefixes||null,a&&(h(a)||(a=[a]),a=a.map(function(f){return f.Prefix})),O.abrupt("return",{res:l.res,objects:u,deleteMarker:T,prefixes:a,nextMarker:l.data.NextMarker||null,NextVersionIdMarker:l.data.NextVersionIdMarker||null,isTruncated:l.data.IsTruncated==="true"});case 19:case"end":return O.stop()}},null,this)}function g(m){return m.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};return i(m)&&(0,c.default)(m).forEach(function(n){d[g(n)]=m[n]}),d}},{"../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(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getObjectMeta=function(v,o){var i,r;return c.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return o=o||{},v=this._objectName(v),o.subres=(0,D.default)({objectMeta:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("HEAD",v,o),i.successStatuses=[200],y.next=8,c.default.awrap(this.request(i));case 8:return r=y.sent,y.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return y.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(o){return o&&o.__esModule?o:{default:o}}var s=k,S=N("../utils/isObject"),v=S.isObject;s.getObjectTagging=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,y,g,w,m;return c.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return r.subres=(0,D.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),i=this._objectName(i),h=this._objectRequestParams("GET",i,r),h.successStatuses=[200],n.next=7,c.default.awrap(this.request(h));case 7:return y=n.sent,n.next=10,c.default.awrap(this.parseXML(y.data));case 10:return g=n.sent,w=g.TagSet.Tag,w=w&&v(w)?[w]:w||[],m={},w.forEach(function(l){m[l.Key]=l.Value}),n.abrupt("return",{status:y.status,res:y.res,tag:m});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(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getSymlink=function(v){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,h;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return o.subres=(0,D.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),v=this._objectName(v),i=this._objectRequestParams("GET",v,o),i.successStatuses=[200],g.next=7,c.default.awrap(this.request(i));case 7:return r=g.sent,h=r.res.headers["x-oss-symlink-target"],g.abrupt("return",{targetName:decodeURIComponent(h),res:r.res});case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=S(P),_=N("babel-runtime/core-js/object/keys"),D=S(_),p=N("babel-runtime/core-js/object/assign"),s=S(p);function S(o){return o&&o.__esModule?o:{default:o}}var v=k;v.head=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,y,g;return c.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return r.subres=(0,s.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),h=this._objectRequestParams("HEAD",i,r),h.successStatuses=[200,304],m.next=6,c.default.awrap(this.request(h));case 6:return y=m.sent,g={meta:null,res:y.res,status:y.status},y.status===200&&(0,D.default)(y.headers).forEach(function(d){d.indexOf("x-oss-meta-")===0&&(g.meta||(g.meta={}),g.meta[d.substring(11)]=y.headers[d])}),m.abrupt("return",g);case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.putACL=function(v,o,i){var r,h;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return i=i||{},i.subres=(0,D.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.headers=i.headers||{},i.headers["x-oss-object-acl"]=o,v=this._objectName(v),r=this._objectRequestParams("PUT",v,i),r.successStatuses=[200],g.next=10,c.default.awrap(this.request(r));case 10:return h=g.sent,g.abrupt("return",{res:h.res});case 12:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=S(P),_=N("babel-runtime/core-js/object/keys"),D=S(_),p=N("babel-runtime/core-js/object/assign"),s=S(p);function S(y){return y&&y.__esModule?y:{default:y}}var v=N("../utils/obj2xml"),o=v.obj2xml,i=N("../utils/checkObjectTag"),r=i.checkObjectTag,h=k;h.putObjectTagging=function(g,w){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,n,l;return c.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return r(w),m.subres=(0,s.default)({tagging:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),g=this._objectName(g),d=this._objectRequestParams("PUT",g,m),d.successStatuses=[200],w=(0,D.default)(w).map(function(E){return{Key:E,Value:w[E]}}),n={Tagging:{TagSet:{Tag:w}}},d.mime="xml",d.content=o(n),T.next=12,c.default.awrap(this.request(d));case 12:return l=T.sent,T.abrupt("return",{res:l.res,status:l.status});case 14:case"end":return T.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(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/object/assign"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s.putSymlink=function(v,o,i){var r,h;return c.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return i=i||{},i.headers=i.headers||{},o=this._escape(this._objectName(o)),this._convertMetaToHeaders(i.meta,i.headers),i.headers["x-oss-symlink-target"]=o,i.subres=(0,D.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.storageClass&&(i.headers["x-oss-storage-class"]=i.storageClass),v=this._objectName(v),r=this._objectRequestParams("PUT",v,i),r.successStatuses=[200],g.next=13,c.default.awrap(this.request(r));case 13:return h=g.sent,g.abrupt("return",{res:h.res});case 15:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(N,$,k){"use strict";var P=N("babel-runtime/regenerator"),c=p(P),_=N("babel-runtime/core-js/promise"),D=p(_);function p(S){return S&&S.__esModule?S:{default:S}}var s=k;s._parallelNode=function(v,o,i,r){var h,y,g,w,m,d,n,l;return c.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:h=this,y=[],g=[],w=v.length/o,m=v.length%o,d=m===0?w:(v.length-m)/o+1,n=1,l=0;case 8:if(!(l<v.length)){T.next=26;break}if(!h.isCancel()){T.next=11;break}return T.abrupt("break",26);case 11:if(r?g.push(i(h,v[l],r)):g.push(i(h,v[l])),!(g.length===o||n===d&&l===v.length-1)){T.next=23;break}return T.prev=13,n+=1,T.next=17,c.default.awrap(D.default.all(g));case 17:T.next=22;break;case 19:T.prev=19,T.t0=T.catch(13),y.push(T.t0);case 22:g=[];case 23:l++,T.next=8;break;case 26:return T.abrupt("return",y);case 27:case"end":return T.stop()}},null,this,[[13,19]])},s._parallel=function(v,o,i){var r=this;return new D.default(function(h){var y=[];if(o<=0||!v){h(y);return}function g(a){return function(){if(a===null)throw new Error("Callback was already called.");var L=a;a=null;for(var O=arguments.length,f=Array(O),x=0;x<O;x++)f[x]=arguments[x];L.apply(this,f)}}function w(a){var L=-1,O=a.length;return function(){return++L<O&&!r.isCancel()?{value:a[L],key:L}:null}}var m=w(v),d=!1,n=0,l=!1;function u(a,L){n-=1,a?(d=!0,y.push(a),h(y)):L==={}||d&&n<=0?(d=!0,h(y)):l||(r.isCancel()?h(y):E())}function T(a,L){i(a).then(function(O){L(null,O)}).catch(function(O){L(O)})}function E(){for(l=!0;n<o&&!d&&!r.isCancel();){var a=m();if(a===null||y.length>0){d=!0,n<=0&&h(y);return}n+=1,T(a.value,g(u))}l=!1}E()})},s.cancel=function(v){this.options.cancelFlag=!0,v&&this.abortMultipartUpload(v.name,v.uploadId,v.options)},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1},s._stop=function(){this.options.cancelFlag=!0},s._makeCancelEvent=function(){var v={status:0,name:"cancel"};return v}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(N,$,k){(function(P){"use strict";var c=N("babel-runtime/core-js/json/stringify"),_=s(c),D=N("babel-runtime/core-js/object/keys"),p=s(D);function s(o){return o&&o.__esModule?o:{default:o}}var S=N("./../../shims/crypto/crypto.js"),v=N("is-type-of");k.buildCanonicalizedResource=function(i,r){var h=""+i,y="?";if(v.string(r)&&r.trim()!=="")h+=y+r;else if(v.array(r))r.sort(),h+=y+r.join("&");else if(r){var g=function(d,n){return d[0]>n[0]?1:d[0]<n[0]?-1:0},w=function(d){h+=y+d,r[d]&&(h+="="+r[d]),y="&"};(0,p.default)(r).sort(g).forEach(w)}return h},k.buildCanonicalString=function(i,r,h,y){h=h||{};var g=h.headers||{},w="x-oss-",m=[],d={},n=[i.toUpperCase(),g["Content-Md5"]||"",g["Content-Type"]||g["Content-Type".toLowerCase()],y||g["x-oss-date"]];return(0,p.default)(g).forEach(function(l){var u=l.toLowerCase();u.indexOf(w)===0&&(d[u]=String(g[l]).trim())}),(0,p.default)(d).sort().forEach(function(l){m.push(l+":"+d[l])}),n=n.concat(m),n.push(this.buildCanonicalizedResource(r,h.parameters)),n.join(`
|
|
|
`)},k.computeSignature=function(i,r){var h=S.createHmac("sha1",i);return h.update(P.from(r,"utf8")).digest("base64")},k.authorization=function(i,r,h){return"OSS "+i+":"+this.computeSignature(r,h)},k._signatureForURL=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=arguments[2],y=arguments[3],g={},w=r.subResource,m=w===void 0?{}:w;if(r.process){var d="x-oss-process";m[d]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";m[n]=r.trafficLimit}if(r.response&&(0,p.default)(r.response).forEach(function(E){var a="response-"+E.toLowerCase();m[a]=r.response[E]}),(0,p.default)(r).forEach(function(E){var a=E.toLowerCase(),L=r[E];a.indexOf("x-oss-")===0?g[a]=L:(a.indexOf("content-md5")===0||a.indexOf("content-type")===0)&&(g[E]=L)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(m["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var l={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(l.callbackHost=r.callback.host),r.callback.contentType&&(l.callbackBodyType=r.callback.contentType),m.callback=P.from((0,_.default)(l)).toString("base64"),r.callback.customValue){var u={};(0,p.default)(r.callback.customValue).forEach(function(E){u["x:"+E]=r.callback.customValue[E]}),m["callback-var"]=P.from((0,_.default)(u)).toString("base64")}}var T=this.buildCanonicalString(r.method,h,{headers:g,parameters:m},y.toString());return{Signature:this.computeSignature(i,T),subResource:m}}}).call(this,N("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(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkBucketName=void 0,k.checkBucketName=function(P,c){var _=c?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!_.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/entries"),c=_(P);function _(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(k,"__esModule",{value:!0}),k.checkObjectTag=void 0;var D=N("./checkValid"),p=D.checkValid,s=N("./isObject"),S=s.isObject,v=[{validator:function(h){if(typeof h!="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 (/)"}],o={key:[].concat(v,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(v,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function i(r){if(!S(r))throw new Error("tag must be Object");var h=(0,c.default)(r);if(h.length>10)throw new Error("maximum of 10 tags for a object");var y=["key","value"];h.forEach(function(g){g.forEach(function(w,m){p(w,o[y[m]])})})}k.checkObjectTag=i},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkValid=void 0;function P(c,_){_.forEach(function(D){if(D.validator)D.validator(c);else if(D.pattern&&!D.pattern.test(c))throw new Error(D.msg)})}k.checkValid=P},{}],38:[function(N,$,k){(function(P){"use strict";var c=N("babel-runtime/core-js/object/assign"),_=D(c);function D(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(k,"__esModule",{value:!0}),k.createRequest=void 0;var p=N("./../../../shims/crypto/crypto.js"),s=N("debug")("ali-oss"),S=N("mime"),v=N("dateformat"),o=N("copy-to"),i=N("path");function r(g,w){return g[w]||g[w.toLowerCase()]}function h(g,w){delete g[w],delete g[w.toLowerCase()]}function y(g){var w=new Date;this.options.amendTimeSkewed&&(w=+new Date+this.options.amendTimeSkewed);var m={"x-oss-date":v(w,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(m["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,_.default)(m,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(m["x-oss-security-token"]=this.options.stsToken),o(g.headers).to(m),r(m,"Content-Type")||(g.mime&&g.mime.indexOf("/")>0?m["Content-Type"]=g.mime:m["Content-Type"]=S.getType(g.mime||i.extname(g.object||""))),r(m,"Content-Type")||h(m,"Content-Type"),g.content&&(m["Content-Md5"]=p.createHash("md5").update(P.from(g.content,"utf8")).digest("base64"),m["Content-Length"]||(m["Content-Length"]=g.content.length));var d=this._getResource(g);m.authorization=this.authorization(g.method,d,g.subres,m);var n=this._getReqUrl(g);s("request %s %s, with headers %j, !!stream: %s",g.method,n,m,!!g.stream);var l=g.timeout||this.options.timeout,u={method:g.method,content:g.content,stream:g.stream,headers:m,timeout:l,writeStream:g.writeStream,customResponse:g.customResponse,ctx:g.ctx||this.ctx};return this.agent&&(u.agent=this.agent),this.httpsAgent&&(u.httpsAgent=this.httpsAgent),{url:n,params:u}}k.createRequest=y}).call(this,N("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(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=p(P),_=N("babel-runtime/helpers/typeof"),D=p(_);function p(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(k,"__esModule",{value:!0}),k.deepCopy=void 0,k.deepCopy=function(s){if(s===null||(typeof s=="undefined"?"undefined":(0,D.default)(s))!=="object")return s;var S=Array.isArray(s)?[]:{};return(0,c.default)(s).forEach(function(v){S[v]=k.deepCopy(s[v])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=p(P),_=N("babel-runtime/helpers/typeof"),D=p(_);function p(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(k,"__esModule",{value:!0}),k.formatObjKey=void 0;function s(v,o){if(v===null||(typeof v=="undefined"?"undefined":(0,D.default)(v))!=="object")return v;var i=void 0;if(Array.isArray(v)){i=[];for(var r=0;r<v.length;r++)i.push(s(v[r],o))}else i={},(0,c.default)(v).forEach(function(h){i[S(h,o)]=s(v[h],o)});return i}k.formatObjKey=s;function S(v,o){return o==="firstUpperCase"?v=v.replace(/^./,function(i){return i.toUpperCase()}):o==="firstLowerCase"&&(v=v.replace(/^./,function(i){return i.toLowerCase()})),v}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.getStrBytesCount=void 0;function P(c){for(var _=0,D=0;D<c.length;D++){var p=c.charAt(D);/^[\u00-\uff]$/.test(p)?_+=1:_+=2}return _}k.getStrBytesCount=P},{}],42:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isArray=void 0,k.isArray=function(P){return Object.prototype.toString.call(P)==="[object Array]"}},{}],43:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isBlob=void 0;function P(c){return typeof Blob!="undefined"&&c instanceof Blob}k.isBlob=P},{}],44:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isFile=void 0,k.isFile=function(P){return typeof File!="undefined"&&P instanceof File}},{}],45:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isIP=void 0,k.isIP=function(P){var c=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,_=/^\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 c.test(P)||_.test(P)}},{}],46:[function(N,$,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isObject=void 0,k.isObject=function(P){return Object.prototype.toString.call(P)==="[object Object]"}},{}],47:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=_(P);function _(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(k,"__esModule",{value:!0}),k.obj2xml=void 0;var D=N("./formatObjKey");function p(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function s(S,v){var o="";return v&&v.headers&&(o=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),v&&v.firstUpperCase&&(S=D.formatObjKey(S,"firstUpperCase")),p(S)==="object"?(0,c.default)(S).forEach(function(i){p(S[i])==="string"||p(S[i])==="number"?o+="<"+i+">"+S[i]+"</"+i+">":p(S[i])==="object"?o+="<"+i+">"+s(S[i])+"</"+i+">":p(S[i])==="array"?o+=S[i].map(function(r){return"<"+i+">"+s(r)+"</"+i+">"}).join(""):o+="<"+i+">"+S[i].toString()+"</"+i+">"}):o+=S.toString(),o}k.obj2xml=s},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(N,$,k){$.exports=P,$.exports.HttpsAgent=P;function P(){}},{}],49:[function(N,$,k){$.exports=N("./register")().Promise},{"./register":51}],50:[function(N,$,k){"use strict";var P="@@any-promise/REGISTRATION",c=null;$.exports=function(_,D){return function(s,S){s=s||null,S=S||{};var v=S.global!==!1;if(c===null&&v&&(c=_[P]||null),c!==null&&s!==null&&c.implementation!==s)throw new Error('any-promise already defined as "'+c.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return c===null&&(s!==null&&typeof S.Promise!="undefined"?c={Promise:S.Promise,implementation:s}:c=D(s),v&&(_[P]=c)),c}}},{}],51:[function(N,$,k){"use strict";$.exports=N("./loader")(window,P);function P(){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(N,$,k){$.exports={default:N("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(N,$,k){$.exports={default:N("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(N,$,k){$.exports={default:N("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(N,$,k){$.exports={default:N("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(N,$,k){$.exports={default:N("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(N,$,k){$.exports={default:N("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(N,$,k){$.exports={default:N("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(N,$,k){$.exports={default:N("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(N,$,k){$.exports={default:N("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(N,$,k){"use strict";k.__esModule=!0;var P=N("../core-js/symbol/iterator"),c=s(P),_=N("../core-js/symbol"),D=s(_),p=typeof D.default=="function"&&typeof c.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof D.default=="function"&&S.constructor===D.default&&S!==D.default.prototype?"symbol":typeof S};function s(S){return S&&S.__esModule?S:{default:S}}k.default=typeof D.default=="function"&&p(c.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":p(S)}:function(S){return S&&typeof D.default=="function"&&S.constructor===D.default&&S!==D.default.prototype?"symbol":typeof S=="undefined"?"undefined":p(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(N,$,k){$.exports=N("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(N,$,k){"use strict";k.byteLength=v,k.toByteArray=i,k.fromByteArray=y;for(var P=[],c=[],_=typeof Uint8Array!="undefined"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,s=D.length;p<s;++p)P[p]=D[p],c[D.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63;function S(g){var w=g.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=g.indexOf("=");m===-1&&(m=w);var d=m===w?0:4-m%4;return[m,d]}function v(g){var w=S(g),m=w[0],d=w[1];return(m+d)*3/4-d}function o(g,w,m){return(w+m)*3/4-m}function i(g){var w,m=S(g),d=m[0],n=m[1],l=new _(o(g,d,n)),u=0,T=n>0?d-4:d,E;for(E=0;E<T;E+=4)w=c[g.charCodeAt(E)]<<18|c[g.charCodeAt(E+1)]<<12|c[g.charCodeAt(E+2)]<<6|c[g.charCodeAt(E+3)],l[u++]=w>>16&255,l[u++]=w>>8&255,l[u++]=w&255;return n===2&&(w=c[g.charCodeAt(E)]<<2|c[g.charCodeAt(E+1)]>>4,l[u++]=w&255),n===1&&(w=c[g.charCodeAt(E)]<<10|c[g.charCodeAt(E+1)]<<4|c[g.charCodeAt(E+2)]>>2,l[u++]=w>>8&255,l[u++]=w&255),l}function r(g){return P[g>>18&63]+P[g>>12&63]+P[g>>6&63]+P[g&63]}function h(g,w,m){for(var d,n=[],l=w;l<m;l+=3)d=(g[l]<<16&16711680)+(g[l+1]<<8&65280)+(g[l+2]&255),n.push(r(d));return n.join("")}function y(g){for(var w,m=g.length,d=m%3,n=[],l=16383,u=0,T=m-d;u<T;u+=l)n.push(h(g,u,u+l>T?T:u+l));return d===1?(w=g[m-1],n.push(P[w>>2]+P[w<<4&63]+"==")):d===2&&(w=(g[m-2]<<8)+g[m-1],n.push(P[w>>10]+P[w>>4&63]+P[w<<2&63]+"=")),n.join("")}},{}],70:[function(N,$,k){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(P,c,_){typeof $!="undefined"&&$.exports?$.exports=_():typeof define=="function"&&define.amd?define(c,_):P[c]=_()}(this,"bowser",function(){var P=!0;function c(o){function i(K){var F=o.match(K);return F&&F.length>1&&F[1]||""}function r(K){var F=o.match(K);return F&&F.length>1&&F[2]||""}var h=i(/(ipod|iphone|ipad)/i).toLowerCase(),y=/like android/i.test(o),g=!y&&/android/i.test(o),w=/nexus\s*[0-6]\s*/i.test(o),m=!w&&/nexus\s*[0-9]+/i.test(o),d=/CrOS/.test(o),n=/silk/i.test(o),l=/sailfish/i.test(o),u=/tizen/i.test(o),T=/(web|hpw)(o|0)s/i.test(o),E=/windows phone/i.test(o),a=/SamsungBrowser/i.test(o),L=!E&&/windows/i.test(o),O=!h&&!n&&/macintosh/i.test(o),f=!g&&!l&&!u&&!T&&/linux/i.test(o),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),b=i(/version\/(\d+(\.\d+)?)/i),C=/tablet/i.test(o)&&!/tablet pc/i.test(o),I=!C&&/[^-]mobi/i.test(o),j=/xbox/i.test(o),M;/opera/i.test(o)?M={name:"Opera",opera:P,version:b||i(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(o)?M={name:"Opera",opera:P,version:i(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||b}:/SamsungBrowser/i.test(o)?M={name:"Samsung Internet for Android",samsungBrowser:P,version:b||i(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(o)?M={name:"NAVER Whale browser",whale:P,version:i(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(o)?M={name:"MZ Browser",mzbrowser:P,version:i(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(o)?M={name:"Opera Coast",coast:P,version:b||i(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(o)?M={name:"Focus",focus:P,version:i(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(o)?M={name:"Yandex Browser",yandexbrowser:P,version:b||i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(o)?M={name:"UC Browser",ucbrowser:P,version:i(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(o)?M={name:"Maxthon",maxthon:P,version:i(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(o)?M={name:"Epiphany",epiphany:P,version:i(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(o)?M={name:"Puffin",puffin:P,version:i(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(o)?M={name:"Sleipnir",sleipnir:P,version:i(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(o)?M={name:"K-Meleon",kMeleon:P,version:i(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},x?(M.msedge=P,M.version=x):(M.msie=P,M.version=i(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(o)?M={name:"Internet Explorer",msie:P,version:i(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?M={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(o)?M={name:"Microsoft Edge",msedge:P,version:x}:/vivaldi/i.test(o)?M={name:"Vivaldi",vivaldi:P,version:i(/vivaldi\/(\d+(\.\d+)?)/i)||b}:l?M={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:i(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(o)?M={name:"SeaMonkey",seamonkey:P,version:i(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(o)?(M={name:"Firefox",firefox:P,version:i(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(o)&&(M.firefoxos=P,M.osname="Firefox OS")):n?M={name:"Amazon Silk",silk:P,version:i(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(o)?M={name:"PhantomJS",phantom:P,version:i(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(o)?M={name:"SlimerJS",slimer:P,version:i(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(o)||/rim\stablet/i.test(o)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:b||i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:T?(M={name:"WebOS",osname:"WebOS",webos:P,version:b||i(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(o)&&(M.touchpad=P)):/bada/i.test(o)?M={name:"Bada",osname:"Bada",bada:P,version:i(/dolfin\/(\d+(\.\d+)?)/i)}:u?M={name:"Tizen",osname:"Tizen",tizen:P,version:i(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||b}:/qupzilla/i.test(o)?M={name:"QupZilla",qupzilla:P,version:i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||b}:/chromium/i.test(o)?M={name:"Chromium",chromium:P,version:i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||b}:/chrome|crios|crmo/i.test(o)?M={name:"Chrome",chrome:P,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:g?M={name:"Android",version:b}:/safari|applewebkit/i.test(o)?(M={name:"Safari",safari:P},b&&(M.version=b)):h?(M={name:h=="iphone"?"iPhone":h=="ipad"?"iPad":"iPod"},b&&(M.version=b)):/googlebot/i.test(o)?M={name:"Googlebot",googlebot:P,version:i(/googlebot\/(\d+(\.\d+))/i)||b}:M={name:i(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!M.msedge&&/(apple)?webkit/i.test(o)?(/(apple)?webkit\/537\.36/i.test(o)?(M.name=M.name||"Blink",M.blink=P):(M.name=M.name||"Webkit",M.webkit=P),!M.version&&b&&(M.version=b)):!M.opera&&/gecko\//i.test(o)&&(M.name=M.name||"Gecko",M.gecko=P,M.version=M.version||i(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(g||M.silk)?(M.android=P,M.osname="Android"):!M.windowsphone&&h?(M[h]=P,M.ios=P,M.osname="iOS"):O?(M.mac=P,M.osname="macOS"):j?(M.xbox=P,M.osname="Xbox"):L?(M.windows=P,M.osname="Windows"):f&&(M.linux=P,M.osname="Linux");function z(K){switch(K){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 G="";M.windows?G=z(i(/Windows ((NT|XP)( \d\d?.\d)?)/i)):M.windowsphone?G=i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):M.mac?(G=i(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):h?(G=i(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):g?G=i(/android[ \/-](\d+(\.\d+)*)/i):M.webos?G=i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):M.blackberry?G=i(/rim\stablet\sos\s(\d+(\.\d+)*)/i):M.bada?G=i(/bada\/(\d+(\.\d+)*)/i):M.tizen&&(G=i(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(M.osversion=G);var B=!M.windows&&G.split(".")[0];return C||m||h=="ipad"||g&&(B==3||B>=4&&!I)||M.silk?M.tablet=P:(I||h=="iphone"||h=="ipod"||g||w||M.blackberry||M.webos||M.bada)&&(M.mobile=P),M.msedge||M.msie&&M.version>=10||M.yandexbrowser&&M.version>=15||M.vivaldi&&M.version>=1||M.chrome&&M.version>=20||M.samsungBrowser&&M.version>=4||M.whale&&s([M.version,"1.0"])===1||M.mzbrowser&&s([M.version,"6.0"])===1||M.focus&&s([M.version,"1.0"])===1||M.firefox&&M.version>=20||M.safari&&M.version>=6||M.opera&&M.version>=10||M.ios&&M.osversion&&M.osversion.split(".")[0]>=6||M.blackberry&&M.version>=10.1||M.chromium&&M.version>=20?M.a=P:M.msie&&M.version<10||M.chrome&&M.version<20||M.firefox&&M.version<20||M.safari&&M.version<6||M.opera&&M.version<10||M.ios&&M.osversion&&M.osversion.split(".")[0]<6||M.chromium&&M.version<20?M.c=P:M.x=P,M}var _=c(typeof navigator!="undefined"&&navigator.userAgent||"");_.test=function(o){for(var i=0;i<o.length;++i){var r=o[i];if(typeof r=="string"&&r in _)return!0}return!1};function D(o){return o.split(".").length}function p(o,i){var r=[],h;if(Array.prototype.map)return Array.prototype.map.call(o,i);for(h=0;h<o.length;h++)r.push(i(o[h]));return r}function s(o){for(var i=Math.max(D(o[0]),D(o[1])),r=p(o,function(h){var y=i-D(h);return h=h+new Array(y+1).join(".0"),p(h.split("."),function(g){return new Array(20-g.length).join("0")+g}).reverse()});--i>=0;){if(r[0][i]>r[1][i])return 1;if(r[0][i]===r[1][i]){if(i===0)return 0}else return-1}}function S(o,i,r){var h=_;typeof i=="string"&&(r=i,i=void 0),i===void 0&&(i=!1),r&&(h=c(r));var y=""+h.version;for(var g in o)if(o.hasOwnProperty(g)&&h[g]){if(typeof o[g]!="string")throw new Error("Browser version in the minVersion map should be a string: "+g+": "+String(o));return s([y,o[g]])<0}return i}function v(o,i,r){return!S(o,i,r)}return _.isUnsupportedBrowser=S,_.compareVersions=s,_.check=v,_._detect=c,_.detect=c,_})},{}],71:[function(N,$,k){},{}],72:[function(N,$,k){var P=N("buffer").Buffer,c=P.isEncoding||function(v){switch(v&&v.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 _(v){if(v&&!c(v))throw new Error("Unknown encoding: "+v)}var D=k.StringDecoder=function(v){this.encoding=(v||"utf8").toLowerCase().replace(/[-_]/,""),_(v);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=p;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};D.prototype.write=function(v){for(var o="";this.charLength;){var i=v.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:v.length;if(v.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";v=v.slice(i,v.length),o=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var h=o.charCodeAt(o.length-1);if(h>=55296&&h<=56319){this.charLength+=this.surrogateSize,o="";continue}if(this.charReceived=this.charLength=0,v.length===0)return o;break}this.detectIncompleteChar(v);var r=v.length;this.charLength&&(v.copy(this.charBuffer,0,v.length-this.charReceived,r),r-=this.charReceived),o+=v.toString(this.encoding,0,r);var r=o.length-1,h=o.charCodeAt(r);if(h>=55296&&h<=56319){var y=this.surrogateSize;return this.charLength+=y,this.charReceived+=y,this.charBuffer.copy(this.charBuffer,y,0,y),v.copy(this.charBuffer,0,0,y),o.substring(0,r)}return o},D.prototype.detectIncompleteChar=function(v){for(var o=v.length>=3?3:v.length;o>0;o--){var i=v[v.length-o];if(o==1&&i>>5==6){this.charLength=2;break}if(o<=2&&i>>4==14){this.charLength=3;break}if(o<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=o},D.prototype.end=function(v){var o="";if(v&&v.length&&(o=this.write(v)),this.charReceived){var i=this.charReceived,r=this.charBuffer,h=this.encoding;o+=r.slice(0,i).toString(h)}return o};function p(v){return v.toString(this.encoding)}function s(v){this.charReceived=v.length%2,this.charLength=this.charReceived?2:0}function S(v){this.charReceived=v.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(N,$,k){(function(P,c){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var _=N("base64-js"),D=N("ieee754"),p=N("isarray");k.Buffer=c,k.SlowBuffer=n,k.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:s(),k.kMaxLength=S();function s(){try{var ne=new Uint8Array(1);return ne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ne.foo()===42&&typeof ne.subarray=="function"&&ne.subarray(1,1).byteLength===0}catch(J){return!1}}function S(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function v(ne,J){if(S()<J)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(ne=new Uint8Array(J),ne.__proto__=c.prototype):(ne===null&&(ne=new c(J)),ne.length=J),ne}function c(ne,J,X){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(ne,J,X);if(typeof ne=="number"){if(typeof J=="string")throw new Error("If encoding is specified then the first argument must be a string");return h(this,ne)}return o(this,ne,J,X)}c.poolSize=8192,c._augment=function(ne){return ne.__proto__=c.prototype,ne};function o(ne,J,X,Y){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?w(ne,J,X,Y):typeof J=="string"?y(ne,J,X):m(ne,J)}c.from=function(ne,J,X){return o(null,ne,J,X)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0}));function i(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be a number');if(ne<0)throw new RangeError('"size" argument must not be negative')}function r(ne,J,X,Y){return i(J),J<=0?v(ne,J):X!==void 0?typeof Y=="string"?v(ne,J).fill(X,Y):v(ne,J).fill(X):v(ne,J)}c.alloc=function(ne,J,X){return r(null,ne,J,X)};function h(ne,J){if(i(J),ne=v(ne,J<0?0:d(J)|0),!c.TYPED_ARRAY_SUPPORT)for(var X=0;X<J;++X)ne[X]=0;return ne}c.allocUnsafe=function(ne){return h(null,ne)},c.allocUnsafeSlow=function(ne){return h(null,ne)};function y(ne,J,X){if((typeof X!="string"||X==="")&&(X="utf8"),!c.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Y=l(J,X)|0;ne=v(ne,Y);var he=ne.write(J,X);return he!==Y&&(ne=ne.slice(0,he)),ne}function g(ne,J){var X=J.length<0?0:d(J.length)|0;ne=v(ne,X);for(var Y=0;Y<X;Y+=1)ne[Y]=J[Y]&255;return ne}function w(ne,J,X,Y){if(J.byteLength,X<0||J.byteLength<X)throw new RangeError("'offset' is out of bounds");if(J.byteLength<X+(Y||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Y===void 0?J=new Uint8Array(J):Y===void 0?J=new Uint8Array(J,X):J=new Uint8Array(J,X,Y),c.TYPED_ARRAY_SUPPORT?(ne=J,ne.__proto__=c.prototype):ne=g(ne,J),ne}function m(ne,J){if(c.isBuffer(J)){var X=d(J.length)|0;return ne=v(ne,X),ne.length===0||J.copy(ne,0,0,X),ne}if(J){if(typeof ArrayBuffer!="undefined"&&J.buffer instanceof ArrayBuffer||"length"in J)return typeof J.length!="number"||Ee(J.length)?v(ne,0):g(ne,J);if(J.type==="Buffer"&&p(J.data))return g(ne,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(ne){if(ne>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ne|0}function n(ne){return+ne!=ne&&(ne=0),c.alloc(+ne)}c.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},c.compare=function(J,X){if(!c.isBuffer(J)||!c.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Y=J.length,he=X.length,de=0,Te=Math.min(Y,he);de<Te;++de)if(J[de]!==X[de]){Y=J[de],he=X[de];break}return Y<he?-1:he<Y?1:0},c.isEncoding=function(J){switch(String(J).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}},c.concat=function(J,X){if(!p(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return c.alloc(0);var Y;if(X===void 0)for(X=0,Y=0;Y<J.length;++Y)X+=J[Y].length;var he=c.allocUnsafe(X),de=0;for(Y=0;Y<J.length;++Y){var Te=J[Y];if(!c.isBuffer(Te))throw new TypeError('"list" argument must be an Array of Buffers');Te.copy(he,de),de+=Te.length}return he};function l(ne,J){if(c.isBuffer(ne))return ne.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ne)||ne instanceof ArrayBuffer))return ne.byteLength;typeof ne!="string"&&(ne=""+ne);var X=ne.length;if(X===0)return 0;for(var Y=!1;;)switch(J){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return le(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Z(ne).length;default:if(Y)return le(ne).length;J=(""+J).toLowerCase(),Y=!0}}c.byteLength=l;function u(ne,J,X){var Y=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,J>>>=0,X<=J)return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return K(this,J,X);case"utf8":case"utf-8":return j(this,J,X);case"ascii":return G(this,J,X);case"latin1":case"binary":return B(this,J,X);case"base64":return I(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,J,X);default:if(Y)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Y=!0}}c.prototype._isBuffer=!0;function T(ne,J,X){var Y=ne[J];ne[J]=ne[X],ne[X]=Y}c.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<J;X+=2)T(this,X,X+1);return this},c.prototype.swap32=function(){var J=this.length;if(J%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<J;X+=4)T(this,X,X+3),T(this,X+1,X+2);return this},c.prototype.swap64=function(){var J=this.length;if(J%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<J;X+=8)T(this,X,X+7),T(this,X+1,X+6),T(this,X+2,X+5),T(this,X+3,X+4);return this},c.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?j(this,0,J):u.apply(this,arguments)},c.prototype.equals=function(J){if(!c.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:c.compare(this,J)===0},c.prototype.inspect=function(){var J="",X=k.INSPECT_MAX_BYTES;return this.length>0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),"<Buffer "+J+">"},c.prototype.compare=function(J,X,Y,he,de){if(!c.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Y===void 0&&(Y=J?J.length:0),he===void 0&&(he=0),de===void 0&&(de=this.length),X<0||Y>J.length||he<0||de>this.length)throw new RangeError("out of range index");if(he>=de&&X>=Y)return 0;if(he>=de)return-1;if(X>=Y)return 1;if(X>>>=0,Y>>>=0,he>>>=0,de>>>=0,this===J)return 0;for(var Te=de-he,ze=Y-X,Ze=Math.min(Te,ze),Je=this.slice(he,de),$e=J.slice(X,Y),tt=0;tt<Ze;++tt)if(Je[tt]!==$e[tt]){Te=Je[tt],ze=$e[tt];break}return Te<ze?-1:ze<Te?1:0};function E(ne,J,X,Y,he){if(ne.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=he?0:ne.length-1),X<0&&(X=ne.length+X),X>=ne.length){if(he)return-1;X=ne.length-1}else if(X<0)if(he)X=0;else return-1;if(typeof J=="string"&&(J=c.from(J,Y)),c.isBuffer(J))return J.length===0?-1:a(ne,J,X,Y,he);if(typeof J=="number")return J=J&255,c.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(ne,J,X):Uint8Array.prototype.lastIndexOf.call(ne,J,X):a(ne,[J],X,Y,he);throw new TypeError("val must be string, number or Buffer")}function a(ne,J,X,Y,he){var de=1,Te=ne.length,ze=J.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(ne.length<2||J.length<2)return-1;de=2,Te/=2,ze/=2,X/=2}function Ze(Me,Ce){return de===1?Me[Ce]:Me.readUInt16BE(Ce*de)}var Je;if(he){var $e=-1;for(Je=X;Je<Te;Je++)if(Ze(ne,Je)===Ze(J,$e===-1?0:Je-$e)){if($e===-1&&($e=Je),Je-$e+1===ze)return $e*de}else $e!==-1&&(Je-=Je-$e),$e=-1}else for(X+ze>Te&&(X=Te-ze),Je=X;Je>=0;Je--){for(var tt=!0,nt=0;nt<ze;nt++)if(Ze(ne,Je+nt)!==Ze(J,nt)){tt=!1;break}if(tt)return Je}return-1}c.prototype.includes=function(J,X,Y){return this.indexOf(J,X,Y)!==-1},c.prototype.indexOf=function(J,X,Y){return E(this,J,X,Y,!0)},c.prototype.lastIndexOf=function(J,X,Y){return E(this,J,X,Y,!1)};function L(ne,J,X,Y){X=Number(X)||0;var he=ne.length-X;Y?(Y=Number(Y),Y>he&&(Y=he)):Y=he;var de=J.length;if(de%2!==0)throw new TypeError("Invalid hex string");Y>de/2&&(Y=de/2);for(var Te=0;Te<Y;++Te){var ze=parseInt(J.substr(Te*2,2),16);if(isNaN(ze))return Te;ne[X+Te]=ze}return Te}function O(ne,J,X,Y){return ae(le(J,ne.length-X),ne,X,Y)}function f(ne,J,X,Y){return ae(te(J),ne,X,Y)}function x(ne,J,X,Y){return f(ne,J,X,Y)}function b(ne,J,X,Y){return ae(Z(J),ne,X,Y)}function C(ne,J,X,Y){return ae(be(J,ne.length-X),ne,X,Y)}c.prototype.write=function(J,X,Y,he){if(X===void 0)he="utf8",Y=this.length,X=0;else if(Y===void 0&&typeof X=="string")he=X,Y=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Y)?(Y=Y|0,he===void 0&&(he="utf8")):(he=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var de=this.length-X;if((Y===void 0||Y>de)&&(Y=de),J.length>0&&(Y<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Te=!1;;)switch(he){case"hex":return L(this,J,X,Y);case"utf8":case"utf-8":return O(this,J,X,Y);case"ascii":return f(this,J,X,Y);case"latin1":case"binary":return x(this,J,X,Y);case"base64":return b(this,J,X,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,J,X,Y);default:if(Te)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Te=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(ne,J,X){return J===0&&X===ne.length?_.fromByteArray(ne):_.fromByteArray(ne.slice(J,X))}function j(ne,J,X){X=Math.min(ne.length,X);for(var Y=[],he=J;he<X;){var de=ne[he],Te=null,ze=de>239?4:de>223?3:de>191?2:1;if(he+ze<=X){var Ze,Je,$e,tt;switch(ze){case 1:de<128&&(Te=de);break;case 2:Ze=ne[he+1],(Ze&192)===128&&(tt=(de&31)<<6|Ze&63,tt>127&&(Te=tt));break;case 3:Ze=ne[he+1],Je=ne[he+2],(Ze&192)===128&&(Je&192)===128&&(tt=(de&15)<<12|(Ze&63)<<6|Je&63,tt>2047&&(tt<55296||tt>57343)&&(Te=tt));break;case 4:Ze=ne[he+1],Je=ne[he+2],$e=ne[he+3],(Ze&192)===128&&(Je&192)===128&&($e&192)===128&&(tt=(de&15)<<18|(Ze&63)<<12|(Je&63)<<6|$e&63,tt>65535&&tt<1114112&&(Te=tt))}}Te===null?(Te=65533,ze=1):Te>65535&&(Te-=65536,Y.push(Te>>>10&1023|55296),Te=56320|Te&1023),Y.push(Te),he+=ze}return z(Y)}var M=4096;function z(ne){var J=ne.length;if(J<=M)return String.fromCharCode.apply(String,ne);for(var X="",Y=0;Y<J;)X+=String.fromCharCode.apply(String,ne.slice(Y,Y+=M));return X}function G(ne,J,X){var Y="";X=Math.min(ne.length,X);for(var he=J;he<X;++he)Y+=String.fromCharCode(ne[he]&127);return Y}function B(ne,J,X){var Y="";X=Math.min(ne.length,X);for(var he=J;he<X;++he)Y+=String.fromCharCode(ne[he]);return Y}function K(ne,J,X){var Y=ne.length;(!J||J<0)&&(J=0),(!X||X<0||X>Y)&&(X=Y);for(var he="",de=J;de<X;++de)he+=oe(ne[de]);return he}function F(ne,J,X){for(var Y=ne.slice(J,X),he="",de=0;de<Y.length;de+=2)he+=String.fromCharCode(Y[de]+Y[de+1]*256);return he}c.prototype.slice=function(J,X){var Y=this.length;J=~~J,X=X===void 0?Y:~~X,J<0?(J+=Y,J<0&&(J=0)):J>Y&&(J=Y),X<0?(X+=Y,X<0&&(X=0)):X>Y&&(X=Y),X<J&&(X=J);var he;if(c.TYPED_ARRAY_SUPPORT)he=this.subarray(J,X),he.__proto__=c.prototype;else{var de=X-J;he=new c(de,void 0);for(var Te=0;Te<de;++Te)he[Te]=this[Te+J]}return he};function H(ne,J,X){if(ne%1!==0||ne<0)throw new RangeError("offset is not uint");if(ne+J>X)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(J,X,Y){J=J|0,X=X|0,Y||H(J,X,this.length);for(var he=this[J],de=1,Te=0;++Te<X&&(de*=256);)he+=this[J+Te]*de;return he},c.prototype.readUIntBE=function(J,X,Y){J=J|0,X=X|0,Y||H(J,X,this.length);for(var he=this[J+--X],de=1;X>0&&(de*=256);)he+=this[J+--X]*de;return he},c.prototype.readUInt8=function(J,X){return X||H(J,1,this.length),this[J]},c.prototype.readUInt16LE=function(J,X){return X||H(J,2,this.length),this[J]|this[J+1]<<8},c.prototype.readUInt16BE=function(J,X){return X||H(J,2,this.length),this[J]<<8|this[J+1]},c.prototype.readUInt32LE=function(J,X){return X||H(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},c.prototype.readUInt32BE=function(J,X){return X||H(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},c.prototype.readIntLE=function(J,X,Y){J=J|0,X=X|0,Y||H(J,X,this.length);for(var he=this[J],de=1,Te=0;++Te<X&&(de*=256);)he+=this[J+Te]*de;return de*=128,he>=de&&(he-=Math.pow(2,8*X)),he},c.prototype.readIntBE=function(J,X,Y){J=J|0,X=X|0,Y||H(J,X,this.length);for(var he=X,de=1,Te=this[J+--he];he>0&&(de*=256);)Te+=this[J+--he]*de;return de*=128,Te>=de&&(Te-=Math.pow(2,8*X)),Te},c.prototype.readInt8=function(J,X){return X||H(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},c.prototype.readInt16LE=function(J,X){X||H(J,2,this.length);var Y=this[J]|this[J+1]<<8;return Y&32768?Y|4294901760:Y},c.prototype.readInt16BE=function(J,X){X||H(J,2,this.length);var Y=this[J+1]|this[J]<<8;return Y&32768?Y|4294901760:Y},c.prototype.readInt32LE=function(J,X){return X||H(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},c.prototype.readInt32BE=function(J,X){return X||H(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},c.prototype.readFloatLE=function(J,X){return X||H(J,4,this.length),D.read(this,J,!0,23,4)},c.prototype.readFloatBE=function(J,X){return X||H(J,4,this.length),D.read(this,J,!1,23,4)},c.prototype.readDoubleLE=function(J,X){return X||H(J,8,this.length),D.read(this,J,!0,52,8)},c.prototype.readDoubleBE=function(J,X){return X||H(J,8,this.length),D.read(this,J,!1,52,8)};function W(ne,J,X,Y,he,de){if(!c.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>he||J<de)throw new RangeError('"value" argument is out of bounds');if(X+Y>ne.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(J,X,Y,he){if(J=+J,X=X|0,Y=Y|0,!he){var de=Math.pow(2,8*Y)-1;W(this,J,X,Y,de,0)}var Te=1,ze=0;for(this[X]=J&255;++ze<Y&&(Te*=256);)this[X+ze]=J/Te&255;return X+Y},c.prototype.writeUIntBE=function(J,X,Y,he){if(J=+J,X=X|0,Y=Y|0,!he){var de=Math.pow(2,8*Y)-1;W(this,J,X,Y,de,0)}var Te=Y-1,ze=1;for(this[X+Te]=J&255;--Te>=0&&(ze*=256);)this[X+Te]=J/ze&255;return X+Y},c.prototype.writeUInt8=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,1,255,0),c.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function Q(ne,J,X,Y){J<0&&(J=65535+J+1);for(var he=0,de=Math.min(ne.length-X,2);he<de;++he)ne[X+he]=(J&255<<8*(Y?he:1-he))>>>(Y?he:1-he)*8}c.prototype.writeUInt16LE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):Q(this,J,X,!0),X+2},c.prototype.writeUInt16BE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):Q(this,J,X,!1),X+2};function ee(ne,J,X,Y){J<0&&(J=4294967295+J+1);for(var he=0,de=Math.min(ne.length-X,4);he<de;++he)ne[X+he]=J>>>(Y?he:3-he)*8&255}c.prototype.writeUInt32LE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):ee(this,J,X,!0),X+4},c.prototype.writeUInt32BE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):ee(this,J,X,!1),X+4},c.prototype.writeIntLE=function(J,X,Y,he){if(J=+J,X=X|0,!he){var de=Math.pow(2,8*Y-1);W(this,J,X,Y,de-1,-de)}var Te=0,ze=1,Ze=0;for(this[X]=J&255;++Te<Y&&(ze*=256);)J<0&&Ze===0&&this[X+Te-1]!==0&&(Ze=1),this[X+Te]=(J/ze>>0)-Ze&255;return X+Y},c.prototype.writeIntBE=function(J,X,Y,he){if(J=+J,X=X|0,!he){var de=Math.pow(2,8*Y-1);W(this,J,X,Y,de-1,-de)}var Te=Y-1,ze=1,Ze=0;for(this[X+Te]=J&255;--Te>=0&&(ze*=256);)J<0&&Ze===0&&this[X+Te+1]!==0&&(Ze=1),this[X+Te]=(J/ze>>0)-Ze&255;return X+Y},c.prototype.writeInt8=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,1,127,-128),c.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},c.prototype.writeInt16LE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):Q(this,J,X,!0),X+2},c.prototype.writeInt16BE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):Q(this,J,X,!1),X+2},c.prototype.writeInt32LE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):ee(this,J,X,!0),X+4},c.prototype.writeInt32BE=function(J,X,Y){return J=+J,X=X|0,Y||W(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),c.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):ee(this,J,X,!1),X+4};function q(ne,J,X,Y,he,de){if(X+Y>ne.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function pe(ne,J,X,Y,he){return he||q(ne,J,X,4,34028234663852886e22,-34028234663852886e22),D.write(ne,J,X,Y,23,4),X+4}c.prototype.writeFloatLE=function(J,X,Y){return pe(this,J,X,!0,Y)},c.prototype.writeFloatBE=function(J,X,Y){return pe(this,J,X,!1,Y)};function ye(ne,J,X,Y,he){return he||q(ne,J,X,8,17976931348623157e292,-17976931348623157e292),D.write(ne,J,X,Y,52,8),X+8}c.prototype.writeDoubleLE=function(J,X,Y){return ye(this,J,X,!0,Y)},c.prototype.writeDoubleBE=function(J,X,Y){return ye(this,J,X,!1,Y)},c.prototype.copy=function(J,X,Y,he){if(Y||(Y=0),!he&&he!==0&&(he=this.length),X>=J.length&&(X=J.length),X||(X=0),he>0&&he<Y&&(he=Y),he===Y)return 0;if(J.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(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),J.length-X<he-Y&&(he=J.length-X+Y);var de=he-Y,Te;if(this===J&&Y<X&&X<he)for(Te=de-1;Te>=0;--Te)J[Te+X]=this[Te+Y];else if(de<1e3||!c.TYPED_ARRAY_SUPPORT)for(Te=0;Te<de;++Te)J[Te+X]=this[Te+Y];else Uint8Array.prototype.set.call(J,this.subarray(Y,Y+de),X);return de},c.prototype.fill=function(J,X,Y,he){if(typeof J=="string"){if(typeof X=="string"?(he=X,X=0,Y=this.length):typeof Y=="string"&&(he=Y,Y=this.length),J.length===1){var de=J.charCodeAt(0);de<256&&(J=de)}if(he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!c.isEncoding(he))throw new TypeError("Unknown encoding: "+he)}else typeof J=="number"&&(J=J&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,J||(J=0);var Te;if(typeof J=="number")for(Te=X;Te<Y;++Te)this[Te]=J;else{var ze=c.isBuffer(J)?J:le(new c(J,he).toString()),Ze=ze.length;for(Te=0;Te<Y-X;++Te)this[Te+X]=ze[Te%Ze]}return this};var ie=/[^+\/0-9A-Za-z-_]/g;function Se(ne){if(ne=ge(ne).replace(ie,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function ge(ne){return ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")}function oe(ne){return ne<16?"0"+ne.toString(16):ne.toString(16)}function le(ne,J){J=J||Infinity;for(var X,Y=ne.length,he=null,de=[],Te=0;Te<Y;++Te){if(X=ne.charCodeAt(Te),X>55295&&X<57344){if(!he){if(X>56319){(J-=3)>-1&&de.push(239,191,189);continue}else if(Te+1===Y){(J-=3)>-1&&de.push(239,191,189);continue}he=X;continue}if(X<56320){(J-=3)>-1&&de.push(239,191,189),he=X;continue}X=(he-55296<<10|X-56320)+65536}else he&&((J-=3)>-1&&de.push(239,191,189));if(he=null,X<128){if((J-=1)<0)break;de.push(X)}else if(X<2048){if((J-=2)<0)break;de.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;de.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;de.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return de}function te(ne){for(var J=[],X=0;X<ne.length;++X)J.push(ne.charCodeAt(X)&255);return J}function be(ne,J){for(var X,Y,he,de=[],Te=0;Te<ne.length&&!((J-=2)<0);++Te)X=ne.charCodeAt(Te),Y=X>>8,he=X%256,de.push(he),de.push(Y);return de}function Z(ne){return _.toByteArray(Se(ne))}function ae(ne,J,X,Y){for(var he=0;he<Y&&!(he+X>=J.length||he>=ne.length);++he)J[he+X]=ne[he];return he}function Ee(ne){return ne!==ne}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(N,$,k){$.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(N,$,k){$.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(N,$,k){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=Array.prototype.slice;$.exports=c;function c(D,p){if(!(this instanceof c))return new c(D,p);this.src=D,this._withAccess=p}c.prototype.withAccess=function(D){return this._withAccess=D!==!1,this},c.prototype.pick=function(D){return Array.isArray(D)||(D=P.call(arguments)),D.length&&(this.keys=D),this},c.prototype.to=function(D){if(D=D||{},!this.src)return D;var p=this.keys||Object.keys(this.src);if(!this._withAccess){for(var s=0;s<p.length;s++){if(S=p[s],D[S]!==void 0)continue;D[S]=this.src[S]}return D}for(var s=0;s<p.length;s++){var S=p[s];if(!_(D,S))continue;var v=this.src.__lookupGetter__(S),o=this.src.__lookupSetter__(S);v&&D.__defineGetter__(S,v),o&&D.__defineSetter__(S,o),!v&&!o&&(D[S]=this.src[S])}return D},c.prototype.toCover=function(D){for(var p=this.keys||Object.keys(this.src),s=0;s<p.length;s++){var S=p[s];delete D[S];var v=this.src.__lookupGetter__(S),o=this.src.__lookupSetter__(S);v&&D.__defineGetter__(S,v),o&&D.__defineSetter__(S,o),!v&&!o&&(D[S]=this.src[S])}},c.prototype.override=c.prototype.toCover,c.prototype.and=function(D){var p={};return this.to(p),this.src=D,this.to(p),this.src=p,this};function _(D,p){return D[p]===void 0&&D.__lookupGetter__(p)===void 0&&D.__lookupSetter__(p)===void 0}},{}],77:[function(N,$,k){N("../../modules/es6.string.iterator"),N("../../modules/es6.array.from"),$.exports=N("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(N,$,k){var P=N("../../modules/_core"),c=P.JSON||(P.JSON={stringify:JSON.stringify});$.exports=function(D){return c.stringify.apply(c,arguments)}},{"../../modules/_core":99}],79:[function(N,$,k){N("../../modules/es6.object.assign"),$.exports=N("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(N,$,k){N("../../modules/es6.object.create");var P=N("../../modules/_core").Object;$.exports=function(_,D){return P.create(_,D)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(N,$,k){N("../../modules/es6.object.define-property");var P=N("../../modules/_core").Object;$.exports=function(_,D,p){return P.defineProperty(_,D,p)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(N,$,k){N("../../modules/es7.object.entries"),$.exports=N("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(N,$,k){N("../../modules/es6.object.get-own-property-names");var P=N("../../modules/_core").Object;$.exports=function(_){return P.getOwnPropertyNames(_)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(N,$,k){N("../../modules/es6.object.get-prototype-of"),$.exports=N("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(N,$,k){N("../../modules/es6.object.keys"),$.exports=N("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(N,$,k){N("../modules/es6.object.to-string"),N("../modules/es6.string.iterator"),N("../modules/web.dom.iterable"),N("../modules/es6.promise"),N("../modules/es7.promise.finally"),N("../modules/es7.promise.try"),$.exports=N("../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(N,$,k){N("../modules/web.immediate"),$.exports=N("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(N,$,k){N("../../modules/es6.string.from-code-point"),$.exports=N("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(N,$,k){N("../../modules/es6.function.has-instance"),$.exports=N("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(N,$,k){N("../../modules/es6.symbol"),N("../../modules/es6.object.to-string"),N("../../modules/es7.symbol.async-iterator"),N("../../modules/es7.symbol.observable"),$.exports=N("../../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(N,$,k){N("../../modules/es6.string.iterator"),N("../../modules/web.dom.iterable"),$.exports=N("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(N,$,k){$.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(N,$,k){$.exports=function(){}},{}],94:[function(N,$,k){$.exports=function(P,c,_,D){if(!(P instanceof c)||D!==void 0&&D in P)throw TypeError(_+": incorrect invocation!");return P}},{}],95:[function(N,$,k){var P=N("./_is-object");$.exports=function(c){if(!P(c))throw TypeError(c+" is not an object!");return c}},{"./_is-object":119}],96:[function(N,$,k){var P=N("./_to-iobject"),c=N("./_to-length"),_=N("./_to-absolute-index");$.exports=function(D){return function(p,s,S){var v=P(p),o=c(v.length),i=_(S,o),r;if(D&&s!=s){for(;o>i;)if(r=v[i++],r!=r)return!0}else for(;o>i;i++)if((D||i in v)&&v[i]===s)return D||i||0;return!D&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(N,$,k){var P=N("./_cof"),c=N("./_wks")("toStringTag"),_=P(function(){return arguments}())=="Arguments",D=function(p,s){try{return p[s]}catch(S){}};$.exports=function(p){var s,S,v;return p===void 0?"Undefined":p===null?"Null":typeof(S=D(s=Object(p),c))=="string"?S:_?P(s):(v=P(s))=="Object"&&typeof s.callee=="function"?"Arguments":v}},{"./_cof":98,"./_wks":166}],98:[function(N,$,k){var P={}.toString;$.exports=function(c){return P.call(c).slice(8,-1)}},{}],99:[function(N,$,k){var P=$.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(N,$,k){"use strict";var P=N("./_object-dp"),c=N("./_property-desc");$.exports=function(_,D,p){D in _?P.f(_,D,c(0,p)):_[D]=p}},{"./_object-dp":132,"./_property-desc":146}],101:[function(N,$,k){var P=N("./_a-function");$.exports=function(c,_,D){if(P(c),_===void 0)return c;switch(D){case 1:return function(p){return c.call(_,p)};case 2:return function(p,s){return c.call(_,p,s)};case 3:return function(p,s,S){return c.call(_,p,s,S)}}return function(){return c.apply(_,arguments)}}},{"./_a-function":92}],102:[function(N,$,k){$.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(N,$,k){$.exports=!N("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(N,$,k){var P=N("./_is-object"),c=N("./_global").document,_=P(c)&&P(c.createElement);$.exports=function(D){return _?c.createElement(D):{}}},{"./_global":110,"./_is-object":119}],105:[function(N,$,k){$.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(N,$,k){var P=N("./_object-keys"),c=N("./_object-gops"),_=N("./_object-pie");$.exports=function(D){var p=P(D),s=c.f;if(s)for(var S=s(D),v=_.f,o=0,i;S.length>o;)v.call(D,i=S[o++])&&p.push(i);return p}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(N,$,k){var P=N("./_global"),c=N("./_core"),_=N("./_ctx"),D=N("./_hide"),p=N("./_has"),s="prototype",S=function(v,o,i){var r=v&S.F,h=v&S.G,y=v&S.S,g=v&S.P,w=v&S.B,m=v&S.W,d=h?c:c[o]||(c[o]={}),n=d[s],l=h?P:y?P[o]:(P[o]||{})[s],u,T,E;h&&(i=o);for(u in i){if(T=!r&&l&&l[u]!==void 0,T&&p(d,u))continue;E=T?l[u]:i[u],d[u]=h&&typeof l[u]!="function"?i[u]:w&&T?_(E,P):m&&l[u]==E?function(a){var L=function(O,f,x){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(O);case 2:return new a(O,f)}return new a(O,f,x)}return a.apply(this,arguments)};return L[s]=a[s],L}(E):g&&typeof E=="function"?_(Function.call,E):E,g&&((d.virtual||(d.virtual={}))[u]=E,v&S.R&&n&&!n[u]&&D(n,u,E))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,$.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(N,$,k){$.exports=function(P){try{return!!P()}catch(c){return!0}}},{}],109:[function(N,$,k){var P=N("./_ctx"),c=N("./_iter-call"),_=N("./_is-array-iter"),D=N("./_an-object"),p=N("./_to-length"),s=N("./core.get-iterator-method"),S={},v={},k=$.exports=function(o,i,r,h,y){var g=y?function(){return o}:s(o),w=P(r,h,i?2:1),m=0,d,n,l,u;if(typeof g!="function")throw TypeError(o+" is not iterable!");if(_(g)){for(d=p(o.length);d>m;m++)if(u=i?w(D(n=o[m])[0],n[1]):w(o[m]),u===S||u===v)return u}else for(l=g.call(o);!(n=l.next()).done;)if(u=c(l,w,n.value,i),u===S||u===v)return u};k.BREAK=S,k.RETURN=v},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(N,$,k){var P=$.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(N,$,k){var P={}.hasOwnProperty;$.exports=function(c,_){return P.call(c,_)}},{}],112:[function(N,$,k){var P=N("./_object-dp"),c=N("./_property-desc");$.exports=N("./_descriptors")?function(_,D,p){return P.f(_,D,c(1,p))}:function(_,D,p){return _[D]=p,_}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(N,$,k){var P=N("./_global").document;$.exports=P&&P.documentElement},{"./_global":110}],114:[function(N,$,k){$.exports=!N("./_descriptors")&&!N("./_fails")(function(){return Object.defineProperty(N("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(N,$,k){$.exports=function(P,c,_){var D=_===void 0;switch(c.length){case 0:return D?P():P.call(_);case 1:return D?P(c[0]):P.call(_,c[0]);case 2:return D?P(c[0],c[1]):P.call(_,c[0],c[1]);case 3:return D?P(c[0],c[1],c[2]):P.call(_,c[0],c[1],c[2]);case 4:return D?P(c[0],c[1],c[2],c[3]):P.call(_,c[0],c[1],c[2],c[3])}return P.apply(_,c)}},{}],116:[function(N,$,k){var P=N("./_cof");$.exports=Object("z").propertyIsEnumerable(0)?Object:function(c){return P(c)=="String"?c.split(""):Object(c)}},{"./_cof":98}],117:[function(N,$,k){var P=N("./_iterators"),c=N("./_wks")("iterator"),_=Array.prototype;$.exports=function(D){return D!==void 0&&(P.Array===D||_[c]===D)}},{"./_iterators":125,"./_wks":166}],118:[function(N,$,k){var P=N("./_cof");$.exports=Array.isArray||function(_){return P(_)=="Array"}},{"./_cof":98}],119:[function(N,$,k){$.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(N,$,k){var P=N("./_an-object");$.exports=function(c,_,D,p){try{return p?_(P(D)[0],D[1]):_(D)}catch(S){var s=c.return;throw s!==void 0&&P(s.call(c)),S}}},{"./_an-object":95}],121:[function(N,$,k){"use strict";var P=N("./_object-create"),c=N("./_property-desc"),_=N("./_set-to-string-tag"),D={};N("./_hide")(D,N("./_wks")("iterator"),function(){return this}),$.exports=function(p,s,S){p.prototype=P(D,{next:c(1,S)}),_(p,s+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(N,$,k){"use strict";var P=N("./_library"),c=N("./_export"),_=N("./_redefine"),D=N("./_hide"),p=N("./_iterators"),s=N("./_iter-create"),S=N("./_set-to-string-tag"),v=N("./_object-gpo"),o=N("./_wks")("iterator"),i=!([].keys&&"next"in[].keys()),r="@@iterator",h="keys",y="values",g=function(){return this};$.exports=function(w,m,d,n,l,u,T){s(d,m,n);var E=function(G){if(!i&&G in f)return f[G];switch(G){case h:return function(){return new d(this,G)};case y:return function(){return new d(this,G)}}return function(){return new d(this,G)}},a=m+" Iterator",L=l==y,O=!1,f=w.prototype,x=f[o]||f[r]||l&&f[l],b=x||E(l),C=l?L?E("entries"):b:void 0,I=m=="Array"&&f.entries||x,j,M,z;if(I&&(z=v(I.call(new w)),z!==Object.prototype&&z.next&&(S(z,a,!0),!P&&typeof z[o]!="function"&&D(z,o,g))),L&&x&&x.name!==y&&(O=!0,b=function(){return x.call(this)}),(!P||T)&&(i||O||!f[o])&&D(f,o,b),p[m]=b,p[a]=g,l)if(j={values:L?b:E(y),keys:u?b:E(h),entries:C},T)for(M in j)M in f||_(f,M,j[M]);else c(c.P+c.F*(i||O),m,j);return j}},{"./_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(N,$,k){var P=N("./_wks")("iterator"),c=!1;try{var _=[7][P]();_.return=function(){c=!0},Array.from(_,function(){throw 2})}catch(D){}$.exports=function(D,p){if(!p&&!c)return!1;var s=!1;try{var S=[7],v=S[P]();v.next=function(){return{done:s=!0}},S[P]=function(){return v},D(S)}catch(o){}return s}},{"./_wks":166}],124:[function(N,$,k){$.exports=function(P,c){return{value:c,done:!!P}}},{}],125:[function(N,$,k){$.exports={}},{}],126:[function(N,$,k){$.exports=!0},{}],127:[function(N,$,k){var P=N("./_uid")("meta"),c=N("./_is-object"),_=N("./_has"),D=N("./_object-dp").f,p=0,s=Object.isExtensible||function(){return!0},S=!N("./_fails")(function(){return s(Object.preventExtensions({}))}),v=function(y){D(y,P,{value:{i:"O"+ ++p,w:{}}})},o=function(y,g){if(!c(y))return typeof y=="symbol"?y:(typeof y=="string"?"S":"P")+y;if(!_(y,P)){if(!s(y))return"F";if(!g)return"E";v(y)}return y[P].i},i=function(y,g){if(!_(y,P)){if(!s(y))return!0;if(!g)return!1;v(y)}return y[P].w},r=function(y){return S&&h.NEED&&s(y)&&!_(y,P)&&v(y),y},h=$.exports={KEY:P,NEED:!1,fastKey:o,getWeak:i,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(N,$,k){var P=N("./_global"),c=N("./_task").set,_=P.MutationObserver||P.WebKitMutationObserver,D=P.process,p=P.Promise,s=N("./_cof")(D)=="process";$.exports=function(){var S,v,o,i=function(){var g,w;for(s&&(g=D.domain)&&g.exit();S;){w=S.fn,S=S.next;try{w()}catch(m){throw S?o():v=void 0,m}}v=void 0,g&&g.enter()};if(s)o=function(){D.nextTick(i)};else if(_&&!(P.navigator&&P.navigator.standalone)){var r=!0,h=document.createTextNode("");new _(i).observe(h,{characterData:!0}),o=function(){h.data=r=!r}}else if(p&&p.resolve){var y=p.resolve(void 0);o=function(){y.then(i)}}else o=function(){c.call(P,i)};return function(g){var w={fn:g,next:void 0};v&&(v.next=w),S||(S=w,o()),v=w}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(N,$,k){"use strict";var P=N("./_a-function");function c(_){var D,p;this.promise=new _(function(s,S){if(D!==void 0||p!==void 0)throw TypeError("Bad Promise constructor");D=s,p=S}),this.resolve=P(D),this.reject=P(p)}$.exports.f=function(_){return new c(_)}},{"./_a-function":92}],130:[function(N,$,k){"use strict";var P=N("./_descriptors"),c=N("./_object-keys"),_=N("./_object-gops"),D=N("./_object-pie"),p=N("./_to-object"),s=N("./_iobject"),S=Object.assign;$.exports=!S||N("./_fails")(function(){var v={},o={},i=Symbol(),r="abcdefghijklmnopqrst";return v[i]=7,r.split("").forEach(function(h){o[h]=h}),S({},v)[i]!=7||Object.keys(S({},o)).join("")!=r})?function(o,i){for(var r=p(o),h=arguments.length,y=1,g=_.f,w=D.f;h>y;)for(var m=s(arguments[y++]),d=g?c(m).concat(g(m)):c(m),n=d.length,l=0,u;n>l;)u=d[l++],(!P||w.call(m,u))&&(r[u]=m[u]);return r}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(N,$,k){var P=N("./_an-object"),c=N("./_object-dps"),_=N("./_enum-bug-keys"),D=N("./_shared-key")("IE_PROTO"),p=function(){},s="prototype",S=function(){var v=N("./_dom-create")("iframe"),o=_.length,i="<",r=">",h;for(v.style.display="none",N("./_html").appendChild(v),v.src="javascript:",h=v.contentWindow.document,h.open(),h.write(i+"script"+r+"document.F=Object"+i+"/script"+r),h.close(),S=h.F;o--;)delete S[s][_[o]];return S()};$.exports=Object.create||function(o,i){var r;return o!==null?(p[s]=P(o),r=new p,p[s]=null,r[D]=o):r=S(),i===void 0?r:c(r,i)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(N,$,k){var P=N("./_an-object"),c=N("./_ie8-dom-define"),_=N("./_to-primitive"),D=Object.defineProperty;k.f=N("./_descriptors")?Object.defineProperty:function(s,S,v){if(P(s),S=_(S,!0),P(v),c)try{return D(s,S,v)}catch(o){}if("get"in v||"set"in v)throw TypeError("Accessors not supported!");return"value"in v&&(s[S]=v.value),s}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(N,$,k){var P=N("./_object-dp"),c=N("./_an-object"),_=N("./_object-keys");$.exports=N("./_descriptors")?Object.defineProperties:function(p,s){c(p);for(var S=_(s),v=S.length,o=0,i;v>o;)P.f(p,i=S[o++],s[i]);return p}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(N,$,k){var P=N("./_object-pie"),c=N("./_property-desc"),_=N("./_to-iobject"),D=N("./_to-primitive"),p=N("./_has"),s=N("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;k.f=N("./_descriptors")?S:function(o,i){if(o=_(o),i=D(i,!0),s)try{return S(o,i)}catch(r){}if(p(o,i))return c(!P.f.call(o,i),o[i])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(N,$,k){var P=N("./_to-iobject"),c=N("./_object-gopn").f,_={}.toString,D=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(s){try{return c(s)}catch(S){return D.slice()}};$.exports.f=function(S){return D&&_.call(S)=="[object Window]"?p(S):c(P(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(N,$,k){var P=N("./_object-keys-internal"),c=N("./_enum-bug-keys").concat("length","prototype");k.f=Object.getOwnPropertyNames||function(D){return P(D,c)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(N,$,k){k.f=Object.getOwnPropertySymbols},{}],138:[function(N,$,k){var P=N("./_has"),c=N("./_to-object"),_=N("./_shared-key")("IE_PROTO"),D=Object.prototype;$.exports=Object.getPrototypeOf||function(p){return p=c(p),P(p,_)?p[_]:typeof p.constructor=="function"&&p instanceof p.constructor?p.constructor.prototype:p instanceof Object?D:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(N,$,k){var P=N("./_has"),c=N("./_to-iobject"),_=N("./_array-includes")(!1),D=N("./_shared-key")("IE_PROTO");$.exports=function(p,s){var S=c(p),v=0,o=[],i;for(i in S)i!=D&&(P(S,i)&&o.push(i));for(;s.length>v;)P(S,i=s[v++])&&(~_(o,i)||o.push(i));return o}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(N,$,k){var P=N("./_object-keys-internal"),c=N("./_enum-bug-keys");$.exports=Object.keys||function(D){return P(D,c)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(N,$,k){k.f={}.propertyIsEnumerable},{}],142:[function(N,$,k){var P=N("./_export"),c=N("./_core"),_=N("./_fails");$.exports=function(D,p){var s=(c.Object||{})[D]||Object[D],S={};S[D]=p(s),P(P.S+P.F*_(function(){s(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(N,$,k){var P=N("./_descriptors"),c=N("./_object-keys"),_=N("./_to-iobject"),D=N("./_object-pie").f;$.exports=function(p){return function(s){for(var S=_(s),v=c(S),o=v.length,i=0,r=[],h;o>i;)h=v[i++],(!P||D.call(S,h))&&r.push(p?[h,S[h]]:S[h]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(N,$,k){$.exports=function(P){try{return{e:!1,v:P()}}catch(c){return{e:!0,v:c}}}},{}],145:[function(N,$,k){var P=N("./_an-object"),c=N("./_is-object"),_=N("./_new-promise-capability");$.exports=function(D,p){if(P(D),c(p)&&p.constructor===D)return p;var s=_.f(D),S=s.resolve;return S(p),s.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(N,$,k){$.exports=function(P,c){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:c}}},{}],147:[function(N,$,k){var P=N("./_hide");$.exports=function(c,_,D){for(var p in _)D&&c[p]?c[p]=_[p]:P(c,p,_[p]);return c}},{"./_hide":112}],148:[function(N,$,k){$.exports=N("./_hide")},{"./_hide":112}],149:[function(N,$,k){"use strict";var P=N("./_global"),c=N("./_core"),_=N("./_object-dp"),D=N("./_descriptors"),p=N("./_wks")("species");$.exports=function(s){var S=typeof c[s]=="function"?c[s]:P[s];D&&S&&!S[p]&&_.f(S,p,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(N,$,k){var P=N("./_object-dp").f,c=N("./_has"),_=N("./_wks")("toStringTag");$.exports=function(D,p,s){D&&!c(D=s?D:D.prototype,_)&&P(D,_,{configurable:!0,value:p})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(N,$,k){var P=N("./_shared")("keys"),c=N("./_uid");$.exports=function(_){return P[_]||(P[_]=c(_))}},{"./_shared":152,"./_uid":162}],152:[function(N,$,k){var P=N("./_core"),c=N("./_global"),_="__core-js_shared__",D=c[_]||(c[_]={});($.exports=function(p,s){return D[p]||(D[p]=s!==void 0?s:{})})("versions",[]).push({version:P.version,mode:N("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(N,$,k){var P=N("./_an-object"),c=N("./_a-function"),_=N("./_wks")("species");$.exports=function(D,p){var s=P(D).constructor,S;return s===void 0||(S=P(s)[_])==null?p:c(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(N,$,k){var P=N("./_to-integer"),c=N("./_defined");$.exports=function(_){return function(D,p){var s=String(c(D)),S=P(p),v=s.length,o,i;return S<0||S>=v?_?"":void 0:(o=s.charCodeAt(S),o<55296||o>56319||S+1===v||(i=s.charCodeAt(S+1))<56320||i>57343?_?s.charAt(S):o:_?s.slice(S,S+2):(o-55296<<10)+(i-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(N,$,k){var P=N("./_ctx"),c=N("./_invoke"),_=N("./_html"),D=N("./_dom-create"),p=N("./_global"),s=p.process,S=p.setImmediate,v=p.clearImmediate,o=p.MessageChannel,i=p.Dispatch,r=0,h={},y="onreadystatechange",g,w,m,d=function(){var l=+this;if(h.hasOwnProperty(l)){var u=h[l];delete h[l],u()}},n=function(l){d.call(l.data)};(!S||!v)&&(S=function(u){for(var T=[],E=1;arguments.length>E;)T.push(arguments[E++]);return h[++r]=function(){c(typeof u=="function"?u:Function(u),T)},g(r),r},v=function(u){delete h[u]},N("./_cof")(s)=="process"?g=function(l){s.nextTick(P(d,l,1))}:i&&i.now?g=function(l){i.now(P(d,l,1))}:o?(w=new o,m=w.port2,w.port1.onmessage=n,g=P(m.postMessage,m,1)):p.addEventListener&&typeof postMessage=="function"&&!p.importScripts?(g=function(l){p.postMessage(l+"","*")},p.addEventListener("message",n,!1)):y in D("script")?g=function(l){_.appendChild(D("script"))[y]=function(){_.removeChild(this),d.call(l)}}:g=function(l){setTimeout(P(d,l,1),0)}),$.exports={set:S,clear:v}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(N,$,k){var P=N("./_to-integer"),c=Math.max,_=Math.min;$.exports=function(D,p){return D=P(D),D<0?c(D+p,0):_(D,p)}},{"./_to-integer":157}],157:[function(N,$,k){var P=Math.ceil,c=Math.floor;$.exports=function(_){return isNaN(_=+_)?0:(_>0?c:P)(_)}},{}],158:[function(N,$,k){var P=N("./_iobject"),c=N("./_defined");$.exports=function(_){return P(c(_))}},{"./_defined":102,"./_iobject":116}],159:[function(N,$,k){var P=N("./_to-integer"),c=Math.min;$.exports=function(_){return _>0?c(P(_),9007199254740991):0}},{"./_to-integer":157}],160:[function(N,$,k){var P=N("./_defined");$.exports=function(c){return Object(P(c))}},{"./_defined":102}],161:[function(N,$,k){var P=N("./_is-object");$.exports=function(c,_){if(!P(c))return c;var D,p;if(_&&typeof(D=c.toString)=="function"&&!P(p=D.call(c)))return p;if(typeof(D=c.valueOf)=="function"&&!P(p=D.call(c)))return p;if(!_&&typeof(D=c.toString)=="function"&&!P(p=D.call(c)))return p;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(N,$,k){var P=0,c=Math.random();$.exports=function(_){return"Symbol(".concat(_===void 0?"":_,")_",(++P+c).toString(36))}},{}],163:[function(N,$,k){var P=N("./_global"),c=P.navigator;$.exports=c&&c.userAgent||""},{"./_global":110}],164:[function(N,$,k){var P=N("./_global"),c=N("./_core"),_=N("./_library"),D=N("./_wks-ext"),p=N("./_object-dp").f;$.exports=function(s){var S=c.Symbol||(c.Symbol=_?{}:P.Symbol||{});s.charAt(0)!="_"&&!(s in S)&&p(S,s,{value:D.f(s)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(N,$,k){k.f=N("./_wks")},{"./_wks":166}],166:[function(N,$,k){var P=N("./_shared")("wks"),c=N("./_uid"),_=N("./_global").Symbol,D=typeof _=="function",p=$.exports=function(s){return P[s]||(P[s]=D&&_[s]||(D?_:c)("Symbol."+s))};p.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(N,$,k){var P=N("./_classof"),c=N("./_wks")("iterator"),_=N("./_iterators");$.exports=N("./_core").getIteratorMethod=function(D){if(D!=null)return D[c]||D["@@iterator"]||_[P(D)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(N,$,k){"use strict";var P=N("./_ctx"),c=N("./_export"),_=N("./_to-object"),D=N("./_iter-call"),p=N("./_is-array-iter"),s=N("./_to-length"),S=N("./_create-property"),v=N("./core.get-iterator-method");c(c.S+c.F*!N("./_iter-detect")(function(o){Array.from(o)}),"Array",{from:function(i){var r=_(i),h=typeof this=="function"?this:Array,y=arguments.length,g=y>1?arguments[1]:void 0,w=g!==void 0,m=0,d=v(r),n,l,u,T;if(w&&(g=P(g,y>2?arguments[2]:void 0,2)),d!=null&&!(h==Array&&p(d)))for(T=d.call(r),l=new h;!(u=T.next()).done;m++)S(l,m,w?D(T,g,[u.value,m],!0):u.value);else for(n=s(r.length),l=new h(n);n>m;m++)S(l,m,w?g(r[m],m):r[m]);return l.length=m,l}})},{"./_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(N,$,k){"use strict";var P=N("./_add-to-unscopables"),c=N("./_iter-step"),_=N("./_iterators"),D=N("./_to-iobject");$.exports=N("./_iter-define")(Array,"Array",function(p,s){this._t=D(p),this._i=0,this._k=s},function(){var p=this._t,s=this._k,S=this._i++;return!p||S>=p.length?(this._t=void 0,c(1)):s=="keys"?c(0,S):s=="values"?c(0,p[S]):c(0,[S,p[S]])},"values"),_.Arguments=_.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(N,$,k){"use strict";var P=N("./_is-object"),c=N("./_object-gpo"),_=N("./_wks")("hasInstance"),D=Function.prototype;_ in D||N("./_object-dp").f(D,_,{value:function(p){if(typeof this!="function"||!P(p))return!1;if(!P(this.prototype))return p instanceof this;for(;p=c(p);)if(this.prototype===p)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(N,$,k){var P=N("./_export");P(P.S+P.F,"Object",{assign:N("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(N,$,k){var P=N("./_export");P(P.S,"Object",{create:N("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(N,$,k){var P=N("./_export");P(P.S+P.F*!N("./_descriptors"),"Object",{defineProperty:N("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(N,$,k){N("./_object-sap")("getOwnPropertyNames",function(){return N("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(N,$,k){var P=N("./_to-object"),c=N("./_object-gpo");N("./_object-sap")("getPrototypeOf",function(){return function(D){return c(P(D))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(N,$,k){var P=N("./_to-object"),c=N("./_object-keys");N("./_object-sap")("keys",function(){return function(D){return c(P(D))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(N,$,k){arguments[4][71][0].apply(k,arguments)},{dup:71}],178:[function(N,$,k){"use strict";var P=N("./_library"),c=N("./_global"),_=N("./_ctx"),D=N("./_classof"),p=N("./_export"),s=N("./_is-object"),S=N("./_a-function"),v=N("./_an-instance"),o=N("./_for-of"),i=N("./_species-constructor"),r=N("./_task").set,h=N("./_microtask")(),y=N("./_new-promise-capability"),g=N("./_perform"),w=N("./_user-agent"),m=N("./_promise-resolve"),d="Promise",n=c.TypeError,l=c.process,u=l&&l.versions,T=u&&u.v8||"",E=c[d],a=D(l)=="process",L=function(){},O,f,x,b,C=f=y.f,I=!!function(){try{var H=E.resolve(1),W=(H.constructor={})[N("./_wks")("species")]=function(Q){Q(L,L)};return(a||typeof PromiseRejectionEvent=="function")&&H.then(L)instanceof W&&T.indexOf("6.6")!==0&&w.indexOf("Chrome/66")===-1}catch(Q){}}(),j=function(H){var W;return s(H)&&typeof(W=H.then)=="function"?W:!1},M=function(H,W){if(H._n)return;H._n=!0;var Q=H._c;h(function(){for(var ee=H._v,q=H._s==1,pe=0,ye=function(ie){var Se=q?ie.ok:ie.fail,ge=ie.resolve,oe=ie.reject,le=ie.domain,te,be,Z;try{Se?(q||(H._h==2&&B(H),H._h=1),Se===!0?te=ee:(le&&le.enter(),te=Se(ee),le&&(le.exit(),Z=!0)),te===ie.promise?oe(n("Promise-chain cycle")):(be=j(te))?be.call(te,ge,oe):ge(te)):oe(ee)}catch(ae){le&&!Z&&le.exit(),oe(ae)}};Q.length>pe;)ye(Q[pe++]);H._c=[],H._n=!1,W&&!H._h&&z(H)})},z=function(H){r.call(c,function(){var W=H._v,Q=G(H),ee,q,pe;if(Q&&(ee=g(function(){a?l.emit("unhandledRejection",W,H):(q=c.onunhandledrejection)?q({promise:H,reason:W}):(pe=c.console)&&pe.error&&pe.error("Unhandled promise rejection",W)}),H._h=a||G(H)?2:1),H._a=void 0,Q&&ee.e)throw ee.v})},G=function(H){return H._h!==1&&(H._a||H._c).length===0},B=function(H){r.call(c,function(){var W;a?l.emit("rejectionHandled",H):(W=c.onrejectionhandled)&&W({promise:H,reason:H._v})})},K=function(H){var W=this;if(W._d)return;W._d=!0,W=W._w||W,W._v=H,W._s=2,W._a||(W._a=W._c.slice()),M(W,!0)},F=function(H){var W=this,Q;if(W._d)return;W._d=!0,W=W._w||W;try{if(W===H)throw n("Promise can't be resolved itself");(Q=j(H))?h(function(){var ee={_w:W,_d:!1};try{Q.call(H,_(F,ee,1),_(K,ee,1))}catch(q){K.call(ee,q)}}):(W._v=H,W._s=1,M(W,!1))}catch(ee){K.call({_w:W,_d:!1},ee)}};I||(E=function(W){v(this,E,d,"_h"),S(W),O.call(this);try{W(_(F,this,1),_(K,this,1))}catch(Q){K.call(this,Q)}},O=function(W){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=N("./_redefine-all")(E.prototype,{then:function(W,Q){var ee=C(i(this,E));return ee.ok=typeof W=="function"?W:!0,ee.fail=typeof Q=="function"&&Q,ee.domain=a?l.domain:void 0,this._c.push(ee),this._a&&this._a.push(ee),this._s&&M(this,!1),ee.promise},catch:function(H){return this.then(void 0,H)}}),x=function(){var H=new O;this.promise=H,this.resolve=_(F,H,1),this.reject=_(K,H,1)},y.f=C=function(H){return H===E||H===b?new x(H):f(H)}),p(p.G+p.W+p.F*!I,{Promise:E}),N("./_set-to-string-tag")(E,d),N("./_set-species")(d),b=N("./_core")[d],p(p.S+p.F*!I,d,{reject:function(W){var Q=C(this),ee=Q.reject;return ee(W),Q.promise}}),p(p.S+p.F*(P||!I),d,{resolve:function(W){return m(P&&this===b?E:this,W)}}),p(p.S+p.F*!(I&&N("./_iter-detect")(function(H){E.all(H).catch(L)})),d,{all:function(W){var Q=this,ee=C(Q),q=ee.resolve,pe=ee.reject,ye=g(function(){var ie=[],Se=0,ge=1;o(W,!1,function(oe){var le=Se++,te=!1;ie.push(void 0),ge++,Q.resolve(oe).then(function(be){if(te)return;te=!0,ie[le]=be,--ge||q(ie)},pe)}),--ge||q(ie)});return ye.e&&pe(ye.v),ee.promise},race:function(W){var Q=this,ee=C(Q),q=ee.reject,pe=g(function(){o(W,!1,function(ye){Q.resolve(ye).then(ee.resolve,q)})});return pe.e&&q(pe.v),ee.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(N,$,k){var P=N("./_export"),c=N("./_to-absolute-index"),_=String.fromCharCode,D=String.fromCodePoint;P(P.S+P.F*(!!D&&D.length!=1),"String",{fromCodePoint:function(s){for(var S=[],v=arguments.length,o=0,i;v>o;){if(i=+arguments[o++],c(i,1114111)!==i)throw RangeError(i+" is not a valid code point");S.push(i<65536?_(i):_(((i-=65536)>>10)+55296,i%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(N,$,k){"use strict";var P=N("./_string-at")(!0);N("./_iter-define")(String,"String",function(c){this._t=String(c),this._i=0},function(){var c=this._t,_=this._i,D;return _>=c.length?{value:void 0,done:!0}:(D=P(c,_),this._i+=D.length,{value:D,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(N,$,k){"use strict";var P=N("./_global"),c=N("./_has"),_=N("./_descriptors"),D=N("./_export"),p=N("./_redefine"),s=N("./_meta").KEY,S=N("./_fails"),v=N("./_shared"),o=N("./_set-to-string-tag"),i=N("./_uid"),r=N("./_wks"),h=N("./_wks-ext"),y=N("./_wks-define"),g=N("./_enum-keys"),w=N("./_is-array"),m=N("./_an-object"),d=N("./_is-object"),n=N("./_to-object"),l=N("./_to-iobject"),u=N("./_to-primitive"),T=N("./_property-desc"),E=N("./_object-create"),a=N("./_object-gopn-ext"),L=N("./_object-gopd"),O=N("./_object-gops"),f=N("./_object-dp"),x=N("./_object-keys"),b=L.f,C=f.f,I=a.f,j=P.Symbol,M=P.JSON,z=M&&M.stringify,G="prototype",B=r("_hidden"),K=r("toPrimitive"),F={}.propertyIsEnumerable,H=v("symbol-registry"),W=v("symbols"),Q=v("op-symbols"),ee=Object[G],q=typeof j=="function"&&!!O.f,pe=P.QObject,ye=!pe||!pe[G]||!pe[G].findChild,ie=_&&S(function(){return E(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a!=7})?function(de,Te,ze){var Ze=b(ee,Te);Ze&&delete ee[Te],C(de,Te,ze),Ze&&de!==ee&&C(ee,Te,Ze)}:C,Se=function(de){var Te=W[de]=E(j[G]);return Te._k=de,Te},ge=q&&typeof j.iterator=="symbol"?function(de){return typeof de=="symbol"}:function(de){return de instanceof j},oe=function(Te,ze,Ze){return Te===ee&&oe(Q,ze,Ze),m(Te),ze=u(ze,!0),m(Ze),c(W,ze)?(Ze.enumerable?(c(Te,B)&&Te[B][ze]&&(Te[B][ze]=!1),Ze=E(Ze,{enumerable:T(0,!1)})):(c(Te,B)||C(Te,B,T(1,{})),Te[B][ze]=!0),ie(Te,ze,Ze)):C(Te,ze,Ze)},le=function(Te,ze){m(Te);for(var Ze=g(ze=l(ze)),Je=0,$e=Ze.length,tt;$e>Je;)oe(Te,tt=Ze[Je++],ze[tt]);return Te},te=function(Te,ze){return ze===void 0?E(Te):le(E(Te),ze)},be=function(Te){var ze=F.call(this,Te=u(Te,!0));return this===ee&&c(W,Te)&&!c(Q,Te)?!1:ze||!c(this,Te)||!c(W,Te)||c(this,B)&&this[B][Te]?ze:!0},Z=function(Te,ze){if(Te=l(Te),ze=u(ze,!0),Te===ee&&c(W,ze)&&!c(Q,ze))return;var Ze=b(Te,ze);return Ze&&c(W,ze)&&!(c(Te,B)&&Te[B][ze])&&(Ze.enumerable=!0),Ze},ae=function(Te){for(var ze=I(l(Te)),Ze=[],Je=0,$e;ze.length>Je;)!c(W,$e=ze[Je++])&&$e!=B&&$e!=s&&Ze.push($e);return Ze},Ee=function(Te){for(var ze=Te===ee,Ze=I(ze?Q:l(Te)),Je=[],$e=0,tt;Ze.length>$e;)c(W,tt=Ze[$e++])&&(ze?c(ee,tt):!0)&&Je.push(W[tt]);return Je};q||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var Te=i(arguments.length>0?arguments[0]:void 0),ze=function(Ze){this===ee&&ze.call(Q,Ze),c(this,B)&&c(this[B],Te)&&(this[B][Te]=!1),ie(this,Te,T(1,Ze))};return _&&ye&&ie(ee,Te,{configurable:!0,set:ze}),Se(Te)},p(j[G],"toString",function(){return this._k}),L.f=Z,f.f=oe,N("./_object-gopn").f=a.f=ae,N("./_object-pie").f=be,O.f=Ee,_&&!N("./_library")&&p(ee,"propertyIsEnumerable",be,!0),h.f=function(de){return Se(r(de))}),D(D.G+D.W+D.F*!q,{Symbol:j});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;ne.length>J;)r(ne[J++]);for(var X=x(r.store),Y=0;X.length>Y;)y(X[Y++]);D(D.S+D.F*!q,"Symbol",{for:function(de){return c(H,de+="")?H[de]:H[de]=j(de)},keyFor:function(Te){if(!ge(Te))throw TypeError(Te+" is not a symbol!");for(var ze in H)if(H[ze]===Te)return ze},useSetter:function(){ye=!0},useSimple:function(){ye=!1}}),D(D.S+D.F*!q,"Object",{create:te,defineProperty:oe,defineProperties:le,getOwnPropertyDescriptor:Z,getOwnPropertyNames:ae,getOwnPropertySymbols:Ee});var he=S(function(){O.f(1)});D(D.S+D.F*he,"Object",{getOwnPropertySymbols:function(Te){return O.f(n(Te))}}),M&&D(D.S+D.F*(!q||S(function(){var de=j();return z([de])!="[null]"||z({a:de})!="{}"||z(Object(de))!="{}"})),"JSON",{stringify:function(Te){for(var ze=[Te],Ze=1,Je,$e;arguments.length>Ze;)ze.push(arguments[Ze++]);return $e=Je=ze[1],!d(Je)&&Te===void 0||ge(Te)?void 0:(w(Je)||(Je=function(tt,nt){if(typeof $e=="function"&&(nt=$e.call(this,tt,nt)),!ge(nt))return nt}),ze[1]=Je,z.apply(M,ze))}}),j[G][K]||N("./_hide")(j[G],K,j[G].valueOf),o(j,"Symbol"),o(Math,"Math",!0),o(P.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(N,$,k){var P=N("./_export"),c=N("./_object-to-array")(!0);P(P.S,"Object",{entries:function(D){return c(D)}})},{"./_export":107,"./_object-to-array":143}],183:[function(N,$,k){"use strict";var P=N("./_export"),c=N("./_core"),_=N("./_global"),D=N("./_species-constructor"),p=N("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(s){var S=D(this,c.Promise||_.Promise),v=typeof s=="function";return this.then(v?function(o){return p(S,s()).then(function(){return o})}:s,v?function(o){return p(S,s()).then(function(){throw o})}:s)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(N,$,k){"use strict";var P=N("./_export"),c=N("./_new-promise-capability"),_=N("./_perform");P(P.S,"Promise",{try:function(D){var p=c.f(this),s=_(D);return(s.e?p.reject:p.resolve)(s.v),p.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(N,$,k){N("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(N,$,k){N("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(N,$,k){N("./es6.array.iterator");for(var P=N("./_global"),c=N("./_hide"),_=N("./_iterators"),D=N("./_wks")("toStringTag"),p="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(","),s=0;s<p.length;s++){var S=p[s],v=P[S],o=v&&v.prototype;o&&!o[D]&&c(o,D,S),_[S]=_.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(N,$,k){var P=N("./_export"),c=N("./_task");P(P.G+P.B,{setImmediate:c.set,clearImmediate:c.clear})},{"./_export":107,"./_task":155}],189:[function(N,$,k){(function(P){"use strict";var c=N("babel-runtime/helpers/typeof"),_=D(c);function D(u){return u&&u.__esModule?u:{default:u}}function p(u){return Array.isArray?Array.isArray(u):l(u)==="[object Array]"}k.isArray=p;function s(u){return typeof u=="boolean"}k.isBoolean=s;function S(u){return u===null}k.isNull=S;function v(u){return u==null}k.isNullOrUndefined=v;function o(u){return typeof u=="number"}k.isNumber=o;function i(u){return typeof u=="string"}k.isString=i;function r(u){return(typeof u=="undefined"?"undefined":(0,_.default)(u))==="symbol"}k.isSymbol=r;function h(u){return u===void 0}k.isUndefined=h;function y(u){return l(u)==="[object RegExp]"}k.isRegExp=y;function g(u){return(typeof u=="undefined"?"undefined":(0,_.default)(u))==="object"&&u!==null}k.isObject=g;function w(u){return l(u)==="[object Date]"}k.isDate=w;function m(u){return l(u)==="[object Error]"||u instanceof Error}k.isError=m;function d(u){return typeof u=="function"}k.isFunction=d;function n(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||(typeof u=="undefined"?"undefined":(0,_.default)(u))==="symbol"||typeof u=="undefined"}k.isPrimitive=n,k.isBuffer=P.isBuffer;function l(u){return Object.prototype.toString.call(u)}}).call(this,{isBuffer:N("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(N,$,k){"use strict";var P=N("babel-runtime/helpers/typeof"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(D){"use strict";var p=function(){var i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,r=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,h=/[^-+\dA-Z]/g;return function(y,g,w,m){if(arguments.length===1&&o(y)==="string"&&!/\d/.test(y)&&(g=y,y=void 0),y=y||new Date,y instanceof Date||(y=new Date(y)),isNaN(y))throw TypeError("Invalid date");g=String(p.masks[g]||g||p.masks.default);var d=g.slice(0,4);(d==="UTC:"||d==="GMT:")&&(g=g.slice(4),w=!0,d==="GMT:"&&(m=!0));var n=w?"getUTC":"get",l=y[n+"Date"](),u=y[n+"Day"](),T=y[n+"Month"](),E=y[n+"FullYear"](),a=y[n+"Hours"](),L=y[n+"Minutes"](),O=y[n+"Seconds"](),f=y[n+"Milliseconds"](),x=w?0:y.getTimezoneOffset(),b=S(y),C=v(y),I={d:l,dd:s(l),ddd:p.i18n.dayNames[u],dddd:p.i18n.dayNames[u+7],m:T+1,mm:s(T+1),mmm:p.i18n.monthNames[T],mmmm:p.i18n.monthNames[T+12],yy:String(E).slice(2),yyyy:E,h:a%12||12,hh:s(a%12||12),H:a,HH:s(a),M:L,MM:s(L),s:O,ss:s(O),l:s(f,3),L:s(Math.round(f/10)),t:a<12?"a":"p",tt:a<12?"am":"pm",T:a<12?"A":"P",TT:a<12?"AM":"PM",Z:m?"GMT":w?"UTC":(String(y).match(r)||[""]).pop().replace(h,""),o:(x>0?"-":"+")+s(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:b,N:C};return g.replace(i,function(j){return j in I?I[j]:j.slice(1,j.length-1)})}}();p.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"},p.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 s(i,r){for(i=String(i),r=r||2;i.length<r;)i="0"+i;return i}function S(i){var r=new Date(i.getFullYear(),i.getMonth(),i.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var h=new Date(r.getFullYear(),0,4);h.setDate(h.getDate()-(h.getDay()+6)%7+3);var y=r.getTimezoneOffset()-h.getTimezoneOffset();r.setHours(r.getHours()-y);var g=(r-h)/(864e5*7);return 1+Math.floor(g)}function v(i){var r=i.getDay();return r===0&&(r=7),r}function o(i){return i===null?"null":i===void 0?"undefined":(typeof i=="undefined"?"undefined":(0,c.default)(i))!=="object"?typeof i=="undefined"?"undefined":(0,c.default)(i):Array.isArray(i)?"array":{}.toString.call(i).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return p}):(typeof k=="undefined"?"undefined":(0,c.default)(k))==="object"?$.exports=p:D.dateFormat=p})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(N,$,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 P=/["'&<>]/;$.exports=c;function c(_){var D=""+_,p=P.exec(D);if(!p)return D;var s,S="",v=0,o=0;for(v=p.index;v<D.length;v++){switch(D.charCodeAt(v)){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;default:continue}o!==v&&(S+=D.substring(o,v)),o=v+1,S+=s}return o!==v?S+D.substring(o,v):S}},{}],192:[function(N,$,k){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}$.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(s){if(!_(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},P.prototype.emit=function(s){var S,v,o,i,r,h;if(this._events||(this._events={}),s==="error"&&(!this._events.error||D(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var y=new Error('Uncaught, unspecified "error" event. ('+S+")");throw y.context=S,y}if(v=this._events[s],p(v))return!1;if(c(v))switch(arguments.length){case 1:v.call(this);break;case 2:v.call(this,arguments[1]);break;case 3:v.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),v.apply(this,i)}else if(D(v))for(i=Array.prototype.slice.call(arguments,1),h=v.slice(),o=h.length,r=0;r<o;r++)h[r].apply(this,i);return!0},P.prototype.addListener=function(s,S){var v;if(!c(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,c(S.listener)?S.listener:S),this._events[s]?D(this._events[s])?this._events[s].push(S):this._events[s]=[this._events[s],S]:this._events[s]=S,D(this._events[s])&&!this._events[s].warned&&(p(this._maxListeners)?v=P.defaultMaxListeners:v=this._maxListeners,v&&v>0&&this._events[s].length>v&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(s,S){if(!c(S))throw TypeError("listener must be a function");var v=!1;function o(){this.removeListener(s,o),v||(v=!0,S.apply(this,arguments))}return o.listener=S,this.on(s,o),this},P.prototype.removeListener=function(s,S){var v,o,i,r;if(!c(S))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(v=this._events[s],i=v.length,o=-1,v===S||c(v.listener)&&v.listener===S)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,S);else if(D(v)){for(r=i;r-- >0;)if(v[r]===S||v[r].listener&&v[r].listener===S){o=r;break}if(o<0)return this;v.length===1?(v.length=0,delete this._events[s]):v.splice(o,1),this._events.removeListener&&this.emit("removeListener",s,S)}return this},P.prototype.removeAllListeners=function(s){var S,v;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(v=this._events[s],c(v))this.removeListener(s,v);else if(v)for(;v.length;)this.removeListener(s,v[v.length-1]);return delete this._events[s],this},P.prototype.listeners=function(s){var S;return!this._events||!this._events[s]?S=[]:c(this._events[s])?S=[this._events[s]]:S=this._events[s].slice(),S},P.prototype.listenerCount=function(s){if(this._events){var S=this._events[s];if(c(S))return 1;if(S)return S.length}return 0},P.listenerCount=function(s,S){return s.listenerCount(S)};function c(s){return typeof s=="function"}function _(s){return typeof s=="number"}function D(s){return typeof s=="object"&&s!==null}function p(s){return s===void 0}},{}],193:[function(N,$,k){var P=N("http"),c=$.exports;for(var _ in P)P.hasOwnProperty(_)&&(c[_]=P[_]);c.request=function(D,p){return D||(D={}),D.scheme="https",D.protocol="https:",P.request.call(this,D,p)}},{http:231}],194:[function(N,$,k){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=N("util"),c=N("ms");$.exports=function(_){if(typeof _=="number")return _;var D=c(_);if(D===void 0){var p=new Error(P.format("humanize-ms(%j) result undefined",_));console.warn(p.stack)}return D}},{ms:204,util:243}],195:[function(N,$,k){k.read=function(P,c,_,D,p){var s,S,v=p*8-D-1,o=(1<<v)-1,i=o>>1,r=-7,h=_?p-1:0,y=_?-1:1,g=P[c+h];for(h+=y,s=g&(1<<-r)-1,g>>=-r,r+=v;r>0;s=s*256+P[c+h],h+=y,r-=8);for(S=s&(1<<-r)-1,s>>=-r,r+=D;r>0;S=S*256+P[c+h],h+=y,r-=8);if(s===0)s=1-i;else{if(s===o)return S?NaN:(g?-1:1)*Infinity;S=S+Math.pow(2,D),s=s-i}return(g?-1:1)*S*Math.pow(2,s-D)},k.write=function(P,c,_,D,p,s){var S,v,o,i=s*8-p-1,r=(1<<i)-1,h=r>>1,y=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=D?0:s-1,w=D?1:-1,m=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===Infinity?(v=isNaN(c)?1:0,S=r):(S=Math.floor(Math.log(c)/Math.LN2),c*(o=Math.pow(2,-S))<1&&(S--,o*=2),S+h>=1?c+=y/o:c+=y*Math.pow(2,1-h),c*o>=2&&(S++,o/=2),S+h>=r?(v=0,S=r):S+h>=1?(v=(c*o-1)*Math.pow(2,p),S=S+h):(v=c*Math.pow(2,h-1)*Math.pow(2,p),S=0));p>=8;P[_+g]=v&255,g+=w,v/=256,p-=8);for(S=S<<p|v,i+=p;i>0;P[_+g]=S&255,g+=w,S/=256,i-=8);P[_+g-w]|=m*128}},{}],196:[function(N,$,k){typeof Object.create=="function"?$.exports=function(c,_){_&&(c.super_=_,c.prototype=Object.create(_.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:$.exports=function(c,_){if(_){c.super_=_;var D=function(){};D.prototype=_.prototype,c.prototype=new D,c.prototype.constructor=c}}},{}],197:[function(N,$,k){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/$.exports=function(_){return _!=null&&(P(_)||c(_)||!!_._isBuffer)};function P(_){return!!_.constructor&&typeof _.constructor.isBuffer=="function"&&_.constructor.isBuffer(_)}function c(_){return typeof _.readFloatLE=="function"&&typeof _.slice=="function"&&P(_.slice(0,0))}},{}],198:[function(N,$,k){var P={}.toString;$.exports=Array.isArray||function(c){return P.call(c)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(N,$){typeof exports=="object"&&typeof module!="undefined"?module.exports=$(N):typeof define=="function"&&define.amd?define($):$(N)})(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(N){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(N){for(var $={},k=0,P=N.length;k<P;k++)$[N.charAt(k)]=k;return $}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(N){if(N.length<2){var $=N.charCodeAt(0);return $<128?N:$<2048?fromCharCode(192|$>>>6)+fromCharCode(128|$&63):fromCharCode(224|$>>>12&15)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&63)}else{var $=65536+(N.charCodeAt(0)-55296)*1024+(N.charCodeAt(1)-56320);return fromCharCode(240|$>>>18&7)+fromCharCode(128|$>>>12&63)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(N){return N.replace(re_utob,cb_utob)},cb_encode=function(N){var $=[0,2,1][N.length%3],k=N.charCodeAt(0)<<16|(N.length>1?N.charCodeAt(1):0)<<8|(N.length>2?N.charCodeAt(2):0),P=[b64chars.charAt(k>>>18),b64chars.charAt(k>>>12&63),$>=2?"=":b64chars.charAt(k>>>6&63),$>=1?"=":b64chars.charAt(k&63)];return P.join("")},btoa=global.btoa?function(N){return global.btoa(N)}:function(N){return N.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(N){var $=Object.prototype.toString.call(N)==="[object Uint8Array]";return $?N.toString("base64"):btoa(utob(String(N)))},encode=function(N,$){return $?_encode(String(N)).replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).replace(/=/g,""):_encode(N)},encodeURI=function(N){return encode(N,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(N){switch(N.length){case 4:var $=(7&N.charCodeAt(0))<<18|(63&N.charCodeAt(1))<<12|(63&N.charCodeAt(2))<<6|63&N.charCodeAt(3),k=$-65536;return fromCharCode((k>>>10)+55296)+fromCharCode((k&1023)+56320);case 3:return fromCharCode((15&N.charCodeAt(0))<<12|(63&N.charCodeAt(1))<<6|63&N.charCodeAt(2));default:return fromCharCode((31&N.charCodeAt(0))<<6|63&N.charCodeAt(1))}},btou=function(N){return N.replace(re_btou,cb_btou)},cb_decode=function(N){var $=N.length,k=$%4,P=($>0?b64tab[N.charAt(0)]<<18:0)|($>1?b64tab[N.charAt(1)]<<12:0)|($>2?b64tab[N.charAt(2)]<<6:0)|($>3?b64tab[N.charAt(3)]:0),c=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return c.length-=[0,0,2,1][k],c.join("")},_atob=global.atob?function(N){return global.atob(N)}:function(N){return N.replace(/\S{1,4}/g,cb_decode)},atob=function(N){return _atob(String(N).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(N){return(N.constructor===buffer.constructor?N:buffer.from(N,"base64")).toString()}:function(N){return(N.constructor===buffer.constructor?N:new buffer(N,"base64")).toString()}:function(N){return btou(_atob(N))},decode=function(N){return _decode(String(N).replace(/[-_]/g,function($){return $=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var N=global.Base64;return global.Base64=_Base64,N};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(N){return{value:N,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(N){return encode(this,N)})),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(N,$,k){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";$.exports=c;var P=Object.prototype.hasOwnProperty;function c(_,D,p){if(!_)throw new TypeError("argument dest is required");if(!D)throw new TypeError("argument src is required");return p===void 0&&(p=!0),Object.getOwnPropertyNames(D).forEach(function(S){if(!p&&P.call(_,S))return;var v=Object.getOwnPropertyDescriptor(D,S);Object.defineProperty(_,S,v)}),_}},{}],201:[function(N,$,k){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var c=0;c<arguments.length;c++)this.define(arguments[c]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(c,_){for(var D in c){var p=c[D].map(function(v){return v.toLowerCase()});D=D.toLowerCase();for(var s=0;s<p.length;s++){var S=p[s];if(S[0]=="*")continue;if(!_&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+D+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+D+'".');this._types[S]=D}if(_||!this._extensions[D]){var S=p[0];this._extensions[D]=S[0]!="*"?S:S.substr(1)}}},P.prototype.getType=function(c){c=String(c);var _=c.replace(/^.*[/\\]/,"").toLowerCase(),D=_.replace(/^.*\./,"").toLowerCase(),p=_.length<c.length,s=D.length<_.length-1;return(s||!p)&&this._types[D]||null},P.prototype.getExtension=function(c){return c=/^\s*([^;\s]*)/.test(c)&&RegExp.$1,c&&this._extensions[c.toLowerCase()]||null},$.exports=P},{}],202:[function(N,$,k){"use strict";var P=N("./Mime");$.exports=new P(N("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(N,$,k){$.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(N,$,k){var P=1e3,c=P*60,_=c*60,D=_*24,p=D*7,s=D*365.25;$.exports=function(r,h){h=h||{};var y=typeof r;if(y==="string"&&r.length>0)return S(r);if(y==="number"&&isFinite(r))return h.long?o(r):v(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),r.length>100)return;var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!h)return;var y=parseFloat(h[1]),g=(h[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return y*s;case"weeks":case"week":case"w":return y*p;case"days":case"day":case"d":return y*D;case"hours":case"hour":case"hrs":case"hr":case"h":return y*_;case"minutes":case"minute":case"mins":case"min":case"m":return y*c;case"seconds":case"second":case"secs":case"sec":case"s":return y*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}function v(r){var h=Math.abs(r);return h>=D?Math.round(r/D)+"d":h>=_?Math.round(r/_)+"h":h>=c?Math.round(r/c)+"m":h>=P?Math.round(r/P)+"s":r+"ms"}function o(r){var h=Math.abs(r);return h>=D?i(r,h,D,"day"):h>=_?i(r,h,_,"hour"):h>=c?i(r,h,c,"minute"):h>=P?i(r,h,P,"second"):r+" ms"}function i(r,h,y,g){var w=h>=y*1.5;return Math.round(r/y)+" "+g+(w?"s":"")}},{}],205:[function(N,$,k){(function(P){function c(s,S){for(var v=0,o=s.length-1;o>=0;o--){var i=s[o];i==="."?s.splice(o,1):i===".."?(s.splice(o,1),v++):v&&(s.splice(o,1),v--)}if(S)for(;v--;v)s.unshift("..");return s}k.resolve=function(){for(var s="",S=!1,v=arguments.length-1;v>=-1&&!S;v--){var o=v>=0?arguments[v]:P.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;s=o+"/"+s,S=o.charAt(0)==="/"}return s=c(D(s.split("/"),function(i){return!!i}),!S).join("/"),(S?"/":"")+s||"."},k.normalize=function(s){var S=k.isAbsolute(s),v=p(s,-1)==="/";return s=c(D(s.split("/"),function(o){return!!o}),!S).join("/"),!s&&!S&&(s="."),s&&v&&(s+="/"),(S?"/":"")+s},k.isAbsolute=function(s){return s.charAt(0)==="/"},k.join=function(){var s=Array.prototype.slice.call(arguments,0);return k.normalize(D(s,function(S,v){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},k.relative=function(s,S){s=k.resolve(s).substr(1),S=k.resolve(S).substr(1);function v(w){for(var m=0;m<w.length&&!(w[m]!=="");m++);for(var d=w.length-1;d>=0&&!(w[d]!=="");d--);return m>d?[]:w.slice(m,d-m+1)}for(var o=v(s.split("/")),i=v(S.split("/")),r=Math.min(o.length,i.length),h=r,y=0;y<r;y++)if(o[y]!==i[y]){h=y;break}for(var g=[],y=h;y<o.length;y++)g.push("..");return g=g.concat(i.slice(h)),g.join("/")},k.sep="/",k.delimiter=":",k.dirname=function(s){if(typeof s!="string"&&(s=s+""),s.length===0)return".";for(var S=s.charCodeAt(0),v=S===47,o=-1,i=!0,r=s.length-1;r>=1;--r)if(S=s.charCodeAt(r),S===47){if(!i){o=r;break}}else i=!1;return o===-1?v?"/":".":v&&o===1?"/":s.slice(0,o)};function _(s){typeof s!="string"&&(s=s+"");var S=0,v=-1,o=!0,i;for(i=s.length-1;i>=0;--i)if(s.charCodeAt(i)===47){if(!o){S=i+1;break}}else v===-1&&(o=!1,v=i+1);return v===-1?"":s.slice(S,v)}k.basename=function(s,S){var v=_(s);return S&&v.substr(-1*S.length)===S&&(v=v.substr(0,v.length-S.length)),v},k.extname=function(s){typeof s!="string"&&(s=s+"");for(var S=-1,v=0,o=-1,i=!0,r=0,h=s.length-1;h>=0;--h){var y=s.charCodeAt(h);if(y===47){if(!i){v=h+1;break}continue}o===-1&&(i=!1,o=h+1),y===46?S===-1?S=h:r!==1&&(r=1):S!==-1&&(r=-1)}return S===-1||o===-1||r===0||r===1&&S===o-1&&S===v+1?"":s.slice(S,o)};function D(s,S){if(s.filter)return s.filter(S);for(var v=[],o=0;o<s.length;o++)S(s[o],o,s)&&v.push(s[o]);return v}var p="ab".substr(-1)==="b"?function(s,S,v){return s.substr(S,v)}:function(s,S,v){return S<0&&(S=s.length+S),s.substr(S,v)}}).call(this,N("_process"))},{_process:208}],206:[function(N,$,k){(function(P){/*!
|
|
|
* 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 c={function:!0,object:!0},_=c[typeof window]&&window||this,D=_,p=c[typeof k]&&k,s=c[typeof $]&&$&&!$.nodeType&&$,S=p&&s&&typeof P=="object"&&P;S&&(S.global===S||S.window===S||S.self===S)&&(_=S);var v=Math.pow(2,53)-1,o=/\bOpera/,i=this,r=Object.prototype,h=r.hasOwnProperty,y=r.toString;function g(f){return f=String(f),f.charAt(0).toUpperCase()+f.slice(1)}function w(f,x,b){var C={"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 x&&b&&/^Win/i.test(f)&&!/^Windows Phone /i.test(f)&&(C=C[/[\d.]+$/.exec(f)])&&(f="Windows "+C),f=String(f),x&&b&&(f=f.replace(RegExp(x,"i"),b)),f=d(f.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]),f}function m(f,x){var b=-1,C=f?f.length:0;if(typeof C=="number"&&C>-1&&C<=v)for(;++b<C;)x(f[b],b,f);else n(f,x)}function d(f){return f=a(f),/^(?:webOS|i(?:OS|P))/.test(f)?f:g(f)}function n(f,x){for(var b in f)h.call(f,b)&&x(f[b],b,f)}function l(f){return f==null?g(f):y.call(f).slice(8,-1)}function u(f,x){var b=f!=null?typeof f[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(b)&&(b=="object"?!!f[x]:!0)}function T(f){return String(f).replace(/([ -])(?!$)/g,"$1?")}function E(f,x){var b=null;return m(f,function(C,I){b=x(b,C,I,f)}),b}function a(f){return String(f).replace(/^ +| +$/g,"")}function L(f){var x=_,b=f&&typeof f=="object"&&l(f)!="String";b&&(x=f,f=null);var C=x.navigator||{},I=C.userAgent||"";f||(f=I);var j=b||i==D,M=b?!!C.likeChrome:/\bChrome\b/.test(f)&&!/internal|\n/i.test(y.toString()),z="Object",G=b?z:"ScriptBridgingProxyObject",B=b?z:"Environment",K=b&&x.java?"JavaPackage":l(x.java),F=b?z:"RuntimeObject",H=/\bJava/.test(K)&&x.java,W=H&&l(x.environment)==B,Q=H?"a":"\u03B1",ee=H?"b":"\u03B2",q=x.document||{},pe=x.operamini||x.opera,ye=o.test(ye=b&&pe?pe["[[Class]]"]:l(pe))?ye:pe=null,ie,Se=f,ge=[],oe=null,le=f==I,te=le&&pe&&typeof pe.version=="function"&&pe.version(),be,Z=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ae=he(["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"]),Ee=Te([{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"]),ne=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}}),J=de(["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($e){return E($e,function(tt,nt){return tt||RegExp("\\b"+(nt.pattern||T(nt))+"\\b","i").exec(f)&&(nt.label||nt)})}function Y($e){return E($e,function(tt,nt,Me){return tt||(nt[Ee]||nt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ee)]||RegExp("\\b"+T(Me)+"(?:\\b|\\w*\\d)","i").exec(f))&&Me})}function he($e){return E($e,function(tt,nt){return tt||RegExp("\\b"+(nt.pattern||T(nt))+"\\b","i").exec(f)&&(nt.label||nt)})}function de($e){return E($e,function(tt,nt){var Me=nt.pattern||T(nt);return!tt&&(tt=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(f))&&(tt=w(tt,Me,nt.label||nt)),tt})}function Te($e){return E($e,function(tt,nt){var Me=nt.pattern||T(nt);return!tt&&(tt=RegExp("\\b"+Me+" *\\d+[.\\w_]*","i").exec(f)||RegExp("\\b"+Me+" *\\w+-[\\w]*","i").exec(f)||RegExp("\\b"+Me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(f))&&((tt=String(nt.label&&!RegExp(Me,"i").test(nt.label)?nt.label:tt).split("/"))[1]&&!/[\d.]+/.test(tt[0])&&(tt[0]+=" "+tt[1]),nt=nt.label||nt,tt=d(tt[0].replace(RegExp(Me,"i"),nt).replace(RegExp("; *(?:"+nt+"[_-])?","i")," ").replace(RegExp("("+nt+")[-_.]?(\\w)","i"),"$1 $2"))),tt})}function ze($e){return E($e,function(tt,nt){return tt||(RegExp(nt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(f)||0)[1]||null})}function Ze(){return this.description||""}if(Z&&(Z=[Z]),ne&&!Ee&&(Ee=Te([ne])),(ie=/\bGoogle TV\b/.exec(Ee))&&(Ee=ie[0]),/\bSimulator\b/i.test(f)&&(Ee=(Ee?Ee+" ":"")+"Simulator"),ae=="Opera Mini"&&/\bOPiOS\b/.test(f)&&ge.push("running in Turbo/Uncompressed mode"),ae=="IE"&&/\blike iPhone OS\b/.test(f)?(ie=L(f.replace(/like iPhone OS/,"")),ne=ie.manufacturer,Ee=ie.product):/^iP/.test(Ee)?(ae||(ae="Safari"),J="iOS"+((ie=/ OS ([\d_]+)/i.exec(f))?" "+ie[1].replace(/_/g,"."):"")):ae=="Konqueror"&&!/buntu/i.test(J)?J="Kubuntu":ne&&ne!="Google"&&(/Chrome/.test(ae)&&!/\bMobile Safari\b/i.test(f)||/\bVita\b/.test(Ee))||/\bAndroid\b/.test(J)&&/^Chrome/.test(ae)&&/\bVersion\//i.test(f)?(ae="Android Browser",J=/\bAndroid\b/.test(J)?J:"Android"):ae=="Silk"?(/\bMobi/i.test(f)||(J="Android",ge.unshift("desktop mode")),/Accelerated *= *true/i.test(f)&&ge.unshift("accelerated")):ae=="PaleMoon"&&(ie=/\bFirefox\/([\d.]+)\b/.exec(f))?ge.push("identifying as Firefox "+ie[1]):ae=="Firefox"&&(ie=/\b(Mobile|Tablet|TV)\b/i.exec(f))?(J||(J="Firefox OS"),Ee||(Ee=ie[1])):!ae||(ie=!/\bMinefield\b/i.test(f)&&/\b(?:Firefox|Safari)\b/.exec(ae))?(ae&&!Ee&&/[\/,]|^[^(]+?\)/.test(f.slice(f.indexOf(ie+"/")+8))&&(ae=null),(ie=Ee||ne||J)&&(Ee||ne||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(J))&&(ae=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(J)?J:ie)+" Browser")):ae=="Electron"&&(ie=(/\bChrome\/([\d.]+)\b/.exec(f)||0)[1])&&ge.push("Chromium "+ie),te||(te=ze(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",T(ae),"(?:Firefox|Minefield|NetFront)"])),(ie=Z=="iCab"&&parseFloat(te)>3&&"WebKit"||/\bOpera\b/.test(ae)&&(/\bOPR\b/.test(f)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(f)&&!/^(?:Trident|EdgeHTML)$/.test(Z)&&"WebKit"||!Z&&/\bMSIE\b/i.test(f)&&(J=="Mac OS"?"Tasman":"Trident")||Z=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ae)&&"NetFront")&&(Z=[ie]),ae=="IE"&&(ie=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(f)||0)[1])?(ae+=" Mobile",J="Windows Phone "+(/\+$/.test(ie)?ie:ie+".x"),ge.unshift("desktop mode")):/\bWPDesktop\b/i.test(f)?(ae="IE Mobile",J="Windows Phone 8.x",ge.unshift("desktop mode"),te||(te=(/\brv:([\d.]+)/.exec(f)||0)[1])):ae!="IE"&&Z=="Trident"&&(ie=/\brv:([\d.]+)/.exec(f))&&(ae&&ge.push("identifying as "+ae+(te?" "+te:"")),ae="IE",te=ie[1]),le){if(u(x,"global"))if(H&&(ie=H.lang.System,Se=ie.getProperty("os.arch"),J=J||ie.getProperty("os.name")+" "+ie.getProperty("os.version")),W){try{te=x.require("ringo/engine").version.join("."),ae="RingoJS"}catch($e){(ie=x.system)&&ie.global.system==x.system&&(ae="Narwhal",J||(J=ie[0].os||null))}ae||(ae="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(ie=x.process)&&(typeof ie.versions=="object"&&(typeof ie.versions.electron=="string"?(ge.push("Node "+ie.versions.node),ae="Electron",te=ie.versions.electron):typeof ie.versions.nw=="string"&&(ge.push("Chromium "+te,"Node "+ie.versions.node),ae="NW.js",te=ie.versions.nw)),ae||(ae="Node.js",Se=ie.arch,J=ie.platform,te=/[\d.]+/.exec(ie.version),te=te?te[0]:null));else l(ie=x.runtime)==G?(ae="Adobe AIR",J=ie.flash.system.Capabilities.os):l(ie=x.phantom)==F?(ae="PhantomJS",te=(ie=ie.version||null)&&ie.major+"."+ie.minor+"."+ie.patch):typeof q.documentMode=="number"&&(ie=/\bTrident\/(\d+)/i.exec(f))?(te=[te,q.documentMode],(ie=+ie[1]+4)!=te[1]&&(ge.push("IE "+te[1]+" mode"),Z&&(Z[1]=""),te[1]=ie),te=ae=="IE"?String(te[1].toFixed(1)):te[0]):typeof q.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ae)&&(ge.push("masking as "+ae+" "+te),ae="IE",te="11.0",Z=["Trident"],J="Windows");J=J&&d(J)}if(te&&(ie=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(te)||/(?:alpha|beta)(?: ?\d)?/i.exec(f+";"+(le&&C.appMinorVersion))||/\bMinefield\b/i.test(f)&&"a")&&(oe=/b/i.test(ie)?"beta":"alpha",te=te.replace(RegExp(ie+"\\+?$"),"")+(oe=="beta"?ee:Q)+(/\d+\+?/.exec(ie)||"")),ae=="Fennec"||ae=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ae="Firefox Mobile";else if(ae=="Maxthon"&&te)te=te.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ee))Ee=="Xbox 360"&&(J=null),Ee=="Xbox 360"&&/\bIEMobile\b/.test(f)&&ge.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ae)||ae&&!Ee&&!/Browser|Mobi/.test(ae))&&(J=="Windows CE"||/Mobi/i.test(f)))ae+=" Mobile";else if(ae=="IE"&&le)try{x.external===null&&ge.unshift("platform preview")}catch($e){ge.unshift("embedded")}else(/\bBlackBerry\b/.test(Ee)||/\bBB10\b/.test(f))&&(ie=(RegExp(Ee.replace(/ +/g," *")+"/([.\\d]+)","i").exec(f)||0)[1]||te)?(ie=[ie,/BB10/.test(f)],J=(ie[1]?(Ee=null,ne="BlackBerry"):"Device Software")+" "+ie[0],te=null):this!=n&&Ee!="Wii"&&(le&&pe||/Opera/.test(ae)&&/\b(?:MSIE|Firefox)\b/i.test(f)||ae=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ae=="IE"&&(J&&!/^Win/.test(J)&&te>5.5||/\bWindows XP\b/.test(J)&&te>8||te==8&&!/\bTrident\b/.test(f)))&&!o.test(ie=L.call(n,f.replace(o,"")+";"))&&ie.name&&(ie="ing as "+ie.name+((ie=ie.version)?" "+ie:""),o.test(ae)?(/\bIE\b/.test(ie)&&J=="Mac OS"&&(J=null),ie="identify"+ie):(ie="mask"+ie,ye?ae=d(ye.replace(/([a-z])([A-Z])/g,"$1 $2")):ae="Opera",/\bIE\b/.test(ie)&&(J=null),le||(te=null)),Z=["Presto"],ge.push(ie));(ie=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(f)||0)[1])&&(ie=[parseFloat(ie.replace(/\.(\d)$/,".0$1")),ie],ae=="Safari"&&ie[1].slice(-1)=="+"?(ae="WebKit Nightly",oe="alpha",te=ie[1].slice(0,-1)):(te==ie[1]||te==(ie[2]=(/\bSafari\/([\d.]+\+?)/i.exec(f)||0)[1]))&&(te=null),ie[1]=(/\bChrome\/([\d.]+)/i.exec(f)||0)[1],ie[0]==537.36&&ie[2]==537.36&&parseFloat(ie[1])>=28&&Z=="WebKit"&&(Z=["Blink"]),!le||!M&&!ie[1]?(Z&&(Z[1]="like Safari"),ie=(ie=ie[0],ie<400?1:ie<500?2:ie<526?3:ie<533?4:ie<534?"4+":ie<535?5:ie<537?6:ie<538?7:ie<601?8:"8")):(Z&&(Z[1]="like Chrome"),ie=ie[1]||(ie=ie[0],ie<530?1:ie<532?2:ie<532.05?3:ie<533?4:ie<534.03?5:ie<534.07?6:ie<534.1?7:ie<534.13?8:ie<534.16?9:ie<534.24?10:ie<534.3?11:ie<535.01?12:ie<535.02?"13+":ie<535.07?15:ie<535.11?16:ie<535.19?17:ie<536.05?18:ie<536.1?19:ie<537.01?20:ie<537.11?"21+":ie<537.13?23:ie<537.18?24:ie<537.24?25:ie<537.36?26:Z!="Blink"?"27":"28")),Z&&(Z[1]+=" "+(ie+=typeof ie=="number"?".x":/[.+]/.test(ie)?"":"+")),ae=="Safari"&&(!te||parseInt(te)>45)&&(te=ie)),ae=="Opera"&&(ie=/\bzbov|zvav$/.exec(J))?(ae+=" ",ge.unshift("desktop mode"),ie=="zvav"?(ae+="Mini",te=null):ae+="Mobile",J=J.replace(RegExp(" *"+ie+"$"),"")):ae=="Safari"&&/\bChrome\b/.exec(Z&&Z[1])&&(ge.unshift("desktop mode"),ae="Chrome Mobile",te=null,/\bOS X\b/.test(J)?(ne="Apple",J="iOS 4.3+"):J=null),te&&te.indexOf(ie=/[\d.]+$/.exec(J))==0&&f.indexOf("/"+ie+"-")>-1&&(J=a(J.replace(ie,""))),Z&&!/\b(?:Avant|Nook)\b/.test(ae)&&(/Browser|Lunascape|Maxthon/.test(ae)||ae!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(Z[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ae)&&Z[1])&&((ie=Z[Z.length-1])&&ge.push(ie)),ge.length&&(ge=["("+ge.join("; ")+")"]),ne&&Ee&&Ee.indexOf(ne)<0&&ge.push("on "+ne),Ee&&ge.push((/^on /.test(ge[ge.length-1])?"":"on ")+Ee),J&&(ie=/ ([\d.+]+)$/.exec(J),be=ie&&J.charAt(J.length-ie[0].length-1)=="/",J={architecture:32,family:ie&&!be?J.replace(ie[0],""):J,version:ie?ie[1]:null,toString:function(){var $e=this.version;return this.family+($e&&!be?" "+$e:"")+(this.architecture==64?" 64-bit":"")}}),(ie=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Se))&&!/\bi686\b/i.test(Se)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+ie),"")),ae&&(/\bWOW64\b/i.test(f)||le&&/\w(?:86|32)$/.test(C.cpuClass||C.platform)&&!/\bWin64; x64\b/i.test(f))&&ge.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ae=="Chrome"&&parseFloat(te)>=39&&(J.architecture=64),f||(f=null);var Je={};return Je.description=f,Je.layout=Z&&Z[0],Je.manufacturer=ne,Je.name=ae,Je.prerelease=oe,Je.product=Ee,Je.ua=f,Je.version=ae&&te,Je.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},Je.parse=L,Je.toString=Ze,Je.version&&ge.unshift(te),Je.name&&ge.unshift(ae),J&&ae&&!(J==String(J).split(" ")[0]&&(J==ae.split(" ")[0]||Ee))&&ge.push(Ee?"("+J+")":"on "+J),ge.length&&(Je.description=ge.join(" ")),Je}var O=L();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(_.platform=O,define(function(){return O})):p&&s?n(O,function(f,x){p[x]=f}):_.platform=O}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(N,$,k){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?$.exports={nextTick:c}:$.exports=P;function c(_,D,p,s){if(typeof _!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,v,o;switch(S){case 0:case 1:return P.nextTick(_);case 2:return P.nextTick(function(){_.call(null,D)});case 3:return P.nextTick(function(){_.call(null,D,p)});case 4:return P.nextTick(function(){_.call(null,D,p,s)});default:for(v=new Array(S-1),o=0;o<v.length;)v[o++]=arguments[o];return P.nextTick(function(){_.apply(null,v)})}}}).call(this,N("_process"))},{_process:208}],208:[function(N,$,k){var P=$.exports={},c,_;function D(){throw new Error("setTimeout has not been defined")}function p(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?c=setTimeout:c=D}catch(m){c=D}try{typeof clearTimeout=="function"?_=clearTimeout:_=p}catch(m){_=p}})();function s(m){if(c===setTimeout)return setTimeout(m,0);if((c===D||!c)&&setTimeout)return c=setTimeout,setTimeout(m,0);try{return c(m,0)}catch(d){try{return c.call(null,m,0)}catch(n){return c.call(this,m,0)}}}function S(m){if(_===clearTimeout)return clearTimeout(m);if((_===p||!_)&&clearTimeout)return _=clearTimeout,clearTimeout(m);try{return _(m)}catch(d){try{return _.call(null,m)}catch(n){return _.call(this,m)}}}var v=[],o=!1,i,r=-1;function h(){if(!o||!i)return;o=!1,i.length?v=i.concat(v):r=-1,v.length&&y()}function y(){if(o)return;var m=s(h);o=!0;for(var d=v.length;d;){for(i=v,v=[];++r<d;)i&&i[r].run();r=-1,d=v.length}i=null,o=!1,S(m)}P.nextTick=function(m){var d=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)d[n-1]=arguments[n];v.push(new g(m,d)),v.length===1&&!o&&s(y)};function g(m,d){this.fun=m,this.array=d}g.prototype.run=function(){this.fun.apply(null,this.array)},P.title="browser",P.browser=!0,P.env={},P.argv=[],P.version="",P.versions={};function w(){}P.on=w,P.addListener=w,P.once=w,P.off=w,P.removeListener=w,P.removeAllListeners=w,P.emit=w,P.prependListener=w,P.prependOnceListener=w,P.listeners=function(m){return[]},P.binding=function(m){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(m){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(N,$,k){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(c){var _=typeof k=="object"&&k&&!k.nodeType&&k,D=typeof $=="object"&&$&&!$.nodeType&&$,p=typeof P=="object"&&P;(p.global===p||p.window===p||p.self===p)&&(c=p);var s,S=2147483647,v=36,o=1,i=26,r=38,h=700,y=72,g=128,w="-",m=/^xn--/,d=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=v-o,T=Math.floor,E=String.fromCharCode,a;function L(K){throw new RangeError(l[K])}function O(K,F){for(var H=K.length,W=[];H--;)W[H]=F(K[H]);return W}function f(K,F){var H=K.split("@"),W="";H.length>1&&(W=H[0]+"@",K=H[1]),K=K.replace(n,".");var Q=K.split("."),ee=O(Q,F).join(".");return W+ee}function x(K){for(var F=[],H=0,W=K.length,Q,ee;H<W;)Q=K.charCodeAt(H++),Q>=55296&&Q<=56319&&H<W?(ee=K.charCodeAt(H++),(ee&64512)==56320?F.push(((Q&1023)<<10)+(ee&1023)+65536):(F.push(Q),H--)):F.push(Q);return F}function b(K){return O(K,function(F){var H="";return F>65535&&(F-=65536,H+=E(F>>>10&1023|55296),F=56320|F&1023),H+=E(F),H}).join("")}function C(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:v}function I(K,F){return K+22+75*(K<26)-((F!=0)<<5)}function j(K,F,H){var W=0;for(K=H?T(K/h):K>>1,K+=T(K/F);K>u*i>>1;W+=v)K=T(K/u);return T(W+(u+1)*K/(K+r))}function M(K){var F=[],H=K.length,W,Q=0,ee=g,q=y,pe,ye,ie,Se,ge,oe,le,te,be;for(pe=K.lastIndexOf(w),pe<0&&(pe=0),ye=0;ye<pe;++ye)K.charCodeAt(ye)>=128&&L("not-basic"),F.push(K.charCodeAt(ye));for(ie=pe>0?pe+1:0;ie<H;){for(Se=Q,ge=1,oe=v;!(ie>=H&&L("invalid-input"),le=C(K.charCodeAt(ie++)),(le>=v||le>T((S-Q)/ge))&&L("overflow"),Q+=le*ge,te=oe<=q?o:oe>=q+i?i:oe-q,le<te);oe+=v)be=v-te,ge>T(S/be)&&L("overflow"),ge*=be;W=F.length+1,q=j(Q-Se,W,Se==0),T(Q/W)>S-ee&&L("overflow"),ee+=T(Q/W),Q%=W,F.splice(Q++,0,ee)}return b(F)}function z(K){var F,H,W,Q,ee,q,pe,ye,ie,Se,ge,oe=[],le,te,be,Z;for(K=x(K),le=K.length,F=g,H=0,ee=y,q=0;q<le;++q)ge=K[q],ge<128&&oe.push(E(ge));for(W=Q=oe.length,Q&&oe.push(w);W<le;){for(pe=S,q=0;q<le;++q)ge=K[q],ge>=F&&ge<pe&&(pe=ge);for(te=W+1,pe-F>T((S-H)/te)&&L("overflow"),H+=(pe-F)*te,F=pe,q=0;q<le;++q)if(ge=K[q],ge<F&&++H>S&&L("overflow"),ge==F){for(ye=H,ie=v;!(Se=ie<=ee?o:ie>=ee+i?i:ie-ee,ye<Se);ie+=v)Z=ye-Se,be=v-Se,oe.push(E(I(Se+Z%be,0))),ye=T(Z/be);oe.push(E(I(ye,0))),ee=j(H,te,W==Q),H=0,++W}++H,++F}return oe.join("")}function G(K){return f(K,function(F){return m.test(F)?M(F.slice(4).toLowerCase()):F})}function B(K){return f(K,function(F){return d.test(F)?"xn--"+z(F):F})}if(s={version:"1.4.1",ucs2:{decode:x,encode:b},decode:M,encode:z,toASCII:B,toUnicode:G},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return s});else if(_&&D)if($.exports==_)D.exports=s;else for(a in s)s.hasOwnProperty(a)&&(_[a]=s[a]);else c.punycode=s})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(N,$,k){"use strict";function P(_,D){return Object.prototype.hasOwnProperty.call(_,D)}$.exports=function(_,D,p,s){D=D||"&",p=p||"=";var S={};if(typeof _!="string"||_.length===0)return S;var v=/\+/g;_=_.split(D);var o=1e3;s&&typeof s.maxKeys=="number"&&(o=s.maxKeys);var i=_.length;o>0&&i>o&&(i=o);for(var r=0;r<i;++r){var h=_[r].replace(v,"%20"),y=h.indexOf(p),g,w,m,d;y>=0?(g=h.substr(0,y),w=h.substr(y+1)):(g=h,w=""),m=decodeURIComponent(g),d=decodeURIComponent(w),P(S,m)?c(S[m])?S[m].push(d):S[m]=[S[m],d]:S[m]=d}return S};var c=Array.isArray||function(_){return Object.prototype.toString.call(_)==="[object Array]"}},{}],211:[function(N,$,k){"use strict";var P=function(p){switch(typeof p){case"string":return p;case"boolean":return p?"true":"false";case"number":return isFinite(p)?p:"";default:return""}};$.exports=function(p,s,S,v){return s=s||"&",S=S||"=",p===null&&(p=void 0),typeof p=="object"?_(D(p),function(o){var i=encodeURIComponent(P(o))+S;return c(p[o])?_(p[o],function(r){return i+encodeURIComponent(P(r))}).join(s):i+encodeURIComponent(P(p[o]))}).join(s):v?encodeURIComponent(P(v))+S+encodeURIComponent(P(p)):""};var c=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"};function _(p,s){if(p.map)return p.map(s);for(var S=[],v=0;v<p.length;v++)S.push(s(p[v],v));return S}var D=Object.keys||function(p){var s=[];for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&s.push(S);return s}},{}],212:[function(N,$,k){"use strict";k.decode=k.parse=N("./decode"),k.encode=k.stringify=N("./encode")},{"./decode":210,"./encode":211}],213:[function(N,$,k){$.exports=N("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=p(P),_=N("babel-runtime/core-js/object/keys"),D=p(_);function p(d){return d&&d.__esModule?d:{default:d}}var s=N("process-nextick-args"),S=D.default||function(d){var n=[];for(var l in d)n.push(l);return n};$.exports=g;var v=(0,c.default)(N("core-util-is"));v.inherits=N("inherits");var o=N("./_stream_readable"),i=N("./_stream_writable");v.inherits(g,o);for(var r=S(i.prototype),h=0;h<r.length;h++){var y=r[h];g.prototype[y]||(g.prototype[y]=i.prototype[y])}function g(d){if(!(this instanceof g))return new g(d);o.call(this,d),i.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function w(){if(this.allowHalfOpen||this._writableState.ended)return;s.nextTick(m,this)}function m(d){d.end()}Object.defineProperty(g.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}}),g.prototype._destroy=function(d,n){this.push(null),this.end(),s.nextTick(n,d)}},{"./_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(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(S){return S&&S.__esModule?S:{default:S}}$.exports=s;var D=N("./_stream_transform"),p=(0,c.default)(N("core-util-is"));p.inherits=N("inherits"),p.inherits(s,D);function s(S){if(!(this instanceof s))return new s(S);D.call(this,S)}s.prototype._transform=function(S,v,o){o(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(N,$,k){(function(P,c){"use strict";var _=N("babel-runtime/core-js/object/get-prototype-of"),D=S(_),p=N("babel-runtime/core-js/object/create"),s=S(p);function S(Z){return Z&&Z.__esModule?Z:{default:Z}}var v=N("process-nextick-args");$.exports=x;var o=N("isarray"),i;x.ReadableState=f;var r=N("events").EventEmitter,h=function(ae,Ee){return ae.listeners(Ee).length},y=N("./internal/streams/stream"),g=N("safe-buffer").Buffer,w=c.Uint8Array||function(){};function m(Z){return g.from(Z)}function d(Z){return g.isBuffer(Z)||Z instanceof w}var n=(0,s.default)(N("core-util-is"));n.inherits=N("inherits");var l=N("util"),u=void 0;l&&l.debuglog?u=l.debuglog("stream"):u=function(){};var T=N("./internal/streams/BufferList"),E=N("./internal/streams/destroy"),a;n.inherits(x,y);var L=["error","close","destroy","pause","resume"];function O(Z,ae,Ee){if(typeof Z.prependListener=="function")return Z.prependListener(ae,Ee);!Z._events||!Z._events[ae]?Z.on(ae,Ee):o(Z._events[ae])?Z._events[ae].unshift(Ee):Z._events[ae]=[Ee,Z._events[ae]]}function f(Z,ae){i=i||N("./_stream_duplex"),Z=Z||{};var Ee=ae instanceof i;this.objectMode=!!Z.objectMode,Ee&&(this.objectMode=this.objectMode||!!Z.readableObjectMode);var ne=Z.highWaterMark,J=Z.readableHighWaterMark,X=this.objectMode?16:16*1024;ne||ne===0?this.highWaterMark=ne:Ee&&(J||J===0)?this.highWaterMark=J:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,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=Z.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Z.encoding&&(a||(a=N("string_decoder/").StringDecoder),this.decoder=new a(Z.encoding),this.encoding=Z.encoding)}function x(Z){if(i=i||N("./_stream_duplex"),!(this instanceof x))return new x(Z);this._readableState=new f(Z,this),this.readable=!0,Z&&(typeof Z.read=="function"&&(this._read=Z.read),typeof Z.destroy=="function"&&(this._destroy=Z.destroy)),y.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ae){if(!this._readableState)return;this._readableState.destroyed=ae}}),x.prototype.destroy=E.destroy,x.prototype._undestroy=E.undestroy,x.prototype._destroy=function(Z,ae){this.push(null),ae(Z)},x.prototype.push=function(Z,ae){var Ee=this._readableState,ne;return Ee.objectMode?ne=!0:typeof Z=="string"&&(ae=ae||Ee.defaultEncoding,ae!==Ee.encoding&&(Z=g.from(Z,ae),ae=""),ne=!0),b(this,Z,ae,!1,ne)},x.prototype.unshift=function(Z){return b(this,Z,null,!0,!1)};function b(Z,ae,Ee,ne,J){var X=Z._readableState;if(ae===null)X.reading=!1,B(Z,X);else{var Y;J||(Y=I(X,ae)),Y?Z.emit("error",Y):X.objectMode||ae&&ae.length>0?(typeof ae!="string"&&!X.objectMode&&(0,D.default)(ae)!==g.prototype&&(ae=m(ae)),ne?X.endEmitted?Z.emit("error",new Error("stream.unshift() after end event")):C(Z,X,ae,!0):X.ended?Z.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ee?(ae=X.decoder.write(ae),X.objectMode||ae.length!==0?C(Z,X,ae,!1):H(Z,X)):C(Z,X,ae,!1))):ne||(X.reading=!1)}return j(X)}function C(Z,ae,Ee,ne){ae.flowing&&ae.length===0&&!ae.sync?(Z.emit("data",Ee),Z.read(0)):(ae.length+=ae.objectMode?1:Ee.length,ne?ae.buffer.unshift(Ee):ae.buffer.push(Ee),ae.needReadable&&K(Z)),H(Z,ae)}function I(Z,ae){var Ee;return!d(ae)&&typeof ae!="string"&&ae!==void 0&&!Z.objectMode&&(Ee=new TypeError("Invalid non-string/buffer chunk")),Ee}function j(Z){return!Z.ended&&(Z.needReadable||Z.length<Z.highWaterMark||Z.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(Z){return a||(a=N("string_decoder/").StringDecoder),this._readableState.decoder=new a(Z),this._readableState.encoding=Z,this};var M=8388608;function z(Z){return Z>=M?Z=M:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function G(Z,ae){return Z<=0||ae.length===0&&ae.ended?0:ae.objectMode?1:Z!==Z?ae.flowing&&ae.length?ae.buffer.head.data.length:ae.length:(Z>ae.highWaterMark&&(ae.highWaterMark=z(Z)),Z<=ae.length?Z:ae.ended?ae.length:(ae.needReadable=!0,0))}x.prototype.read=function(Z){u("read",Z),Z=parseInt(Z,10);var ae=this._readableState,Ee=Z;if(Z!==0&&(ae.emittedReadable=!1),Z===0&&ae.needReadable&&(ae.length>=ae.highWaterMark||ae.ended))return u("read: emitReadable",ae.length,ae.ended),ae.length===0&&ae.ended?le(this):K(this),null;if(Z=G(Z,ae),Z===0&&ae.ended)return ae.length===0&&le(this),null;var ne=ae.needReadable;u("need readable",ne),(ae.length===0||ae.length-Z<ae.highWaterMark)&&(ne=!0,u("length less than watermark",ne)),ae.ended||ae.reading?(ne=!1,u("reading or ended",ne)):ne&&(u("do read"),ae.reading=!0,ae.sync=!0,ae.length===0&&(ae.needReadable=!0),this._read(ae.highWaterMark),ae.sync=!1,ae.reading||(Z=G(Ee,ae)));var J;return Z>0?J=ie(Z,ae):J=null,J===null?(ae.needReadable=!0,Z=0):ae.length-=Z,ae.length===0&&(ae.ended||(ae.needReadable=!0),Ee!==Z&&ae.ended&&le(this)),J!==null&&this.emit("data",J),J};function B(Z,ae){if(ae.ended)return;if(ae.decoder){var Ee=ae.decoder.end();Ee&&Ee.length&&(ae.buffer.push(Ee),ae.length+=ae.objectMode?1:Ee.length)}ae.ended=!0,K(Z)}function K(Z){var ae=Z._readableState;ae.needReadable=!1,ae.emittedReadable||(u("emitReadable",ae.flowing),ae.emittedReadable=!0,ae.sync?v.nextTick(F,Z):F(Z))}function F(Z){u("emit readable"),Z.emit("readable"),ye(Z)}function H(Z,ae){ae.readingMore||(ae.readingMore=!0,v.nextTick(W,Z,ae))}function W(Z,ae){for(var Ee=ae.length;!ae.reading&&!ae.flowing&&!ae.ended&&ae.length<ae.highWaterMark&&!(u("maybeReadMore read 0"),Z.read(0),Ee===ae.length);)Ee=ae.length;ae.readingMore=!1}x.prototype._read=function(Z){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(Z,ae){var Ee=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=Z;break;case 1:ne.pipes=[ne.pipes,Z];break;default:ne.pipes.push(Z);break}ne.pipesCount+=1,u("pipe count=%d opts=%j",ne.pipesCount,ae);var J=(!ae||ae.end!==!1)&&Z!==P.stdout&&Z!==P.stderr,X=J?he:Me;ne.endEmitted?v.nextTick(X):Ee.once("end",X),Z.on("unpipe",Y);function Y(Ce,Xe){u("onunpipe"),Ce===Ee&&(Xe&&Xe.hasUnpiped===!1&&(Xe.hasUnpiped=!0,ze()))}function he(){u("onend"),Z.end()}var de=Q(Ee);Z.on("drain",de);var Te=!1;function ze(){u("cleanup"),Z.removeListener("close",tt),Z.removeListener("finish",nt),Z.removeListener("drain",de),Z.removeListener("error",$e),Z.removeListener("unpipe",Y),Ee.removeListener("end",he),Ee.removeListener("end",Me),Ee.removeListener("data",Je),Te=!0,ne.awaitDrain&&(!Z._writableState||Z._writableState.needDrain)&&de()}var Ze=!1;Ee.on("data",Je);function Je(Ce){u("ondata"),Ze=!1;var Xe=Z.write(Ce);Xe===!1&&!Ze&&((ne.pipesCount===1&&ne.pipes===Z||ne.pipesCount>1&&be(ne.pipes,Z)!==-1)&&!Te&&(u("false write response, pause",Ee._readableState.awaitDrain),Ee._readableState.awaitDrain++,Ze=!0),Ee.pause())}function $e(Ce){u("onerror",Ce),Me(),Z.removeListener("error",$e),h(Z,"error")===0&&Z.emit("error",Ce)}O(Z,"error",$e);function tt(){Z.removeListener("finish",nt),Me()}Z.once("close",tt);function nt(){u("onfinish"),Z.removeListener("close",tt),Me()}Z.once("finish",nt);function Me(){u("unpipe"),Ee.unpipe(Z)}return Z.emit("pipe",Ee),ne.flowing||(u("pipe resume"),Ee.resume()),Z};function Q(Z){return function(){var ae=Z._readableState;u("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&h(Z,"data")&&(ae.flowing=!0,ye(Z))}}x.prototype.unpipe=function(Z){var ae=this._readableState,Ee={hasUnpiped:!1};if(ae.pipesCount===0)return this;if(ae.pipesCount===1)return Z&&Z!==ae.pipes?this:(Z||(Z=ae.pipes),ae.pipes=null,ae.pipesCount=0,ae.flowing=!1,Z&&Z.emit("unpipe",this,Ee),this);if(!Z){var ne=ae.pipes,J=ae.pipesCount;ae.pipes=null,ae.pipesCount=0,ae.flowing=!1;for(var X=0;X<J;X++)ne[X].emit("unpipe",this,Ee);return this}var Y=be(ae.pipes,Z);return Y===-1?this:(ae.pipes.splice(Y,1),ae.pipesCount-=1,ae.pipesCount===1&&(ae.pipes=ae.pipes[0]),Z.emit("unpipe",this,Ee),this)},x.prototype.on=function(Z,ae){var Ee=y.prototype.on.call(this,Z,ae);if(Z==="data")this._readableState.flowing!==!1&&this.resume();else if(Z==="readable"){var ne=this._readableState;!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.emittedReadable=!1,ne.reading?ne.length&&K(this):v.nextTick(ee,this))}return Ee},x.prototype.addListener=x.prototype.on;function ee(Z){u("readable nexttick read 0"),Z.read(0)}x.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(u("resume"),Z.flowing=!0,q(this,Z)),this};function q(Z,ae){ae.resumeScheduled||(ae.resumeScheduled=!0,v.nextTick(pe,Z,ae))}function pe(Z,ae){ae.reading||(u("resume read 0"),Z.read(0)),ae.resumeScheduled=!1,ae.awaitDrain=0,Z.emit("resume"),ye(Z),ae.flowing&&!ae.reading&&Z.read(0)}x.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ye(Z){var ae=Z._readableState;for(u("flow",ae.flowing);ae.flowing&&Z.read()!==null;);}x.prototype.wrap=function(Z){var ae=this,Ee=this._readableState,ne=!1;Z.on("end",function(){if(u("wrapped end"),Ee.decoder&&!Ee.ended){var Y=Ee.decoder.end();Y&&Y.length&&ae.push(Y)}ae.push(null)}),Z.on("data",function(Y){if(u("wrapped data"),Ee.decoder&&(Y=Ee.decoder.write(Y)),Ee.objectMode&&Y==null)return;if(!Ee.objectMode&&(!Y||!Y.length))return;var he=ae.push(Y);he||(ne=!0,Z.pause())});for(var J in Z)this[J]===void 0&&typeof Z[J]=="function"&&(this[J]=function(Y){return function(){return Z[Y].apply(Z,arguments)}}(J));for(var X=0;X<L.length;X++)Z.on(L[X],this.emit.bind(this,L[X]));return this._read=function(Y){u("wrapped _read",Y),ne&&(ne=!1,Z.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=ie;function ie(Z,ae){if(ae.length===0)return null;var Ee;return ae.objectMode?Ee=ae.buffer.shift():!Z||Z>=ae.length?(ae.decoder?Ee=ae.buffer.join(""):ae.buffer.length===1?Ee=ae.buffer.head.data:Ee=ae.buffer.concat(ae.length),ae.buffer.clear()):Ee=Se(Z,ae.buffer,ae.decoder),Ee}function Se(Z,ae,Ee){var ne;return Z<ae.head.data.length?(ne=ae.head.data.slice(0,Z),ae.head.data=ae.head.data.slice(Z)):Z===ae.head.data.length?ne=ae.shift():ne=Ee?ge(Z,ae):oe(Z,ae),ne}function ge(Z,ae){var Ee=ae.head,ne=1,J=Ee.data;for(Z-=J.length;Ee=Ee.next;){var X=Ee.data,Y=Z>X.length?X.length:Z;if(Y===X.length?J+=X:J+=X.slice(0,Z),Z-=Y,Z===0){Y===X.length?(++ne,Ee.next?ae.head=Ee.next:ae.head=ae.tail=null):(ae.head=Ee,Ee.data=X.slice(Y));break}++ne}return ae.length-=ne,J}function oe(Z,ae){var Ee=g.allocUnsafe(Z),ne=ae.head,J=1;for(ne.data.copy(Ee),Z-=ne.data.length;ne=ne.next;){var X=ne.data,Y=Z>X.length?X.length:Z;if(X.copy(Ee,Ee.length-Z,0,Y),Z-=Y,Z===0){Y===X.length?(++J,ne.next?ae.head=ne.next:ae.head=ae.tail=null):(ae.head=ne,ne.data=X.slice(Y));break}++J}return ae.length-=J,Ee}function le(Z){var ae=Z._readableState;if(ae.length>0)throw new Error('"endReadable()" called on non-empty stream');ae.endEmitted||(ae.ended=!0,v.nextTick(te,ae,Z))}function te(Z,ae){!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,ae.readable=!1,ae.emit("end"))}function be(Z,ae){for(var Ee=0,ne=Z.length;Ee<ne;Ee++)if(Z[Ee]===ae)return Ee;return-1}}).call(this,N("_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(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(i){return i&&i.__esModule?i:{default:i}}$.exports=S;var D=N("./_stream_duplex"),p=(0,c.default)(N("core-util-is"));p.inherits=N("inherits"),p.inherits(S,D);function s(i,r){var h=this._transformState;h.transforming=!1;var y=h.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,r!=null&&this.push(r),y(i);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function S(i){if(!(this instanceof S))return new S(i);D.call(this,i),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,i&&(typeof i.transform=="function"&&(this._transform=i.transform),typeof i.flush=="function"&&(this._flush=i.flush)),this.on("prefinish",v)}function v(){var i=this;typeof this._flush=="function"?this._flush(function(r,h){o(i,r,h)}):o(this,null,null)}S.prototype.push=function(i,r){return this._transformState.needTransform=!1,D.prototype.push.call(this,i,r)},S.prototype._transform=function(i,r,h){throw new Error("_transform() is not implemented")},S.prototype._write=function(i,r,h){var y=this._transformState;if(y.writecb=h,y.writechunk=i,y.writeencoding=r,!y.transforming){var g=this._readableState;(y.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},S.prototype._read=function(i){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0},S.prototype._destroy=function(i,r){var h=this;D.prototype._destroy.call(this,i,function(y){r(y),h.emit("close")})};function o(i,r,h){if(r)return i.emit("error",r);if(h!=null&&i.push(h),i._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(i._transformState.transforming)throw new Error("Calling transform done when still transforming");return i.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(N,$,k){(function(P,c){"use strict";var _=N("babel-runtime/core-js/object/define-property"),D=y(_),p=N("babel-runtime/core-js/symbol/has-instance"),s=y(p),S=N("babel-runtime/core-js/symbol"),v=y(S),o=N("babel-runtime/core-js/object/create"),i=y(o),r=N("babel-runtime/core-js/set-immediate"),h=y(r);function y(oe){return oe&&oe.__esModule?oe:{default:oe}}var g=N("process-nextick-args");$.exports=I;function w(oe,le,te){this.chunk=oe,this.encoding=le,this.callback=te,this.next=null}function m(oe){var le=this;this.next=null,this.entry=null,this.finish=function(){ge(le,oe)}}var d=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?h.default:g.nextTick,n;I.WritableState=b;var l=(0,i.default)(N("core-util-is"));l.inherits=N("inherits");var u={deprecate:N("util-deprecate")},T=N("./internal/streams/stream"),E=N("safe-buffer").Buffer,a=c.Uint8Array||function(){};function L(oe){return E.from(oe)}function O(oe){return E.isBuffer(oe)||oe instanceof a}var f=N("./internal/streams/destroy");l.inherits(I,T);function x(){}function b(oe,le){n=n||N("./_stream_duplex"),oe=oe||{};var te=le instanceof n;this.objectMode=!!oe.objectMode,te&&(this.objectMode=this.objectMode||!!oe.writableObjectMode);var be=oe.highWaterMark,Z=oe.writableHighWaterMark,ae=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:te&&(Z||Z===0)?this.highWaterMark=Z:this.highWaterMark=ae,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 Ee=oe.decodeStrings===!1;this.decodeStrings=!Ee,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){H(le,ne)},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 m(this)}b.prototype.getBuffer=function(){for(var le=this.bufferedRequest,te=[];le;)te.push(le),le=le.next;return te},function(){try{Object.defineProperty(b.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(oe){}}();var C;typeof v.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(C=Function.prototype[s.default],(0,D.default)(I,s.default,{value:function(le){return C.call(this,le)?!0:this!==I?!1:le&&le._writableState instanceof b}})):C=function(le){return le instanceof this};function I(oe){if(n=n||N("./_stream_duplex"),!C.call(I,this)&&!(this instanceof n))return new I(oe);this._writableState=new b(oe,this),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),T.call(this)}I.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(oe,le){var te=new Error("write after end");oe.emit("error",te),g.nextTick(le,te)}function M(oe,le,te,be){var Z=!0,ae=!1;return te===null?ae=new TypeError("May not write null values to stream"):typeof te!="string"&&te!==void 0&&!le.objectMode&&(ae=new TypeError("Invalid non-string/buffer chunk")),ae&&(oe.emit("error",ae),g.nextTick(be,ae),Z=!1),Z}I.prototype.write=function(oe,le,te){var be=this._writableState,Z=!1,ae=!be.objectMode&&O(oe);return ae&&!E.isBuffer(oe)&&(oe=L(oe)),typeof le=="function"&&(te=le,le=null),ae?le="buffer":le||(le=be.defaultEncoding),typeof te!="function"&&(te=x),be.ended?j(this,te):(ae||M(this,be,oe,te))&&(be.pendingcb++,Z=G(this,be,ae,oe,le,te)),Z},I.prototype.cork=function(){var oe=this._writableState;oe.corked++},I.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.finished&&!oe.bufferProcessing&&oe.bufferedRequest&&ee(this,oe))},I.prototype.setDefaultEncoding=function(le){if(typeof le=="string"&&(le=le.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((le+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+le);return this._writableState.defaultEncoding=le,this};function z(oe,le,te){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof le=="string"&&(le=E.from(le,te)),le}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(oe,le,te,be,Z,ae){if(!te){var Ee=z(le,be,Z);be!==Ee&&(te=!0,Z="buffer",be=Ee)}var ne=le.objectMode?1:be.length;le.length+=ne;var J=le.length<le.highWaterMark;if(J||(le.needDrain=!0),le.writing||le.corked){var X=le.lastBufferedRequest;le.lastBufferedRequest={chunk:be,encoding:Z,isBuf:te,callback:ae,next:null},X?X.next=le.lastBufferedRequest:le.bufferedRequest=le.lastBufferedRequest,le.bufferedRequestCount+=1}else B(oe,le,!1,ne,be,Z,ae);return J}function B(oe,le,te,be,Z,ae,Ee){le.writelen=be,le.writecb=Ee,le.writing=!0,le.sync=!0,te?oe._writev(Z,le.onwrite):oe._write(Z,ae,le.onwrite),le.sync=!1}function K(oe,le,te,be,Z){--le.pendingcb,te?(g.nextTick(Z,be),g.nextTick(ie,oe,le),oe._writableState.errorEmitted=!0,oe.emit("error",be)):(Z(be),oe._writableState.errorEmitted=!0,oe.emit("error",be),ie(oe,le))}function F(oe){oe.writing=!1,oe.writecb=null,oe.length-=oe.writelen,oe.writelen=0}function H(oe,le){var te=oe._writableState,be=te.sync,Z=te.writecb;if(F(te),le)K(oe,te,be,le,Z);else{var ae=q(te);!ae&&!te.corked&&!te.bufferProcessing&&te.bufferedRequest&&ee(oe,te),be?d(W,oe,te,ae,Z):W(oe,te,ae,Z)}}function W(oe,le,te,be){te||Q(oe,le),le.pendingcb--,be(),ie(oe,le)}function Q(oe,le){le.length===0&&le.needDrain&&(le.needDrain=!1,oe.emit("drain"))}function ee(oe,le){le.bufferProcessing=!0;var te=le.bufferedRequest;if(oe._writev&&te&&te.next){var be=le.bufferedRequestCount,Z=new Array(be),ae=le.corkedRequestsFree;ae.entry=te;for(var Ee=0,ne=!0;te;)Z[Ee]=te,te.isBuf||(ne=!1),te=te.next,Ee+=1;Z.allBuffers=ne,B(oe,le,!0,le.length,Z,"",ae.finish),le.pendingcb++,le.lastBufferedRequest=null,ae.next?(le.corkedRequestsFree=ae.next,ae.next=null):le.corkedRequestsFree=new m(le),le.bufferedRequestCount=0}else{for(;te;){var J=te.chunk,X=te.encoding,Y=te.callback,he=le.objectMode?1:J.length;if(B(oe,le,!1,he,J,X,Y),te=te.next,le.bufferedRequestCount--,le.writing)break}te===null&&(le.lastBufferedRequest=null)}le.bufferedRequest=te,le.bufferProcessing=!1}I.prototype._write=function(oe,le,te){te(new Error("_write() is not implemented"))},I.prototype._writev=null,I.prototype.end=function(oe,le,te){var be=this._writableState;typeof oe=="function"?(te=oe,oe=null,le=null):typeof le=="function"&&(te=le,le=null),oe!=null&&this.write(oe,le),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&Se(this,be,te)};function q(oe){return oe.ending&&oe.length===0&&oe.bufferedRequest===null&&!oe.finished&&!oe.writing}function pe(oe,le){oe._final(function(te){le.pendingcb--,te&&oe.emit("error",te),le.prefinished=!0,oe.emit("prefinish"),ie(oe,le)})}function ye(oe,le){!le.prefinished&&!le.finalCalled&&(typeof oe._final=="function"?(le.pendingcb++,le.finalCalled=!0,g.nextTick(pe,oe,le)):(le.prefinished=!0,oe.emit("prefinish")))}function ie(oe,le){var te=q(le);return te&&(ye(oe,le),le.pendingcb===0&&(le.finished=!0,oe.emit("finish"))),te}function Se(oe,le,te){le.ending=!0,ie(oe,le),te&&(le.finished?g.nextTick(te):oe.once("finish",te)),le.ended=!0,oe.writable=!1}function ge(oe,le,te){var be=oe.entry;for(oe.entry=null;be;){var Z=be.callback;le.pendingcb--,Z(te),be=be.next}le.corkedRequestsFree?le.corkedRequestsFree.next=oe:le.corkedRequestsFree=oe}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){if(!this._writableState)return;this._writableState.destroyed=le}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(oe,le){this.end(),le(oe)}}).call(this,N("_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(N,$,k){"use strict";function P(p,s){if(!(p instanceof s))throw new TypeError("Cannot call a class as a function")}var c=N("safe-buffer").Buffer,_=N("util");function D(p,s,S){p.copy(s,S)}$.exports=function(){function p(){P(this,p),this.head=null,this.tail=null,this.length=0}return p.prototype.push=function(S){var v={data:S,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length},p.prototype.unshift=function(S){var v={data:S,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length},p.prototype.shift=function(){if(this.length===0)return;var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S},p.prototype.clear=function(){this.head=this.tail=null,this.length=0},p.prototype.join=function(S){if(this.length===0)return"";for(var v=this.head,o=""+v.data;v=v.next;)o+=S+v.data;return o},p.prototype.concat=function(S){if(this.length===0)return c.alloc(0);if(this.length===1)return this.head.data;for(var v=c.allocUnsafe(S>>>0),o=this.head,i=0;o;)D(o.data,v,i),i+=o.data.length,o=o.next;return v},p}(),_&&_.inspect&&_.inspect.custom&&($.exports.prototype[_.inspect.custom]=function(){var p=_.inspect({length:this.length});return this.constructor.name+" "+p})},{"safe-buffer":228,util:71}],220:[function(N,$,k){"use strict";var P=N("process-nextick-args");function c(p,s){var S=this,v=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return v||o?(s?s(p):p&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(D,this,p),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(i){!s&&i?(P.nextTick(D,S,i),S._writableState&&(S._writableState.errorEmitted=!0)):s&&s(i)}),this)}function _(){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(p,s){p.emit("error",s)}$.exports={destroy:c,undestroy:_}},{"process-nextick-args":207}],221:[function(N,$,k){"use strict";$.exports=N("events").EventEmitter},{events:192}],222:[function(N,$,k){$.exports=N("./readable").PassThrough},{"./readable":223}],223:[function(N,$,k){k=$.exports=N("./lib/_stream_readable.js"),k.Stream=k,k.Readable=k,k.Writable=N("./lib/_stream_writable.js"),k.Duplex=N("./lib/_stream_duplex.js"),k.Transform=N("./lib/_stream_transform.js"),k.PassThrough=N("./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(N,$,k){$.exports=N("./readable").Transform},{"./readable":223}],225:[function(N,$,k){$.exports=N("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(N,$,k){var P=function(){return this}()||Function("return this")(),c=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,_=c&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,$.exports=N("./runtime"),c)P.regeneratorRuntime=_;else try{delete P.regeneratorRuntime}catch(D){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(N,$,k){!function(P){"use strict";var c=Object.prototype,_=c.hasOwnProperty,D,p=typeof Symbol=="function"?Symbol:{},s=p.iterator||"@@iterator",S=p.asyncIterator||"@@asyncIterator",v=p.toStringTag||"@@toStringTag",o=typeof $=="object",i=P.regeneratorRuntime;if(i){o&&($.exports=i);return}i=P.regeneratorRuntime=o?$.exports:{};function r(G,B,K,F){var H=B&&B.prototype instanceof n?B:n,W=Object.create(H.prototype),Q=new j(F||[]);return W._invoke=x(G,K,Q),W}i.wrap=r;function h(G,B,K){try{return{type:"normal",arg:G.call(B,K)}}catch(F){return{type:"throw",arg:F}}}var y="suspendedStart",g="suspendedYield",w="executing",m="completed",d={};function n(){}function l(){}function u(){}var T={};T[s]=function(){return this};var E=Object.getPrototypeOf,a=E&&E(E(M([])));a&&a!==c&&_.call(a,s)&&(T=a);var L=u.prototype=n.prototype=Object.create(T);l.prototype=L.constructor=u,u.constructor=l,u[v]=l.displayName="GeneratorFunction";function O(G){["next","throw","return"].forEach(function(B){G[B]=function(K){return this._invoke(B,K)}})}i.isGeneratorFunction=function(G){var B=typeof G=="function"&&G.constructor;return B?B===l||(B.displayName||B.name)==="GeneratorFunction":!1},i.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,u):(G.__proto__=u,v in G||(G[v]="GeneratorFunction")),G.prototype=Object.create(L),G},i.awrap=function(G){return{__await:G}};function f(G){function B(H,W,Q,ee){var q=h(G[H],G,W);if(q.type==="throw")ee(q.arg);else{var pe=q.arg,ye=pe.value;return ye&&typeof ye=="object"&&_.call(ye,"__await")?Promise.resolve(ye.__await).then(function(ie){B("next",ie,Q,ee)},function(ie){B("throw",ie,Q,ee)}):Promise.resolve(ye).then(function(ie){pe.value=ie,Q(pe)},ee)}}var K;function F(H,W){function Q(){return new Promise(function(ee,q){B(H,W,ee,q)})}return K=K?K.then(Q,Q):Q()}this._invoke=F}O(f.prototype),f.prototype[S]=function(){return this},i.AsyncIterator=f,i.async=function(G,B,K,F){var H=new f(r(G,B,K,F));return i.isGeneratorFunction(B)?H:H.next().then(function(W){return W.done?W.value:H.next()})};function x(G,B,K){var F=y;return function(W,Q){if(F===w)throw new Error("Generator is already running");if(F===m){if(W==="throw")throw Q;return z()}for(K.method=W,K.arg=Q;;){var ee=K.delegate;if(ee){var q=b(ee,K);if(q){if(q===d)continue;return q}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(F===y)throw F=m,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);F=w;var pe=h(G,B,K);if(pe.type==="normal"){if(F=K.done?m:g,pe.arg===d)continue;return{value:pe.arg,done:K.done}}else pe.type==="throw"&&(F=m,K.method="throw",K.arg=pe.arg)}}}function b(G,B){var K=G.iterator[B.method];if(K===D){if(B.delegate=null,B.method==="throw"){if(G.iterator.return&&(B.method="return",B.arg=D,b(G,B),B.method==="throw"))return d;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var F=h(K,G.iterator,B.arg);if(F.type==="throw")return B.method="throw",B.arg=F.arg,B.delegate=null,d;var H=F.arg;if(!H)return B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,d;if(H.done)B[G.resultName]=H.value,B.next=G.nextLoc,B.method!=="return"&&(B.method="next",B.arg=D);else return H;return B.delegate=null,d}O(L),L[v]="Generator",L[s]=function(){return this},L.toString=function(){return"[object Generator]"};function C(G){var B={tryLoc:G[0]};1 in G&&(B.catchLoc=G[1]),2 in G&&(B.finallyLoc=G[2],B.afterLoc=G[3]),this.tryEntries.push(B)}function I(G){var B=G.completion||{};B.type="normal",delete B.arg,G.completion=B}function j(G){this.tryEntries=[{tryLoc:"root"}],G.forEach(C,this),this.reset(!0)}i.keys=function(G){var B=[];for(var K in G)B.push(K);return B.reverse(),function F(){for(;B.length;){var H=B.pop();if(H in G)return F.value=H,F.done=!1,F}return F.done=!0,F}};function M(G){if(G){var B=G[s];if(B)return B.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var K=-1,F=function H(){for(;++K<G.length;)if(_.call(G,K))return H.value=G[K],H.done=!1,H;return H.value=D,H.done=!0,H};return F.next=F}}return{next:z}}i.values=M;function z(){return{value:D,done:!0}}j.prototype={constructor:j,reset:function(G){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(I),!G)for(var B in this)B.charAt(0)==="t"&&_.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=D)},stop:function(){this.done=!0;var G=this.tryEntries[0],B=G.completion;if(B.type==="throw")throw B.arg;return this.rval},dispatchException:function(G){if(this.done)throw G;var B=this;function K(q,pe){return W.type="throw",W.arg=G,B.next=q,pe&&(B.method="next",B.arg=D),!!pe}for(var F=this.tryEntries.length-1;F>=0;--F){var H=this.tryEntries[F],W=H.completion;if(H.tryLoc==="root")return K("end");if(H.tryLoc<=this.prev){var Q=_.call(H,"catchLoc"),ee=_.call(H,"finallyLoc");if(Q&&ee){if(this.prev<H.catchLoc)return K(H.catchLoc,!0);if(this.prev<H.finallyLoc)return K(H.finallyLoc)}else if(Q){if(this.prev<H.catchLoc)return K(H.catchLoc,!0)}else if(ee){if(this.prev<H.finallyLoc)return K(H.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(G,B){for(var K=this.tryEntries.length-1;K>=0;--K){var F=this.tryEntries[K];if(F.tryLoc<=this.prev&&_.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var H=F;break}}H&&(G==="break"||G==="continue")&&H.tryLoc<=B&&B<=H.finallyLoc&&(H=null);var W=H?H.completion:{};return W.type=G,W.arg=B,H?(this.method="next",this.next=H.finallyLoc,d):this.complete(W)},complete:function(G,B){if(G.type==="throw")throw G.arg;return G.type==="break"||G.type==="continue"?this.next=G.arg:G.type==="return"?(this.rval=this.arg=G.arg,this.method="return",this.next="end"):G.type==="normal"&&B&&(this.next=B),d},finish:function(G){for(var B=this.tryEntries.length-1;B>=0;--B){var K=this.tryEntries[B];if(K.finallyLoc===G)return this.complete(K.completion,K.afterLoc),I(K),d}},catch:function(G){for(var B=this.tryEntries.length-1;B>=0;--B){var K=this.tryEntries[B];if(K.tryLoc===G){var F=K.completion;if(F.type==="throw"){var H=F.arg;I(K)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(G,B,K){return this.delegate={iterator:M(G),resultName:B,nextLoc:K},this.method==="next"&&(this.arg=D),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(N,$,k){var P=N("buffer"),c=P.Buffer;function _(p,s){for(var S in p)s[S]=p[S]}c.from&&c.alloc&&c.allocUnsafe&&c.allocUnsafeSlow?$.exports=P:(_(P,k),k.Buffer=D);function D(p,s,S){return c(p,s,S)}_(c,D),D.from=function(p,s,S){if(typeof p=="number")throw new TypeError("Argument must not be a number");return c(p,s,S)},D.alloc=function(p,s,S){if(typeof p!="number")throw new TypeError("Argument must be a number");var v=c(p);return s!==void 0?typeof S=="string"?v.fill(s,S):v.fill(s):v.fill(0),v},D.allocUnsafe=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return c(p)},D.allocUnsafeSlow=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(p)}},{buffer:73}],229:[function(N,$,k){(function(P){"use strict";var c=N("babel-runtime/core-js/string/from-code-point"),_=g(c),D=N("babel-runtime/core-js/json/stringify"),p=g(D),s=N("babel-runtime/helpers/typeof"),S=g(s),v=N("babel-runtime/core-js/object/define-property"),o=g(v),i=N("babel-runtime/core-js/object/keys"),r=g(i),h=N("babel-runtime/core-js/object/create"),y=g(h);function g(w){return w&&w.__esModule?w:{default:w}}(function(w){w.parser=function(X,Y){return new d(X,Y)},w.SAXParser=d,w.SAXStream=L,w.createStream=a,w.MAX_BUFFER_LENGTH=64*1024;var m=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];w.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function d(X,Y){if(!(this instanceof d))return new d(X,Y);var he=this;l(he),he.q=he.c="",he.bufferCheckPosition=w.MAX_BUFFER_LENGTH,he.opt=Y||{},he.opt.lowercase=he.opt.lowercase||he.opt.lowercasetags,he.looseCase=he.opt.lowercase?"toLowerCase":"toUpperCase",he.tags=[],he.closed=he.closedRoot=he.sawRoot=!1,he.tag=he.error=null,he.strict=!!X,he.noscript=!!(X||he.opt.noscript),he.state=W.BEGIN,he.strictEntities=he.opt.strictEntities,he.ENTITIES=he.strictEntities?(0,y.default)(w.XML_ENTITIES):(0,y.default)(w.ENTITIES),he.attribList=[],he.opt.xmlns&&(he.ns=(0,y.default)(C)),he.trackPosition=he.opt.position!==!1,he.trackPosition&&(he.position=he.line=he.column=0),ee(he,"onready")}y.default||(Object.create=function(X){function Y(){}Y.prototype=X;var he=new Y;return he}),r.default||(Object.keys=function(X){var Y=[];for(var he in X)X.hasOwnProperty(he)&&Y.push(he);return Y});function n(X){for(var Y=Math.max(w.MAX_BUFFER_LENGTH,10),he=0,de=0,Te=m.length;de<Te;de++){var ze=X[m[de]].length;if(ze>Y)switch(m[de]){case"textNode":pe(X);break;case"cdata":q(X,"oncdata",X.cdata),X.cdata="";break;case"script":q(X,"onscript",X.script),X.script="";break;default:ie(X,"Max buffer length exceeded: "+m[de])}he=Math.max(he,ze)}var Ze=w.MAX_BUFFER_LENGTH-he;X.bufferCheckPosition=Ze+X.position}function l(X){for(var Y=0,he=m.length;Y<he;Y++)X[m[Y]]=""}function u(X){pe(X),X.cdata!==""&&(q(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(q(X,"onscript",X.script),X.script="")}d.prototype={end:function(){Se(this)},write:J,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){u(this)}};var T;try{T=N("stream").Stream}catch(X){T=function(){}}var E=w.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function a(X,Y){return new L(X,Y)}function L(X,Y){if(!(this instanceof L))return new L(X,Y);T.apply(this),this._parser=new d(X,Y),this.writable=!0,this.readable=!0;var he=this;this._parser.onend=function(){he.emit("end")},this._parser.onerror=function(de){he.emit("error",de),he._parser.error=null},this._decoder=null,E.forEach(function(de){(0,o.default)(he,"on"+de,{get:function(){return he._parser["on"+de]},set:function(ze){if(!ze)return he.removeAllListeners(de),he._parser["on"+de]=ze,ze;he.on(de,ze)},enumerable:!0,configurable:!1})})}L.prototype=(0,y.default)(T.prototype,{constructor:{value:L}}),L.prototype.write=function(X){if(typeof P=="function"&&typeof P.isBuffer=="function"&&P.isBuffer(X)){if(!this._decoder){var Y=N("string_decoder").StringDecoder;this._decoder=new Y("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},L.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},L.prototype.on=function(X,Y){var he=this;return!he._parser["on"+X]&&E.indexOf(X)!==-1&&(he._parser["on"+X]=function(){var de=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);de.splice(0,0,X),he.emit.apply(he,de)}),T.prototype.on.call(he,X,Y)};var O="[CDATA[",f="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",C={xml:x,xmlns:b},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]/,j=/[:_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-]/,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]/,z=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function G(X){return X===" "||X===`
|
|
|
`||X==="\r"||X===" "}function B(X){return X==='"'||X==="'"}function K(X){return X===">"||G(X)}function F(X,Y){return X.test(Y)}function H(X,Y){return!F(X,Y)}var W=0;w.STATE={BEGIN:W++,BEGIN_WHITESPACE:W++,TEXT:W++,TEXT_ENTITY:W++,OPEN_WAKA:W++,SGML_DECL:W++,SGML_DECL_QUOTED:W++,DOCTYPE:W++,DOCTYPE_QUOTED:W++,DOCTYPE_DTD:W++,DOCTYPE_DTD_QUOTED:W++,COMMENT_STARTING:W++,COMMENT:W++,COMMENT_ENDING:W++,COMMENT_ENDED:W++,CDATA:W++,CDATA_ENDING:W++,CDATA_ENDING_2:W++,PROC_INST:W++,PROC_INST_BODY:W++,PROC_INST_ENDING:W++,OPEN_TAG:W++,OPEN_TAG_SLASH:W++,ATTRIB:W++,ATTRIB_NAME:W++,ATTRIB_NAME_SAW_WHITE:W++,ATTRIB_VALUE:W++,ATTRIB_VALUE_QUOTED:W++,ATTRIB_VALUE_CLOSED:W++,ATTRIB_VALUE_UNQUOTED:W++,ATTRIB_VALUE_ENTITY_Q:W++,ATTRIB_VALUE_ENTITY_U:W++,CLOSE_TAG:W++,CLOSE_TAG_SAW_WHITE:W++,SCRIPT:W++,SCRIPT_ENDING:W++},w.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},w.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,r.default)(w.ENTITIES).forEach(function(X){var Y=w.ENTITIES[X],he=typeof Y=="number"?String.fromCharCode(Y):Y;w.ENTITIES[X]=he});for(var Q in w.STATE)w.STATE[w.STATE[Q]]=Q;W=w.STATE;function ee(X,Y,he){X[Y]&&X[Y](he)}function q(X,Y,he){X.textNode&&pe(X),ee(X,Y,he)}function pe(X){X.textNode=ye(X.opt,X.textNode),X.textNode&&ee(X,"ontext",X.textNode),X.textNode=""}function ye(X,Y){return X.trim&&(Y=Y.trim()),X.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function ie(X,Y){return pe(X),X.trackPosition&&(Y+=`
|
|
|
Line: `+X.line+`
|
|
|
Column: `+X.column+`
|
|
|
Char: `+X.c),Y=new Error(Y),X.error=Y,ee(X,"onerror",Y),X}function Se(X){return X.sawRoot&&!X.closedRoot&&ge(X,"Unclosed root tag"),X.state!==W.BEGIN&&X.state!==W.BEGIN_WHITESPACE&&X.state!==W.TEXT&&ie(X,"Unexpected end"),pe(X),X.c="",X.closed=!0,ee(X,"onend"),d.call(X,X.strict,X.opt),X}function ge(X,Y){if((typeof X=="undefined"?"undefined":(0,S.default)(X))!=="object"||!(X instanceof d))throw new Error("bad call to strictFail");X.strict&&ie(X,Y)}function oe(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Y=X.tags[X.tags.length-1]||X,he=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(he.ns=Y.ns),X.attribList.length=0,q(X,"onopentagstart",he)}function le(X,Y){var he=X.indexOf(":"),de=he<0?["",X]:X.split(":"),Te=de[0],ze=de[1];return Y&&X==="xmlns"&&(Te="xmlns",ze=""),{prefix:Te,local:ze}}function te(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=le(X.attribName,!0),he=Y.prefix,de=Y.local;if(he==="xmlns")if(de==="xml"&&X.attribValue!==x)ge(X,"xml: prefix must be bound to "+x+`
|
|
|
Actual: `+X.attribValue);else if(de==="xmlns"&&X.attribValue!==b)ge(X,"xmlns: prefix must be bound to "+b+`
|
|
|
Actual: `+X.attribValue);else{var Te=X.tag,ze=X.tags[X.tags.length-1]||X;Te.ns===ze.ns&&(Te.ns=(0,y.default)(ze.ns)),Te.ns[de]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,q(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,Y){if(X.opt.xmlns){var he=X.tag,de=le(X.tagName);he.prefix=de.prefix,he.local=de.local,he.uri=he.ns[de.prefix]||"",he.prefix&&!he.uri&&(ge(X,"Unbound namespace prefix: "+(0,p.default)(X.tagName)),he.uri=de.prefix);var Te=X.tags[X.tags.length-1]||X;he.ns&&Te.ns!==he.ns&&(0,r.default)(he.ns).forEach(function(Ue){q(X,"onopennamespace",{prefix:Ue,uri:he.ns[Ue]})});for(var ze=0,Ze=X.attribList.length;ze<Ze;ze++){var Je=X.attribList[ze],$e=Je[0],tt=Je[1],nt=le($e,!0),Me=nt.prefix,Ce=nt.local,Xe=Me===""?"":he.ns[Me]||"",et={name:$e,value:tt,prefix:Me,local:Ce,uri:Xe};Me&&Me!=="xmlns"&&!Xe&&(ge(X,"Unbound namespace prefix: "+(0,p.default)(Me)),et.uri=Me),X.tag.attributes[$e]=et,q(X,"onattribute",et)}X.attribList.length=0}X.tag.isSelfClosing=!!Y,X.sawRoot=!0,X.tags.push(X.tag),q(X,"onopentag",X.tag),Y||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=W.SCRIPT:X.state=W.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function Z(X){if(!X.tagName){ge(X,"Weird empty close tag."),X.textNode+="</>",X.state=W.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=W.SCRIPT;return}q(X,"onscript",X.script),X.script=""}var Y=X.tags.length,he=X.tagName;X.strict||(he=he[X.looseCase]());for(var de=he;Y--;){var Te=X.tags[Y];if(Te.name!==de)ge(X,"Unexpected close tag");else break}if(Y<0){ge(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=W.TEXT;return}X.tagName=he;for(var ze=X.tags.length;ze-- >Y;){var Ze=X.tag=X.tags.pop();X.tagName=X.tag.name,q(X,"onclosetag",X.tagName);var Je={};for(var $e in Ze.ns)Je[$e]=Ze.ns[$e];var tt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Ze.ns!==tt.ns&&(0,r.default)(Ze.ns).forEach(function(nt){var Me=Ze.ns[nt];q(X,"onclosenamespace",{prefix:nt,uri:Me})})}Y===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=W.TEXT}function ae(X){var Y=X.entity,he=Y.toLowerCase(),de,Te="";return X.ENTITIES[Y]?X.ENTITIES[Y]:X.ENTITIES[he]?X.ENTITIES[he]:(Y=he,Y.charAt(0)==="#"&&(Y.charAt(1)==="x"?(Y=Y.slice(2),de=parseInt(Y,16),Te=de.toString(16)):(Y=Y.slice(1),de=parseInt(Y,10),Te=de.toString(10))),Y=Y.replace(/^0+/,""),isNaN(de)||Te.toLowerCase()!==Y?(ge(X,"Invalid character entity"),"&"+X.entity+";"):(0,_.default)(de))}function Ee(X,Y){Y==="<"?(X.state=W.OPEN_WAKA,X.startTagPosition=X.position):G(Y)||(ge(X,"Non-whitespace before first tag."),X.textNode=Y,X.state=W.TEXT)}function ne(X,Y){var he="";return Y<X.length&&(he=X.charAt(Y)),he}function J(X){var Y=this;if(this.error)throw this.error;if(Y.closed)return ie(Y,"Cannot write after close. Assign an onready handler.");if(X===null)return Se(Y);(typeof X=="undefined"?"undefined":(0,S.default)(X))==="object"&&(X=X.toString());for(var he=0,de="";!(de=ne(X,he++),Y.c=de,!de);){Y.trackPosition&&(Y.position++,de===`
|
|
|
`?(Y.line++,Y.column=0):Y.column++);switch(Y.state){case W.BEGIN:if(Y.state=W.BEGIN_WHITESPACE,de==="\uFEFF")continue;Ee(Y,de);continue;case W.BEGIN_WHITESPACE:Ee(Y,de);continue;case W.TEXT:if(Y.sawRoot&&!Y.closedRoot){for(var Te=he-1;de&&de!=="<"&&de!=="&";)de=ne(X,he++),de&&Y.trackPosition&&(Y.position++,de===`
|
|
|
`?(Y.line++,Y.column=0):Y.column++);Y.textNode+=X.substring(Te,he-1)}de==="<"&&!(Y.sawRoot&&Y.closedRoot&&!Y.strict)?(Y.state=W.OPEN_WAKA,Y.startTagPosition=Y.position):(!G(de)&&(!Y.sawRoot||Y.closedRoot)&&ge(Y,"Text data outside of root node."),de==="&"?Y.state=W.TEXT_ENTITY:Y.textNode+=de);continue;case W.SCRIPT:de==="<"?Y.state=W.SCRIPT_ENDING:Y.script+=de;continue;case W.SCRIPT_ENDING:de==="/"?Y.state=W.CLOSE_TAG:(Y.script+="<"+de,Y.state=W.SCRIPT);continue;case W.OPEN_WAKA:if(de==="!")Y.state=W.SGML_DECL,Y.sgmlDecl="";else if(!G(de))if(F(I,de))Y.state=W.OPEN_TAG,Y.tagName=de;else if(de==="/")Y.state=W.CLOSE_TAG,Y.tagName="";else if(de==="?")Y.state=W.PROC_INST,Y.procInstName=Y.procInstBody="";else{if(ge(Y,"Unencoded <"),Y.startTagPosition+1<Y.position){var ze=Y.position-Y.startTagPosition;de=new Array(ze).join(" ")+de}Y.textNode+="<"+de,Y.state=W.TEXT}continue;case W.SGML_DECL:(Y.sgmlDecl+de).toUpperCase()===O?(q(Y,"onopencdata"),Y.state=W.CDATA,Y.sgmlDecl="",Y.cdata=""):Y.sgmlDecl+de==="--"?(Y.state=W.COMMENT,Y.comment="",Y.sgmlDecl=""):(Y.sgmlDecl+de).toUpperCase()===f?(Y.state=W.DOCTYPE,(Y.doctype||Y.sawRoot)&&ge(Y,"Inappropriately located doctype declaration"),Y.doctype="",Y.sgmlDecl=""):de===">"?(q(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=W.TEXT):(B(de)&&(Y.state=W.SGML_DECL_QUOTED),Y.sgmlDecl+=de);continue;case W.SGML_DECL_QUOTED:de===Y.q&&(Y.state=W.SGML_DECL,Y.q=""),Y.sgmlDecl+=de;continue;case W.DOCTYPE:de===">"?(Y.state=W.TEXT,q(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=de,de==="["?Y.state=W.DOCTYPE_DTD:B(de)&&(Y.state=W.DOCTYPE_QUOTED,Y.q=de));continue;case W.DOCTYPE_QUOTED:Y.doctype+=de,de===Y.q&&(Y.q="",Y.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:Y.doctype+=de,de==="]"?Y.state=W.DOCTYPE:B(de)&&(Y.state=W.DOCTYPE_DTD_QUOTED,Y.q=de);continue;case W.DOCTYPE_DTD_QUOTED:Y.doctype+=de,de===Y.q&&(Y.state=W.DOCTYPE_DTD,Y.q="");continue;case W.COMMENT:de==="-"?Y.state=W.COMMENT_ENDING:Y.comment+=de;continue;case W.COMMENT_ENDING:de==="-"?(Y.state=W.COMMENT_ENDED,Y.comment=ye(Y.opt,Y.comment),Y.comment&&q(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+de,Y.state=W.COMMENT);continue;case W.COMMENT_ENDED:de!==">"?(ge(Y,"Malformed comment"),Y.comment+="--"+de,Y.state=W.COMMENT):Y.state=W.TEXT;continue;case W.CDATA:de==="]"?Y.state=W.CDATA_ENDING:Y.cdata+=de;continue;case W.CDATA_ENDING:de==="]"?Y.state=W.CDATA_ENDING_2:(Y.cdata+="]"+de,Y.state=W.CDATA);continue;case W.CDATA_ENDING_2:de===">"?(Y.cdata&&q(Y,"oncdata",Y.cdata),q(Y,"onclosecdata"),Y.cdata="",Y.state=W.TEXT):de==="]"?Y.cdata+="]":(Y.cdata+="]]"+de,Y.state=W.CDATA);continue;case W.PROC_INST:de==="?"?Y.state=W.PROC_INST_ENDING:G(de)?Y.state=W.PROC_INST_BODY:Y.procInstName+=de;continue;case W.PROC_INST_BODY:if(!Y.procInstBody&&G(de))continue;de==="?"?Y.state=W.PROC_INST_ENDING:Y.procInstBody+=de;continue;case W.PROC_INST_ENDING:de===">"?(q(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=W.TEXT):(Y.procInstBody+="?"+de,Y.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:F(j,de)?Y.tagName+=de:(oe(Y),de===">"?be(Y):de==="/"?Y.state=W.OPEN_TAG_SLASH:(G(de)||ge(Y,"Invalid character in tag name"),Y.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:de===">"?(be(Y,!0),Z(Y)):(ge(Y,"Forward-slash in opening tag not followed by >"),Y.state=W.ATTRIB);continue;case W.ATTRIB:if(G(de))continue;de===">"?be(Y):de==="/"?Y.state=W.OPEN_TAG_SLASH:F(I,de)?(Y.attribName=de,Y.attribValue="",Y.state=W.ATTRIB_NAME):ge(Y,"Invalid attribute name");continue;case W.ATTRIB_NAME:de==="="?Y.state=W.ATTRIB_VALUE:de===">"?(ge(Y,"Attribute without value"),Y.attribValue=Y.attribName,te(Y),be(Y)):G(de)?Y.state=W.ATTRIB_NAME_SAW_WHITE:F(j,de)?Y.attribName+=de:ge(Y,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if(de==="=")Y.state=W.ATTRIB_VALUE;else{if(G(de))continue;ge(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",q(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",de===">"?be(Y):F(I,de)?(Y.attribName=de,Y.state=W.ATTRIB_NAME):(ge(Y,"Invalid attribute name"),Y.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(G(de))continue;B(de)?(Y.q=de,Y.state=W.ATTRIB_VALUE_QUOTED):(ge(Y,"Unquoted attribute value"),Y.state=W.ATTRIB_VALUE_UNQUOTED,Y.attribValue=de);continue;case W.ATTRIB_VALUE_QUOTED:if(de!==Y.q){de==="&"?Y.state=W.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=de;continue}te(Y),Y.q="",Y.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:G(de)?Y.state=W.ATTRIB:de===">"?be(Y):de==="/"?Y.state=W.OPEN_TAG_SLASH:F(I,de)?(ge(Y,"No whitespace between attributes"),Y.attribName=de,Y.attribValue="",Y.state=W.ATTRIB_NAME):ge(Y,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(!K(de)){de==="&"?Y.state=W.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=de;continue}te(Y),de===">"?be(Y):Y.state=W.ATTRIB;continue;case W.CLOSE_TAG:if(Y.tagName)de===">"?Z(Y):F(j,de)?Y.tagName+=de:Y.script?(Y.script+="</"+Y.tagName,Y.tagName="",Y.state=W.SCRIPT):(G(de)||ge(Y,"Invalid tagname in closing tag"),Y.state=W.CLOSE_TAG_SAW_WHITE);else{if(G(de))continue;H(I,de)?Y.script?(Y.script+="</"+de,Y.state=W.SCRIPT):ge(Y,"Invalid tagname in closing tag."):Y.tagName=de}continue;case W.CLOSE_TAG_SAW_WHITE:if(G(de))continue;de===">"?Z(Y):ge(Y,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:var Ze,Je;switch(Y.state){case W.TEXT_ENTITY:Ze=W.TEXT,Je="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:Ze=W.ATTRIB_VALUE_QUOTED,Je="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:Ze=W.ATTRIB_VALUE_UNQUOTED,Je="attribValue";break}de===";"?(Y[Je]+=ae(Y),Y.entity="",Y.state=Ze):F(Y.entity.length?z:M,de)?Y.entity+=de:(ge(Y,"Invalid character in entity name"),Y[Je]+="&"+Y.entity+de,Y.entity="",Y.state=Ze);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 */_.default||function(){var X=String.fromCharCode,Y=Math.floor,he=function(){var Te=16384,ze=[],Ze,Je,$e=-1,tt=arguments.length;if(!tt)return"";for(var nt="";++$e<tt;){var Me=Number(arguments[$e]);if(!isFinite(Me)||Me<0||Me>1114111||Y(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?ze.push(Me):(Me-=65536,Ze=(Me>>10)+55296,Je=Me%1024+56320,ze.push(Ze,Je)),($e+1===tt||ze.length>Te)&&(nt+=X.apply(null,ze),ze.length=0)}return nt};o.default?Object.defineProperty(String,"fromCodePoint",{value:he,configurable:!0,writable:!0}):String.fromCodePoint=he}()})(typeof k=="undefined"?(void 0).sax={}:k)}).call(this,N("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(N,$,k){$.exports=_;var P=N("events").EventEmitter,c=N("inherits");c(_,P),_.Readable=N("readable-stream/readable.js"),_.Writable=N("readable-stream/writable.js"),_.Duplex=N("readable-stream/duplex.js"),_.Transform=N("readable-stream/transform.js"),_.PassThrough=N("readable-stream/passthrough.js"),_.Stream=_;function _(){P.call(this)}_.prototype.pipe=function(D,p){var s=this;function S(g){D.writable&&(D.write(g)===!1&&s.pause&&s.pause())}s.on("data",S);function v(){s.readable&&s.resume&&s.resume()}D.on("drain",v),!D._isStdio&&(!p||p.end!==!1)&&(s.on("end",i),s.on("close",r));var o=!1;function i(){if(o)return;o=!0,D.end()}function r(){if(o)return;o=!0,typeof D.destroy=="function"&&D.destroy()}function h(g){if(y(),P.listenerCount(this,"error")===0)throw g}s.on("error",h),D.on("error",h);function y(){s.removeListener("data",S),D.removeListener("drain",v),s.removeListener("end",i),s.removeListener("close",r),s.removeListener("error",h),D.removeListener("error",h),s.removeListener("end",y),s.removeListener("close",y),D.removeListener("close",y)}return s.on("end",y),s.on("close",y),D.on("close",y),D.emit("pipe",s),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(N,$,k){(function(P){var c=N("./lib/request"),_=N("./lib/response"),D=N("xtend"),p=N("builtin-status-codes"),s=N("url"),S=k;S.request=function(v,o){typeof v=="string"?v=s.parse(v):v=D(v);var i=P.location.protocol.search(/^https?:$/)===-1?"http:":"",r=v.protocol||i,h=v.hostname||v.host,y=v.port,g=v.path||"/";h&&h.indexOf(":")!==-1&&(h="["+h+"]"),v.url=(h?r+"//"+h:"")+(y?":"+y:"")+g,v.method=(v.method||"GET").toUpperCase(),v.headers=v.headers||{};var w=new c(v);return o&&w.on("response",o),w},S.get=function(o,i){var r=S.request(o,i);return r.end(),r},S.ClientRequest=c,S.IncomingMessage=_.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=p,S.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(N,$,k){(function(P){"use strict";k.fetch=S(P.fetch)&&S(P.ReadableStream),k.writableStream=S(P.WritableStream),k.abortController=S(P.AbortController),k.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),k.blobConstructor=!0}catch(v){}var c;function _(){if(c!==void 0)return c;if(P.XMLHttpRequest){c=new P.XMLHttpRequest;try{c.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(v){c=null}}else c=null;return c}function D(v){var o=_();if(!o)return!1;try{return o.responseType=v,o.responseType===v}catch(i){}return!1}var p=typeof P.ArrayBuffer!="undefined",s=p&&S(P.ArrayBuffer.prototype.slice);k.arraybuffer=k.fetch||p&&D("arraybuffer"),k.msstream=!k.fetch&&s&&D("ms-stream"),k.mozchunkedarraybuffer=!k.fetch&&p&&D("moz-chunked-arraybuffer"),k.overrideMimeType=k.fetch||(_()?S(_().overrideMimeType):!1),k.vbArray=S(P.VBArray);function S(v){return typeof v=="function"}c=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(N,$,k){(function(P,c,_){"use strict";var D=N("babel-runtime/core-js/object/keys"),p=s(D);function s(n){return n&&n.__esModule?n:{default:n}}var S=N("./capability"),v=N("inherits"),o=N("./response"),i=N("readable-stream"),r=N("to-arraybuffer"),h=o.IncomingMessage,y=o.readyStates;function g(n,l){return S.fetch&&l?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&n?"arraybuffer":S.vbArray&&n?"text:vbarray":"text"}var w=$.exports=function(n){var l=this;i.Writable.call(l),l._opts=n,l._body=[],l._headers={},n.auth&&l.setHeader("Authorization","Basic "+new _(n.auth).toString("base64")),(0,p.default)(n.headers).forEach(function(E){l.setHeader(E,n.headers[E])});var u,T=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!S.abortController)T=!1,u=!0;else if(n.mode==="prefer-streaming")u=!1;else if(n.mode==="allow-wrong-content-type")u=!S.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")u=!0;else throw new Error("Invalid value for opts.mode");l._mode=g(u,T),l._fetchTimer=null,l.on("finish",function(){l._onFinish()})};v(w,i.Writable),w.prototype.setHeader=function(n,l){var u=this,T=n.toLowerCase();if(d.indexOf(T)!==-1)return;u._headers[T]={name:n,value:l}},w.prototype.getHeader=function(n){var l=this._headers[n.toLowerCase()];return l?l.value:null},w.prototype.removeHeader=function(n){var l=this;delete l._headers[n.toLowerCase()]},w.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var l=n._opts,u=n._headers,T=null;l.method!=="GET"&&l.method!=="HEAD"&&(S.arraybuffer?T=r(_.concat(n._body)):S.blobConstructor?T=new c.Blob(n._body.map(function(x){return r(x)}),{type:(u["content-type"]||{}).value||""}):T=_.concat(n._body).toString());var E=[];if((0,p.default)(u).forEach(function(x){var b=u[x].name,C=u[x].value;Array.isArray(C)?C.forEach(function(I){E.push([b,I])}):E.push([b,C])}),n._mode==="fetch"){var a=null,L=null;if(S.abortController){var O=new AbortController;a=O.signal,n._fetchAbortController=O,"requestTimeout"in l&&l.requestTimeout!==0&&(n._fetchTimer=c.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},l.requestTimeout))}c.fetch(n._opts.url,{method:n._opts.method,headers:E,body:T||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:a}).then(function(x){n._fetchResponse=x,n._connect()},function(x){c.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",x)})}else{var f=n._xhr=new c.XMLHttpRequest;try{f.open(n._opts.method,n._opts.url,!0)}catch(x){P.nextTick(function(){n.emit("error",x)});return}"responseType"in f&&(f.responseType=n._mode.split(":")[0]),"withCredentials"in f&&(f.withCredentials=!!l.withCredentials),n._mode==="text"&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(f.timeout=l.requestTimeout,f.ontimeout=function(){n.emit("requestTimeout")}),E.forEach(function(x){f.setRequestHeader(x[0],x[1])}),n._response=null,f.onreadystatechange=function(){switch(f.readyState){case y.LOADING:case y.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(f.onprogress=function(){n._onXHRProgress()}),f.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{f.send(T)}catch(x){P.nextTick(function(){n.emit("error",x)});return}}};function m(n){try{var l=n.status;return l!==null&&l!==0}catch(u){return!1}}w.prototype._onXHRProgress=function(){var n=this;if(!m(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},w.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new h(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(l){n.emit("error",l)}),n.emit("response",n._response)},w.prototype._write=function(n,l,u){var T=this;T._body.push(n),u()},w.prototype.abort=w.prototype.destroy=function(){var n=this;n._destroyed=!0,c.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},w.prototype.end=function(n,l,u){var T=this;typeof n=="function"&&(u=n,n=void 0),i.Writable.prototype.end.call(T,n,l,u)},w.prototype.flushHeaders=function(){},w.prototype.setTimeout=function(){},w.prototype.setNoDelay=function(){},w.prototype.setSocketKeepAlive=function(){};var d=["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,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("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(N,$,k){(function(P,c,_){"use strict";var D=N("babel-runtime/core-js/promise"),p=s(D);function s(h){return h&&h.__esModule?h:{default:h}}var S=N("./capability"),v=N("inherits"),o=N("readable-stream"),i=k.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=k.IncomingMessage=function(h,y,g,w){var m=this;if(o.Readable.call(m),m._mode=g,m.headers={},m.rawHeaders=[],m.trailers={},m.rawTrailers=[],m.on("end",function(){P.nextTick(function(){m.emit("close")})}),g==="fetch"){var d=function a(){l.read().then(function(L){if(m._destroyed)return;if(L.done){c.clearTimeout(w),m.push(null);return}m.push(new _(L.value)),a()}).catch(function(L){c.clearTimeout(w),m._destroyed||m.emit("error",L)})};if(m._fetchResponse=y,m.url=y.url,m.statusCode=y.status,m.statusMessage=y.statusText,y.headers.forEach(function(a,L){m.headers[L.toLowerCase()]=a,m.rawHeaders.push(L,a)}),S.writableStream){var n=new WritableStream({write:function(L){return new p.default(function(O,f){m._destroyed?f():m.push(new _(L))?O():m._resumeFetch=O})},close:function(){c.clearTimeout(w),m._destroyed||m.push(null)},abort:function(L){m._destroyed||m.emit("error",L)}});try{y.body.pipeTo(n).catch(function(a){c.clearTimeout(w),m._destroyed||m.emit("error",a)});return}catch(a){}}var l=y.body.getReader();d()}else{m._xhr=h,m._pos=0,m.url=h.responseURL,m.statusCode=h.status,m.statusMessage=h.statusText;var u=h.getAllResponseHeaders().split(/\r?\n/);if(u.forEach(function(a){var L=a.match(/^([^:]+):\s*(.*)/);if(L){var O=L[1].toLowerCase();O==="set-cookie"?(m.headers[O]===void 0&&(m.headers[O]=[]),m.headers[O].push(L[2])):m.headers[O]!==void 0?m.headers[O]+=", "+L[2]:m.headers[O]=L[2],m.rawHeaders.push(L[1],L[2])}}),m._charset="x-user-defined",!S.overrideMimeType){var T=m.rawHeaders["mime-type"];if(T){var E=T.match(/;\s*charset=([^;])(;|$)/);E&&(m._charset=E[1].toLowerCase())}m._charset||(m._charset="utf-8")}}};v(r,o.Readable),r.prototype._read=function(){var h=this,y=h._resumeFetch;y&&(h._resumeFetch=null,y())},r.prototype._onXHRProgress=function(){var h=this,y=h._xhr,g=null;switch(h._mode){case"text:vbarray":if(y.readyState!==i.DONE)break;try{g=new c.VBArray(y.responseBody).toArray()}catch(l){}if(g!==null){h.push(new _(g));break}case"text":try{g=y.responseText}catch(l){h._mode="text:vbarray";break}if(g.length>h._pos){var w=g.substr(h._pos);if(h._charset==="x-user-defined"){for(var m=new _(w.length),d=0;d<w.length;d++)m[d]=w.charCodeAt(d)&255;h.push(m)}else h.push(w,h._charset);h._pos=g.length}break;case"arraybuffer":if(y.readyState!==i.DONE||!y.response)break;g=y.response,h.push(new _(new Uint8Array(g)));break;case"moz-chunked-arraybuffer":if(g=y.response,y.readyState!==i.LOADING||!g)break;h.push(new _(new Uint8Array(g)));break;case"ms-stream":if(g=y.response,y.readyState!==i.LOADING)break;var n=new c.MSStreamReader;n.onprogress=function(){n.result.byteLength>h._pos&&(h.push(new _(new Uint8Array(n.result.slice(h._pos)))),h._pos=n.result.byteLength)},n.onload=function(){h.push(null)},n.readAsArrayBuffer(g);break}h._xhr.readyState===i.DONE&&h._mode!=="ms-stream"&&h.push(null)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(N,$,k){"use strict";var P=N("safe-buffer").Buffer,c=P.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 _(n){if(!n)return"utf8";for(var l;;)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(l)return;n=(""+n).toLowerCase(),l=!0}}function D(n){var l=_(n);if(typeof l!="string"&&(P.isEncoding===c||!c(n)))throw new Error("Unknown encoding: "+n);return l||n}k.StringDecoder=p;function p(n){this.encoding=D(n);var l;switch(this.encoding){case"utf16le":this.text=h,this.end=y,l=4;break;case"utf8":this.fillLast=o,l=4;break;case"base64":this.text=g,this.end=w,l=3;break;default:this.write=m,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(l)}p.prototype.write=function(n){if(n.length===0)return"";var l,u;if(this.lastNeed){if(l=this.fillLast(n),l===void 0)return"";u=this.lastNeed,this.lastNeed=0}else u=0;return u<n.length?l?l+this.text(n,u):this.text(n,u):l||""},p.prototype.end=r,p.prototype.text=i,p.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 s(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function S(n,l,u){var T=l.length-1;if(T<u)return 0;var E=s(l[T]);return E>=0?(E>0&&(n.lastNeed=E-1),E):--T<u||E===-2?0:(E=s(l[T]),E>=0?(E>0&&(n.lastNeed=E-2),E):--T<u||E===-2?0:(E=s(l[T]),E>=0?(E>0&&(E===2?E=0:n.lastNeed=E-3),E):0))}function v(n,l,u){if((l[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function o(n){var l=this.lastTotal-this.lastNeed,u=v(this,n,l);if(u!==void 0)return u;if(this.lastNeed<=n.length)return n.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,l,0,n.length),this.lastNeed-=n.length}function i(n,l){var u=S(this,n,l);if(!this.lastNeed)return n.toString("utf8",l);this.lastTotal=u;var T=n.length-(u-this.lastNeed);return n.copy(this.lastChar,0,T),n.toString("utf8",l,T)}function r(n){var l=n&&n.length?this.write(n):"";return this.lastNeed?l+"\uFFFD":l}function h(n,l){if((n.length-l)%2===0){var u=n.toString("utf16le",l);if(u){var T=u.charCodeAt(u.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",l,n.length-1)}function y(n){var l=n&&n.length?this.write(n):"";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,u)}return l}function g(n,l){var u=(n.length-l)%3;return u===0?n.toString("base64",l):(this.lastNeed=3-u,this.lastTotal=3,u===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",l,n.length-u))}function w(n){var l=n&&n.length?this.write(n):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function m(n){return n.toString(this.encoding)}function d(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(N,$,k){(function(P,c){var _=N("process/browser.js").nextTick,D=Function.prototype.apply,p=Array.prototype.slice,s={},S=0;k.setTimeout=function(){return new v(D.call(setTimeout,window,arguments),clearTimeout)},k.setInterval=function(){return new v(D.call(setInterval,window,arguments),clearInterval)},k.clearTimeout=k.clearInterval=function(o){o.close()};function v(o,i){this._id=o,this._clearFn=i}v.prototype.unref=v.prototype.ref=function(){},v.prototype.close=function(){this._clearFn.call(window,this._id)},k.enroll=function(o,i){clearTimeout(o._idleTimeoutId),o._idleTimeout=i},k.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},k._unrefActive=k.active=function(o){clearTimeout(o._idleTimeoutId);var i=o._idleTimeout;i>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},i))},k.setImmediate=typeof P=="function"?P:function(o){var i=S++,r=arguments.length<2?!1:p.call(arguments,1);return s[i]=!0,_(function(){s[i]&&(r?o.apply(null,r):o.call(null),k.clearImmediate(i))}),i},k.clearImmediate=typeof c=="function"?c:function(o){delete s[o]}}).call(this,N("timers").setImmediate,N("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(N,$,k){var P=N("buffer").Buffer;$.exports=function(c){if(c instanceof Uint8Array){if(c.byteOffset===0&&c.byteLength===c.buffer.byteLength)return c.buffer;if(typeof c.buffer.slice=="function")return c.buffer.slice(c.byteOffset,c.byteOffset+c.byteLength)}if(P.isBuffer(c)){for(var _=new Uint8Array(c.length),D=c.length,p=0;p<D;p++)_[p]=c[p];return _.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(N,$,k){"use strict";var P=N("punycode"),c=N("./util");k.parse=l,k.resolve=T,k.resolveObject=E,k.format=u,k.Url=_;function _(){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,p=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],v=["{","}","|","\\","^","`"].concat(S),o=["'"].concat(v),i=["%","/","?",";","#"].concat(o),r=["/","?","#"],h=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=N("querystring");function l(a,L,O){if(a&&c.isObject(a)&&a instanceof _)return a;var f=new _;return f.parse(a,L,O),f}_.prototype.parse=function(a,L,O){if(!c.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var f=a.indexOf("?"),x=f!==-1&&f<a.indexOf("#")?"?":"#",b=a.split(x),C=/\\/g;b[0]=b[0].replace(C,"/"),a=b.join(x);var I=a;if(I=I.trim(),!O&&a.split("#").length===1){var j=s.exec(I);if(j)return this.path=I,this.href=I,this.pathname=j[1],j[2]?(this.search=j[2],L?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):L&&(this.search="",this.query={}),this}var M=D.exec(I);if(M){M=M[0];var z=M.toLowerCase();this.protocol=z,I=I.substr(M.length)}if(O||M||I.match(/^\/\/[^@\/]+@[^@\/]+/)){var G=I.substr(0,2)==="//";G&&!(M&&m[M])&&(I=I.substr(2),this.slashes=!0)}if(!m[M]&&(G||M&&!d[M])){for(var B=-1,K=0;K<r.length;K++){var F=I.indexOf(r[K]);F!==-1&&(B===-1||F<B)&&(B=F)}var H,W;B===-1?W=I.lastIndexOf("@"):W=I.lastIndexOf("@",B),W!==-1&&(H=I.slice(0,W),I=I.slice(W+1),this.auth=decodeURIComponent(H)),B=-1;for(var K=0;K<i.length;K++){var F=I.indexOf(i[K]);F!==-1&&(B===-1||F<B)&&(B=F)}B===-1&&(B=I.length),this.host=I.slice(0,B),I=I.slice(B),this.parseHost(),this.hostname=this.hostname||"";var Q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Q)for(var ee=this.hostname.split(/\./),K=0,q=ee.length;K<q;K++){var pe=ee[K];if(!pe)continue;if(!pe.match(y)){for(var ye="",ie=0,Se=pe.length;ie<Se;ie++)pe.charCodeAt(ie)>127?ye+="x":ye+=pe[ie];if(!ye.match(y)){var ge=ee.slice(0,K),oe=ee.slice(K+1),le=pe.match(g);le&&(ge.push(le[1]),oe.unshift(le[2])),oe.length&&(I="/"+oe.join(".")+I),this.hostname=ge.join(".");break}}}this.hostname.length>h?this.hostname="":this.hostname=this.hostname.toLowerCase(),Q||(this.hostname=P.toASCII(this.hostname));var te=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+te,this.href+=this.host,Q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!w[z])for(var K=0,q=o.length;K<q;K++){var Z=o[K];if(I.indexOf(Z)===-1)continue;var ae=encodeURIComponent(Z);ae===Z&&(ae=escape(Z)),I=I.split(Z).join(ae)}var Ee=I.indexOf("#");Ee!==-1&&(this.hash=I.substr(Ee),I=I.slice(0,Ee));var ne=I.indexOf("?");if(ne!==-1?(this.search=I.substr(ne),this.query=I.substr(ne+1),L&&(this.query=n.parse(this.query)),I=I.slice(0,ne)):L&&(this.search="",this.query={}),I&&(this.pathname=I),d[z]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var te=this.pathname||"",J=this.search||"";this.path=te+J}return this.href=this.format(),this};function u(a){return c.isString(a)&&(a=l(a)),a instanceof _?a.format():_.prototype.format.call(a)}_.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var L=this.protocol||"",O=this.pathname||"",f=this.hash||"",x=!1,b="";this.host?x=a+this.host:this.hostname&&(x=a+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(b=n.stringify(this.query));var C=this.search||b&&"?"+b||"";return L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||d[L])&&x!==!1?(x="//"+(x||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):x||(x=""),f&&f.charAt(0)!=="#"&&(f="#"+f),C&&C.charAt(0)!=="?"&&(C="?"+C),O=O.replace(/[?#]/g,function(I){return encodeURIComponent(I)}),C=C.replace("#","%23"),L+x+O+C+f};function T(a,L){return l(a,!1,!0).resolve(L)}_.prototype.resolve=function(a){return this.resolveObject(l(a,!1,!0)).format()};function E(a,L){return a?l(a,!1,!0).resolveObject(L):L}_.prototype.resolveObject=function(a){if(c.isString(a)){var L=new _;L.parse(a,!1,!0),a=L}for(var O=new _,f=Object.keys(this),x=0;x<f.length;x++){var b=f[x];O[b]=this[b]}if(O.hash=a.hash,a.href==="")return O.href=O.format(),O;if(a.slashes&&!a.protocol){for(var C=Object.keys(a),I=0;I<C.length;I++){var j=C[I];j!=="protocol"&&(O[j]=a[j])}return d[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O}if(a.protocol&&a.protocol!==O.protocol){if(!d[a.protocol]){for(var M=Object.keys(a),z=0;z<M.length;z++){var G=M[z];O[G]=a[G]}return O.href=O.format(),O}if(O.protocol=a.protocol,!a.host&&!m[a.protocol]){for(var q=(a.pathname||"").split("/");q.length&&!(a.host=q.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),q[0]!==""&&q.unshift(""),q.length<2&&q.unshift(""),O.pathname=q.join("/")}else O.pathname=a.pathname;if(O.search=a.search,O.query=a.query,O.host=a.host||"",O.auth=a.auth,O.hostname=a.hostname||a.host,O.port=a.port,O.pathname||O.search){var B=O.pathname||"",K=O.search||"";O.path=B+K}return O.slashes=O.slashes||a.slashes,O.href=O.format(),O}var F=O.pathname&&O.pathname.charAt(0)==="/",H=a.host||a.pathname&&a.pathname.charAt(0)==="/",W=H||F||O.host&&a.pathname,Q=W,ee=O.pathname&&O.pathname.split("/")||[],q=a.pathname&&a.pathname.split("/")||[],pe=O.protocol&&!d[O.protocol];if(pe&&(O.hostname="",O.port=null,O.host&&(ee[0]===""?ee[0]=O.host:ee.unshift(O.host)),O.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(q[0]===""?q[0]=a.host:q.unshift(a.host)),a.host=null),W=W&&(q[0]===""||ee[0]==="")),H)O.host=a.host||a.host===""?a.host:O.host,O.hostname=a.hostname||a.hostname===""?a.hostname:O.hostname,O.search=a.search,O.query=a.query,ee=q;else if(q.length)ee||(ee=[]),ee.pop(),ee=ee.concat(q),O.search=a.search,O.query=a.query;else if(!c.isNullOrUndefined(a.search)){if(pe){O.hostname=O.host=ee.shift();var ye=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ye&&(O.auth=ye.shift(),O.host=O.hostname=ye.shift())}return O.search=a.search,O.query=a.query,(!c.isNull(O.pathname)||!c.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!ee.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var ie=ee.slice(-1)[0],Se=(O.host||a.host||ee.length>1)&&(ie==="."||ie==="..")||ie==="",ge=0,oe=ee.length;oe>=0;oe--)ie=ee[oe],ie==="."?ee.splice(oe,1):ie===".."?(ee.splice(oe,1),ge++):ge&&(ee.splice(oe,1),ge--);if(!W&&!Q)for(;ge--;ge)ee.unshift("..");W&&ee[0]!==""&&(!ee[0]||ee[0].charAt(0)!=="/")&&ee.unshift(""),Se&&ee.join("/").substr(-1)!=="/"&&ee.push("");var le=ee[0]===""||ee[0]&&ee[0].charAt(0)==="/";if(pe){O.hostname=O.host=le?"":ee.length?ee.shift():"";var ye=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;ye&&(O.auth=ye.shift(),O.host=O.hostname=ye.shift())}return W=W||O.host&&ee.length,W&&!le&&ee.unshift(""),ee.length?O.pathname=ee.join("/"):(O.pathname=null,O.path=null),(!c.isNull(O.pathname)||!c.isNull(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=a.auth||O.auth,O.slashes=O.slashes||a.slashes,O.href=O.format(),O},_.prototype.parseHost=function(){var a=this.host,L=p.exec(a);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),a=a.substr(0,a.length-L.length)),a&&(this.hostname=a)}},{"./util":239,punycode:209,querystring:212}],239:[function(N,$,k){"use strict";$.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(N,$,k){(function(P){$.exports=c;function c(D,p){if(_("noDeprecation"))return D;var s=!1;function S(){if(!s){if(_("throwDeprecation"))throw new Error(p);_("traceDeprecation")?console.trace(p):console.warn(p),s=!0}return D.apply(this,arguments)}return S}function _(D){try{if(!P.localStorage)return!1}catch(s){return!1}var p=P.localStorage[D];return p==null?!1:String(p).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(N,$,k){typeof Object.create=="function"?$.exports=function(c,_){c.super_=_,c.prototype=Object.create(_.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:$.exports=function(c,_){c.super_=_;var D=function(){};D.prototype=_.prototype,c.prototype=new D,c.prototype.constructor=c}},{}],242:[function(N,$,k){$.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}},{}],243:[function(N,$,k){(function(P,c){var _=/%[sdj%]/g;k.format=function(B){if(!T(B)){for(var K=[],F=0;F<arguments.length;F++)K.push(s(arguments[F]));return K.join(" ")}for(var F=1,H=arguments,W=H.length,Q=String(B).replace(_,function(q){if(q==="%%")return"%";if(F>=W)return q;switch(q){case"%s":return String(H[F++]);case"%d":return Number(H[F++]);case"%j":try{return JSON.stringify(H[F++])}catch(pe){return"[Circular]"}default:return q}}),ee=H[F];F<W;ee=H[++F])n(ee)||!O(ee)?Q+=" "+ee:Q+=" "+s(ee);return Q},k.deprecate=function(B,K){if(a(c.process))return function(){return k.deprecate(B,K).apply(this,arguments)};if(P.noDeprecation===!0)return B;var F=!1;function H(){if(!F){if(P.throwDeprecation)throw new Error(K);P.traceDeprecation?console.trace(K):console.error(K),F=!0}return B.apply(this,arguments)}return H};var D={},p;k.debuglog=function(B){if(a(p)&&(p=P.env.NODE_DEBUG||""),B=B.toUpperCase(),!D[B])if(new RegExp("\\b"+B+"\\b","i").test(p)){var K=P.pid;D[B]=function(){var F=k.format.apply(k,arguments);console.error("%s %d: %s",B,K,F)}}else D[B]=function(){};return D[B]};function s(B,K){var F={seen:[],stylize:v};return arguments.length>=3&&(F.depth=arguments[2]),arguments.length>=4&&(F.colors=arguments[3]),d(K)?F.showHidden=K:K&&k._extend(F,K),a(F.showHidden)&&(F.showHidden=!1),a(F.depth)&&(F.depth=2),a(F.colors)&&(F.colors=!1),a(F.customInspect)&&(F.customInspect=!0),F.colors&&(F.stylize=S),i(F,B,F.depth)}k.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(B,K){var F=s.styles[K];return F?"["+s.colors[F][0]+"m"+B+"["+s.colors[F][1]+"m":B}function v(B,K){return B}function o(B){var K={};return B.forEach(function(F,H){K[F]=!0}),K}function i(B,K,F){if(B.customInspect&&K&&b(K.inspect)&&K.inspect!==k.inspect&&!(K.constructor&&K.constructor.prototype===K)){var H=K.inspect(F,B);return T(H)||(H=i(B,H,F)),H}var W=r(B,K);if(W)return W;var Q=Object.keys(K),ee=o(Q);if(B.showHidden&&(Q=Object.getOwnPropertyNames(K)),x(K)&&(Q.indexOf("message")>=0||Q.indexOf("description")>=0))return h(K);if(Q.length===0){if(b(K)){var q=K.name?": "+K.name:"";return B.stylize("[Function"+q+"]","special")}if(L(K))return B.stylize(RegExp.prototype.toString.call(K),"regexp");if(f(K))return B.stylize(Date.prototype.toString.call(K),"date");if(x(K))return h(K)}var pe="",ye=!1,ie=["{","}"];if(m(K)&&(ye=!0,ie=["[","]"]),b(K)){var Se=K.name?": "+K.name:"";pe=" [Function"+Se+"]"}if(L(K)&&(pe=" "+RegExp.prototype.toString.call(K)),f(K)&&(pe=" "+Date.prototype.toUTCString.call(K)),x(K)&&(pe=" "+h(K)),Q.length===0&&(!ye||K.length==0))return ie[0]+pe+ie[1];if(F<0)return L(K)?B.stylize(RegExp.prototype.toString.call(K),"regexp"):B.stylize("[Object]","special");B.seen.push(K);var ge;return ye?ge=y(B,K,F,ee,Q):ge=Q.map(function(oe){return g(B,K,F,ee,oe,ye)}),B.seen.pop(),w(ge,pe,ie)}function r(B,K){if(a(K))return B.stylize("undefined","undefined");if(T(K)){var F="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(F,"string")}if(u(K))return B.stylize(""+K,"number");if(d(K))return B.stylize(""+K,"boolean");if(n(K))return B.stylize("null","null")}function h(B){return"["+Error.prototype.toString.call(B)+"]"}function y(B,K,F,H,W){for(var Q=[],ee=0,q=K.length;ee<q;++ee)G(K,String(ee))?Q.push(g(B,K,F,H,String(ee),!0)):Q.push("");return W.forEach(function(pe){pe.match(/^\d+$/)||Q.push(g(B,K,F,H,pe,!0))}),Q}function g(B,K,F,H,W,Q){var ee,q,pe;if(pe=Object.getOwnPropertyDescriptor(K,W)||{value:K[W]},pe.get?pe.set?q=B.stylize("[Getter/Setter]","special"):q=B.stylize("[Getter]","special"):pe.set&&(q=B.stylize("[Setter]","special")),G(H,W)||(ee="["+W+"]"),q||(B.seen.indexOf(pe.value)<0?(n(F)?q=i(B,pe.value,null):q=i(B,pe.value,F-1),q.indexOf(`
|
|
|
`)>-1&&(Q?q=q.split(`
|
|
|
`).map(function(ye){return" "+ye}).join(`
|
|
|
`).substr(2):q=`
|
|
|
`+q.split(`
|
|
|
`).map(function(ye){return" "+ye}).join(`
|
|
|
`))):q=B.stylize("[Circular]","special")),a(ee)){if(Q&&W.match(/^\d+$/))return q;ee=JSON.stringify(""+W),ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ee=ee.substr(1,ee.length-2),ee=B.stylize(ee,"name")):(ee=ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ee=B.stylize(ee,"string"))}return ee+": "+q}function w(B,K,F){var H=0,W=B.reduce(function(Q,ee){return H++,ee.indexOf(`
|
|
|
`)>=0&&H++,Q+ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return W>60?F[0]+(K===""?"":K+`
|
|
|
`)+" "+B.join(`,
|
|
|
`)+" "+F[1]:F[0]+K+" "+B.join(", ")+" "+F[1]}function m(B){return Array.isArray(B)}k.isArray=m;function d(B){return typeof B=="boolean"}k.isBoolean=d;function n(B){return B===null}k.isNull=n;function l(B){return B==null}k.isNullOrUndefined=l;function u(B){return typeof B=="number"}k.isNumber=u;function T(B){return typeof B=="string"}k.isString=T;function E(B){return typeof B=="symbol"}k.isSymbol=E;function a(B){return B===void 0}k.isUndefined=a;function L(B){return O(B)&&I(B)==="[object RegExp]"}k.isRegExp=L;function O(B){return typeof B=="object"&&B!==null}k.isObject=O;function f(B){return O(B)&&I(B)==="[object Date]"}k.isDate=f;function x(B){return O(B)&&(I(B)==="[object Error]"||B instanceof Error)}k.isError=x;function b(B){return typeof B=="function"}k.isFunction=b;function C(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B=="undefined"}k.isPrimitive=C,k.isBuffer=N("./support/isBuffer");function I(B){return Object.prototype.toString.call(B)}function j(B){return B<10?"0"+B.toString(10):B.toString(10)}var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var B=new Date,K=[j(B.getHours()),j(B.getMinutes()),j(B.getSeconds())].join(":");return[B.getDate(),M[B.getMonth()],K].join(" ")}k.log=function(){console.log("%s - %s",z(),k.format.apply(k,arguments))},k.inherits=N("inherits"),k._extend=function(B,K){if(!K||!O(K))return B;for(var F=Object.keys(K),H=F.length;H--;)B[F[H]]=K[F[H]];return B};function G(B,K){return Object.prototype.hasOwnProperty.call(B,K)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(N,$,k){"use strict";(function(){"use strict";k.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(N,$,k){"use strict";var P=N("babel-runtime/helpers/typeof"),c=p(P),_=N("babel-runtime/core-js/object/keys"),D=p(_);function p(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,S,v,o,i,r={}.hasOwnProperty;s=N("xmlbuilder"),S=N("./defaults").defaults,o=function(y){return typeof y=="string"&&(y.indexOf("&")>=0||y.indexOf(">")>=0||y.indexOf("<")>=0)},i=function(y){return"<![CDATA["+v(y)+"]]>"},v=function(y){return y.replace("]]>","]]]]><![CDATA[>")},k.Builder=function(){function h(y){var g,w,m;this.options={},w=S["0.2"];for(g in w){if(!r.call(w,g))continue;m=w[g],this.options[g]=m}for(g in y){if(!r.call(y,g))continue;m=y[g],this.options[g]=m}}return h.prototype.buildObject=function(y){var g,w,m,d,n;return g=this.options.attrkey,w=this.options.charkey,(0,D.default)(y).length===1&&this.options.rootName===S["0.2"].rootName?(n=(0,D.default)(y)[0],y=y[n]):n=this.options.rootName,m=function(l){return function(u,T){var E,a,L,O,f,x;if((typeof T=="undefined"?"undefined":(0,c.default)(T))!=="object")l.options.cdata&&o(T)?u.raw(i(T)):u.txt(T);else if(Array.isArray(T))for(O in T){if(!r.call(T,O))continue;a=T[O];for(f in a)L=a[f],u=m(u.ele(f),L).up()}else for(f in T){if(!r.call(T,f))continue;if(a=T[f],f===g){if((typeof a=="undefined"?"undefined":(0,c.default)(a))==="object")for(E in a)x=a[E],u=u.att(E,x)}else if(f===w)l.options.cdata&&o(a)?u=u.raw(i(a)):u=u.txt(a);else if(Array.isArray(a))for(O in a){if(!r.call(a,O))continue;L=a[O],typeof L=="string"?l.options.cdata&&o(L)?u=u.ele(f).raw(i(L)).up():u=u.ele(f,L).up():u=m(u.ele(f),L).up()}else(typeof a=="undefined"?"undefined":(0,c.default)(a))==="object"?u=m(u.ele(f),a).up():typeof a=="string"&&l.options.cdata&&o(a)?u=u.ele(f).raw(i(a)).up():(a==null&&(a=""),u=u.ele(f,a.toString()).up())}return u}}(this),d=s.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),m(d,y).end(this.options.renderOpts)},h}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(N,$,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(N,$,k){"use strict";var P=N("babel-runtime/core-js/promise"),c=o(P),_=N("babel-runtime/core-js/object/get-own-property-names"),D=o(_),p=N("babel-runtime/core-js/object/keys"),s=o(p),S=N("babel-runtime/helpers/typeof"),v=o(S);function o(i){return i&&i.__esModule?i:{default:i}}(function(){"use strict";var i,r,h,y,g,w,m,d,n=function(E,a){return function(){return E.apply(a,arguments)}},l=function(E,a){for(var L in a)u.call(a,L)&&(E[L]=a[L]);function O(){this.constructor=E}return O.prototype=a.prototype,E.prototype=new O,E.__super__=a.prototype,E},u={}.hasOwnProperty;m=N("sax"),h=N("events"),i=N("./bom"),w=N("./processors"),d=N("timers").setImmediate,r=N("./defaults").defaults,y=function(E){return(typeof E=="undefined"?"undefined":(0,v.default)(E))==="object"&&E!=null&&(0,s.default)(E).length===0},g=function(E,a,L){var O,f,x;for(O=0,f=E.length;O<f;O++)x=E[O],a=x(a,L);return a},k.Parser=function(T){l(E,T);function E(a){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 L,O,f;if(!(this instanceof k.Parser))return new k.Parser(a);this.options={},O=r["0.2"];for(L in O){if(!u.call(O,L))continue;f=O[L],this.options[L]=f}for(L in a){if(!u.call(a,L))continue;f=a[L],this.options[L]=f}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(w.normalize)),this.reset()}return E.prototype.processAsync=function(){var a,L;try{return this.remaining.length<=this.options.chunkSize?(a=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(a),this.saxParser.close()):(a=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(a),d(this.processAsync))}catch(O){if(L=O,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(L)}},E.prototype.assignOrPush=function(a,L,O){return L in a?(a[L]instanceof Array||(a[L]=[a[L]]),a[L].push(O)):this.options.explicitArray?a[L]=[O]:a[L]=O},E.prototype.reset=function(){var a,L,O,f;return this.removeAllListeners(),this.saxParser=m.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(b){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",b)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,f=[],a=this.options.attrkey,L=this.options.charkey,this.saxParser.onopentag=function(x){return function(b){var C,I,j,M,z;if(j={},j[L]="",!x.options.ignoreAttrs){z=b.attributes;for(C in z){if(!u.call(z,C))continue;!(a in j)&&!x.options.mergeAttrs&&(j[a]={}),I=x.options.attrValueProcessors?g(x.options.attrValueProcessors,b.attributes[C],C):b.attributes[C],M=x.options.attrNameProcessors?g(x.options.attrNameProcessors,C):C,x.options.mergeAttrs?x.assignOrPush(j,M,I):j[a][M]=I}}return j["#name"]=x.options.tagNameProcessors?g(x.options.tagNameProcessors,b.name):b.name,x.options.xmlns&&(j[x.options.xmlnskey]={uri:b.uri,local:b.local}),f.push(j)}}(this),this.saxParser.onclosetag=function(x){return function(){var b,C,I,j,M,z,G,B,K,F;if(z=f.pop(),M=z["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete z["#name"],z.cdata===!0&&(b=z.cdata,delete z.cdata),K=f[f.length-1],z[L].match(/^\s*$/)&&!b?(C=z[L],delete z[L]):(x.options.trim&&(z[L]=z[L].trim()),x.options.normalize&&(z[L]=z[L].replace(/\s{2,}/g," ").trim()),z[L]=x.options.valueProcessors?g(x.options.valueProcessors,z[L],M):z[L],(0,s.default)(z).length===1&&L in z&&!x.EXPLICIT_CHARKEY&&(z=z[L])),y(z)&&(z=x.options.emptyTag!==""?x.options.emptyTag:C),x.options.validator!=null&&(F="/"+function(){var H,W,Q;for(Q=[],H=0,W=f.length;H<W;H++)j=f[H],Q.push(j["#name"]);return Q}().concat(M).join("/"),function(){var H;try{return z=x.options.validator(F,K&&K[M],z)}catch(W){return H=W,x.emit("error",H)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof z=="undefined"?"undefined":(0,v.default)(z))==="object"){if(!x.options.preserveChildrenOrder)j={},x.options.attrkey in z&&(j[x.options.attrkey]=z[x.options.attrkey],delete z[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in z&&(j[x.options.charkey]=z[x.options.charkey],delete z[x.options.charkey]),(0,D.default)(z).length>0&&(j[x.options.childkey]=z),z=j;else if(K){K[x.options.childkey]=K[x.options.childkey]||[],G={};for(I in z){if(!u.call(z,I))continue;G[I]=z[I]}K[x.options.childkey].push(G),delete z["#name"],(0,s.default)(z).length===1&&L in z&&!x.EXPLICIT_CHARKEY&&(z=z[L])}}return f.length>0?x.assignOrPush(K,M,z):(x.options.explicitRoot&&(B=z,z={},z[M]=B),x.resultObject=z,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),O=function(x){return function(b){var C,I;if(I=f[f.length-1],I)return I[L]+=b,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(I[x.options.childkey]=I[x.options.childkey]||[],C={"#name":"__text__"},C[L]=b,x.options.normalize&&(C[L]=C[L].replace(/\s{2,}/g," ").trim()),I[x.options.childkey].push(C)),I}}(this),this.saxParser.ontext=O,this.saxParser.oncdata=function(x){return function(b){var C;if(C=O(b),C)return C.cdata=!0}}(this)},E.prototype.parseString=function(a,L){var O;L!=null&&typeof L=="function"&&(this.on("end",function(f){return this.reset(),L(null,f)}),this.on("error",function(f){return this.reset(),L(f)}));try{return a=a.toString(),a.trim()===""?(this.emit("end",null),!0):(a=i.stripBOM(a),this.options.async?(this.remaining=a,d(this.processAsync),this.saxParser):this.saxParser.write(a).close())}catch(f){if(O=f,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw O}else return this.emit("error",O),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(a){return new c.default(function(L){return function(O,f){return L.parseString(a,function(x,b){return x?f(x):O(b)})}}(this))},E}(h),k.parseString=function(T,E,a){var L,O,f;return a!=null?(typeof a=="function"&&(L=a),(typeof E=="undefined"?"undefined":(0,v.default)(E))==="object"&&(O=E)):(typeof E=="function"&&(L=E),O={}),f=new k.Parser(O),f.parseString(T,L)},k.parseStringPromise=function(T,E){var a,L;return(typeof E=="undefined"?"undefined":(0,v.default)(E))==="object"&&(a=E),L=new k.Parser(a),L.parseStringPromise(T)}}).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(N,$,k){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),k.normalize=function(c){return c.toLowerCase()},k.firstCharLowerCase=function(c){return c.charAt(0).toLowerCase()+c.slice(1)},k.stripPrefix=function(c){return c.replace(P,"")},k.parseNumbers=function(c){return isNaN(c)||(c=c%1===0?parseInt(c,10):parseFloat(c)),c},k.parseBooleans=function(c){return/^(?:true|false)$/i.test(c)&&(c=c.toLowerCase()==="true"),c}}).call(void 0)},{}],249:[function(N,$,k){"use strict";(function(){"use strict";var P,c,_,D,p=function(v,o){for(var i in o)s.call(o,i)&&(v[i]=o[i]);function r(){this.constructor=v}return r.prototype=o.prototype,v.prototype=new r,v.__super__=o.prototype,v},s={}.hasOwnProperty;c=N("./defaults"),P=N("./builder"),_=N("./parser"),D=N("./processors"),k.defaults=c.defaults,k.processors=D,k.ValidationError=function(S){p(v,S);function v(o){this.message=o}return v}(Error),k.Builder=P.Builder,k.Parser=_.Parser,k.parseString=_.parseString,k.parseStringPromise=_.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(N,$,k){"use strict";(function(){$.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(N,$,k){"use strict";(function(){$.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(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/get-prototype-of"),c=S(P),_=N("babel-runtime/helpers/typeof"),D=S(_),p=N("babel-runtime/core-js/object/assign"),s=S(p);function S(v){return v&&v.__esModule?v:{default:v}}(function(){var v,o,i,r,h,y,g,w=[].slice,m={}.hasOwnProperty;v=function(){var n,l,u,T,E,a;if(a=arguments[0],E=2<=arguments.length?w.call(arguments,1):[],h(s.default))s.default.apply(null,arguments);else for(n=0,u=E.length;n<u;n++)if(T=E[n],T!=null)for(l in T){if(!m.call(T,l))continue;a[l]=T[l]}return a},h=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},y=function(n){var l;return!!n&&((l=typeof n=="undefined"?"undefined":(0,D.default)(n))==="function"||l==="object")},i=function(n){return h(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},r=function(n){var l;if(i(n))return!n.length;for(l in n){if(!m.call(n,l))continue;return!1}return!0},g=function(n){var l,u;return y(n)&&(u=(0,c.default)(n))&&(l=u.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},o=function(n){return h(n.valueOf)?n.valueOf():n},$.exports.assign=v,$.exports.isFunction=h,$.exports.isObject=y,$.exports.isArray=i,$.exports.isEmpty=r,$.exports.isPlainObject=g,$.exports.getValue=o}).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(N,$,k){"use strict";(function(){$.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s;D=N("./NodeType"),s=N("./XMLNode"),$.exports=p=function(){function S(v,o,i){if(this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(i),this.type=D.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"textContent",{get:function(){return this.value},set:function(o){return this.value=o||""}}),Object.defineProperty(S.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(S.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(S.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"specified",{get:function(){return!0}}),S.prototype.clone=function(){return(0,c.default)(this)},S.prototype.toString=function(v){return this.options.writer.attribute(this,this.options.writer.filterOptions(v))},S.prototype.debugInfo=function(v){return v=v||this.name,v==null?"parent: <"+this.parent.name+">":"attribute: {"+v+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(v){return v.namespaceURI!==this.namespaceURI||(v.prefix!==this.prefix||v.localName!==this.localName)?!1:!(v.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S=function(i,r){for(var h in r)v.call(r,h)&&(i[h]=r[h]);function y(){this.constructor=i}return y.prototype=r.prototype,i.prototype=new y,i.__super__=r.prototype,i},v={}.hasOwnProperty;D=N("./NodeType"),s=N("./XMLCharacterData"),$.exports=p=function(o){S(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=D.CData,this.value=this.stringify.cdata(h)}return i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},i}(s)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s=function(o,i){for(var r in i)S.call(i,r)&&(o[r]=i[r]);function h(){this.constructor=o}return h.prototype=i.prototype,o.prototype=new h,o.__super__=i.prototype,o},S={}.hasOwnProperty;p=N("./XMLNode"),$.exports=D=function(v){s(o,v);function o(i){o.__super__.constructor.call(this,i),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),o.prototype.clone=function(){return(0,c.default)(this)},o.prototype.substringData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(i,r,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(i){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.data!==this.data):!1},o}(p)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S=function(i,r){for(var h in r)v.call(r,h)&&(i[h]=r[h]);function y(){this.constructor=i}return y.prototype=r.prototype,i.prototype=new y,i.__super__=r.prototype,i},v={}.hasOwnProperty;D=N("./NodeType"),p=N("./XMLCharacterData"),$.exports=s=function(o){S(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=D.Comment,this.value=this.stringify.comment(h)}return i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},i}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=p(P),_=N("babel-runtime/core-js/object/create"),D=p(_);function p(s){return s&&s.__esModule?s:{default:s}}(function(){var s,S,v;S=N("./XMLDOMErrorHandler"),v=N("./XMLDOMStringList"),$.exports=s=function(){function o(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,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=i=(0,D.default)(this.defaultParams)}return Object.defineProperty(o.prototype,"parameterNames",{get:function(){return new v((0,c.default)(this.defaultParams))}}),o.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},o.prototype.canSetParameter=function(i,r){return!0},o.prototype.setParameter=function(i,r){return r!=null?this.params[i]=r:delete this.params[i]},o}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(N,$,k){"use strict";(function(){var P;$.exports=P=function(){function c(){}return c.prototype.handleError=function(_){throw new Error(_)},c}()}).call(void 0)},{}],260:[function(N,$,k){"use strict";(function(){var P;$.exports=P=function(){function c(){}return c.prototype.hasFeature=function(_,D){return!0},c.prototype.createDocumentType=function(_,D,p){throw new Error("This DOM method is not implemented.")},c.prototype.createDocument=function(_,D,p){throw new Error("This DOM method is not implemented.")},c.prototype.createHTMLDocument=function(_){throw new Error("This DOM method is not implemented.")},c.prototype.getFeature=function(_,D){throw new Error("This DOM method is not implemented.")},c}()}).call(void 0)},{}],261:[function(N,$,k){"use strict";(function(){var P;$.exports=P=function(){function c(_){this.arr=_||[]}return Object.defineProperty(c.prototype,"length",{get:function(){return this.arr.length}}),c.prototype.item=function(_){return this.arr[_]||null},c.prototype.contains=function(_){return this.arr.indexOf(_)!==-1},c}()}).call(void 0)},{}],262:[function(N,$,k){"use strict";(function(){var P,c,_,D=function(S,v){for(var o in v)p.call(v,o)&&(S[o]=v[o]);function i(){this.constructor=S}return i.prototype=v.prototype,S.prototype=new i,S.__super__=v.prototype,S},p={}.hasOwnProperty;_=N("./XMLNode"),P=N("./NodeType"),$.exports=c=function(s){D(S,s);function S(v,o,i,r,h,y){if(S.__super__.constructor.call(this,v),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!h)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(h.indexOf("#")!==0&&(h="#"+h),!h.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(y&&!h.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(r),y&&(this.defaultValue=this.stringify.dtdAttDefault(y)),this.defaultValueType=h}return S.prototype.toString=function(v){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(v))},S}(_)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(N,$,k){"use strict";(function(){var P,c,_,D=function(S,v){for(var o in v)p.call(v,o)&&(S[o]=v[o]);function i(){this.constructor=S}return i.prototype=v.prototype,S.prototype=new i,S.__super__=v.prototype,S},p={}.hasOwnProperty;_=N("./XMLNode"),P=N("./NodeType"),$.exports=c=function(s){D(S,s);function S(v,o,i){if(S.__super__.constructor.call(this,v),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(o),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return S.prototype.toString=function(v){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(v))},S}(_)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(N,$,k){"use strict";(function(){var P,c,_,D,p=function(v,o){for(var i in o)s.call(o,i)&&(v[i]=o[i]);function r(){this.constructor=v}return r.prototype=o.prototype,v.prototype=new r,v.__super__=o.prototype,v},s={}.hasOwnProperty;D=N("./Utility").isObject,_=N("./XMLNode"),P=N("./NodeType"),$.exports=c=function(S){p(v,S);function v(o,i,r,h){if(v.__super__.constructor.call(this,o),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(h==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!i,this.name=this.stringify.name(r),this.type=P.EntityDeclaration,!D(h))this.value=this.stringify.dtdEntityValue(h),this.internal=!0;else{if(!h.pubID&&!h.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(h.pubID&&!h.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID)),h.nData!=null&&(this.nData=this.stringify.dtdNData(h.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(v.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(v.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(v.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(v.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(v.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(v.prototype,"xmlVersion",{get:function(){return null}}),v.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},v}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(N,$,k){"use strict";(function(){var P,c,_,D=function(S,v){for(var o in v)p.call(v,o)&&(S[o]=v[o]);function i(){this.constructor=S}return i.prototype=v.prototype,S.prototype=new i,S.__super__=v.prototype,S},p={}.hasOwnProperty;_=N("./XMLNode"),P=N("./NodeType"),$.exports=c=function(s){D(S,s);function S(v,o,i){if(S.__super__.constructor.call(this,v),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=P.NotationDeclaration,i.pubID!=null&&(this.pubID=this.stringify.dtdPubID(i.pubID)),i.sysID!=null&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(v){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(v))},S}(_)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(N,$,k){"use strict";(function(){var P,c,_,D,p=function(v,o){for(var i in o)s.call(o,i)&&(v[i]=o[i]);function r(){this.constructor=v}return r.prototype=o.prototype,v.prototype=new r,v.__super__=o.prototype,v},s={}.hasOwnProperty;D=N("./Utility").isObject,_=N("./XMLNode"),P=N("./NodeType"),$.exports=c=function(S){p(v,S);function v(o,i,r,h){var y;v.__super__.constructor.call(this,o),D(i)&&(y=i,i=y.version,r=y.encoding,h=y.standalone),i||(i="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(i),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),h!=null&&(this.standalone=this.stringify.xmlStandalone(h))}return v.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},v}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(N,$,k){"use strict";(function(){var P,c,_,D,p,s,S,v,o,i=function(y,g){for(var w in g)r.call(g,w)&&(y[w]=g[w]);function m(){this.constructor=y}return m.prototype=g.prototype,y.prototype=new m,y.__super__=g.prototype,y},r={}.hasOwnProperty;o=N("./Utility").isObject,v=N("./XMLNode"),P=N("./NodeType"),c=N("./XMLDTDAttList"),D=N("./XMLDTDEntity"),_=N("./XMLDTDElement"),p=N("./XMLDTDNotation"),S=N("./XMLNamedNodeMap"),$.exports=s=function(h){i(y,h);function y(g,w,m){var d,n,l,u,T,E;if(y.__super__.constructor.call(this,g),this.type=P.DocType,g.children){for(u=g.children,n=0,l=u.length;n<l;n++)if(d=u[n],d.type===P.Element){this.name=d.name;break}}this.documentObject=g,o(w)&&(T=w,w=T.pubID,m=T.sysID),m==null&&(E=[w,m],m=E[0],w=E[1]),w!=null&&(this.pubID=this.stringify.dtdPubID(w)),m!=null&&(this.sysID=this.stringify.dtdSysID(m))}return Object.defineProperty(y.prototype,"entities",{get:function(){var w,m,d,n,l;for(n={},l=this.children,m=0,d=l.length;m<d;m++)w=l[m],w.type===P.EntityDeclaration&&!w.pe&&(n[w.name]=w);return new S(n)}}),Object.defineProperty(y.prototype,"notations",{get:function(){var w,m,d,n,l;for(n={},l=this.children,m=0,d=l.length;m<d;m++)w=l[m],w.type===P.NotationDeclaration&&(n[w.name]=w);return new S(n)}}),Object.defineProperty(y.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(y.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(y.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),y.prototype.element=function(g,w){var m;return m=new _(this,g,w),this.children.push(m),this},y.prototype.attList=function(g,w,m,d,n){var l;return l=new c(this,g,w,m,d,n),this.children.push(l),this},y.prototype.entity=function(g,w){var m;return m=new D(this,!1,g,w),this.children.push(m),this},y.prototype.pEntity=function(g,w){var m;return m=new D(this,!0,g,w),this.children.push(m),this},y.prototype.notation=function(g,w){var m;return m=new p(this,g,w),this.children.push(m),this},y.prototype.toString=function(g){return this.options.writer.docType(this,this.options.writer.filterOptions(g))},y.prototype.ele=function(g,w){return this.element(g,w)},y.prototype.att=function(g,w,m,d,n){return this.attList(g,w,m,d,n)},y.prototype.ent=function(g,w){return this.entity(g,w)},y.prototype.pent=function(g,w){return this.pEntity(g,w)},y.prototype.not=function(g,w){return this.notation(g,w)},y.prototype.up=function(){return this.root()||this.documentObject},y.prototype.isEqualNode=function(g){return y.__super__.isEqualNode.apply(this,arguments).isEqualNode(g)?g.name!==this.name||g.publicId!==this.publicId?!1:!(g.systemId!==this.systemId):!1},y}(v)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(N,$,k){"use strict";(function(){var P,c,_,D,p,s,S,v,o=function(h,y){for(var g in y)i.call(y,g)&&(h[g]=y[g]);function w(){this.constructor=h}return w.prototype=y.prototype,h.prototype=new w,h.__super__=y.prototype,h},i={}.hasOwnProperty;v=N("./Utility").isPlainObject,_=N("./XMLDOMImplementation"),c=N("./XMLDOMConfiguration"),p=N("./XMLNode"),P=N("./NodeType"),S=N("./XMLStringifier"),s=N("./XMLStringWriter"),$.exports=D=function(r){o(h,r);function h(y){h.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new c,y||(y={}),y.writer||(y.writer=new s),this.options=y,this.stringify=new S(y)}return Object.defineProperty(h.prototype,"implementation",{value:new _}),Object.defineProperty(h.prototype,"doctype",{get:function(){var g,w,m,d;for(d=this.children,w=0,m=d.length;w<m;w++)if(g=d[w],g.type===P.DocType)return g;return null}}),Object.defineProperty(h.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(h.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(h.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(h.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(h.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(h.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(h.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(h.prototype,"origin",{get:function(){return null}}),Object.defineProperty(h.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(h.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(h.prototype,"contentType",{get:function(){return null}}),h.prototype.end=function(y){var g;return g={},y?v(y)&&(g=y,y=this.options.writer):y=this.options.writer,y.document(this,y.filterOptions(g))},h.prototype.toString=function(y){return this.options.writer.document(this,this.options.writer.filterOptions(y))},h.prototype.createElement=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createTextNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createComment=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createCDATASection=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createProcessingInstruction=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createAttribute=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createEntityReference=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.importNode=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createElementNS=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createAttributeNS=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByTagNameNS=function(y,g){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementById=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.adoptNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.renameNode=function(y,g,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.getElementsByClassName=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createEvent=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createNodeIterator=function(y,g,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.createTreeWalker=function(y,g,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(N,$,k){"use strict";(function(){var P,c,_,D,p,s,S,v,o,i,r,h,y,g,w,m,d,n,l,u,T,E,a,L,O={}.hasOwnProperty;L=N("./Utility"),E=L.isObject,T=L.isFunction,a=L.isPlainObject,u=L.getValue,P=N("./NodeType"),h=N("./XMLDocument"),g=N("./XMLElement"),D=N("./XMLCData"),p=N("./XMLComment"),m=N("./XMLRaw"),l=N("./XMLText"),w=N("./XMLProcessingInstruction"),i=N("./XMLDeclaration"),r=N("./XMLDocType"),s=N("./XMLDTDAttList"),v=N("./XMLDTDEntity"),S=N("./XMLDTDElement"),o=N("./XMLDTDNotation"),_=N("./XMLAttribute"),n=N("./XMLStringifier"),d=N("./XMLStringWriter"),c=N("./WriterState"),$.exports=y=function(){function f(x,b,C){var I;this.name="?xml",this.type=P.Document,x||(x={}),I={},x.writer?a(x.writer)&&(I=x.writer,x.writer=new d):x.writer=new d,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(I),this.stringify=new n(x),this.onDataCallback=b||function(){},this.onEndCallback=C||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return f.prototype.createChildNode=function(x){var b,C,I,j,M,z,G,B;switch(x.type){case P.CData:this.cdata(x.value);break;case P.Comment:this.comment(x.value);break;case P.Element:I={},G=x.attribs;for(C in G){if(!O.call(G,C))continue;b=G[C],I[C]=b.value}this.node(x.name,I);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(x.value);break;case P.Text:this.text(x.value);break;case P.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(B=x.children,M=0,z=B.length;M<z;M++)j=B[M],this.createChildNode(j),j.type===P.Element&&this.up();return this},f.prototype.dummy=function(){return this},f.prototype.node=function(x,b,C){var I;if(x==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(x));return this.openCurrent(),x=u(x),b==null&&(b={}),b=u(b),E(b)||(I=[b,C],C=I[0],b=I[1]),this.currentNode=new g(this,x,b),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,C!=null&&this.text(C),this},f.prototype.element=function(x,b,C){var I,j,M,z,G,B;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||E(x)||T(x))for(z=this.options.noValidation,this.options.noValidation=!0,B=new h(this.options).element("TEMP_ROOT"),B.element(x),this.options.noValidation=z,G=B.children,j=0,M=G.length;j<M;j++)I=G[j],this.createChildNode(I),I.type===P.Element&&this.up();else this.node(x,b,C);return this},f.prototype.attribute=function(x,b){var C,I;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(x));if(x!=null&&(x=u(x)),E(x))for(C in x){if(!O.call(x,C))continue;I=x[C],this.attribute(C,I)}else T(b)&&(b=b.apply()),this.options.keepNullAttributes&&b==null?this.currentNode.attribs[x]=new _(this,x,""):b!=null&&(this.currentNode.attribs[x]=new _(this,x,b));return this},f.prototype.text=function(x){var b;return this.openCurrent(),b=new l(this,x),this.onData(this.writer.text(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.cdata=function(x){var b;return this.openCurrent(),b=new D(this,x),this.onData(this.writer.cdata(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.comment=function(x){var b;return this.openCurrent(),b=new p(this,x),this.onData(this.writer.comment(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.raw=function(x){var b;return this.openCurrent(),b=new m(this,x),this.onData(this.writer.raw(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.instruction=function(x,b){var C,I,j,M,z;if(this.openCurrent(),x!=null&&(x=u(x)),b!=null&&(b=u(b)),Array.isArray(x))for(C=0,M=x.length;C<M;C++)I=x[C],this.instruction(I);else if(E(x))for(I in x){if(!O.call(x,I))continue;j=x[I],this.instruction(I,j)}else T(b)&&(b=b.apply()),z=new w(this,x,b),this.onData(this.writer.processingInstruction(z,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},f.prototype.declaration=function(x,b,C){var I;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return I=new i(this,x,b,C),this.onData(this.writer.declaration(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.doctype=function(x,b,C){if(this.openCurrent(),x==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 r(this,b,C),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},f.prototype.dtdElement=function(x,b){var C;return this.openCurrent(),C=new S(this,x,b),this.onData(this.writer.dtdElement(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.attList=function(x,b,C,I,j){var M;return this.openCurrent(),M=new s(this,x,b,C,I,j),this.onData(this.writer.dtdAttList(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.entity=function(x,b){var C;return this.openCurrent(),C=new v(this,!1,x,b),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.pEntity=function(x,b){var C;return this.openCurrent(),C=new v(this,!0,x,b),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.prototype.notation=function(x,b){var C;return this.openCurrent(),C=new o(this,x,b),this.onData(this.writer.dtdNotation(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},f.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},f.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},f.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},f.prototype.openNode=function(x){var b,C,I,j;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===P.Element&&(this.root=x),C="",x.type===P.Element){this.writerOptions.state=c.OpenTag,C=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,j=x.attribs;for(I in j){if(!O.call(j,I))continue;b=j[I],C+=this.writer.attribute(b,this.writerOptions,this.currentLevel)}C+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=c.InsideTag}else this.writerOptions.state=c.OpenTag,C=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?C+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(C+=' SYSTEM "'+x.sysID+'"'),x.children?(C+=" [",this.writerOptions.state=c.InsideTag):(this.writerOptions.state=c.CloseTag,C+=">"),C+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(C,this.currentLevel),x.isOpen=!0}},f.prototype.closeNode=function(x){var b;if(!x.isClosed)return b="",this.writerOptions.state=c.CloseTag,x.type===P.Element?b=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):b=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=c.None,this.onData(b,this.currentLevel),x.isClosed=!0},f.prototype.onData=function(x,b){return this.documentStarted=!0,this.onDataCallback(x,b+1)},f.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},f.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},f.prototype.ele=function(){return this.element.apply(this,arguments)},f.prototype.nod=function(x,b,C){return this.node(x,b,C)},f.prototype.txt=function(x){return this.text(x)},f.prototype.dat=function(x){return this.cdata(x)},f.prototype.com=function(x){return this.comment(x)},f.prototype.ins=function(x,b){return this.instruction(x,b)},f.prototype.dec=function(x,b,C){return this.declaration(x,b,C)},f.prototype.dtd=function(x,b,C){return this.doctype(x,b,C)},f.prototype.e=function(x,b,C){return this.element(x,b,C)},f.prototype.n=function(x,b,C){return this.node(x,b,C)},f.prototype.t=function(x){return this.text(x)},f.prototype.d=function(x){return this.cdata(x)},f.prototype.c=function(x){return this.comment(x)},f.prototype.r=function(x){return this.raw(x)},f.prototype.i=function(x,b){return this.instruction(x,b)},f.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},f.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},f.prototype.ent=function(x,b){return this.entity(x,b)},f.prototype.pent=function(x,b){return this.pEntity(x,b)},f.prototype.not=function(x,b){return this.notation(x,b)},f}()}).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(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S=function(i,r){for(var h in r)v.call(r,h)&&(i[h]=r[h]);function y(){this.constructor=i}return y.prototype=r.prototype,i.prototype=new y,i.__super__=r.prototype,i},v={}.hasOwnProperty;s=N("./XMLNode"),D=N("./NodeType"),$.exports=p=function(o){S(i,o);function i(r){i.__super__.constructor.call(this,r),this.type=D.Dummy}return i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.toString=function(r){return""},i}(s)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S,v,o,i,r,h,y=function(m,d){for(var n in d)g.call(d,n)&&(m[n]=d[n]);function l(){this.constructor=m}return l.prototype=d.prototype,m.prototype=new l,m.__super__=d.prototype,m},g={}.hasOwnProperty;h=N("./Utility"),r=h.isObject,i=h.isFunction,o=h.getValue,v=N("./XMLNode"),D=N("./NodeType"),p=N("./XMLAttribute"),S=N("./XMLNamedNodeMap"),$.exports=s=function(w){y(m,w);function m(d,n,l){var u,T,E,a;if(m.__super__.constructor.call(this,d),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,l!=null&&this.attribute(l),d.type===D.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(a=d.children,T=0,E=a.length;T<E;T++)if(u=a[T],u.type===D.DocType){u.name=this.name;break}}}return Object.defineProperty(m.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(m.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(m.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(m.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(m.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(m.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(m.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(m.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),m.prototype.clone=function(){var d,n,l,u;l=(0,c.default)(this),l.isRoot&&(l.documentObject=null),l.attribs={},u=this.attribs;for(n in u){if(!g.call(u,n))continue;d=u[n],l.attribs[n]=d.clone()}return l.children=[],this.children.forEach(function(T){var E;return E=T.clone(),E.parent=l,l.children.push(E)}),l},m.prototype.attribute=function(d,n){var l,u;if(d!=null&&(d=o(d)),r(d))for(l in d){if(!g.call(d,l))continue;u=d[l],this.attribute(l,u)}else i(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[d]=new p(this,d,""):n!=null&&(this.attribs[d]=new p(this,d,n));return this},m.prototype.removeAttribute=function(d){var n,l,u;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=o(d),Array.isArray(d))for(l=0,u=d.length;l<u;l++)n=d[l],delete this.attribs[n];else delete this.attribs[d];return this},m.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},m.prototype.att=function(d,n){return this.attribute(d,n)},m.prototype.a=function(d,n){return this.attribute(d,n)},m.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},m.prototype.setAttribute=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},m.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setAttributeNS=function(d,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.removeAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getAttributeNodeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},m.prototype.hasAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setIdAttribute=function(d,n){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:n},m.prototype.setIdAttributeNS=function(d,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.setIdAttributeNode=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.isEqualNode=function(d){var n,l,u;if(!m.__super__.isEqualNode.apply(this,arguments).isEqualNode(d))return!1;if(d.namespaceURI!==this.namespaceURI)return!1;if(d.prefix!==this.prefix)return!1;if(d.localName!==this.localName)return!1;if(d.attribs.length!==this.attribs.length)return!1;for(n=l=0,u=this.attribs.length-1;0<=u?l<=u:l>=u;n=0<=u?++l:--l)if(!this.attribs[n].isEqualNode(d.attribs[n]))return!1;return!0},m}(v)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D;$.exports=D=function(){function p(s){this.nodes=s}return Object.defineProperty(p.prototype,"length",{get:function(){return(0,c.default)(this.nodes).length||0}}),p.prototype.clone=function(){return this.nodes=null},p.prototype.getNamedItem=function(s){return this.nodes[s]},p.prototype.setNamedItem=function(s){var S;return S=this.nodes[s.nodeName],this.nodes[s.nodeName]=s,S||null},p.prototype.removeNamedItem=function(s){var S;return S=this.nodes[s],delete this.nodes[s],S||null},p.prototype.item=function(s){return this.nodes[(0,c.default)(this.nodes)[s]]||null},p.prototype.getNamedItemNS=function(s,S){throw new Error("This DOM method is not implemented.")},p.prototype.setNamedItemNS=function(s){throw new Error("This DOM method is not implemented.")},p.prototype.removeNamedItemNS=function(s,S){throw new Error("This DOM method is not implemented.")},p}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(N,$,k){"use strict";(function(){var P,c,_,D,p,s,S,v,o,i,r,h,y,g,w,m,d,n,l,u={}.hasOwnProperty;l=N("./Utility"),n=l.isObject,d=l.isFunction,m=l.isEmpty,w=l.getValue,v=null,_=null,D=null,p=null,s=null,y=null,g=null,h=null,S=null,c=null,r=null,o=null,P=null,$.exports=i=function(){function T(E){this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,v||(v=N("./XMLElement"),_=N("./XMLCData"),D=N("./XMLComment"),p=N("./XMLDeclaration"),s=N("./XMLDocType"),y=N("./XMLRaw"),g=N("./XMLText"),h=N("./XMLProcessingInstruction"),S=N("./XMLDummy"),c=N("./NodeType"),r=N("./XMLNodeList"),o=N("./XMLNamedNodeMap"),P=N("./DocumentPosition"))}return Object.defineProperty(T.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(T.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(T.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(T.prototype,"previousSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var a,L,O,f,x;if(this.nodeType===c.Element||this.nodeType===c.DocumentFragment){for(x="",f=this.children,L=0,O=f.length;L<O;L++)a=f[L],a.textContent&&(x+=a.textContent);return x}else return null},set:function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.setParent=function(E){var a,L,O,f,x;for(this.parent=E,E&&(this.options=E.options,this.stringify=E.stringify),f=this.children,x=[],L=0,O=f.length;L<O;L++)a=f[L],x.push(a.setParent(this));return x},T.prototype.element=function(E,a,L){var O,f,x,b,C,I,j,M,z,G,B;if(I=null,a===null&&L==null&&(z=[{},null],a=z[0],L=z[1]),a==null&&(a={}),a=w(a),n(a)||(G=[a,L],L=G[0],a=G[1]),E!=null&&(E=w(E)),Array.isArray(E))for(x=0,j=E.length;x<j;x++)f=E[x],I=this.element(f);else if(d(E))I=this.element(E.apply());else if(n(E))for(C in E){if(!u.call(E,C))continue;if(B=E[C],d(B)&&(B=B.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&C.indexOf(this.stringify.convertAttKey)===0)I=this.attribute(C.substr(this.stringify.convertAttKey.length),B);else if(!this.options.separateArrayItems&&Array.isArray(B)&&m(B))I=this.dummy();else if(n(B)&&m(B))I=this.element(C);else if(!this.options.keepNullNodes&&B==null)I=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(B))for(b=0,M=B.length;b<M;b++)f=B[b],O={},O[C]=f,I=this.element(O);else n(B)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?I=this.element(B):(I=this.element(C),I.element(B)):I=this.element(C,B)}else!this.options.keepNullNodes&&L===null?I=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&E.indexOf(this.stringify.convertTextKey)===0?I=this.text(L):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&E.indexOf(this.stringify.convertCDataKey)===0?I=this.cdata(L):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&E.indexOf(this.stringify.convertCommentKey)===0?I=this.comment(L):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&E.indexOf(this.stringify.convertRawKey)===0?I=this.raw(L):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&E.indexOf(this.stringify.convertPIKey)===0?I=this.instruction(E.substr(this.stringify.convertPIKey.length),L):I=this.node(E,a,L);if(I==null)throw new Error("Could not create any elements with: "+E+". "+this.debugInfo());return I},T.prototype.insertBefore=function(E,a,L){var O,f,x,b,C;if(E!=null?E.type:void 0)return x=E,b=a,x.setParent(this),b?(f=children.indexOf(b),C=children.splice(f),children.push(x),Array.prototype.push.apply(children,C)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return f=this.parent.children.indexOf(this),C=this.parent.children.splice(f),O=this.parent.element(E,a,L),Array.prototype.push.apply(this.parent.children,C),O},T.prototype.insertAfter=function(E,a,L){var O,f,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return f=this.parent.children.indexOf(this),x=this.parent.children.splice(f+1),O=this.parent.element(E,a,L),Array.prototype.push.apply(this.parent.children,x),O},T.prototype.remove=function(){var E,a;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return E=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[E,E-E+1].concat(a=[])),this.parent},T.prototype.node=function(E,a,L){var O,f;return E!=null&&(E=w(E)),a||(a={}),a=w(a),n(a)||(f=[a,L],L=f[0],a=f[1]),O=new v(this,E,a),L!=null&&O.text(L),this.children.push(O),O},T.prototype.text=function(E){var a;return n(E)&&this.element(E),a=new g(this,E),this.children.push(a),this},T.prototype.cdata=function(E){var a;return a=new _(this,E),this.children.push(a),this},T.prototype.comment=function(E){var a;return a=new D(this,E),this.children.push(a),this},T.prototype.commentBefore=function(E){var a,L,O;return L=this.parent.children.indexOf(this),O=this.parent.children.splice(L),a=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,O),this},T.prototype.commentAfter=function(E){var a,L,O;return L=this.parent.children.indexOf(this),O=this.parent.children.splice(L+1),a=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,O),this},T.prototype.raw=function(E){var a;return a=new y(this,E),this.children.push(a),this},T.prototype.dummy=function(){var E;return E=new S(this),E},T.prototype.instruction=function(E,a){var L,O,f,x,b;if(E!=null&&(E=w(E)),a!=null&&(a=w(a)),Array.isArray(E))for(x=0,b=E.length;x<b;x++)L=E[x],this.instruction(L);else if(n(E))for(L in E){if(!u.call(E,L))continue;O=E[L],this.instruction(L,O)}else d(a)&&(a=a.apply()),f=new h(this,E,a),this.children.push(f);return this},T.prototype.instructionBefore=function(E,a){var L,O,f;return O=this.parent.children.indexOf(this),f=this.parent.children.splice(O),L=this.parent.instruction(E,a),Array.prototype.push.apply(this.parent.children,f),this},T.prototype.instructionAfter=function(E,a){var L,O,f;return O=this.parent.children.indexOf(this),f=this.parent.children.splice(O+1),L=this.parent.instruction(E,a),Array.prototype.push.apply(this.parent.children,f),this},T.prototype.declaration=function(E,a,L){var O,f;return O=this.document(),f=new p(O,E,a,L),O.children.length===0?O.children.unshift(f):O.children[0].type===c.Declaration?O.children[0]=f:O.children.unshift(f),O.root()||O},T.prototype.dtd=function(E,a){var L,O,f,x,b,C,I,j,M,z;for(O=this.document(),f=new s(O,E,a),M=O.children,x=b=0,I=M.length;b<I;x=++b)if(L=M[x],L.type===c.DocType)return O.children[x]=f,f;for(z=O.children,x=C=0,j=z.length;C<j;x=++C)if(L=z[x],L.isRoot)return O.children.splice(x,0,f),f;return O.children.push(f),f},T.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},T.prototype.root=function(){var E;for(E=this;E;){if(E.type===c.Document)return E.rootObject;if(E.isRoot)return E;E=E.parent}},T.prototype.document=function(){var E;for(E=this;E;){if(E.type===c.Document)return E;E=E.parent}},T.prototype.end=function(E){return this.document().end(E)},T.prototype.prev=function(){var E;if(E=this.parent.children.indexOf(this),E<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[E-1]},T.prototype.next=function(){var E;if(E=this.parent.children.indexOf(this),E===-1||E===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[E+1]},T.prototype.importDocument=function(E){var a;return a=E.root().clone(),a.parent=this,a.isRoot=!1,this.children.push(a),this},T.prototype.debugInfo=function(E){var a,L;return E=E||this.name,E==null&&!((a=this.parent)!=null?a.name:void 0)?"":E==null?"parent: <"+this.parent.name+">":((L=this.parent)!=null?L.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},T.prototype.ele=function(E,a,L){return this.element(E,a,L)},T.prototype.nod=function(E,a,L){return this.node(E,a,L)},T.prototype.txt=function(E){return this.text(E)},T.prototype.dat=function(E){return this.cdata(E)},T.prototype.com=function(E){return this.comment(E)},T.prototype.ins=function(E,a){return this.instruction(E,a)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(E,a,L){return this.declaration(E,a,L)},T.prototype.e=function(E,a,L){return this.element(E,a,L)},T.prototype.n=function(E,a,L){return this.node(E,a,L)},T.prototype.t=function(E){return this.text(E)},T.prototype.d=function(E){return this.cdata(E)},T.prototype.c=function(E){return this.comment(E)},T.prototype.r=function(E){return this.raw(E)},T.prototype.i=function(E,a){return this.instruction(E,a)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(E){return this.importDocument(E)},T.prototype.replaceChild=function(E,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isSupported=function(E,a){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(E){var a,L;return a=this,a===E?0:this.document()!==E.document()?(L=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?L|=P.Preceding:L|=P.Following,L):a.isAncestor(E)?P.Contains|P.Preceding:a.isDescendant(E)?P.Contains|P.Following:a.isPreceding(E)?P.Preceding:P.Following},T.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(E){var a,L,O;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(a=L=0,O=this.children.length-1;0<=O?L<=O:L>=O;a=0<=O?++L:--L)if(!this.children[a].isEqualNode(E.children[a]))return!1;return!0},T.prototype.getFeature=function(E,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(E,a,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},T.prototype.isDescendant=function(E){var a,L,O,f,x;for(x=this.children,O=0,f=x.length;O<f;O++){if(a=x[O],E===a)return!0;if(L=a.isDescendant(E),L)return!0}return!1},T.prototype.isAncestor=function(E){return E.isDescendant(this)},T.prototype.isPreceding=function(E){var a,L;return a=this.treePosition(E),L=this.treePosition(this),a===-1||L===-1?!1:a<L},T.prototype.isFollowing=function(E){var a,L;return a=this.treePosition(E),L=this.treePosition(this),a===-1||L===-1?!1:a>L},T.prototype.treePosition=function(E){var a,L;return L=0,a=!1,this.foreachTreeNode(this.document(),function(O){if(L++,!a&&O===E)return a=!0}),a?L:-1},T.prototype.foreachTreeNode=function(E,a){var L,O,f,x,b;for(E||(E=this.document()),x=E.children,O=0,f=x.length;O<f;O++){if(L=x[O],b=a(L))return b;if(b=this.foreachTreeNode(L,a),b)return b}},T}()}).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(N,$,k){"use strict";(function(){var P;$.exports=P=function(){function c(_){this.nodes=_}return Object.defineProperty(c.prototype,"length",{get:function(){return this.nodes.length||0}}),c.prototype.clone=function(){return this.nodes=null},c.prototype.item=function(_){return this.nodes[_]||null},c}()}).call(void 0)},{}],275:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S=function(i,r){for(var h in r)v.call(r,h)&&(i[h]=r[h]);function y(){this.constructor=i}return y.prototype=r.prototype,i.prototype=new y,i.__super__=r.prototype,i},v={}.hasOwnProperty;D=N("./NodeType"),p=N("./XMLCharacterData"),$.exports=s=function(o){S(i,o);function i(r,h,y){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=D.ProcessingInstruction,this.target=this.stringify.insTarget(h),this.name=this.target,y&&(this.value=this.stringify.insValue(y))}return i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},i.prototype.isEqualNode=function(r){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},i}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S=function(i,r){for(var h in r)v.call(r,h)&&(i[h]=r[h]);function y(){this.constructor=i}return y.prototype=r.prototype,i.prototype=new y,i.__super__=r.prototype,i},v={}.hasOwnProperty;D=N("./NodeType"),p=N("./XMLNode"),$.exports=s=function(o){S(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=D.Raw,this.value=this.stringify.raw(h)}return i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},i}(p)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(N,$,k){"use strict";(function(){var P,c,_,D,p=function(v,o){for(var i in o)s.call(o,i)&&(v[i]=o[i]);function r(){this.constructor=v}return r.prototype=o.prototype,v.prototype=new r,v.__super__=o.prototype,v},s={}.hasOwnProperty;P=N("./NodeType"),D=N("./XMLWriterBase"),c=N("./WriterState"),$.exports=_=function(S){p(v,S);function v(o,i){this.stream=o,v.__super__.constructor.call(this,i)}return v.prototype.endline=function(o,i,r){return o.isLastRootNode&&i.state===c.CloseTag?"":v.__super__.endline.call(this,o,i,r)},v.prototype.document=function(o,i){var r,h,y,g,w,m,d,n,l;for(d=o.children,h=y=0,w=d.length;y<w;h=++y)r=d[h],r.isLastRootNode=h===o.children.length-1;for(i=this.filterOptions(i),n=o.children,l=[],g=0,m=n.length;g<m;g++)r=n[g],l.push(this.writeChildNode(r,i,0));return l},v.prototype.attribute=function(o,i,r){return this.stream.write(v.__super__.attribute.call(this,o,i,r))},v.prototype.cdata=function(o,i,r){return this.stream.write(v.__super__.cdata.call(this,o,i,r))},v.prototype.comment=function(o,i,r){return this.stream.write(v.__super__.comment.call(this,o,i,r))},v.prototype.declaration=function(o,i,r){return this.stream.write(v.__super__.declaration.call(this,o,i,r))},v.prototype.docType=function(o,i,r){var h,y,g,w;if(r||(r=0),this.openNode(o,i,r),i.state=c.OpenTag,this.stream.write(this.indent(o,i,r)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,i,r)),i.state=c.InsideTag,w=o.children,y=0,g=w.length;y<g;y++)h=w[y],this.writeChildNode(h,i,r+1);i.state=c.CloseTag,this.stream.write("]")}return i.state=c.CloseTag,this.stream.write(i.spaceBeforeSlash+">"),this.stream.write(this.endline(o,i,r)),i.state=c.None,this.closeNode(o,i,r)},v.prototype.element=function(o,i,r){var h,y,g,w,m,d,n,l,u,T;r||(r=0),this.openNode(o,i,r),i.state=c.OpenTag,this.stream.write(this.indent(o,i,r)+"<"+o.name),u=o.attribs;for(n in u){if(!s.call(u,n))continue;h=u[n],this.attribute(h,i,r)}if(g=o.children.length,w=g===0?null:o.children[0],g===0||o.children.every(function(E){return(E.type===P.Text||E.type===P.Raw)&&E.value===""}))i.allowEmpty?(this.stream.write(">"),i.state=c.CloseTag,this.stream.write("</"+o.name+">")):(i.state=c.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(i.pretty&&g===1&&(w.type===P.Text||w.type===P.Raw)&&w.value!=null)this.stream.write(">"),i.state=c.InsideTag,i.suppressPrettyCount++,l=!0,this.writeChildNode(w,i,r+1),i.suppressPrettyCount--,l=!1,i.state=c.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,i,r)),i.state=c.InsideTag,T=o.children,m=0,d=T.length;m<d;m++)y=T[m],this.writeChildNode(y,i,r+1);i.state=c.CloseTag,this.stream.write(this.indent(o,i,r)+"</"+o.name+">")}return this.stream.write(this.endline(o,i,r)),i.state=c.None,this.closeNode(o,i,r)},v.prototype.processingInstruction=function(o,i,r){return this.stream.write(v.__super__.processingInstruction.call(this,o,i,r))},v.prototype.raw=function(o,i,r){return this.stream.write(v.__super__.raw.call(this,o,i,r))},v.prototype.text=function(o,i,r){return this.stream.write(v.__super__.text.call(this,o,i,r))},v.prototype.dtdAttList=function(o,i,r){return this.stream.write(v.__super__.dtdAttList.call(this,o,i,r))},v.prototype.dtdElement=function(o,i,r){return this.stream.write(v.__super__.dtdElement.call(this,o,i,r))},v.prototype.dtdEntity=function(o,i,r){return this.stream.write(v.__super__.dtdEntity.call(this,o,i,r))},v.prototype.dtdNotation=function(o,i,r){return this.stream.write(v.__super__.dtdNotation.call(this,o,i,r))},v}(D)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(N,$,k){"use strict";(function(){var P,c,_=function(s,S){for(var v in S)D.call(S,v)&&(s[v]=S[v]);function o(){this.constructor=s}return o.prototype=S.prototype,s.prototype=new o,s.__super__=S.prototype,s},D={}.hasOwnProperty;c=N("./XMLWriterBase"),$.exports=P=function(p){_(s,p);function s(S){s.__super__.constructor.call(this,S)}return s.prototype.document=function(S,v){var o,i,r,h,y;for(v=this.filterOptions(v),h="",y=S.children,i=0,r=y.length;i<r;i++)o=y[i],h+=this.writeChildNode(o,v,0);return v.pretty&&h.slice(-v.newline.length)===v.newline&&(h=h.slice(0,-v.newline.length)),h},s}(c)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(N,$,k){"use strict";(function(){var P,c=function(p,s){return function(){return p.apply(s,arguments)}},_={}.hasOwnProperty;$.exports=P=function(){function D(p){this.assertLegalName=c(this.assertLegalName,this),this.assertLegalChar=c(this.assertLegalChar,this);var s,S,v;p||(p={}),this.options=p,this.options.version||(this.options.version="1.0"),S=p.stringify||{};for(s in S){if(!_.call(S,s))continue;v=S[s],this[s]=v}}return D.prototype.name=function(p){return this.options.noValidation?p:this.assertLegalName(""+p||"")},D.prototype.text=function(p){return this.options.noValidation?p:this.assertLegalChar(this.textEscape(""+p||""))},D.prototype.cdata=function(p){return this.options.noValidation?p:(p=""+p||"",p=p.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(p))},D.prototype.comment=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},D.prototype.raw=function(p){return this.options.noValidation?p:""+p||""},D.prototype.attValue=function(p){return this.options.noValidation?p:this.assertLegalChar(this.attEscape(p=""+p||""))},D.prototype.insTarget=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.insValue=function(p){if(this.options.noValidation)return p;if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return this.assertLegalChar(p)},D.prototype.xmlVersion=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},D.prototype.xmlEncoding=function(p){if(this.options.noValidation)return p;if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return this.assertLegalChar(p)},D.prototype.xmlStandalone=function(p){return this.options.noValidation?p:p?"yes":"no"},D.prototype.dtdPubID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdSysID=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdElementValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdAttType=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdAttDefault=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdEntityValue=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},D.prototype.dtdNData=function(p){return this.options.noValidation?p:this.assertLegalChar(""+p||"")},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(p){var s,S;if(this.options.noValidation)return p;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=p.match(s))throw new Error("Invalid character in string: "+p+" at index "+S.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=p.match(s)))throw new Error("Invalid character in string: "+p+" at index "+S.index);return p},D.prototype.assertLegalName=function(p){var s;if(this.options.noValidation)return p;if(this.assertLegalChar(p),s=/^([: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])*$/,!p.match(s))throw new Error("Invalid character in name");return p},D.prototype.textEscape=function(p){var s;return this.options.noValidation?p:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},D.prototype.attEscape=function(p){var s;return this.options.noValidation?p:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},D}()}).call(void 0)},{}],280:[function(N,$,k){"use strict";var P=N("babel-runtime/core-js/object/create"),c=_(P);function _(D){return D&&D.__esModule?D:{default:D}}(function(){var D,p,s,S=function(i,r){for(var h in r)v.call(r,h)&&(i[h]=r[h]);function y(){this.constructor=i}return y.prototype=r.prototype,i.prototype=new y,i.__super__=r.prototype,i},v={}.hasOwnProperty;D=N("./NodeType"),p=N("./XMLCharacterData"),$.exports=s=function(o){S(i,o);function i(r,h){if(i.__super__.constructor.call(this,r),h==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=D.Text,this.value=this.stringify.text(h)}return Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var h,y,g;for(g="",y=this.previousSibling;y;)g=y.data+g,y=y.previousSibling;for(g+=this.data,h=this.nextSibling;h;)g=g+h.data,h=h.nextSibling;return g}}),i.prototype.clone=function(){return(0,c.default)(this)},i.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},i.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(p)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(N,$,k){"use strict";(function(){var P,c,_,D,p,s,S,v,o,i,r,h,y,g,w,m,d,n={}.hasOwnProperty;d=N("./Utility").assign,P=N("./NodeType"),o=N("./XMLDeclaration"),i=N("./XMLDocType"),_=N("./XMLCData"),D=N("./XMLComment"),h=N("./XMLElement"),g=N("./XMLRaw"),w=N("./XMLText"),y=N("./XMLProcessingInstruction"),r=N("./XMLDummy"),p=N("./XMLDTDAttList"),s=N("./XMLDTDElement"),S=N("./XMLDTDEntity"),v=N("./XMLDTDNotation"),c=N("./WriterState"),$.exports=m=function(){function l(u){var T,E,a;u||(u={}),this.options=u,E=u.writer||{};for(T in E){if(!n.call(E,T))continue;a=E[T],this["_"+T]=this[T],this[T]=a}}return l.prototype.filterOptions=function(u){var T,E,a,L,O,f,x,b;return u||(u={}),u=d({},this.options,u),T={writer:this},T.pretty=u.pretty||!1,T.allowEmpty=u.allowEmpty||!1,T.indent=(E=u.indent)!=null?E:" ",T.newline=(a=u.newline)!=null?a:`
|
|
|
`,T.offset=(L=u.offset)!=null?L:0,T.dontPrettyTextNodes=(O=(f=u.dontPrettyTextNodes)!=null?f:u.dontprettytextnodes)!=null?O:0,T.spaceBeforeSlash=(x=(b=u.spaceBeforeSlash)!=null?b:u.spacebeforeslash)!=null?x:"",T.spaceBeforeSlash===!0&&(T.spaceBeforeSlash=" "),T.suppressPrettyCount=0,T.user={},T.state=c.None,T},l.prototype.indent=function(u,T,E){var a;return!T.pretty||T.suppressPrettyCount?"":T.pretty&&(a=(E||0)+T.offset+1,a>0)?new Array(a).join(T.indent):""},l.prototype.endline=function(u,T,E){return!T.pretty||T.suppressPrettyCount?"":T.newline},l.prototype.attribute=function(u,T,E){var a;return this.openAttribute(u,T,E),a=" "+u.name+'="'+u.value+'"',this.closeAttribute(u,T,E),a},l.prototype.cdata=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<![CDATA[",T.state=c.InsideTag,a+=u.value,T.state=c.CloseTag,a+="]]>"+this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.comment=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<!-- ",T.state=c.InsideTag,a+=u.value,T.state=c.CloseTag,a+=" -->"+this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.declaration=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<?xml",T.state=c.InsideTag,a+=' version="'+u.version+'"',u.encoding!=null&&(a+=' encoding="'+u.encoding+'"'),u.standalone!=null&&(a+=' standalone="'+u.standalone+'"'),T.state=c.CloseTag,a+=T.spaceBeforeSlash+"?>",a+=this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.docType=function(u,T,E){var a,L,O,f,x;if(E||(E=0),this.openNode(u,T,E),T.state=c.OpenTag,f=this.indent(u,T,E),f+="<!DOCTYPE "+u.root().name,u.pubID&&u.sysID?f+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.sysID&&(f+=' SYSTEM "'+u.sysID+'"'),u.children.length>0){for(f+=" [",f+=this.endline(u,T,E),T.state=c.InsideTag,x=u.children,L=0,O=x.length;L<O;L++)a=x[L],f+=this.writeChildNode(a,T,E+1);T.state=c.CloseTag,f+="]"}return T.state=c.CloseTag,f+=T.spaceBeforeSlash+">",f+=this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),f},l.prototype.element=function(u,T,E){var a,L,O,f,x,b,C,I,j,M,z,G,B,K;E||(E=0),M=!1,z="",this.openNode(u,T,E),T.state=c.OpenTag,z+=this.indent(u,T,E)+"<"+u.name,G=u.attribs;for(j in G){if(!n.call(G,j))continue;a=G[j],z+=this.attribute(a,T,E)}if(O=u.children.length,f=O===0?null:u.children[0],O===0||u.children.every(function(F){return(F.type===P.Text||F.type===P.Raw)&&F.value===""}))T.allowEmpty?(z+=">",T.state=c.CloseTag,z+="</"+u.name+">"+this.endline(u,T,E)):(T.state=c.CloseTag,z+=T.spaceBeforeSlash+"/>"+this.endline(u,T,E));else if(T.pretty&&O===1&&(f.type===P.Text||f.type===P.Raw)&&f.value!=null)z+=">",T.state=c.InsideTag,T.suppressPrettyCount++,M=!0,z+=this.writeChildNode(f,T,E+1),T.suppressPrettyCount--,M=!1,T.state=c.CloseTag,z+="</"+u.name+">"+this.endline(u,T,E);else{if(T.dontPrettyTextNodes){for(B=u.children,x=0,C=B.length;x<C;x++)if(L=B[x],(L.type===P.Text||L.type===P.Raw)&&L.value!=null){T.suppressPrettyCount++,M=!0;break}}for(z+=">"+this.endline(u,T,E),T.state=c.InsideTag,K=u.children,b=0,I=K.length;b<I;b++)L=K[b],z+=this.writeChildNode(L,T,E+1);T.state=c.CloseTag,z+=this.indent(u,T,E)+"</"+u.name+">",M&&T.suppressPrettyCount--,z+=this.endline(u,T,E),T.state=c.None}return this.closeNode(u,T,E),z},l.prototype.writeChildNode=function(u,T,E){switch(u.type){case P.CData:return this.cdata(u,T,E);case P.Comment:return this.comment(u,T,E);case P.Element:return this.element(u,T,E);case P.Raw:return this.raw(u,T,E);case P.Text:return this.text(u,T,E);case P.ProcessingInstruction:return this.processingInstruction(u,T,E);case P.Dummy:return"";case P.Declaration:return this.declaration(u,T,E);case P.DocType:return this.docType(u,T,E);case P.AttributeDeclaration:return this.dtdAttList(u,T,E);case P.ElementDeclaration:return this.dtdElement(u,T,E);case P.EntityDeclaration:return this.dtdEntity(u,T,E);case P.NotationDeclaration:return this.dtdNotation(u,T,E);default:throw new Error("Unknown XML node type: "+u.constructor.name)}},l.prototype.processingInstruction=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<?",T.state=c.InsideTag,a+=u.target,u.value&&(a+=" "+u.value),T.state=c.CloseTag,a+=T.spaceBeforeSlash+"?>",a+=this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.raw=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E),T.state=c.InsideTag,a+=u.value,T.state=c.CloseTag,a+=this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.text=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E),T.state=c.InsideTag,a+=u.value,T.state=c.CloseTag,a+=this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.dtdAttList=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<!ATTLIST",T.state=c.InsideTag,a+=" "+u.elementName+" "+u.attributeName+" "+u.attributeType,u.defaultValueType!=="#DEFAULT"&&(a+=" "+u.defaultValueType),u.defaultValue&&(a+=' "'+u.defaultValue+'"'),T.state=c.CloseTag,a+=T.spaceBeforeSlash+">"+this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.dtdElement=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<!ELEMENT",T.state=c.InsideTag,a+=" "+u.name+" "+u.value,T.state=c.CloseTag,a+=T.spaceBeforeSlash+">"+this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.dtdEntity=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<!ENTITY",T.state=c.InsideTag,u.pe&&(a+=" %"),a+=" "+u.name,u.value?a+=' "'+u.value+'"':(u.pubID&&u.sysID?a+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.sysID&&(a+=' SYSTEM "'+u.sysID+'"'),u.nData&&(a+=" NDATA "+u.nData)),T.state=c.CloseTag,a+=T.spaceBeforeSlash+">"+this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.dtdNotation=function(u,T,E){var a;return this.openNode(u,T,E),T.state=c.OpenTag,a=this.indent(u,T,E)+"<!NOTATION",T.state=c.InsideTag,a+=" "+u.name,u.pubID&&u.sysID?a+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.pubID?a+=' PUBLIC "'+u.pubID+'"':u.sysID&&(a+=' SYSTEM "'+u.sysID+'"'),T.state=c.CloseTag,a+=T.spaceBeforeSlash+">"+this.endline(u,T,E),T.state=c.None,this.closeNode(u,T,E),a},l.prototype.openNode=function(u,T,E){},l.prototype.closeNode=function(u,T,E){},l.prototype.openAttribute=function(u,T,E){},l.prototype.closeAttribute=function(u,T,E){},l}()}).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(N,$,k){"use strict";(function(){var P,c,_,D,p,s,S,v,o,i;i=N("./Utility"),v=i.assign,o=i.isFunction,_=N("./XMLDOMImplementation"),D=N("./XMLDocument"),p=N("./XMLDocumentCB"),S=N("./XMLStringWriter"),s=N("./XMLStreamWriter"),P=N("./NodeType"),c=N("./WriterState"),$.exports.create=function(r,h,y,g){var w,m;if(r==null)throw new Error("Root element needs a name.");return g=v({},h,y,g),w=new D(g),m=w.element(r),g.headless||(w.declaration(g),(g.pubID!=null||g.sysID!=null)&&w.dtd(g)),m},$.exports.begin=function(r,h,y){var g;return o(r)&&(g=[r,h],h=g[0],y=g[1],r={}),h?new p(r,h,y):new D(r)},$.exports.stringWriter=function(r){return new S(r)},$.exports.streamWriter=function(r,h){return new s(r,h)},$.exports.implementation=new _,$.exports.nodeType=P,$.exports.writerState=c}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(N,$,k){$.exports=c;var P=Object.prototype.hasOwnProperty;function c(){for(var _={},D=0;D<arguments.length;D++){var p=arguments[D];for(var s in p)P.call(p,s)&&(_[s]=p[s])}return _}},{}],284:[function(N,$,k){"use strict";var P=N("buffer").Buffer,c=N("./sha"),_=N("./md5"),D={sha1:c,md5:_},p=64,s=P.alloc(p);s.fill(0);function S(i,r,h){P.isBuffer(r)||(r=P.from(r)),P.isBuffer(h)||(h=P.from(h)),r.length>p?r=i(r):r.length<p&&(r=P.concat([r,s],p));for(var y=P.alloc(p),g=P.alloc(p),w=0;w<p;w++)y[w]=r[w]^54,g[w]=r[w]^92;var m=i(P.concat([y,h]));return i(P.concat([g,m]))}function v(i,r){i=i||"sha1";var h=D[i],y=[],g=0;return h||o("algorithm:",i,"is not yet supported"),{update:function(m){return P.isBuffer(m)||(m=P.from(m)),y.push(m),g+=m.length,this},digest:function(m){var d=P.concat(y),n=r?S(h,r,d):h(d);return y=null,m?n.toString(m):n}}}function o(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}k.createHash=function(i){return v(i)},k.createHmac=function(i,r){return v(i,r)},k.createCredentials=function(){o("sorry,createCredentials is not implemented yet")},k.createCipher=function(){o("sorry,createCipher is not implemented yet")},k.createCipheriv=function(){o("sorry,createCipheriv is not implemented yet")},k.createDecipher=function(){o("sorry,createDecipher is not implemented yet")},k.createDecipheriv=function(){o("sorry,createDecipheriv is not implemented yet")},k.createSign=function(){o("sorry,createSign is not implemented yet")},k.createVerify=function(){o("sorry,createVerify is not implemented yet")},k.createDiffieHellman=function(){o("sorry,createDiffieHellman is not implemented yet")},k.pbkdf2=function(){o("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(N,$,k){"use strict";var P=N("buffer").Buffer,c=4,_=P.alloc(c);_.fill(0);var D=8;function p(v,o){if(v.length%c!==0){var i=v.length+(c-v.length%c);v=P.concat([v,_],i)}for(var r=[],h=o?v.readInt32BE:v.readInt32LE,y=0;y<v.length;y+=c)r.push(h.call(v,y));return r}function s(v,o,i){for(var r=P.alloc(o),h=i?r.writeInt32BE:r.writeInt32LE,y=0;y<v.length;y++)h.call(r,v[y],y*4,!0);return r}function S(v,o,i,r){P.isBuffer(v)||(v=P.from(v));var h=o(p(v,r),v.length*D);return s(h,i,r)}$.exports={hash:S}},{buffer:73}],286:[function(N,$,k){"use strict";var P=N("./helpers");function c(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function _(r,h){r[h>>5]|=128<<h%32,r[(h+64>>>9<<4)+14]=h;for(var y=1732584193,g=-271733879,w=-1732584194,m=271733878,d=0;d<r.length;d+=16){var n=y,l=g,u=w,T=m;y=p(y,g,w,m,r[d+0],7,-680876936),m=p(m,y,g,w,r[d+1],12,-389564586),w=p(w,m,y,g,r[d+2],17,606105819),g=p(g,w,m,y,r[d+3],22,-1044525330),y=p(y,g,w,m,r[d+4],7,-176418897),m=p(m,y,g,w,r[d+5],12,1200080426),w=p(w,m,y,g,r[d+6],17,-1473231341),g=p(g,w,m,y,r[d+7],22,-45705983),y=p(y,g,w,m,r[d+8],7,1770035416),m=p(m,y,g,w,r[d+9],12,-1958414417),w=p(w,m,y,g,r[d+10],17,-42063),g=p(g,w,m,y,r[d+11],22,-1990404162),y=p(y,g,w,m,r[d+12],7,1804603682),m=p(m,y,g,w,r[d+13],12,-40341101),w=p(w,m,y,g,r[d+14],17,-1502002290),g=p(g,w,m,y,r[d+15],22,1236535329),y=s(y,g,w,m,r[d+1],5,-165796510),m=s(m,y,g,w,r[d+6],9,-1069501632),w=s(w,m,y,g,r[d+11],14,643717713),g=s(g,w,m,y,r[d+0],20,-373897302),y=s(y,g,w,m,r[d+5],5,-701558691),m=s(m,y,g,w,r[d+10],9,38016083),w=s(w,m,y,g,r[d+15],14,-660478335),g=s(g,w,m,y,r[d+4],20,-405537848),y=s(y,g,w,m,r[d+9],5,568446438),m=s(m,y,g,w,r[d+14],9,-1019803690),w=s(w,m,y,g,r[d+3],14,-187363961),g=s(g,w,m,y,r[d+8],20,1163531501),y=s(y,g,w,m,r[d+13],5,-1444681467),m=s(m,y,g,w,r[d+2],9,-51403784),w=s(w,m,y,g,r[d+7],14,1735328473),g=s(g,w,m,y,r[d+12],20,-1926607734),y=S(y,g,w,m,r[d+5],4,-378558),m=S(m,y,g,w,r[d+8],11,-2022574463),w=S(w,m,y,g,r[d+11],16,1839030562),g=S(g,w,m,y,r[d+14],23,-35309556),y=S(y,g,w,m,r[d+1],4,-1530992060),m=S(m,y,g,w,r[d+4],11,1272893353),w=S(w,m,y,g,r[d+7],16,-155497632),g=S(g,w,m,y,r[d+10],23,-1094730640),y=S(y,g,w,m,r[d+13],4,681279174),m=S(m,y,g,w,r[d+0],11,-358537222),w=S(w,m,y,g,r[d+3],16,-722521979),g=S(g,w,m,y,r[d+6],23,76029189),y=S(y,g,w,m,r[d+9],4,-640364487),m=S(m,y,g,w,r[d+12],11,-421815835),w=S(w,m,y,g,r[d+15],16,530742520),g=S(g,w,m,y,r[d+2],23,-995338651),y=v(y,g,w,m,r[d+0],6,-198630844),m=v(m,y,g,w,r[d+7],10,1126891415),w=v(w,m,y,g,r[d+14],15,-1416354905),g=v(g,w,m,y,r[d+5],21,-57434055),y=v(y,g,w,m,r[d+12],6,1700485571),m=v(m,y,g,w,r[d+3],10,-1894986606),w=v(w,m,y,g,r[d+10],15,-1051523),g=v(g,w,m,y,r[d+1],21,-2054922799),y=v(y,g,w,m,r[d+8],6,1873313359),m=v(m,y,g,w,r[d+15],10,-30611744),w=v(w,m,y,g,r[d+6],15,-1560198380),g=v(g,w,m,y,r[d+13],21,1309151649),y=v(y,g,w,m,r[d+4],6,-145523070),m=v(m,y,g,w,r[d+11],10,-1120210379),w=v(w,m,y,g,r[d+2],15,718787259),g=v(g,w,m,y,r[d+9],21,-343485551),y=o(y,n),g=o(g,l),w=o(w,u),m=o(m,T)}return Array(y,g,w,m)}function D(r,h,y,g,w,m){return o(i(o(o(h,r),o(g,m)),w),y)}function p(r,h,y,g,w,m,d){return D(h&y|~h&g,r,h,w,m,d)}function s(r,h,y,g,w,m,d){return D(h&g|y&~g,r,h,w,m,d)}function S(r,h,y,g,w,m,d){return D(h^y^g,r,h,w,m,d)}function v(r,h,y,g,w,m,d){return D(y^(h|~g),r,h,w,m,d)}function o(r,h){var y=(r&65535)+(h&65535),g=(r>>16)+(h>>16)+(y>>16);return g<<16|y&65535}function i(r,h){return r<<h|r>>>32-h}$.exports=function(h){return P.hash(h,_,16)}},{"./helpers":285}],287:[function(N,$,k){"use strict";var P=N("./helpers");function c(S,v){S[v>>5]|=128<<24-v%32,S[(v+64>>9<<4)+15]=v;for(var o=Array(80),i=1732584193,r=-271733879,h=-1732584194,y=271733878,g=-1009589776,w=0;w<S.length;w+=16){for(var m=i,d=r,n=h,l=y,u=g,T=0;T<80;T++){T<16?o[T]=S[w+T]:o[T]=s(o[T-3]^o[T-8]^o[T-14]^o[T-16],1);var E=p(p(s(i,5),_(T,r,h,y)),p(p(g,o[T]),D(T)));g=y,y=h,h=s(r,30),r=i,i=E}i=p(i,m),r=p(r,d),h=p(h,n),y=p(y,l),g=p(g,u)}return Array(i,r,h,y,g)}function _(S,v,o,i){return S<20?v&o|~v&i:S<40?v^o^i:S<60?v&o|v&i|o&i:v^o^i}function D(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function p(S,v){var o=(S&65535)+(v&65535),i=(S>>16)+(v>>16)+(o>>16);return i<<16|o&65535}function s(S,v){return S<<v|S>>>32-v}$.exports=function(v){return P.hash(v,c,20,!0)}},{"./helpers":285}],288:[function(N,$,k){"use strict";$.exports=function(){return function(){}}},{}],289:[function(N,$,k){(function(P){"use strict";var c=N("babel-runtime/helpers/typeof"),_=D(c);function D(i){return i&&i.__esModule?i:{default:i}}var p=N("stream"),s=p.Stream,S=N("../lib/common/utils/isArray"),v=S.isArray;$.exports.string=function(r){return typeof r=="string"},$.exports.array=v,$.exports.buffer=P.isBuffer;function o(i){return i instanceof s}$.exports.writableStream=function(r){return o(r)&&typeof r._write=="function"&&(0,_.default)(r._writableState)==="object"}}).call(this,{isBuffer:N("../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(N,$,k){"use strict";k.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(c){return P}},k.escape=N("escape-html"),k.timestamp=function(c){if(c){var _=c;return typeof _=="string"&&(_=Number(_)),String(c).length===10&&(_*=1e3),new Date(_)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(N,$,k){(function(P,c){"use strict";var _=N("babel-runtime/core-js/json/stringify"),D=S(_),p=N("babel-runtime/helpers/typeof"),s=S(p);function S(T){return T&&T.__esModule?T:{default:T}}var v=N("util"),o=N("url"),i=N("http"),r=N("https"),h=N("debug")("urllib"),y=N("humanize-ms"),g,w=0,m=Math.pow(2,31)-10,d=/^https?:\/\//i;function n(T,E){return T===void 0?E:T}function l(T,E){return function(a,L,O){if(a)return E(a);T({data:L,status:O.statusCode,headers:O.headers,res:O})}}k.TIMEOUTS=[y("300s"),y("300s")];var u=["json","text"];k.request=function(E,a,L){return arguments.length===2&&typeof a=="function"&&(L=a,a=null),typeof L=="function"?k.requestWithCallback(E,a,L):(g||(g=N("any-promise")),new g(function(O,f){k.requestWithCallback(E,a,l(O,f))}))},k.requestWithCallback=function(E,a,L){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,s.default)(E))!=="object"){var O=v.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(O)}arguments.length===2&&typeof a=="function"&&(L=a,a=null),a=a||{},w>=m&&(w=0);var f=++w;a.requestUrls=a.requestUrls||[];var x={requestId:f,url:E,args:a,ctx:a.ctx};a.emitter&&a.emitter.emit("request",x),a.timeout=a.timeout||k.TIMEOUTS,a.maxRedirects=a.maxRedirects||10,a.streaming=a.streaming||a.customResponse;var b=Date.now(),C;typeof E=="string"?(d.test(E)||(E="http://"+E),C=o.parse(E)):C=E;var I=(a.type||a.method||C.method||"GET").toUpperCase(),j=C.port||80,M=i,z=n(a.agent,k.agent),G=a.fixJSONCtlChars;C.protocol==="https:"&&(M=r,z=n(a.httpsAgent,k.httpsAgent),C.port||(j=443));var B={host:C.hostname||C.host||"localhost",path:C.path||"/",method:I,port:j,agent:z,headers:a.headers||{},lookup:a.lookup};Array.isArray(a.timeout)?B.requestTimeout=a.timeout[a.timeout.length-1]:typeof a.timeout!="undefined"&&(B.requestTimeout=a.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],F=0;F<K.length;F++){var H=K[F];a.hasOwnProperty(H)&&(B[H]=a[H])}B.rejectUnauthorized===!1&&!B.hasOwnProperty("secureOptions")&&(B.secureOptions=N("constants").SSL_OP_NO_TLSv1_2);var W=a.auth||C.auth;W&&(B.auth=W);var Q=a.content||a.data,ee=I==="GET"||I==="HEAD"||a.dataAsQueryString;if(!a.content&&(Q&&!(typeof Q=="string"||c.isBuffer(Q))))if(ee)Q=a.nestedQuerystring?qs.stringify(Q):querystring.stringify(Q);else{var q=B.headers["Content-Type"]||B.headers["content-type"];q||(a.contentType==="json"?q="application/json":q="application/x-www-form-urlencoded",B.headers["Content-Type"]=q),parseContentType(q).type==="application/json"?Q=(0,D.default)(Q):Q=a.nestedQuerystring?qs.stringify(Q):querystring.stringify(Q)}ee&&Q&&(B.path+=(C.query?"&":"?")+Q,Q=null);var pe=0;if(Q){var ye=Q.length;c.isBuffer(Q)||(ye=c.byteLength(Q)),pe=B.headers["Content-Length"]=ye}a.dataType==="json"&&(B.headers.Accept="application/json"),typeof a.beforeRequest=="function"&&a.beforeRequest(B);var ie=null,Se=null,ge=null,oe=!1,le=!1,te=0,be=-1,Z=!1,ae="",Ee="",ne=null;a.timing&&(ne={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function J(){ie&&(clearTimeout(ie),ie=null)}function X(){Se&&(clearTimeout(Se),Se=null)}function Y(Ce,Xe,et){if(X(),!L){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),f,P.pid,B.method,E),Ce&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),f,P.pid,Ce.name,Ce.message,Ce.stack);return}var Ue=L;L=null;var Ve={};if(et&&(be=et.statusCode,Ve=et.headers),be===401&&Ve["www-authenticate"]&&(!a.headers||!a.headers.Authorization)&&a.digestAuth){var Pe=Ve["www-authenticate"];if(Pe.indexOf("Digest ")>=0)return h("Request#%d %s: got digest auth header WWW-Authenticate: %s",f,E,Pe),a.headers=a.headers||{},a.headers.Authorization=digestAuthHeader(B.method,B.path,Pe,a.digestAuth),h("Request#%d %s: auth with digest header: %s",f,E,a.headers.Authorization),et.headers["set-cookie"]&&(a.headers.Cookie=et.headers["set-cookie"].join(";")),k.requestWithCallback(E,a,Ue)}var we=Date.now()-b;ne&&(ne.contentDownload=we),h("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",we,te,be,B.method,B.host,B.path,le,ne);var Ae={status:be,statusCode:be,headers:Ve,size:te,aborted:Z,rt:we,keepAliveSocket:le,data:Xe,requestUrls:a.requestUrls,timing:ne,remoteAddress:ae,remotePort:Ee};if(Ce){var ce="";z&&typeof z.getCurrentStatus=="function"&&(ce=", agent status: "+(0,D.default)(z.getCurrentStatus())),Ce.message+=", "+B.method+" "+E+" "+be+" (connected: "+oe+", keepalive socket: "+le+ce+`)
|
|
|
headers: `+(0,D.default)(Ve),Ce.data=Xe,Ce.path=B.path,Ce.status=be,Ce.headers=Ve,Ce.res=Ae}Ue(Ce,Xe,a.streaming?et:Ae),a.emitter&&(x.url=E,x.socket=nt&&nt.connection,x.options=B,x.size=pe,a.emitter.emit("response",{requestId:f,error:Ce,ctx:a.ctx,req:x,res:Ae}))}function he(Ce){var Xe=null;if(a.followRedirect&&statuses.redirect[Ce.statusCode]){a._followRedirectCount=(a._followRedirectCount||0)+1;var et=Ce.headers.location;if(!et)Xe=new Error("Got statusCode "+Ce.statusCode+" but cannot resolve next location from headers"),Xe.name="FollowRedirectError";else if(a._followRedirectCount>a.maxRedirects)Xe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),Xe.name="MaxRedirectError";else{var Ue=a.formatRedirectUrl?a.formatRedirectUrl(E,et):o.resolve(E,et);h("Request#%d %s: `redirected` from %s to %s",f,B.path,E,Ue),X(),a.headers&&a.headers.Host&&d.test(et)&&(a.headers.Host=null);var Ve=L;return L=null,k.requestWithCallback(Ue,a,Ve),{redirect:!0,error:null}}}return{redirect:!1,error:Xe}}!B.headers["User-Agent"]&&!B.headers["user-agent"]&&(B.headers["User-Agent"]=navigator.userAgent),a.gzip&&(!B.headers["Accept-Encoding"]&&!B.headers["accept-encoding"]&&(B.headers["Accept-Encoding"]="gzip"));function de(Ce,Xe,et){var Ue=Ce.headers["content-encoding"];return et(null,Xe,Ue)}var Te=a.writeStream;h("Request#%d %s %s with headers %j, options.path: %s",f,I,E,B.headers,B.path),a.requestUrls.push(E);function ze(Ce){if(ne&&(ne.waiting=Date.now()-b),h("Request#%d %s `req response` event emit: status %d, headers: %j",f,E,Ce.statusCode,Ce.headers),a.streaming){var Xe=he(Ce);if(Xe.redirect){Ce.resume();return}return Xe.error?(Ce.resume(),Y(Xe.error,null,Ce)):Y(null,null,Ce)}if(Ce.on("close",function(){h("Request#%d %s: `res close` event emit, total size %d",f,E,te)}),Ce.on("error",function(){h("Request#%d %s: `res error` event emit, total size %d",f,E,te)}),Ce.on("aborted",function(){Z=!0,h("Request#%d %s: `res aborted` event emit, total size %d",f,E,te)}),Te){var Xe=he(Ce);if(Xe.redirect){Ce.resume();return}return Xe.error?(Ce.resume(),Te.end(),Y(Xe.error,null,Ce)):(a.consumeWriteStream===!1?Ce.on("end",Y.bind(null,null,null,Ce)):isNode010||isNode012?first([[Te,"close"],[Ce,"aborted"]],function(Ve,Pe,we){h("Request#%d %s: writeStream or res %s event emitted",f,E,we),Y(ge||null,null,Ce)}):Te.on("close",function(){h("Request#%d %s: writeStream close event emitted",f,E),Y(ge||null,null,Ce)}),Ce.pipe(Te))}var et=[];Ce.on("data",function(Ue){h("Request#%d %s: `res data` event emit, size %d",f,E,Ue.length),te+=Ue.length,et.push(Ue)}),Ce.on("end",function(){var Ue=c.concat(et,te);if(h("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",f,E,te,Ce._dumped),ge)return Y(ge,Ue,Ce);var Ve=he(Ce);if(Ve.error)return Y(Ve.error,Ue,Ce);if(Ve.redirect)return;de(Ce,Ue,function(Pe,we,Ae){if(Pe)return Y(Pe,Ue,Ce);if(!Ae&&u.indexOf(a.dataType)>=0){try{we=decodeBodyByCharset(we,Ce)}catch(xe){return h("decodeBodyByCharset error: %s",xe),Y(null,we,Ce)}if(a.dataType==="json")if(te===0)we=null;else{var ce=parseJSON(we,G);ce.error?Pe=ce.error:we=ce.data}}Z&&h("Request#%d %s: Remote socket was terminated before `response.end()` was called",f,E),Y(Pe,we,Ce)})})}var Ze,Je;Array.isArray(a.timeout)?(Ze=y(a.timeout[0]),Je=y(a.timeout[1])):Ze=Je=y(a.timeout),h("ConnectTimeout: %d, ResponseTimeout: %d",Ze,Je);function $e(){h("Connect timer ticking, timeout: %d",Ze),ie=setTimeout(function(){ie=null,be===-1&&(be=-2);var Ce="Connect timeout for "+Ze+"ms",Xe="ConnectionTimeoutError";nt.socket||(Xe="SocketAssignTimeoutError",Ce+=", working sockets is full"),ge=new Error(Ce),ge.name=Xe,ge.requestId=f,h("ConnectTimeout: Request#%d %s %s: %s, connected: %s",f,E,ge.name,Ce,oe),Me()},Ze)}function tt(){h("Response timer ticking, timeout: %d",Je),Se=setTimeout(function(){Se=null;var Ce="Response timeout for "+Je+"ms",Xe="ResponseTimeoutError";ge=new Error(Ce),ge.name=Xe,ge.requestId=f,h("ResponseTimeout: Request#%d %s %s: %s, connected: %s",f,E,ge.name,Ce,oe),Me()},Je)}var nt;B.mode=a.mode?a.mode:"";try{nt=M.request(B,ze)}catch(Ce){return Y(Ce)}typeof window=="undefined"?$e():nt.on("requestTimeout",function(){be===-1&&(be=-2);var Ce="Connect timeout for "+Ze+"ms",Xe="ConnectionTimeoutError";ge=new Error(Ce),ge.name=Xe,ge.requestId=f,Me()});function Me(){h("Request#%d %s abort, connected: %s",f,E,oe),nt.socket||(ge.noSocket=!0,Y(ge)),nt.abort()}return ne&&nt.on("finish",function(){ne.requestSent=Date.now()-b}),nt.once("socket",function(Ce){ne&&(ne.queuing=Date.now()-b),isNode010&&Ce.socket&&(Ce=Ce.socket);var Xe=Ce.readyState;if(Xe==="opening"){Ce.once("lookup",function(et,Ue,Ve){h("Request#%d %s lookup: %s, %s, %s",f,E,et,Ue,Ve),ne&&(ne.dnslookup=Date.now()-b),Ue&&(ae=Ue)}),Ce.once("connect",function(){ne&&(ne.connected=Date.now()-b),J(),tt(),h("Request#%d %s new socket connected",f,E),oe=!0,ae||(ae=Ce.remoteAddress),Ee=Ce.remotePort});return}h("Request#%d %s reuse socket connected, readyState: %s",f,E,Xe),oe=!0,le=!0,ae||(ae=Ce.remoteAddress),Ee=Ce.remotePort,J(),tt()}),nt.on("error",function(Ce){(Ce.name==="Error"||Ce.name==="TypeError")&&(Ce.name=oe?"ResponseError":"RequestError"),Ce.message+=' (req "error")',h("Request#%d %s `req error` event emit, %s: %s",f,E,Ce.name,Ce.message),Y(ge||Ce)}),Te&&Te.once("error",function(Ce){Ce.message+=' (writeStream "error")',ge=Ce,h("Request#%d %s `writeStream error` event emit, %s: %s",f,E,Ce.name,Ce.message),Me()}),a.stream?(a.stream.pipe(nt),a.stream.once("error",function(Ce){Ce.message+=' (stream "error")',ge=Ce,h("Request#%d %s `readStream error` event emit, %s: %s",f,E,Ce.name,Ce.message),Me()})):nt.end(Q),nt.requestId=f,nt}}).call(this,N("_process"),N("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(N,$,k){"use strict";k.d($,"a",function(){return v});var P=k("cDcd"),c=k("biw7"),_=k("fyJ8");function D(o){var i=o.className,r=o.index,h=o.children,y=o.colSpan,g=o.rowSpan,w=P.useContext(c.a),m=w.prefixCls,d=w.fixedInfoList,n=d[r];return P.createElement(_.a,Object.assign({className:i,index:r,component:"td",prefixCls:m,record:null,dataIndex:null,render:function(){return{children:h,props:{colSpan:y,rowSpan:g}}}},n))}function p(o){return P.createElement("tr",Object.assign({},o))}function s(o){var i=o.children,r=P.useContext(c.a),h=r.prefixCls;return P.createElement("tfoot",{className:"".concat(h,"-summary")},i)}var S=$.b=s,v={Cell:D,Row:p}},nj2k:function(N,$,k){N.exports=k.p+"static/nodata.c3b0b86c.svg"},oRuE:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(c,_){var D=_*4,p=D-c.sigBytes%D;c.concat(P.lib.WordArray.random(p-1)).concat(P.lib.WordArray.create([p<<24],1))},unpad:function(c){var _=c.words[c.sigBytes-1>>>2]&255;c.sigBytes-=_}},P.pad.Iso10126})},osHv:function(N,$,k){(function(P){P(k("VrN/"))})(function(P){"use strict";var c=P.Pos;function _(d,n){return d.line-n.line||d.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",p=D+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s=new RegExp("<(/?)(["+D+"]["+p+"]*)","g");function S(d,n,l,u){this.line=n,this.ch=l,this.cm=d,this.text=d.getLine(n),this.min=u?Math.max(u.from,d.firstLine()):d.firstLine(),this.max=u?Math.min(u.to-1,d.lastLine()):d.lastLine()}function v(d,n){var l=d.cm.getTokenTypeAt(c(d.line,n));return l&&/\btag\b/.test(l)}function o(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function i(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function r(d){for(;;){var n=d.text.indexOf(">",d.ch);if(n==-1){if(o(d))continue;return}if(!v(d,n+1)){d.ch=n+1;continue}var l=d.text.lastIndexOf("/",n),u=l>-1&&!/\S/.test(d.text.slice(l+1,n));return d.ch=n+1,u?"selfClose":"regular"}}function h(d){for(;;){var n=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(n==-1){if(i(d))continue;return}if(!v(d,n+1)){d.ch=n;continue}s.lastIndex=n,d.ch=n;var l=s.exec(d.text);if(l&&l.index==n)return l}}function y(d){for(;;){s.lastIndex=d.ch;var n=s.exec(d.text);if(!n){if(o(d))continue;return}if(!v(d,n.index+1)){d.ch=n.index+1;continue}return d.ch=n.index+n[0].length,n}}function g(d){for(;;){var n=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(n==-1){if(i(d))continue;return}if(!v(d,n+1)){d.ch=n;continue}var l=d.text.lastIndexOf("/",n),u=l>-1&&!/\S/.test(d.text.slice(l+1,n));return d.ch=n+1,u?"selfClose":"regular"}}function w(d,n){for(var l=[];;){var u=y(d),T,E=d.line,a=d.ch-(u?u[0].length:0);if(!u||!(T=r(d)))return;if(T=="selfClose")continue;if(u[1]){for(var L=l.length-1;L>=0;--L)if(l[L]==u[2]){l.length=L;break}if(L<0&&(!n||n==u[2]))return{tag:u[2],from:c(E,a),to:c(d.line,d.ch)}}else l.push(u[2])}}function m(d,n){for(var l=[];;){var u=g(d);if(!u)return;if(u=="selfClose"){h(d);continue}var T=d.line,E=d.ch,a=h(d);if(!a)return;if(a[1])l.push(a[2]);else{for(var L=l.length-1;L>=0;--L)if(l[L]==a[2]){l.length=L;break}if(L<0&&(!n||n==a[2]))return{tag:a[2],from:c(d.line,d.ch),to:c(T,E)}}}}P.registerHelper("fold","xml",function(d,n){for(var l=new S(d,n.line,0);;){var u=y(l);if(!u||l.line!=n.line)return;var T=r(l);if(!T)return;if(!u[1]&&T!="selfClose"){var E=c(l.line,l.ch),a=w(l,u[2]);return a&&_(a.from,E)>0?{from:E,to:a.from}:null}}}),P.findMatchingTag=function(d,n,l){var u=new S(d,n.line,n.ch,l);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var T=r(u),E=T&&c(u.line,u.ch),a=T&&h(u);if(!T||!a||_(u,n)>0)return;var L={from:c(u.line,u.ch),to:E,tag:a[2]};return T=="selfClose"?{open:L,close:null,at:"open"}:a[1]?{open:m(u,a[2]),close:L,at:"close"}:(u=new S(d,E.line,E.ch,l),{open:L,close:w(u,a[2]),at:"open"})},P.findEnclosingTag=function(d,n,l,u){for(var T=new S(d,n.line,n.ch,l);;){var E=m(T,u);if(!E)break;var a=new S(d,n.line,n.ch,l),L=w(a,E.tag);if(L)return{open:E,close:L}}},P.scanForClosingTag=function(d,n,l,u){var T=new S(d,n.line,n.ch,u?{from:0,to:u}:null);return w(T,l)}})},p5ED:function(N,$,k){"use strict";var P=k("+L6B"),c=k("2/Rp"),_=k("5Dmo"),D=k("3S7+"),p=k("k1fw"),s=k("tJVT"),S=k("cDcd"),v=k.n(S),o=k("vHTk"),i=k.n(o),r=k("yEEn"),h=k("ZW9T"),y=k("1vsH");$.a=function(g){var w=g.name,m=g.data,d=g.theme,n=g.type,l=g.filename,u=g.monacoEditor,T=g.className,E=g.style,a=g.close,L=g.onClose,O=g.hasMask,f=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(s.a)(f,2),b=x[0],C=x[1],I=Object(S.useState)(""),j=Object(s.a)(I,2),M=j[0],z=j[1],G,B=1024*1024,K=10*B,F=Object(S.useRef)();n==="office"&&(G=Object(y.V)(m).filesize,G>K&&(n="other")),l&&(u.filename=l),Object(S.useEffect)(function(){var Q,ee,q=(Q=document.cookie)===null||Q===void 0||((ee=Q.replace(/\s/g,""))===null||ee===void 0)?void 0:ee.split(";");q==null||q.map(function(pe){var ye=pe.split("=");ye[0]==="_educoder_session"&&z(ye[1])})},[]);var H=function(){if(m.startsWith("http")||m.startsWith("blob:")){W();return}Object(y.z)(l||"educoder",m,l)},W=function(){Object(y.x)(l||"educoder",decodeURIComponent(m))};return console.log("data:",m,"fileanme:",l," name:",w),v.a.createElement("div",{style:Object(p.a)({},E||{}),className:"".concat(O&&i.a.bgBlack," ").concat(n?i.a.wrp:"hide")},a&&v.a.createElement("div",{className:i.a.close,ref:F},v.a.createElement(D.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},v.a.createElement("span",{onClick:W},v.a.createElement("i",{className:"icon-quxiaozhiding"}))),v.a.createElement(D.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},v.a.createElement("span",{className:"",onClick:L},v.a.createElement("i",{className:"icon-guanbi1"})))),v.a.createElement("div",{className:"".concat(i.a[T]," ").concat(T," ").concat(i.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&v.a.createElement(h.b,u)),n==="audio"&&v.a.createElement("audio",{src:"".concat(m!=null&&m.startsWith("/")||(m==null?void 0:m.indexOf("https://"))>-1?m:"data:audio/mp3;base64,").concat(m),autoPlay:!0}),n==="video"&&v.a.createElement(v.a.Fragment,null,m!=null&&m.startsWith("/")?v.a.createElement("video",{controls:!0,src:"".concat(m),autoPlay:!0}):v.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(m),autoPlay:!0})),n==="html"&&v.a.createElement("iframe",{src:m+"&disposition=inline"}),n==="html"&&v.a.createElement("iframe",{src:m+"&disposition=inline"}),n==="pdf"&&v.a.createElement("embed",{className:i.a.embed,src:m}),n==="image"&&v.a.createElement(v.a.Fragment,null,v.a.createElement("img",{src:"".concat(m!=null&&m.startsWith("/")||(m==null?void 0:m.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(m)})),n==="other"&&v.a.createElement("div",null,v.a.createElement(c.a,{type:"primary",size:"large",onClick:H},v.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&v.a.createElement(c.a,{type:"primary",size:"large",onClick:H},v.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(N,$,k){},pA7S:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.WordArray,p=_.BlockCipher,s=c.algo,S=[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],v=[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],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],i=[{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}],r=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=s.DES=p.extend({_doReset:function(){for(var m=this._key,d=m.words,n=[],l=0;l<56;l++){var u=S[l]-1;n[l]=d[u>>>5]>>>31-u%32&1}for(var T=this._subKeys=[],E=0;E<16;E++){for(var a=T[E]=[],L=o[E],l=0;l<24;l++)a[l/6|0]|=n[(v[l]-1+L)%28]<<31-l%6,a[4+(l/6|0)]|=n[28+(v[l+24]-1+L)%28]<<31-l%6;a[0]=a[0]<<1|a[0]>>>31;for(var l=1;l<7;l++)a[l]=a[l]>>>(l-1)*4+3;a[7]=a[7]<<5|a[7]>>>27}for(var O=this._invSubKeys=[],l=0;l<16;l++)O[l]=T[15-l]},encryptBlock:function(m,d){this._doCryptBlock(m,d,this._subKeys)},decryptBlock:function(m,d){this._doCryptBlock(m,d,this._invSubKeys)},_doCryptBlock:function(m,d,n){this._lBlock=m[d],this._rBlock=m[d+1],y.call(this,4,252645135),y.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),y.call(this,1,1431655765);for(var l=0;l<16;l++){for(var u=n[l],T=this._lBlock,E=this._rBlock,a=0,L=0;L<8;L++)a|=i[L][((E^u[L])&r[L])>>>0];this._lBlock=E,this._rBlock=T^a}var O=this._lBlock;this._lBlock=this._rBlock,this._rBlock=O,y.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),m[d]=this._lBlock,m[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(m,d){var n=(this._lBlock>>>m^this._rBlock)&d;this._rBlock^=n,this._lBlock^=n<<m}function g(m,d){var n=(this._rBlock>>>m^this._lBlock)&d;this._lBlock^=n,this._rBlock^=n<<m}c.DES=p._createHelper(h);var w=s.TripleDES=p.extend({_doReset:function(){var m=this._key,d=m.words;if(d.length!==2&&d.length!==4&&d.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=d.slice(0,2),l=d.length<4?d.slice(0,2):d.slice(2,4),u=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=h.createEncryptor(D.create(n)),this._des2=h.createEncryptor(D.create(l)),this._des3=h.createEncryptor(D.create(u))},encryptBlock:function(m,d){this._des1.encryptBlock(m,d),this._des2.decryptBlock(m,d),this._des3.encryptBlock(m,d)},decryptBlock:function(m,d){this._des3.decryptBlock(m,d),this._des2.encryptBlock(m,d),this._des1.decryptBlock(m,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});c.TripleDES=p._createHelper(w)}(),P.TripleDES})},qBft:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(c,_){var D=c.sigBytes,p=_*4,s=p-D%p,S=D+s-1;c.clamp(),c.words[S>>>2]|=s<<24-S%4*8,c.sigBytes+=s},unpad:function(c){var _=c.words[c.sigBytes-1>>>2]&255;c.sigBytes-=_}},P.pad.Ansix923})},qM6L:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.WordArray,p=c.enc,s=p.Utf16=p.Utf16BE={stringify:function(v){for(var o=v.words,i=v.sigBytes,r=[],h=0;h<i;h+=2){var y=o[h>>>2]>>>16-h%4*8&65535;r.push(String.fromCharCode(y))}return r.join("")},parse:function(v){for(var o=v.length,i=[],r=0;r<o;r++)i[r>>>1]|=v.charCodeAt(r)<<16-r%2*16;return D.create(i,o*2)}};p.Utf16LE={stringify:function(v){for(var o=v.words,i=v.sigBytes,r=[],h=0;h<i;h+=2){var y=S(o[h>>>2]>>>16-h%4*8&65535);r.push(String.fromCharCode(y))}return r.join("")},parse:function(v){for(var o=v.length,i=[],r=0;r<o;r++)i[r>>>1]|=S(v.charCodeAt(r)<<16-r%2*16);return D.create(i,o*2)}};function S(v){return v<<8&4278255360|v>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return P.mode.CTRGladman=function(){var c=P.lib.BlockCipherMode.extend();function _(s){if((s>>24&255)===255){var S=s>>16&255,v=s>>8&255,o=s&255;S===255?(S=0,v===255?(v=0,o===255?o=0:++o):++v):++S,s=0,s+=S<<16,s+=v<<8,s+=o}else s+=1<<24;return s}function D(s){return(s[0]=_(s[0]))===0&&(s[1]=_(s[1])),s}var p=c.Encryptor=c.extend({processBlock:function(s,S){var v=this._cipher,o=v.blockSize,i=this._iv,r=this._counter;i&&(r=this._counter=i.slice(0),this._iv=void 0),D(r);var h=r.slice(0);v.encryptBlock(h,0);for(var y=0;y<o;y++)s[S+y]^=h[y]}});return c.Decryptor=p,c}(),P.mode.CTRGladman})},"rAM+":function(N,$,k){"use strict";k.d($,"a",function(){return c});var P=k("Qw5x");function c(_,D){var p;if(typeof Symbol=="undefined"||_[Symbol.iterator]==null){if(Array.isArray(_)||(p=Object(P.a)(_))||D&&_&&typeof _.length=="number"){p&&(_=p);var s=0,S=function(){};return{s:S,n:function(){return s>=_.length?{done:!0}:{done:!1,value:_[s++]}},e:function(h){throw h},f:S}}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 v=!0,o=!1,i;return{s:function(){p=_[Symbol.iterator]()},n:function(){var h=p.next();return v=h.done,h},e:function(h){o=!0,i=h},f:function(){try{!v&&p.return!=null&&p.return()}finally{if(o)throw i}}}}},rUJ1:function(N,$){const k=/[&<>"']/,P=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,_=/[<>"']|&(?!#?\w+;)/g,D={"&":"&","<":"<",">":">",'"':""","'":"'"},p=O=>D[O];function s(O,f){if(f){if(k.test(O))return O.replace(P,p)}else if(c.test(O))return O.replace(_,p);return O}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(O){return O.replace(S,(f,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const o=/(^|[^\[])\^/g;function i(O,f){O=O.source||O,f=f||"";const x={replace:(b,C)=>(C=C.source||C,C=C.replace(o,"$1"),O=O.replace(b,C),x),getRegex:()=>new RegExp(O,f)};return x}const r=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(O,f,x){if(O){let b;try{b=decodeURIComponent(v(x)).replace(r,"").toLowerCase()}catch(C){return null}if(b.indexOf("javascript:")===0||b.indexOf("vbscript:")===0||b.indexOf("data:")===0)return null}f&&!h.test(x)&&(x=n(f,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(b){return null}return x}const g={},w=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(O,f){g[" "+O]||(w.test(O)?g[" "+O]=O+"/":g[" "+O]=E(O,"/",!0)),O=g[" "+O];const x=O.indexOf(":")===-1;return f.substring(0,2)==="//"?x?f:O.replace(m,"$1")+f:f.charAt(0)==="/"?x?f:O.replace(d,"$1")+f:O+f}const l={exec:function(){}};function u(O){let f=1,x,b;for(;f<arguments.length;f++){x=arguments[f];for(b in x)Object.prototype.hasOwnProperty.call(x,b)&&(O[b]=x[b])}return O}function T(O,f){const x=O.replace(/\|/g,(I,j,M)=>{let z=!1,G=j;for(;--G>=0&&M[G]==="\\";)z=!z;return z?"|":" |"}),b=x.split(/ \|/);let C=0;if(b.length>f)b.splice(f);else for(;b.length<f;)b.push("");for(;C<b.length;C++)b[C]=b[C].trim().replace(/\\\|/g,"|");return b}function E(O,f,x){const b=O.length;if(b===0)return"";let C=0;for(;C<b;){const I=O.charAt(b-C-1);if(I===f&&!x)C++;else if(I!==f&&x)C++;else break}return O.substr(0,b-C)}function a(O,f){if(O.indexOf(f[1])===-1)return-1;const x=O.length;let b=0,C=0;for(;C<x;C++)if(O[C]==="\\")C++;else if(O[C]===f[0])b++;else if(O[C]===f[1]&&(b--,b<0))return C;return-1}function L(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")}N.exports={escape:s,unescape:v,edit:i,cleanUrl:y,resolveUrl:n,noopTest:l,merge:u,splitCells:T,rtrim:E,findClosingBracket:a,checkSanitizeDeprecation:L}},rWjI:function(N,$,k){"use strict";k.r($),k.d($,"Types",function(){return Bt});var P=k("P2fV"),c=k("NJEC"),_=k("CiB2"),D=k("DYRE"),p=k("zeV3"),s=k("sRBo"),S=k("kaz8"),v=k("7Kak"),o=k("9yH6"),i=k("giR+"),r=k("fyUT"),h=k("OaEy"),y=k("2fM7"),g=k("oBTY"),w=k("rAM+"),m=k("T2oS"),d=k("W9HT"),n=k("g9YV"),l=k("wCAj"),u=k("+L6B"),T=k("2/Rp"),E=k("14J3"),a=k("BMrR"),L=k("jCWc"),O=k("kPKH"),f=k("miYZ"),x=k("tsqr"),b=k("9og8"),C=k("y8nQ"),I=k("Vl3Y"),j=k("tJVT"),M=k("k1fw"),z=k("fu2T"),G=k("gK9i"),B=k("2qtc"),K=k("kLXV"),F=k("5NDa"),H=k("5rEg"),W=k("WmNS"),Q=k.n(W),ee=k("cDcd"),q=k.n(ee),pe=k("eRFJ"),ye=k.n(pe),ie=k("jrin"),Se,ge=y.a.Option,oe;(function(vt){vt[vt.language=0]="language",vt[vt.difficulty=1]="difficulty",vt[vt.category=2]="category",vt[vt.openOrNot=3]="openOrNot"})(oe||(oe={}));var le=(Se={},Object(ie.a)(Se,oe.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(ie.a)(Se,oe.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(ie.a)(Se,oe.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(ie.a)(Se,oe.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),Se);function te(vt){return le[vt].map(function(Ct){return q.a.createElement(ge,{key:Ct.title,value:Ct.key}," ",Ct.title," ")})}function be(vt,Ct){vt.map(function(mt){var mr=mt.id,wr=mt.name,It=mt.sub_disciplines,_t={value:mr,label:wr};Ct.push(_t),It&&It.length>0&&(_t.children=[],be(It,_t.children))})}function Z(vt,Ct){for(var mt=[],mr=0;mr<vt.length;mr++){var wr,It=vt[mr];if(((wr=It.sub_disciplines)===null||wr===void 0?void 0:wr.length)>0){mt[0]=It.id;for(var _t=0;_t<It.sub_disciplines.length;_t++){var vr=It.sub_disciplines[_t];if(vr.id===Ct)return mt[1]=vr.id,[mt,vr.tag_disciplines||vr.sub_disciplines||[]]}}}return[mt,[]]}var ae=k("Ty5D"),Ee=k("9kvl"),ne=k("J66h"),J=k("GIiI"),X=k("2BaD"),Y=k("Ot1p"),he=k("ErOA");function de(vt){return Object(he.f)("practices.json",vt)}function Te(){return Object(he.c)("problems/new.json")}function ze(vt){return Object(he.c)("practices/".concat(vt,"/edit.json"))}function Ze(vt,Ct){return Object(he.g)("practices/".concat(vt),Ct)}function Je(vt,Ct){return Object(he.f)("exercises/".concat(vt,"/exercise_questions.json"),Ct)}function $e(vt,Ct){return Object(he.g)("exercise_questions/".concat(vt,".json"),Ct)}var tt=k("cDPC"),nt=k("bbsP"),Me=k("/wGt"),Ce=k("0Owb"),Xe=k("ZW9T"),et=k("ZD9Y"),Ue=k("M8RZ"),Ve=k("bCnd"),Pe=k("1T2W"),we=k.n(Pe),Ae={theme:Object(Ve.a)("cmCodeMode","vs-dark"),fontSize:Object(Ve.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Ve.a)("cmTabToSpace",!0)},ce;(function(vt){vt[vt.set_font_size=0]="set_font_size",vt[vt.set_theme=1]="set_theme",vt[vt.on_tab_to_space=2]="on_tab_to_space",vt[vt.set_show_editor_setting=3]="set_show_editor_setting"})(ce||(ce={}));function xe(vt,Ct){switch(Ct.type){case ce.set_show_editor_setting:return Object(M.a)(Object(M.a)({},vt),{},{showEditorSetting:Ct.payload});case ce.set_theme:return Object(M.a)(Object(M.a)({},vt),{},{theme:Ct.payload});case ce.set_font_size:return Object(M.a)(Object(M.a)({},vt),{},{fontSize:Ct.payload});case ce.on_tab_to_space:return Object(M.a)(Object(M.a)({},vt),{},{tabToSpace:Ct.payload});default:throw new Error}}var _e=function(vt){var Ct=vt.value,mt=vt.onChange,mr=vt.language,wr=vt.onLanguage,It=vt.languageItems,_t=vt.ActionBarRender,vr=_t===void 0?function(Lr){return q.a.createElement(Le,{languageItems:It,onLanguage:wr,language:mr,onShowCodeSetting:Lr})}:_t,un=Object(ee.useReducer)(xe,Ae),jr=Object(j.a)(un,2),ct=jr[0],Dt=jr[1],Yr=ct.theme,nn=ct.fontSize,An=ct.showEditorSetting,fn=ct.tabToSpace;console.log(Ct,mr,"value");var Hr={onFontSizeChange:function(fr){Dt({type:ce.set_font_size,payload:fr}),Object(Ve.b)("cmFontSize",fr)},tabToSpace:fn,cmFontSize:nn,className:"oj",cmCodeMode:Yr,onTabToSpace:function(fr){Dt({type:ce.on_tab_to_space,payload:fr}),Object(Ve.b)("cmTabToSpace",fr)},onCodeModeChange:function(fr){Dt({type:ce.set_theme,payload:fr}),Object(Ve.b)("cmCodeMode",fr)}};function Ot(){Dt({type:ce.set_show_editor_setting,payload:!1})}function cn(){Dt({type:ce.set_show_editor_setting,payload:!0})}var ut={value:Ct,language:mr,onChange:mt,theme:Yr,height:"calc(100% - 56px)",options:{fontSize:nn,insertSpaces:fn}};return q.a.createElement(ee.Fragment,null,q.a.createElement("div",{className:we.a["code-panel-container"]},vr(cn),q.a.createElement(Xe.b,Object(Ce.a)({key:mr},ut))),q.a.createElement(Ue.a,null,q.a.createElement(Me.a,{className:"oj",title:null,placement:"right",closable:!1,visible:An,onClose:Ot},q.a.createElement(et.a,Hr))))};function Le(vt){var Ct=vt.languageItems,mt=vt.language,mr=vt.onShowCodeSetting,wr=vt.onLanguage;return q.a.createElement("div",{className:we.a["action-oj-bar"]},Ct==null?void 0:Ct.map(function(It){return q.a.createElement("div",{className:mt===(It==null?void 0:It.language)?we.a.active:"",onClick:function(){return wr(It==null?void 0:It.language)},key:It==null?void 0:It.language},It==null?void 0:It.language)}),q.a.createElement("a",{onClick:mr},q.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Re=k("Znn+"),Ge=k("ZTPi"),Ye=k("L9qf"),at=k.n(Ye),it=function(Ct){var mt=Ct.visible,mr=Ct.onOK,wr=Ct.onCancel,It=Object(ee.useState)(!1),_t=Object(j.a)(It,2),vr=_t[0],un=_t[1],jr=Object(ee.useState)(!1),ct=Object(j.a)(jr,2),Dt=ct[0],Yr=ct[1],nn=Object(ee.useState)("1"),An=Object(j.a)(nn,2),fn=An[0],Hr=An[1],Ot=Object(ee.useState)(""),cn=Object(j.a)(Ot,2),ut=cn[0],Lr=cn[1],fr=Object(ee.useState)([]),ea=Object(j.a)(fr,2),Sn=ea[0],bn=ea[1],da=function(){var Br=Object(b.a)(Q.a.mark(function ar(){var en;return Q.a.wrap(function(Ft){for(;;)switch(Ft.prev=Ft.next){case 0:if(ut){Ft.next=3;break}return x.b.warn("\u9898\u76EE".concat(hn,"\u4E0D\u80FD\u4E3A\u7A7A")),Ft.abrupt("return");case 3:return Yr(!0),Ft.next=6,Object(he.a)("/api/tag_disciplines.json",{method:"post",body:{target:mt,name:ut}});case 6:if(en=Ft.sent,!((en==null?void 0:en.status)===0)){Ft.next=10;break}return mr(),Ft.abrupt("return");case 10:Yr(!1);case 11:case"end":return Ft.stop()}},ar)}));return function(){return Br.apply(this,arguments)}}(),ta=function(){var Br=Object(b.a)(Q.a.mark(function ar(){var en,$t,Ft=arguments;return Q.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return en=Ft.length>0&&Ft[0]!==void 0?Ft[0]:"",un(!0),Tr.next=4,Object(he.a)("/api/tag_disciplines.json",{method:"get",params:{target:mt,search:en}});case 4:$t=Tr.sent,bn($t.tag_disciplines||[]),un(!1);case 7:case"end":return Tr.stop()}},ar)}));return function(){return Br.apply(this,arguments)}}(),an=function(ar){var en=ar.name;K.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:q.a.createElement("div",null,q.a.createElement(H.a,{defaultValue:en,placeholder:"\u8BF7\u8F93\u5165".concat(hn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Ft){en=Ft.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var $t=Object(b.a)(Q.a.mark(function Jt(){var Tr;return Q.a.wrap(function(Kr){for(;;)switch(Kr.prev=Kr.next){case 0:if(en){Kr.next=3;break}return x.b.warn("\u9898\u76EE".concat(hn,"\u4E0D\u80FD\u4E3A\u7A7A")),Kr.abrupt("return",Promise.reject());case 3:return Kr.next=5,Object(he.a)("/api/tag_disciplines/".concat(ar.id,"/rename.json"),{method:"post",body:{id:ar.id,name:en}});case 5:Tr=Kr.sent,(Tr==null?void 0:Tr.status)===0&&ta();case 7:case"end":return Kr.stop()}},Jt)}));function Ft(){return $t.apply(this,arguments)}return Ft}()})},Fr=function(ar){K.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:mt==="practice"?q.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",q.a.createElement("span",{className:"c-light-primary"},ar.name),"\u201D\u5220\u9664\u5417\uFF1F",q.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):q.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",q.a.createElement("span",{className:"c-light-primary"},ar.name),"\u201D\u5220\u9664\u5417\uFF1F",q.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var en=Object(b.a)(Q.a.mark(function Ft(){var Jt;return Q.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:return kr.next=2,Object(he.a)("/api/tag_disciplines/".concat(ar.id,".json"),{method:"delete",body:{id:ar.id}});case 2:Jt=kr.sent,(Jt==null?void 0:Jt.status)===0&&ta();case 4:case"end":return kr.stop()}},Ft)}));function $t(){return en.apply(this,arguments)}return $t}()})},fa=function(ar){ta(ar)},hn=mt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return q.a.createElement(K.a,{afterClose:function(){Yr(!1),un(!1),Lr(""),Hr("1"),bn([])},centered:!0,keyboard:!1,width:600,title:"".concat(hn,"\u7BA1\u7406"),visible:!!mt,className:at.a.customModal,footer:null,onCancel:wr},q.a.createElement("section",{className:at.a.wrap},q.a.createElement(Ge.a,{activeKey:fn,onChange:function(ar){Lr(""),Hr(ar),ta()}},q.a.createElement(Ge.a.TabPane,{tab:"\u65B0\u589E".concat(hn),key:"1"},q.a.createElement(H.a,{value:ut,onChange:function(ar){return Lr(ar.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(hn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),q.a.createElement("div",{className:at.a.btns},q.a.createElement(T.a,{onClick:wr,className:"mr20"},"\u53D6\u6D88 "),q.a.createElement(T.a,{loading:Dt,onClick:da,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),q.a.createElement(Ge.a.TabPane,{tab:"\u5DF2\u6709".concat(hn),key:"2"},q.a.createElement(H.a.Search,{allowClear:!0,onSearch:fa,value:ut,onChange:function(ar){return Lr(ar.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(hn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),q.a.createElement(l.a,{dataSource:Sn,bordered:!1,loading:vr,scroll:Sn.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(hn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(ar,en){return q.a.createElement("span",null,q.a.createElement("span",{onClick:function(){return an(en)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),q.a.createElement("span",{onClick:function(){return Fr(en)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},ot=it,yt=k("m3rI"),wt=k("B7Ph"),ft=k("wd/R"),jt=k.n(ft),kt=k("1vsH"),Rt=k("9Bee"),Vt=k("xKgJ"),Tt=H.a.TextArea,dr=K.a.confirm,tr=G.a.Panel,Wt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Bt;(function(vt){vt[vt.SET_INITAL_DATA=0]="SET_INITAL_DATA",vt[vt.SET_LOADING=1]="SET_LOADING",vt[vt.SET_STATUS=2]="SET_STATUS"})(Bt||(Bt={}));var Nr="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function dn(vt,Ct){switch(Ct.type){case Bt.SET_INITAL_DATA:return Object(M.a)(Object(M.a)({},vt),Ct.payload);case Bt.SET_LOADING:return Object(M.a)(Object(M.a)({},vt),{},{loading:Ct.payload});case Bt.SET_STATUS:return Object(M.a)(Object(M.a)({},vt),{},{status:Ct.payload});default:throw new Error}}var Er=$.default=function(){var vt,Ct,mt,mr=Object(ae.h)(),wr=Object(ae.g)(),It=Object(ae.i)(),_t=It.id,vr=I.a.useForm(),un=Object(j.a)(vr,1),jr=un[0],ct=Object(ee.useState)(),Dt=Object(j.a)(ct,2),Yr=Dt[0],nn=Dt[1],An=Object(ee.useState)(!1),fn=Object(j.a)(An,2),Hr=fn[0],Ot=fn[1],cn=Object(ee.useState)([]),ut=Object(j.a)(cn,2),Lr=ut[0],fr=ut[1],ea=Object(ee.useState)([]),Sn=Object(j.a)(ea,2),bn=Sn[0],da=Sn[1],ta=Object(ee.useState)([]),an=Object(j.a)(ta,2),Fr=an[0],fa=an[1],hn=Object(ee.useState)([]),Br=Object(j.a)(hn,2),ar=Br[0],en=Br[1],$t=Object(ee.useState)([]),Ft=Object(j.a)($t,2),Jt=Ft[0],Tr=Ft[1],kr=Object(ee.useState)("C"),Kr=Object(j.a)(kr,2),xn=Kr[0],li=Kr[1],Ya=Object(ee.useReducer)(dn,Wt),$a=Object(j.a)(Ya,2),_a=$a[0],pn=$a[1],Ka=_a.loading,$r=_a.data,ra=_a.user,Pn=_a.status,on=$r==null?void 0:$r.hack_sets,Cn=$r==null||((vt=$r.hack)===null||vt===void 0)?void 0:vt.test_set_average,ha=Object(ee.useState)(!1),Hn=Object(j.a)(ha,2),Kn=Hn[0],Ma=Hn[1],Pa=Object(ee.useRef)([]),zn=Object(ee.useState)(!1),Na=Object(j.a)(zn,2),pa=Na[0],ma=Na[1],Gn=Object(ee.useState)(!1),Xn=Object(j.a)(Gn,2),ka=Xn[0],na=Xn[1],va=Object(ee.useRef)(!0),ja=Object(ee.useState)({}),aa=Object(j.a)(ja,2),Mr=aa[0],Lt=aa[1];Object(ee.useEffect)(function(){return Object(Ee.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Ee.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Ee.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Ee.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(ee.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var zt=function(){var Gt=Object(b.a)(Q.a.mark(function St(){var Qt,qt;return Q.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.next=2,Object(he.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return Qt=ur.sent,ur.next=5,Object(he.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:qt=ur.sent,da(Qt.tag_disciplines||[]),fa(qt.tag_disciplines||[]);case 8:case"end":return ur.stop()}},St)}));return function(){return Gt.apply(this,arguments)}}(),Pt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Zt=Object(ee.useCallback)(Object(b.a)(Q.a.mark(function Gt(){var St,Qt,qt,Ir,ur,mn,tn,Oa,Dn,kn,Fn,Xa,De,Be,Ke,ke,fe,Oe,ve,Ie,je,He,We,Qe,st,pt,ht;return Q.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(pn({type:Bt.SET_LOADING,payload:!0}),!_t){Ut.next=19;break}return Ut.next=4,ze(_t);case 4:St=Ut.sent,Qt=St.user,qt=St.language,Ir=St.practice_sets,ur=St.practice_codes,mn=St.description,tn=St.difficulty,Oa=St.name,Dn=St.open_or_not,kn=St.time_limit,Fn=St.test_set_average,Xa=St.test_set_score,De=St.status,Be=St.tag_discipline_ids,Ke=St.source_discipline_ids,ke=St.item_banks_group_id,fe=St.is_file,Oe=fe===void 0?!1:fe,ve=St.hide_actual_output,Ie=St.review_privilege,je=St.review_description,He={review_privilege:Ie,status:De,review_description:je,name:Oa},Lt(He),Ma(ve),We=Oe?[{input:"",output:"",score:100,position:1}]:Ir,Oe?(fr(Ir),jr.setFieldsValue({hack_sets:We})):fr([]),Qe={loading:!0,user:Qt,status:De,data:{hack:{difficulty:tn,name:Oa,description:mn,open_or_not:Dn,time_limit:kn,test_set_average:Fn,test_set_score:Xa,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Oe},hack_sets:We}},pn({type:Bt.SET_INITAL_DATA,payload:Qe}),nn({hack:{difficulty:tn,name:Oa,description:mn,open_or_not:Dn,time_limit:kn,test_set_average:Fn,test_set_score:Xa,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Oe}}),st=ur==null?void 0:ur.map(function(er){return Object(M.a)(Object(M.a)({},er),{},{code:ne.Base64.decode(er==null?void 0:er.code)})}),Tr(st),Pa.current=st,Ut.next=27;break;case 19:return Ut.next=21,Te();case 21:pt=Ut.sent,ht=pt.user,pn({type:Bt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:ht,data:{hack:{difficulty:"",time_limit:3,description:Nr,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),nn({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Tr(Pt),Pa.current=Pt;case 27:pn({type:Bt.SET_LOADING,payload:!1});case 28:case"end":return Ut.stop()}},Gt)})),[_t]);Object(ee.useEffect)(function(){try{Zt(),zt()}catch(Gt){console.log(Gt,"----")}},[]);function hr(Gt,St){return _r.apply(this,arguments)}function _r(){return _r=Object(b.a)(Q.a.mark(function Gt(St,Qt){var qt,Ir,ur,mn,tn,Oa,Dn,kn,Fn,Xa,De,Be,Ke,ke,fe,Oe,ve,Ie;return Q.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:Ir=Object(M.a)({},St),ur=Ir.hack_sets,mn=Ir.hack,mn.hide_actual_output=Kn,tn=[],Oa=[],Dn=0,kn=mn!=null&&mn.is_file?Lr.map(function(We,Qe){return Object(M.a)(Object(M.a)({},We),{},{position:Qe+1})}):ur.map(function(We){return Object(M.a)(Object(M.a)({},We),{},{is_file:!1})}),Fn=Object(w.a)(kn);try{for(Fn.s();!(Xa=Fn.n()).done;)De=Xa.value,Dn+=De.score,De.id&&De.id>=0?tn.push(De):Oa.push(De)}catch(We){Fn.e(We)}finally{Fn.f()}if(kn!=null&&kn.length){He.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),He.abrupt("return");case 11:if(!(Dn!==100&&!mn.test_set_score)){He.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),He.abrupt("return");case 14:if(!(kn!=null&&kn.some(function(We){return!We.output}))){He.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),He.abrupt("return");case 17:if(va.current?ma(!0):na(!0),Ke=Jt==null?void 0:Jt.map(function(We){return Object(M.a)(Object(M.a)({},We),{},{code:ne.Base64.encode(We==null?void 0:We.code)})}),!_t){He.next=25;break}return He.next=22,Ze(_t,{practice:mn,practice_codes:Ke,practice_sets:Oa,update_practice_sets:tn});case 22:Be=He.sent,He.next=28;break;case 25:return He.next=27,de({practice:mn,practice_codes:Ke,practice_sets:kn,publish:!va.current});case 27:Be=He.sent;case 28:if(ma(!1),na(!1),!(((qt=Be)===null||qt===void 0?void 0:qt.status)===0)){He.next=46;break}if(!((ke=Be)!==null&&ke!==void 0&&(fe=ke.similar_practice)!==null&&fe!==void 0&&fe.length)){He.next=35;break}return Ot(!0),en((Oe=Be)===null||Oe===void 0?void 0:Oe.similar_practice),He.abrupt("return");case 35:if(!_t){He.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),va.current){He.next=42;break}return He.next=40,Object(he.a)("/api/practices/".concat(_t,"/start"),{method:"get"});case 40:ve=He.sent,(ve==null?void 0:ve.status)===0&&wr.push("/problems/".concat(ve==null?void 0:ve.identifier,"/oj/").concat(_t));case 42:He.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),wr.replace("/problems/".concat((Ie=Be)===null||Ie===void 0?void 0:Ie.identifier,"/ojedit"));case 46:case"end":return He.stop()}},Gt)})),_r.apply(this,arguments)}function sr(){wr.replace("/problems")}var Jr=function(St){var Qt=Math.floor(100/St.length),qt=Qt+100%St.length;St=St.map(function(Ir,ur){return ur===St.length-1?Object(M.a)(Object(M.a)({},Ir),{},{score:qt}):Object(M.a)(Object(M.a)({},Ir),{},{score:Qt})}),fr(St)};function Un(Gt){Gt.target.value||Jr(Lr),pn({type:Bt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},$r),{},{hack:Object(M.a)(Object(M.a)({},$r.hack),{},{test_set_score:Gt.target.value})})}})}function nr(Gt){pn({type:Bt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},$r),{},{hack:Object(M.a)(Object(M.a)({},$r.hack),{},{is_file:Gt.target.value})})}})}function ga(Gt){Ma(Gt.target.checked)}function Or(Gt){var St=Gt.target.value;St&&Jr(Lr),pn({type:Bt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},$r),{},{hack:Object(M.a)(Object(M.a)({},$r.hack),{},{test_set_average:St})})}})}function _n(){var Gt=jr.getFieldValue("hack_sets"),St=Gt.length+1,Qt=Math.floor(100/St),qt=100%St;Gt.map(function(Ir,ur){return Cn&&(Ir.score=Qt),Ir.position=ur+1,Ir}),Gt.push({input:"",output:"",position:St,score:Cn?Qt+qt:0}),jr.setFieldsValue({hack_sets:Gt}),pn({type:Bt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},$r),{},{hack_sets:Gt})}})}Object(ee.useEffect)(function(){if(Cn){var Gt=on==null?void 0:on.length,St=Math.floor(100/Gt),Qt=100%Gt;on==null||on.map(function(qt,Ir){return qt.score=St,qt.position=Ir+1,Ir===Gt-1&&(qt.score=St+Qt),qt}),pn({type:Bt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},$r),{},{hack_sets:on})}}),jr.setFieldsValue({hack_sets:on})}},[Cn]);function Rn(Gt){var St=jr.getFieldValue("hack_sets"),Qt=(St==null?void 0:St.length)-1,qt=Math.ceil(100/Qt),Ir=100%Qt;St.splice(Gt,1),St==null||St.map(function(ur,mn){return Cn&&(ur.score=qt,mn===Qt-1&&(ur.score=qt+Ir)),ur.position=mn+1,ur}),pn({type:Bt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},$r),{},{hack_sets:St})}}),jr.setFieldsValue({hack_sets:St})}function la(Gt){li(Gt)}var ui=function(St){var Qt,qt=(Qt=Pa.current)===null||Qt===void 0?void 0:Qt.findIndex(function(Ir){return Ir.language===xn});Pa.current[qt].code=St,Tr(Pa.current)},Ar=function(St){nn(Object(M.a)({},jr.getFieldsValue()))},gr=function(){var Gt=Object(b.a)(Q.a.mark(function St(Qt){var qt;return Q.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return ur.next=2,Object(he.a)("/api/practices/".concat(Qt,"/start"),{method:"get"});case 2:qt=ur.sent,(qt==null?void 0:qt.status)===0&&Object(kt.U)("/problems/".concat(qt==null?void 0:qt.identifier,"/oj/").concat(Qt));case 4:case"end":return ur.stop()}},St)}));return function(Qt){return Gt.apply(this,arguments)}}(),lr=function(){var Gt=Object(b.a)(Q.a.mark(function St(){var Qt,qt,Ir,ur,mn,tn;return Q.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.next=2,ze(_t);case 2:Qt=Dn.sent,qt=Qt.name,Ir=Qt.status,ur=Qt.review_privilege,mn=Qt.review_description,tn={review_privilege:ur,status:Ir,review_description:mn,name:qt},Lt(tn);case 6:case"end":return Dn.stop()}},St)}));return function(){return Gt.apply(this,arguments)}}(),ia=function(){var St="";K.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:q.a.createElement("div",{className:"mt20"},q.a.createElement(Y.a,{className:ye.a.MdEditor,defaultValue:St,onChange:function(qt){St=qt}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Qt=Object(b.a)(Q.a.mark(function Ir(){var ur;return Q.a.wrap(function(tn){for(;;)switch(tn.prev=tn.next){case 0:if(St){tn.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),tn.abrupt("return",Promise.reject());case 3:return tn.next=5,Object(he.a)("/api/practices/".concat(_t,"/review.json"),{method:"post",body:{op:"fail",description:St}});case 5:ur=tn.sent,(ur==null?void 0:ur.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),lr());case 7:case"end":return tn.stop()}},Ir)}));function qt(){return Qt.apply(this,arguments)}return qt}()})},za=function(){var Gt=Object(b.a)(Q.a.mark(function St(){return Q.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:K.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(Mr==null?void 0:Mr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ir=Object(b.a)(Q.a.mark(function mn(){var tn;return Q.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.next=2,Object(he.a)("/api/practices/".concat(_t,"/review.json"),{method:"post",body:{op:"pass"}});case 2:tn=Dn.sent,(tn==null?void 0:tn.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),lr());case 4:case"end":return Dn.stop()}},mn)}));function ur(){return Ir.apply(this,arguments)}return ur}()});case 1:case"end":return qt.stop()}},St)}));return function(){return Gt.apply(this,arguments)}}(),Ga=function(){var St=K.a.confirm({icon:null,width:700,className:"".concat(ye.a.cusModal," custom-modal-divider"),centered:!0,title:q.a.createElement(a.a,null,q.a.createElement(O.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),q.a.createElement(O.a,null,q.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return St.destroy()}}))),content:q.a.createElement("div",null,q.a.createElement(Rt.a,{className:"mt20",value:(Mr==null?void 0:Mr.review_description)||""}))})};return q.a.createElement(d.a,{spinning:Ka,size:"large",className:ye.a["oj-custom-large-spin"]},$r?q.a.createElement(ee.Fragment,null,q.a.createElement("header",{className:ye.a.header},q.a.createElement("div",null,q.a.createElement("img",{src:"".concat(yt.a.IMG_SERVER,"/images/").concat(ra==null?void 0:ra.image_url),alt:"user",width:30}),q.a.createElement("span",null,ra==null?void 0:ra.name)),q.a.createElement("h2",null," ",$r==null||((Ct=$r.hack)===null||Ct===void 0)?void 0:Ct.name," "),_t?q.a.createElement("a",{className:ye.a.btn_back,onClick:sr}," ",q.a.createElement(J.a,null),"\u9000\u51FA"):null),q.a.createElement(I.a,{form:jr,initialValues:$r,layout:"vertical",className:ye.a["oj-form-container"],onValuesChange:Ar,onFinish:hr},q.a.createElement(tt.a,{hideResize:!0,className:ye.a["oj-problems"],leftChild:q.a.createElement(qn,{formValue:Yr,onRemoveTestCase:Rn,onAddTestCase:_n,hack:$r.hack,onChangeScore:Un,onChangehide:ga,onChangeAverage:Or,onChangeFile:nr,uploadData:Lr,setUploadData:fr,handleUploadRatio:Jr,ischecked:Kn,pointData:bn,sourceData:Fr,getPointData:zt}),rightChild:q.a.createElement(_e,{value:Jt==null||((mt=Jt.find(function(Gt){return Gt.language===xn}))===null||mt===void 0)?void 0:mt.code,onChange:ui,onLanguage:la,languageItems:Jt,language:xn})}),q.a.createElement("div",{className:ye.a.footer},!!_t&&q.a.createElement("div",{className:ye.a.result},q.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Mr!=null&&Mr.review_privilege?q.a.createElement(q.a.Fragment,null,q.a.createElement("div",{onClick:za,className:ye.a.pass},"\u901A\u8FC7"),q.a.createElement("div",{onClick:ia,className:ye.a.noPass},"\u4E0D\u901A\u8FC7")):q.a.createElement(q.a.Fragment,null,(Mr==null?void 0:Mr.status)===0&&q.a.createElement("div",{className:ye.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Mr==null?void 0:Mr.status)===1&&q.a.createElement("div",{className:ye.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Mr==null?void 0:Mr.status)===2&&q.a.createElement("div",{className:ye.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Mr==null?void 0:Mr.status)===3&&q.a.createElement("div",{className:ye.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Mr==null?void 0:Mr.status)===4&&q.a.createElement("div",{className:ye.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Mr==null?void 0:Mr.status)===5&&q.a.createElement("div",{className:ye.a.noPassText},q.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",q.a.createElement("span",{onClick:Ga},"\u67E5\u770B\u539F\u56E0")))),q.a.createElement(T.a,{type:"primary",ghost:!0,onClick:sr},"\u9000\u51FA\u7F16\u8F91"),q.a.createElement(T.a,{disabled:ka,loading:pa,type:"primary",onClick:function(){va.current=!0,jr.submit()}},"\u4FDD\u5B58 "),_t?q.a.createElement(T.a,{disabled:pa,loading:ka,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){va.current=!1,jr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):q.a.createElement(T.a,{disabled:pa,loading:ka,type:"primary",onClick:function(){va.current=!1,jr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,q.a.createElement(K.a,{centered:!0,destroyOnClose:!0,footer:null,visible:Hr,onCancel:function(){return Ot(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},q.a.createElement("div",null,q.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),q.a.createElement(l.a,{dataSource:ar,bordered:!1,scroll:ar.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(St,Qt){return q.a.createElement("span",{onClick:function(){return gr(Qt==null?void 0:Qt.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},St)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(St){var Qt;return(Qt=jt()(St))===null||Qt===void 0?void 0:Qt.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function qn(vt){var Ct,mt,mr=vt.ischecked,wr=vt.formValue,It=vt.hack,_t=vt.onChangeAverage,vr=vt.onChangeScore,un=vt.onChangehide,jr=vt.onChangeFile,ct=vt.onAddTestCase,Dt=vt.onRemoveTestCase,Yr=vt.uploadData,nn=vt.setUploadData,An=vt.handleUploadRatio,fn=vt.pointData,Hr=vt.sourceData,Ot=vt.getPointData,cn=It.test_set_average,ut=It.test_set_score,Lr=Object(ee.useState)(!1),fr=Object(j.a)(Lr,2),ea=fr[0],Sn=fr[1],bn=Object(ee.useState)(!1),da=Object(j.a)(bn,2),ta=da[0],an=da[1],Fr=function(Ft,Jt){var Tr=Object(g.a)(Yr);Tr.splice(Jt,1),cn?An(Tr):nn(Tr)},fa=function(Ft,Jt){console.log(Ft,Jt);var Tr=Yr.map(function(kr,Kr){return Kr===Jt?Object(M.a)(Object(M.a)({},kr),{},{score:Ft.target.value?Number(Ft.target.value):0}):kr});nn(Tr)},hn=function(Ft){var Jt=Yr.concat(Ft);It.test_set_average?An(Jt):nn(Jt)};function Br($t){$t.stopPropagation()}function ar(){if(Object(Vt.v)()){an("practice");return}var $t="";K.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:q.a.createElement("div",null,q.a.createElement(H.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Jt){$t=Jt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ft=Object(b.a)(Q.a.mark(function Tr(){var kr;return Q.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,Object(he.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:$t}});case 2:kr=xn.sent,(kr==null?void 0:kr.status)===0&&Ot();case 4:case"end":return xn.stop()}},Tr)}));function Jt(){return Ft.apply(this,arguments)}return Jt}()})}function en(){if(Object(Vt.v)()){an("practice_source");return}var $t="";K.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:q.a.createElement("div",null,q.a.createElement(H.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Jt){$t=Jt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ft=Object(b.a)(Q.a.mark(function Tr(){var kr;return Q.a.wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.next=2,Object(he.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:$t}});case 2:kr=xn.sent,(kr==null?void 0:kr.status)===0&&Ot();case 4:case"end":return xn.stop()}},Tr)}));function Jt(){return Ft.apply(this,arguments)}return Jt}()})}return q.a.createElement("div",{className:ye.a["oj-left-panel"]},q.a.createElement("div",{className:ye.a["oj-form-info"]},q.a.createElement(I.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:ye.a.inputOne},q.a.createElement(H.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:q.a.createElement("span",null,(wr==null||((Ct=wr.hack)===null||Ct===void 0||((mt=Ct.name)===null||mt===void 0))?void 0:mt.length)||0,"/",q.a.createElement("span",{className:"c-grey-999"},"60"))})),q.a.createElement(I.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},q.a.createElement(Y.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),q.a.createElement("div",{className:ye.a.row},q.a.createElement("div",{className:ye.a.a},q.a.createElement(I.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},q.a.createElement(y.a,null,te(oe.difficulty)))),q.a.createElement("div",{className:ye.a.b},q.a.createElement(I.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},q.a.createElement(y.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Ft){return Ft.parentNode}},Hr.map(function($t){return q.a.createElement(y.a.Option,{key:$t.id,value:$t.id},$t.name)}))),q.a.createElement(T.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return en()}},Object(Vt.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),q.a.createElement("div",{className:ye.a.row},q.a.createElement("div",{className:ye.a.b,style:{width:"100%",marginLeft:0}},q.a.createElement(I.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},q.a.createElement(y.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Ft){return Ft.parentNode}},fn.map(function($t){return q.a.createElement(y.a.Option,{key:$t.id,value:$t.id},$t.name)}))),q.a.createElement(T.a,{type:"primary",ghost:!0,onClick:function(){return ar()}},Object(Vt.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),q.a.createElement("div",{className:ye.a.field},q.a.createElement(I.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:ye.a.inputTwo,extra:q.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",q.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},q.a.createElement(r.a,{style:{width:185},min:3}))),q.a.createElement("div",{className:"tst-case-info"},q.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!It.is_file&&q.a.createElement(T.a,{style:{height:40},type:"primary",ghost:!0,onClick:ct},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),q.a.createElement(I.a.Item,{name:["hack","test_set_score"]},q.a.createElement(o.a.Group,{onChange:vr},q.a.createElement(o.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",q.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),q.a.createElement(o.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",q.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),q.a.createElement(S.a,{style:{marginBottom:"5px"},checked:mr,onChange:un},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),q.a.createElement(I.a.Item,{className:ye.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},q.a.createElement(o.a.Group,{onChange:jr},q.a.createElement(p.a,{direction:"horizontal"},q.a.createElement(o.a,{value:!1},"\u6587\u672C"),q.a.createElement(o.a,{value:!0},"\u6587\u4EF6")))),!It.test_set_score&&q.a.createElement(I.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},q.a.createElement(o.a.Group,{onChange:_t},q.a.createElement(o.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),q.a.createElement(o.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),It.is_file&&q.a.createElement("div",{className:ye.a.upBtn},q.a.createElement(T.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Sn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),q.a.createElement(wt.a,{disabled:It==null?void 0:It.test_set_average,inputChange:fa,showScore:!It.test_set_score,data:Yr,onRemove:Fr})),!It.is_file&&q.a.createElement(I.a.List,{name:"hack_sets"},function($t,Ft){return Object(_.a)(Ft),q.a.createElement(G.a,{accordion:!0},$t.map(function(Jt,Tr){return q.a.createElement(tr,{key:"".concat(Jt.key,"--").concat(Tr),header:q.a.createElement("a",{className:ye.a["test-case-name"]},q.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Tr+1),ut?null:q.a.createElement(q.a.Fragment,null,q.a.createElement(I.a.Item,{name:[Jt.name,"score"],fieldKey:[Jt.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Tr+1,"\u8BC4\u5206")}]},q.a.createElement(r.a,{onClick:Br,min:0,max:100,disabled:cn})),q.a.createElement("span",null,"%"))),extra:Tr>0?q.a.createElement("div",{onClick:Br},q.a.createElement(c.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Tr+1),onConfirm:function(){Dt(Tr)}},q.a.createElement(X.a,{className:ye.a["btn-remove-case"]}))):null},q.a.createElement(I.a.Item,{label:"\u8F93\u5165",name:[Jt.name,"input"],fieldKey:[Jt.fieldKey,"input"]},q.a.createElement(Tt,null)),q.a.createElement(I.a.Item,{label:"\u8F93\u51FA",name:[Jt.name,"output"],fieldKey:[Jt.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},q.a.createElement(Tt,null)))}))}))),q.a.createElement(wt.b,{rootIdentifier:null,visible:ea,onClose:function(){return Sn(!1)},onOK:hn}),q.a.createElement(ot,{visible:ta,onCancel:function(){an(!1),Ot()},onOK:function(){an(!1),Ot()}}))}},rdUC:function(N,$,k){var P=k("MFOe"),c=P.Global;N.exports={name:"localStorage",read:D,write:p,each:s,remove:S,clearAll:v};function _(){return c.localStorage}function D(o){return _().getItem(o)}function p(o,i){return _().setItem(o,i)}function s(o){for(var i=_().length-1;i>=0;i--){var r=_().key(i);o(D(r),r)}}function S(o){return _().removeItem(o)}function v(){return _().clear()}},sR1s:function(N,$,k){"use strict";k.d($,"b",function(){return D}),k.d($,"a",function(){return p}),k.d($,"c",function(){return s}),k.d($,"d",function(){return S});var P=k("U8pU"),c="RC_TABLE_KEY";function _(v){return v==null?[]:Array.isArray(v)?v:[v]}function D(v,o){if(!o&&typeof o!="number")return v;for(var i=_(o),r=v,h=0;h<i.length;h+=1){if(!r)return null;var y=i[h];r=r[y]}return r}function p(v){var o=[],i={};return v.forEach(function(r){for(var h=r||{},y=h.key,g=h.dataIndex,w=y||_(g).join("-")||c;i[w];)w="".concat(w,"_next");i[w]=!0,o.push(w)}),o}function s(){var v={};function o(y,g){g&&Object.keys(g).forEach(function(w){var m=g[w];m&&Object(P.a)(m)==="object"?(y[w]=y[w]||{},o(y[w],m)):y[w]=m})}for(var i=arguments.length,r=new Array(i),h=0;h<i;h++)r[h]=arguments[h];return r.forEach(function(y){o(v,y)}),v}function S(v){return v!=null}},sboe:function(N,$,k){"use strict";k.d($,"a",function(){return _});var P=k("cDcd"),c=k.n(P),_=P.createContext(null)},t23M:function(N,$,k){"use strict";var P=k("VTBJ"),c=k("1OyB"),_=k("vuIU"),D=k("Ji7U"),p=k("LK+K"),s=k("cDcd"),S=k.n(s),v=k("m+aA"),o=k("Zm9Q"),i=k("Kwbf"),r=k("c+Xe"),h=k("bdgK"),y="rc-observer-key",g=function(w){Object(D.a)(d,w);var m=Object(p.a)(d);function d(){var n;return Object(c.a)(this,d),n=m.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(l){var u=n.props.onResize,T=l[0].target,E=T.getBoundingClientRect(),a=E.width,L=E.height,O=T.offsetWidth,f=T.offsetHeight,x=Math.floor(a),b=Math.floor(L);if(n.state.width!==x||n.state.height!==b||n.state.offsetWidth!==O||n.state.offsetHeight!==f){var C={width:x,height:b,offsetWidth:O,offsetHeight:f};n.setState(C),u&&Promise.resolve().then(function(){u(Object(P.a)(Object(P.a)({},C),{},{offsetWidth:O,offsetHeight:f}))})}},n.setChildNode=function(l){n.childNode=l},n}return Object(_.a)(d,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var u=Object(v.a)(this.childNode||this),T=u!==this.currentElement;T&&(this.destroyObserver(),this.currentElement=u),!this.resizeObserver&&u&&(this.resizeObserver=new h.default(this.onResize),this.resizeObserver.observe(u))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,u=Object(o.a)(l);if(u.length>1)Object(i.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(u.length===0)return Object(i.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=u[0];if(s.isValidElement(T)&&Object(r.c)(T)){var E=T.ref;u[0]=s.cloneElement(T,{ref:Object(r.a)(E,this.setChildNode)})}return u.length===1?u[0]:u.map(function(a,L){return!s.isValidElement(a)||"key"in a&&a.key!==null?a:s.cloneElement(a,{key:"".concat(y,"-").concat(L)})})}}]),d}(s.Component);g.displayName="ResizeObserver",$.a=g},uGsb:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("MlIO"),k("1uat"))})(this,function(P){return function(){var c=P,_=c.x64,D=_.Word,p=_.WordArray,s=c.algo,S=s.SHA512,v=s.SHA384=S.extend({_doReset:function(){this._hash=new p.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 o=S._doFinalize.call(this);return o.sigBytes-=16,o}});c.SHA384=S._createHelper(v),c.HmacSHA384=S._createHmacHelper(v)}(),P.SHA384})},uGxW:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uQRt:function(N,$,k){N.exports=P;function P(){return k("gaXo"),{}}},ulZh:function(N,$,k){typeof window!="undefined"&&function(c,_){N.exports=_()}(this,function(){return function(P){var c={};function _(D){if(c[D])return c[D].exports;var p=c[D]={i:D,l:!1,exports:{}};return P[D].call(p.exports,p,p.exports,_),p.l=!0,p.exports}return _.m=P,_.c=c,_.d=function(D,p,s){_.o(D,p)||Object.defineProperty(D,p,{enumerable:!0,get:s})},_.r=function(D){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})},_.t=function(D,p){if(p&1&&(D=_(D)),p&8)return D;if(p&4&&typeof D=="object"&&D&&D.__esModule)return D;var s=Object.create(null);if(_.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:D}),p&2&&typeof D!="string")for(var S in D)_.d(s,S,function(v){return D[v]}.bind(null,S));return s},_.n=function(D){var p=D&&D.__esModule?function(){return D.default}:function(){return D};return _.d(p,"a",p),p},_.o=function(D,p){return Object.prototype.hasOwnProperty.call(D,p)},_.p="/dist/",_(_.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,c,_){"use strict";var D=Object.prototype.hasOwnProperty,p="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(p=!1));function S(r,h,y){this.fn=r,this.context=h,this.once=y||!1}function v(r,h,y,g,w){if(typeof y!="function")throw new TypeError("The listener must be a function");var m=new S(y,g||r,w),d=p?p+h:h;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],m]:r._events[d].push(m):(r._events[d]=m,r._eventsCount++),r}function o(r,h){--r._eventsCount===0?r._events=new s:delete r._events[h]}function i(){this._events=new s,this._eventsCount=0}i.prototype.eventNames=function(){var h=[],y,g;if(this._eventsCount===0)return h;for(g in y=this._events)D.call(y,g)&&h.push(p?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(y)):h},i.prototype.listeners=function(h){var y=p?p+h:h,g=this._events[y];if(!g)return[];if(g.fn)return[g.fn];for(var w=0,m=g.length,d=new Array(m);w<m;w++)d[w]=g[w].fn;return d},i.prototype.listenerCount=function(h){var y=p?p+h:h,g=this._events[y];return g?g.fn?1:g.length:0},i.prototype.emit=function(h,y,g,w,m,d){var n=p?p+h:h;if(!this._events[n])return!1;var l=this._events[n],u=arguments.length,T,E;if(l.fn){l.once&&this.removeListener(h,l.fn,void 0,!0);switch(u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,y),!0;case 3:return l.fn.call(l.context,y,g),!0;case 4:return l.fn.call(l.context,y,g,w),!0;case 5:return l.fn.call(l.context,y,g,w,m),!0;case 6:return l.fn.call(l.context,y,g,w,m,d),!0}for(E=1,T=new Array(u-1);E<u;E++)T[E-1]=arguments[E];l.fn.apply(l.context,T)}else{var a=l.length,L;for(E=0;E<a;E++){l[E].once&&this.removeListener(h,l[E].fn,void 0,!0);switch(u){case 1:l[E].fn.call(l[E].context);break;case 2:l[E].fn.call(l[E].context,y);break;case 3:l[E].fn.call(l[E].context,y,g);break;case 4:l[E].fn.call(l[E].context,y,g,w);break;default:if(!T)for(L=1,T=new Array(u-1);L<u;L++)T[L-1]=arguments[L];l[E].fn.apply(l[E].context,T)}}}return!0},i.prototype.on=function(h,y,g){return v(this,h,y,g,!1)},i.prototype.once=function(h,y,g){return v(this,h,y,g,!0)},i.prototype.removeListener=function(h,y,g,w){var m=p?p+h:h;if(!this._events[m])return this;if(!y)return o(this,m),this;var d=this._events[m];if(d.fn)d.fn===y&&(!w||d.once)&&(!g||d.context===g)&&o(this,m);else{for(var n=0,l=[],u=d.length;n<u;n++)(d[n].fn!==y||w&&!d[n].once||g&&d[n].context!==g)&&l.push(d[n]);l.length?this._events[m]=l.length===1?l[0]:l:o(this,m)}return this},i.prototype.removeAllListeners=function(h){var y;return h?(y=p?p+h:h,this._events[y]&&o(this,y)):(this._events=new s,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=p,i.EventEmitter=i,P.exports=i},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,c,_){(function(D){var p=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,s=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,v=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(i,r,h){if(h=h||{},i=i.trim(),r=r.trim(),!r){if(!h.alwaysNormalize)return i;var y=o.parseURL(i);if(!y)throw new Error("Error trying to parse base URL.");return y.path=o.normalizePath(y.path),o.buildURLFromParts(y)}var g=o.parseURL(r);if(!g)throw new Error("Error trying to parse relative URL.");if(g.scheme)return h.alwaysNormalize?(g.path=o.normalizePath(g.path),o.buildURLFromParts(g)):r;var w=o.parseURL(i);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var m=s.exec(w.path);w.netLoc=m[1],w.path=m[2]}w.netLoc&&!w.path&&(w.path="/");var d={scheme:w.scheme,netLoc:g.netLoc,path:null,params:g.params,query:g.query,fragment:g.fragment};if(!g.netLoc&&(d.netLoc=w.netLoc,g.path[0]!=="/"))if(!g.path)d.path=w.path,g.params||(d.params=w.params,g.query||(d.query=w.query));else{var n=w.path,l=n.substring(0,n.lastIndexOf("/")+1)+g.path;d.path=o.normalizePath(l)}return d.path===null&&(d.path=h.alwaysNormalize?o.normalizePath(g.path):g.path),o.buildURLFromParts(d)},parseURL:function(i){var r=p.exec(i);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(i){for(i=i.split("").reverse().join("").replace(S,"");i.length!==(i=i.replace(v,"")).length;);return i.split("").reverse().join("")},buildURLFromParts:function(i){return i.scheme+i.netLoc+i.path+i.params+i.query+i.fragment}};P.exports=o})(this)},"./node_modules/webworkify-webpack/index.js":function(P,c,_){function D(h){var y={};function g(m){if(y[m])return y[m].exports;var d=y[m]={i:m,l:!1,exports:{}};return h[m].call(d.exports,d,d.exports,g),d.l=!0,d.exports}g.m=h,g.c=y,g.i=function(m){return m},g.d=function(m,d,n){g.o(m,d)||Object.defineProperty(m,d,{configurable:!1,enumerable:!0,get:n})},g.r=function(m){Object.defineProperty(m,"__esModule",{value:!0})},g.n=function(m){var d=m&&m.__esModule?function(){return m.default}:function(){return m};return g.d(d,"a",d),d},g.o=function(m,d){return Object.prototype.hasOwnProperty.call(m,d)},g.p="/",g.oe=function(m){throw console.error(m),m};var w=g(g.s=ENTRY_MODULE);return w.default||w}var p="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+p+").*?\\)";function S(h){return(h+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function v(h){return!isNaN(1*h)}function o(h,y,g){var w={};w[g]=[];var m=y.toString(),d=m.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return w;for(var n=d[1],l=new RegExp("(\\\\n|\\W)"+S(n)+s,"g"),u;u=l.exec(m);){if(u[3]==="dll-reference")continue;w[g].push(u[3])}for(l=new RegExp("\\("+S(n)+'\\("(dll-reference\\s('+p+'))"\\)\\)'+s,"g");u=l.exec(m);)h[u[2]]||(w[g].push(u[1]),h[u[2]]=_(u[1]).m),w[u[2]]=w[u[2]]||[],w[u[2]].push(u[4]);for(var T=Object.keys(w),E=0;E<T.length;E++)for(var a=0;a<w[T[E]].length;a++)v(w[T[E]][a])&&(w[T[E]][a]=1*w[T[E]][a]);return w}function i(h){var y=Object.keys(h);return y.reduce(function(g,w){return g||h[w].length>0},!1)}function r(h,y){for(var g={main:[y]},w={main:[]},m={main:{}};i(g);)for(var d=Object.keys(g),n=0;n<d.length;n++){var l=d[n],u=g[l],T=u.pop();if(m[l]=m[l]||{},m[l][T]||!h[l][T])continue;m[l][T]=!0,w[l]=w[l]||[],w[l].push(T);for(var E=o(h,h[l][T],l),a=Object.keys(E),L=0;L<a.length;L++)g[a[L]]=g[a[L]]||[],g[a[L]]=g[a[L]].concat(E[a[L]])}return w}P.exports=function(h,y){y=y||{};var g={main:_.m},w=y.all?{main:Object.keys(g.main)}:r(g,h),m="";Object.keys(w).filter(function(T){return T!=="main"}).forEach(function(T){for(var E=0;w[T][E];)E++;w[T].push(E),g[T][E]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",m=m+"var "+T+" = ("+D.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+w[T].map(function(a){return""+JSON.stringify(a)+": "+g[T][a].toString()}).join(",")+`});
|
|
|
`}),m=m+"new (("+D.toString().replace("ENTRY_MODULE",JSON.stringify(h))+")({"+w.main.map(function(T){return""+JSON.stringify(T)+": "+g.main[T].toString()}).join(",")+"}))(self);";var d=new window.Blob([m],{type:"text/javascript"});if(y.bare)return d;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,l=n.createObjectURL(d),u=new window.Worker(l);return u.objectURL=l,u}},"./src/config.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"hlsDefaultConfig",function(){return L}),_.d(c,"mergeConfig",function(){return f}),_.d(c,"enableStreamingMode",function(){return x});var D=_("./src/controller/abr-controller.ts"),p=_("./src/controller/audio-stream-controller.ts"),s=_("./src/controller/audio-track-controller.ts"),S=_("./src/controller/subtitle-stream-controller.ts"),v=_("./src/controller/subtitle-track-controller.ts"),o=_("./src/controller/buffer-controller.ts"),i=_("./src/controller/timeline-controller.ts"),r=_("./src/controller/cap-level-controller.ts"),h=_("./src/controller/fps-controller.ts"),y=_("./src/controller/eme-controller.ts"),g=_("./src/controller/cmcd-controller.ts"),w=_("./src/utils/xhr-loader.ts"),m=_("./src/utils/fetch-loader.ts"),d=_("./src/utils/cues.ts"),n=_("./src/utils/mediakeys-helper.ts"),l=_("./src/utils/logger.ts");function u(){return u=Object.assign||function(b){for(var C=1;C<arguments.length;C++){var I=arguments[C];for(var j in I)Object.prototype.hasOwnProperty.call(I,j)&&(b[j]=I[j])}return b},u.apply(this,arguments)}function T(b,C){var I=Object.keys(b);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(b);C&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(b,M).enumerable})),I.push.apply(I,j)}return I}function E(b){for(var C=1;C<arguments.length;C++){var I=arguments[C]!=null?arguments[C]:{};C%2?T(Object(I),!0).forEach(function(j){a(b,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(I)):T(Object(I)).forEach(function(j){Object.defineProperty(b,j,Object.getOwnPropertyDescriptor(I,j))})}return b}function a(b,C,I){return C in b?Object.defineProperty(b,C,{value:I,enumerable:!0,configurable:!0,writable:!0}):b[C]=I,b}var L=E(E({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:w.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:D.default,bufferController:o.default,capLevelController:r.default,fpsController:h.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:S.SubtitleStreamController,subtitleTrackController:v.default,timelineController:i.TimelineController,audioStreamController:p.default,audioTrackController:s.default,emeController:y.default,cmcdController:g.default});function O(){return{cueHandler:d.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 f(b,C){if((C.liveSyncDurationCount||C.liveMaxLatencyDurationCount)&&(C.liveSyncDuration||C.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(C.liveMaxLatencyDurationCount!==void 0&&(C.liveSyncDurationCount===void 0||C.liveMaxLatencyDurationCount<=C.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(C.liveMaxLatencyDuration!==void 0&&(C.liveSyncDuration===void 0||C.liveMaxLatencyDuration<=C.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},b,C)}function x(b){var C=b.loader;if(C!==m.default&&C!==w.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),b.progressive=!1;else{var I=Object(m.fetchSupported)();I&&(b.loader=m.default,b.progressive=!0,b.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/polyfills/number.ts"),p=_("./src/utils/ewma-bandwidth-estimator.ts"),s=_("./src/events.ts"),S=_("./src/utils/buffer-helper.ts"),v=_("./src/errors.ts"),o=_("./src/types/loader.ts"),i=_("./src/utils/logger.ts");function r(g,w){for(var m=0;m<w.length;m++){var d=w[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}function h(g,w,m){return w&&r(g.prototype,w),m&&r(g,m),g}var y=function(){function g(m){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=m;var d=m.config;this.bwEstimator=new p.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var w=g.prototype;return w.registerListeners=function(){var d=this.hls;d.on(s.Events.FRAG_LOADING,this.onFragLoading,this),d.on(s.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(s.Events.ERROR,this.onError,this)},w.unregisterListeners=function(){var d=this.hls;d.off(s.Events.FRAG_LOADING,this.onFragLoading,this),d.off(s.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(s.Events.ERROR,this.onError,this)},w.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},w.onFragLoading=function(d,n){var l=n.frag;if(l.type===o.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=l,this.partCurrent=(u=n.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},w.onLevelLoaded=function(d,n){var l=this.hls.config;n.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},w._abandonRulesCheck=function(){var d=this.fragCurrent,n=this.partCurrent,l=this.hls,u=l.autoLevelEnabled,T=l.config,E=l.media;if(!d||!E)return;var a=n?n.stats:d.stats,L=n?n.duration:d.duration;if(a.aborted){i.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||E.paused||!E.playbackRate||!E.readyState)return;var O=performance.now()-a.loading.start,f=Math.abs(E.playbackRate);if(O<=500*L/f)return;var x=l.levels,b=l.minAutoLevel,C=x[d.level],I=a.total||Math.max(a.loaded,Math.round(L*C.maxBitrate/8)),j=Math.max(1,a.bwEstimate?a.bwEstimate/8:a.loaded*1e3/O),M=(I-a.loaded)/j,z=E.currentTime,G=(S.BufferHelper.bufferInfo(E,z,T.maxBufferHole).end-z)/f;if(G>=2*L/f||M<=G)return;var B=Number.POSITIVE_INFINITY,K;for(K=d.level-1;K>b;K--){var F=x[K].maxBitrate;if(B=L*F/(8*.8*j),B<G)break}if(B>=M)return;var H=this.bwEstimator.getEstimate();i.logger.warn("Fragment "+d.sn+(n?" part "+n.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
|
|
|
Current BW estimate: `+(Object(D.isFiniteNumber)(H)?(H/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+M.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+B.toFixed(3)+` s
|
|
|
Time to underbuffer: `+G.toFixed(3)+" s"),l.nextLoadLevel=K,this.bwEstimator.sample(O,a.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),l.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:n,stats:a})},w.onFragLoaded=function(d,n){var l=n.frag,u=n.part;if(l.type===o.PlaylistLevelType.MAIN&&Object(D.isFiniteNumber)(l.sn)){var T=u?u.stats:l.stats,E=u?u.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var a=this.hls.levels[l.level],L=(a.loaded?a.loaded.bytes:0)+T.loaded,O=(a.loaded?a.loaded.duration:0)+E;a.loaded={bytes:L,duration:O},a.realBitrate=Math.round(8*L/O)}if(l.bitrateTest){var f={stats:T,frag:l,part:u,id:l.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,f),l.bitrateTest=!1}}},w.onFragBuffered=function(d,n){var l=n.frag,u=n.part,T=u?u.stats:l.stats;if(T.aborted)return;if(l.type!==o.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var E=T.parsing.end-T.loading.start;this.bwEstimator.sample(E,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},w.onError=function(d,n){switch(n.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},w.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},w.getNextABRAutoLevel=function(){var d=this.fragCurrent,n=this.partCurrent,l=this.hls,u=l.maxAutoLevel,T=l.config,E=l.minAutoLevel,a=l.media,L=n?n.duration:d?d.duration:0,O=a?a.currentTime:0,f=a&&a.playbackRate!==0?Math.abs(a.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,b=(S.BufferHelper.bufferInfo(a,O,T.maxBufferHole).end-O)/f,C=this.findBestLevel(x,E,u,b,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(C>=0)return C;i.logger.trace((b?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var I=L?Math.min(L,T.maxStarvationDelay):T.maxStarvationDelay,j=T.abrBandWidthFactor,M=T.abrBandWidthUpFactor;if(!b){var z=this.bitrateTestDelay;if(z){var G=L?Math.min(L,T.maxLoadingDelay):T.maxLoadingDelay;I=G-z,i.logger.trace("bitrate test took "+Math.round(1e3*z)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*I)+" ms"),j=M=1}}return C=this.findBestLevel(x,E,u,b+I,j,M),Math.max(C,0)},w.findBestLevel=function(d,n,l,u,T,E){for(var a,L=this.fragCurrent,O=this.partCurrent,f=this.lastLoadedFragLevel,x=this.hls.levels,b=x[f],C=!!(b!=null&&(a=b.details)!==null&&a!==void 0&&a.live),I=b==null?void 0:b.codecSet,j=O?O.duration:L?L.duration:0,M=l;M>=n;M--){var z=x[M];if(!z||I&&z.codecSet!==I)continue;var G=z.details,B=(O?G==null?void 0:G.partTarget:G==null?void 0:G.averagetargetduration)||j,K=void 0;M<=f?K=T*d:K=E*d;var F=x[M].maxBitrate,H=F*B/K;if(i.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+M+"/"+Math.round(K)+"/"+F+"/"+B+"/"+u+"/"+H),K>F&&(!H||C&&!this.bitrateTestDelay||H<u))return M}return-1},h(g,[{key:"nextAutoLevel",get:function(){var d=this._nextAutoLevel,n=this.bwEstimator;if(d!==-1&&(!n||!n.canEstimate()))return d;var l=this.getNextABRAutoLevel();return d!==-1&&(l=Math.min(d,l)),l},set:function(d){this._nextAutoLevel=d}}]),g}();c.default=y},"./src/controller/audio-stream-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/polyfills/number.ts"),p=_("./src/controller/base-stream-controller.ts"),s=_("./src/events.ts"),S=_("./src/utils/buffer-helper.ts"),v=_("./src/controller/fragment-tracker.ts"),o=_("./src/types/level.ts"),i=_("./src/types/loader.ts"),r=_("./src/loader/fragment.ts"),h=_("./src/demux/chunk-cache.ts"),y=_("./src/demux/transmuxer-interface.ts"),g=_("./src/types/transmuxer.ts"),w=_("./src/controller/fragment-finders.ts"),m=_("./src/utils/discontinuities.ts"),d=_("./src/errors.ts"),n=_("./src/utils/logger.ts");function l(){return l=Object.assign||function(L){for(var O=1;O<arguments.length;O++){var f=arguments[O];for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(L[x]=f[x])}return L},l.apply(this,arguments)}function u(L,O){L.prototype=Object.create(O.prototype),L.prototype.constructor=L,T(L,O)}function T(L,O){return T=Object.setPrototypeOf||function(x,b){return x.__proto__=b,x},T(L,O)}var E=100,a=function(L){u(O,L);function O(x,b){var C;return C=L.call(this,x,b,"[audio-stream-controller]")||this,C.videoBuffer=null,C.videoTrackCC=-1,C.waitingVideoCC=-1,C.audioSwitch=!1,C.trackId=-1,C.waitingData=null,C.mainDetails=null,C.bufferFlushed=!1,C._registerListeners(),C}var f=O.prototype;return f.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},f._registerListeners=function(){var b=this.hls;b.on(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),b.on(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),b.on(s.Events.ERROR,this.onError,this),b.on(s.Events.BUFFER_RESET,this.onBufferReset,this),b.on(s.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),b.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},f._unregisterListeners=function(){var b=this.hls;b.off(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),b.off(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),b.off(s.Events.ERROR,this.onError,this),b.off(s.Events.BUFFER_RESET,this.onBufferReset,this),b.off(s.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),b.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},f.onInitPtsFound=function(b,C){var I=C.frag,j=C.id,M=C.initPTS;if(j==="main"){var z=I.cc;this.initPTS[I.cc]=M,this.log("InitPTS for cc: "+z+" found from main: "+M),this.videoTrackCC=z,this.state===p.State.WAITING_INIT_PTS&&this.tick()}},f.startLoad=function(b){if(!this.levels){this.startPosition=b,this.state=p.State.STOPPED;return}var C=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,C>0&&b===-1?(this.log("Override startPosition with lastCurrentTime @"+C.toFixed(3)),this.state=p.State.IDLE):(this.loadedmetadata=!1,this.state=p.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()},f.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_TRACK:{var b,C=this.levels,I=this.trackId,j=C==null||((b=C[I])===null||b===void 0)?void 0:b.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=p.State.WAITING_INIT_PTS}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var M,z=performance.now(),G=this.retryDate;(!G||z>=G||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=p.State.IDLE);break}case p.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var K=B.frag,F=B.part,H=B.cache,W=B.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.FRAG_LOADING;var Q=H.flush(),ee={frag:K,part:F,payload:Q,networkDetails:null};this._handleFragmentLoadProgress(ee),W&&L.prototype._handleFragmentLoadComplete.call(this,ee)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var q=this.getLoadPosition(),pe=S.BufferHelper.bufferInfo(this.mediaBuffer,q,this.config.maxBufferHole),ye=Object(w.fragmentWithinToleranceTest)(pe.end,this.config.maxFragLookUpTolerance,K);ye<0&&(n.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+pe.end+" is needed"),this.clearWaitingFragment())}}else this.state=p.State.IDLE}}this.onTickEnd()},f.clearWaitingFragment=function(){var b=this.waitingData;b&&(this.fragmentTracker.removeFragment(b.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=p.State.IDLE)},f.onTickEnd=function(){var b=this.media;if(!b||!b.readyState)return;var C=this.mediaBuffer?this.mediaBuffer:b,I=C.buffered;!this.loadedmetadata&&I.length&&(this.loadedmetadata=!0),this.lastCurrentTime=b.currentTime},f.doTickIdle=function(){var b,C,I=this.hls,j=this.levels,M=this.media,z=this.trackId,G=I.config;if(!j||!j[z])return;if(!M&&(this.startFragRequested||!G.startFragPrefetch))return;var B=j[z],K=B.details;if(!K||K.live&&this.levelLastLoaded!==z||this.waitForCdnTuneIn(K)){this.state=p.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,i.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,i.PlaylistLevelType.AUDIO);if(F===null)return;var H=F.len,W=this.getMaxBufferLength(),Q=this.audioSwitch;if(H>=W&&!Q)return;if(!Q&&this._streamEnded(F,K)){I.trigger(s.Events.BUFFER_EOS,{type:"audio"}),this.state=p.State.ENDED;return}var ee=K.fragments,q=ee[0].start,pe=F.end;if(Q){var ye=this.getLoadPosition();pe=ye,K.PTSKnown&&ye<q&&((F.end>q||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=q+.05))}var ie=this.getNextFragment(pe,K);if(!ie){this.bufferFlushed=!0;return}((b=ie.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((C=ie.decryptdata)!==null&&C!==void 0&&C.key)?this.loadKey(ie,K):this.loadFragment(ie,K,pe)},f.getMaxBufferLength=function(){var b=L.prototype.getMaxBufferLength.call(this),C=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,i.PlaylistLevelType.MAIN);return C===null?b:Math.max(b,C.len)},f.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},f.onAudioTracksUpdated=function(b,C){var I=C.audioTracks;this.resetTransmuxer(),this.levels=I.map(function(j){return new o.Level(j)})},f.onAudioTrackSwitching=function(b,C){var I=!!C.url;this.trackId=C.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),I?this.setInterval(E):this.resetTransmuxer(),I?(this.audioSwitch=!0,this.state=p.State.IDLE):this.state=p.State.STOPPED,this.tick()},f.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},f.onLevelLoaded=function(b,C){this.mainDetails=C.details},f.onAudioTrackLoaded=function(b,C){var I,j=this.levels,M=C.details,z=C.id;if(!j){this.warn("Audio tracks were reset while loading level "+z);return}this.log("Track "+z+" loaded ["+M.startSN+","+M.endSN+"],duration:"+M.totalduration);var G=j[z],B=0;if(M.live||(I=G.details)!==null&&I!==void 0&&I.live){var K=this.mainDetails;if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed||!K)return;!G.details&&M.hasProgramDateTime&&K.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(M,K),B=M.fragments[0].start):B=this.alignPlaylists(M,G.details)}G.details=M,this.levelLastLoaded=z,!this.startFragRequested&&(this.mainDetails||!M.live)&&this.setStartPosition(G.details,B),this.state===p.State.WAITING_TRACK&&!this.waitForCdnTuneIn(M)&&(this.state=p.State.IDLE),this.tick()},f._handleFragmentLoadProgress=function(b){var C,I=b.frag,j=b.part,M=b.payload,z=this.config,G=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+I.sn+" of level "+I.level+" will not be buffered");return}var K=B[G];console.assert(K,"Audio track is defined on fragment load progress");var F=K.details;console.assert(F,"Audio track details are defined on fragment load progress");var H=z.defaultAudioCodec||K.audioCodec||"mp4a.40.2",W=this.transmuxer;W||(W=this.transmuxer=new y.default(this.hls,i.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var Q=this.initPTS[I.cc],ee=(C=I.initSegment)===null||C===void 0?void 0:C.data;if(Q!==void 0){var q=!1,pe=j?j.index:-1,ye=pe!==-1,ie=new g.ChunkMetadata(I.level,I.sn,I.stats.chunkCount,M.byteLength,pe,ye);W.push(M,ee,H,"",I,j,F.totalduration,q,ie,Q)}else{n.logger.log("Unknown video PTS for cc "+I.cc+", waiting for video PTS before demuxing audio frag "+I.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+G);var Se=this.waitingData=this.waitingData||{frag:I,part:j,cache:new h.default,complete:!1},ge=Se.cache;ge.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=p.State.WAITING_INIT_PTS}},f._handleFragmentLoadComplete=function(b){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,b)},f.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},f.onBufferCreated=function(b,C){var I=C.tracks.audio;I&&(this.mediaBuffer=I.buffer),C.tracks.video&&(this.videoBuffer=C.tracks.video.buffer)},f.onFragBuffered=function(b,C){var I=C.frag,j=C.part;if(I.type!==i.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(I)){this.warn("Fragment "+I.sn+(j?" p: "+j.index:"")+" of level "+I.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}I.sn!=="initSegment"&&(this.fragPrevious=I,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(I,j)},f.onError=function(b,C){switch(C.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.AUDIO,C);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==p.State.ERROR&&this.state!==p.State.STOPPED&&(this.state=C.fatal?p.State.ERROR:p.State.IDLE,this.warn(C.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(C.parent==="audio"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var I=!0,j=this.getFwdBufferInfo(this.mediaBuffer,i.PlaylistLevelType.AUDIO);j&&j.len>.5&&(I=!this.reduceMaxBufferLength(j.len)),I&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},f.onBufferFlushed=function(b,C){var I=C.type;I===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},f._handleTransmuxComplete=function(b){var C,I="audio",j=this.hls,M=b.remuxResult,z=b.chunkMeta,G=this.getCurrentContext(z);if(!G){this.warn("The loading context changed while buffering fragment "+z.sn+" of level "+z.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(z.level);return}var B=G.frag,K=G.part,F=M.audio,H=M.text,W=M.id3,Q=M.initSegment;if(this.fragContextChanged(B))return;if(this.state=p.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),Q!=null&&Q.tracks&&(this._bufferInitSegment(Q.tracks,B,z),j.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:I,tracks:Q.tracks})),F){var ee=F.startPTS,q=F.endPTS,pe=F.startDTS,ye=F.endDTS;K&&(K.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:q,startDTS:pe,endDTS:ye}),B.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ee,q,pe,ye),this.bufferFragmentData(F,B,K,z)}if(W!=null&&(C=W.samples)!==null&&C!==void 0&&C.length){var ie=l({frag:B,id:I},W);j.trigger(s.Events.FRAG_PARSING_METADATA,ie)}if(H){var Se=l({frag:B,id:I},H);j.trigger(s.Events.FRAG_PARSING_USERDATA,Se)}},f._bufferInitSegment=function(b,C,I){if(this.state!==p.State.PARSING)return;b.video&&delete b.video;var j=b.audio;if(!j)return;j.levelCodec=j.codec,j.id="audio",this.log("Init audio buffer, container:"+j.container+", codecs[parsed]=["+j.codec+"]"),this.hls.trigger(s.Events.BUFFER_CODECS,b);var M=j.initSegment;if(M!=null&&M.byteLength){var z={type:"audio",frag:C,part:null,chunkMeta:I,parent:C.type,data:M};this.hls.trigger(s.Events.BUFFER_APPENDING,z)}this.tick()},f.loadFragment=function(b,C,I){var j=this.fragmentTracker.getState(b);this.fragCurrent=b,(this.audioSwitch||j===v.FragmentState.NOT_LOADED||j===v.FragmentState.PARTIAL)&&(b.sn==="initSegment"?this._loadInitSegment(b):C.live&&!Object(D.isFiniteNumber)(this.initPTS[b.cc])?(this.log("Waiting for video PTS in continuity counter "+b.cc+" of live stream before loading audio fragment "+b.sn+" of level "+this.trackId),this.state=p.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,b,C,I)))},f.completeAudioSwitch=function(){var b=this.hls,C=this.media,I=this.trackId;C&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,b.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:I})},O}(p.default);c.default=a},"./src/controller/audio-track-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/events.ts"),p=_("./src/errors.ts"),s=_("./src/controller/base-playlist-controller.ts"),S=_("./src/types/loader.ts");function v(y,g){for(var w=0;w<g.length;w++){var m=g[w];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}function o(y,g,w){return g&&v(y.prototype,g),w&&v(y,w),y}function i(y,g){y.prototype=Object.create(g.prototype),y.prototype.constructor=y,r(y,g)}function r(y,g){return r=Object.setPrototypeOf||function(m,d){return m.__proto__=d,m},r(y,g)}var h=function(y){i(g,y);function g(m){var d;return d=y.call(this,m,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var w=g.prototype;return w.registerListeners=function(){var d=this.hls;d.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(D.Events.ERROR,this.onError,this)},w.unregisterListeners=function(){var d=this.hls;d.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(D.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(D.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(D.Events.ERROR,this.onError,this)},w.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,y.prototype.destroy.call(this)},w.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},w.onManifestParsed=function(d,n){this.tracks=n.audioTracks||[]},w.onAudioTrackLoaded=function(d,n){var l=n.id,u=n.details,T=this.tracksInGroup[l];if(!T){this.warn("Invalid audio track id "+l);return}var E=T.details;T.details=n.details,this.log("audioTrack "+l+" loaded ["+u.startSN+"-"+u.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,n,E))},w.onLevelLoading=function(d,n){this.switchLevel(n.level)},w.onLevelSwitching=function(d,n){this.switchLevel(n.level)},w.switchLevel=function(d){var n=this.hls.levels[d];if(!(n!=null&&n.audioGroupIds))return;var l=n.audioGroupIds[n.urlId];if(this.groupId!==l){this.groupId=l;var u=this.tracks.filter(function(E){return!l||E.groupId===l});this.selectDefaultTrack&&!u.some(function(E){return E.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var T={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(D.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},w.onError=function(d,n){if(y.prototype.onError.call(this,d,n),n.fatal||!n.context)return;n.context.type===S.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},w.setAudioTrack=function(d){var n=this.tracksInGroup;if(d<0||d>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=n[this.trackId];this.log("Now switching to audio-track index "+d);var u=n[d],T=u.id,E=u.groupId,a=E===void 0?"":E,L=u.name,O=u.type,f=u.url;if(this.trackId=d,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(D.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:a,name:L,type:O,url:f}),u.details&&!u.details.live)return;var x=this.switchParams(u.url,l==null?void 0:l.details);this.loadPlaylist(x)},w.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,l=this.findTrackId(n)||this.findTrackId();l!==-1?this.setAudioTrack(l):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},w.findTrackId=function(d){for(var n=this.tracksInGroup,l=0;l<n.length;l++){var u=n[l];if((!this.selectDefaultTrack||u.default)&&(!d||d===u.name))return u.id}return-1},w.loadPlaylist=function(d){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var l=n.id,u=n.groupId,T=n.url;if(d)try{T=d.addDirectives(T)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(D.Events.AUDIO_TRACK_LOADING,{url:T,id:l,groupId:u,deliveryDirectives:d||null})}},o(g,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1,this.setAudioTrack(d)}}]),g}(s.default);c.default=h},"./src/controller/base-playlist-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return o});var D=_("./src/polyfills/number.ts"),p=_("./src/types/level.ts"),s=_("./src/controller/level-helper.ts"),S=_("./src/utils/logger.ts"),v=_("./src/errors.ts"),o=function(){function i(h,y){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=S.logger.log.bind(S.logger,y+":"),this.warn=S.logger.warn.bind(S.logger,y+":"),this.hls=h}var r=i.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(y,g){g.fatal&&g.type===v.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},r.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},r.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},r.stopLoad=function(){this.canLoad=!1,this.clearTimer()},r.switchParams=function(y,g){var w=g==null?void 0:g.renditionReports;if(w)for(var m=0;m<w.length;m++){var d=w[m],n=""+d.URI;if(n===y.substr(-n.length)){var l=parseInt(d["LAST-MSN"]),u=parseInt(d["LAST-PART"]);if(g&&this.hls.config.lowLatencyMode){var T=Math.min(g.age-g.partTarget,g.targetduration);u!==void 0&&T>g.partTarget&&(u+=1)}if(Object(D.isFiniteNumber)(l))return new p.HlsUrlParameters(l,Object(D.isFiniteNumber)(u)?u:void 0,p.HlsSkip.No)}}},r.loadPlaylist=function(y){},r.shouldLoadTrack=function(y){return this.canLoad&&y&&!!y.url&&(!y.details||y.details.live)},r.playlistLoaded=function(y,g,w){var m=this,d=g.details,n=g.stats,l=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(d.advancedDateTime=Date.now()-l,d.live||w!=null&&w.live){if(d.reloaded(w),w&&this.log("live playlist "+y+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),w&&d.fragments.length>0&&Object(s.mergeDetails)(w,d),!this.canLoad||!d.live)return;var u,T=void 0,E=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var a=this.hls.config.lowLatencyMode,L=d.lastPartSn,O=d.endSN,f=d.lastPartIndex,x=f!==-1,b=L===O,C=a?0:f;x?(T=b?O+1:L,E=b?C:f+1):T=O+1;var I=d.age,j=I+d.ageHeader,M=Math.min(j-d.partTarget,d.targetduration*1.5);if(M>0){if(w&&M>w.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+w.tuneInGoal+" to: "+M+" with playlist age: "+d.age),M=0;else{var z=Math.floor(M/d.targetduration);if(T+=z,E!==void 0){var G=Math.round(M%d.targetduration/d.partTarget);E+=G}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+I.toFixed(2)+"s goal: "+M+" skip sn "+z+" to part "+E)}d.tuneInGoal=M}if(u=this.getDeliveryDirectives(d,g.deliveryDirectives,T,E),a||!b){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(d,g.deliveryDirectives,T,E);var B=Object(s.computeReloadInterval)(d,n);T!==void 0&&d.canBlockReload&&(B-=d.partTarget||1),this.log("reload live playlist "+y+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return m.loadPlaylist(u)},B)}else this.clearTimer()},r.getDeliveryDirectives=function(y,g,w,m){var d=Object(p.getSkipValue)(y,w);return g!=null&&g.skip&&y.deltaUpdateFailed&&(w=g.msn,m=g.part,d=p.HlsSkip.No),new p.HlsUrlParameters(w,m,d)},r.retryLoadingOrFail=function(y){var g=this,w=this.hls.config,m=this.retryCount<w.levelLoadingMaxRetry;if(m){var d;if(this.retryCount++,y.details.indexOf("LoadTimeOut")>-1&&(d=y.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+y.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*w.levelLoadingRetryDelay,w.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return g.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+y.details+'"')}}else this.warn('cannot recover from error "'+y.details+'"'),this.clearTimer(),y.fatal=!0;return m},i}()},"./src/controller/base-stream-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"State",function(){return O}),_.d(c,"default",function(){return f});var D=_("./src/polyfills/number.ts"),p=_("./src/task-loop.ts"),s=_("./src/controller/fragment-tracker.ts"),S=_("./src/utils/buffer-helper.ts"),v=_("./src/utils/logger.ts"),o=_("./src/events.ts"),i=_("./src/errors.ts"),r=_("./src/types/transmuxer.ts"),h=_("./src/utils/mp4-tools.ts"),y=_("./src/utils/discontinuities.ts"),g=_("./src/controller/fragment-finders.ts"),w=_("./src/controller/level-helper.ts"),m=_("./src/loader/fragment-loader.ts"),d=_("./src/crypt/decrypter.ts"),n=_("./src/utils/time-ranges.ts"),l=_("./src/types/loader.ts");function u(x,b){for(var C=0;C<b.length;C++){var I=b[C];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(x,I.key,I)}}function T(x,b,C){return b&&u(x.prototype,b),C&&u(x,C),x}function E(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function a(x,b){x.prototype=Object.create(b.prototype),x.prototype.constructor=x,L(x,b)}function L(x,b){return L=Object.setPrototypeOf||function(I,j){return I.__proto__=j,I},L(x,b)}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"},f=function(x){a(b,x);function b(I,j,M){var z;return z=x.call(this)||this,z.hls=void 0,z.fragPrevious=null,z.fragCurrent=null,z.fragmentTracker=void 0,z.transmuxer=null,z._state=O.STOPPED,z.media=void 0,z.mediaBuffer=void 0,z.config=void 0,z.bitrateTest=!1,z.lastCurrentTime=0,z.nextLoadPosition=0,z.startPosition=0,z.loadedmetadata=!1,z.fragLoadError=0,z.retryDate=0,z.levels=null,z.fragmentLoader=void 0,z.levelLastLoaded=null,z.startFragRequested=!1,z.decrypter=void 0,z.initPTS=[],z.onvseeking=null,z.onvended=null,z.logPrefix="",z.log=void 0,z.warn=void 0,z.logPrefix=M,z.log=v.logger.log.bind(v.logger,M+":"),z.warn=v.logger.warn.bind(v.logger,M+":"),z.hls=I,z.fragmentLoader=new m.default(I.config),z.fragmentTracker=j,z.config=I.config,z.decrypter=new d.default(I,I.config),I.on(o.Events.KEY_LOADED,z.onKeyLoaded,E(z)),z}var C=b.prototype;return C.doTick=function(){this.onTickEnd()},C.onTickEnd=function(){},C.startLoad=function(j){},C.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED},C._streamEnded=function(j,M){var z=this.fragCurrent,G=this.fragmentTracker;if(!M.live&&z&&z.sn===M.endSN&&!j.nextStart){var B=G.getState(z);return B===s.FragmentState.PARTIAL||B===s.FragmentState.OK}return!1},C.onMediaAttached=function(j,M){var z=this.media=this.mediaBuffer=M.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),z.addEventListener("seeking",this.onvseeking),z.addEventListener("ended",this.onvended);var G=this.config;this.levels&&G.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(G.startPosition)},C.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},C.onMediaSeeking=function(){var j=this.config,M=this.fragCurrent,z=this.media,G=this.mediaBuffer,B=this.state,K=z?z.currentTime:0,F=S.BufferHelper.bufferInfo(G||z,K,j.maxBufferHole);if(this.log("media seeking to "+(Object(D.isFiniteNumber)(K)?K.toFixed(3):K)+", state: "+B),B===O.ENDED)this.resetLoadingState();else if(M&&!F.len){var H=j.maxFragLookUpTolerance,W=M.start-H,Q=M.start+M.duration+H,ee=K>Q;(K<W||ee)&&(ee&&M.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),M.loader.abort()),this.resetLoadingState())}z&&(this.lastCurrentTime=K),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=K),this.tickImmediate()},C.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},C.onKeyLoaded=function(j,M){if(this.state!==O.KEY_LOADING||M.frag!==this.fragCurrent||!this.levels)return;this.state=O.IDLE;var z=this.levels[M.frag.level].details;z&&this.loadFragment(M.frag,z,M.frag.start)},C.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},C.onHandlerDestroyed=function(){this.state=O.STOPPED,this.hls.off(o.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,x.prototype.onHandlerDestroyed.call(this)},C.loadKey=function(j,M){this.log("Loading key for "+j.sn+" of ["+M.startSN+"-"+M.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=O.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(o.Events.KEY_LOADING,{frag:j})},C.loadFragment=function(j,M,z){this._loadFragForPlayback(j,M,z)},C._loadFragForPlayback=function(j,M,z){var G=this,B=function(F){if(G.fragContextChanged(j)){G.warn("Fragment "+j.sn+(F.part?" p: "+F.part.index:"")+" of level "+j.level+" was dropped during download."),G.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,G._handleFragmentLoadProgress(F)};this._doFragLoad(j,M,z,B).then(function(K){if(!K)return;G.fragLoadError=0;var F=G.state;if(G.fragContextChanged(j)){(F===O.FRAG_LOADING||F===O.BACKTRACKING||!G.fragCurrent&&F===O.PARSING)&&(G.fragmentTracker.removeFragment(j),G.state=O.IDLE);return}if("payload"in K&&(G.log("Loaded fragment "+j.sn+" of level "+j.level),G.hls.trigger(o.Events.FRAG_LOADED,K),G.state===O.BACKTRACKING)){G.fragmentTracker.backtrack(j,K),G.resetFragmentLoading(j);return}G._handleFragmentLoadComplete(K)}).catch(function(K){G.warn(K),G.resetFragmentLoading(j)})},C.flushMainBuffer=function(j,M,z){if(z===void 0&&(z=null),!(j-M))return;var G={startOffset:j,endOffset:M,type:z};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,G)},C._loadInitSegment=function(j){var M=this;this._doFragLoad(j).then(function(z){if(!z||M.fragContextChanged(j)||!M.levels)throw new Error("init load aborted");return z}).then(function(z){var G=M.hls,B=z.payload,K=j.decryptdata;if(B&&B.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var F=self.performance.now();return M.decrypter.webCryptoDecrypt(new Uint8Array(B),K.key.buffer,K.iv.buffer).then(function(H){var W=self.performance.now();return G.trigger(o.Events.FRAG_DECRYPTED,{frag:j,payload:H,stats:{tstart:F,tdecrypt:W}}),z.payload=H,z})}return z}).then(function(z){var G=M.fragCurrent,B=M.hls,K=M.levels;if(!K)throw new Error("init load aborted, missing levels");var F=K[j.level].details;console.assert(F,"Level details are defined when init segment is loaded");var H=j.stats;M.state=O.IDLE,M.fragLoadError=0,j.data=new Uint8Array(z.payload),H.parsing.start=H.buffering.start=self.performance.now(),H.parsing.end=H.buffering.end=self.performance.now(),z.frag===G&&B.trigger(o.Events.FRAG_BUFFERED,{stats:H,frag:G,part:null,id:j.type}),M.tick()}).catch(function(z){M.warn(z),M.resetFragmentLoading(j)})},C.fragContextChanged=function(j){var M=this.fragCurrent;return!j||!M||j.level!==M.level||j.sn!==M.sn||j.urlId!==M.urlId},C.fragBufferedComplete=function(j,M){var z=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(M?" part: "+M.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+n.default.toString(S.BufferHelper.getBuffered(z))),this.state=O.IDLE,this.tick()},C._handleFragmentLoadComplete=function(j){var M=this.transmuxer;if(!M)return;var z=j.frag,G=j.part,B=j.partsLoaded,K=!B||B.length===0||B.some(function(H){return!H}),F=new r.ChunkMetadata(z.level,z.sn,z.stats.chunkCount+1,0,G?G.index:-1,!K);M.flush(F)},C._handleFragmentLoadProgress=function(j){},C._doFragLoad=function(j,M,z,G){var B=this;if(z===void 0&&(z=null),!this.levels)throw new Error("frag load aborted, missing levels");if(z=Math.max(j.start,z||0),this.config.lowLatencyMode&&M){var K=M.partList;if(K&&G){z>j.end&&M.fragmentHint&&(j=M.fragmentHint);var F=this.getNextPart(K,j,z);if(F>-1){var H=K[F];return this.log("Loading part sn: "+j.sn+" p: "+H.index+" cc: "+j.cc+" of playlist ["+M.startSN+"-"+M.endSN+"] parts [0-"+F+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(z.toFixed(3))),this.nextLoadPosition=H.start+H.duration,this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,part:K[F],targetBufferTime:z}),this.doFragPartsLoad(j,K,F,G).catch(function(W){return B.handleFragLoadError(W)})}else if(!j.url||this.loadedEndOfParts(K,z))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(M?"of ["+M.startSN+"-"+M.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(z.toFixed(3))),Object(D.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=O.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,targetBufferTime:z}),this.fragmentLoader.load(j,G).catch(function(W){return B.handleFragLoadError(W)})},C.doFragPartsLoad=function(j,M,z,G){var B=this;return new Promise(function(K,F){var H=[],W=function Q(ee){var q=M[ee];B.fragmentLoader.loadPart(j,q,G).then(function(pe){H[q.index]=pe;var ye=pe.part;B.hls.trigger(o.Events.FRAG_LOADED,pe);var ie=M[ee+1];if(ie&&ie.fragment===j)Q(ee+1);else return K({frag:j,part:ye,partsLoaded:H})}).catch(F)};W(z)})},C.handleFragLoadError=function(j){var M=j.data;return M&&M.details===i.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(M.frag,M.part):this.hls.trigger(o.Events.ERROR,M),null},C._handleTransmuxerFlush=function(j){var M=this.getCurrentContext(j);if(!M||this.state!==O.PARSING){this.fragCurrent||(this.state=O.IDLE);return}var z=M.frag,G=M.part,B=M.level,K=self.performance.now();z.stats.parsing.end=K,G&&(G.stats.parsing.end=K),this.updateLevelTiming(z,G,B,j.partial)},C.getCurrentContext=function(j){var M=this.levels,z=j.level,G=j.sn,B=j.part;if(!M||!M[z])return this.warn("Levels object was unset while buffering fragment "+G+" of level "+z+". The current chunk will not be buffered."),null;var K=M[z],F=B>-1?Object(w.getPartWith)(K,G,B):null,H=F?F.fragment:Object(w.getFragmentWithSN)(K,G,this.fragCurrent);return H?{frag:H,part:F,level:K}:null},C.bufferFragmentData=function(j,M,z,G){if(!j||this.state!==O.PARSING)return;var B=j.data1,K=j.data2,F=B;if(B&&K&&(F=Object(h.appendUint8Array)(B,K)),!F||!F.length)return;var H={type:j.type,frag:M,part:z,chunkMeta:G,parent:M.type,data:F};this.hls.trigger(o.Events.BUFFER_APPENDING,H),j.dropped&&j.independent&&!z&&this.flushBufferGap(M)},C.flushBufferGap=function(j){var M=this.media;if(!M)return;if(!S.BufferHelper.isBuffered(M,M.currentTime)){this.flushMainBuffer(0,j.start);return}var z=M.currentTime,G=S.BufferHelper.bufferInfo(M,z,0),B=j.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),F=Math.max(Math.min(j.start-K,G.end-K),z+K);j.start-F>K&&this.flushMainBuffer(F,j.start)},C.getFwdBufferInfo=function(j,M){var z=this.config,G=this.getLoadPosition();if(!Object(D.isFiniteNumber)(G))return null;var B=S.BufferHelper.bufferInfo(j,G,z.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(G,M);if(K&&B.nextStart<K.end)return S.BufferHelper.bufferInfo(j,G,Math.max(B.nextStart,z.maxBufferHole))}return B},C.getMaxBufferLength=function(j){var M=this.config,z;return j?z=Math.max(8*M.maxBufferSize/j,M.maxBufferLength):z=M.maxBufferLength,Math.min(z,M.maxMaxBufferLength)},C.reduceMaxBufferLength=function(j){var M=this.config,z=j||M.maxBufferLength;return M.maxMaxBufferLength>=z?(M.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+M.maxMaxBufferLength+"s"),!0):!1},C.getNextFragment=function(j,M){var z,G,B=M.fragments,K=B.length;if(!K)return null;var F=this.config,H=B[0].start,W;if(M.live){var Q=F.initialLiveManifestSize;if(K<Q)return this.warn("Not enough fragments to start playback (have: "+K+", need: "+Q+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(W=this.getInitialLiveFragment(M,B),this.startPosition=W?this.hls.liveSyncPosition||W.start:j)}else j<=H&&(W=B[0]);if(!W){var ee=F.lowLatencyMode?M.partEnd:M.fragmentEnd;W=this.getFragmentAtPosition(j,ee,M)}return(z=W)!==null&&z!==void 0&&z.initSegment&&!((G=W)!==null&&G!==void 0&&G.initSegment.data)&&!this.bitrateTest&&(W=W.initSegment),W},C.getNextPart=function(j,M,z){for(var G=-1,B=!1,K=!0,F=0,H=j.length;F<H;F++){var W=j[F];if(K=K&&!W.independent,G>-1&&z<W.start)break;var Q=W.loaded;!Q&&(B||W.independent||K)&&W.fragment===M&&(G=F),B=Q}return G},C.loadedEndOfParts=function(j,M){var z=j[j.length-1];return z&&M>z.start&&z.loaded},C.getInitialLiveFragment=function(j,M){var z=this.fragPrevious,G=null;if(z){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+z.programDateTime),G=Object(g.findFragmentByPDT)(M,z.endProgramDateTime,this.config.maxFragLookUpTolerance)),!G){var B=z.sn+1;if(B>=j.startSN&&B<=j.endSN){var K=M[B-j.startSN];z.cc===K.cc&&(G=K,this.log("Live playlist, switching playlist, load frag with next SN: "+G.sn))}G||(G=Object(g.findFragWithCC)(M,z.cc),G&&this.log("Live playlist, switching playlist, load frag with same CC: "+G.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(G=this.getFragmentAtPosition(F,this.bitrateTest?j.fragmentEnd:j.edge,j))}return G},C.getFragmentAtPosition=function(j,M,z){var G=this.config,B=this.fragPrevious,K=z.fragments,F=z.endSN,H=z.fragmentHint,W=G.maxFragLookUpTolerance,Q=!!(G.lowLatencyMode&&z.partList&&H);Q&&H&&!this.bitrateTest&&(K=K.concat(H),F=H.sn);var ee;if(j<M){var q=j>M-W?0:W;ee=Object(g.findFragmentByPTS)(B,K,j,q)}else ee=K[K.length-1];if(ee){var pe=ee.sn-z.startSN,ye=B&&ee.level===B.level,ie=K[pe+1],Se=this.fragmentTracker.getState(ee);if(Se===s.FragmentState.BACKTRACKED){ee=null;for(var ge=pe;K[ge]&&this.fragmentTracker.getState(K[ge])===s.FragmentState.BACKTRACKED;)B?ee=K[ge--]:ee=K[--ge];ee||(ee=ie)}else B&&ee.sn===B.sn&&!Q&&(ye&&(ee.sn<F&&this.fragmentTracker.getState(ie)!==s.FragmentState.OK?(this.log("SN "+ee.sn+" just loaded, load next one: "+ie.sn),ee=ie):ee=null))}return ee},C.synchronizeToLiveEdge=function(j){var M=this.config,z=this.media;if(!z)return;var G=this.hls.liveSyncPosition,B=z.currentTime,K=j.fragments[0].start,F=j.edge,H=B>=K-M.maxFragLookUpTolerance&&B<=F;if(G!==null&&z.duration>G&&(B<G||!H)){var W=M.liveMaxLatencyDuration!==void 0?M.liveMaxLatencyDuration:M.liveMaxLatencyDurationCount*j.targetduration;(!H&&z.readyState<4||B<F-W)&&(this.loadedmetadata||(this.nextLoadPosition=G),z.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+G.toFixed(3)),z.currentTime=G))}},C.alignPlaylists=function(j,M){var z=this.levels,G=this.levelLastLoaded,B=this.fragPrevious,K=G!==null?z[G]:null,F=j.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var H=j.fragments[0].start,W=!M,Q=j.alignedSliding&&Object(D.isFiniteNumber)(H);if(W||!Q&&!H){Object(y.alignStream)(B,K,j);var ee=j.fragments[0].start;return this.log("Live playlist sliding: "+ee.toFixed(2)+" start-sn: "+(M?M.startSN:"na")+"->"+j.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+F),ee}return H},C.waitForCdnTuneIn=function(j){var M=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*M)},C.setStartPosition=function(j,M){var z=this.startPosition;if(z<M&&(z=-1),z===-1||this.lastCurrentTime===-1){var G=j.startTimeOffset;Object(D.isFiniteNumber)(G)?(z=M+G,G<0&&(z+=j.totalduration),z=Math.min(Math.max(M,z),M+j.totalduration),this.log("Start time offset "+G+" found in playlist, adjust startPosition to "+z),this.startPosition=z):j.live?z=this.hls.liveSyncPosition||M:this.startPosition=z=0,this.lastCurrentTime=z}this.nextLoadPosition=z},C.getLoadPosition=function(){var j=this.media,M=0;return this.loadedmetadata&&j?M=j.currentTime:this.nextLoadPosition&&(M=this.nextLoadPosition),M},C.handleFragLoadAborted=function(j,M){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(M?" part"+M.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},C.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=O.IDLE)},C.onFragmentOrKeyLoadError=function(j,M){if(M.fatal)return;var z=M.frag;if(!z||z.type!==j)return;var G=this.fragCurrent;console.assert(G&&z.sn===G.sn&&z.level===G.level&&z.urlId===G.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(z.level))return;var K=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+z.sn+" of "+j+" "+z.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=O.FRAG_LOADING_WAITING_RETRY}else M.levelRetry?(j===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=O.IDLE):(v.logger.error(M.details+" reaches max retry, redispatch as fatal ..."),M.fatal=!0,this.hls.stopLoad(),this.state=O.ERROR)},C.afterBufferFlushed=function(j,M,z){if(!j)return;var G=S.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(M,G,z),this.state===O.ENDED&&this.resetLoadingState()},C.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE},C.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var M=this.levels?this.levels[j].details:null;if(M!=null&&M.live)return this.startPosition=-1,this.setStartPosition(M,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},C.updateLevelTiming=function(j,M,z,G){var B=this,K=z.details;console.assert(!!K,"level.details must be defined");var F=Object.keys(j.elementaryStreams).reduce(function(H,W){var Q=j.elementaryStreams[W];if(Q){var ee=Q.endPTS-Q.startPTS;if(ee<=0)return B.warn("Could not parse fragment "+j.sn+" "+W+" duration reliably ("+ee+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),H||!1;var q=G?0:Object(w.updateFragPTSDTS)(K,j,Q.startPTS,Q.endPTS,Q.startDTS,Q.endDTS);return B.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:K,level:z,drift:q,type:W,frag:j,start:Q.startPTS,end:Q.endPTS}),!0}return H},!1);F?(this.state=O.PARSED,this.hls.trigger(o.Events.FRAG_PARSED,{frag:j,part:M})):this.resetLoadingState()},C.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},T(b,[{key:"state",get:function(){return this._state},set:function(j){var M=this._state;M!==j&&(this._state=j,this.log(M+"->"+j))}}]),b}(p.default)},"./src/controller/buffer-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return g});var D=_("./src/polyfills/number.ts"),p=_("./src/events.ts"),s=_("./src/utils/logger.ts"),S=_("./src/errors.ts"),v=_("./src/utils/buffer-helper.ts"),o=_("./src/utils/mediasource-helper.ts"),i=_("./src/loader/fragment.ts"),r=_("./src/controller/buffer-operation-queue.ts"),h=Object(o.getMediaSource)(),y=/([ha]vc.)(?:\.[^.,]+)+/,g=function(){function w(d){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 l=n.hls,u=n.media,T=n.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),u&&(n.updateMediaElementDuration(),l.trigger(p.Events.MEDIA_ATTACHED,{media:u})),T&&T.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=d,this._initSourceBuffer(),this.registerListeners()}var m=w.prototype;return m.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},m.destroy=function(){this.unregisterListeners(),this.details=null},m.registerListeners=function(){var n=this.hls;n.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(p.Events.BUFFER_RESET,this.onBufferReset,this),n.on(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(p.Events.BUFFER_EOS,this.onBufferEos,this),n.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(p.Events.FRAG_PARSED,this.onFragParsed,this),n.on(p.Events.FRAG_CHANGED,this.onFragChanged,this)},m.unregisterListeners=function(){var n=this.hls;n.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(p.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(p.Events.BUFFER_RESET,this.onBufferReset,this),n.off(p.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(p.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(p.Events.BUFFER_EOS,this.onBufferEos,this),n.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(p.Events.FRAG_PARSED,this.onFragParsed,this),n.off(p.Events.FRAG_CHANGED,this.onFragChanged,this)},m._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},m.onManifestParsed=function(n,l){var u=2;(l.audio&&!l.video||!l.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},m.onMediaAttaching=function(n,l){var u=this.media=l.media;if(u&&h){var T=this.mediaSource=new h;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(T),this._objectUrl=u.src}},m.onMediaDetaching=function(){var n=this.media,l=this.mediaSource,u=this._objectUrl;if(l){if(s.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(T){s.logger.warn("[buffer-controller]: onMediaDetaching: "+T.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(u&&self.URL.revokeObjectURL(u),n.src===u?(n.removeAttribute("src"),n.load()):s.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(p.Events.MEDIA_DETACHED,void 0)},m.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(l){var u=n.sourceBuffer[l];try{u&&(n.removeBufferListeners(l),n.mediaSource&&n.mediaSource.removeSourceBuffer(u),n.sourceBuffer[l]=void 0)}catch(T){s.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",T)}}),this._initSourceBuffer()},m.onBufferCodecs=function(n,l){var u=this,T=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(E){if(T){var a=u.tracks[E];if(a&&typeof a.buffer.changeType=="function"){var L=l[E],O=L.codec,f=L.levelCodec,x=L.container,b=(a.levelCodec||a.codec).replace(y,"$1"),C=(f||O).replace(y,"$1");if(b!==C){var I=x+";codecs="+(f||O);u.appendChangeType(E,I)}}}else u.pendingTracks[E]=l[E]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},m.appendChangeType=function(n,l){var u=this,T=this.operationQueue,E={execute:function(){var L=u.sourceBuffer[n];L&&(s.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+l),L.changeType(l)),T.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(L){s.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",L)}};T.append(E,n)},m.onBufferAppending=function(n,l){var u=this,T=this.hls,E=this.operationQueue,a=this.tracks,L=l.data,O=l.type,f=l.frag,x=l.part,b=l.chunkMeta,C=b.buffering[O],I=self.performance.now();C.start=I;var j=f.stats.buffering,M=x?x.stats.buffering:null;j.start===0&&(j.start=I),M&&M.start===0&&(M.start=I);var z=a.audio,G=O==="audio"&&b.id===1&&(z==null?void 0:z.container)==="audio/mpeg",B={execute:function(){if(C.executeStart=self.performance.now(),G){var F=u.sourceBuffer[O];if(F){var H=f.start-F.timestampOffset;Math.abs(H)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+f.start+" (delta: "+H+") sn: "+f.sn+")"),F.timestampOffset=f.start)}}u.appendExecutor(L,O)},onStart:function(){},onComplete:function(){var F=self.performance.now();C.executeEnd=C.end=F,j.first===0&&(j.first=F),M&&M.first===0&&(M.first=F);var H=u.sourceBuffer,W={};for(var Q in H)W[Q]=v.BufferHelper.getBuffered(H[Q]);u.appendError=0,u.hls.trigger(p.Events.BUFFER_APPENDED,{type:O,frag:f,part:x,chunkMeta:b,parent:f.type,timeRanges:W})},onError:function(F){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+O+" SourceBuffer",F);var H={type:S.ErrorTypes.MEDIA_ERROR,parent:f.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?H.details=S.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,H.details=S.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>T.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),H.fatal=!0)),T.trigger(p.Events.ERROR,H)}};E.append(B,O)},m.onBufferFlushing=function(n,l){var u=this,T=this.operationQueue,E=function(L){return{execute:u.removeExecutor.bind(u,L,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(p.Events.BUFFER_FLUSHED,{type:L})},onError:function(f){s.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",f)}}};l.type?T.append(E(l.type),l.type):this.getSourceBufferTypes().forEach(function(a){T.append(E(a),a)})},m.onFragParsed=function(n,l){var u=this,T=l.frag,E=l.part,a=[],L=E?E.elementaryStreams:T.elementaryStreams;L[i.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(L[i.ElementaryStreamTypes.AUDIO]&&a.push("audio"),L[i.ElementaryStreamTypes.VIDEO]&&a.push("video"));var O=function(){var x=self.performance.now();T.stats.buffering.end=x,E&&(E.stats.buffering.end=x);var b=E?E.stats:T.stats;u.hls.trigger(p.Events.FRAG_BUFFERED,{frag:T,part:E,stats:b,id:T.type})};a.length===0&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(O,a)},m.onFragChanged=function(n,l){this.flushBackBuffer()},m.onBufferEos=function(n,l){var u=this,T=this.getSourceBufferTypes().reduce(function(E,a){var L=u.sourceBuffer[a];return(!l.type||l.type===a)&&(L&&!L.ended&&(L.ended=!0,s.logger.log("[buffer-controller]: "+a+" sourceBuffer now EOS"))),E&&!!(!L||L.ended)},!0);T&&this.blockBuffers(function(){var E=u.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},m.onLevelUpdated=function(n,l){var u=l.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},m.flushBackBuffer=function(){var n=this.hls,l=this.details,u=this.media,T=this.sourceBuffer;if(!u||l===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var a=l.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(D.isFiniteNumber)(a)||a<0)return;var L=u.currentTime,O=l.levelTargetDuration,f=Math.max(a,O),x=Math.floor(L/O)*O-f;E.forEach(function(b){var C=T[b];if(C){var I=v.BufferHelper.getBuffered(C);I.length>0&&x>I.start(0)&&(n.trigger(p.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),l.live&&n.trigger(p.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),n.trigger(p.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:b}))}})},m.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,l=this.hls,u=this.media,T=this.mediaSource,E=n.fragments[0].start+n.totalduration,a=u.duration,L=Object(D.isFiniteNumber)(T.duration)?T.duration:0;n.live&&l.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(n)):(E>L&&E>a||!Object(D.isFiniteNumber)(a))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),T.duration=E)},m.updateSeekableRange=function(n){var l=this.mediaSource,u=n.fragments,T=u.length;if(T&&n.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var E=Math.max(0,u[0].start),a=Math.max(E,E+n.totalduration);l.setLiveSeekableRange(E,a)}},m.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,l=this.operationQueue,u=this.pendingTracks,T=Object.keys(u).length;if(T&&!n||T===2){this.createSourceBuffers(u),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(a){l.executeNext(a)})}},m.createSourceBuffers=function(n){var l=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var E in n)if(!l[E]){var a=n[E];if(!a)throw Error("source buffer exists for track "+E+", however track does not");var L=a.levelCodec||a.codec,O=a.container+";codecs="+L;s.logger.log("[buffer-controller]: creating sourceBuffer("+O+")");try{var f=l[E]=u.addSourceBuffer(O),x=E;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[E]={buffer:f,codec:L,container:a.container,levelCodec:a.levelCodec,id:a.id},T++}catch(b){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+b.message),this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:b,mimeType:O})}}T&&this.hls.trigger(p.Events.BUFFER_CREATED,{tracks:this.tracks})},m._onSBUpdateStart=function(n){var l=this.operationQueue,u=l.current(n);u.onStart()},m._onSBUpdateEnd=function(n){var l=this.operationQueue,u=l.current(n);u.onComplete(),l.shiftAndExecuteNext(n)},m._onSBUpdateError=function(n,l){s.logger.error("[buffer-controller]: "+n+" SourceBuffer error",l),this.hls.trigger(p.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(n);u&&u.onError(l)},m.removeExecutor=function(n,l,u){var T=this.media,E=this.mediaSource,a=this.operationQueue,L=this.sourceBuffer,O=L[n];if(!T||!E||!O){s.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(n);return}var f=Object(D.isFiniteNumber)(T.duration)?T.duration:Infinity,x=Object(D.isFiniteNumber)(E.duration)?E.duration:Infinity,b=Math.max(0,l),C=Math.min(u,f,x);C>b?(s.logger.log("[buffer-controller]: Removing ["+b+","+C+"] from the "+n+" SourceBuffer"),console.assert(!O.updating,n+" sourceBuffer must not be updating"),O.remove(b,C)):a.shiftAndExecuteNext(n)},m.appendExecutor=function(n,l){var u=this.operationQueue,T=this.sourceBuffer,E=T[l];if(!E){s.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(l);return}E.ended=!1,console.assert(!E.updating,l+" sourceBuffer must not be updating"),E.appendBuffer(n)},m.blockBuffers=function(n,l){var u=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var T=this.operationQueue,E=l.map(function(a){return T.appendBlocker(a)});Promise.all(E).then(function(){n(),l.forEach(function(a){var L=u.sourceBuffer[a];(!L||!L.updating)&&T.shiftAndExecuteNext(a)})})},m.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},m.addBufferListener=function(n,l,u){var T=this.sourceBuffer[n];if(!T)return;var E=u.bind(this,n);this.listeners[n].push({event:l,listener:E}),T.addEventListener(l,E)},m.removeBufferListeners=function(n){var l=this.sourceBuffer[n];if(!l)return;this.listeners[n].forEach(function(u){l.removeEventListener(u.event,u.listener)})},w}()},"./src/controller/buffer-operation-queue.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return p});var D=_("./src/utils/logger.ts"),p=function(){function s(v){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=v}var S=s.prototype;return S.append=function(o,i){var r=this.queues[i];r.push(o),r.length===1&&this.buffers[i]&&this.executeNext(i)},S.insertAbort=function(o,i){var r=this.queues[i];r.unshift(o),this.executeNext(i)},S.appendBlocker=function(o){var i,r=new Promise(function(y){i=y}),h={execute:i,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(h,o),r},S.executeNext=function(o){var i=this.buffers,r=this.queues,h=i[o],y=r[o];if(y.length){var g=y[0];try{g.execute()}catch(w){D.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),g.onError(w),(!h||!h.updating)&&(y.shift(),this.executeNext(o))}}},S.shiftAndExecuteNext=function(o){this.queues[o].shift(),this.executeNext(o)},S.current=function(o){return this.queues[o][0]},s}()},"./src/controller/cap-level-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/events.ts");function p(v,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(v,r.key,r)}}function s(v,o,i){return o&&p(v.prototype,o),i&&p(v,i),v}var S=function(){function v(i){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=i,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var o=v.prototype;return o.setStreamController=function(r){this.streamController=r},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var r=this.hls;r.on(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var r=this.hls;r.off(D.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(r,h){v.isLevelAllowed(h.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(h.droppedLevel)},o.onMediaAttaching=function(r,h){this.media=h.media instanceof HTMLVideoElement?h.media:null},o.onManifestParsed=function(r,h){var y=this.hls;this.restrictedLevels=[],this.firstLevel=h.firstLevel,y.config.capLevelToPlayerSize&&h.video&&this.startCapping()},o.onBufferCodecs=function(r,h){var y=this.hls;y.config.capLevelToPlayerSize&&h.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var h=this.hls;h.autoLevelCapping=this.getMaxLevel(r.length-1),h.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=h.autoLevelCapping}}},o.getMaxLevel=function(r){var h=this,y=this.hls.levels;if(!y.length)return-1;var g=y.filter(function(w,m){return v.isLevelAllowed(m,h.restrictedLevels)&&m<=r});return this.clientRect=null,v.getMaxLevelByMediaSize(g,this.mediaWidth,this.mediaHeight)},o.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()},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,h={width:0,height:0};if(r){var y=r.getBoundingClientRect();h.width=y.width,h.height=y.height,!h.width&&!h.height&&(h.width=y.right-y.left||r.width||0,h.height=y.bottom-y.top||r.height||0)}return this.clientRect=h,h},v.isLevelAllowed=function(r,h){return h===void 0&&(h=[]),h.indexOf(r)===-1},v.getMaxLevelByMediaSize=function(r,h,y){if(!r||!r.length)return-1;for(var g=function(l,u){return u?l.width!==u.width||l.height!==u.height:!0},w=r.length-1,m=0;m<r.length;m+=1){var d=r[m];if((d.width>=h||d.height>=y)&&g(d,r[m+1])){w=m;break}}return w},s(v,[{key:"mediaWidth",get:function(){return this.getDimensions().width*v.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*v.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(h){}return r}}]),v}();c.default=S},"./src/controller/cmcd-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return g});var D=_("./src/events.ts"),p=_("./src/types/cmcd.ts"),s=_("./src/utils/buffer-helper.ts"),S=_("./src/utils/logger.ts");function v(w,m){for(var d=0;d<m.length;d++){var n=m[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(w,n.key,n)}}function o(w,m,d){return m&&v(w.prototype,m),d&&v(w,d),w}function i(w,m){var d=typeof Symbol!="undefined"&&w[Symbol.iterator]||w["@@iterator"];if(d)return(d=d.call(w)).next.bind(d);if(Array.isArray(w)||(d=r(w))||m&&w&&typeof w.length=="number"){d&&(w=d);var n=0;return function(){return n>=w.length?{done:!0}:{done:!1,value:w[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 r(w,m){if(!w)return;if(typeof w=="string")return h(w,m);var d=Object.prototype.toString.call(w).slice(8,-1);if(d==="Object"&&w.constructor&&(d=w.constructor.name),d==="Map"||d==="Set")return Array.from(w);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return h(w,m)}function h(w,m){(m==null||m>w.length)&&(m=w.length);for(var d=0,n=new Array(m);d<m;d++)n[d]=w[d];return n}function y(){return y=Object.assign||function(w){for(var m=1;m<arguments.length;m++){var d=arguments[m];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(w[n]=d[n])}return w},y.apply(this,arguments)}var g=function(){function w(d){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(T){try{n.apply(T,{ot:p.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(E){S.logger.warn("Could not generate manifest CMCD data.",E)}},this.applyFragmentData=function(T){try{var E=T.frag,a=n.hls.levels[E.level],L=n.getObjectType(E),O={d:E.duration*1e3,ot:L};(L===p.CMCDObjectType.VIDEO||L===p.CMCDObjectType.AUDIO||L==p.CMCDObjectType.MUXED)&&(O.br=a.bitrate/1e3,O.tb=n.getTopBandwidth(L),O.bl=n.getBufferLength(L)),n.apply(T,O)}catch(f){S.logger.warn("Could not generate segment CMCD data.",f)}},this.hls=d;var l=this.config=d.config,u=l.cmcd;u!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||w.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var m=w.prototype;return m.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)},m.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()},m.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},m.onMediaAttached=function(n,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},m.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},m.onBufferCreated=function(n,l){var u,T;this.audioBuffer=(u=l.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(T=l.tracks.video)===null||T===void 0?void 0:T.buffer},m.createData=function(){var n;return{v:p.CMCDVersion,sf:p.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}},m.apply=function(n,l){l===void 0&&(l={}),y(l,this.createData());var u=l.ot===p.CMCDObjectType.INIT||l.ot===p.CMCDObjectType.VIDEO||l.ot===p.CMCDObjectType.MUXED;if(this.starved&&u&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var T=w.toHeaders(l);if(!Object.keys(T).length)return;n.headers||(n.headers={}),y(n.headers,T)}else{var E=w.toQuery(l);if(!E)return;n.url=w.appendQueryToUri(n.url,E)}},m.getObjectType=function(n){var l=n.type;return l==="subtitle"?p.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?p.CMCDObjectType.INIT:l==="audio"?p.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?p.CMCDObjectType.VIDEO:p.CMCDObjectType.MUXED:void 0},m.getTopBandwidth=function(n){for(var l=0,u=n===p.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,T=i(u),E;!(E=T()).done;){var a=E.value;a.bitrate>l&&(l=a.bitrate)}return l>0?l:NaN},m.getBufferLength=function(n){var l=this.hls.media,u=n===p.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!l)return NaN;var T=s.BufferHelper.bufferInfo(u,l.currentTime,this.config.maxBufferHole);return T.len*1e3},m.createPlaylistLoader=function(){var n=this.config.pLoader,l=this.applyPlaylistData,u=n||this.config.loader;return function(){function T(a){this.loader=void 0,this.loader=new u(a)}var E=T.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(L,O,f){l(L),this.loader.load(L,O,f)},o(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},m.createFragmentLoader=function(){var n=this.config.fLoader,l=this.applyFragmentData,u=n||this.config.loader;return function(){function T(a){this.loader=void 0,this.loader=new u(a)}var E=T.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(L,O,f){l(L),this.loader.load(L,O,f)},o(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},w.uuid=function(){var n=URL.createObjectURL(new Blob),l=n.toString();return URL.revokeObjectURL(n),l.substr(l.lastIndexOf("/")+1)},w.serialize=function(n){for(var l=[],u=function(G){return!Number.isNaN(G)&&G!=null&&G!==""&&G!==!1},T=function(G){return Math.round(G)},E=function(G){return T(G/100)*100},a=function(G){return encodeURIComponent(G)},L={br:T,d:T,bl:E,dl:E,mtp:E,nor:a,rtp:E,tb:T},O=Object.keys(n||{}).sort(),f=i(O),x;!(x=f()).done;){var b=x.value,C=n[b];if(!u(C))continue;if(b==="v"&&C===1)continue;if(b=="pr"&&C===1)continue;var I=L[b];I&&(C=I(C));var j=typeof C,M=void 0;b==="ot"||b==="sf"||b==="st"?M=b+"="+C:j==="boolean"?M=b:j==="number"?M=b+"="+C:M=b+"="+JSON.stringify(C),l.push(M)}return l.join(",")},w.toHeaders=function(n){for(var l=Object.keys(n),u={},T=["Object","Request","Session","Status"],E=[{},{},{},{}],a={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},L=0,O=l;L<O.length;L++){var f=O[L],x=a[f]!=null?a[f]:1;E[x][f]=n[f]}for(var b=0;b<E.length;b++){var C=w.serialize(E[b]);C&&(u["CMCD-"+T[b]]=C)}return u},w.toQuery=function(n){return"CMCD="+encodeURIComponent(w.serialize(n))},w.appendQueryToUri=function(n,l){if(!l)return n;var u=n.includes("?")?"&":"?";return""+n+u+l},w}()},"./src/controller/eme-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/events.ts"),p=_("./src/errors.ts"),s=_("./src/utils/logger.ts"),S=_("./src/utils/mediakeys-helper.ts");function v(g,w){for(var m=0;m<w.length;m++){var d=w[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}function o(g,w,m){return w&&v(g.prototype,w),m&&v(g,m),g}var i=3,r=function(w,m,d){var n={audioCapabilities:[],videoCapabilities:[]};return w.forEach(function(l){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:d.audioRobustness||""})}),m.forEach(function(l){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:d.videoRobustness||""})}),[n]},h=function(w,m,d,n){switch(w){case S.KeySystems.WIDEVINE:return r(m,d,n);default:throw new Error("Unknown key-system: "+w)}},y=function(){function g(m){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=m,this._config=m.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 w=g.prototype;return w.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},w._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)},w._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)},w.getLicenseServerUrl=function(d){switch(d){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+d+'"')},w._attemptKeySystemAccess=function(d,n,l){var u=this,T=h(d,n,l,this._drmSystemOptions);s.logger.log("Requesting encrypted media key-system access");var E=this.requestMediaKeySystemAccess(d,T);this.mediaKeysPromise=E.then(function(a){return u._onMediaKeySystemAccessObtained(d,a)}),E.catch(function(a){s.logger.error('Failed to obtain key-system "'+d+'" access:',a)})},w._onMediaKeySystemAccessObtained=function(d,n){var l=this;s.logger.log('Access for key-system "'+d+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:d};this._mediaKeysList.push(u);var T=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(E){return u.mediaKeys=E,s.logger.log('Media-keys created for key-system "'+d+'"'),l._onMediaKeysCreated(),E});return T.catch(function(E){s.logger.error("Failed to create media-keys:",E)}),T},w._onMediaKeysCreated=function(){var d=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),d._onNewMediaKeySession(n.mediaKeysSession))})},w._onNewMediaKeySession=function(d){var n=this;s.logger.log("New key-system session "+d.sessionId),d.addEventListener("message",function(l){n._onKeySessionMessage(d,l.message)},!1)},w._onKeySessionMessage=function(d,n){s.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(l){s.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),d.update(l)})},w.onMediaEncrypted=function(d){var n=this;if(s.logger.log('Media is encrypted using "'+d.initDataType+'" init data type'),!this.mediaKeysPromise){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(T){if(!n._media)return;n._attemptSetMediaKeys(T),n._generateRequestWithPreferredKeySession(d.initDataType,d.initData)};this.mediaKeysPromise.then(l).catch(l)},w._attemptSetMediaKeys=function(d){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){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}s.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},w._generateRequestWithPreferredKeySession=function(d,n){var l=this,u=this._mediaKeysList[0];if(!u){s.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){s.logger.warn("Key-Session already initialized but requested again");return}var T=u.mediaKeysSession;if(!T){s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){s.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}s.logger.log('Generating key-session request for "'+d+'" init data type'),u.mediaKeysSessionInitialized=!0,T.generateRequest(d,n).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(E){s.logger.error("Error generating key-session request:",E),l.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},w._createLicenseXhr=function(d,n,l){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,d,n,l);var T=this._licenseXhrSetup;if(T)try{T.call(this.hls,u,d),T=void 0}catch(E){s.logger.error(E)}try{u.readyState||u.open("POST",d,!0),T&&T.call(this.hls,u,d)}catch(E){throw new Error("issue setting up KeySystem license XHR "+E)}return u},w._onLicenseRequestReadyStageChange=function(d,n,l,u){switch(d.readyState){case 4:if(d.status===200){this._requestLicenseFailureCount=0,s.logger.log("License request succeeded");var T=d.response,E=this._licenseResponseCallback;if(E)try{T=E.call(this.hls,d,n)}catch(L){s.logger.error(L)}u(T)}else{if(s.logger.error("License Request XHR failed ("+n+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>i){this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var a=i-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+a+" attempts left"),this._requestLicense(l,u)}break}},w._generateLicenseRequestChallenge=function(d,n){switch(d.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},w._requestLicense=function(d,n){s.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){s.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(l.mediaKeySystemDomain),T=this._createLicenseXhr(u,d,n);s.logger.log("Sending license request to URL: "+u);var E=this._generateLicenseRequestChallenge(l,d);T.send(E)}catch(a){s.logger.error("Failure requesting DRM license: "+a),this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.KEY_SYSTEM_ERROR,details:p.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},w.onMediaAttached=function(d,n){if(!this._emeEnabled)return;var l=n.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},w.onMediaDetached=function(){var d=this._media,n=this._mediaKeysList;if(!d)return;d.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},w.onManifestParsed=function(d,n){if(!this._emeEnabled)return;var l=n.levels.map(function(T){return T.audioCodec}).filter(function(T){return!!T}),u=n.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,l,u)},o(g,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),g}();c.default=y},"./src/controller/fps-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/events.ts"),p=_("./src/utils/logger.ts"),s=function(){function S(o){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=o,this.registerListeners()}var v=S.prototype;return v.setStreamController=function(i){this.streamController=i},v.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},v.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching)},v.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},v.onMediaAttaching=function(i,r){var h=this.hls.config;if(h.capLevelOnFPSDrop){var y=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=y,y&&typeof y.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),h.fpsDroppedMonitoringPeriod)}},v.checkFPS=function(i,r,h){var y=performance.now();if(r){if(this.lastTime){var g=y-this.lastTime,w=h-this.lastDroppedFrames,m=r-this.lastDecodedFrames,d=1e3*w/g,n=this.hls;if(n.trigger(D.Events.FPS_DROP,{currentDropped:w,currentDecoded:m,totalDroppedFrames:h}),d>0&&w>n.config.fpsDroppedMonitoringThreshold*m){var l=n.currentLevel;p.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=l)&&(l=l-1,n.trigger(D.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:n.currentLevel}),n.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=y,this.lastDroppedFrames=h,this.lastDecodedFrames=r}},v.checkFPSInterval=function(){var i=this.media;if(i)if(this.isVideoPlaybackQualityAvailable){var r=i.getVideoPlaybackQuality();this.checkFPS(i,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(i,i.webkitDecodedFrameCount,i.webkitDroppedFrameCount)},S}();c.default=s},"./src/controller/fragment-finders.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"findFragmentByPDT",function(){return s}),_.d(c,"findFragmentByPTS",function(){return S}),_.d(c,"fragmentWithinToleranceTest",function(){return v}),_.d(c,"pdtWithinToleranceTest",function(){return o}),_.d(c,"findFragWithCC",function(){return i});var D=_("./src/polyfills/number.ts"),p=_("./src/utils/binary-search.ts");function s(r,h,y){if(h===null||!Array.isArray(r)||!r.length||!Object(D.isFiniteNumber)(h))return null;var g=r[0].programDateTime;if(h<(g||0))return null;var w=r[r.length-1].endProgramDateTime;if(h>=(w||0))return null;y=y||0;for(var m=0;m<r.length;++m){var d=r[m];if(o(h,y,d))return d}return null}function S(r,h,y,g){y===void 0&&(y=0),g===void 0&&(g=0);var w=null;if(r?w=h[r.sn-h[0].sn+1]||null:y===0&&h[0].start===0&&(w=h[0]),w&&v(y,g,w)===0)return w;var m=p.default.search(h,v.bind(null,y,g));return m||w}function v(r,h,y){r===void 0&&(r=0),h===void 0&&(h=0);var g=Math.min(h,y.duration+(y.deltaPTS?y.deltaPTS:0));return y.start+y.duration-g<=r?1:y.start-g>r&&y.start?-1:0}function o(r,h,y){var g=Math.min(h,y.duration+(y.deltaPTS?y.deltaPTS:0))*1e3,w=y.endProgramDateTime||0;return w-g>r}function i(r,h){return p.default.search(r,function(y){return y.cc<h?1:y.cc>h?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"FragmentState",function(){return s}),_.d(c,"FragmentTracker",function(){return S});var D=_("./src/events.ts"),p=_("./src/types/loader.ts"),s;(function(i){i.NOT_LOADED="NOT_LOADED",i.BACKTRACKED="BACKTRACKED",i.APPENDING="APPENDING",i.PARTIAL="PARTIAL",i.OK="OK"})(s||(s={}));var S=function(){function i(h){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=h,this._registerListeners()}var r=i.prototype;return r._registerListeners=function(){var y=this.hls;y.on(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),y.on(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),y.on(D.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var y=this.hls;y.off(D.Events.BUFFER_APPENDED,this.onBufferAppended,this),y.off(D.Events.FRAG_BUFFERED,this.onFragBuffered,this),y.off(D.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(y,g){if(g===p.PlaylistLevelType.MAIN){var w=this.activeFragment,m=this.activeParts;if(!w)return null;if(m)for(var d=m.length;d--;){var n=m[d],l=n?n.end:w.appendedPTS;if(n.start<=y&&l!==void 0&&y<=l)return d>9&&(this.activeParts=m.slice(d-9)),n}else if(w.start<=y&&w.appendedPTS!==void 0&&y<=w.appendedPTS)return w}return this.getBufferedFrag(y,g)},r.getBufferedFrag=function(y,g){for(var w=this.fragments,m=Object.keys(w),d=m.length;d--;){var n=w[m[d]];if((n==null?void 0:n.body.type)===g&&n.buffered){var l=n.body;if(l.start<=y&&y<=l.end)return l}}return null},r.detectEvictedFragments=function(y,g,w){var m=this;Object.keys(this.fragments).forEach(function(d){var n=m.fragments[d];if(!n)return;if(!n.buffered){n.body.type===w&&m.removeFragment(n.body);return}var l=n.range[y];if(!l)return;l.time.some(function(u){var T=!m.isTimeBuffered(u.startPTS,u.endPTS,g);return T&&m.removeFragment(n.body),T})})},r.detectPartialFragments=function(y){var g=this,w=this.timeRanges,m=y.frag,d=y.part;if(!w||m.sn==="initSegment")return;var n=o(m),l=this.fragments[n];if(!l)return;Object.keys(w).forEach(function(u){var T=m.elementaryStreams[u];if(!T)return;var E=w[u],a=d!==null||T.partial===!0;l.range[u]=g.getBufferedTimes(m,d,a,E)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},r.fragBuffered=function(y){var g=o(y),w=this.fragments[g];w&&(w.backtrack=w.loaded=null,w.buffered=!0)},r.getBufferedTimes=function(y,g,w,m){for(var d={time:[],partial:w},n=g?g.start:y.start,l=g?g.end:y.end,u=y.minEndPTS||l,T=y.maxStartPTS||n,E=0;E<m.length;E++){var a=m.start(E)-this.bufferPadding,L=m.end(E)+this.bufferPadding;if(T>=a&&u<=L){d.time.push({startPTS:Math.max(n,m.start(E)),endPTS:Math.min(l,m.end(E))});break}else if(n<L&&l>a)d.partial=!0,d.time.push({startPTS:Math.max(n,m.start(E)),endPTS:Math.min(l,m.end(E))});else if(l<=a)break}return d},r.getPartialFragment=function(y){var g=null,w,m,d,n=0,l=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(T){var E=u[T];if(!E)return;v(E)&&(m=E.body.start-l,d=E.body.end+l,y>=m&&y<=d&&(w=Math.min(y-m,d-y),n<=w&&(g=E.body,n=w)))}),g},r.getState=function(y){var g=o(y),w=this.fragments[g];return w?w.buffered?v(w)?s.PARTIAL:s.OK:w.backtrack?s.BACKTRACKED:s.APPENDING:s.NOT_LOADED},r.backtrack=function(y,g){var w=o(y),m=this.fragments[w];if(!m||m.backtrack)return null;var d=m.backtrack=g||m.loaded;return m.loaded=null,d},r.getBacktrackData=function(y){var g=o(y),w=this.fragments[g];if(w){var m,d=w.backtrack;if(d!=null&&(m=d.payload)!==null&&m!==void 0&&m.byteLength)return d;this.removeFragment(y)}return null},r.isTimeBuffered=function(y,g,w){for(var m,d,n=0;n<w.length;n++){if(m=w.start(n)-this.bufferPadding,d=w.end(n)+this.bufferPadding,y>=m&&g<=d)return!0;if(g<=m)return!1}return!1},r.onFragLoaded=function(y,g){var w=g.frag,m=g.part;if(w.sn==="initSegment"||w.bitrateTest||m)return;var d=o(w);this.fragments[d]={body:w,loaded:g,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(y,g){var w=this,m=g.frag,d=g.part,n=g.timeRanges;if(m.type===p.PlaylistLevelType.MAIN)if(this.activeFragment=m,d){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(d)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(u){var T=n[u];if(w.detectEvictedFragments(u,T),!d)for(var E=0;E<T.length;E++)m.appendedPTS=Math.max(T.end(E),m.appendedPTS||0)})},r.onFragBuffered=function(y,g){this.detectPartialFragments(g)},r.hasFragment=function(y){var g=o(y);return!!this.fragments[g]},r.removeFragmentsInRange=function(y,g,w){var m=this;Object.keys(this.fragments).forEach(function(d){var n=m.fragments[d];if(!n)return;if(n.buffered){var l=n.body;l.type===w&&l.start<g&&l.end>y&&m.removeFragment(l)}})},r.removeFragment=function(y){var g=o(y);y.stats.loaded=0,y.clearElementaryStreamInfo(),delete this.fragments[g]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},i}();function v(i){var r,h;return i.buffered&&(((r=i.range.video)===null||r===void 0?void 0:r.partial)||((h=i.range.audio)===null||h===void 0?void 0:h.partial))}function o(i){return i.type+"_"+i.level+"_"+i.urlId+"_"+i.sn}},"./src/controller/gap-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"STALL_MINIMUM_DURATION_MS",function(){return v}),_.d(c,"MAX_START_GAP_JUMP",function(){return o}),_.d(c,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return i}),_.d(c,"SKIP_BUFFER_RANGE_START",function(){return r}),_.d(c,"default",function(){return h});var D=_("./src/utils/buffer-helper.ts"),p=_("./src/errors.ts"),s=_("./src/events.ts"),S=_("./src/utils/logger.ts"),v=250,o=2,i=.1,r=.05,h=function(){function y(w,m,d,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=w,this.media=m,this.fragmentTracker=d,this.hls=n}var g=y.prototype;return g.destroy=function(){this.hls=this.fragmentTracker=this.media=null},g.poll=function(m){var d=this.config,n=this.media,l=this.stalled,u=n.currentTime,T=n.seeking,E=this.seeking&&!T,a=!this.seeking&&T;if(this.seeking=T,u!==m){if(this.moved=!0,l!==null){if(this.stallReported){var L=self.performance.now()-l;S.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((a||E)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!D.BufferHelper.getBuffered(n).length)return;var O=D.BufferHelper.bufferInfo(n,u,0),f=O.len>0,x=O.nextStart||0;if(!f&&!x)return;if(T){var b=O.len>o,C=!x||x-u>o&&!this.fragmentTracker.getPartialFragment(u);if(b||C)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var I,j=Math.max(x,O.start||0)-u,M=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,z=M==null||((I=M.details)===null||I===void 0)?void 0:I.live,G=z?M.details.targetduration*2:o;if(j>0&&j<=G){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(l===null){this.stalled=B;return}var K=B-l;!T&&K>=v&&this._reportStall(O.len);var F=D.BufferHelper.bufferInfo(n,u,d.maxBufferHole);this._tryFixBufferStall(F,K)},g._tryFixBufferStall=function(m,d){var n=this.config,l=this.fragmentTracker,u=this.media,T=u.currentTime,E=l.getPartialFragment(T);if(E){var a=this._trySkipBufferHole(E);if(a)return}m.len>n.maxBufferHole&&d>n.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},g._reportStall=function(m){var d=this.hls,n=this.media,l=this.stallReported;l||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+m+")"),d.trigger(s.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:m}))},g._trySkipBufferHole=function(m){for(var d=this.config,n=this.hls,l=this.media,u=l.currentTime,T=0,E=D.BufferHelper.getBuffered(l),a=0;a<E.length;a++){var L=E.start(a);if(u+d.maxBufferHole>=T&&u<L){var O=Math.max(L+r,l.currentTime+i);return S.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+O),this.moved=!0,this.stalled=null,l.currentTime=O,m&&n.trigger(s.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+O,frag:m}),O}T=E.end(a)}return 0},g._tryNudgeBuffer=function(){var m=this.config,d=this.hls,n=this.media,l=n.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<m.nudgeMaxRetry){var T=l+u*m.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+l+" to "+T),n.currentTime=T,d.trigger(s.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+m.nudgeMaxRetry+" nudges"),d.trigger(s.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},y}()},"./src/controller/id3-track-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/events.ts"),p=_("./src/utils/texttrack-utils.ts"),s=_("./src/demux/id3.ts"),S=.25,v=function(){function o(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var i=o.prototype;return i.destroy=function(){this._unregisterListeners()},i._registerListeners=function(){var h=this.hls;h.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.on(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i._unregisterListeners=function(){var h=this.hls;h.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),h.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),h.off(D.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),h.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i.onMediaAttached=function(h,y){this.media=y.media},i.onMediaDetaching=function(){if(!this.id3Track)return;Object(p.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},i.getID3Track=function(h){if(!this.media)return;for(var y=0;y<h.length;y++){var g=h[y];if(g.kind==="metadata"&&g.label==="id3")return Object(p.sendAddTrackEvent)(g,this.media),g}return this.media.addTextTrack("metadata","id3")},i.onFragParsingMetadata=function(h,y){if(!this.media)return;var g=y.frag,w=y.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var m=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,d=0;d<w.length;d++){var n=s.getID3Frames(w[d].data);if(n){var l=w[d].pts,u=d<w.length-1?w[d+1].pts:g.end,T=u-l;T<=0&&(u=l+S);for(var E=0;E<n.length;E++){var a=n[E];if(!s.isTimeStampFrame(a)){var L=new m(l,u,"");L.value=a,this.id3Track.addCue(L)}}}}},i.onBufferFlushing=function(h,y){var g=y.startOffset,w=y.endOffset,m=y.type;if(!m||m==="audio"){var d=this.id3Track;d&&Object(p.removeCuesInRange)(d,g,w)}},o}();c.default=v},"./src/controller/latency-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return o});var D=_("./src/errors.ts"),p=_("./src/events.ts"),s=_("./src/utils/logger.ts");function S(i,r){for(var h=0;h<r.length;h++){var y=r[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,y.key,y)}}function v(i,r,h){return r&&S(i.prototype,r),h&&S(i,h),i}var o=function(){function i(h){var y=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 y.timeupdate()},this.hls=h,this.config=h.config,this.registerListeners()}var r=i.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(p.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(p.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(p.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(p.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(p.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(p.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(p.Events.ERROR,this.onError)},r.onMediaAttached=function(y,g){this.media=g.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(y,g){var w=g.details;this.levelDetails=w,w.advanced&&this.timeupdate(),!w.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(y,g){if(g.details!==D.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,s.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var y=this.media,g=this.levelDetails;if(!y||!g)return;this.currentTime=y.currentTime;var w=this.computeLatency();if(w===null)return;this._latency=w;var m=this.config,d=m.lowLatencyMode,n=m.maxLiveSyncPlaybackRate;if(!d||n===1)return;var l=this.targetLatency;if(l===null)return;var u=w-l,T=Math.min(this.maxLatency,l+g.targetduration),E=u<T;if(g.live&&E&&u>.05&&this.forwardBufferLength>1){var a=Math.min(2,Math.max(1,n)),L=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;y.playbackRate=Math.min(a,Math.max(1,L))}else y.playbackRate!==1&&y.playbackRate!==0&&(y.playbackRate=1)},r.estimateLiveEdge=function(){var y=this.levelDetails;return y===null?null:y.edge+y.age},r.computeLatency=function(){var y=this.estimateLiveEdge();return y===null?null:y-this.currentTime},v(i,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var y=this.config,g=this.levelDetails;return y.liveMaxLatencyDuration!==void 0?y.liveMaxLatencyDuration:g?y.liveMaxLatencyDurationCount*g.targetduration:0}},{key:"targetLatency",get:function(){var y=this.levelDetails;if(y===null)return null;var g=y.holdBack,w=y.partHoldBack,m=y.targetduration,d=this.config,n=d.liveSyncDuration,l=d.liveSyncDurationCount,u=d.lowLatencyMode,T=this.hls.userConfig,E=u&&w||g;(T.liveSyncDuration||T.liveSyncDurationCount||E===0)&&(E=n!==void 0?n:l*m);var a=m,L=1;return E+Math.min(this.stallCount*L,a)}},{key:"liveSyncPosition",get:function(){var y=this.estimateLiveEdge(),g=this.targetLatency,w=this.levelDetails;if(y===null||g===null||w===null)return null;var m=w.edge,d=y-g-this.edgeStalled,n=m-w.totalduration,l=m-(this.config.lowLatencyMode&&w.partTarget||w.targetduration);return Math.min(Math.max(n,d),l)}},{key:"drift",get:function(){var y=this.levelDetails;return y===null?1:y.drift}},{key:"edgeStalled",get:function(){var y=this.levelDetails;if(y===null)return 0;var g=(this.config.lowLatencyMode&&y.partTarget||y.targetduration)*3;return Math.max(y.age-g,0)}},{key:"forwardBufferLength",get:function(){var y=this.media,g=this.levelDetails;if(!y||!g)return 0;var w=y.buffered.length;return w?y.buffered.end(w-1):g.edge-this.currentTime}}]),i}()},"./src/controller/level-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return d});var D=_("./src/types/level.ts"),p=_("./src/events.ts"),s=_("./src/errors.ts"),S=_("./src/utils/codecs.ts"),v=_("./src/controller/level-helper.ts"),o=_("./src/controller/base-playlist-controller.ts"),i=_("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var u=arguments[l];for(var T in u)Object.prototype.hasOwnProperty.call(u,T)&&(n[T]=u[T])}return n},r.apply(this,arguments)}function h(n,l){for(var u=0;u<l.length;u++){var T=l[u];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function y(n,l,u){return l&&h(n.prototype,l),u&&h(n,u),n}function g(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,w(n,l)}function w(n,l){return w=Object.setPrototypeOf||function(T,E){return T.__proto__=E,T},w(n,l)}var m=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(n){g(l,n);function l(T){var E;return E=n.call(this,T,"[level-controller]")||this,E._levels=[],E._firstLevel=-1,E._startLevel=void 0,E.currentLevelIndex=-1,E.manualLevelIndex=-1,E.onParsedComplete=void 0,E._registerListeners(),E}var u=l.prototype;return u._registerListeners=function(){var E=this.hls;E.on(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.on(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(p.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(p.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var E=this.hls;E.off(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(p.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(p.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(p.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},u.startLoad=function(){var E=this._levels;E.forEach(function(a){a.loadError=0}),n.prototype.startLoad.call(this)},u.onManifestLoaded=function(E,a){var L=[],O=[],f=[],x,b={},C,I=!1,j=!1,M=!1;if(a.levels.forEach(function(K){var F=K.attrs;I=I||!!(K.width&&K.height),j=j||!!K.videoCodec,M=M||!!K.audioCodec,m&&K.audioCodec&&K.audioCodec.indexOf("mp4a.40.34")!==-1&&(K.audioCodec=void 0);var H=K.bitrate+"-"+K.attrs.RESOLUTION+"-"+K.attrs.CODECS;C=b[H],C?C.url.push(K.url):(C=new D.Level(K),b[H]=C,L.push(C)),F&&(F.AUDIO&&Object(v.addGroupId)(C,"audio",F.AUDIO),F.SUBTITLES&&Object(v.addGroupId)(C,"text",F.SUBTITLES))}),(I||j)&&M&&(L=L.filter(function(K){var F=K.videoCodec,H=K.width,W=K.height;return!!F||!!(H&&W)})),L=L.filter(function(K){var F=K.audioCodec,H=K.videoCodec;return(!F||Object(S.isCodecSupportedInMp4)(F,"audio"))&&(!H||Object(S.isCodecSupportedInMp4)(H,"video"))}),a.audioTracks&&(O=a.audioTracks.filter(function(K){return!K.audioCodec||Object(S.isCodecSupportedInMp4)(K.audioCodec,"audio")}),Object(v.assignTrackIdsByGroup)(O)),a.subtitles&&(f=a.subtitles,Object(v.assignTrackIdsByGroup)(f)),L.length>0){x=L[0].bitrate,L.sort(function(K,F){return K.bitrate-F.bitrate}),this._levels=L;for(var z=0;z<L.length;z++)if(L[z].bitrate===x){this._firstLevel=z,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+x);break}var G=M&&!j,B={levels:L,audioTracks:O,subtitleTracks:f,firstLevel:this._firstLevel,stats:a.stats,audio:M,video:j,altAudio:!G&&O.some(function(K){return!!K.url})};this.hls.trigger(p.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(p.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:a.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(E,a){if(n.prototype.onError.call(this,E,a),a.fatal)return;var L=a.context,O=this._levels[this.currentLevelIndex];if(L&&(L.type===i.PlaylistContextType.AUDIO_TRACK&&O.audioGroupIds&&L.groupId===O.audioGroupIds[O.urlId]||L.type===i.PlaylistContextType.SUBTITLE_TRACK&&O.textGroupIds&&L.groupId===O.textGroupIds[O.urlId])){this.redundantFailover(this.currentLevelIndex);return}var f=!1,x=!0,b;switch(a.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(a.frag){var C=this._levels[a.frag.level];C?(C.fragmentError++,C.fragmentError>this.hls.config.fragLoadingMaxRetry&&(b=a.frag.level)):b=a.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(x=!1),b=L.level),f=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:b=a.level,f=!0;break}b!==void 0&&this.recoverLevel(a,b,f,x)},u.recoverLevel=function(E,a,L,O){var f=E.details,x=this._levels[a];if(x.loadError++,L){var b=this.retryLoadingOrFail(E);if(b)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(O){var C=x.url.length;if(C>1&&x.loadError<C)E.levelRetry=!0,this.redundantFailover(a);else if(this.manualLevelIndex===-1){var I=a===0?this._levels.length-1:a-1;this.currentLevelIndex!==I&&this._levels[I].loadError===0&&(this.warn(f+": switch to "+I),E.levelRetry=!0,this.hls.nextAutoLevel=I)}}},u.redundantFailover=function(E){var a=this._levels[E],L=a.url.length;if(L>1){var O=(a.urlId+1)%L;this.warn("Switching to redundant URL-id "+O),this._levels.forEach(function(f){f.urlId=O}),this.level=E}},u.onFragLoaded=function(E,a){var L=a.frag;if(L!==void 0&&L.type===i.PlaylistLevelType.MAIN){var O=this._levels[L.level];O!==void 0&&(O.fragmentError=0,O.loadError=0)}},u.onLevelLoaded=function(E,a){var L,O=a.level,f=a.details,x=this._levels[O];if(!x){var b;this.warn("Invalid level index "+O),(b=a.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(f.deltaUpdateFailed=!0);return}O===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(O,a,x.details)):(L=a.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(f.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(E,a){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var O=-1,f=this.hls.audioTracks[a.id].groupId,x=0;x<L.audioGroupIds.length;x++)if(L.audioGroupIds[x]===f){O=x;break}O!==L.urlId&&(L.urlId=O,this.startLoad())}},u.loadPlaylist=function(E){var a=this.currentLevelIndex,L=this._levels[a];if(this.canLoad&&L&&L.url.length>0){var O=L.urlId,f=L.url[O];if(E)try{f=E.addDirectives(f)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+a+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+O+" "+f),this.clearTimer(),this.hls.trigger(p.Events.LEVEL_LOADING,{url:f,level:a,id:O,deliveryDirectives:E||null})}},u.removeLevel=function(E,a){var L=function(x,b){return b!==a},O=this._levels.filter(function(f,x){return x!==E?!0:f.url.length>1&&a!==void 0?(f.url=f.url.filter(L),f.audioGroupIds&&(f.audioGroupIds=f.audioGroupIds.filter(L)),f.textGroupIds&&(f.textGroupIds=f.textGroupIds.filter(L)),f.urlId=0,!0):!1}).map(function(f,x){var b=f.details;return b!=null&&b.fragments&&b.fragments.forEach(function(C){C.level=x}),f});this._levels=O,this.hls.trigger(p.Events.LEVELS_UPDATED,{levels:O})},y(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var a,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===E&&(a=L[E])!==null&&a!==void 0&&a.details)return;if(E<0||E>=L.length){var O=E<0;if(this.hls.trigger(p.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:O,reason:"invalid level idx"}),O)return;E=Math.min(E,L.length-1)}this.clearTimer();var f=this.currentLevelIndex,x=L[f],b=L[E];this.log("switching to level "+E+" from "+f),this.currentLevelIndex=E;var C=r({},b,{level:E,maxBitrate:b.maxBitrate,uri:b.uri,urlId:b.urlId});delete C._urlId,this.hls.trigger(p.Events.LEVEL_SWITCHING,C);var I=b.details;if(!I||I.live){var j=this.switchParams(b.uri,x==null?void 0:x.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),l}(o.default)},"./src/controller/level-helper.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"addGroupId",function(){return s}),_.d(c,"assignTrackIdsByGroup",function(){return S}),_.d(c,"updatePTS",function(){return v}),_.d(c,"updateFragPTSDTS",function(){return i}),_.d(c,"mergeDetails",function(){return r}),_.d(c,"mapPartIntersection",function(){return h}),_.d(c,"mapFragmentIntersection",function(){return y}),_.d(c,"adjustSliding",function(){return g}),_.d(c,"addSliding",function(){return w}),_.d(c,"computeReloadInterval",function(){return m}),_.d(c,"getFragmentWithSN",function(){return d}),_.d(c,"getPartWith",function(){return n});var D=_("./src/polyfills/number.ts"),p=_("./src/utils/logger.ts");function s(l,u,T){switch(u){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(T);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(T);break}}function S(l){var u={};l.forEach(function(T){var E=T.groupId||"";T.id=u[E]=u[E]||0,u[E]++})}function v(l,u,T){var E=l[u],a=l[T];o(E,a)}function o(l,u){var T=u.startPTS;if(Object(D.isFiniteNumber)(T)){var E=0,a;u.sn>l.sn?(E=T-l.start,a=l):(E=l.start-T,a=u),a.duration!==E&&(a.duration=E)}else if(u.sn>l.sn){var L=l.cc===u.cc;L&&l.minEndPTS?u.start=l.start+(l.minEndPTS-l.start):u.start=l.start+l.duration}else u.start=Math.max(l.start-u.duration,0)}function i(l,u,T,E,a,L){var O=E-T;O<=0&&(p.logger.warn("Fragment should have a positive duration",u),E=T+u.duration,L=a+u.duration);var f=T,x=E,b=u.startPTS,C=u.endPTS;if(Object(D.isFiniteNumber)(b)){var I=Math.abs(b-T);Object(D.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(I,u.deltaPTS):u.deltaPTS=I,f=Math.max(T,b),T=Math.min(T,b),a=Math.min(a,u.startDTS),x=Math.min(E,C),E=Math.max(E,C),L=Math.max(L,u.endDTS)}u.duration=E-T;var j=T-u.start;u.appendedPTS=E,u.start=u.startPTS=T,u.maxStartPTS=f,u.startDTS=a,u.endPTS=E,u.minEndPTS=x,u.endDTS=L;var M=u.sn;if(!l||M<l.startSN||M>l.endSN)return 0;var z,G=M-l.startSN,B=l.fragments;for(B[G]=u,z=G;z>0;z--)o(B[z],B[z-1]);for(z=G;z<B.length-1;z++)o(B[z],B[z+1]);return l.fragmentHint&&o(B[B.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,j}function r(l,u){for(var T=null,E=l.fragments,a=E.length-1;a>=0;a--){var L=E[a].initSegment;if(L){T=L;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var O=0,f;if(y(l,u,function(z,G){z.relurl&&(O=z.cc-G.cc),Object(D.isFiniteNumber)(z.startPTS)&&Object(D.isFiniteNumber)(z.endPTS)&&(G.start=G.startPTS=z.startPTS,G.startDTS=z.startDTS,G.appendedPTS=z.appendedPTS,G.maxStartPTS=z.maxStartPTS,G.endPTS=z.endPTS,G.endDTS=z.endDTS,G.minEndPTS=z.minEndPTS,G.duration=z.endPTS-z.startPTS,G.duration&&(f=G),u.PTSKnown=u.alignedSliding=!0),G.elementaryStreams=z.elementaryStreams,G.loader=z.loader,G.stats=z.stats,G.urlId=z.urlId,z.initSegment&&(G.initSegment=z.initSegment,T=z.initSegment)}),T){var x=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;x.forEach(function(z){var G;(!z.initSegment||z.initSegment.relurl===((G=T)===null||G===void 0?void 0:G.relurl))&&(z.initSegment=T)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(z){return!z}),u.deltaUpdateFailed)){p.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var b=u.skippedSegments;b--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var C=u.fragments;if(O){p.logger.warn("discontinuity sliding from playlist, take drift into account");for(var I=0;I<C.length;I++)C[I].cc+=O}u.skippedSegments&&(u.startCC=u.fragments[0].cc),h(l.partList,u.partList,function(z,G){G.elementaryStreams=z.elementaryStreams,G.stats=z.stats}),f?i(u,f,f.startPTS,f.endPTS,f.startDTS,f.endDTS):g(l,u),C.length&&(u.totalduration=u.edge-C[0].start),u.driftStartTime=l.driftStartTime,u.driftStart=l.driftStart;var j=u.advancedDateTime;if(u.advanced&&j){var M=u.edge;u.driftStart||(u.driftStartTime=j,u.driftStart=M),u.driftEndTime=j,u.driftEnd=M}else u.driftEndTime=l.driftEndTime,u.driftEnd=l.driftEnd,u.advancedDateTime=l.advancedDateTime}function h(l,u,T){if(l&&u)for(var E=0,a=0,L=l.length;a<=L;a++){var O=l[a],f=u[a+E];O&&f&&O.index===f.index&&O.fragment.sn===f.fragment.sn?T(O,f):E--}}function y(l,u,T){for(var E=u.skippedSegments,a=Math.max(l.startSN,u.startSN)-u.startSN,L=(l.fragmentHint?1:0)+(E?u.endSN:Math.min(l.endSN,u.endSN))-u.startSN,O=u.startSN-l.startSN,f=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,x=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,b=a;b<=L;b++){var C=x[O+b],I=f[b];E&&!I&&b<E&&(I=u.fragments[b]=C),C&&I&&T(C,I)}}function g(l,u){var T=u.startSN+u.skippedSegments-l.startSN,E=l.fragments;if(T<0||T>=E.length)return;w(u,E[T].start)}function w(l,u){if(u){for(var T=l.fragments,E=l.skippedSegments;E<T.length;E++)T[E].start+=u;l.fragmentHint&&(l.fragmentHint.start+=u)}}function m(l,u){var T=1e3*l.levelTargetDuration,E=T/2,a=l.age,L=a>0&&a<T*3,O=u.loading.end-u.loading.start,f,x=l.availabilityDelay;if(l.updated===!1)if(L){var b=333*l.misses;f=Math.max(Math.min(E,O*2),b),l.availabilityDelay=(l.availabilityDelay||0)+f}else f=E;else L?(x=Math.min(x||T/2,a),l.availabilityDelay=x,f=x+T-a):f=T-O;return Math.round(f)}function d(l,u,T){if(!l||!l.details)return null;var E=l.details,a=E.fragments[u-E.startSN];return a||(a=E.fragmentHint,a&&a.sn===u?a:u<E.startSN&&T&&T.sn===u?T:null)}function n(l,u,T){if(!l||!l.details)return null;var E=l.details.partList;if(E)for(var a=E.length;a--;){var L=E[a];if(L.index===T&&L.fragment.sn===u)return L}return null}},"./src/controller/stream-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return E});var D=_("./src/polyfills/number.ts"),p=_("./src/controller/base-stream-controller.ts"),s=_("./src/is-supported.ts"),S=_("./src/events.ts"),v=_("./src/utils/buffer-helper.ts"),o=_("./src/controller/fragment-tracker.ts"),i=_("./src/types/loader.ts"),r=_("./src/loader/fragment.ts"),h=_("./src/demux/transmuxer-interface.ts"),y=_("./src/types/transmuxer.ts"),g=_("./src/controller/gap-controller.ts"),w=_("./src/errors.ts"),m=_("./src/utils/logger.ts");function d(a,L){for(var O=0;O<L.length;O++){var f=L[O];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}function n(a,L,O){return L&&d(a.prototype,L),O&&d(a,O),a}function l(a,L){a.prototype=Object.create(L.prototype),a.prototype.constructor=a,u(a,L)}function u(a,L){return u=Object.setPrototypeOf||function(f,x){return f.__proto__=x,f},u(a,L)}var T=100,E=function(a){l(L,a);function L(f,x){var b;return b=a.call(this,f,x,"[stream-controller]")||this,b.audioCodecSwap=!1,b.gapController=null,b.level=-1,b._forceStartLoad=!1,b.altAudio=!1,b.audioOnly=!1,b.fragPlaying=null,b.onvplaying=null,b.onvseeked=null,b.fragLastKbps=0,b.stalled=!1,b.couldBacktrack=!1,b.audioCodecSwitch=!1,b.videoBuffer=null,b._registerListeners(),b}var O=L.prototype;return O._registerListeners=function(){var x=this.hls;x.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(S.Events.ERROR,this.onError,this),x.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O._unregisterListeners=function(){var x=this.hls;x.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(S.Events.ERROR,this.onError,this),x.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},O.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},O.startLoad=function(x){if(this.levels){var b=this.lastCurrentTime,C=this.hls;if(this.stopLoad(),this.setInterval(T),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var I=C.startLevel;I===-1&&(C.config.testBandwidth?(I=0,this.bitrateTest=!0):I=C.nextAutoLevel),this.level=C.nextLoadLevel=I,this.loadedmetadata=!1}b>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+b.toFixed(3)),x=b),this.state=p.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=p.State.STOPPED},O.stopLoad=function(){this._forceStartLoad=!1,a.prototype.stopLoad.call(this)},O.doTick=function(){switch(this.state){case p.State.IDLE:this.doTickIdle();break;case p.State.WAITING_LEVEL:{var x,b=this.levels,C=this.level,I=b==null||((x=b[C])===null||x===void 0)?void 0:x.details;if(I&&(!I.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(I))break;this.state=p.State.IDLE;break}break}case p.State.FRAG_LOADING_WAITING_RETRY:{var j,M=self.performance.now(),z=this.retryDate;(!z||M>=z||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=p.State.IDLE)}break;default:break}this.onTickEnd()},O.onTickEnd=function(){a.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},O.doTickIdle=function(){var x,b,C=this.hls,I=this.levelLastLoaded,j=this.levels,M=this.media,z=C.config,G=C.nextLoadLevel;if(I===null||!M&&(this.startFragRequested||!z.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[G])return;var B=j[G];this.level=C.nextLoadLevel=G;var K=B.details;if(!K||this.state===p.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==G){this.state=p.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:M,i.PlaylistLevelType.MAIN);if(F===null)return;var H=F.len,W=this.getMaxBufferLength(B.maxBitrate);if(H>=W)return;if(this._streamEnded(F,K)){var Q={};this.altAudio&&(Q.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,Q),this.state=p.State.ENDED;return}var ee=F.end,q=this.getNextFragment(ee,K);if(this.couldBacktrack&&!this.fragPrevious&&q&&q.sn!=="initSegment"){var pe=q.sn-K.startSN;pe>1&&(q=K.fragments[pe-1],this.fragmentTracker.removeFragment(q))}if(q&&this.fragmentTracker.getState(q)===o.FragmentState.OK&&this.nextLoadPosition>ee){var ye=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,ye,i.PlaylistLevelType.MAIN),q=this.getNextFragment(this.nextLoadPosition,K)}if(!q)return;q.initSegment&&!q.initSegment.data&&!this.bitrateTest&&(q=q.initSegment),((x=q.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((b=q.decryptdata)!==null&&b!==void 0&&b.key)?this.loadKey(q,K):this.loadFragment(q,K,ee)},O.loadFragment=function(x,b,C){var I,j=this.fragmentTracker.getState(x);if(this.fragCurrent=x,j===o.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(x);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);return}else j=o.FragmentState.NOT_LOADED}j===o.FragmentState.NOT_LOADED||j===o.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,a.prototype.loadFragment.call(this,x,b,C)):j===o.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((I=this.media)===null||I===void 0?void 0:I.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},O.getAppendedFrag=function(x){var b=this.fragmentTracker.getAppendedFrag(x,i.PlaylistLevelType.MAIN);return b&&"fragment"in b?b.fragment:b},O.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,i.PlaylistLevelType.MAIN)},O.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},O.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},O.nextLevelSwitch=function(){var x=this.levels,b=this.media;if(b!=null&&b.readyState){var C,I=this.getAppendedFrag(b.currentTime);if(I&&I.start>1&&this.flushMainBuffer(0,I.start-1),!b.paused&&x){var j=this.hls.nextLoadLevel,M=x[j],z=this.fragLastKbps;z&&this.fragCurrent?C=this.fragCurrent.duration*M.maxBitrate/(1e3*z)+1:C=0}else C=0;var G=this.getBufferedFrag(b.currentTime+C);if(G){var B=this.followingBufferedFrag(G);if(B){this.abortCurrentFrag();var K=B.maxStartPTS?B.maxStartPTS:B.start,F=B.duration,H=Math.max(G.end,K+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(H,Number.POSITIVE_INFINITY)}}}},O.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===p.State.KEY_LOADING&&(this.state=p.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},O.flushMainBuffer=function(x,b){a.prototype.flushMainBuffer.call(this,x,b,this.altAudio?"video":null)},O.onMediaAttached=function(x,b){a.prototype.onMediaAttached.call(this,x,b);var C=b.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),C.addEventListener("playing",this.onvplaying),C.addEventListener("seeked",this.onvseeked),this.gapController=new g.default(this.config,C,this.fragmentTracker,this.hls)},O.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),a.prototype.onMediaDetaching.call(this)},O.onMediaPlaying=function(){this.tick()},O.onMediaSeeked=function(){var x=this.media,b=x?x.currentTime:null;Object(D.isFiniteNumber)(b)&&this.log("Media seeked to "+b.toFixed(3)),this.tick()},O.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},O.onManifestParsed=function(x,b){var C=!1,I=!1,j;b.levels.forEach(function(M){j=M.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(C=!0),j.indexOf("mp4a.40.5")!==-1&&(I=!0))}),this.audioCodecSwitch=C&&I&&!Object(s.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=b.levels,this.startFragRequested=!1},O.onLevelLoading=function(x,b){var C=this.levels;if(!C||this.state!==p.State.IDLE)return;var I=C[b.level];(!I.details||I.details.live&&this.levelLastLoaded!==b.level||this.waitForCdnTuneIn(I.details))&&(this.state=p.State.WAITING_LEVEL)},O.onLevelLoaded=function(x,b){var C,I=this.levels,j=b.level,M=b.details,z=M.totalduration;if(!I){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+M.startSN+","+M.endSN+"], cc ["+M.startCC+", "+M.endCC+"] duration:"+z);var G=this.fragCurrent;G&&(this.state===p.State.FRAG_LOADING||this.state===p.State.FRAG_LOADING_WAITING_RETRY)&&(G.level!==b.level&&G.loader&&(this.state=p.State.IDLE,G.loader.abort()));var B=I[j],K=0;if(M.live||(C=B.details)!==null&&C!==void 0&&C.live){if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed)return;K=this.alignPlaylists(M,B.details)}if(B.details=M,this.levelLastLoaded=j,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:M,level:j}),this.state===p.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(M))return;this.state=p.State.IDLE}this.startFragRequested?M.live&&this.synchronizeToLiveEdge(M):this.setStartPosition(M,K),this.tick()},O._handleFragmentLoadProgress=function(x){var b,C=x.frag,I=x.part,j=x.payload,M=this.levels;if(!M){this.warn("Levels were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var z=M[C.level],G=z.details;if(!G){this.warn("Dropping fragment "+C.sn+" of level "+C.level+" after level details were reset");return}var B=z.videoCodec,K=G.PTSKnown||!G.live,F=(b=C.initSegment)===null||b===void 0?void 0:b.data,H=this._getAudioCodec(z),W=this.transmuxer=this.transmuxer||new h.default(this.hls,i.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),Q=I?I.index:-1,ee=Q!==-1,q=new y.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,j.byteLength,Q,ee),pe=this.initPTS[C.cc];W.push(j,F,H,B,C,I,G.totalduration,K,q,pe)},O.onAudioTrackSwitching=function(x,b){var C=this.altAudio,I=!!b.url,j=b.id;if(!I){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var M=this.fragCurrent;M!=null&&M.loader&&(this.log("Switching to main audio track, cancel main fragment load"),M.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var z=this.hls;C&&z.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),z.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:j})}},O.onAudioTrackSwitched=function(x,b){var C=b.id,I=!!this.hls.audioTracks[C].url;if(I){var j=this.videoBuffer;j&&this.mediaBuffer!==j&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=j)}this.altAudio=I,this.tick()},O.onBufferCreated=function(x,b){var C=b.tracks,I,j,M=!1;for(var z in C){var G=C[z];if(G.id==="main"){if(j=z,I=G,z==="video"){var B=C[z];B&&(this.videoBuffer=B.buffer)}}else M=!0}M&&I?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=I.buffer):this.mediaBuffer=this.media},O.onFragBuffered=function(x,b){var C=b.frag,I=b.part;if(C&&C.type!==i.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(I?" p: "+I.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state),this.state===p.State.PARSED&&(this.state=p.State.IDLE);return}var j=I?I.stats:C.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),C.sn!=="initSegment"&&(this.fragPrevious=C),this.fragBufferedComplete(C,I)},O.onError=function(x,b){switch(b.details){case w.ErrorDetails.FRAG_LOAD_ERROR:case w.ErrorDetails.FRAG_LOAD_TIMEOUT:case w.ErrorDetails.KEY_LOAD_ERROR:case w.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.MAIN,b);break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==p.State.ERROR&&(b.fatal?(this.warn(""+b.details),this.state=p.State.ERROR):!b.levelRetry&&this.state===p.State.WAITING_LEVEL&&(this.state=p.State.IDLE));break;case w.ErrorDetails.BUFFER_FULL_ERROR:if(b.parent==="main"&&(this.state===p.State.PARSING||this.state===p.State.PARSED)){var C=!0,I=this.getFwdBufferInfo(this.media,i.PlaylistLevelType.MAIN);I&&I.len>.5&&(C=!this.reduceMaxBufferLength(I.len)),C&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},O.checkBuffer=function(){var x=this.media,b=this.gapController;if(!x||!b||!x.readyState)return;var C=v.BufferHelper.getBuffered(x);!this.loadedmetadata&&C.length?(this.loadedmetadata=!0,this.seekToStartPos()):b.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},O.onFragLoadEmergencyAborted=function(){this.state=p.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},O.onBufferFlushed=function(x,b){var C=b.type;if(C!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var I=(C===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(I,C,i.PlaylistLevelType.MAIN)}},O.onLevelsUpdated=function(x,b){this.levels=b.levels},O.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},O.seekToStartPos=function(){var x=this.media,b=x.currentTime,C=this.startPosition;if(C>=0&&b<C){if(x.seeking){m.logger.log("could not seek to "+C+", already seeking at "+b);return}var I=v.BufferHelper.getBuffered(x),j=I.length?I.start(0):0,M=j-C;M>0&&(M<this.config.maxBufferHole||M<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+M+" to match buffer start"),C+=M,this.startPosition=C),this.log("seek to target start position "+C+" from current time "+b),x.currentTime=C}},O._getAudioCodec=function(x){var b=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&b&&(this.log("Swapping audio codec"),b.indexOf("mp4a.40.5")!==-1?b="mp4a.40.2":b="mp4a.40.5"),b},O._loadBitrateTestFrag=function(x){var b=this;this._doFragLoad(x).then(function(C){var I=b.hls;if(!C||I.nextLoadLevel||b.fragContextChanged(x))return;b.fragLoadError=0,b.state=p.State.IDLE,b.startFragRequested=!1,b.bitrateTest=!1;var j=x.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),I.trigger(S.Events.FRAG_LOADED,C)})},O._handleTransmuxComplete=function(x){var b,C="main",I=this.hls,j=x.remuxResult,M=x.chunkMeta,z=this.getCurrentContext(M);if(!z){this.warn("The loading context changed while buffering fragment "+M.sn+" of level "+M.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(M.level);return}var G=z.frag,B=z.part,K=z.level,F=j.video,H=j.text,W=j.id3,Q=j.initSegment,ee=this.altAudio?void 0:j.audio;if(this.fragContextChanged(G))return;if(this.state=p.State.PARSING,Q){Q.tracks&&(this._bufferInitSegment(K,Q.tracks,G,M),I.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:G,id:C,tracks:Q.tracks}));var q=Q.initPTS,pe=Q.timescale;Object(D.isFiniteNumber)(q)&&(this.initPTS[G.cc]=q,I.trigger(S.Events.INIT_PTS_FOUND,{frag:G,id:C,initPTS:q,timescale:pe}))}if(F&&j.independent!==!1){if(K.details){var ye=F.startPTS,ie=F.endPTS,Se=F.startDTS,ge=F.endDTS;if(B)B.elementaryStreams[F.type]={startPTS:ye,endPTS:ie,startDTS:Se,endDTS:ge};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var oe=this.getLoadPosition()+this.config.maxBufferHole;if(oe<ye){this.backtrack(G);return}G.setElementaryStreamInfo(F.type,G.start,ie,G.start,ge,!0)}G.setElementaryStreamInfo(F.type,ye,ie,Se,ge),this.bufferFragmentData(F,G,B,M)}}else if(j.independent===!1){this.backtrack(G);return}if(ee){var le=ee.startPTS,te=ee.endPTS,be=ee.startDTS,Z=ee.endDTS;B&&(B.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:le,endPTS:te,startDTS:be,endDTS:Z}),G.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,le,te,be,Z),this.bufferFragmentData(ee,G,B,M)}if(W!=null&&(b=W.samples)!==null&&b!==void 0&&b.length){var ae={frag:G,id:C,samples:W.samples};I.trigger(S.Events.FRAG_PARSING_METADATA,ae)}if(H){var Ee={frag:G,id:C,samples:H.samples};I.trigger(S.Events.FRAG_PARSING_USERDATA,Ee)}},O._bufferInitSegment=function(x,b,C,I){var j=this;if(this.state!==p.State.PARSING)return;this.audioOnly=!!b.audio&&!b.video,this.altAudio&&!this.audioOnly&&delete b.audio;var M=b.audio,z=b.video,G=b.audiovideo;if(M){var B=x.audioCodec,K=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),M.metadata.channelCount!==1&&K.indexOf("firefox")===-1&&(B="mp4a.40.5")),K.indexOf("android")!==-1&&M.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),x.audioCodec&&x.audioCodec!==B&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+B+'"'),M.levelCodec=B,M.id="main",this.log("Init audio buffer, container:"+M.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(x.audioCodec||"")+"/"+M.codec+"]")}z&&(z.levelCodec=x.videoCodec,z.id="main",this.log("Init video buffer, container:"+z.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+z.codec+"]")),G&&this.log("Init audiovideo buffer, container:"+G.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+G.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,b),Object.keys(b).forEach(function(F){var H=b[F],W=H.initSegment;W!=null&&W.byteLength&&j.hls.trigger(S.Events.BUFFER_APPENDING,{type:F,data:W,frag:C,part:null,chunkMeta:I,parent:C.type})}),this.tick()},O.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var b=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,b?this.resetFragmentLoading(x):this.state=p.State.BACKTRACKING},O.checkFragmentChanged=function(){var x=this.media,b=null;if(x&&x.readyState>1&&x.seeking===!1){var C=x.currentTime;if(v.BufferHelper.isBuffered(x,C)?b=this.getAppendedFrag(C):v.BufferHelper.isBuffered(x,C+.1)&&(b=this.getAppendedFrag(C+.1)),b){var I=this.fragPlaying,j=b.level;(!I||b.sn!==I.sn||I.level!==j||b.urlId!==I.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:b}),(!I||I.level!==j)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=b)}}},n(L,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var b=this.getAppendedFrag(x.currentTime);if(b)return b.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var b=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(b)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(p.default)},"./src/controller/subtitle-stream-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"SubtitleStreamController",function(){return l});var D=_("./src/events.ts"),p=_("./src/utils/logger.ts"),s=_("./src/utils/buffer-helper.ts"),S=_("./src/controller/fragment-finders.ts"),v=_("./src/utils/discontinuities.ts"),o=_("./src/controller/level-helper.ts"),i=_("./src/controller/fragment-tracker.ts"),r=_("./src/controller/base-stream-controller.ts"),h=_("./src/types/loader.ts"),y=_("./src/types/level.ts");function g(u,T){for(var E=0;E<T.length;E++){var a=T[E];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}function w(u,T,E){return T&&g(u.prototype,T),E&&g(u,E),u}function m(u,T){u.prototype=Object.create(T.prototype),u.prototype.constructor=u,d(u,T)}function d(u,T){return d=Object.setPrototypeOf||function(a,L){return a.__proto__=L,a},d(u,T)}var n=500,l=function(u){m(T,u);function T(a,L){var O;return O=u.call(this,a,L,"[subtitle-stream-controller]")||this,O.levels=[],O.currentTrackId=-1,O.tracksBuffered=[],O.mainDetails=null,O._registerListeners(),O}var E=T.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var L=this.hls;L.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(D.Events.ERROR,this.onError,this),L.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var L=this.hls;L.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(D.Events.ERROR,this.onError,this),L.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(D.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(D.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(D.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(n),this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},E.onLevelLoaded=function(L,O){this.mainDetails=O.details},E.onSubtitleFragProcessed=function(L,O){var f=O.frag,x=O.success;if(this.fragPrevious=f,this.state=r.State.IDLE,!x)return;var b=this.tracksBuffered[this.currentTrackId];if(!b)return;for(var C,I=f.start,j=0;j<b.length;j++)if(I>=b[j].start&&I<=b[j].end){C=b[j];break}var M=f.start+f.duration;C?C.end=M:(C={start:I,end:M},b.push(C)),this.fragmentTracker.fragBuffered(f)},E.onBufferFlushing=function(L,O){var f=O.startOffset,x=O.endOffset;if(f===0&&x!==Number.POSITIVE_INFINITY){var b=this.currentTrackId,C=this.levels;if(!C.length||!C[b]||!C[b].details)return;var I=C[b].details,j=I.targetduration,M=x-j;if(M<=0)return;O.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(z){for(var G=0;G<z.length;){if(z[G].end<=M){z.shift();continue}else if(z[G].start<M)z[G].start=M;else break;G++}}),this.fragmentTracker.removeFragmentsInRange(f,M,h.PlaylistLevelType.SUBTITLE)}},E.onError=function(L,O){var f,x=O.frag;if(!x||x.type!==h.PlaylistLevelType.SUBTITLE)return;(f=this.fragCurrent)!==null&&f!==void 0&&f.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},E.onSubtitleTracksUpdated=function(L,O){var f=this,x=O.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(b){return new y.Level(b)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(b){f.tracksBuffered[b.id]=[]}),this.mediaBuffer=null},E.onSubtitleTrackSwitch=function(L,O){if(this.currentTrackId=O.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var f=this.levels[this.currentTrackId];f!=null&&f.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,f&&this.setInterval(n)},E.onSubtitleTrackLoaded=function(L,O){var f,x=O.details,b=O.id,C=this.currentTrackId,I=this.levels;if(!I.length)return;var j=I[C];if(b>=I.length||b!==C||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(f=j.details)!==null&&f!==void 0&&f.live){var M=this.mainDetails;if(x.deltaUpdateFailed||!M)return;var z=M.fragments[0];if(!j.details)x.hasProgramDateTime&&M.hasProgramDateTime?Object(v.alignMediaPlaylistByPDT)(x,M):z&&Object(o.addSliding)(x,z.start);else{var G=this.alignPlaylists(x,j.details);G===0&&z&&Object(o.addSliding)(x,z.start)}}if(j.details=x,this.levelLastLoaded=b,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var B=Object(S.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},E._handleFragmentLoadComplete=function(L){var O=L.frag,f=L.payload,x=O.decryptdata,b=this.hls;if(this.fragContextChanged(O))return;if(f&&f.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var C=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(f),x.key.buffer,x.iv.buffer).then(function(I){var j=performance.now();b.trigger(D.Events.FRAG_DECRYPTED,{frag:O,payload:I,stats:{tstart:C,tdecrypt:j}})})}},E.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var L,O=this.currentTrackId,f=this.levels;if(!f.length||!f[O]||!f[O].details)return;var x=f[O].details,b=x.targetduration,C=this.config,I=this.media,j=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,I.currentTime-b,C.maxBufferHole),M=j.end,z=j.len,G=this.getMaxBufferLength()+b;if(z>G)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var B=x.fragments,K=B.length,F=x.edge,H,W=this.fragPrevious;if(M<F){var Q=C.maxFragLookUpTolerance;W&&x.hasProgramDateTime&&(H=Object(S.findFragmentByPDT)(B,W.endProgramDateTime,Q)),H||(H=Object(S.findFragmentByPTS)(W,B,M,Q),!H&&W&&W.start<B[0].start&&(H=B[0]))}else H=B[K-1];(L=H)!==null&&L!==void 0&&L.encrypted?(p.logger.log("Loading key for "+H.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(D.Events.KEY_LOADING,{frag:H})):H&&this.fragmentTracker.getState(H)===i.FragmentState.NOT_LOADED&&this.loadFragment(H,x,M)}},E.loadFragment=function(L,O,f){this.fragCurrent=L,u.prototype.loadFragment.call(this,L,O,f)},w(T,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),T}(r.default)},"./src/controller/subtitle-track-controller.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/events.ts"),p=_("./src/utils/texttrack-utils.ts"),s=_("./src/controller/base-playlist-controller.ts"),S=_("./src/types/loader.ts");function v(g,w){for(var m=0;m<w.length;m++){var d=w[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}function o(g,w,m){return w&&v(g.prototype,w),m&&v(g,m),g}function i(g,w){g.prototype=Object.create(w.prototype),g.prototype.constructor=g,r(g,w)}function r(g,w){return r=Object.setPrototypeOf||function(d,n){return d.__proto__=n,d},r(g,w)}var h=function(g){i(w,g);function w(d){var n;return n=g.call(this,d,"[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 m=w.prototype;return m.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,g.prototype.destroy.call(this)},m.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)},m.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)},m.onMediaAttached=function(n,l){if(this.media=l.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)},m.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},m.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=y(this.media.textTracks);n.forEach(function(l){Object(p.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},m.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},m.onManifestParsed=function(n,l){this.tracks=l.subtitleTracks},m.onSubtitleTrackLoaded=function(n,l){var u=l.id,T=l.details,E=this.trackId,a=this.tracksInGroup[E];if(!a){this.warn("Invalid subtitle track id "+u);return}var L=a.details;a.details=l.details,this.log("subtitle track "+u+" loaded ["+T.startSN+"-"+T.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,l,L))},m.onLevelLoading=function(n,l){this.switchLevel(l.level)},m.onLevelSwitching=function(n,l){this.switchLevel(l.level)},m.switchLevel=function(n){var l=this.hls.levels[n];if(!(l!=null&&l.textGroupIds))return;var u=l.textGroupIds[l.urlId];if(this.groupId!==u){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(O){return!u||O.groupId===u});this.tracksInGroup=E;var a=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=u;var L={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(D.Events.SUBTITLE_TRACKS_UPDATED,L),a!==-1&&this.setSubtitleTrack(a,T)}},m.findTrackId=function(n){for(var l=this.tracksInGroup,u=0;u<l.length;u++){var T=l[u];if((!this.selectDefaultTrack||T.default)&&(!n||n===T.name))return T.id}return-1},m.onError=function(n,l){if(g.prototype.onError.call(this,n,l),l.fatal||!l.context)return;l.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},m.loadPlaylist=function(n){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var u=l.id,T=l.groupId,E=l.url;if(n)try{E=n.addDirectives(E)}catch(a){this.warn("Could not construct new URL with HLS Delivery Directives: "+a)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADING,{url:E,id:u,groupId:T,deliveryDirectives:n||null})}},m.toggleTrackModes=function(n){var l=this,u=this.media,T=this.subtitleDisplay,E=this.trackId;if(!u)return;var a=y(u.textTracks),L=a.filter(function(x){return x.groupId===l.groupId});if(n===-1)[].slice.call(a).forEach(function(x){x.mode="disabled"});else{var O=L[E];O&&(O.mode="disabled")}var f=L[n];f&&(f.mode=T?"showing":"hidden")},m.setSubtitleTrack=function(n,l){var u,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(u=T[n])!==null&&u!==void 0&&u.details)||n<-1||n>=T.length)return;this.clearTimer();var E=T[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,E){var a=E.id,L=E.groupId,O=L===void 0?"":L,f=E.name,x=E.type,b=E.url;this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:O,name:f,type:x,url:b});var C=this.switchParams(E.url,l==null?void 0:l.details);this.loadPlaylist(C)}else this.hls.trigger(D.Events.SUBTITLE_TRACK_SWITCH,{id:n})},m.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,l=y(this.media.textTracks),u=0;u<l.length;u++)if(l[u].mode==="hidden")n=u;else if(l[u].mode==="showing"){n=u;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},o(w,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,l)}}]),w}(s.default);function y(g){for(var w=[],m=0;m<g.length;m++){var d=g[m];d.kind==="subtitles"&&d.label&&w.push(g[m])}return w}c.default=h},"./src/controller/timeline-controller.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"TimelineController",function(){return y});var D=_("./src/polyfills/number.ts"),p=_("./src/events.ts"),s=_("./src/utils/cea-608-parser.ts"),S=_("./src/utils/output-filter.ts"),v=_("./src/utils/webvtt-parser.ts"),o=_("./src/utils/texttrack-utils.ts"),i=_("./src/utils/imsc1-ttml-parser.ts"),r=_("./src/types/loader.ts"),h=_("./src/utils/logger.ts"),y=function(){function d(l){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=m(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.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 u=new S.default(this,"textTrack1"),T=new S.default(this,"textTrack2"),E=new S.default(this,"textTrack3"),a=new S.default(this,"textTrack4");this.cea608Parser1=new s.default(1,u,T),this.cea608Parser2=new s.default(3,E,a)}l.on(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(p.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(p.Events.FRAG_LOADING,this.onFragLoading,this),l.on(p.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(p.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(p.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(p.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=d.prototype;return n.destroy=function(){var u=this.hls;u.off(p.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(p.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(p.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(p.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(p.Events.FRAG_LOADING,this.onFragLoading,this),u.off(p.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(p.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(p.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(p.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(p.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(p.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(u,T,E,a,L){for(var O=!1,f=L.length;f--;){var x=L[f],b=w(x[0],x[1],T,E);if(b>=0&&(x[0]=Math.min(x[0],T),x[1]=Math.max(x[1],E),O=!0,b/(E-T)>.5))return}if(O||L.push([T,E]),this.config.renderTextTracksNatively){var C=this.captionsTracks[u];this.Cues.newCue(C,T,E,a)}else{var I=this.Cues.newCue(null,T,E,a);this.hls.trigger(p.Events.CUES_PARSED,{type:"captions",cues:I,track:u})}},n.onInitPtsFound=function(u,T){var E=this,a=T.frag,L=T.id,O=T.initPTS,f=T.timescale,x=this.unparsedVttFrags;L==="main"&&(this.initPTS[a.cc]=O,this.timescale[a.cc]=f),x.length&&(this.unparsedVttFrags=[],x.forEach(function(b){E.onFragLoaded(p.Events.FRAG_LOADED,b)}))},n.getExistingTrack=function(u){var T=this.media;if(T)for(var E=0;E<T.textTracks.length;E++){var a=T.textTracks[E];if(a[u])return a}return null},n.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},n.createNativeTrack=function(u){if(this.captionsTracks[u])return;var T=this.captionsProperties,E=this.captionsTracks,a=this.media,L=T[u],O=L.label,f=L.languageCode,x=this.getExistingTrack(u);if(x)E[u]=x,Object(o.clearCurrentCues)(E[u]),Object(o.sendAddTrackEvent)(E[u],a);else{var b=this.createTextTrack("captions",O,f);b&&(b[u]=!0,E[u]=b)}},n.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var T=this.captionsProperties[u];if(!T)return;var E=T.label,a={_id:u,label:E,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[u]=a,this.hls.trigger(p.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[a]})},n.createTextTrack=function(u,T,E){var a=this.media;return a?a.addTextTrack(u,T,E):void 0},n.onMediaAttaching=function(u,T){this.media=T.media,this._cleanTracks()},n.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(T){Object(o.clearCurrentCues)(u[T]),delete u[T]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=m(),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 u=this.media;if(!u)return;var T=u.textTracks;if(T)for(var E=0;E<T.length;E++)Object(o.clearCurrentCues)(T[E])},n.onSubtitleTracksUpdated=function(u,T){var E=this;this.textTracks=[];var a=T.subtitleTracks||[],L=a.some(function(b){return b.textCodec===i.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var O=this.tracks&&a&&this.tracks.length===a.length;if(this.tracks=a||[],this.config.renderTextTracksNatively){var f=this.media?this.media.textTracks:[];this.tracks.forEach(function(b,C){var I;if(C<f.length){for(var j=null,M=0;M<f.length;M++)if(g(f[M],b)){j=f[M];break}j&&(I=j)}I?Object(o.clearCurrentCues)(I):(I=E.createTextTrack("subtitles",b.name,b.lang),I&&(I.mode="disabled")),I&&(I.groupId=b.groupId,E.textTracks.push(I))})}else if(!O&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(b){return{label:b.name,kind:b.type.toLowerCase(),default:b.default,subtitleTrack:b}});this.hls.trigger(p.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},n.onManifestLoaded=function(u,T){var E=this;this.config.enableCEA708Captions&&T.captions&&T.captions.forEach(function(a){var L=/(?:CC|SERVICE)([1-4])/.exec(a.instreamId);if(!L)return;var O="textTrack"+L[1],f=E.captionsProperties[O];if(!f)return;f.label=a.name,a.lang&&(f.languageCode=a.lang),f.media=a})},n.onFragLoading=function(u,T){var E=this.cea608Parser1,a=this.cea608Parser2,L=this.lastSn,O=this.lastPartIndex;if(!this.enabled||!(E&&a))return;if(T.frag.type===r.PlaylistLevelType.MAIN){var f,x,b=T.frag.sn,C=(f=T==null||((x=T.part)===null||x===void 0)?void 0:x.index)!=null?f:-1;b===L+1||b===L&&C===O+1||(E.reset(),a.reset()),this.lastSn=b,this.lastPartIndex=C}},n.onFragLoaded=function(u,T){var E=T.frag,a=T.payload,L=this.initPTS,O=this.unparsedVttFrags;if(E.type===r.PlaylistLevelType.SUBTITLE)if(a.byteLength){if(!Object(D.isFiniteNumber)(L[E.cc])){O.push(T),L.length&&this.hls.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Missing initial subtitle PTS")});return}var f=E.decryptdata;if(f==null||f.key==null||f.method!=="AES-128"){var x=this.tracks[E.level],b=this.vttCCs;b[E.cc]||(b[E.cc]={start:E.start,prevCC:this.prevCC,new:!0},this.prevCC=E.cc),x&&x.textCodec===i.IMSC1_CODEC?this._parseIMSC1(E,a):this._parseVTTs(E,a,b)}}else this.hls.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(u,T){var E=this,a=this.hls;Object(i.parseIMSC1)(T,this.initPTS[u.cc],this.timescale[u.cc],function(L){E._appendCues(L,u.level),a.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(L){h.logger.log("Failed to parse IMSC1: "+L),a.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:L})})},n._parseVTTs=function(u,T,E){var a=this,L=this.hls;Object(v.parseWebVTT)(T,this.initPTS[u.cc],this.timescale[u.cc],E,u.cc,u.start,function(O){a._appendCues(O,u.level),L.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(O){a._fallbackToIMSC1(u,T),h.logger.log("Failed to parse VTT cue: "+O),L.trigger(p.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:O})})},n._fallbackToIMSC1=function(u,T){var E=this,a=this.tracks[u.level];a.textCodec||Object(i.parseIMSC1)(T,this.initPTS[u.cc],this.timescale[u.cc],function(){a.textCodec=i.IMSC1_CODEC,E._parseIMSC1(u,T)},function(){a.textCodec="wvtt"})},n._appendCues=function(u,T){var E=this.hls;if(this.config.renderTextTracksNatively){var a=this.textTracks[T];if(a.mode==="disabled")return;u.forEach(function(f){return Object(o.addCueToTrack)(a,f)})}else{var L=this.tracks[T],O=L.default?"default":"subtitles"+T;E.trigger(p.Events.CUES_PARSED,{type:"subtitles",cues:u,track:O})}},n.onFragDecrypted=function(u,T){var E=T.frag;if(E.type===r.PlaylistLevelType.SUBTITLE){if(!Object(D.isFiniteNumber)(this.initPTS[E.cc])){this.unparsedVttFrags.push(T);return}this.onFragLoaded(p.Events.FRAG_LOADED,T)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(u,T){var E=this.cea608Parser1,a=this.cea608Parser2;if(!this.enabled||!(E&&a))return;for(var L=0;L<T.samples.length;L++){var O=T.samples[L].bytes;if(O){var f=this.extractCea608Data(O);E.addData(T.samples[L].pts,f[0]),a.addData(T.samples[L].pts,f[1])}}},n.onBufferFlushing=function(u,T){var E=T.startOffset,a=T.endOffset,L=T.endOffsetSubtitles,O=T.type,f=this.media;if(!f||f.currentTime<a)return;if(!O||O==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(C){return Object(o.removeCuesInRange)(x[C],E,a)})}if(this.config.renderTextTracksNatively&&(E===0&&L!==void 0)){var b=this.textTracks;Object.keys(b).forEach(function(C){return Object(o.removeCuesInRange)(b[C],E,L)})}},n.extractCea608Data=function(u){for(var T=u[0]&31,E=2,a=[[],[]],L=0;L<T;L++){var O=u[E++],f=127&u[E++],x=127&u[E++],b=(4&O)!==0,C=3&O;if(f===0&&x===0)continue;b&&((C===0||C===1)&&(a[C].push(f),a[C].push(x)))}return a},d}();function g(d,n){return d&&d.label===n.name&&!(d.textTrack1||d.textTrack2)}function w(d,n,l,u){return Math.min(n,u)-Math.max(d,l)}function m(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return D});var D=function(){function p(S,v){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=v}var s=p.prototype;return s.decrypt=function(v,o){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},o,v)},p}()},"./src/crypt/aes-decryptor.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"removePadding",function(){return p}),_.d(c,"default",function(){return s});var D=_("./src/utils/typed-array.ts");function p(S){var v=S.byteLength,o=v&&new DataView(S.buffer).getUint8(v-1);return o?Object(D.sliceUint8)(S,0,v-o):S}var s=function(){function S(){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 v=S.prototype;return v.uint8ArrayToUint32Array_=function(i){for(var r=new DataView(i),h=new Uint32Array(4),y=0;y<4;y++)h[y]=r.getUint32(y*4);return h},v.initTable=function(){var i=this.sBox,r=this.invSBox,h=this.subMix,y=h[0],g=h[1],w=h[2],m=h[3],d=this.invSubMix,n=d[0],l=d[1],u=d[2],T=d[3],E=new Uint32Array(256),a=0,L=0,O=0;for(O=0;O<256;O++)O<128?E[O]=O<<1:E[O]=O<<1^283;for(O=0;O<256;O++){var f=L^L<<1^L<<2^L<<3^L<<4;f=f>>>8^f&255^99,i[a]=f,r[f]=a;var x=E[a],b=E[x],C=E[b],I=E[f]*257^f*16843008;y[a]=I<<24|I>>>8,g[a]=I<<16|I>>>16,w[a]=I<<8|I>>>24,m[a]=I,I=C*16843009^b*65537^x*257^a*16843008,n[f]=I<<24|I>>>8,l[f]=I<<16|I>>>16,u[f]=I<<8|I>>>24,T[f]=I,a?(a=x^E[E[E[C^x]]],L^=E[E[L]]):a=L=1}},v.expandKey=function(i){for(var r=this.uint8ArrayToUint32Array_(i),h=!0,y=0;y<r.length&&h;)h=r[y]===this.key[y],y++;if(h)return;this.key=r;var g=this.keySize=r.length;if(g!==4&&g!==6&&g!==8)throw new Error("Invalid aes key size="+g);var w=this.ksRows=(g+6+1)*4,m,d,n=this.keySchedule=new Uint32Array(w),l=this.invKeySchedule=new Uint32Array(w),u=this.sBox,T=this.rcon,E=this.invSubMix,a=E[0],L=E[1],O=E[2],f=E[3],x,b;for(m=0;m<w;m++){if(m<g){x=n[m]=r[m];continue}b=x,m%g===0?(b=b<<8|b>>>24,b=u[b>>>24]<<24|u[b>>>16&255]<<16|u[b>>>8&255]<<8|u[b&255],b^=T[m/g|0]<<24):g>6&&m%g===4&&(b=u[b>>>24]<<24|u[b>>>16&255]<<16|u[b>>>8&255]<<8|u[b&255]),n[m]=x=(n[m-g]^b)>>>0}for(d=0;d<w;d++)m=w-d,d&3?b=n[m]:b=n[m-4],d<4||m<=4?l[d]=b:l[d]=a[u[b>>>24]]^L[u[b>>>16&255]]^O[u[b>>>8&255]]^f[u[b&255]],l[d]=l[d]>>>0},v.networkToHostOrderSwap=function(i){return i<<24|(i&65280)<<8|(i&16711680)>>8|i>>>24},v.decrypt=function(i,r,h){for(var y=this.keySize+6,g=this.invKeySchedule,w=this.invSBox,m=this.invSubMix,d=m[0],n=m[1],l=m[2],u=m[3],T=this.uint8ArrayToUint32Array_(h),E=T[0],a=T[1],L=T[2],O=T[3],f=new Int32Array(i),x=new Int32Array(f.length),b,C,I,j,M,z,G,B,K,F,H,W,Q,ee,q=this.networkToHostOrderSwap;r<f.length;){for(K=q(f[r]),F=q(f[r+1]),H=q(f[r+2]),W=q(f[r+3]),M=K^g[0],z=W^g[1],G=H^g[2],B=F^g[3],Q=4,ee=1;ee<y;ee++)b=d[M>>>24]^n[z>>16&255]^l[G>>8&255]^u[B&255]^g[Q],C=d[z>>>24]^n[G>>16&255]^l[B>>8&255]^u[M&255]^g[Q+1],I=d[G>>>24]^n[B>>16&255]^l[M>>8&255]^u[z&255]^g[Q+2],j=d[B>>>24]^n[M>>16&255]^l[z>>8&255]^u[G&255]^g[Q+3],M=b,z=C,G=I,B=j,Q=Q+4;b=w[M>>>24]<<24^w[z>>16&255]<<16^w[G>>8&255]<<8^w[B&255]^g[Q],C=w[z>>>24]<<24^w[G>>16&255]<<16^w[B>>8&255]<<8^w[M&255]^g[Q+1],I=w[G>>>24]<<24^w[B>>16&255]<<16^w[M>>8&255]<<8^w[z&255]^g[Q+2],j=w[B>>>24]<<24^w[M>>16&255]<<16^w[z>>8&255]<<8^w[G&255]^g[Q+3],x[r]=q(b^E),x[r+1]=q(j^a),x[r+2]=q(I^L),x[r+3]=q(C^O),E=K,a=F,L=H,O=W,r=r+4}return x.buffer},S}()},"./src/crypt/decrypter.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return r});var D=_("./src/crypt/aes-crypto.ts"),p=_("./src/crypt/fast-aes-key.ts"),s=_("./src/crypt/aes-decryptor.ts"),S=_("./src/utils/logger.ts"),v=_("./src/utils/mp4-tools.ts"),o=_("./src/utils/typed-array.ts"),i=16,r=function(){function h(g,w,m){var d=m===void 0?{}:m,n=d.removePKCS7Padding,l=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=g,this.config=w,this.removePKCS7Padding=l,l)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(T){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var y=h.prototype;return y.destroy=function(){this.observer=null},y.isSync=function(){return this.config.enableSoftwareAES},y.flush=function(){var w=this.currentResult;if(!w){this.reset();return}var m=new Uint8Array(w);return this.reset(),this.removePKCS7Padding?Object(s.removePadding)(m):m},y.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},y.decrypt=function(w,m,d,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(w),m,d);var l=this.flush();l&&n(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(w),m,d).then(n)},y.softwareDecrypt=function(w,m,d){var n=this.currentIV,l=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(w=Object(v.appendUint8Array)(u,w),this.remainderData=null);var T=this.getValidChunk(w);if(!T.length)return null;n&&(d=n);var E=this.softwareDecrypter;E||(E=this.softwareDecrypter=new s.default),E.expandKey(m);var a=l;return this.currentResult=E.decrypt(T.buffer,0,d),this.currentIV=Object(o.sliceUint8)(T,-16).buffer,a||null},y.webCryptoDecrypt=function(w,m,d){var n=this,l=this.subtle;return(this.key!==m||!this.fastAesKey)&&(this.key=m,this.fastAesKey=new p.default(l,m)),this.fastAesKey.expandKey().then(function(u){if(!l)return Promise.reject(new Error("web crypto not initialized"));var T=new D.default(l,d);return T.decrypt(w.buffer,u)}).catch(function(u){return n.onWebCryptoError(u,w,m,d)})},y.onWebCryptoError=function(w,m,d,n){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",w),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(m,d,n)},y.getValidChunk=function(w){var m=w,d=w.length-w.length%i;return d!==w.length&&(m=Object(o.sliceUint8)(w,0,d),this.remainderData=Object(o.sliceUint8)(w,d)),m},y.logOnce=function(w){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+w),this.logEnabled=!1},h}()},"./src/crypt/fast-aes-key.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return D});var D=function(){function p(S,v){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=v}var s=p.prototype;return s.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},p}()},"./src/demux/aacdemuxer.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/demux/base-audio-demuxer.ts"),p=_("./src/demux/adts.ts"),s=_("./src/utils/logger.ts"),S=_("./src/demux/id3.ts");function v(r,h){r.prototype=Object.create(h.prototype),r.prototype.constructor=r,o(r,h)}function o(r,h){return o=Object.setPrototypeOf||function(g,w){return g.__proto__=w,g},o(r,h)}var i=function(r){v(h,r);function h(g,w){var m;return m=r.call(this)||this,m.observer=void 0,m.config=void 0,m.observer=g,m.config=w,m}var y=h.prototype;return y.resetInitSegment=function(w,m,d){r.prototype.resetInitSegment.call(this,w,m,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:w,duration:d,inputTimeScale:9e4,dropped:0}},h.probe=function(w){if(!w)return!1;for(var m=S.getID3Data(w,0)||[],d=m.length,n=w.length;d<n;d++)if(p.probe(w,d))return s.logger.log("ADTS sync word found !"),!0;return!1},y.canParse=function(w,m){return p.canParse(w,m)},y.appendFrame=function(w,m,d){p.initTrackConfig(w,this.observer,m,d,w.manifestCodec);var n=p.appendFrame(w,m,d,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},h}(D.default);i.minProbeByteLength=9,c.default=i},"./src/demux/adts.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"getAudioConfig",function(){return S}),_.d(c,"isHeaderPattern",function(){return v}),_.d(c,"getHeaderLength",function(){return o}),_.d(c,"getFullFrameLength",function(){return i}),_.d(c,"canGetFrameLength",function(){return r}),_.d(c,"isHeader",function(){return h}),_.d(c,"canParse",function(){return y}),_.d(c,"probe",function(){return g}),_.d(c,"initTrackConfig",function(){return w}),_.d(c,"getFrameDuration",function(){return m}),_.d(c,"parseFrameHeader",function(){return d}),_.d(c,"appendFrame",function(){return n});var D=_("./src/utils/logger.ts"),p=_("./src/errors.ts"),s=_("./src/events.ts");function S(l,u,T,E){var a,L,O,f,x=navigator.userAgent.toLowerCase(),b=E,C=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=((u[T+2]&192)>>>6)+1;var I=(u[T+2]&60)>>>2;if(I>C.length-1){l.trigger(s.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+I});return}return O=(u[T+2]&1)<<2,O|=(u[T+3]&192)>>>6,D.logger.log("manifest codec:"+E+", ADTS type:"+a+", samplingIndex:"+I),/firefox/i.test(x)?I>=6?(a=5,f=new Array(4),L=I-3):(a=2,f=new Array(2),L=I):x.indexOf("android")!==-1?(a=2,f=new Array(2),L=I):(a=5,f=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&I>=6?L=I-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(I>=6&&O===1||/vivaldi/i.test(x))||!E&&O===1)&&(a=2,f=new Array(2)),L=I)),f[0]=a<<3,f[0]|=(I&14)>>1,f[1]|=(I&1)<<7,f[1]|=O<<3,a===5&&(f[1]|=(L&14)>>1,f[2]=(L&1)<<7,f[2]|=2<<2,f[3]=0),{config:f,samplerate:C[I],channelCount:O,codec:"mp4a.40."+a,manifestCodec:b}}function v(l,u){return l[u]===255&&(l[u+1]&246)===240}function o(l,u){return l[u+1]&1?7:9}function i(l,u){return(l[u+3]&3)<<11|l[u+4]<<3|(l[u+5]&224)>>>5}function r(l,u){return u+5<l.length}function h(l,u){return u+1<l.length&&v(l,u)}function y(l,u){return r(l,u)&&v(l,u)&&i(l,u)<=l.length-u}function g(l,u){if(h(l,u)){var T=o(l,u);if(u+T>=l.length)return!1;var E=i(l,u);if(E<=T)return!1;var a=u+E;return a===l.length||h(l,a)}return!1}function w(l,u,T,E,a){if(!l.samplerate){var L=S(u,T,E,a);if(!L)return;l.config=L.config,l.samplerate=L.samplerate,l.channelCount=L.channelCount,l.codec=L.codec,l.manifestCodec=L.manifestCodec,D.logger.log("parsed codec:"+l.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function m(l){return 1024*9e4/l}function d(l,u,T,E,a){var L=o(l,u),O=i(l,u);if(O-=L,O>0){var f=T+E*a;return{headerLength:L,frameLength:O,stamp:f}}}function n(l,u,T,E,a){var L=m(l.samplerate),O=d(u,T,E,a,L);if(O){var f=O.frameLength,x=O.headerLength,b=O.stamp,C=x+f,I=Math.max(0,T+C-u.length),j;I?(j=new Uint8Array(C-x),j.set(u.subarray(T+x,u.length),0)):j=u.subarray(T+x,T+C);var M={unit:j,pts:b};return I||l.samples.push(M),{sample:M,length:C,missing:I}}}},"./src/demux/base-audio-demuxer.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"initPTSFn",function(){return i});var D=_("./src/polyfills/number.ts"),p=_("./src/demux/id3.ts"),s=_("./src/demux/dummy-demuxed-track.ts"),S=_("./src/utils/mp4-tools.ts"),v=_("./src/utils/typed-array.ts"),o=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var h=r.prototype;return h.resetInitSegment=function(g,w,m){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},h.resetTimeStamp=function(){},h.resetContiguity=function(){},h.canParse=function(g,w){return!1},h.appendFrame=function(g,w,m){},h.demux=function(g,w){this.cachedData&&(g=Object(S.appendUint8Array)(this.cachedData,g),this.cachedData=null);var m=p.getID3Data(g,0),d=m?m.length:0,n,l,u=this._audioTrack,T=this._id3Track,E=m?p.getTimeStamp(m):void 0,a=g.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=i(E,w)),m&&m.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:m}),l=this.initPTS;d<a;){if(this.canParse(g,d)){var L=this.appendFrame(u,g,d);L?(this.frameIndex++,l=L.sample.pts,d+=L.length,n=d):d=a}else p.canParse(g,d)?(m=p.getID3Data(g,d),T.samples.push({pts:l,dts:l,data:m}),d+=m.length,n=d):d++;if(d===a&&n!==a){var O=Object(v.sliceUint8)(g,n);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,O):this.cachedData=O}}return{audioTrack:u,avcTrack:Object(s.dummyTrack)(),id3Track:T,textTrack:Object(s.dummyTrack)()}},h.demuxSampleAes=function(g,w,m){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},h.flush=function(g){var w=this.cachedData;return w&&(this.cachedData=null,this.demux(w,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(s.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(s.dummyTrack)()}},h.destroy=function(){},r}(),i=function(h,y){return Object(D.isFiniteNumber)(h)?h*90:y*9e4};c.default=o},"./src/demux/chunk-cache.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return D});var D=function(){function s(){this.chunks=[],this.dataLength=0}var S=s.prototype;return S.push=function(o){this.chunks.push(o),this.dataLength+=o.length},S.flush=function(){var o=this.chunks,i=this.dataLength,r;if(o.length)o.length===1?r=o[0]:r=p(o,i);else return new Uint8Array(0);return this.reset(),r},S.reset=function(){this.chunks.length=0,this.dataLength=0},s}();function p(s,S){for(var v=new Uint8Array(S),o=0,i=0;i<s.length;i++){var r=s[i];v.set(r,o),o+=r.length}return v}},"./src/demux/dummy-demuxed-track.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"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(P,c,_){"use strict";_.r(c);var D=_("./src/utils/logger.ts"),p=function(){function s(v){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=v,this.bytesAvailable=v.byteLength,this.word=0,this.bitsAvailable=0}var S=s.prototype;return S.loadWord=function(){var o=this.data,i=this.bytesAvailable,r=o.byteLength-i,h=new Uint8Array(4),y=Math.min(4,i);if(y===0)throw new Error("no bytes available");h.set(o.subarray(r,r+y)),this.word=new DataView(h.buffer).getUint32(0),this.bitsAvailable=y*8,this.bytesAvailable-=y},S.skipBits=function(o){var i;this.bitsAvailable>o?(this.word<<=o,this.bitsAvailable-=o):(o-=this.bitsAvailable,i=o>>3,o-=i>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=o,this.bitsAvailable-=o)},S.readBits=function(o){var i=Math.min(this.bitsAvailable,o),r=this.word>>>32-i;return o>32&&D.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),i=o-i,i>0&&this.bitsAvailable?r<<i|this.readBits(i):r},S.skipLZ=function(){var o;for(o=0;o<this.bitsAvailable;++o)if((this.word&2147483648>>>o)!==0)return this.word<<=o,this.bitsAvailable-=o,o;return this.loadWord(),o+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var o=this.skipLZ();return this.readBits(o+1)-1},S.readEG=function(){var o=this.readUEG();return 1&o?1+o>>>1:-1*(o>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(o){for(var i=8,r=8,h,y=0;y<o;y++)r!==0&&(h=this.readEG(),r=(i+h+256)%256),i=r===0?i:r},S.readSPS=function(){var o=0,i=0,r=0,h=0,y,g,w,m=this.readUByte.bind(this),d=this.readBits.bind(this),n=this.readUEG.bind(this),l=this.readBoolean.bind(this),u=this.skipBits.bind(this),T=this.skipEG.bind(this),E=this.skipUEG.bind(this),a=this.skipScalingList.bind(this);m();var L=m();if(d(5),u(3),m(),E(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var O=n();if(O===3&&u(1),E(),E(),u(1),l())for(g=O!==3?8:12,w=0;w<g;w++)l()&&(w<6?a(16):a(64))}E();var f=n();if(f===0)n();else if(f===1)for(u(1),T(),T(),y=n(),w=0;w<y;w++)T();E(),u(1);var x=n(),b=n(),C=d(1);C===0&&u(1),u(1),l()&&(o=n(),i=n(),r=n(),h=n());var I=[1,1];if(l()&&l()){var j=m();switch(j){case 1:I=[1,1];break;case 2:I=[12,11];break;case 3:I=[10,11];break;case 4:I=[16,11];break;case 5:I=[40,33];break;case 6:I=[24,11];break;case 7:I=[20,11];break;case 8:I=[32,11];break;case 9:I=[80,33];break;case 10:I=[18,11];break;case 11:I=[15,11];break;case 12:I=[64,33];break;case 13:I=[160,99];break;case 14:I=[4,3];break;case 15:I=[3,2];break;case 16:I=[2,1];break;case 255:{I=[m()<<8|m(),m()<<8|m()];break}}}return{width:Math.ceil((x+1)*16-o*2-i*2),height:(2-C)*(b+1)*16-(C?2:4)*(r+h),pixelRatio:I}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},s}();c.default=p},"./src/demux/id3.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"isHeader",function(){return D}),_.d(c,"isFooter",function(){return p}),_.d(c,"getID3Data",function(){return s}),_.d(c,"canParse",function(){return v}),_.d(c,"getTimeStamp",function(){return o}),_.d(c,"isTimeStampFrame",function(){return i}),_.d(c,"getID3Frames",function(){return h}),_.d(c,"decodeFrame",function(){return y}),_.d(c,"utf8ArrayToStr",function(){return n}),_.d(c,"testables",function(){return l});var D=function(a,L){return L+10<=a.length&&(a[L]===73&&a[L+1]===68&&a[L+2]===51&&(a[L+3]<255&&a[L+4]<255&&(a[L+6]<128&&a[L+7]<128&&a[L+8]<128&&a[L+9]<128)))},p=function(a,L){return L+10<=a.length&&(a[L]===51&&a[L+1]===68&&a[L+2]===73&&(a[L+3]<255&&a[L+4]<255&&(a[L+6]<128&&a[L+7]<128&&a[L+8]<128&&a[L+9]<128)))},s=function(a,L){for(var O=L,f=0;D(a,L);){f+=10;var x=S(a,L+6);f+=x,p(a,L+10)&&(f+=10),L+=f}return f>0?a.subarray(O,O+f):void 0},S=function(a,L){var O=0;return O=(a[L]&127)<<21,O|=(a[L+1]&127)<<14,O|=(a[L+2]&127)<<7,O|=a[L+3]&127,O},v=function(a,L){return D(a,L)&&S(a,L+6)+10<=a.length-L},o=function(a){for(var L=h(a),O=0;O<L.length;O++){var f=L[O];if(i(f))return d(f)}return},i=function(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"},r=function(a){var L=String.fromCharCode(a[0],a[1],a[2],a[3]),O=S(a,4),f=10;return{type:L,size:O,data:a.subarray(f,f+O)}},h=function(a){for(var L=0,O=[];D(a,L);){var f=S(a,L+6);L+=10;for(var x=L+f;L+8<x;){var b=r(a.subarray(L)),C=y(b);C&&O.push(C),L+=b.size+10}p(a,L)&&(L+=10)}return O},y=function(a){return a.type==="PRIV"?g(a):a.type[0]==="W"?m(a):w(a)},g=function(a){if(a.size<2)return;var L=n(a.data,!0),O=new Uint8Array(a.data.subarray(L.length+1));return{key:a.type,info:L,data:O.buffer}},w=function(a){if(a.size<2)return;if(a.type==="TXXX"){var L=1,O=n(a.data.subarray(L),!0);L+=O.length+1;var f=n(a.data.subarray(L));return{key:a.type,info:O,data:f}}var x=n(a.data.subarray(1));return{key:a.type,data:x}},m=function(a){if(a.type==="WXXX"){if(a.size<2)return;var L=1,O=n(a.data.subarray(L),!0);L+=O.length+1;var f=n(a.data.subarray(L));return{key:a.type,info:O,data:f}}var x=n(a.data);return{key:a.type,data:x}},d=function(a){if(a.data.byteLength===8){var L=new Uint8Array(a.data),O=L[3]&1,f=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return f/=45,O&&(f+=4772185884e-2),Math.round(f)}return},n=function(a,L){L===void 0&&(L=!1);var O=T();if(O){var f=O.decode(a);if(L){var x=f.indexOf("\0");return x!==-1?f.substring(0,x):f}return f.replace(/\0/g,"")}for(var b=a.length,C,I,j,M="",z=0;z<b;){if(C=a[z++],C===0&&L)return M;if(C===0||C===3)continue;switch(C>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:M+=String.fromCharCode(C);break;case 12:case 13:I=a[z++],M+=String.fromCharCode((C&31)<<6|I&63);break;case 14:I=a[z++],j=a[z++],M+=String.fromCharCode((C&15)<<12|(I&63)<<6|(j&63)<<0);break;default:}}return M},l={decodeTextFrame:w},u;function T(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/demux/base-audio-demuxer.ts"),p=_("./src/demux/id3.ts"),s=_("./src/utils/logger.ts"),S=_("./src/demux/mpegaudio.ts");function v(r,h){r.prototype=Object.create(h.prototype),r.prototype.constructor=r,o(r,h)}function o(r,h){return o=Object.setPrototypeOf||function(g,w){return g.__proto__=w,g},o(r,h)}var i=function(r){v(h,r);function h(){return r.apply(this,arguments)||this}var y=h.prototype;return y.resetInitSegment=function(w,m,d){r.prototype.resetInitSegment.call(this,w,m,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:w,duration:d,inputTimeScale:9e4,dropped:0}},h.probe=function(w){if(!w)return!1;for(var m=p.getID3Data(w,0)||[],d=m.length,n=w.length;d<n;d++)if(S.probe(w,d))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},y.canParse=function(w,m){return S.canParse(w,m)},y.appendFrame=function(w,m,d){return this.initPTS===null?void 0:S.appendFrame(w,m,d,this.initPTS,this.frameIndex)},h}(D.default);i.minProbeByteLength=4,c.default=i},"./src/demux/mp4demuxer.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/utils/mp4-tools.ts"),p=_("./src/demux/dummy-demuxed-track.ts"),s=function(){function S(o,i){this.remainderData=null,this.config=void 0,this.config=i}var v=S.prototype;return v.resetTimeStamp=function(){},v.resetInitSegment=function(){},v.resetContiguity=function(){},S.probe=function(i){return Object(D.findBox)({data:i,start:0,end:Math.min(i.length,16384)},["moof"]).length>0},v.demux=function(i){var r=i,h=Object(p.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(D.appendUint8Array)(this.remainderData,i));var y=Object(D.segmentValidRange)(r);this.remainderData=y.remainder,h.samples=y.valid||new Uint8Array}else h.samples=r;return{audioTrack:Object(p.dummyTrack)(),avcTrack:h,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},v.flush=function(){var i=Object(p.dummyTrack)();return i.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(p.dummyTrack)(),avcTrack:i,id3Track:Object(p.dummyTrack)(),textTrack:Object(p.dummyTrack)()}},v.demuxSampleAes=function(i,r,h){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},v.destroy=function(){},S}();s.minProbeByteLength=1024,c.default=s},"./src/demux/mpegaudio.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"appendFrame",function(){return o}),_.d(c,"parseHeader",function(){return i}),_.d(c,"isHeaderPattern",function(){return r}),_.d(c,"isHeader",function(){return h}),_.d(c,"canParse",function(){return y}),_.d(c,"probe",function(){return g});var D=null,p=[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],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],v=[0,1,1,4];function o(w,m,d,n,l){if(d+24>m.length)return;var u=i(m,d);if(u&&d+u.frameLength<=m.length){var T=u.samplesPerFrame*9e4/u.sampleRate,E=n+l*T,a={unit:m.subarray(d,d+u.frameLength),pts:E,dts:E};return w.config=[],w.channelCount=u.channelCount,w.samplerate=u.sampleRate,w.samples.push(a),{sample:a,length:u.frameLength,missing:0}}}function i(w,m){var d=w[m+1]>>3&3,n=w[m+1]>>1&3,l=w[m+2]>>4&15,u=w[m+2]>>2&3;if(d!==1&&l!==0&&l!==15&&u!==3){var T=w[m+2]>>1&1,E=w[m+3]>>6,a=d===3?3-n:n===3?3:4,L=p[a*14+l-1]*1e3,O=d===3?0:d===2?1:2,f=s[O*3+u],x=E===3?1:2,b=S[d][n],C=v[n],I=b*8*C,j=Math.floor(b*L/f+T)*C;if(D===null){var M=navigator.userAgent||"",z=M.match(/Chrome\/(\d+)/i);D=z?parseInt(z[1]):0}var G=!!D&&D<=87;return G&&n===2&&L>=224e3&&E===0&&(w[m+3]=w[m+3]|128),{sampleRate:f,channelCount:x,frameLength:j,samplesPerFrame:I}}}function r(w,m){return w[m]===255&&(w[m+1]&224)===224&&(w[m+1]&6)!==0}function h(w,m){return m+1<w.length&&r(w,m)}function y(w,m){var d=4;return r(w,m)&&d<=w.length-m}function g(w,m){if(m+1<w.length&&r(w,m)){var d=4,n=i(w,m),l=d;n!=null&&n.frameLength&&(l=n.frameLength);var u=m+l;return u===w.length||h(w,u)}return!1}},"./src/demux/sample-aes.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/crypt/decrypter.ts"),p=_("./src/demux/tsdemuxer.ts"),s=function(){function S(o,i,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new D.default(o,i,{removePKCS7Padding:!1})}var v=S.prototype;return v.decryptBuffer=function(i,r){this.decrypter.decrypt(i,this.keyData.key.buffer,this.keyData.iv.buffer,r)},v.decryptAacSample=function(i,r,h,y){var g=i[r].unit,w=g.subarray(16,g.length-g.length%16),m=w.buffer.slice(w.byteOffset,w.byteOffset+w.length),d=this;this.decryptBuffer(m,function(n){var l=new Uint8Array(n);g.set(l,16),y||d.decryptAacSamples(i,r+1,h)})},v.decryptAacSamples=function(i,r,h){for(;;r++){if(r>=i.length){h();return}if(i[r].unit.length<32)continue;var y=this.decrypter.isSync();if(this.decryptAacSample(i,r,h,y),!y)return}},v.getAvcEncryptedData=function(i){for(var r=Math.floor((i.length-48)/160)*16+16,h=new Int8Array(r),y=0,g=32;g<=i.length-16;g+=160,y+=16)h.set(i.subarray(g,g+16),y);return h},v.getAvcDecryptedUnit=function(i,r){for(var h=new Uint8Array(r),y=0,g=32;g<=i.length-16;g+=160,y+=16)i.set(h.subarray(y,y+16),g);return i},v.decryptAvcSample=function(i,r,h,y,g,w){var m=Object(p.discardEPB)(g.data),d=this.getAvcEncryptedData(m),n=this;this.decryptBuffer(d.buffer,function(l){g.data=n.getAvcDecryptedUnit(m,l),w||n.decryptAvcSamples(i,r,h+1,y)})},v.decryptAvcSamples=function(i,r,h,y){if(i instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,h=0){if(r>=i.length){y();return}for(var g=i[r].units;!(h>=g.length);h++){var w=g[h];if(w.data.length<=48||w.type!==1&&w.type!==5)continue;var m=this.decrypter.isSync();if(this.decryptAvcSample(i,r,h,y,w,m),!m)return}}},S}();c.default=s},"./src/demux/transmuxer-interface.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return g});var D=_("./node_modules/webworkify-webpack/index.js"),p=_.n(D),s=_("./src/events.ts"),S=_("./src/demux/transmuxer.ts"),v=_("./src/utils/logger.ts"),o=_("./src/errors.ts"),i=_("./src/utils/mediasource-helper.ts"),r=_("./node_modules/eventemitter3/index.js"),h=_.n(r),y=Object(i.getMediaSource)()||{isTypeSupported:function(){return!1}},g=function(){function w(d,n,l,u){var T=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=d,this.id=n,this.onTransmuxComplete=l,this.onFlush=u;var E=d.config,a=function(b,C){C=C||{},C.frag=T.frag,C.id=T.id,d.trigger(b,C)};this.observer=new r.EventEmitter,this.observer.on(s.Events.FRAG_DECRYPTED,a),this.observer.on(s.Events.ERROR,a);var L={mp4:y.isTypeSupported("video/mp4"),mpeg:y.isTypeSupported("audio/mpeg"),mp3:y.isTypeSupported('audio/mp4; codecs="mp3"')},O=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){v.logger.log("demuxing in webworker");var f;try{f=this.worker=D("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(x){d.trigger(s.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},f.postMessage({cmd:"init",typeSupported:L,vendor:O,id:n,config:JSON.stringify(E)})}catch(x){v.logger.warn("Error in worker:",x),v.logger.error("Error while initializing DemuxerWorker, fallback to inline"),f&&self.URL.revokeObjectURL(f.objectURL),this.transmuxer=new S.default(this.observer,L,E,O,n),this.worker=null}}else this.transmuxer=new S.default(this.observer,L,E,O,n)}var m=w.prototype;return m.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},m.push=function(n,l,u,T,E,a,L,O,f,x){var b=this;f.transmuxing.start=self.performance.now();var C=this.transmuxer,I=this.worker,j=a?a.start:E.start,M=E.decryptdata,z=this.frag,G=!(z&&E.cc===z.cc),B=!(z&&f.level===z.level),K=z?f.sn-z.sn:-1,F=this.part?f.part-this.part.index:1,H=!B&&(K===1||K===0&&F===1),W=self.performance.now();(B||K||E.stats.parsing.start===0)&&(E.stats.parsing.start=W),a&&(F||!H)&&(a.stats.parsing.start=W);var Q=new S.TransmuxState(G,H,O,B,j);if(!H||G){v.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+f.sn+" p: "+f.part+" level: "+f.level+" id: "+f.id+`
|
|
|
discontinuity: `+G+`
|
|
|
trackSwitch: `+B+`
|
|
|
contiguous: `+H+`
|
|
|
accurateTimeOffset: `+O+`
|
|
|
timeOffset: `+j);var ee=new S.TransmuxConfig(u,T,l,L,x);this.configureTransmuxer(ee)}if(this.frag=E,this.part=a,I)I.postMessage({cmd:"demux",data:n,decryptdata:M,chunkMeta:f,state:Q},n instanceof ArrayBuffer?[n]:[]);else if(C){var q=C.push(n,M,f,Q);Object(S.isPromise)(q)?q.then(function(pe){b.handleTransmuxComplete(pe)}):this.handleTransmuxComplete(q)}},m.flush=function(n){var l=this;n.transmuxing.start=self.performance.now();var u=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:n});else if(u){var E=u.flush(n);Object(S.isPromise)(E)?E.then(function(a){l.handleFlushResult(a,n)}):this.handleFlushResult(E,n)}},m.handleFlushResult=function(n,l){var u=this;n.forEach(function(T){u.handleTransmuxComplete(T)}),this.onFlush(l)},m.onWorkerMessage=function(n){var l=n.data,u=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,u.trigger(l.event,l.data);break}}},m.configureTransmuxer=function(n){var l=this.worker,u=this.transmuxer;l?l.postMessage({cmd:"configure",config:n}):u&&u.configure(n)},m.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},w}()},"./src/demux/transmuxer-worker.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return o});var D=_("./src/demux/transmuxer.ts"),p=_("./src/events.ts"),s=_("./src/utils/logger.ts"),S=_("./node_modules/eventemitter3/index.js"),v=_.n(S);function o(g){var w=new S.EventEmitter,m=function(n,l){g.postMessage({event:n,data:l})};w.on(p.Events.FRAG_DECRYPTED,m),w.on(p.Events.ERROR,m),g.addEventListener("message",function(d){var n=d.data;switch(n.cmd){case"init":{var l=JSON.parse(n.config);g.transmuxer=new D.default(w,n.typeSupported,l,n.vendor,n.id),Object(s.enableLogs)(l.debug),m("init",null);break}case"configure":{g.transmuxer.configure(n.config);break}case"demux":{var u=g.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(D.isPromise)(u)?u.then(function(a){i(g,a)}):i(g,u);break}case"flush":{var T=n.chunkMeta,E=g.transmuxer.flush(T);Object(D.isPromise)(E)?E.then(function(a){h(g,a,T)}):h(g,E,T);break}default:break}})}function i(g,w){if(y(w.remuxResult))return;var m=[],d=w.remuxResult,n=d.audio,l=d.video;n&&r(m,n),l&&r(m,l),g.postMessage({event:"transmuxComplete",data:w},m)}function r(g,w){w.data1&&g.push(w.data1.buffer),w.data2&&g.push(w.data2.buffer)}function h(g,w,m){w.forEach(function(d){i(g,d)}),g.postMessage({event:"flush",data:m})}function y(g){return!g.audio&&!g.video&&!g.text&&!g.id3&&!g.initSegment}},"./src/demux/transmuxer.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return l}),_.d(c,"isPromise",function(){return E}),_.d(c,"TransmuxConfig",function(){return a}),_.d(c,"TransmuxState",function(){return L});var D=_("./src/events.ts"),p=_("./src/errors.ts"),s=_("./src/crypt/decrypter.ts"),S=_("./src/demux/aacdemuxer.ts"),v=_("./src/demux/mp4demuxer.ts"),o=_("./src/demux/tsdemuxer.ts"),i=_("./src/demux/mp3demuxer.ts"),r=_("./src/remux/mp4-remuxer.ts"),h=_("./src/remux/passthrough-remuxer.ts"),y=_("./src/demux/chunk-cache.ts"),g=_("./src/utils/mp4-tools.ts"),w=_("./src/utils/logger.ts"),m;try{m=self.performance.now.bind(self.performance)}catch(O){w.logger.debug("Unable to use Performance API on this environment"),m=self.Date.now}var d=[{demux:o.default,remux:r.default},{demux:v.default,remux:h.default},{demux:S.default,remux:r.default},{demux:i.default,remux:r.default}],n=1024;d.forEach(function(O){var f=O.demux;n=Math.max(n,f.minProbeByteLength)});var l=function(){function O(x,b,C,I,j){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 y.default,this.observer=x,this.typeSupported=b,this.config=C,this.vendor=I,this.id=j}var f=O.prototype;return f.configure=function(b){this.transmuxConfig=b,this.decrypter&&this.decrypter.reset()},f.push=function(b,C,I,j){var M=this,z=I.transmuxing;z.executeStart=m();var G=new Uint8Array(b),B=this.cache,K=this.config,F=this.currentTransmuxState,H=this.transmuxConfig;j&&(this.currentTransmuxState=j);var W=u(G,C);if(W&&W.method==="AES-128"){var Q=this.getDecrypter();if(K.enableSoftwareAES){var ee=Q.softwareDecrypt(G,W.key.buffer,W.iv.buffer);if(!ee)return z.executeEnd=m(),T(I);G=new Uint8Array(ee)}else return this.decryptionPromise=Q.webCryptoDecrypt(G,W.key.buffer,W.iv.buffer).then(function(J){var X=M.push(J,null,I);return M.decryptionPromise=null,X}),this.decryptionPromise}var q=j||F,pe=q.contiguous,ye=q.discontinuity,ie=q.trackSwitch,Se=q.accurateTimeOffset,ge=q.timeOffset,oe=H.audioCodec,le=H.videoCodec,te=H.defaultInitPts,be=H.duration,Z=H.initSegmentData;if((ye||ie)&&this.resetInitSegment(Z,oe,le,be),ye&&this.resetInitialTimestamp(te),pe||this.resetContiguity(),this.needsProbing(G,ye,ie)){if(B.dataLength){var ae=B.flush();G=Object(g.appendUint8Array)(ae,G)}this.configureTransmuxer(G,H)}var Ee=this.transmux(G,W,ge,Se,I),ne=this.currentTransmuxState;return ne.contiguous=!0,ne.discontinuity=!1,ne.trackSwitch=!1,z.executeEnd=m(),Ee},f.flush=function(b){var C=this,I=b.transmuxing;I.executeStart=m();var j=this.decrypter,M=this.cache,z=this.currentTransmuxState,G=this.decryptionPromise;if(G)return G.then(function(){return C.flush(b)});var B=[],K=z.timeOffset;if(j){var F=j.flush();F&&B.push(this.push(F,null,b))}var H=M.dataLength;M.reset();var W=this.demuxer,Q=this.remuxer;if(!W||!Q)return H>=n&&this.observer.emit(D.Events.ERROR,D.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),I.executeEnd=m(),[T(b)];var ee=W.flush(K);return E(ee)?ee.then(function(q){return C.flushRemux(B,q,b),B}):(this.flushRemux(B,ee,b),B)},f.flushRemux=function(b,C,I){var j=C.audioTrack,M=C.avcTrack,z=C.id3Track,G=C.textTrack,B=this.currentTransmuxState,K=B.accurateTimeOffset,F=B.timeOffset;w.logger.log("[transmuxer.ts]: Flushed fragment "+I.sn+(I.part>-1?" p: "+I.part:"")+" of level "+I.level);var H=this.remuxer.remux(j,M,z,G,F,K,!0,this.id);b.push({remuxResult:H,chunkMeta:I}),I.transmuxing.executeEnd=m()},f.resetInitialTimestamp=function(b){var C=this.demuxer,I=this.remuxer;if(!C||!I)return;C.resetTimeStamp(b),I.resetTimeStamp(b)},f.resetContiguity=function(){var b=this.demuxer,C=this.remuxer;if(!b||!C)return;b.resetContiguity(),C.resetNextTimestamp()},f.resetInitSegment=function(b,C,I,j){var M=this.demuxer,z=this.remuxer;if(!M||!z)return;M.resetInitSegment(C,I,j),z.resetInitSegment(b,C,I)},f.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},f.transmux=function(b,C,I,j,M){var z;return C&&C.method==="SAMPLE-AES"?z=this.transmuxSampleAes(b,C,I,j,M):z=this.transmuxUnencrypted(b,I,j,M),z},f.transmuxUnencrypted=function(b,C,I,j){var M=this.demuxer.demux(b,C,!1,!this.config.progressive),z=M.audioTrack,G=M.avcTrack,B=M.id3Track,K=M.textTrack,F=this.remuxer.remux(z,G,B,K,C,I,!1,this.id);return{remuxResult:F,chunkMeta:j}},f.transmuxSampleAes=function(b,C,I,j,M){var z=this;return this.demuxer.demuxSampleAes(b,C,I).then(function(G){var B=z.remuxer.remux(G.audioTrack,G.avcTrack,G.id3Track,G.textTrack,I,j,!1,z.id);return{remuxResult:B,chunkMeta:M}})},f.configureTransmuxer=function(b,C){for(var I=this.config,j=this.observer,M=this.typeSupported,z=this.vendor,G=C.audioCodec,B=C.defaultInitPts,K=C.duration,F=C.initSegmentData,H=C.videoCodec,W,Q=0,ee=d.length;Q<ee;Q++)if(d[Q].demux.probe(b)){W=d[Q];break}W||(w.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),W={demux:v.default,remux:h.default});var q=this.demuxer,pe=this.remuxer,ye=W.remux,ie=W.demux;(!pe||!(pe instanceof ye))&&(this.remuxer=new ye(j,I,M,z)),(!q||!(q instanceof ie))&&(this.demuxer=new ie(j,I,M),this.probe=ie.probe),this.resetInitSegment(F,G,H,K),this.resetInitialTimestamp(B)},f.needsProbing=function(b,C,I){return!this.demuxer||!this.remuxer||C||I},f.getDecrypter=function(){var b=this.decrypter;return b||(b=this.decrypter=new s.default(this.observer,this.config)),b},O}();function u(O,f){var x=null;return O.byteLength>0&&f!=null&&f.key!=null&&f.iv!==null&&f.method!=null&&(x=f),x}var T=function(f){return{remuxResult:{},chunkMeta:f}};function E(O){return"then"in O&&O.then instanceof Function}var a=function(f,x,b,C,I){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=f,this.videoCodec=x,this.initSegmentData=b,this.duration=C,this.defaultInitPts=I},L=function(f,x,b,C,I){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=f,this.contiguous=x,this.accurateTimeOffset=b,this.trackSwitch=C,this.timeOffset=I}},"./src/demux/tsdemuxer.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"discardEPB",function(){return T});var D=_("./src/demux/adts.ts"),p=_("./src/demux/mpegaudio.ts"),s=_("./src/demux/exp-golomb.ts"),S=_("./src/demux/id3.ts"),v=_("./src/demux/sample-aes.ts"),o=_("./src/events.ts"),i=_("./src/utils/mp4-tools.ts"),r=_("./src/utils/logger.ts"),h=_("./src/errors.ts"),y={video:1,audio:2,id3:3,text:4},g=function(){function E(L,O,f){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=L,this.config=O,this.typeSupported=f}E.probe=function(O){var f=E.syncOffset(O);return f<0?!1:(f&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+f+", junk ahead ?"),!0)},E.syncOffset=function(O){for(var f=Math.min(1e3,O.length-3*188),x=0;x<f;){if(O[x]===71&&O[x+188]===71&&O[x+2*188]===71)return x;x++}return-1},E.createTrack=function(O,f){return{container:O==="video"||O==="audio"?"video/mp2t":void 0,type:O,id:y[O],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:O==="audio"?f:void 0}};var a=E.prototype;return a.resetInitSegment=function(O,f,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=E.createTrack("video",x),this._audioTrack=E.createTrack("audio",x),this._id3Track=E.createTrack("id3",x),this._txtTrack=E.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=O,this.videoCodec=f,this._duration=x},a.resetTimeStamp=function(){},a.resetContiguity=function(){var O=this._audioTrack,f=this._avcTrack,x=this._id3Track;O&&(O.pesData=null),f&&(f.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},a.demux=function(O,f,x,b){x===void 0&&(x=!1),b===void 0&&(b=!1),x||(this.sampleAes=null);var C,I=this._avcTrack,j=this._audioTrack,M=this._id3Track,z=I.pid,G=I.pesData,B=j.pid,K=M.pid,F=j.pesData,H=M.pesData,W=!1,Q=this.pmtParsed,ee=this._pmtId,q=O.length;if(this.remainderData&&(O=Object(i.appendUint8Array)(this.remainderData,O),q=O.length,this.remainderData=null),q<188&&!b)return this.remainderData=O,{audioTrack:j,avcTrack:I,id3Track:M,textTrack:this._txtTrack};var pe=Math.max(0,E.syncOffset(O));q-=(q+pe)%188,q<O.byteLength&&!b&&(this.remainderData=new Uint8Array(O.buffer,q,O.buffer.byteLength-q));for(var ye=pe;ye<q;ye+=188)if(O[ye]===71){var ie=!!(O[ye+1]&64),Se=((O[ye+1]&31)<<8)+O[ye+2],ge=(O[ye+3]&48)>>4,oe=void 0;if(ge>1){if(oe=ye+5+O[ye+4],oe===ye+188)continue}else oe=ye+4;switch(Se){case z:ie&&(G&&(C=n(G))&&this.parseAVCPES(C,!1),G={data:[],size:0}),G&&(G.data.push(O.subarray(oe,ye+188)),G.size+=ye+188-oe);break;case B:ie&&(F&&(C=n(F))&&(j.isAAC?this.parseAACPES(C):this.parseMPEGPES(C)),F={data:[],size:0}),F&&(F.data.push(O.subarray(oe,ye+188)),F.size+=ye+188-oe);break;case K:ie&&(H&&(C=n(H))&&this.parseID3PES(C),H={data:[],size:0}),H&&(H.data.push(O.subarray(oe,ye+188)),H.size+=ye+188-oe);break;case 0:ie&&(oe+=O[oe]+1),ee=this._pmtId=m(O,oe);break;case ee:{ie&&(oe+=O[oe]+1);var le=d(O,oe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);z=le.avc,z>0&&(I.pid=z),B=le.audio,B>0&&(j.pid=B,j.isAAC=le.isAAC),K=le.id3,K>0&&(M.pid=K),W&&!Q&&(r.logger.log("reparse from beginning"),W=!1,ye=pe-188),Q=this.pmtParsed=!0;break}case 17:case 8191:break;default:W=!0;break}}else this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});I.pesData=G,j.pesData=F,M.pesData=H;var te={audioTrack:j,avcTrack:I,id3Track:M,textTrack:this._txtTrack};return b&&this.extractRemainingSamples(te),te},a.flush=function(){var O=this.remainderData;this.remainderData=null;var f;return O?f=this.demux(O,-1,!1,!0):f={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(f),this.sampleAes?this.decrypt(f,this.sampleAes):f},a.extractRemainingSamples=function(O){var f=O.audioTrack,x=O.avcTrack,b=O.id3Track,C=x.pesData,I=f.pesData,j=b.pesData,M;C&&(M=n(C))?(this.parseAVCPES(M,!0),x.pesData=null):x.pesData=C,I&&(M=n(I))?(f.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),f.pesData=null):(I!=null&&I.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),f.pesData=I),j&&(M=n(j))?(this.parseID3PES(M),b.pesData=null):b.pesData=j},a.demuxSampleAes=function(O,f,x){var b=this.demux(O,x,!0,!this.config.progressive),C=this.sampleAes=new v.default(this.observer,this.config,f);return this.decrypt(b,C)},a.decrypt=function(O,f){return new Promise(function(x){var b=O.audioTrack,C=O.avcTrack;b.samples&&b.isAAC?f.decryptAacSamples(b.samples,0,function(){C.samples?f.decryptAvcSamples(C.samples,0,0,function(){x(O)}):x(O)}):C.samples&&f.decryptAvcSamples(C.samples,0,0,function(){x(O)})})},a.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},a.parseAVCPES=function(O,f){var x=this,b=this._avcTrack,C=this.parseAVCNALu(O.data),I=!1,j=this.avcSample,M,z=!1;O.data=null,j&&C.length&&!b.audFound&&(l(j,b),j=this.avcSample=w(!1,O.pts,O.dts,"")),C.forEach(function(G){switch(G.type){case 1:{M=!0,j||(j=x.avcSample=w(!0,O.pts,O.dts,"")),I&&(j.debug+="NDR "),j.frame=!0;var B=G.data;if(z&&B.length>4){var K=new s.default(B).readSliceType();(K===2||K===4||K===7||K===9)&&(j.key=!0)}break}case 5:M=!0,j||(j=x.avcSample=w(!0,O.pts,O.dts,"")),I&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{M=!0,I&&j&&(j.debug+="SEI ");var F=new s.default(T(G.data));F.readUByte();for(var H=0,W=0,Q=!1,ee=0;!Q&&F.bytesAvailable>1;){H=0;do ee=F.readUByte(),H+=ee;while(ee===255);W=0;do ee=F.readUByte(),W+=ee;while(ee===255);if(H===4&&F.bytesAvailable!==0){Q=!0;var q=F.readUByte();if(q===181){var pe=F.readUShort();if(pe===49){var ye=F.readUInt();if(ye===1195456820){var ie=F.readUByte();if(ie===3){for(var Se=F.readUByte(),ge=F.readUByte(),oe=31&Se,le=[Se,ge],te=0;te<oe;te++)le.push(F.readUByte()),le.push(F.readUByte()),le.push(F.readUByte());u(x._txtTrack.samples,{type:3,pts:O.pts,bytes:le})}}}}}else if(H===5&&F.bytesAvailable!==0){if(Q=!0,W>16){for(var be=[],Z=0;Z<16;Z++)be.push(F.readUByte().toString(16)),(Z===3||Z===5||Z===7||Z===9)&&be.push("-");for(var ae=W-16,Ee=new Uint8Array(ae),ne=0;ne<ae;ne++)Ee[ne]=F.readUByte();u(x._txtTrack.samples,{pts:O.pts,payloadType:H,uuid:be.join(""),userData:Object(S.utf8ArrayToStr)(Ee),userDataBytes:Ee})}}else if(W<F.bytesAvailable)for(var J=0;J<W;J++)F.readUByte()}break}case 7:if(M=!0,z=!0,I&&j&&(j.debug+="SPS "),!b.sps){var X=new s.default(G.data),Y=X.readSPS();b.width=Y.width,b.height=Y.height,b.pixelRatio=Y.pixelRatio,b.sps=[G.data],b.duration=x._duration;for(var he=G.data.subarray(1,4),de="avc1.",Te=0;Te<3;Te++){var ze=he[Te].toString(16);ze.length<2&&(ze="0"+ze),de+=ze}b.codec=de}break;case 8:M=!0,I&&j&&(j.debug+="PPS "),b.pps||(b.pps=[G.data]);break;case 9:M=!1,b.audFound=!0,j&&l(j,b),j=x.avcSample=w(!1,O.pts,O.dts,I?"AUD ":"");break;case 12:M=!1;break;default:M=!1,j&&(j.debug+="unknown NAL "+G.type+" ");break}if(j&&M){var Ze=j.units;Ze.push(G)}}),f&&j&&(l(j,b),this.avcSample=null)},a.getLastNalUnit=function(){var O,f=this.avcSample,x;if(!f||f.units.length===0){var b=this._avcTrack.samples;f=b[b.length-1]}if((O=f)!==null&&O!==void 0&&O.units){var C=f.units;x=C[C.length-1]}return x},a.parseAVCNALu=function(O){var f=O.byteLength,x=this._avcTrack,b=x.naluState||0,C=b,I=[],j=0,M,z,G,B=-1,K=0;for(b===-1&&(B=0,K=O[0]&31,b=0,j=1);j<f;){if(M=O[j++],!b){b=M?0:1;continue}if(b===1){b=M?0:2;continue}if(!M)b=3;else if(M===1){if(B>=0){var F={data:O.subarray(B,j-b-1),type:K};I.push(F)}else{var H=this.getLastNalUnit();if(H&&(C&&j<=4-C&&(H.state&&(H.data=H.data.subarray(0,H.data.byteLength-C))),z=j-b-1,z>0)){var W=new Uint8Array(H.data.byteLength+z);W.set(H.data,0),W.set(O.subarray(0,z),H.data.byteLength),H.data=W,H.state=0}}j<f?(G=O[j]&31,B=j,K=G,b=0):b=-1}else b=0}if(B>=0&&b>=0){var Q={data:O.subarray(B,f),type:K,state:b};I.push(Q)}if(I.length===0){var ee=this.getLastNalUnit();if(ee){var q=new Uint8Array(ee.data.byteLength+O.byteLength);q.set(ee.data,0),q.set(O,ee.data.byteLength),ee.data=q}}return x.naluState=b,I},a.parseAACPES=function(O){var f=0,x=this._audioTrack,b=this.aacOverFlow,C=O.data;if(b){this.aacOverFlow=null;var I=b.sample.unit.byteLength,j=Math.min(b.missing,I),M=I-j;b.sample.unit.set(C.subarray(0,j),M),x.samples.push(b.sample),f=b.missing}var z,G;for(z=f,G=C.length;z<G-1&&!D.isHeader(C,z);z++);if(z!==f){var B,K;if(z<G-1?(B="AAC PES did not start with ADTS header,offset:"+z,K=!1):(B="no ADTS header found in AAC PES",K=!0),r.logger.warn("parsing error:"+B),this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:K,reason:B}),K)return}D.initTrackConfig(x,this.observer,C,z,this.audioCodec);var F;if(O.pts!==void 0)F=O.pts;else if(b){var H=D.getFrameDuration(x.samplerate);F=b.sample.pts+H}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var W=0;z<G;)if(D.isHeader(C,z)){if(z+5<G){var Q=D.appendFrame(x,C,z,F,W);if(Q)if(Q.missing)this.aacOverFlow=Q;else{z+=Q.length,W++;continue}}break}else z++},a.parseMPEGPES=function(O){var f=O.data,x=f.length,b=0,C=0,I=O.pts;if(I===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;C<x;)if(p.isHeader(f,C)){var j=p.appendFrame(this._audioTrack,f,C,I,b);if(j)C+=j.length,b++;else break}else C++},a.parseID3PES=function(O){if(O.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(O)},E}();g.minProbeByteLength=188;function w(E,a,L,O){return{key:E,frame:!1,pts:a,dts:L,units:[],debug:O,length:0}}function m(E,a){return(E[a+10]&31)<<8|E[a+11]}function d(E,a,L,O){var f={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(E[a+1]&15)<<8|E[a+2],b=a+3+x-4,C=(E[a+10]&15)<<8|E[a+11];for(a+=12+C;a<b;){var I=(E[a+1]&31)<<8|E[a+2];switch(E[a]){case 207:if(!O){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:f.audio===-1&&(f.audio=I);break;case 21:f.id3===-1&&(f.id3=I);break;case 219:if(!O){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:f.avc===-1&&(f.avc=I);break;case 3:case 4:L?f.audio===-1&&(f.audio=I,f.isAAC=!1):r.logger.log("MPEG audio found, not supported in this browser");break;case 36:r.logger.warn("Unsupported HEVC stream type found");break;default:break}a+=((E[a+3]&15)<<8|E[a+4])+5}return f}function n(E){var a=0,L,O,f,x,b,C=E.data;if(!E||E.size===0)return null;for(;C[0].length<19&&C.length>1;){var I=new Uint8Array(C[0].length+C[1].length);I.set(C[0]),I.set(C[1],C[0].length),C[0]=I,C.splice(1,1)}L=C[0];var j=(L[0]<<16)+(L[1]<<8)+L[2];if(j===1){if(O=(L[4]<<8)+L[5],O&&O>E.size-6)return null;var M=L[7];M&192&&(x=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,M&64?(b=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,x-b>60*9e4&&(r.logger.warn(Math.round((x-b)/9e4)+"s delta between PTS and DTS, align them"),x=b)):b=x),f=L[8];var z=f+9;if(E.size<=z)return null;E.size-=z;for(var G=new Uint8Array(E.size),B=0,K=C.length;B<K;B++){L=C[B];var F=L.byteLength;if(z)if(z>F){z-=F;continue}else L=L.subarray(z),F-=z,z=0;G.set(L,a),a+=F}return O&&(O-=f+3),{data:G,pts:x,dts:b,len:O}}return null}function l(E,a){if(E.units.length&&E.frame){if(E.pts===void 0){var L=a.samples,O=L.length;if(O){var f=L[O-1];E.pts=f.pts,E.dts=f.dts}else{a.dropped++;return}}a.samples.push(E)}E.debug.length&&r.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function u(E,a){var L=E.length;if(L>0){if(a.pts>=E[L-1].pts)E.push(a);else for(var O=L-1;O>=0;O--)if(a.pts<E[O].pts){E.splice(O,0,a);break}}else E.push(a)}function T(E){for(var a=E.byteLength,L=[],O=1;O<a-2;)E[O]===0&&E[O+1]===0&&E[O+2]===3?(L.push(O+2),O+=2):O++;if(L.length===0)return E;var f=a-L.length,x=new Uint8Array(f),b=0;for(O=0;O<f;b++,O++)b===L[0]&&(b++,L.shift()),x[O]=E[b];return x}c.default=g},"./src/errors.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"ErrorTypes",function(){return D}),_.d(c,"ErrorDetails",function(){return p});var D;(function(s){s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError"})(D||(D={}));var p;(function(s){s.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",s.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",s.KEY_SYSTEM_NO_SESSION="keySystemNoSession",s.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",s.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",s.MANIFEST_LOAD_ERROR="manifestLoadError",s.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",s.MANIFEST_PARSING_ERROR="manifestParsingError",s.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",s.LEVEL_EMPTY_ERROR="levelEmptyError",s.LEVEL_LOAD_ERROR="levelLoadError",s.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",s.LEVEL_SWITCH_ERROR="levelSwitchError",s.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",s.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",s.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",s.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",s.FRAG_LOAD_ERROR="fragLoadError",s.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",s.FRAG_DECRYPT_ERROR="fragDecryptError",s.FRAG_PARSING_ERROR="fragParsingError",s.REMUX_ALLOC_ERROR="remuxAllocError",s.KEY_LOAD_ERROR="keyLoadError",s.KEY_LOAD_TIMEOUT="keyLoadTimeOut",s.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",s.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",s.BUFFER_APPEND_ERROR="bufferAppendError",s.BUFFER_APPENDING_ERROR="bufferAppendingError",s.BUFFER_STALLED_ERROR="bufferStalledError",s.BUFFER_FULL_ERROR="bufferFullError",s.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",s.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",s.INTERNAL_EXCEPTION="internalException",s.INTERNAL_ABORTED="aborted",s.UNKNOWN="unknown"})(p||(p={}))},"./src/events.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"Events",function(){return D});var D;(function(p){p.MEDIA_ATTACHING="hlsMediaAttaching",p.MEDIA_ATTACHED="hlsMediaAttached",p.MEDIA_DETACHING="hlsMediaDetaching",p.MEDIA_DETACHED="hlsMediaDetached",p.BUFFER_RESET="hlsBufferReset",p.BUFFER_CODECS="hlsBufferCodecs",p.BUFFER_CREATED="hlsBufferCreated",p.BUFFER_APPENDING="hlsBufferAppending",p.BUFFER_APPENDED="hlsBufferAppended",p.BUFFER_EOS="hlsBufferEos",p.BUFFER_FLUSHING="hlsBufferFlushing",p.BUFFER_FLUSHED="hlsBufferFlushed",p.MANIFEST_LOADING="hlsManifestLoading",p.MANIFEST_LOADED="hlsManifestLoaded",p.MANIFEST_PARSED="hlsManifestParsed",p.LEVEL_SWITCHING="hlsLevelSwitching",p.LEVEL_SWITCHED="hlsLevelSwitched",p.LEVEL_LOADING="hlsLevelLoading",p.LEVEL_LOADED="hlsLevelLoaded",p.LEVEL_UPDATED="hlsLevelUpdated",p.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",p.LEVELS_UPDATED="hlsLevelsUpdated",p.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",p.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",p.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",p.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",p.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",p.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",p.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",p.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",p.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",p.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",p.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",p.CUES_PARSED="hlsCuesParsed",p.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",p.INIT_PTS_FOUND="hlsInitPtsFound",p.FRAG_LOADING="hlsFragLoading",p.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",p.FRAG_LOADED="hlsFragLoaded",p.FRAG_DECRYPTED="hlsFragDecrypted",p.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",p.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",p.FRAG_PARSING_METADATA="hlsFragParsingMetadata",p.FRAG_PARSED="hlsFragParsed",p.FRAG_BUFFERED="hlsFragBuffered",p.FRAG_CHANGED="hlsFragChanged",p.FPS_DROP="hlsFpsDrop",p.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",p.ERROR="hlsError",p.DESTROYING="hlsDestroying",p.KEY_LOADING="hlsKeyLoading",p.KEY_LOADED="hlsKeyLoaded",p.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",p.BACK_BUFFER_REACHED="hlsBackBufferReached"})(D||(D={}))},"./src/hls.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return E});var D=_("./node_modules/url-toolkit/src/url-toolkit.js"),p=_.n(D),s=_("./src/loader/playlist-loader.ts"),S=_("./src/loader/key-loader.ts"),v=_("./src/controller/id3-track-controller.ts"),o=_("./src/controller/latency-controller.ts"),i=_("./src/controller/level-controller.ts"),r=_("./src/controller/fragment-tracker.ts"),h=_("./src/controller/stream-controller.ts"),y=_("./src/is-supported.ts"),g=_("./src/utils/logger.ts"),w=_("./src/config.ts"),m=_("./node_modules/eventemitter3/index.js"),d=_.n(m),n=_("./src/events.ts"),l=_("./src/errors.ts");function u(a,L){for(var O=0;O<L.length;O++){var f=L[O];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(a,f.key,f)}}function T(a,L,O){return L&&u(a.prototype,L),O&&u(a,O),a}var E=function(){a.isSupported=function(){return Object(y.isSupported)()};function a(O){O===void 0&&(O={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new m.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 f=this.config=Object(w.mergeConfig)(a.DefaultConfig,O);this.userConfig=O,Object(g.enableLogs)(f.debug),this._autoLevelCapping=-1,f.progressive&&Object(w.enableStreamingMode)(f);var x=f.abrController,b=f.bufferController,C=f.capLevelController,I=f.fpsController,j=this.abrController=new x(this),M=this.bufferController=new b(this),z=this.capLevelController=new C(this),G=new I(this),B=new s.default(this),K=new S.default(this),F=new v.default(this),H=this.levelController=new i.default(this),W=new r.FragmentTracker(this),Q=this.streamController=new h.default(this,W);z.setStreamController(Q),G.setStreamController(Q);var ee=[H,Q];this.networkControllers=ee;var q=[B,K,j,M,z,G,F,W];this.audioTrackController=this.createController(f.audioTrackController,null,ee),this.createController(f.audioStreamController,W,ee),this.subtitleTrackController=this.createController(f.subtitleTrackController,null,ee),this.createController(f.subtitleStreamController,W,ee),this.createController(f.timelineController,null,q),this.emeController=this.createController(f.emeController,null,q),this.cmcdController=this.createController(f.cmcdController,null,q),this.latencyController=this.createController(o.default,null,q),this.coreComponents=q}var L=a.prototype;return L.createController=function(f,x,b){if(f){var C=x?new f(this,x):new f(this);return b&&b.push(C),C}return null},L.on=function(f,x,b){b===void 0&&(b=this),this._emitter.on(f,x,b)},L.once=function(f,x,b){b===void 0&&(b=this),this._emitter.once(f,x,b)},L.removeAllListeners=function(f){this._emitter.removeAllListeners(f)},L.off=function(f,x,b,C){b===void 0&&(b=this),this._emitter.off(f,x,b,C)},L.listeners=function(f){return this._emitter.listeners(f)},L.emit=function(f,x,b){return this._emitter.emit(f,x,b)},L.trigger=function(f,x){if(this.config.debug)return this.emit(f,f,x);try{return this.emit(f,f,x)}catch(b){g.logger.error("An internal error happened while handling event "+f+'. Error message: "'+b.message+'". Here is a stacktrace:',b),this.trigger(n.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:f,error:b})}return!1},L.listenerCount=function(f){return this._emitter.listenerCount(f)},L.destroy=function(){g.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(f){return f.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(f){return f.destroy()}),this.coreComponents.length=0},L.attachMedia=function(f){g.logger.log("attachMedia"),this._media=f,this.trigger(n.Events.MEDIA_ATTACHING,{media:f})},L.detachMedia=function(){g.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(f){this.stopLoad();var x=this.media,b=this.url,C=this.url=D.buildAbsoluteURL(self.location.href,f,{alwaysNormalize:!0});g.logger.log("loadSource:"+C),x&&b&&b!==C&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(n.Events.MANIFEST_LOADING,{url:f})},L.startLoad=function(f){f===void 0&&(f=-1),g.logger.log("startLoad("+f+")"),this.networkControllers.forEach(function(x){x.startLoad(f)})},L.stopLoad=function(){g.logger.log("stopLoad"),this.networkControllers.forEach(function(f){f.stopLoad()})},L.swapAudioCodec=function(){g.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){g.logger.log("recoverMediaError");var f=this._media;this.detachMedia(),f&&this.attachMedia(f)},L.removeLevel=function(f,x){x===void 0&&(x=0),this.levelController.removeLevel(f,x)},T(a,[{key:"levels",get:function(){var f=this.levelController.levels;return f||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(f){g.logger.log("set currentLevel:"+f),this.loadLevel=f,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(f){g.logger.log("set nextLevel:"+f),this.levelController.manualLevel=f,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(f){g.logger.log("set loadLevel:"+f),this.levelController.manualLevel=f}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(f){this.levelController.nextLoadLevel=f}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(f){g.logger.log("set firstLevel:"+f),this.levelController.firstLevel=f}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(f){g.logger.log("set startLevel:"+f),f!==-1&&(f=Math.max(f,this.minAutoLevel)),this.levelController.startLevel=f}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(f){var x=!!f;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(f){this._autoLevelCapping!==f&&(g.logger.log("set autoLevelCapping:"+f),this._autoLevelCapping=f)}},{key:"bandwidthEstimate",get:function(){var f=this.abrController.bwEstimator;return f?f.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var f=this.levels,x=this.config.minAutoBitrate;if(!f)return 0;for(var b=f.length,C=0;C<b;C++)if(f[C].maxBitrate>x)return C;return 0}},{key:"maxAutoLevel",get:function(){var f=this.levels,x=this.autoLevelCapping,b;return x===-1&&f&&f.length?b=f.length-1:b=x,b}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(f){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,f)}},{key:"audioTracks",get:function(){var f=this.audioTrackController;return f?f.audioTracks:[]}},{key:"audioTrack",get:function(){var f=this.audioTrackController;return f?f.audioTrack:-1},set:function(f){var x=this.audioTrackController;x&&(x.audioTrack=f)}},{key:"subtitleTracks",get:function(){var f=this.subtitleTrackController;return f?f.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var f=this.subtitleTrackController;return f?f.subtitleTrack:-1},set:function(f){var x=this.subtitleTrackController;x&&(x.subtitleTrack=f)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var f=this.subtitleTrackController;return f?f.subtitleDisplay:!1},set:function(f){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=f)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(f){this.config.lowLatencyMode=f}},{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 l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return a.defaultConfig?a.defaultConfig:w.hlsDefaultConfig},set:function(f){a.defaultConfig=f}}]),a}();E.defaultConfig=void 0},"./src/is-supported.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"isSupported",function(){return s}),_.d(c,"changeTypeSupported",function(){return S});var D=_("./src/utils/mediasource-helper.ts");function p(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var v=Object(D.getMediaSource)();if(!v)return!1;var o=p(),i=v&&typeof v.isTypeSupported=="function"&&v.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!o||o.prototype&&typeof o.prototype.appendBuffer=="function"&&typeof o.prototype.remove=="function";return!!i&&!!r}function S(){var v,o=p();return typeof(o==null||((v=o.prototype)===null||v===void 0)?void 0:v.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return g}),_.d(c,"LoadError",function(){return m});var D=_("./src/polyfills/number.ts"),p=_("./src/errors.ts");function s(d,n){d.prototype=Object.create(n.prototype),d.prototype.constructor=d,r(d,n)}function S(d){var n=typeof Map=="function"?new Map:void 0;return S=function(u){if(u===null||!i(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(u))return n.get(u);n.set(u,T)}function T(){return v(u,arguments,h(this).constructor)}return T.prototype=Object.create(u.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),r(T,u)},S(d)}function v(d,n,l){return o()?v=Reflect.construct:v=function(T,E,a){var L=[null];L.push.apply(L,E);var O=Function.bind.apply(T,L),f=new O;return a&&r(f,a.prototype),f},v.apply(null,arguments)}function o(){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(d){return!1}}function i(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,n){return r=Object.setPrototypeOf||function(u,T){return u.__proto__=T,u},r(d,n)}function h(d){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},h(d)}var y=Math.pow(2,17),g=function(){function d(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var n=d.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(u,T){var E=this,a=u.url;if(!a)return Promise.reject(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(a?"part list":"url")));this.abort();var L=this.config,O=L.fLoader,f=L.loader;return new Promise(function(x,b){E.loader&&E.loader.destroy();var C=E.loader=u.loader=O?new O(L):new f(L),I=w(u),j={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:y};u.stats=C.stats,C.load(I,j,{onSuccess:function(z,G,B,K){E.resetLoader(u,C),x({frag:u,part:null,payload:z.data,networkDetails:K})},onError:function(z,G,B){E.resetLoader(u,C),b(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:z,networkDetails:B}))},onAbort:function(z,G,B){E.resetLoader(u,C),b(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:B}))},onTimeout:function(z,G,B){E.resetLoader(u,C),b(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:B}))},onProgress:function(z,G,B,K){T&&T({frag:u,part:null,payload:B,networkDetails:K})}})})},n.loadPart=function(u,T,E){var a=this;this.abort();var L=this.config,O=L.fLoader,f=L.loader;return new Promise(function(x,b){a.loader&&a.loader.destroy();var C=a.loader=u.loader=O?new O(L):new f(L),I=w(u,T),j={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:y};T.stats=C.stats,C.load(I,j,{onSuccess:function(z,G,B,K){a.resetLoader(u,C),a.updateStatsFromPart(u,T);var F={frag:u,part:T,payload:z.data,networkDetails:K};E(F),x(F)},onError:function(z,G,B){a.resetLoader(u,C),b(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:T,response:z,networkDetails:B}))},onAbort:function(z,G,B){u.stats.aborted=T.stats.aborted,a.resetLoader(u,C),b(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:T,networkDetails:B}))},onTimeout:function(z,G,B){a.resetLoader(u,C),b(new m({type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:T,networkDetails:B}))}})})},n.updateStatsFromPart=function(u,T){var E=u.stats,a=T.stats,L=a.total;if(E.loaded+=a.loaded,L){var O=Math.round(u.duration/T.duration),f=Math.min(Math.round(E.loaded/L),O),x=O-f,b=x*Math.round(E.loaded/f);E.total=E.loaded+b}else E.total=Math.max(E.loaded,E.total);var C=E.loading,I=a.loading;C.start?C.first+=I.first-I.start:(C.start=I.start,C.first=I.first),C.end=I.end},n.resetLoader=function(u,T){u.loader=null,this.loader===T&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),T.destroy()},d}();function w(d,n){n===void 0&&(n=null);var l=n||d,u={frag:d,part:n,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},T=l.byteRangeStartOffset,E=l.byteRangeEndOffset;return Object(D.isFiniteNumber)(T)&&Object(D.isFiniteNumber)(E)&&(u.rangeStart=T,u.rangeEnd=E),u}var m=function(d){s(n,d);function n(l){for(var u,T=arguments.length,E=new Array(T>1?T-1:0),a=1;a<T;a++)E[a-1]=arguments[a];return u=d.call.apply(d,[this].concat(E))||this,u.data=void 0,u.data=l,u}return n}(S(Error))},"./src/loader/fragment.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"ElementaryStreamTypes",function(){return g}),_.d(c,"BaseSegment",function(){return w}),_.d(c,"Fragment",function(){return m}),_.d(c,"Part",function(){return d});var D=_("./src/polyfills/number.ts"),p=_("./node_modules/url-toolkit/src/url-toolkit.js"),s=_.n(p),S=_("./src/utils/logger.ts"),v=_("./src/loader/level-key.ts"),o=_("./src/loader/load-stats.ts");function i(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,r(n,l)}function r(n,l){return r=Object.setPrototypeOf||function(T,E){return T.__proto__=E,T},r(n,l)}function h(n,l){for(var u=0;u<l.length;u++){var T=l[u];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function y(n,l,u){return l&&h(n.prototype,l),u&&h(n,u),n}var g;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(g||(g={}));var w=function(){function n(u){var T;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(T={},T[g.AUDIO]=null,T[g.VIDEO]=null,T[g.AUDIOVIDEO]=null,T),this.baseurl=u}var l=n.prototype;return l.setByteRange=function(T,E){var a=T.split("@",2),L=[];a.length===1?L[0]=E?E.byteRangeEndOffset:0:L[0]=parseInt(a[1]),L[1]=parseInt(a[0])+L[0],this._byteRange=L},y(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(p.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(T){this._url=T}}]),n}(),m=function(n){i(l,n);function l(T,E){var a;return a=n.call(this,E)||this,a._decryptdata=null,a.rawProgramDateTime=null,a.programDateTime=null,a.tagList=[],a.duration=0,a.sn=0,a.levelkey=void 0,a.type=void 0,a.loader=null,a.level=-1,a.cc=0,a.startPTS=void 0,a.endPTS=void 0,a.appendedPTS=void 0,a.startDTS=void 0,a.endDTS=void 0,a.start=0,a.deltaPTS=void 0,a.maxStartPTS=void 0,a.minEndPTS=void 0,a.stats=new o.LoadStats,a.urlId=0,a.data=void 0,a.bitrateTest=!1,a.title=null,a.initSegment=null,a.type=T,a}var u=l.prototype;return u.createInitializationVector=function(E){for(var a=new Uint8Array(16),L=12;L<16;L++)a[L]=E>>8*(15-L)&255;return a},u.setDecryptDataFromLevelKey=function(E,a){var L=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(L=v.LevelKey.fromURI(E.uri),L.method=E.method,L.iv=this.createInitializationVector(a),L.keyFormat="identity"),L},u.setElementaryStreamInfo=function(E,a,L,O,f,x){x===void 0&&(x=!1);var b=this.elementaryStreams,C=b[E];if(!C){b[E]={startPTS:a,endPTS:L,startDTS:O,endDTS:f,partial:x};return}C.startPTS=Math.min(C.startPTS,a),C.endPTS=Math.max(C.endPTS,L),C.startDTS=Math.min(C.startDTS,O),C.endDTS=Math.max(C.endDTS,f)},u.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[g.AUDIO]=null,E[g.VIDEO]=null,E[g.AUDIOVIDEO]=null},y(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}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 E=Object(D.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),l}(w),d=function(n){i(l,n);function l(u,T,E,a,L){var O;O=n.call(this,E)||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 o.LoadStats,O.duration=u.decimalFloatingPoint("DURATION"),O.gap=u.bool("GAP"),O.independent=u.bool("INDEPENDENT"),O.relurl=u.enumeratedString("URI"),O.fragment=T,O.index=a;var f=u.enumeratedString("BYTERANGE");return f&&O.setByteRange(f,L),L&&(O.fragOffset=L.fragOffset+L.duration),O}return y(l,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var T=this.elementaryStreams;return!!(T.audio||T.video||T.audiovideo)}}]),l}(w)},"./src/loader/key-loader.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return S});var D=_("./src/events.ts"),p=_("./src/errors.ts"),s=_("./src/utils/logger.ts"),S=function(){function v(i){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=i,this._registerListeners()}var o=v.prototype;return o._registerListeners=function(){this.hls.on(D.Events.KEY_LOADING,this.onKeyLoading,this)},o._unregisterListeners=function(){this.hls.off(D.Events.KEY_LOADING,this.onKeyLoading)},o.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var h=this.loaders[r];h&&h.destroy()}this.loaders={}},o.onKeyLoading=function(r,h){var y=h.frag,g=y.type,w=this.loaders[g];if(!y.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var m=y.decryptdata.uri;if(m!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(w&&(s.logger.warn("abort previous key loader for type:"+g),w.abort()),!m){s.logger.warn("key uri is falsy");return}var n=d.loader,l=y.loader=this.loaders[g]=new n(d);this.decrypturl=m,this.decryptkey=null;var u={url:m,frag:y,responseType:"arraybuffer"},T={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(u,T,E)}else this.decryptkey&&(y.decryptdata.key=this.decryptkey,this.hls.trigger(D.Events.KEY_LOADED,{frag:y}))},o.loadsuccess=function(r,h,y){var g=y.frag;if(!g.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=g.decryptdata.key=new Uint8Array(r.data),g.loader=null,delete this.loaders[g.type],this.hls.trigger(D.Events.KEY_LOADED,{frag:g})},o.loaderror=function(r,h){var y=h.frag,g=y.loader;g&&g.abort(),delete this.loaders[y.type],this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:y,response:r})},o.loadtimeout=function(r,h){var y=h.frag,g=y.loader;g&&g.abort(),delete this.loaders[y.type],this.hls.trigger(D.Events.ERROR,{type:p.ErrorTypes.NETWORK_ERROR,details:p.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:y})},v}()},"./src/loader/level-details.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"LevelDetails",function(){return v});var D=_("./src/polyfills/number.ts");function p(o,i){for(var r=0;r<i.length;r++){var h=i[r];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function s(o,i,r){return i&&p(o.prototype,i),r&&p(o,r),o}var S=10,v=function(){function o(r){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=r}var i=o.prototype;return i.reloaded=function(h){if(!h){this.advanced=!0,this.updated=!0;return}var y=this.lastPartSn-h.lastPartSn,g=this.lastPartIndex-h.lastPartIndex;this.updated=this.endSN!==h.endSN||!!g||!!y,this.advanced=this.endSN>h.endSN||y>0||y===0&&g>0,this.updated||this.advanced?this.misses=Math.floor(h.misses*.6):this.misses=h.misses+1,this.availabilityDelay=h.availabilityDelay},s(o,[{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||S}},{key:"drift",get:function(){var h=this.driftEndTime-this.driftStartTime;if(h>0){var y=this.driftEnd-this.driftStart;return y*1e3/h}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var h;return(h=this.fragments)!==null&&h!==void 0&&h.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 h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var h;return(h=this.partList)!==null&&h!==void 0&&h.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"LevelKey",function(){return v});var D=_("./node_modules/url-toolkit/src/url-toolkit.js"),p=_.n(D);function s(o,i){for(var r=0;r<i.length;r++){var h=i[r];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(o,h.key,h)}}function S(o,i,r){return i&&s(o.prototype,i),r&&s(o,r),o}var v=function(){o.fromURL=function(r,h){return new o(r,h)},o.fromURI=function(r){return new o(r)};function o(i,r){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,r?this._uri=Object(D.buildAbsoluteURL)(i,r,{alwaysNormalize:!0}):this._uri=i}return S(o,[{key:"uri",get:function(){return this._uri}}]),o}()},"./src/loader/load-stats.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"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(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return l});var D=_("./src/polyfills/number.ts"),p=_("./node_modules/url-toolkit/src/url-toolkit.js"),s=_.n(p),S=_("./src/loader/fragment.ts"),v=_("./src/loader/level-details.ts"),o=_("./src/loader/level-key.ts"),i=_("./src/utils/attr-list.ts"),r=_("./src/utils/logger.ts"),h=_("./src/utils/codecs.ts"),y=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,g=/#EXT-X-MEDIA:(.*)/g,w=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),m=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("|")),d=/\.(mp4|m4s|m4v|m4a)$/i;function n(L){var O,f;return d.test((O=(f=p.parseURL(L))===null||f===void 0?void 0:f.path)!=null?O:"")}var l=function(){function L(){}return L.findGroup=function(f,x){for(var b=0;b<f.length;b++){var C=f[b];if(C.id===x)return C}},L.convertAVC1ToAVCOTI=function(f){var x=f.split(".");if(x.length>2){var b=x.shift()+".";return b+=parseInt(x.shift()).toString(16),b+=("000"+parseInt(x.shift()).toString(16)).substr(-4),b}return f},L.resolve=function(f,x){return p.buildAbsoluteURL(x,f,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(f,x){var b=[],C={},I=!1;y.lastIndex=0;for(var j;(j=y.exec(f))!=null;)if(j[1]){var M=new i.AttrList(j[1]),z={attrs:M,bitrate:M.decimalInteger("AVERAGE-BANDWIDTH")||M.decimalInteger("BANDWIDTH"),name:M.NAME,url:L.resolve(j[2],x)},G=M.decimalResolution("RESOLUTION");G&&(z.width=G.width,z.height=G.height),u((M.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),z),z.videoCodec&&z.videoCodec.indexOf("avc1")!==-1&&(z.videoCodec=L.convertAVC1ToAVCOTI(z.videoCodec)),b.push(z)}else if(j[3]){var B=new i.AttrList(j[3]);B["DATA-ID"]&&(I=!0,C[B["DATA-ID"]]=B)}return{levels:b,sessionData:I?C:null}},L.parseMasterPlaylistMedia=function(f,x,b,C){C===void 0&&(C=[]);var I,j=[],M=0;for(g.lastIndex=0;(I=g.exec(f))!==null;){var z=new i.AttrList(I[1]);if(z.TYPE===b){var G={attrs:z,bitrate:0,id:M++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:b,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?L.resolve(z.URI,x):""};if(C.length){var B=L.findGroup(C,G.groupId)||C[0];T(G,B,"audioCodec"),T(G,B,"textCodec")}j.push(G)}}return j},L.parseLevelPlaylist=function(f,x,b,C,I){var j=new v.LevelDetails(x),M=j.fragments,z=null,G=0,B=0,K=0,F=0,H=null,W=new S.Fragment(C,x),Q,ee,q,pe=-1,ye=!1;for(w.lastIndex=0,j.m3u8=f;(Q=w.exec(f))!==null;){ye&&(ye=!1,W=new S.Fragment(C,x),W.start=K,W.sn=G,W.cc=F,W.level=b,z&&(W.initSegment=z,W.rawProgramDateTime=z.rawProgramDateTime));var ie=Q[1];if(ie){W.duration=parseFloat(ie);var Se=(" "+Q[2]).slice(1);W.title=Se||null,W.tagList.push(Se?["INF",ie,Se]:["INF",ie])}else if(Q[3])Object(D.isFiniteNumber)(W.duration)&&(W.start=K,q&&(W.levelkey=q),W.sn=G,W.level=b,W.cc=F,W.urlId=I,M.push(W),W.relurl=(" "+Q[3]).slice(1),a(W,H),H=W,K+=W.duration,G++,B=0,ye=!0);else if(Q[4]){var ge=(" "+Q[4]).slice(1);H?W.setByteRange(ge,H):W.setByteRange(ge)}else if(Q[5])W.rawProgramDateTime=(" "+Q[5]).slice(1),W.tagList.push(["PROGRAM-DATE-TIME",W.rawProgramDateTime]),pe===-1&&(pe=M.length);else{if(Q=Q[0].match(m),!Q){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee<Q.length&&!(typeof Q[ee]!="undefined");ee++);var oe=(" "+Q[ee]).slice(1),le=(" "+Q[ee+1]).slice(1),te=Q[ee+2]?(" "+Q[ee+2]).slice(1):"";switch(oe){case"PLAYLIST-TYPE":j.type=le.toUpperCase();break;case"MEDIA-SEQUENCE":G=j.startSN=parseInt(le);break;case"SKIP":{var be=new i.AttrList(le),Z=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(D.isFiniteNumber)(Z)){j.skippedSegments=Z;for(var ae=Z;ae--;)M.unshift(null);G+=Z}var Ee=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ee&&(j.recentlyRemovedDateranges=Ee.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(le);break;case"VERSION":j.version=parseInt(le);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(le||te)&&W.tagList.push(te?[le,te]:[le]);break;case"DIS":F++;case"GAP":W.tagList.push([oe]);break;case"BITRATE":W.tagList.push([oe,le]);break;case"DISCONTINUITY-SEQ":F=parseInt(le);break;case"KEY":{var ne,J=new i.AttrList(le),X=J.enumeratedString("METHOD"),Y=J.URI,he=J.hexadecimalInteger("IV"),de=J.enumeratedString("KEYFORMATVERSIONS"),Te=J.enumeratedString("KEYID"),ze=(ne=J.enumeratedString("KEYFORMAT"))!=null?ne:"identity",Ze=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ze.indexOf(ze)>-1){r.logger.warn("Keyformat "+ze+" is not supported from the manifest");continue}else if(ze!=="identity")continue;X&&(q=o.LevelKey.fromURL(x,Y),Y&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(q.method=X,q.keyFormat=ze,Te&&(q.keyID=Te),de&&(q.keyFormatVersions=de),q.iv=he));break}case"START":{var Je=new i.AttrList(le),$e=Je.decimalFloatingPoint("TIME-OFFSET");Object(D.isFiniteNumber)($e)&&(j.startTimeOffset=$e);break}case"MAP":{var tt=new i.AttrList(le);W.relurl=tt.URI,tt.BYTERANGE&&W.setByteRange(tt.BYTERANGE),W.level=b,W.sn="initSegment",q&&(W.levelkey=q),W.initSegment=null,z=W,ye=!0;break}case"SERVER-CONTROL":{var nt=new i.AttrList(le);j.canBlockReload=nt.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=nt.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&nt.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=nt.optionalFloat("PART-HOLD-BACK",0),j.holdBack=nt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new i.AttrList(le);j.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=j.partList;Ce||(Ce=j.partList=[]);var Xe=B>0?Ce[Ce.length-1]:void 0,et=B++,Ue=new S.Part(new i.AttrList(le),W,x,et,Xe);Ce.push(Ue),W.duration+=Ue.duration;break}case"PRELOAD-HINT":{var Ve=new i.AttrList(le);j.preloadHint=Ve;break}case"RENDITION-REPORT":{var Pe=new i.AttrList(le);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Pe);break}default:r.logger.warn("line parsed but not handled: "+Q);break}}}H&&!H.relurl?(M.pop(),K-=H.duration,j.partList&&(j.fragmentHint=H)):j.partList&&(a(W,H),W.cc=F,j.fragmentHint=W);var we=M.length,Ae=M[0],ce=M[we-1];if(K+=j.skippedSegments*j.targetduration,K>0&&we&&ce){j.averagetargetduration=K/we;var xe=ce.sn;j.endSN=xe!=="initSegment"?xe:0,Ae&&(j.startCC=Ae.cc,Ae.initSegment||j.fragments.every(function(_e){return _e.relurl&&n(_e.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),W=new S.Fragment(C,x),W.relurl=ce.relurl,W.level=b,W.sn="initSegment",Ae.initSegment=W,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(K+=j.fragmentHint.duration),j.totalduration=K,j.endCC=F,pe>0&&E(M,pe),j},L}();function u(L,O){["video","audio","text"].forEach(function(f){var x=L.filter(function(C){return Object(h.isCodecType)(C,f)});if(x.length){var b=x.filter(function(C){return C.lastIndexOf("avc1",0)===0||C.lastIndexOf("mp4a",0)===0});O[f+"Codec"]=b.length>0?b[0]:x[0],L=L.filter(function(C){return x.indexOf(C)===-1})}}),O.unknownCodecs=L}function T(L,O,f){var x=O[f];x&&(L[f]=x)}function E(L,O){for(var f=L[O],x=O;x--;){var b=L[x];if(!b)return;b.programDateTime=f.programDateTime-b.duration*1e3,f=b}}function a(L,O){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):O!=null&&O.programDateTime&&(L.programDateTime=O.endProgramDateTime),Object(D.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/polyfills/number.ts"),p=_("./src/events.ts"),s=_("./src/errors.ts"),S=_("./src/utils/logger.ts"),v=_("./src/utils/mp4-tools.ts"),o=_("./src/loader/m3u8-parser.ts"),i=_("./src/types/loader.ts"),r=_("./src/utils/attr-list.ts");function h(w){var m=w.type;switch(m){case i.PlaylistContextType.AUDIO_TRACK:return i.PlaylistLevelType.AUDIO;case i.PlaylistContextType.SUBTITLE_TRACK:return i.PlaylistLevelType.SUBTITLE;default:return i.PlaylistLevelType.MAIN}}function y(w,m){var d=w.url;return(d===void 0||d.indexOf("data:")===0)&&(d=m.url),d}var g=function(){function w(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var m=w.prototype;return m.registerListeners=function(){var n=this.hls;n.on(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(p.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.unregisterListeners=function(){var n=this.hls;n.off(p.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(p.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(p.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(p.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},m.createInternalLoader=function(n){var l=this.hls.config,u=l.pLoader,T=l.loader,E=u||T,a=new E(l);return n.loader=a,this.loaders[n.type]=a,a},m.getInternalLoader=function(n){return this.loaders[n.type]},m.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},m.destroyInternalLoaders=function(){for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy(),this.resetInternalLoader(n)}},m.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},m.onManifestLoading=function(n,l){var u=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:i.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},m.onLevelLoading=function(n,l){var u=l.id,T=l.level,E=l.url,a=l.deliveryDirectives;this.load({id:u,groupId:null,level:T,responseType:"text",type:i.PlaylistContextType.LEVEL,url:E,deliveryDirectives:a})},m.onAudioTrackLoading=function(n,l){var u=l.id,T=l.groupId,E=l.url,a=l.deliveryDirectives;this.load({id:u,groupId:T,level:null,responseType:"text",type:i.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:a})},m.onSubtitleTrackLoading=function(n,l){var u=l.id,T=l.groupId,E=l.url,a=l.deliveryDirectives;this.load({id:u,groupId:T,level:null,responseType:"text",type:i.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:a})},m.load=function(n){var l,u=this.hls.config,T=this.getInternalLoader(n);if(T){var E=T.context;if(E&&E.url===n.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),T.abort()}var a,L,O,f;switch(n.type){case i.PlaylistContextType.MANIFEST:a=u.manifestLoadingMaxRetry,L=u.manifestLoadingTimeOut,O=u.manifestLoadingRetryDelay,f=u.manifestLoadingMaxRetryTimeout;break;case i.PlaylistContextType.LEVEL:case i.PlaylistContextType.AUDIO_TRACK:case i.PlaylistContextType.SUBTITLE_TRACK:a=0,L=u.levelLoadingTimeOut;break;default:a=u.levelLoadingMaxRetry,L=u.levelLoadingTimeOut,O=u.levelLoadingRetryDelay,f=u.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(n),(l=n.deliveryDirectives)!==null&&l!==void 0&&l.part){var x;if(n.type===i.PlaylistContextType.LEVEL&&n.level!==null?x=this.hls.levels[n.level].details:n.type===i.PlaylistContextType.AUDIO_TRACK&&n.id!==null?x=this.hls.audioTracks[n.id].details:n.type===i.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(x=this.hls.subtitleTracks[n.id].details),x){var b=x.partTarget,C=x.targetduration;b&&C&&(L=Math.min(Math.max(b*3,C*.8)*1e3,L))}}var I={timeout:L,maxRetry:a,retryDelay:O,maxRetryDelay:f,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(n,I,j)},m.loadsuccess=function(n,l,u,T){if(T===void 0&&(T=null),u.isSidxRequest){this.handleSidxRequest(n,u),this.handlePlaylistLoaded(n,l,u,T);return}this.resetInternalLoader(u.type);var E=n.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,u,"no EXTM3U delimiter",T);return}l.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,l,u,T):this.handleMasterPlaylist(n,l,u,T)},m.loaderror=function(n,l,u){u===void 0&&(u=null),this.handleNetworkError(l,u,!1,n)},m.loadtimeout=function(n,l,u){u===void 0&&(u=null),this.handleNetworkError(l,u,!0)},m.handleMasterPlaylist=function(n,l,u,T){var E=this.hls,a=n.data,L=y(n,u),O=o.default.parseMasterPlaylist(a,L),f=O.levels,x=O.sessionData;if(!f.length){this.handleManifestParsingError(n,u,"no level found in manifest",T);return}var b=f.map(function(G){return{id:G.attrs.AUDIO,audioCodec:G.audioCodec}}),C=f.map(function(G){return{id:G.attrs.SUBTITLES,textCodec:G.textCodec}}),I=o.default.parseMasterPlaylistMedia(a,L,"AUDIO",b),j=o.default.parseMasterPlaylistMedia(a,L,"SUBTITLES",C),M=o.default.parseMasterPlaylistMedia(a,L,"CLOSED-CAPTIONS");if(I.length){var z=I.some(function(G){return!G.url});!z&&f[0].audioCodec&&!f[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),I.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}E.trigger(p.Events.MANIFEST_LOADED,{levels:f,audioTracks:I,subtitles:j,captions:M,url:L,stats:l,networkDetails:T,sessionData:x})},m.handleTrackOrLevelPlaylist=function(n,l,u,T){var E=this.hls,a=u.id,L=u.level,O=u.type,f=y(n,u),x=Object(D.isFiniteNumber)(a)?a:0,b=Object(D.isFiniteNumber)(L)?L:x,C=h(u),I=o.default.parseLevelPlaylist(n.data,f,b,C,x);if(!I.fragments.length){E.trigger(p.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:f,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(O===i.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:I,name:"",url:f};E.trigger(p.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:f,stats:l,networkDetails:T,sessionData:null})}if(l.parsing.end=performance.now(),I.needSidxRanges){var M,z=(M=I.fragments[0].initSegment)===null||M===void 0?void 0:M.url;this.load({url:z,isSidxRequest:!0,type:O,level:L,levelDetails:I,id:a,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=I,this.handlePlaylistLoaded(n,l,u,T)},m.handleSidxRequest=function(n,l){var u=Object(v.parseSegmentIndex)(new Uint8Array(n.data));if(!u)return;var T=u.references,E=l.levelDetails;T.forEach(function(a,L){var O=a.info,f=E.fragments[L];f.byteRange.length===0&&f.setByteRange(String(1+O.end-O.start)+"@"+String(O.start)),f.initSegment&&f.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},m.handleManifestParsingError=function(n,l,u,T){this.hls.trigger(p.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===i.PlaylistContextType.MANIFEST,url:n.url,reason:u,response:n,context:l,networkDetails:T})},m.handleNetworkError=function(n,l,u,T){u===void 0&&(u=!1),S.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var E=s.ErrorDetails.UNKNOWN,a=!1,L=this.getInternalLoader(n);switch(n.type){case i.PlaylistContextType.MANIFEST:E=u?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case i.PlaylistContextType.LEVEL:E=u?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case i.PlaylistContextType.AUDIO_TRACK:E=u?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;case i.PlaylistContextType.SUBTITLE_TRACK:E=u?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,a=!1;break}L&&this.resetInternalLoader(n.type);var O={type:s.ErrorTypes.NETWORK_ERROR,details:E,fatal:a,url:n.url,loader:L,context:n,networkDetails:l};T&&(O.response=T),this.hls.trigger(p.Events.ERROR,O)},m.handlePlaylistLoaded=function(n,l,u,T){var E=u.type,a=u.level,L=u.id,O=u.groupId,f=u.loader,x=u.levelDetails,b=u.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(n,u,"invalid target duration",T);return}if(!f)return;x.live&&(f.getCacheAge&&(x.ageHeader=f.getCacheAge()||0),(!f.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(E){case i.PlaylistContextType.MANIFEST:case i.PlaylistContextType.LEVEL:this.hls.trigger(p.Events.LEVEL_LOADED,{details:x,level:a||0,id:L||0,stats:l,networkDetails:T,deliveryDirectives:b});break;case i.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(p.Events.AUDIO_TRACK_LOADED,{details:x,id:L||0,groupId:O||"",stats:l,networkDetails:T,deliveryDirectives:b});break;case i.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(p.Events.SUBTITLE_TRACK_LOADED,{details:x,id:L||0,groupId:O||"",stats:l,networkDetails:T,deliveryDirectives:b});break}},w}();c.default=g},"./src/polyfills/number.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"isFiniteNumber",function(){return D}),_.d(c,"MAX_SAFE_INTEGER",function(){return p});var D=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},p=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,c,_){"use strict";_.r(c);var D=function(){function p(){}return p.getSilentFrame=function(S,v){switch(S){case"mp4a.40.2":if(v===1)return new Uint8Array([0,200,0,128,35,128]);if(v===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(v===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(v===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(v===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(v===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(v===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(v===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(v===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},p}();c.default=D},"./src/remux/mp4-generator.ts":function(P,c,_){"use strict";_.r(c);var D=Math.pow(2,32)-1,p=function(){function s(){}return s.init=function(){s.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 v;for(v in s.types)s.types.hasOwnProperty(v)&&(s.types[v]=[v.charCodeAt(0),v.charCodeAt(1),v.charCodeAt(2),v.charCodeAt(3)]);var o=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]),i=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]);s.HDLR_TYPES={video:o,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),h=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=h,s.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),s.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),s.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),s.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var y=new Uint8Array([105,115,111,109]),g=new Uint8Array([97,118,99,49]),w=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,y,w,y,g),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,r))},s.box=function(v){for(var o=8,i=arguments.length,r=new Array(i>1?i-1:0),h=1;h<i;h++)r[h-1]=arguments[h];for(var y=r.length,g=y;y--;)o+=r[y].byteLength;var w=new Uint8Array(o);for(w[0]=o>>24&255,w[1]=o>>16&255,w[2]=o>>8&255,w[3]=o&255,w.set(v,4),y=0,o=8;y<g;y++)w.set(r[y],o),o+=r[y].byteLength;return w},s.hdlr=function(v){return s.box(s.types.hdlr,s.HDLR_TYPES[v])},s.mdat=function(v){return s.box(s.types.mdat,v)},s.mdhd=function(v,o){o*=v;var i=Math.floor(o/(D+1)),r=Math.floor(o%(D+1));return s.box(s.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,v>>24&255,v>>16&255,v>>8&255,v&255,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},s.mdia=function(v){return s.box(s.types.mdia,s.mdhd(v.timescale,v.duration),s.hdlr(v.type),s.minf(v))},s.mfhd=function(v){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255]))},s.minf=function(v){return v.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(v)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(v))},s.moof=function(v,o,i){return s.box(s.types.moof,s.mfhd(v),s.traf(i,o))},s.moov=function(v){for(var o=v.length,i=[];o--;)i[o]=s.trak(v[o]);return s.box.apply(null,[s.types.moov,s.mvhd(v[0].timescale,v[0].duration)].concat(i).concat(s.mvex(v)))},s.mvex=function(v){for(var o=v.length,i=[];o--;)i[o]=s.trex(v[o]);return s.box.apply(null,[s.types.mvex].concat(i))},s.mvhd=function(v,o){o*=v;var i=Math.floor(o/(D+1)),r=Math.floor(o%(D+1)),h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,v>>24&255,v>>16&255,v>>8&255,v&255,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&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 s.box(s.types.mvhd,h)},s.sdtp=function(v){var o=v.samples||[],i=new Uint8Array(4+o.length),r,h;for(r=0;r<o.length;r++)h=o[r].flags,i[r+4]=h.dependsOn<<4|h.isDependedOn<<2|h.hasRedundancy;return s.box(s.types.sdtp,i)},s.stbl=function(v){return s.box(s.types.stbl,s.stsd(v),s.box(s.types.stts,s.STTS),s.box(s.types.stsc,s.STSC),s.box(s.types.stsz,s.STSZ),s.box(s.types.stco,s.STCO))},s.avc1=function(v){var o=[],i=[],r,h,y;for(r=0;r<v.sps.length;r++)h=v.sps[r],y=h.byteLength,o.push(y>>>8&255),o.push(y&255),o=o.concat(Array.prototype.slice.call(h));for(r=0;r<v.pps.length;r++)h=v.pps[r],y=h.byteLength,i.push(y>>>8&255),i.push(y&255),i=i.concat(Array.prototype.slice.call(h));var g=s.box(s.types.avcC,new Uint8Array([1,o[3],o[4],o[5],252|3,224|v.sps.length].concat(o).concat([v.pps.length]).concat(i))),w=v.width,m=v.height,d=v.pixelRatio[0],n=v.pixelRatio[1];return s.box(s.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,w>>8&255,w&255,m>>8&255,m&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]),g,s.box(s.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),s.box(s.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,n>>24,n>>16&255,n>>8&255,n&255])))},s.esds=function(v){var o=v.config.length;return new Uint8Array([0,0,0,0,3,23+o,0,1,0,4,15+o,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([o]).concat(v.config).concat([6,1,2]))},s.mp4a=function(v){var o=v.samplerate;return s.box(s.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,v.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]),s.box(s.types.esds,s.esds(v)))},s.mp3=function(v){var o=v.samplerate;return s.box(s.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,v.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]))},s.stsd=function(v){return v.type==="audio"?!v.isAAC&&v.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(v)):s.box(s.types.stsd,s.STSD,s.mp4a(v)):s.box(s.types.stsd,s.STSD,s.avc1(v))},s.tkhd=function(v){var o=v.id,i=v.duration*v.timescale,r=v.width,h=v.height,y=Math.floor(i/(D+1)),g=Math.floor(i%(D+1));return s.box(s.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,o>>24&255,o>>16&255,o>>8&255,o&255,0,0,0,0,y>>24,y>>16&255,y>>8&255,y&255,g>>24,g>>16&255,g>>8&255,g&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,r>>8&255,r&255,0,0,h>>8&255,h&255,0,0]))},s.traf=function(v,o){var i=s.sdtp(v),r=v.id,h=Math.floor(o/(D+1)),y=Math.floor(o%(D+1));return s.box(s.types.traf,s.box(s.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),s.box(s.types.tfdt,new Uint8Array([1,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,y>>24,y>>16&255,y>>8&255,y&255])),s.trun(v,i.length+16+20+8+16+8+8),i)},s.trak=function(v){return v.duration=v.duration||4294967295,s.box(s.types.trak,s.tkhd(v),s.mdia(v))},s.trex=function(v){var o=v.id;return s.box(s.types.trex,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},s.trun=function(v,o){var i=v.samples||[],r=i.length,h=12+16*r,y=new Uint8Array(h),g,w,m,d,n,l;for(o+=8+h,y.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0),g=0;g<r;g++)w=i[g],m=w.duration,d=w.size,n=w.flags,l=w.cts,y.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*g);return s.box(s.types.trun,y)},s.initSegment=function(v){s.types||s.init();var o=s.moov(v),i=new Uint8Array(s.FTYP.byteLength+o.byteLength);return i.set(s.FTYP),i.set(o,s.FTYP.byteLength),i},s}();p.types=void 0,p.HDLR_TYPES=void 0,p.STTS=void 0,p.STSC=void 0,p.STCO=void 0,p.STSZ=void 0,p.VMHD=void 0,p.SMHD=void 0,p.STSD=void 0,p.FTYP=void 0,p.DINF=void 0,c.default=p},"./src/remux/mp4-remuxer.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return l}),_.d(c,"normalizePts",function(){return u});var D=_("./src/polyfills/number.ts"),p=_("./src/remux/aac-helper.ts"),s=_("./src/remux/mp4-generator.ts"),S=_("./src/events.ts"),v=_("./src/errors.ts"),o=_("./src/utils/logger.ts"),i=_("./src/types/loader.ts"),r=_("./src/utils/timescale-conversion.ts");function h(){return h=Object.assign||function(L){for(var O=1;O<arguments.length;O++){var f=arguments[O];for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(L[x]=f[x])}return L},h.apply(this,arguments)}var y=10*1e3,g=1024,w=1152,m=null,d=null,n=!1,l=function(){function L(f,x,b,C){if(C===void 0&&(C=""),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=f,this.config=x,this.typeSupported=b,this.ISGenerated=!1,m===null){var I=navigator.userAgent||"",j=I.match(/Chrome\/(\d+)/i);m=j?parseInt(j[1]):0}if(d===null){var M=navigator.userAgent.match(/Safari\/(\d+)/i);d=M?parseInt(M[1]):0}n=!!m&&m<75||!!d&&d<600}var O=L.prototype;return O.destroy=function(){},O.resetTimeStamp=function(x){o.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},O.resetNextTimestamp=function(){o.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},O.resetInitSegment=function(){o.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},O.getVideoStartPts=function(x){var b=!1,C=x.reduce(function(I,j){var M=j.pts-I;return M<-4294967296?(b=!0,u(I,j.pts)):M>0?I:j.pts},x[0].pts);return b&&o.logger.debug("PTS rollover detected"),C},O.remux=function(x,b,C,I,j,M,z,G){var B,K,F,H,W,Q,ee=j,q=j,pe=x.pid>-1,ye=b.pid>-1,ie=b.samples.length,Se=x.samples.length>0,ge=ie>1,oe=(!pe||Se)&&(!ye||ge)||this.ISGenerated||z;if(oe){this.ISGenerated||(F=this.generateIS(x,b,j));var le=this.isVideoContiguous,te=-1;if(ge&&(te=T(b.samples),!le&&this.config.forceKeyFrameOnDiscontinuity))if(Q=!0,te>0){o.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+ie+" video samples due to a missing keyframe");var be=this.getVideoStartPts(b.samples);b.samples=b.samples.slice(te),b.dropped+=te,q+=(b.samples[0].pts-be)/(b.timescale||9e4)}else te===-1&&(o.logger.warn("[mp4-remuxer]: No keyframe found out of "+ie+" video samples"),Q=!1);if(this.ISGenerated){if(Se&&ge){var Z=this.getVideoStartPts(b.samples),ae=u(x.samples[0].pts,Z)-Z,Ee=ae/b.inputTimeScale;ee+=Math.max(0,Ee),q+=Math.max(0,-Ee)}if(Se){if(x.samplerate||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(x,b,j)),K=this.remuxAudio(x,ee,this.isAudioContiguous,M,ye||ge||G===i.PlaylistLevelType.AUDIO?q:void 0),ge){var ne=K?K.endPTS-K.startPTS:0;b.inputTimeScale||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(x,b,j)),B=this.remuxVideo(b,q,le,ne)}}else ge&&(B=this.remuxVideo(b,q,le,0));B&&(B.firstKeyFrame=te,B.independent=te!==-1)}}return this.ISGenerated&&(C.samples.length&&(W=this.remuxID3(C,j)),I.samples.length&&(H=this.remuxText(I,j))),{audio:K,video:B,initSegment:F,independent:Q,text:H,id3:W}},O.generateIS=function(x,b,C){var I=x.samples,j=b.samples,M=this.typeSupported,z={},G=!Object(D.isFiniteNumber)(this._initPTS),B="audio/mp4",K,F,H;if(G&&(K=F=Infinity),x.config&&I.length&&(x.timescale=x.samplerate,x.isAAC||(M.mpeg?(B="audio/mpeg",x.codec=""):M.mp3&&(x.codec="mp3")),z.audio={id:"audio",container:B,codec:x.codec,initSegment:!x.isAAC&&M.mpeg?new Uint8Array(0):s.default.initSegment([x]),metadata:{channelCount:x.channelCount}},G&&(H=x.inputTimeScale,K=F=I[0].pts-Math.round(H*C))),b.sps&&b.pps&&j.length&&(b.timescale=b.inputTimeScale,z.video={id:"main",container:"video/mp4",codec:b.codec,initSegment:s.default.initSegment([b]),metadata:{width:b.width,height:b.height}},G)){H=b.inputTimeScale;var W=this.getVideoStartPts(j),Q=Math.round(H*C);F=Math.min(F,u(j[0].dts,W)-Q),K=Math.min(K,W-Q)}if(Object.keys(z).length)return this.ISGenerated=!0,G&&(this._initPTS=K,this._initDTS=F),{tracks:z,initPTS:K,timescale:H}},O.remuxVideo=function(x,b,C,I){var j=x.inputTimeScale,M=x.samples,z=[],G=M.length,B=this._initPTS,K=this.nextAvcDts,F=8,H,W,Q,ee=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,pe=0,ye=!1;if(!C||K===null){var ie=b*j,Se=M[0].pts-u(M[0].dts,M[0].pts);K=ie-Se}for(var ge=0;ge<G;ge++){var oe=M[ge];if(oe.pts=u(oe.pts-B,K),oe.dts=u(oe.dts-B,K),oe.dts>oe.pts){var le=9e4*.2;pe=Math.max(Math.min(pe,oe.pts-oe.dts),-1*le)}oe.dts<M[ge>0?ge-1:ge].dts&&(ye=!0)}ye&&M.sort(function(yt,wt){var ft=yt.dts-wt.dts,jt=yt.pts-wt.pts;return ft||jt}),W=M[0].dts,Q=M[M.length-1].dts;var te=Math.round((Q-W)/(G-1));if(pe<0){if(pe<te*-2){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-te,!0)+" ms");for(var be=pe,Z=0;Z<G;Z++)M[Z].dts=be=Math.max(be,M[Z].pts-te),M[Z].pts=Math.max(be,M[Z].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(pe,!0)+" ms to overcome this issue");for(var ae=0;ae<G;ae++)M[ae].dts=M[ae].dts+pe}W=M[0].dts}if(C){var Ee=W-K,ne=Ee>te,J=Ee<-1;if(ne||J){ne?o.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(Ee,!0)+" ms ("+Ee+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-Ee,!0)+" ms ("+Ee+"dts) overlapping between fragments detected"),W=K;var X=M[0].pts-Ee;M[0].dts=W,M[0].pts=X,o.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(X,!0)+"/"+Object(r.toMsFromMpegTsClock)(W,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(Ee,!0)+" ms")}}n&&(W=Math.max(0,W));for(var Y=0,he=0,de=0;de<G;de++){for(var Te=M[de],ze=Te.units,Ze=ze.length,Je=0,$e=0;$e<Ze;$e++)Je+=ze[$e].data.length;he+=Je,Y+=Ze,Te.length=Je,Te.dts=Math.max(Te.dts,W),Te.pts=Math.max(Te.pts,Te.dts,0),ee=Math.min(Te.pts,ee),q=Math.max(Te.pts,q)}Q=M[G-1].dts;var tt=he+4*Y+8,nt;try{nt=new Uint8Array(tt)}catch(yt){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:v.ErrorTypes.MUX_ERROR,details:v.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:tt,reason:"fail allocating video mdat "+tt});return}var Me=new DataView(nt.buffer);Me.setUint32(0,tt),nt.set(s.default.types.mdat,4);for(var Ce=0;Ce<G;Ce++){for(var Xe=M[Ce],et=Xe.units,Ue=0,Ve=0,Pe=et.length;Ve<Pe;Ve++){var we=et[Ve],Ae=we.data,ce=we.data.byteLength;Me.setUint32(F,ce),F+=4,nt.set(Ae,F),F+=ce,Ue+=4+ce}if(Ce<G-1)H=M[Ce+1].dts-Xe.dts;else{var xe=this.config,_e=Xe.dts-M[Ce>0?Ce-1:Ce].dts;if(xe.stretchShortVideoTrack&&this.nextAudioPts!==null){var Le=Math.floor(xe.maxBufferHole*j),Re=(I?ee+I*j:this.nextAudioPts)-Xe.pts;Re>Le?(H=Re-_e,H<0&&(H=_e),o.logger.log("[mp4-remuxer]: It is approximately "+Re/90+" ms to the next segment; using duration "+H/90+" ms for the last video frame.")):H=_e}else H=_e}var Ge=Math.round(Xe.pts-Xe.dts);z.push(new E(Xe.key,H,Ue,Ge))}if(z.length&&m&&m<70){var Ye=z[0].flags;Ye.dependsOn=2,Ye.isNonSync=0}console.assert(H!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=Q+H,this.isVideoContiguous=!0;var at=s.default.moof(x.sequenceNumber++,W,h({},x,{samples:z})),it="video",ot={data1:at,data2:nt,startPTS:ee/j,endPTS:(q+H)/j,startDTS:W/j,endDTS:K/j,type:it,hasAudio:!1,hasVideo:!0,nb:z.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(nt.length,"MDAT length must not be zero"),ot},O.remuxAudio=function(x,b,C,I,j){var M=x.inputTimeScale,z=x.samplerate?x.samplerate:M,G=M/z,B=x.isAAC?g:w,K=B*G,F=this._initPTS,H=!x.isAAC&&this.typeSupported.mpeg,W=[],Q=x.samples,ee=H?0:8,q=this.nextAudioPts||-1,pe=b*M;if(this.isAudioContiguous=C=C||Q.length&&q>0&&(I&&Math.abs(pe-q)<9e3||Math.abs(u(Q[0].pts-F,pe)-q)<20*K),Q.forEach(function(Ae){Ae.pts=u(Ae.pts-F,pe)}),!C||q<0){if(Q=Q.filter(function(Ae){return Ae.pts>=0}),!Q.length)return;j===0?q=0:I?q=Math.max(0,pe):q=Q[0].pts}if(x.isAAC)for(var ye=j!==void 0,ie=this.config.maxAudioFramesDrift,Se=0,ge=q;Se<Q.length;Se++){var oe=Q[Se],le=oe.pts,te=le-ge,be=Math.abs(1e3*te/M);if(te<=-ie*K&&ye)Se===0&&(o.logger.warn("Audio frame @ "+(le/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*te/M)+" ms."),this.nextAudioPts=q=ge=le);else if(te>=ie*K&&be<y&&ye){var Z=Math.round(te/K);ge=le-Z*K,ge<0&&(Z--,ge+=K),Se===0&&(this.nextAudioPts=q=ge),o.logger.warn("[mp4-remuxer]: Injecting "+Z+" audio frame @ "+(ge/M).toFixed(3)+"s due to "+Math.round(1e3*te/M)+" ms gap.");for(var ae=0;ae<Z;ae++){var Ee=Math.max(ge,0),ne=p.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ne||(o.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ne=oe.unit.subarray()),Q.splice(Se,0,{unit:ne,pts:Ee}),ge+=K,Se++}}oe.pts=ge,ge+=K}for(var J=null,X=null,Y,he=0,de=Q.length;de--;)he+=Q[de].unit.byteLength;for(var Te=0,ze=Q.length;Te<ze;Te++){var Ze=Q[Te],Je=Ze.unit,$e=Ze.pts;if(X!==null){var tt=W[Te-1];tt.duration=Math.round(($e-X)/G)}else if(C&&x.isAAC&&($e=q),J=$e,he>0){he+=ee;try{Y=new Uint8Array(he)}catch(Ae){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:v.ErrorTypes.MUX_ERROR,details:v.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:he,reason:"fail allocating audio mdat "+he});return}if(!H){var nt=new DataView(Y.buffer);nt.setUint32(0,he),Y.set(s.default.types.mdat,4)}}else return;Y.set(Je,ee);var Me=Je.byteLength;ee+=Me,W.push(new E(!0,B,Me,0)),X=$e}var Ce=W.length;if(!Ce)return;var Xe=W[W.length-1];this.nextAudioPts=q=X+G*Xe.duration;var et=H?new Uint8Array(0):s.default.moof(x.sequenceNumber++,J/G,h({},x,{samples:W}));x.samples=[];var Ue=J/M,Ve=q/M,Pe="audio",we={data1:et,data2:Y,startPTS:Ue,endPTS:Ve,startDTS:Ue,endDTS:Ve,type:Pe,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(Y.length,"MDAT length must not be zero"),we},O.remuxEmptyAudio=function(x,b,C,I){var j=x.inputTimeScale,M=x.samplerate?x.samplerate:j,z=j/M,G=this.nextAudioPts,B=(G!==null?G:I.startDTS*j)+this._initDTS,K=I.endDTS*j+this._initDTS,F=z*g,H=Math.ceil((K-B)/F),W=p.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(o.logger.warn("[mp4-remuxer]: remux empty Audio"),!W){o.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var Q=[],ee=0;ee<H;ee++){var q=B+ee*F;Q.push({unit:W,pts:q,dts:q})}return x.samples=Q,this.remuxAudio(x,b,C,!1)},O.remuxID3=function(x,b){var C=x.samples.length;if(!C)return;for(var I=x.inputTimeScale,j=this._initPTS,M=this._initDTS,z=0;z<C;z++){var G=x.samples[z];G.pts=u(G.pts-j,b*I)/I,G.dts=u(G.dts-M,b*I)/I}var B=x.samples;return x.samples=[],{samples:B}},O.remuxText=function(x,b){var C=x.samples.length;if(!C)return;for(var I=x.inputTimeScale,j=this._initPTS,M=0;M<C;M++){var z=x.samples[M];z.pts=u(z.pts-j,b*I)/I}x.samples.sort(function(B,K){return B.pts-K.pts});var G=x.samples;return x.samples=[],{samples:G}},L}();function u(L,O){var f;if(O===null)return L;for(O<L?f=-8589934592:f=8589934592;Math.abs(L-O)>4294967296;)L+=f;return L}function T(L){for(var O=0;O<L.length;O++)if(L[O].key)return O;return-1}var E=function(O,f,x,b){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=f,this.size=x,this.cts=b,this.flags=new a(O)},a=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(P,c,_){"use strict";_.r(c);var D=_("./src/polyfills/number.ts"),p=_("./src/utils/mp4-tools.ts"),s=_("./src/loader/fragment.ts"),S=_("./src/utils/logger.ts"),v=function(){function r(){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 h=r.prototype;return h.destroy=function(){},h.resetTimeStamp=function(g){this.initPTS=g,this.lastEndDTS=null},h.resetNextTimestamp=function(){this.lastEndDTS=null},h.resetInitSegment=function(g,w,m){this.audioCodec=w,this.videoCodec=m,this.generateInitSegment(g),this.emitInitSegment=!0},h.generateInitSegment=function(g){var w=this.audioCodec,m=this.videoCodec;if(!g||!g.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(p.parseInitSegment)(g);w||(w=i(d.audio,s.ElementaryStreamTypes.AUDIO)),m||(m=i(d.video,s.ElementaryStreamTypes.VIDEO));var n={};d.audio&&d.video?n.audiovideo={container:"video/mp4",codec:w+","+m,initSegment:g,id:"main"}:d.audio?n.audio={container:"audio/mp4",codec:w,initSegment:g,id:"audio"}:d.video?n.video={container:"video/mp4",codec:m,initSegment:g,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},h.remux=function(g,w,m,d,n){var l=this.initPTS,u=this.lastEndDTS,T={audio:void 0,video:void 0,text:d,id3:m,initSegment:void 0};Object(D.isFiniteNumber)(u)||(u=this.lastEndDTS=n||0);var E=w.samples;if(!E||!E.length)return T;var a={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(E),L=this.initData),!L||!L.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),T;this.emitInitSegment&&(a.tracks=this.initTracks,this.emitInitSegment=!1),Object(D.isFiniteNumber)(l)||(this.initPTS=a.initPTS=l=o(L,E,u));var O=Object(p.getDuration)(E,L),f=u,x=O+f;Object(p.offsetStartDTS)(L,E,l),O>0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!L.audio,C=!!L.video,I="";b&&(I+="audio"),C&&(I+="video");var j={data1:E,startPTS:f,startDTS:f,endPTS:x,endDTS:x,type:I,hasAudio:b,hasVideo:C,nb:1,dropped:0};return T.audio=j.type==="audio"?j:void 0,T.video=j.type!=="audio"?j:void 0,T.text=d,T.id3=m,T.initSegment=a,T},r}(),o=function(h,y,g){return Object(p.getStartDTS)(h,y)-g};function i(r,h){var y=r==null?void 0:r.codec;return y&&y.length>4?y:y==="hvc1"?"hvc1.1.c.L120.90":y==="av01"?"av01.0.04M.08":y==="avc1"||h===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}c.default=v},"./src/task-loop.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return D});var D=function(){function p(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var s=p.prototype;return s.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},s.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},s.onHandlerDestroyed=function(){},s.hasInterval=function(){return!!this._tickInterval},s.hasNextTick=function(){return!!this._tickTimer},s.setInterval=function(v){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,v),!0)},s.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},s.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},s.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},s.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},s.doTick=function(){},p}()},"./src/types/cmcd.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"CMCDVersion",function(){return D}),_.d(c,"CMCDObjectType",function(){return p}),_.d(c,"CMCDStreamingFormat",function(){return s}),_.d(c,"CMCDStreamType",function(){return S});var D=1,p;(function(v){v.MANIFEST="m",v.AUDIO="a",v.VIDEO="v",v.MUXED="av",v.INIT="i",v.CAPTION="c",v.TIMED_TEXT="tt",v.KEY="k",v.OTHER="o"})(p||(p={}));var s;(function(v){v.DASH="d",v.HLS="h",v.SMOOTH="s",v.OTHER="o"})(s||(s={}));var S;(function(v){v.VOD="v",v.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"HlsSkip",function(){return s}),_.d(c,"getSkipValue",function(){return S}),_.d(c,"HlsUrlParameters",function(){return v}),_.d(c,"Level",function(){return o});function D(i,r){for(var h=0;h<r.length;h++){var y=r[h];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,y.key,y)}}function p(i,r,h){return r&&D(i.prototype,r),h&&D(i,h),i}var s;(function(i){i.No="",i.Yes="YES",i.v2="v2"})(s||(s={}));function S(i,r){var h=i.canSkipUntil,y=i.canSkipDateRanges,g=i.endSN,w=r!==void 0?r-g:0;return h&&w<h?y?s.v2:s.Yes:s.No}var v=function(){function i(h,y,g){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=h,this.part=y,this.skip=g}var r=i.prototype;return r.addDirectives=function(y){var g=new self.URL(y);return this.msn!==void 0&&g.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&g.searchParams.set("_HLS_part",this.part.toString()),this.skip&&g.searchParams.set("_HLS_skip",this.skip),g.toString()},i}(),o=function(){function i(r){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=[r.url],this.attrs=r.attrs,this.bitrate=r.bitrate,r.details&&(this.details=r.details),this.id=r.id||0,this.name=r.name,this.width=r.width||0,this.height=r.height||0,this.audioCodec=r.audioCodec,this.videoCodec=r.videoCodec,this.unknownCodecs=r.unknownCodecs,this.codecSet=[r.videoCodec,r.audioCodec].filter(function(h){return h}).join(",").replace(/\.[^.,]+/g,"")}return p(i,[{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(h){var y=h%this.url.length;this._urlId!==y&&(this.details=void 0,this._urlId=y)}}]),i}()},"./src/types/loader.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"PlaylistContextType",function(){return D}),_.d(c,"PlaylistLevelType",function(){return p});var D;(function(s){s.MANIFEST="manifest",s.LEVEL="level",s.AUDIO_TRACK="audioTrack",s.SUBTITLE_TRACK="subtitleTrack"})(D||(D={}));var p;(function(s){s.MAIN="main",s.AUDIO="audio",s.SUBTITLE="subtitle"})(p||(p={}))},"./src/types/transmuxer.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"ChunkMetadata",function(){return D});var D=function(S,v,o,i,r,h){i===void 0&&(i=0),r===void 0&&(r=-1),h===void 0&&(h=!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=p(),this.buffering={audio:p(),video:p(),audiovideo:p()},this.level=S,this.sn=v,this.id=o,this.size=i,this.part=r,this.partial=h};function p(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"AttrList",function(){return s});var D=/^(\d+)x(\d+)$/,p=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function S(o){typeof o=="string"&&(o=S.parseAttrList(o));for(var i in o)o.hasOwnProperty(i)&&(this[i]=o[i])}var v=S.prototype;return v.decimalInteger=function(i){var r=parseInt(this[i],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},v.hexadecimalInteger=function(i){if(this[i]){var r=(this[i]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var h=new Uint8Array(r.length/2),y=0;y<r.length/2;y++)h[y]=parseInt(r.slice(y*2,y*2+2),16);return h}else return null},v.hexadecimalIntegerAsNumber=function(i){var r=parseInt(this[i],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},v.decimalFloatingPoint=function(i){return parseFloat(this[i])},v.optionalFloat=function(i,r){var h=this[i];return h?parseFloat(h):r},v.enumeratedString=function(i){return this[i]},v.bool=function(i){return this[i]==="YES"},v.decimalResolution=function(i){var r=D.exec(this[i]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},S.parseAttrList=function(i){var r,h={},y='"';for(p.lastIndex=0;(r=p.exec(i))!==null;){var g=r[2];g.indexOf(y)===0&&g.lastIndexOf(y)===g.length-1&&(g=g.slice(1,-1)),h[r[1]]=g}return h},S}()},"./src/utils/binary-search.ts":function(P,c,_){"use strict";_.r(c);var D={search:function(s,S){for(var v=0,o=s.length-1,i=null,r=null;v<=o;){i=(v+o)/2|0,r=s[i];var h=S(r);if(h>0)v=i+1;else if(h<0)o=i-1;else return r}return null}};c.default=D},"./src/utils/buffer-helper.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"BufferHelper",function(){return s});var D=_("./src/utils/logger.ts"),p={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function S(){}return S.isBuffered=function(o,i){try{if(o){for(var r=S.getBuffered(o),h=0;h<r.length;h++)if(i>=r.start(h)&&i<=r.end(h))return!0}}catch(y){}return!1},S.bufferInfo=function(o,i,r){try{if(o){var h=S.getBuffered(o),y=[],g;for(g=0;g<h.length;g++)y.push({start:h.start(g),end:h.end(g)});return this.bufferedInfo(y,i,r)}}catch(w){}return{len:0,start:i,end:i,nextStart:void 0}},S.bufferedInfo=function(o,i,r){i=Math.max(0,i),o.sort(function(a,L){var O=a.start-L.start;return O||L.end-a.end});var h=[];if(r)for(var y=0;y<o.length;y++){var g=h.length;if(g){var w=h[g-1].end;o[y].start-w<r?o[y].end>w&&(h[g-1].end=o[y].end):h.push(o[y])}else h.push(o[y])}else h=o;for(var m=0,d,n=i,l=i,u=0;u<h.length;u++){var T=h[u].start,E=h[u].end;if(i+r>=T&&i<E)n=T,l=E,m=l-i;else if(i+r<T){d=T;break}}return{len:m,start:n||0,end:l||0,nextStart:d}},S.getBuffered=function(o){try{return o.buffered}catch(i){return D.logger.log("failed to get media.buffered",i),p}},S}()},"./src/utils/cea-608-parser.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"Row",function(){return l}),_.d(c,"CaptionScreen",function(){return u});var D=_("./src/utils/logger.ts"),p={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},s=function(x){var b=x;return p.hasOwnProperty(x)&&(b=p[x]),String.fromCharCode(b)},S=15,v=100,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},i={17:2,18:4,21:6,22:8,23:10,19:13,20:15},r={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},y=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],g;(function(f){f[f.ERROR=0]="ERROR",f[f.TEXT=1]="TEXT",f[f.WARNING=2]="WARNING",f[f.INFO=2]="INFO",f[f.DEBUG=3]="DEBUG",f[f.DATA=3]="DATA"})(g||(g={}));var w=function(){function f(){this.time=null,this.verboseLevel=g.ERROR}var x=f.prototype;return x.log=function(C,I){this.verboseLevel>=C&&D.logger.log(this.time+" ["+C+"] "+I)},f}(),m=function(x){for(var b=[],C=0;C<x.length;C++)b.push(x[C].toString(16));return b},d=function(){function f(b,C,I,j,M){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=b||"white",this.underline=C||!1,this.italics=I||!1,this.background=j||"black",this.flash=M||!1}var x=f.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(C){for(var I=["foreground","underline","italics","background","flash"],j=0;j<I.length;j++){var M=I[j];C.hasOwnProperty(M)&&(this[M]=C[M])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(C){return this.foreground===C.foreground&&this.underline===C.underline&&this.italics===C.italics&&this.background===C.background&&this.flash===C.flash},x.copy=function(C){this.foreground=C.foreground,this.underline=C.underline,this.italics=C.italics,this.background=C.background,this.flash=C.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},f}(),n=function(){function f(b,C,I,j,M,z){this.uchar=void 0,this.penState=void 0,this.uchar=b||" ",this.penState=new d(C,I,j,M,z)}var x=f.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(C,I){this.uchar=C,this.penState.copy(I)},x.setPenState=function(C){this.penState.copy(C)},x.equals=function(C){return this.uchar===C.uchar&&this.penState.equals(C.penState)},x.copy=function(C){this.uchar=C.uchar,this.penState.copy(C.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},f}(),l=function(){function f(b){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var C=0;C<v;C++)this.chars.push(new n);this.logger=b,this.pos=0,this.currPenState=new d}var x=f.prototype;return x.equals=function(C){for(var I=!0,j=0;j<v;j++)if(!this.chars[j].equals(C.chars[j])){I=!1;break}return I},x.copy=function(C){for(var I=0;I<v;I++)this.chars[I].copy(C.chars[I])},x.isEmpty=function(){for(var C=!0,I=0;I<v;I++)if(!this.chars[I].isEmpty()){C=!1;break}return C},x.setCursor=function(C){this.pos!==C&&(this.pos=C),this.pos<0?(this.logger.log(g.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>v&&(this.logger.log(g.DEBUG,"Too large cursor position "+this.pos),this.pos=v)},x.moveCursor=function(C){var I=this.pos+C;if(C>1)for(var j=this.pos+1;j<I+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(I)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(C){C>=144&&this.backSpace();var I=s(C);if(this.pos>=v){this.logger.log(g.ERROR,"Cannot insert "+C.toString(16)+" ("+I+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(I,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(C){var I;for(I=C;I<v;I++)this.chars[I].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var C=[],I=!0,j=0;j<v;j++){var M=this.chars[j].uchar;M!==" "&&(I=!1),C.push(M)}return I?"":C.join("")},x.setPenStyles=function(C){this.currPenState.setStyles(C);var I=this.chars[this.pos];I.setPenState(this.currPenState)},f}(),u=function(){function f(b){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var C=0;C<S;C++)this.rows.push(new l(b));this.logger=b,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=f.prototype;return x.reset=function(){for(var C=0;C<S;C++)this.rows[C].clear();this.currRow=S-1},x.equals=function(C){for(var I=!0,j=0;j<S;j++)if(!this.rows[j].equals(C.rows[j])){I=!1;break}return I},x.copy=function(C){for(var I=0;I<S;I++)this.rows[I].copy(C.rows[I])},x.isEmpty=function(){for(var C=!0,I=0;I<S;I++)if(!this.rows[I].isEmpty()){C=!1;break}return C},x.backSpace=function(){var C=this.rows[this.currRow];C.backSpace()},x.clearToEndOfRow=function(){var C=this.rows[this.currRow];C.clearToEndOfRow()},x.insertChar=function(C){var I=this.rows[this.currRow];I.insertChar(C)},x.setPen=function(C){var I=this.rows[this.currRow];I.setPenStyles(C)},x.moveCursor=function(C){var I=this.rows[this.currRow];I.moveCursor(C)},x.setCursor=function(C){this.logger.log(g.INFO,"setCursor: "+C);var I=this.rows[this.currRow];I.setCursor(C)},x.setPAC=function(C){this.logger.log(g.INFO,"pacData = "+JSON.stringify(C));var I=C.row-1;if(this.nrRollUpRows&&I<this.nrRollUpRows-1&&(I=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==I){for(var j=0;j<S;j++)this.rows[j].clear();var M=this.currRow+1-this.nrRollUpRows,z=this.lastOutputScreen;if(z){var G=z.rows[M].cueStartTime,B=this.logger.time;if(G&&B!==null&&G<B)for(var K=0;K<this.nrRollUpRows;K++)this.rows[I-this.nrRollUpRows+K+1].copy(z.rows[M+K])}}this.currRow=I;var F=this.rows[this.currRow];if(C.indent!==null){var H=C.indent,W=Math.max(H-1,0);F.setCursor(C.indent),C.color=F.chars[W].penState.foreground}var Q={foreground:C.color,underline:C.underline,italics:C.italics,background:"black",flash:!1};this.setPen(Q)},x.setBkgData=function(C){this.logger.log(g.INFO,"bkgData = "+JSON.stringify(C)),this.backSpace(),this.setPen(C),this.insertChar(32)},x.setRollUpRows=function(C){this.nrRollUpRows=C},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(g.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(g.TEXT,this.getDisplayText());var C=this.currRow+1-this.nrRollUpRows,I=this.rows.splice(C,1)[0];I.clear(),this.rows.splice(this.currRow,0,I),this.logger.log(g.INFO,"Rolling up")},x.getDisplayText=function(C){C=C||!1;for(var I=[],j="",M=-1,z=0;z<S;z++){var G=this.rows[z].getTextString();G&&(M=z+1,C?I.push("Row "+M+": '"+G+"'"):I.push(G.trim()))}return I.length>0&&(C?j="["+I.join(" | ")+"]":j=I.join(`
|
|
|
`)),j},x.getTextAndFormat=function(){return this.rows},f}(),T=function(){function f(b,C,I){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=b,this.outputFilter=C,this.mode=null,this.verbose=0,this.displayedMemory=new u(I),this.nonDisplayedMemory=new u(I),this.lastOutputScreen=new u(I),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=I}var x=f.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(C){this.outputFilter=C},x.setPAC=function(C){this.writeScreen.setPAC(C)},x.setBkgData=function(C){this.writeScreen.setBkgData(C)},x.setMode=function(C){if(C===this.mode)return;this.mode=C,this.logger.log(g.INFO,"MODE="+C),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=C},x.insertChars=function(C){for(var I=0;I<C.length;I++)this.writeScreen.insertChar(C[I]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(g.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(g.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(g.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(g.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(g.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(C){this.logger.log(g.INFO,"RU("+C+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(C)},x.ccFON=function(){this.logger.log(g.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(g.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(g.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(g.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(g.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(g.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(g.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(g.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var C=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=C,this.writeScreen=this.nonDisplayedMemory,this.logger.log(g.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(C){this.logger.log(g.INFO,"TO("+C+") - Tab Offset"),this.writeScreen.moveCursor(C)},x.ccMIDROW=function(C){var I={flash:!1};if(I.underline=C%2===1,I.italics=C>=46,I.italics)I.foreground="white";else{var j=Math.floor(C/2)-16,M=["white","green","blue","cyan","red","yellow","magenta"];I.foreground=M[j]}this.logger.log(g.INFO,"MIDROW: "+JSON.stringify(I)),this.writeScreen.setPen(I)},x.outputDataUpdate=function(C){C===void 0&&(C=!1);var I=this.logger.time;if(I===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=I:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,I,this.lastOutputScreen),C&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:I),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(C){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,C,this.displayedMemory),this.cueStartTime=C))},f}(),E=function(){function f(b,C,I){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new w;this.channels=[null,new T(b,C,j),new T(b+1,I,j)],this.cmdHistory=O(),this.logger=j}var x=f.prototype;return x.getHandler=function(C){return this.channels[C].getHandler()},x.setHandler=function(C,I){this.channels[C].setHandler(I)},x.addData=function(C,I){var j,M,z,G=!1;this.logger.time=C;for(var B=0;B<I.length;B+=2){if(M=I[B]&127,z=I[B+1]&127,M===0&&z===0)continue;if(this.logger.log(g.DATA,"["+m([I[B],I[B+1]])+"] -> ("+m([M,z])+")"),j=this.parseCmd(M,z),j||(j=this.parseMidrow(M,z)),j||(j=this.parsePAC(M,z)),j||(j=this.parseBackgroundAttributes(M,z)),!j&&(G=this.parseChars(M,z),G)){var K=this.currentChannel;if(K&&K>0){var F=this.channels[K];F.insertChars(G)}else this.logger.log(g.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!G&&this.logger.log(g.WARNING,"Couldn't parse cleaned data "+m([M,z])+" orig: "+m([I[B],I[B+1]]))}},x.parseCmd=function(C,I){var j=this.cmdHistory,M=(C===20||C===28||C===21||C===29)&&I>=32&&I<=47,z=(C===23||C===31)&&I>=33&&I<=35;if(!(M||z))return!1;if(L(C,I,j))return a(null,null,j),this.logger.log(g.DEBUG,"Repeated command ("+m([C,I])+") is dropped"),!0;var G=C===20||C===21||C===23?1:2,B=this.channels[G];return C===20||C===21||C===28||C===29?I===32?B.ccRCL():I===33?B.ccBS():I===34?B.ccAOF():I===35?B.ccAON():I===36?B.ccDER():I===37?B.ccRU(2):I===38?B.ccRU(3):I===39?B.ccRU(4):I===40?B.ccFON():I===41?B.ccRDC():I===42?B.ccTR():I===43?B.ccRTD():I===44?B.ccEDM():I===45?B.ccCR():I===46?B.ccENM():I===47&&B.ccEOC():B.ccTO(I-32),a(C,I,j),this.currentChannel=G,!0},x.parseMidrow=function(C,I){var j=0;if((C===17||C===25)&&I>=32&&I<=47){if(C===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(g.ERROR,"Mismatch channel in midrow parsing"),!1;var M=this.channels[j];return M?(M.ccMIDROW(I),this.logger.log(g.DEBUG,"MIDROW ("+m([C,I])+")"),!0):!1}return!1},x.parsePAC=function(C,I){var j,M=this.cmdHistory,z=(C>=17&&C<=23||C>=25&&C<=31)&&I>=64&&I<=127,G=(C===16||C===24)&&I>=64&&I<=95;if(!(z||G))return!1;if(L(C,I,M))return a(null,null,M),!0;var B=C<=23?1:2;I>=64&&I<=95?j=B===1?o[C]:r[C]:j=B===1?i[C]:h[C];var K=this.channels[B];return K?(K.setPAC(this.interpretPAC(j,I)),a(C,I,M),this.currentChannel=B,!0):!1},x.interpretPAC=function(C,I){var j,M={color:null,italics:!1,indent:null,underline:!1,row:C};return I>95?j=I-96:j=I-64,M.underline=(j&1)===1,j<=13?M.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(M.italics=!0,M.color="white"):M.indent=Math.floor((j-16)/2)*4,M},x.parseChars=function(C,I){var j,M=null,z=null;if(C>=25?(j=2,z=C-8):(j=1,z=C),z>=17&&z<=19){var G;z===17?G=I+80:z===18?G=I+112:G=I+144,this.logger.log(g.INFO,"Special char '"+s(G)+"' in channel "+j),M=[G]}else C>=32&&C<=127&&(M=I===0?[C]:[C,I]);if(M){var B=m(M);this.logger.log(g.DEBUG,"Char codes = "+B.join(",")),a(C,I,this.cmdHistory)}return M},x.parseBackgroundAttributes=function(C,I){var j=(C===16||C===24)&&I>=32&&I<=47,M=(C===23||C===31)&&I>=45&&I<=47;if(!(j||M))return!1;var z,G={};C===16||C===24?(z=Math.floor((I-32)/2),G.background=y[z],I%2===1&&(G.background=G.background+"_semi")):I===45?G.background="transparent":(G.foreground="black",I===47&&(G.underline=!0));var B=C<=23?1:2,K=this.channels[B];return K.setBkgData(G),a(C,I,this.cmdHistory),!0},x.reset=function(){for(var C=0;C<Object.keys(this.channels).length;C++){var I=this.channels[C];I&&I.reset()}this.cmdHistory=O()},x.cueSplitAtTime=function(C){for(var I=0;I<this.channels.length;I++){var j=this.channels[I];j&&j.cueSplitAtTime(C)}},f}();function a(f,x,b){b.a=f,b.b=x}function L(f,x,b){return b.a===f&&b.b===x}function O(){return{a:null,b:null}}c.default=E},"./src/utils/codecs.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"isCodecType",function(){return p}),_.d(c,"isCodecSupportedInMp4",function(){return s});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 p(S,v){var o=D[v];return!!o&&o[S.slice(0,4)]===!0}function s(S,v){return MediaSource.isTypeSupported((v||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/utils/vttparser.ts"),p=_("./src/utils/webvtt-parser.ts"),s=_("./src/utils/texttrack-utils.ts"),S=/\s/,v={newCue:function(i,r,h,y){for(var g=[],w,m,d,n,l,u=self.VTTCue||self.TextTrackCue,T=0;T<y.rows.length;T++)if(w=y.rows[T],d=!0,n=0,l="",!w.isEmpty()){for(var E=0;E<w.chars.length;E++)S.test(w.chars[E].uchar)&&d?n++:(l+=w.chars[E].uchar,d=!1);w.cueStartTime=r,r===h&&(h+=1e-4),n>=16?n--:n++;var a=Object(D.fixLineBreaks)(l.trim()),L=Object(p.generateCueId)(r,h,a);(!i||!i.cues||!i.cues.getCueById(L))&&(m=new u(r,h,a),m.id=L,m.line=T+1,m.align="left",m.position=10+Math.min(80,Math.floor(n*8/32)*10),g.push(m))}return i&&g.length&&(g.sort(function(O,f){return O.line==="auto"||f.line==="auto"?0:O.line>8&&f.line>8?f.line-O.line:O.line-f.line}),g.forEach(function(O){return Object(s.addCueToTrack)(i,O)})),g}};c.default=v},"./src/utils/discontinuities.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"findFirstFragWithCC",function(){return S}),_.d(c,"shouldAlignOnDiscontinuities",function(){return v}),_.d(c,"findDiscontinuousReferenceFrag",function(){return o}),_.d(c,"adjustSlidingStart",function(){return r}),_.d(c,"alignStream",function(){return h}),_.d(c,"alignPDT",function(){return g}),_.d(c,"alignFragmentByPDTDelta",function(){return w}),_.d(c,"alignMediaPlaylistByPDT",function(){return m});var D=_("./src/polyfills/number.ts"),p=_("./src/utils/logger.ts"),s=_("./src/controller/level-helper.ts");function S(d,n){for(var l=null,u=0,T=d.length;u<T;u++){var E=d[u];if(E&&E.cc===n){l=E;break}}return l}function v(d,n,l){return!!(n.details&&(l.endCC>l.startCC||d&&d.cc<l.startCC))}function o(d,n){var l=d.fragments,u=n.fragments;if(!u.length||!l.length){p.logger.log("No fragments to align");return}var T=S(l,u[0].cc);if(!T||T&&!T.startPTS){p.logger.log("No frag in previous level to align on");return}return T}function i(d,n){if(d){var l=d.start+n;d.start=d.startPTS=l,d.endPTS=l+d.duration}}function r(d,n){for(var l=n.fragments,u=0,T=l.length;u<T;u++)i(l[u],d);n.fragmentHint&&i(n.fragmentHint,d),n.alignedSliding=!0}function h(d,n,l){if(!n)return;y(d,l,n),!l.alignedSliding&&n.details&&g(l,n.details),!l.alignedSliding&&n.details&&!l.skippedSegments&&Object(s.adjustSliding)(n.details,l)}function y(d,n,l){if(v(d,l,n)){var u=o(l.details,n);u&&Object(D.isFiniteNumber)(u.start)&&(p.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),r(u.start,n))}}function g(d,n){if(!n.fragments.length||!d.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,u=d.fragments[0].programDateTime,T=(u-l)/1e3+n.fragments[0].start;T&&Object(D.isFiniteNumber)(T)&&(p.logger.log("Adjusting PTS using programDateTime delta "+(u-l)+"ms, sliding:"+T.toFixed(3)+" "+d.url+" "),r(T,d))}function w(d,n){var l=d.programDateTime;if(!l)return;var u=(l-n)/1e3;d.start=d.startPTS=u,d.endPTS=u+d.duration}function m(d,n){if(!n.fragments.length||!d.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,u=n.fragments[0].start,T=l-u*1e3;d.fragments.forEach(function(E){w(E,T)}),d.fragmentHint&&w(d.fragmentHint,T),d.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/utils/ewma.ts"),p=function(){function s(v,o,i){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new D.default(v),this.fast_=new D.default(o)}var S=s.prototype;return S.update=function(o,i){var r=this.slow_,h=this.fast_;this.slow_.halfLife!==o&&(this.slow_=new D.default(o,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==i&&(this.fast_=new D.default(i,h.getEstimate(),h.getTotalWeight()))},S.sample=function(o,i){o=Math.max(o,this.minDelayMs_);var r=8*i,h=o/1e3,y=r/h;this.fast_.sample(h,y),this.slow_.sample(h,y)},S.canEstimate=function(){var o=this.fast_;return o&&o.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},s}();c.default=p},"./src/utils/ewma.ts":function(P,c,_){"use strict";_.r(c);var D=function(){function p(S,v,o){v===void 0&&(v=0),o===void 0&&(o=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=v,this.totalWeight_=o}var s=p.prototype;return s.sample=function(v,o){var i=Math.pow(this.alpha_,v);this.estimate_=o*(1-i)+i*this.estimate_,this.totalWeight_+=v},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var v=1-Math.pow(this.alpha_,this.totalWeight_);if(v)return this.estimate_/v}return this.estimate_},p}();c.default=D},"./src/utils/fetch-loader.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"fetchSupported",function(){return w});var D=_("./src/polyfills/number.ts"),p=_("./src/loader/load-stats.ts"),s=_("./src/demux/chunk-cache.ts");function S(u,T){u.prototype=Object.create(T.prototype),u.prototype.constructor=u,h(u,T)}function v(u){var T=typeof Map=="function"?new Map:void 0;return v=function(a){if(a===null||!r(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(a))return T.get(a);T.set(a,L)}function L(){return o(a,arguments,y(this).constructor)}return L.prototype=Object.create(a.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),h(L,a)},v(u)}function o(u,T,E){return i()?o=Reflect.construct:o=function(L,O,f){var x=[null];x.push.apply(x,O);var b=Function.bind.apply(L,x),C=new b;return f&&h(C,f.prototype),C},o.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(u){return!1}}function r(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function h(u,T){return h=Object.setPrototypeOf||function(a,L){return a.__proto__=L,a},h(u,T)}function y(u){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},y(u)}function g(){return g=Object.assign||function(u){for(var T=1;T<arguments.length;T++){var E=arguments[T];for(var a in E)Object.prototype.hasOwnProperty.call(E,a)&&(u[a]=E[a])}return u},g.apply(this,arguments)}function w(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var m=function(){function u(E){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=E.fetchSetup||n,this.controller=new self.AbortController,this.stats=new p.LoadStats}var T=u.prototype;return T.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},T.abortInternal=function(){var a=this.response;(!a||!a.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(a,L,O){var f=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var b=d(a,this.controller.signal),C=O.onProgress,I=a.responseType==="arraybuffer",j=I?"byteLength":"length";this.context=a,this.config=L,this.callbacks=O,this.request=this.fetchSetup(a,b),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){f.abortInternal(),O.onTimeout(x,a,f.response)},L.timeout),self.fetch(this.request).then(function(M){if(f.response=f.loader=M,!M.ok){var z=M.status,G=M.statusText;throw new l(G||"fetch, bad network response",z,M)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(M.headers.get("Content-Length")||"0"),C&&Object(D.isFiniteNumber)(L.highWaterMark)?f.loadProgressively(M,x,a,L.highWaterMark,C):I?M.arrayBuffer():M.text()}).then(function(M){var z=f.response;self.clearTimeout(f.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=M[j];var G={url:z.url,data:M};C&&!Object(D.isFiniteNumber)(L.highWaterMark)&&C(x,a,M,z),O.onSuccess(G,x,a,z)}).catch(function(M){if(self.clearTimeout(f.requestTimeout),x.aborted)return;var z=M.code||0;O.onError({code:z,text:M.message},a,M.details)})},T.getCacheAge=function(){var a=null;if(this.response){var L=this.response.headers.get("age");a=L?parseFloat(L):null}return a},T.loadProgressively=function(a,L,O,f,x){f===void 0&&(f=0);var b=new s.default,C=a.body.getReader(),I=function j(){return C.read().then(function(M){if(M.done)return b.dataLength&&x(L,O,b.flush(),a),Promise.resolve(new ArrayBuffer(0));var z=M.value,G=z.length;return L.loaded+=G,G<f||b.dataLength?(b.push(z),b.dataLength>=f&&x(L,O,b.flush(),a)):x(L,O,z,a),j()}).catch(function(){return Promise.reject()})};return I()},u}();function d(u,T){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(g({},u.headers))};return u.rangeEnd&&E.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),E}function n(u,T){return new self.Request(u.url,T)}var l=function(u){S(T,u);function T(E,a,L){var O;return O=u.call(this,E)||this,O.code=void 0,O.details=void 0,O.code=a,O.details=L,O}return T}(v(Error));c.default=m},"./src/utils/imsc1-ttml-parser.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"IMSC1_CODEC",function(){return r}),_.d(c,"parseIMSC1",function(){return w});var D=_("./src/utils/mp4-tools.ts"),p=_("./src/utils/vttparser.ts"),s=_("./src/utils/vttcue.ts"),S=_("./src/demux/id3.ts"),v=_("./src/utils/timescale-conversion.ts"),o=_("./src/utils/webvtt-parser.ts");function i(){return i=Object.assign||function(f){for(var x=1;x<arguments.length;x++){var b=arguments[x];for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(f[C]=b[C])}return f},i.apply(this,arguments)}var r="stpp.ttml.im1t",h=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,y=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,g={left:"start",center:"center",right:"end",start:"start",end:"end"};function w(f,x,b,C,I){var j=Object(D.findBox)(new Uint8Array(f),["mdat"]);if(j.length===0){I(new Error("Could not parse IMSC1 mdat"));return}var M=j[0],z=Object(S.utf8ArrayToStr)(new Uint8Array(f,M.start,M.end-M.start)),G=Object(v.toTimescaleFromScale)(x,1,b);try{C(m(z,G))}catch(B){I(B)}}function m(f,x){var b=new DOMParser,C=b.parseFromString(f,"text/xml"),I=C.getElementsByTagName("tt")[0];if(!I)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},M=Object.keys(j).reduce(function(F,H){return F[H]=I.getAttribute("ttp:"+H)||j[H],F},{}),z=I.getAttribute("xml:space")!=="preserve",G=n(d(I,"styling","style")),B=n(d(I,"layout","region")),K=d(I,"body","[begin]");return[].map.call(K,function(F){var H=l(F,z);if(!H||!F.hasAttribute("begin"))return null;var W=a(F.getAttribute("begin"),M),Q=a(F.getAttribute("dur"),M),ee=a(F.getAttribute("end"),M);if(W===null)throw E(F);if(ee===null){if(Q===null)throw E(F);ee=W+Q}var q=new s.default(W-x,ee-x,H);q.id=Object(o.generateCueId)(q.startTime,q.endTime,q.text);var pe=B[F.getAttribute("region")],ye=G[F.getAttribute("style")];q.position=10,q.size=80;var ie=u(pe,ye),Se=ie.textAlign;if(Se){var ge=g[Se];ge&&(q.lineAlign=ge),q.align=Se}return i(q,ie),q}).filter(function(F){return F!==null})}function d(f,x,b){var C=f.getElementsByTagName(x)[0];return C?[].slice.call(C.querySelectorAll(b)):[]}function n(f){return f.reduce(function(x,b){var C=b.getAttribute("xml:id");return C&&(x[C]=b),x},{})}function l(f,x){return[].slice.call(f.childNodes).reduce(function(b,C,I){var j;return C.nodeName==="br"&&I?b+`
|
|
|
`:(j=C.childNodes)!==null&&j!==void 0&&j.length?l(C,x):x?b+C.textContent.trim().replace(/\s+/g," "):b+C.textContent},"")}function u(f,x){var b="http://www.w3.org/ns/ttml#styling",C=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return C.reduce(function(I,j){var M=T(x,b,j)||T(f,b,j);return M&&(I[j]=M),I},{})}function T(f,x,b){return f.hasAttributeNS(x,b)?f.getAttributeNS(x,b):null}function E(f){return new Error("Could not parse ttml timestamp "+f)}function a(f,x){if(!f)return null;var b=Object(p.parseTimeStamp)(f);return b===null&&(h.test(f)?b=L(f,x):y.test(f)&&(b=O(f,x))),b}function L(f,x){var b=h.exec(f),C=(b[4]|0)+(b[5]|0)/x.subFrameRate;return(b[1]|0)*3600+(b[2]|0)*60+(b[3]|0)+C/x.frameRate}function O(f,x){var b=y.exec(f),C=Number(b[1]),I=b[2];switch(I){case"h":return C*3600;case"m":return C*60;case"ms":return C*1e3;case"f":return C/x.frameRate;case"t":return C/x.tickRate}return C}},"./src/utils/logger.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"enableLogs",function(){return o}),_.d(c,"logger",function(){return i});var D=function(){},p={trace:D,debug:D,log:D,warn:D,info:D,error:D},s=p;function S(r){var h=self.console[r];return h?h.bind(self.console,"["+r+"] >"):D}function v(r){for(var h=arguments.length,y=new Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];y.forEach(function(w){s[w]=r[w]?r[w].bind(r):S(w)})}function o(r){if(self.console&&r===!0||typeof r=="object"){v(r,"debug","log","info","warn","error");try{s.log()}catch(h){s=p}}else s=p}var i=s},"./src/utils/mediakeys-helper.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"KeySystems",function(){return D}),_.d(c,"requestMediaKeySystemAccess",function(){return p});var D;(function(s){s.WIDEVINE="com.widevine.alpha",s.PLAYREADY="com.microsoft.playready"})(D||(D={}));var p=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"getMediaSource",function(){return D});function D(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"bin2str",function(){return v}),_.d(c,"readUint16",function(){return o}),_.d(c,"readUint32",function(){return i}),_.d(c,"writeUint32",function(){return r}),_.d(c,"findBox",function(){return h}),_.d(c,"parseSegmentIndex",function(){return y}),_.d(c,"parseInitSegment",function(){return g}),_.d(c,"getStartDTS",function(){return w}),_.d(c,"getDuration",function(){return m}),_.d(c,"computeRawDurationFromSamples",function(){return d}),_.d(c,"offsetStartDTS",function(){return n}),_.d(c,"segmentValidRange",function(){return l}),_.d(c,"appendUint8Array",function(){return u});var D=_("./src/utils/typed-array.ts"),p=_("./src/loader/fragment.ts"),s=Math.pow(2,32)-1,S=[].push;function v(T){return String.fromCharCode.apply(null,T)}function o(T,E){"data"in T&&(E+=T.start,T=T.data);var a=T[E]<<8|T[E+1];return a<0?65536+a:a}function i(T,E){"data"in T&&(E+=T.start,T=T.data);var a=T[E]<<24|T[E+1]<<16|T[E+2]<<8|T[E+3];return a<0?4294967296+a:a}function r(T,E,a){"data"in T&&(E+=T.start,T=T.data),T[E]=a>>24,T[E+1]=a>>16&255,T[E+2]=a>>8&255,T[E+3]=a&255}function h(T,E){var a=[];if(!E.length)return a;var L,O,f;"data"in T?(L=T.data,O=T.start,f=T.end):(L=T,O=0,f=L.byteLength);for(var x=O;x<f;){var b=i(L,x),C=v(L.subarray(x+4,x+8)),I=b>1?x+b:f;if(C===E[0])if(E.length===1)a.push({data:L,start:x+8,end:I});else{var j=h({data:L,start:x+8,end:I},E.slice(1));j.length&&S.apply(a,j)}x=I}return a}function y(T){var E=h(T,["moov"]),a=E[0],L=a?a.end:null,O=h(T,["sidx"]);if(!O||!O[0])return null;var f=[],x=O[0],b=x.data[0],C=b===0?8:16,I=i(x,C);C+=4;var j=0,M=0;b===0?C+=8:C+=16,C+=2;var z=x.end+M,G=o(x,C);C+=2;for(var B=0;B<G;B++){var K=C,F=i(x,K);K+=4;var H=F&2147483647,W=(F&2147483648)>>>31;if(W===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var Q=i(x,K);K+=4,f.push({referenceSize:H,subsegmentDuration:Q,info:{duration:Q/I,start:z,end:z+H-1}}),z+=H,K+=4,C=K}return{earliestPresentationTime:j,timescale:I,version:b,referencesCount:G,references:f,moovEndOffset:L}}function g(T){for(var E=[],a=h(T,["moov","trak"]),L=0;L<a.length;L++){var O=a[L],f=h(O,["tkhd"])[0];if(f){var x=f.data[f.start],b=x===0?12:20,C=i(f,b),I=h(O,["mdia","mdhd"])[0];if(I){x=I.data[I.start],b=x===0?12:20;var j=i(I,b),M=h(O,["mdia","hdlr"])[0];if(M){var z=v(M.data.subarray(M.start+8,M.start+12)),G={soun:p.ElementaryStreamTypes.AUDIO,vide:p.ElementaryStreamTypes.VIDEO}[z];if(G){var B=h(O,["mdia","minf","stbl","stsd"])[0],K=void 0;B&&(K=v(B.data.subarray(B.start+12,B.start+16))),E[C]={timescale:j,type:G},E[G]={timescale:j,id:C,codec:K}}}}}}var F=h(T,["moov","mvex","trex"]);return F.forEach(function(H){var W=i(H,4),Q=E[W];Q&&(Q.default={duration:i(H,12),flags:i(H,20)})}),E}function w(T,E){return h(E,["moof","traf"]).reduce(function(a,L){var O=h(L,["tfdt"])[0],f=O.data[O.start],x=h(L,["tfhd"]).reduce(function(b,C){var I=i(C,4),j=T[I];if(j){var M=i(O,4);f===1&&(M*=Math.pow(2,32),M+=i(O,8));var z=j.timescale||9e4,G=M/z;if(isFinite(G)&&(b===null||G<b))return G}return b},null);return x!==null&&isFinite(x)&&(a===null||x<a)?x:a},null)||0}function m(T,E){for(var a=0,L=0,O=0,f=h(T,["moof","traf"]),x=0;x<f.length;x++){var b=f[x],C=h(b,["tfhd"])[0],I=i(C,4),j=E[I];if(!j)continue;var M=j.default,z=i(C,0)|(M==null?void 0:M.flags),G=M==null?void 0:M.duration;z&8&&(z&2?G=i(C,12):G=i(C,8));for(var B=j.timescale||9e4,K=h(b,["trun"]),F=0;F<K.length;F++){if(G){var H=i(K[F],4);a=G*H}else a=d(K[F]);j.type===p.ElementaryStreamTypes.VIDEO?L+=a/B:j.type===p.ElementaryStreamTypes.AUDIO&&(O+=a/B)}}if(L===0&&O===0){var W=y(T);if(W!=null&&W.references)return W.references.reduce(function(Q,ee){return Q+ee.info.duration||0},0)}return L||O}function d(T){var E=i(T,0),a=8;E&1&&(a+=4),E&4&&(a+=4);for(var L=0,O=i(T,4),f=0;f<O;f++){if(E&256){var x=i(T,a);L+=x,a+=4}E&512&&(a+=4),E&1024&&(a+=4),E&2048&&(a+=4)}return L}function n(T,E,a){h(E,["moof","traf"]).forEach(function(L){h(L,["tfhd"]).forEach(function(O){var f=i(O,4),x=T[f];if(!x)return;var b=x.timescale||9e4;h(L,["tfdt"]).forEach(function(C){var I=C.data[C.start],j=i(C,4);if(I===0)r(C,4,j-a*b);else{j*=Math.pow(2,32),j+=i(C,8),j-=a*b,j=Math.max(j,0);var M=Math.floor(j/(s+1)),z=Math.floor(j%(s+1));r(C,4,M),r(C,8,z)}})})})}function l(T){var E={valid:null,remainder:null},a=h(T,["moof"]);if(a){if(a.length<2)return E.remainder=T,E}else return E;var L=a[a.length-1];return E.valid=Object(D.sliceUint8)(T,0,L.start-8),E.remainder=Object(D.sliceUint8)(T,L.start-8),E}function u(T,E){var a=new Uint8Array(T.length+E.length);return a.set(T),a.set(E,T.length),a}},"./src/utils/output-filter.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"default",function(){return D});var D=function(){function p(S,v){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=v}var s=p.prototype;return s.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},s.newCue=function(v,o,i){(this.startTime===null||this.startTime>v)&&(this.startTime=v),this.endTime=o,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},p}()},"./src/utils/texttrack-utils.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"sendAddTrackEvent",function(){return p}),_.d(c,"addCueToTrack",function(){return s}),_.d(c,"clearCurrentCues",function(){return S}),_.d(c,"removeCuesInRange",function(){return v}),_.d(c,"getCuesInRange",function(){return i});var D=_("./src/utils/logger.ts");function p(r,h){var y;try{y=new Event("addtrack")}catch(g){y=document.createEvent("Event"),y.initEvent("addtrack",!1,!1)}y.track=r,h.dispatchEvent(y)}function s(r,h){var y=r.mode;if(y==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(h.id))try{if(r.addCue(h),!r.cues.getCueById(h.id))throw new Error("addCue is failed for: "+h)}catch(w){D.logger.debug("[texttrack-utils]: "+w);var g=new self.TextTrackCue(h.startTime,h.endTime,h.text);g.id=h.id,r.addCue(g)}y==="disabled"&&(r.mode=y)}function S(r){var h=r.mode;if(h==="disabled"&&(r.mode="hidden"),r.cues)for(var y=r.cues.length;y--;)r.removeCue(r.cues[y]);h==="disabled"&&(r.mode=h)}function v(r,h,y){var g=r.mode;if(g==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var w=i(r.cues,h,y),m=0;m<w.length;m++)r.removeCue(w[m]);g==="disabled"&&(r.mode=g)}function o(r,h){if(h<r[0].startTime)return 0;var y=r.length-1;if(h>r[y].endTime)return-1;for(var g=0,w=y;g<=w;){var m=Math.floor((w+g)/2);if(h<r[m].startTime)w=m-1;else if(h>r[m].startTime&&g<y)g=m+1;else return m}return r[g].startTime-h<h-r[w].startTime?g:w}function i(r,h,y){var g=[],w=o(r,h);if(w>-1)for(var m=w,d=r.length;m<d;m++){var n=r[m];if(n.startTime>=h&&n.endTime<=y)g.push(n);else if(n.startTime>y)return g}return g}},"./src/utils/time-ranges.ts":function(P,c,_){"use strict";_.r(c);var D={toString:function(s){for(var S="",v=s.length,o=0;o<v;o++)S+="["+s.start(o).toFixed(3)+","+s.end(o).toFixed(3)+"]";return S}};c.default=D},"./src/utils/timescale-conversion.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"toTimescaleFromBase",function(){return p}),_.d(c,"toTimescaleFromScale",function(){return s}),_.d(c,"toMsFromMpegTsClock",function(){return S}),_.d(c,"toMpegTsClockFromTimescale",function(){return v});var D=9e4;function p(o,i,r,h){r===void 0&&(r=1),h===void 0&&(h=!1);var y=o*i*r;return h?Math.round(y):y}function s(o,i,r,h){return r===void 0&&(r=1),h===void 0&&(h=!1),p(o,i,1/r,h)}function S(o,i){return i===void 0&&(i=!1),p(o,1e3,1/D,i)}function v(o,i){return i===void 0&&(i=1),p(o,D,1/i)}},"./src/utils/typed-array.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"sliceUint8",function(){return D});function D(p,s,S){return Uint8Array.prototype.slice?p.slice(s,S):new Uint8Array(Array.prototype.slice.call(p,s,S))}},"./src/utils/vttcue.ts":function(P,c,_){"use strict";_.r(c),c.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var D=["","lr","rl"],p=["start","middle","end","left","right"];function s(r,h){if(typeof h!="string")return!1;if(!Array.isArray(r))return!1;var y=h.toLowerCase();return~r.indexOf(y)?y:!1}function S(r){return s(D,r)}function v(r){return s(p,r)}function o(r){for(var h=arguments.length,y=new Array(h>1?h-1:0),g=1;g<h;g++)y[g-1]=arguments[g];for(var w=1;w<arguments.length;w++){var m=arguments[w];for(var d in m)r[d]=m[d]}return r}function i(r,h,y){var g=this,w={enumerable:!0};g.hasBeenReset=!1;var m="",d=!1,n=r,l=h,u=y,T=null,E="",a=!0,L="auto",O="start",f=50,x="middle",b=50,C="middle";Object.defineProperty(g,"id",o({},w,{get:function(){return m},set:function(j){m=""+j}})),Object.defineProperty(g,"pauseOnExit",o({},w,{get:function(){return d},set:function(j){d=!!j}})),Object.defineProperty(g,"startTime",o({},w,{get:function(){return n},set:function(j){if(typeof j!="number")throw new TypeError("Start time must be set to a number.");n=j,this.hasBeenReset=!0}})),Object.defineProperty(g,"endTime",o({},w,{get:function(){return l},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");l=j,this.hasBeenReset=!0}})),Object.defineProperty(g,"text",o({},w,{get:function(){return u},set:function(j){u=""+j,this.hasBeenReset=!0}})),Object.defineProperty(g,"region",o({},w,{get:function(){return T},set:function(j){T=j,this.hasBeenReset=!0}})),Object.defineProperty(g,"vertical",o({},w,{get:function(){return E},set:function(j){var M=S(j);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");E=M,this.hasBeenReset=!0}})),Object.defineProperty(g,"snapToLines",o({},w,{get:function(){return a},set:function(j){a=!!j,this.hasBeenReset=!0}})),Object.defineProperty(g,"line",o({},w,{get:function(){return L},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=j,this.hasBeenReset=!0}})),Object.defineProperty(g,"lineAlign",o({},w,{get:function(){return O},set:function(j){var M=v(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");O=M,this.hasBeenReset=!0}})),Object.defineProperty(g,"position",o({},w,{get:function(){return f},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");f=j,this.hasBeenReset=!0}})),Object.defineProperty(g,"positionAlign",o({},w,{get:function(){return x},set:function(j){var M=v(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");x=M,this.hasBeenReset=!0}})),Object.defineProperty(g,"size",o({},w,{get:function(){return b},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");b=j,this.hasBeenReset=!0}})),Object.defineProperty(g,"align",o({},w,{get:function(){return C},set:function(j){var M=v(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");C=M,this.hasBeenReset=!0}})),g.displayState=void 0}return i.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},i}()},"./src/utils/vttparser.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"parseTimeStamp",function(){return s}),_.d(c,"fixLineBreaks",function(){return h}),_.d(c,"VTTParser",function(){return y});var D=_("./src/utils/vttcue.ts"),p=function(){function g(){}var w=g.prototype;return w.decode=function(d,n){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},g}();function s(g){function w(d,n,l,u){return(d|0)*3600+(n|0)*60+(l|0)+parseFloat(u||0)}var m=g.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return m?parseFloat(m[2])>59?w(m[2],m[3],0,m[4]):w(m[1],m[2],m[3],m[4]):null}var S=function(){function g(){this.values=Object.create(null)}var w=g.prototype;return w.set=function(d,n){!this.get(d)&&n!==""&&(this.values[d]=n)},w.get=function(d,n,l){return l?this.has(d)?this.values[d]:n[l]:this.has(d)?this.values[d]:n},w.has=function(d){return d in this.values},w.alt=function(d,n,l){for(var u=0;u<l.length;++u)if(n===l[u]){this.set(d,n);break}},w.integer=function(d,n){/^-?\d+$/.test(n)&&this.set(d,parseInt(n,10))},w.percent=function(d,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var l=parseFloat(n);if(l>=0&&l<=100)return this.set(d,l),!0}return!1},g}();function v(g,w,m,d){var n=d?g.split(d):[g];for(var l in n){if(typeof n[l]!="string")continue;var u=n[l].split(m);if(u.length!==2)continue;var T=u[0],E=u[1];w(T,E)}}var o=new D.default(0,0,""),i=o.align==="middle"?"middle":"center";function r(g,w,m){var d=g;function n(){var T=s(g);if(T===null)throw new Error("Malformed timestamp: "+d);return g=g.replace(/^[^\sa-zA-Z-]+/,""),T}function l(T,E){var a=new S;v(T,function(f,x){var b;switch(f){case"region":for(var C=m.length-1;C>=0;C--)if(m[C].id===x){a.set(f,m[C].region);break}break;case"vertical":a.alt(f,x,["rl","lr"]);break;case"line":b=x.split(","),a.integer(f,b[0]),a.percent(f,b[0])&&a.set("snapToLines",!1),a.alt(f,b[0],["auto"]),b.length===2&&a.alt("lineAlign",b[1],["start",i,"end"]);break;case"position":b=x.split(","),a.percent(f,b[0]),b.length===2&&a.alt("positionAlign",b[1],["start",i,"end","line-left","line-right","auto"]);break;case"size":a.percent(f,x);break;case"align":a.alt(f,x,["start",i,"end","left","right"]);break}},/:/,/\s/),E.region=a.get("region",null),E.vertical=a.get("vertical","");var L=a.get("line","auto");L==="auto"&&o.line===-1&&(L=-1),E.line=L,E.lineAlign=a.get("lineAlign","start"),E.snapToLines=a.get("snapToLines",!0),E.size=a.get("size",100),E.align=a.get("align",i);var O=a.get("position","auto");O==="auto"&&o.position===50&&(O=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=O}function u(){g=g.replace(/^\s+/,"")}if(u(),w.startTime=n(),u(),g.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);g=g.substr(3),u(),w.endTime=n(),u(),l(g,w)}function h(g){return g.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var y=function(){function g(){this.state="INITIAL",this.buffer="",this.decoder=new p,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var w=g.prototype;return w.parse=function(d){var n=this;d&&(n.buffer+=n.decoder.decode(d,{stream:!0}));function l(){var O=n.buffer,f=0;for(O=h(O);f<O.length&&O[f]!=="\r"&&O[f]!==`
|
|
|
`;)++f;var x=O.substr(0,f);return O[f]==="\r"&&++f,O[f]===`
|
|
|
`&&++f,n.buffer=O.substr(f),x}function u(O){v(O,function(f,x){},/:/)}try{var T="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;T=l();var E=T.match(/^()?WEBVTT([ \t].*)?$/);if(!E||!E[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;a?a=!1:T=l();switch(n.state){case"HEADER":/:/.test(T)?u(T):T||(n.state="ID");continue;case"NOTE":T||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(T)){n.state="NOTE";break}if(!T)continue;if(n.cue=new D.default(0,0,""),n.state="CUE",T.indexOf("-->")===-1){n.cue.id=T;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{r(T,n.cue,n.regionList)}catch(O){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var L=T.indexOf("-->")!==-1;if(!T||L&&(a=!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+=T}continue;case"BADCUE":T||(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},w.flush=function(){var d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=`
|
|
|
|
|
|
`,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){d.onparsingerror&&d.onparsingerror(n)}return d.onflush&&d.onflush(),this},g}()},"./src/utils/webvtt-parser.ts":function(P,c,_){"use strict";_.r(c),_.d(c,"generateCueId",function(){return y}),_.d(c,"parseWebVTT",function(){return w});var D=_("./src/polyfills/number.ts"),p=_("./src/utils/vttparser.ts"),s=_("./src/demux/id3.ts"),S=_("./src/utils/timescale-conversion.ts"),v=_("./src/remux/mp4-remuxer.ts"),o=/\r\n|\n\r|\n|\r/g,i=function(d,n,l){return l===void 0&&(l=0),d.substr(l,n.length)===n},r=function(d){var n=parseInt(d.substr(-3)),l=parseInt(d.substr(-6,2)),u=parseInt(d.substr(-9,2)),T=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(D.isFiniteNumber)(n)||!Object(D.isFiniteNumber)(l)||!Object(D.isFiniteNumber)(u)||!Object(D.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return n+=1e3*l,n+=60*1e3*u,n+=60*60*1e3*T,n},h=function(d){for(var n=5381,l=d.length;l;)n=n*33^d.charCodeAt(--l);return(n>>>0).toString()};function y(m,d,n){return h(m.toString())+h(d.toString())+h(n)}var g=function(d,n,l){var u=d[n],T=d[u.prevCC];if(!T||!T.new&&u.new){d.ccOffset=d.presentationOffset=u.start,u.new=!1;return}for(;(E=T)!==null&&E!==void 0&&E.new;){var E;d.ccOffset+=u.start-T.start,u.new=!1,u=T,T=d[u.prevCC]}d.presentationOffset=l};function w(m,d,n,l,u,T,E,a){var L=new p.VTTParser,O=Object(s.utf8ArrayToStr)(new Uint8Array(m)).trim().replace(o,`
|
|
|
`).split(`
|
|
|
`),f=[],x=Object(S.toMpegTsClockFromTimescale)(d,n),b="00:00.000",C=0,I=0,j,M=!0,z=!1;L.oncue=function(G){var B=l[u],K=l.ccOffset,F=(C-x)/9e4;if(B!=null&&B.new&&(I!==void 0?K=l.ccOffset=B.start:g(l,u,F)),F&&(K=F-l.presentationOffset),z){var H=G.endTime-G.startTime,W=Object(v.normalizePts)((G.startTime+K-I)*9e4,T*9e4)/9e4;G.startTime=W,G.endTime=W+H}var Q=G.text.trim();G.text=decodeURIComponent(encodeURIComponent(Q)),G.id||(G.id=y(G.startTime,G.endTime,Q)),G.endTime>0&&f.push(G)},L.onparsingerror=function(G){j=G},L.onflush=function(){if(j){a(j);return}E(f)},O.forEach(function(G){if(M)if(i(G,"X-TIMESTAMP-MAP=")){M=!1,z=!0,G.substr(16).split(",").forEach(function(B){i(B,"LOCAL:")?b=B.substr(6):i(B,"MPEGTS:")&&(C=parseInt(B.substr(7)))});try{I=r(b)/1e3}catch(B){z=!1,j=B}return}else G===""&&(M=!1);L.parse(G+`
|
|
|
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(P,c,_){"use strict";_.r(c);var D=_("./src/utils/logger.ts"),p=_("./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,S=function(){function v(i){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=i?i.xhrSetup:null,this.stats=new p.LoadStats,this.retryDelay=0}var o=v.prototype;return o.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},o.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},o.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},o.load=function(r,h,y){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=h,this.callbacks=y,this.retryDelay=h.retryDelay,this.loadInternal()},o.loadInternal=function(){var r=this.config,h=this.context;if(!r)return;var y=this.loader=new self.XMLHttpRequest,g=this.stats;g.loading.first=0,g.loaded=0;var w=this.xhrSetup;try{if(w)try{w(y,h.url)}catch(n){y.open("GET",h.url,!0),w(y,h.url)}y.readyState||y.open("GET",h.url,!0);var m=this.context.headers;if(m)for(var d in m)y.setRequestHeader(d,m[d])}catch(n){this.callbacks.onError({code:y.status,text:n.message},h,y);return}h.rangeEnd&&y.setRequestHeader("Range","bytes="+h.rangeStart+"-"+(h.rangeEnd-1)),y.onreadystatechange=this.readystatechange.bind(this),y.onprogress=this.loadprogress.bind(this),y.responseType=h.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),y.send()},o.readystatechange=function(){var r=this.context,h=this.loader,y=this.stats;if(!r||!h)return;var g=h.readyState,w=this.config;if(y.aborted)return;if(g>=2)if(self.clearTimeout(this.requestTimeout),y.loading.first===0&&(y.loading.first=Math.max(self.performance.now(),y.loading.start)),g===4){h.onreadystatechange=null,h.onprogress=null;var m=h.status;if(m>=200&&m<300){y.loading.end=Math.max(self.performance.now(),y.loading.first);var d,n;if(r.responseType==="arraybuffer"?(d=h.response,n=d.byteLength):(d=h.responseText,n=d.length),y.loaded=y.total=n,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(y,r,d,h),!this.callbacks)return;var u={url:h.responseURL,data:d};this.callbacks.onSuccess(u,y,r,h)}else y.retry>=w.maxRetry||m>=400&&m<499?(D.logger.error(m+" while loading "+r.url),this.callbacks.onError({code:m,text:h.statusText},r,h)):(D.logger.warn(m+" while loading "+r.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,w.maxRetryDelay),y.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),w.timeout)},o.loadtimeout=function(){D.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},o.loadprogress=function(r){var h=this.stats;h.loaded=r.loaded,r.lengthComputable&&(h.total=r.total)},o.getCacheAge=function(){var r=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var h=this.loader.getResponseHeader("age");r=h?parseFloat(h):null}return r},v}();c.default=S}}).default})},vHTk:function(N,$,k){N.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.StreamCipher,p=c.algo,s=p.RC4=D.extend({_doReset:function(){for(var o=this._key,i=o.words,r=o.sigBytes,h=this._S=[],y=0;y<256;y++)h[y]=y;for(var y=0,g=0;y<256;y++){var w=y%r,m=i[w>>>2]>>>24-w%4*8&255;g=(g+h[y]+m)%256;var d=h[y];h[y]=h[g],h[g]=d}this._i=this._j=0},_doProcessBlock:function(o,i){o[i]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var o=this._S,i=this._i,r=this._j,h=0,y=0;y<4;y++){i=(i+1)%256,r=(r+o[i])%256;var g=o[i];o[i]=o[r],o[r]=g,h|=o[(o[i]+o[r])%256]<<24-y*8}return this._i=i,this._j=r,h}c.RC4=D._createHelper(s);var v=p.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)S.call(this)}});c.RC4Drop=D._createHelper(v)}(),P.RC4})},wCXF:function(N,$,k){"use strict";k.d($,"a",function(){return Je});var P=k("rePB"),c=k("VTBJ"),_=k("KQm4"),D=k("U8pU"),p=k("ODXe"),s=k("cDcd"),S=k("TSYQ"),v=k.n(S),o=k("Gytx"),i=k.n(o),r=k("Kwbf"),h=k("t23M"),y=k("qx4F"),g=k("6eGT"),w=k("IBYe"),m=k("Ff2n"),d=k("c+Xe"),n=k("fyJ8"),l=k("biw7");function u(Me,Ce,Xe,et,Ue){var Ve=Xe[Me]||{},Pe=Xe[Ce]||{},we,Ae;Ve.fixed==="left"?we=et.left[Me]:Pe.fixed==="right"&&(Ae=et.right[Ce]);var ce=!1,xe=!1,_e=!1,Le=!1,Re=Xe[Ce+1],Ge=Xe[Me-1];if(Ue==="rtl"){if(we!==void 0){var Ye=Ge&&Ge.fixed==="left";Le=!Ye}else if(Ae!==void 0){var at=Re&&Re.fixed==="right";_e=!at}}else if(we!==void 0){var it=Re&&Re.fixed==="left";ce=!it}else if(Ae!==void 0){var ot=Ge&&Ge.fixed==="right";xe=!ot}return{fixLeft:we,fixRight:Ae,lastFixLeft:ce,firstFixRight:xe,lastFixRight:_e,firstFixLeft:Le,isSticky:et.isSticky}}var T=k("sR1s");function E(Me){var Ce=Me.cells,Xe=Me.stickyOffsets,et=Me.flattenColumns,Ue=Me.rowComponent,Ve=Me.cellComponent,Pe=Me.onHeaderRow,we=Me.index,Ae=s.useContext(l.a),ce=Ae.prefixCls,xe=Ae.direction,_e;Pe&&(_e=Pe(Ce.map(function(Re){return Re.column}),we));var Le=Object(T.a)(Ce.map(function(Re){return Re.column}));return s.createElement(Ue,Object.assign({},_e),Ce.map(function(Re,Ge){var Ye=Re.column,at=u(Re.colStart,Re.colEnd,et,Xe,xe),it;return Ye&&Ye.onHeaderCell&&(it=Re.column.onHeaderCell(Ye)),s.createElement(n.a,Object.assign({},Re,{ellipsis:Ye.ellipsis,align:Ye.align,component:Ve,prefixCls:ce,key:Le[Ge]},at,{additionalProps:it,rowType:"header"}))}))}E.displayName="HeaderRow";var a=E;function L(Me){var Ce=[];function Xe(Pe,we){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[Ae]=Ce[Ae]||[];var ce=we,xe=Pe.filter(Boolean).map(function(_e){var Le={key:_e.key,className:_e.className||"",children:_e.title,column:_e,colStart:ce},Re=1,Ge=_e.children;return Ge&&Ge.length>0&&(Re=Xe(Ge,ce,Ae+1).reduce(function(Ye,at){return Ye+at},0),Le.hasSubColumns=!0),"colSpan"in _e&&(Re=_e.colSpan),"rowSpan"in _e&&(Le.rowSpan=_e.rowSpan),Le.colSpan=Re,Le.colEnd=Le.colStart+Re-1,Ce[Ae].push(Le),ce+=Re,Re});return xe}Xe(Me,0);for(var et=Ce.length,Ue=function(we){Ce[we].forEach(function(Ae){!("rowSpan"in Ae)&&!Ae.hasSubColumns&&(Ae.rowSpan=et-we)})},Ve=0;Ve<et;Ve+=1)Ue(Ve);return Ce}function O(Me){var Ce=Me.stickyOffsets,Xe=Me.columns,et=Me.flattenColumns,Ue=Me.onHeaderRow,Ve=s.useContext(l.a),Pe=Ve.prefixCls,we=Ve.getComponent,Ae=s.useMemo(function(){return L(Xe)},[Xe]),ce=we(["header","wrapper"],"thead"),xe=we(["header","row"],"tr"),_e=we(["header","cell"],"th");return s.createElement(ce,{className:"".concat(Pe,"-thead")},Ae.map(function(Le,Re){var Ge=s.createElement(a,{key:Re,flattenColumns:et,cells:Le,stickyOffsets:Ce,rowComponent:xe,cellComponent:_e,onHeaderRow:Ue,index:Re});return Ge}))}var f=O,x=k("hW8S");function b(Me){for(var Ce=Me.colWidths,Xe=Me.columns,et=Me.columCount,Ue=[],Ve=et||Xe.length,Pe=!1,we=Ve-1;we>=0;we-=1){var Ae=Ce[we],ce=Xe&&Xe[we],xe=ce&&ce[x.a];(Ae||xe||Pe)&&(Ue.unshift(s.createElement("col",Object.assign({key:we,style:{width:Ae,minWidth:Ae}},xe))),Pe=!0)}return s.createElement("colgroup",null,Ue)}var C=b;function I(Me,Ce){return Object(s.useMemo)(function(){for(var Xe=[],et=0;et<Ce;et+=1){var Ue=Me[et];if(Ue!==void 0)Xe[et]=Ue;else return null}return Xe},[Me.join("_"),Ce])}var j=s.forwardRef(function(Me,Ce){var Xe=Me.noData,et=Me.columns,Ue=Me.flattenColumns,Ve=Me.colWidths,Pe=Me.columCount,we=Me.stickyOffsets,Ae=Me.direction,ce=Me.fixHeader,xe=Me.offsetHeader,_e=Me.stickyClassName,Le=Me.onScroll,Re=Object(m.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ge=s.useContext(l.a),Ye=Ge.prefixCls,at=Ge.scrollbarSize,it=Ge.isSticky,ot=it&&!ce?0:at,yt=s.useRef(null),wt=s.useCallback(function(dr){Object(d.b)(Ce,dr),Object(d.b)(yt,dr)},[]);s.useEffect(function(){var dr;function tr(Wt){var Bt=Wt.currentTarget,Nr=Wt.deltaX;Nr&&(Le({currentTarget:Bt,scrollLeft:Bt.scrollLeft+Nr}),Wt.preventDefault())}return(dr=yt.current)===null||dr===void 0||dr.addEventListener("wheel",tr),function(){var Wt;(Wt=yt.current)===null||Wt===void 0||Wt.removeEventListener("wheel",tr)}},[]);var ft=Ue[Ue.length-1],jt={fixed:ft?ft.fixed:null,onHeaderCell:function(){return{className:"".concat(Ye,"-cell-scrollbar")}}},kt=Object(s.useMemo)(function(){return ot?[].concat(Object(_.a)(et),[jt]):et},[ot,et]),Rt=Object(s.useMemo)(function(){return ot?[].concat(Object(_.a)(Ue),[jt]):Ue},[ot,Ue]),Vt=Object(s.useMemo)(function(){var dr=we.right,tr=we.left;return Object(c.a)(Object(c.a)({},we),{},{left:Ae==="rtl"?[].concat(Object(_.a)(tr.map(function(Wt){return Wt+ot})),[0]):tr,right:Ae==="rtl"?dr:[].concat(Object(_.a)(dr.map(function(Wt){return Wt+ot})),[0]),isSticky:it})},[ot,we,it]),Tt=I(Ve,Pe);return s.createElement("div",{style:Object(c.a)({overflow:"hidden"},it?{top:xe}:{}),ref:wt,className:v()("".concat(Ye,"-header"),Object(P.a)({},_e,!!_e))},s.createElement("table",{style:{tableLayout:"fixed",visibility:Xe||Tt?null:"hidden"}},s.createElement(C,{colWidths:Tt?[].concat(Object(_.a)(Tt),[ot]):[],columCount:Pe+1,columns:Rt}),s.createElement(f,Object.assign({},Re,{stickyOffsets:Vt,columns:kt,flattenColumns:Rt}))))});j.displayName="FixedHeader";var M=j,z=s.createContext(null),G=z;function B(Me){var Ce=Me.prefixCls,Xe=Me.children,et=Me.component,Ue=Me.cellComponent,Ve=Me.fixHeader,Pe=Me.fixColumn,we=Me.horizonScroll,Ae=Me.className,ce=Me.expanded,xe=Me.componentWidth,_e=Me.colSpan,Le=s.useContext(l.a),Re=Le.scrollbarSize;return s.useMemo(function(){var Ge=Xe;return Pe&&(Ge=s.createElement("div",{style:{width:xe-(Ve?Re:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Ge)),s.createElement(et,{className:Ae,style:{display:ce?null:"none"}},s.createElement(n.a,{component:Ue,prefixCls:Ce,colSpan:_e},Ge))},[Xe,et,Ve,we,Ae,ce,xe,_e,Re])}var K=B;function F(Me){var Ce=Me.className,Xe=Me.style,et=Me.record,Ue=Me.index,Ve=Me.rowKey,Pe=Me.getRowKey,we=Me.rowExpandable,Ae=Me.expandedKeys,ce=Me.onRow,xe=Me.indent,_e=xe===void 0?0:xe,Le=Me.rowComponent,Re=Me.cellComponent,Ge=Me.childrenColumnName,Ye=s.useContext(l.a),at=Ye.prefixCls,it=Ye.fixedInfoList,ot=s.useContext(G),yt=ot.fixHeader,wt=ot.fixColumn,ft=ot.horizonScroll,jt=ot.componentWidth,kt=ot.flattenColumns,Rt=ot.expandableType,Vt=ot.expandRowByClick,Tt=ot.onTriggerExpand,dr=ot.rowClassName,tr=ot.expandedRowClassName,Wt=ot.indentSize,Bt=ot.expandIcon,Nr=ot.expandedRowRender,dn=ot.expandIconColumnIndex,Er=s.useState(!1),qn=Object(p.a)(Er,2),vt=qn[0],Ct=qn[1],mt=Ae&&Ae.has(Me.recordKey);s.useEffect(function(){mt&&Ct(!0)},[mt]);var mr=Rt==="row"&&(!we||we(et)),wr=Rt==="nest",It=Ge&&et&&et[Ge],_t=mr||wr,vr;ce&&(vr=ce(et,Ue));var un=function(Ot){if(Vt&&_t&&Tt(et,Ot),vr&&vr.onClick){for(var cn,ut=arguments.length,Lr=new Array(ut>1?ut-1:0),fr=1;fr<ut;fr++)Lr[fr-1]=arguments[fr];(cn=vr).onClick.apply(cn,[Ot].concat(Lr))}},jr;typeof dr=="string"?jr=dr:typeof dr=="function"&&(jr=dr(et,Ue,_e));var ct=Object(T.a)(kt),Dt=s.createElement(Le,Object.assign({},vr,{"data-row-key":Ve,className:v()(Ce,"".concat(at,"-row"),"".concat(at,"-row-level-").concat(_e),jr,vr&&vr.className),style:Object(c.a)(Object(c.a)({},Xe),vr?vr.style:null),onClick:un}),kt.map(function(Hr,Ot){var cn=Hr.render,ut=Hr.dataIndex,Lr=Hr.className,fr=ct[Ot],ea=it[Ot],Sn;Ot===(dn||0)&&wr&&(Sn=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(Wt*_e,"px")},className:"".concat(at,"-row-indent indent-level-").concat(_e)}),Bt({prefixCls:at,expanded:mt,expandable:It,record:et,onExpand:Tt})));var bn;return Hr.onCell&&(bn=Hr.onCell(et,Ue)),s.createElement(n.a,Object.assign({className:Lr,ellipsis:Hr.ellipsis,align:Hr.align,component:Re,prefixCls:at,key:fr,record:et,index:Ue,dataIndex:ut,render:cn,shouldCellUpdate:Hr.shouldCellUpdate},ea,{appendNode:Sn,additionalProps:bn}))})),Yr;if(mr&&(vt||mt)){var nn=Nr(et,Ue,_e+1,mt),An=tr&&tr(et,Ue,_e);Yr=s.createElement(K,{expanded:mt,className:v()("".concat(at,"-expanded-row"),"".concat(at,"-expanded-row-level-").concat(_e+1),An),prefixCls:at,fixHeader:yt,fixColumn:wt,horizonScroll:ft,component:Le,componentWidth:jt,cellComponent:Re,colSpan:kt.length},nn)}var fn;return It&&mt&&(fn=(et[Ge]||[]).map(function(Hr,Ot){var cn=Pe(Hr,Ot);return s.createElement(F,Object.assign({},Me,{key:cn,rowKey:cn,record:Hr,recordKey:cn,index:Ot,indent:_e+1}))})),s.createElement(s.Fragment,null,Dt,Yr,fn)}F.displayName="BodyRow";var H=F,W=s.createContext(null),Q=W;function ee(Me){var Ce=Me.columnKey,Xe=Me.onColumnResize,et=s.useRef();return s.useEffect(function(){et.current&&Xe(Ce,et.current.offsetWidth)},[]),s.createElement(h.a,{onResize:function(Ve){var Pe=Ve.offsetWidth;Xe(Ce,Pe)}},s.createElement("td",{ref:et,style:{padding:0,border:0,height:0}},s.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function q(Me){var Ce=Me.data,Xe=Me.getRowKey,et=Me.measureColumnWidth,Ue=Me.expandedKeys,Ve=Me.onRow,Pe=Me.rowExpandable,we=Me.emptyNode,Ae=Me.childrenColumnName,ce=s.useContext(Q),xe=ce.onColumnResize,_e=s.useContext(l.a),Le=_e.prefixCls,Re=_e.getComponent,Ge=s.useContext(G),Ye=Ge.fixHeader,at=Ge.horizonScroll,it=Ge.flattenColumns,ot=Ge.componentWidth;return s.useMemo(function(){var yt=Re(["body","wrapper"],"tbody"),wt=Re(["body","row"],"tr"),ft=Re(["body","cell"],"td"),jt;Ce.length?jt=Ce.map(function(Rt,Vt){var Tt=Xe(Rt,Vt);return s.createElement(H,{key:Tt,rowKey:Tt,record:Rt,recordKey:Tt,index:Vt,rowComponent:wt,cellComponent:ft,expandedKeys:Ue,onRow:Ve,getRowKey:Xe,rowExpandable:Pe,childrenColumnName:Ae})}):jt=s.createElement(K,{expanded:!0,className:"".concat(Le,"-placeholder"),prefixCls:Le,fixHeader:Ye,fixColumn:at,horizonScroll:at,component:wt,componentWidth:ot,cellComponent:ft,colSpan:it.length},we);var kt=Object(T.a)(it);return s.createElement(yt,{className:"".concat(Le,"-tbody")},et&&s.createElement("tr",{"aria-hidden":"true",className:"".concat(Le,"-measure-row"),style:{height:0}},kt.map(function(Rt){return s.createElement(ee,{key:Rt,columnKey:Rt,onColumnResize:xe})})),jt)},[Ce,Le,Ve,et,Ue,Xe,Re,ot,we,it])}var pe=s.memo(q);pe.displayName="Body";var ye=pe,ie=k("wRmb"),Se=k("xEkU"),ge=k.n(Se);function oe(Me){var Ce=Object(s.useRef)(Me),Xe=Object(s.useState)({}),et=Object(p.a)(Xe,2),Ue=et[1],Ve=Object(s.useRef)(null),Pe=Object(s.useRef)([]);function we(Ae){Ve.current===null&&(Pe.current=[],Ve.current=ge()(function(){Pe.current.forEach(function(ce){Ce.current=ce(Ce.current)}),Ve.current=null,Ue({})})),Pe.current.push(Ae)}return Object(s.useEffect)(function(){return function(){ge.a.cancel(Ve.current)}},[]),[Ce.current,we]}function le(Me){var Ce=Object(s.useRef)(Me),Xe=Object(s.useRef)(null);function et(){window.clearTimeout(Xe.current)}function Ue(Pe){Ce.current=Pe,et(),Xe.current=window.setTimeout(function(){Ce.current=null,Xe.current=null},100)}function Ve(){return Ce.current}return Object(s.useEffect)(function(){return et},[]),[Ue,Ve]}function te(Me,Ce,Xe){var et=Object(s.useMemo)(function(){for(var Ue=[],Ve=[],Pe=0,we=0,Ae=0;Ae<Ce;Ae+=1)if(Xe==="rtl"){Ve[Ae]=we,we+=Me[Ae]||0;var ce=Ce-Ae-1;Ue[ce]=Pe,Pe+=Me[ce]||0}else{Ue[Ae]=Pe,Pe+=Me[Ae]||0;var xe=Ce-Ae-1;Ve[xe]=we,we+=Me[xe]||0}return{left:Ue,right:Ve}},[Me,Ce,Xe]);return et}var be=te;function Z(Me){var Ce=Me.className,Xe=Me.children;return s.createElement("div",{className:Ce},Xe)}var ae=Z,Ee=k("n6Qo");function ne(Me){var Ce,Xe=Me.prefixCls,et=Me.record,Ue=Me.onExpand,Ve=Me.expanded,Pe=Me.expandable,we="".concat(Xe,"-row-expand-icon");if(!Pe)return s.createElement("span",{className:v()(we,"".concat(Xe,"-row-spaced"))});var Ae=function(xe){Ue(et,xe),xe.stopPropagation()};return s.createElement("span",{className:v()(we,(Ce={},Object(P.a)(Ce,"".concat(Xe,"-row-expanded"),Ve),Object(P.a)(Ce,"".concat(Xe,"-row-collapsed"),!Ve),Ce)),onClick:Ae})}function J(Me,Ce,Xe){var et=[];function Ue(Ve){(Ve||[]).forEach(function(Pe,we){et.push(Ce(Pe,we)),Ue(Pe[Xe])})}return Ue(Me),et}var X=k("zT1h"),Y=k("y0+3"),he=function(Ce,Xe){var et,Ue,Ve=Ce.scrollBodyRef,Pe=Ce.onScroll,we=Ce.offsetScroll,Ae=s.useContext(l.a),ce=Ae.prefixCls,xe=((et=Ve.current)===null||et===void 0?void 0:et.scrollWidth)||0,_e=((Ue=Ve.current)===null||Ue===void 0?void 0:Ue.clientWidth)||0,Le=xe&&_e*(_e/xe),Re=s.useRef(),Ge=oe({scrollLeft:0,isHiddenScrollBar:!1}),Ye=Object(p.a)(Ge,2),at=Ye[0],it=Ye[1],ot=s.useRef({delta:0,x:0}),yt=s.useState(!1),wt=Object(p.a)(yt,2),ft=wt[0],jt=wt[1],kt=function(){jt(!1)},Rt=function(Wt){Wt.persist(),ot.current.delta=Wt.pageX-at.scrollLeft,ot.current.x=0,jt(!0),Wt.preventDefault()},Vt=function(Wt){var Bt,Nr=Wt||((Bt=window)===null||Bt===void 0?void 0:Bt.event),dn=Nr.buttons;if(!ft||dn===0){ft&&jt(!1);return}var Er=ot.current.x+Wt.pageX-ot.current.x-ot.current.delta;Er<=0&&(Er=0),Er+Le>=_e&&(Er=_e-Le),Pe({scrollLeft:Er/_e*(xe+2)}),ot.current.x=Wt.pageX},Tt=function(){var Wt=Object(Y.b)(Ve.current).top,Bt=Wt+Ve.current.offsetHeight,Nr=document.documentElement.scrollTop+window.innerHeight;Bt-Object(y.a)()<=Nr||Wt>=Nr-we?it(function(dn){return Object(c.a)(Object(c.a)({},dn),{},{isHiddenScrollBar:!0})}):it(function(dn){return Object(c.a)(Object(c.a)({},dn),{},{isHiddenScrollBar:!1})})},dr=function(Wt){it(function(Bt){return Object(c.a)(Object(c.a)({},Bt),{},{scrollLeft:Wt/xe*_e||0})})};return s.useImperativeHandle(Xe,function(){return{setScrollLeft:dr}}),s.useEffect(function(){var tr=Object(X.a)(document.body,"mouseup",kt,!1),Wt=Object(X.a)(document.body,"mousemove",Vt,!1);return Tt(),function(){tr.remove(),Wt.remove()}},[Le,ft]),s.useEffect(function(){var tr=Object(X.a)(window,"scroll",Tt,!1),Wt=Object(X.a)(window,"resize",Tt,!1);return function(){tr.remove(),Wt.remove()}},[]),s.useEffect(function(){at.isHiddenScrollBar||it(function(tr){var Wt,Bt;return Object(c.a)(Object(c.a)({},tr),{},{scrollLeft:Ve.current.scrollLeft/((Wt=Ve.current)===null||Wt===void 0?void 0:Wt.scrollWidth)*((Bt=Ve.current)===null||Bt===void 0?void 0:Bt.clientWidth)})})},[at.isHiddenScrollBar]),xe<=_e||!Le||at.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(y.a)(),width:_e,bottom:we},className:"".concat(ce,"-sticky-scroll")},s.createElement("div",{onMouseDown:Rt,ref:Re,className:v()("".concat(ce,"-sticky-scroll-bar"),Object(P.a)({},"".concat(ce,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(Le,"px"),transform:"translate3d(".concat(at.scrollLeft,"px, 0, 0)")}}))},de=s.forwardRef(he);function Te(Me,Ce){return s.useMemo(function(){var Xe=!!Me;return{isSticky:Xe,stickyClassName:Xe?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(D.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(D.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Ce])}var ze=[],Ze={},Je="rc-table-internal-hook",$e=s.memo(function(Me){var Ce=Me.children;return Ce},function(Me,Ce){return i()(Me.props,Ce.props)?Me.pingLeft!==Ce.pingLeft||Me.pingRight!==Ce.pingRight:!1});function tt(Me){var Ce,Xe=Me.prefixCls,et=Me.className,Ue=Me.rowClassName,Ve=Me.style,Pe=Me.data,we=Me.rowKey,Ae=Me.scroll,ce=Me.tableLayout,xe=Me.direction,_e=Me.title,Le=Me.footer,Re=Me.summary,Ge=Me.id,Ye=Me.showHeader,at=Me.components,it=Me.emptyText,ot=Me.onRow,yt=Me.onHeaderRow,wt=Me.internalHooks,ft=Me.transformColumns,jt=Me.internalRefs,kt=Me.sticky,Rt=Pe||ze,Vt=!!Rt.length,Tt=s.useState(0),dr=Object(p.a)(Tt,2),tr=dr[0],Wt=dr[1];s.useEffect(function(){Wt(Object(y.a)())});var Bt=s.useMemo(function(){return Object(T.c)(at,{})},[at]),Nr=s.useCallback(function(Ar,gr){return Object(T.b)(Bt,Ar)||gr},[Bt]),dn=s.useMemo(function(){return typeof we=="function"?we:function(Ar){var gr=Ar&&Ar[we];return gr}},[we]),Er=Object(x.c)(Me),qn=Er.expandIcon,vt=Er.expandedRowKeys,Ct=Er.defaultExpandedRowKeys,mt=Er.defaultExpandAllRows,mr=Er.expandedRowRender,wr=Er.onExpand,It=Er.onExpandedRowsChange,_t=Er.expandRowByClick,vr=Er.rowExpandable,un=Er.expandIconColumnIndex,jr=Er.expandedRowClassName,ct=Er.childrenColumnName,Dt=Er.indentSize,Yr=qn||ne,nn=ct||"children",An=s.useMemo(function(){return mr?"row":Me.expandable&&wt===Je&&Me.expandable.__PARENT_RENDER_ICON__||Rt.some(function(Ar){return Ar&&Object(D.a)(Ar)==="object"&&Ar[nn]})?"nest":!1},[!!mr,Rt]),fn=s.useState(function(){return Ct||(mt?J(Rt,dn,nn):[])}),Hr=Object(p.a)(fn,2),Ot=Hr[0],cn=Hr[1],ut=s.useMemo(function(){return new Set(vt||Ot||[])},[vt,Ot]),Lr=s.useCallback(function(Ar){var gr=dn(Ar,Rt.indexOf(Ar)),lr,ia=ut.has(gr);ia?(ut.delete(gr),lr=Object(_.a)(ut)):lr=[].concat(Object(_.a)(ut),[gr]),cn(lr),wr&&wr(!ia,Ar),It&&It(lr)},[dn,ut,Rt,wr,It]),fr=s.useState(0),ea=Object(p.a)(fr,2),Sn=ea[0],bn=ea[1],da=Object(ie.b)(Object(c.a)(Object(c.a)(Object(c.a)({},Me),Er),{},{expandable:!!mr,expandedKeys:ut,getRowKey:dn,onTriggerExpand:Lr,expandIcon:Yr,expandIconColumnIndex:un,direction:xe}),wt===Je?ft:null),ta=Object(p.a)(da,2),an=ta[0],Fr=ta[1],fa=s.useMemo(function(){return{columns:an,flattenColumns:Fr}},[an,Fr]),hn=s.useRef(),Br=s.useRef(),ar=s.useRef(),en=s.useState(!1),$t=Object(p.a)(en,2),Ft=$t[0],Jt=$t[1],Tr=s.useState(!1),kr=Object(p.a)(Tr,2),Kr=kr[0],xn=kr[1],li=oe(new Map),Ya=Object(p.a)(li,2),$a=Ya[0],_a=Ya[1],pn=Object(T.a)(Fr),Ka=pn.map(function(Ar){return $a.get(Ar)}),$r=s.useMemo(function(){return Ka},[Ka.join("_")]),ra=be($r,Fr.length,xe),Pn=Ae&&Object(T.d)(Ae.y),on=Ae&&Object(T.d)(Ae.x),Cn=on&&Fr.some(function(Ar){var gr=Ar.fixed;return gr}),ha=s.useRef(),Hn=Te(kt,Xe),Kn=Hn.isSticky,Ma=Hn.offsetHeader,Pa=Hn.offsetScroll,zn=Hn.stickyClassName,Na,pa,ma;Pn&&(pa={overflowY:"scroll",maxHeight:Ae.y}),on&&(Na={overflowX:"auto"},Pn||(pa={overflowY:"hidden"}),ma={width:Ae.x===!0?"auto":Ae.x,minWidth:"100%"});var Gn=s.useCallback(function(Ar,gr){_a(function(lr){var ia=new Map(lr);return ia.set(Ar,gr),ia})},[]),Xn=le(null),ka=Object(p.a)(Xn,2),na=ka[0],va=ka[1];function ja(Ar,gr){if(!gr)return;typeof gr=="function"?gr(Ar):gr.scrollLeft!==Ar&&(gr.scrollLeft=Ar)}var aa=function(gr){var lr=gr.currentTarget,ia=gr.scrollLeft,za=typeof ia=="number"?ia:lr.scrollLeft,Ga=lr||Ze;if(!va()||va()===Ga){var Gt;na(Ga),ja(za,Br.current),ja(za,ar.current),ja(za,(Gt=ha.current)===null||Gt===void 0?void 0:Gt.setScrollLeft)}if(lr){var St=lr.scrollWidth,Qt=lr.clientWidth;Jt(za>0),xn(za<St-Qt)}},Mr=function(){ar.current&&aa({currentTarget:ar.current})},Lt=function(gr){var lr=gr.width;Mr(),bn(hn.current?hn.current.offsetWidth:lr)};s.useEffect(function(){return Mr},[]),s.useEffect(function(){on&&Mr()},[on]),s.useEffect(function(){wt===Je&&jt&&(jt.body.current=ar.current)});var zt=Nr(["table"],"table"),Pt=s.useMemo(function(){return ce||(Cn?Ae.x==="max-content"?"auto":"fixed":Pn||Fr.some(function(Ar){var gr=Ar.ellipsis;return gr})?"fixed":"auto")},[Pn,Cn,Fr,ce]),Zt,hr={colWidths:$r,columCount:Fr.length,stickyOffsets:ra,onHeaderRow:yt,fixHeader:Pn},_r=s.useMemo(function(){return Vt?null:typeof it=="function"?it():it},[Vt,it]),sr=s.createElement(ye,{data:Rt,measureColumnWidth:Pn||on||Kn,expandedKeys:ut,rowExpandable:vr,getRowKey:dn,onRow:ot,emptyNode:_r,childrenColumnName:nn}),Jr=s.createElement(C,{colWidths:Fr.map(function(Ar){var gr=Ar.width;return gr}),columns:Fr}),Un=Re&&s.createElement(Ee.b,null,Re(Rt)),nr=Nr(["body"]);if(Pn||Kn){var ga;typeof nr=="function"?(ga=nr(Rt,{scrollbarSize:tr,ref:ar,onScroll:aa}),hr.colWidths=Fr.map(function(Ar,gr){var lr=Ar.width,ia=gr===an.length-1?lr-tr:lr;return typeof ia=="number"&&!Number.isNaN(ia)?ia:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ga=s.createElement("div",{style:Object(c.a)(Object(c.a)({},Na),pa),onScroll:aa,ref:ar,className:v()("".concat(Xe,"-body"))},s.createElement(zt,{style:Object(c.a)(Object(c.a)({},ma),{},{tableLayout:Pt})},Jr,sr,Un),Kn&&s.createElement(de,{ref:ha,offsetScroll:Pa,scrollBodyRef:ar,onScroll:aa})),Zt=s.createElement(s.Fragment,null,Ye!==!1&&s.createElement(M,Object.assign({noData:!Rt.length},hr,fa,{direction:xe,offsetHeader:Ma,stickyClassName:zn,ref:Br,onScroll:aa})),ga)}else Zt=s.createElement("div",{style:Object(c.a)(Object(c.a)({},Na),pa),className:v()("".concat(Xe,"-content")),onScroll:aa,ref:ar},s.createElement(zt,{style:Object(c.a)(Object(c.a)({},ma),{},{tableLayout:Pt})},Jr,Ye!==!1&&s.createElement(f,Object.assign({},hr,fa)),sr,Un));var Or=Object(x.b)(Me),_n=s.createElement("div",Object.assign({className:v()(Xe,et,(Ce={},Object(P.a)(Ce,"".concat(Xe,"-rtl"),xe==="rtl"),Object(P.a)(Ce,"".concat(Xe,"-ping-left"),Ft),Object(P.a)(Ce,"".concat(Xe,"-ping-right"),Kr),Object(P.a)(Ce,"".concat(Xe,"-layout-fixed"),ce==="fixed"),Object(P.a)(Ce,"".concat(Xe,"-fixed-header"),Pn),Object(P.a)(Ce,"".concat(Xe,"-fixed-column"),Cn),Object(P.a)(Ce,"".concat(Xe,"-scroll-horizontal"),on),Object(P.a)(Ce,"".concat(Xe,"-has-fix-left"),Fr[0]&&Fr[0].fixed),Object(P.a)(Ce,"".concat(Xe,"-has-fix-right"),Fr[Fr.length-1]&&Fr[Fr.length-1].fixed==="right"),Ce)),style:Ve,id:Ge,ref:hn},Or),s.createElement($e,{pingLeft:Ft,pingRight:Kr,props:Object(c.a)(Object(c.a)({},Me),{},{stickyOffsets:ra,mergedExpandedKeys:ut})},_e&&s.createElement(ae,{className:"".concat(Xe,"-title")},_e(Rt)),s.createElement("div",{className:"".concat(Xe,"-container")},Zt),Le&&s.createElement(ae,{className:"".concat(Xe,"-footer")},Le(Rt))));on&&(_n=s.createElement(h.a,{onResize:Lt},_n));var Rn=s.useMemo(function(){return{prefixCls:Xe,getComponent:Nr,scrollbarSize:tr,direction:xe,fixedInfoList:Fr.map(function(Ar,gr){return u(gr,gr,Fr,ra,xe)}),isSticky:Kn}},[Xe,Nr,tr,xe,Fr,ra,xe,Kn]),la=s.useMemo(function(){return Object(c.a)(Object(c.a)({},fa),{},{tableLayout:Pt,rowClassName:Ue,expandedRowClassName:jr,componentWidth:Sn,fixHeader:Pn,fixColumn:Cn,horizonScroll:on,expandIcon:Yr,expandableType:An,expandRowByClick:_t,expandedRowRender:mr,onTriggerExpand:Lr,expandIconColumnIndex:un,indentSize:Dt})},[fa,Pt,Ue,jr,Sn,Pn,Cn,on,Yr,An,_t,mr,Lr,un,Dt]),ui=s.useMemo(function(){return{onColumnResize:Gn}},[Gn]);return s.createElement(l.a.Provider,{value:Rn},s.createElement(G.Provider,{value:la},s.createElement(Q.Provider,{value:ui},_n)))}tt.Column=w.a,tt.ColumnGroup=g.a,tt.Summary=Ee.a,tt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var nt=$.b=tt},wRmb:function(N,$,k){"use strict";k.d($,"a",function(){return i});var P=k("rePB"),c=k("KQm4"),_=k("VTBJ"),D=k("Ff2n"),p=k("cDcd"),s=k.n(p),S=k("Kwbf"),v=k("Zm9Q"),o=k("hW8S");function i(w){return Object(v.a)(w).filter(function(m){return p.isValidElement(m)}).map(function(m){var d=m.key,n=m.props,l=n.children,u=Object(D.a)(n,["children"]),T=Object(_.a)({key:d},u);return l&&(T.children=i(l)),T})}function r(w){return w.reduce(function(m,d){var n=d.fixed,l=n===!0?"left":n,u=d.children;return u&&u.length>0?[].concat(Object(c.a)(m),Object(c.a)(r(u).map(function(T){return Object(_.a)({fixed:l},T)}))):[].concat(Object(c.a)(m),[Object(_.a)(Object(_.a)({},d),{},{fixed:l})])},[])}function h(w){for(var m=!0,d=0;d<w.length;d+=1){var n=w[d];if(m&&n.fixed!=="left")m=!1;else if(!m&&n.fixed==="left"){Object(S.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,u=w.length-1;u>=0;u-=1){var T=w[u];if(l&&T.fixed!=="right")l=!1;else if(!l&&T.fixed==="right"){Object(S.a)(!1,"Index ".concat(u+1," of `columns` missing `fixed='right'` prop."));break}}}function y(w){return w.map(function(m){var d=m.fixed,n=Object(D.a)(m,["fixed"]),l=d;return d==="left"?l="right":d==="right"&&(l="left"),Object(_.a)({fixed:l},n)})}function g(w,m){var d=w.prefixCls,n=w.columns,l=w.children,u=w.expandable,T=w.expandedKeys,E=w.getRowKey,a=w.onTriggerExpand,L=w.expandIcon,O=w.rowExpandable,f=w.expandIconColumnIndex,x=w.direction,b=w.expandRowByClick,C=p.useMemo(function(){return n||i(l)},[n,l]),I=p.useMemo(function(){if(u){var z,G=f||0,B=C[G],K=(z={},Object(P.a)(z,o.a,{className:"".concat(d,"-expand-icon-col")}),Object(P.a)(z,"title",""),Object(P.a)(z,"fixed",B?B.fixed:null),Object(P.a)(z,"className","".concat(d,"-row-expand-icon-cell")),Object(P.a)(z,"render",function(W,Q,ee){var q=E(Q,ee),pe=T.has(q),ye=O?O(Q):!0,ie=L({prefixCls:d,expanded:pe,expandable:ye,record:Q,onExpand:a});return b?p.createElement("span",{onClick:function(ge){return ge.stopPropagation()}},ie):ie}),z),F=C.slice();return G>=0&&F.splice(G,0,K),F}return C},[u,C,E,T,L,x]),j=p.useMemo(function(){var z=I;return m&&(z=m(z)),z.length||(z=[{render:function(){return null}}]),z},[m,I,x]),M=p.useMemo(function(){return x==="rtl"?y(r(j)):r(j)},[j,x]);return[j,M]}$.b=g},wZgz:function(N,$,k){(function(P,c,_){N.exports=$=c(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.BlockCipher,p=c.algo,s=[],S=[],v=[],o=[],i=[],r=[],h=[],y=[],g=[],w=[];(function(){for(var n=[],l=0;l<256;l++)l<128?n[l]=l<<1:n[l]=l<<1^283;for(var u=0,T=0,l=0;l<256;l++){var E=T^T<<1^T<<2^T<<3^T<<4;E=E>>>8^E&255^99,s[u]=E,S[E]=u;var a=n[u],L=n[a],O=n[L],f=n[E]*257^E*16843008;v[u]=f<<24|f>>>8,o[u]=f<<16|f>>>16,i[u]=f<<8|f>>>24,r[u]=f;var f=O*16843009^L*65537^a*257^u*16843008;h[E]=f<<24|f>>>8,y[E]=f<<16|f>>>16,g[E]=f<<8|f>>>24,w[E]=f,u?(u=a^n[n[n[O^a]]],T^=n[n[T]]):u=T=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],d=p.AES=D.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var l=this._keyPriorReset=this._key,u=l.words,T=l.sigBytes/4,E=this._nRounds=T+6,a=(E+1)*4,L=this._keySchedule=[],O=0;O<a;O++)O<T?L[O]=u[O]:(n=L[O-1],O%T?T>6&&O%T==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[n&255]):(n=n<<8|n>>>24,n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[n&255],n^=m[O/T|0]<<24),L[O]=L[O-T]^n);for(var f=this._invKeySchedule=[],x=0;x<a;x++){var O=a-x;if(x%4)var n=L[O];else var n=L[O-4];x<4||O<=4?f[x]=n:f[x]=h[s[n>>>24]]^y[s[n>>>16&255]]^g[s[n>>>8&255]]^w[s[n&255]]}},encryptBlock:function(n,l){this._doCryptBlock(n,l,this._keySchedule,v,o,i,r,s)},decryptBlock:function(n,l){var u=n[l+1];n[l+1]=n[l+3],n[l+3]=u,this._doCryptBlock(n,l,this._invKeySchedule,h,y,g,w,S);var u=n[l+1];n[l+1]=n[l+3],n[l+3]=u},_doCryptBlock:function(n,l,u,T,E,a,L,O){for(var f=this._nRounds,x=n[l]^u[0],b=n[l+1]^u[1],C=n[l+2]^u[2],I=n[l+3]^u[3],j=4,M=1;M<f;M++){var z=T[x>>>24]^E[b>>>16&255]^a[C>>>8&255]^L[I&255]^u[j++],G=T[b>>>24]^E[C>>>16&255]^a[I>>>8&255]^L[x&255]^u[j++],B=T[C>>>24]^E[I>>>16&255]^a[x>>>8&255]^L[b&255]^u[j++],K=T[I>>>24]^E[x>>>16&255]^a[b>>>8&255]^L[C&255]^u[j++];x=z,b=G,C=B,I=K}var z=(O[x>>>24]<<24|O[b>>>16&255]<<16|O[C>>>8&255]<<8|O[I&255])^u[j++],G=(O[b>>>24]<<24|O[C>>>16&255]<<16|O[I>>>8&255]<<8|O[x&255])^u[j++],B=(O[C>>>24]<<24|O[I>>>16&255]<<16|O[x>>>8&255]<<8|O[b&255])^u[j++],K=(O[I>>>24]<<24|O[x>>>16&255]<<16|O[b>>>8&255]<<8|O[C&255])^u[j++];n[l]=z,n[l+1]=G,n[l+2]=B,n[l+3]=K},keySize:256/32});c.AES=D._createHelper(d)}(),P.AES})},wbyO:function(N,$,k){(function(P,c){N.exports=$=c(k("Ib8C"))})(this,function(P){return function(){var c=P,_=c.lib,D=_.WordArray,p=c.enc,s=p.Base64url={stringify:function(v,o=!0){var i=v.words,r=v.sigBytes,h=o?this._safe_map:this._map;v.clamp();for(var y=[],g=0;g<r;g+=3)for(var w=i[g>>>2]>>>24-g%4*8&255,m=i[g+1>>>2]>>>24-(g+1)%4*8&255,d=i[g+2>>>2]>>>24-(g+2)%4*8&255,n=w<<16|m<<8|d,l=0;l<4&&g+l*.75<r;l++)y.push(h.charAt(n>>>6*(3-l)&63));var u=h.charAt(64);if(u)for(;y.length%4;)y.push(u);return y.join("")},parse:function(v,o=!0){var i=v.length,r=o?this._safe_map:this._map,h=this._reverseMap;if(!h){h=this._reverseMap=[];for(var y=0;y<r.length;y++)h[r.charCodeAt(y)]=y}var g=r.charAt(64);if(g){var w=v.indexOf(g);w!==-1&&(i=w)}return S(v,i,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(v,o,i){for(var r=[],h=0,y=0;y<o;y++)if(y%4){var g=i[v.charCodeAt(y-1)]<<y%4*2,w=i[v.charCodeAt(y)]>>>6-y%4*2,m=g|w;r[h>>>2]|=m<<24-h%4*8,h++}return D.create(r,h)}}(),P.enc.Base64url})},"y0+3":function(N,$,k){"use strict";k.d($,"a",function(){return r}),k.d($,"b",function(){return y});var P=/margin|padding|width|height|max|min|offset/,c={left:!0,top:!0},_={cssFloat:1,styleFloat:1,float:1};function D(g){return g.nodeType===1?g.ownerDocument.defaultView.getComputedStyle(g,null):{}}function p(g,w,m){if(w=w.toLowerCase(),m==="auto"){if(w==="height")return g.offsetHeight;if(w==="width")return g.offsetWidth}return w in c||(c[w]=P.test(w)),c[w]?parseFloat(m)||0:m}function s(g,w){var m=arguments.length,d=D(g);return w=_[w]?"cssFloat"in g.style?"cssFloat":"styleFloat":w,m===1?d:p(g,w,d[w]||g.style[w])}function S(g,w,m){var d=arguments.length;if(w=_[w]?"cssFloat"in g.style?"cssFloat":"styleFloat":w,d===3)return typeof m=="number"&&P.test(w)&&(m="".concat(m,"px")),g.style[w]=m,m;for(var n in w)w.hasOwnProperty(n)&&S(g,n,w[n]);return D(g)}function v(g){return g===document.body?document.documentElement.clientWidth:g.offsetWidth}function o(g){return g===document.body?window.innerHeight||document.documentElement.clientHeight:g.offsetHeight}function i(){var g=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),w=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:g,height:w}}function r(){var g=document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight;return{width:g,height:w}}function h(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function y(g){var w=g.getBoundingClientRect(),m=document.documentElement;return{left:w.left+(window.pageXOffset||m.scrollLeft)-(m.clientLeft||document.body.clientLeft||0),top:w.top+(window.pageYOffset||m.scrollTop)-(m.clientTop||document.body.clientTop||0)}}},ynwM:function(N,$,k){var P=k("MFOe"),c=P.Global;N.exports={name:"oldFF-globalStorage",read:D,write:p,each:s,remove:S,clearAll:v};var _=c.globalStorage;function D(o){return _[o]}function p(o,i){_[o]=i}function s(o){for(var i=_.length-1;i>=0;i--){var r=_.key(i);o(_[r],r)}}function S(o){return _.removeItem(o)}function v(){s(function(o,i){delete _[o]})}}}]);
|