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

234 lines
1.4 MiB

This file contains invisible Unicode characters!

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[183,5,6,7,9,10],{"+NIl":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(u,C){"use strict";function R(m,w){m.cmdState.push(w)}function h(m){return m.cmdState.length>0?m.cmdState[m.cmdState.length-1]:null}function s(m){var w=m.cmdState.pop();w&&w.closeBracket()}function S(m){for(var w=m.cmdState,p=w.length-1;p>=0;p--){var d=w[p];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function f(m,w,p){return function(){this.name=m,this.bracketNo=0,this.style=w,this.styles=p,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};a.importmodule=f("importmodule","tag",["string","builtin"]),a.documentclass=f("documentclass","tag",["","atom"]),a.usepackage=f("usepackage","tag",["atom"]),a.begin=f("begin","tag",["atom"]),a.end=f("end","tag",["atom"]),a.label=f("label","tag",["atom"]),a.ref=f("ref","tag",["atom"]),a.eqref=f("eqref","tag",["atom"]),a.cite=f("cite","tag",["atom"]),a.bibitem=f("bibitem","tag",["atom"]),a.Bibitem=f("Bibitem","tag",["atom"]),a.RBibitem=f("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function o(m,w){m.f=w}function r(m,w){var p;if(m.match(/^\\[a-zA-Z@]+/)){var d=m.current().slice(1);return p=a.hasOwnProperty(d)?a[d]:a.DEFAULT,p=new p,R(w,p),o(w,g),p.style}if(m.match(/^\\[$&%#{}_]/))return"tag";if(m.match(/^\\[,;!\/\\]/))return"tag";if(m.match("\\["))return o(w,function(l,c){return x(l,c,"\\]")}),"keyword";if(m.match("\\("))return o(w,function(l,c){return x(l,c,"\\)")}),"keyword";if(m.match("$$"))return o(w,function(l,c){return x(l,c,"$$")}),"keyword";if(m.match("$"))return o(w,function(l,c){return x(l,c,"$")}),"keyword";var n=m.next();if(n=="%")return m.skipToEnd(),"comment";if(n=="}"||n=="]"){if(p=h(w),p)p.closeBracket(n),o(w,g);else return"error";return"bracket"}else return n=="{"||n=="["?(p=a.DEFAULT,p=new p,R(w,p),"bracket"):/\d/.test(n)?(m.eatWhile(/[\w.%]/),"atom"):(m.eatWhile(/[\w\-_]/),p=S(w),p.name=="begin"&&(p.argument=m.current()),p.styleIdentifier())}function x(m,w,p){if(m.eatSpace())return null;if(p&&m.match(p))return o(w,r),"keyword";if(m.match(/^\\[a-zA-Z@]+/))return"tag";if(m.match(/^[a-zA-Z]+/))return"variable-2";if(m.match(/^\\[$&%#{}_]/))return"tag";if(m.match(/^\\[,;!\/]/))return"tag";if(m.match(/^[\^_&]/))return"tag";if(m.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(m.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=m.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(m.skipToEnd(),"comment"):"error"}function g(m,w){var p=m.peek(),d;return p=="{"||p=="["?(d=h(w),d.openBracket(p),m.eat(p),o(w,r),"bracket"):/[ \t\r]/.test(p)?(m.eat(p),null):(o(w,r),s(w),r(m,w))}return{startState:function(){var m=C.inMathMode?function(w,p){return x(w,p)}:r;return{cmdState:[],f:m}},copyState:function(m){return{cmdState:m.cmdState.slice(),f:m.f}},token:function(m,w){return w.f(m,w)},blankLine:function(m){m.f=r,m.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){P.defineOption("placeholder","",function(f,a,o){var r=o&&o!=P.Init;if(a&&!r)f.on("blur",h),f.on("change",s),f.on("swapDoc",s),P.on(f.getInputField(),"compositionupdate",f.state.placeholderCompose=function(){R(f)}),s(f);else if(!a&&r){f.off("blur",h),f.off("change",s),f.off("swapDoc",s),P.off(f.getInputField(),"compositionupdate",f.state.placeholderCompose),u(f);var x=f.getWrapperElement();x.className=x.className.replace(" CodeMirror-empty","")}a&&!f.hasFocus()&&h(f)});function u(f){f.state.placeholder&&(f.state.placeholder.parentNode.removeChild(f.state.placeholder),f.state.placeholder=null)}function C(f){u(f);var a=f.state.placeholder=document.createElement("pre");a.style.cssText="height: 0; overflow: visible",a.style.direction=f.getOption("direction"),a.className="CodeMirror-placeholder CodeMirror-line-like";var o=f.getOption("placeholder");typeof o=="string"&&(o=document.createTextNode(o)),a.appendChild(o),f.display.lineSpace.insertBefore(a,f.display.lineSpace.firstChild)}function R(f){setTimeout(function(){var a=!1,o=f.getInputField();o.nodeName=="TEXTAREA"?a=!o.value:f.lineCount()==1&&(a=!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)),a?C(f):u(f)},20)}function h(f){S(f)&&C(f)}function s(f){var a=f.getWrapperElement(),o=S(f);a.className=a.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?C(f):u(f)}function S(f){return f.lineCount()===1&&f.getLine(0)===""}})},"1T2W":function(N,Y,k){N.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"use strict";var u={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(R,h){var s=R.indentUnit,S={},f=h.htmlMode?u:C;for(var a in f)S[a]=f[a];for(var a in h)S[a]=h[a];var o,r;function x(_,I){function j(K){return I.tokenize=K,K(_,I)}var M=_.next();if(M=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(w("atom","]]>")):null:_.match("--")?j(w("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(p(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),I.tokenize=w("meta","?>"),"meta"):(o=_.eat("/")?"closeTag":"openTag",I.tokenize=g,"tag bracket");if(M=="&"){var G;return _.eat("#")?_.eat("x")?G=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):G=_.eatWhile(/[\d]/)&&_.eat(";"):G=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),G?"atom":"error"}else return _.eatWhile(/[^&<]/),null}x.isInText=!0;function g(_,I){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return I.tokenize=x,o=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return o="equals",null;if(j=="<"){I.tokenize=x,I.state=c,I.tagName=I.tagStart=null;var M=I.tokenize(_,I);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(j)?(I.tokenize=m(j),I.stringStartCol=_.column(),I.tokenize(_,I)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(_){var I=function(j,M){for(;!j.eol();)if(j.next()==_){M.tokenize=g;break}return"string"};return I.isInAttribute=!0,I}function w(_,I){return function(j,M){for(;!j.eol();){if(j.match(I)){M.tokenize=x;break}j.next()}return _}}function p(_){return function(I,j){for(var M;(M=I.next())!=null;){if(M=="<")return j.tokenize=p(_+1),j.tokenize(I,j);if(M==">")if(_==1){j.tokenize=x;break}else return j.tokenize=p(_-1),j.tokenize(I,j)}return"meta"}}function d(_,I,j){this.prev=_.context,this.tagName=I,this.indent=_.indented,this.startOfLine=j,(S.doNotIndent.hasOwnProperty(I)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function n(_){_.context&&(_.context=_.context.prev)}function l(_,I){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!S.contextGrabbers.hasOwnProperty(j)||!S.contextGrabbers[j].hasOwnProperty(I))return;n(_)}}function c(_,I,j){return _=="openTag"?(j.tagStart=I.column(),T):_=="closeTag"?v:c}function T(_,I,j){return _=="word"?(j.tagName=I.current(),r="tag",A):S.allowMissingTagName&&_=="endTag"?(r="tag bracket",A(_,I,j)):(r="error",T)}function v(_,I,j){if(_=="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",i):(r="tag error",L)}else return S.allowMissingTagName&&_=="endTag"?(r="tag bracket",i(_,I,j)):(r="error",L)}function i(_,I,j){return _!="endTag"?(r="error",i):(n(j),c)}function L(_,I,j){return r="error",i(_,I,j)}function A(_,I,j){if(_=="word")return r="attribute",y;if(_=="endTag"||_=="selfcloseTag"){var M=j.tagName,G=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(M)?l(j,M):(l(j,M),j.context=new d(j,M,G==j.indented)),c}return r="error",A}function y(_,I,j){return _=="equals"?E:(S.allowMissing||(r="error"),A(_,I,j))}function E(_,I,j){return _=="string"?b:_=="word"&&S.allowUnquoted?(r="string",A):(r="error",A(_,I,j))}function b(_,I,j){return _=="string"?b:A(_,I,j)}return{startState:function(_){var I={tokenize:x,state:c,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(I.baseIndent=_),I},token:function(_,I){if(!I.tagName&&_.sol()&&(I.indented=_.indentation()),_.eatSpace())return null;o=null;var j=I.tokenize(_,I);return(j||o)&&j!="comment"&&(r=null,I.state=I.state(o||j,_,I),r&&(j=r=="error"?j+" error":r)),j},indent:function(_,I,j){var M=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+s;if(M&&M.noIndent)return P.Pass;if(_.tokenize!=g&&_.tokenize!=x)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return S.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+s*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(I))return 0;var G=I&&/^<(\/)?([\w_:\.-]*)/.exec(I);if(G&&G[1])for(;M;)if(M.tagName==G[2]){M=M.prev;break}else if(S.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(G)for(;M;){var K=S.contextGrabbers[M.tagName];if(K&&K.hasOwnProperty(G[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+s:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(_){_.state==E&&(_.state=A)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var I=[],j=_.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,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("MlIO"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.Hasher,h=u.x64,s=h.Word,S=h.WordArray,f=u.algo;function a(){return s.create.apply(s,arguments)}var o=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],r=[];(function(){for(var g=0;g<80;g++)r[g]=a()})();var x=f.SHA512=R.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(g,m){for(var w=this._hash.words,p=w[0],d=w[1],n=w[2],l=w[3],c=w[4],T=w[5],v=w[6],i=w[7],L=p.high,A=p.low,y=d.high,E=d.low,b=n.high,_=n.low,I=l.high,j=l.low,M=c.high,G=c.low,K=T.high,H=T.low,z=v.high,B=v.low,W=i.high,F=i.low,$=L,ee=A,Z=y,ve=E,he=b,le=_,Re=I,xe=j,ie=M,se=G,re=K,be=H,q=z,ne=B,Te=W,ae=F,J=0;J<80;J++){var X,Q,pe=r[J];if(J<16)Q=pe.high=g[m+J*2]|0,X=pe.low=g[m+J*2+1]|0;else{var ce=r[J-15],we=ce.high,ze=ce.low,Ge=(we>>>1|ze<<31)^(we>>>8|ze<<24)^we>>>7,Qe=(ze>>>1|we<<31)^(ze>>>8|we<<24)^(ze>>>7|we<<25),$e=r[J-2],rt=$e.high,et=$e.low,Me=(rt>>>19|et<<13)^(rt<<3|et>>>29)^rt>>>6,Ce=(et>>>19|rt<<13)^(et<<3|rt>>>29)^(et>>>6|rt<<26),Ve=r[J-7],tt=Ve.high,He=Ve.low,Je=r[J-16],_e=Je.high,Se=Je.low;X=Qe+He,Q=Ge+tt+(X>>>0<Qe>>>0?1:0),X=X+Ce,Q=Q+Me+(X>>>0<Ce>>>0?1:0),X=X+Se,Q=Q+_e+(X>>>0<Se>>>0?1:0),pe.high=Q,pe.low=X}var Oe=ie&re^~ie&q,de=se&be^~se&ne,ye=$&Z^$&he^Z&he,Ee=ee&ve^ee&le^ve&le,De=($>>>28|ee<<4)^($<<30|ee>>>2)^($<<25|ee>>>7),Be=(ee>>>28|$<<4)^(ee<<30|$>>>2)^(ee<<25|$>>>7),Xe=(ie>>>14|se<<18)^(ie>>>18|se<<14)^(ie<<23|se>>>9),nt=(se>>>14|ie<<18)^(se>>>18|ie<<14)^(se<<23|ie>>>9),dt=o[J],Et=dt.high,ft=dt.low,jt=ae+nt,Ct=Te+Xe+(jt>>>0<ae>>>0?1:0),jt=jt+de,Ct=Ct+Oe+(jt>>>0<de>>>0?1:0),jt=jt+ft,Ct=Ct+Et+(jt>>>0<ft>>>0?1:0),jt=jt+X,Ct=Ct+Q+(jt>>>0<X>>>0?1:0),xt=Be+Ee,Yt=De+ye+(xt>>>0<Be>>>0?1:0);Te=q,ae=ne,q=re,ne=be,re=ie,be=se,se=xe+jt|0,ie=Re+Ct+(se>>>0<xe>>>0?1:0)|0,Re=he,xe=le,he=Z,le=ve,Z=$,ve=ee,ee=jt+xt|0,$=Ct+Yt+(ee>>>0<jt>>>0?1:0)|0}A=p.low=A+ee,p.high=L+$+(A>>>0<ee>>>0?1:0),E=d.low=E+ve,d.high=y+Z+(E>>>0<ve>>>0?1:0),_=n.low=_+le,n.high=b+he+(_>>>0<le>>>0?1:0),j=l.low=j+xe,l.high=I+Re+(j>>>0<xe>>>0?1:0),G=c.low=G+se,c.high=M+ie+(G>>>0<se>>>0?1:0),H=T.low=H+be,T.high=K+re+(H>>>0<be>>>0?1:0),B=v.low=B+ne,v.high=z+q+(B>>>0<ne>>>0?1:0),F=i.low=F+ae,i.high=W+Te+(F>>>0<ae>>>0?1:0)},_doFinalize:function(){var g=this._data,m=g.words,w=this._nDataBytes*8,p=g.sigBytes*8;m[p>>>5]|=128<<24-p%32,m[(p+128>>>10<<5)+30]=Math.floor(w/4294967296),m[(p+128>>>10<<5)+31]=w,g.sigBytes=m.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var g=R.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});u.SHA512=R._createHelper(x),u.HmacSHA512=R._createHmacHelper(x)}(),P.SHA512})},"3y9D":function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=C.Hasher,s=u.algo,S=[],f=s.SHA1=h.extend({_doReset:function(){this._hash=new R.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,o){for(var r=this._hash.words,x=r[0],g=r[1],m=r[2],w=r[3],p=r[4],d=0;d<80;d++){if(d<16)S[d]=a[o+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=(x<<5|x>>>27)+p+S[d];d<20?l+=(g&m|~g&w)+1518500249:d<40?l+=(g^m^w)+1859775393:d<60?l+=(g&m|g&w|m&w)-1894007588:l+=(g^m^w)-899497514,p=w,w=m,m=g<<30|g>>>2,g=x,x=l}r[0]=r[0]+x|0,r[1]=r[1]+g|0,r[2]=r[2]+m|0,r[3]=r[3]+w|0,r[4]=r[4]+p|0},_doFinalize:function(){var a=this._data,o=a.words,r=this._nDataBytes*8,x=a.sigBytes*8;return o[x>>>5]|=128<<24-x%32,o[(x+64>>>9<<4)+14]=Math.floor(r/4294967296),o[(x+64>>>9<<4)+15]=r,a.sigBytes=o.length*4,this._process(),this._hash},clone:function(){var a=h.clone.call(this);return a._hash=this._hash.clone(),a}});u.SHA1=h._createHelper(f),u.HmacSHA1=h._createHmacHelper(f)}(),P.SHA1})},4:function(N,Y){},"5hvy":function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("MlIO"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.x64,f=S.Word,a=C.algo,o=[],r=[],x=[];(function(){for(var w=1,p=0,d=0;d<24;d++){o[w+5*p]=(d+1)*(d+2)/2%64;var n=p%5,l=(2*w+3*p)%5;w=n,p=l}for(var w=0;w<5;w++)for(var p=0;p<5;p++)r[w+5*p]=p+(2*w+3*p)%5*5;for(var c=1,T=0;T<24;T++){for(var v=0,i=0,L=0;L<7;L++){if(c&1){var A=(1<<L)-1;A<32?i^=1<<A:v^=1<<A-32}c&128?c=c<<1^113:c<<=1}x[T]=f.create(v,i)}})();var g=[];(function(){for(var w=0;w<25;w++)g[w]=f.create()})();var m=a.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var w=this._state=[],p=0;p<25;p++)w[p]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(w,p){for(var d=this._state,n=this.blockSize/2,l=0;l<n;l++){var c=w[p+2*l],T=w[p+2*l+1];c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var v=d[l];v.high^=T,v.low^=c}for(var i=0;i<24;i++){for(var L=0;L<5;L++){for(var A=0,y=0,E=0;E<5;E++){var v=d[L+5*E];A^=v.high,y^=v.low}var b=g[L];b.high=A,b.low=y}for(var L=0;L<5;L++)for(var _=g[(L+4)%5],I=g[(L+1)%5],j=I.high,M=I.low,A=_.high^(j<<1|M>>>31),y=_.low^(M<<1|j>>>31),E=0;E<5;E++){var v=d[L+5*E];v.high^=A,v.low^=y}for(var G=1;G<25;G++){var A,y,v=d[G],K=v.high,H=v.low,z=o[G];z<32?(A=K<<z|H>>>32-z,y=H<<z|K>>>32-z):(A=H<<z-32|K>>>64-z,y=K<<z-32|H>>>64-z);var B=g[r[G]];B.high=A,B.low=y}var W=g[0],F=d[0];W.high=F.high,W.low=F.low;for(var L=0;L<5;L++)for(var E=0;E<5;E++){var G=L+5*E,v=d[G],$=g[G],ee=g[(L+1)%5+5*E],Z=g[(L+2)%5+5*E];v.high=$.high^~ee.high&Z.high,v.low=$.low^~ee.low&Z.low}var v=d[0],ve=x[i];v.high^=ve.high,v.low^=ve.low}},_doFinalize:function(){var w=this._data,p=w.words,d=this._nDataBytes*8,n=w.sigBytes*8,l=this.blockSize*32;p[n>>>5]|=1<<24-n%32,p[(u.ceil((n+1)/l)*l>>>5)-1]|=128,w.sigBytes=p.length*4,this._process();for(var c=this._state,T=this.cfg.outputLength/8,v=T/8,i=[],L=0;L<v;L++){var A=c[L],y=A.high,E=A.low;y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,i.push(E),i.push(y)}return new h.init(i,T)},clone:function(){for(var w=s.clone.call(this),p=w._state=this._state.slice(0),d=0;d<25;d++)p[d]=p[d].clone();return w}});C.SHA3=s._createHelper(m),C.HmacSHA3=s._createHmacHelper(m)}(Math),P.SHA3})},"5nXd":function(N,Y,k){var P=k("MFOe"),u=P.slice,C=P.pluck,R=P.each,h=P.bind,s=P.create,S=P.isList,f=P.isFunction,a=P.isObject;N.exports={createStore:x};var o={version:"2.0.12",enabled:!1,get:function(g,m){var w=this.storage.read(this._namespacePrefix+g);return this._deserialize(w,m)},set:function(g,m){return m===void 0?this.remove(g):(this.storage.write(this._namespacePrefix+g,this._serialize(m)),m)},remove:function(g){this.storage.remove(this._namespacePrefix+g)},each:function(g){var m=this;this.storage.each(function(w,p){g.call(m,m._deserialize(w),(p||"").replace(m._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(g){return this._namespacePrefix=="__storejs_"+g+"_"},createStore:function(){return x.apply(this,arguments)},addPlugin:function(g){this._addPlugin(g)},namespace:function(g){return x(this.storage,this.plugins,g)}};function r(){var g=typeof console=="undefined"?null:console;if(!g)return;var m=g.warn?g.warn:g.log;m.apply(g,arguments)}function x(g,m,w){w||(w=""),g&&!S(g)&&(g=[g]),m&&!S(m)&&(m=[m]);var p=w?"__storejs_"+w+"_":"",d=w?new RegExp("^"+p):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:p,_namespaceRegexp:d,_testStorage:function(T){try{var v="__storejs__test__";T.write(v,v);var i=T.read(v)===v;return T.remove(v),i}catch(L){return!1}},_assignPluginFnProp:function(T,v){var i=this[v];this[v]=function(){var A=u(arguments,0),y=this;function E(){return i?(R(arguments,function(_,I){A[I]=_}),i.apply(y,A)):void 0}var b=[E].concat(A);return T.apply(y,b)}},_serialize:function(T){return JSON.stringify(T)},_deserialize:function(T,v){if(!T)return v;var i="";try{i=JSON.parse(T)}catch(L){i=T}return i!==void 0?i:v},_addStorage:function(T){if(this.enabled)return;this._testStorage(T)&&(this.storage=T,this.enabled=!0)},_addPlugin:function(T){var v=this;if(S(T)){R(T,function(A){v._addPlugin(A)});return}var i=C(this.plugins,function(A){return T===A});if(i)return;if(this.plugins.push(T),!f(T))throw new Error("Plugins must be function values that return objects");var L=T.call(this);if(!a(L))throw new Error("Plugins must return an object of function properties");R(L,function(A,y){if(!f(A))throw new Error("Bad plugin property: "+y+" from plugin "+T.name+". Plugins should only return functions.");v._assignPluginFnProp(A,y)})},addStorage:function(T){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(T)}},c=s(l,o,{plugins:[]});return c.raw={},R(c,function(T,v){f(T)&&(c.raw[v]=h(c,T))}),R(g,function(T){c._addStorage(T)}),R(m,function(T){c._addPlugin(T)}),c}},"6+eU":function(N,Y,k){"use strict";k.d(Y,"a",function(){return i});var P=k("wx14"),u=k("rePB"),C=k("VTBJ"),R=k("1OyB"),h=k("vuIU"),s=k("Ji7U"),S=k("LK+K"),f=k("q1tI"),a=k.n(f),o=k("TSYQ"),r=k.n(o),x=function(A){var y,E="".concat(A.rootPrefixCls,"-item"),b=r()(E,"".concat(E,"-").concat(A.page),(y={},Object(u.a)(y,"".concat(E,"-active"),A.active),Object(u.a)(y,A.className,!!A.className),Object(u.a)(y,"".concat(E,"-disabled"),!A.page),y)),_=function(){A.onClick(A.page)},I=function(M){A.onKeyPress(M,A.onClick,A.page)};return a.a.createElement("li",{title:A.showTitle?A.page:null,className:b,onClick:_,onKeyPress:I,tabIndex:"0"},A.itemRender(A.page,"page",a.a.createElement("a",{rel:"nofollow"},A.page)))},g=x,m={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)(y,L);var A=Object(S.a)(y);function y(){var E;Object(R.a)(this,y);for(var b=arguments.length,_=new Array(b),I=0;I<b;I++)_[I]=arguments[I];return E=A.call.apply(A,[this].concat(_)),E.state={goInputText:""},E.buildOptionText=function(j){return"".concat(j," ").concat(E.props.locale.items_per_page)},E.changeSize=function(j){E.props.changeSize(Number(j))},E.handleChange=function(j){E.setState({goInputText:j.target.value})},E.handleBlur=function(j){var M=E.props,G=M.goButton,K=M.quickGo,H=M.rootPrefixCls,z=E.state.goInputText;if(G||z==="")return;if(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(H,"-prev"))>=0||j.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;E.setState({goInputText:""}),K(E.getValidValue())},E.go=function(j){var M=E.state.goInputText;if(M==="")return;(j.keyCode===m.ENTER||j.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(h.a)(y,[{key:"getValidValue",value:function(){var b=this.state,_=b.goInputText,I=b.current;return!_||isNaN(_)?I:Number(_)}},{key:"getPageSizeOptions",value:function(){var b=this.props,_=b.pageSize,I=b.pageSizeOptions;return I.some(function(j){return j.toString()===_.toString()})?I:I.concat([_.toString()]).sort(function(j,M){var G=isNaN(Number(j))?0:Number(j),K=isNaN(Number(M))?0:Number(M);return G-K})}},{key:"render",value:function(){var b=this,_=this.props,I=_.pageSize,j=_.locale,M=_.rootPrefixCls,G=_.changeSize,K=_.quickGo,H=_.goButton,z=_.selectComponentClass,B=_.buildOptionText,W=_.selectPrefixCls,F=_.disabled,$=this.state.goInputText,ee="".concat(M,"-options"),Z=z,ve=null,he=null,le=null;if(!G&&!K)return null;var Re=this.getPageSizeOptions();if(G&&Z){var xe=Re.map(function(ie,se){return a.a.createElement(Z.Option,{key:se,value:ie.toString()},(B||b.buildOptionText)(ie))});ve=a.a.createElement(Z,{disabled:F,prefixCls:W,showSearch:!1,className:"".concat(ee,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(I||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode}},xe)}return K&&(H&&(le=typeof H=="boolean"?a.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:F,className:"".concat(ee,"-quick-jumper-button")},j.jump_to_confirm):a.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),he=a.a.createElement("div",{className:"".concat(ee,"-quick-jumper")},j.jump_to,a.a.createElement("input",{disabled:F,type:"text",value:$,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,le)),a.a.createElement("li",{className:"".concat(ee)},ve,he)}}]),y}(a.a.Component);w.defaultProps={pageSizeOptions:["10","20","50","100"]};var p=w,d=k("N2Kk");function n(){}function l(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function c(L,A,y){return y}function T(L,A,y){var E=typeof L=="undefined"?A.pageSize:L;return Math.floor((y.total-1)/E)+1}var v=function(L){Object(s.a)(y,L);var A=Object(S.a)(y);function y(E){var b;Object(R.a)(this,y),b=A.call(this,E),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(G,K){var H=b.props.prefixCls,z=G||a.a.createElement("button",{type:"button","aria-label":K,className:"".concat(H,"-item-link")});return typeof G=="function"&&(z=a.a.createElement(G,Object(C.a)({},b.props))),z},b.savePaginationNode=function(G){b.paginationNode=G},b.isValid=function(G){return l(G)&&G!==b.state.current},b.shouldDisplayQuickJumper=function(){var G=b.props,K=G.showQuickJumper,H=G.pageSize,z=G.total;return z<=H?!1:K},b.handleKeyDown=function(G){(G.keyCode===m.ARROW_UP||G.keyCode===m.ARROW_DOWN)&&G.preventDefault()},b.handleKeyUp=function(G){var K=b.getValidValue(G),H=b.state.currentInputValue;K!==H&&b.setState({currentInputValue:K}),G.keyCode===m.ENTER?b.handleChange(K):G.keyCode===m.ARROW_UP?b.handleChange(K-1):G.keyCode===m.ARROW_DOWN&&b.handleChange(K+1)},b.changePageSize=function(G){var K=b.state.current,H=T(G,b.state,b.props);K=K>H?H:K,H===0&&(K=b.state.current),typeof G=="number"&&("pageSize"in b.props||b.setState({pageSize:G}),"current"in b.props||b.setState({current:K,currentInputValue:K})),b.props.onShowSizeChange(K,G),"onChange"in b.props&&b.props.onChange&&b.props.onChange(K,G)},b.handleChange=function(G){var K=b.props.disabled,H=G;if(b.isValid(H)&&!K){var z=T(void 0,b.state,b.props);H>z?H=z:H<1&&(H=1),"current"in b.props||b.setState({current:H,currentInputValue:H});var B=b.state.pageSize;return b.props.onChange(H,B),H}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(G,K){if(G.key==="Enter"||G.charCode===13){for(var H=arguments.length,z=new Array(H>2?H-2:0),B=2;B<H;B++)z[B-2]=arguments[B];K.apply(void 0,z)}},b.runIfEnterPrev=function(G){b.runIfEnter(G,b.prev)},b.runIfEnterNext=function(G){b.runIfEnter(G,b.next)},b.runIfEnterJumpPrev=function(G){b.runIfEnter(G,b.jumpPrev)},b.runIfEnterJumpNext=function(G){b.runIfEnter(G,b.jumpNext)},b.handleGoTO=function(G){(G.keyCode===m.ENTER||G.type==="click")&&b.handleChange(b.state.currentInputValue)};var _=E.onChange!==n,I="current"in E;I&&!_&&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=E.defaultCurrent;"current"in E&&(j=E.current);var M=E.defaultPageSize;return"pageSize"in E&&(M=E.pageSize),j=Math.min(j,T(M,void 0,E)),b.state={current:j,currentInputValue:j,pageSize:M},b}return Object(h.a)(y,[{key:"componentDidUpdate",value:function(b,_){var I=this.props.prefixCls;if(_.current!==this.state.current&&this.paginationNode){var j=this.paginationNode.querySelector(".".concat(I,"-item-").concat(_.current));j&&document.activeElement===j&&j.blur()}}},{key:"getValidValue",value:function(b){var _=b.target.value,I=T(void 0,this.state,this.props),j=this.state.currentInputValue,M;return _===""?M=_:isNaN(Number(_))?M=j:_>=I?M=I:M=Number(_),M}},{key:"getShowSizeChanger",value:function(){var b=this.props,_=b.showSizeChanger,I=b.total,j=b.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:I>j}},{key:"renderPrev",value:function(b){var _=this.props,I=_.prevIcon,j=_.itemRender,M=j(b,"prev",this.getItemIcon(I,"prev page")),G=!this.hasPrev();return Object(f.isValidElement)(M)?Object(f.cloneElement)(M,{disabled:G}):M}},{key:"renderNext",value:function(b){var _=this.props,I=_.nextIcon,j=_.itemRender,M=j(b,"next",this.getItemIcon(I,"next page")),G=!this.hasNext();return Object(f.isValidElement)(M)?Object(f.cloneElement)(M,{disabled:G}):M}},{key:"render",value:function(){var b=this,_=this.props,I=_.prefixCls,j=_.className,M=_.style,G=_.disabled,K=_.hideOnSinglePage,H=_.total,z=_.locale,B=_.showQuickJumper,W=_.showLessItems,F=_.showTitle,$=_.showTotal,ee=_.simple,Z=_.itemRender,ve=_.showPrevNextJumpers,he=_.jumpPrevIcon,le=_.jumpNextIcon,Re=_.selectComponentClass,xe=_.selectPrefixCls,ie=_.pageSizeOptions,se=this.state,re=se.current,be=se.pageSize,q=se.currentInputValue;if(K===!0&&H<=be)return null;var ne=T(void 0,this.state,this.props),Te=[],ae=null,J=null,X=null,Q=null,pe=null,ce=B&&B.goButton,we=W?1:2,ze=re-1>0?re-1:0,Ge=re+1<ne?re+1:ne,Qe=Object.keys(this.props).reduce(function(de,ye){return(ye.substr(0,5)==="data-"||ye.substr(0,5)==="aria-"||ye==="role")&&(de[ye]=b.props[ye]),de},{});if(ee)return ce&&(typeof ce=="boolean"?pe=a.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):pe=a.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ce),pe=a.a.createElement("li",{title:F?"".concat(z.jump_to).concat(re,"/").concat(ne):null,className:"".concat(I,"-simple-pager")},pe)),a.a.createElement("ul",Object(P.a)({className:r()(I,"".concat(I,"-simple"),Object(u.a)({},"".concat(I,"-disabled"),G),j),style:M,ref:this.savePaginationNode},Qe),a.a.createElement("li",{title:F?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(u.a)({},"".concat(I,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ze)),a.a.createElement("li",{title:F?"".concat(re,"/").concat(ne):null,className:"".concat(I,"-simple-pager")},a.a.createElement("input",{type:"text",value:q,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),a.a.createElement("span",{className:"".concat(I,"-slash")},"/"),ne),a.a.createElement("li",{title:F?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(u.a)({},"".concat(I,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ge)),pe);if(ne<=3+we*2){var $e={locale:z,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:F,itemRender:Z};ne||Te.push(a.a.createElement(g,Object(P.a)({},$e,{key:"noPager",page:ne,className:"".concat(I,"-disabled")})));for(var rt=1;rt<=ne;rt+=1){var et=re===rt;Te.push(a.a.createElement(g,Object(P.a)({},$e,{key:rt,page:rt,active:et})))}}else{var Me=W?z.prev_3:z.prev_5,Ce=W?z.next_3:z.next_5;ve&&(ae=a.a.createElement("li",{title:F?Me:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:r()("".concat(I,"-jump-prev"),Object(u.a)({},"".concat(I,"-jump-prev-custom-icon"),!!he))},Z(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(he,"prev page"))),J=a.a.createElement("li",{title:F?Ce:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:r()("".concat(I,"-jump-next"),Object(u.a)({},"".concat(I,"-jump-next-custom-icon"),!!le))},Z(this.getJumpNextPage(),"jump-next",this.getItemIcon(le,"next page")))),Q=a.a.createElement(g,{locale:z,last:!0,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ne,page:ne,active:!1,showTitle:F,itemRender:Z}),X=a.a.createElement(g,{locale:z,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:F,itemRender:Z});var Ve=Math.max(1,re-we),tt=Math.min(re+we,ne);re-1<=we&&(tt=1+we*2),ne-re<=we&&(Ve=ne-we*2);for(var He=Ve;He<=tt;He+=1){var Je=re===He;Te.push(a.a.createElement(g,{locale:z,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:He,page:He,active:Je,showTitle:F,itemRender:Z}))}re-1>=we*2&&re!==1+2&&(Te[0]=Object(f.cloneElement)(Te[0],{className:"".concat(I,"-item-after-jump-prev")}),Te.unshift(ae)),ne-re>=we*2&&re!==ne-2&&(Te[Te.length-1]=Object(f.cloneElement)(Te[Te.length-1],{className:"".concat(I,"-item-before-jump-next")}),Te.push(J)),Ve!==1&&Te.unshift(X),tt!==ne&&Te.push(Q)}var _e=null;$&&(_e=a.a.createElement("li",{className:"".concat(I,"-total-text")},$(H,[H===0?0:(re-1)*be+1,re*be>H?H:re*be])));var Se=!this.hasPrev()||!ne,Oe=!this.hasNext()||!ne;return a.a.createElement("ul",Object(P.a)({className:r()(I,j,Object(u.a)({},"".concat(I,"-disabled"),G)),style:M,unselectable:"unselectable",ref:this.savePaginationNode},Qe),_e,a.a.createElement("li",{title:F?z.prev_page:null,onClick:this.prev,tabIndex:Se?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(u.a)({},"".concat(I,"-disabled"),Se)),"aria-disabled":Se},this.renderPrev(ze)),Te,a.a.createElement("li",{title:F?z.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(u.a)({},"".concat(I,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(Ge)),a.a.createElement(p,{disabled:G,locale:z,rootPrefixCls:I,selectComponentClass:Re,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:be,pageSizeOptions:ie,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ce}))}}],[{key:"getDerivedStateFromProps",value:function(b,_){var I={};if("current"in b&&(I.current=b.current,b.current!==_.current&&(I.currentInputValue=I.current)),"pageSize"in b&&b.pageSize!==_.pageSize){var j=_.current,M=T(b.pageSize,_,b);j=j>M?M:j,"current"in b||(I.current=j,I.currentInputValue=j),I.pageSize=b.pageSize}return I}}]),y}(a.a.Component);v.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:c,totalBoundaryShowSizeChanger:50};var i=v},"6RRn":function(N,Y,k){"use strict";var P=k("wCXF"),u=k("n6Qo");k.d(Y,"b",function(){return u.a});var C=k("IBYe"),R=k("6eGT"),h=k("hW8S");k.d(Y,"a",function(){return h.a}),Y.c=P.b},"6eGT":function(N,Y,k){"use strict";function P(u){return null}Y.a=P},"7Cbv":function(N,Y,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),u=new Uint8Array(16);function C(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(u)}var R=/^(?:[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 h(g){return typeof g=="string"&&R.test(g)}for(var s=h,S=[],f=0;f<256;++f)S.push((f+256).toString(16).substr(1));function a(g){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(S[g[m+0]]+S[g[m+1]]+S[g[m+2]]+S[g[m+3]]+"-"+S[g[m+4]]+S[g[m+5]]+"-"+S[g[m+6]]+S[g[m+7]]+"-"+S[g[m+8]]+S[g[m+9]]+"-"+S[g[m+10]]+S[g[m+11]]+S[g[m+12]]+S[g[m+13]]+S[g[m+14]]+S[g[m+15]]).toLowerCase();if(!s(w))throw TypeError("Stringified UUID is invalid");return w}var o=a;function r(g,m,w){g=g||{};var p=g.random||(g.rng||C)();if(p[6]=p[6]&15|64,p[8]=p[8]&63|128,m){w=w||0;for(var d=0;d<16;++d)m[w+d]=p[d];return m}return o(p)}var x=Y.a=r},"7ahc":function(N,Y,k){"use strict";k.d(Y,"a",function(){return T});var P=k("k1fw"),u=k("0Owb"),C=k("+L6B"),R=k("2/Rp"),h=k("y8nQ"),s=k("Vl3Y"),S=k("tJVT"),f=k("OaEy"),a=k("2fM7"),o=k("q1tI"),r=k.n(o),x=k("VrN/"),g=k.n(x),m=k("p77/"),w=k.n(m),p=k("c5Ni"),d=k.n(p),n=a.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},c={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"]};Y.b=function(v){var i=v.callback,L=v.onCancel,A=Object(o.useState)("python"),y=Object(S.a)(A,2),E=y[0],b=y[1];function _(j){b(c[j][1])}function I(j){i(j)}return r.a.createElement(s.a,Object(u.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(a.a,{onChange:_},Object.keys(c).map(function(j){return r.a.createElement(n,{key:j,value:j},c[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:E})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(R.a,{type:"ghost",onClick:L},"\u53D6\u6D88")))};function T(v){var i=v.value,L=v.onChange,A=v.mode,y=v.options,E=y===void 0?{}:y,b=Object(o.useRef)(),_=Object(o.useState)(),I=Object(S.a)(_,2),j=I[0],M=I[1];return Object(o.useEffect)(function(){if(j){function G(K){var H=K.getValue();L&&L(H)}return j.on("change",G),function(){j.off("change",G)}}},[j,L]),Object(o.useEffect)(function(){j&&j.setOption("mode",A)},[j,A]),Object(o.useEffect)(function(){j&&((i!==j.getValue()||i==="")&&setTimeout(function(){j.setValue(i||" ")},300))},[j,i]),Object(o.useEffect)(function(){if(b.current&&!j){var G=g.a.fromTextArea(b.current,Object(P.a)({mode:A,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));M(G)}},[b.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:b}))}},"815F":function(N,Y,k){"use strict";k.d(Y,"e",function(){return S}),k.d(Y,"c",function(){return a}),k.d(Y,"d",function(){return o}),k.d(Y,"a",function(){return x}),k.d(Y,"f",function(){return g}),k.d(Y,"b",function(){return m});var P=k("KQm4"),u=k("VTBJ"),C=k("Ff2n"),R=k("Zm9Q"),h=k("Kwbf"),s=k("OZM5");function S(w,p){return w!=null?w:p}function f(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=new Map;function d(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(c){var T=c.key,v=c.children;Object(h.a)(T!=null,"Tree node must have a certain key: [".concat(l).concat(T,"]"));var i=String(T);Object(h.a)(!p.has(i)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(i)),p.set(i,!0),d(v,"".concat(l).concat(i," > "))})}d(w)}function a(w){function p(d){var n=Object(R.a)(d);return n.map(function(l){if(!Object(s.i)(l))return Object(h.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var c=l.key,T=l.props,v=T.children,i=Object(C.a)(T,["children"]),L=Object(u.a)({key:c},i),A=p(v);return A.length&&(L.children=A),L}).filter(function(l){return l})}return p(w)}function o(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(p===!0?[]:p),n=[];function l(c){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(v,i){var L=Object(s.h)(T?T.pos:"0",i),A=S(v.key,L),y=Object(u.a)(Object(u.a)({},v),{},{parent:T,pos:L,children:null,data:v,isStart:[].concat(Object(P.a)(T?T.isStart:[]),[i===0]),isEnd:[].concat(Object(P.a)(T?T.isEnd:[]),[i===c.length-1])});return n.push(y),p===!0||d.has(A)?y.children=l(v.children||[],y):y.children=[],y})}return l(w),n}function r(w,p,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,v){return S(T.key,v)};function l(c,T,v){var i=c?c.children:w,L=c?Object(s.h)(v.pos,T):"0";if(c){var A=n(c,L),y={node:c,index:T,pos:L,key:A,parentPos:v.node?v.pos:null,level:v.level+1};p(y)}i&&i.forEach(function(E,b){l(E,b,{node:c,pos:L,level:v?v.level+1:-1})})}l(null)}function x(w){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=p.initWrapper,n=p.processEntity,l=p.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,T={},v={},i={posEntities:T,keyEntities:v};return d&&(i=d(i)||i),r(w,function(L){var A=L.node,y=L.index,E=L.pos,b=L.key,_=L.parentPos,I=L.level,j={node:A,index:y,key:b,pos:E,level:I},M=S(b,E);T[E]=j,v[M]=j,j.parent=T[_],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,i)},c),l&&l(i),i}function g(w,p){var d=p.expandedKeys,n=p.selectedKeys,l=p.loadedKeys,c=p.loadingKeys,T=p.checkedKeys,v=p.halfCheckedKeys,i=p.dragOverNodeKey,L=p.dropPosition,A=p.keyEntities,y=A[w],E={eventKey:w,expanded:d.indexOf(w)!==-1,selected:n.indexOf(w)!==-1,loaded:l.indexOf(w)!==-1,loading:c.indexOf(w)!==-1,checked:T.indexOf(w)!==-1,halfChecked:v.indexOf(w)!==-1,pos:String(y?y.pos:""),dragOver:i===w&&L===0,dragOverGapTop:i===w&&L===-1,dragOverGapBottom:i===w&&L===1};return E}function m(w){var p=w.data,d=w.expanded,n=w.selected,l=w.checked,c=w.loaded,T=w.loading,v=w.halfChecked,i=w.dragOver,L=w.dragOverGapTop,A=w.dragOverGapBottom,y=w.pos,E=w.active,b=Object(u.a)(Object(u.a)({},p),{},{expanded:d,selected:n,checked:l,loaded:c,loading:T,halfChecked:v,dragOver:i,dragOverGapTop:L,dragOverGapBottom:A,pos:y,active:E});return"props"in b||Object.defineProperty(b,"props",{get:function(){return Object(h.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,Y,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 u=0;u<P.modeInfo.length;u++){var C=P.modeInfo[u];C.mimes&&(C.mime=C.mimes[0])}P.findModeByMIME=function(R){R=R.toLowerCase();for(var h=0;h<P.modeInfo.length;h++){var s=P.modeInfo[h];if(s.mime==R)return s;if(s.mimes){for(var S=0;S<s.mimes.length;S++)if(s.mimes[S]==R)return s}}if(/\+xml$/.test(R))return P.findModeByMIME("application/xml");if(/\+json$/.test(R))return P.findModeByMIME("application/json")},P.findModeByExtension=function(R){R=R.toLowerCase();for(var h=0;h<P.modeInfo.length;h++){var s=P.modeInfo[h];if(s.ext){for(var S=0;S<s.ext.length;S++)if(s.ext[S]==R)return s}}},P.findModeByFileName=function(R){for(var h=0;h<P.modeInfo.length;h++){var s=P.modeInfo[h];if(s.file&&s.file.test(R))return s}var S=R.lastIndexOf("."),f=S>-1&&R.substring(S+1,R.length);if(f)return P.findModeByExtension(f)},P.findModeByName=function(R){R=R.toLowerCase();for(var h=0;h<P.modeInfo.length;h++){var s=P.modeInfo[h];if(s.name.toLowerCase()==R)return s;if(s.alias){for(var S=0;S<s.alias.length;S++)if(s.alias[S].toLowerCase()==R)return s}}}})},"9Bee":function(N,Y,k){"use strict";var P=k("k1fw"),u=k("tJVT"),C=k("q1tI"),R=k.n(C),h=k("vg9a"),s=k("DlQD"),S=k.n(s),f=k("rUJ1");function a(F,$){var ee=F.match(/^(\s+)(?:```)/);if(ee===null)return $;var Z=ee[1];return $.split(`
`).map(function(ve){var he=ve.match(/^\s+/);if(he===null)return ve;var le=Object(u.a)(he,1),Re=le[0];return Re.length>=Z.length?ve.slice(Z.length):ve}).join(`
`)}var o=[],r=["<ul>"],x=new S.a.Renderer,g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function m(){o.length=0,r=["<ul>"]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(F,$,ee,Z){if($>=F.length||F[$].level<=ee)return $;var ve=F[$];Z.push("<li><a href='#"+ve.anchor+"'>"+ve.text+"</a>"),$++;var he=[];return $=p(F,$,ve.level,he),he.length>0&&(Z.push("<ul>"),he.forEach(function(le){Z.push(le)}),Z.push("</ul>")),Z.push("</li>"),$=p(F,$,ee,Z),$}function d(){return p(o,0,0,r),r.push("</ul>"),r.join("")}var n={heading:function($){var ee=g.exec($);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function($){var ee=this.rules.block.fences.exec($);if(ee){var Z=ee[0],ve=a(Z,ee[3]||""),he=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(he)>=0){var le=T(),Re=ve;ve=le,v[le]={type:"block",expression:Re}}return{type:"code",raw:Z,lang:he,text:ve}}}},l=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,T=function(){return"__special_katext_id_".concat(c++,"__")},v={};function i(){return v}function L(){c=0,v={}}function A(F){return F=F.replace(l,function($,ee){var Z=T();return v[Z]={type:"inline",expression:ee},Z}),F}var y=x.listitem;x.listitem=function(F){return y(A(F))};var E=x.paragraph;x.paragraph=function(F){return E(A(F))};var b=x.tablecell;x.tablecell=function(F,$){return b(A(F),$)},x.code=function(F,$,ee){var Z=($||"").match(/\S*/)[0];return Z?["latex","katex","math"].indexOf(Z)>=0?"<p class='editormd-tex'>".concat(F,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat($,'">').concat(ee?F:Object(f.escape)(F,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(ee?F:Object(f.escape)(F,!0))+"</code></pre>"},x.heading=function(F,$,ee){var Z=this.options.headerPrefix+ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:Z,level:$,text:F}),"<h"+$+' id="'+Z+'">'+F+"</h"+$+">"},S.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),S.a.use({tokenizer:n,renderer:x});var _=S.a,I=k("SJMd"),j=k("ulZh"),M=k.n(j),G=k("m3rI"),K=k("Oy/b"),H=k("p5ED"),z=/<pre[^>]*>/g;function B(F){var $=document.createElement("div");return $.innerHTML=F,$.childNodes.length===0?"":$.childNodes[0].nodeValue}var W=Y.a=function(F){var $=F.value,ee=$===void 0?"":$,Z=F.className,ve=F.showTextOnly,he=F.showLines,le=F.style,Re=le===void 0?{}:le,xe=F.stylesPrev,ie=xe===void 0?{}:xe,se=String(ee),re=Object(C.useState)(""),be=Object(u.a)(re,2),q=be[0],ne=be[1],Te=Object(C.useMemo)(function(){try{var Q=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ce=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;se=se.replace(Q,"("+G.a.API_SERVER+"/api/attachments/").replace(pe,'"'+G.a.API_SERVER+"/api/attachments/").replace(ce,'"'+G.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),se=se.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Qe){}var we=_(se),ze=i();if(se.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",d()),m()),we=we.replace(/(__special_katext_id_\d+__)/g,function(Qe,$e){var rt=ze[$e],et=rt.type,Me=rt.expression;return Object(K.renderToString)(B(Me)||"",{displayMode:et==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),L(),ve){var Ge=document.createElement("div");return Ge.innerHTML=we,Ge.innerText}return setTimeout(function(){return X()},500),we},[se]),ae=Object(C.useRef)();w.WebkitLineClamp=he,he&&(Re=Object(P.a)(Object(P.a)({},Re),w));function J(Q){var pe=Q.target;if(pe.tagName.toUpperCase()==="A"){var ce=pe.getAttribute("href");if(ce.indexOf("office")>-1)Q.preventDefault(),ne(ce);else if(ce.startsWith("#")){Q.preventDefault();var we=document.getElementById(ce.replace("#",""));we&&we.scrollIntoView(!0)}}}var X=function(){var pe,ce=(pe=ae.current)===null||pe===void 0?void 0:pe.querySelectorAll("video");ce==null||ce.forEach(function(we){if(we.oncontextmenu=function(){return!1},we.src.indexOf(".m3u8")>-1&&!we.canPlayType("application/vnd.apple.mpegurl")){if(M.a.isSupported()){var ze=new M.a;ze.loadSource(we.src),ze.attachMedia(we)}}})};return Object(C.useEffect)(function(){if(ae.current&&Te&&(Te.match(z)&&window.PR.prettyPrint()),ae.current)return ae.current.addEventListener("click",J),function(){ae.current.removeEventListener("click",J),L(),m()}},[Te,ae.current,J]),R.a.createElement(R.a.Fragment,null,R.a.createElement("div",{ref:ae,style:Object(P.a)({},Re),className:"".concat(Z||""," markdown-body "),dangerouslySetInnerHTML:{__html:Te}}),R.a.createElement(H.a,{close:!0,data:q,type:q!=null&&q.length?"office":"",style:Object(P.a)({},ie),onClose:function(){return ne("")}}))}},"9OqN":function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.CTR=function(){var u=P.lib.BlockCipherMode.extend(),C=u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,f=this._iv,a=this._counter;f&&(a=this._counter=f.slice(0),this._iv=void 0);var o=a.slice(0);s.encryptBlock(o,0),a[S-1]=a[S-1]+1|0;for(var r=0;r<S;r++)R[h+r]^=o[r]}});return u.Decryptor=C,u}(),P.mode.CTR})},"9VGf":function(N,Y,k){"use strict";k.d(Y,"a",function(){return C});var P=k("q1tI"),u=k.n(P);function C(R,h){var s=Object(P.useRef)();Object(P.useEffect)(function(){s.current=R}),Object(P.useEffect)(function(){function S(){s.current()}if(h!==null){var f=setInterval(S,h);return function(){return clearInterval(f)}}},[h])}},ALsQ:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.CFB=function(){var u=P.lib.BlockCipherMode.extend();u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize;C.call(this,R,h,S,s),this._prevBlock=R.slice(h,h+S)}}),u.Decryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,f=R.slice(h,h+S);C.call(this,R,h,S,s),this._prevBlock=f}});function C(R,h,s,S){var f,a=this._iv;a?(f=a.slice(0),this._iv=void 0):f=this._prevBlock,S.encryptBlock(f,0);for(var o=0;o<s;o++)R[h+o]^=f[o]}return u}(),P.mode.CFB})},B7Ph:function(N,Y,k){"use strict";k.d(Y,"a",function(){return M});var P=k("5NDa"),u=k("5rEg"),C=k("+L6B"),R=k("2/Rp"),h=k("2qtc"),s=k("kLXV"),S=k("k1fw"),f=k("miYZ"),a=k("tsqr"),o=k("9og8"),r=k("tJVT"),x=k("oBTY"),g=k("DZo9"),m=k("8z0m"),w=k("WmNS"),p=k.n(w),d=k("q1tI"),n=k.n(d),l=k("Bvq2"),c=k.n(l),T=k("nj2k"),v=k.n(T),i=k("mxV5"),L=k.n(i),A=k("KhGG"),y=k("ErOA"),E=k("7Cbv"),b=k("1vsH"),_=m.a.Dragger,I=function(K){for(var H=function(le){return le&&le.substring(0,le.lastIndexOf("."))},z=Object(x.a)(K),B=0,W=[],F=0;F<z.length;F++){for(var $="",ee=0;ee<W.length;ee++)if(H(W[ee][0].name)==H(z[F].name)){B=1,$=ee;break}if(B==1)W[$].push(z[F]),B=0;else if(B==0){var Z=new Array;Z.push(z[F]),W.push(Z)}}var ve=W.map(function(he){if(he[0].name.includes(".in"))return he.length===2?he:[he[0],{}];if(he[0].name.includes(".out"))return he.length===2?he.reverse():[{},he[0]]});return ve},j=function(K){var H=K.onClose,z=K.onOK,B=K.visible,W=K.wrapClassName,F=K.rootIdentifier,$=Object(d.useState)([]),ee=Object(r.a)($,2),Z=ee[0],ve=ee[1],he=Object(d.useState)({}),le=Object(r.a)(he,2),Re=le[0],xe=le[1],ie=Object(d.useState)(!1),se=Object(r.a)(ie,2),re=se[0],be=se[1],q=Object(d.useRef)([]),ne=Object(d.useRef)(0),Te=function(){H()};Object(d.useEffect)(function(){ae()},[]),Object(d.useEffect)(function(){B&&(q.current=[],ne.current=0,ve([]))},[B]);var ae=function(){var ze=Object(o.a)(p.a.mark(function Ge(){var Qe,$e;return p.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.prev=0,et.next=3,Object(y.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:Qe=et.sent,$e=JSON.parse(Object(A.a)(Qe.data)),xe($e),et.next=11;break;case 8:et.prev=8,et.t0=et.catch(0),a.b.error(et.t0);case 11:case"end":return et.stop()}},Ge,null,[[0,8]])}));return function(){return ze.apply(this,arguments)}}(),J=function(Ge){return Ge&&Ge.substring(0,Ge.lastIndexOf("."))},X=function(Ge){var Qe,$e,rt=J((Qe=Ge[0])===null||Qe===void 0?void 0:Qe.name)||J(($e=Ge[1])===null||$e===void 0?void 0:$e.name),et=Z.filter(function(Me){return J(Me.name)!==rt});q.current=Object(x.a)(et),ve(Object(x.a)(et))},Q=function(Ge){var Qe=new L.a({endpoint:Re.end_point,region:Re.region,accessKeyId:Re.access_key_id,accessKeySecret:Re.access_key_secret,bucket:Re.bucket,stsToken:Re.security_token}),$e=Ge.name,rt={container_type:"TestSet",file_name:$e},et=Object(E.a)(),Me="testsets/".concat(F,"/").concat(et).concat($e.indexOf(".")>-1?"."+$e.split(".").pop():"");F===null&&(Me="testsets/".concat(et).concat($e.indexOf(".")>-1?"."+$e.split(".").pop():"")),Qe.multipartUpload(Me,new Blob([Ge.file],{type:Ge.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:$e+""},url:Re==null?void 0:Re.callback_url,host:Re==null?void 0:Re.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(y.e)(rt)}}).then(function(Ce){if(Ce.data.status===0){ne.current=ne.current+1;var Ve=q.current.map(function(He){var Je,_e;if(He.name===((Je=Ce.data)===null||Je===void 0||((_e=Je.data)===null||_e===void 0)?void 0:_e.file_name)){var Se,Oe,de,ye=Object(S.a)({},He);if((Se=Ce.data)!==null&&Se!==void 0&&(Oe=Se.data)!==null&&Oe!==void 0&&(de=Oe.file_name)!==null&&de!==void 0&&de.includes(".in")){var Ee,De,Be,Xe,nt,dt;ye.in_object_key=(Ee=Ce.data)===null||Ee===void 0||((De=Ee.data)===null||De===void 0)?void 0:De.object,ye.in_object_size=(Be=Ce.data)===null||Be===void 0||((Xe=Be.data)===null||Xe===void 0)?void 0:Xe.size,ye.input=(nt=Ce.data)===null||nt===void 0||((dt=nt.data)===null||dt===void 0)?void 0:dt.file_name,ye.in_file=Ge}else{var Et,ft,jt,Ct,xt,Yt;ye.out_object_key=(Et=Ce.data)===null||Et===void 0||((ft=Et.data)===null||ft===void 0)?void 0:ft.object,ye.out_object_size=(jt=Ce.data)===null||jt===void 0||((Ct=jt.data)===null||Ct===void 0)?void 0:Ct.size,ye.output=(xt=Ce.data)===null||xt===void 0||((Yt=xt.data)===null||Yt===void 0)?void 0:Yt.file_name,ye.out_file=Ge}return ye}return He});if(q.current=Object(x.a)(Ve),ve(Object(x.a)(Ve)),ne.current>0&&ne.current===Z.length){be(!1);var tt=I(Ve);tt=tt.filter(function(He){var Je,_e;return!!((Je=He[0])!==null&&Je!==void 0&&Je.name&&(_e=He[1])!==null&&_e!==void 0&&_e.name)}),tt=tt.map(function(He){return Object(S.a)(Object(S.a)(Object(S.a)({},He[0]),He[1]),{},{is_file:!0})}),z(tt),H()}}})},pe=function(){if(Z.length===0){a.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}be(!0);var Ge=I(Z);if(Ge.some(function(Qe){var $e,rt;return!(($e=Qe[0])!==null&&$e!==void 0&&$e.name&&(rt=Qe[1])!==null&&rt!==void 0&&rt.name)})){s.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 Qe=Object(o.a)(p.a.mark(function rt(){return p.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Z.map(function(){var Ce=Object(o.a)(p.a.mark(function Ve(tt){return p.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:Q(tt);case 1:case"end":return Je.stop()}},Ve)}));return function(Ve){return Ce.apply(this,arguments)}}());case 1:case"end":return Me.stop()}},rt)}));function $e(){return Qe.apply(this,arguments)}return $e}(),onCancel:function(){be(!1)}});return}Z.map(function(){var Qe=Object(o.a)(p.a.mark(function $e(rt){return p.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Q(rt);case 1:case"end":return Me.stop()}},$e)}));return function($e){return Qe.apply(this,arguments)}}())},ce={name:"file",fileList:Z,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Ge){if(Z!=null&&Z.some(function($e){return $e.name===Ge.name}))return a.b.info("".concat(Ge.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Ge.size/1024/1024>100)return a.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ge.name))return a.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var Qe={name:Ge.name,uid:Ge.uid,file:Ge,percent:0};return Z.push(Qe),q.current=Object(x.a)(Z),ve(Object(x.a)(Z)),!1}},we=I(Z);return console.log(Z,we,"fileList"),n.a.createElement(s.a,{visible:B,wrapClassName:W,onOk:pe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:re},onCancel:Te,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},n.a.createElement("div",{className:c.a.wrap},Z.length?n.a.createElement("div",null,n.a.createElement(m.a,ce,n.a.createElement(R.a,{className:c.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),n.a.createElement(M,{data:we,onRemove:X})):n.a.createElement("div",{className:c.a.noData},n.a.createElement("img",{src:v.a,alt:""}),n.a.createElement(m.a,ce,n.a.createElement(R.a,{className:c.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),n.a.createElement("div",{className:c.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",n.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",n.a.createElement("br",null),"2\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",n.a.createElement("br",null),"3\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002")))},M=function(K){var H=K.data,z=H===void 0?[]:H,B=K.onRemove,W=K.width,F=W===void 0?"auto":W,$=K.showScore,ee=$===void 0?!1:$,Z=K.disabled,ve=Z===void 0?!1:Z,he=K.inputChange,le=function(se){var re=document.createElement("a");document.body.appendChild(re);var be=URL.createObjectURL(se.file);re.href=be,re.download=se.name,re.click(),URL.revokeObjectURL(be),document.body.removeChild(re)},Re=function(se,re){Object(b.w)(se,re)},xe=function(se,re){s.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){B(se,re)},onCancel:function(){}})};return z.length?n.a.createElement("div",{style:{width:F}},n.a.createElement("div",{className:c.a.head},n.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),n.a.createElement("div",{style:{width:ee?"25%":"35%"}},"\u8F93\u5165"),n.a.createElement("div",{style:{width:ee?"25%":"35%"}},"\u8F93\u51FA"),ee&&n.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),n.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),z.map(function(ie,se){var re,be,q,ne;return n.a.createElement("div",{key:se,className:c.a.list},n.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",se+1),n.a.createElement("div",{className:c.a.info,style:{width:ee?"25%":"35%"}},n.a.createElement("span",{title:ie.input||((re=ie[0])===null||re===void 0?void 0:re.name),onClick:function(){ie.input?ie.input_file_url?Re(ie.input_file_url,ie.input):le(ie.in_file):le(ie[0])}},ie.input||((be=ie[0])===null||be===void 0?void 0:be.name))),n.a.createElement("div",{className:c.a.info,style:{width:ee?"25%":"35%"}},n.a.createElement("span",{title:ie.output||((q=ie[1])===null||q===void 0?void 0:q.name),onClick:function(){ie.input?ie.output_file_url?Re(ie.output_file_url,ie.output):le(ie.out_file):le(ie[1])}},ie.output||((ne=ie[1])===null||ne===void 0?void 0:ne.name))),ee&&n.a.createElement("div",{style:{width:"20%"}},n.a.createElement(u.a,{disabled:ve,style:{width:"70%"},onChange:function(ae){return he(ae,se)},value:ie.score}),n.a.createElement("span",null,"\xA0%")),n.a.createElement("div",{onClick:function(){return xe(ie,se)},style:{width:"10%"}},n.a.createElement("span",{className:c.a.del},"\u5220\u9664")))})):n.a.createElement(n.a.Fragment,null)};Y.b=j},BU3w:function(N,Y,k){"use strict";k.d(Y,"a",function(){return s});var P=k("MNnm"),u="rc-util-key";function C(S){if(S.attachTo)return S.attachTo;var f=document.querySelector("head");return f||document.body}function R(S){var f,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var o=document.createElement("style");if((f=a.csp)===null||f===void 0?void 0:f.nonce){var r;o.nonce=(r=a.csp)===null||r===void 0?void 0:r.nonce}o.innerHTML=S;var x=C(a),g=x.firstChild;return a.prepend&&x.prepend?x.prepend(o):a.prepend&&g?x.insertBefore(o,g):x.appendChild(o),o}var h=new Map;function s(S,f){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C(a);if(!h.has(o)){var r=R("",a),x=r.parentNode;h.set(o,x),x.removeChild(r)}var g=Array.from(h.get(o).children).find(function(n){return n.tagName==="STYLE"&&n[u]===f});if(g){var m,w;if(((m=a.csp)===null||m===void 0?void 0:m.nonce)&&g.nonce!==((w=a.csp)===null||w===void 0?void 0:w.nonce)){var p;g.nonce=(p=a.csp)===null||p===void 0?void 0:p.nonce}return g.innerHTML!==S&&(g.innerHTML=S),g}var d=R(S,a);return d[u]=f,d}},Bd2K:function(N,Y,k){(function(P){P(k("VrN/"),k("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(a,o,r){if(r!=P.Init&&r&&a.removeKeyMap("autoCloseTags"),!o)return;var x={name:"autoCloseTags"};(typeof o!="object"||o.whenClosing!==!1)&&(x["'/'"]=function(g){return s(g)}),(typeof o!="object"||o.whenOpening!==!1)&&(x["'>'"]=function(g){return R(g)}),a.addKeyMap(x)});var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function R(a){if(a.getOption("disableInput"))return P.Pass;for(var o=a.listSelections(),r=[],x=a.getOption("autoCloseTags"),g=0;g<o.length;g++){if(!o[g].empty())return P.Pass;var m=o[g].head,w=a.getTokenAt(m),p=P.innerMode(a.getMode(),w.state),d=p.state,n=p.mode.xmlCurrentTag&&p.mode.xmlCurrentTag(d),l=n&&n.name;if(!l)return P.Pass;var c=p.mode.configuration=="html",T=typeof x=="object"&&x.dontCloseTags||c&&u,v=typeof x=="object"&&x.indentTags||c&&C;w.end>m.ch&&(l=l.slice(0,l.length-w.end+m.ch));var i=l.toLowerCase();if(!l||w.type=="string"&&(w.end!=m.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&n.close||w.string.indexOf("/")==m.ch-w.start-1||T&&S(T,i)>-1||f(a,p.mode.xmlCurrentContext&&p.mode.xmlCurrentContext(d)||[],l,m,!0))return P.Pass;var L=typeof x=="object"&&x.emptyTags;if(L&&S(L,l)>-1){r[g]={text:"/>",newPos:P.Pos(m.line,m.ch+2)};continue}var A=v&&S(v,i)>-1;r[g]={indent:A,text:">"+(A?`
`:"")+"</"+l+">",newPos:A?P.Pos(m.line+1,0):P.Pos(m.line,m.ch+1)}}for(var y=typeof x=="object"&&x.dontIndentOnAutoClose,g=o.length-1;g>=0;g--){var E=r[g];a.replaceRange(E.text,o[g].head,o[g].anchor,"+insert");var b=a.listSelections().slice(0);b[g]={head:E.newPos,anchor:E.newPos},a.setSelections(b),!y&&E.indent&&(a.indentLine(E.newPos.line,null,!0),a.indentLine(E.newPos.line+1,null,!0))}}function h(a,o){for(var r=a.listSelections(),x=[],g=o?"/":"</",m=a.getOption("autoCloseTags"),w=typeof m=="object"&&m.dontIndentOnSlash,p=0;p<r.length;p++){if(!r[p].empty())return P.Pass;var d=r[p].head,n=a.getTokenAt(d),l=P.innerMode(a.getMode(),n.state),c=l.state;if(o&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=d.ch-1))return P.Pass;var T,v=l.mode.name!="xml"&&a.getMode().name=="htmlmixed";if(v&&l.mode.name=="javascript")T=g+"script";else if(v&&l.mode.name=="css")T=g+"style";else{var i=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(c);if(!i||i.length&&f(a,i,i[i.length-1],d))return P.Pass;T=g+i[i.length-1]}a.getLine(d.line).charAt(n.end)!=">"&&(T+=">"),x[p]=T}if(a.replaceSelections(x),r=a.listSelections(),!w)for(var p=0;p<r.length;p++)(p==r.length-1||r[p].head.line<r[p+1].head.line)&&a.indentLine(r[p].head.line)}function s(a){return a.getOption("disableInput")?P.Pass:h(a,!0)}P.commands.closeTag=function(a){return h(a)};function S(a,o){if(a.indexOf)return a.indexOf(o);for(var r=0,x=a.length;r<x;++r)if(a[r]==o)return r;return-1}function f(a,o,r,x,g){if(!P.scanForClosingTag)return!1;var m=Math.min(a.lastLine()+1,x.line+500),w=P.scanForClosingTag(a,x,null,m);if(!w||w.tag!=r)return!1;for(var p=g?1:0,d=o.length-1;d>=0&&o[d]==r;d--)++p;x=w.to;for(var d=1;d<p;d++){var n=P.scanForClosingTag(a,x,null,m);if(!n||n.tag!=r)return!1;x=n.to}return!0}})},BjJ7:function(N,Y,k){"use strict";k.d(Y,"d",function(){return u}),k.d(Y,"c",function(){return C}),k.d(Y,"e",function(){return R}),k.d(Y,"b",function(){return h}),k.d(Y,"a",function(){return S});var P=k("m3rI");function u(f){var a=!0;if(f.length>0){for(var o=0;o<f.length;o++)if(f[o].compile_success==0||!f[o].compile_success){a=!1;break}}else a=!1;return a}function C(f){for(var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=[],r=0;r<f.length;r++){var x=f[r],g=a?"".concat(a,"/").concat(x.name):"".concat(x.name);o.push({title:x.name,isLeaf:!(x.type==="tree"),key:g})}return o}function R(f,a,o){for(var r=0;r<f.length;r++){var x=f[r];if(x.key===a){x.children=o;break}x.children&&R(x.children,a,o)}return f}function h(f,a,o){var r;return function(){var x=this,g=arguments,m=function(){r=null,o||f.apply(x,g)},w=o&&!r;clearTimeout(r),r=setTimeout(m,a),w&&f.apply(x,g)}}var s=!0,S=P.a.API_SERVER},Bvq2:function(N,Y,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,Y,k){},CrYA:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"sessionStorage",read:R,write:h,each:s,remove:S,clearAll:f};function C(){return u.sessionStorage}function R(a){return C().getItem(a)}function h(a,o){return C().setItem(a,o)}function s(a){for(var o=C().length-1;o>=0;o--){var r=C().key(o);a(R(r),r)}}function S(a){return C().removeItem(a)}function f(){return C().clear()}},DlQD:function(N,Y,k){(function(P,u){N.exports=u()})(this,function(){"use strict";function P(_e,Se){for(var Oe=0;Oe<Se.length;Oe++){var de=Se[Oe];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(_e,de.key,de)}}function u(_e,Se,Oe){return Se&&P(_e.prototype,Se),Oe&&P(_e,Oe),_e}function C(_e,Se){if(!_e)return;if(typeof _e=="string")return R(_e,Se);var Oe=Object.prototype.toString.call(_e).slice(8,-1);if(Oe==="Object"&&_e.constructor&&(Oe=_e.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(_e);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return R(_e,Se)}function R(_e,Se){(Se==null||Se>_e.length)&&(Se=_e.length);for(var Oe=0,de=new Array(Se);Oe<Se;Oe++)de[Oe]=_e[Oe];return de}function h(_e,Se){var Oe;if(typeof Symbol=="undefined"||_e[Symbol.iterator]==null){if(Array.isArray(_e)||(Oe=C(_e))||Se&&_e&&typeof _e.length=="number"){Oe&&(_e=Oe);var de=0;return function(){return de>=_e.length?{done:!0}:{done:!1,value:_e[de++]}}}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 Oe=_e[Symbol.iterator](),Oe.next.bind(Oe)}function s(_e,Se){return Se={exports:{}},_e(Se,Se.exports),Se.exports}var S=s(function(_e){function Se(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(de){_e.exports.defaults=de}_e.exports={defaults:Se(),getDefaults:Se,changeDefaults:Oe}}),f=S.defaults,a=S.getDefaults,o=S.changeDefaults,r=/[&<>"']/,x=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,m=/[<>"']|&(?!#?\w+;)/g,w={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p=function(Se){return w[Se]};function d(_e,Se){if(Se){if(r.test(_e))return _e.replace(x,p)}else if(g.test(_e))return _e.replace(m,p);return _e}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(_e){return _e.replace(n,function(Se,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var c=/(^|[^\[])\^/g;function T(_e,Se){_e=_e.source||_e,Se=Se||"";var Oe={replace:function(ye,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(c,"$1"),_e=_e.replace(ye,Ee),Oe},getRegex:function(){return new RegExp(_e,Se)}};return Oe}var v=/[^\w:]/g,i=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(_e,Se,Oe){if(_e){var de;try{de=decodeURIComponent(l(Oe)).replace(v,"").toLowerCase()}catch(ye){return null}if(de.indexOf("javascript:")===0||de.indexOf("vbscript:")===0||de.indexOf("data:")===0)return null}Se&&!i.test(Oe)&&(Oe=_(Se,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ye){return null}return Oe}var A={},y=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(_e,Se){A[" "+_e]||(y.test(_e)?A[" "+_e]=_e+"/":A[" "+_e]=G(_e,"/",!0)),_e=A[" "+_e];var Oe=_e.indexOf(":")===-1;return Se.substring(0,2)==="//"?Oe?Se:_e.replace(E,"$1")+Se:Se.charAt(0)==="/"?Oe?Se:_e.replace(b,"$1")+Se:_e+Se}var I={exec:function(){}};function j(_e){for(var Se=1,Oe,de;Se<arguments.length;Se++){Oe=arguments[Se];for(de in Oe)Object.prototype.hasOwnProperty.call(Oe,de)&&(_e[de]=Oe[de])}return _e}function M(_e,Se){var Oe=_e.replace(/\|/g,function(Ee,De,Be){for(var Xe=!1,nt=De;--nt>=0&&Be[nt]==="\\";)Xe=!Xe;return Xe?"|":" |"}),de=Oe.split(/ \|/),ye=0;if(de.length>Se)de.splice(Se);else for(;de.length<Se;)de.push("");for(;ye<de.length;ye++)de[ye]=de[ye].trim().replace(/\\\|/g,"|");return de}function G(_e,Se,Oe){var de=_e.length;if(de===0)return"";for(var ye=0;ye<de;){var Ee=_e.charAt(de-ye-1);if(Ee===Se&&!Oe)ye++;else if(Ee!==Se&&Oe)ye++;else break}return _e.substr(0,de-ye)}function K(_e,Se){if(_e.indexOf(Se[1])===-1)return-1;for(var Oe=_e.length,de=0,ye=0;ye<Oe;ye++)if(_e[ye]==="\\")ye++;else if(_e[ye]===Se[0])de++;else if(_e[ye]===Se[1]&&(de--,de<0))return ye;return-1}function H(_e){_e&&_e.sanitize&&!_e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var z={escape:d,unescape:l,edit:T,cleanUrl:L,resolveUrl:_,noopTest:I,merge:j,splitCells:M,rtrim:G,findClosingBracket:K,checkSanitizeDeprecation:H},B=S.defaults,W=z.rtrim,F=z.splitCells,$=z.escape,ee=z.findClosingBracket;function Z(_e,Se,Oe){var de=Se.href,ye=Se.title?$(Se.title):null,Ee=_e[1].replace(/\\([\[\]])/g,"$1");return _e[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:de,title:ye,text:Ee}:{type:"image",raw:Oe,href:de,title:ye,text:$(Ee)}}function ve(_e,Se){var Oe=_e.match(/^(\s+)(?:```)/);if(Oe===null)return Se;var de=Oe[1];return Se.split(`
`).map(function(ye){var Ee=ye.match(/^\s+/);if(Ee===null)return ye;var De=Ee[0];return De.length>=de.length?ye.slice(de.length):ye}).join(`
`)}var he=function(){function _e(Oe){this.options=Oe||B}var Se=_e.prototype;return Se.space=function(de){var ye=this.rules.block.newline.exec(de);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:`
`}},Se.code=function(de,ye){var Ee=this.rules.block.code.exec(de);if(Ee){var De=ye[ye.length-1];if(De&&De.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Be=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Be:W(Be,`
`)}}},Se.fences=function(de){var ye=this.rules.block.fences.exec(de);if(ye){var Ee=ye[0],De=ve(Ee,ye[3]||"");return{type:"code",raw:Ee,lang:ye[2]?ye[2].trim():ye[2],text:De}}},Se.heading=function(de){var ye=this.rules.block.heading.exec(de);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},Se.nptable=function(de){var ye=this.rules.block.nptable.exec(de);if(ye){var Ee={type:"table",header:F(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[],raw:ye[0]};if(Ee.header.length===Ee.align.length){var De=Ee.align.length,Be;for(Be=0;Be<De;Be++)/^ *-+: *$/.test(Ee.align[Be])?Ee.align[Be]="right":/^ *:-+: *$/.test(Ee.align[Be])?Ee.align[Be]="center":/^ *:-+ *$/.test(Ee.align[Be])?Ee.align[Be]="left":Ee.align[Be]=null;for(De=Ee.cells.length,Be=0;Be<De;Be++)Ee.cells[Be]=F(Ee.cells[Be],Ee.header.length);return Ee}}},Se.hr=function(de){var ye=this.rules.block.hr.exec(de);if(ye)return{type:"hr",raw:ye[0]}},Se.blockquote=function(de){var ye=this.rules.block.blockquote.exec(de);if(ye){var Ee=ye[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ye[0],text:Ee}}},Se.list=function(de){var ye=this.rules.block.list.exec(de);if(ye){for(var Ee=ye[0],De=ye[2],Be=De.length>1,Xe=De[De.length-1]===")",nt={type:"list",raw:Ee,ordered:Be,start:Be?+De.slice(0,-1):"",loose:!1,items:[]},dt=ye[0].match(this.rules.block.item),Et=!1,ft,jt,Ct,xt,Yt,$t,Vt,xr=dt.length,Lt=0;Lt<xr;Lt++)ft=dt[Lt],Ee=ft,jt=ft.length,ft=ft.replace(/^ *([*+-]|\d+[.)]) */,""),~ft.indexOf(`
`)&&(jt-=ft.length,ft=this.options.pedantic?ft.replace(/^ {1,4}/gm,""):ft.replace(new RegExp("^ {1,"+jt+"}","gm"),"")),Lt!==xr-1&&(Ct=this.rules.block.bullet.exec(dt[Lt+1])[0],(Be?Ct.length===1||!Xe&&Ct[Ct.length-1]===")":Ct.length>1||this.options.smartLists&&Ct!==De)&&(xt=dt.slice(Lt+1).join(`
`),nt.raw=nt.raw.substring(0,nt.raw.length-xt.length),Lt=xr-1)),Yt=Et||/\n\n(?!\s*$)/.test(ft),Lt!==xr-1&&(Et=ft.charAt(ft.length-1)===`
`,Yt||(Yt=Et)),Yt&&(nt.loose=!0),$t=/^\[[ xX]\] /.test(ft),Vt=void 0,$t&&(Vt=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Ee,task:$t,checked:Vt,loose:Yt,text:ft});return nt}},Se.html=function(de){var ye=this.rules.block.html.exec(de);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):$(ye[0]):ye[0]}},Se.def=function(de){var ye=this.rules.block.def.exec(de);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Ee=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ye[0],href:ye[2],title:ye[3]}}},Se.table=function(de){var ye=this.rules.block.table.exec(de);if(ye){var Ee={type:"table",header:F(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(`
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ye[0];var De=Ee.align.length,Be;for(Be=0;Be<De;Be++)/^ *-+: *$/.test(Ee.align[Be])?Ee.align[Be]="right":/^ *:-+: *$/.test(Ee.align[Be])?Ee.align[Be]="center":/^ *:-+ *$/.test(Ee.align[Be])?Ee.align[Be]="left":Ee.align[Be]=null;for(De=Ee.cells.length,Be=0;Be<De;Be++)Ee.cells[Be]=F(Ee.cells[Be].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},Se.lheading=function(de){var ye=this.rules.block.lheading.exec(de);if(ye)return{type:"heading",raw:ye[0],depth:ye[2].charAt(0)==="="?1:2,text:ye[1]}},Se.paragraph=function(de){var ye=this.rules.block.paragraph.exec(de);if(ye)return{type:"paragraph",raw:ye[0],text:ye[1].charAt(ye[1].length-1)===`
`?ye[1].slice(0,-1):ye[1]}},Se.text=function(de,ye){var Ee=this.rules.block.text.exec(de);if(Ee){var De=ye[ye.length-1];return De&&De.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},Se.escape=function(de){var ye=this.rules.inline.escape.exec(de);if(ye)return{type:"escape",raw:ye[0],text:$(ye[1])}},Se.tag=function(de,ye,Ee){var De=this.rules.inline.tag.exec(de);if(De)return!ye&&/^<a /i.test(De[0])?ye=!0:ye&&/^<\/a>/i.test(De[0])&&(ye=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:ye,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):$(De[0]):De[0]}},Se.link=function(de){var ye=this.rules.inline.link.exec(de);if(ye){var Ee=ee(ye[2],"()");if(Ee>-1){var De=ye[0].indexOf("!")===0?5:4,Be=De+ye[1].length+Ee;ye[2]=ye[2].substring(0,Ee),ye[0]=ye[0].substring(0,Be).trim(),ye[3]=""}var Xe=ye[2],nt="";if(this.options.pedantic){var dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Xe);dt?(Xe=dt[1],nt=dt[3]):nt=""}else nt=ye[3]?ye[3].slice(1,-1):"";Xe=Xe.trim().replace(/^<([\s\S]*)>$/,"$1");var Et=Z(ye,{href:Xe&&Xe.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},ye[0]);return Et}},Se.reflink=function(de,ye){var Ee;if((Ee=this.rules.inline.reflink.exec(de))||(Ee=this.rules.inline.nolink.exec(de))){var De=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(De=ye[De.toLowerCase()],!De||!De.href){var Be=Ee[0].charAt(0);return{type:"text",raw:Be,text:Be}}var Xe=Z(Ee,De,Ee[0]);return Xe}},Se.strong=function(de,ye,Ee){Ee===void 0&&(Ee="");var De=this.rules.inline.strong.start.exec(de);if(De&&(!De[1]||De[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*de.length);var Be=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Be.lastIndex=0;for(var Xe;(De=Be.exec(ye))!=null;)if(Xe=this.rules.inline.strong.middle.exec(ye.slice(0,De.index+3)),Xe)return{type:"strong",raw:de.slice(0,Xe[0].length),text:de.slice(2,Xe[0].length-2)}}},Se.em=function(de,ye,Ee){Ee===void 0&&(Ee="");var De=this.rules.inline.em.start.exec(de);if(De&&(!De[1]||De[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*de.length);var Be=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Be.lastIndex=0;for(var Xe;(De=Be.exec(ye))!=null;)if(Xe=this.rules.inline.em.middle.exec(ye.slice(0,De.index+2)),Xe)return{type:"em",raw:de.slice(0,Xe[0].length),text:de.slice(1,Xe[0].length-1)}}},Se.codespan=function(de){var ye=this.rules.inline.code.exec(de);if(ye){var Ee=ye[2].replace(/\n/g," "),De=/[^ ]/.test(Ee),Be=Ee.startsWith(" ")&&Ee.endsWith(" ");return De&&Be&&(Ee=Ee.substring(1,Ee.length-1)),Ee=$(Ee,!0),{type:"codespan",raw:ye[0],text:Ee}}},Se.br=function(de){var ye=this.rules.inline.br.exec(de);if(ye)return{type:"br",raw:ye[0]}},Se.del=function(de){var ye=this.rules.inline.del.exec(de);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},Se.autolink=function(de,ye){var Ee=this.rules.inline.autolink.exec(de);if(Ee){var De,Be;return Ee[2]==="@"?(De=$(this.options.mangle?ye(Ee[1]):Ee[1]),Be="mailto:"+De):(De=$(Ee[1]),Be=De),{type:"link",raw:Ee[0],text:De,href:Be,tokens:[{type:"text",raw:De,text:De}]}}},Se.url=function(de,ye){var Ee;if(Ee=this.rules.inline.url.exec(de)){var De,Be;if(Ee[2]==="@")De=$(this.options.mangle?ye(Ee[0]):Ee[0]),Be="mailto:"+De;else{var Xe;do Xe=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Xe!==Ee[0]);De=$(Ee[0]),Ee[1]==="www."?Be="http://"+De:Be=De}return{type:"link",raw:Ee[0],text:De,href:Be,tokens:[{type:"text",raw:De,text:De}]}}},Se.inlineText=function(de,ye,Ee){var De=this.rules.inline.text.exec(de);if(De){var Be;return ye?Be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):$(De[0]):De[0]:Be=$(this.options.smartypants?Ee(De[0]):De[0]),{type:"text",raw:De[0],text:Be}}},_e}(),le=z.noopTest,Re=z.edit,xe=z.merge,ie={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:le,table:le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ie._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ie._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ie.def=Re(ie.def).replace("label",ie._label).replace("title",ie._title).getRegex(),ie.bullet=/(?:[*+-]|\d{1,9}[.)])/,ie.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ie.item=Re(ie.item,"gm").replace(/bull/g,ie.bullet).getRegex(),ie.list=Re(ie.list).replace(/bull/g,ie.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ie.def.source+")").getRegex(),ie._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",ie._comment=/<!--(?!-?>)[\s\S]*?-->/,ie.html=Re(ie.html,"i").replace("comment",ie._comment).replace("tag",ie._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie.paragraph=Re(ie._paragraph).replace("hr",ie.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",ie._tag).getRegex(),ie.blockquote=Re(ie.blockquote).replace("paragraph",ie.paragraph).getRegex(),ie.normal=xe({},ie),ie.gfm=xe({},ie.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*|$)"}),ie.gfm.nptable=Re(ie.gfm.nptable).replace("hr",ie.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",ie._tag).getRegex(),ie.gfm.table=Re(ie.gfm.table).replace("hr",ie.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",ie._tag).getRegex(),ie.pedantic=xe({},ie.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ie._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:le,paragraph:Re(ie.normal._paragraph).replace("hr",ie.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ie.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:le,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:le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",se.punctuation=Re(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=Re(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=Re(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=Re(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=Re(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=Re(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=Re(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=Re(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=Re(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=Re(se._blockSkip,"g").getRegex(),se.overlapSkip=Re(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._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])?)+(?![-_])/,se.autolink=Re(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=Re(se.tag).replace("comment",ie._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=Re(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=Re(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=Re(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=xe({},se),se.pedantic=xe({},se.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:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=xe({},se.normal,{escape:Re(se.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),se.gfm.url=Re(se.gfm.url,"i").replace("email",se.gfm._extended_email).getRegex(),se.breaks=xe({},se.gfm,{br:Re(se.br).replace("{2,}","*").getRegex(),text:Re(se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var re={block:ie,inline:se},be=S.defaults,q=re.block,ne=re.inline;function Te(_e){return _e.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 ae(_e){var Se="",Oe,de,ye=_e.length;for(Oe=0;Oe<ye;Oe++)de=_e.charCodeAt(Oe),Math.random()>.5&&(de="x"+de.toString(16)),Se+="&#"+de+";";return Se}var J=function(){function _e(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||be,this.options.tokenizer=this.options.tokenizer||new he,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var de={block:q.normal,inline:ne.normal};this.options.pedantic?(de.block=q.pedantic,de.inline=ne.pedantic):this.options.gfm&&(de.block=q.gfm,this.options.breaks?de.inline=ne.breaks:de.inline=ne.gfm),this.tokenizer.rules=de}_e.lex=function(de,ye){var Ee=new _e(ye);return Ee.lex(de)};var Se=_e.prototype;return Se.lex=function(de){return de=de.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(de,this.tokens,!0),this.inline(this.tokens),this.tokens},Se.blockTokens=function(de,ye,Ee){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!0),de=de.replace(/^ +$/gm,"");for(var De,Be,Xe,nt;de;){if(De=this.tokenizer.space(de)){de=de.substring(De.raw.length),De.type&&ye.push(De);continue}if(De=this.tokenizer.code(de,ye)){de=de.substring(De.raw.length),De.type?ye.push(De):(nt=ye[ye.length-1],nt.raw+=`
`+De.raw,nt.text+=`
`+De.text);continue}if(De=this.tokenizer.fences(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.heading(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.nptable(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.hr(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.blockquote(de)){de=de.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],Ee),ye.push(De);continue}if(De=this.tokenizer.list(de)){for(de=de.substring(De.raw.length),Xe=De.items.length,Be=0;Be<Xe;Be++)De.items[Be].tokens=this.blockTokens(De.items[Be].text,[],!1);ye.push(De);continue}if(De=this.tokenizer.html(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(Ee&&(De=this.tokenizer.def(de))){de=de.substring(De.raw.length),this.tokens.links[De.tag]||(this.tokens.links[De.tag]={href:De.href,title:De.title});continue}if(De=this.tokenizer.table(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.lheading(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(Ee&&(De=this.tokenizer.paragraph(de))){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.text(de,ye)){de=de.substring(De.raw.length),De.type?ye.push(De):(nt=ye[ye.length-1],nt.raw+=`
`+De.raw,nt.text+=`
`+De.text);continue}if(de){var dt="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return ye},Se.inline=function(de){var ye,Ee,De,Be,Xe,nt,dt=de.length;for(ye=0;ye<dt;ye++){nt=de[ye];switch(nt.type){case"paragraph":case"text":case"heading":{nt.tokens=[],this.inlineTokens(nt.text,nt.tokens);break}case"table":{for(nt.tokens={header:[],cells:[]},Be=nt.header.length,Ee=0;Ee<Be;Ee++)nt.tokens.header[Ee]=[],this.inlineTokens(nt.header[Ee],nt.tokens.header[Ee]);for(Be=nt.cells.length,Ee=0;Ee<Be;Ee++)for(Xe=nt.cells[Ee],nt.tokens.cells[Ee]=[],De=0;De<Xe.length;De++)nt.tokens.cells[Ee][De]=[],this.inlineTokens(Xe[De],nt.tokens.cells[Ee][De]);break}case"blockquote":{this.inline(nt.tokens);break}case"list":{for(Be=nt.items.length,Ee=0;Ee<Be;Ee++)this.inline(nt.items[Ee].tokens);break}}}return de},Se.inlineTokens=function(de,ye,Ee,De,Be){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!1),De===void 0&&(De=!1),Be===void 0&&(Be="");var Xe,nt=de,dt;if(this.tokens.links){var Et=Object.keys(this.tokens.links);if(Et.length>0)for(;(dt=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)Et.includes(dt[0].slice(dt[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dt=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;de;){if(Xe=this.tokenizer.escape(de)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.tag(de,Ee,De)){de=de.substring(Xe.raw.length),Ee=Xe.inLink,De=Xe.inRawBlock,ye.push(Xe);continue}if(Xe=this.tokenizer.link(de)){de=de.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,De)),ye.push(Xe);continue}if(Xe=this.tokenizer.reflink(de,this.tokens.links)){de=de.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,De)),ye.push(Xe);continue}if(Xe=this.tokenizer.strong(de,nt,Be)){de=de.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ee,De),ye.push(Xe);continue}if(Xe=this.tokenizer.em(de,nt,Be)){de=de.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ee,De),ye.push(Xe);continue}if(Xe=this.tokenizer.codespan(de)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.br(de)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.del(de)){de=de.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ee,De),ye.push(Xe);continue}if(Xe=this.tokenizer.autolink(de,ae)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(!Ee&&(Xe=this.tokenizer.url(de,ae))){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.inlineText(de,De,Te)){de=de.substring(Xe.raw.length),Be=Xe.raw.slice(-1),ye.push(Xe);continue}if(de){var ft="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return ye},u(_e,null,[{key:"rules",get:function(){return{block:q,inline:ne}}}]),_e}(),X=S.defaults,Q=z.cleanUrl,pe=z.escape,ce=function(){function _e(Oe){this.options=Oe||X}var Se=_e.prototype;return Se.code=function(de,ye,Ee){var De=(ye||"").match(/\S*/)[0];if(this.options.highlight){var Be=this.options.highlight(de,De);Be!=null&&Be!==de&&(Ee=!0,de=Be)}return De?'<pre><code class="'+this.options.langPrefix+pe(De,!0)+'">'+(Ee?de:pe(de,!0))+`</code></pre>
`:"<pre><code>"+(Ee?de:pe(de,!0))+`</code></pre>
`},Se.blockquote=function(de){return`<blockquote>
`+de+`</blockquote>
`},Se.html=function(de){return de},Se.heading=function(de,ye,Ee,De){return this.options.headerIds?"<h"+ye+' id="'+this.options.headerPrefix+De.slug(Ee)+'">'+de+"</h"+ye+`>
`:"<h"+ye+">"+de+"</h"+ye+`>
`},Se.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Se.list=function(de,ye,Ee){var De=ye?"ol":"ul",Be=ye&&Ee!==1?' start="'+Ee+'"':"";return"<"+De+Be+`>
`+de+"</"+De+`>
`},Se.listitem=function(de){return"<li>"+de+`</li>
`},Se.checkbox=function(de){return"<input "+(de?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Se.paragraph=function(de){return"<p>"+de+`</p>
`},Se.table=function(de,ye){return ye&&(ye="<tbody>"+ye+"</tbody>"),`<table>
<thead>
`+de+`</thead>
`+ye+`</table>
`},Se.tablerow=function(de){return`<tr>
`+de+`</tr>
`},Se.tablecell=function(de,ye){var Ee=ye.header?"th":"td",De=ye.align?"<"+Ee+' align="'+ye.align+'">':"<"+Ee+">";return De+de+"</"+Ee+`>
`},Se.strong=function(de){return"<strong>"+de+"</strong>"},Se.em=function(de){return"<em>"+de+"</em>"},Se.codespan=function(de){return"<code>"+de+"</code>"},Se.br=function(){return this.options.xhtml?"<br/>":"<br>"},Se.del=function(de){return"<del>"+de+"</del>"},Se.link=function(de,ye,Ee){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Ee;var De='<a href="'+pe(de)+'"';return ye&&(De+=' title="'+ye+'"'),De+=">"+Ee+"</a>",De},Se.image=function(de,ye,Ee){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Ee;var De='<img src="'+de+'" alt="'+Ee+'"';return ye&&(De+=' title="'+ye+'"'),De+=this.options.xhtml?"/>":">",De},Se.text=function(de){return de},_e}(),we=function(){function _e(){}var Se=_e.prototype;return Se.strong=function(de){return de},Se.em=function(de){return de},Se.codespan=function(de){return de},Se.del=function(de){return de},Se.html=function(de){return de},Se.text=function(de){return de},Se.link=function(de,ye,Ee){return""+Ee},Se.image=function(de,ye,Ee){return""+Ee},Se.br=function(){return""},_e}(),ze=function(){function _e(){this.seen={}}var Se=_e.prototype;return Se.slug=function(de){var ye=de.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var Ee=ye;do this.seen[Ee]++,ye=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},_e}(),Ge=S.defaults,Qe=z.unescape,$e=function(){function _e(Oe){this.options=Oe||Ge,this.options.renderer=this.options.renderer||new ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new we,this.slugger=new ze}_e.parse=function(de,ye){var Ee=new _e(ye);return Ee.parse(de)};var Se=_e.prototype;return Se.parse=function(de,ye){ye===void 0&&(ye=!0);var Ee="",De,Be,Xe,nt,dt,Et,ft,jt,Ct,xt,Yt,$t,Vt,xr,Lt,Er,fr,Wt,Xt=de.length;for(De=0;De<Xt;De++){xt=de[De];switch(xt.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(xt.tokens),xt.depth,Qe(this.parseInline(xt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(xt.text,xt.lang,xt.escaped);continue}case"table":{for(jt="",ft="",nt=xt.header.length,Be=0;Be<nt;Be++)ft+=this.renderer.tablecell(this.parseInline(xt.tokens.header[Be]),{header:!0,align:xt.align[Be]});for(jt+=this.renderer.tablerow(ft),Ct="",nt=xt.cells.length,Be=0;Be<nt;Be++){for(Et=xt.tokens.cells[Be],ft="",dt=Et.length,Xe=0;Xe<dt;Xe++)ft+=this.renderer.tablecell(this.parseInline(Et[Xe]),{header:!1,align:xt.align[Xe]});Ct+=this.renderer.tablerow(ft)}Ee+=this.renderer.table(jt,Ct);continue}case"blockquote":{Ct=this.parse(xt.tokens),Ee+=this.renderer.blockquote(Ct);continue}case"list":{for(Yt=xt.ordered,$t=xt.start,Vt=xt.loose,nt=xt.items.length,Ct="",Be=0;Be<nt;Be++)Lt=xt.items[Be],Er=Lt.checked,fr=Lt.task,xr="",Lt.task&&(Wt=this.renderer.checkbox(Er),Vt?Lt.tokens.length>0&&Lt.tokens[0].type==="text"?(Lt.tokens[0].text=Wt+" "+Lt.tokens[0].text,Lt.tokens[0].tokens&&Lt.tokens[0].tokens.length>0&&Lt.tokens[0].tokens[0].type==="text"&&(Lt.tokens[0].tokens[0].text=Wt+" "+Lt.tokens[0].tokens[0].text)):Lt.tokens.unshift({type:"text",text:Wt}):xr+=Wt),xr+=this.parse(Lt.tokens,Vt),Ct+=this.renderer.listitem(xr,fr,Er);Ee+=this.renderer.list(Ct,Yt,$t);continue}case"html":{Ee+=this.renderer.html(xt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(xt.tokens));continue}case"text":{for(Ct=xt.tokens?this.parseInline(xt.tokens):xt.text;De+1<Xt&&de[De+1].type==="text";)xt=de[++De],Ct+=`
`+(xt.tokens?this.parseInline(xt.tokens):xt.text);Ee+=ye?this.renderer.paragraph(Ct):Ct;continue}default:{var $r='Token with "'+xt.type+'" type was not found.';if(this.options.silent){console.error($r);return}else throw new Error($r)}}}return Ee},Se.parseInline=function(de,ye){ye=ye||this.renderer;var Ee="",De,Be,Xe=de.length;for(De=0;De<Xe;De++){Be=de[De];switch(Be.type){case"escape":{Ee+=ye.text(Be.text);break}case"html":{Ee+=ye.html(Be.text);break}case"link":{Ee+=ye.link(Be.href,Be.title,this.parseInline(Be.tokens,ye));break}case"image":{Ee+=ye.image(Be.href,Be.title,Be.text);break}case"strong":{Ee+=ye.strong(this.parseInline(Be.tokens,ye));break}case"em":{Ee+=ye.em(this.parseInline(Be.tokens,ye));break}case"codespan":{Ee+=ye.codespan(Be.text);break}case"br":{Ee+=ye.br();break}case"del":{Ee+=ye.del(this.parseInline(Be.tokens,ye));break}case"text":{Ee+=ye.text(Be.text);break}default:{var nt='Token with "'+Be.type+'" type was not found.';if(this.options.silent){console.error(nt);return}else throw new Error(nt)}}}return Ee},_e}(),rt=z.merge,et=z.checkSanitizeDeprecation,Me=z.escape,Ce=S.getDefaults,Ve=S.changeDefaults,tt=S.defaults;function He(_e,Se,Oe){if(typeof _e=="undefined"||_e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof _e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(_e)+", string expected");if(typeof Se=="function"&&(Oe=Se,Se=null),Se=rt({},He.defaults,Se||{}),et(Se),Oe){var de=Se.highlight,ye;try{ye=J.lex(_e,Se)}catch(Xe){return Oe(Xe)}var Ee=function(nt){var dt;if(!nt)try{dt=$e.parse(ye,Se)}catch(Et){nt=Et}return Se.highlight=de,nt?Oe(nt):Oe(null,dt)};if(!de||de.length<3)return Ee();if(delete Se.highlight,!ye.length)return Ee();var De=0;He.walkTokens(ye,function(Xe){Xe.type==="code"&&(De++,setTimeout(function(){de(Xe.text,Xe.lang,function(nt,dt){if(nt)return Ee(nt);dt!=null&&dt!==Xe.text&&(Xe.text=dt,Xe.escaped=!0),De--,De===0&&Ee()})},0))}),De===0&&Ee();return}try{var Be=J.lex(_e,Se);return Se.walkTokens&&He.walkTokens(Be,Se.walkTokens),$e.parse(Be,Se)}catch(Xe){if(Xe.message+=`
Please report this to https://github.com/markedjs/marked.`,Se.silent)return"<p>An error occurred:</p><pre>"+Me(Xe.message+"",!0)+"</pre>";throw Xe}}He.options=He.setOptions=function(_e){return rt(He.defaults,_e),Ve(He.defaults),He},He.getDefaults=Ce,He.defaults=tt,He.use=function(_e){var Se=rt({},_e);if(_e.renderer&&function(){var de=He.defaults.renderer||new ce,ye=function(Be){var Xe=de[Be];de[Be]=function(){for(var nt=arguments.length,dt=new Array(nt),Et=0;Et<nt;Et++)dt[Et]=arguments[Et];var ft=_e.renderer[Be].apply(de,dt);return ft===!1&&(ft=Xe.apply(de,dt)),ft}};for(var Ee in _e.renderer)ye(Ee);Se.renderer=de}(),_e.tokenizer&&function(){var de=He.defaults.tokenizer||new he,ye=function(Be){var Xe=de[Be];de[Be]=function(){for(var nt=arguments.length,dt=new Array(nt),Et=0;Et<nt;Et++)dt[Et]=arguments[Et];var ft=_e.tokenizer[Be].apply(de,dt);return ft===!1&&(ft=Xe.apply(de,dt)),ft}};for(var Ee in _e.tokenizer)ye(Ee);Se.tokenizer=de}(),_e.walkTokens){var Oe=He.defaults.walkTokens;Se.walkTokens=function(de){_e.walkTokens(de),Oe&&Oe(de)}}He.setOptions(Se)},He.walkTokens=function(_e,Se){for(var Oe=h(_e),de;!(de=Oe()).done;){var ye=de.value;Se(ye);switch(ye.type){case"table":{for(var Ee=h(ye.tokens.header),De;!(De=Ee()).done;){var Be=De.value;He.walkTokens(Be,Se)}for(var Xe=h(ye.tokens.cells),nt;!(nt=Xe()).done;)for(var dt=nt.value,Et=h(dt),ft;!(ft=Et()).done;){var jt=ft.value;He.walkTokens(jt,Se)}break}case"list":{He.walkTokens(ye.items,Se);break}default:ye.tokens&&He.walkTokens(ye.tokens,Se)}}},He.Parser=$e,He.parser=$e.parse,He.Renderer=ce,He.TextRenderer=we,He.Lexer=J,He.lexer=J.lex,He.Tokenizer=he,He.Slugger=ze,He.parse=He;var Je=He;return Je})},"DlR+":function(N,Y,k){var P=k("MFOe"),u=P.Global,C=P.trim;N.exports={name:"cookieStorage",read:h,write:S,each:s,remove:f,clearAll:a};var R=u.document;function h(r){if(!r||!o(r))return null;var x="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(R.cookie.replace(new RegExp(x),"$1"))}function s(r){for(var x=R.cookie.split(/; ?/g),g=x.length-1;g>=0;g--){if(!C(x[g]))continue;var m=x[g].split("="),w=unescape(m[0]),p=unescape(m[1]);r(p,w)}}function S(r,x){if(!r)return;R.cookie=escape(r)+"="+escape(x)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function f(r){if(!r||!o(r))return;R.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function a(){s(function(r,x){f(x)})}function o(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(R.cookie)}},E4JC:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.StreamCipher,h=u.algo,s=[],S=[],f=[],a=h.Rabbit=R.extend({_doReset:function(){for(var r=this._key.words,x=this.cfg.iv,g=0;g<4;g++)r[g]=(r[g]<<8|r[g]>>>24)&16711935|(r[g]<<24|r[g]>>>8)&4278255360;var m=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 g=0;g<4;g++)o.call(this);for(var g=0;g<8;g++)w[g]^=m[g+4&7];if(x){var p=x.words,d=p[0],n=p[1],l=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,c=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=l>>>16|c&4294901760,v=c<<16|l&65535;w[0]^=l,w[1]^=T,w[2]^=c,w[3]^=v,w[4]^=l,w[5]^=T,w[6]^=c,w[7]^=v;for(var g=0;g<4;g++)o.call(this)}},_doProcessBlock:function(r,x){var g=this._X;o.call(this),s[0]=g[0]^g[5]>>>16^g[3]<<16,s[1]=g[2]^g[7]>>>16^g[5]<<16,s[2]=g[4]^g[1]>>>16^g[7]<<16,s[3]=g[6]^g[3]>>>16^g[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,r[x+m]^=s[m]},blockSize:128/32,ivSize:64/32});function o(){for(var r=this._X,x=this._C,g=0;g<8;g++)S[g]=x[g];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<S[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<S[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<S[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<S[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<S[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<S[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<S[6]>>>0?1:0)|0,this._b=x[7]>>>0<S[7]>>>0?1:0;for(var g=0;g<8;g++){var m=r[g]+x[g],w=m&65535,p=m>>>16,d=((w*w>>>17)+w*p>>>15)+p*p,n=((m&4294901760)*m|0)+((m&65535)*m|0);f[g]=d^n}r[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,r[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,r[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,r[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,r[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,r[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,r[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,r[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}u.Rabbit=R._createHelper(a)}(),P.Rabbit})},ELLl:function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){var u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=P.Pos;P.defineOption("autoCloseBrackets",!1,function(w,p,d){d&&d!=P.Init&&(w.removeKeyMap(h),w.state.closeBrackets=null),p&&(s(R(p,"pairs")),w.state.closeBrackets=p,w.addKeyMap(h))});function R(w,p){return p=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[p]!=null?w[p]:u[p]}var h={Backspace:a,Enter:o};function s(w){for(var p=0;p<w.length;p++){var d=w.charAt(p),n="'"+d+"'";h[n]||(h[n]=S(d))}}s(u.pairs+"`");function S(w){return function(p){return x(p,w)}}function f(w){var p=w.state.closeBrackets;if(!p||p.override)return p;var d=w.getModeAt(w.getCursor());return d.closeBrackets||p}function a(w){var p=f(w);if(!p||w.getOption("disableInput"))return P.Pass;for(var d=R(p,"pairs"),n=w.listSelections(),l=0;l<n.length;l++){if(!n[l].empty())return P.Pass;var c=g(w,n[l].head);if(!c||d.indexOf(c)%2!=0)return P.Pass}for(var l=n.length-1;l>=0;l--){var T=n[l].head;w.replaceRange("",C(T.line,T.ch-1),C(T.line,T.ch+1),"+delete")}}function o(w){var p=f(w),d=p&&R(p,"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 c=g(w,n[l].head);if(!c||d.indexOf(c)%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 v=0;v<n.length;v++){var i=n[v].head.line;w.indentLine(i,null,!0),w.indentLine(i+1,null,!0)}})}function r(w){var p=P.cmpPos(w.anchor,w.head)>0;return{anchor:new C(w.anchor.line,w.anchor.ch+(p?-1:1)),head:new C(w.head.line,w.head.ch+(p?1:-1))}}function x(w,p){var d=f(w);if(!d||w.getOption("disableInput"))return P.Pass;var n=R(d,"pairs"),l=n.indexOf(p);if(l==-1)return P.Pass;for(var c=R(d,"closeBefore"),T=R(d,"triples"),v=n.charAt(l+1)==p,i=w.listSelections(),L=l%2==0,A,y=0;y<i.length;y++){var E=i[y],b=E.head,_,I=w.getRange(b,C(b.line,b.ch+1));if(L&&!E.empty())_="surround";else if((v||!L)&&I==p)v&&m(w,b)?_="both":T.indexOf(p)>=0&&w.getRange(b,C(b.line,b.ch+3))==p+p+p?_="skipThree":_="skip";else if(v&&b.ch>1&&T.indexOf(p)>=0&&w.getRange(C(b.line,b.ch-2),b)==p+p){if(b.ch>2&&/\bstring/.test(w.getTokenTypeAt(C(b.line,b.ch-2))))return P.Pass;_="addFour"}else if(v){var j=b.ch==0?" ":w.getRange(C(b.line,b.ch-1),b);if(!P.isWordChar(I)&&j!=p&&!P.isWordChar(j))_="both";else return P.Pass}else if(L&&(I.length===0||/\s/.test(I)||c.indexOf(I)>-1))_="both";else return P.Pass;if(!A)A=_;else if(A!=_)return P.Pass}var M=l%2?n.charAt(l-1):p,G=l%2?p:n.charAt(l+1);w.operation(function(){if(A=="skip")w.execCommand("goCharRight");else if(A=="skipThree")for(var K=0;K<3;K++)w.execCommand("goCharRight");else if(A=="surround"){for(var H=w.getSelections(),K=0;K<H.length;K++)H[K]=M+H[K]+G;w.replaceSelections(H,"around"),H=w.listSelections().slice();for(var K=0;K<H.length;K++)H[K]=r(H[K]);w.setSelections(H)}else A=="both"?(w.replaceSelection(M+G,null),w.triggerElectric(M+G),w.execCommand("goCharLeft")):A=="addFour"&&(w.replaceSelection(M+M+M+M,"before"),w.execCommand("goCharRight"))})}function g(w,p){var d=w.getRange(C(p.line,p.ch-1),C(p.line,p.ch+1));return d.length==2?d:null}function m(w,p){var d=w.getTokenAt(C(p.line,p.ch+1));return/\bstring/.test(d.type)&&d.start==p.ch&&(p.ch==0||!/\bstring/.test(w.getTokenTypeAt(p)))}})},ELcG:function(N,Y,k){(function(P,u){N.exports=Y=u(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(u){var C=P,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.algo,f=h.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]),a=h.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]),o=h.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=h.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]),x=h.create([0,1518500249,1859775393,2400959708,2840853838]),g=h.create([1352829926,1548603684,1836072691,2053994217,0]),m=S.RIPEMD160=s.extend({_doReset:function(){this._hash=h.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,v){for(var i=0;i<16;i++){var L=v+i,A=T[L];T[L]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}var y=this._hash.words,E=x.words,b=g.words,_=f.words,I=a.words,j=o.words,M=r.words,G,K,H,z,B,W,F,$,ee,Z;W=G=y[0],F=K=y[1],$=H=y[2],ee=z=y[3],Z=B=y[4];for(var ve,i=0;i<80;i+=1)ve=G+T[v+_[i]]|0,i<16?ve+=w(K,H,z)+E[0]:i<32?ve+=p(K,H,z)+E[1]:i<48?ve+=d(K,H,z)+E[2]:i<64?ve+=n(K,H,z)+E[3]:ve+=l(K,H,z)+E[4],ve=ve|0,ve=c(ve,j[i]),ve=ve+B|0,G=B,B=z,z=c(H,10),H=K,K=ve,ve=W+T[v+I[i]]|0,i<16?ve+=l(F,$,ee)+b[0]:i<32?ve+=n(F,$,ee)+b[1]:i<48?ve+=d(F,$,ee)+b[2]:i<64?ve+=p(F,$,ee)+b[3]:ve+=w(F,$,ee)+b[4],ve=ve|0,ve=c(ve,M[i]),ve=ve+Z|0,W=Z,Z=ee,ee=c($,10),$=F,F=ve;ve=y[1]+H+ee|0,y[1]=y[2]+z+Z|0,y[2]=y[3]+B+W|0,y[3]=y[4]+G+F|0,y[4]=y[0]+K+$|0,y[0]=ve},_doFinalize:function(){var T=this._data,v=T.words,i=this._nDataBytes*8,L=T.sigBytes*8;v[L>>>5]|=128<<24-L%32,v[(L+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,T.sigBytes=(v.length+1)*4,this._process();for(var A=this._hash,y=A.words,E=0;E<5;E++){var b=y[E];y[E]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}return A},clone:function(){var T=s.clone.call(this);return T._hash=this._hash.clone(),T}});function w(T,v,i){return T^v^i}function p(T,v,i){return T&v|~T&i}function d(T,v,i){return(T|~v)^i}function n(T,v,i){return T&i|v&~i}function l(T,v,i){return T^(v|~i)}function c(T,v){return T<<v|T>>>32-v}C.RIPEMD160=s._createHelper(m),C.HmacRIPEMD160=s._createHmacHelper(m)}(Math),P.RIPEMD160})},ETIr:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.enc,s=h.Base64={stringify:function(f){var a=f.words,o=f.sigBytes,r=this._map;f.clamp();for(var x=[],g=0;g<o;g+=3)for(var m=a[g>>>2]>>>24-g%4*8&255,w=a[g+1>>>2]>>>24-(g+1)%4*8&255,p=a[g+2>>>2]>>>24-(g+2)%4*8&255,d=m<<16|w<<8|p,n=0;n<4&&g+n*.75<o;n++)x.push(r.charAt(d>>>6*(3-n)&63));var l=r.charAt(64);if(l)for(;x.length%4;)x.push(l);return x.join("")},parse:function(f){var a=f.length,o=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var x=0;x<o.length;x++)r[o.charCodeAt(x)]=x}var g=o.charAt(64);if(g){var m=f.indexOf(g);m!==-1&&(a=m)}return S(f,a,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(f,a,o){for(var r=[],x=0,g=0;g<a;g++)if(g%4){var m=o[f.charCodeAt(g-1)]<<g%4*2,w=o[f.charCodeAt(g)]>>>6-g%4*2,p=m|w;r[x>>>2]|=p<<24-x%4*8,x++}return R.create(r,x)}}(),P.enc.Base64})},"F+F2":function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var u=P,C=u.lib,R=C.WordArray,h=R.init,s=R.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 f=S.byteLength,a=[],o=0;o<f;o++)a[o>>>2]|=S[o]<<24-o%4*8;h.call(this,a,f)}else h.apply(this,arguments)};s.prototype=R}(),P.lib.WordArray})},GRuw:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("lPiR"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.algo,s=h.SHA256,S=h.SHA224=s.extend({_doReset:function(){this._hash=new R.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=s._doFinalize.call(this);return f.sigBytes-=4,f}});u.SHA224=s._createHelper(S),u.HmacSHA224=s._createHmacHelper(S)}(),P.SHA224})},GfqC:function(N,Y,k){"use strict";var P=k("q1tI"),u=k.n(P),C=k("TSYQ"),R=k.n(C);function h(z,B){var W="cannot "+z.method+" "+z.action+" "+B.status+"'",F=new Error(W);return F.status=B.status,F.method=z.method,F.url=z.action,F}function s(z){var B=z.responseText||z.response;if(!B)return B;try{return JSON.parse(B)}catch(W){return B}}function S(z){var B=new XMLHttpRequest;z.onProgress&&B.upload&&(B.upload.onprogress=function(ee){ee.total>0&&(ee.percent=ee.loaded/ee.total*100),z.onProgress(ee)});var W=new FormData;z.data&&Object.keys(z.data).forEach(function($){var ee=z.data[$];if(Array.isArray(ee)){ee.forEach(function(Z){W.append($+"[]",Z)});return}W.append($,z.data[$])}),z.file instanceof Blob?W.append(z.filename,z.file,z.file.name):W.append(z.filename,z.file),B.onerror=function(ee){z.onError(ee)},B.onload=function(){return B.status<200||B.status>=300?z.onError(h(z,B),s(B)):z.onSuccess(s(B),B)},B.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var F=z.headers||{};return F["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(F).forEach(function($){F[$]!==null&&B.setRequestHeader($,F[$])}),B.send(W),{abort:function(){B.abort()}}}var f=+new Date,a=0;function o(){return"rc-upload-"+f+"-"+ ++a}function r(z,B){return z.indexOf(B,z.length-B.length)!==-1}var x=function(z,B){if(z&&B){var W=Array.isArray(B)?B:B.split(","),F=z.name||"",$=z.type||"",ee=$.replace(/\/.*$/,"");return W.some(function(Z){var ve=Z.trim();return ve.charAt(0)==="."?r(F.toLowerCase(),ve.toLowerCase()):/\/\*$/.test(ve)?ee===ve.replace(/\/.*$/,""):$===ve})}return!0};function g(z,B){var W=z.createReader(),F=[];function $(){W.readEntries(function(ee){var Z=Array.prototype.slice.apply(ee);F=F.concat(Z);var ve=!Z.length;ve?B(F):$()})}$()}var m=function(B,W,F){var $=function ee(Z,ve){ve=ve||"",Z.isFile?Z.file(function(he){F(he)&&(Z.fullPath&&!he.webkitRelativePath&&(Object.defineProperties(he,{webkitRelativePath:{writable:!0}}),he.webkitRelativePath=Z.fullPath.replace(/^\//,""),Object.defineProperties(he,{webkitRelativePath:{writable:!1}})),W([he]))}):Z.isDirectory&&g(Z,function(he){he.forEach(function(le){ee(le,""+ve+Z.name+"/")})})};B.forEach(function(ee){$(ee.webkitGetAsEntry())})},w=m,p=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var W=arguments[B];for(var F in W)Object.prototype.hasOwnProperty.call(W,F)&&(z[F]=W[F])}return z},d=function(){function z(B,W){var F=[],$=!0,ee=!1,Z=void 0;try{for(var ve=B[Symbol.iterator](),he;!($=(he=ve.next()).done)&&!(F.push(he.value),W&&F.length===W);$=!0);}catch(le){ee=!0,Z=le}finally{try{!$&&ve.return&&ve.return()}finally{if(ee)throw Z}}return F}return function(B,W){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return z(B,W);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function z(B,W){for(var F=0;F<W.length;F++){var $=W[F];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(B,$.key,$)}}return function(B,W,F){return W&&z(B.prototype,W),F&&z(B,F),B}}();function l(z,B,W){return B in z?Object.defineProperty(z,B,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[B]=W,z}function c(z,B){var W={};for(var F in z){if(B.indexOf(F)>=0)continue;if(!Object.prototype.hasOwnProperty.call(z,F))continue;W[F]=z[F]}return W}function T(z,B){if(!(z instanceof B))throw new TypeError("Cannot call a class as a function")}function v(z,B){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:z}function i(z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);z.prototype=Object.create(B&&B.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(z,B):z.__proto__=B)}var L=function(B){return Object.keys(B).reduce(function(W,F){return(F.substr(0,5)==="data-"||F.substr(0,5)==="aria-"||F==="role")&&(W[F]=B[F]),W},{})},A=function(z){i(B,z);function B(){var W,F,$,ee;T(this,B);for(var Z=arguments.length,ve=Array(Z),he=0;he<Z;he++)ve[he]=arguments[he];return ee=(F=($=v(this,(W=B.__proto__||Object.getPrototypeOf(B)).call.apply(W,[this].concat(ve))),$),$.state={uid:o()},$.reqs={},$.onChange=function(le){var Re=le.target.files;$.uploadFiles(Re),$.reset()},$.onClick=function(le){var Re=$.fileInput;if(!Re)return;var xe=$.props,ie=xe.children,se=xe.onClick;ie&&ie.type==="button"&&(Re.parentNode.focus(),Re.parentNode.querySelector("button").blur()),Re.click(),se&&se(le)},$.onKeyDown=function(le){le.key==="Enter"&&$.onClick()},$.onFileDrop=function(le){var Re=$.props.multiple;if(le.preventDefault(),le.type==="dragover")return;if($.props.directory)w(Array.prototype.slice.call(le.dataTransfer.items),$.uploadFiles,function(ie){return x(ie,$.props.accept)});else{var xe=Array.prototype.slice.call(le.dataTransfer.files).filter(function(ie){return x(ie,$.props.accept)});Re===!1&&(xe=xe.slice(0,1)),$.uploadFiles(xe)}},$.uploadFiles=function(le){var Re=Array.prototype.slice.call(le);Re.map(function(xe){return xe.uid=o(),xe}).forEach(function(xe){$.upload(xe,Re)})},$.saveFileInput=function(le){$.fileInput=le},F),v($,ee)}return n(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(F,$){var ee=this,Z=this.props;if(!Z.beforeUpload)return setTimeout(function(){return ee.post(F)},0);var ve=Z.beforeUpload(F,$);ve&&ve.then?ve.then(function(he){var le=Object.prototype.toString.call(he);return le==="[object File]"||le==="[object Blob]"?ee.post(he):ee.post(F)}).catch(function(he){console.log(he)}):ve!==!1&&setTimeout(function(){return ee.post(F)},0);return}},{key:"post",value:function(F){var $=this;if(!this._isMounted)return;var ee=this.props,Z=ee.onStart,ve=ee.onProgress,he=ee.transformFile,le=he===void 0?function(Re){return Re}:he;new Promise(function(Re){var xe=ee.action;return typeof xe=="function"&&(xe=xe(F)),Re(xe)}).then(function(Re){var xe=F.uid,ie=ee.customRequest||S,se=Promise.resolve(le(F)).then(function(re){var be=ee.data;return typeof be=="function"&&(be=be(re)),Promise.all([re,be])}).catch(function(re){console.error(re)});se.then(function(re){var be=d(re,2),q=be[0],ne=be[1],Te={action:Re,filename:ee.name,data:ne,file:q,headers:ee.headers,withCredentials:ee.withCredentials,method:ee.method||"post",onProgress:ve?function(ae){ve(ae,F)}:null,onSuccess:function(J,X){delete $.reqs[xe],ee.onSuccess(J,F,X)},onError:function(J,X){delete $.reqs[xe],ee.onError(J,X,F)}};Z(F),$.reqs[xe]=ie(Te)})})}},{key:"reset",value:function(){this.setState({uid:o()})}},{key:"abort",value:function(F){var $=this.reqs;if(F){var ee=F;F&&F.uid&&(ee=F.uid),$[ee]&&$[ee].abort&&$[ee].abort(),delete $[ee]}else Object.keys($).forEach(function(Z){$[Z]&&$[Z].abort&&$[Z].abort(),delete $[Z]})}},{key:"render",value:function(){var F,$=this.props,ee=$.component,Z=$.prefixCls,ve=$.className,he=$.disabled,le=$.id,Re=$.style,xe=$.multiple,ie=$.accept,se=$.children,re=$.directory,be=$.openFileDialogOnClick,q=$.onMouseEnter,ne=$.onMouseLeave,Te=c($,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ae=R()((F={},l(F,Z,!0),l(F,Z+"-disabled",he),l(F,ve,ve),F)),J=he?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:q,onMouseLeave:ne,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return u.a.createElement(ee,p({},J,{className:ae,role:"button",style:Re}),u.a.createElement("input",p({},L(Te),{id:le,type:"file",ref:this.saveFileInput,onClick:function(Q){return Q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ie,directory:re?"directory":null,webkitdirectory:re?"webkitdirectory":null,multiple:xe,onChange:this.onChange})),se)}}]),B}(P.Component),y=A,E=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var W=arguments[B];for(var F in W)Object.prototype.hasOwnProperty.call(W,F)&&(z[F]=W[F])}return z},b=function(){function z(B,W){for(var F=0;F<W.length;F++){var $=W[F];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(B,$.key,$)}}return function(B,W,F){return W&&z(B.prototype,W),F&&z(B,F),B}}();function _(z,B){if(!(z instanceof B))throw new TypeError("Cannot call a class as a function")}function I(z,B){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:z}function j(z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);z.prototype=Object.create(B&&B.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(z,B):z.__proto__=B)}function M(){}var G=function(z){j(B,z);function B(){var W,F,$,ee;_(this,B);for(var Z=arguments.length,ve=Array(Z),he=0;he<Z;he++)ve[he]=arguments[he];return ee=(F=($=I(this,(W=B.__proto__||Object.getPrototypeOf(B)).call.apply(W,[this].concat(ve))),$),$.saveUploader=function(le){$.uploader=le},F),I($,ee)}return b(B,[{key:"abort",value:function(F){this.uploader.abort(F)}},{key:"render",value:function(){return u.a.createElement(y,E({},this.props,{ref:this.saveUploader}))}}]),B}(P.Component);G.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 K=G,H=Y.a=K},HmJG:function(N,Y,k){},IBYe:function(N,Y,k){"use strict";function P(u){return null}Y.a=P},Ib8C:function(N,Y,k){(function(P){(function(u,C){N.exports=Y=C()})(this,function(){var u=u||function(C,R){var h;if(typeof window!="undefined"&&window.crypto&&(h=window.crypto),typeof self!="undefined"&&self.crypto&&(h=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(h=globalThis.crypto),!h&&typeof window!="undefined"&&window.msCrypto&&(h=window.msCrypto),!h&&typeof P!="undefined"&&P.crypto&&(h=P.crypto),!h&&!0)try{h=k(4)}catch(l){}var s=function(){if(h){if(typeof h.getRandomValues=="function")try{return h.getRandomValues(new Uint32Array(1))[0]}catch(l){}if(typeof h.randomBytes=="function")try{return h.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(c){var T;return l.prototype=c,T=new l,l.prototype=null,T}}(),f={},a=f.lib={},o=a.Base=function(){return{extend:function(l){var c=S(this);return l&&c.mixIn(l),(!c.hasOwnProperty("init")||this.init===c.init)&&(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var c in l)l.hasOwnProperty(c)&&(this[c]=l[c]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=a.WordArray=o.extend({init:function(l,c){l=this.words=l||[],c!=R?this.sigBytes=c:this.sigBytes=l.length*4},toString:function(l){return(l||g).stringify(this)},concat:function(l){var c=this.words,T=l.words,v=this.sigBytes,i=l.sigBytes;if(this.clamp(),v%4)for(var L=0;L<i;L++){var A=T[L>>>2]>>>24-L%4*8&255;c[v+L>>>2]|=A<<24-(v+L)%4*8}else for(var y=0;y<i;y+=4)c[v+y>>>2]=T[y>>>2];return this.sigBytes+=i,this},clamp:function(){var l=this.words,c=this.sigBytes;l[c>>>2]&=4294967295<<32-c%4*8,l.length=C.ceil(c/4)},clone:function(){var l=o.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var c=[],T=0;T<l;T+=4)c.push(s());return new r.init(c,l)}}),x=f.enc={},g=x.Hex={stringify:function(l){for(var c=l.words,T=l.sigBytes,v=[],i=0;i<T;i++){var L=c[i>>>2]>>>24-i%4*8&255;v.push((L>>>4).toString(16)),v.push((L&15).toString(16))}return v.join("")},parse:function(l){for(var c=l.length,T=[],v=0;v<c;v+=2)T[v>>>3]|=parseInt(l.substr(v,2),16)<<24-v%8*4;return new r.init(T,c/2)}},m=x.Latin1={stringify:function(l){for(var c=l.words,T=l.sigBytes,v=[],i=0;i<T;i++){var L=c[i>>>2]>>>24-i%4*8&255;v.push(String.fromCharCode(L))}return v.join("")},parse:function(l){for(var c=l.length,T=[],v=0;v<c;v++)T[v>>>2]|=(l.charCodeAt(v)&255)<<24-v%4*8;return new r.init(T,c)}},w=x.Utf8={stringify:function(l){try{return decodeURIComponent(escape(m.stringify(l)))}catch(c){throw new Error("Malformed UTF-8 data")}},parse:function(l){return m.parse(unescape(encodeURIComponent(l)))}},p=a.BufferedBlockAlgorithm=o.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 c,T=this._data,v=T.words,i=T.sigBytes,L=this.blockSize,A=L*4,y=i/A;l?y=C.ceil(y):y=C.max((y|0)-this._minBufferSize,0);var E=y*L,b=C.min(E*4,i);if(E){for(var _=0;_<E;_+=L)this._doProcessBlock(v,_);c=v.splice(0,E),T.sigBytes-=b}return new r.init(c,b)},clone:function(){var l=o.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0}),d=a.Hasher=p.extend({cfg:o.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var c=this._doFinalize();return c},blockSize:512/32,_createHelper:function(l){return function(c,T){return new l.init(T).finalize(c)}},_createHmacHelper:function(l){return function(c,T){return new n.HMAC.init(l,T).finalize(c)}}}),n=f.algo={};return f}(Math);return u})}).call(this,k("IyRk"))},J66h:function(N,Y,k){(function(P){var u,C;(function(R,h){N.exports=h(R)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof P!="undefined"?P:this,function(R){"use strict";R=R||{};var h=R.Base64,s="2.6.4",S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=function(M){for(var G={},K=0,H=M.length;K<H;K++)G[M.charAt(K)]=K;return G}(S),a=String.fromCharCode,o=function(M){if(M.length<2){var G=M.charCodeAt(0);return G<128?M:G<2048?a(192|G>>>6)+a(128|G&63):a(224|G>>>12&15)+a(128|G>>>6&63)+a(128|G&63)}else{var G=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return a(240|G>>>18&7)+a(128|G>>>12&63)+a(128|G>>>6&63)+a(128|G&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(M){return M.replace(r,o)},g=function(M){var G=[0,2,1][M.length%3],K=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),H=[S.charAt(K>>>18),S.charAt(K>>>12&63),G>=2?"=":S.charAt(K>>>6&63),G>=1?"=":S.charAt(K&63)];return H.join("")},m=R.btoa&&typeof R.btoa=="function"?function(M){return R.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,g)},w=function(M){return m(x(String(M)))},p=function(M){return M.replace(/[+\/]/g,function(G){return G=="+"?"-":"_"}).replace(/=/g,"")},d=function(M,G){return G?p(w(M)):w(M)},n=function(M){return d(M,!0)},l;R.Uint8Array&&(l=function(M,G){for(var K="",H=0,z=M.length;H<z;H+=3){var B=M[H],W=M[H+1],F=M[H+2],$=B<<16|W<<8|F;K+=S.charAt($>>>18)+S.charAt($>>>12&63)+(typeof W!="undefined"?S.charAt($>>>6&63):"=")+(typeof F!="undefined"?S.charAt($&63):"=")}return G?p(K):K});var c=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=function(M){switch(M.length){case 4:var G=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),K=G-65536;return a((K>>>10)+55296)+a((K&1023)+56320);case 3:return a((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return a((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},v=function(M){return M.replace(c,T)},i=function(M){var G=M.length,K=G%4,H=(G>0?f[M.charAt(0)]<<18:0)|(G>1?f[M.charAt(1)]<<12:0)|(G>2?f[M.charAt(2)]<<6:0)|(G>3?f[M.charAt(3)]:0),z=[a(H>>>16),a(H>>>8&255),a(H&255)];return z.length-=[0,0,2,1][K],z.join("")},L=R.atob&&typeof R.atob=="function"?function(M){return R.atob(M)}:function(M){return M.replace(/\S{1,4}/g,i)},A=function(M){return L(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(M){return v(L(M))},E=function(M){return String(M).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},b=function(M){return y(E(M))},_;R.Uint8Array&&(_=function(M){return Uint8Array.from(A(E(M)),function(G){return G.charCodeAt(0)})});var I=function(){var M=R.Base64;return R.Base64=h,M};if(R.Base64={VERSION:s,atob:A,btoa:m,fromBase64:b,toBase64:d,utob:x,encode:d,encodeURI:n,btou:v,decode:b,noConflict:I,fromUint8Array:l,toUint8Array:_},typeof Object.defineProperty=="function"){var j=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};R.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 R.Meteor&&(Base64=R.Base64),N.exports?N.exports.Base64=R.Base64:!(u=[],C=function(){return R.Base64}.apply(Y,u),C!==void 0&&(N.exports=C)),{Base64:R.Base64}})}).call(this,k("IyRk"))},K3mO:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.Base,h=C.WordArray,s=u.algo,S=s.MD5,f=s.EvpKDF=R.extend({cfg:R.extend({keySize:128/32,hasher:S,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,o){for(var r,x=this.cfg,g=x.hasher.create(),m=h.create(),w=m.words,p=x.keySize,d=x.iterations;w.length<p;){r&&g.update(r),r=g.update(a).finalize(o),g.reset();for(var n=1;n<d;n++)r=g.finalize(r),g.reset();m.concat(r)}return m.sigBytes=p*4,m}});u.EvpKDF=function(a,o,r){return f.create(r).compute(a,o)}}(),P.EvpKDF})},KhGG:function(N,Y,k){"use strict";k.d(Y,"a",function(){return i}),k.d(Y,"c",function(){return A});var P=k("0Owb"),u=k("miYZ"),C=k("tsqr"),R=k("oBTY"),h=k("tJVT"),s=k("PpiC"),S=k("k1fw"),f=k("9og8"),a=k("DZo9"),o=k("8z0m"),r=k("WmNS"),x=k.n(r),g=k("q1tI"),m=k.n(g),w=k("ErOA"),p=k("NFKh"),d=k.n(p),n=k("7Cbv"),l=k("9kvl"),c=k("mxV5"),T=k.n(c),v=o.a.Dragger,i=function(b){var _="bf3c199c2470cb477d907b1e0917c17b",I="5183666c72eec9e4",j=d.a.enc.Utf8.parse(_),M=d.a.enc.Utf8.parse(I),G=d.a.AES.decrypt(b,j,{iv:M,mode:d.a.mode.CBC});return G.toString(d.a.enc.Utf8)},L,A=function(){var E=Object(f.a)(x.a.mark(function b(_,I,j){var M,G,K,H,z,B,W,F,$;return x.a.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return I.file_name=_.name,Z.next=3,Object(w.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=Z.sent,console.log("decrypt(res.data):",i(W.data)),W.data=JSON.parse(i(W.data)),F=Object(n.a)(),$=new T.a({endpoint:W==null||((M=W.data)===null||M===void 0)?void 0:M.end_point,region:W==null||((G=W.data)===null||G===void 0)?void 0:G.region,accessKeyId:W==null||((K=W.data)===null||K===void 0)?void 0:K.access_key_id,accessKeySecret:W==null||((H=W.data)===null||H===void 0)?void 0:H.access_key_secret,bucket:W==null||((z=W.data)===null||z===void 0)?void 0:z.bucket,stsToken:W==null||((B=W.data)===null||B===void 0)?void 0:B.security_token}),Z.abrupt("return",new Promise(function(ve,he){var le;$.multipartUpload("".concat(F),new Blob([_],{type:_.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},j),{},{callback:{url:W==null||((le=W.data)===null||le===void 0)?void 0:le.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)(I)}})).then(function(Re){var xe;_.response=(xe=Re.data)===null||xe===void 0?void 0:xe.data,ve(Re==null?void 0:Re.data)}).catch(function(Re){he(Re),console.log("err:",Re)})}));case 9:case"end":return Z.stop()}},b)}));return function(_,I,j){return E.apply(this,arguments)}}(),y=function(b){var _=b.user,I=b.cancelUpload,j=Object(s.a)(b,["user","cancelUpload"]),M=Object(g.useState)([]),G=Object(h.a)(M,2),K=G[0],H=G[1],z=Object(g.useState)(),B=Object(h.a)(z,2),W=B[0],F=B[1],$={onRemove:function(ve){H(Object(R.a)(K.filter(function(he){return he.name!==ve.name}))),j.onChange(K.filter(function(he){return he.name!==ve.name}))},disabled:j.disabled,multiple:!0,fileList:K==null?void 0:K.map(function(Z){return Z.file}),customRequest:function(){},beforeUpload:function(){var Z=Object(f.a)(x.a.mark(function he(le){var Re;return x.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(Re=j.maxSize||1024*1024*1024*1,!K.filter(function(se){return se.name===le.name}).length){ie.next=4;break}return C.b.info("".concat(le.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ie.abrupt("return");case 4:if(!((le==null?void 0:le.size)>Re)){ie.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Re/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ie.abrupt("return",!1);case 7:return K.push({name:le.name,file:le}),H(Object(R.a)(K)),j.onChange(K),ie.abrupt("return",!1);case 11:case"end":return ie.stop()}},he)}));function ve(he){return Z.apply(this,arguments)}return ve}()},ee=function(){var Z=Object(f.a)(x.a.mark(function ve(he,le){var Re,xe,ie,se,re,be,q,ne,Te;return x.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return le.file_name=he.name,q=he.name,J.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ne=J.sent,ne.data=JSON.parse(i(ne.data)),!((ne==null?void 0:ne.status)!==0)){J.next=12;break}return K[K.findIndex(function(X){return X.name===q})].status="error",K[K.findIndex(function(X){return X.name===q})].file.status="error",j.onChange(K),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return W=new T.a({endpoint:ne==null||((Re=ne.data)===null||Re===void 0)?void 0:Re.end_point,region:ne==null||((xe=ne.data)===null||xe===void 0)?void 0:xe.region,accessKeyId:ne==null||((ie=ne.data)===null||ie===void 0)?void 0:ie.access_key_id,accessKeySecret:ne==null||((se=ne.data)===null||se===void 0)?void 0:se.access_key_secret,bucket:ne==null||((re=ne.data)===null||re===void 0)?void 0:re.bucket,stsToken:ne==null||((be=ne.data)===null||be===void 0)?void 0:be.security_token}),console.log(he,"file"),F(W),Te=Object(n.a)(),J.abrupt("return",new Promise(function(X,Q){try{var pe;W.multipartUpload("".concat(j.identifier,"/").concat(Te).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([he.file],{type:he.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(we,ze,Ge){try{console.log("\u8FDB\u5EA6",we,ze,Ge);var Qe=K.findIndex(function($e){return $e.name===q});K[Qe].file.percent=we*100,K[Qe].tempCheckpoint=ze,H(Object(R.a)(K))}catch($e){}},checkpoint:K[K.findIndex(function(ce){return ce.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:ne==null||((pe=ne.data)===null||pe===void 0)?void 0:pe.callback_url,host:ne==null?void 0:ne.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(le)}}).then(function(ce){var we,ze=K.findIndex(function(et){return et.name===q}),Ge="done";if(((we=ce.data)===null||we===void 0?void 0:we.status)===0){var Qe;he.response=(Qe=ce.data)===null||Qe===void 0?void 0:Qe.data;var $e=K.findIndex(function(et){return et.name===q});K[$e].status="done",K[$e].file.status="done"}else{var rt;C.b.warn((rt=ce.data)===null||rt===void 0?void 0:rt.message),Ge="error"}K[ze].status=Ge,K[ze].file.status=Ge,j.onChange(K),X(ce==null?void 0:ce.data)}).catch(function(ce){K[K.findIndex(function(we){return we.name===q})].status="error",K[K.findIndex(function(we){return we.name===q})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(R.a)(K)),j.onChange(K),Q(ce),console.log("err:",ce)})}catch(ce){}}));case 17:case"end":return J.stop()}},ve)}));return function(he,le){return Z.apply(this,arguments)}}();return Object(g.useEffect)(function(){K.every(function(Z){return Z==="done"||Z==="error"})&&j.onComplete(K)},[K]),Object(g.useEffect)(function(){if(I){var Z;(Z=W)===null||Z===void 0||Z.cancel()}},[I]),Object(g.useEffect)(function(){j.uploading&&K.map(function(){var Z=Object(f.a)(x.a.mark(function ve(he){var le,Re;return x.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!((!he.status||he.status==="error")&&!I)){ie.next=6;break}return he.status="uploading",he.file.status="uploading",ie.next=5,ee(he,{login:_==null||((le=_.userInfo)===null||le===void 0)?void 0:le.login,container_type:j.container_type,container_id:j.container_id,description:j.description});case 5:Re=ie.sent;case 6:case"end":return ie.stop()}},ve)}));return function(ve){return Z.apply(this,arguments)}}())},[j.uploading]),m.a.createElement(v,Object(P.a)({},$,{height:j.height,className:j.className}),m.a.createElement("p",{className:"ant-upload-hint"},j.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Y.b=Object(l.b)(function(E){var b=E.loading,_=E.globalSetting,I=E.user;return{globalSetting:_,loading:b.models.competitions,user:I}})(y)},KmYQ:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(u,C){var R=C*4;u.clamp(),u.sigBytes+=R-(u.sigBytes%R||R)},unpad:function(u){for(var C=u.words,R=u.sigBytes-1,R=u.sigBytes-1;R>=0;R--)if(C[R>>>2]>>>24-R%4*8&255){u.sigBytes=R+1;break}}},P.pad.ZeroPadding})},L9qf:function(N,Y,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,Y,k){"use strict";k.d(Y,"b",function(){return c}),k.d(Y,"a",function(){return v});var P=k("1OyB"),u=k("vuIU"),C=k("Ji7U"),R=k("LK+K"),h=k("q1tI"),s=k("rePB"),S=k("Ff2n"),f=k("ODXe"),a=k("4IlW"),o=k("bX4T"),r=k("YrtM"),x=k("TSYQ"),g=k.n(x),m=k("+nKL"),w=k("8OUc"),p=function(F,$){var ee=F.prefixCls,Z=F.id,ve=F.flattenOptions,he=F.childrenAsData,le=F.values,Re=F.searchValue,xe=F.multiple,ie=F.defaultActiveFirstOption,se=F.height,re=F.itemHeight,be=F.notFoundContent,q=F.open,ne=F.menuItemSelectedIcon,Te=F.virtual,ae=F.onSelect,J=F.onToggleOpen,X=F.onActiveValue,Q=F.onScroll,pe=F.onMouseEnter,ce="".concat(ee,"-item"),we=Object(r.a)(function(){return ve},[q,ve],function(Je,_e){return _e[0]&&Je[1]!==_e[1]}),ze=h.useRef(null),Ge=function(_e){_e.preventDefault()},Qe=function(_e){ze.current&&ze.current.scrollTo({index:_e})},$e=function(_e){for(var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=we.length,de=0;de<Oe;de+=1){var ye=(_e+de*Se+Oe)%Oe,Ee=we[ye],De=Ee.group,Be=Ee.data;if(!De&&!Be.disabled)return ye}return-1},rt=h.useState(function(){return $e(0)}),et=Object(f.a)(rt,2),Me=et[0],Ce=et[1],Ve=function(_e){Ce(_e);var Se=we[_e];if(!Se){X(null,-1);return}X(Se.data.value,_e)};h.useEffect(function(){Ve(ie!==!1?$e(0):-1)},[we.length,Re]),h.useEffect(function(){var Je=setTimeout(function(){if(!xe&&q&&le.size===1){var _e=Array.from(le)[0],Se=we.findIndex(function(Oe){var de=Oe.data;return de.value===_e});Ve(Se),Qe(Se)}});return function(){return clearTimeout(Je)}},[q]);var tt=function(_e){_e!==void 0&&ae(_e,{selected:!le.has(_e)}),xe||J(!1)};if(h.useImperativeHandle($,function(){return{onKeyDown:function(_e){var Se=_e.which;switch(Se){case a.a.UP:case a.a.DOWN:{var Oe=0;if(Se===a.a.UP?Oe=-1:Se===a.a.DOWN&&(Oe=1),Oe!==0){var de=$e(Me+Oe,Oe);Qe(de),Ve(de)}break}case a.a.ENTER:{var ye=we[Me];ye&&!ye.data.disabled?tt(ye.data.value):tt(void 0),q&&_e.preventDefault();break}case a.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(_e){Qe(_e)}}}),we.length===0)return h.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),className:"".concat(ce,"-empty"),onMouseDown:Ge},be);function He(Je){var _e=we[Je];if(!_e)return null;var Se=_e.data||{},Oe=Se.value,de=Se.label,ye=Se.children,Ee=Object(o.a)(Se,!0),De=he?ye:de;return _e?h.createElement("div",Object.assign({"aria-label":typeof De=="string"?De:null},Ee,{key:Je,role:"option",id:"".concat(Z,"_list_").concat(Je),"aria-selected":le.has(Oe)}),Oe):null}return h.createElement(h.Fragment,null,h.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),style:{height:0,width:0,overflow:"hidden"}},He(Me-1),He(Me),He(Me+1)),h.createElement(m.a,{itemKey:"key",ref:ze,data:we,height:se,itemHeight:re,fullHeight:!1,onMouseDown:Ge,onScroll:Q,virtual:Te,onMouseEnter:pe},function(Je,_e){var Se,Oe=Je.group,de=Je.groupOption,ye=Je.data,Ee=ye.label,De=ye.key;if(Oe)return h.createElement("div",{className:g()(ce,"".concat(ce,"-group"))},Ee!==void 0?Ee:De);var Be=ye.disabled,Xe=ye.value,nt=ye.title,dt=ye.children,Et=ye.style,ft=ye.className,jt=Object(S.a)(ye,["disabled","value","title","children","style","className"]),Ct=le.has(Xe),xt="".concat(ce,"-option"),Yt=g()(ce,xt,ft,(Se={},Object(s.a)(Se,"".concat(xt,"-grouped"),de),Object(s.a)(Se,"".concat(xt,"-active"),Me===_e&&!Be),Object(s.a)(Se,"".concat(xt,"-disabled"),Be),Object(s.a)(Se,"".concat(xt,"-selected"),Ct),Se)),$t=he?dt:Ee,Vt=!ne||typeof ne=="function"||Ct;return h.createElement("div",Object.assign({},jt,{"aria-selected":Ct,className:Yt,title:nt,onMouseMove:function(){if(Me===_e||Be)return;Ve(_e)},onClick:function(){Be||tt(Xe)},style:Et}),h.createElement("div",{className:"".concat(xt,"-content")},$t||Xe),h.isValidElement(ne)||Ct,Vt&&h.createElement(w.a,{className:"".concat(ce,"-option-state"),customizeIcon:ne,customizeIconProps:{isSelected:Ct}},Ct?"\u2713":null))}))},d=h.forwardRef(p);d.displayName="OptionList";var n=d,l=function(){return null};l.isSelectOption=!0;var c=l,T=function(){return null};T.isSelectOptGroup=!0;var v=T,i=k("VTBJ"),L=k("Zm9Q");function A(W){var F=W.key,$=W.props,ee=$.children,Z=$.value,ve=Object(S.a)($,["children","value"]);return Object(i.a)({key:F,value:Z!==void 0?Z:F,children:ee},ve)}function y(W){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(W).map(function($,ee){if(!h.isValidElement($)||!$.type)return null;var Z=$.type.isSelectOptGroup,ve=$.key,he=$.props,le=he.children,Re=Object(S.a)(he,["children"]);return F||!Z?A($):Object(i.a)(Object(i.a)({key:"__RC_SELECT_GRP__".concat(ve===null?ee:ve,"__"),label:ve},Re),{},{options:y(le)})}).filter(function($){return $})}var E=k("2Qr1"),b=k("qNPg"),_=k("U8pU"),I=k("Kwbf"),j=k("WKfj");function M(W){var F=W.mode,$=W.options,ee=W.children,Z=W.backfill,ve=W.allowClear,he=W.placeholder,le=W.getInputElement,Re=W.showSearch,xe=W.onSearch,ie=W.defaultOpen,se=W.autoFocus,re=W.labelInValue,be=W.value,q=W.inputValue,ne=W.optionLabelProp,Te=F==="multiple"||F==="tags",ae=Re!==void 0?Re:Te||F==="combobox",J=$||y(ee);if(Object(I.a)(F!=="tags"||J.every(function(ce){return!ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),F==="tags"||F==="combobox"){var X=J.some(function(ce){return ce.options?ce.options.some(function(we){return typeof("value"in we?we.value:we.key)=="number"}):typeof("value"in ce?ce.value:ce.key)=="number"});Object(I.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(I.a)(F!=="combobox"||!ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(I.a)(F==="combobox"||!Z,"`backfill` only works with `combobox` mode."),Object(I.a)(F==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),Object(I.b)(F!=="combobox"||!le||!ve||!he,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!ae&&F!=="combobox"&&F!=="tags"&&Object(I.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(I.b)(!ie||se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Q=Object(j.d)(be);Object(I.a)(!re||Q.every(function(ce){return Object(_.a)(ce)==="object"&&("key"in ce||"value"in ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(I.a)(!Te||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var pe=null;Object(L.a)(ee).some(function(ce){if(!h.isValidElement(ce)||!ce.type)return!1;var we=ce.type;if(we.isSelectOption)return!1;if(we.isSelectOptGroup){var ze=Object(L.a)(ce.props.children).every(function(Ge){return!h.isValidElement(Ge)||!ce.type||Ge.type.isSelectOption?!0:(pe=Ge.type,!1)});return!ze}return pe=we,!0}),pe&&Object(I.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pe.displayName||pe.name||pe,"`.")),Object(I.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=M,K=Object(b.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:y,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:G,fillOptionsWithMissingValue:E.a}),H=function(W){Object(C.a)($,W);var F=Object(R.a)($);function $(){var ee;return Object(P.a)(this,$),ee=F.apply(this,arguments),ee.selectRef=h.createRef(),ee.focus=function(){ee.selectRef.current.focus()},ee.blur=function(){ee.selectRef.current.blur()},ee}return Object(u.a)($,[{key:"render",value:function(){return h.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),$}(h.Component);H.Option=c,H.OptGroup=v;var z=H,B=Y.c=z},M8RZ:function(N,Y,k){"use strict";k.d(Y,"a",function(){return a});var P=k("fWQN"),u=k("mtLc"),C=k("yKVA"),R=k("879j"),h=k("q1tI"),s=k.n(h),S=k("i8i4"),f=k.n(S),a=function(o){Object(C.a)(x,o);var r=Object(R.a)(x);function x(g){var m;Object(P.a)(this,x),m=r.call(this,g);var w=window.document;return m.node=w.createElement("div"),w.body.appendChild(m.node),m}return Object(u.a)(x,[{key:"render",value:function(){var m=this.props.children;return Object(S.createPortal)(m,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),x}(s.a.Component)},MFOe:function(N,Y,k){(function(P){var u=s(),C=S(),R=f(),h=typeof window!="undefined"?window:P;N.exports={assign:u,create:C,trim:R,bind:a,slice:o,each:r,map:x,pluck:g,isList:m,isFunction:w,isObject:p,Global:h};function s(){return Object.assign?Object.assign:function(n,l,c,T){for(var v=1;v<arguments.length;v++)r(Object(arguments[v]),function(i,L){n[L]=i});return n}}function S(){if(Object.create)return function(l,c,T,v){var i=o(arguments,1);return u.apply(this,[Object.create(l)].concat(i))};{function d(){}return function(l,c,T,v){var i=o(arguments,1);return d.prototype=l,u.apply(this,[new d].concat(i))}}}function f(){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 a(d,n){return function(){return n.apply(d,Array.prototype.slice.call(arguments,0))}}function o(d,n){return Array.prototype.slice.call(d,n||0)}function r(d,n){g(d,function(l,c){return n(l,c),!1})}function x(d,n){var l=m(d)?[]:{};return g(d,function(c,T){return l[T]=n(c,T),!1}),l}function g(d,n){if(m(d)){for(var l=0;l<d.length;l++)if(n(d[l],l))return d[l]}else for(var c in d)if(d.hasOwnProperty(c)&&n(d[c],c))return d[c]}function m(d){return d!=null&&typeof d!="function"&&typeof d.length=="number"}function w(d){return d&&{}.toString.call(d)==="[object Function]"}function p(d){return d&&{}.toString.call(d)==="[object Object]"}}).call(this,k("IyRk"))},MlIO:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.Base,s=R.WordArray,S=C.x64={},f=S.Word=h.extend({init:function(o,r){this.high=o,this.low=r}}),a=S.WordArray=h.extend({init:function(o,r){o=this.words=o||[],r!=u?this.sigBytes=r:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,r=o.length,x=[],g=0;g<r;g++){var m=o[g];x.push(m.high),x.push(m.low)}return s.create(x,this.sigBytes)},clone:function(){for(var o=h.clone.call(this),r=o.words=this.words.slice(0),x=r.length,g=0;g<x;g++)r[g]=r[g].clone();return o}})}(),P})},NFKh:function(N,Y,k){(function(P,u,C){N.exports=Y=u(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,Y,k){"use strict";k.d(Y,"a",function(){return s});var P=k("Kwbf");function u(S,f){var a=new Set;return S.forEach(function(o){f.has(o)||a.add(o)}),a}function C(S){var f=S||{},a=f.disabled,o=f.disableCheckbox,r=f.checkable;return!!(a||o)||r===!1}function R(S,f,a,o){for(var r=new Set(S),x=new Set,g=0;g<=a;g+=1){var m=f.get(g)||new Set;m.forEach(function(n){var l=n.key,c=n.node,T=n.children,v=T===void 0?[]:T;r.has(l)&&!o(c)&&v.filter(function(i){return!o(i.node)}).forEach(function(i){r.add(i.key)})})}for(var w=new Set,p=a;p>=0;p-=1){var d=f.get(p)||new Set;d.forEach(function(n){var l=n.parent,c=n.node;if(o(c)||!n.parent||w.has(n.parent.key))return;if(o(n.parent.node)){w.add(l.key);return}var T=!0,v=!1;(l.children||[]).filter(function(i){return!o(i.node)}).forEach(function(i){var L=i.key,A=r.has(L);T&&!A&&(T=!1),!v&&(A||x.has(L))&&(v=!0)}),T&&r.add(l.key),v&&x.add(l.key),w.add(l.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(u(x,r))}}function h(S,f,a,o,r){for(var x=new Set(S),g=new Set(f),m=0;m<=o;m+=1){var w=a.get(m)||new Set;w.forEach(function(l){var c=l.key,T=l.node,v=l.children,i=v===void 0?[]:v;!x.has(c)&&!g.has(c)&&!r(T)&&i.filter(function(L){return!r(L.node)}).forEach(function(L){x.delete(L.key)})})}g=new Set;for(var p=new Set,d=o;d>=0;d-=1){var n=a.get(d)||new Set;n.forEach(function(l){var c=l.parent,T=l.node;if(r(T)||!l.parent||p.has(l.parent.key))return;if(r(l.parent.node)){p.add(c.key);return}var v=!0,i=!1;(c.children||[]).filter(function(L){return!r(L.node)}).forEach(function(L){var A=L.key,y=x.has(A);v&&!y&&(v=!1),!i&&(y||g.has(A))&&(i=!0)}),v||x.delete(c.key),i&&g.add(c.key),p.add(c.key)})}return{checkedKeys:Array.from(x),halfCheckedKeys:Array.from(u(g,x))}}function s(S,f,a,o){var r=[],x;o?x=o:x=C;var g=new Set(S.filter(function(d){var n=!!a[d];return n||r.push(d),n})),m=new Map,w=0;Object.keys(a).forEach(function(d){var n=a[d],l=n.level,c=m.get(l);c||(c=new Set,m.set(l,c)),c.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 p;return f===!0?p=R(g,m,w,x):p=h(g,f.halfCheckedKeys,m,w,x),p}},OLod:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("K3mO"))})(this,function(P){P.lib.Cipher||function(u){var C=P,R=C.lib,h=R.Base,s=R.WordArray,S=R.BufferedBlockAlgorithm,f=C.enc,a=f.Utf8,o=f.Base64,r=C.algo,x=r.EvpKDF,g=R.Cipher=S.extend({cfg:h.extend(),createEncryptor:function(b,_){return this.create(this._ENC_XFORM_MODE,b,_)},createDecryptor:function(b,_){return this.create(this._DEC_XFORM_MODE,b,_)},init:function(b,_,I){this.cfg=this.cfg.extend(I),this._xformMode=b,this._key=_,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 _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function b(_){return typeof _=="string"?E:L}return function(_){return{encrypt:function(I,j,M){return b(j).encrypt(_,I,j,M)},decrypt:function(I,j,M){return b(j).decrypt(_,I,j,M)}}}}()}),m=R.StreamCipher=g.extend({_doFinalize:function(){var b=this._process(!0);return b},blockSize:1}),w=C.mode={},p=R.BlockCipherMode=h.extend({createEncryptor:function(b,_){return this.Encryptor.create(b,_)},createDecryptor:function(b,_){return this.Decryptor.create(b,_)},init:function(b,_){this._cipher=b,this._iv=_}}),d=w.CBC=function(){var b=p.extend();b.Encryptor=b.extend({processBlock:function(I,j){var M=this._cipher,G=M.blockSize;_.call(this,I,j,G),M.encryptBlock(I,j),this._prevBlock=I.slice(j,j+G)}}),b.Decryptor=b.extend({processBlock:function(I,j){var M=this._cipher,G=M.blockSize,K=I.slice(j,j+G);M.decryptBlock(I,j),_.call(this,I,j,G),this._prevBlock=K}});function _(I,j,M){var G,K=this._iv;K?(G=K,this._iv=u):G=this._prevBlock;for(var H=0;H<M;H++)I[j+H]^=G[H]}return b}(),n=C.pad={},l=n.Pkcs7={pad:function(b,_){for(var I=_*4,j=I-b.sigBytes%I,M=j<<24|j<<16|j<<8|j,G=[],K=0;K<j;K+=4)G.push(M);var H=s.create(G,j);b.concat(H)},unpad:function(b){var _=b.words[b.sigBytes-1>>>2]&255;b.sigBytes-=_}},c=R.BlockCipher=g.extend({cfg:g.cfg.extend({mode:d,padding:l}),reset:function(){var b;g.reset.call(this);var _=this.cfg,I=_.iv,j=_.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,_){this._mode.processBlock(b,_)},_doFinalize:function(){var b,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),b=this._process(!0)):(b=this._process(!0),_.unpad(b)),b},blockSize:128/32}),T=R.CipherParams=h.extend({init:function(b){this.mixIn(b)},toString:function(b){return(b||this.formatter).stringify(this)}}),v=C.format={},i=v.OpenSSL={stringify:function(b){var _,I=b.ciphertext,j=b.salt;return j?_=s.create([1398893684,1701076831]).concat(j).concat(I):_=I,_.toString(o)},parse:function(b){var _,I=o.parse(b),j=I.words;return j[0]==1398893684&&j[1]==1701076831&&(_=s.create(j.slice(2,4)),j.splice(0,4),I.sigBytes-=16),T.create({ciphertext:I,salt:_})}},L=R.SerializableCipher=h.extend({cfg:h.extend({format:i}),encrypt:function(b,_,I,j){j=this.cfg.extend(j);var M=b.createEncryptor(I,j),G=M.finalize(_),K=M.cfg;return T.create({ciphertext:G,key:I,iv:K.iv,algorithm:b,mode:K.mode,padding:K.padding,blockSize:b.blockSize,formatter:j.format})},decrypt:function(b,_,I,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=b.createDecryptor(I,j).finalize(_.ciphertext);return M},_parse:function(b,_){return typeof b=="string"?_.parse(b,this):b}}),A=C.kdf={},y=A.OpenSSL={execute:function(b,_,I,j){j||(j=s.random(64/8));var M=x.create({keySize:_+I}).compute(b,j),G=s.create(M.words.slice(_),I*4);return M.sigBytes=_*4,T.create({key:M,iv:G,salt:j})}},E=R.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:y}),encrypt:function(b,_,I,j){j=this.cfg.extend(j);var M=j.kdf.execute(I,b.keySize,b.ivSize);j.iv=M.iv;var G=L.encrypt.call(this,b,_,M.key,j);return G.mixIn(M),G},decrypt:function(b,_,I,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=j.kdf.execute(I,b.keySize,b.ivSize,_.salt);j.iv=M.iv;var G=L.decrypt.call(this,b,_,M.key,j);return G}})}()})},OZM5:function(N,Y,k){"use strict";k.d(Y,"b",function(){return o}),k.d(Y,"a",function(){return r}),k.d(Y,"k",function(){return x}),k.d(Y,"h",function(){return g}),k.d(Y,"i",function(){return m}),k.d(Y,"g",function(){return w}),k.d(Y,"c",function(){return p}),k.d(Y,"d",function(){return d}),k.d(Y,"j",function(){return c}),k.d(Y,"e",function(){return T}),k.d(Y,"f",function(){return v});var P=k("KQm4"),u=k("U8pU"),C=k("Ff2n"),R=k("q1tI"),h=k.n(R),s=k("Kwbf"),S=k("WaYH"),f=.25,a=2;function o(i,L){var A=i.slice(),y=A.indexOf(L);return y>=0&&A.splice(y,1),A}function r(i,L){var A=i.slice();return A.indexOf(L)===-1&&A.push(L),A}function x(i){return i.split("-")}function g(i,L){return"".concat(i,"-").concat(L)}function m(i){return i&&i.type&&i.type.isTreeNode}function w(i,L){var A=[i],y=L[i];function E(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];b.forEach(function(_){var I=_.key,j=_.children;A.push(I),E(j)})}return E(y.children),A}function p(i,L){var A=i.clientY,y=L.selectHandle.getBoundingClientRect(),E=y.top,b=y.bottom,_=y.height,I=Math.max(_*f,a);return A<=E+I?-1:A>=b-I?1:0}function d(i,L){if(!i)return;var A=L.multiple;return A?i.slice():i.length?[i[0]]:i}var n=function(L){return L};function l(i,L){if(!i)return[];var A=L||{},y=A.processProps,E=y===void 0?n:y,b=Array.isArray(i)?i:[i];return b.map(function(_){var I=_.children,j=Object(C.a)(_,["children"]),M=l(I,L);return h.a.createElement(S.a,Object.assign({},E(j)),M)})}function c(i){if(!i)return null;var L;if(Array.isArray(i))L={checkedKeys:i,halfCheckedKeys:void 0};else if(Object(u.a)(i)==="object")L={checkedKeys:i.checked||void 0,halfCheckedKeys:i.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function T(i,L){var A=new Set;function y(E){if(A.has(E))return;var b=L[E];if(!b)return;A.add(E);var _=b.parent,I=b.node;if(I.disabled)return;_&&y(_.key)}return(i||[]).forEach(function(E){y(E)}),Object(P.a)(A)}function v(i){var L={};return Object.keys(i).forEach(function(A){(A.startsWith("data-")||A.startsWith("aria-"))&&(L[A]=i[A])}),L}},Ot1p:function(N,Y,k){"use strict";var P=k("2qtc"),u=k("kLXV"),C=k("rAM+"),R=k("miYZ"),h=k("tsqr"),s=k("tJVT"),S=k("jrin"),f=k("q1tI"),a=k.n(f),o=k("VrN/"),r=k.n(o),x=k("bdgK"),g=k("p77/"),m=k("Bd2K"),w=k("ELLl"),p=k("19Vz"),d=k("lZu9"),n=k("+NIl"),l=k("kSUc"),c=k("9Bee"),T=function(_e){var Se=_e.value,Oe=Se===void 0?"":Se,de=_e.className,ye=_e.showTextOnly,Ee=_e.showLines,De=_e.style,Be=De===void 0?{}:De,Xe=Object(f.useMemo)(function(){return""},[Oe]);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{dangerouslySetInnerHTML:{__html:Xe}}))},v=k("0Owb"),i=k("dejd"),L=k("C+DQ"),A=[{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 y(_e){var Se=_e.onActionCallback,Oe=_e.title,de=_e.icon,ye=_e.actionName,Ee=_e.className,De=Ee===void 0?"":Ee,Be=_e.children;function Xe(){Se(ye)}return a.a.createElement("a",{title:Oe,className:De,onClick:Xe},a.a.createElement("i",{className:"md-iconfont ".concat(de)}),Be)}var E=function(_e){var Se=_e.watch,Oe=_e.showNullButton,de=_e.onActionCallback,ye=_e.fullScreen,Ee=_e.insertTemp,De=_e.hidetoolBar,Be=[].concat(A,[{title:"".concat(Se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Se?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return a.a.createElement("ul",{className:"markdown-toolbar-container"},!De&&Be.map(function(Xe,nt){return a.a.createElement("li",{key:nt},Xe.actionName?a.a.createElement(y,Object(v.a)({},Xe,{onActionCallback:de})):a.a.createElement("span",{className:"v-line"}))}),Oe?a.a.createElement("li",null,a.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:de},a.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ee&&a.a.createElement("li",null,a.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ee),onActionCallback:de},a.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),a.a.createElement("li",{className:"btn-full-screen"},a.a.createElement(y,{icon:"".concat(ye?"icon-shrink":"icon-enlarge"),title:ye?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:de})))},b=k("M8RZ"),_=k("+L6B"),I=k("2/Rp"),j=k("y8nQ"),M=k("Vl3Y"),G=k("5NDa"),K=k("5rEg"),H={labelCol:{span:4},wrapperCol:{span:20}},z=function(_e){var Se=_e.callback,Oe=_e.onCancel;function de(ye){Se(ye)}return a.a.createElement(M.a,Object(v.a)({},H,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:de}),a.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},a.a.createElement(K.a,null)),a.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},a.a.createElement(K.a,null)),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(I.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},B=k("7ahc"),W=k("HmJG"),F=k("BjJ7"),$=M.a.useForm,ee={width:280,marginRight:10},Z={labelCol:{span:5},wrapperCol:{span:19}},ve=function(_e){var Se=_e.callback,Oe=_e.onCancel,de=$(),ye=Object(s.a)(de,1),Ee=ye[0];function De(nt){Se(nt)}function Be(nt,dt){Ee.setFieldsValue({src:"/api/attachments/".concat(nt.id),type:dt.type})}function Xe(nt){var dt=nt.target.files[0];le(dt,Be)}return a.a.createElement(M.a,Object(v.a)({form:Ee},Z,{className:"upload-image-panel",onFinish:De}),a.a.createElement(M.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},a.a.createElement("div",{className:"flex-container"},a.a.createElement(M.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},a.a.createElement(K.a,{style:ee})),a.a.createElement(he,{onFileChange:Xe}))),a.a.createElement(M.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},a.a.createElement(K.a,{style:{width:264}})),a.a.createElement(M.a.Item,{style:{textAlign:"right"}},a.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(I.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))};function he(_e){var Se=_e.onFileChange;return a.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",a.a.createElement("input",{type:"file",onChange:Se}))}function le(_e,Se){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");var Oe=new FormData;Oe.append("editormd-image-file",_e),Oe.append("file_param_name","editormd-image-file"),Oe.append("byxhr","true");var de=new window.XMLHttpRequest;de.withCredentials=!0,de.addEventListener("load",function(ye){Se(JSON.parse(ye.target.responseText),_e)},!1),de.addEventListener("error",function(ye){console.error(ye)},!1),de.open("POST","".concat(F.a,"/api/attachments.json")),de.send(Oe)}var Re=k("giR+"),xe=k("fyUT"),ie=k("7Kak"),se=k("9yH6"),re=se.a.Group,be={margin:"0 8px"},q=function(_e){var Se=_e.callback,Oe=_e.onCancel;function de(ye){Se(ye)}return a.a.createElement(M.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:de},a.a.createElement("div",{className:"flex-container"},a.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),a.a.createElement("span",{style:be},"\u884C\u6570"),a.a.createElement(M.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},a.a.createElement(xe.a,null)),a.a.createElement("span",{style:be},"\u5217\u6570"),a.a.createElement(M.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},a.a.createElement(xe.a,null))),a.a.createElement("div",{className:"flex-container",style:{marginTop:12}},a.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),a.a.createElement(M.a.Item,{name:"align"},a.a.createElement(re,null,a.a.createElement(se.a,{value:"default"},a.a.createElement("i",{className:"fa fa-align-justify"})),a.a.createElement(se.a,{value:"left"},a.a.createElement("i",{className:"fa fa-align-left"})),a.a.createElement(se.a,{value:"center"},a.a.createElement("i",{className:"fa fa-align-center"})),a.a.createElement(se.a,{value:"right"},a.a.createElement("i",{className:"fa fa-align-right"}))))),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(I.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},ne=k("m3rI"),Te="link",ae="upload-image",J="code-block",X="add-table",Q="------------",pe={default:Q,left:":".concat(Q),center:":".concat(Q,":"),right:"".concat(Q,":")},ce=k("9VGf"),we,ze;function Ge(){}var Qe=0,$e=1e4,rt="\u2581",et=`
**\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 Me(_e){return/^\d+$/.test(_e)?"".concat(_e,"px"):_e}var Ce=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ve=Ce?"Cmd":"Ctrl",tt=(we={},Object(S.a)(we,Ve+"-B","bold"),Object(S.a)(we,Ve+"-I","italic"),we),He=(ze={},Object(S.a)(ze,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(S.a)(ze,J,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(S.a)(ze,ae,"\u6DFB\u52A0\u56FE\u7247"),Object(S.a)(ze,X,"\u6DFB\u52A0\u8868\u683C"),ze),Je=Y.a=function(_e){var Se=_e.defaultValue,Oe=Se===void 0?"":Se,de=_e.onChange,ye=_e.width,Ee=ye===void 0?"100%":ye,De=_e.height,Be=De===void 0?400:De,Xe=_e.miniToolbar,nt=Xe===void 0?!1:Xe,dt=_e.isFocus,Et=dt===void 0?!1:dt,ft=_e.watch,jt=_e.insertTemp,Ct=_e.mode,xt=Ct===void 0?"markdown":Ct,Yt=_e.id,$t=Yt===void 0?"markdown-editor-id":Yt,Vt=_e.showResizeBar,xr=Vt===void 0?!1:Vt,Lt=_e.noStorage,Er=Lt===void 0?!1:Lt,fr=_e.showNullButton,Wt=fr===void 0?!1:fr,Xt=_e.hidetoolBar,$r=Xt===void 0?!1:Xt,Tn=_e.fullScreen,wr=Tn===void 0?!1:Tn,aa=_e.onBlur,pt=_e.onCMBeforeChange,Tt=_e.onFullScreen,ht=_e.className,Tr=ht===void 0?"":ht,Rr=_e.disablePaste,Pt=Rr===void 0?!1:Rr,_t=_e.placeholder,Lr=_t===void 0?"":_t,cn=_e.values,Mr=cn===void 0?"":cn,ot=Object(f.useState)(null),Ot=Object(s.a)(ot,2),lt=Ot[0],un=Ot[1],Sn=Object(f.useState)(Oe),dn=Object(s.a)(Sn,2),jr=dn[0],wt=dn[1],fn=Object(f.useState)(ft),Fr=Object(s.a)(fn,2),sr=Fr[0],nr=Fr[1],qn=Object(f.useState)(wr),Rn=Object(s.a)(qn,2),an=Rn[0],ea=Rn[1],ta=Object(f.useState)(""),Cn=Object(s.a)(ta,2),Sr=Cn[0],Ln=Cn[1],vn=Object(f.useState)(0),on=Object(s.a)(vn,2),Jt=on[0],zr=on[1],Gt=Object(f.useState)(Be),kt=Object(s.a)(Gt,2),Qt=kt[0],hr=kt[1],Ir=Object(f.useState)(!1),Jr=Object(s.a)(Ir,2),Mn=Jr[0],Ba=Jr[1],wa=Object(f.useRef)(),Ma=Object(f.useRef)(),ia=Object(f.useRef)(),en=Object(f.useRef)();Object(f.useEffect)(function(){wt(Mr),lt==null||lt.setValue(Mr)},[Mr]),Object(f.useEffect)(function(){Tt==null||Tt(an)},[an]),Object(f.useEffect)(function(){if(wa.current){var Rt=r.a.fromTextArea(wa.current,{mode:xt,lineNumbers:!nt,lineWrapping:!0,value:Oe,autoCloseTags:!0,autoCloseBrackets:!0});Et&&Rt.focus();function Kt(Bt,pr){if(Pt){pr.preventDefault();return}var mr=pr.clipboardData;if(mr){var Pr=mr.types.toString(),Xr=mr.items,Br=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(Pr==="Files"||mr.types.indexOf("Files")>-1){if(pr.preventDefault(),xt=="stex")return;try{var tn,Hn=Xr[1];((tn=Xr[0])===null||tn===void 0?void 0:tn.kind)==="file"&&(Hn=Xr[0]);var Cr=Hn.getAsFile(),ur=Cr.name.split(".").pop();le(Cr,function(yn){if(yn.id){var ca,Kn,Ta;(Cr==null||((ca=Cr.type)===null||ca===void 0)?void 0:ca.indexOf("image"))>-1?Rt.replaceSelection("![,](/api/attachments/".concat(yn.id,"?type=").concat(yn.content_type,")")):(Cr==null||((Kn=Cr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?Rt.replaceSelection('<video width="100%" controls src="'.concat(ne.a.API_SERVER,"/api/attachments/").concat(yn.id,'"></video>')):(Cr==null||((Ta=Cr.type)===null||Ta===void 0)?void 0:Ta.indexOf("pdf"))>-1?Rt.replaceSelection('<a href="'.concat(ne.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(Cr.type,'&disposition=inline" target="_blank">').concat(Cr.name,"</a>")):Br.includes(ur)?Rt.replaceSelection('<a href="'.concat(ne.a.API_SERVER,"/api/attachments/").concat(yn.id,'?type=office&disposition=inline" target="_blank">').concat(Cr.name,"</a>")):Rt.replaceSelection("[".concat(Cr.name,"](").concat(ne.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}else(yn==null?void 0:yn.status)===401&&(document.location.href="/user/login")})}catch(yn){h.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Rt.on("paste",Kt),un(Rt),function(){Rt.off("paste",Kt)}}},[]);var Pa=Object(f.useCallback)(function(){if(Ma.current)try{}catch(Rt){console.log(Rt,"---- to set md editor body height")}},[Qt,Ma,an]);Object(f.useEffect)(function(){function Rt(){var Bt=new x.default(function(pr){var mr=Object(C.a)(pr),Pr;try{for(mr.s();!(Pr=mr.n()).done;){var Xr=Pr.value;(Xr.target.offsetHeight>0||Xr.target.offsetWidth>0)&&(Pa(),lt.setSize("100%","100%"),lt.refresh())}}catch(Br){mr.e(Br)}finally{mr.f()}});return Bt.observe(wa.current.parentElement),Bt}if(lt){var Kt=Rt();return function(){Kt.unobserve(wa.current.parentElement)}}},[lt,Pa]),Object(f.useEffect)(function(){if(lt){for(var Rt=[],Kt=function(){var Xr=pr[Bt];mr=Object(s.a)(Xr,2);var Br=mr[0],tn=mr[1],Hn=Object(S.a)({},Br,function(){Hr(tn)});Rt.push(Hn),lt.addKeyMap(Hn)},Bt=0,pr=Object.entries(tt);Bt<pr.length;Bt++){var mr;Kt()}return function(){var Pr=Object(C.a)(Rt),Xr;try{for(Pr.s();!(Xr=Pr.n()).done;){var Br=Xr.value;lt.removeKeyMap(Br)}}catch(tn){Pr.e(tn)}finally{Pr.f()}}}},[lt]),Object(f.useEffect)(function(){wr!==an&&ea(wr)},[wr]),Object(ce.a)(function(){if(!Er&&Jt>0){var Rt=new Date().getTime(),Kt=window.sessionStorage.getItem($t);Rt>=Jt+$e&&(!Kt||Kt!==jr)&&(window.sessionStorage.setItem($t,jr),Ba(!0))}},$e),Object(f.useEffect)(function(){nr(ft)},[lt,ft]),Object(f.useEffect)(function(){lt&&(Et&&lt.focus())},[lt,Et]),Object(f.useEffect)(function(){if(sr&&lt){var Rt=lt.getScrollerElement();function Kt(Bt){var pr=Bt.target;if(en.current){var mr=pr.scrollTop/pr.scrollHeight;en.current.scrollTop=en.current.scrollHeight*mr}}return Rt.addEventListener("scroll",Kt),function(){Rt.removeEventListener("scroll",Kt)}}},[lt,sr]),Object(f.useEffect)(function(){if(lt&&pt){function Rt(Kt,Bt){pt(Kt,Bt)}return lt.on("beforeChange",Rt),function(){lt.off("beforeChange",Rt)}}},[lt,pt]),Object(f.useEffect)(function(){if(lt&&aa){function Rt(){aa(lt.getValue())}return lt.on("blur",Rt),function(){lt.off("blur",Rt)}}},[lt,aa]),Object(f.useEffect)(function(){if(lt){function Rt(Kt){var Bt=Kt.getValue();wt(Bt),zr(new Date().getTime()),Kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),de&&de(Bt)}return lt.on("change",Rt),function(){lt.off("change",Rt)}}},[lt,de]),Object(f.useEffect)(function(){lt&&(Oe==null?(lt.setValue(""),wt("")):Oe!==lt.getValue()&&(lt.setValue(Oe),wt(Oe),lt.setCursor(lt.lineCount(),0)))},[lt,Oe]);var Hr=Object(f.useCallback)(function(Rt){var Kt=lt.getCursor(),Bt=lt.getSelection(),pr=Bt.split(`
`);switch(Rt){case"bold":return lt.replaceSelection("**"+Bt+"**"),Bt===""&&lt.setCursor(Kt.line,Kt.ch+2),lt.focus();case"italic":return lt.replaceSelection("*"+Bt+"*"),Bt===""&&lt.setCursor(Kt.line,Kt.ch+1),lt.focus();case"code":return lt.replaceSelection("`"+Bt+"`"),Bt===""&&lt.setCursor(Kt.line,Kt.ch+1),lt.focus();case"inline-latex":return lt.replaceSelection("`$$"+Bt+"$$`"),Bt===""&&lt.setCursor(Kt.line,Kt.ch+3),lt.focus();case"latex":return lt.replaceSelection("```latex\n"+Bt+"\n```"),lt.setCursor(Kt.line+1,Bt.length+1),lt.focus();case"line-break":return lt.replaceSelection(`<br/>
`),lt.focus();case"list-ul":return Bt===""?lt.replaceSelection("- "+Bt):lt.replaceSelection(pr.map(function(mr){return mr===""?"":"- ".concat(mr)}).join(`
`)),lt.focus();case"list-ol":return Bt===""?lt.replaceSelection("1. "+Bt):lt.replaceSelection(pr.map(function(mr,Pr){return mr===""?"":"".concat(Pr+1,". ").concat(mr)}).join(`
`)),lt.focus();case"add-null-ch":return Bt===""&&lt.setCursor(Kt.line,Kt.ch+1),lt.replaceSelection(rt),lt.focus();case"inster-template-1":return Bt===""&&lt.setCursor(Kt.line,Kt.ch),lt.replaceSelection(et),lt.focus();case"eraser":return lt.setValue(""),lt.focus();case"trigger-watch":return nr(!sr),lt.focus();case"trigger-full-screen":return ea(!an),lt.focus();case Te:Ln(Te);return;case J:Ln(J);return;case ae:Ln(ae);return;case X:Ln(X);return;default:throw new Error}},[lt,sr,an]),Wn=Object(f.useCallback)(function(Rt){Ln("");switch(Sr){case Te:var Kt=Rt.title,Bt=Rt.link;return lt.replaceSelection("[".concat(Kt,"](").concat(Bt,")")),lt.focus();case J:var pr=Rt.language,mr=Rt.content;return lt.replaceSelection(["```"+pr,mr,"```"].join(`
`)),lt.focus();case ae:var Pr=Rt.src,Xr=Rt.alt;return lt.replaceSelection("![ ".concat(Xr," ]( ").concat(Pr,' "').concat(Xr,'" )')),lt.focus();case X:for(var Br=Rt.row,tn=Rt.col,Hn=Rt.align,Cr=`
`,ur=0;ur<Br;ur++){for(var yn=[],ca=[],Kn=0;Kn<tn;Kn++)ur===1&&ca.push(pe[Hn]),yn.push(" ");ur===1&&(Cr+="| ".concat(ca.join(" | "),` |
`)),Cr+="| ".concat(yn.join(tn===1?"":" | "),` |
`)}return lt.replaceSelection(Cr+`
`),lt.focus();default:throw new Error}},[lt,Sr]),jn=Object(f.useMemo)(function(){switch(Sr){case Te:return a.a.createElement(z,{callback:Wn,onCancel:Gr});case J:return a.a.createElement(B.b,{callback:Wn,onCancel:Gr});case ae:return a.a.createElement(ve,{callback:Wn,onCancel:Gr});case X:return a.a.createElement(q,{callback:Wn,onCancel:Gr});default:return null}},[Sr]);function Gr(){Ln("")}Object(f.useEffect)(function(){if(ia.current){var Rt=ia.current,Kt=!1,Bt=0;function pr(Xr){Kt=!0,Bt=Xr.pageY}function mr(){Kt=!1}function Pr(Xr){if(Kt){var Br=Xr.pageY-Bt;Br<0&&(Br=0),Br>300&&(Br=300);var tn=Be+Br+"px";hr(tn)}}return Rt.addEventListener("mousedown",pr),document.addEventListener("mousemove",Pr),document.addEventListener("mouseup",mr),function(){Rt.removeEventListener("mousedown",pr),document.removeEventListener("mousemove",Pr),document.removeEventListener("mouseup",mr)}}},[lt,ia]),Object(f.useEffect)(function(){hr(Be)},[Be]);var _n=Me(Ee),ka=Me(Qt),ga={width:_n,height:ka},ua=Object(f.useMemo)(function(){if(Jt){var Rt=new Date(Jt),Kt=Rt.getHours(),Bt=Rt.getMinutes(),pr=Rt.getSeconds();return Kt=Kt<10?"0"+Kt:Kt,Bt=Bt<10?"0"+Bt:Bt,pr=pr<10?"0"+pr:pr,"".concat(Kt,":").concat(Bt,":").concat(pr)}return 0},[Jt]);function Va(){window.sessionStorage.removeItem($t),Ba(!1),zr(0)}function Ca(){Ba(!1),zr(0),lt.setValue(window.sessionStorage.getItem($t))}return a.a.createElement(f.Fragment,null,a.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ma},a.a.createElement("div",{className:"markdown-editor-container ".concat(Tr," ").concat(sr?"on-preview":""," ").concat(nt?"mini":""," ").concat(an?"full-screen":""),style:ga},a.a.createElement(E,{insertTemp:jt,watch:sr,fullScreen:an,showNullButton:Wt,onActionCallback:Hr,hidetoolBar:$r}),a.a.createElement("div",{className:"markdown-editor-body"},a.a.createElement("div",{className:"codemirror-container"},a.a.createElement("textarea",{ref:wa,placeholder:Lr})),sr?a.a.createElement("div",{ref:en,className:"preview-container"},xt==="stex"&&a.a.createElement(T,{value:jr}),xt!=="stex"&&a.a.createElement(c.a,{value:jr})):null))),xr?a.a.createElement("a",{ref:ia,className:"editor-resize"}):null,a.a.createElement(b.a,null,He[Sr]?a.a.createElement(u.a,{centered:!0,title:He[Sr],visible:!0,onCancel:Gr,footer:null},jn):null))}},PD8m:function(N,Y){N.exports={name:"memoryStorage",read:P,write:u,each:C,remove:R,clearAll:h};var k={};function P(s){return k[s]}function u(s,S){k[s]=S}function C(s){for(var S in k)k.hasOwnProperty(S)&&s(k[S],S)}function R(s){delete k[s]}function h(s){k={}}},PVpz:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.StreamCipher,h=u.algo,s=[],S=[],f=[],a=h.RabbitLegacy=R.extend({_doReset:function(){var r=this._key.words,x=this.cfg.iv,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],m=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++)o.call(this);for(var w=0;w<8;w++)m[w]^=g[w+4&7];if(x){var p=x.words,d=p[0],n=p[1],l=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,c=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=l>>>16|c&4294901760,v=c<<16|l&65535;m[0]^=l,m[1]^=T,m[2]^=c,m[3]^=v,m[4]^=l,m[5]^=T,m[6]^=c,m[7]^=v;for(var w=0;w<4;w++)o.call(this)}},_doProcessBlock:function(r,x){var g=this._X;o.call(this),s[0]=g[0]^g[5]>>>16^g[3]<<16,s[1]=g[2]^g[7]>>>16^g[5]<<16,s[2]=g[4]^g[1]>>>16^g[7]<<16,s[3]=g[6]^g[3]>>>16^g[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,r[x+m]^=s[m]},blockSize:128/32,ivSize:64/32});function o(){for(var r=this._X,x=this._C,g=0;g<8;g++)S[g]=x[g];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0<S[0]>>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0<S[1]>>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0<S[2]>>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0<S[3]>>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0<S[4]>>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0<S[5]>>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0<S[6]>>>0?1:0)|0,this._b=x[7]>>>0<S[7]>>>0?1:0;for(var g=0;g<8;g++){var m=r[g]+x[g],w=m&65535,p=m>>>16,d=((w*w>>>17)+w*p>>>15)+p*p,n=((m&4294901760)*m|0)+((m&65535)*m|0);f[g]=d^n}r[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,r[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,r[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,r[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,r[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,r[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,r[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,r[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}u.RabbitLegacy=R._createHelper(a)}(),P.RabbitLegacy})},RELg:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"oldIE-userDataStorage",write:S,read:f,each:a,remove:o,clearAll:r};var C="storejs",R=u.document,h=m(),s=(u.navigator?u.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(w,p){if(s)return;var d=g(w);h(function(n){n.setAttribute(d,p),n.save(C)})}function f(w){if(s)return;var p=g(w),d=null;return h(function(n){d=n.getAttribute(p)}),d}function a(w){h(function(p){for(var d=p.XMLDocument.documentElement.attributes,n=d.length-1;n>=0;n--){var l=d[n];w(p.getAttribute(l.name),l.name)}})}function o(w){var p=g(w);h(function(d){d.removeAttribute(p),d.save(C)})}function r(){h(function(w){var p=w.XMLDocument.documentElement.attributes;w.load(C);for(var d=p.length-1;d>=0;d--)w.removeAttribute(p[d].name);w.save(C)})}var x=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function g(w){return w.replace(/^\d/,"___$&").replace(x,"___")}function m(){if(!R||!R.documentElement||!R.documentElement.addBehavior)return null;var w="script",p,d,n;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+w+">document.w=window</"+w+'><iframe src="/favicon.ico"></iframe>'),d.close(),p=d.w.frames[0].document,n=p.createElement("div")}catch(l){n=R.createElement("div"),p=R.body}return function(l){var c=[].slice.call(arguments,0);c.unshift(n),p.appendChild(n),n.addBehavior("#default#userData"),n.load(C),l.apply(this,c),p.removeChild(n);return}}},S6kV:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.OFB=function(){var u=P.lib.BlockCipherMode.extend(),C=u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,f=this._iv,a=this._keystream;f&&(a=this._keystream=f.slice(0),this._iv=void 0),s.encryptBlock(a,0);for(var o=0;o<S;o++)R[h+o]^=a[o]}});return u.Decryptor=C,u}(),P.mode.OFB})},"SA+Z":function(N,Y,k){var P=k("wTVA"),u=k("EbDI"),C=k("ZhPi"),R=k("wkBT");function h(s){return P(s)||u(s)||C(s)||R()}N.exports=h,N.exports.__esModule=!0,N.exports.default=N.exports},SJMd:function(N,Y){/**
* @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,u,C=!1,R,h;window.PR_SHOULD_USE_CONTINUATION=!0;var s,S;(function(){var f=window,a=["break,continue,do,else,for,if,return,while"],o=[a,"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=[o,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],x=[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"],g=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],m=[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",p=[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=[a,"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=[a,"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"],c=[a,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[x,m,g,p,d,n,l,c],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,i="str",L="kwd",A="com",y="typ",E="lit",b="pun",_="pln",I="tag",j="dec",M="src",G="atn",K="atv",H="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ae){for(var J=0,X=!1,Q=!1,pe=0,ce=ae.length;pe<ce;++pe){var we=ae[pe];if(we.ignoreCase)Q=!0;else if(/[a-z]/i.test(we.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Q=!1;break}}var ze={b:8,t:9,n:10,v:11,f:12,r:13};function Ge(Me){var Ce=Me.charCodeAt(0);if(Ce!==92)return Ce;var Ve=Me.charAt(1);return Ce=ze[Ve],Ce||("0"<=Ve&&Ve<="7"?parseInt(Me.substring(1),8):Ve==="u"||Ve==="x"?parseInt(Me.substring(2),16):Me.charCodeAt(1))}function Qe(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")),Ve=[],tt=Ce[0]==="^",He=["["];tt&&He.push("^");for(var Je=tt?1:0,_e=Ce.length;Je<_e;++Je){var Se=Ce[Je];if(/\\[bdsw]/i.test(Se))He.push(Se);else{var Oe=Ge(Se),de;Je+2<_e&&Ce[Je+1]==="-"?(de=Ge(Ce[Je+2]),Je+=2):de=Oe,Ve.push([Oe,de]),de<65||Oe>122||(de<65||Oe>90||Ve.push([Math.max(65,Oe)|32,Math.min(de,90)|32]),de<97||Oe>122||Ve.push([Math.max(97,Oe)&~32,Math.min(de,122)&~32]))}}Ve.sort(function(Be,Xe){return Be[0]-Xe[0]||Xe[1]-Be[1]});for(var ye=[],Ee=[],Je=0;Je<Ve.length;++Je){var De=Ve[Je];De[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],De[1]):ye.push(Ee=De)}for(var Je=0;Je<ye.length;++Je){var De=ye[Je];He.push(Qe(De[0])),De[1]>De[0]&&(De[1]+1>De[0]&&He.push("-"),He.push(Qe(De[1])))}return He.push("]"),He.join("")}function rt(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")),Ve=Ce.length,tt=[],He=0,Je=0;He<Ve;++He){var _e=Ce[He];if(_e==="(")++Je;else if(_e.charAt(0)==="\\"){var Se=+_e.substring(1);Se&&(Se<=Je?tt[Se]=-1:Ce[He]=Qe(Se))}}for(var He=1;He<tt.length;++He)tt[He]===-1&&(tt[He]=++J);for(var He=0,Je=0;He<Ve;++He){var _e=Ce[He];if(_e==="(")++Je,tt[Je]||(Ce[He]="(?:");else if(_e.charAt(0)==="\\"){var Se=+_e.substring(1);Se&&Se<=Je&&(Ce[He]="\\"+tt[Se])}}for(var He=0;He<Ve;++He)Ce[He]==="^"&&Ce[He+1]!=="^"&&(Ce[He]="");if(Me.ignoreCase&&X)for(var He=0;He<Ve;++He){var _e=Ce[He],Oe=_e.charAt(0);_e.length>=2&&Oe==="["?Ce[He]=$e(_e):Oe!=="\\"&&(Ce[He]=_e.replace(/[a-zA-Z]/g,function(Ee){var De=Ee.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Ce.join("")}for(var et=[],pe=0,ce=ae.length;pe<ce;++pe){var we=ae[pe];if(we.global||we.multiline)throw new Error(""+we);et.push("(?:"+rt(we)+")")}return new RegExp(et.join("|"),Q?"gi":"g")}function W(ae,J){var X=/(?:^|\s)nocode(?:\s|$)/,Q=[],pe=0,ce=[],we=0;function ze(Ge){var Qe=Ge.nodeType;if(Qe==1){if(X.test(Ge.className))return;for(var $e=Ge.firstChild;$e;$e=$e.nextSibling)ze($e);var rt=Ge.nodeName.toLowerCase();(rt==="br"||rt==="li")&&(Q[we]=`
`,ce[we<<1]=pe++,ce[we++<<1|1]=Ge)}else if(Qe==3||Qe==4){var et=Ge.nodeValue;et.length&&(J?et=et.replace(/\r\n?/g,`
`):et=et.replace(/[ \t\r\n]+/g," "),Q[we]=et,ce[we<<1]=pe,pe+=et.length,ce[we++<<1|1]=Ge)}}return ze(ae),{sourceCode:Q.join("").replace(/\n$/,""),spans:ce}}function F(ae,J,X,Q,pe){if(!X)return;var ce={sourceNode:ae,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:J,decorations:null};Q(ce),pe.push.apply(pe,ce.decorations)}var $=/\S/;function ee(ae){for(var J=void 0,X=ae.firstChild;X;X=X.nextSibling){var Q=X.nodeType;J=Q===1?J?ae:X:Q===3&&$.test(X.nodeValue)?ae:J}return J===ae?void 0:J}function Z(ae,J){var X={},Q;(function(){for(var we=ae.concat(J),ze=[],Ge={},Qe=0,$e=we.length;Qe<$e;++Qe){var rt=we[Qe],et=rt[3];if(et)for(var Me=et.length;--Me>=0;)X[et.charAt(Me)]=rt;var Ce=rt[1],Ve=""+Ce;Ge.hasOwnProperty(Ve)||(ze.push(Ce),Ge[Ve]=null)}ze.push(/[\0-\uffff]/),Q=B(ze)})();var pe=J.length,ce=function(we){for(var ze=we.sourceCode,Ge=we.basePos,Qe=we.sourceNode,$e=[Ge,_],rt=0,et=ze.match(Q)||[],Me={},Ce=0,Ve=et.length;Ce<Ve;++Ce){var tt=et[Ce],He=Me[tt],Je=void 0,_e;if(typeof He=="string")_e=!1;else{var Se=X[tt.charAt(0)];if(Se)Je=tt.match(Se[1]),He=Se[0];else{for(var Oe=0;Oe<pe;++Oe)if(Se=J[Oe],Je=tt.match(Se[1]),Je){He=Se[0];break}Je||(He=_)}_e=He.length>=5&&He.substring(0,5)==="lang-",_e&&!(Je&&typeof Je[1]=="string")&&(_e=!1,He=M),_e||(Me[tt]=He)}var de=rt;if(rt+=tt.length,!_e)$e.push(Ge+de,He);else{var ye=Je[1],Ee=tt.indexOf(ye),De=Ee+ye.length;Je[2]&&(De=tt.length-Je[2].length,Ee=De-ye.length);var Be=He.substring(5);F(Qe,Ge+de,tt.substring(0,Ee),ce,$e),F(Qe,Ge+de+Ee,ye,se(Be,ye),$e),F(Qe,Ge+de+De,tt.substring(De),ce,$e)}}we.decorations=$e};return ce}function ve(ae){var J=[],X=[];ae.tripleQuotedStrings?J.push([i,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ae.multiLineStrings?J.push([i,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([i,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ae.verbatimStrings&&X.push([i,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ae.hashComments;Q&&(ae.cStyleComments?(Q>1?J.push([A,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([A,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([i,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([A,/^#[^\r\n]*/,null,"#"])),ae.cStyleComments&&(X.push([A,/^\/\/[^\r\n]*/,null]),X.push([A,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var pe=ae.regexLiterals;if(pe){var ce=pe>1?"":`
\r`,we=ce?".":"[\\S\\s]",ze="/(?=[^/*"+ce+"])(?:[^/\\x5B\\x5C"+ce+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+ce+"]|\\x5C"+we+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+ze+")")])}var Ge=ae.types;Ge&&X.push([y,Ge]);var Qe=(""+ae.keywords).replace(/^ | $/g,"");Qe.length&&X.push([L,new RegExp("^(?:"+Qe.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([_,/^\s+/,null,` \r
\xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return ae.regexLiterals&&($e+="(?!s*/)"),X.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[_,/^\\[\s\S]?/,null],[b,new RegExp($e),null]),Z(J,X)}var he=ve({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(ae,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,pe=/\r\n?|\n/,ce=ae.ownerDocument,we=ce.createElement("li");ae.firstChild;)we.appendChild(ae.firstChild);var ze=[we];function Ge(Ce){var Ve=Ce.nodeType;if(Ve==1&&!Q.test(Ce.className))if(Ce.nodeName==="br")Qe(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var tt=Ce.firstChild;tt;tt=tt.nextSibling)Ge(tt);else if((Ve==3||Ve==4)&&X){var He=Ce.nodeValue,Je=He.match(pe);if(Je){var _e=He.substring(0,Je.index);Ce.nodeValue=_e;var Se=He.substring(Je.index+Je[0].length);if(Se){var Oe=Ce.parentNode;Oe.insertBefore(ce.createTextNode(Se),Ce.nextSibling)}Qe(Ce),_e||Ce.parentNode.removeChild(Ce)}}}function Qe(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Ve(Je,_e){var Se=_e?Je.cloneNode(!1):Je,Oe=Je.parentNode;if(Oe){var de=Ve(Oe,1),ye=Je.nextSibling;de.appendChild(Se);for(var Ee=ye;Ee;Ee=ye)ye=Ee.nextSibling,de.appendChild(Ee)}return Se}for(var tt=Ve(Ce.nextSibling,0),He;(He=tt.parentNode)&&He.nodeType===1;)tt=He;ze.push(tt)}for(var $e=0;$e<ze.length;++$e)Ge(ze[$e]);J===(J|0)&&ze[0].setAttribute("value",J);var rt=ce.createElement("ol");rt.className="linenums";for(var et=Math.max(0,J-1|0)||0,$e=0,Me=ze.length;$e<Me;++$e)we=ze[$e],we.className="L"+($e+et)%10,we.firstChild||we.appendChild(ce.createTextNode("\xA0")),rt.appendChild(we);ae.appendChild(rt)}function Re(ae){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var X=/\n/g,Q=ae.sourceCode,pe=Q.length,ce=0,we=ae.spans,ze=we.length,Ge=0,Qe=ae.decorations,$e=Qe.length,rt=0;Qe[$e]=pe;var et,Me;for(Me=et=0;Me<$e;)Qe[Me]!==Qe[Me+2]?(Qe[et++]=Qe[Me++],Qe[et++]=Qe[Me++]):Me+=2;for($e=et,Me=et=0;Me<$e;){for(var Ce=Qe[Me],Ve=Qe[Me+1],tt=Me+2;tt+2<=$e&&Qe[tt+1]===Ve;)tt+=2;Qe[et++]=Ce,Qe[et++]=Ve,Me=tt}$e=Qe.length=et;var He=ae.sourceNode,Je="";He&&(Je=He.style.display,He.style.display="none");try{for(var _e=null;Ge<ze;){var Se=we[Ge],Oe=we[Ge+2]||pe,de=Qe[rt+2]||pe,tt=Math.min(Oe,de),ye=we[Ge+1],Ee;if(ye.nodeType!==1&&(Ee=Q.substring(ce,tt))){J&&(Ee=Ee.replace(X,"\r")),ye.nodeValue=Ee;var De=ye.ownerDocument,Be=De.createElement("span");Be.className=Qe[rt+1];var Xe=ye.parentNode;Xe.replaceChild(Be,ye),Be.appendChild(ye),ce<Oe&&(we[Ge+1]=ye=De.createTextNode(Q.substring(tt,Oe)),Xe.insertBefore(ye,Be.nextSibling))}ce=tt,ce>=Oe&&(Ge+=2),ce>=de&&(rt+=2)}}finally{He&&(He.style.display=Je)}}var xe={};function ie(ae,J){for(var X=J.length;--X>=0;){var Q=J[X];xe.hasOwnProperty(Q)?f.console&&console.warn("cannot override language handler %s",Q):xe[Q]=ae}}function se(ae,J){return ae&&xe.hasOwnProperty(ae)||(ae=/^\s*</.test(J)?"default-markup":"default-code"),xe[ae]}ie(he,["default-code"]),ie(Z([],[[_,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[A,/^<\!--[\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"]),ie(Z([[_,/^[\s]+/,null,` \r
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[I,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!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"]),ie(Z([],[[K,/^[\s\S]+/]]),["uq.val"]),ie(ve({keywords:x,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),ie(ve({keywords:"null,true,false"}),["json"]),ie(ve({keywords:m,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),ie(ve({keywords:g,cStyleComments:!0}),["java"]),ie(ve({keywords:c,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ie(ve({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ie(ve({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ie(ve({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ie(ve({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ie(ve({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ie(Z([],[[i,/^[\s\S]+/]]),["regex"]);function re(ae){var J=ae.langExtension;try{var X=W(ae.sourceNode,ae.pre),Q=X.sourceCode;ae.sourceCode=Q,ae.spans=X.spans,ae.basePos=0,se(J,Q)(ae),Re(ae)}catch(pe){f.console&&console.log(pe&&pe.stack||pe)}}function be(ae,J,X){var Q=X||!1,pe=J||null,ce=document.createElement("div");ce.innerHTML="<pre>"+ae+"</pre>",ce=ce.firstChild,Q&&le(ce,Q,!0);var we={langExtension:pe,numberLines:Q,sourceNode:ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(we),ce.innerHTML}function q(ae,J){var X=J||document.body,Q=X.ownerDocument||document;function pe(Se){return X.getElementsByTagName(Se)}for(var ce=[pe("pre"),pe("code"),pe("xmp")],we=[],ze=0;ze<ce.length;++ze)for(var Ge=0,Qe=ce[ze].length;Ge<Qe;++Ge)we.push(ce[ze][Ge]);ce=null;var $e=Date;$e.now||($e={now:function(){return+new Date}});var rt=0,et=/\blang(?:uage)?-([\w.]+)(?!\S)/,Me=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,Ve=/pre|xmp/i,tt=/^code$/i,He=/^(?:pre|code|xmp)$/i,Je={};function _e(){for(var Se=f.PR_SHOULD_USE_CONTINUATION?$e.now()+250:Infinity;rt<we.length&&$e.now()<Se;rt++){for(var Oe=we[rt],de=Je,ye=Oe;ye=ye.previousSibling;){var Ee=ye.nodeType,De=(Ee===7||Ee===8)&&ye.nodeValue;if(De?!/^\??prettify\b/.test(De):Ee!==3||/\S/.test(ye.nodeValue))break;if(De){de={},De.replace(/\b(\w+)=([\w:.%+-]+)/g,function(xr,Lt,Er){de[Lt]=Er});break}}var Be=Oe.className;if((de!==Je||Me.test(Be))&&!Ce.test(Be)){for(var Xe=!1,nt=Oe.parentNode;nt;nt=nt.parentNode){var dt=nt.tagName;if(He.test(dt)&&nt.className&&Me.test(nt.className)){Xe=!0;break}}if(!Xe){Oe.className+=" prettyprinted";var Et=de.lang;if(!Et){Et=Be.match(et);var ft;!Et&&(ft=ee(Oe))&&tt.test(ft.tagName)&&(Et=ft.className.match(et)),Et&&(Et=Et[1])}var jt;if(Ve.test(Oe.tagName))jt=1;else{var Ct=Oe.currentStyle,xt=Q.defaultView,Yt=Ct?Ct.whiteSpace:xt&&xt.getComputedStyle?xt.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;jt=Yt&&Yt.substring(0,3)==="pre"}var $t=de.linenums;($t=$t==="true"||+$t)||($t=Be.match(/\blinenums\b(?::(\d+))?/),$t=$t?$t[1]&&$t[1].length?+$t[1]:!0:!1),$t&&le(Oe,$t,jt);var Vt={langExtension:Et,sourceNode:Oe,numberLines:$t,pre:jt,sourceCode:null,basePos:null,spans:null,decorations:null};re(Vt)}}}rt<we.length?f.setTimeout(_e,250):typeof ae=="function"&&ae()}_e()}var ne=f.PR={createSimpleLexer:Z,registerLangHandler:ie,sourceDecorator:ve,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:K,PR_COMMENT:A,PR_DECLARATION:j,PR_KEYWORD:L,PR_LITERAL:E,PR_NOCODE:H,PR_PLAIN:_,PR_PUNCTUATION:b,PR_SOURCE:M,PR_STRING:i,PR_TAG:I,PR_TYPE:y,prettyPrintOne:C?f.prettyPrintOne=be:s=be,prettyPrint:S=C?f.prettyPrint=q:S=q},Te=f.define;typeof Te=="function"&&Te.amd&&Te("google-code-prettify",[],function(){return ne})})()},"VrN/":function(N,Y,k){(function(P,u){N.exports=u()})(this,function(){"use strict";var P=navigator.userAgent,u=navigator.platform,C=/gecko\/\d/i.test(P),R=/MSIE \d/.test(P),h=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),s=/Edge\/(\d+)/.exec(P),S=R||h||s,f=S&&(R?document.documentMode||6:+(s||h)[1]),a=!s&&/WebKit\//.test(P),o=a&&/Qt\/\d+\.\d+/.test(P),r=!s&&/Chrome\//.test(P),x=/Opera\//.test(P),g=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),w=/PhantomJS/.test(P),p=!s&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),d=/Android/.test(P),n=p||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),l=p||/Mac/.test(u),c=/\bCrOS\b/.test(P),T=/win/i.test(u),v=x&&P.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(x=!1,a=!0);var i=l&&(o||x&&(v==null||v<12.11)),L=C||S&&f>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=function(e,t){var D=e.className,O=A(t).exec(D);if(O){var U=D.slice(O.index+O[0].length);e.className=D.slice(0,O.index)+(U?O[1]+U:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function b(e,t){return E(e).appendChild(t)}function _(e,t,D,O){var U=document.createElement(e);if(D&&(U.className=D),O&&(U.style.cssText=O),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,D,O){var U=_(e,t,D,O);return U.setAttribute("role","presentation"),U}var j;document.createRange?j=function(e,t,D,O){var U=document.createRange();return U.setEnd(O||e,D),U.setStart(e,t),U}:j=function(e,t,D){var O=document.body.createTextRange();try{O.moveToElementText(e.parentNode)}catch(U){return O}return O.collapse(!0),O.moveEnd("character",D),O.moveStart("character",t),O};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 G(){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 K(e,t){var D=e.className;A(t).test(D)||(e.className+=(D?" ":"")+t)}function H(e,t){for(var D=e.split(" "),O=0;O<D.length;O++)D[O]&&!A(D[O]).test(t)&&(t+=" "+D[O]);return t}var z=function(e){e.select()};p?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(z=function(e){try{e.select()}catch(t){}});function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function W(e,t,D){t||(t={});for(var O in e)e.hasOwnProperty(O)&&(D!==!1||!t.hasOwnProperty(O))&&(t[O]=e[O]);return t}function F(e,t,D,O,U){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=O||0,te=U||0;;){var oe=e.indexOf(" ",V);if(oe<0||oe>=t)return te+(t-V);te+=oe-V,te+=D-te%D,V=oe+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,t){this.f=t;var D=+new Date+e;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=D)};function ee(e,t){for(var D=0;D<e.length;++D)if(e[D]==t)return D;return-1}var Z=50,ve={toString:function(){return"CodeMirror.Pass"}},he={scroll:!1},le={origin:"*mouse"},Re={origin:"+move"};function xe(e,t,D){for(var O=0,U=0;;){var V=e.indexOf(" ",O);V==-1&&(V=e.length);var te=V-O;if(V==e.length||U+te>=t)return O+Math.min(te,t-U);if(U+=V-O,U+=D-U%D,O=V+1,U>=t)return O}}var ie=[""];function se(e){for(;ie.length<=e;)ie.push(re(ie)+" ");return ie[e]}function re(e){return e[e.length-1]}function be(e,t){for(var D=[],O=0;O<e.length;O++)D[O]=t(e[O],O);return D}function q(e,t,D){for(var O=0,U=D(t);O<e.length&&D(e[O])<=U;)O++;e.splice(O,0,t)}function ne(){}function Te(e,t){var D;return Object.create?D=Object.create(e):(ne.prototype=e,D=new ne),t&&W(t,D),D}var ae=/[\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()||ae.test(e))}function X(e,t){return t?t.source.indexOf("\\w")>-1&&J(e)?!0:t.test(e):J(e)}function Q(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var pe=/[\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 ce(e){return e.charCodeAt(0)>=768&&pe.test(e)}function we(e,t,D){for(;(D<0?t>0:t<e.length)&&ce(e.charAt(t));)t+=D;return t}function ze(e,t,D){for(var O=t>D?-1:1;;){if(t==D)return t;var U=(t+D)/2,V=O<0?Math.ceil(U):Math.floor(U);if(V==t)return e(V)?t:D;e(V)?D=V:t=V+O}}function Ge(e,t,D,O){if(!e)return O(t,D,"ltr",0);for(var U=!1,V=0;V<e.length;++V){var te=e[V];(te.from<D&&te.to>t||t==D&&te.to==t)&&(O(Math.max(te.from,t),Math.min(te.to,D),te.level==1?"rtl":"ltr",V),U=!0)}U||O(t,D,"ltr")}var Qe=null;function $e(e,t,D){var O;Qe=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&&D=="before"?O=U:Qe=U),V.from==t&&(V.from!=V.to&&D!="before"?O=U:Qe=U)}return O!=null?O:Qe}var rt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(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 O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,V=/[LRr]/,te=/[Lb1n]/,oe=/[1n]/;function ue(me,Ie,je){this.level=me,this.from=Ie,this.to=je}return function(me,Ie){var je=Ie=="ltr"?"L":"R";if(me.length==0||Ie=="ltr"&&!O.test(me))return!1;for(var qe=me.length,Ze=[],it=0;it<qe;++it)Ze.push(D(me.charCodeAt(it)));for(var st=0,mt=je;st<qe;++st){var vt=Ze[st];vt=="m"?Ze[st]=mt:mt=vt}for(var St=0,yt=je;St<qe;++St){var At=Ze[St];At=="1"&&yt=="r"?Ze[St]="n":V.test(At)&&(yt=At,At=="r"&&(Ze[St]="R"))}for(var Ht=1,Nt=Ze[0];Ht<qe-1;++Ht){var dr=Ze[Ht];dr=="+"&&Nt=="1"&&Ze[Ht+1]=="1"?Ze[Ht]="1":dr==","&&Nt==Ze[Ht+1]&&(Nt=="1"||Nt=="n")&&(Ze[Ht]=Nt),Nt=dr}for(var ln=0;ln<qe;++ln){var Qn=Ze[ln];if(Qn==",")Ze[ln]="N";else if(Qn=="%"){var wn=void 0;for(wn=ln+1;wn<qe&&Ze[wn]=="%";++wn);for(var Sa=ln&&Ze[ln-1]=="!"||wn<qe&&Ze[wn]=="1"?"1":"N",ba=ln;ba<wn;++ba)Ze[ba]=Sa;ln=wn-1}}for(var Fn=0,xa=je;Fn<qe;++Fn){var na=Ze[Fn];xa=="L"&&na=="1"?Ze[Fn]="L":V.test(na)&&(xa=na)}for(var $n=0;$n<qe;++$n)if(U.test(Ze[$n])){var Bn=void 0;for(Bn=$n+1;Bn<qe&&U.test(Ze[Bn]);++Bn);for(var Dn=($n?Ze[$n-1]:je)=="L",Ea=(Bn<qe?Ze[Bn]:je)=="L",Zi=Dn==Ea?Dn?"L":"R":je,Si=$n;Si<Bn;++Si)Ze[Si]=Zi;$n=Bn-1}for(var la=[],ri,Zn=0;Zn<qe;)if(te.test(Ze[Zn])){var ps=Zn;for(++Zn;Zn<qe&&te.test(Ze[Zn]);++Zn);la.push(new ue(0,ps,Zn))}else{var fi=Zn,Mi=la.length,Pi=Ie=="rtl"?1:0;for(++Zn;Zn<qe&&Ze[Zn]!="L";++Zn);for(var ma=fi;ma<Zn;)if(oe.test(Ze[ma])){fi<ma&&(la.splice(Mi,0,new ue(1,fi,ma)),Mi+=Pi);var qi=ma;for(++ma;ma<Zn&&oe.test(Ze[ma]);++ma);la.splice(Mi,0,new ue(2,qi,ma)),Mi+=Pi,fi=ma}else++ma;fi<Zn&&la.splice(Mi,0,new ue(1,fi,Zn))}return Ie=="ltr"&&(la[0].level==1&&(ri=me.match(/^\s+/))&&(la[0].from=ri[0].length,la.unshift(new ue(0,0,ri[0].length))),re(la).level==1&&(ri=me.match(/\s+$/))&&(re(la).to-=ri[0].length,la.push(new ue(0,qe-ri[0].length,qe)))),Ie=="rtl"?la.reverse():la}}();function et(e,t){var D=e.order;return D==null&&(D=e.order=rt(e.text,t)),D}var Me=[],Ce=function(e,t,D){if(e.addEventListener)e.addEventListener(t,D,!1);else if(e.attachEvent)e.attachEvent("on"+t,D);else{var O=e._handlers||(e._handlers={});O[t]=(O[t]||Me).concat(D)}};function Ve(e,t){return e._handlers&&e._handlers[t]||Me}function tt(e,t,D){if(e.removeEventListener)e.removeEventListener(t,D,!1);else if(e.detachEvent)e.detachEvent("on"+t,D);else{var O=e._handlers,U=O&&O[t];if(U){var V=ee(U,D);V>-1&&(O[t]=U.slice(0,V).concat(U.slice(V+1)))}}}function He(e,t){var D=Ve(e,t);if(!D.length)return;for(var O=Array.prototype.slice.call(arguments,2),U=0;U<D.length;++U)D[U].apply(null,O)}function Je(e,t,D){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),He(e,D||t.type,e,t),Ee(t)||t.codemirrorIgnore}function _e(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var D=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),O=0;O<t.length;++O)ee(D,t[O])==-1&&D.push(t[O])}function Se(e,t){return Ve(e,t).length>0}function Oe(e){e.prototype.on=function(t,D){Ce(this,t,D)},e.prototype.off=function(t,D){tt(this,t,D)}}function de(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ye(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function De(e){de(e),ye(e)}function Be(e){return e.target||e.srcElement}function Xe(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 nt=function(){if(S&&f<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),dt;function Et(e){if(dt==null){var t=_("span","\u200B");b(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(dt=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&f<8))}var D=dt?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var ft;function jt(e){if(ft!=null)return ft;var t=b(e,document.createTextNode("A\u062EA")),D=j(t,0,1).getBoundingClientRect(),O=j(t,1,2).getBoundingClientRect();return E(e),!D||D.left==D.right?!1:ft=O.right-D.right<3}var Ct=`
b`.split(/\n/).length!=3?function(e){for(var t=0,D=[],O=e.length;t<=O;){var U=e.indexOf(`
`,t);U==-1&&(U=e.length);var V=e.slice(t,e.charAt(U-1)=="\r"?U-1:U),te=V.indexOf("\r");te!=-1?(D.push(V.slice(0,te)),t+=te+1):(D.push(V),t=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},xt=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(D){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Yt=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),$t=null;function Vt(e){if($t!=null)return $t;var t=b(e,_("span","x")),D=t.getBoundingClientRect(),O=j(t,0,1).getBoundingClientRect();return $t=Math.abs(D.left-O.left)>1}var xr={},Lt={};function Er(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),xr[e]=t}function fr(e,t){Lt[e]=t}function Wt(e){if(typeof e=="string"&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&typeof e.name=="string"&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];typeof t=="string"&&(t={name:t}),e=Te(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 Xt(e,t){t=Wt(t);var D=xr[t.name];if(!D)return Xt(e,"text/plain");var O=D(e,t);if($r.hasOwnProperty(t.name)){var U=$r[t.name];for(var V in U){if(!U.hasOwnProperty(V))continue;O.hasOwnProperty(V)&&(O["_"+V]=O[V]),O[V]=U[V]}}if(O.name=t.name,t.helperType&&(O.helperType=t.helperType),t.modeProps)for(var te in t.modeProps)O[te]=t.modeProps[te];return O}var $r={};function Tn(e,t){var D=$r.hasOwnProperty(e)?$r[e]:$r[e]={};W(t,D)}function wr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var D={};for(var O in t){var U=t[O];U instanceof Array&&(U=U.concat([])),D[O]=U}return D}function aa(e,t){for(var D;e.innerMode&&!(D=e.innerMode(t),!D||D.mode==e);)t=D.state,e=D.mode;return D||{mode:e,state:t}}function pt(e,t,D){return e.startState?e.startState(t,D):!0}var Tt=function(e,t,D){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};Tt.prototype.eol=function(){return this.pos>=this.string.length},Tt.prototype.sol=function(){return this.pos==this.lineStart},Tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Tt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Tt.prototype.eat=function(e){var t=this.string.charAt(this.pos),D;if(typeof e=="string"?D=t==e:D=t&&(e.test?e.test(t):e(t)),D)return++this.pos,t},Tt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Tt.prototype.skipToEnd=function(){this.pos=this.string.length},Tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Tt.prototype.backUp=function(e){this.pos-=e},Tt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Tt.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Tt.prototype.match=function(e,t,D){if(typeof e=="string"){var O=function(te){return D?te.toLowerCase():te},U=this.string.substr(this.pos,e.length);if(O(U)==O(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)}},Tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ht(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 D=e;!D.lines;)for(var O=0;;++O){var U=D.children[O],V=U.chunkSize();if(t<V){D=U;break}t-=V}return D.lines[t]}function Tr(e,t,D){var O=[],U=t.line;return e.iter(t.line,D.line+1,function(V){var te=V.text;U==D.line&&(te=te.slice(0,D.ch)),U==t.line&&(te=te.slice(t.ch)),O.push(te),++U}),O}function Rr(e,t,D){var O=[];return e.iter(t,D,function(U){O.push(U.text)}),O}function Pt(e,t){var D=t-e.height;if(D)for(var O=e;O;O=O.parent)O.height+=D}function _t(e){if(e.parent==null)return null;for(var t=e.parent,D=ee(t.lines,e),O=t.parent;O;t=O,O=O.parent)for(var U=0;!(O.children[U]==t);++U)D+=O.children[U].chunkSize();return D+t.first}function Lr(e,t){var D=e.first;e:do{for(var O=0;O<e.children.length;++O){var U=e.children[O],V=U.height;if(t<V){e=U;continue e}t-=V,D+=U.chunkSize()}return D}while(!e.lines);for(var te=0;te<e.lines.length;++te){var oe=e.lines[te],ue=oe.height;if(t<ue)break;t-=ue}return D+te}function cn(e,t){return t>=e.first&&t<e.first+e.size}function Mr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ot(e,t,D){if(D===void 0&&(D=null),!(this instanceof ot))return new ot(e,t,D);this.line=e,this.ch=t,this.sticky=D}function Ot(e,t){return e.line-t.line||e.ch-t.ch}function lt(e,t){return e.sticky==t.sticky&&Ot(e,t)==0}function un(e){return ot(e.line,e.ch)}function Sn(e,t){return Ot(e,t)<0?t:e}function dn(e,t){return Ot(e,t)<0?e:t}function jr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function wt(e,t){if(t.line<e.first)return ot(e.first,0);var D=e.first+e.size-1;return t.line>D?ot(D,ht(e,D).text.length):fn(t,ht(e,t.line).text.length)}function fn(e,t){var D=e.ch;return D==null||D>t?ot(e.line,t):D<0?ot(e.line,0):e}function Fr(e,t){for(var D=[],O=0;O<t.length;O++)D[O]=wt(e,t[O]);return D}var sr=function(e,t){this.state=e,this.lookAhead=t},nr=function(e,t,D,O){this.state=t,this.doc=e,this.line=D,this.maxLookAhead=O||0,this.baseTokens=null,this.baseTokenPos=1};nr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},nr.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}},nr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},nr.fromSaved=function(e,t,D){return t instanceof sr?new nr(e,wr(e.mode,t.state),D,t.lookAhead):new nr(e,wr(e.mode,t),D)},nr.prototype.save=function(e){var t=e!==!1?wr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sr(t,this.maxLookAhead):t};function qn(e,t,D,O){var U=[e.state.modeGen],V={};on(e,t.text,e.doc.mode,D,function(me,Ie){return U.push(me,Ie)},V,O);for(var te=D.state,oe=function(me){D.baseTokens=U;var Ie=e.state.overlays[me],je=1,qe=0;D.state=!0,on(e,t.text,Ie.mode,D,function(Ze,it){for(var st=je;qe<Ze;){var mt=U[je];mt>Ze&&U.splice(je,1,Ze,U[je+1],mt),je+=2,qe=Math.min(Ze,mt)}if(!it)return;if(Ie.opaque)U.splice(st,je-st,Ze,"overlay "+it),je=st+2;else for(;st<je;st+=2){var vt=U[st+1];U[st+1]=(vt?vt+" ":"")+"overlay "+it}},V),D.state=te,D.baseTokens=null,D.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)oe(ue);return{styles:U,classes:V.bgClass||V.textClass?V:null}}function Rn(e,t,D){if(!t.styles||t.styles[0]!=e.state.modeGen){var O=an(e,_t(t)),U=t.text.length>e.options.maxHighlightLength&&wr(e.doc.mode,O.state),V=qn(e,t,O);U&&(O.state=U),t.stateAfter=O.save(!U),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function an(e,t,D){var O=e.doc,U=e.display;if(!O.mode.startState)return new nr(O,!0,t);var V=Jt(e,t,D),te=V>O.first&&ht(O,V-1).stateAfter,oe=te?nr.fromSaved(O,te,V):new nr(O,pt(O.mode),V);return O.iter(V,t,function(ue){ea(e,ue.text,oe);var me=oe.line;ue.stateAfter=me==t-1||me%5==0||me>=U.viewFrom&&me<U.viewTo?oe.save():null,oe.nextLine()}),D&&(O.modeFrontier=oe.line),oe}function ea(e,t,D,O){var U=e.doc.mode,V=new Tt(t,e.options.tabSize,D);for(V.start=V.pos=O||0,t==""&&ta(U,D.state);!V.eol();)Cn(U,V,D.state),V.start=V.pos}function ta(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var D=aa(e,t);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function Cn(e,t,D,O){for(var U=0;U<10;U++){O&&(O[0]=aa(e,D).mode);var V=e.token(t,D);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Sr=function(e,t,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=D};function Ln(e,t,D,O){var U=e.doc,V=U.mode,te;t=wt(U,t);var oe=ht(U,t.line),ue=an(e,t.line,D),me=new Tt(oe.text,e.options.tabSize,ue),Ie;for(O&&(Ie=[]);(O||me.pos<t.ch)&&!me.eol();)me.start=me.pos,te=Cn(V,me,ue.state),O&&Ie.push(new Sr(me,te,wr(U.mode,ue.state)));return O?Ie:new Sr(me,te,ue.state)}function vn(e,t){if(e)for(;;){var D=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;e=e.slice(0,D.index)+e.slice(D.index+D[0].length);var O=D[1]?"bgClass":"textClass";t[O]==null?t[O]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(t[O])||(t[O]+=" "+D[2])}return e}function on(e,t,D,O,U,V,te){var oe=D.flattenSpans;oe==null&&(oe=e.options.flattenSpans);var ue=0,me=null,Ie=new Tt(t,e.options.tabSize,O),je,qe=e.options.addModeClass&&[null];for(t==""&&vn(ta(D,O.state),V);!Ie.eol();){if(Ie.pos>e.options.maxHighlightLength?(oe=!1,te&&ea(e,t,O,Ie.pos),Ie.pos=t.length,je=null):je=vn(Cn(D,Ie,O.state,qe),V),qe){var Ze=qe[0].name;Ze&&(je="m-"+(je?Ze+" "+je:Ze))}if(!oe||me!=je){for(;ue<Ie.start;)ue=Math.min(Ie.start,ue+5e3),U(ue,me);me=je}Ie.start=Ie.pos}for(;ue<Ie.pos;){var it=Math.min(Ie.pos,ue+5e3);U(it,me),ue=it}}function Jt(e,t,D){for(var O,U,V=e.doc,te=D?-1:t-(e.doc.mode.innerMode?1e3:100),oe=t;oe>te;--oe){if(oe<=V.first)return V.first;var ue=ht(V,oe-1),me=ue.stateAfter;if(me&&(!D||oe+(me instanceof sr?me.lookAhead:0)<=V.modeFrontier))return oe;var Ie=F(ue.text,null,e.options.tabSize);(U==null||O>Ie)&&(U=oe-1,O=Ie)}return U}function zr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var D=e.first,O=t-1;O>D;O--){var U=ht(e,O).stateAfter;if(U&&(!(U instanceof sr)||O+U.lookAhead<t)){D=O+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,D)}var Gt=!1,kt=!1;function Qt(){Gt=!0}function hr(){kt=!0}function Ir(e,t,D){this.marker=e,this.from=t,this.to=D}function Jr(e,t){if(e)for(var D=0;D<e.length;++D){var O=e[D];if(O.marker==t)return O}}function Mn(e,t){for(var D,O=0;O<e.length;++O)e[O]!=t&&(D||(D=[])).push(e[O]);return D}function Ba(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function wa(e,t,D){var O;if(e)for(var U=0;U<e.length;++U){var V=e[U],te=V.marker,oe=V.from==null||(te.inclusiveLeft?V.from<=t:V.from<t);if(oe||V.from==t&&te.type=="bookmark"&&(!D||!V.marker.insertLeft)){var ue=V.to==null||(te.inclusiveRight?V.to>=t:V.to>t);(O||(O=[])).push(new Ir(te,V.from,ue?null:V.to))}}return O}function Ma(e,t,D){var O;if(e)for(var U=0;U<e.length;++U){var V=e[U],te=V.marker,oe=V.to==null||(te.inclusiveRight?V.to>=t:V.to>t);if(oe||V.from==t&&te.type=="bookmark"&&(!D||V.marker.insertLeft)){var ue=V.from==null||(te.inclusiveLeft?V.from<=t:V.from<t);(O||(O=[])).push(new Ir(te,ue?null:V.from-t,V.to==null?null:V.to-t))}}return O}function ia(e,t){if(t.full)return null;var D=cn(e,t.from.line)&&ht(e,t.from.line).markedSpans,O=cn(e,t.to.line)&&ht(e,t.to.line).markedSpans;if(!D&&!O)return null;var U=t.from.ch,V=t.to.ch,te=Ot(t.from,t.to)==0,oe=wa(D,U,te),ue=Ma(O,V,te),me=t.text.length==1,Ie=re(t.text).length+(me?U:0);if(oe)for(var je=0;je<oe.length;++je){var qe=oe[je];if(qe.to==null){var Ze=Jr(ue,qe.marker);Ze?me&&(qe.to=Ze.to==null?null:Ze.to+Ie):qe.to=U}}if(ue)for(var it=0;it<ue.length;++it){var st=ue[it];if(st.to!=null&&(st.to+=Ie),st.from==null){var mt=Jr(oe,st.marker);mt||(st.from=Ie,me&&(oe||(oe=[])).push(st))}else st.from+=Ie,me&&(oe||(oe=[])).push(st)}oe&&(oe=en(oe)),ue&&ue!=oe&&(ue=en(ue));var vt=[oe];if(!me){var St=t.text.length-2,yt;if(St>0&&oe)for(var At=0;At<oe.length;++At)oe[At].to==null&&(yt||(yt=[])).push(new Ir(oe[At].marker,null,null));for(var Ht=0;Ht<St;++Ht)vt.push(yt);vt.push(ue)}return vt}function en(e){for(var t=0;t<e.length;++t){var D=e[t];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Pa(e,t,D){var O=null;if(e.iter(t.line,D.line+1,function(Ze){if(Ze.markedSpans)for(var it=0;it<Ze.markedSpans.length;++it){var st=Ze.markedSpans[it].marker;st.readOnly&&(!O||ee(O,st)==-1)&&(O||(O=[])).push(st)}}),!O)return null;for(var U=[{from:t,to:D}],V=0;V<O.length;++V)for(var te=O[V],oe=te.find(0),ue=0;ue<U.length;++ue){var me=U[ue];if(Ot(me.to,oe.from)<0||Ot(me.from,oe.to)>0)continue;var Ie=[ue,1],je=Ot(me.from,oe.from),qe=Ot(me.to,oe.to);(je<0||!te.inclusiveLeft&&!je)&&Ie.push({from:me.from,to:oe.from}),(qe>0||!te.inclusiveRight&&!qe)&&Ie.push({from:oe.to,to:me.to}),U.splice.apply(U,Ie),ue+=Ie.length-3}return U}function Hr(e){var t=e.markedSpans;if(!t)return;for(var D=0;D<t.length;++D)t[D].marker.detachLine(e);e.markedSpans=null}function Wn(e,t){if(!t)return;for(var D=0;D<t.length;++D)t[D].marker.attachLine(e);e.markedSpans=t}function jn(e){return e.inclusiveLeft?-1:0}function Gr(e){return e.inclusiveRight?1:0}function _n(e,t){var D=e.lines.length-t.lines.length;if(D!=0)return D;var O=e.find(),U=t.find(),V=Ot(O.from,U.from)||jn(e)-jn(t);if(V)return-V;var te=Ot(O.to,U.to)||Gr(e)-Gr(t);return te||t.id-e.id}function ka(e,t){var D=kt&&e.markedSpans,O;if(D)for(var U=void 0,V=0;V<D.length;++V)U=D[V],U.marker.collapsed&&(t?U.from:U.to)==null&&(!O||_n(O,U.marker)<0)&&(O=U.marker);return O}function ga(e){return ka(e,!0)}function ua(e){return ka(e,!1)}function Va(e,t){var D=kt&&e.markedSpans,O;if(D)for(var U=0;U<D.length;++U){var V=D[U];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!O||_n(O,V.marker)<0)&&(O=V.marker)}return O}function Ca(e,t,D,O,U){var V=ht(e,t),te=kt&&V.markedSpans;if(te)for(var oe=0;oe<te.length;++oe){var ue=te[oe];if(!ue.marker.collapsed)continue;var me=ue.marker.find(0),Ie=Ot(me.from,D)||jn(ue.marker)-jn(U),je=Ot(me.to,O)||Gr(ue.marker)-Gr(U);if(Ie>=0&&je<=0||Ie<=0&&je>=0)continue;if(Ie<=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Ot(me.to,D)>=0:Ot(me.to,D)>0)||Ie>=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Ot(me.from,O)<=0:Ot(me.from,O)<0))return!0}}function Rt(e){for(var t;t=ga(e);)e=t.find(-1,!0).line;return e}function Kt(e){for(var t;t=ua(e);)e=t.find(1,!0).line;return e}function Bt(e){for(var t,D;t=ua(e);)e=t.find(1,!0).line,(D||(D=[])).push(e);return D}function pr(e,t){var D=ht(e,t),O=Rt(D);return D==O?t:_t(O)}function mr(e,t){if(t>e.lastLine())return t;var D=ht(e,t),O;if(!Pr(e,D))return t;for(;O=ua(D);)D=O.find(1,!0).line;return _t(D)+1}function Pr(e,t){var D=kt&&t.markedSpans;if(D)for(var O=void 0,U=0;U<D.length;++U){if(O=D[U],!O.marker.collapsed)continue;if(O.from==null)return!0;if(O.marker.widgetNode)continue;if(O.from==0&&O.marker.inclusiveLeft&&Xr(e,t,O))return!0}}function Xr(e,t,D){if(D.to==null){var O=D.marker.find(1,!0);return Xr(e,O.line,Jr(O.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.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==D.to&&(U.to==null||U.to!=D.from)&&(U.marker.inclusiveLeft||D.marker.inclusiveRight)&&Xr(e,t,U))return!0}function Br(e){e=Rt(e);for(var t=0,D=e.parent,O=0;O<D.lines.length;++O){var U=D.lines[O];if(U==e)break;t+=U.height}for(var V=D.parent;V;D=V,V=D.parent)for(var te=0;te<V.children.length;++te){var oe=V.children[te];if(oe==D)break;t+=oe.height}return t}function tn(e){if(e.height==0)return 0;for(var t=e.text.length,D,O=e;D=ga(O);){var U=D.find(0,!0);O=U.from.line,t+=U.from.ch-U.to.ch}for(O=e;D=ua(O);){var V=D.find(0,!0);t-=O.text.length-V.from.ch,O=V.to.line,t+=O.text.length-V.to.ch}return t}function Hn(e){var t=e.display,D=e.doc;t.maxLine=ht(D,D.first),t.maxLineLength=tn(t.maxLine),t.maxLineChanged=!0,D.iter(function(O){var U=tn(O);U>t.maxLineLength&&(t.maxLineLength=U,t.maxLine=O)})}var Cr=function(e,t,D){this.text=e,Wn(this,t),this.height=D?D(this):1};Cr.prototype.lineNo=function(){return _t(this)},Oe(Cr);function ur(e,t,D,O){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Hr(e),Wn(e,D);var U=O?O(e):1;U!=e.height&&Pt(e,U)}function yn(e){e.parent=null,Hr(e)}var ca={},Kn={};function Ta(e,t){if(!e||/^\s*$/.test(e))return null;var D=t.addModeClass?Kn:ca;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function Ya(e,t){var D=I("span",null,null,a?"padding-right: .1px":null),O={pre:I("pre",[D],"CodeMirror-line"),content:D,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,te=void 0;O.pos=0,O.addToken=hi,jt(e.display.measure)&&(te=et(V,e.doc.direction))&&(O.addToken=Ci(O.addToken,te)),O.map=[];var oe=t!=e.display.externalMeasured&&_t(V);ai(V,O,Rn(e,V,oe)),V.styleClasses&&(V.styleClasses.bgClass&&(O.bgClass=H(V.styleClasses.bgClass,O.bgClass||"")),V.styleClasses.textClass&&(O.textClass=H(V.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(Et(e.display.measure))),U==0?(t.measure.map=O.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(O.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var ue=O.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return He(e,"renderLine",e,t.line,O.pre),O.pre.className&&(O.textClass=H(O.pre.className,O.textClass||"")),O}function Wa(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function hi(e,t,D,O,U,V,te){if(!t)return;var oe=e.splitSpaces?Ha(t,e.trailingSpace):t,ue=e.cm.state.specialChars,me=!1,Ie;if(!ue.test(t))e.col+=t.length,Ie=document.createTextNode(oe),e.map.push(e.pos,e.pos+t.length,Ie),S&&f<9&&(me=!0),e.pos+=t.length;else{Ie=document.createDocumentFragment();for(var je=0;;){ue.lastIndex=je;var qe=ue.exec(t),Ze=qe?qe.index-je:t.length-je;if(Ze){var it=document.createTextNode(oe.slice(je,je+Ze));S&&f<9?Ie.appendChild(_("span",[it])):Ie.appendChild(it),e.map.push(e.pos,e.pos+Ze,it),e.col+=Ze,e.pos+=Ze}if(!qe)break;je+=Ze+1;var st=void 0;if(qe[0]==" "){var mt=e.cm.options.tabSize,vt=mt-e.col%mt;st=Ie.appendChild(_("span",se(vt),"cm-tab")),st.setAttribute("role","presentation"),st.setAttribute("cm-text"," "),e.col+=vt}else qe[0]=="\r"||qe[0]==`
`?(st=Ie.appendChild(_("span",qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),st.setAttribute("cm-text",qe[0]),e.col+=1):(st=e.cm.options.specialCharPlaceholder(qe[0]),st.setAttribute("cm-text",qe[0]),S&&f<9?Ie.appendChild(_("span",[st])):Ie.appendChild(st),e.col+=1);e.map.push(e.pos,e.pos+1,st),e.pos++}}if(e.trailingSpace=oe.charCodeAt(t.length-1)==32,D||O||U||me||V||te){var St=D||"";O&&(St+=O),U&&(St+=U);var yt=_("span",[Ie],St,V);if(te)for(var At in te)te.hasOwnProperty(At)&&At!="style"&&At!="class"&&yt.setAttribute(At,te[At]);return e.content.appendChild(yt)}e.content.appendChild(Ie)}function Ha(e,t){if(e.length>1&&!/ /.test(e))return e;for(var D=t,O="",U=0;U<e.length;U++){var V=e.charAt(U);V==" "&&D&&(U==e.length-1||e.charCodeAt(U+1)==32)&&(V="\xA0"),O+=V,D=V==" "}return O}function Ci(e,t){return function(D,O,U,V,te,oe,ue){U=U?U+" cm-force-border":"cm-force-border";for(var me=D.pos,Ie=me+O.length;;){for(var je=void 0,qe=0;qe<t.length&&!(je=t[qe],je.to>me&&je.from<=me);qe++);if(je.to>=Ie)return e(D,O,U,V,te,oe,ue);e(D,O.slice(0,je.to-me),U,V,null,oe,ue),V=null,O=O.slice(je.to-me),me=je.to}}}function ni(e,t,D,O){var U=!O&&D.widgetNode;U&&e.map.push(e.pos,e.pos+t,U),!O&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",D.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=t,e.trailingSpace=!1}function ai(e,t,D){var O=e.markedSpans,U=e.text,V=0;if(!O){for(var te=1;te<D.length;te+=2)t.addToken(t,U.slice(V,V=D[te]),Ta(D[te+1],t.cm.options));return}for(var oe=U.length,ue=0,me=1,Ie="",je,qe,Ze=0,it,st,mt,vt,St;;){if(Ze==ue){it=st=mt=qe="",St=null,vt=null,Ze=Infinity;for(var yt=[],At=void 0,Ht=0;Ht<O.length;++Ht){var Nt=O[Ht],dr=Nt.marker;if(dr.type=="bookmark"&&Nt.from==ue&&dr.widgetNode)yt.push(dr);else if(Nt.from<=ue&&(Nt.to==null||Nt.to>ue||dr.collapsed&&Nt.to==ue&&Nt.from==ue)){if(Nt.to!=null&&Nt.to!=ue&&Ze>Nt.to&&(Ze=Nt.to,st=""),dr.className&&(it+=" "+dr.className),dr.css&&(qe=(qe?qe+";":"")+dr.css),dr.startStyle&&Nt.from==ue&&(mt+=" "+dr.startStyle),dr.endStyle&&Nt.to==Ze&&(At||(At=[])).push(dr.endStyle,Nt.to),dr.title&&((St||(St={})).title=dr.title),dr.attributes)for(var ln in dr.attributes)(St||(St={}))[ln]=dr.attributes[ln];dr.collapsed&&(!vt||_n(vt.marker,dr)<0)&&(vt=Nt)}else Nt.from>ue&&Ze>Nt.from&&(Ze=Nt.from)}if(At)for(var Qn=0;Qn<At.length;Qn+=2)At[Qn+1]==Ze&&(st+=" "+At[Qn]);if(!vt||vt.from==ue)for(var wn=0;wn<yt.length;++wn)ni(t,0,yt[wn]);if(vt&&(vt.from||0)==ue){if(ni(t,(vt.to==null?oe+1:vt.to)-ue,vt.marker,vt.from==null),vt.to==null)return;vt.to==ue&&(vt=!1)}}if(ue>=oe)break;for(var Sa=Math.min(oe,Ze);;){if(Ie){var ba=ue+Ie.length;if(!vt){var Fn=ba>Sa?Ie.slice(0,Sa-ue):Ie;t.addToken(t,Fn,je?je+it:it,mt,ue+Fn.length==Ze?st:"",qe,St)}if(ba>=Sa){Ie=Ie.slice(Sa-ue),ue=Sa;break}ue=ba,mt=""}Ie=U.slice(V,V=D[me++]),je=Ta(D[me++],t.cm.options)}}}function pi(e,t,D){this.line=t,this.rest=Bt(t),this.size=this.rest?_t(re(this.rest))-D+1:1,this.node=this.text=null,this.hidden=Pr(e,t)}function _a(e,t,D){for(var O=[],U,V=t;V<D;V=U){var te=new pi(e.doc,ht(e.doc,V),V);U=V+te.size,O.push(te)}return O}var Ia=null;function _i(e){Ia?Ia.ops.push(e):e.ownsGroup=Ia={ops:[e],delayedCallbacks:[]}}function ii(e){var t=e.delayedCallbacks,D=0;do{for(;D<t.length;D++)t[D].call(null);for(var O=0;O<e.ops.length;O++){var U=e.ops[O];if(U.cursorActivityHandlers)for(;U.cursorActivityCalled<U.cursorActivityHandlers.length;)U.cursorActivityHandlers[U.cursorActivityCalled++].call(null,U.cm)}}while(D<t.length)}function _r(e,t){var D=e.ownsGroup;if(!D)return;try{ii(D)}finally{Ia=null,t(D)}}var cr=null;function ar(e,t){var D=Ve(e,t);if(!D.length)return;var O=Array.prototype.slice.call(arguments,2),U;Ia?U=Ia.delayedCallbacks:cr?U=cr:(U=cr=[],setTimeout(Jn,0));for(var V=function(oe){U.push(function(){return D[oe].apply(null,O)})},te=0;te<D.length;++te)V(te)}function Jn(){var e=cr;cr=null;for(var t=0;t<e.length;++t)e[t]()}function Na(e,t,D,O){for(var U=0;U<t.changes.length;U++){var V=t.changes[U];V=="text"?zt(e,t):V=="gutter"?kr(e,t,D,O):V=="class"?Zt(e,t):V=="widget"&&ir(e,t,O)}t.changes=null}function ja(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&f<8&&(e.node.style.zIndex=2)),e.node}function Ut(e,t){var D=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),t.background)D?t.background.className=D:(t.background.parentNode.removeChild(t.background),t.background=null);else if(D){var O=ja(t);t.background=O.insertBefore(_("div",null,D),O.firstChild),e.display.input.setUneditable(t.background)}}function bt(e,t){var D=e.display.externalMeasured;return D&&D.line==t.line?(e.display.externalMeasured=null,t.measure=D.measure,D.built):Ya(e,t)}function zt(e,t){var D=t.text.className,O=bt(e,t);t.text==t.node&&(t.node=O.pre),t.text.parentNode.replaceChild(O.pre,t.text),t.text=O.pre,O.bgClass!=t.bgClass||O.textClass!=t.textClass?(t.bgClass=O.bgClass,t.textClass=O.textClass,Zt(e,t)):D&&(t.text.className=D)}function Zt(e,t){Ut(e,t),t.line.wrapClass?ja(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var D=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=D||""}function kr(e,t,D,O){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=ja(t);t.gutterBackground=_("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px; width: "+O.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 te=ja(t),oe=t.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px");if(e.display.input.setUneditable(oe),te.insertBefore(oe,t.text),t.line.gutterClass&&(oe.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=oe.appendChild(_("div",Mr(e.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+O.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,Ie=V.hasOwnProperty(me)&&V[me];Ie&&oe.appendChild(_("div",[Ie],"CodeMirror-gutter-elt","left: "+O.gutterLeft[me]+"px; width: "+O.gutterWidth[me]+"px"))}}}function ir(e,t,D){t.alignable&&(t.alignable=null);for(var O=A("CodeMirror-linewidget"),U=t.node.firstChild,V=void 0;U;U=V)V=U.nextSibling,O.test(U.className)&&t.node.removeChild(U);rn(e,t,D)}function hn(e,t,D,O){var U=bt(e,t);return t.text=t.node=U.pre,U.bgClass&&(t.bgClass=U.bgClass),U.textClass&&(t.textClass=U.textClass),Zt(e,t),kr(e,t,D,O),rn(e,t,O),t.node}function rn(e,t,D){if(va(e,t.line,t,D,!0),t.rest)for(var O=0;O<t.rest.length;O++)va(e,t.rest[O],t,D,!1)}function va(e,t,D,O,U){if(!t.widgets)return;for(var V=ja(D),te=0,oe=t.widgets;te<oe.length;++te){var ue=oe[te],me=_("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),On(ue,me,D,O),e.display.input.setUneditable(me),U&&ue.above?V.insertBefore(me,D.gutter||D.text):V.appendChild(me),ar(ue,"redraw")}}function On(e,t,D,O){if(e.noHScroll){(D.alignable||(D.alignable=[])).push(t);var U=O.wrapperWidth;t.style.left=O.fixedPos+"px",e.coverGutter||(U-=O.gutterTotalWidth,t.style.paddingLeft=O.gutterTotalWidth+"px"),t.style.width=U+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-O.gutterTotalWidth+"px"))}function Pn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var D="position: relative;";e.coverGutter&&(D+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(D+="width: "+t.display.wrapper.clientWidth+"px;"),b(t.display.measure,_("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function Un(e,t){for(var D=Be(t);D!=e.wrapper;D=D.parentNode)if(!D||D.nodeType==1&&D.getAttribute("cm-ignore-events")=="true"||D.parentNode==e.sizer&&D!=e.mover)return!0}function Ua(e){return e.lineSpace.offsetTop}function Le(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ue(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=b(e.measure,_("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,O={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(O.left)&&!isNaN(O.right)&&(e.cachedPaddingH=O),O}function Ke(e){return Z-e.display.nativeBarWidth}function Pe(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 Ae(e,t,D){var O=e.options.lineWrapping,U=O&&Pe(e);if(!t.measure.heights||O&&t.measure.width!=U){var V=t.measure.heights=[];if(O){t.measure.width=U;for(var te=t.text.firstChild.getClientRects(),oe=0;oe<te.length-1;oe++){var ue=te[oe],me=te[oe+1];Math.abs(ue.bottom-me.bottom)>2&&V.push((ue.bottom+me.top)/2-D.top)}}V.push(D.bottom-D.top)}}function ge(e,t,D){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var O=0;O<e.rest.length;O++)if(e.rest[O]==t)return{map:e.measure.maps[O],cache:e.measure.caches[O]};for(var U=0;U<e.rest.length;U++)if(_t(e.rest[U])>D)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function ke(e,t){t=Rt(t);var D=_t(t),O=e.display.externalMeasured=new pi(e.doc,t,D);O.lineN=D;var U=O.built=Ya(e,O);return O.text=U.pre,b(e.display.lineMeasure,U.pre),O}function Ne(e,t,D,O){return Ye(e,Fe(e,t),D,O)}function We(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[sn(e,t)];var D=e.display.externalMeasured;if(D&&t>=D.lineN&&t<D.lineN+D.size)return D}function Fe(e,t){var D=_t(t),O=We(e,D);O&&!O.text?O=null:O&&O.changes&&(Na(e,O,D,bn(e)),e.curOp.forceUpdate=!0),O||(O=ke(e,t));var U=ge(O,t,D);return{line:t,view:O,rect:null,map:U.map,cache:U.cache,before:U.before,hasHeights:!1}}function Ye(e,t,D,O,U){t.before&&(D=-1);var V=D+(O||""),te;return t.cache.hasOwnProperty(V)?te=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ae(e,t.view,t.rect),t.hasHeights=!0),te=gt(e,t,D,O),te.bogus||(t.cache[V]=te)),{left:te.left,right:te.right,top:U?te.rtop:te.top,bottom:U?te.rbottom:te.bottom}}var at={left:0,right:0,top:0,bottom:0};function ct(e,t,D){for(var O,U,V,te,oe,ue,me=0;me<e.length;me+=3)if(oe=e[me],ue=e[me+1],t<oe?(U=0,V=1,te="left"):t<ue?(U=t-oe,V=U+1):(me==e.length-3||t==ue&&e[me+3]>t)&&(V=ue-oe,U=V-1,t>=ue&&(te="right")),U!=null){if(O=e[me+2],oe==ue&&D==(O.insertLeft?"left":"right")&&(te=D),D=="left"&&U==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)O=e[(me-=3)+2],te="left";if(D=="right"&&U==ue-oe)for(;me<e.length-3&&e[me+3]==e[me+4]&&!e[me+5].insertLeft;)O=e[(me+=3)+2],te="right";break}return{node:O,start:U,end:V,collapse:te,coverStart:oe,coverEnd:ue}}function ut(e,t){var D=at;if(t=="left")for(var O=0;O<e.length&&!((D=e[O]).left!=D.right);O++);else for(var U=e.length-1;U>=0&&!((D=e[U]).left!=D.right);U--);return D}function gt(e,t,D,O){var U=ct(t.map,D,O),V=U.node,te=U.start,oe=U.end,ue=U.collapse,me;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;te&&ce(t.line.text.charAt(U.coverStart+te));)--te;for(;U.coverStart+oe<U.coverEnd&&ce(t.line.text.charAt(U.coverStart+oe));)++oe;if(S&&f<9&&te==0&&oe==U.coverEnd-U.coverStart?me=V.parentNode.getBoundingClientRect():me=ut(j(V,te,oe).getClientRects(),O),me.left||me.right||te==0)break;oe=te,te=te-1,ue="right"}S&&f<11&&(me=Mt(e.display.measure,me))}else{te>0&&(ue=O="right");var je;e.options.lineWrapping&&(je=V.getClientRects()).length>1?me=je[O=="right"?je.length-1:0]:me=V.getBoundingClientRect()}if(S&&f<9&&!te&&(!me||!me.left&&!me.right)){var qe=V.parentNode.getClientRects()[0];qe?me={left:qe.left,right:qe.left+zn(e.display),top:qe.top,bottom:qe.bottom}:me=at}for(var Ze=me.top-t.rect.top,it=me.bottom-t.rect.top,st=(Ze+it)/2,mt=t.view.measure.heights,vt=0;vt<mt.length-1&&!(st<mt[vt]);vt++);var St=vt?mt[vt-1]:0,yt=mt[vt],At={left:(ue=="right"?me.right:me.left)-t.rect.left,right:(ue=="left"?me.left:me.right)-t.rect.left,top:St,bottom:yt};return!me.left&&!me.right&&(At.bogus=!0),e.options.singleCursorHeightPerLine||(At.rtop=Ze,At.rbottom=it),At}function Mt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vt(e))return t;var D=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*D,right:t.right*D,top:t.top*O,bottom:t.bottom*O}}function qt(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 er(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)qt(e.display.view[t])}function tr(e){er(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function lr(){return r&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function or(){return r&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rr(e){var t=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(t+=Pn(e.widgets[D]));return t}function Or(e,t,D,O,U){if(!U){var V=rr(t);D.top+=V,D.bottom+=V}if(O=="line")return D;O||(O="local");var te=Br(t);if(O=="local"?te+=Ua(e.display):te-=e.display.viewOffset,O=="page"||O=="window"){var oe=e.display.lineSpace.getBoundingClientRect();te+=oe.top+(O=="window"?0:or());var ue=oe.left+(O=="window"?0:lr());D.left+=ue,D.right+=ue}return D.top+=te,D.bottom+=te,D}function gr(e,t,D){if(D=="div")return t;var O=t.left,U=t.top;if(D=="page")O-=lr(),U-=or();else if(D=="local"||!D){var V=e.display.sizer.getBoundingClientRect();O+=V.left,U+=V.top}var te=e.display.lineSpace.getBoundingClientRect();return{left:O-te.left,top:U-te.top}}function pn(e,t,D,O,U){return O||(O=ht(e.doc,t.line)),Or(e,O,Ne(e,O,t.ch,U),D)}function vr(e,t,D,O,U,V){O=O||ht(e.doc,t.line),U||(U=Fe(e,O));function te(it,st){var mt=Ye(e,U,it,st?"right":"left",V);return st?mt.left=mt.right:mt.right=mt.left,Or(e,O,mt,D)}var oe=et(O,e.doc.direction),ue=t.ch,me=t.sticky;if(ue>=O.text.length?(ue=O.text.length,me="before"):ue<=0&&(ue=0,me="after"),!oe)return te(me=="before"?ue-1:ue,me=="before");function Ie(it,st,mt){var vt=oe[st],St=vt.level==1;return te(mt?it-1:it,St!=mt)}var je=$e(oe,ue,me),qe=Qe,Ze=Ie(ue,je,me=="before");return qe!=null&&(Ze.other=Ie(ue,qe,me!="before")),Ze}function Ft(e,t){var D=0;t=wt(e.doc,t),e.options.lineWrapping||(D=zn(e.display)*t.ch);var O=ht(e.doc,t.line),U=Br(O)+Ua(e.display);return{left:D,right:D,top:U,bottom:U+O.height}}function It(e,t,D,O,U){var V=ot(e,t,D);return V.xRel=U,O&&(V.outside=O),V}function yr(e,t,D){var O=e.doc;if(D+=e.display.viewOffset,D<0)return It(O.first,0,null,-1,-1);var U=Lr(O,D),V=O.first+O.size-1;if(U>V)return It(O.first+O.size-1,ht(O,V).text.length,null,1,1);t<0&&(t=0);for(var te=ht(O,U);;){var oe=mn(e,te,U,t,D),ue=Va(te,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!ue)return oe;var me=ue.find(1);if(me.line==U)return me;te=ht(O,U=me.line)}}function Ar(e,t,D,O){O-=rr(t);var U=t.text.length,V=ze(function(te){return Ye(e,D,te-1).bottom<=O},U,0);return U=ze(function(te){return Ye(e,D,te).top>O},V,U),{begin:V,end:U}}function Dt(e,t,D,O){D||(D=Fe(e,t));var U=Or(e,t,Ye(e,D,O),"line").top;return Ar(e,t,D,U)}function Dr(e,t,D,O){return e.bottom<=D?!1:e.top>D?!0:(O?e.left:e.right)>t}function mn(e,t,D,O,U){U-=Br(t);var V=Fe(e,t),te=rr(t),oe=0,ue=t.text.length,me=!0,Ie=et(t,e.doc.direction);if(Ie){var je=(e.options.lineWrapping?Qr:Nr)(e,t,D,V,Ie,O,U);me=je.level!=1,oe=me?je.from:je.to-1,ue=me?je.to:je.from-1}var qe=null,Ze=null,it=ze(function(Ht){var Nt=Ye(e,V,Ht);return Nt.top+=te,Nt.bottom+=te,Dr(Nt,O,U,!1)?(Nt.top<=U&&Nt.left<=O&&(qe=Ht,Ze=Nt),!0):!1},oe,ue),st,mt,vt=!1;if(Ze){var St=O-Ze.left<Ze.right-O,yt=St==me;it=qe+(yt?0:1),mt=yt?"after":"before",st=St?Ze.left:Ze.right}else{!me&&(it==ue||it==oe)&&it++,mt=it==0?"after":it==t.text.length?"before":Ye(e,V,it-(me?1:0)).bottom+te<=U==me?"after":"before";var At=vr(e,ot(D,it,mt),"line",t,V);st=At.left,vt=U<At.top?-1:U>=At.bottom?1:0}return it=we(t.text,it,1),It(D,it,mt,vt,O-st)}function Nr(e,t,D,O,U,V,te){var oe=ze(function(je){var qe=U[je],Ze=qe.level!=1;return Dr(vr(e,ot(D,Ze?qe.to:qe.from,Ze?"before":"after"),"line",t,O),V,te,!0)},0,U.length-1),ue=U[oe];if(oe>0){var me=ue.level!=1,Ie=vr(e,ot(D,me?ue.from:ue.to,me?"after":"before"),"line",t,O);Dr(Ie,V,te,!0)&&Ie.top>te&&(ue=U[oe-1])}return ue}function Qr(e,t,D,O,U,V,te){var oe=Ar(e,t,O,te),ue=oe.begin,me=oe.end;/\s/.test(t.text.charAt(me-1))&&me--;for(var Ie=null,je=null,qe=0;qe<U.length;qe++){var Ze=U[qe];if(Ze.from>=me||Ze.to<=ue)continue;var it=Ze.level!=1,st=Ye(e,O,it?Math.min(me,Ze.to)-1:Math.max(ue,Ze.from)).right,mt=st<V?V-st+1e9:st-V;(!Ie||je>mt)&&(Ie=Ze,je=mt)}return Ie||(Ie=U[U.length-1]),Ie.from<ue&&(Ie={from:ue,to:Ie.to,level:Ie.level}),Ie.to>me&&(Ie={from:Ie.from,to:me,level:Ie.level}),Ie}var Vr;function An(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Vr==null){Vr=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Vr.appendChild(document.createTextNode("x")),Vr.appendChild(_("br"));Vr.appendChild(document.createTextNode("x"))}b(e.measure,Vr);var D=Vr.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),E(e.measure),D||1}function zn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),D=_("pre",[t],"CodeMirror-line-like");b(e.measure,D);var O=t.getBoundingClientRect(),U=(O.right-O.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function bn(e){for(var t=e.display,D={},O={},U=t.gutters.clientLeft,V=t.gutters.firstChild,te=0;V;V=V.nextSibling,++te){var oe=e.display.gutterSpecs[te].className;D[oe]=V.offsetLeft+V.clientLeft+U,O[oe]=V.clientWidth}return{fixedPos:oa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:D,gutterWidth:O,wrapperWidth:t.wrapper.clientWidth}}function oa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Oa(e){var t=An(e.display),D=e.options.lineWrapping,O=D&&Math.max(5,e.display.scroller.clientWidth/zn(e.display)-3);return function(U){if(Pr(e.doc,U))return 0;var V=0;if(U.widgets)for(var te=0;te<U.widgets.length;te++)U.widgets[te].height&&(V+=U.widgets[te].height);return D?V+(Math.ceil(U.text.length/O)||1)*t:V+t}}function da(e){var t=e.doc,D=Oa(e);t.iter(function(O){var U=D(O);U!=O.height&&Pt(O,U)})}function Gn(e,t,D,O){var U=e.display;if(!D&&Be(t).getAttribute("cm-not-content")=="true")return null;var V,te,oe=U.lineSpace.getBoundingClientRect();try{V=t.clientX-oe.left,te=t.clientY-oe.top}catch(je){return null}var ue=yr(e,V,te),me;if(O&&ue.xRel>0&&(me=ht(e.doc,ue.line).text).length==ue.ch){var Ie=F(me,me.length,e.options.tabSize)-me.length;ue=ot(ue.line,Math.max(0,Math.round((V-Ue(e.display).left)/zn(e.display))-Ie))}return ue}function sn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var D=e.display.view,O=0;O<D.length;O++)if(t-=D[O].size,t<0)return O}function Zr(e,t,D,O){t==null&&(t=e.doc.first),D==null&&(D=e.doc.first+e.doc.size),O||(O=0);var U=e.display;if(O&&D<U.viewTo&&(U.updateLineNumbers==null||U.updateLineNumbers>t)&&(U.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=U.viewTo)kt&&pr(e.doc,t)<U.viewTo&&gn(e);else if(D<=U.viewFrom)kt&&mr(e.doc,D+O)>U.viewFrom?gn(e):(U.viewFrom+=O,U.viewTo+=O);else if(t<=U.viewFrom&&D>=U.viewTo)gn(e);else if(t<=U.viewFrom){var V=Aa(e,D,D+O,1);V?(U.view=U.view.slice(V.index),U.viewFrom=V.lineN,U.viewTo+=O):gn(e)}else if(D>=U.viewTo){var te=Aa(e,t,t,-1);te?(U.view=U.view.slice(0,te.index),U.viewTo=te.lineN):gn(e)}else{var oe=Aa(e,t,t,-1),ue=Aa(e,D,D+O,1);oe&&ue?(U.view=U.view.slice(0,oe.index).concat(_a(e,oe.lineN,ue.lineN)).concat(U.view.slice(ue.index)),U.viewTo+=O):gn(e)}var me=U.externalMeasured;me&&(D<me.lineN?me.lineN+=O:t<me.lineN+me.size&&(U.externalMeasured=null))}function xn(e,t,D){e.curOp.viewChanged=!0;var O=e.display,U=e.display.externalMeasured;if(U&&t>=U.lineN&&t<U.lineN+U.size&&(O.externalMeasured=null),t<O.viewFrom||t>=O.viewTo)return;var V=O.view[sn(e,t)];if(V.node==null)return;var te=V.changes||(V.changes=[]);ee(te,D)==-1&&te.push(D)}function gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Aa(e,t,D,O){var U=sn(e,t),V,te=e.display.view;if(!kt||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var oe=e.display.viewFrom,ue=0;ue<U;ue++)oe+=te[ue].size;if(oe!=t){if(O>0){if(U==te.length-1)return null;V=oe+te[U].size-t,U++}else V=oe-t;t+=V,D+=V}for(;pr(e.doc,D)!=D;){if(U==(O<0?0:te.length-1))return null;D+=O*te[U-(O<0?1:0)].size,U+=O}return{index:U,lineN:D}}function $a(e,t,D){var O=e.display,U=O.view;U.length==0||t>=O.viewTo||D<=O.viewFrom?(O.view=_a(e,t,D),O.viewFrom=t):(O.viewFrom>t?O.view=_a(e,t,O.viewFrom).concat(O.view):O.viewFrom<t&&(O.view=O.view.slice(sn(e,t))),O.viewFrom=t,O.viewTo<D?O.view=O.view.concat(_a(e,O.viewTo,D)):O.viewTo>D&&(O.view=O.view.slice(0,sn(e,D)))),O.viewTo=D}function Ja(e){for(var t=e.display.view,D=0,O=0;O<t.length;O++){var U=t[O];!U.hidden&&(!U.node||U.changes)&&++D}return D}function Yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fa(e,t){t===void 0&&(t=!0);for(var D=e.doc,O={},U=O.cursors=document.createDocumentFragment(),V=O.selection=document.createDocumentFragment(),te=0;te<D.sel.ranges.length;te++){if(!t&&te==D.sel.primIndex)continue;var oe=D.sel.ranges[te];if(oe.from().line>=e.display.viewTo||oe.to().line<e.display.viewFrom)continue;var ue=oe.empty();(ue||e.options.showCursorWhenSelecting)&&Qa(e,oe.head,U),ue||Kr(e,oe,V)}return O}function Qa(e,t,D){var O=vr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),U=D.appendChild(_("div","\xA0","CodeMirror-cursor"));if(U.style.left=O.left+"px",U.style.top=O.top+"px",U.style.height=Math.max(0,O.bottom-O.top)*e.options.cursorHeight+"px",O.other){var V=D.appendChild(_("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=O.other.left+"px",V.style.top=O.other.top+"px",V.style.height=(O.other.bottom-O.other.top)*.85+"px"}}function nn(e,t){return e.top-t.top||e.left-t.left}function Kr(e,t,D){var O=e.display,U=e.doc,V=document.createDocumentFragment(),te=Ue(e.display),oe=te.left,ue=Math.max(O.sizerWidth,Pe(e)-O.sizer.offsetLeft)-te.right,me=U.direction=="ltr";function Ie(yt,At,Ht,Nt){At<0&&(At=0),At=Math.round(At),Nt=Math.round(Nt),V.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+yt+`px;
top: `+At+"px; width: "+(Ht==null?ue-yt:Ht)+`px;
height: `+(Nt-At)+"px"))}function je(yt,At,Ht){var Nt=ht(U,yt),dr=Nt.text.length,ln,Qn;function wn(Fn,xa){return pn(e,ot(yt,Fn),"div",Nt,xa)}function Sa(Fn,xa,na){var $n=Dt(e,Nt,null,Fn),Bn=xa=="ltr"==(na=="after")?"left":"right",Dn=na=="after"?$n.begin:$n.end-(/\s/.test(Nt.text.charAt($n.end-1))?2:1);return wn(Dn,Bn)[Bn]}var ba=et(Nt,U.direction);return Ge(ba,At||0,Ht==null?dr:Ht,function(Fn,xa,na,$n){var Bn=na=="ltr",Dn=wn(Fn,Bn?"left":"right"),Ea=wn(xa-1,Bn?"right":"left"),Zi=At==null&&Fn==0,Si=Ht==null&&xa==dr,la=$n==0,ri=!ba||$n==ba.length-1;if(Ea.top-Dn.top<=3){var Zn=(me?Zi:Si)&&la,ps=(me?Si:Zi)&&ri,fi=Zn?oe:(Bn?Dn:Ea).left,Mi=ps?ue:(Bn?Ea:Dn).right;Ie(fi,Dn.top,Mi-fi,Dn.bottom)}else{var Pi,ma,qi,ms;Bn?(Pi=me&&Zi&&la?oe:Dn.left,ma=me?ue:Sa(Fn,na,"before"),qi=me?oe:Sa(xa,na,"after"),ms=me&&Si&&ri?ue:Ea.right):(Pi=me?Sa(Fn,na,"before"):oe,ma=!me&&Zi&&la?ue:Dn.right,qi=!me&&Si&&ri?oe:Ea.left,ms=me?Sa(xa,na,"after"):ue),Ie(Pi,Dn.top,ma-Pi,Dn.bottom),Dn.bottom<Ea.top&&Ie(oe,Dn.bottom,null,Ea.top),Ie(qi,Ea.top,ms-qi,Ea.bottom)}(!ln||nn(Dn,ln)<0)&&(ln=Dn),nn(Ea,ln)<0&&(ln=Ea),(!Qn||nn(Dn,Qn)<0)&&(Qn=Dn),nn(Ea,Qn)<0&&(Qn=Ea)}),{start:ln,end:Qn}}var qe=t.from(),Ze=t.to();if(qe.line==Ze.line)je(qe.line,qe.ch,Ze.ch);else{var it=ht(U,qe.line),st=ht(U,Ze.line),mt=Rt(it)==Rt(st),vt=je(qe.line,qe.ch,mt?it.text.length+1:null).end,St=je(Ze.line,mt?0:null,Ze.ch).start;mt&&(vt.top<St.top-2?(Ie(vt.right,vt.top,null,vt.bottom),Ie(oe,St.top,St.left,St.bottom)):Ie(vt.right,vt.top,St.left-vt.right,vt.bottom)),vt.bottom<St.top&&Ie(oe,vt.bottom,null,St.top)}D.appendChild(V)}function Xn(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var D=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||mi(e),t.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Co(e){e.state.focused||(e.display.input.focus(),Za(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,mi(e))},100)}function Za(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(He(e,"focus",e,t),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xn(e)}function mi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(He(e,"blur",e,t),e.state.focused=!1,y(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,D=t.lineDiv.offsetTop,O=0;O<t.view.length;O++){var U=t.view[O],V=e.options.lineWrapping,te=void 0,oe=0;if(U.hidden)continue;if(S&&f<8){var ue=U.node.offsetTop+U.node.offsetHeight;te=ue-D,D=ue}else{var me=U.node.getBoundingClientRect();te=me.bottom-me.top,!V&&U.text.firstChild&&(oe=U.text.firstChild.getBoundingClientRect().right-me.left-1)}var Ie=U.line.height-te;if((Ie>.005||Ie<-.005)&&(Pt(U.line,te),to(U.line),U.rest))for(var je=0;je<U.rest.length;je++)to(U.rest[je]);if(oe>e.display.sizerWidth){var qe=Math.ceil(oe/zn(e.display));qe>e.display.maxLineLength&&(e.display.maxLineLength=qe,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 D=e.widgets[t],O=D.node.parentNode;O&&(D.height=O.offsetHeight)}}function Ii(e,t,D){var O=D&&D.top!=null?Math.max(0,D.top):e.scroller.scrollTop;O=Math.floor(O-Ua(e));var U=D&&D.bottom!=null?D.bottom:O+e.wrapper.clientHeight,V=Lr(t,O),te=Lr(t,U);if(D&&D.ensure){var oe=D.ensure.from.line,ue=D.ensure.to.line;oe<V?(V=oe,te=Lr(t,Br(ht(t,oe))+e.wrapper.clientHeight)):Math.min(ue,t.lastLine())>=te&&(V=Lr(t,Br(ht(t,ue))-e.wrapper.clientHeight),te=ue)}return{from:V,to:Math.max(te,V+1)}}function Vo(e,t){if(Je(e,"scrollCursorIntoView"))return;var D=e.display,O=D.sizer.getBoundingClientRect(),U=null;if(t.top+O.top<0?U=!0:t.bottom+O.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!w){var V=_("div","\u200B",null,`position: absolute;
top: `+(t.top-D.viewOffset-Ua(e.display))+`px;
height: `+(t.bottom-t.top+Ke(e)+D.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,D,O){O==null&&(O=0);var U;!e.options.lineWrapping&&t==D&&(t=t.ch?ot(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,D=t.sticky=="before"?ot(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var te=!1,oe=vr(e,t),ue=!D||D==t?oe:vr(e,D);U={left:Math.min(oe.left,ue.left),top:Math.min(oe.top,ue.top)-O,right:Math.max(oe.left,ue.left),bottom:Math.max(oe.bottom,ue.bottom)+O};var me=ro(e,U),Ie=e.doc.scrollTop,je=e.doc.scrollLeft;if(me.scrollTop!=null&&(yi(e,me.scrollTop),Math.abs(e.doc.scrollTop-Ie)>1&&(te=!0)),me.scrollLeft!=null&&(Da(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-je)>1&&(te=!0)),!te)break}return U}function _o(e,t){var D=ro(e,t);D.scrollTop!=null&&yi(e,D.scrollTop),D.scrollLeft!=null&&Da(e,D.scrollLeft)}function ro(e,t){var D=e.display,O=An(e.display);t.top<0&&(t.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,V=fe(e),te={};t.bottom-t.top>V&&(t.bottom=t.top+V);var oe=e.doc.height+Le(D),ue=t.top<O,me=t.bottom>oe-O;if(t.top<U)te.scrollTop=ue?0:t.top;else if(t.bottom>U+V){var Ie=Math.min(t.top,(me?oe:t.bottom)-V);Ie!=U&&(te.scrollTop=Ie)}var je=e.options.fixedGutter?0:D.gutters.offsetWidth,qe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-je,Ze=Pe(e)-D.gutters.offsetWidth,it=t.right-t.left>Ze;return it&&(t.right=t.left+Ze),t.left<10?te.scrollLeft=0:t.left<qe?te.scrollLeft=Math.max(0,t.left+je-(it?0:10)):t.right>Ze+qe-3&&(te.scrollLeft=t.right+(it?0:10)-Ze),te}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 gi(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function vi(e,t,D){(t!=null||D!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),D!=null&&(e.curOp.scrollTop=D)}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 D=Ft(e,t.from),O=Ft(e,t.to);Oi(e,D,O,t.margin)}}function Oi(e,t,D,O){var U=ro(e,{left:Math.min(t.left,D.left),top:Math.min(t.top,D.top)-O,right:Math.max(t.right,D.right),bottom:Math.max(t.bottom,D.bottom)+O});vi(e,U.scrollLeft,U.scrollTop)}function yi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;C||Ri(e,{top:t}),bi(e,t,!0),C&&Ri(e),Di(e,100)}function bi(e,t,D){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!D)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Da(e,t,D,O){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!O)return;e.doc.scrollLeft=t,br(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function oi(e){var t=e.display,D=t.gutters.offsetWidth,O=Math.round(e.doc.height+Le(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?D:0,docHeight:O,scrollHeight:O+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:D}}var qa=function(e,t,D){this.cm=D;var O=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");O.tabIndex=U.tabIndex=-1,e(O),e(U),Ce(O,"scroll",function(){O.clientHeight&&t(O.scrollTop,"vertical")}),Ce(U,"scroll",function(){U.clientWidth&&t(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&f<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qa.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,O=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=t?O+"px":"0";var U=e.viewHeight-(t?O: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=D?O+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(D?O: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&&(O==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?O:0,bottom:t?O:0}},qa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qa.prototype.zeroWidthHack=function(){var e=l&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},qa.prototype.enableZeroWidthBar=function(e,t,D){e.style.pointerEvents="auto";function O(){var U=e.getBoundingClientRect(),V=D=="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,O)}t.set(1e3,O)},qa.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 si(e,t){t||(t=oi(e));var D=e.display.barWidth,O=e.display.barHeight;ji(e,t);for(var U=0;U<4&&D!=e.display.barWidth||O!=e.display.barHeight;U++)D!=e.display.barWidth&&e.options.lineWrapping&&ki(e),ji(e,oi(e)),D=e.display.barWidth,O=e.display.barHeight}function ji(e,t){var D=e.display,O=D.scrollbars.update(t);D.sizer.style.paddingRight=(D.barWidth=O.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=O.bottom)+"px",D.heightForcer.style.borderBottom=O.bottom+"px solid transparent",O.right&&O.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=O.bottom+"px",D.scrollbarFiller.style.width=O.right+"px"):D.scrollbarFiller.style.display="",O.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=O.bottom+"px",D.gutterFiller.style.width=t.gutterWidth+"px"):D.gutterFiller.style.display=""}var ao={native:qa,null:Ai};function Ui(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(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,D){D=="horizontal"?Da(e,t):yi(e,t)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var io=0;function ei(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},_i(e.curOp)}function li(e){var t=e.curOp;t&&_r(t,function(D){for(var O=0;O<D.ops.length;O++)D.ops[O].cm.curOp=null;Oo(D)})}function Oo(e){for(var t=e.ops,D=0;D<t.length;D++)Jo(t[D]);for(var O=0;O<t.length;O++)Qo(t[O]);for(var U=0;U<t.length;U++)Zo(t[U]);for(var V=0;V<t.length;V++)oo(t[V]);for(var te=0;te<t.length;te++)qo(t[te])}function Jo(e){var t=e.cm,D=t.display;Ao(t),e.updateMaxLine&&Hn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<D.viewFrom||e.scrollToPos.to.line>=D.viewTo)||D.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ra(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&ui(e.cm,e.update)}function Zo(e){var t=e.cm,D=t.display;e.updatedDisplay&&ki(t),e.barMeasure=oi(t),D.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ne(t,D.maxLine,D.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Pe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.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&&Da(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var D=e.focus&&e.focus==G();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,D),(e.updatedDisplay||e.startHeight!=t.doc.height)&&si(t,e.barMeasure),e.updatedDisplay&&Wr(t,e.barMeasure),e.selectionChanged&&Xn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),D&&Co(e.cm)}function qo(e){var t=e.cm,D=t.display,O=t.doc;if(e.updatedDisplay&&Fi(t,e.update),D.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),e.scrollTop!=null&&bi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Da(t,e.scrollLeft,!0,!0),e.scrollToPos){var U=Yo(t,wt(O,e.scrollToPos.from),wt(O,e.scrollToPos.to),e.scrollToPos.margin);Vo(t,U)}var V=e.maybeHiddenMarkers,te=e.maybeUnhiddenMarkers;if(V)for(var oe=0;oe<V.length;++oe)V[oe].lines.length||He(V[oe],"hide");if(te)for(var ue=0;ue<te.length;++ue)te[ue].lines.length&&He(te[ue],"unhide");D.wrapper.offsetHeight&&(O.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&He(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function fa(e,t){if(e.curOp)return t();ei(e);try{return t()}finally{li(e)}}function kn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ei(e);try{return t.apply(e,arguments)}finally{li(e)}}}function ra(e){return function(){if(this.curOp)return e.apply(this,arguments);ei(this);try{return e.apply(this,arguments)}finally{li(this)}}}function In(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ei(t);try{return e.apply(this,arguments)}finally{li(t)}}}function Di(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(es,e))}function es(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var D=+new Date+e.options.workTime,O=an(e,t.highlightFrontier),U=[];t.iter(O.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(O.line>=e.display.viewFrom){var te=V.styles,oe=V.text.length>e.options.maxHighlightLength?wr(t.mode,O.state):null,ue=qn(e,V,O,!0);oe&&(O.state=oe),V.styles=ue.styles;var me=V.styleClasses,Ie=ue.classes;Ie?V.styleClasses=Ie:me&&(V.styleClasses=null);for(var je=!te||te.length!=V.styles.length||me!=Ie&&(!me||!Ie||me.bgClass!=Ie.bgClass||me.textClass!=Ie.textClass),qe=0;!je&&qe<te.length;++qe)je=te[qe]!=V.styles[qe];je&&U.push(O.line),V.stateAfter=O.save(),O.nextLine()}else V.text.length<=e.options.maxHighlightLength&&ea(e,V.text,O),V.stateAfter=O.line%5==0?O.save():null,O.nextLine();if(+new Date>D)return Di(e,e.options.workDelay),!0}),t.highlightFrontier=O.line,t.modeFrontier=Math.max(t.modeFrontier,O.line),U.length&&fa(e,function(){for(var V=0;V<U.length;V++)xn(e,U[V],"text")})}var Ra=function(e,t,D){var O=e.display;this.viewport=t,this.visible=Ii(O,e.doc,t),this.editorIsHidden=!O.wrapper.offsetWidth,this.wrapperHeight=O.wrapper.clientHeight,this.wrapperWidth=O.wrapper.clientWidth,this.oldDisplayWidth=Pe(e),this.force=D,this.dims=bn(e),this.events=[]};Ra.prototype.signal=function(e,t){Se(e,t)&&this.events.push(arguments)},Ra.prototype.finish=function(){for(var e=0;e<this.events.length;e++)He.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 Do(e){if(e.hasFocus())return null;var t=G();if(!t||!M(e.display.lineDiv,t))return null;var D={activeElt:t};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&M(e.display.lineDiv,O.anchorNode)&&(D.anchorNode=O.anchorNode,D.anchorOffset=O.anchorOffset,D.focusNode=O.focusNode,D.focusOffset=O.focusOffset)}return D}function Ro(e){if(!e||!e.activeElt||e.activeElt==G())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(),D=document.createRange();D.setEnd(e.anchorNode,e.anchorOffset),D.collapse(!1),t.removeAllRanges(),t.addRange(D),t.extend(e.focusNode,e.focusOffset)}}function ui(e,t){var D=e.display,O=e.doc;if(t.editorIsHidden)return gn(e),!1;if(!t.force&&t.visible.from>=D.viewFrom&&t.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&Ja(e)==0)return!1;Vn(e)&&(gn(e),t.dims=bn(e));var U=O.first+O.size,V=Math.max(t.visible.from-e.options.viewportMargin,O.first),te=Math.min(U,t.visible.to+e.options.viewportMargin);D.viewFrom<V&&V-D.viewFrom<20&&(V=Math.max(O.first,D.viewFrom)),D.viewTo>te&&D.viewTo-te<20&&(te=Math.min(U,D.viewTo)),kt&&(V=pr(e.doc,V),te=mr(e.doc,te));var oe=V!=D.viewFrom||te!=D.viewTo||D.lastWrapHeight!=t.wrapperHeight||D.lastWrapWidth!=t.wrapperWidth;$a(e,V,te),D.viewOffset=Br(ht(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var ue=Ja(e);if(!oe&&ue==0&&!t.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var me=Do(e);return ue>4&&(D.lineDiv.style.display="none"),Lo(e,D.updateLineNumbers,t.dims),ue>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Ro(me),E(D.cursorDiv),E(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,oe&&(D.lastWrapHeight=t.wrapperHeight,D.lastWrapWidth=t.wrapperWidth,Di(e,400)),D.updateLineNumbers=null,!0}function Fi(e,t){for(var D=t.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||t.oldDisplayWidth==Pe(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Le(e.display)-fe(e),D.top)}),t.visible=Ii(e.display,e.doc,D),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else O&&(t.visible=Ii(e.display,e.doc,D));if(!ui(e,t))break;ki(e);var U=oi(e);Yr(e),si(e,U),Wr(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 Ri(e,t){var D=new Ra(e,t);if(ui(e,D)){ki(e),Fi(e,D);var O=oi(e);Yr(e),si(e,O),Wr(e,O),D.finish()}}function Lo(e,t,D){var O=e.display,U=e.options.lineNumbers,V=O.lineDiv,te=V.firstChild;function oe(it){var st=it.nextSibling;return a&&l&&e.display.currentWheelTarget==it?it.style.display="none":it.parentNode.removeChild(it),st}for(var ue=O.view,me=O.viewFrom,Ie=0;Ie<ue.length;Ie++){var je=ue[Ie];if(!je.hidden)if(!je.node||je.node.parentNode!=V){var qe=hn(e,je,me,D);V.insertBefore(qe,te)}else{for(;te!=je.node;)te=oe(te);var Ze=U&&t!=null&&t<=me&&je.lineNumber;je.changes&&(ee(je.changes,"gutter")>-1&&(Ze=!1),Na(e,je,me,D)),Ze&&(E(je.lineNumber),je.lineNumber.appendChild(document.createTextNode(Mr(e.options,me)))),te=je.node.nextSibling}me+=je.size}for(;te;)te=oe(te)}function Bi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Wr(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 br(e){var t=e.display,D=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var O=oa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,U=t.gutters.offsetWidth,V=O+"px",te=0;te<D.length;te++)if(!D[te].hidden){e.options.fixedGutter&&(D[te].gutter&&(D[te].gutter.style.left=V),D[te].gutterBackground&&(D[te].gutterBackground.style.left=V));var oe=D[te].alignable;if(oe)for(var ue=0;ue<oe.length;ue++)oe[ue].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=O+U+"px")}function Vn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,D=Mr(e.options,t.first+t.size-1),O=e.display;if(D.length!=O.lineNumChars){var U=O.measure.appendChild(_("div",[_("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=U.firstChild.offsetWidth,te=U.offsetWidth-V;return O.lineGutter.style.width="",O.lineNumInnerWidth=Math.max(V,O.lineGutter.offsetWidth-te)+1,O.lineNumWidth=O.lineNumInnerWidth+te,O.lineNumChars=O.lineNumInnerWidth?D.length:-1,O.lineGutter.style.width=O.lineNumWidth+"px",Bi(e.display),!0}return!1}function ha(e,t){for(var D=[],O=!1,U=0;U<e.length;U++){var V=e[U],te=null;if(typeof V!="string"&&(te=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)O=!0;else continue;D.push({className:V,style:te})}return t&&!O&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function xi(e){var t=e.gutters,D=e.gutterSpecs;E(t),e.lineGutter=null;for(var O=0;O<D.length;++O){var U=D[O],V=U.className,te=U.style,oe=t.appendChild(_("div",null,"CodeMirror-gutter "+V));te&&(oe.style.cssText=te),V=="CodeMirror-linenumbers"&&(e.lineGutter=oe,oe.style.width=(e.lineNumWidth||1)+"px")}t.style.display=D.length?"":"none",Bi(e)}function Ka(e){xi(e.display),Zr(e),br(e)}function Li(e,t,D,O){var U=this;this.input=D,U.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),U.scrollbarFiller.setAttribute("cm-not-content","true"),U.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),U.gutterFiller.setAttribute("cm-not-content","true"),U.lineDiv=I("div",null,"CodeMirror-code"),U.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),U.cursorDiv=_("div",null,"CodeMirror-cursors"),U.measure=_("div",null,"CodeMirror-measure"),U.lineMeasure=_("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=_("div",[V],null,"position: relative"),U.sizer=_("div",[U.mover],"CodeMirror-sizer"),U.sizerWidth=null,U.heightForcer=_("div",null,null,"position: absolute; height: "+Z+"px; width: 1px;"),U.gutters=_("div",null,"CodeMirror-gutters"),U.lineGutter=null,U.scroller=_("div",[U.sizer,U.heightForcer,U.gutters],"CodeMirror-scroll"),U.scroller.setAttribute("tabIndex","-1"),U.wrapper=_("div",[U.scrollbarFiller,U.gutterFiller,U.scroller],"CodeMirror"),S&&f<8&&(U.gutters.style.zIndex=-1,U.scroller.style.paddingRight=0),!a&&!(C&&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=ha(O.gutters,O.lineNumbers),xi(U),D.init(U)}var ti=0,Yn=null;S?Yn=-.53:C?Yn=15:r?Yn=-.7:g&&(Yn=-1/3);function Wi(e){var t=e.wheelDeltaX,D=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),D==null&&e.detail&&e.axis==e.VERTICAL_AXIS?D=e.detail:D==null&&(D=e.wheelDelta),{x:t,y:D}}function so(e){var t=Wi(e);return t.x*=Yn,t.y*=Yn,t}function lo(e,t){var D=Wi(t),O=D.x,U=D.y,V=e.display,te=V.scroller,oe=te.scrollWidth>te.clientWidth,ue=te.scrollHeight>te.clientHeight;if(!(O&&oe||U&&ue))return;if(U&&l&&a){e:for(var me=t.target,Ie=V.view;me!=te;me=me.parentNode)for(var je=0;je<Ie.length;je++)if(Ie[je].node==me){e.display.currentWheelTarget=me;break e}}if(O&&!C&&!x&&Yn!=null){U&&ue&&yi(e,Math.max(0,te.scrollTop+U*Yn)),Da(e,Math.max(0,te.scrollLeft+O*Yn)),(!U||U&&ue)&&de(t),V.wheelStartX=null;return}if(U&&Yn!=null){var qe=U*Yn,Ze=e.doc.scrollTop,it=Ze+V.wrapper.clientHeight;qe<0?Ze=Math.max(0,Ze+qe-50):it=Math.min(e.doc.height,it+qe+50),Ri(e,{top:Ze,bottom:it})}ti<20&&(V.wheelStartX==null?(V.wheelStartX=te.scrollLeft,V.wheelStartY=te.scrollTop,V.wheelDX=O,V.wheelDY=U,setTimeout(function(){if(V.wheelStartX==null)return;var st=te.scrollLeft-V.wheelStartX,mt=te.scrollTop-V.wheelStartY,vt=mt&&V.wheelDY&&mt/V.wheelDY||st&&V.wheelDX&&st/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!vt)return;Yn=(Yn*ti+vt)/(ti+1),++ti},200)):(V.wheelDX+=O,V.wheelDY+=U))}var pa=function(e,t){this.ranges=e,this.primIndex=t};pa.prototype.primary=function(){return this.ranges[this.primIndex]},pa.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 D=this.ranges[t],O=e.ranges[t];if(!lt(D.anchor,O.anchor)||!lt(D.head,O.head))return!1}return!0},pa.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ur(un(this.ranges[t].anchor),un(this.ranges[t].head));return new pa(e,this.primIndex)},pa.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},pa.prototype.contains=function(e,t){t||(t=e);for(var D=0;D<this.ranges.length;D++){var O=this.ranges[D];if(Ot(t,O.from())>=0&&Ot(e,O.to())<=0)return D}return-1};var Ur=function(e,t){this.anchor=e,this.head=t};Ur.prototype.from=function(){return dn(this.anchor,this.head)},Ur.prototype.to=function(){return Sn(this.anchor,this.head)},Ur.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function La(e,t,D){var O=e&&e.options.selectionsMayTouch,U=t[D];t.sort(function(qe,Ze){return Ot(qe.from(),Ze.from())}),D=ee(t,U);for(var V=1;V<t.length;V++){var te=t[V],oe=t[V-1],ue=Ot(oe.to(),te.from());if(O&&!te.empty()?ue>0:ue>=0){var me=dn(oe.from(),te.from()),Ie=Sn(oe.to(),te.to()),je=oe.empty()?te.from()==te.head:oe.from()==oe.head;V<=D&&--D,t.splice(--V,2,new Ur(je?Ie:me,je?me:Ie))}}return new pa(t,D)}function za(e,t){return new pa([new Ur(e,t||e)],0)}function Ga(e){return e.text?ot(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,t){if(Ot(e,t.from)<0)return e;if(Ot(e,t.to)<=0)return Ga(t);var D=e.line+t.text.length-(t.to.line-t.from.line)-1,O=e.ch;return e.line==t.to.line&&(O+=Ga(t).ch-t.to.ch),ot(D,O)}function Hi(e,t){for(var D=[],O=0;O<e.sel.ranges.length;O++){var U=e.sel.ranges[O];D.push(new Ur(uo(U.anchor,t),uo(U.head,t)))}return La(e.cm,D,e.sel.primIndex)}function Mo(e,t,D){return e.line==t.line?ot(D.line,e.ch-t.ch+D.ch):ot(D.line+(e.line-t.line),e.ch)}function Po(e,t,D){for(var O=[],U=ot(e.first,0),V=U,te=0;te<t.length;te++){var oe=t[te],ue=Mo(oe.from,U,V),me=Mo(Ga(oe),U,V);if(U=oe.to,V=me,D=="around"){var Ie=e.sel.ranges[te],je=Ot(Ie.head,Ie.anchor)<0;O[te]=new Ur(je?me:ue,je?ue:me)}else O[te]=new Ur(ue,ue)}return new pa(O,e.sel.primIndex)}function ci(e){e.doc.mode=Xt(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,Di(e,100),e.state.modeGen++,e.curOp&&Zr(e)}function gs(e,t){return t.from.ch==0&&t.to.ch==0&&re(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,t,D,O){function U(St){return D?D[St]:null}function V(St,yt,At){ur(St,yt,At,O),ar(St,"change",St,t)}function te(St,yt){for(var At=[],Ht=St;Ht<yt;++Ht)At.push(new Cr(me[Ht],U(Ht),O));return At}var oe=t.from,ue=t.to,me=t.text,Ie=ht(e,oe.line),je=ht(e,ue.line),qe=re(me),Ze=U(me.length-1),it=ue.line-oe.line;if(t.full)e.insert(0,te(0,me.length)),e.remove(me.length,e.size-me.length);else if(gs(e,t)){var st=te(0,me.length-1);V(je,je.text,Ze),it&&e.remove(oe.line,it),st.length&&e.insert(oe.line,st)}else if(Ie==je)if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+qe+Ie.text.slice(ue.ch),Ze);else{var mt=te(1,me.length-1);mt.push(new Cr(qe+Ie.text.slice(ue.ch),Ze,O)),V(Ie,Ie.text.slice(0,oe.ch)+me[0],U(0)),e.insert(oe.line+1,mt)}else if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+me[0]+je.text.slice(ue.ch),U(0)),e.remove(oe.line+1,it);else{V(Ie,Ie.text.slice(0,oe.ch)+me[0],U(0)),V(je,qe+je.text.slice(ue.ch),Ze);var vt=te(1,me.length-1);it>1&&e.remove(oe.line+1,it-1),e.insert(oe.line+1,vt)}ar(e,"change",e,t)}function Ei(e,t,D){function O(U,V,te){if(U.linked)for(var oe=0;oe<U.linked.length;++oe){var ue=U.linked[oe];if(ue.doc==V)continue;var me=te&&ue.sharedHist;if(D&&!me)continue;t(ue.doc,me),O(ue.doc,U,me)}}O(e,null,!0)}function vs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,da(e),ci(e),ys(e),e.options.lineWrapping||Hn(e),e.options.mode=t.modeOption,Zr(e)}function ys(e){(e.doc.direction=="rtl"?K:y)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){fa(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 D={from:un(t.from),to:Ga(t),text:Tr(e,t.from,t.to)};return Es(e,D,t.from.line,t.to.line+1),Ei(e,function(O){return Es(O,D,t.from.line,t.to.line+1)},!0),D}function bs(e){for(;e.length;){var t=re(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return bs(e.done),re(e.done);if(e.done.length&&!re(e.done).ranges)return re(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function xs(e,t,D,O){var U=e.history;U.undone.length=0;var V=+new Date,te,oe;if((U.lastOp==O||U.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&U.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(te=ml(U,U.lastOp==O)))oe=re(te.changes),Ot(t.from,t.to)==0&&Ot(t.from,oe.to)==0?oe.to=Ga(t):te.changes.push(rs(e,t));else{var ue=re(U.done);for((!ue||!ue.ranges)&&Io(e.sel,U.done),te={changes:[rs(e,t)],generation:U.generation},U.done.push(te);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(D),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=V,U.lastOp=U.lastSelOp=O,U.lastOrigin=U.lastSelOrigin=t.origin,oe||He(e,"historyAdded")}function gl(e,t,D,O){var U=t.charAt(0);return U=="*"||U=="+"&&D.ranges.length==O.ranges.length&&D.somethingSelected()==O.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,D,O){var U=e.history,V=O&&O.origin;D==U.lastSelOp||V&&U.lastSelOrigin==V&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==V||gl(e,V,re(U.done),t))?U.done[U.done.length-1]=t:Io(t,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=V,U.lastSelOp=D,O&&O.clearRedo!==!1&&bs(U.undone)}function Io(e,t){var D=re(t);D&&D.ranges&&D.equals(e)||t.push(e)}function Es(e,t,D,O){var U=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,O),function(te){te.markedSpans&&((U||(U=t["spans_"+e.id]={}))[V]=te.markedSpans),++V})}function yl(e){if(!e)return null;for(var t,D=0;D<e.length;++D)e[D].marker.explicitlyCleared?t||(t=e.slice(0,D)):t&&t.push(e[D]);return t?t.length?t:null:e}function bl(e,t){var D=t["spans_"+e.id];if(!D)return null;for(var O=[],U=0;U<t.text.length;++U)O.push(yl(D[U]));return O}function ws(e,t){var D=bl(e,t),O=ia(e,t);if(!D)return O;if(!O)return D;for(var U=0;U<D.length;++U){var V=D[U],te=O[U];if(V&&te){e:for(var oe=0;oe<te.length;++oe){for(var ue=te[oe],me=0;me<V.length;++me)if(V[me].marker==ue.marker)continue e;V.push(ue)}}else te&&(D[U]=te)}return D}function Ki(e,t,D){for(var O=[],U=0;U<e.length;++U){var V=e[U];if(V.ranges){O.push(D?pa.prototype.deepCopy.call(V):V);continue}var te=V.changes,oe=[];O.push({changes:oe});for(var ue=0;ue<te.length;++ue){var me=te[ue],Ie=void 0;if(oe.push({from:me.from,to:me.to,text:me.text}),t)for(var je in me)(Ie=je.match(/^spans_(\d+)$/))&&(ee(t,Number(Ie[1]))>-1&&(re(oe)[je]=me[je],delete me[je]))}}return O}function ns(e,t,D,O){if(O){var U=e.anchor;if(D){var V=Ot(t,U)<0;V!=Ot(D,U)<0?(U=t,t=D):V!=Ot(t,D)<0&&(t=D)}return new Ur(U,t)}else return new Ur(D||t,t)}function No(e,t,D,O,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),sa(e,new pa([ns(e.sel.primary(),t,D,U)],0),O)}function Ts(e,t,D){for(var O=[],U=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)O[V]=ns(e.sel.ranges[V],t[V],null,U);var te=La(e.cm,O,e.sel.primIndex);sa(e,te,D)}function as(e,t,D,O){var U=e.sel.ranges.slice(0);U[t]=D,sa(e,La(e.cm,U,e.sel.primIndex),O)}function Ss(e,t,D,O){sa(e,za(t,D),O)}function xl(e,t,D){var O={ranges:t.ranges,update:function(U){this.ranges=[];for(var V=0;V<U.length;V++)this.ranges[V]=new Ur(wt(e,U[V].anchor),wt(e,U[V].head))},origin:D&&D.origin};return He(e,"beforeSelectionChange",e,O),e.cm&&He(e.cm,"beforeSelectionChange",e.cm,O),O.ranges!=t.ranges?La(e.cm,O.ranges,O.ranges.length-1):t}function Cs(e,t,D){var O=e.history.done,U=re(O);U&&U.ranges?(O[O.length-1]=t,jo(e,t,D)):sa(e,t,D)}function sa(e,t,D){jo(e,t,D),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,D)}function jo(e,t,D){(Se(e,"beforeSelectionChange")||e.cm&&Se(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,D));var O=D&&D.bias||(Ot(t.primary().head,e.sel.primary().head)<0?-1:1);_s(e,As(e,t,O,!0)),!(D&&D.scroll===!1)&&e.cm&&gi(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,_e(e.cm)),ar(e,"cursorActivity",e)}function Os(e){_s(e,As(e,e.sel,null,!1))}function As(e,t,D,O){for(var U,V=0;V<t.ranges.length;V++){var te=t.ranges[V],oe=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ue=Uo(e,te.anchor,oe&&oe.anchor,D,O),me=Uo(e,te.head,oe&&oe.head,D,O);(U||ue!=te.anchor||me!=te.head)&&(U||(U=t.ranges.slice(0,V)),U[V]=new Ur(ue,me))}return U?La(e.cm,U,t.primIndex):t}function zi(e,t,D,O,U){var V=ht(e,t.line);if(V.markedSpans)for(var te=0;te<V.markedSpans.length;++te){var oe=V.markedSpans[te],ue=oe.marker,me="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ie="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((oe.from==null||(me?oe.from<=t.ch:oe.from<t.ch))&&(oe.to==null||(Ie?oe.to>=t.ch:oe.to>t.ch))){if(U&&(He(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(V.markedSpans){--te;continue}else break;if(!ue.atomic)continue;if(D){var je=ue.find(O<0?1:-1),qe=void 0;if((O<0?Ie:me)&&(je=Ds(e,je,-O,je&&je.line==t.line?V:null)),je&&je.line==t.line&&(qe=Ot(je,D))&&(O<0?qe<0:qe>0))return zi(e,je,t,O,U)}var Ze=ue.find(O<0?-1:1);return(O<0?me:Ie)&&(Ze=Ds(e,Ze,O,Ze.line==t.line?V:null)),Ze?zi(e,Ze,t,O,U):null}}return t}function Uo(e,t,D,O,U){var V=O||1,te=zi(e,t,D,V,U)||!U&&zi(e,t,D,V,!0)||zi(e,t,D,-V,U)||!U&&zi(e,t,D,-V,!0);return te||(e.cantEdit=!0,ot(e.first,0))}function Ds(e,t,D,O){return D<0&&t.ch==0?t.line>e.first?wt(e,ot(t.line-1)):null:D>0&&t.ch==(O||ht(e,t.line)).text.length?t.line<e.first+e.size-1?ot(t.line+1,0):null:new ot(t.line,t.ch+D)}function Rs(e){e.setSelection(ot(e.firstLine(),0),ot(e.lastLine()),he)}function Ls(e,t,D){var O={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return O.canceled=!0}};return D&&(O.update=function(U,V,te,oe){U&&(O.from=wt(e,U)),V&&(O.to=wt(e,V)),te&&(O.text=te),oe!==void 0&&(O.origin=oe)}),He(e,"beforeChange",e,O),e.cm&&He(e.cm,"beforeChange",e.cm,O),O.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:O.from,to:O.to,text:O.text,origin:O.origin}}function Gi(e,t,D){if(e.cm){if(!e.cm.curOp)return kn(e.cm,Gi)(e,t,D);if(e.cm.state.suppressEdits)return}if((Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"))&&(t=Ls(e,t,!0),!t))return;var O=Gt&&!D&&Pa(e,t.from,t.to);if(O)for(var U=O.length-1;U>=0;--U)Ms(e,{from:O[U].from,to:O[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]==""&&Ot(t.from,t.to)==0)return;var D=Hi(e,t);xs(e,t,D,e.cm?e.cm.curOp.id:NaN),fo(e,t,D,ia(e,t));var O=[];Ei(e,function(U,V){!V&&ee(O,U.history)==-1&&(Ns(U.history,t),O.push(U.history)),fo(U,t,null,ia(U,t))})}function Fo(e,t,D){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!D)return;for(var U=e.history,V,te=e.sel,oe=t=="undo"?U.done:U.undone,ue=t=="undo"?U.undone:U.done,me=0;me<oe.length&&!(V=oe[me],D?V.ranges&&!V.equals(e.sel):!V.ranges);me++);if(me==oe.length)return;for(U.lastOrigin=U.lastSelOrigin=null;;)if(V=oe.pop(),V.ranges){if(Io(V,ue),D&&!V.equals(e.sel)){sa(e,V,{clearRedo:!1});return}te=V}else if(O){oe.push(V);return}else break;var Ie=[];Io(te,ue),ue.push({changes:Ie,generation:U.generation}),U.generation=V.generation||++U.maxGeneration;for(var je=Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange"),qe=function(st){var mt=V.changes[st];if(mt.origin=t,je&&!Ls(e,mt,!1))return oe.length=0,{};Ie.push(rs(e,mt));var vt=st?Hi(e,mt):re(oe);fo(e,mt,vt,ws(e,mt)),!st&&e.cm&&e.cm.scrollIntoView({from:mt.from,to:Ga(mt)});var St=[];Ei(e,function(yt,At){!At&&ee(St,yt.history)==-1&&(Ns(yt.history,mt),St.push(yt.history)),fo(yt,mt,null,ws(yt,mt))})},Ze=V.changes.length-1;Ze>=0;--Ze){var it=qe(Ze);if(it)return it.v}}function Ps(e,t){if(t==0)return;if(e.first+=t,e.sel=new pa(be(e.sel.ranges,function(U){return new Ur(ot(U.anchor.line+t,U.anchor.ch),ot(U.head.line+t,U.head.ch))}),e.sel.primIndex),e.cm){Zr(e.cm,e.first,e.first-t,t);for(var D=e.cm.display,O=D.viewFrom;O<D.viewTo;O++)xn(e.cm,O,"gutter")}}function fo(e,t,D,O){if(e.cm&&!e.cm.curOp)return kn(e.cm,fo)(e,t,D,O);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:ot(e.first,0),to:ot(t.to.line+U,t.to.ch),text:[re(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:ot(V,ht(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Tr(e,t.from,t.to),D||(D=Hi(e,t)),e.cm?El(e.cm,t,O):ts(e,t,O),jo(e,D,he),e.cantEdit&&Uo(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,D){var O=e.doc,U=e.display,V=t.from,te=t.to,oe=!1,ue=V.line;e.options.lineWrapping||(ue=_t(Rt(ht(O,V.line))),O.iter(ue,te.line+1,function(Ze){if(Ze==U.maxLine)return oe=!0,!0})),O.sel.contains(t.from,t.to)>-1&&_e(e),ts(O,t,D,Oa(e)),e.options.lineWrapping||(O.iter(ue,V.line+t.text.length,function(Ze){var it=tn(Ze);it>U.maxLineLength&&(U.maxLine=Ze,U.maxLineLength=it,U.maxLineChanged=!0,oe=!1)}),oe&&(e.curOp.updateMaxLine=!0)),zr(O,V.line),Di(e,400);var me=t.text.length-(te.line-V.line)-1;t.full?Zr(e):V.line==te.line&&t.text.length==1&&!gs(e.doc,t)?xn(e,V.line,"text"):Zr(e,V.line,te.line+1,me);var Ie=Se(e,"changes"),je=Se(e,"change");if(je||Ie){var qe={from:V,to:te,text:t.text,removed:t.removed,origin:t.origin};je&&ar(e,"change",e,qe),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(qe)}e.display.selForContextMenu=null}function Xi(e,t,D,O,U){var V;O||(O=D),Ot(O,D)<0&&(V=[O,D],D=V[0],O=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Gi(e,{from:D,to:O,text:t,origin:U})}function ks(e,t,D,O){D<e.line?e.line+=O:t<e.line&&(e.line=t,e.ch=0)}function Is(e,t,D,O){for(var U=0;U<e.length;++U){var V=e[U],te=!0;if(V.ranges){V.copied||(V=e[U]=V.deepCopy(),V.copied=!0);for(var oe=0;oe<V.ranges.length;oe++)ks(V.ranges[oe].anchor,t,D,O),ks(V.ranges[oe].head,t,D,O);continue}for(var ue=0;ue<V.changes.length;++ue){var me=V.changes[ue];if(D<me.from.line)me.from=ot(me.from.line+O,me.from.ch),me.to=ot(me.to.line+O,me.to.ch);else if(t<=me.to.line){te=!1;break}}te||(e.splice(0,U+1),U=0)}}function Ns(e,t){var D=t.from.line,O=t.to.line,U=t.text.length-(O-D)-1;Is(e.done,D,O,U),Is(e.undone,D,O,U)}function ho(e,t,D,O){var U=t,V=t;return typeof t=="number"?V=ht(e,jr(e,t)):U=_t(t),U==null?null:(O(V,U)&&e.cm&&xn(e.cm,U,D),V)}function po(e){this.lines=e,this.parent=null;for(var t=0,D=0;D<e.length;++D)e[D].parent=this,t+=e[D].height;this.height=t}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var D=e,O=e+t;D<O;++D){var U=this.lines[D];this.height-=U.height,yn(U),ar(U,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,D){this.height+=D,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var O=0;O<t.length;++O)t[O].parent=this},iterN:function(e,t,D){for(var O=e+t;e<O;++e)if(D(this.lines[e]))return!0}};function mo(e){this.children=e;for(var t=0,D=0,O=0;O<e.length;++O){var U=e[O];t+=U.chunkSize(),D+=U.height,U.parent=this}this.size=t,this.height=D,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var D=0;D<this.children.length;++D){var O=this.children[D],U=O.chunkSize();if(e<U){var V=Math.min(t,U-e),te=O.height;if(O.removeInner(e,V),this.height-=te-O.height,U==V&&(this.children.splice(D--,1),O.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 oe=[];this.collapse(oe),this.children=[new po(oe)],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,D){this.size+=t.length,this.height+=D;for(var O=0;O<this.children.length;++O){var U=this.children[O],V=U.chunkSize();if(e<=V){if(U.insertInner(e,t,D),U.lines&&U.lines.length>50){for(var te=U.lines.length%25+25,oe=te;oe<U.lines.length;){var ue=new po(U.lines.slice(oe,oe+=25));U.height-=ue.height,this.children.splice(++O,0,ue),ue.parent=this}U.lines=U.lines.slice(0,te),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),D=new mo(t);if(e.parent){e.size-=D.size,e.height-=D.height;var U=ee(e.parent.children,e);e.parent.children.splice(U+1,0,D)}else{var O=new mo(e.children);O.parent=e,e.children=[O,D],e=O}D.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,D){for(var O=0;O<this.children.length;++O){var U=this.children[O],V=U.chunkSize();if(e<V){var te=Math.min(t,V-e);if(U.iterN(e,te,D))return!0;if((t-=te)==0)break;e=0}else e-=V}}};var go=function(e,t,D){if(D)for(var O in D)D.hasOwnProperty(O)&&(this[O]=D[O]);this.doc=e,this.node=t};go.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,D=this.line,O=_t(D);if(O==null||!t)return;for(var U=0;U<t.length;++U)t[U]==this&&t.splice(U--,1);t.length||(D.widgets=null);var V=Pn(this);Pt(D,Math.max(0,D.height-V)),e&&(fa(e,function(){js(e,D,-V),xn(e,O,"widget")}),ar(e,"lineWidgetCleared",e,this,O))},go.prototype.changed=function(){var e=this,t=this.height,D=this.doc.cm,O=this.line;this.height=null;var U=Pn(this)-t;if(!U)return;Pr(this.doc,O)||Pt(O,O.height+U),D&&fa(D,function(){D.curOp.forceUpdate=!0,js(D,O,U),ar(D,"lineWidgetChanged",D,e,_t(O))})},Oe(go);function js(e,t,D){Br(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&no(e,D)}function wl(e,t,D,O){var U=new go(e,D,O),V=e.cm;return V&&U.noHScroll&&(V.display.alignWidgets=!0),ho(e,t,"widget",function(te){var oe=te.widgets||(te.widgets=[]);if(U.insertAt==null?oe.push(U):oe.splice(Math.min(oe.length-1,Math.max(0,U.insertAt)),0,U),U.line=te,V&&!Pr(e,te)){var ue=Br(te)<e.scrollTop;Pt(te,te.height+Pn(U)),ue&&no(V,U.height),V.curOp.forceUpdate=!0}return!0}),V&&ar(V,"lineWidgetAdded",V,U,typeof t=="number"?t:_t(t)),U}var Us=0,wi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Us};wi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ei(e),Se(this,"clear")){var D=this.find();D&&ar(this,"clear",D.from,D.to)}for(var O=null,U=null,V=0;V<this.lines.length;++V){var te=this.lines[V],oe=Jr(te.markedSpans,this);e&&!this.collapsed?xn(e,_t(te),"text"):e&&(oe.to!=null&&(U=_t(te)),oe.from!=null&&(O=_t(te))),te.markedSpans=Mn(te.markedSpans,oe),oe.from==null&&this.collapsed&&!Pr(this.doc,te)&&e&&Pt(te,An(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var me=Rt(this.lines[ue]),Ie=tn(me);Ie>e.display.maxLineLength&&(e.display.maxLine=me,e.display.maxLineLength=Ie,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Zr(e,O,U+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&ar(e,"markerCleared",e,this,O,U),t&&li(e),this.parent&&this.parent.clear()},wi.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var D,O,U=0;U<this.lines.length;++U){var V=this.lines[U],te=Jr(V.markedSpans,this);if(te.from!=null&&(D=ot(t?V:_t(V),te.from),e==-1))return D;if(te.to!=null&&(O=ot(t?V:_t(V),te.to),e==1))return O}return D&&{from:D,to:O}},wi.prototype.changed=function(){var e=this,t=this.find(-1,!0),D=this,O=this.doc.cm;if(!t||!O)return;fa(O,function(){var U=t.line,V=_t(t.line),te=We(O,V);if(te&&(qt(te),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!Pr(D.doc,U)&&D.height!=null){var oe=D.height;D.height=null;var ue=Pn(D)-oe;ue&&Pt(U,U.height+ue)}ar(O,"markerChanged",O,e)})},wi.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)},wi.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)}},Oe(wi);function Vi(e,t,D,O,U){if(O&&O.shared)return Tl(e,t,D,O,U);if(e.cm&&!e.cm.curOp)return kn(e.cm,Vi)(e,t,D,O,U);var V=new wi(e,U),te=Ot(t,D);if(O&&W(O,V,!1),te>0||te==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=I("span",[V.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Ca(e,t.line,t,D,V)||t.line!=D.line&&Ca(e,D.line,t,D,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");hr()}V.addToHistory&&xs(e,{from:t,to:D,origin:"markText"},e.sel,NaN);var oe=t.line,ue=e.cm,me;if(e.iter(oe,D.line+1,function(je){ue&&V.collapsed&&!ue.options.lineWrapping&&Rt(je)==ue.display.maxLine&&(me=!0),V.collapsed&&oe!=t.line&&Pt(je,0),Ba(je,new Ir(V,oe==t.line?t.ch:null,oe==D.line?D.ch:null)),++oe}),V.collapsed&&e.iter(t.line,D.line+1,function(je){Pr(e,je)&&Pt(je,0)}),V.clearOnEnter&&Ce(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Qt(),(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,D.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ie=t.line;Ie<=D.line;Ie++)xn(ue,Ie,"text");V.atomic&&Os(ue.doc),ar(ue,"markerAdded",ue,V)}return V}var vo=function(e,t){this.markers=e,this.primary=t;for(var D=0;D<e.length;++D)e[D].parent=this};vo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ar(this,"clear")},vo.prototype.find=function(e,t){return this.primary.find(e,t)},Oe(vo);function Tl(e,t,D,O,U){O=W(O),O.shared=!1;var V=[Vi(e,t,D,O,U)],te=V[0],oe=O.widgetNode;return Ei(e,function(ue){oe&&(O.widgetNode=oe.cloneNode(!0)),V.push(Vi(ue,wt(ue,t),wt(ue,D),O,U));for(var me=0;me<ue.linked.length;++me)if(ue.linked[me].isParent)return;te=re(V)}),new vo(V,te)}function Fs(e){return e.findMarks(ot(e.first,0),e.clipPos(ot(e.lastLine())),function(t){return t.parent})}function Sl(e,t){for(var D=0;D<t.length;D++){var O=t[D],U=O.find(),V=e.clipPos(U.from),te=e.clipPos(U.to);if(Ot(V,te)){var oe=Vi(e,V,te,O.primary,O.primary.type);O.markers.push(oe),oe.parent=O}}}function Cl(e){for(var t=function(O){var U=e[O],V=[U.primary.doc];Ei(U.primary.doc,function(ue){return V.push(ue)});for(var te=0;te<U.markers.length;te++){var oe=U.markers[te];ee(V,oe.doc)==-1&&(oe.parent=null,U.markers.splice(te--,1))}},D=0;D<e.length;D++)t(D)}var _l=0,ya=function(e,t,D,O,U){if(!(this instanceof ya))return new ya(e,t,D,O,U);D==null&&(D=0),mo.call(this,[new po([new Cr("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var V=ot(D,0);this.sel=za(V),this.history=new ko(null),this.id=++_l,this.modeOption=t,this.lineSep=O,this.direction=U=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:V,to:V,text:e}),sa(this,za(V),he)};ya.prototype=Te(mo.prototype,{constructor:ya,iter:function(e,t,D){D?this.iterN(e-this.first,t-e,D):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var D=0,O=0;O<t.length;++O)D+=t[O].height;this.insertInner(e-this.first,t,D)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Rr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:In(function(e){var t=ot(this.first,0),D=this.first+this.size-1;Gi(this,{from:t,to:ot(D,ht(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&vi(this.cm,0,0),sa(this,za(t),he)}),replaceRange:function(e,t,D,O){t=wt(this,t),D=D?wt(this,D):t,Xi(this,e,t,D,O)},getRange:function(e,t,D){var O=Tr(this,wt(this,e),wt(this,t));return D===!1?O:O.join(D||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(cn(this,e))return ht(this,e)},getLineNumber:function(e){return _t(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ht(this,e)),Rt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return wt(this,e)},getCursor:function(e){var t=this.sel.primary(),D;return e==null||e=="head"?D=t.head:e=="anchor"?D=t.anchor:e=="end"||e=="to"||e===!1?D=t.to():D=t.from(),D},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:In(function(e,t,D){Ss(this,wt(this,typeof e=="number"?ot(e,t||0):e),null,D)}),setSelection:In(function(e,t,D){Ss(this,wt(this,e),wt(this,t||e),D)}),extendSelection:In(function(e,t,D){No(this,wt(this,e),t&&wt(this,t),D)}),extendSelections:In(function(e,t){Ts(this,Fr(this,e),t)}),extendSelectionsBy:In(function(e,t){var D=be(this.sel.ranges,e);Ts(this,Fr(this,D),t)}),setSelections:In(function(e,t,D){if(!e.length)return;for(var O=[],U=0;U<e.length;U++)O[U]=new Ur(wt(this,e[U].anchor),wt(this,e[U].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),sa(this,La(this.cm,O,t),D)}),addSelection:In(function(e,t,D){var O=this.sel.ranges.slice(0);O.push(new Ur(wt(this,e),wt(this,t||e))),sa(this,La(this.cm,O,O.length-1),D)}),getSelection:function(e){for(var t=this.sel.ranges,D,O=0;O<t.length;O++){var U=Tr(this,t[O].from(),t[O].to());D=D?D.concat(U):U}return e===!1?D:D.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],D=this.sel.ranges,O=0;O<D.length;O++){var U=Tr(this,D[O].from(),D[O].to());e!==!1&&(U=U.join(e||this.lineSeparator())),t[O]=U}return t},replaceSelection:function(e,t,D){for(var O=[],U=0;U<this.sel.ranges.length;U++)O[U]=e;this.replaceSelections(O,t,D||"+input")},replaceSelections:In(function(e,t,D){for(var O=[],U=this.sel,V=0;V<U.ranges.length;V++){var te=U.ranges[V];O[V]={from:te.from(),to:te.to(),text:this.splitLines(e[V]),origin:D}}for(var oe=t&&t!="end"&&Po(this,O,t),ue=O.length-1;ue>=0;ue--)Gi(this,O[ue]);oe?Cs(this,oe):this.cm&&gi(this.cm)}),undo:In(function(){Fo(this,"undo")}),redo:In(function(){Fo(this,"redo")}),undoSelection:In(function(){Fo(this,"undo",!0)}),redoSelection:In(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,D=0,O=0;O<e.done.length;O++)e.done[O].ranges||++t;for(var U=0;U<e.undone.length;U++)e.undone[U].ranges||++D;return{undo:t,redo:D}},clearHistory:function(){var e=this;this.history=new ko(this.history.maxGeneration),Ei(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:In(function(e,t,D){return ho(this,e,"gutter",function(O){var U=O.gutterMarkers||(O.gutterMarkers={});return U[t]=D,!D&&Q(U)&&(O.gutterMarkers=null),!0})}),clearGutter:In(function(e){var t=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[e]&&ho(t,D,"gutter",function(){return D.gutterMarkers[e]=null,Q(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!cn(this,e))return null;if(t=e,e=ht(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:In(function(e,t,D){return ho(this,e,t=="gutter"?"gutter":"class",function(O){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!O[U])O[U]=D;else{if(A(D).test(O[U]))return!1;O[U]+=" "+D}return!0})}),removeLineClass:In(function(e,t,D){return ho(this,e,t=="gutter"?"gutter":"class",function(O){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=O[U];if(V)if(D==null)O[U]=null;else{var te=V.match(A(D));if(!te)return!1;var oe=te.index+te[0].length;O[U]=V.slice(0,te.index)+(!te.index||oe==V.length?"":" ")+V.slice(oe)||null}else return!1;return!0})}),addLineWidget:In(function(e,t,D){return wl(this,e,t,D)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,D){return Vi(this,wt(this,e),wt(this,t),D,D&&D.type||"range")},setBookmark:function(e,t){var D={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=wt(this,e),Vi(this,e,e,D,"bookmark")},findMarksAt:function(e){e=wt(this,e);var t=[],D=ht(this,e.line).markedSpans;if(D)for(var O=0;O<D.length;++O){var U=D[O];(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,D){e=wt(this,e),t=wt(this,t);var O=[],U=e.line;return this.iter(e.line,t.line+1,function(V){var te=V.markedSpans;if(te)for(var oe=0;oe<te.length;oe++){var ue=te[oe];!(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)&&(!D||D(ue.marker))&&O.push(ue.marker.parent||ue.marker)}++U}),O},getAllMarks:function(){var e=[];return this.iter(function(t){var D=t.markedSpans;if(D)for(var O=0;O<D.length;++O)D[O].from!=null&&e.push(D[O].marker)}),e},posFromIndex:function(e){var t,D=this.first,O=this.lineSeparator().length;return this.iter(function(U){var V=U.text.length+O;if(V>e)return t=e,!0;e-=V,++D}),wt(this,ot(D,t))},indexFromPos:function(e){e=wt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var D=this.lineSeparator().length;return this.iter(this.first,e.line,function(O){t+=O.text.length+D}),t},copy:function(e){var t=new ya(Rr(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,D=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<D&&(D=e.to);var O=new ya(Rr(this,t,D),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(O.history=this.history),(this.linked||(this.linked=[])).push({doc:O,sharedHist:e.sharedHist}),O.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sl(O,Fs(this)),O},unlinkDoc:function(e){if(e instanceof En&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var D=this.linked[t];if(D.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Fs(this));break}if(e.history==this.history){var O=[e.id];Ei(e,function(U){return O.push(U.id)},!0),e.history=new ko(null),e.history.done=Ki(this.history.done,O),e.history.undone=Ki(this.history.undone,O)}},iterLinkedDocs:function(e){Ei(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ct(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:In(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)})}),ya.prototype.eachLine=ya.prototype.iter;var Bs=0;function Ol(e){var t=this;if(Ws(t),Je(t,e)||Un(t.display,e))return;de(e),S&&(Bs=+new Date);var D=Gn(t,e,!0),O=e.dataTransfer.files;if(!D||t.isReadOnly())return;if(O&&O.length&&window.FileReader&&window.File)for(var U=O.length,V=Array(U),te=0,oe=function(){++te==U&&kn(t,function(){D=wt(t.doc,D);var Ze={from:D,to:D,text:t.doc.splitLines(V.filter(function(it){return it!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gi(t.doc,Ze),Cs(t.doc,za(wt(t.doc,D),wt(t.doc,Ga(Ze))))})()},ue=function(Ze,it){if(t.options.allowDropFileTypes&&ee(t.options.allowDropFileTypes,Ze.type)==-1){oe();return}var st=new FileReader;st.onerror=function(){return oe()},st.onload=function(){var mt=st.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(mt)){oe();return}V[it]=mt,oe()},st.readAsText(Ze)},me=0;me<O.length;me++)ue(O[me],me);else{if(t.state.draggingText&&t.doc.sel.contains(D)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Ie=e.dataTransfer.getData("Text");if(Ie){var je;if(t.state.draggingText&&!t.state.draggingText.copy&&(je=t.listSelections()),jo(t.doc,za(D,D)),je)for(var qe=0;qe<je.length;++qe)Xi(t.doc,"",je[qe].anchor,je[qe].head,"drag");t.replaceSelection(Ie,"around","paste"),t.display.input.focus()}}catch(Ze){}}}function Al(e,t){if(S&&(!e.state.draggingText||+new Date-Bs<100)){De(t);return}if(Je(e,t)||Un(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!g){var D=_("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",x&&(D.width=D.height=1,e.display.wrapper.appendChild(D),D._top=D.offsetTop),t.dataTransfer.setDragImage(D,0,0),x&&D.parentNode.removeChild(D)}}function Dl(e,t){var D=Gn(e,t);if(!D)return;var O=document.createDocumentFragment();Qa(e,D,O),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),b(e.display.dragCursor,O)}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"),D=[],O=0;O<t.length;O++){var U=t[O].CodeMirror;U&&D.push(U)}D.length&&D[0].operation(function(){for(var V=0;V<D.length;V++)e(D[V])})}var Ks=!1;function Rl(){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(mi)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ti={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++)Ti[yo+48]=Ti[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Ti[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Ti[bo+111]=Ti[bo+63235]="F"+bo;var di={};di.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"},di.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"},di.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"},di.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"]},di.default=l?di.macDefault:di.pcDefault;function Pl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var D,O,U,V,te=0;te<t.length-1;te++){var oe=t[te];if(/^(cmd|meta|m)$/i.test(oe))V=!0;else if(/^a(lt)?$/i.test(oe))D=!0;else if(/^(c|ctrl|control)$/i.test(oe))O=!0;else if(/^s(hift)?$/i.test(oe))U=!0;else throw new Error("Unrecognized modifier name: "+oe)}return D&&(e="Alt-"+e),O&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),U&&(e="Shift-"+e),e}function kl(e){var t={};for(var D in e)if(e.hasOwnProperty(D)){var O=e[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(O=="..."){delete e[D];continue}for(var U=be(D.split(" "),Pl),V=0;V<U.length;V++){var te=void 0,oe=void 0;V==U.length-1?(oe=U.join(" "),te=O):(oe=U.slice(0,V+1).join(" "),te="...");var ue=t[oe];if(!ue)t[oe]=te;else if(ue!=te)throw new Error("Inconsistent bindings for "+oe)}delete e[D]}for(var me in t)e[me]=t[me];return e}function Yi(e,t,D,O){t=Wo(t);var U=t.call?t.call(e,O):t[e];if(U===!1)return"nothing";if(U==="...")return"multi";if(U!=null&&D(U))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yi(e,t.fallthrough,D,O);for(var V=0;V<t.fallthrough.length;V++){var te=Yi(e,t.fallthrough[V],D,O);if(te)return te}}}function zs(e){var t=typeof e=="string"?e:Ti[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Gs(e,t,D){var O=e;return t.altKey&&O!="Alt"&&(e="Alt-"+e),(i?t.metaKey:t.ctrlKey)&&O!="Ctrl"&&(e="Ctrl-"+e),(i?t.ctrlKey:t.metaKey)&&O!="Mod"&&(e="Cmd-"+e),!D&&t.shiftKey&&O!="Shift"&&(e="Shift-"+e),e}function Xs(e,t){if(x&&e.keyCode==34&&e.char)return!1;var D=Ti[e.keyCode];return D==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(D=e.code),Gs(D,e,t))}function Wo(e){return typeof e=="string"?di[e]:e}function $i(e,t){for(var D=e.doc.sel.ranges,O=[],U=0;U<D.length;U++){for(var V=t(D[U]);O.length&&Ot(V.from,re(O).to)<=0;){var te=O.pop();if(Ot(te.from,V.from)<0){V.from=te.from;break}}O.push(V)}fa(e,function(){for(var oe=O.length-1;oe>=0;oe--)Xi(e.doc,"",O[oe].from,O[oe].to,"+delete");gi(e)})}function is(e,t,D){var O=we(e.text,t+D,D);return O<0||O>e.text.length?null:O}function os(e,t,D){var O=is(e,t.ch,D);return O==null?null:new ot(t.line,O,D<0?"after":"before")}function ss(e,t,D,O,U){if(e){t.doc.direction=="rtl"&&(U=-U);var V=et(D,t.doc.direction);if(V){var te=U<0?re(V):V[0],oe=U<0==(te.level==1),ue=oe?"after":"before",me;if(te.level>0||t.doc.direction=="rtl"){var Ie=Fe(t,D);me=U<0?D.text.length-1:0;var je=Ye(t,Ie,me).top;me=ze(function(qe){return Ye(t,Ie,qe).top==je},U<0==(te.level==1)?te.from:te.to-1,me),ue=="before"&&(me=is(D,me,1))}else me=U<0?te.to:te.from;return new ot(O,me,ue)}}return new ot(O,U<0?D.text.length:0,U<0?"before":"after")}function Il(e,t,D,O){var U=et(t,e.doc.direction);if(!U)return os(t,D,O);D.ch>=t.text.length?(D.ch=t.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var V=$e(U,D.ch,D.sticky),te=U[V];if(e.doc.direction=="ltr"&&te.level%2==0&&(O>0?te.to>D.ch:te.from<D.ch))return os(t,D,O);var oe=function(vt,St){return is(t,vt instanceof ot?vt.ch:vt,St)},ue,me=function(vt){return e.options.lineWrapping?(ue=ue||Fe(e,t),Dt(e,t,ue,vt)):{begin:0,end:t.text.length}},Ie=me(D.sticky=="before"?oe(D,-1):D.ch);if(e.doc.direction=="rtl"||te.level==1){var je=te.level==1==O<0,qe=oe(D,je?1:-1);if(qe!=null&&(je?qe<=te.to&&qe<=Ie.end:qe>=te.from&&qe>=Ie.begin)){var Ze=je?"before":"after";return new ot(D.line,qe,Ze)}}var it=function(vt,St,yt){for(var At=function(ln,Qn){return Qn?new ot(D.line,oe(ln,1),"before"):new ot(D.line,ln,"after")};vt>=0&&vt<U.length;vt+=St){var Ht=U[vt],Nt=St>0==(Ht.level!=1),dr=Nt?yt.begin:oe(yt.end,-1);if(Ht.from<=dr&&dr<Ht.to)return At(dr,Nt);if(dr=Nt?Ht.from:oe(Ht.to,-1),yt.begin<=dr&&dr<yt.end)return At(dr,Nt)}},st=it(V+O,O,Ie);if(st)return st;var mt=O>0?Ie.end:oe(Ie.begin,-1);return mt!=null&&!(O>0&&mt==t.text.length)&&(st=it(O>0?0:U.length-1,O,me(mt)),st)?st:null}var xo={selectAll:Rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return $i(e,function(t){if(t.empty()){var D=ht(e.doc,t.head.line).text.length;return t.head.ch==D&&t.head.line<e.lastLine()?{from:t.head,to:ot(t.head.line+1,0)}:{from:t.head,to:ot(t.head.line,D)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $i(e,function(t){return{from:ot(t.from().line,0),to:wt(e.doc,ot(t.to().line+1,0))}})},delLineLeft:function(e){return $i(e,function(t){return{from:ot(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $i(e,function(t){var D=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:D},"div");return{from:O,to:t.from()}})},delWrappedLineRight:function(e){return $i(e,function(t){var D=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div");return{from:t.from(),to:O}})},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(ot(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ot(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 D=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div")},Re)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:D},"div")},Re)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:D},"div");return O.ch<e.getLine(O.line).search(/\S/)?Ys(e,t.head):O},Re)},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=[],D=e.listSelections(),O=e.options.tabSize,U=0;U<D.length;U++){var V=D[U].from(),te=F(e.getLine(V.line),V.ch,O);t.push(se(O-te%O))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return fa(e,function(){for(var t=e.listSelections(),D=[],O=0;O<t.length;O++){if(!t[O].empty())continue;var U=t[O].head,V=ht(e.doc,U.line).text;if(V){if(U.ch==V.length&&(U=new ot(U.line,U.ch-1)),U.ch>0)U=new ot(U.line,U.ch+1),e.replaceRange(V.charAt(U.ch-1)+V.charAt(U.ch-2),ot(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var te=ht(e.doc,U.line-1).text;te&&(U=new ot(U.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+te.charAt(te.length-1),ot(U.line-1,te.length-1),U,"+transpose"))}}D.push(new Ur(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return fa(e,function(){for(var t=e.listSelections(),D=t.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),t[D].anchor,t[D].head,"+input");t=e.listSelections();for(var O=0;O<t.length;O++)e.indentLine(t[O].from().line,null,!0);gi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,t){var D=ht(e.doc,t),O=Rt(D);return O!=D&&(t=_t(O)),ss(!0,e,O,t,1)}function Nl(e,t){var D=ht(e.doc,t),O=Kt(D);return O!=D&&(t=_t(O)),ss(!0,e,D,t,-1)}function Ys(e,t){var D=Vs(e,t.line),O=ht(e.doc,D.line),U=et(O,e.doc.direction);if(!U||U[0].level==0){var V=Math.max(D.ch,O.text.search(/\S/)),te=t.line==D.line&&t.ch<=V&&t.ch;return ot(D.line,te?0:V,D.sticky)}return D}function Ho(e,t,D){if(typeof t=="string"&&(t=xo[t],!t))return!1;e.display.input.ensurePolled();var O=e.display.shift,U=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),D&&(e.display.shift=!1),U=t(e)!=ve}finally{e.display.shift=O,e.state.suppressEdits=!1}return U}function jl(e,t,D){for(var O=0;O<e.state.keyMaps.length;O++){var U=Yi(t,e.state.keyMaps[O],D,e);if(U)return U}return e.options.extraKeys&&Yi(t,e.options.extraKeys,D,e)||Yi(t,e.options.keyMap,D,e)}var Ul=new $;function Eo(e,t,D,O){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,D,O))return!0}return $s(e,t,D,O)}function $s(e,t,D,O){var U=jl(e,t,O);return U=="multi"&&(e.state.keySeq=t),U=="handled"&&ar(e,"keyHandled",e,t,D),(U=="handled"||U=="multi")&&(de(D),Xn(e)),!!U}function Js(e,t){var D=Xs(t,!0);return D?t.shiftKey&&!e.state.keySeq?Eo(e,"Shift-"+D,t,function(O){return Ho(e,O,!0)})||Eo(e,D,t,function(O){if(typeof O=="string"?/^go[A-Z]/.test(O):O.motion)return Ho(e,O)}):Eo(e,D,t,function(O){return Ho(e,O)}):!1}function Fl(e,t,D){return Eo(e,"'"+D+"'",t,function(O){return Ho(e,O,!0)})}var ls=null;function Qs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=G(),Je(t,e))return;S&&f<11&&e.keyCode==27&&(e.returnValue=!1);var D=e.keyCode;t.display.shift=D==16||e.shiftKey;var O=Js(t,e);x&&(ls=O?D:null,!O&&D==88&&!Yt&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),C&&!l&&!O&&D==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;K(t,"CodeMirror-crosshair");function D(O){(O.keyCode==18||!O.altKey)&&(y(t,"CodeMirror-crosshair"),tt(document,"keyup",D),tt(document,"mouseover",D))}Ce(document,"keyup",D),Ce(document,"mouseover",D)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Je(this,e)}function el(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Un(t.display,e)||Je(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var D=e.keyCode,O=e.charCode;if(x&&D==ls){ls=null,de(e);return}if(x&&(!e.which||e.which<10)&&Js(t,e))return;var U=String.fromCharCode(O==null?D:O);if(U=="\b")return;if(Fl(t,e,U))return;t.display.input.onKeyPress(e)}var Wl=400,us=function(e,t,D){this.time=e,this.pos=t,this.button=D};us.prototype.compare=function(e,t,D){return this.time+Wl>e&&Ot(t,this.pos)==0&&D==this.button};var wo,To;function Hl(e,t){var D=+new Date;return To&&To.compare(D,e,t)?(wo=To=null,"triple"):wo&&wo.compare(D,e,t)?(To=new us(D,e,t),wo=null,"double"):(wo=new us(D,e,t),To=null,"single")}function tl(e){var t=this,D=t.display;if(Je(t,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Un(D,e)){a||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(t,e))return;var O=Gn(t,e),U=Xe(e),V=O?Hl(O,U):"single";if(window.focus(),U==1&&t.state.selectingText&&t.state.selectingText(e),O&&Kl(t,U,O,V,e))return;U==1?O?Gl(t,O,V,e):Be(e)==D.scroller&&de(e):U==2?(O&&No(t.doc,O),setTimeout(function(){return D.input.focus()},20)):U==3&&(L?t.display.input.onContextMenu(e):eo(t))}function Kl(e,t,D,O,U){var V="Click";return O=="double"?V="Double"+V:O=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,Eo(e,Gs(V,U),U,function(te){if(typeof te=="string"&&(te=xo[te]),!te)return!1;var oe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),oe=te(e,D)!=ve}finally{e.state.suppressEdits=!1}return oe})}function zl(e,t,D){var O=e.getOption("configureMouse"),U=O?O(e,t,D):{};if(U.unit==null){var V=c?D.shiftKey&&D.metaKey:D.altKey;U.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||D.shiftKey),U.addNew==null&&(U.addNew=l?D.metaKey:D.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(l?D.altKey:D.ctrlKey)),U}function Gl(e,t,D,O){S?setTimeout(B(Co,e),0):e.curOp.focus=G();var U=zl(e,D,O),V=e.doc.sel,te;e.options.dragDrop&&nt&&!e.isReadOnly()&&D=="single"&&(te=V.contains(t))>-1&&(Ot((te=V.ranges[te]).from(),t)<0||t.xRel>0)&&(Ot(te.to(),t)>0||t.xRel<0)?Xl(e,O,t,U):Vl(e,O,t,U)}function Xl(e,t,D,O){var U=e.display,V=!1,te=kn(e,function(me){a&&(U.scroller.draggable=!1),e.state.draggingText=!1,tt(U.wrapper.ownerDocument,"mouseup",te),tt(U.wrapper.ownerDocument,"mousemove",oe),tt(U.scroller,"dragstart",ue),tt(U.scroller,"drop",te),V||(de(me),O.addNew||No(e.doc,D,null,null,O.extend),a&&!g||S&&f==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),oe=function(me){V=V||Math.abs(t.clientX-me.clientX)+Math.abs(t.clientY-me.clientY)>=10},ue=function(){return V=!0};a&&(U.scroller.draggable=!0),e.state.draggingText=te,te.copy=!O.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Ce(U.wrapper.ownerDocument,"mouseup",te),Ce(U.wrapper.ownerDocument,"mousemove",oe),Ce(U.scroller,"dragstart",ue),Ce(U.scroller,"drop",te),eo(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,t,D){if(D=="char")return new Ur(t,t);if(D=="word")return e.findWordAt(t);if(D=="line")return new Ur(ot(t.line,0),wt(e.doc,ot(t.line+1,0)));var O=D(e,t);return new Ur(O.from,O.to)}function Vl(e,t,D,O){var U=e.display,V=e.doc;de(t);var te,oe,ue=V.sel,me=ue.ranges;if(O.addNew&&!O.extend?(oe=V.sel.contains(D),oe>-1?te=me[oe]:te=new Ur(D,D)):(te=V.sel.primary(),oe=V.sel.primIndex),O.unit=="rectangle")O.addNew||(te=new Ur(D,D)),D=Gn(e,t,!0,!0),oe=-1;else{var Ie=rl(e,D,O.unit);O.extend?te=ns(te,Ie.anchor,Ie.head,O.extend):te=Ie}O.addNew?oe==-1?(oe=me.length,sa(V,La(e,me.concat([te]),oe),{scroll:!1,origin:"*mouse"})):me.length>1&&me[oe].empty()&&O.unit=="char"&&!O.extend?(sa(V,La(e,me.slice(0,oe).concat(me.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):as(V,oe,te,le):(oe=0,sa(V,new pa([te],0),le),ue=V.sel);var je=D;function qe(yt){if(Ot(je,yt)==0)return;if(je=yt,O.unit=="rectangle"){for(var At=[],Ht=e.options.tabSize,Nt=F(ht(V,D.line).text,D.ch,Ht),dr=F(ht(V,yt.line).text,yt.ch,Ht),ln=Math.min(Nt,dr),Qn=Math.max(Nt,dr),wn=Math.min(D.line,yt.line),Sa=Math.min(e.lastLine(),Math.max(D.line,yt.line));wn<=Sa;wn++){var ba=ht(V,wn).text,Fn=xe(ba,ln,Ht);ln==Qn?At.push(new Ur(ot(wn,Fn),ot(wn,Fn))):ba.length>Fn&&At.push(new Ur(ot(wn,Fn),ot(wn,xe(ba,Qn,Ht))))}At.length||At.push(new Ur(D,D)),sa(V,La(e,ue.ranges.slice(0,oe).concat(At),oe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(yt)}else{var xa=te,na=rl(e,yt,O.unit),$n=xa.anchor,Bn;Ot(na.anchor,$n)>0?(Bn=na.head,$n=dn(xa.from(),na.anchor)):(Bn=na.anchor,$n=Sn(xa.to(),na.head));var Dn=ue.ranges.slice(0);Dn[oe]=Yl(e,new Ur(wt(V,$n),Bn)),sa(V,La(e,Dn,oe),le)}}var Ze=U.wrapper.getBoundingClientRect(),it=0;function st(yt){var At=++it,Ht=Gn(e,yt,!0,O.unit=="rectangle");if(!Ht)return;if(Ot(Ht,je)!=0){e.curOp.focus=G(),qe(Ht);var Nt=Ii(U,V);(Ht.line>=Nt.to||Ht.line<Nt.from)&&setTimeout(kn(e,function(){it==At&&st(yt)}),150)}else{var dr=yt.clientY<Ze.top?-20:yt.clientY>Ze.bottom?20:0;dr&&setTimeout(kn(e,function(){if(it!=At)return;U.scroller.scrollTop+=dr,st(yt)}),50)}}function mt(yt){e.state.selectingText=!1,it=Infinity,yt&&(de(yt),U.input.focus()),tt(U.wrapper.ownerDocument,"mousemove",vt),tt(U.wrapper.ownerDocument,"mouseup",St),V.history.lastSelOrigin=null}var vt=kn(e,function(yt){yt.buttons===0||!Xe(yt)?mt(yt):st(yt)}),St=kn(e,mt);e.state.selectingText=St,Ce(U.wrapper.ownerDocument,"mousemove",vt),Ce(U.wrapper.ownerDocument,"mouseup",St)}function Yl(e,t){var D=t.anchor,O=t.head,U=ht(e.doc,D.line);if(Ot(D,O)==0&&D.sticky==O.sticky)return t;var V=et(U);if(!V)return t;var te=$e(V,D.ch,D.sticky),oe=V[te];if(oe.from!=D.ch&&oe.to!=D.ch)return t;var ue=te+(oe.from==D.ch==(oe.level!=1)?0:1);if(ue==0||ue==V.length)return t;var me;if(O.line!=D.line)me=(O.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ie=$e(V,O.ch,O.sticky),je=Ie-te||(O.ch-D.ch)*(oe.level==1?-1:1);Ie==ue-1||Ie==ue?me=je<0:me=je>0}var qe=V[ue+(me?-1:0)],Ze=me==(qe.level==1),it=Ze?qe.from:qe.to,st=Ze?"after":"before";return D.ch==it&&D.sticky==st?t:new Ur(new ot(D.line,it,st),O)}function nl(e,t,D,O){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(qe){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&de(t);var te=e.display,oe=te.lineDiv.getBoundingClientRect();if(V>oe.bottom||!Se(e,D))return Ee(t);V-=oe.top-te.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var me=te.gutters.childNodes[ue];if(me&&me.getBoundingClientRect().right>=U){var Ie=Lr(e.doc,V),je=e.display.gutterSpecs[ue];return He(e,D,e,Ie,je.className,t),Ee(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function al(e,t){if(Un(e.display,t)||$l(e,t))return;if(Je(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function $l(e,t){return Se(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-"),tr(e)}var Ji={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var t=e.optionHandlers;function D(O,U,V,te){e.defaults[O]=U,V&&(t[O]=te?function(oe,ue,me){me!=Ji&&V(oe,ue,me)}:V)}e.defineOption=D,e.Init=Ji,D("value","",function(O,U){return O.setValue(U)},!0),D("mode",null,function(O,U){O.doc.modeOption=U,ci(O)},!0),D("indentUnit",2,ci,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(O){co(O),tr(O),Zr(O)},!0),D("lineSeparator",null,function(O,U){if(O.doc.lineSep=U,!U)return;var V=[],te=O.doc.first;O.doc.iter(function(ue){for(var me=0;;){var Ie=ue.text.indexOf(U,me);if(Ie==-1)break;me=Ie+U.length,V.push(ot(te,Ie))}te++});for(var oe=V.length-1;oe>=0;oe--)Xi(O.doc,U,V[oe],ot(V[oe].line,V[oe].ch+U.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,U,V){O.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),V!=Ji&&O.refresh()}),D("specialCharPlaceholder",Wa,function(O){return O.refresh()},!0),D("electricChars",!0),D("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(O,U){return O.getInputField().spellcheck=U},!0),D("autocorrect",!1,function(O,U){return O.getInputField().autocorrect=U},!0),D("autocapitalize",!1,function(O,U){return O.getInputField().autocapitalize=U},!0),D("rtlMoveVisually",!T),D("wholeLineUpdateBefore",!0),D("theme","default",function(O){il(O),Ka(O)},!0),D("keyMap","default",function(O,U,V){var te=Wo(U),oe=V!=Ji&&Wo(V);oe&&oe.detach&&oe.detach(O,te),te.attach&&te.attach(O,oe||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(O,U){O.display.gutterSpecs=ha(U,O.options.lineNumbers),Ka(O)},!0),D("fixedGutter",!0,function(O,U){O.display.gutters.style.left=U?oa(O.display)+"px":"0",O.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(O){return si(O)},!0),D("scrollbarStyle","native",function(O){Ui(O),si(O),O.display.scrollbars.setScrollTop(O.doc.scrollTop),O.display.scrollbars.setScrollLeft(O.doc.scrollLeft)},!0),D("lineNumbers",!1,function(O,U){O.display.gutterSpecs=ha(O.options.gutters,U),Ka(O)},!0),D("firstLineNumber",1,Ka,!0),D("lineNumberFormatter",function(O){return O},Ka,!0),D("showCursorWhenSelecting",!1,Yr,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(O,U){U=="nocursor"&&(mi(O),O.display.input.blur()),O.display.input.readOnlyChanged(U)}),D("screenReaderLabel",null,function(O,U){U=U===""?null:U,O.display.input.screenReaderLabelChanged(U)}),D("disableInput",!1,function(O,U){U||O.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,Yr,!0),D("singleCursorHeightPerLine",!0,Yr,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,co,!0),D("addModeClass",!1,co,!0),D("pollInterval",100),D("undoDepth",200,function(O,U){return O.doc.history.undoDepth=U}),D("historyEventDelay",1250),D("viewportMargin",10,function(O){return O.refresh()},!0),D("maxHighlightLength",1e4,co,!0),D("moveInputWithCursor",!0,function(O,U){U||O.display.input.resetPosition()}),D("tabindex",null,function(O,U){return O.display.input.getField().tabIndex=U||""}),D("autofocus",null),D("direction","ltr",function(O,U){return O.doc.setDirection(U)},!0),D("phrases",null)}function Ql(e,t,D){var O=D&&D!=Ji;if(!t!=!O){var U=e.display.dragFunctions,V=t?Ce:tt;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?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),Hn(e)),da(e),Zr(e),tr(e),setTimeout(function(){return si(e)},100)}function En(e,t){var D=this;if(!(this instanceof En))return new En(e,t);this.options=t=t?W(t):{},W(ol,t,!1);var O=t.value;typeof O=="string"?O=new ya(O,t.mode,null,t.lineSeparator,t.direction):t.mode&&(O.modeOption=t.mode),this.doc=O;var U=new En.inputStyles[t.inputStyle](this),V=this.display=new Li(e,O,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 $,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),S&&f<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Rl(),ei(this),this.curOp.forceUpdate=!0,vs(this,O),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&Za(D)},20):mi(this);for(var te in Ko)Ko.hasOwnProperty(te)&&Ko[te](this,t[te],Ji);Vn(this),t.finishInit&&t.finishInit(this);for(var oe=0;oe<ds.length;++oe)ds[oe](this);li(this),a&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}En.defaults=ol,En.optionHandlers=Ko;function ql(e){var t=e.display;Ce(t.scroller,"mousedown",kn(e,tl)),S&&f<11?Ce(t.scroller,"dblclick",kn(e,function(ue){if(Je(e,ue))return;var me=Gn(e,ue);if(!me||cs(e,ue)||Un(e.display,ue))return;de(ue);var Ie=e.findWordAt(me);No(e.doc,Ie.anchor,Ie.head)})):Ce(t.scroller,"dblclick",function(ue){return Je(e,ue)||de(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 D,O={end:0};function U(){t.activeTouch&&(D=setTimeout(function(){return t.activeTouch=null},1e3),O=t.activeTouch,O.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 te(ue,me){if(me.left==null)return!0;var Ie=me.left-ue.left,je=me.top-ue.top;return Ie*Ie+je*je>20*20}Ce(t.scroller,"touchstart",function(ue){if(!Je(e,ue)&&!V(ue)&&!cs(e,ue)){t.input.ensurePolled(),clearTimeout(D);var me=+new Date;t.activeTouch={start:me,moved:!1,prev:me-O.end<=300?O: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&&!Un(t,ue)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ie=e.coordsChar(t.activeTouch,"page"),je;!me.prev||te(me,me.prev)?je=new Ur(Ie,Ie):!me.prev.prev||te(me,me.prev.prev)?je=e.findWordAt(Ie):je=new Ur(ot(Ie.line,0),wt(e.doc,ot(Ie.line+1,0))),e.setSelection(je.anchor,je.head),e.focus(),de(ue)}U()}),Ce(t.scroller,"touchcancel",U),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yi(e,t.scroller.scrollTop),Da(e,t.scroller.scrollLeft,!0),He(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){Je(e,ue)||De(ue)},over:function(ue){Je(e,ue)||(Dl(e,ue),De(ue))},start:function(ue){return Al(e,ue)},drop:kn(e,Ol),leave:function(ue){Je(e,ue)||Ws(e)}};var oe=t.input.getField();Ce(oe,"keyup",function(ue){return Zs.call(e,ue)}),Ce(oe,"keydown",kn(e,Qs)),Ce(oe,"keypress",kn(e,el)),Ce(oe,"focus",function(ue){return Za(e,ue)}),Ce(oe,"blur",function(ue){return mi(e,ue)})}var ds=[];En.defineInitHook=function(e){return ds.push(e)};function So(e,t,D,O){var U=e.doc,V;D==null&&(D="add"),D=="smart"&&(U.mode.indent?V=an(e,t).state:D="prev");var te=e.options.tabSize,oe=ht(U,t),ue=F(oe.text,null,te);oe.stateAfter&&(oe.stateAfter=null);var me=oe.text.match(/^\s*/)[0],Ie;if(!O&&!/\S/.test(oe.text))Ie=0,D="not";else if(D=="smart"&&(Ie=U.mode.indent(V,oe.text.slice(me.length),oe.text),Ie==ve||Ie>150)){if(!O)return;D="prev"}D=="prev"?t>U.first?Ie=F(ht(U,t-1).text,null,te):Ie=0:D=="add"?Ie=ue+e.options.indentUnit:D=="subtract"?Ie=ue-e.options.indentUnit:typeof D=="number"&&(Ie=ue+D),Ie=Math.max(0,Ie);var je="",qe=0;if(e.options.indentWithTabs)for(var Ze=Math.floor(Ie/te);Ze;--Ze)qe+=te,je+=" ";if(qe<Ie&&(je+=se(Ie-qe)),je!=me)return Xi(U,je,ot(t,0),ot(t,me.length),"+input"),oe.stateAfter=null,!0;for(var it=0;it<U.sel.ranges.length;it++){var st=U.sel.ranges[it];if(st.head.line==t&&st.head.ch<me.length){var mt=ot(t,me.length);as(U,it,new Ur(mt,mt));break}}}var Xa=null;function zo(e){Xa=e}function fs(e,t,D,O,U){var V=e.doc;e.display.shift=!1,O||(O=V.sel);var te=+new Date-200,oe=U=="paste"||e.state.pasteIncoming>te,ue=Ct(t),me=null;if(oe&&O.ranges.length>1)if(Xa&&Xa.text.join(`
`)==t){if(O.ranges.length%Xa.text.length==0){me=[];for(var Ie=0;Ie<Xa.text.length;Ie++)me.push(V.splitLines(Xa.text[Ie]))}}else ue.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(me=be(ue,function(vt){return[vt]}));for(var je=e.curOp.updateInput,qe=O.ranges.length-1;qe>=0;qe--){var Ze=O.ranges[qe],it=Ze.from(),st=Ze.to();Ze.empty()&&(D&&D>0?it=ot(it.line,it.ch-D):e.state.overwrite&&!oe?st=ot(st.line,Math.min(ht(V,st.line).text.length,st.ch+re(ue).length)):oe&&Xa&&Xa.lineWise&&Xa.text.join(`
`)==ue.join(`
`)&&(it=st=ot(it.line,0)));var mt={from:it,to:st,text:me?me[qe%me.length]:ue,origin:U||(oe?"paste":e.state.cutIncoming>te?"cut":"+input")};Gi(e.doc,mt),ar(e,"inputRead",e,mt)}t&&!oe&&ll(e,t),gi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=je),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&fa(t,function(){return fs(t,D,0,null,"paste")}),!0}function ll(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,O=D.ranges.length-1;O>=0;O--){var U=D.ranges[O];if(U.head.ch>100||O&&D.ranges[O-1].head.line==U.head.line)continue;var V=e.getModeAt(U.head),te=!1;if(V.electricChars){for(var oe=0;oe<V.electricChars.length;oe++)if(t.indexOf(V.electricChars.charAt(oe))>-1){te=So(e,U.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(ht(e.doc,U.head.line).text.slice(0,U.head.ch))&&(te=So(e,U.head.line,"smart")));te&&ar(e,"electricInput",e,U.head.line)}}function ul(e){for(var t=[],D=[],O=0;O<e.doc.sel.ranges.length;O++){var U=e.doc.sel.ranges[O].head.line,V={anchor:ot(U,0),head:ot(U+1,0)};D.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:D}}function cl(e,t,D,O){e.setAttribute("autocorrect",D?"":"off"),e.setAttribute("autocapitalize",O?"":"off"),e.setAttribute("spellcheck",!!t)}function dl(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),p&&(e.style.border="1px solid black"),cl(e),t}function eu(e){var t=e.optionHandlers,D=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(O,U){var V=this.options,te=V[O];if(V[O]==U&&O!="mode")return;V[O]=U,t.hasOwnProperty(O)&&kn(this,t[O])(this,U,te),He(this,"optionChange",this,O)},getOption:function(O){return this.options[O]},getDoc:function(){return this.doc},addKeyMap:function(O,U){this.state.keyMaps[U?"push":"unshift"](Wo(O))},removeKeyMap:function(O){for(var U=this.state.keyMaps,V=0;V<U.length;++V)if(U[V]==O||U[V].name==O)return U.splice(V,1),!0},addOverlay:ra(function(O,U){var V=O.token?O:e.getMode(this.options,O);if(V.startState)throw new Error("Overlays may not be stateful.");q(this.state.overlays,{mode:V,modeSpec:O,opaque:U&&U.opaque,priority:U&&U.priority||0},function(te){return te.priority}),this.state.modeGen++,Zr(this)}),removeOverlay:ra(function(O){for(var U=this.state.overlays,V=0;V<U.length;++V){var te=U[V].modeSpec;if(te==O||typeof O=="string"&&te.name==O){U.splice(V,1),this.state.modeGen++,Zr(this);return}}}),indentLine:ra(function(O,U,V){typeof U!="string"&&typeof U!="number"&&(U==null?U=this.options.smartIndent?"smart":"prev":U=U?"add":"subtract"),cn(this.doc,O)&&So(this,O,U,V)}),indentSelection:ra(function(O){for(var U=this.doc.sel.ranges,V=-1,te=0;te<U.length;te++){var oe=U[te];if(oe.empty())oe.head.line>V&&(So(this,oe.head.line,O,!0),V=oe.head.line,te==this.doc.sel.primIndex&&gi(this));else{var ue=oe.from(),me=oe.to(),Ie=Math.max(V,ue.line);V=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var je=Ie;je<V;++je)So(this,je,O);var qe=this.doc.sel.ranges;ue.ch==0&&U.length==qe.length&&qe[te].from().ch>0&&as(this.doc,te,new Ur(ue,qe[te].to()),he)}}}),getTokenAt:function(O,U){return Ln(this,O,U)},getLineTokens:function(O,U){return Ln(this,ot(O),U,!0)},getTokenTypeAt:function(O){O=wt(this.doc,O);var U=Rn(this,ht(this.doc,O.line)),V=0,te=(U.length-1)/2,oe=O.ch,ue;if(oe==0)ue=U[2];else for(;;){var me=V+te>>1;if((me?U[me*2-1]:0)>=oe)te=me;else if(U[me*2+1]<oe)V=me+1;else{ue=U[me*2+2];break}}var Ie=ue?ue.indexOf("overlay "):-1;return Ie<0?ue:Ie==0?null:ue.slice(0,Ie-1)},getModeAt:function(O){var U=this.doc.mode;return U.innerMode?e.innerMode(U,this.getTokenAt(O).state).mode:U},getHelper:function(O,U){return this.getHelpers(O,U)[0]},getHelpers:function(O,U){var V=[];if(!D.hasOwnProperty(U))return V;var te=D[U],oe=this.getModeAt(O);if(typeof oe[U]=="string")te[oe[U]]&&V.push(te[oe[U]]);else if(oe[U])for(var ue=0;ue<oe[U].length;ue++){var me=te[oe[U][ue]];me&&V.push(me)}else oe.helperType&&te[oe.helperType]?V.push(te[oe.helperType]):te[oe.name]&&V.push(te[oe.name]);for(var Ie=0;Ie<te._global.length;Ie++){var je=te._global[Ie];je.pred(oe,this)&&ee(V,je.val)==-1&&V.push(je.val)}return V},getStateAfter:function(O,U){var V=this.doc;return O=jr(V,O==null?V.first+V.size-1:O),an(this,O+1,U).state},cursorCoords:function(O,U){var V,te=this.doc.sel.primary();return O==null?V=te.head:typeof O=="object"?V=wt(this.doc,O):V=O?te.from():te.to(),vr(this,V,U||"page")},charCoords:function(O,U){return pn(this,wt(this.doc,O),U||"page")},coordsChar:function(O,U){return O=gr(this,O,U||"page"),yr(this,O.left,O.top)},lineAtHeight:function(O,U){return O=gr(this,{top:O,left:0},U||"page").top,Lr(this.doc,O+this.display.viewOffset)},heightAtLine:function(O,U,V){var te=!1,oe;if(typeof O=="number"){var ue=this.doc.first+this.doc.size-1;O<this.doc.first?O=this.doc.first:O>ue&&(O=ue,te=!0),oe=ht(this.doc,O)}else oe=O;return Or(this,oe,{top:0,left:0},U||"page",V||te).top+(te?this.doc.height-Br(oe):0)},defaultTextHeight:function(){return An(this.display)},defaultCharWidth:function(){return zn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,U,V,te,oe){var ue=this.display;O=vr(this,wt(this.doc,O));var me=O.bottom,Ie=O.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),ue.sizer.appendChild(U),te=="over")me=O.top;else if(te=="above"||te=="near"){var je=Math.max(ue.wrapper.clientHeight,this.doc.height),qe=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(te=="above"||O.bottom+U.offsetHeight>je)&&O.top>U.offsetHeight?me=O.top-U.offsetHeight:O.bottom+U.offsetHeight<=je&&(me=O.bottom),Ie+U.offsetWidth>qe&&(Ie=qe-U.offsetWidth)}U.style.top=me+"px",U.style.left=U.style.right="",oe=="right"?(Ie=ue.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(oe=="left"?Ie=0:oe=="middle"&&(Ie=(ue.sizer.clientWidth-U.offsetWidth)/2),U.style.left=Ie+"px"),V&&_o(this,{left:Ie,top:me,right:Ie+U.offsetWidth,bottom:me+U.offsetHeight})},triggerOnKeyDown:ra(Qs),triggerOnKeyPress:ra(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ra(tl),execCommand:function(O){if(xo.hasOwnProperty(O))return xo[O].call(null,this)},triggerElectric:ra(function(O){ll(this,O)}),findPosH:function(O,U,V,te){var oe=1;U<0&&(oe=-1,U=-U);for(var ue=wt(this.doc,O),me=0;me<U&&!(ue=hs(this.doc,ue,oe,V,te),ue.hitSide);++me);return ue},moveH:ra(function(O,U){var V=this;this.extendSelectionsBy(function(te){return V.display.shift||V.doc.extend||te.empty()?hs(V.doc,te.head,O,U,V.options.rtlMoveVisually):O<0?te.from():te.to()},Re)}),deleteH:ra(function(O,U){var V=this.doc.sel,te=this.doc;V.somethingSelected()?te.replaceSelection("",null,"+delete"):$i(this,function(oe){var ue=hs(te,oe.head,O,U,!1);return O<0?{from:ue,to:oe.head}:{from:oe.head,to:ue}})}),findPosV:function(O,U,V,te){var oe=1,ue=te;U<0&&(oe=-1,U=-U);for(var me=wt(this.doc,O),Ie=0;Ie<U;++Ie){var je=vr(this,me,"div");if(ue==null?ue=je.left:je.left=ue,me=fl(this,je,oe,V),me.hitSide)break}return me},moveV:ra(function(O,U){var V=this,te=this.doc,oe=[],ue=!this.display.shift&&!te.extend&&te.sel.somethingSelected();if(te.extendSelectionsBy(function(Ie){if(ue)return O<0?Ie.from():Ie.to();var je=vr(V,Ie.head,"div");Ie.goalColumn!=null&&(je.left=Ie.goalColumn),oe.push(je.left);var qe=fl(V,je,O,U);return U=="page"&&Ie==te.sel.primary()&&no(V,pn(V,qe,"div").top-je.top),qe},Re),oe.length)for(var me=0;me<te.sel.ranges.length;me++)te.sel.ranges[me].goalColumn=oe[me]}),findWordAt:function(O){var U=this.doc,V=ht(U,O.line).text,te=O.ch,oe=O.ch;if(V){var ue=this.getHelper(O,"wordChars");(O.sticky=="before"||oe==V.length)&&te?--te:++oe;for(var me=V.charAt(te),Ie=X(me,ue)?function(je){return X(je,ue)}:/\s/.test(me)?function(je){return/\s/.test(je)}:function(je){return!/\s/.test(je)&&!X(je)};te>0&&Ie(V.charAt(te-1));)--te;for(;oe<V.length&&Ie(V.charAt(oe));)++oe}return new Ur(ot(O.line,te),ot(O.line,oe))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):y(this.display.cursorDiv,"CodeMirror-overwrite"),He(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ra(function(O,U){vi(this,O,U)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-Ke(this)-this.display.barHeight,width:O.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:fe(this),clientWidth:Pe(this)}},scrollIntoView:ra(function(O,U){O==null?(O={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof O=="number"?O={from:ot(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=U||0,O.from.line!=null?$o(this,O):Oi(this,O.from,O.to,O.margin)}),setSize:ra(function(O,U){var V=this,te=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};O!=null&&(this.display.wrapper.style.width=te(O)),U!=null&&(this.display.wrapper.style.height=te(U)),this.options.lineWrapping&&er(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(ue){if(ue.widgets){for(var me=0;me<ue.widgets.length;me++)if(ue.widgets[me].noHScroll){xn(V,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,He(this,"refresh",this)}),operation:function(O){return fa(this,O)},startOperation:function(){return ei(this)},endOperation:function(){return li(this)},refresh:ra(function(){var O=this.display.cachedTextHeight;Zr(this),this.curOp.forceUpdate=!0,tr(this),vi(this,this.doc.scrollLeft,this.doc.scrollTop),Bi(this.display),(O==null||Math.abs(O-An(this.display))>.5||this.options.lineWrapping)&&da(this),He(this,"refresh",this)}),swapDoc:ra(function(O){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,O),tr(this),this.display.input.reset(),vi(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,U),U}),phrase:function(O){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,O)?U[O]:O},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}},Oe(e),e.registerHelper=function(O,U,V){D.hasOwnProperty(O)||(D[O]=e[O]={_global:[]}),D[O][U]=V},e.registerGlobalHelper=function(O,U,V,te){e.registerHelper(O,U,te),D[O]._global.push({pred:V,val:te})}}function hs(e,t,D,O,U){var V=t,te=D,oe=ht(e,t.line),ue=U&&e.direction=="rtl"?-D:D;function me(){var St=t.line+ue;return St<e.first||St>=e.first+e.size?!1:(t=new ot(St,t.ch,t.sticky),oe=ht(e,St))}function Ie(St){var yt;if(O=="codepoint"){var At=oe.text.charCodeAt(t.ch+(O>0?0:-1));isNaN(At)?yt=null:yt=new ot(t.line,Math.max(0,Math.min(oe.text.length,t.ch+D*(At>=55296&&At<56320?2:1))),-D)}else U?yt=Il(e.cm,oe,t,D):yt=os(oe,t,D);if(yt==null)if(!St&&me())t=ss(U,e.cm,oe,t.line,ue);else return!1;else t=yt;return!0}if(O=="char"||O=="codepoint")Ie();else if(O=="column")Ie(!0);else if(O=="word"||O=="group")for(var je=null,qe=O=="group",Ze=e.cm&&e.cm.getHelper(t,"wordChars"),it=!0;!(D<0&&!Ie(!it));it=!1){var st=oe.text.charAt(t.ch)||`
`,mt=X(st,Ze)?"w":qe&&st==`
`?"n":!qe||/\s/.test(st)?null:"p";if(qe&&!it&&!mt&&(mt="s"),je&&je!=mt){D<0&&(D=1,Ie(),t.sticky="after");break}if(mt&&(je=mt),D>0&&!Ie(!it))break}var vt=Uo(e,t,V,te,!0);return lt(V,vt)&&(vt.hitSide=!0),vt}function fl(e,t,D,O){var U=e.doc,V=t.left,te;if(O=="page"){var oe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(oe-.5*An(e.display),3);te=(D>0?t.bottom:t.top)+D*ue}else O=="line"&&(te=D>0?t.bottom+3:t.top-3);for(var me;!(me=yr(e,V,te),!me.outside);){if(D<0?te<=0:te>=U.height){me.hitSide=!0;break}te+=D*5}return me}var qr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};qr.prototype.init=function(e){var t=this,D=this,O=D.cm,U=D.div=e.lineDiv;cl(U,O.options.spellcheck,O.options.autocorrect,O.options.autocapitalize);function V(oe){for(var ue=oe.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(oe){if(!V(oe)||Je(O,oe)||sl(oe,O))return;f<=11&&setTimeout(kn(O,function(){return t.updateFromDOM()}),20)}),Ce(U,"compositionstart",function(oe){t.composing={data:oe.data,done:!1}}),Ce(U,"compositionupdate",function(oe){t.composing||(t.composing={data:oe.data,done:!1})}),Ce(U,"compositionend",function(oe){t.composing&&(oe.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(U,"touchstart",function(){return D.forceCompositionEnd()}),Ce(U,"input",function(){t.composing||t.readFromDOMSoon()});function te(oe){if(!V(oe)||Je(O,oe))return;if(O.somethingSelected())zo({lineWise:!1,text:O.getSelections()}),oe.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var ue=ul(O);zo({lineWise:!0,text:ue.text}),oe.type=="cut"&&O.operation(function(){O.setSelections(ue.ranges,0,he),O.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var me=Xa.text.join(`
`);if(oe.clipboardData.setData("Text",me),oe.clipboardData.getData("Text")==me){oe.preventDefault();return}}var Ie=dl(),je=Ie.firstChild;O.display.lineSpace.insertBefore(Ie,O.display.lineSpace.firstChild),je.value=Xa.text.join(`
`);var qe=document.activeElement;z(je),setTimeout(function(){O.display.lineSpace.removeChild(Ie),qe.focus(),qe==U&&D.showPrimarySelection()},50)}Ce(U,"copy",te),Ce(U,"cut",te)},qr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},qr.prototype.prepareSelection=function(){var e=Fa(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,D=t.doc.sel.primary(),O=D.from(),U=D.to();if(t.display.viewTo==t.display.viewFrom||O.line>=t.display.viewTo||U.line<t.display.viewFrom){e.removeAllRanges();return}var V=Go(t,e.anchorNode,e.anchorOffset),te=Go(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&te&&!te.bad&&Ot(dn(V,te),O)==0&&Ot(Sn(V,te),U)==0)return;var oe=t.display.view,ue=O.line>=t.display.viewFrom&&hl(t,O)||{node:oe[0].measure.map[2],offset:0},me=U.line<t.display.viewTo&&hl(t,U);if(!me){var Ie=oe[oe.length-1].measure,je=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;me={node:je[je.length-1],offset:je[je.length-2]-je[je.length-3]}}if(!ue||!me){e.removeAllRanges();return}var qe=e.rangeCount&&e.getRangeAt(0),Ze;try{Ze=j(ue.node,ue.offset,me.offset,me.node)}catch(it){}Ze&&(!C&&t.state.focused?(e.collapse(ue.node,ue.offset),Ze.collapsed||(e.removeAllRanges(),e.addRange(Ze))):(e.removeAllRanges(),e.addRange(Ze)),qe&&e.anchorNode==null?e.addRange(qe):C&&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():fa(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 D=Go(t,e.anchorNode,e.anchorOffset),O=Go(t,e.focusNode,e.focusOffset);D&&O&&fa(t,function(){sa(t.doc,za(D,O),he),(D.bad||O.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,D=e.doc.sel.primary(),O=D.from(),U=D.to();if(O.ch==0&&O.line>e.firstLine()&&(O=ot(O.line-1,ht(e.doc,O.line-1).length)),U.ch==ht(e.doc,U.line).text.length&&U.line<e.lastLine()&&(U=ot(U.line+1,0)),O.line<t.viewFrom||U.line>t.viewTo-1)return!1;var V,te,oe;O.line==t.viewFrom||(V=sn(e,O.line))==0?(te=_t(t.view[0].line),oe=t.view[0].node):(te=_t(t.view[V].line),oe=t.view[V-1].node.nextSibling);var ue=sn(e,U.line),me,Ie;if(ue==t.view.length-1?(me=t.viewTo-1,Ie=t.lineDiv.lastChild):(me=_t(t.view[ue+1].line)-1,Ie=t.view[ue+1].node.previousSibling),!oe)return!1;for(var je=e.doc.splitLines(ru(e,oe,Ie,te,me)),qe=Tr(e.doc,ot(te,0),ot(me,ht(e.doc,me).text.length));je.length>1&&qe.length>1;)if(re(je)==re(qe))je.pop(),qe.pop(),me--;else if(je[0]==qe[0])je.shift(),qe.shift(),te++;else break;for(var Ze=0,it=0,st=je[0],mt=qe[0],vt=Math.min(st.length,mt.length);Ze<vt&&st.charCodeAt(Ze)==mt.charCodeAt(Ze);)++Ze;for(var St=re(je),yt=re(qe),At=Math.min(St.length-(je.length==1?Ze:0),yt.length-(qe.length==1?Ze:0));it<At&&St.charCodeAt(St.length-it-1)==yt.charCodeAt(yt.length-it-1);)++it;if(je.length==1&&qe.length==1&&te==O.line)for(;Ze&&Ze>O.ch&&St.charCodeAt(St.length-it-1)==yt.charCodeAt(yt.length-it-1);)Ze--,it++;je[je.length-1]=St.slice(0,St.length-it).replace(/^\u200b+/,""),je[0]=je[0].slice(Ze).replace(/\u200b+$/,"");var Ht=ot(te,Ze),Nt=ot(me,qe.length?re(qe).length-it:0);if(je.length>1||je[0]||Ot(Ht,Nt))return Xi(e.doc,je,Ht,Nt,"+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())&&fa(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()||kn(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 D=We(e,t.line);if(!D||D.hidden)return null;var O=ht(e.doc,t.line),U=ge(D,O,t.line),V=et(O,e.doc.direction),te="left";if(V){var oe=$e(V,t.ch);te=oe%2?"right":"left"}var ue=ct(U.map,t.ch,te);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,D,O,U){var V="",te=!1,oe=e.doc.lineSeparator(),ue=!1;function me(Ze){return function(it){return it.id==Ze}}function Ie(){te&&(V+=oe,ue&&(V+=oe),te=ue=!1)}function je(Ze){Ze&&(Ie(),V+=Ze)}function qe(Ze){if(Ze.nodeType==1){var it=Ze.getAttribute("cm-text");if(it){je(it);return}var st=Ze.getAttribute("cm-marker"),mt;if(st){var vt=e.findMarks(ot(O,0),ot(U+1,0),me(+st));vt.length&&(mt=vt[0].find(0))&&je(Tr(e.doc,mt.from,mt.to).join(oe));return}if(Ze.getAttribute("contenteditable")=="false")return;var St=/^(pre|div|p|li|table|br)$/i.test(Ze.nodeName);if(!/^br$/i.test(Ze.nodeName)&&Ze.textContent.length==0)return;St&&Ie();for(var yt=0;yt<Ze.childNodes.length;yt++)qe(Ze.childNodes[yt]);/^(pre|p)$/i.test(Ze.nodeName)&&(ue=!0),St&&(te=!0)}else Ze.nodeType==3&&je(Ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(qe(t),t==D);)t=t.nextSibling,ue=!1;return V}function Go(e,t,D){var O;if(t==e.display.lineDiv){if(O=e.display.lineDiv.childNodes[D],!O)return Qi(e.clipPos(ot(e.display.viewTo-1)),!0);t=null,D=0}else for(O=t;;O=O.parentNode){if(!O||O==e.display.lineDiv)return null;if(O.parentNode&&O.parentNode==e.display.lineDiv)break}for(var U=0;U<e.display.view.length;U++){var V=e.display.view[U];if(V.node==O)return nu(V,t,D)}}function nu(e,t,D){var O=e.text.firstChild,U=!1;if(!t||!M(O,t))return Qi(ot(_t(e.line),0),!0);if(t==O&&(U=!0,t=O.childNodes[D],D=0,!t)){var V=e.rest?re(e.rest):e.line;return Qi(ot(_t(V),V.text.length),U)}var te=t.nodeType==3?t:null,oe=t;for(!te&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(te=t.firstChild,D&&(D=te.nodeValue.length));oe.parentNode!=O;)oe=oe.parentNode;var ue=e.measure,me=ue.maps;function Ie(mt,vt,St){for(var yt=-1;yt<(me?me.length:0);yt++)for(var At=yt<0?ue.map:me[yt],Ht=0;Ht<At.length;Ht+=3){var Nt=At[Ht+2];if(Nt==mt||Nt==vt){var dr=_t(yt<0?e.line:e.rest[yt]),ln=At[Ht]+St;return(St<0||Nt!=mt)&&(ln=At[Ht+(St?1:0)]),ot(dr,ln)}}}var je=Ie(te,oe,D);if(je)return Qi(je,U);for(var qe=oe.nextSibling,Ze=te?te.nodeValue.length-D:0;qe;qe=qe.nextSibling){if(je=Ie(qe,qe.firstChild,0),je)return Qi(ot(je.line,je.ch-Ze),U);Ze+=qe.textContent.length}for(var it=oe.previousSibling,st=D;it;it=it.previousSibling){if(je=Ie(it,it.firstChild,-1),je)return Qi(ot(je.line,je.ch+st),U);st+=it.textContent.length}}var Nn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};Nn.prototype.init=function(e){var t=this,D=this,O=this.cm;this.createField(e);var U=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),p&&(U.style.width="0px"),Ce(U,"input",function(){S&&f>=9&&t.hasSelection&&(t.hasSelection=null),D.poll()}),Ce(U,"paste",function(te){if(Je(O,te)||sl(te,O))return;O.state.pasteIncoming=+new Date,D.fastPoll()});function V(te){if(Je(O,te))return;if(O.somethingSelected())zo({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var oe=ul(O);zo({lineWise:!0,text:oe.text}),te.type=="cut"?O.setSelections(oe.ranges,null,he):(D.prevInput="",U.value=oe.text.join(`
`),z(U))}else return;te.type=="cut"&&(O.state.cutIncoming=+new Date)}Ce(U,"cut",V),Ce(U,"copy",V),Ce(e.scroller,"paste",function(te){if(Un(e,te)||Je(O,te))return;if(!U.dispatchEvent){O.state.pasteIncoming=+new Date,D.focus();return}var oe=new Event("paste");oe.clipboardData=te.clipboardData,U.dispatchEvent(oe)}),Ce(e.lineSpace,"selectstart",function(te){Un(e,te)||de(te)}),Ce(U,"compositionstart",function(){var te=O.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:te,range:O.markText(te,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Nn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Nn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Nn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,D=e.doc,O=Fa(e);if(e.options.moveInputWithCursor){var U=vr(e,D.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),te=t.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,U.top+te.top-V.top)),O.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,U.left+te.left-V.left))}return O},Nn.prototype.showSelection=function(e){var t=this.cm,D=t.display;b(D.cursorDiv,e.cursors),b(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Nn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var D=t.getSelection();this.textarea.value=D,t.state.focused&&z(this.textarea),S&&f>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",S&&f>=9&&(this.hasSelection=null))},Nn.prototype.getField=function(){return this.textarea},Nn.prototype.supportsTouch=function(){return!1},Nn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},Nn.prototype.blur=function(){this.textarea.blur()},Nn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Nn.prototype.receivedFocus=function(){this.slowPoll()},Nn.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()})},Nn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function D(){var O=t.poll();!O&&!e?(e=!0,t.polling.set(60,D)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,D)},Nn.prototype.poll=function(){var e=this,t=this.cm,D=this.textarea,O=this.prevInput;if(this.contextMenuPending||!t.state.focused||xt(D)&&!O&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var U=D.value;if(U==O&&!t.somethingSelected())return!1;if(S&&f>=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&&!O&&(O="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var te=0,oe=Math.min(O.length,U.length);te<oe&&O.charCodeAt(te)==U.charCodeAt(te);)++te;return fa(t,function(){fs(t,U.slice(te),O.length-te,null,e.composing?"*compose":null),U.length>1e3||U.indexOf(`
`)>-1?D.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},Nn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Nn.prototype.onKeyPress=function(){S&&f>=9&&(this.hasSelection=null),this.fastPoll()},Nn.prototype.onContextMenu=function(e){var t=this,D=t.cm,O=D.display,U=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Gn(D,e),te=O.scroller.scrollTop;if(!V||x)return;var oe=D.options.resetSelectionOnContextMenu;oe&&D.doc.sel.contains(V)==-1&&kn(D,sa)(D.doc,za(V),he);var ue=U.style.cssText,me=t.wrapper.style.cssText,Ie=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",U.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-Ie.top-5)+"px; left: "+(e.clientX-Ie.left-5)+`px;
z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var je;a&&(je=window.scrollY),O.input.focus(),a&&window.scrollTo(null,je),O.input.reset(),D.somethingSelected()||(U.value=t.prevInput=" "),t.contextMenuPending=Ze,O.selForContextMenu=D.doc.sel,clearTimeout(O.detectingSelectAll);function qe(){if(U.selectionStart!=null){var st=D.somethingSelected(),mt="\u200B"+(st?U.value:"");U.value="\u21DA",U.value=mt,t.prevInput=st?"":"\u200B",U.selectionStart=1,U.selectionEnd=mt.length,O.selForContextMenu=D.doc.sel}}function Ze(){if(t.contextMenuPending!=Ze)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=me,U.style.cssText=ue,S&&f<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=te),U.selectionStart!=null){(!S||S&&f<9)&&qe();var st=0,mt=function(){O.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&t.prevInput=="\u200B"?kn(D,Rs)(D):st++<10?O.detectingSelectAll=setTimeout(mt,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(mt,200)}}if(S&&f>=9&&qe(),L){De(e);var it=function(){tt(window,"mouseup",it),setTimeout(Ze,20)};Ce(window,"mouseup",it)}else setTimeout(Ze,50)},Nn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Nn.prototype.setUneditable=function(){},Nn.prototype.needsContentAttribute=!1;function au(e,t){if(t=t?W(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 D=G();t.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function O(){e.value=oe.getValue()}var U;if(e.form&&(Ce(e.form,"submit",O),!t.leaveSubmitMethodAlone)){var V=e.form;U=V.submit;try{var te=V.submit=function(){O(),V.submit=U,V.submit(),V.submit=te}}catch(ue){}}t.finishInit=function(ue){ue.save=O,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,O(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",O),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var oe=En(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},t);return oe}function iu(e){e.off=tt,e.on=Ce,e.wheelEventPixels=so,e.Doc=ya,e.splitLines=Ct,e.countColumn=F,e.findColumn=xe,e.isWordChar=J,e.Pass=ve,e.signal=He,e.Line=Cr,e.changeEnd=Ga,e.scrollbarModel=ao,e.Pos=ot,e.cmpPos=Ot,e.modes=xr,e.mimeModes=Lt,e.resolveMode=Wt,e.getMode=Xt,e.modeExtensions=$r,e.extendMode=Tn,e.copyState=wr,e.startState=pt,e.innerMode=aa,e.commands=xo,e.keyMap=di,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Yi,e.normalizeKeyMap=kl,e.StringStream=Tt,e.SharedTextMarker=vo,e.TextMarker=wi,e.LineWidget=go,e.e_preventDefault=de,e.e_stopPropagation=ye,e.e_stop=De,e.addClass=K,e.contains=M,e.rmClass=y,e.keyNames=Ti}Jl(En),eu(En);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in ya.prototype)ya.prototype.hasOwnProperty(Xo)&&ee(ou,Xo)<0&&(En.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ya.prototype[Xo]));return Oe(ya),En.inputStyles={textarea:Nn,contenteditable:qr},En.defineMode=function(e){!En.defaults.mode&&e!="null"&&(En.defaults.mode=e),Er.apply(this,arguments)},En.defineMIME=fr,En.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),En.defineMIME("text/plain","null"),En.defineExtension=function(e,t){En.prototype[e]=t},En.defineDocExtension=function(e,t){ya.prototype[e]=t},En.fromTextArea=au,iu(En),En.version="5.58.2",En})},WYAk:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){(function(){var u=P,C=u.lib,R=C.Base,h=u.enc,s=h.Utf8,S=u.algo,f=S.HMAC=R.extend({init:function(a,o){a=this._hasher=new a.init,typeof o=="string"&&(o=s.parse(o));var r=a.blockSize,x=r*4;o.sigBytes>x&&(o=a.finalize(o)),o.clamp();for(var g=this._oKey=o.clone(),m=this._iKey=o.clone(),w=g.words,p=m.words,d=0;d<r;d++)w[d]^=1549556828,p[d]^=909522486;g.sigBytes=m.sigBytes=x,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var o=this._hasher,r=o.finalize(a);o.reset();var x=o.finalize(this._oKey.clone().concat(r));return x}})})()})},WaYH:function(N,Y,k){"use strict";var P=k("rePB"),u=k("Ff2n"),C=k("VTBJ"),R=k("1OyB"),h=k("vuIU"),s=k("JX7q"),S=k("Ji7U"),f=k("LK+K"),a=k("q1tI"),o=k("TSYQ"),r=k.n(o),x=k("sboe"),g=k("OZM5"),m=function(L){var A=L.prefixCls,y=L.level,E=L.isStart,b=L.isEnd;if(!y)return null;for(var _="".concat(A,"-indent-unit"),I=[],j=0;j<y;j+=1){var M;I.push(a.createElement("span",{key:j,className:r()(_,(M={},Object(P.a)(M,"".concat(_,"-start"),E[j+1]),Object(P.a)(M,"".concat(_,"-end"),b[j+1]),Object(P.a)(M,"".concat(_,"-end-first-level"),!j&&b[0]),M))}))}return a.createElement("span",{"aria-hidden":"true",className:"".concat(A,"-indent")},I)},w=m,p=k("815F"),d="open",n="close",l="---",c=function(i){Object(S.a)(A,i);var L=Object(f.a)(A);function A(){var y;return Object(R.a)(this,A),y=L.apply(this,arguments),y.state={dragNodeHighlight:!1},y.onSelectorClick=function(E){var b=y.props.context.onNodeClick;b(E,Object(p.b)(y.props)),y.isSelectable()?y.onSelect(E):y.onCheck(E)},y.onSelectorDoubleClick=function(E){var b=y.props.context.onNodeDoubleClick;b(E,Object(p.b)(y.props))},y.onSelect=function(E){if(y.isDisabled())return;var b=y.props.context.onNodeSelect;E.preventDefault(),b(E,Object(p.b)(y.props))},y.onCheck=function(E){if(y.isDisabled())return;var b=y.props,_=b.disableCheckbox,I=b.checked,j=y.props.context.onNodeCheck;if(!y.isCheckable()||_)return;E.preventDefault();var M=!I;j(E,Object(p.b)(y.props),M)},y.onMouseEnter=function(E){var b=y.props.context.onNodeMouseEnter;b(E,Object(p.b)(y.props))},y.onMouseLeave=function(E){var b=y.props.context.onNodeMouseLeave;b(E,Object(p.b)(y.props))},y.onContextMenu=function(E){var b=y.props.context.onNodeContextMenu;b(E,Object(p.b)(y.props))},y.onDragStart=function(E){var b=y.props.context.onNodeDragStart;E.stopPropagation(),y.setState({dragNodeHighlight:!0}),b(E,Object(s.a)(y));try{E.dataTransfer.setData("text/plain","")}catch(_){}},y.onDragEnter=function(E){var b=y.props.context.onNodeDragEnter;E.preventDefault(),E.stopPropagation(),b(E,Object(s.a)(y))},y.onDragOver=function(E){var b=y.props.context.onNodeDragOver;E.preventDefault(),E.stopPropagation(),b(E,Object(s.a)(y))},y.onDragLeave=function(E){var b=y.props.context.onNodeDragLeave;E.stopPropagation(),b(E,Object(s.a)(y))},y.onDragEnd=function(E){var b=y.props.context.onNodeDragEnd;E.stopPropagation(),y.setState({dragNodeHighlight:!1}),b(E,Object(s.a)(y))},y.onDrop=function(E){var b=y.props.context.onNodeDrop;E.preventDefault(),E.stopPropagation(),y.setState({dragNodeHighlight:!1}),b(E,Object(s.a)(y))},y.onExpand=function(E){var b=y.props.context.onNodeExpand;b(E,Object(p.b)(y.props))},y.setSelectHandle=function(E){y.selectHandle=E},y.getNodeState=function(){var E=y.props.expanded;return y.isLeaf()?null:E?d:n},y.hasChildren=function(){var E=y.props.eventKey,b=y.props.context.keyEntities,_=b[E]||{},I=_.children;return!!(I||[]).length},y.isLeaf=function(){var E=y.props,b=E.isLeaf,_=E.loaded,I=y.props.context.loadData,j=y.hasChildren();return b===!1?!1:b||!I&&!j||I&&_&&!j},y.isDisabled=function(){var E=y.props.disabled,b=y.props.context.disabled;return!!(b||E)},y.isCheckable=function(){var E=y.props.checkable,b=y.props.context.checkable;return!b||E===!1?!1:b},y.syncLoadData=function(E){var b=E.expanded,_=E.loading,I=E.loaded,j=y.props.context,M=j.loadData,G=j.onNodeLoad;if(_)return;M&&b&&!y.isLeaf()&&(!y.hasChildren()&&!I&&G(Object(p.b)(y.props)))},y.renderSwitcher=function(){var E=y.props,b=E.expanded,_=E.switcherIcon,I=y.props.context,j=I.prefixCls,M=I.switcherIcon,G=_||M;if(y.isLeaf())return a.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof G=="function"?G(Object(C.a)(Object(C.a)({},y.props),{},{isLeaf:!0})):G);var K=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(b?d:n));return a.createElement("span",{onClick:y.onExpand,className:K},typeof G=="function"?G(Object(C.a)(Object(C.a)({},y.props),{},{isLeaf:!1})):G)},y.renderCheckbox=function(){var E=y.props,b=E.checked,_=E.halfChecked,I=E.disableCheckbox,j=y.props.context.prefixCls,M=y.isDisabled(),G=y.isCheckable();if(!G)return null;var K=typeof G!="boolean"?G:null;return a.createElement("span",{className:r()("".concat(j,"-checkbox"),b&&"".concat(j,"-checkbox-checked"),!b&&_&&"".concat(j,"-checkbox-indeterminate"),(M||I)&&"".concat(j,"-checkbox-disabled")),onClick:y.onCheck},K)},y.renderIcon=function(){var E=y.props.loading,b=y.props.context.prefixCls;return a.createElement("span",{className:r()("".concat(b,"-iconEle"),"".concat(b,"-icon__").concat(y.getNodeState()||"docu"),E&&"".concat(b,"-icon_loading"))})},y.renderSelector=function(){var E=y.state.dragNodeHighlight,b=y.props,_=b.title,I=b.selected,j=b.icon,M=b.loading,G=b.data,K=y.props.context,H=K.prefixCls,z=K.showIcon,B=K.icon,W=K.draggable,F=K.loadData,$=K.titleRender,ee=y.isDisabled(),Z="".concat(H,"-node-content-wrapper"),ve;if(z){var he=j||B;ve=he?a.createElement("span",{className:r()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof he=="function"?he(y.props):he):y.renderIcon()}else F&&M&&(ve=y.renderIcon());var le;typeof _=="function"?le=_(G):$?le=$(G):le=_;var Re=a.createElement("span",{className:"".concat(H,"-title")},le);return a.createElement("span",{ref:y.setSelectHandle,title:typeof _=="string"?_:"",className:r()("".concat(Z),"".concat(Z,"-").concat(y.getNodeState()||"normal"),!ee&&(I||E)&&"".concat(H,"-node-selected"),!ee&&W&&"draggable"),draggable:!ee&&W||void 0,"aria-grabbed":!ee&&W||void 0,onMouseEnter:y.onMouseEnter,onMouseLeave:y.onMouseLeave,onContextMenu:y.onContextMenu,onClick:y.onSelectorClick,onDoubleClick:y.onSelectorDoubleClick,onDragStart:W?y.onDragStart:void 0},ve,Re)},y}return Object(h.a)(A,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var E=this.props.selectable,b=this.props.context.selectable;return typeof E=="boolean"?E:b}},{key:"render",value:function(){var E,b=this.props,_=b.eventKey,I=b.className,j=b.style,M=b.dragOver,G=b.dragOverGapTop,K=b.dragOverGapBottom,H=b.isLeaf,z=b.isStart,B=b.isEnd,W=b.expanded,F=b.selected,$=b.checked,ee=b.halfChecked,Z=b.loading,ve=b.domRef,he=b.active,le=b.onMouseMove,Re=Object(u.a)(b,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),xe=this.props.context,ie=xe.prefixCls,se=xe.filterTreeNode,re=xe.draggable,be=xe.keyEntities,q=this.isDisabled(),ne=Object(g.f)(Re),Te=be[_]||{},ae=Te.level,J=B[B.length-1];return a.createElement("div",Object.assign({ref:ve,className:r()(I,"".concat(ie,"-treenode"),(E={},Object(P.a)(E,"".concat(ie,"-treenode-disabled"),q),Object(P.a)(E,"".concat(ie,"-treenode-switcher-").concat(W?"open":"close"),!H),Object(P.a)(E,"".concat(ie,"-treenode-checkbox-checked"),$),Object(P.a)(E,"".concat(ie,"-treenode-checkbox-indeterminate"),ee),Object(P.a)(E,"".concat(ie,"-treenode-selected"),F),Object(P.a)(E,"".concat(ie,"-treenode-loading"),Z),Object(P.a)(E,"".concat(ie,"-treenode-active"),he),Object(P.a)(E,"".concat(ie,"-treenode-leaf-last"),J),Object(P.a)(E,"drag-over",!q&&M),Object(P.a)(E,"drag-over-gap-top",!q&&G),Object(P.a)(E,"drag-over-gap-bottom",!q&&K),Object(P.a)(E,"filter-node",se&&se(Object(p.b)(this.props))),E)),style:j,onDragEnter:re?this.onDragEnter:void 0,onDragOver:re?this.onDragOver:void 0,onDragLeave:re?this.onDragLeave:void 0,onDrop:re?this.onDrop:void 0,onDragEnd:re?this.onDragEnd:void 0,onMouseMove:le},ne),a.createElement(w,{prefixCls:ie,level:ae,isStart:z,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),A}(a.Component),T=function(L){return a.createElement(x.a.Consumer,null,function(A){return a.createElement(c,Object.assign({},L,{context:A}))})};T.displayName="TreeNode",T.defaultProps={title:l},T.isTreeNode=1;var v=Y.a=T},XIdC:function(N,Y,k){"use strict";var P=k("rePB"),u=k("ODXe"),C=k("Ff2n"),R=k("q1tI"),h=k.n(R),s=k("TSYQ"),S=k.n(s),f=k("6cGi"),a=k("4IlW"),o=R.forwardRef(function(r,x){var g,m=r.prefixCls,w=m===void 0?"rc-switch":m,p=r.className,d=r.checked,n=r.defaultChecked,l=r.disabled,c=r.loadingIcon,T=r.checkedChildren,v=r.unCheckedChildren,i=r.onClick,L=r.onChange,A=r.onKeyDown,y=Object(C.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=Object(f.a)(!1,{value:d,defaultValue:n}),b=Object(u.a)(E,2),_=b[0],I=b[1];function j(H,z){var B=_;return l||(B=H,I(B),L==null||L(B,z)),B}function M(H){H.which===a.a.LEFT?j(!1,H):H.which===a.a.RIGHT&&j(!0,H),A==null||A(H)}function G(H){var z=j(!_,H);i==null||i(z,H)}var K=S()(w,p,(g={},Object(P.a)(g,"".concat(w,"-checked"),_),Object(P.a)(g,"".concat(w,"-disabled"),l),g));return R.createElement("button",Object.assign({},y,{type:"button",role:"switch","aria-checked":_,disabled:l,className:K,ref:x,onKeyDown:M,onClick:G}),c,R.createElement("span",{className:"".concat(w,"-inner")},_?T:v))});o.displayName="Switch",Y.a=o},Y1PL:function(N,Y,k){"use strict";k.r(Y),k.d(Y,"ResizableTextArea",function(){return ee});var P=k("wx14"),u=k("1OyB"),C=k("vuIU"),R=k("Ji7U"),h=k("LK+K"),s=k("q1tI"),S=k("VTBJ"),f=k("rePB"),a=k("Zm9Q"),o=k("Kwbf"),r=k("c+Xe"),x=k("m+aA"),g=k("bdgK"),m=new Map;function w(he){he.forEach(function(le){var Re,xe=le.target;(Re=m.get(xe))===null||Re===void 0||Re.forEach(function(ie){return ie(xe)})})}var p=new g.default(w),d=null,n=null;function l(he,le){m.has(he)||(m.set(he,new Set),p.observe(he)),m.get(he).add(le)}function c(he,le){m.has(he)&&(m.get(he).delete(le),m.get(he).size||(p.unobserve(he),m.delete(he)))}var T=function(he){Object(R.a)(Re,he);var le=Object(h.a)(Re);function Re(){return Object(u.a)(this,Re),le.apply(this,arguments)}return Object(C.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(s.Component),v=s.createContext(null);function i(he){var le=he.children,Re=he.onBatchResize,xe=s.useRef(0),ie=s.useRef([]),se=s.useContext(v),re=s.useCallback(function(be,q,ne){xe.current+=1;var Te=xe.current;ie.current.push({size:be,element:q,data:ne}),Promise.resolve().then(function(){Te===xe.current&&(Re==null||Re(ie.current),ie.current=[])}),se==null||se(be,q,ne)},[Re,se]);return s.createElement(v.Provider,{value:re},le)}function L(he){var le=he.children,Re=he.disabled,xe=s.useRef(null),ie=s.useRef(null),se=s.useContext(v),re=s.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=s.isValidElement(le)&&Object(r.c)(le),q=be?le.ref:null,ne=s.useMemo(function(){return Object(r.a)(q,xe)},[q,xe]),Te=s.useRef(he);Te.current=he;var ae=s.useCallback(function(J){var X=Te.current,Q=X.onResize,pe=X.data,ce=J.getBoundingClientRect(),we=ce.width,ze=ce.height,Ge=J.offsetWidth,Qe=J.offsetHeight,$e=Math.floor(we),rt=Math.floor(ze);if(re.current.width!==$e||re.current.height!==rt||re.current.offsetWidth!==Ge||re.current.offsetHeight!==Qe){var et={width:$e,height:rt,offsetWidth:Ge,offsetHeight:Qe};re.current=et;var Me=Ge===Math.round(we)?we:Ge,Ce=Qe===Math.round(ze)?ze:Qe,Ve=Object(S.a)(Object(S.a)({},et),{},{offsetWidth:Me,offsetHeight:Ce});se==null||se(Ve,J,pe),Q&&Promise.resolve().then(function(){Q(Ve,J)})}},[]);return s.useEffect(function(){var J=Object(x.a)(xe.current)||Object(x.a)(ie.current);return J&&!Re&&l(J,ae),function(){return c(J,ae)}},[xe.current,Re]),s.createElement(T,{ref:ie},be?s.cloneElement(le,{ref:ne}):le)}var A="rc-observer-key";function y(he){var le=he.children,Re=Object(a.a)(le);return Re.map(function(xe,ie){var se=(xe==null?void 0:xe.key)||"".concat(A,"-").concat(ie);return s.createElement(L,Object(P.a)({},he,{key:se}),xe)})}y.Collection=i;var E=y,b=k("bT9E"),_=k("TSYQ"),I=k.n(_),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"],G={},K;function H(he){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(le&&G[Re])return G[Re];var xe=window.getComputedStyle(he),ie=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),se=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),re=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),be=M.map(function(ne){return"".concat(ne,":").concat(xe.getPropertyValue(ne))}).join(";"),q={sizingStyle:be,paddingSize:se,borderSize:re,boxSizing:ie};return le&&Re&&(G[Re]=q),q}function z(he){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),he.getAttribute("wrap")?K.setAttribute("wrap",he.getAttribute("wrap")):K.removeAttribute("wrap");var ie=H(he,le),se=ie.paddingSize,re=ie.borderSize,be=ie.boxSizing,q=ie.sizingStyle;K.setAttribute("style","".concat(q,";").concat(j)),K.value=he.value||he.placeholder||"";var ne=Number.MIN_SAFE_INTEGER,Te=Number.MAX_SAFE_INTEGER,ae=K.scrollHeight,J;if(be==="border-box"?ae+=re:be==="content-box"&&(ae-=se),Re!==null||xe!==null){K.value=" ";var X=K.scrollHeight-se;Re!==null&&(ne=X*Re,be==="border-box"&&(ne=ne+se+re),ae=Math.max(ne,ae)),xe!==null&&(Te=X*xe,be==="border-box"&&(Te=Te+se+re),J=ae>Te?"":"hidden",ae=Math.min(Te,ae))}return{height:ae,minHeight:ne,maxHeight:Te,overflowY:J,resize:"none"}}var B=k("Gytx"),W=k.n(B),F;(function(he){he[he.NONE=0]="NONE",he[he.RESIZING=1]="RESIZING",he[he.RESIZED=2]="RESIZED"})(F||(F={}));var $=function(he){Object(R.a)(Re,he);var le=Object(h.a)(Re);function Re(xe){var ie;return Object(u.a)(this,Re),ie=le.call(this,xe),ie.nextFrameActionId=void 0,ie.resizeFrameId=void 0,ie.textArea=void 0,ie.saveTextArea=function(se){ie.textArea=se},ie.handleResize=function(se){var re=ie.state.resizeStatus,be=ie.props,q=be.autoSize,ne=be.onResize;if(re!==F.NONE)return;typeof ne=="function"&&ne(se),q&&ie.resizeOnNextFrame()},ie.resizeOnNextFrame=function(){cancelAnimationFrame(ie.nextFrameActionId),ie.nextFrameActionId=requestAnimationFrame(ie.resizeTextarea)},ie.resizeTextarea=function(){var se=ie.props.autoSize;if(!se||!ie.textArea)return;var re=se.minRows,be=se.maxRows,q=z(ie.textArea,!1,re,be);ie.setState({textareaStyles:q,resizeStatus:F.RESIZING},function(){cancelAnimationFrame(ie.resizeFrameId),ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:F.RESIZED},function(){ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:F.NONE}),ie.fixFirefoxAutoScroll()})})})})},ie.renderTextArea=function(){var se=ie.props,re=se.prefixCls,be=re===void 0?"rc-textarea":re,q=se.autoSize,ne=se.onResize,Te=se.className,ae=se.disabled,J=ie.state,X=J.textareaStyles,Q=J.resizeStatus,pe=Object(b.a)(ie.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ce=I()(be,Te,Object(f.a)({},"".concat(be,"-disabled"),ae));"value"in pe&&(pe.value=pe.value||"");var we=Object(S.a)(Object(S.a)(Object(S.a)({},ie.props.style),X),Q===F.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(E,{onResize:ie.handleResize,disabled:!(q||ne)},s.createElement("textarea",Object(P.a)({},pe,{className:ce,style:we,ref:ie.saveTextArea})))},ie.state={textareaStyles:{},resizeStatus:F.NONE},ie}return Object(C.a)(Re,[{key:"componentDidUpdate",value:function(ie){(ie.value!==this.props.value||!W()(ie.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 ie=this.textArea.selectionStart,se=this.textArea.selectionEnd;this.textArea.setSelectionRange(ie,se)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(s.Component),ee=$,Z=function(he){Object(R.a)(Re,he);var le=Object(h.a)(Re);function Re(xe){var ie;Object(u.a)(this,Re),ie=le.call(this,xe),ie.resizableTextArea=void 0,ie.focus=function(){ie.resizableTextArea.textArea.focus()},ie.saveTextArea=function(re){ie.resizableTextArea=re},ie.handleChange=function(re){var be=ie.props.onChange;ie.setValue(re.target.value,function(){ie.resizableTextArea.resizeTextarea()}),be&&be(re)},ie.handleKeyDown=function(re){var be=ie.props,q=be.onPressEnter,ne=be.onKeyDown;re.keyCode===13&&q&&q(re),ne&&ne(re)};var se=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return ie.state={value:se},ie}return Object(C.a)(Re,[{key:"setValue",value:function(ie,se){"value"in this.props||this.setState({value:ie},se)}},{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(ie){return"value"in ie?{value:ie.value}:null}}]),Re}(s.Component),ve=Y.default=Z},ZD9Y:function(N,Y,k){"use strict";var P=k("BoS7"),u=k("Sdc0"),C=k("OaEy"),R=k("2fM7"),h=k("q1tI"),s=k.n(h),S=k("lOMy"),f=k.n(S),a=R.a.Option;Y.a=function(o){var r=o.onFontSizeChange,x=o.cmFontSize,g=o.cmCodeMode,m=o.onCodeModeChange,w=o.onTabToSpace,p=o.className,d=p===void 0?"":p,n=o.tabToSpace,l=o.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(R.a,{bordered:!1,size:"small",value:g,onChange:m},s.a.createElement(a,{value:"vs"},"\u767D\u8272\u80CC\u666F"),s.a.createElement(a,{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(R.a,{bordered:!1,size:"small",value:x,onChange:r},s.a.createElement(a,{value:12},"12px"),s.a.createElement(a,{value:14},"14px"),s.a.createElement(a,{value:16},"16px"),s.a.createElement(a,{value:18},"18px"),s.a.createElement(a,{value:20},"20px"),s.a.createElement(a,{value:22},"22px"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"Tab\u8F6C\u6362"),s.a.createElement(u.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,Y,k){"use strict";k.d(Y,"a",function(){return T});var P=k("k1fw"),u=k("miYZ"),C=k("tsqr"),R=k("rAM+"),h=k("tJVT"),s=k("PpiC"),S=k("q1tI"),f=k.n(S),a=k("bdgK");function o(v,i,L,A,y){var E=i.getWordUntilPosition(L),b={startLineNumber:L.lineNumber,endLineNumber:L.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},_=A.map(function(I){return{label:I,kind:v.languages.CompletionItemKind.Keyword,insertText:I,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:b}});return y.map(function(I){_.push(Object(P.a)(Object(P.a)({},I),{},{range:b}))}),_}var r=function(v){var i={label:"ifelse",kind:v.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},L=["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"];v.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(b,_){var I=o(v,b,_,L,[i]);return{suggestions:I}}});var A=["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"];v.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(b,_){var I=[{label:"print",kind:v.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=o(v,b,_,A,I);return{suggestions:j}}});var y=["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"];v.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(b,_){var I=[i,{label:"main",kind:v.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:v.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=o(v,b,_,y,I);return{suggestions:j}}})},x="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",g=k("LvDl");function m(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}function w(){}var p=!1,d={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function n(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=v;if(Array.isArray(v)){for(var L=0;L<v.length;L++){var A=d[v[L]];if(A)return A}return i[0]}return d[i]||i}var l=null,c=Y.b=function(v){var i=v.width,L=i===void 0?"100%":i,A=v.height,y=A===void 0?"100%":A,E=v.value,b=v.language,_=b===void 0?"javascript":b,I=v.style,j=I===void 0?{}:I,M=v.options,G=M===void 0?{}:M,K=v.overrideServices,H=K===void 0?{}:K,z=v.theme,B=z===void 0?"vs-dark":z,W=v.onEditBlur,F=v.onSave,$=v.autoHeight,ee=$===void 0?!1:$,Z=v.forbidCopy,ve=Z===void 0?!1:Z,he=v.onChange,le=he===void 0?w:he,Re=v.editorDidMount,xe=Re===void 0?w:Re,ie=v.onFocus,se=ie===void 0?w:ie,re=v.filename,be=re===void 0?"educoder.txt":re,q=Object(s.a)(v,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ne=Object(S.useRef)(),Te=Object(S.useRef)({}),ae=Object(S.useRef)(),J=Object(S.useRef)(!1),X=Object(S.useRef)(),Q=Object(S.useState)(!1),pe=Object(h.a)(Q,2),ce=pe[0],we=pe[1];function ze(){var Ee;return ne.current&&(Ee=new a.default(function(De){var Be=Object(R.a)(De),Xe;try{for(Be.s();!(Xe=Be.n()).done;){var nt=Xe.value;(nt.target.offsetHeight>0||nt.target.offsetWidth>0)&&Te.current.instance.layout()}}catch(dt){Be.e(dt)}finally{Be.f()}}),Ee.observe(ne.current)),Ee}function Ge(){C.b.warn(decodeURIComponent(x))}var Qe=function(){var De=Te.current.instance;if(E!=null&&De&&ce){var Be=De.getModel();Be&&E!==Be.getValue()&&(p=!0,Be.setValue(E),De.layout(),p=!1)}};Object(S.useEffect)(function(){ae.current&&clearTimeout(ae.current),ae.current=setTimeout(function(){Qe()},500)},[E,ce,Te.current]);function $e(){var Ee=Te.current.instance;if(Ee){var De=Ee.getSelection(),Be=Te.current.pastePos||{},Xe=new l.Range(Be.startLineNumber||De.endLineNumber,Be.startColumn||De.endColumn,Be.endLineNumber||De.endLineNumber,Be.endColumn||De.endColumn);setTimeout(function(){Ee.executeEdits("",[{range:Xe,text:""}])},300)}}function rt(Ee){(window.navigator.platform.match("Mac")?Ee.metaKey:Ee.ctrlKey)&&Ee.keyCode==83&&(Ee.preventDefault(),F())}var et=function(){if(ee&&Te.current.instance){var De=Te.current.instance.getContentHeight();de(De<y?y:De)}else de(y)};function Me(Ee){var De=document.createEvent("MouseEvents");De.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ee.dispatchEvent(De)}function Ce(Ee,De){var Be=window.URL||window.webkitURL||window,Xe=new Blob([De]),nt=document.createElementNS("http://www.w3.org/1999/xhtml","a");nt.href=Be.createObjectURL(Xe),nt.download=Ee,Me(nt)}Object(S.useEffect)(function(){et()},[et]),Object(S.useEffect)(function(){ne.current&&!ce&&k.e(26).then(k.t.bind(null,"M/lh",7)).then(function(Ee){try{l=Ee,Te.current.instance=l.editor.create(ne.current,{value:E,language:n(_),theme:B,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},H);var De=Te.current.instance;if(xe(De,l),setTimeout(function(){et(),Te.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ce(be||"educoder.txt",De.getValue())}})},500),Te.current.subscription=De.onDidChangeModelContent(function(Xe){J.current?clearTimeout(X.current):(et(),le(De.getValue(),Xe)),X.current=setTimeout(function(){J.current=!1},500)}),window.Monaco||r(l),ve&&(De.addCommand(l.KeyMod.CtrlCmd|l.KeyMod.Shift|l.KeyCode.KEY_V,function(){return Ge(),null}),De.addCommand(l.KeyMod.CtrlCmd|l.KeyCode.KEY_C,function(){return Ge(),null})),window.Monaco=l,W&&De.onDidBlurEditorWidget(function(){W(De.getValue())}),se&&De.onDidFocusEditorText(function(){se(De.getValue())}),ve){De.addCommand(l.KeyMod.CtrlCmd|l.KeyCode.KEY_V,function(){return Ge(),null}),De.onDidPaste(function(Xe){Te.current.pastePos=Xe});try{window.addEventListener("paste",$e)}catch(Xe){}}var Be=ze();return we(!0),function(){var Xe=Te.current.instance;Xe.dispose();var nt=Xe.getModel();nt&&nt.dispose(),Te.current.subscription&&Te.current.subscription.dispose(),ve&&window.removeEventListener("paste",$e),Be.unobserve(ne.current)}}catch(Xe){}})},[]),Object(S.useEffect)(function(){var Ee=Te.current.instance;if(Ee&&ce)return document.addEventListener("keydown",rt,!1),function(){document.removeEventListener("keydown",rt)}},[F,ce]),Object(S.useEffect)(function(){var Ee=Te.current.instance;if(Ee&&ce){var De=n(_);l.editor.setModelLanguage(Ee.getModel(),De),console.log("language:",_,Ee.getModel(),De)}},[_,ce]),Object(S.useEffect)(function(){var Ee=Te.current.instance;Ee&&ce&&l.editor.setTheme(B)},[B,ce]),Object(S.useEffect)(function(){var Ee=Te.current.instance;Ee&&ce&&(Ee.updateOptions(Object(P.a)({},G)),setTimeout(function(){Ee.getModel().updateOptions(Object(P.a)({},G))},200))},[JSON.stringify(G),ce]),Object(S.useEffect)(function(){var Ee=Te.current.instance;Ee&&ce&&Ee.layout()},[L,y,ce]);var Ve=Object(S.useState)(m(L)),tt=Object(h.a)(Ve,2),He=tt[0],Je=tt[1],_e=Object(S.useState)(m(y)),Se=Object(h.a)(_e,2),Oe=Se[0],de=Se[1],ye=Object(P.a)(Object(P.a)({},j),{},{width:He,height:Oe});return f.a.createElement("div",{className:"my-monaco-editor",ref:ne,style:ye})};function T(v){var i=v.width,L=i===void 0?"100%":i,A=v.height,y=A===void 0?"100%":A,E=v.original,b=v.modified,_=v.language,I=v.options,j=I===void 0?{}:I,M=Object(S.useRef)(),G=Object(S.useState)(null),K=Object(h.a)(G,2),H=K[0],z=K[1];function B(ee){var Z;return M.current&&(Z=new a.default(function(ve){var he=Object(R.a)(ve),le;try{for(he.s();!(le=he.n()).done;){var Re=le.value;(Re.target.offsetHeight>0||Re.target.offsetWidth>0)&&ee.layout()}}catch(xe){he.e(xe)}finally{he.f()}}),Z.observe(M.current)),Z}Object(S.useEffect)(function(){M.current&&k.e(26).then(k.t.bind(null,"M/lh",7)).then(function(ee){l=ee;var Z=l.editor.createDiffEditor(M.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},j),{},{wordWrap:!0}));z(Z);var ve=B(Z);return function(){Z.dispose();var he=Z.getModel();he&&he.dispose(),ve.unobserve(M.current)}})},[]),Object(S.useEffect)(function(){H&&H.setModel({original:l.editor.createModel(E,_),modified:l.editor.createModel(b,_)})},[E,b,_,H]);var W=m(L),F=m(y),$={width:W,height:F};return f.a.createElement("div",{className:"my-diff-editor",ref:M,style:$})}},ZpRC:function(N,Y,k){"use strict";function P(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function u(r,x){return(!x||r!=="hidden")&&r!=="visible"&&r!=="clip"}function C(r,x){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var g=getComputedStyle(r,null);return u(g.overflowY,x)||u(g.overflowX,x)||function(m){var w=function(p){if(!p.ownerDocument||!p.ownerDocument.defaultView)return null;try{return p.ownerDocument.defaultView.frameElement}catch(d){return null}}(m);return!!w&&(w.clientHeight<m.scrollHeight||w.clientWidth<m.scrollWidth)}(r)}return!1}function R(r,x,g,m,w,p,d,n){return p<r&&d>x||p>r&&d<x?0:p<=r&&n<=g||d>=x&&n>=g?p-r-m:d>x&&n<g||p<r&&n>g?d-x+w:0}var h=function(r,x){var g=window,m=x.scrollMode,w=x.block,p=x.inline,d=x.boundary,n=x.skipOverflowHiddenElements,l=typeof d=="function"?d:function(X){return X!==d};if(!P(r))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,T=[],v=r;P(v)&&l(v);){if((v=v.parentElement)===c){T.push(v);break}v!=null&&v===document.body&&C(v)&&!C(document.documentElement)||v!=null&&C(v,n)&&T.push(v)}for(var i=g.visualViewport?g.visualViewport.width:innerWidth,L=g.visualViewport?g.visualViewport.height:innerHeight,A=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,E=r.getBoundingClientRect(),b=E.height,_=E.width,I=E.top,j=E.right,M=E.bottom,G=E.left,K=w==="start"||w==="nearest"?I:w==="end"?M:I+b/2,H=p==="center"?G+_/2:p==="end"?j:G,z=[],B=0;B<T.length;B++){var W=T[B],F=W.getBoundingClientRect(),$=F.height,ee=F.width,Z=F.top,ve=F.right,he=F.bottom,le=F.left;if(m==="if-needed"&&I>=0&&G>=0&&M<=L&&j<=i&&I>=Z&&M<=he&&G>=le&&j<=ve)return z;var Re=getComputedStyle(W),xe=parseInt(Re.borderLeftWidth,10),ie=parseInt(Re.borderTopWidth,10),se=parseInt(Re.borderRightWidth,10),re=parseInt(Re.borderBottomWidth,10),be=0,q=0,ne="offsetWidth"in W?W.offsetWidth-W.clientWidth-xe-se:0,Te="offsetHeight"in W?W.offsetHeight-W.clientHeight-ie-re:0;if(c===W)be=w==="start"?K:w==="end"?K-L:w==="nearest"?R(y,y+L,L,ie,re,y+K,y+K+b,b):K-L/2,q=p==="start"?H:p==="center"?H-i/2:p==="end"?H-i:R(A,A+i,i,xe,se,A+H,A+H+_,_),be=Math.max(0,be+y),q=Math.max(0,q+A);else{be=w==="start"?K-Z-ie:w==="end"?K-he+re+Te:w==="nearest"?R(Z,he,$,ie,re+Te,K,K+b,b):K-(Z+$/2)+Te/2,q=p==="start"?H-le-xe:p==="center"?H-(le+ee/2)+ne/2:p==="end"?H-ve+se+ne:R(le,ve,ee,xe,se+ne,H,H+_,_);var ae=W.scrollLeft,J=W.scrollTop;K+=J-(be=Math.max(0,Math.min(J+be,W.scrollHeight-$+Te))),H+=ae-(q=Math.max(0,Math.min(ae+q,W.scrollWidth-ee+ne)))}z.push({el:W,top:be,left:q})}return z};function s(r){return r===Object(r)&&Object.keys(r).length!==0}function S(r,x){x===void 0&&(x="auto");var g="scrollBehavior"in document.body.style;r.forEach(function(m){var w=m.el,p=m.top,d=m.left;w.scroll&&g?w.scroll({top:p,left:d,behavior:x}):(w.scrollTop=p,w.scrollLeft=d)})}function f(r){return r===!1?{block:"end",inline:"nearest"}:s(r)?r:{block:"start",inline:"nearest"}}function a(r,x){var g=!r.ownerDocument.documentElement.contains(r);if(s(x)&&typeof x.behavior=="function")return x.behavior(g?[]:h(r,x));if(g)return;var m=f(x);return S(h(r,m),m.behavior)}var o=Y.a=a},Zss7:function(N,Y,k){var P;(function(u){var C=/^\s+/,R=/\s+$/,h=0,s=u.round,S=u.min,f=u.max,a=u.random;function o(re,be){if(re=re||"",be=be||{},re instanceof o)return re;if(!(this instanceof o))return new o(re,be);var q=r(re);this._originalInput=re,this._r=q.r,this._g=q.g,this._b=q.b,this._a=q.a,this._roundA=s(100*this._a)/100,this._format=be.format||q.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=q.ok,this._tc_id=h++}o.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 re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),be,q,ne,Te,ae,J;return be=re.r/255,q=re.g/255,ne=re.b/255,be<=.03928?Te=be/12.92:Te=u.pow((be+.055)/1.055,2.4),q<=.03928?ae=q/12.92:ae=u.pow((q+.055)/1.055,2.4),ne<=.03928?J=ne/12.92:J=u.pow((ne+.055)/1.055,2.4),.2126*Te+.7152*ae+.0722*J},setAlpha:function(re){return this._a=z(re),this._roundA=s(100*this._a)/100,this},toHsv:function(){var re=w(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=w(this._r,this._g,this._b),be=s(re.h*360),q=s(re.s*100),ne=s(re.v*100);return this._a==1?"hsv("+be+", "+q+"%, "+ne+"%)":"hsva("+be+", "+q+"%, "+ne+"%, "+this._roundA+")"},toHsl:function(){var re=g(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=g(this._r,this._g,this._b),be=s(re.h*360),q=s(re.s*100),ne=s(re.l*100);return this._a==1?"hsl("+be+", "+q+"%, "+ne+"%)":"hsla("+be+", "+q+"%, "+ne+"%, "+this._roundA+")"},toHex:function(re){return d(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return n(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},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(B(this._r,255)*100)+"%",g:s(B(this._g,255)*100)+"%",b:s(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(B(this._r,255)*100)+"%, "+s(B(this._g,255)*100)+"%, "+s(B(this._b,255)*100)+"%)":"rgba("+s(B(this._r,255)*100)+"%, "+s(B(this._g,255)*100)+"%, "+s(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var be="#"+l(this._r,this._g,this._b,this._a),q=be,ne=this._gradientType?"GradientType = 1, ":"";if(re){var Te=o(re);q="#"+l(Te._r,Te._g,Te._b,Te._a)}return"progid:DXImageTransform.Microsoft.gradient("+ne+"startColorstr="+be+",endColorstr="+q+")"},toString:function(re){var be=!!re;re=re||this._format;var q=!1,ne=this._a<1&&this._a>=0,Te=!be&&ne&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Te?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(q=this.toRgbString()),re==="prgb"&&(q=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(q=this.toHexString()),re==="hex3"&&(q=this.toHexString(!0)),re==="hex4"&&(q=this.toHex8String(!0)),re==="hex8"&&(q=this.toHex8String()),re==="name"&&(q=this.toName()),re==="hsl"&&(q=this.toHslString()),re==="hsv"&&(q=this.toHsvString()),q||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(re,be){var q=re.apply(null,[this].concat([].slice.call(be)));return this._r=q._r,this._g=q._g,this._b=q._b,this.setAlpha(q._a),this},lighten:function(){return this._applyModification(i,arguments)},brighten:function(){return this._applyModification(L,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(c,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(re,be){return re.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(E,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(_,arguments)}},o.fromRatio=function(re,be){if(typeof re=="object"){var q={};for(var ne in re)re.hasOwnProperty(ne)&&(ne==="a"?q[ne]=re[ne]:q[ne]=ve(re[ne]));re=q}return o(re,be)};function r(re){var be={r:0,g:0,b:0},q=1,ne=null,Te=null,ae=null,J=!1,X=!1;return typeof re=="string"&&(re=ie(re)),typeof re=="object"&&(xe(re.r)&&xe(re.g)&&xe(re.b)?(be=x(re.r,re.g,re.b),J=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):xe(re.h)&&xe(re.s)&&xe(re.v)?(ne=ve(re.s),Te=ve(re.v),be=p(re.h,ne,Te),J=!0,X="hsv"):xe(re.h)&&xe(re.s)&&xe(re.l)&&(ne=ve(re.s),ae=ve(re.l),be=m(re.h,ne,ae),J=!0,X="hsl"),re.hasOwnProperty("a")&&(q=re.a)),q=z(q),{ok:J,format:re.format||X,r:S(255,f(be.r,0)),g:S(255,f(be.g,0)),b:S(255,f(be.b,0)),a:q}}function x(re,be,q){return{r:B(re,255)*255,g:B(be,255)*255,b:B(q,255)*255}}function g(re,be,q){re=B(re,255),be=B(be,255),q=B(q,255);var ne=f(re,be,q),Te=S(re,be,q),ae,J,X=(ne+Te)/2;if(ne==Te)ae=J=0;else{var Q=ne-Te;J=X>.5?Q/(2-ne-Te):Q/(ne+Te);switch(ne){case re:ae=(be-q)/Q+(be<q?6:0);break;case be:ae=(q-re)/Q+2;break;case q:ae=(re-be)/Q+4;break}ae/=6}return{h:ae,s:J,l:X}}function m(re,be,q){var ne,Te,ae;re=B(re,360),be=B(be,100),q=B(q,100);function J(pe,ce,we){return we<0&&(we+=1),we>1&&(we-=1),we<1/6?pe+(ce-pe)*6*we:we<1/2?ce:we<2/3?pe+(ce-pe)*(2/3-we)*6:pe}if(be===0)ne=Te=ae=q;else{var X=q<.5?q*(1+be):q+be-q*be,Q=2*q-X;ne=J(Q,X,re+1/3),Te=J(Q,X,re),ae=J(Q,X,re-1/3)}return{r:ne*255,g:Te*255,b:ae*255}}function w(re,be,q){re=B(re,255),be=B(be,255),q=B(q,255);var ne=f(re,be,q),Te=S(re,be,q),ae,J,X=ne,Q=ne-Te;if(J=ne===0?0:Q/ne,ne==Te)ae=0;else{switch(ne){case re:ae=(be-q)/Q+(be<q?6:0);break;case be:ae=(q-re)/Q+2;break;case q:ae=(re-be)/Q+4;break}ae/=6}return{h:ae,s:J,v:X}}function p(re,be,q){re=B(re,360)*6,be=B(be,100),q=B(q,100);var ne=u.floor(re),Te=re-ne,ae=q*(1-be),J=q*(1-Te*be),X=q*(1-(1-Te)*be),Q=ne%6,pe=[q,J,ae,ae,X,q][Q],ce=[X,q,q,J,ae,ae][Q],we=[ae,ae,X,q,q,J][Q];return{r:pe*255,g:ce*255,b:we*255}}function d(re,be,q,ne){var Te=[Z(s(re).toString(16)),Z(s(be).toString(16)),Z(s(q).toString(16))];return ne&&Te[0].charAt(0)==Te[0].charAt(1)&&Te[1].charAt(0)==Te[1].charAt(1)&&Te[2].charAt(0)==Te[2].charAt(1)?Te[0].charAt(0)+Te[1].charAt(0)+Te[2].charAt(0):Te.join("")}function n(re,be,q,ne,Te){var ae=[Z(s(re).toString(16)),Z(s(be).toString(16)),Z(s(q).toString(16)),Z(he(ne))];return Te&&ae[0].charAt(0)==ae[0].charAt(1)&&ae[1].charAt(0)==ae[1].charAt(1)&&ae[2].charAt(0)==ae[2].charAt(1)&&ae[3].charAt(0)==ae[3].charAt(1)?ae[0].charAt(0)+ae[1].charAt(0)+ae[2].charAt(0)+ae[3].charAt(0):ae.join("")}function l(re,be,q,ne){var Te=[Z(he(ne)),Z(s(re).toString(16)),Z(s(be).toString(16)),Z(s(q).toString(16))];return Te.join("")}o.equals=function(re,be){return!re||!be?!1:o(re).toRgbString()==o(be).toRgbString()},o.random=function(){return o.fromRatio({r:a(),g:a(),b:a()})};function c(re,be){be=be===0?0:be||10;var q=o(re).toHsl();return q.s-=be/100,q.s=W(q.s),o(q)}function T(re,be){be=be===0?0:be||10;var q=o(re).toHsl();return q.s+=be/100,q.s=W(q.s),o(q)}function v(re){return o(re).desaturate(100)}function i(re,be){be=be===0?0:be||10;var q=o(re).toHsl();return q.l+=be/100,q.l=W(q.l),o(q)}function L(re,be){be=be===0?0:be||10;var q=o(re).toRgb();return q.r=f(0,S(255,q.r-s(255*-(be/100)))),q.g=f(0,S(255,q.g-s(255*-(be/100)))),q.b=f(0,S(255,q.b-s(255*-(be/100)))),o(q)}function A(re,be){be=be===0?0:be||10;var q=o(re).toHsl();return q.l-=be/100,q.l=W(q.l),o(q)}function y(re,be){var q=o(re).toHsl(),ne=(q.h+be)%360;return q.h=ne<0?360+ne:ne,o(q)}function E(re){var be=o(re).toHsl();return be.h=(be.h+180)%360,o(be)}function b(re){var be=o(re).toHsl(),q=be.h;return[o(re),o({h:(q+120)%360,s:be.s,l:be.l}),o({h:(q+240)%360,s:be.s,l:be.l})]}function _(re){var be=o(re).toHsl(),q=be.h;return[o(re),o({h:(q+90)%360,s:be.s,l:be.l}),o({h:(q+180)%360,s:be.s,l:be.l}),o({h:(q+270)%360,s:be.s,l:be.l})]}function I(re){var be=o(re).toHsl(),q=be.h;return[o(re),o({h:(q+72)%360,s:be.s,l:be.l}),o({h:(q+216)%360,s:be.s,l:be.l})]}function j(re,be,q){be=be||6,q=q||30;var ne=o(re).toHsl(),Te=360/q,ae=[o(re)];for(ne.h=(ne.h-(Te*be>>1)+720)%360;--be;)ne.h=(ne.h+Te)%360,ae.push(o(ne));return ae}function M(re,be){be=be||6;for(var q=o(re).toHsv(),ne=q.h,Te=q.s,ae=q.v,J=[],X=1/be;be--;)J.push(o({h:ne,s:Te,v:ae})),ae=(ae+X)%1;return J}o.mix=function(re,be,q){q=q===0?0:q||50;var ne=o(re).toRgb(),Te=o(be).toRgb(),ae=q/100,J={r:(Te.r-ne.r)*ae+ne.r,g:(Te.g-ne.g)*ae+ne.g,b:(Te.b-ne.b)*ae+ne.b,a:(Te.a-ne.a)*ae+ne.a};return o(J)},o.readability=function(re,be){var q=o(re),ne=o(be);return(u.max(q.getLuminance(),ne.getLuminance())+.05)/(u.min(q.getLuminance(),ne.getLuminance())+.05)},o.isReadable=function(re,be,q){var ne=o.readability(re,be),Te,ae;ae=!1,Te=se(q);switch(Te.level+Te.size){case"AAsmall":case"AAAlarge":ae=ne>=4.5;break;case"AAlarge":ae=ne>=3;break;case"AAAsmall":ae=ne>=7;break}return ae},o.mostReadable=function(re,be,q){var ne=null,Te=0,ae,J,X,Q;q=q||{},J=q.includeFallbackColors,X=q.level,Q=q.size;for(var pe=0;pe<be.length;pe++)ae=o.readability(re,be[pe]),ae>Te&&(Te=ae,ne=o(be[pe]));return o.isReadable(re,ne,{level:X,size:Q})||!J?ne:(q.includeFallbackColors=!1,o.mostReadable(re,["#fff","#000"],q))};var G=o.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"},K=o.hexNames=H(G);function H(re){var be={};for(var q in re)re.hasOwnProperty(q)&&(be[re[q]]=q);return be}function z(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function B(re,be){$(re)&&(re="100%");var q=ee(re);return re=S(be,f(0,parseFloat(re))),q&&(re=parseInt(re*be,10)/100),u.abs(re-be)<1e-6?1:re%be/parseFloat(be)}function W(re){return S(1,f(0,re))}function F(re){return parseInt(re,16)}function $(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ee(re){return typeof re=="string"&&re.indexOf("%")!=-1}function Z(re){return re.length==1?"0"+re:""+re}function ve(re){return re<=1&&(re=re*100+"%"),re}function he(re){return u.round(parseFloat(re)*255).toString(16)}function le(re){return F(re)/255}var Re=function(){var re="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",q="(?:"+be+")|(?:"+re+")",ne="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",Te="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?";return{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+ne),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+ne),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+ne),hsva:new RegExp("hsva"+Te),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 xe(re){return!!Re.CSS_UNIT.exec(re)}function ie(re){re=re.replace(C,"").replace(R,"").toLowerCase();var be=!1;if(G[re])re=G[re],be=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var q;return(q=Re.rgb.exec(re))?{r:q[1],g:q[2],b:q[3]}:(q=Re.rgba.exec(re))?{r:q[1],g:q[2],b:q[3],a:q[4]}:(q=Re.hsl.exec(re))?{h:q[1],s:q[2],l:q[3]}:(q=Re.hsla.exec(re))?{h:q[1],s:q[2],l:q[3],a:q[4]}:(q=Re.hsv.exec(re))?{h:q[1],s:q[2],v:q[3]}:(q=Re.hsva.exec(re))?{h:q[1],s:q[2],v:q[3],a:q[4]}:(q=Re.hex8.exec(re))?{r:F(q[1]),g:F(q[2]),b:F(q[3]),a:le(q[4]),format:be?"name":"hex8"}:(q=Re.hex6.exec(re))?{r:F(q[1]),g:F(q[2]),b:F(q[3]),format:be?"name":"hex"}:(q=Re.hex4.exec(re))?{r:F(q[1]+""+q[1]),g:F(q[2]+""+q[2]),b:F(q[3]+""+q[3]),a:le(q[4]+""+q[4]),format:be?"name":"hex8"}:(q=Re.hex3.exec(re))?{r:F(q[1]+""+q[1]),g:F(q[2]+""+q[2]),b:F(q[3]+""+q[3]),format:be?"name":"hex"}:!1}function se(re){var be,q;return re=re||{level:"AA",size:"small"},be=(re.level||"AA").toUpperCase(),q=(re.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),q!=="small"&&q!=="large"&&(q="small"),{level:be,size:q}}N.exports?N.exports=o:!(P=function(){return o}.call(Y,k,Y,N),P!==void 0&&(N.exports=P))})(Math)},bCnd:function(N,Y,k){"use strict";k.d(Y,"b",function(){return R}),k.d(Y,"a",function(){return h});var P=k("je13"),u=k.n(P),C=!1;function R(s,S){var f=u.a.get("__ec");f||(f={}),f[s]=S,u.a.set("__ec",f)}function h(s,S){var f=u.a.get("__ec");return f?f[s]===void 0?S:f[s]:S}},bQjk:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.CipherParams,s=C.enc,S=s.Hex,f=C.format,a=f.Hex={stringify:function(o){return o.ciphertext.toString(S)},parse:function(o){var r=S.parse(o);return h.create({ciphertext:r})}}}(),P.format.Hex})},bT9E:function(N,Y,k){"use strict";k.d(Y,"a",function(){return u});var P=k("VTBJ");function u(C,R){var h=Object(P.a)({},C);return Array.isArray(R)&&R.forEach(function(s){delete h[s]}),h}},biw7:function(N,Y,k){"use strict";var P=k("q1tI"),u=k.n(P),C=P.createContext(null);Y.a=C},c5Ni:function(N,Y,k){},cDPC:function(N,Y,k){"use strict";var P=k("tJVT"),u=k("q1tI"),C=k.n(u),R=k("i3hx"),h=k.n(R);Y.a=function(s){var S=s.defaultX,f=S===void 0?"40%":S,a=s.leftChild,o=s.rightChild,r=s.className,x=s.hideResize,g=x===void 0?!1:x,m=Object(u.useState)(f),w=Object(P.a)(m,2),p=w[0],d=w[1],n=Object(u.useRef)();function l(){n.current=!0}Object(u.useEffect)(function(){function v(L){n.current&&d(L.pageX)}function i(){n.current=!1}return window.addEventListener("mousemove",v),window.addEventListener("mouseup",i),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",i)}},[]);var c=typeof p=="number"&&p!==.01?"".concat(p,"px"):f,T="calc(100% - ".concat(g?"0px":"4px"," - ").concat(c,")");return C.a.createElement("div",{className:"split-panel-container ".concat(r)},C.a.createElement("section",{style:{width:c,display:p===.01?"none":""}},a),C.a.createElement("section",{className:"resize-x-bar",onMouseDown:l},C.a.createElement("a",{className:"btn-resize"},C.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},C.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"})))),C.a.createElement("section",{style:{width:T}},o))}},cv67:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.algo,f=[];(function(){for(var m=0;m<64;m++)f[m]=u.abs(u.sin(m+1))*4294967296|0})();var a=S.MD5=s.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,w){for(var p=0;p<16;p++){var d=w+p,n=m[d];m[d]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var l=this._hash.words,c=m[w+0],T=m[w+1],v=m[w+2],i=m[w+3],L=m[w+4],A=m[w+5],y=m[w+6],E=m[w+7],b=m[w+8],_=m[w+9],I=m[w+10],j=m[w+11],M=m[w+12],G=m[w+13],K=m[w+14],H=m[w+15],z=l[0],B=l[1],W=l[2],F=l[3];z=o(z,B,W,F,c,7,f[0]),F=o(F,z,B,W,T,12,f[1]),W=o(W,F,z,B,v,17,f[2]),B=o(B,W,F,z,i,22,f[3]),z=o(z,B,W,F,L,7,f[4]),F=o(F,z,B,W,A,12,f[5]),W=o(W,F,z,B,y,17,f[6]),B=o(B,W,F,z,E,22,f[7]),z=o(z,B,W,F,b,7,f[8]),F=o(F,z,B,W,_,12,f[9]),W=o(W,F,z,B,I,17,f[10]),B=o(B,W,F,z,j,22,f[11]),z=o(z,B,W,F,M,7,f[12]),F=o(F,z,B,W,G,12,f[13]),W=o(W,F,z,B,K,17,f[14]),B=o(B,W,F,z,H,22,f[15]),z=r(z,B,W,F,T,5,f[16]),F=r(F,z,B,W,y,9,f[17]),W=r(W,F,z,B,j,14,f[18]),B=r(B,W,F,z,c,20,f[19]),z=r(z,B,W,F,A,5,f[20]),F=r(F,z,B,W,I,9,f[21]),W=r(W,F,z,B,H,14,f[22]),B=r(B,W,F,z,L,20,f[23]),z=r(z,B,W,F,_,5,f[24]),F=r(F,z,B,W,K,9,f[25]),W=r(W,F,z,B,i,14,f[26]),B=r(B,W,F,z,b,20,f[27]),z=r(z,B,W,F,G,5,f[28]),F=r(F,z,B,W,v,9,f[29]),W=r(W,F,z,B,E,14,f[30]),B=r(B,W,F,z,M,20,f[31]),z=x(z,B,W,F,A,4,f[32]),F=x(F,z,B,W,b,11,f[33]),W=x(W,F,z,B,j,16,f[34]),B=x(B,W,F,z,K,23,f[35]),z=x(z,B,W,F,T,4,f[36]),F=x(F,z,B,W,L,11,f[37]),W=x(W,F,z,B,E,16,f[38]),B=x(B,W,F,z,I,23,f[39]),z=x(z,B,W,F,G,4,f[40]),F=x(F,z,B,W,c,11,f[41]),W=x(W,F,z,B,i,16,f[42]),B=x(B,W,F,z,y,23,f[43]),z=x(z,B,W,F,_,4,f[44]),F=x(F,z,B,W,M,11,f[45]),W=x(W,F,z,B,H,16,f[46]),B=x(B,W,F,z,v,23,f[47]),z=g(z,B,W,F,c,6,f[48]),F=g(F,z,B,W,E,10,f[49]),W=g(W,F,z,B,K,15,f[50]),B=g(B,W,F,z,A,21,f[51]),z=g(z,B,W,F,M,6,f[52]),F=g(F,z,B,W,i,10,f[53]),W=g(W,F,z,B,I,15,f[54]),B=g(B,W,F,z,T,21,f[55]),z=g(z,B,W,F,b,6,f[56]),F=g(F,z,B,W,H,10,f[57]),W=g(W,F,z,B,y,15,f[58]),B=g(B,W,F,z,G,21,f[59]),z=g(z,B,W,F,L,6,f[60]),F=g(F,z,B,W,j,10,f[61]),W=g(W,F,z,B,v,15,f[62]),B=g(B,W,F,z,_,21,f[63]),l[0]=l[0]+z|0,l[1]=l[1]+B|0,l[2]=l[2]+W|0,l[3]=l[3]+F|0},_doFinalize:function(){var m=this._data,w=m.words,p=this._nDataBytes*8,d=m.sigBytes*8;w[d>>>5]|=128<<24-d%32;var n=u.floor(p/4294967296),l=p;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,m.sigBytes=(w.length+1)*4,this._process();for(var c=this._hash,T=c.words,v=0;v<4;v++){var i=T[v];T[v]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}return c},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function o(m,w,p,d,n,l,c){var T=m+(w&p|~w&d)+n+c;return(T<<l|T>>>32-l)+w}function r(m,w,p,d,n,l,c){var T=m+(w&d|p&~d)+n+c;return(T<<l|T>>>32-l)+w}function x(m,w,p,d,n,l,c){var T=m+(w^p^d)+n+c;return(T<<l|T>>>32-l)+w}function g(m,w,p,d,n,l,c){var T=m+(p^(w|~d))+n+c;return(T<<l|T>>>32-l)+w}C.MD5=s._createHelper(a),C.HmacMD5=s._createHmacHelper(a)}(Math),P.MD5})},dejd:function(N,Y,k){},dmUQ:function(N,Y,k){"use strict";var P=k("Ff2n"),u=k("rePB"),C=k("1OyB"),R=k("vuIU"),h=k("Ji7U"),s=k("md7G"),S=k("foSv"),f=k("q1tI"),a=k.n(f),o=k("TSYQ"),r=k.n(o),x=k("4IlW");function g(b,_){var I=Object.keys(b);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(b);_&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(b,M).enumerable})),I.push.apply(I,j)}return I}function m(b){for(var _=1;_<arguments.length;_++){var I=arguments[_]!=null?arguments[_]:{};_%2?g(Object(I),!0).forEach(function(j){Object(u.a)(b,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(I)):g(Object(I)).forEach(function(j){Object.defineProperty(b,j,Object.getOwnPropertyDescriptor(I,j))})}return b}function w(b){var _=p();return function(){var j=Object(S.a)(b),M;if(_){var G=Object(S.a)(this).constructor;M=Reflect.construct(j,arguments,G)}else M=j.apply(this,arguments);return Object(s.a)(this,M)}}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(b){return!1}}function d(){}function n(b){b.preventDefault()}var l=function(_){return _.replace(/[^\w.-]+/g,"")},c=200,T=600,v=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,i=function(_){return _!=null},L=function(_,I){return I===_||typeof I=="number"&&typeof _=="number"&&isNaN(I)&&isNaN(_)},A=function(b){Object(h.a)(I,b);var _=w(I);function I(j){var M;Object(C.a)(this,I),M=_.call(this,j),M.onKeyDown=function(H){var z=M.props,B=z.onKeyDown,W=z.onPressEnter;if(H.keyCode===x.a.UP){var F=M.getRatio(H);M.up(H,F,null),M.stop()}else if(H.keyCode===x.a.DOWN){var $=M.getRatio(H);M.down(H,$,null),M.stop()}else H.keyCode===x.a.ENTER&&W&&W(H);if(M.recordCursorPosition(),M.lastKeyCode=H.keyCode,B){for(var ee=arguments.length,Z=new Array(ee>1?ee-1:0),ve=1;ve<ee;ve++)Z[ve-1]=arguments[ve];B.apply(void 0,[H].concat(Z))}},M.onKeyUp=function(H){var z=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),z){for(var B=arguments.length,W=new Array(B>1?B-1:0),F=1;F<B;F++)W[F-1]=arguments[F];z.apply(void 0,[H].concat(W))}},M.onChange=function(H){var z=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(H)),M.setState({inputValue:M.rawInput}),z(M.toNumber(M.rawInput))},M.onMouseUp=function(){var H=M.props.onMouseUp;M.recordCursorPosition(),H&&H.apply(void 0,arguments)},M.onFocus=function(){var H;M.setState({focused:!0}),(H=M.props).onFocus.apply(H,arguments)},M.onBlur=function(){var H=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var z=M.getCurrentValidValue(M.state.inputValue),B=M.setValue(z,d);if(H){var W=M.input.value,F=M.getInputDisplayValue({focus:!1,value:B});M.input.value=F&&Number(F),H.apply(void 0,arguments),M.input.value=W}},M.getRatio=function(H){var z=1;return H.metaKey||H.ctrlKey?z=.1:H.shiftKey&&(z=10),z},M.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},M.getPrecision=function(H){if(i(M.props.precision))return M.props.precision;var z=String(H);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var B=0;return z.indexOf(".")>=0&&(B=z.length-z.indexOf(".")-1),B},M.getInputDisplayValue=function(H){var z=H||M.state,B=z.focused,W=z.inputValue,F=z.value,$;B?$=W:$=M.toPrecisionAsStep(F),$==null&&($="");var ee=M.formatWrapper($);return i(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(H){}},M.restoreByAfter=function(H){if(H===void 0)return!1;var z=M.input.value,B=z.lastIndexOf(H);if(B===-1)return!1;var W=M.cursorBefore.length;return M.lastKeyCode===x.a.DELETE&&M.cursorBefore.charAt(W-1)===H[0]?(M.fixCaret(W,W),!0):B+H.length===z.length?(M.fixCaret(B,B),!0):!1},M.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(z,B){var W=H.substring(B);return M.restoreByAfter(W)})},M.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(H,z,B){M.pressingUpOrDown=!0,M.step("down",H,z,B)},M.up=function(H,z,B){M.pressingUpOrDown=!0,M.step("up",H,z,B)},M.saveInput=function(H){M.input=H};var G=j.value;G===void 0&&(G=j.defaultValue),M.state={focused:j.autoFocus};var K=M.getValidValue(M.toNumber(G));return M.state=m(m({},M.state),{},{inputValue:M.toPrecisionAsStep(K),value:K}),M}return Object(R.a)(I,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var G=this.props,K=G.value,H=G.onChange,z=G.max,B=G.min,W=this.state.focused;if(M){if(!L(M.value,K)||!L(M.max,z)||!L(M.min,B)){var F=W?K:this.getValidValue(K),$;this.pressingUpOrDown?$=F:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(F),this.setState({value:F,inputValue:$})}var ee="value"in this.props?K:this.state.value;"max"in this.props&&M.max!==z&&typeof ee=="number"&&ee>z&&H&&H(z),"min"in this.props&&M.min!==B&&typeof ee=="number"&&ee<B&&H&&H(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Z=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===x.a.BACKSPACE?Z=this.cursorStart-1:this.lastKeyCode===x.a.DELETE&&(Z=this.cursorStart):Z=this.input.value.length,this.fixCaret(Z,Z)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case x.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case x.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ve){}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 G=M;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(M){var G=M.target.value.trim().replace(/。/g,".");return i(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(M);return isNaN(H)?M:(H<G&&(H=G),H>K&&(H=K),H)}},{key:"setValue",value:function(M,G){var K=this.props.precision,H=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),z=this.state.value,B=z===void 0?null:z,W=this.state.inputValue,F=W===void 0?null:W,$=typeof H=="number"?H.toFixed(K):"".concat(H),ee=H!==B||$!=="".concat(F);return"value"in this.props?(F=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:F},G)):this.setState({value:H,inputValue:this.toPrecisionAsStep(M)},G),ee&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,H=K.precision,z=K.step;if(i(H))return H;var B=this.getPrecision(G),W=this.getPrecision(z),F=this.getPrecision(M);return M?Math.max(F,B+W):B+W}},{key:"getPrecisionFactor",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(M,G);return Math.pow(10,K)}},{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 G=Math.abs(this.getMaxPrecision(M));return isNaN(G)?M.toString():Number(M).toFixed(G)}},{key:"toNumber",value:function(M){var G=this.props.precision,K=this.state.focused,H=M&&M.length>16&&K;return this.isNotCompleteNumber(M)||H?M:i(G)?Math.round(M*Math.pow(10,G))/Math.pow(10,G):Number(M)}},{key:"upStep",value:function(M,G){var K=this.props.step,H=this.getPrecisionFactor(M,G),z=Math.abs(this.getMaxPrecision(M,G)),B=((H*M+H*K*G)/H).toFixed(z);return this.toNumber(B)}},{key:"downStep",value:function(M,G){var K=this.props.step,H=this.getPrecisionFactor(M,G),z=Math.abs(this.getMaxPrecision(M,G)),B=((H*M-H*K*G)/H).toFixed(z);return this.toNumber(B)}},{key:"step",value:function(M,G){var K=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var B=this.props;if(B.disabled)return;var W=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(W))return;var F=this["".concat(M,"Step")](W,H),$=F>B.max||F<B.min;if(F>B.max?F=B.max:F<B.min&&(F=B.min),this.setValue(F,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),$)return;this.autoStepTimer=setTimeout(function(){K[M](G,H,!0)},z?c:T)}},{key:"fixCaret",value:function(M,G){if(M===void 0||G===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,H=this.input.selectionEnd;(M!==K||G!==H)&&this.input.setSelectionRange(M,G)}catch(z){}}},{key:"render",value:function(){var M,G=this.props,K=G.prefixCls,H=G.disabled,z=G.readOnly,B=G.useTouch,W=G.autoComplete,F=G.upHandler,$=G.downHandler,ee=G.className,Z=G.max,ve=G.min,he=G.style,le=G.title,Re=G.onMouseEnter,xe=G.onMouseLeave,ie=G.onMouseOver,se=G.onMouseOut,re=G.required,be=G.onClick,q=G.tabIndex,ne=G.type,Te=G.placeholder,ae=G.id,J=G.inputMode,X=G.pattern,Q=G.step,pe=G.maxLength,ce=G.autoFocus,we=G.name,ze=G.onPaste,Ge=G.onInput,Qe=Object(P.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),$e=this.state,rt=$e.value,et=$e.focused,Me=r()(K,(M={},Object(u.a)(M,ee,!!ee),Object(u.a)(M,"".concat(K,"-disabled"),H),Object(u.a)(M,"".concat(K,"-focused"),et),M)),Ce={};Object.keys(Qe).forEach(function(De){(De.substr(0,5)==="data-"||De.substr(0,5)==="aria-"||De==="role")&&(Ce[De]=Qe[De])});var Ve=!z&&!H,tt=this.getInputDisplayValue(null),He=(rt||rt===0)&&(isNaN(rt)||Number(rt)>=Z),Je=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=ve),_e=He||H||z,Se=Je||H||z,Oe=r()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(u.a)({},"".concat(K,"-handler-up-disabled"),_e)),de=r()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(u.a)({},"".concat(K,"-handler-down-disabled"),Se)),ye=B?{onTouchStart:_e?d:this.up,onTouchEnd:this.stop}:{onMouseDown:_e?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=B?{onTouchStart:Se?d:this.down,onTouchEnd:this.stop}:{onMouseDown:Se?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return a.a.createElement("div",{className:Me,style:he,title:le,onMouseEnter:Re,onMouseLeave:xe,onMouseOver:ie,onMouseOut:se,onFocus:function(){return null},onBlur:function(){return null}},a.a.createElement("div",{className:"".concat(K,"-handler-wrap")},a.a.createElement("span",Object.assign({unselectable:"on"},ye,{role:"button","aria-label":"Increase Value","aria-disabled":_e,className:Oe}),F||a.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:n})),a.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":Se,className:de}),$||a.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:n}))),a.a.createElement("div",{className:"".concat(K,"-input-wrap")},a.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ve,"aria-valuemax":Z,"aria-valuenow":rt,required:re,type:ne,placeholder:Te,onPaste:ze,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:q,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:d,onKeyUp:Ve?this.onKeyUp:d,autoFocus:ce,maxLength:pe,readOnly:z,disabled:H,max:Z,min:ve,step:Q,name:we,title:le,id:ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:X,inputMode:J,onInput:Ge},Ce))))}}]),I}(a.a.Component);A.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:l,required:!1,autoComplete:"off"};var y=A,E=Y.a=y},e7zE:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.Base,h=C.WordArray,s=u.algo,S=s.SHA1,f=s.HMAC,a=s.PBKDF2=R.extend({cfg:R.extend({keySize:128/32,hasher:S,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,r){for(var x=this.cfg,g=f.create(x.hasher,o),m=h.create(),w=h.create([1]),p=m.words,d=w.words,n=x.keySize,l=x.iterations;p.length<n;){var c=g.update(r).finalize(w);g.reset();for(var T=c.words,v=T.length,i=c,L=1;L<l;L++){i=g.finalize(i),g.reset();for(var A=i.words,y=0;y<v;y++)T[y]^=A[y]}m.concat(c),d[0]++}return m.sigBytes=n*4,m}});u.PBKDF2=function(o,r,x){return a.create(x).compute(o,r)}}(),P.PBKDF2})},eRFJ:function(N,Y,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,Y,k){"use strict";var P=k("Ff2n"),u=k("1OyB"),C=k("vuIU"),R=k("Ji7U"),h=k("md7G"),s=k("foSv"),S=k("1W/9"),f=k("q1tI"),a=k("rePB"),o=k("JX7q"),r=k("TSYQ"),x=k.n(r),g=k("qx4F"),m=k("4IlW");function w(H){return Array.isArray(H)?H:[H]}var p={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(p).filter(function(H){if(typeof document=="undefined")return!1;var z=document.getElementsByTagName("html")[0];return H in(z?z.style:{})})[0],n=p[d];function l(H,z,B,W){H.addEventListener?H.addEventListener(z,B,W):H.attachEvent&&H.attachEvent("on".concat(z),B)}function c(H,z,B,W){H.removeEventListener?H.removeEventListener(z,B,W):H.attachEvent&&H.detachEvent("on".concat(z),B)}function T(H,z){var B=typeof H=="function"?H(z):H;return Array.isArray(B)?B.length===2?B:[B[0],B[1]]:[B]}var v=function(z){return!isNaN(parseFloat(z))&&isFinite(z)},i=!(typeof window!="undefined"&&window.document&&window.document.createElement),L=function H(z,B,W,F){if(!B||B===document||B instanceof Document)return!1;if(B===z.parentNode)return!0;var $=Math.max(Math.abs(W),Math.abs(F))===Math.abs(F),ee=Math.max(Math.abs(W),Math.abs(F))===Math.abs(W),Z=B.scrollHeight-B.clientHeight,ve=B.scrollWidth-B.clientWidth,he=document.defaultView.getComputedStyle(B),le=he.overflowY==="auto"||he.overflowY==="scroll",Re=he.overflowX==="auto"||he.overflowX==="scroll",xe=Z&&le,ie=ve&&Re;return $&&(!xe||xe&&(B.scrollTop>=Z&&F<0||B.scrollTop<=0&&F>0))||ee&&(!ie||ie&&(B.scrollLeft>=ve&&W<0||B.scrollLeft<=0&&W>0))?H(z,B.parentNode,W,F):!1};function A(H){var z=y();return function(){var W=Object(s.a)(H),F;if(z){var $=Object(s.a)(this).constructor;F=Reflect.construct(W,arguments,$)}else F=W.apply(this,arguments);return Object(h.a)(this,F)}}function y(){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(H){return!1}}var E={},b=function(H){Object(R.a)(B,H);var z=A(B);function B(W){var F;return Object(u.a)(this,B),F=z.call(this,W),F.domFocus=function(){F.dom&&F.dom.focus()},F.removeStartHandler=function($){if($.touches.length>1)return;F.startPos={x:$.touches[0].clientX,y:$.touches[0].clientY}},F.removeMoveHandler=function($){if($.changedTouches.length>1)return;var ee=$.currentTarget,Z=$.changedTouches[0].clientX-F.startPos.x,ve=$.changedTouches[0].clientY-F.startPos.y;(ee===F.maskDom||ee===F.handlerDom||ee===F.contentDom&&L(ee,$.target,Z,ve))&&$.cancelable&&$.preventDefault()},F.transitionEnd=function($){var ee=$.target;c(ee,n,F.transitionEnd),ee.style.transition=""},F.onKeyDown=function($){if($.keyCode===m.a.ESC){var ee=F.props.onClose;$.stopPropagation(),ee&&ee($)}},F.onWrapperTransitionEnd=function($){var ee=F.props,Z=ee.open,ve=ee.afterVisibleChange;$.target===F.contentWrapper&&$.propertyName.match(/transform$/)&&(F.dom.style.transition="",!Z&&F.getCurrentDrawerSome()&&(document.body.style.overflowX="",F.maskDom&&(F.maskDom.style.left="",F.maskDom.style.width="")),ve&&ve(!!Z))},F.openLevelTransition=function(){var $=F.props,ee=$.open,Z=$.width,ve=$.height,he=F.getHorizontalBoolAndPlacementName(),le=he.isHorizontal,Re=he.placementName,xe=F.contentDom?F.contentDom.getBoundingClientRect()[le?"width":"height"]:0,ie=(le?Z:ve)||xe;F.setLevelAndScrolling(ee,Re,ie)},F.setLevelTransform=function($,ee,Z,ve){var he=F.props,le=he.placement,Re=he.levelMove,xe=he.duration,ie=he.ease,se=he.showMask;F.levelDom.forEach(function(re){re.style.transition="transform ".concat(xe," ").concat(ie),l(re,n,F.transitionEnd);var be=$?Z:0;if(Re){var q=T(Re,{target:re,open:$});be=$?q[0]:q[1]||0}var ne=typeof be=="number"?"".concat(be,"px"):be,Te=le==="left"||le==="top"?ne:"-".concat(ne);Te=se&&le==="right"&&ve?"calc(".concat(Te," + ").concat(ve,"px)"):Te,re.style.transform=be?"".concat(ee,"(").concat(Te,")"):""})},F.setLevelAndScrolling=function($,ee,Z){var ve=F.props.onChange;if(!i){var he=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(g.a)(!0):0;F.setLevelTransform($,ee,Z,he),F.toggleScrollingToDrawerAndBody(he)}ve&&ve($)},F.toggleScrollingToDrawerAndBody=function($){var ee=F.props,Z=ee.getOpenCount,ve=ee.getContainer,he=ee.showMask,le=ee.open,Re=ve&&ve(),xe=Z&&Z();if(Re&&Re.parentNode===document.body&&he){var ie=["touchstart"],se=[document.body,F.maskDom,F.handlerDom,F.contentDom];le&&document.body.style.overflow!=="hidden"?($&&F.addScrollingEffect($),xe===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",se.forEach(function(re,be){if(!re)return;l(re,ie[be]||"touchmove",be?F.removeMoveHandler:F.removeStartHandler,F.passive)})):F.getCurrentDrawerSome()&&(xe||(document.body.style.overflow=""),document.body.style.touchAction="",$&&F.remScrollingEffect($),se.forEach(function(re,be){if(!re)return;c(re,ie[be]||"touchmove",be?F.removeMoveHandler:F.removeStartHandler,F.passive)}))}},F.addScrollingEffect=function($){var ee=F.props,Z=ee.placement,ve=ee.duration,he=ee.ease,le=ee.getOpenCount,Re=ee.switchScrollingEffect,xe=le&&le();xe===1&&Re();var ie="width ".concat(ve," ").concat(he),se="transform ".concat(ve," ").concat(he);F.dom.style.transition="none";switch(Z){case"right":F.dom.style.transform="translateX(-".concat($,"px)");break;case"top":case"bottom":F.dom.style.width="calc(100% - ".concat($,"px)"),F.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(F.timeout),F.timeout=setTimeout(function(){F.dom&&(F.dom.style.transition="".concat(se,",").concat(ie),F.dom.style.width="",F.dom.style.transform="")})},F.remScrollingEffect=function($){var ee=F.props,Z=ee.placement,ve=ee.duration,he=ee.ease,le=ee.getOpenCount,Re=ee.switchScrollingEffect,xe=le&&le();xe||Re(!0),d&&(document.body.style.overflowX="hidden"),F.dom.style.transition="none";var ie,se="width ".concat(ve," ").concat(he),re="transform ".concat(ve," ").concat(he);switch(Z){case"left":{F.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ve);break}case"right":{F.dom.style.transform="translateX(".concat($,"px)"),F.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ve),F.maskDom&&(F.maskDom.style.left="-".concat($,"px"),F.maskDom.style.width="calc(100% + ".concat($,"px)"));break}case"top":case"bottom":{F.dom.style.width="calc(100% + ".concat($,"px)"),F.dom.style.height="100%",F.dom.style.transform="translateZ(0)",ie="height 0s ".concat(he," ").concat(ve);break}default:break}clearTimeout(F.timeout),F.timeout=setTimeout(function(){F.dom&&(F.dom.style.transition="".concat(re,",").concat(ie?"".concat(ie,","):"").concat(se),F.dom.style.transform="",F.dom.style.width="",F.dom.style.height="")})},F.getCurrentDrawerSome=function(){return!Object.keys(E).some(function($){return E[$]})},F.getLevelDom=function($){var ee=$.level,Z=$.getContainer;if(i)return;var ve=Z&&Z(),he=ve?ve.parentNode:null;if(F.levelDom=[],ee==="all"){var le=he?Array.prototype.slice.call(he.children):[];le.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==ve&&F.levelDom.push(Re)})}else ee&&w(ee).forEach(function(Re){document.querySelectorAll(Re).forEach(function(xe){F.levelDom.push(xe)})})},F.getHorizontalBoolAndPlacementName=function(){var $=F.props.placement,ee=$==="left"||$==="right",Z="translate".concat(ee?"X":"Y");return{isHorizontal:ee,placementName:Z}},F.state={_self:Object(o.a)(F)},F}return Object(C.a)(B,[{key:"componentDidMount",value:function(){var F=this;if(!i){var $=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return $=!0,null}}))}catch(le){}this.passive=$?{passive:!1}:!1}var ee=this.props,Z=ee.open,ve=ee.getContainer,he=ve&&ve();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Z&&(he&&he.parentNode===document.body&&(E[this.drawerId]=Z),this.openLevelTransition(),this.forceUpdate(function(){F.domFocus()}))}},{key:"componentDidUpdate",value:function(F){var $=this.props,ee=$.open,Z=$.getContainer,ve=Z&&Z();ee!==F.open&&(ee&&this.domFocus(),ve&&ve.parentNode===document.body&&(E[this.drawerId]=!!ee),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var F=this.props,$=F.getOpenCount,ee=F.open,Z=F.switchScrollingEffect,ve=typeof $=="function"&&$();delete E[this.drawerId],ee&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ve||(document.body.style.overflow="",Z(!0))}},{key:"render",value:function(){var F,$=this,ee=this.props,Z=ee.className,ve=ee.children,he=ee.style,le=ee.width,Re=ee.height,xe=ee.defaultOpen,ie=ee.open,se=ee.prefixCls,re=ee.placement,be=ee.level,q=ee.levelMove,ne=ee.ease,Te=ee.duration,ae=ee.getContainer,J=ee.handler,X=ee.onChange,Q=ee.afterVisibleChange,pe=ee.showMask,ce=ee.maskClosable,we=ee.maskStyle,ze=ee.onClose,Ge=ee.onHandleClick,Qe=ee.keyboard,$e=ee.getOpenCount,rt=ee.switchScrollingEffect,et=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?ie:!1,Ce=x()(se,(F={},Object(a.a)(F,"".concat(se,"-").concat(re),!0),Object(a.a)(F,"".concat(se,"-open"),Me),Object(a.a)(F,Z||"",!!Z),Object(a.a)(F,"no-mask",!pe),F)),Ve=this.getHorizontalBoolAndPlacementName(),tt=Ve.placementName,He=re==="left"||re==="top"?"-100%":"100%",Je=Me?"":"".concat(tt,"(").concat(He,")"),_e=J&&f.cloneElement(J,{onClick:function(Oe){J.props.onClick&&J.props.onClick(),Ge&&Ge(Oe)},ref:function(Oe){$.handlerDom=Oe}});return f.createElement("div",Object.assign({},et,{tabIndex:-1,className:Ce,style:he,ref:function(Oe){$.dom=Oe},onKeyDown:Me&&Qe?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),pe&&f.createElement("div",{className:"".concat(se,"-mask"),onClick:ce?ze:void 0,style:we,ref:function(Oe){$.maskDom=Oe}}),f.createElement("div",{className:"".concat(se,"-content-wrapper"),style:{transform:Je,msTransform:Je,width:v(le)?"".concat(le,"px"):le,height:v(Re)?"".concat(Re,"px"):Re},ref:function(Oe){$.contentWrapper=Oe}},f.createElement("div",{className:"".concat(se,"-content"),ref:function(Oe){$.contentDom=Oe},onTouchStart:Me&&pe?this.removeStartHandler:void 0,onTouchMove:Me&&pe?this.removeMoveHandler:void 0},ve),_e))}}],[{key:"getDerivedStateFromProps",value:function(F,$){var ee=$.prevProps,Z=$._self,ve={prevProps:F};if(ee!==void 0){var he=F.placement,le=F.level;he!==ee.placement&&(Z.contentDom=null),le!==ee.level&&Z.getLevelDom(F)}return ve}}]),B}(f.Component);b.defaultProps={switchScrollingEffect:function(){}};var _=b;function I(H){var z=j();return function(){var W=Object(s.a)(H),F;if(z){var $=Object(s.a)(this).constructor;F=Reflect.construct(W,arguments,$)}else F=W.apply(this,arguments);return Object(h.a)(this,F)}}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(H){return!1}}var M=function(H){Object(R.a)(B,H);var z=I(B);function B(W){var F;Object(u.a)(this,B),F=z.call(this,W),F.onHandleClick=function(ee){var Z=F.props,ve=Z.onHandleClick,he=Z.open;if(ve&&ve(ee),typeof he=="undefined"){var le=F.state.open;F.setState({open:!le})}},F.onClose=function(ee){var Z=F.props,ve=Z.onClose,he=Z.open;ve&&ve(ee),typeof he=="undefined"&&F.setState({open:!1})};var $=typeof W.open!="undefined"?W.open:!!W.defaultOpen;return F.state={open:$},"onMaskClick"in W&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),F}return Object(C.a)(B,[{key:"render",value:function(){var F=this,$=this.props,ee=$.defaultOpen,Z=$.getContainer,ve=$.wrapperClassName,he=$.forceRender,le=$.handler,Re=Object(P.a)($,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),xe=this.state.open;if(!Z)return f.createElement("div",{className:ve,ref:function(re){F.dom=re}},f.createElement(_,Object.assign({},Re,{open:xe,handler:le,getContainer:function(){return F.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ie=!!le||he;return f.createElement(S.a,{visible:xe,forceRender:ie,getContainer:Z,wrapperClassName:ve},function(se){var re=se.visible,be=se.afterClose,q=Object(P.a)(se,["visible","afterClose"]);return f.createElement(_,Object.assign({},Re,q,{open:re!==void 0?re:xe,afterVisibleChange:be!==void 0?be:Re.afterVisibleChange,handler:le,onClose:F.onClose,onHandleClick:F.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(F,$){var ee=$.prevProps,Z={prevProps:F};return typeof ee!="undefined"&&F.open!==ee.open&&(Z.open=F.open),Z}}]),B}(f.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:f.createElement("div",{className:"drawer-handle"},f.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var G=M,K=Y.a=G},fyJ8:function(N,Y,k){"use strict";var P=k("rePB"),u=k("VTBJ"),C=k("Ff2n"),R=k("U8pU"),h=k("q1tI"),s=k.n(h),S=k("TSYQ"),f=k.n(S),a=k("c+Xe"),o=k("sR1s");function r(p){return p&&Object(R.a)(p)==="object"&&!Array.isArray(p)&&!h.isValidElement(p)}function x(p){return typeof p=="string"?!0:Object(a.c)(p)}function g(p,d){var n,l=p.prefixCls,c=p.className,T=p.record,v=p.index,i=p.dataIndex,L=p.render,A=p.children,y=p.component,E=y===void 0?"td":y,b=p.colSpan,_=p.rowSpan,I=p.fixLeft,j=p.fixRight,M=p.firstFixLeft,G=p.lastFixLeft,K=p.firstFixRight,H=p.lastFixRight,z=p.appendNode,B=p.additionalProps,W=B===void 0?{}:B,F=p.ellipsis,$=p.align,ee=p.rowType,Z=p.isSticky,ve="".concat(l,"-cell"),he,le;if(A)le=A;else{var Re=Object(o.b)(T,i);if(le=Re,L){var xe=L(Re,T,v);r(xe)?(le=xe.children,he=xe.props):le=xe}}Object(R.a)(le)==="object"&&!Array.isArray(le)&&!h.isValidElement(le)&&(le=null),F&&(G||K)&&(le=h.createElement("span",{className:"".concat(ve,"-content")},le));var ie=he||{},se=ie.colSpan,re=ie.rowSpan,be=ie.style,q=ie.className,ne=Object(C.a)(ie,["colSpan","rowSpan","style","className"]),Te=se!==void 0?se:b,ae=re!==void 0?re:_;if(Te===0||ae===0)return null;var J={},X=typeof I=="number",Q=typeof j=="number";X&&(J.position="sticky",J.left=I),Q&&(J.position="sticky",J.right=j);var pe={};$&&(pe.textAlign=$);var ce,we=F===!0?{showTitle:!0}:F;we&&(we.showTitle||ee==="header")&&(typeof le=="string"||typeof le=="number"?ce=le.toString():h.isValidElement(le)&&typeof le.props.children=="string"&&(ce=le.props.children));var ze=Object(u.a)(Object(u.a)(Object(u.a)({title:ce},ne),W),{},{colSpan:Te&&Te!==1?Te:null,rowSpan:ae&&ae!==1?ae:null,className:f()(ve,c,(n={},Object(P.a)(n,"".concat(ve,"-fix-left"),X),Object(P.a)(n,"".concat(ve,"-fix-left-first"),M),Object(P.a)(n,"".concat(ve,"-fix-left-last"),G),Object(P.a)(n,"".concat(ve,"-fix-right"),Q),Object(P.a)(n,"".concat(ve,"-fix-right-first"),K),Object(P.a)(n,"".concat(ve,"-fix-right-last"),H),Object(P.a)(n,"".concat(ve,"-ellipsis"),F),Object(P.a)(n,"".concat(ve,"-with-append"),z),Object(P.a)(n,"".concat(ve,"-fix-sticky"),(X||Q)&&Z),n),W.className,q),style:Object(u.a)(Object(u.a)(Object(u.a)(Object(u.a)({},W.style),pe),J),be),ref:x(E)?d:null});return h.createElement(E,Object.assign({},ze),z,le)}var m=h.forwardRef(g);m.displayName="Cell";var w=h.memo(m,function(p,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,p.record):!1});Y.a=w},gRFJ:function(N,Y,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(Y){var k=meta[Y];return typeof k=="string"?k:"\\u"+("0000"+Y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+N+'"'}function str(N,Y){var k,P,u,C,R=gap,h,s=Y[N];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(N)),typeof rep=="function"&&(s=rep.call(Y,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,h=[],Object.prototype.toString.apply(s)==="[object Array]"){for(C=s.length,k=0;k<C;k+=1)h[k]=str(k,s)||"null";return u=h.length===0?"[]":gap?`[
`+gap+h.join(`,
`+gap)+`
`+R+"]":"["+h.join(",")+"]",gap=R,u}if(rep&&typeof rep=="object")for(C=rep.length,k=0;k<C;k+=1)typeof rep[k]=="string"&&(P=rep[k],u=str(P,s),u&&h.push(quote(P)+(gap?": ":":")+u));else for(P in s)Object.prototype.hasOwnProperty.call(s,P)&&(u=str(P,s),u&&h.push(quote(P)+(gap?": ":":")+u));return u=h.length===0?"{}":gap?`{
`+gap+h.join(`,
`+gap)+`
`+R+"}":"{"+h.join(",")+"}",gap=R,u}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(N,Y,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=Y,Y&&typeof Y!="function"&&(typeof Y!="object"||typeof Y.length!="number"))throw new Error("JSON.stringify");return str("",{"":N})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(N,Y){var k,P,u=N[Y];if(u&&typeof u=="object")for(k in u)Object.prototype.hasOwnProperty.call(u,k)&&(P=walk(u,k),P!==void 0?u[k]=P:delete u[k]);return reviver.call(N,Y,u)}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,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.ECB=function(){var u=P.lib.BlockCipherMode.extend();return u.Encryptor=u.extend({processBlock:function(C,R){this._cipher.encryptBlock(C,R)}}),u.Decryptor=u.extend({processBlock:function(C,R){this._cipher.decryptBlock(C,R)}}),u}(),P.mode.ECB})},h78n:function(N,Y,k){"use strict";k.d(Y,"a",function(){return M});var P=k("q1tI"),u=k.n(P),C=k("TSYQ"),R=k.n(C),h={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=function(H){var z=H.map(function(){return Object(P.useRef)()}),B=Object(P.useRef)();return Object(P.useEffect)(function(){var W=Date.now(),F=!1;Object.keys(z).forEach(function($){var ee=z[$].current;if(!ee)return;F=!0;var Z=ee.style;Z.transitionDuration=".3s, .3s, .3s, .06s",B.current&&W-B.current<100&&(Z.transitionDuration="0s, 0s")}),F&&(B.current=Date.now())}),[z]};function S(){return S=Object.assign||function(K){for(var H=1;H<arguments.length;H++){var z=arguments[H];for(var B in z)Object.prototype.hasOwnProperty.call(z,B)&&(K[B]=z[B])}return K},S.apply(this,arguments)}function f(K,H){return g(K)||x(K,H)||o(K,H)||a()}function a(){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 o(K,H){if(!K)return;if(typeof K=="string")return r(K,H);var z=Object.prototype.toString.call(K).slice(8,-1);if(z==="Object"&&K.constructor&&(z=K.constructor.name),z==="Map"||z==="Set")return Array.from(K);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return r(K,H)}function r(K,H){(H==null||H>K.length)&&(H=K.length);for(var z=0,B=new Array(H);z<H;z++)B[z]=K[z];return B}function x(K,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],B=!0,W=!1,F=void 0;try{for(var $=K[Symbol.iterator](),ee;!(B=(ee=$.next()).done)&&!(z.push(ee.value),H&&z.length===H);B=!0);}catch(Z){W=!0,F=Z}finally{try{!B&&$.return!=null&&$.return()}finally{if(W)throw F}}return z}function g(K){if(Array.isArray(K))return K}function m(K,H){if(K==null)return{};var z=w(K,H),B,W;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(K);for(W=0;W<F.length;W++){if(B=F[W],H.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,B))continue;z[B]=K[B]}}return z}function w(K,H){if(K==null)return{};var z={},B=Object.keys(K),W,F;for(F=0;F<B.length;F++){if(W=B[F],H.indexOf(W)>=0)continue;z[W]=K[W]}return z}var p=function(H){var z=H.className,B=H.percent,W=H.prefixCls,F=H.strokeColor,$=H.strokeLinecap,ee=H.strokeWidth,Z=H.style,ve=H.trailColor,he=H.trailWidth,le=H.transition,Re=m(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var xe=Array.isArray(B)?B:[B],ie=Array.isArray(F)?F:[F],se=s(xe),re=f(se,1),be=re[0],q=ee/2,ne=100-ee/2,Te="M ".concat($==="round"?q:0,",").concat(q,`
L `).concat($==="round"?ne:100,",").concat(q),ae="0 0 100 ".concat(ee),J=0;return u.a.createElement("svg",S({className:R()("".concat(W,"-line"),z),viewBox:ae,preserveAspectRatio:"none",style:Z},Re),u.a.createElement("path",{className:"".concat(W,"-line-trail"),d:Te,strokeLinecap:$,stroke:ve,strokeWidth:he||ee,fillOpacity:"0"}),xe.map(function(X,Q){var pe={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:le||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ce=ie[Q]||ie[ie.length-1];return J+=X,u.a.createElement("path",{key:Q,className:"".concat(W,"-line-path"),d:Te,strokeLinecap:$,stroke:ce,strokeWidth:ee,fillOpacity:"0",ref:be[Q],style:pe})}))};p.defaultProps=h;var d=p;function n(){return n=Object.assign||function(K){for(var H=1;H<arguments.length;H++){var z=arguments[H];for(var B in z)Object.prototype.hasOwnProperty.call(z,B)&&(K[B]=z[B])}return K},n.apply(this,arguments)}function l(K,H){return L(K)||i(K,H)||T(K,H)||c()}function c(){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(K,H){if(!K)return;if(typeof K=="string")return v(K,H);var z=Object.prototype.toString.call(K).slice(8,-1);if(z==="Object"&&K.constructor&&(z=K.constructor.name),z==="Map"||z==="Set")return Array.from(K);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return v(K,H)}function v(K,H){(H==null||H>K.length)&&(H=K.length);for(var z=0,B=new Array(H);z<H;z++)B[z]=K[z];return B}function i(K,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],B=!0,W=!1,F=void 0;try{for(var $=K[Symbol.iterator](),ee;!(B=(ee=$.next()).done)&&!(z.push(ee.value),H&&z.length===H);B=!0);}catch(Z){W=!0,F=Z}finally{try{!B&&$.return!=null&&$.return()}finally{if(W)throw F}}return z}function L(K){if(Array.isArray(K))return K}function A(K,H){if(K==null)return{};var z=y(K,H),B,W;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(K);for(W=0;W<F.length;W++){if(B=F[W],H.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,B))continue;z[B]=K[B]}}return z}function y(K,H){if(K==null)return{};var z={},B=Object.keys(K),W,F;for(F=0;F<B.length;F++){if(W=B[F],H.indexOf(W)>=0)continue;z[W]=K[W]}return z}var E=0;function b(K){return+K.replace("%","")}function _(K){return Array.isArray(K)?K:[K]}function I(K,H,z,B){var W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,F=arguments.length>5?arguments[5]:void 0,$=50-B/2,ee=0,Z=-$,ve=0,he=-2*$;switch(F){case"left":ee=-$,Z=0,ve=2*$,he=0;break;case"right":ee=$,Z=0,ve=-2*$,he=0;break;case"bottom":Z=$,he=2*$;break;default:}var le="M 50,50 m ".concat(ee,",").concat(Z,`
a `).concat($,",").concat($," 0 1 1 ").concat(ve,",").concat(-he,`
a `).concat($,",").concat($," 0 1 1 ").concat(-ve,",").concat(he),Re=Math.PI*2*$,xe={stroke:z,strokeDasharray:"".concat(H/100*(Re-W),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(W/2+K/100*(Re-W),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:le,pathStyle:xe}}var j=function(H){var z=H.prefixCls,B=H.strokeWidth,W=H.trailWidth,F=H.gapDegree,$=H.gapPosition,ee=H.trailColor,Z=H.strokeLinecap,ve=H.style,he=H.className,le=H.strokeColor,Re=H.percent,xe=A(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ie=Object(P.useMemo)(function(){return E+=1,E},[]),se=I(0,100,ee,B,F,$),re=se.pathString,be=se.pathStyle,q=_(Re),ne=_(le),Te=ne.find(function(pe){return Object.prototype.toString.call(pe)==="[object Object]"}),ae=s(q),J=l(ae,1),X=J[0],Q=function(){var ce=0;return q.map(function(we,ze){var Ge=ne[ze]||ne[ne.length-1],Qe=Object.prototype.toString.call(Ge)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(ie,")"):"",$e=I(ce,we,Ge,B,F,$);return ce+=we,u.a.createElement("path",{key:ze,className:"".concat(z,"-circle-path"),d:$e.pathString,stroke:Qe,strokeLinecap:Z,strokeWidth:B,opacity:we===0?0:1,fillOpacity:"0",style:$e.pathStyle,ref:X[ze]})})};return u.a.createElement("svg",n({className:R()("".concat(z,"-circle"),he),viewBox:"0 0 100 100",style:ve},xe),Te&&u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(ie),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Te).sort(function(pe,ce){return b(pe)-b(ce)}).map(function(pe,ce){return u.a.createElement("stop",{key:ce,offset:pe,stopColor:Te[pe]})}))),u.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:re,stroke:ee,strokeLinecap:Z,strokeWidth:W||B,fillOpacity:"0",style:be}),Q().reverse())};j.defaultProps=h;var M=j,G={Line:d,Circle:M}},hW8S:function(N,Y,k){"use strict";k.d(Y,"a",function(){return R}),k.d(Y,"c",function(){return h}),k.d(Y,"b",function(){return s});var P=k("VTBJ"),u=k("Ff2n"),C=k("Kwbf"),R="RC_TABLE_INTERNAL_COL_DEFINE";function h(S){var f=S.expandable,a=Object(u.a)(S,["expandable"]);return"expandable"in S?Object(P.a)(Object(P.a)({},a),f):a}function s(S){return Object.keys(S).reduce(function(f,a){return(a.substr(0,5)==="data-"||a.substr(0,5)==="aria-")&&(f[a]=S[a]),f},{})}},i3hx:function(N,Y,k){},jO9C:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(u,C){u.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(u,C)},unpad:function(u){P.pad.ZeroPadding.unpad(u),u.sigBytes--}},P.pad.Iso97971})},je13:function(N,Y,k){var P=k("5nXd"),u=k("gRFJ"),C=[k("uQRt")];N.exports=P.createStore(u,C)},k3GJ:function(N,Y,k){"use strict";k.d(Y,"a",function(){return hn});var P=k("rePB"),u=k("ODXe"),C=k("Ff2n"),R=k("VTBJ"),h=k("q1tI"),s=k("TSYQ"),S=k.n(s),f=k("Zm9Q"),a=k("6cGi"),o=k("KQm4"),r=k("xEkU"),x=k.n(r),g=k("t23M");function m(Le){var Ue=Object(h.useRef)(),Ke=Object(h.useRef)(!1);function Pe(){for(var fe=arguments.length,Ae=new Array(fe),ge=0;ge<fe;ge++)Ae[ge]=arguments[ge];Ke.current||(x.a.cancel(Ue.current),Ue.current=x()(function(){Le.apply(void 0,Ae)}))}return Object(h.useEffect)(function(){return function(){Ke.current=!0,x.a.cancel(Ue.current)}},[]),Pe}function w(Le){var Ue=Object(h.useRef)([]),Ke=Object(h.useState)({}),Pe=Object(u.a)(Ke,2),fe=Pe[1],Ae=Object(h.useRef)(typeof Le=="function"?Le():Le),ge=m(function(){var Ne=Ae.current;Ue.current.forEach(function(We){Ne=We(Ne)}),Ue.current=[],Ae.current=Ne,fe({})});function ke(Ne){Ue.current.push(Ne),ge()}return[Ae.current,ke]}var p=k("4IlW");function d(Le,Ue){var Ke,Pe=Le.prefixCls,fe=Le.id,Ae=Le.active,ge=Le.rtl,ke=Le.tab,Ne=ke.key,We=ke.tab,Fe=ke.disabled,Ye=ke.closeIcon,at=Le.tabBarGutter,ct=Le.tabPosition,ut=Le.closable,gt=Le.renderWrapper,Mt=Le.removeAriaLabel,qt=Le.editable,er=Le.onClick,tr=Le.onRemove,lr=Le.onFocus,or="".concat(Pe,"-tab");h.useEffect(function(){return tr},[]);var rr={};ct==="top"||ct==="bottom"?rr[ge?"marginLeft":"marginRight"]=at:rr.marginBottom=at;var Or=qt&&ut!==!1&&!Fe;function gr(Ft){if(Fe)return;er(Ft)}function pn(Ft){Ft.preventDefault(),Ft.stopPropagation(),qt.onEdit("remove",{key:Ne,event:Ft})}var vr=h.createElement("div",{key:Ne,ref:Ue,className:S()(or,(Ke={},Object(P.a)(Ke,"".concat(or,"-with-remove"),Or),Object(P.a)(Ke,"".concat(or,"-active"),Ae),Object(P.a)(Ke,"".concat(or,"-disabled"),Fe),Ke)),style:rr,onClick:gr},h.createElement("div",{role:"tab","aria-selected":Ae,id:fe&&"".concat(fe,"-tab-").concat(Ne),className:"".concat(or,"-btn"),"aria-controls":fe&&"".concat(fe,"-panel-").concat(Ne),"aria-disabled":Fe,tabIndex:Fe?null:0,onClick:function(It){It.stopPropagation(),gr(It)},onKeyDown:function(It){[p.a.SPACE,p.a.ENTER].includes(It.which)&&(It.preventDefault(),gr(It))},onFocus:lr},We),Or&&h.createElement("button",{type:"button","aria-label":Mt||"remove",tabIndex:0,className:"".concat(or,"-remove"),onClick:function(It){It.stopPropagation(),pn(It)}},Ye||qt.removeIcon||"\xD7"));return gt&&(vr=gt(vr)),vr}var n=h.forwardRef(d),l={width:0,height:0,left:0,top:0};function c(Le,Ue,Ke){return Object(h.useMemo)(function(){for(var Pe,fe=new Map,Ae=Ue.get((Pe=Le[0])===null||Pe===void 0?void 0:Pe.key)||l,ge=Ae.left+Ae.width,ke=0;ke<Le.length;ke+=1){var Ne=Le[ke].key,We=Ue.get(Ne);if(!We){var Fe;We=Ue.get((Fe=Le[ke-1])===null||Fe===void 0?void 0:Fe.key)||l}var Ye=fe.get(Ne)||Object(R.a)({},We);Ye.right=ge-Ye.left-Ye.width,fe.set(Ne,Ye)}return fe},[Le.map(function(Pe){return Pe.key}).join("_"),Ue,Ke])}var T={width:0,height:0,left:0,top:0,right:0};function v(Le,Ue,Ke,Pe,fe){var Ae=fe.tabs,ge=fe.tabPosition,ke=fe.rtl,Ne,We,Fe;["top","bottom"].includes(ge)?(Ne="width",We=ke?"right":"left",Fe=Math.abs(Ue.left)):(Ne="height",We="top",Fe=-Ue.top);var Ye=Ue[Ne],at=Ke[Ne],ct=Pe[Ne],ut=Ye;return at+ct>Ye&&(ut=Ye-ct),Object(h.useMemo)(function(){if(!Ae.length)return[0,0];for(var gt=Ae.length,Mt=gt,qt=0;qt<gt;qt+=1){var er=Le.get(Ae[qt].key)||T;if(er[We]+er[Ne]>Fe+ut){Mt=qt-1;break}}for(var tr=0,lr=gt-1;lr>=0;lr-=1){var or=Le.get(Ae[lr].key)||T;if(or[We]<Fe){tr=lr+1;break}}return[tr,Mt]},[Le,Fe,ut,ge,Ae.map(function(gt){return gt.key}).join("_"),ke])}var i=k("wx14"),L=k("1OyB"),A=k("vuIU"),y=k("JX7q"),E=k("Ji7U"),b=k("LK+K"),_=k("I8Z2"),I=k("bT9E"),j=k("2GS6"),M=k("Gytx"),G=k.n(M),K=k("U8pU"),H=/iPhone/i,z=/iPod/i,B=/iPad/i,W=/\bAndroid(?:.+)Mobile\b/i,F=/Android/i,$=/\bAndroid(?:.+)SD4930UR\b/i,ee=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Z=/Windows Phone/i,ve=/\bWindows(?:.+)ARM\b/i,he=/BlackBerry/i,le=/BB10/i,Re=/Opera Mini/i,xe=/\b(CriOS|Chrome)(?:.+)Mobile/i,ie=/Mobile(?:.+)Firefox\b/i;function se(Le,Ue){return Le.test(Ue)}function re(Le){var Ue=Le||(typeof navigator!="undefined"?navigator.userAgent:""),Ke=(Ue||"").split("[FBAN");if(typeof Ke[1]!="undefined"){var Pe=Ke,fe=Object(u.a)(Pe,1);Ue=fe[0]}if(Ke=Ue.split("Twitter"),typeof Ke[1]!="undefined"){var Ae=Ke,ge=Object(u.a)(Ae,1);Ue=ge[0]}var ke={apple:{phone:se(H,Ue)&&!se(Z,Ue),ipod:se(z,Ue),tablet:!se(H,Ue)&&se(B,Ue)&&!se(Z,Ue),device:(se(H,Ue)||se(z,Ue)||se(B,Ue))&&!se(Z,Ue)},amazon:{phone:se($,Ue),tablet:!se($,Ue)&&se(ee,Ue),device:se($,Ue)||se(ee,Ue)},android:{phone:!se(Z,Ue)&&se($,Ue)||!se(Z,Ue)&&se(W,Ue),tablet:!se(Z,Ue)&&!se($,Ue)&&!se(W,Ue)&&(se(ee,Ue)||se(F,Ue)),device:!se(Z,Ue)&&(se($,Ue)||se(ee,Ue)||se(W,Ue)||se(F,Ue))||se(/\bokhttp\b/i,Ue)},windows:{phone:se(Z,Ue),tablet:se(ve,Ue),device:se(Z,Ue)||se(ve,Ue)},other:{blackberry:se(he,Ue),blackberry10:se(le,Ue),opera:se(Re,Ue),firefox:se(ie,Ue),chrome:se(xe,Ue),device:se(he,Ue)||se(le,Ue)||se(Re,Ue)||se(ie,Ue)||se(xe,Ue)},any:null,phone:null,tablet:null};return ke.any=ke.apple.device||ke.android.device||ke.windows.device||ke.other.device,ke.phone=ke.apple.phone||ke.android.phone||ke.windows.phone,ke.tablet=ke.apple.tablet||ke.android.tablet||ke.windows.tablet,ke}var be=Object(R.a)(Object(R.a)({},re()),{},{isMobile:re}),q=be;function ne(){}function Te(Le,Ue,Ke){var Pe=Ue||"";return Le.key||"".concat(Pe,"item_").concat(Ke)}function ae(Le){return"".concat(Le,"-menu-")}function J(Le,Ue){var Ke=-1;h.Children.forEach(Le,function(Pe){Ke+=1,Pe&&Pe.type&&Pe.type.isMenuItemGroup?h.Children.forEach(Pe.props.children,function(fe){Ke+=1,Ue(fe,Ke)}):Ue(Pe,Ke)})}function X(Le,Ue,Ke){if(!Le||Ke.find)return;h.Children.forEach(Le,function(Pe){if(Pe){var fe=Pe.type;if(!fe||!(fe.isSubMenu||fe.isMenuItem||fe.isMenuItemGroup))return;Ue.indexOf(Pe.key)!==-1?Ke.find=!0:Pe.props.children&&X(Pe.props.children,Ue,Ke)}})}var Q=["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"],pe=function(Ue){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=Ue&&typeof Ue.getBoundingClientRect=="function"&&Ue.getBoundingClientRect().width;if(Pe){if(Ke){var fe=getComputedStyle(Ue),Ae=fe.marginLeft,ge=fe.marginRight;Pe+=+Ae.replace("px","")+ +ge.replace("px","")}Pe=+Pe.toFixed(6)}return Pe||0},ce=function(Ue,Ke,Pe){Ue&&Object(K.a)(Ue.style)==="object"&&(Ue.style[Ke]=Pe)},we=function(){return q.any},ze=k("bdgK"),Ge=k("i8i4"),Qe=k.n(Ge),$e=k("wgJM"),rt=k("l4aY"),et=k("m+aA"),Me=k("c+Xe"),Ce=k("zT1h"),Ve=k("QC+M");function tt(Le,Ue,Ke){return Ke?Le[0]===Ue[0]:Le[0]===Ue[0]&&Le[1]===Ue[1]}function He(Le,Ue,Ke){var Pe=Le[Ue]||{};return Object(R.a)(Object(R.a)({},Pe),Ke)}function Je(Le,Ue,Ke,Pe){for(var fe=Ke.points,Ae=Object.keys(Le),ge=0;ge<Ae.length;ge+=1){var ke=Ae[ge];if(tt(Le[ke].points,fe,Pe))return"".concat(Ue,"-placement-").concat(ke)}return""}var _e=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Le=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(Le)||/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(Le==null?void 0:Le.substr(0,4)))},Se=k("MNnm");function Oe(Le,Ue){var Ke={};return Ke[Le.toLowerCase()]=Ue.toLowerCase(),Ke["Webkit".concat(Le)]="webkit".concat(Ue),Ke["Moz".concat(Le)]="moz".concat(Ue),Ke["ms".concat(Le)]="MS".concat(Ue),Ke["O".concat(Le)]="o".concat(Ue.toLowerCase()),Ke}function de(Le,Ue){var Ke={animationend:Oe("Animation","AnimationEnd"),transitionend:Oe("Transition","TransitionEnd")};return Le&&("AnimationEvent"in Ue||delete Ke.animationend.animation,"TransitionEvent"in Ue||delete Ke.transitionend.transition),Ke}var ye=de(Object(Se.a)(),typeof window!="undefined"?window:{}),Ee={};if(Object(Se.a)()){var De=document.createElement("div");Ee=De.style}var Be={};function Xe(Le){if(Be[Le])return Be[Le];var Ue=ye[Le];if(Ue)for(var Ke=Object.keys(Ue),Pe=Ke.length,fe=0;fe<Pe;fe+=1){var Ae=Ke[fe];if(Object.prototype.hasOwnProperty.call(Ue,Ae)&&Ae in Ee)return Be[Le]=Ue[Ae],Be[Le]}return""}var nt=Xe("animationend"),dt=Xe("transitionend"),Et=!!(nt&&dt),ft=nt||"animationend",jt=dt||"transitionend";function Ct(Le,Ue){if(!Le)return null;if(Object(K.a)(Le)==="object"){var Ke=Ue.replace(/-\w/g,function(Pe){return Pe[1].toUpperCase()});return Le[Ke]}return"".concat(Le,"-").concat(Ue)}var xt="none",Yt="appear",$t="enter",Vt="leave",xr="none",Lt="prepare",Er="start",fr="active",Wt="end";function Xt(Le){var Ue=Object(h.useRef)(!1),Ke=Object(h.useState)(Le),Pe=Object(u.a)(Ke,2),fe=Pe[0],Ae=Pe[1];function ge(ke){Ue.current||Ae(ke)}return Object(h.useEffect)(function(){return function(){Ue.current=!0}},[]),[fe,ge]}var $r=Object(Se.a)()?h.useLayoutEffect:h.useEffect,Tn=$r,wr=function(){var Le=h.useRef(null);function Ue(){$e.a.cancel(Le.current)}function Ke(Pe){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ue();var Ae=Object($e.a)(function(){fe<=1?Pe({isCanceled:function(){return Ae!==Le.current}}):Ke(Pe,fe-1)});Le.current=Ae}return h.useEffect(function(){return function(){Ue()}},[]),[Ke,Ue]},aa=[Lt,Er,fr,Wt],pt=!1,Tt=!0;function ht(Le){return Le===fr||Le===Wt}var Tr=function(Le,Ue){var Ke=h.useState(xr),Pe=Object(u.a)(Ke,2),fe=Pe[0],Ae=Pe[1],ge=wr(),ke=Object(u.a)(ge,2),Ne=ke[0],We=ke[1];function Fe(){Ae(Lt)}return Tn(function(){if(fe!==xr&&fe!==Wt){var Ye=aa.indexOf(fe),at=aa[Ye+1],ct=Ue(fe);ct===pt?Ae(at):Ne(function(ut){function gt(){if(ut.isCanceled())return;Ae(at)}ct===!0?gt():Promise.resolve(ct).then(gt)})}},[Le,fe]),h.useEffect(function(){return function(){We()}},[]),[Fe,fe]},Rr=function(Le){var Ue=Object(h.useRef)(),Ke=Object(h.useRef)(Le);Ke.current=Le;var Pe=h.useCallback(function(ge){Ke.current(ge)},[]);function fe(ge){ge&&(ge.removeEventListener(jt,Pe),ge.removeEventListener(ft,Pe))}function Ae(ge){Ue.current&&Ue.current!==ge&&fe(Ue.current),ge&&ge!==Ue.current&&(ge.addEventListener(jt,Pe),ge.addEventListener(ft,Pe),Ue.current=ge)}return h.useEffect(function(){return function(){fe(Ue.current)}},[]),[Ae,fe]};function Pt(Le,Ue,Ke,Pe){var fe=Pe.motionEnter,Ae=fe===void 0?!0:fe,ge=Pe.motionAppear,ke=ge===void 0?!0:ge,Ne=Pe.motionLeave,We=Ne===void 0?!0:Ne,Fe=Pe.motionDeadline,Ye=Pe.motionLeaveImmediately,at=Pe.onAppearPrepare,ct=Pe.onEnterPrepare,ut=Pe.onLeavePrepare,gt=Pe.onAppearStart,Mt=Pe.onEnterStart,qt=Pe.onLeaveStart,er=Pe.onAppearActive,tr=Pe.onEnterActive,lr=Pe.onLeaveActive,or=Pe.onAppearEnd,rr=Pe.onEnterEnd,Or=Pe.onLeaveEnd,gr=Pe.onVisibleChanged,pn=Xt(),vr=Object(u.a)(pn,2),Ft=vr[0],It=vr[1],yr=Xt(xt),Ar=Object(u.a)(yr,2),Dt=Ar[0],Dr=Ar[1],mn=Xt(null),Nr=Object(u.a)(mn,2),Qr=Nr[0],Vr=Nr[1],An=Object(h.useRef)(!1),zn=Object(h.useRef)(null),bn=Object(h.useRef)(!1),oa=Object(h.useRef)(null);function Oa(){var nn=Ke();return nn||oa.current}var da=Object(h.useRef)(!1);function Gn(nn){var Kr=Oa();if(nn&&!nn.deadline&&nn.target!==Kr)return;var Xn;Dt===Yt&&da.current?Xn=or==null?void 0:or(Kr,nn):Dt===$t&&da.current?Xn=rr==null?void 0:rr(Kr,nn):Dt===Vt&&da.current&&(Xn=Or==null?void 0:Or(Kr,nn)),Xn!==!1&&!bn.current&&(Dr(xt),Vr(null))}var sn=Rr(Gn),Zr=Object(u.a)(sn,1),xn=Zr[0],gn=h.useMemo(function(){var nn,Kr,Xn;switch(Dt){case"appear":return nn={},Object(P.a)(nn,Lt,at),Object(P.a)(nn,Er,gt),Object(P.a)(nn,fr,er),nn;case"enter":return Kr={},Object(P.a)(Kr,Lt,ct),Object(P.a)(Kr,Er,Mt),Object(P.a)(Kr,fr,tr),Kr;case"leave":return Xn={},Object(P.a)(Xn,Lt,ut),Object(P.a)(Xn,Er,qt),Object(P.a)(Xn,fr,lr),Xn;default:return{}}},[Dt]),Aa=Tr(Dt,function(nn){if(nn===Lt){var Kr=gn[Lt];return Kr?Kr(Oa()):pt}if(Yr in gn){var Xn;Vr(((Xn=gn[Yr])===null||Xn===void 0?void 0:Xn.call(gn,Oa(),null))||null)}return Yr===fr&&(xn(Oa()),Fe>0&&(clearTimeout(zn.current),zn.current=setTimeout(function(){Gn({deadline:!0})},Fe))),Tt}),$a=Object(u.a)(Aa,2),Ja=$a[0],Yr=$a[1],Fa=ht(Yr);da.current=Fa,Tn(function(){It(Ue);var nn=An.current;if(An.current=!0,!Le)return;var Kr;!nn&&Ue&&ke&&(Kr=Yt),nn&&Ue&&Ae&&(Kr=$t),(nn&&!Ue&&We||!nn&&Ye&&!Ue&&We)&&(Kr=Vt),Kr&&(Dr(Kr),Ja())},[Ue]),Object(h.useEffect)(function(){(Dt===Yt&&!ke||Dt===$t&&!Ae||Dt===Vt&&!We)&&Dr(xt)},[ke,Ae,We]),Object(h.useEffect)(function(){return function(){clearTimeout(zn.current),bn.current=!0}},[]),Object(h.useEffect)(function(){Ft!==void 0&&Dt===xt&&(gr==null||gr(Ft))},[Ft,Dt]);var Qa=Qr;return gn[Lt]&&Yr===Er&&(Qa=Object(R.a)({transition:"none"},Qa)),[Dt,Yr,Qa,Ft!=null?Ft:Ue]}var _t=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){return Object(L.a)(this,Ke),Ue.apply(this,arguments)}return Object(A.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(h.Component),Lr=_t;function cn(Le){var Ue=Le;Object(K.a)(Le)==="object"&&(Ue=Le.transitionSupport);function Ke(fe){return!!(fe.motionName&&Ue)}var Pe=h.forwardRef(function(fe,Ae){var ge=fe.visible,ke=ge===void 0?!0:ge,Ne=fe.removeOnLeave,We=Ne===void 0?!0:Ne,Fe=fe.forceRender,Ye=fe.children,at=fe.motionName,ct=fe.leavedClassName,ut=fe.eventProps,gt=Ke(fe),Mt=Object(h.useRef)(),qt=Object(h.useRef)();function er(){try{return Object(et.a)(Mt.current||qt.current)}catch(Dr){return null}}var tr=Pt(gt,ke,er,fe),lr=Object(u.a)(tr,4),or=lr[0],rr=lr[1],Or=lr[2],gr=lr[3],pn=h.useRef(gr);gr&&(pn.current=!0);var vr=Object(h.useRef)(Ae);vr.current=Ae;var Ft=h.useCallback(function(Dr){Mt.current=Dr,Object(Me.b)(vr.current,Dr)},[]),It,yr=Object(R.a)(Object(R.a)({},ut),{},{visible:ke});if(!Ye)It=null;else if(or===xt||!Ke(fe))gr?It=Ye(Object(R.a)({},yr),Ft):!We&&pn.current?It=Ye(Object(R.a)(Object(R.a)({},yr),{},{className:ct}),Ft):Fe?It=Ye(Object(R.a)(Object(R.a)({},yr),{},{style:{display:"none"}}),Ft):It=null;else{var Ar,Dt;rr===Lt?Dt="prepare":ht(rr)?Dt="active":rr===Er&&(Dt="start"),It=Ye(Object(R.a)(Object(R.a)({},yr),{},{className:S()(Ct(at,or),(Ar={},Object(P.a)(Ar,Ct(at,"".concat(or,"-").concat(Dt)),Dt),Object(P.a)(Ar,at,typeof at=="string"),Ar)),style:Or}),Ft)}return h.createElement(Lr,{ref:qt},It)});return Pe.displayName="CSSMotion",Pe}var Mr=cn(Et),ot="add",Ot="keep",lt="remove",un="removed";function Sn(Le){var Ue;return Le&&Object(K.a)(Le)==="object"&&"key"in Le?Ue=Le:Ue={key:Le},Object(R.a)(Object(R.a)({},Ue),{},{key:String(Ue.key)})}function dn(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Le.map(Sn)}function jr(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],Pe=0,fe=Ue.length,Ae=dn(Le),ge=dn(Ue);Ae.forEach(function(We){for(var Fe=!1,Ye=Pe;Ye<fe;Ye+=1){var at=ge[Ye];if(at.key===We.key){Pe<Ye&&(Ke=Ke.concat(ge.slice(Pe,Ye).map(function(ct){return Object(R.a)(Object(R.a)({},ct),{},{status:ot})})),Pe=Ye),Ke.push(Object(R.a)(Object(R.a)({},at),{},{status:Ot})),Pe+=1,Fe=!0;break}}Fe||Ke.push(Object(R.a)(Object(R.a)({},We),{},{status:lt}))}),Pe<fe&&(Ke=Ke.concat(ge.slice(Pe).map(function(We){return Object(R.a)(Object(R.a)({},We),{},{status:ot})})));var ke={};Ke.forEach(function(We){var Fe=We.key;ke[Fe]=(ke[Fe]||0)+1});var Ne=Object.keys(ke).filter(function(We){return ke[We]>1});return Ne.forEach(function(We){Ke=Ke.filter(function(Fe){var Ye=Fe.key,at=Fe.status;return Ye!==We||at!==lt}),Ke.forEach(function(Fe){Fe.key===We&&(Fe.status=Ot)})}),Ke}var wt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function fn(Le){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr,Ke=function(Pe){Object(E.a)(Ae,Pe);var fe=Object(b.a)(Ae);function Ae(){var ge;return Object(L.a)(this,Ae),ge=fe.apply(this,arguments),ge.state={keyEntities:[]},ge.removeKey=function(ke){ge.setState(function(Ne){var We=Ne.keyEntities;return{keyEntities:We.map(function(Fe){return Fe.key!==ke?Fe:Object(R.a)(Object(R.a)({},Fe),{},{status:un})})}})},ge}return Object(A.a)(Ae,[{key:"render",value:function(){var ke=this,Ne=this.state.keyEntities,We=this.props,Fe=We.component,Ye=We.children,at=We.onVisibleChanged,ct=Object(C.a)(We,["component","children","onVisibleChanged"]),ut=Fe||h.Fragment,gt={};return wt.forEach(function(Mt){gt[Mt]=ct[Mt],delete ct[Mt]}),delete ct.keys,h.createElement(ut,ct,Ne.map(function(Mt){var qt=Mt.status,er=Object(C.a)(Mt,["status"]),tr=qt===ot||qt===Ot;return h.createElement(Ue,Object(i.a)({},gt,{key:er.key,visible:tr,eventProps:er,onVisibleChanged:function(or){at==null||at(or,{key:er.key}),or||ke.removeKey(er.key)}}),Ye)}))}}],[{key:"getDerivedStateFromProps",value:function(ke,Ne){var We=ke.keys,Fe=Ne.keyEntities,Ye=dn(We),at=jr(Fe,Ye);return{keyEntities:at.filter(function(ct){var ut=Fe.find(function(gt){var Mt=gt.key;return ct.key===Mt});return!(ut&&ut.status===un&&ct.status===lt)})}}}]),Ae}(h.Component);return Ke.defaultProps={component:"div"},Ke}var Fr=fn(Et),sr=Mr;function nr(Le){var Ue=Le.prefixCls,Ke=Le.motion,Pe=Le.animation,fe=Le.transitionName;return Ke||(Pe?{motionName:"".concat(Ue,"-").concat(Pe)}:fe?{motionName:fe}:null)}function qn(Le){var Ue=Le.prefixCls,Ke=Le.visible,Pe=Le.zIndex,fe=Le.mask,Ae=Le.maskMotion,ge=Le.maskAnimation,ke=Le.maskTransitionName;if(!fe)return null;var Ne={};return(Ae||ke||ge)&&(Ne=Object(R.a)({motionAppear:!0},nr({motion:Ae,prefixCls:Ue,transitionName:ke,animation:ge}))),h.createElement(sr,Object(i.a)({},Ne,{visible:Ke,removeOnLeave:!0}),function(We){var Fe=We.className;return h.createElement("div",{style:{zIndex:Pe},className:S()("".concat(Ue,"-mask"),Fe)})})}var Rn=k("9mu1"),an=k("o0o1"),ea=k.n(an),ta=k("HaE+"),Cn=["measure","align",null,"motion"],Sr=function(Le,Ue){var Ke=Object(h.useState)(null),Pe=Object(u.a)(Ke,2),fe=Pe[0],Ae=Pe[1],ge=Object(h.useRef)(),ke=Object(h.useRef)(!1);function Ne(Ye){ke.current||Ae(Ye)}function We(){$e.a.cancel(ge.current)}function Fe(Ye){We(),ge.current=Object($e.a)(function(){Ne(function(at){switch(fe){case"align":return"motion";case"motion":return"stable";default:}return at}),Ye==null||Ye()})}return Object(h.useEffect)(function(){Ne("measure")},[Le]),Object(h.useEffect)(function(){switch(fe){case"measure":Ue();break;default:}fe&&(ge.current=Object($e.a)(Object(ta.a)(ea.a.mark(function Ye(){var at,ct;return ea.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:at=Cn.indexOf(fe),ct=Cn[at+1],ct&&at!==-1&&Ne(ct);case 3:case"end":return gt.stop()}},Ye)}))))},[fe]),Object(h.useEffect)(function(){return function(){ke.current=!0,We()}},[]),[fe,Fe]},Ln=function(Le){var Ue=h.useState({width:0,height:0}),Ke=Object(u.a)(Ue,2),Pe=Ke[0],fe=Ke[1];function Ae(ke){fe({width:ke.offsetWidth,height:ke.offsetHeight})}var ge=h.useMemo(function(){var ke={};if(Le){var Ne=Pe.width,We=Pe.height;Le.indexOf("height")!==-1&&We?ke.height=We:Le.indexOf("minHeight")!==-1&&We&&(ke.minHeight=We),Le.indexOf("width")!==-1&&Ne?ke.width=Ne:Le.indexOf("minWidth")!==-1&&Ne&&(ke.minWidth=Ne)}return ke},[Le,Pe]);return[ge,Ae]},vn=h.forwardRef(function(Le,Ue){var Ke=Le.visible,Pe=Le.prefixCls,fe=Le.className,Ae=Le.style,ge=Le.children,ke=Le.zIndex,Ne=Le.stretch,We=Le.destroyPopupOnHide,Fe=Le.forceRender,Ye=Le.align,at=Le.point,ct=Le.getRootDomNode,ut=Le.getClassNameFromAlign,gt=Le.onAlign,Mt=Le.onMouseEnter,qt=Le.onMouseLeave,er=Le.onMouseDown,tr=Le.onTouchStart,lr=Object(h.useRef)(),or=Object(h.useRef)(),rr=Object(h.useState)(),Or=Object(u.a)(rr,2),gr=Or[0],pn=Or[1],vr=Ln(Ne),Ft=Object(u.a)(vr,2),It=Ft[0],yr=Ft[1];function Ar(){Ne&&yr(ct())}var Dt=Sr(Ke,Ar),Dr=Object(u.a)(Dt,2),mn=Dr[0],Nr=Dr[1],Qr=Object(h.useRef)();function Vr(){return at||ct}function An(){var sn;(sn=lr.current)===null||sn===void 0||sn.forceAlign()}function zn(sn,Zr){var xn=ut(Zr);gr!==xn&&pn(xn),mn==="align"&&(gr!==xn?Promise.resolve().then(function(){An()}):Nr(function(){var gn;(gn=Qr.current)===null||gn===void 0||gn.call(Qr)}),gt==null||gt(sn,Zr))}var bn=Object(R.a)({},nr(Le));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(sn){var Zr=bn[sn];bn[sn]=function(xn,gn){return Nr(),Zr==null?void 0:Zr(xn,gn)}});function oa(){return new Promise(function(sn){Qr.current=sn})}h.useEffect(function(){!bn.motionName&&mn==="motion"&&Nr()},[bn.motionName,mn]),h.useImperativeHandle(Ue,function(){return{forceAlign:An,getElement:function(){return or.current}}});var Oa=Object(R.a)(Object(R.a)({},It),{},{zIndex:ke,opacity:mn==="motion"||mn==="stable"||!Ke?void 0:0,pointerEvents:mn==="stable"?void 0:"none"},Ae),da=!0;(Ye==null?void 0:Ye.points)&&(mn==="align"||mn==="stable")&&(da=!1);var Gn=ge;return h.Children.count(ge)>1&&(Gn=h.createElement("div",{className:"".concat(Pe,"-content")},ge)),h.createElement(sr,Object(i.a)({visible:Ke,ref:or,leavedClassName:"".concat(Pe,"-hidden")},bn,{onAppearPrepare:oa,onEnterPrepare:oa,removeOnLeave:We,forceRender:Fe}),function(sn,Zr){var xn=sn.className,gn=sn.style,Aa=S()(Pe,fe,gr,xn);return h.createElement(Rn.a,{target:Vr(),key:"popup",ref:lr,monitorWindowResize:!0,disabled:da,align:Ye,onAlign:zn},h.createElement("div",{ref:Zr,className:Aa,onMouseEnter:Mt,onMouseLeave:qt,onMouseDownCapture:er,onTouchStartCapture:tr,style:Object(R.a)(Object(R.a)({},gn),Oa)},Gn))})});vn.displayName="PopupInner";var on=vn,Jt=h.forwardRef(function(Le,Ue){var Ke=Le.prefixCls,Pe=Le.visible,fe=Le.zIndex,Ae=Le.children,ge=Le.mobile;ge=ge===void 0?{}:ge;var ke=ge.popupClassName,Ne=ge.popupStyle,We=ge.popupMotion,Fe=We===void 0?{}:We,Ye=ge.popupRender,at=h.useRef();h.useImperativeHandle(Ue,function(){return{forceAlign:function(){},getElement:function(){return at.current}}});var ct=Object(R.a)({zIndex:fe},Ne),ut=Ae;return h.Children.count(Ae)>1&&(ut=h.createElement("div",{className:"".concat(Ke,"-content")},Ae)),Ye&&(ut=Ye(ut)),h.createElement(sr,Object(i.a)({visible:Pe,ref:at,removeOnLeave:!0},Fe),function(gt,Mt){var qt=gt.className,er=gt.style,tr=S()(Ke,ke,qt);return h.createElement("div",{ref:Mt,className:tr,style:Object(R.a)(Object(R.a)({},er),ct)},ut)})});Jt.displayName="MobilePopupInner";var zr=Jt,Gt=["visible","mobile"],kt=h.forwardRef(function(Le,Ue){var Ke=Le.visible,Pe=Le.mobile,fe=Object(C.a)(Le,Gt),Ae=Object(h.useState)(Ke),ge=Object(u.a)(Ae,2),ke=ge[0],Ne=ge[1],We=Object(h.useState)(!1),Fe=Object(u.a)(We,2),Ye=Fe[0],at=Fe[1],ct=Object(R.a)(Object(R.a)({},fe),{},{visible:ke});Object(h.useEffect)(function(){Ne(Ke),Ke&&Pe&&at(_e())},[Ke,Pe]);var ut=Ye?h.createElement(zr,Object(i.a)({},ct,{mobile:Pe,ref:Ue})):h.createElement(on,Object(i.a)({},ct,{ref:Ue}));return h.createElement("div",null,h.createElement(qn,ct),ut)});kt.displayName="Popup";var Qt=kt,hr=h.createContext(null),Ir=hr;function Jr(){}function Mn(){return""}function Ba(Le){return Le?Le.ownerDocument:window.document}var wa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ma(Le){var Ue=function(Ke){Object(E.a)(fe,Ke);var Pe=Object(b.a)(fe);function fe(Ae){var ge;Object(L.a)(this,fe),ge=Pe.call(this,Ae),ge.popupRef=h.createRef(),ge.triggerRef=h.createRef(),ge.attachId=void 0,ge.clickOutsideHandler=void 0,ge.touchOutsideHandler=void 0,ge.contextMenuOutsideHandler1=void 0,ge.contextMenuOutsideHandler2=void 0,ge.mouseDownTimeout=void 0,ge.focusTime=void 0,ge.preClickTime=void 0,ge.preTouchTime=void 0,ge.delayTimer=void 0,ge.hasPopupMouseDown=void 0,ge.onMouseEnter=function(Ne){var We=ge.props.mouseEnterDelay;ge.fireEvents("onMouseEnter",Ne),ge.delaySetPopupVisible(!0,We,We?null:Ne)},ge.onMouseMove=function(Ne){ge.fireEvents("onMouseMove",Ne),ge.setPoint(Ne)},ge.onMouseLeave=function(Ne){ge.fireEvents("onMouseLeave",Ne),ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onPopupMouseEnter=function(){ge.clearDelayTimer()},ge.onPopupMouseLeave=function(Ne){var We;if(Ne.relatedTarget&&!Ne.relatedTarget.setTimeout&&Object(rt.a)((We=ge.popupRef.current)===null||We===void 0?void 0:We.getElement(),Ne.relatedTarget))return;ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onFocus=function(Ne){ge.fireEvents("onFocus",Ne),ge.clearDelayTimer(),ge.isFocusToShow()&&(ge.focusTime=Date.now(),ge.delaySetPopupVisible(!0,ge.props.focusDelay))},ge.onMouseDown=function(Ne){ge.fireEvents("onMouseDown",Ne),ge.preClickTime=Date.now()},ge.onTouchStart=function(Ne){ge.fireEvents("onTouchStart",Ne),ge.preTouchTime=Date.now()},ge.onBlur=function(Ne){ge.fireEvents("onBlur",Ne),ge.clearDelayTimer(),ge.isBlurToHide()&&ge.delaySetPopupVisible(!1,ge.props.blurDelay)},ge.onContextMenu=function(Ne){Ne.preventDefault(),ge.fireEvents("onContextMenu",Ne),ge.setPopupVisible(!0,Ne)},ge.onContextMenuClose=function(){ge.isContextMenuToShow()&&ge.close()},ge.onClick=function(Ne){if(ge.fireEvents("onClick",Ne),ge.focusTime){var We;if(ge.preClickTime&&ge.preTouchTime?We=Math.min(ge.preClickTime,ge.preTouchTime):ge.preClickTime?We=ge.preClickTime:ge.preTouchTime&&(We=ge.preTouchTime),Math.abs(We-ge.focusTime)<20)return;ge.focusTime=0}ge.preClickTime=0,ge.preTouchTime=0,ge.isClickToShow()&&(ge.isClickToHide()||ge.isBlurToHide())&&Ne&&Ne.preventDefault&&Ne.preventDefault();var Fe=!ge.state.popupVisible;(ge.isClickToHide()&&!Fe||Fe&&ge.isClickToShow())&&ge.setPopupVisible(!ge.state.popupVisible,Ne)},ge.onPopupMouseDown=function(){if(ge.hasPopupMouseDown=!0,clearTimeout(ge.mouseDownTimeout),ge.mouseDownTimeout=window.setTimeout(function(){ge.hasPopupMouseDown=!1},0),ge.context){var Ne;(Ne=ge.context).onPopupMouseDown.apply(Ne,arguments)}},ge.onDocumentClick=function(Ne){if(ge.props.mask&&!ge.props.maskClosable)return;var We=Ne.target,Fe=ge.getRootDomNode(),Ye=ge.getPopupDomNode();(!Object(rt.a)(Fe,We)||ge.isContextMenuOnly())&&!Object(rt.a)(Ye,We)&&!ge.hasPopupMouseDown&&ge.close()},ge.getRootDomNode=function(){var Ne=ge.props.getTriggerDOMNode;if(Ne)return Ne(ge.triggerRef.current);try{var We=Object(et.a)(ge.triggerRef.current);if(We)return We}catch(Fe){}return Qe.a.findDOMNode(Object(y.a)(ge))},ge.getPopupClassNameFromAlign=function(Ne){var We=[],Fe=ge.props,Ye=Fe.popupPlacement,at=Fe.builtinPlacements,ct=Fe.prefixCls,ut=Fe.alignPoint,gt=Fe.getPopupClassNameFromAlign;return Ye&&at&&We.push(Je(at,ct,Ne,ut)),gt&&We.push(gt(Ne)),We.join(" ")},ge.getComponent=function(){var Ne=ge.props,We=Ne.prefixCls,Fe=Ne.destroyPopupOnHide,Ye=Ne.popupClassName,at=Ne.onPopupAlign,ct=Ne.popupMotion,ut=Ne.popupAnimation,gt=Ne.popupTransitionName,Mt=Ne.popupStyle,qt=Ne.mask,er=Ne.maskAnimation,tr=Ne.maskTransitionName,lr=Ne.maskMotion,or=Ne.zIndex,rr=Ne.popup,Or=Ne.stretch,gr=Ne.alignPoint,pn=Ne.mobile,vr=Ne.forceRender,Ft=ge.state,It=Ft.popupVisible,yr=Ft.point,Ar=ge.getPopupAlign(),Dt={};return ge.isMouseEnterToShow()&&(Dt.onMouseEnter=ge.onPopupMouseEnter),ge.isMouseLeaveToHide()&&(Dt.onMouseLeave=ge.onPopupMouseLeave),Dt.onMouseDown=ge.onPopupMouseDown,Dt.onTouchStart=ge.onPopupMouseDown,h.createElement(Qt,Object(i.a)({prefixCls:We,destroyPopupOnHide:Fe,visible:It,point:gr&&yr,className:Ye,align:Ar,onAlign:at,animation:ut,getClassNameFromAlign:ge.getPopupClassNameFromAlign},Dt,{stretch:Or,getRootDomNode:ge.getRootDomNode,style:Mt,mask:qt,zIndex:or,transitionName:gt,maskAnimation:er,maskTransitionName:tr,maskMotion:lr,ref:ge.popupRef,motion:ct,mobile:pn,forceRender:vr}),typeof rr=="function"?rr():rr)},ge.attachParent=function(Ne){$e.a.cancel(ge.attachId);var We=ge.props,Fe=We.getPopupContainer,Ye=We.getDocument,at=ge.getRootDomNode(),ct;Fe?(at||Fe.length===0)&&(ct=Fe(at)):ct=Ye(ge.getRootDomNode()).body,ct?ct.appendChild(Ne):ge.attachId=Object($e.a)(function(){ge.attachParent(Ne)})},ge.getContainer=function(){var Ne=ge.props.getDocument,We=Ne(ge.getRootDomNode()).createElement("div");return We.style.position="absolute",We.style.top="0",We.style.left="0",We.style.width="100%",ge.attachParent(We),We},ge.setPoint=function(Ne){var We=ge.props.alignPoint;if(!We||!Ne)return;ge.setState({point:{pageX:Ne.pageX,pageY:Ne.pageY}})},ge.handlePortalUpdate=function(){ge.state.prevPopupVisible!==ge.state.popupVisible&&ge.props.afterPopupVisibleChange(ge.state.popupVisible)},ge.triggerContextValue={onPopupMouseDown:ge.onPopupMouseDown};var ke;return"popupVisible"in Ae?ke=!!Ae.popupVisible:ke=!!Ae.defaultPopupVisible,ge.state={prevPopupVisible:ke,popupVisible:ke},wa.forEach(function(Ne){ge["fire".concat(Ne)]=function(We){ge.fireEvents(Ne,We)}}),ge}return Object(A.a)(fe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ge=this.props,ke=this.state;if(ke.popupVisible){var Ne;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ne=ge.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(Ne,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ne=Ne||ge.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(Ne,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ne=Ne||ge.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ce.a)(Ne,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ce.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),$e.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ge;return((ge=this.popupRef.current)===null||ge===void 0?void 0:ge.getElement())||null}},{key:"getPopupAlign",value:function(){var ge=this.props,ke=ge.popupPlacement,Ne=ge.popupAlign,We=ge.builtinPlacements;return ke&&We?He(We,ke,Ne):Ne}},{key:"setPopupVisible",value:function(ge,ke){var Ne=this.props.alignPoint,We=this.state.popupVisible;this.clearDelayTimer(),We!==ge&&("popupVisible"in this.props||this.setState({popupVisible:ge,prevPopupVisible:We}),this.props.onPopupVisibleChange(ge)),Ne&&ke&&ge&&this.setPoint(ke)}},{key:"delaySetPopupVisible",value:function(ge,ke,Ne){var We=this,Fe=ke*1e3;if(this.clearDelayTimer(),Fe){var Ye=Ne?{pageX:Ne.pageX,pageY:Ne.pageY}:null;this.delayTimer=window.setTimeout(function(){We.setPopupVisible(ge,Ye),We.clearDelayTimer()},Fe)}else this.setPopupVisible(ge,Ne)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(ge){var ke=this.props.children.props,Ne=this.props;return ke[ge]&&Ne[ge]?this["fire".concat(ge)]:ke[ge]||Ne[ge]}},{key:"isClickToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ge=this.props.action;return ge==="contextMenu"||ge.length===1&&ge[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("contextMenu")!==-1||Ne.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ge=this.props,ke=ge.action,Ne=ge.hideAction;return ke.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("hover")!==-1||Ne.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ge=this.props,ke=ge.action,Ne=ge.hideAction;return ke.indexOf("hover")!==-1||Ne.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("focus")!==-1||Ne.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ge=this.props,ke=ge.action,Ne=ge.hideAction;return ke.indexOf("focus")!==-1||Ne.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ge;(ge=this.popupRef.current)===null||ge===void 0||ge.forceAlign()}}},{key:"fireEvents",value:function(ge,ke){var Ne=this.props.children.props[ge];Ne&&Ne(ke);var We=this.props[ge];We&&We(ke)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ge=this.state.popupVisible,ke=this.props,Ne=ke.children,We=ke.forceRender,Fe=ke.alignPoint,Ye=ke.className,at=ke.autoDestroy,ct=h.Children.only(Ne),ut={key:"trigger"};this.isContextMenuToShow()?ut.onContextMenu=this.onContextMenu:ut.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(ut.onClick=this.onClick,ut.onMouseDown=this.onMouseDown,ut.onTouchStart=this.onTouchStart):(ut.onClick=this.createTwoChains("onClick"),ut.onMouseDown=this.createTwoChains("onMouseDown"),ut.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(ut.onMouseEnter=this.onMouseEnter,Fe&&(ut.onMouseMove=this.onMouseMove)):ut.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?ut.onMouseLeave=this.onMouseLeave:ut.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(ut.onFocus=this.onFocus,ut.onBlur=this.onBlur):(ut.onFocus=this.createTwoChains("onFocus"),ut.onBlur=this.createTwoChains("onBlur"));var gt=S()(ct&&ct.props&&ct.props.className,Ye);gt&&(ut.className=gt);var Mt=Object(R.a)({},ut);Object(Me.c)(ct)&&(Mt.ref=Object(Me.a)(this.triggerRef,ct.ref));var qt=h.cloneElement(ct,Mt),er;return(ge||this.popupRef.current||We)&&(er=h.createElement(Le,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ge&&at&&(er=null),h.createElement(Ir.Provider,{value:this.triggerContextValue},qt,er)}}],[{key:"getDerivedStateFromProps",value:function(ge,ke){var Ne=ge.popupVisible,We={};return Ne!==void 0&&ke.popupVisible!==Ne&&(We.popupVisible=Ne,We.prevPopupVisible=ke.popupVisible),We}}]),fe}(h.Component);return Ue.contextType=Ir,Ue.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Mn,getDocument:Ba,onPopupVisibleChange:Jr,afterPopupVisibleChange:Jr,onPopupAlign:Jr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ue}var ia=Ma(Ve.a),en={adjustX:1,adjustY:1},Pa={topLeft:{points:["bl","tl"],overflow:en,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:en,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:en,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:en,offset:[4,0]}},Hr={topLeft:{points:["bl","tl"],overflow:en,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:en,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:en,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:en,offset:[4,0]}},Wn=Pa,jn=0,Gr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_n=function(Ue,Ke,Pe){var fe=ae(Ke),Ae=Ue.getState();Ue.setState({defaultActiveFirst:Object(R.a)(Object(R.a)({},Ae.defaultActiveFirst),{},Object(P.a)({},fe,Pe))})},ka=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(Pe){var fe;Object(L.a)(this,Ke),fe=Ue.call(this,Pe),fe.onDestroy=function(Fe){fe.props.onDestroy(Fe)},fe.onKeyDown=function(Fe){var Ye=Fe.keyCode,at=fe.menuInstance,ct=fe.props.store,ut=fe.getVisible();if(Ye===p.a.ENTER)return fe.onTitleClick(Fe),_n(ct,fe.props.eventKey,!0),!0;if(Ye===p.a.RIGHT)return ut?at.onKeyDown(Fe):(fe.triggerOpenChange(!0),_n(ct,fe.props.eventKey,!0)),!0;if(Ye===p.a.LEFT){var gt;if(ut)gt=at.onKeyDown(Fe);else return;return gt||(fe.triggerOpenChange(!1),gt=!0),gt}return ut&&(Ye===p.a.UP||Ye===p.a.DOWN)?at.onKeyDown(Fe):void 0},fe.onOpenChange=function(Fe){fe.props.onOpenChange(Fe)},fe.onPopupVisibleChange=function(Fe){fe.triggerOpenChange(Fe,Fe?"mouseenter":"mouseleave")},fe.onMouseEnter=function(Fe){var Ye=fe.props,at=Ye.eventKey,ct=Ye.onMouseEnter,ut=Ye.store;_n(ut,fe.props.eventKey,!1),ct({key:at,domEvent:Fe})},fe.onMouseLeave=function(Fe){var Ye=fe.props,at=Ye.parentMenu,ct=Ye.eventKey,ut=Ye.onMouseLeave;at.subMenuInstance=Object(y.a)(fe),ut({key:ct,domEvent:Fe})},fe.onTitleMouseEnter=function(Fe){var Ye=fe.props,at=Ye.eventKey,ct=Ye.onItemHover,ut=Ye.onTitleMouseEnter;ct({key:at,hover:!0}),ut({key:at,domEvent:Fe})},fe.onTitleMouseLeave=function(Fe){var Ye=fe.props,at=Ye.parentMenu,ct=Ye.eventKey,ut=Ye.onItemHover,gt=Ye.onTitleMouseLeave;at.subMenuInstance=Object(y.a)(fe),ut({key:ct,hover:!1}),gt({key:ct,domEvent:Fe})},fe.onTitleClick=function(Fe){var Ye=Object(y.a)(fe),at=Ye.props;if(at.onTitleClick({key:at.eventKey,domEvent:Fe}),at.triggerSubMenuAction==="hover")return;fe.triggerOpenChange(!fe.getVisible(),"click"),_n(at.store,fe.props.eventKey,!1)},fe.onSubMenuClick=function(Fe){typeof fe.props.onClick=="function"&&fe.props.onClick(fe.addKeyPath(Fe))},fe.onSelect=function(Fe){fe.props.onSelect(Fe)},fe.onDeselect=function(Fe){fe.props.onDeselect(Fe)},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(Fe){fe.menuInstance=Fe},fe.addKeyPath=function(Fe){return Object(R.a)(Object(R.a)({},Fe),{},{keyPath:(Fe.keyPath||[]).concat(fe.props.eventKey)})},fe.triggerOpenChange=function(Fe,Ye){var at=fe.props.eventKey,ct=function(){fe.onOpenChange({key:at,item:Object(y.a)(fe),trigger:Ye,open:Fe})};Ye==="mouseenter"?fe.mouseenterTimeout=setTimeout(function(){ct()},0):ct()},fe.isChildrenSelected=function(){var Fe={find:!1};return X(fe.props.children,fe.props.selectedKeys,Fe),Fe.find},fe.isInlineMode=function(){return fe.getMode()==="inline"},fe.adjustWidth=function(){if(!fe.subMenuTitle||!fe.menuInstance)return;var Fe=Ge.findDOMNode(fe.menuInstance);if(Fe.offsetWidth>=fe.subMenuTitle.offsetWidth)return;Fe.style.minWidth="".concat(fe.subMenuTitle.offsetWidth,"px")},fe.saveSubMenuTitle=function(Fe){fe.subMenuTitle=Fe},fe.getBaseProps=function(){var Fe=Object(y.a)(fe),Ye=Fe.props,at=fe.getMode();return{mode:at==="horizontal"?"vertical":at,visible:fe.getVisible(),level:Ye.level+1,inlineIndent:Ye.inlineIndent,focusable:!1,onClick:fe.onSubMenuClick,onSelect:fe.onSelect,onDeselect:fe.onDeselect,onDestroy:fe.onDestroy,selectedKeys:Ye.selectedKeys,eventKey:"".concat(Ye.eventKey,"-menu-"),openKeys:Ye.openKeys,motion:Ye.motion,onOpenChange:fe.onOpenChange,subMenuOpenDelay:Ye.subMenuOpenDelay,parentMenu:Object(y.a)(fe),subMenuCloseDelay:Ye.subMenuCloseDelay,forceSubMenuRender:Ye.forceSubMenuRender,triggerSubMenuAction:Ye.triggerSubMenuAction,builtinPlacements:Ye.builtinPlacements,defaultActiveFirst:Ye.store.getState().defaultActiveFirst[ae(Ye.eventKey)],multiple:Ye.multiple,prefixCls:Ye.rootPrefixCls,id:fe.internalMenuId,manualRef:fe.saveMenuInstance,itemIcon:Ye.itemIcon,expandIcon:Ye.expandIcon,direction:Ye.direction}},fe.getMotion=function(Fe,Ye){var at=Object(y.a)(fe),ct=at.haveRendered,ut=fe.props,gt=ut.motion,Mt=ut.rootPrefixCls,qt=Object(R.a)(Object(R.a)({},gt),{},{leavedClassName:"".concat(Mt,"-hidden"),removeOnLeave:!1,motionAppear:ct||!Ye||Fe!=="inline"});return qt};var Ae=Pe.store,ge=Pe.eventKey,ke=Ae.getState(),Ne=ke.defaultActiveFirst;fe.isRootMenu=!1;var We=!1;return Ne&&(We=Ne[ge]),_n(Ae,ge,We),fe.state={mode:Pe.mode,isOpen:Pe.isOpen},fe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var fe=this,Ae=this.props,ge=Ae.mode,ke=Ae.parentMenu,Ne=Ae.manualRef,We=Ae.isOpen,Fe=function(){fe.setState({mode:ge,isOpen:We})},Ye=We!==this.state.isOpen,at=ge!==this.state.mode;if((at||Ye)&&($e.a.cancel(this.updateStateRaf),at?this.updateStateRaf=Object($e.a)(Fe):Fe()),Ne&&Ne(this),ge!=="horizontal"||!(ke==null?void 0:ke.isRootMenu)||!We)return;this.minWidthTimeout=setTimeout(function(){return fe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var fe=this.props,Ae=fe.onDestroy,ge=fe.eventKey;Ae&&Ae(ge),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),$e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(fe,Ae){var ge=this.getBaseProps();return h.createElement(Hn,Object(i.a)({},ge,{id:this.internalMenuId,className:fe,style:Ae}),this.props.children)}},{key:"renderChildren",value:function(){var fe=this,Ae=this.getBaseProps(),ge=Ae.mode,ke=Ae.visible,Ne=Ae.forceSubMenuRender,We=Ae.direction,Fe=this.getMotion(ge,ke);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ke||Ne,!this.haveOpened)return h.createElement("div",null);var Ye=S()("".concat(Ae.prefixCls,"-sub"),Object(P.a)({},"".concat(Ae.prefixCls,"-rtl"),We==="rtl"));return this.isInlineMode()?h.createElement(sr,Object(i.a)({visible:Ae.visible,forceRender:Ne},Fe),function(at){var ct=at.className,ut=at.style,gt=S()(Ye,ct);return fe.renderPopupMenu(gt,ut)}):this.renderPopupMenu(Ye)}},{key:"render",value:function(){var fe,Ae,ge,ke=Object(R.a)({},this.props),Ne=this.getVisible(),We=this.getPrefixCls(),Fe=this.isInlineMode(),Ye=this.getMode(),at=S()(We,"".concat(We,"-").concat(Ye),(fe={},Object(P.a)(fe,ke.className,!!ke.className),Object(P.a)(fe,this.getOpenClassName(),Ne),Object(P.a)(fe,this.getActiveClassName(),ke.active||Ne&&!Fe),Object(P.a)(fe,this.getDisabledClassName(),ke.disabled),Object(P.a)(fe,this.getSelectedClassName(),this.isChildrenSelected()),fe));this.internalMenuId||(ke.eventKey?this.internalMenuId="".concat(ke.eventKey,"$Menu"):(jn+=1,this.internalMenuId="$__$".concat(jn,"$Menu")));var ct={},ut={},gt={};ke.disabled||(ct={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},ut={onClick:this.onTitleClick},gt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Mt={},qt=ke.direction,er=qt==="rtl";Fe&&(er?Mt.paddingRight=ke.inlineIndent*ke.level:Mt.paddingLeft=ke.inlineIndent*ke.level);var tr={};this.getVisible()&&(tr={"aria-owns":this.internalMenuId});var lr=null;Ye!=="horizontal"&&(lr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(lr=h.createElement(this.props.expandIcon,Object(R.a)({},this.props))));var or=h.createElement("div",Object(i.a)({ref:this.saveSubMenuTitle,style:Mt,className:"".concat(We,"-title"),role:"button"},gt,ut,{"aria-expanded":Ne},tr,{"aria-haspopup":"true",title:typeof ke.title=="string"?ke.title:void 0}),ke.title,lr||h.createElement("i",{className:"".concat(We,"-arrow")})),rr=this.renderChildren(),Or=((Ae=ke.parentMenu)===null||Ae===void 0?void 0:Ae.isRootMenu)?ke.parentMenu.props.getPopupContainer:function(Vr){return Vr.parentNode},gr=Gr[Ye],pn=ke.popupOffset?{offset:ke.popupOffset}:{},vr=S()((ge={},Object(P.a)(ge,ke.popupClassName,ke.popupClassName&&!Fe),Object(P.a)(ge,"".concat(We,"-rtl"),er),ge)),Ft=ke.disabled,It=ke.triggerSubMenuAction,yr=ke.subMenuOpenDelay,Ar=ke.forceSubMenuRender,Dt=ke.subMenuCloseDelay,Dr=ke.builtinPlacements;Q.forEach(function(Vr){return delete ke[Vr]}),delete ke.onClick;var mn=er?Object(R.a)(Object(R.a)({},Hr),Dr):Object(R.a)(Object(R.a)({},Pa),Dr);delete ke.direction;var Nr=this.getBaseProps(),Qr=Fe?null:this.getMotion(Nr.mode,Nr.visible);return h.createElement("li",Object(i.a)({},ke,ct,{className:at,role:"menuitem"}),h.createElement(ia,{prefixCls:We,popupClassName:S()("".concat(We,"-popup"),vr),getPopupContainer:Or,builtinPlacements:mn,popupPlacement:gr,popupVisible:Fe?!1:Ne,popupAlign:pn,popup:Fe?null:rr,action:Ft||Fe?[]:[It],mouseEnterDelay:yr,mouseLeaveDelay:Dt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Ar,popupMotion:Qr},or),Fe?rr:null)}}]),Ke}(h.Component);ka.defaultProps={onMouseEnter:ne,onMouseLeave:ne,onTitleMouseEnter:ne,onTitleMouseLeave:ne,onTitleClick:ne,manualRef:ne,mode:"vertical",title:""};var ga=Object(_.b)(function(Le,Ue){var Ke=Le.openKeys,Pe=Le.activeKey,fe=Le.selectedKeys,Ae=Ue.eventKey,ge=Ue.subMenuKey;return{isOpen:Ke.indexOf(Ae)>-1,active:Pe[ge]===Ae,selectedKeys:fe}})(ka);ga.isSubMenu=!0;var ua=ga,Va="menuitem-overflowed",Ca=.5,Rt=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){var Pe;return Object(L.a)(this,Ke),Pe=Ue.apply(this,arguments),Pe.resizeObserver=null,Pe.mutationObserver=null,Pe.originalTotalWidth=0,Pe.overflowedItems=[],Pe.menuItemSizes=[],Pe.cancelFrameId=null,Pe.state={lastVisibleIndex:void 0},Pe.childRef=h.createRef(),Pe.getMenuItemNodes=function(){var fe=Pe.props.prefixCls,Ae=Pe.childRef.current;return Ae?[].slice.call(Ae.children).filter(function(ge){return ge.className.split(" ").indexOf("".concat(fe,"-overflowed-submenu"))<0}):[]},Pe.getOverflowedSubMenuItem=function(fe,Ae,ge){var ke=Pe.props,Ne=ke.overflowedIndicator,We=ke.level,Fe=ke.mode,Ye=ke.prefixCls,at=ke.theme;if(We!==1||Fe!=="horizontal")return null;var ct=Pe.props.children[0],ut=ct.props,gt=ut.children,Mt=ut.title,qt=ut.style,er=Object(C.a)(ut,["children","title","style"]),tr=Object(R.a)({},qt),lr="".concat(fe,"-overflowed-indicator"),or="".concat(fe,"-overflowed-indicator");Ae.length===0&&ge!==!0?tr=Object(R.a)(Object(R.a)({},tr),{},{display:"none"}):ge&&(tr=Object(R.a)(Object(R.a)({},tr),{},{visibility:"hidden",position:"absolute"}),lr="".concat(lr,"-placeholder"),or="".concat(or,"-placeholder"));var rr=at?"".concat(Ye,"-").concat(at):"",Or={};return Q.forEach(function(gr){er[gr]!==void 0&&(Or[gr]=er[gr])}),h.createElement(ua,Object(i.a)({title:Ne,className:"".concat(Ye,"-overflowed-submenu"),popupClassName:rr},Or,{key:lr,eventKey:or,disabled:!1,style:tr}),Ae)},Pe.setChildrenWidthAndResize=function(){if(Pe.props.mode!=="horizontal")return;var fe=Pe.childRef.current;if(!fe)return;var Ae=fe.children;if(!Ae||Ae.length===0)return;var ge=fe.children[Ae.length-1];ce(ge,"display","inline-block");var ke=Pe.getMenuItemNodes(),Ne=ke.filter(function(We){return We.className.split(" ").indexOf(Va)>=0});Ne.forEach(function(We){ce(We,"display","inline-block")}),Pe.menuItemSizes=ke.map(function(We){return pe(We,!0)}),Ne.forEach(function(We){ce(We,"display","none")}),Pe.overflowedIndicatorWidth=pe(fe.children[fe.children.length-1],!0),Pe.originalTotalWidth=Pe.menuItemSizes.reduce(function(We,Fe){return We+Fe},0),Pe.handleResize(),ce(ge,"display","none")},Pe.handleResize=function(){if(Pe.props.mode!=="horizontal")return;var fe=Pe.childRef.current;if(!fe)return;var Ae=pe(fe);Pe.overflowedItems=[];var ge=0,ke;Pe.originalTotalWidth>Ae+Ca&&(ke=-1,Pe.menuItemSizes.forEach(function(Ne){ge+=Ne,ge+Pe.overflowedIndicatorWidth<=Ae&&(ke+=1)})),Pe.setState({lastVisibleIndex:ke})},Pe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){var fe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ae=this.childRef.current;if(!Ae)return;this.resizeObserver=new ze.default(function(ge){ge.forEach(function(){var ke=fe.cancelFrameId;cancelAnimationFrame(ke),fe.cancelFrameId=requestAnimationFrame(fe.setChildrenWidthAndResize)})}),[].slice.call(Ae.children).concat(Ae).forEach(function(ge){fe.resizeObserver.observe(ge)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){fe.resizeObserver.disconnect(),[].slice.call(Ae.children).concat(Ae).forEach(function(ge){fe.resizeObserver.observe(ge)}),fe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ae,{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 Ae=this,ge=this.state.lastVisibleIndex;return(fe||[]).reduce(function(ke,Ne,We){var Fe=Ne;if(Ae.props.mode==="horizontal"){var Ye=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[]);ge!==void 0&&Ae.props.className.indexOf("".concat(Ae.props.prefixCls,"-root"))!==-1&&(We>ge&&(Fe=h.cloneElement(Ne,{style:{display:"none"},eventKey:"".concat(Ne.props.eventKey,"-hidden"),className:"".concat(Va)})),We===ge+1&&(Ae.overflowedItems=fe.slice(ge+1).map(function(ct){return h.cloneElement(ct,{key:ct.props.eventKey,mode:"vertical-left"})}),Ye=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,Ae.overflowedItems)));var at=[].concat(Object(o.a)(ke),[Ye,Fe]);return We===fe.length-1&&at.push(Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[],!0)),at}return[].concat(Object(o.a)(ke),[Fe])},[])}},{key:"render",value:function(){var fe=this.props,Ae=fe.visible,ge=fe.prefixCls,ke=fe.overflowedIndicator,Ne=fe.mode,We=fe.level,Fe=fe.tag,Ye=fe.children,at=fe.theme,ct=Object(C.a)(fe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ut=Fe;return h.createElement(ut,Object(i.a)({ref:this.childRef},ct),this.renderChildren(Ye))}}]),Ke}(h.Component);Rt.defaultProps={tag:"div",className:""};var Kt=Rt;function Bt(Le){return Le.length?Le.every(function(Ue){return!!Ue.props.disabled}):!0}function pr(Le,Ue,Ke){var Pe=Le.getState();Le.setState({activeKey:Object(R.a)(Object(R.a)({},Pe.activeKey),{},Object(P.a)({},Ue,Ke))})}function mr(Le){return Le.eventKey||"0-menu-"}function Pr(Le,Ue){var Ke=Ue,Pe=Le.children,fe=Le.eventKey;if(Ke){var Ae;if(J(Pe,function(ge,ke){ge&&ge.props&&!ge.props.disabled&&Ke===Te(ge,fe,ke)&&(Ae=!0)}),Ae)return Ke}return Ke=null,Le.defaultActiveFirst&&J(Pe,function(ge,ke){!Ke&&ge&&!ge.props.disabled&&(Ke=Te(ge,fe,ke))}),Ke}function Xr(Le){if(!Le)return;var Ue=this.instanceArray.indexOf(Le);Ue!==-1?this.instanceArray[Ue]=Le:this.instanceArray.push(Le)}var Br=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(Pe){var fe;return Object(L.a)(this,Ke),fe=Ue.call(this,Pe),fe.onKeyDown=function(Ae,ge){var ke=Ae.keyCode,Ne;if(fe.getFlatInstanceArray().forEach(function(Fe){Fe&&Fe.props.active&&Fe.onKeyDown&&(Ne=Fe.onKeyDown(Ae))}),Ne)return 1;var We=null;return(ke===p.a.UP||ke===p.a.DOWN)&&(We=fe.step(ke===p.a.UP?-1:1)),We?(Ae.preventDefault(),pr(fe.props.store,mr(fe.props),We.props.eventKey),typeof ge=="function"&&ge(We),1):void 0},fe.onItemHover=function(Ae){var ge=Ae.key,ke=Ae.hover;pr(fe.props.store,mr(fe.props),ke?ge:null)},fe.onDeselect=function(Ae){fe.props.onDeselect(Ae)},fe.onSelect=function(Ae){fe.props.onSelect(Ae)},fe.onClick=function(Ae){fe.props.onClick(Ae)},fe.onOpenChange=function(Ae){fe.props.onOpenChange(Ae)},fe.onDestroy=function(Ae){fe.props.onDestroy(Ae)},fe.getFlatInstanceArray=function(){return fe.instanceArray},fe.step=function(Ae){var ge=fe.getFlatInstanceArray(),ke=fe.props.store.getState().activeKey[mr(fe.props)],Ne=ge.length;if(!Ne)return null;Ae<0&&(ge=ge.concat().reverse());var We=-1;if(ge.every(function(ct,ut){return ct&&ct.props.eventKey===ke?(We=ut,!1):!0}),!fe.props.defaultActiveFirst&&We!==-1&&Bt(ge.slice(We,Ne-1)))return;var Fe=(We+1)%Ne,Ye=Fe;do{var at=ge[Ye];if(!at||at.props.disabled)Ye=(Ye+1)%Ne;else return at}while(Ye!==Fe);return null},fe.renderCommonMenuItem=function(Ae,ge,ke){var Ne=fe.props.store.getState(),We=Object(y.a)(fe),Fe=We.props,Ye=Te(Ae,Fe.eventKey,ge),at=Ae.props;if(!at||typeof Ae.type=="string")return Ae;var ct=Ye===Ne.activeKey,ut=Object(R.a)(Object(R.a)({mode:at.mode||Fe.mode,level:Fe.level,inlineIndent:Fe.inlineIndent,renderMenuItem:fe.renderMenuItem,rootPrefixCls:Fe.prefixCls,index:ge,parentMenu:Fe.parentMenu,manualRef:at.disabled?void 0:Object(j.a)(Ae.ref,Xr.bind(Object(y.a)(fe))),eventKey:Ye,active:!at.disabled&&ct,multiple:Fe.multiple,onClick:function(Mt){(at.onClick||ne)(Mt),fe.onClick(Mt)},onItemHover:fe.onItemHover,motion:Fe.motion,subMenuOpenDelay:Fe.subMenuOpenDelay,subMenuCloseDelay:Fe.subMenuCloseDelay,forceSubMenuRender:Fe.forceSubMenuRender,onOpenChange:fe.onOpenChange,onDeselect:fe.onDeselect,onSelect:fe.onSelect,builtinPlacements:Fe.builtinPlacements,itemIcon:at.itemIcon||fe.props.itemIcon,expandIcon:at.expandIcon||fe.props.expandIcon},ke),{},{direction:Fe.direction});return(Fe.mode==="inline"||we())&&(ut.triggerSubMenuAction="click"),h.cloneElement(Ae,Object(R.a)(Object(R.a)({},ut),{},{key:Ye||ge}))},fe.renderMenuItem=function(Ae,ge,ke){if(!Ae)return null;var Ne=fe.props.store.getState(),We={openKeys:Ne.openKeys,selectedKeys:Ne.selectedKeys,triggerSubMenuAction:fe.props.triggerSubMenuAction,subMenuKey:ke};return fe.renderCommonMenuItem(Ae,ge,We)},Pe.store.setState({activeKey:Object(R.a)(Object(R.a)({},Pe.store.getState().activeKey),{},Object(P.a)({},Pe.eventKey,Pr(Pe,Pe.activeKey)))}),fe.instanceArray=[],fe}return Object(A.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||!G()(this.props.style,fe.style)}},{key:"componentDidUpdate",value:function(fe){var Ae=this.props,ge="activeKey"in Ae?Ae.activeKey:Ae.store.getState().activeKey[mr(Ae)],ke=Pr(Ae,ge);if(ke!==ge)pr(Ae.store,mr(Ae),ke);else if("activeKey"in fe){var Ne=Pr(fe,fe.activeKey);ke!==Ne&&pr(Ae.store,mr(Ae),ke)}}},{key:"render",value:function(){var fe=this,Ae=Object(i.a)({},this.props);this.instanceArray=[];var ge=S()(Ae.prefixCls,Ae.className,"".concat(Ae.prefixCls,"-").concat(Ae.mode)),ke={className:ge,role:Ae.role||"menu"};Ae.id&&(ke.id=Ae.id),Ae.focusable&&(ke.tabIndex=0,ke.onKeyDown=this.onKeyDown);var Ne=Ae.prefixCls,We=Ae.eventKey,Fe=Ae.visible,Ye=Ae.level,at=Ae.mode,ct=Ae.overflowedIndicator,ut=Ae.theme;return Q.forEach(function(gt){return delete Ae[gt]}),delete Ae.onClick,h.createElement(Kt,Object(i.a)({},Ae,{prefixCls:Ne,mode:at,tag:"ul",level:Ye,theme:ut,visible:Fe,overflowedIndicator:ct},ke),Object(f.a)(Ae.children).map(function(gt,Mt){return fe.renderMenuItem(gt,Mt,We||"0-menu-")}))}}]),Ke}(h.Component);Br.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ne};var tn=Object(_.b)()(Br),Hn=tn,Cr=k("Kwbf");function ur(Le,Ue,Ke){var Pe=Le.prefixCls,fe=Le.motion,Ae=Le.defaultMotions,ge=Ae===void 0?{}:Ae,ke=Le.openAnimation,Ne=Le.openTransitionName,We=Ue.switchingModeFromInline;if(fe)return fe;if(Object(K.a)(ke)==="object"&&ke)Object(Cr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ke=="string")return{motionName:"".concat(Pe,"-open-").concat(ke)};if(Ne)return{motionName:Ne};var Fe=ge[Ke];return Fe||(We?null:ge.other)}var yn=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(Pe){var fe;Object(L.a)(this,Ke),fe=Ue.call(this,Pe),fe.onSelect=function(ke){var Ne=Object(y.a)(fe),We=Ne.props;if(We.selectable){var Fe=fe.store.getState(),Ye=Fe.selectedKeys,at=ke.key;We.multiple?Ye=Ye.concat([at]):Ye=[at],"selectedKeys"in We||fe.store.setState({selectedKeys:Ye}),We.onSelect(Object(R.a)(Object(R.a)({},ke),{},{selectedKeys:Ye}))}},fe.onClick=function(ke){var Ne=fe.getRealMenuMode(),We=Object(y.a)(fe),Fe=We.store,Ye=We.props.onOpenChange;Ne!=="inline"&&!("openKeys"in fe.props)&&(Fe.setState({openKeys:[]}),Ye([])),fe.props.onClick(ke)},fe.onKeyDown=function(ke,Ne){fe.innerMenu.getWrappedInstance().onKeyDown(ke,Ne)},fe.onOpenChange=function(ke){var Ne=Object(y.a)(fe),We=Ne.props,Fe=fe.store.getState().openKeys.concat(),Ye=!1,at=function(ut){var gt=!1;if(ut.open)gt=Fe.indexOf(ut.key)===-1,gt&&Fe.push(ut.key);else{var Mt=Fe.indexOf(ut.key);gt=Mt!==-1,gt&&Fe.splice(Mt,1)}Ye=Ye||gt};Array.isArray(ke)?ke.forEach(at):at(ke),Ye&&("openKeys"in fe.props||fe.store.setState({openKeys:Fe}),We.onOpenChange(Fe))},fe.onDeselect=function(ke){var Ne=Object(y.a)(fe),We=Ne.props;if(We.selectable){var Fe=fe.store.getState().selectedKeys.concat(),Ye=ke.key,at=Fe.indexOf(Ye);at!==-1&&Fe.splice(at,1),"selectedKeys"in We||fe.store.setState({selectedKeys:Fe}),We.onDeselect(Object(R.a)(Object(R.a)({},ke),{},{selectedKeys:Fe}))}},fe.onMouseEnter=function(ke){fe.restoreModeVerticalFromInline();var Ne=fe.props.onMouseEnter;Ne&&Ne(ke)},fe.onTransitionEnd=function(ke){var Ne=ke.propertyName==="width"&&ke.target===ke.currentTarget,We=ke.target.className,Fe=Object.prototype.toString.call(We)==="[object SVGAnimatedString]"?We.animVal:We,Ye=ke.propertyName==="font-size"&&Fe.indexOf("anticon")>=0;(Ne||Ye)&&fe.restoreModeVerticalFromInline()},fe.setInnerMenu=function(ke){fe.innerMenu=ke},fe.isRootMenu=!0;var Ae=Pe.defaultSelectedKeys,ge=Pe.defaultOpenKeys;return"selectedKeys"in Pe&&(Ae=Pe.selectedKeys||[]),"openKeys"in Pe&&(ge=Pe.openKeys||[]),fe.store=Object(_.c)({selectedKeys:Ae,openKeys:ge,activeKey:{"0-menu-":Pr(Pe,Pe.activeKey)}}),fe.state={switchingModeFromInline:!1,prevProps:Pe,inlineOpenKeys:[],store:fe.store},fe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(fe){var Ae=this.props,ge=Ae.siderCollapsed,ke=Ae.inlineCollapsed,Ne=Ae.onOpenChange;(!fe.inlineCollapsed&&ke||!fe.siderCollapsed&&ge)&&Ne([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var fe=this.props.collapsedWidth,Ae=this.store,ge=this.prevOpenKeys,ke=this.getInlineCollapsed()&&(fe===0||fe==="0"||fe==="0px");ke?(this.prevOpenKeys=Ae.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ge&&(this.store.setState({openKeys:ge}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var fe=this.props.mode,Ae=this.state.switchingModeFromInline,ge=this.getInlineCollapsed();return Ae&&ge?"inline":ge?"vertical":fe}},{key:"getInlineCollapsed",value:function(){var fe=this.props,Ae=fe.inlineCollapsed,ge=fe.siderCollapsed;return ge!==void 0?ge:Ae}},{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(R.a)({},Object(I.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ae=this.getRealMenuMode();return fe.className+=" ".concat(fe.prefixCls,"-root"),fe.direction==="rtl"&&(fe.className+=" ".concat(fe.prefixCls,"-rtl")),fe=Object(R.a)(Object(R.a)({},fe),{},{mode:Ae,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ur(this.props,this.state,Ae)}),delete fe.openAnimation,delete fe.openTransitionName,h.createElement(_.a,{store:this.store},h.createElement(Hn,Object(i.a)({},fe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(fe,Ae){var ge=Ae.prevProps,ke=Ae.store,Ne=ke.getState(),We={},Fe={prevProps:fe};return ge.mode==="inline"&&fe.mode!=="inline"&&(Fe.switchingModeFromInline=!0),"openKeys"in fe?We.openKeys=fe.openKeys||[]:((fe.inlineCollapsed&&!ge.inlineCollapsed||fe.siderCollapsed&&!ge.siderCollapsed)&&(Fe.switchingModeFromInline=!0,Fe.inlineOpenKeys=Ne.openKeys,We.openKeys=[]),(!fe.inlineCollapsed&&ge.inlineCollapsed||!fe.siderCollapsed&&ge.siderCollapsed)&&(We.openKeys=Ae.inlineOpenKeys,Fe.inlineOpenKeys=[])),Object.keys(We).length&&ke.setState(We),Fe}}]),Ke}(h.Component);yn.defaultProps={selectable:!0,onClick:ne,onSelect:ne,onOpenChange:ne,onDeselect:ne,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:h.createElement("span",null,"\xB7\xB7\xB7")};var ca=yn,Kn=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){var Pe;return Object(L.a)(this,Ke),Pe=Ue.apply(this,arguments),Pe.onKeyDown=function(fe){var Ae=fe.keyCode;return Ae===p.a.ENTER?(Pe.onClick(fe),!0):void 0},Pe.onMouseLeave=function(fe){var Ae=Pe.props,ge=Ae.eventKey,ke=Ae.onItemHover,Ne=Ae.onMouseLeave;ke({key:ge,hover:!1}),Ne({key:ge,domEvent:fe})},Pe.onMouseEnter=function(fe){var Ae=Pe.props,ge=Ae.eventKey,ke=Ae.onItemHover,Ne=Ae.onMouseEnter;ke({key:ge,hover:!0}),Ne({key:ge,domEvent:fe})},Pe.onClick=function(fe){var Ae=Pe.props,ge=Ae.eventKey,ke=Ae.multiple,Ne=Ae.onClick,We=Ae.onSelect,Fe=Ae.onDeselect,Ye=Ae.isSelected,at={key:ge,keyPath:[ge],item:Object(y.a)(Pe),domEvent:fe};Ne(at),ke?Ye?Fe(at):We(at):Ye||We(at)},Pe.saveNode=function(fe){Pe.node=fe},Pe}return Object(A.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,Ae=Object(R.a)({},this.props),ge=S()(this.getPrefixCls(),Ae.className,(fe={},Object(P.a)(fe,this.getActiveClassName(),!Ae.disabled&&Ae.active),Object(P.a)(fe,this.getSelectedClassName(),Ae.isSelected),Object(P.a)(fe,this.getDisabledClassName(),Ae.disabled),fe)),ke=Object(R.a)(Object(R.a)({},Ae.attribute),{},{title:typeof Ae.title=="string"?Ae.title:void 0,className:ge,role:Ae.role||"menuitem","aria-disabled":Ae.disabled});Ae.role==="option"?ke=Object(R.a)(Object(R.a)({},ke),{},{role:"option","aria-selected":Ae.isSelected}):(Ae.role===null||Ae.role==="none")&&(ke.role="none");var Ne={onClick:Ae.disabled?null:this.onClick,onMouseLeave:Ae.disabled?null:this.onMouseLeave,onMouseEnter:Ae.disabled?null:this.onMouseEnter},We=Object(R.a)({},Ae.style);Ae.mode==="inline"&&(Ae.direction==="rtl"?We.paddingRight=Ae.inlineIndent*Ae.level:We.paddingLeft=Ae.inlineIndent*Ae.level),Q.forEach(function(Ye){return delete Ae[Ye]}),delete Ae.direction;var Fe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Fe=h.createElement(this.props.itemIcon,this.props)),h.createElement("li",Object(i.a)({},Object(I.a)(Ae,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ke,Ne,{style:We,ref:this.saveNode}),Ae.children,Fe)}}]),Ke}(h.Component);Kn.isMenuItem=!0,Kn.defaultProps={onSelect:ne,onMouseEnter:ne,onMouseLeave:ne,manualRef:ne};var Ta=Object(_.b)(function(Le,Ue){var Ke=Le.activeKey,Pe=Le.selectedKeys,fe=Ue.eventKey,Ae=Ue.subMenuKey;return{active:Ke[Ae]===fe,isSelected:Array.isArray(Pe)?Pe.indexOf(fe)!==-1:Pe===fe}})(Kn),Ya=Ta,Wa=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){var Pe;return Object(L.a)(this,Ke),Pe=Ue.apply(this,arguments),Pe.renderInnerMenuItem=function(fe){var Ae=Pe.props,ge=Ae.renderMenuItem,ke=Ae.index;return ge(fe,ke,Pe.props.subMenuKey)},Pe}return Object(A.a)(Ke,[{key:"render",value:function(){var fe=Object(i.a)({},this.props),Ae=fe.className,ge=Ae===void 0?"":Ae,ke=fe.rootPrefixCls,Ne="".concat(ke,"-item-group-title"),We="".concat(ke,"-item-group-list"),Fe=fe.title,Ye=fe.children;return Q.forEach(function(at){return delete fe[at]}),delete fe.direction,h.createElement("li",Object(i.a)({},fe,{onClick:function(ct){return ct.stopPropagation()},className:"".concat(ge," ").concat(ke,"-item-group")}),h.createElement("div",{className:Ne,title:typeof Fe=="string"?Fe:void 0},Fe),h.createElement("ul",{className:We},h.Children.map(Ye,this.renderInnerMenuItem)))}}]),Ke}(h.Component);Wa.isMenuItemGroup=!0,Wa.defaultProps={disabled:!0};var hi=Wa,Ha=function(Ue){var Ke=Ue.className,Pe=Ue.rootPrefixCls,fe=Ue.style;return h.createElement("li",{className:"".concat(Ke," ").concat(Pe,"-item-divider"),style:fe})};Ha.defaultProps={disabled:!0,className:"",style:{}};var Ci=Ha,ni=ca,ai=k("eDIo");function pi(Le,Ue){var Ke=Le.prefixCls,Pe=Le.editable,fe=Le.locale,Ae=Le.style;return!Pe||Pe.showAdd===!1?null:h.createElement("button",{ref:Ue,type:"button",className:"".concat(Ke,"-nav-add"),style:Ae,"aria-label":(fe==null?void 0:fe.addAriaLabel)||"Add tab",onClick:function(ke){Pe.onEdit("add",{event:ke})}},Pe.addIcon||"+")}var _a=h.forwardRef(pi);function Ia(Le,Ue){var Ke=Le.prefixCls,Pe=Le.id,fe=Le.tabs,Ae=Le.locale,ge=Le.mobile,ke=Le.moreIcon,Ne=ke===void 0?"More":ke,We=Le.moreTransitionName,Fe=Le.style,Ye=Le.className,at=Le.editable,ct=Le.tabBarGutter,ut=Le.rtl,gt=Le.onTabClick,Mt=Object(h.useState)(!1),qt=Object(u.a)(Mt,2),er=qt[0],tr=qt[1],lr=Object(h.useState)(null),or=Object(u.a)(lr,2),rr=or[0],Or=or[1],gr="".concat(Pe,"-more-popup"),pn="".concat(Ke,"-dropdown"),vr=rr!==null?"".concat(gr,"-").concat(rr):null,Ft=Ae==null?void 0:Ae.dropdownAriaLabel,It=h.createElement(ni,{onClick:function(Qr){var Vr=Qr.key,An=Qr.domEvent;gt(Vr,An),tr(!1)},id:gr,tabIndex:-1,role:"listbox","aria-activedescendant":vr,selectedKeys:[rr],"aria-label":Ft!==void 0?Ft:"expanded dropdown"},fe.map(function(Nr){return h.createElement(Ya,{key:Nr.key,id:"".concat(gr,"-").concat(Nr.key),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(Nr.key),disabled:Nr.disabled},Nr.tab)}));function yr(Nr){for(var Qr=fe.filter(function(oa){return!oa.disabled}),Vr=Qr.findIndex(function(oa){return oa.key===rr})||0,An=Qr.length,zn=0;zn<An;zn+=1){Vr=(Vr+Nr+An)%An;var bn=Qr[Vr];if(!bn.disabled){Or(bn.key);return}}}function Ar(Nr){var Qr=Nr.which;if(!er){[p.a.DOWN,p.a.SPACE,p.a.ENTER].includes(Qr)&&(tr(!0),Nr.preventDefault());return}switch(Qr){case p.a.UP:yr(-1),Nr.preventDefault();break;case p.a.DOWN:yr(1),Nr.preventDefault();break;case p.a.ESC:tr(!1);break;case p.a.SPACE:case p.a.ENTER:rr!==null&&gt(rr,Nr);break}}Object(h.useEffect)(function(){var Nr=document.getElementById(vr);Nr&&Nr.scrollIntoView&&Nr.scrollIntoView(!1)},[rr]),Object(h.useEffect)(function(){er||Or(null)},[er]);var Dt=Object(P.a)({},ut?"marginLeft":"marginRight",ct);fe.length||(Dt.visibility="hidden",Dt.order=1);var Dr=S()(Object(P.a)({},"".concat(pn,"-rtl"),ut)),mn=ge?null:h.createElement(ai.a,{prefixCls:pn,overlay:It,trigger:["hover"],visible:er,transitionName:We,onVisibleChange:tr,overlayClassName:Dr,mouseEnterDelay:.1,mouseLeaveDelay:.1},h.createElement("button",{type:"button",className:"".concat(Ke,"-nav-more"),style:Dt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":gr,id:"".concat(Pe,"-more"),"aria-expanded":er,onKeyDown:Ar},Ne));return h.createElement("div",{className:S()("".concat(Ke,"-nav-operations"),Ye),style:Fe,ref:Ue},mn,h.createElement(_a,{prefixCls:Ke,locale:Ae,editable:at}))}var _i=h.forwardRef(Ia),ii=Object(h.createContext)(null),_r=.1,cr=.01,ar=20,Jn=Math.pow(.995,ar);function Na(){var Le=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(Le)||/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(Le.substr(0,4)))}function ja(Le,Ue){var Ke=Object(h.useState)(),Pe=Object(u.a)(Ke,2),fe=Pe[0],Ae=Pe[1],ge=Object(h.useState)(0),ke=Object(u.a)(ge,2),Ne=ke[0],We=ke[1],Fe=Object(h.useState)(0),Ye=Object(u.a)(Fe,2),at=Ye[0],ct=Ye[1],ut=Object(h.useState)(),gt=Object(u.a)(ut,2),Mt=gt[0],qt=gt[1],er=Object(h.useRef)();function tr(Ft){var It=Ft.touches[0],yr=It.screenX,Ar=It.screenY;Ae({x:yr,y:Ar}),window.clearInterval(er.current)}function lr(Ft){if(!fe)return;Ft.preventDefault();var It=Ft.touches[0],yr=It.screenX,Ar=It.screenY;Ae({x:yr,y:Ar});var Dt=yr-fe.x,Dr=Ar-fe.y;Ue(Dt,Dr);var mn=Date.now();We(mn),ct(mn-Ne),qt({x:Dt,y:Dr})}function or(){if(!fe)return;if(Ae(null),qt(null),Mt){var Ft=Mt.x/at,It=Mt.y/at,yr=Math.abs(Ft),Ar=Math.abs(It);if(Math.max(yr,Ar)<_r)return;var Dt=Ft,Dr=It;er.current=window.setInterval(function(){if(Math.abs(Dt)<cr&&Math.abs(Dr)<cr){window.clearInterval(er.current);return}Dt*=Jn,Dr*=Jn,Ue(Dt*ar,Dr*ar)},ar)}}var rr=Object(h.useRef)(0),Or=Object(h.useRef)(!1),gr=Object(h.useRef)();function pn(Ft){var It=Ft.deltaX,yr=Ft.deltaY,Ar=0,Dt=Math.abs(It),Dr=Math.abs(yr);Dt===Dr?Ar=gr.current==="x"?It:yr:Dt>Dr?(Ar=It,gr.current="x"):(Ar=yr,gr.current="y");var mn=Date.now();mn-rr.current>100&&(Or.current=!1),(Ue(-Ar,-Ar)||Or.current)&&(Ft.preventDefault(),Or.current=!0),rr.current=mn}var vr=Object(h.useRef)(null);vr.current={onTouchStart:tr,onTouchMove:lr,onTouchEnd:or,onWheel:pn},h.useEffect(function(){function Ft(Dt){vr.current.onTouchStart(Dt)}function It(Dt){vr.current.onTouchMove(Dt)}function yr(Dt){vr.current.onTouchEnd(Dt)}function Ar(Dt){vr.current.onWheel(Dt)}return document.addEventListener("touchmove",It,{passive:!1}),document.addEventListener("touchend",yr,{passive:!1}),Le.current.addEventListener("touchstart",Ft,{passive:!1}),Le.current.addEventListener("wheel",Ar),function(){document.removeEventListener("touchmove",It),document.removeEventListener("touchend",yr)}},[])}function Ut(){var Le=Object(h.useRef)(new Map);function Ue(Pe){return Le.current.has(Pe)||Le.current.set(Pe,h.createRef()),Le.current.get(Pe)}function Ke(Pe){Le.current.delete(Pe)}return[Ue,Ke]}function bt(Le,Ue){var Ke=h.useRef(Le),Pe=h.useState({}),fe=Object(u.a)(Pe,2),Ae=fe[1];function ge(ke){var Ne=typeof ke=="function"?ke(Ke.current):ke;Ne!==Ke.current&&Ue(Ne,Ke.current),Ke.current=Ne,Ae({})}return[Ke.current,ge]}var zt=function(Ue){var Ke=Ue.position,Pe=Ue.prefixCls,fe=Ue.extra;if(!fe)return null;var Ae,ge=fe;return Ke==="right"&&(Ae=ge.right||!ge.left&&ge||null),Ke==="left"&&(Ae=ge.left||null),Ae?h.createElement("div",{className:"".concat(Pe,"-extra-content")},Ae):null};function Zt(Le,Ue){var Ke,Pe=h.useContext(ii),fe=Pe.prefixCls,Ae=Pe.tabs,ge=Le.className,ke=Le.style,Ne=Le.id,We=Le.animated,Fe=Le.activeKey,Ye=Le.rtl,at=Le.extra,ct=Le.editable,ut=Le.locale,gt=Le.tabPosition,Mt=Le.tabBarGutter,qt=Le.children,er=Le.onTabClick,tr=Le.onTabScroll,lr=Object(h.useRef)(),or=Object(h.useRef)(),rr=Object(h.useRef)(),Or=Object(h.useRef)(),gr=Ut(),pn=Object(u.a)(gr,2),vr=pn[0],Ft=pn[1],It=gt==="top"||gt==="bottom",yr=bt(0,function(Wr,br){It&&tr&&tr({direction:Wr>br?"left":"right"})}),Ar=Object(u.a)(yr,2),Dt=Ar[0],Dr=Ar[1],mn=bt(0,function(Wr,br){!It&&tr&&tr({direction:Wr>br?"top":"bottom"})}),Nr=Object(u.a)(mn,2),Qr=Nr[0],Vr=Nr[1],An=Object(h.useState)(0),zn=Object(u.a)(An,2),bn=zn[0],oa=zn[1],Oa=Object(h.useState)(0),da=Object(u.a)(Oa,2),Gn=da[0],sn=da[1],Zr=Object(h.useState)(0),xn=Object(u.a)(Zr,2),gn=xn[0],Aa=xn[1],$a=Object(h.useState)(0),Ja=Object(u.a)($a,2),Yr=Ja[0],Fa=Ja[1],Qa=Object(h.useState)(null),nn=Object(u.a)(Qa,2),Kr=nn[0],Xn=nn[1],Co=Object(h.useState)(null),eo=Object(u.a)(Co,2),Za=eo[0],mi=eo[1],ki=Object(h.useState)(0),to=Object(u.a)(ki,2),Ii=to[0],Vo=to[1],Yo=Object(h.useState)(0),_o=Object(u.a)(Yo,2),ro=_o[0],no=_o[1],gi=w(new Map),vi=Object(u.a)(gi,2),$o=vi[0],Ni=vi[1],Oi=c(Ae,$o,bn),yi="".concat(fe,"-nav-operations-hidden"),bi=0,Da=0;It?Ye?(bi=0,Da=Math.max(0,bn-Kr)):(bi=Math.min(0,Kr-bn),Da=0):(bi=Math.min(0,Za-Gn),Da=0);function oi(Wr){return Wr<bi?[bi,!1]:Wr>Da?[Da,!1]:[Wr,!0]}var qa=Object(h.useRef)(),Ai=Object(h.useState)(),si=Object(u.a)(Ai,2),ji=si[0],ao=si[1];function Ui(){ao(Date.now())}function io(){window.clearTimeout(qa.current)}ja(lr,function(Wr,br){var Vn=!1;function ha(xi,Ka){xi(function(Li){var ti=oi(Li+Ka),Yn=Object(u.a)(ti,2),Wi=Yn[0],so=Yn[1];return Vn=so,Wi})}if(It){if(Kr>=bn)return Vn;ha(Dr,Wr)}else{if(Za>=Gn)return Vn;ha(Vr,br)}return io(),Ui(),Vn}),Object(h.useEffect)(function(){return io(),ji&&(qa.current=window.setTimeout(function(){ao(0)},100)),io},[ji]);function ei(){var Wr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fe,br=Oi.get(Wr);if(!br)return;if(It){var Vn=Dt;Ye?br.right<Dt?Vn=br.right:br.right+br.width>Dt+Kr&&(Vn=br.right+br.width-Kr):br.left<-Dt?Vn=-br.left:br.left+br.width>-Dt+Kr&&(Vn=-(br.left+br.width-Kr)),Vr(0),Dr(oi(Vn)[0])}else{var ha=Qr;br.top<-Qr?ha=-br.top:br.top+br.height>-Qr+Za&&(ha=-(br.top+br.height-Za)),Dr(0),Vr(oi(ha)[0])}}var li=v(Oi,{width:Kr,height:Za,left:Dt,top:Qr},{width:gn,height:Yr},{width:Ii,height:ro},Object(R.a)(Object(R.a)({},Le),{},{tabs:Ae})),Oo=Object(u.a)(li,2),Jo=Oo[0],Qo=Oo[1],Zo=Ae.map(function(Wr){var br=Wr.key;return h.createElement(n,{id:Ne,prefixCls:fe,key:br,rtl:Ye,tab:Wr,closable:Wr.closable,editable:ct,active:br===Fe,tabPosition:gt,tabBarGutter:Mt,renderWrapper:qt,removeAriaLabel:ut==null?void 0:ut.removeAriaLabel,ref:vr(br),onClick:function(ha){er(br,ha)},onRemove:function(){Ft(br)},onFocus:function(){ei(br),Ui(),Ye||(lr.current.scrollLeft=0),lr.current.scrollTop=0}})}),oo=m(function(){var Wr,br,Vn,ha,xi,Ka,Li,ti,Yn,Wi=((Wr=lr.current)===null||Wr===void 0?void 0:Wr.offsetWidth)||0,so=((br=lr.current)===null||br===void 0?void 0:br.offsetHeight)||0,lo=((Vn=Or.current)===null||Vn===void 0?void 0:Vn.offsetWidth)||0,pa=((ha=Or.current)===null||ha===void 0?void 0:ha.offsetHeight)||0,Ur=((xi=rr.current)===null||xi===void 0?void 0:xi.offsetWidth)||0,La=((Ka=rr.current)===null||Ka===void 0?void 0:Ka.offsetHeight)||0;Xn(Wi),mi(so),Vo(lo),no(pa);var za=(((Li=or.current)===null||Li===void 0?void 0:Li.offsetWidth)||0)-lo,Ga=(((ti=or.current)===null||ti===void 0?void 0:ti.offsetHeight)||0)-pa;oa(za),sn(Ga);var uo=(Yn=rr.current)===null||Yn===void 0?void 0:Yn.className.includes(yi);Aa(za-(uo?0:Ur)),Fa(Ga-(uo?0:La)),Ni(function(){var Hi=new Map;return Ae.forEach(function(Mo){var Po=Mo.key,ci=vr(Po).current;ci&&Hi.set(Po,{width:ci.offsetWidth,height:ci.offsetHeight,left:ci.offsetLeft,top:ci.offsetTop})}),Hi})}),qo=Ae.slice(0,Jo),fa=Ae.slice(Qo+1),kn=[].concat(Object(o.a)(qo),Object(o.a)(fa)),ra=Object(h.useState)(),In=Object(u.a)(ra,2),Di=In[0],es=In[1],Ra=Oi.get(Fe),Ao=Object(h.useRef)();function Do(){x.a.cancel(Ao.current)}Object(h.useEffect)(function(){var Wr={};return Ra&&(It?(Ye?Wr.right=Ra.right:Wr.left=Ra.left,Wr.width=Ra.width):(Wr.top=Ra.top,Wr.height=Ra.height)),Do(),Ao.current=x()(function(){es(Wr)}),Do},[Ra,It,Ye]),Object(h.useEffect)(function(){ei()},[Fe,Ra,Oi,It]),Object(h.useEffect)(function(){oo()},[Ye,Mt,Fe,Ae.map(function(Wr){return Wr.key}).join("_")]);var Ro=!!kn.length,ui="".concat(fe,"-nav-wrap"),Fi,Ri,Lo,Bi;return It?Ye?(Ri=Dt>0,Fi=Dt+Kr<bn):(Fi=Dt<0,Ri=-Dt+Kr<bn):(Lo=Qr<0,Bi=-Qr+Za<Gn),h.createElement("div",{ref:Ue,role:"tablist",className:S()("".concat(fe,"-nav"),ge),style:ke,onKeyDown:function(){Ui()}},h.createElement(zt,{position:"left",extra:at,prefixCls:fe}),h.createElement(g.a,{onResize:oo},h.createElement("div",{className:S()(ui,(Ke={},Object(P.a)(Ke,"".concat(ui,"-ping-left"),Fi),Object(P.a)(Ke,"".concat(ui,"-ping-right"),Ri),Object(P.a)(Ke,"".concat(ui,"-ping-top"),Lo),Object(P.a)(Ke,"".concat(ui,"-ping-bottom"),Bi),Ke)),ref:lr},h.createElement(g.a,{onResize:oo},h.createElement("div",{ref:or,className:"".concat(fe,"-nav-list"),style:{transform:"translate(".concat(Dt,"px, ").concat(Qr,"px)"),transition:ji?"none":void 0}},Zo,h.createElement(_a,{ref:Or,prefixCls:fe,locale:ut,editable:ct,style:{visibility:Ro?"hidden":null}}),h.createElement("div",{className:S()("".concat(fe,"-ink-bar"),Object(P.a)({},"".concat(fe,"-ink-bar-animated"),We.inkBar)),style:Di}))))),h.createElement(_i,Object.assign({},Le,{ref:rr,prefixCls:fe,tabs:kn,className:!Ro&&yi})),h.createElement(zt,{position:"right",extra:at,prefixCls:fe}))}var kr=h.forwardRef(Zt);function ir(Le){var Ue=Le.id,Ke=Le.activeKey,Pe=Le.animated,fe=Le.tabPosition,Ae=Le.rtl,ge=Le.destroyInactiveTabPane,ke=h.useContext(ii),Ne=ke.prefixCls,We=ke.tabs,Fe=Pe.tabPane,Ye=We.findIndex(function(at){return at.key===Ke});return h.createElement("div",{className:S()("".concat(Ne,"-content-holder"))},h.createElement("div",{className:S()("".concat(Ne,"-content"),"".concat(Ne,"-content-").concat(fe),Object(P.a)({},"".concat(Ne,"-content-animated"),Fe)),style:Ye&&Fe?Object(P.a)({},Ae?"marginRight":"marginLeft","-".concat(Ye,"00%")):null},We.map(function(at){return h.cloneElement(at.node,{key:at.key,prefixCls:Ne,tabKey:at.key,id:Ue,animated:Fe,active:at.key===Ke,destroyInactiveTabPane:ge})})))}function hn(Le){var Ue=Le.prefixCls,Ke=Le.forceRender,Pe=Le.className,fe=Le.style,Ae=Le.id,ge=Le.active,ke=Le.animated,Ne=Le.destroyInactiveTabPane,We=Le.tabKey,Fe=Le.children,Ye=h.useState(Ke),at=Object(u.a)(Ye,2),ct=at[0],ut=at[1];h.useEffect(function(){ge?ut(!0):Ne&&ut(!1)},[ge,Ne]);var gt={};return ge||(ke?(gt.visibility="hidden",gt.height=0,gt.overflowY="hidden"):gt.display="none"),h.createElement("div",{id:Ae&&"".concat(Ae,"-panel-").concat(We),role:"tabpanel",tabIndex:ge?0:-1,"aria-labelledby":Ae&&"".concat(Ae,"-tab-").concat(We),"aria-hidden":!ge,style:Object(R.a)(Object(R.a)({},gt),fe),className:S()("".concat(Ue,"-tabpane"),ge&&"".concat(Ue,"-tabpane-active"),Pe)},(ge||ct||Ke)&&Fe)}var rn=0;function va(Le){return Object(f.a)(Le).map(function(Ue){if(h.isValidElement(Ue)){var Ke=Ue.key!==void 0?String(Ue.key):void 0;return Object(R.a)(Object(R.a)({key:Ke},Ue.props),{},{node:Ue})}return null}).filter(function(Ue){return Ue})}function On(Le,Ue){var Ke,Pe=Le.id,fe=Le.prefixCls,Ae=fe===void 0?"rc-tabs":fe,ge=Le.className,ke=Le.children,Ne=Le.direction,We=Le.activeKey,Fe=Le.defaultActiveKey,Ye=Le.editable,at=Le.animated,ct=Le.tabPosition,ut=ct===void 0?"top":ct,gt=Le.tabBarGutter,Mt=Le.tabBarStyle,qt=Le.tabBarExtraContent,er=Le.locale,tr=Le.moreIcon,lr=Le.moreTransitionName,or=Le.destroyInactiveTabPane,rr=Le.renderTabBar,Or=Le.onChange,gr=Le.onTabClick,pn=Le.onTabScroll,vr=Object(C.a)(Le,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Ft=va(ke),It=Ne==="rtl",yr;at===!1?yr={inkBar:!1,tabPane:!1}:yr=Object(R.a)({inkBar:!0,tabPane:!1},at!==!0?at:null);var Ar=Object(h.useState)(!1),Dt=Object(u.a)(Ar,2),Dr=Dt[0],mn=Dt[1];Object(h.useEffect)(function(){mn(Na())},[]);var Nr=Object(a.a)(function(){var Yr;return(Yr=Ft[0])===null||Yr===void 0?void 0:Yr.key},{value:We,defaultValue:Fe}),Qr=Object(u.a)(Nr,2),Vr=Qr[0],An=Qr[1],zn=Object(h.useState)(function(){return Ft.findIndex(function(Yr){return Yr.key===Vr})}),bn=Object(u.a)(zn,2),oa=bn[0],Oa=bn[1];Object(h.useEffect)(function(){var Yr=Ft.findIndex(function(Qa){return Qa.key===Vr});if(Yr===-1){var Fa;Yr=Math.max(0,Math.min(oa,Ft.length-1)),An((Fa=Ft[Yr])===null||Fa===void 0?void 0:Fa.key)}Oa(Yr)},[Ft.map(function(Yr){return Yr.key}).join("_"),Vr,oa]);var da=Object(a.a)(null,{value:Pe}),Gn=Object(u.a)(da,2),sn=Gn[0],Zr=Gn[1],xn=ut;Dr&&!["left","right"].includes(ut)&&(xn="top"),Object(h.useEffect)(function(){Pe||(Zr("rc-tabs-".concat(rn)),rn+=1)},[]);function gn(Yr,Fa){gr==null||gr(Yr,Fa),An(Yr),Or==null||Or(Yr)}var Aa={id:sn,activeKey:Vr,animated:yr,tabPosition:xn,rtl:It,mobile:Dr},$a,Ja=Object(R.a)(Object(R.a)({},Aa),{},{editable:Ye,locale:er,moreIcon:tr,moreTransitionName:lr,tabBarGutter:gt,onTabClick:gn,onTabScroll:pn,extra:qt,style:Mt,panes:ke});return rr?$a=rr(Ja,kr):$a=h.createElement(kr,Object.assign({},Ja)),h.createElement(ii.Provider,{value:{tabs:Ft,prefixCls:Ae}},h.createElement("div",Object.assign({ref:Ue,id:Pe,className:S()(Ae,"".concat(Ae,"-").concat(xn),(Ke={},Object(P.a)(Ke,"".concat(Ae,"-mobile"),Dr),Object(P.a)(Ke,"".concat(Ae,"-editable"),Ye),Object(P.a)(Ke,"".concat(Ae,"-rtl"),It),Ke),ge)},vr),$a,h.createElement(ir,Object.assign({destroyInactiveTabPane:or},Aa,{animated:yr}))))}var Pn=h.forwardRef(On);Pn.TabPane=hn;var Un=Pn,Ua=Y.b=Un},kSUc:function(N,Y,k){},lOMy:function(N,Y,k){},lPiR:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.algo,f=[],a=[];(function(){function x(p){for(var d=u.sqrt(p),n=2;n<=d;n++)if(!(p%n))return!1;return!0}function g(p){return(p-(p|0))*4294967296|0}for(var m=2,w=0;w<64;)x(m)&&(w<8&&(f[w]=g(u.pow(m,1/2))),a[w]=g(u.pow(m,1/3)),w++),m++})();var o=[],r=S.SHA256=s.extend({_doReset:function(){this._hash=new h.init(f.slice(0))},_doProcessBlock:function(x,g){for(var m=this._hash.words,w=m[0],p=m[1],d=m[2],n=m[3],l=m[4],c=m[5],T=m[6],v=m[7],i=0;i<64;i++){if(i<16)o[i]=x[g+i]|0;else{var L=o[i-15],A=(L<<25|L>>>7)^(L<<14|L>>>18)^L>>>3,y=o[i-2],E=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;o[i]=A+o[i-7]+E+o[i-16]}var b=l&c^~l&T,_=w&p^w&d^p&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=v+j+b+a[i]+o[i],G=I+_;v=T,T=c,c=l,l=n+M|0,n=d,d=p,p=w,w=M+G|0}m[0]=m[0]+w|0,m[1]=m[1]+p|0,m[2]=m[2]+d|0,m[3]=m[3]+n|0,m[4]=m[4]+l|0,m[5]=m[5]+c|0,m[6]=m[6]+T|0,m[7]=m[7]+v|0},_doFinalize:function(){var x=this._data,g=x.words,m=this._nDataBytes*8,w=x.sigBytes*8;return g[w>>>5]|=128<<24-w%32,g[(w+64>>>9<<4)+14]=u.floor(m/4294967296),g[(w+64>>>9<<4)+15]=m,x.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var x=s.clone.call(this);return x._hash=this._hash.clone(),x}});C.SHA256=s._createHelper(r),C.HmacSHA256=s._createHmacHelper(r)}(Math),P.SHA256})},lZu9:function(N,Y,k){(function(P){P(k("VrN/"),k("1eCo"),k("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(u,C){var R=P.getMode(u,"text/html"),h=R.name=="null";function s(B){if(P.findModeByName){var W=P.findModeByName(B);W&&(B=W.mime||W.mimes[0])}var F=P.getMode(u,B);return F.name=="null"?null:F}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var 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 f in S)S.hasOwnProperty(f)&&C.tokenTypeOverrides[f]&&(S[f]=C.tokenTypeOverrides[f]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,o=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,x=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,g=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\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(B,W,F){return W.f=W.inline=F,F(B,W)}function c(B,W,F){return W.f=W.block=F,F(B,W)}function T(B){return!B||!/\S/.test(B.string)}function v(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==L){var W=h;if(!W){var F=P.innerMode(R,B.htmlState);W=F.mode.name=="xml"&&F.state.tagStart===null&&!F.state.context&&F.state.tokenize.isInText}W&&(B.f=b,B.block=i,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function i(B,W){var F=B.column()===W.indentation,$=T(W.prevLine.stream),ee=W.indentedCode,Z=W.prevLine.hr,ve=W.list!==!1,he=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var le=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,ve)){for(W.list=null;le<W.listStack[W.listStack.length-1];)W.listStack.pop(),W.listStack.length?W.indentation=W.listStack[W.listStack.length-1]:W.list=!1;W.list!==!1&&(W.indentationDiff=le-W.listStack[W.listStack.length-1])}var Re=!$&&!Z&&!W.prevLine.header&&(!ve||!ee)&&!W.prevLine.fencedCodeEnd,xe=(W.list===!1||Z||$)&&W.indentation<=he&&B.match(a),ie=null;if(W.indentationDiff>=4&&(ee||W.prevLine.fencedCodeEnd||W.prevLine.header||$))return B.skipToEnd(),W.indentedCode=!0,S.code;if(B.eatSpace())return null;if(F&&W.indentation<=he&&(ie=B.match(x))&&ie[1].length<=6)return W.quote=0,W.header=ie[1].length,W.thisLine.header=!0,C.highlightFormatting&&(W.formatting="header"),W.f=W.inline,y(W);if(W.indentation<=he&&B.eat(">"))return W.quote=F?1:W.quote+1,C.highlightFormatting&&(W.formatting="quote"),B.eatSpace(),y(W);if(!xe&&!W.setext&&F&&W.indentation<=he&&(ie=B.match(o))){var se=ie[1]?"ol":"ul";return W.indentation=le+B.current().length,W.list=!0,W.quote=0,W.listStack.push(W.indentation),W.em=!1,W.strong=!1,W.code=!1,W.strikethrough=!1,C.taskLists&&B.match(r,!1)&&(W.taskList=!0),W.f=W.inline,C.highlightFormatting&&(W.formatting=["list","list-"+se]),y(W)}else{if(F&&W.indentation<=he&&(ie=B.match(w,!0)))return W.quote=0,W.fencedEndRE=new RegExp(ie[1]+"+ *$"),W.localMode=C.fencedCodeBlockHighlighting&&s(ie[2]||C.fencedCodeBlockDefaultMode),W.localMode&&(W.localState=P.startState(W.localMode)),W.f=W.block=A,C.highlightFormatting&&(W.formatting="code-block"),W.code=-1,y(W);if(W.setext||(!Re||!ve)&&!W.quote&&W.list===!1&&!W.code&&!xe&&!p.test(B.string)&&(ie=B.lookAhead(1))&&(ie=ie.match(g)))return W.setext?(W.header=W.setext,W.setext=0,B.skipToEnd(),C.highlightFormatting&&(W.formatting="header")):(W.header=ie[0].charAt(0)=="="?1:2,W.setext=W.header),W.thisLine.header=!0,W.f=W.inline,y(W);if(xe)return B.skipToEnd(),W.hr=!0,W.thisLine.hr=!0,S.hr;if(B.peek()==="[")return l(B,W,G)}return l(B,W,W.inline)}function L(B,W){var F=R.token(B,W.htmlState);if(!h){var $=P.innerMode(R,W.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||W.md_inside&&B.current().indexOf(">")>-1)&&(W.f=b,W.block=i,W.htmlState=null)}return F}function A(B,W){var F=W.listStack[W.listStack.length-1]||0,$=W.indentation<F,ee=F+3;if(W.fencedEndRE&&W.indentation<=ee&&($||B.match(W.fencedEndRE))){C.highlightFormatting&&(W.formatting="code-block");var Z;return $||(Z=y(W)),W.localMode=W.localState=null,W.block=i,W.f=b,W.fencedEndRE=null,W.code=0,W.thisLine.fencedCodeEnd=!0,$?c(B,W,W.block):Z}else return W.localMode?W.localMode.token(B,W.localState):(B.skipToEnd(),S.code)}function y(B){var W=[];if(B.formatting){W.push(S.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var F=0;F<B.formatting.length;F++)W.push(S.formatting+"-"+B.formatting[F]),B.formatting[F]==="header"&&W.push(S.formatting+"-"+B.formatting[F]+"-"+B.header),B.formatting[F]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=B.quote?W.push(S.formatting+"-"+B.formatting[F]+"-"+B.quote):W.push("error"))}if(B.taskOpen)return W.push("meta"),W.length?W.join(" "):null;if(B.taskClosed)return W.push("property"),W.length?W.join(" "):null;if(B.linkHref?W.push(S.linkHref,"url"):(B.strong&&W.push(S.strong),B.em&&W.push(S.em),B.strikethrough&&W.push(S.strikethrough),B.emoji&&W.push(S.emoji),B.linkText&&W.push(S.linkText),B.code&&W.push(S.code),B.image&&W.push(S.image),B.imageAltText&&W.push(S.imageAltText,"link"),B.imageMarker&&W.push(S.imageMarker)),B.header&&W.push(S.header,S.header+"-"+B.header),B.quote&&(W.push(S.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=B.quote?W.push(S.quote+"-"+B.quote):W.push(S.quote+"-"+C.maxBlockquoteDepth)),B.list!==!1){var $=(B.listStack.length-1)%3;$?$===1?W.push(S.list2):W.push(S.list3):W.push(S.list1)}return B.trailingSpaceNewLine?W.push("trailing-space-new-line"):B.trailingSpace&&W.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),W.length?W.join(" "):null}function E(B,W){return B.match(m,!0)?y(W):void 0}function b(B,W){var F=W.text(B,W);if(typeof F!="undefined")return F;if(W.list)return W.list=null,y(W);if(W.taskList){var $=B.match(r,!0)[1]===" ";return $?W.taskOpen=!0:W.taskClosed=!0,C.highlightFormatting&&(W.formatting="task"),W.taskList=!1,y(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&B.match(/^#+$/,!0))return C.highlightFormatting&&(W.formatting="header"),y(W);var ee=B.next();if(W.linkTitle){W.linkTitle=!1;var Z=ee;ee==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ve="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(B.match(new RegExp(ve),!0))return S.linkHref}if(ee==="`"){var he=W.formatting;C.highlightFormatting&&(W.formatting="code"),B.eatWhile("`");var le=B.current().length;if(W.code==0&&(!W.quote||le==1))return W.code=le,y(W);if(le==W.code){var Re=y(W);return W.code=0,Re}else return W.formatting=he,y(W)}else if(W.code)return y(W);if(ee==="\\"&&(B.next(),C.highlightFormatting)){var xe=y(W),ie=S.formatting+"-escape";return xe?xe+" "+ie:ie}if(ee==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return W.imageMarker=!0,W.image=!0,C.highlightFormatting&&(W.formatting="image"),y(W);if(ee==="["&&W.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,C.highlightFormatting&&(W.formatting="image"),y(W);if(ee==="]"&&W.imageAltText){C.highlightFormatting&&(W.formatting="image");var xe=y(W);return W.imageAltText=!1,W.image=!1,W.inline=W.f=I,xe}if(ee==="["&&!W.image)return W.linkText&&B.match(/^.*?\]/)||(W.linkText=!0,C.highlightFormatting&&(W.formatting="link")),y(W);if(ee==="]"&&W.linkText){C.highlightFormatting&&(W.formatting="link");var xe=y(W);return W.linkText=!1,W.inline=W.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?I:b,xe}if(ee==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,C.highlightFormatting&&(W.formatting="link");var xe=y(W);return xe?xe+=" ":xe="",xe+S.linkInline}if(ee==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,C.highlightFormatting&&(W.formatting="link");var xe=y(W);return xe?xe+=" ":xe="",xe+S.linkEmail}if(C.xml&&ee==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=B.string.indexOf(">",B.pos);if(se!=-1){var re=B.string.substring(B.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(W.md_inside=!0)}return B.backUp(1),W.htmlState=P.startState(R),c(B,W,L)}if(C.xml&&ee==="<"&&B.match(/^\/\w*?>/))return W.md_inside=!1,"tag";if(ee==="*"||ee==="_"){for(var be=1,q=B.pos==1?" ":B.string.charAt(B.pos-2);be<3&&B.eat(ee);)be++;var ne=B.peek()||" ",Te=!/\s/.test(ne)&&(!d.test(ne)||/\s/.test(q)||d.test(q)),ae=!/\s/.test(q)&&(!d.test(q)||/\s/.test(ne)||d.test(ne)),J=null,X=null;if(be%2&&(!W.em&&Te&&(ee==="*"||!ae||d.test(q))?J=!0:W.em==ee&&ae&&(ee==="*"||!Te||d.test(ne))&&(J=!1)),be>1&&(!W.strong&&Te&&(ee==="*"||!ae||d.test(q))?X=!0:W.strong==ee&&ae&&(ee==="*"||!Te||d.test(ne))&&(X=!1)),X!=null||J!=null){C.highlightFormatting&&(W.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(W.em=ee),X===!0&&(W.strong=ee);var Re=y(W);return J===!1&&(W.em=!1),X===!1&&(W.strong=!1),Re}}else if(ee===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return y(W);B.backUp(1)}if(C.strikethrough){if(ee==="~"&&B.eatWhile(ee)){if(W.strikethrough){C.highlightFormatting&&(W.formatting="strikethrough");var Re=y(W);return W.strikethrough=!1,Re}else if(B.match(/^[^\s]/,!1))return W.strikethrough=!0,C.highlightFormatting&&(W.formatting="strikethrough"),y(W)}else if(ee===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return y(W);B.backUp(2)}}if(C.emoji&&ee===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){W.emoji=!0,C.highlightFormatting&&(W.formatting="emoji");var Q=y(W);return W.emoji=!1,Q}return ee===" "&&(B.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),y(W)}function _(B,W){var F=B.next();if(F===">"){W.f=W.inline=b,C.highlightFormatting&&(W.formatting="link");var $=y(W);return $?$+=" ":$="",$+S.linkInline}return B.match(/^[^>]+/,!0),S.linkInline}function I(B,W){if(B.eatSpace())return null;var F=B.next();return F==="("||F==="["?(W.f=W.inline=M(F==="("?")":"]"),C.highlightFormatting&&(W.formatting="link-string"),W.linkHref=!0,y(W)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(B){return function(W,F){var $=W.next();if($===B){F.f=F.inline=b,C.highlightFormatting&&(F.formatting="link-string");var ee=y(F);return F.linkHref=!1,ee}return W.match(j[B]),F.linkHref=!0,y(F)}}function G(B,W){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=K,B.next(),C.highlightFormatting&&(W.formatting="link"),W.linkText=!0,y(W)):l(B,W,b)}function K(B,W){if(B.match(/^\]:/,!0)){W.f=W.inline=H,C.highlightFormatting&&(W.formatting="link");var F=y(W);return W.linkText=!1,F}return B.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function H(B,W){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?W.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),W.f=W.inline=b,S.linkHref+" url")}var z={startState:function(){return{f:i,prevLine:{stream:null},thisLine:{stream:null},block:i,htmlState:null,indentation:0,inline:b,text:E,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(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&P.copyState(R,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?P.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,W){if(W.formatting=!1,B!=W.thisLine.stream){if(W.header=0,W.hr=!1,B.match(/^\s*$/,!0))return v(W),null;if(W.prevLine=W.thisLine,W.thisLine={stream:B},W.taskList=!1,W.trailingSpace=0,W.trailingSpaceNewLine=!1,!W.localState&&(W.f=W.block,W.f!=L)){var F=B.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(W.indentation=F,W.indentationDiff=null,F>0)return null}}return W.f(B,W)},innerMode:function(B){return B.block==L?{state:B.htmlState,mode:R}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:z}},indent:function(B,W,F){return B.block==L&&R.indent?R.indent(B.htmlState,W,F):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,W,F):P.Pass},blankLine:v,getType:y,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"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 Y})(function(){var define,module,exports;return function(){function N(Y,k,P){function u(h,s){if(!k[h]){if(!Y[h]){var S=typeof require=="function"&&require;if(!s&&S)return require(h,!0);if(C)return C(h,!0);var f=new Error("Cannot find module '"+h+"'");throw f.code="MODULE_NOT_FOUND",f}var a=k[h]={exports:{}};Y[h][0].call(a.exports,function(o){var r=Y[h][1][o];return u(r||o)},a,a.exports,N,Y,k,P)}return k[h].exports}for(var C=typeof require=="function"&&require,R=0;R<P.length;R++)u(P[R]);return u}return N}()({1:[function(N,Y,k){"use strict";var P=N("./browser/client");P.Buffer=N("buffer").Buffer,P.urllib=N("../shims/xhr"),P.version=N("./browser/version").version,Y.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(N,Y,k){(function(P,u){"use strict";var C=N("babel-runtime/core-js/promise"),R=a(C),h=N("babel-runtime/regenerator"),s=a(h),S=N("babel-runtime/core-js/object/assign"),f=a(S);function a(G){return G&&G.__esModule?G:{default:G}}var o=N("debug")("ali-oss"),r=N("copy-to"),x=N("xml2js"),g=N("agentkeepalive"),m=N("merge-descriptors"),w=N("url"),p=N("is-type-of"),d=N("platform"),n=N("utility"),l=N("urllib"),c=N("./version"),T=N("bowser"),v=N("../common/signUtils"),i=N("../common/utils/isIP"),L=i.isIP,A=N("../common/client/initOptions"),y=N("../common/utils/createRequest"),E=y.createRequest,b=new g;function _(){var G=d.name,K=d.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function I(){return location&&location.protocol==="https:"}function j(G,K){if(_(),!(this instanceof j))return new j(G,K);G&&G.inited?this.options=G:this.options=j.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=l,this.agent=this.options.agent||b),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Y.exports=j,j.initOptions=function(K){K.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var H=(0,f.default)({secure:I(),useFetch:!1},K);return A(H)};var M=j.prototype;M.debug=o,m(M,N("./object")),m(M,N("../common/bucket/getBucketWebsite")),m(M,N("../common/bucket/putBucketWebsite")),m(M,N("../common/bucket/deleteBucketWebsite")),m(M,N("../common/bucket/getBucketLifecycle")),m(M,N("../common/bucket/putBucketLifecycle")),m(M,N("../common/bucket/deleteBucketLifecycle")),m(M,N("../common/bucket/putBucketVersioning")),m(M,N("../common/bucket/getBucketVersioning")),m(M,N("./managed-upload")),m(M,N("../common/multipart")),m(M,N("../common/parallel")),M.signature=function(K){return this.debug("authorization stringToSign: %s",K,"info"),v.computeSignature(this.options.accessKeySecret,K)},M.authorization=function(K,H,z,B){var W=v.buildCanonicalString(K.toUpperCase(),H,{headers:B,parameters:z});return v.authorization(this.options.accessKeyId,this.options.accessKeySecret,W)},M.request=function(K){var H,z,B,W,F,$;return s.default.async(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return H=E.call(this,K),this.options.useFetch||(H.params.mode="disable-fetch"),z=void 0,B=void 0,W=!!K.stream,Z.prev=5,Z.next=8,s.default.awrap(this.urllib.request(H.url,H.params));case 8:z=Z.sent,this.debug("response %s %s, got %s, headers: %j",K.method,H.url,z.status,z.headers,"info"),Z.next=15;break;case 12:Z.prev=12,Z.t0=Z.catch(5),B=Z.t0;case 15:if(F=void 0,!(z&&K.successStatuses&&K.successStatuses.indexOf(z.status)===-1)){Z.next=28;break}return Z.next=19,s.default.awrap(this.requestError(z));case 19:if(F=Z.sent,!(F.code==="RequestTimeTooSkewed"&&!W)){Z.next=25;break}return this.options.amendTimeSkewed=+new Date(F.serverTime)-new Date,Z.next=24,s.default.awrap(this.request(K));case 24:return Z.abrupt("return",Z.sent);case 25:F.params=K,Z.next=32;break;case 28:if(!B){Z.next=32;break}return Z.next=31,s.default.awrap(this.requestError(B));case 31:F=Z.sent;case 32:if(!F){Z.next=34;break}throw F;case 34:if(!K.xmlResponse){Z.next=39;break}return Z.next=37,s.default.awrap(this.parseXML(z.data));case 37:$=Z.sent,z.data=$;case 39:return Z.abrupt("return",z);case 40:case"end":return Z.stop()}},null,this,[[5,12]])},M._getResource=function(K){var H="/";return K.bucket&&(H+=K.bucket+"/"),K.object&&(H+=K.object),H},M._isIP=L,M._escape=function(K){return n.encodeURIComponent(K).replace(/%2F/g,"/")},M._getReqUrl=function(K){var H={};r(this.options.endpoint).to(H);var z=this._isIP(H.hostname),B=this.options.cname;K.bucket&&!B&&!z&&(H.host=K.bucket+"."+H.host);var W="/";K.bucket&&z&&(W+=K.bucket+"/"),K.object&&(W+=this._escape(K.object).replace(/\+/g,"%2B")),H.pathname=W;var F={};if(K.query&&m(F,K.query),K.subres){var $={};p.string(K.subres)?$[K.subres]="":p.array(K.subres)?K.subres.forEach(function(ee){$[ee]=""}):$=K.subres,m(F,$)}return H.query=F,w.format(H)},M._getUserAgent=function(){var K=u&&u.browser?"js":"nodejs",H="aliyun-sdk-"+K+"/"+c.version,z=d.description;return!z&&u&&(z="Node.js "+u.version.slice(1)+" on "+u.platform+" "+u.arch),this._checkUserAgent(H+" "+z)},M._checkUserAgent=function(K){var H=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return H},M.checkBrowserAndVersion=function(K,H){return T.name===K&&T.version.split(".")[0]===H},M.parseXML=function(K){return new R.default(function(H,z){P.isBuffer(K)&&(K=K.toString()),x.parseString(K,{explicitRoot:!1,explicitArray:!1},function(B,W){B?z(B):H(W)})})},M.requestError=function(K){var H,z,B,W;return s.default.async(function($){for(;;)switch($.prev=$.next){case 0:if(H=null,!(!K.data||!K.data.length)){$.next=5;break}K.status===-1||K.status===-2?(H=new Error(K.message),H.name=K.name,H.status=K.status,H.code=K.name):(K.status===404?(H=new Error("Object not exists"),H.name="NoSuchKeyError",H.status=404,H.code="NoSuchKey"):K.status===412?(H=new Error("Pre condition failed"),H.name="PreconditionFailedError",H.status=412,H.code="PreconditionFailed"):(H=new Error("Unknow error, status: "+K.status),H.name="UnknowError",H.status=K.status),H.requestId=K.headers["x-oss-request-id"],H.host=""),$.next=33;break;case 5:return z=String(K.data),this.debug("request response error data: %s",z,"error"),B=void 0,$.prev=8,$.next=11,s.default.awrap(this.parseXML(z));case 11:if($.t0=$.sent,$.t0){$.next=14;break}$.t0={};case 14:B=$.t0,$.next=24;break;case 17:return $.prev=17,$.t1=$.catch(8),this.debug(z,"error"),$.t1.message+=`
raw xml: `+z,$.t1.status=K.status,$.t1.requestId=K.headers["x-oss-request-id"],$.abrupt("return",$.t1);case 24:W=B.Message||"unknow request error, status: "+K.status,B.Condition&&(W+=" (condition: "+B.Condition+")"),H=new Error(W),H.name=B.Code?B.Code+"Error":"UnknowError",H.status=K.status,H.code=B.Code,H.requestId=B.RequestId,H.hostId=B.HostId,H.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",H,"error"),$.abrupt("return",H);case 35:case"end":return $.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,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/array/from"),C=f(u),R=N("babel-runtime/core-js/promise"),h=f(R),s=N("babel-runtime/regenerator"),S=f(s);function f(v){return v&&v.__esModule?v:{default:v}}var a=N("is-type-of"),o=N("util"),r=N("path"),x=N("mime"),g=N("copy-to"),m=N("../common/utils/isBlob"),w=m.isBlob,p=N("../common/utils/isFile"),d=p.isFile,n=k;n.multipartUpload=function(i,L,A){var y,E,b,_,I,j,M,G,K;return S.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),A=A||{},!(A.checkpoint&&A.checkpoint.uploadId)){z.next=6;break}return z.next=5,S.default.awrap(this._resumeMultipart(A.checkpoint,A));case 5:return z.abrupt("return",z.sent);case 6:return y=100*1024,A.mime||(d(L)?A.mime=x.getType(r.extname(L.name)):w(L)?A.mime=L.type:A.mime=x.getType(r.extname(L))),A.headers=A.headers||{},this._convertMetaToHeaders(A.meta,A.headers),z.next=12,S.default.awrap(this._getFileSize(L));case 12:if(E=z.sent,!(E<y)){z.next=25;break}return b=this._createStream(L,0,E),A.contentLength=E,z.next=18,S.default.awrap(this.putStream(i,b,A));case 18:if(_=z.sent,!(A&&A.progress)){z.next=22;break}return z.next=22,S.default.awrap(A.progress(1));case 22:return I={res:_.res,bucket:this.options.bucket,name:i,etag:_.res.headers.etag},(A.headers&&A.headers["x-oss-callback"]||A.callback)&&(I.data=_.data),z.abrupt("return",I);case 25:if(!(A.partSize&&!(parseInt(A.partSize,10)===A.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(A.partSize&&A.partSize<y)){z.next=29;break}throw new Error("partSize must not be smaller than "+y);case 29:return z.next=31,S.default.awrap(this.initMultipartUpload(i,A));case 31:if(j=z.sent,M=j.uploadId,G=this._getPartSize(E,A.partSize),K={file:L,name:i,fileSize:E,partSize:G,uploadId:M,doneParts:[]},!(A&&A.progress)){z.next=38;break}return z.next=38,S.default.awrap(A.progress(0,K,j.res));case 38:return z.next=40,S.default.awrap(this._resumeMultipart(K,A));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},n._resumeMultipart=function(i,L){var A,y,E,b,_,I,j,M,G,K,H,z,B,W,F,$,ee,Z;return S.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:if(A=this,!this.isCancel()){he.next=3;break}throw this._makeCancelEvent();case 3:return y=i.file,E=i.fileSize,b=i.partSize,_=i.uploadId,I=i.doneParts,j=i.name,M=[],I.length>0&&g(I).to(M),G=this._divideParts(E,b),K=G.length,H=!1,z=function(Re,xe){var ie=this;return new h.default(function(re,be){var q,ne,Te,ae;return S.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Re.isCancel()){X.next=18;break}return q=G[xe-1],ne={stream:Re._createStream(y,q.start,q.end),size:q.end-q.start},X.next=6,S.default.awrap(Re._uploadPart(j,_,xe,ne));case 6:if(Te=X.sent,!(!Re.isCancel()&&!H)){X.next=15;break}if(i.doneParts.push({number:xe,etag:Te.res.headers.etag}),!L.progress){X.next=12;break}return X.next=12,S.default.awrap(L.progress(I.length/K,i,Te.res));case 12:re({number:xe,etag:Te.res.headers.etag}),X.next=16;break;case 15:re();case 16:X.next=19;break;case 18:re();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ae=new Error,ae.name=X.t0.name,ae.message=X.t0.message,ae.stack=X.t0.stack,ae.partNum=xe,g(X.t0).to(ae),be(ae);case 30:case"end":return X.stop()}},null,ie,[[0,21]])})},B=(0,C.default)(new Array(K),function(le,Re){return Re+1}),W=M.map(function(le){return le.number}),F=B.filter(function(le){return W.indexOf(le)<0}),$=5,ee=L.parallel||$,he.next=17,S.default.awrap(this._parallel(F,ee,function(le){return new h.default(function(Re,xe){z(A,le).then(function(ie){ie&&M.push(ie),Re()}).catch(function(ie){xe(ie)})})}));case 17:if(Z=he.sent,H=!0,!this.isCancel()){he.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(Z&&Z.length>0)){he.next=25;break}throw Z[0].message="Failed to upload some parts with error: "+Z[0].toString()+" part_num: "+Z[0].partNum,Z[0];case 25:return he.next=27,S.default.awrap(this.completeMultipartUpload(j,_,M,L));case 27:return he.abrupt("return",he.sent);case 28:case"end":return he.stop()}},null,this)},n._getFileSize=function(i){return S.default.async(function(A){for(;;)switch(A.prev=A.next){case 0:if(!a.buffer(i)){A.next=4;break}return A.abrupt("return",i.length);case 4:if(!(w(i)||d(i))){A.next=6;break}return A.abrupt("return",i.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return A.stop()}},null,this)};var l=N("stream"),c=l.Readable;function T(v,i){if(!(this instanceof T))return new T(v,i);c.call(this,i),this.file=v,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}o.inherits(T,c),T.prototype.readFileAndPush=function(i){if(this.fileBuffer)for(var L=!0;L&&this.fileBuffer&&this.start<this.fileBuffer.length;){var A=this.start,y=A+i;y=y>this.fileBuffer.length?this.fileBuffer.length:y,this.start=y,L=this.push(this.fileBuffer.slice(A,y))}},T.prototype._read=function(i){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;i=i||L;var A=this;this.reader.onload=function(E){A.fileBuffer=P.from(new Uint8Array(E.target.result)),A.file=null,A.readFileAndPush(i)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(i)},n._createStream=function(i,L,A){if(w(i)||d(i))return new T(i.slice(L,A));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(i,L){var A=10*1e3,y=1024*1024;return L?Math.max(Math.ceil(i/A),L):y},n._divideParts=function(i,L){for(var A=Math.ceil(i/L),y=[],E=0;E<A;E++){var b=L*E,_=Math.min(b+L,i);y.push({start:b,end:_})}return y}}).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,Y,k){"use strict";var P=N("babel-runtime/core-js/promise"),u=a(P),C=N("babel-runtime/core-js/object/keys"),R=a(C),h=N("babel-runtime/core-js/object/assign"),s=a(h),S=N("babel-runtime/regenerator"),f=a(S);function a(A){return A&&A.__esModule?A:{default:A}}var o=N("utility"),r=N("fs"),x=N("is-type-of"),g=N("url"),m=N("copy-to"),w=N("path"),p=N("mime"),d=N("../common/callback"),n=N("../common/signUtils"),l=N("merge-descriptors"),c=N("../common/utils/isBlob"),T=c.isBlob,v=N("../common/utils/isFile"),i=v.isFile,L=k;L.append=function(y,E,b){var _;return f.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,f.default.awrap(this.put(y,E,b));case 6:return _=j.sent,_.nextAppendPosition=_.res.headers["x-oss-next-append-position"],j.abrupt("return",_);case 9:case"end":return j.stop()}},null,this)},L.put=function(y,E,b){var _,I,j,M,G,K,H;return f.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(_=void 0,b=b||{},y=this._objectName(y),!x.buffer(E)){B.next=7;break}_=E,B.next=33;break;case 7:if(!(T(E)||i(E))){B.next=32;break}return b.mime||(i(E)?b.mime=p.getType(w.extname(E.name)):b.mime=E.type),I=this._createStream(E,0,E.size),B.next=12,f.default.awrap(this._getFileSize(E));case 12:return b.contentLength=B.sent,B.prev=13,B.next=16,f.default.awrap(this.putStream(y,I,b));case 16:return j=B.sent,B.abrupt("return",j);case 20:if(B.prev=20,B.t0=B.catch(13),!(B.t0.code==="RequestTimeTooSkewed")){B.next=29;break}return this.options.amendTimeSkewed=+new Date(B.t0.serverTime)-new Date,B.next=26,f.default.awrap(this.put(y,E,b));case 26:return B.abrupt("return",B.sent);case 29:throw B.t0;case 30:B.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",G=this._objectRequestParams(M,y,b),d.encodeCallback(G,b),G.mime=b.mime,G.content=_,G.successStatuses=[200],B.next=43,f.default.awrap(this.request(G));case 43:return K=B.sent,H={name:y,url:this._objectUrl(y),res:K.res},G.headers&&G.headers["x-oss-callback"]&&(H.data=JSON.parse(K.data.toString())),B.abrupt("return",H);case 47:case"end":return B.stop()}},null,this,[[13,20]])},L.putStream=function(y,E,b){var _,I,j,M;return f.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return b=b||{},b.headers=b.headers||{},y=this._objectName(y),b.contentLength?b.headers["Content-Length"]=b.contentLength:b.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(b.meta,b.headers),_=b.method||"PUT",I=this._objectRequestParams(_,y,b),d.encodeCallback(I,b),I.mime=b.mime,I.stream=E,I.successStatuses=[200],K.next=13,f.default.awrap(this.request(I));case 13:return j=K.sent,M={name:y,url:this._objectUrl(y),res:j.res},I.headers&&I.headers["x-oss-callback"]&&(M.data=JSON.parse(j.data.toString())),K.abrupt("return",M);case 17:case"end":return K.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(y,E,b){var _;return f.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,f.default.awrap(this.copy(y,y,{meta:E||{},timeout:b&&b.timeout,ctx:b&&b.ctx}));case 2:return _=j.sent,j.abrupt("return",_);case 4:case"end":return j.stop()}},null,this)},L.list=function(y,E){var b,_,I,j,M;return f.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return b=this._objectRequestParams("GET","",E),b.query=y,b.xmlResponse=!0,b.successStatuses=[200],K.next=6,f.default.awrap(this.request(b));case 6:return _=K.sent,I=_.data.Contents,j=this,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(H){return{name:H.Key,url:j._objectUrl(H.Key),lastModified:H.LastModified,etag:H.ETag,type:H.Type,size:Number(H.Size),storageClass:H.StorageClass,owner:{id:H.Owner.ID,displayName:H.Owner.DisplayName}}})),M=_.data.CommonPrefixes||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(H){return H.Prefix})),K.abrupt("return",{res:_.res,objects:I,prefixes:M,nextMarker:_.data.NextMarker||null,isTruncated:_.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},L.restore=function(y,E){var b,_;return f.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return E=E||{},E.subres=(0,s.default)({restore:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),b=this._objectRequestParams("POST",y,E),b.successStatuses=[202],j.next=7,f.default.awrap(this.request(b));case 7:return _=j.sent,j.abrupt("return",{res:_.res});case 9:case"end":return j.stop()}},null,this)},L.signatureUrl=function(y,E){E=E||{},y=this._objectName(y),E.method=E.method||"GET";var b=o.timestamp()+(E.expires||1800),_={bucket:this.options.bucket,object:y},I=this._getResource(_);this.options.stsToken&&(E["security-token"]=this.options.stsToken);var j=n._signatureForURL(this.options.accessKeySecret,E,I,b),M=g.parse(this._getReqUrl(_));return M.query={OSSAccessKeyId:this.options.accessKeyId,Expires:b,Signature:j.Signature},m(j.subResource).to(M.query),M.format()},L.getObjectUrl=function(y,E){return E?E[E.length-1]!=="/"&&(E+="/"):E=this.options.endpoint.format(),E+this._escape(this._objectName(y))},L._objectUrl=function(y){return this._getReqUrl({bucket:this.options.bucket,object:y})},L.generateObjectUrl=function(A,y){if(y)y[y.length-1]!=="/"&&(y+="/");else{y=this.options.endpoint.format();var E=g.parse(y),b=this.options.bucket;E.hostname=b+"."+E.hostname,E.host=b+"."+E.host,y=E.format()}return y+this._escape(this._objectName(A))},L._objectRequestParams=function(y,E,b){if(!this.options.bucket)throw new Error("Please create a bucket first");b=b||{},E=this._objectName(E);var _={object:E,bucket:this.options.bucket,method:y,subres:b&&b.subres,timeout:b&&b.timeout,ctx:b&&b.ctx};return b.headers&&(_.headers={},m(b.headers).to(_.headers)),_},L._objectName=function(y){return y.replace(/^\/+/,"")},L._convertMetaToHeaders=function(y,E){if(!y)return;(0,R.default)(y).forEach(function(b){E["x-oss-meta-"+b]=y[b]})},L._deleteFileSafe=function(y){var E=this;return new u.default(function(b){r.exists(y,function(_){_?r.unlink(y,function(I){I&&E.debug("unlink %j error: %s",y,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,Y,k){"use strict";k.version="6.10.0"},{}],6:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(S){return S&&S.__esModule?S:{default:S}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=k;s.deleteBucketLifecycle=function(f,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return h(f),o=this._bucketRequestParams("DELETE",f,"lifecycle",a),o.successStatuses=[204],g.next=5,u.default.awrap(this.request(o));case 5:return r=g.sent,g.abrupt("return",{res:r.res});case 7:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(S){return S&&S.__esModule?S:{default:S}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=k;s.deleteBucketWebsite=function(f,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return h(f),o=this._bucketRequestParams("DELETE",f,"website",a),o.successStatuses=[204],g.next=5,u.default.awrap(this.request(o));case 5:return r=g.sent,g.abrupt("return",{res:r.res});case 7:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/isArray"),S=s.isArray,f=N("../utils/formatObjKey"),a=f.formatObjKey,o=k;o.getBucketLifecycle=function(x,g){var m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h(x),m=this._bucketRequestParams("GET",x,"lifecycle",g),m.successStatuses=[200],m.xmlResponse=!0,n.next=6,u.default.awrap(this.request(m));case 6:return w=n.sent,p=w.data.Rule||null,p&&(S(p)||(p=[p]),p=p.map(function(l){return l.ID&&(l.id=l.ID,delete l.ID),l.Tag&&!S(l.Tag)&&(l.Tag=[l.Tag]),a(l,"firstLowerCase")})),n.abrupt("return",{rules:p,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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(S){return S&&S.__esModule?S:{default:S}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=k;s.getBucketVersioning=function(f,a){var o,r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return h(f),o=this._bucketRequestParams("GET",f,"versioning",a),o.xmlResponse=!0,o.successStatuses=[200],m.next=6,u.default.awrap(this.request(o));case 6:return r=m.sent,x=r.data.Status,m.abrupt("return",{status:r.status,versionStatus:x,res:r.res});case 9:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(a){return a&&a.__esModule?a:{default:a}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/isObject"),S=s.isObject,f=k;f.getBucketWebsite=function(o,r){var x,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return h(o),x=this._bucketRequestParams("GET",o,"website",r),x.successStatuses=[200],x.xmlResponse=!0,p.next=6,u.default.awrap(this.request(x));case 6:return g=p.sent,m=[],g.data.RoutingRules&&g.data.RoutingRules.RoutingRule&&(S(g.data.RoutingRules.RoutingRule)?m=[g.data.RoutingRules.RoutingRule]:m=g.data.RoutingRules.RoutingRule),p.abrupt("return",{index:g.data.IndexDocument&&g.data.IndexDocument.Suffix||"",supportSubDir:g.data.IndexDocument&&g.data.IndexDocument.SupportSubDir||"false",type:g.data.IndexDocument&&g.data.IndexDocument.Type,routingRules:m,error:g.data.ErrorDocument&&g.data.ErrorDocument.Key||null,res:g.res});case 10:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(i){return i&&i.__esModule?i:{default:i}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/isArray"),S=s.isArray,f=N("../utils/deepCopy"),a=f.deepCopy,o=N("../utils/isObject"),r=o.isObject,x=N("../utils/obj2xml"),g=x.obj2xml,m=N("../utils/checkObjectTag"),w=m.checkObjectTag,p=N("../utils/getStrBytesCount"),d=p.getStrBytesCount,n=k;n.putBucketLifecycle=function(L,A,y){var E,b,_,I,j;return u.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(h(L),S(A)){G.next=3;break}throw new Error("rules must be Array");case 3:return E=this._bucketRequestParams("PUT",L,"lifecycle",y),b=[],_={LifecycleConfiguration:{Rule:b}},A.forEach(function(K){l(K),v(K),K.id&&(K.ID=K.id,delete K.id),b.push(K)}),I=g(_,{headers:!0,firstUpperCase:!0}),E.content=I,E.mime="xml",E.successStatuses=[200],G.next=13,u.default.awrap(this.request(E));case 13:return j=G.sent,G.abrupt("return",{res:j.res});case 15:case"end":return G.stop()}},null,this)};function l(i){i.days&&(i.expiration={days:i.days}),i.date&&(i.expiration={createdBeforeDate:i.date})}function c(i,L){var A=i.days,y=i.createdBeforeDate;if(!A&&!y)throw new Error(L+" must includes days or createdBeforeDate");if(A&&!/^[1-9][0-9]*$/.test(A))throw new Error("days must be a positive integer");if(y&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(y))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function T(i){if(!S(i)&&!r(i))throw new Error("tag must be Object or Array");i=r(i)?[i]:i;var L={},A=a(i);A.forEach(function(y){L[y.key]=y.value}),w(L)}function v(i){if(i.id&&d(i.id)>255)throw new Error("ID is composed of 255 bytes at most");if(i.prefix===""||i.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(i.status))throw new Error("Status must be Enabled or Disabled");if(i.transition){if(!["IA","Archive"].includes(i.transition.storageClass))throw new Error("StorageClass must be IA or Archive");c(i.transition,"Transition")}if(i.expiration){if(!i.expiration.expiredObjectDeleteMarker)c(i.expiration,"Expiration");else if(i.expiration.days||i.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(i.abortMultipartUpload&&c(i.abortMultipartUpload,"AbortMultipartUpload"),!i.expiration&&!i.abortMultipartUpload&&!i.transition&&!i.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(i.tag){if(i.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");T(i.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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(a){return a&&a.__esModule?a:{default:a}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/obj2xml"),S=s.obj2xml,f=k;f.putBucketVersioning=function(o,r){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g,m,w;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(h(o),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return g=this._bucketRequestParams("PUT",o,"versioning",x),m={VersioningConfiguration:{Status:r}},g.mime="xml",g.content=S(m,{headers:!0}),d.next=9,u.default.awrap(this.request(g));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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/obj2xml"),S=s.obj2xml,f=N("../utils/isArray"),a=f.isArray,o=k;o.putBucketWebsite=function(x){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments[2],w,p,d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(h(x),w=this._bucketRequestParams("PUT",x,"website",m),p={Suffix:g.index||"index.html"},d={IndexDocument:p},n={WebsiteConfiguration:d},g.supportSubDir&&(p.SupportSubDir=g.supportSubDir),g.type&&(p.Type=g.type),g.error&&(d.ErrorDocument={Key:g.error}),!(g.routingRules!==void 0)){T.next=12;break}if(a(g.routingRules)){T.next=11;break}throw new Error("RoutingRules must be Array");case 11:d.RoutingRules={RoutingRule:g.routingRules};case 12:return n=S(n),w.content=n,w.mime="xml",w.successStatuses=[200],T.next=18,u.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,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/object/keys"),C=s(u),R=N("babel-runtime/core-js/json/stringify"),h=s(R);function s(S){return S&&S.__esModule?S:{default:S}}k.encodeCallback=function(f,a){if(f.headers=f.headers||{},!Object.prototype.hasOwnProperty.call(f.headers,"x-oss-callback")&&a.callback){var o={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};a.callback.host&&(o.callbackHost=a.callback.host),a.callback.contentType&&(o.callbackBodyType=a.callback.contentType);var r=P.from((0,h.default)(o)).toString("base64");if(f.headers["x-oss-callback"]=r,a.callback.customValue){var x={};(0,C.default)(a.callback.customValue).forEach(function(g){x["x:"+g]=a.callback.customValue[g]}),f.headers["x-oss-callback-var"]=P.from((0,h.default)(x)).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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/assign"),u=C(P);function C(o){return o&&o.__esModule?o:{default:o}}var R=N("humanize-ms"),h=N("url"),s=N("../utils/checkBucketName"),S=s.checkBucketName;function f(o,r){var x=h.parse(o);if(x.protocol||(x=h.parse("http"+(r?"s":"")+"://"+o)),x.protocol!=="http:"&&x.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return x}function a(o,r,x){var g=x?"https://":"http://",m=r?"-internal.aliyuncs.com":".aliyuncs.com",w="vpc100-oss-cn-";return o.substr(0,w.length)===w&&(m=".aliyuncs.com"),h.parse(g+o+m)}Y.exports=function(o){if(!o||!o.accessKeyId||!o.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");o.bucket&&S(o.bucket);var r=(0,u.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},o);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=R(r.timeout)),r.endpoint)r.endpoint=f(r.endpoint,r.secure);else if(r.region)r.endpoint=a(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,Y,k){"use strict";var P=N("merge-descriptors"),u=k;P(u,N("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("querystring"),S=N("js-base64"),f=S.Base64.encode,a=k;a.processObjectSave=function(x,g,m,w){var p,d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return o(x,"sourceObject"),o(g,"targetObject"),o(m,"process"),g=this._objectName(g),w&&h(w),p=this._objectRequestParams("POST",x,{subres:"x-oss-process"}),d=w?",b_"+f(w):"",g=f(g),n={"x-oss-process":m+"|sys/saveas,o_"+g+d},p.content=s.stringify(n),T.next=12,u.default.awrap(this.request(p));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 o(r,x){if(!r)throw new Error(x+" is required");if(typeof r!="string")throw new Error(x+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(a){return a&&a.__esModule?a:{default:a}}var R=N("copy-to"),h=N("./callback"),s=N("./utils/deepCopy"),S=s.deepCopy,f=k;f.listUploads=function(o,r){var x,g,m,w;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},x={},R(r).to(x),x.subres="uploads",g=this._objectRequestParams("GET","",x),g.query=o,g.xmlResponse=!0,g.successStatuses=[200],d.next=10,u.default.awrap(this.request(g));case 10:return m=d.sent,w=m.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:m.res,uploads:w,bucket:m.data.Bucket,nextKeyMarker:m.data.NextKeyMarker,nextUploadIdMarker:m.data.NextUploadIdMarker,isTruncated:m.data.IsTruncated==="true"});case 15:case"end":return d.stop()}},null,this)},f.listParts=function(o,r,x,g){var m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return g=g||{},m={},R(g).to(m),m.subres={uploadId:r},w=this._objectRequestParams("GET",o,m),w.query=x,w.xmlResponse=!0,w.successStatuses=[200],n.next=10,u.default.awrap(this.request(w));case 10:return p=n.sent,n.abrupt("return",{res:p.res,uploadId:p.data.UploadId,bucket:p.data.Bucket,name:p.data.Key,partNumberMarker:p.data.PartNumberMarker,nextPartNumberMarker:p.data.NextPartNumberMarker,maxParts:p.data.MaxParts,isTruncated:p.data.IsTruncated,parts:p.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},f.abortMultipartUpload=function(o,r,x){var g,m,w;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return this._stop(),x=x||{},g={},R(x).to(g),g.subres={uploadId:r},m=this._objectRequestParams("DELETE",o,g),m.successStatuses=[204],d.next=9,u.default.awrap(this.request(m));case 9:return w=d.sent,d.abrupt("return",{res:w.res});case 11:case"end":return d.stop()}},null,this)},f.initMultipartUpload=function(o,r){var x,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r=r||{},x={},R(r).to(x),x.headers=x.headers||{},this._convertMetaToHeaders(r.meta,x.headers),x.subres="uploads",g=this._objectRequestParams("POST",o,x),g.mime=r.mime,g.xmlResponse=!0,g.successStatuses=[200],p.next=12,u.default.awrap(this.request(g));case 12:return m=p.sent,p.abrupt("return",{res:m.res,bucket:m.data.Bucket,name:m.data.Key,uploadId:m.data.UploadId});case 14:case"end":return p.stop()}},null,this)},f.uploadPart=function(o,r,x,g,m,w,p){var d;return u.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return d={stream:this._createStream(g,m,w),size:w-m},l.next=3,u.default.awrap(this._uploadPart(o,r,x,d,p));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},f.completeMultipartUpload=function(o,r,x,g){var m,w,p,d,n,l,c,T;return u.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:for(m=x.concat().sort(function(L,A){return L.number-A.number}).filter(function(L,A,y){return!A||L.number!==y[A-1].number}),w=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,p=0;p<m.length;p++)d=m[p],w+=`<Part>
`,w+="<PartNumber>"+d.number+`</PartNumber>
`,w+="<ETag>"+d.etag+`</ETag>
`,w+=`</Part>
`;return w+="</CompleteMultipartUpload>",g=g||{},n={},n=S(g),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},l=this._objectRequestParams("POST",o,n),h.encodeCallback(l,n),l.mime="xml",l.content=w,l.headers&&l.headers["x-oss-callback"]||(l.xmlResponse=!0),l.successStatuses=[200],i.next=17,u.default.awrap(this.request(l));case 17:return c=i.sent,T={res:c.res,bucket:l.bucket,name:o,etag:c.res.headers.etag},l.headers&&l.headers["x-oss-callback"]&&(T.data=JSON.parse(c.data.toString())),i.abrupt("return",T);case 21:case"end":return i.stop()}},null,this)},f._uploadPart=function(o,r,x,g,m){var w,p,d;return u.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return m=m||{},w={},R(m).to(w),w.headers={"Content-Length":g.size},w.subres={partNumber:x,uploadId:r},p=this._objectRequestParams("PUT",o,w),p.mime=w.mime,p.stream=g.stream,p.successStatuses=[200],l.next=11,u.default.awrap(this.request(p));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 g.stream=null,p.stream=null,l.abrupt("return",{name:o,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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=S(P),C=N("babel-runtime/core-js/object/keys"),R=S(C),h=N("babel-runtime/helpers/typeof"),s=S(h);function S(r){return r&&r.__esModule?r:{default:r}}var f=N("../utils/checkBucketName"),a=f.checkBucketName,o=k;o.copy=function(x,g,m,w){var p,d,n;return u.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return(typeof m=="undefined"?"undefined":(0,s.default)(m))==="object"&&(w=m),w=w||{},w.headers=w.headers||{},(0,R.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),g=this._getSourceName(g,m),w.versionId&&(g=g+"?versionId="+w.versionId),w.headers["x-oss-copy-source"]=g,p=this._objectRequestParams("PUT",x,w),p.xmlResponse=!0,p.successStatuses=[200,304],c.next=14,u.default.awrap(this.request(p));case 14:return d=c.sent,n=d.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),c.abrupt("return",{data:n,res:d.res});case 18:case"end":return c.stop()}},null,this)},o._getSourceName=function(x,g){return typeof g=="string"?x=this._objectName(x):x[0]!=="/"?g=this.options.bucket:(g=x.replace(/\/(.+?)(\/.*)/,"$1"),x=x.replace(/(\/.+?\/)(.*)/,"$2")),a(g),x=encodeURI(x),x="/"+g+"/"+x,x}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.delete=function(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,R.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),o=this._objectRequestParams("DELETE",f,a),o.successStatuses=[204],g.next=6,u.default.awrap(this.request(o));case 6:return r=g.sent,g.abrupt("return",{res:r.res});case 8:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(o){return o&&o.__esModule?o:{default:o}}var s=N("utility"),S=N("../utils/obj2xml"),f=S.obj2xml,a=k;a.deleteMulti=function(r){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,w,p,d,n,l,c,T,v,i,L;return u.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(g=[],!(!r||!r.length)){y.next=3;break}throw new Error("names is required");case 3:for(m=0;m<r.length;m++)w={},typeof r[m]=="string"?w.Key=s.escape(this._objectName(r[m])):(p=r[m],d=p.key,n=p.versionId,w.Key=s.escape(this._objectName(d)),w.VersionId=n),g.push(w);return l={Delete:{Quiet:!!x.quiet,Object:g}},c=f(l,{headers:!0}),x.subres=(0,R.default)({delete:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),T=this._objectRequestParams("POST","",x),T.mime="xml",T.content=c,T.xmlResponse=!0,T.successStatuses=[200],y.next=15,u.default.awrap(this.request(T));case 15:return v=y.sent,i=v.data,L=i&&i.Deleted||null,L&&(Array.isArray(L)||(L=[L])),y.abrupt("return",{res:v.res,deleted:L||[]});case 20:case"end":return y.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.deleteObjectTagging=function(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,R.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),f=this._objectName(f),o=this._objectRequestParams("DELETE",f,a),o.successStatuses=[204],g.next=7,u.default.awrap(this.request(o));case 7:return r=g.sent,g.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(a){return a&&a.__esModule?a:{default:a}}var s=N("fs"),S=N("is-type-of"),f=k;f.get=function(o,r){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g,m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return g=null,m=!1,S.writableStream(r)?g=r:S.string(r)?(g=s.createWriteStream(r),m=!0):x=r,x=x||{},x.subres=(0,R.default)({},x.subres),x.versionId&&(x.subres.versionId=x.versionId),x.process&&(x.subres["x-oss-process"]=x.process),w=void 0,n.prev=8,p=this._objectRequestParams("GET",o,x),p.writeStream=g,p.successStatuses=[200,206,304],n.next=14,u.default.awrap(this.request(p));case 14:w=n.sent,m&&g.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!m){n.next=24;break}return g.destroy(),n.next=24,u.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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getACL=function(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,R.default)({acl:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),f=this._objectName(f),o=this._objectRequestParams("GET",f,a),o.successStatuses=[200],o.xmlResponse=!0,g.next=8,u.default.awrap(this.request(o));case 8:return r=g.sent,g.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 g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=S(P),C=N("babel-runtime/regenerator"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(p){return p&&p.__esModule?p:{default:p}}var f=k,a=N("../utils/isObject"),o=a.isObject,r=N("../utils/isArray"),x=r.isArray;f.getBucketVersions=g,f.listObjectVersions=g;function g(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,l,c,T,v,i;return R.default.async(function(A){for(;;)switch(A.prev=A.next){case 0:if(!(p.versionIdMarker&&p.keyMarker===void 0)){A.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(p),A.next=10,R.default.awrap(this.request(n));case 10:return l=A.sent,c=l.data.Version||[],T=l.data.DeleteMarker||[],v=this,c&&(Array.isArray(c)||(c=[c]),c=c.map(function(y){return{name:y.Key,url:v._objectUrl(y.Key),lastModified:y.LastModified,isLatest:y.IsLatest==="true",versionId:y.VersionId,etag:y.ETag,type:y.Type,size:Number(y.Size),storageClass:y.StorageClass,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),T&&(x(T)||(T=[T]),T=T.map(function(y){return{name:y.Key,lastModified:y.LastModified,versionId:y.VersionId,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),i=l.data.CommonPrefixes||null,i&&(x(i)||(i=[i]),i=i.map(function(y){return y.Prefix})),A.abrupt("return",{res:l.res,objects:c,deleteMarker:T,prefixes:i,nextMarker:l.data.NextMarker||null,NextVersionIdMarker:l.data.NextVersionIdMarker||null,isTruncated:l.data.IsTruncated==="true"});case 19:case"end":return A.stop()}},null,this)}function m(p){return p.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};return o(p)&&(0,u.default)(p).forEach(function(n){d[m(n)]=p[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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getObjectMeta=function(f,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a=a||{},f=this._objectName(f),a.subres=(0,R.default)({objectMeta:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),o=this._objectRequestParams("HEAD",f,a),o.successStatuses=[200],g.next=8,u.default.awrap(this.request(o));case 8:return r=g.sent,g.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(a){return a&&a.__esModule?a:{default:a}}var s=k,S=N("../utils/isObject"),f=S.isObject;s.getObjectTagging=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x,g,m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return r.subres=(0,R.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),o=this._objectName(o),x=this._objectRequestParams("GET",o,r),x.successStatuses=[200],n.next=7,u.default.awrap(this.request(x));case 7:return g=n.sent,n.next=10,u.default.awrap(this.parseXML(g.data));case 10:return m=n.sent,w=m.TagSet.Tag,w=w&&f(w)?[w]:w||[],p={},w.forEach(function(l){p[l.Key]=l.Value}),n.abrupt("return",{status:g.status,res:g.res,tag:p});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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getSymlink=function(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return a.subres=(0,R.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),f=this._objectName(f),o=this._objectRequestParams("GET",f,a),o.successStatuses=[200],m.next=7,u.default.awrap(this.request(o));case 7:return r=m.sent,x=r.res.headers["x-oss-symlink-target"],m.abrupt("return",{targetName:decodeURIComponent(x),res:r.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=S(P),C=N("babel-runtime/core-js/object/keys"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(a){return a&&a.__esModule?a:{default:a}}var f=k;f.head=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r.subres=(0,s.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),x=this._objectRequestParams("HEAD",o,r),x.successStatuses=[200,304],p.next=6,u.default.awrap(this.request(x));case 6:return g=p.sent,m={meta:null,res:g.res,status:g.status},g.status===200&&(0,R.default)(g.headers).forEach(function(d){d.indexOf("x-oss-meta-")===0&&(m.meta||(m.meta={}),m.meta[d.substring(11)]=g.headers[d])}),p.abrupt("return",m);case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.putACL=function(f,a,o){var r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o=o||{},o.subres=(0,R.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.headers=o.headers||{},o.headers["x-oss-object-acl"]=a,f=this._objectName(f),r=this._objectRequestParams("PUT",f,o),r.successStatuses=[200],m.next=10,u.default.awrap(this.request(r));case 10:return x=m.sent,m.abrupt("return",{res:x.res});case 12:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=S(P),C=N("babel-runtime/core-js/object/keys"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(g){return g&&g.__esModule?g:{default:g}}var f=N("../utils/obj2xml"),a=f.obj2xml,o=N("../utils/checkObjectTag"),r=o.checkObjectTag,x=k;x.putObjectTagging=function(m,w){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return r(w),p.subres=(0,s.default)({tagging:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),m=this._objectName(m),d=this._objectRequestParams("PUT",m,p),d.successStatuses=[200],w=(0,R.default)(w).map(function(v){return{Key:v,Value:w[v]}}),n={Tagging:{TagSet:{Tag:w}}},d.mime="xml",d.content=a(n),T.next=12,u.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,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.putSymlink=function(f,a,o){var r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o=o||{},o.headers=o.headers||{},a=this._escape(this._objectName(a)),this._convertMetaToHeaders(o.meta,o.headers),o.headers["x-oss-symlink-target"]=a,o.subres=(0,R.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.storageClass&&(o.headers["x-oss-storage-class"]=o.storageClass),f=this._objectName(f),r=this._objectRequestParams("PUT",f,o),r.successStatuses=[200],m.next=13,u.default.awrap(this.request(r));case 13:return x=m.sent,m.abrupt("return",{res:x.res});case 15:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/promise"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s._parallelNode=function(f,a,o,r){var x,g,m,w,p,d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:x=this,g=[],m=[],w=f.length/a,p=f.length%a,d=p===0?w:(f.length-p)/a+1,n=1,l=0;case 8:if(!(l<f.length)){T.next=26;break}if(!x.isCancel()){T.next=11;break}return T.abrupt("break",26);case 11:if(r?m.push(o(x,f[l],r)):m.push(o(x,f[l])),!(m.length===a||n===d&&l===f.length-1)){T.next=23;break}return T.prev=13,n+=1,T.next=17,u.default.awrap(R.default.all(m));case 17:T.next=22;break;case 19:T.prev=19,T.t0=T.catch(13),g.push(T.t0);case 22:m=[];case 23:l++,T.next=8;break;case 26:return T.abrupt("return",g);case 27:case"end":return T.stop()}},null,this,[[13,19]])},s._parallel=function(f,a,o){var r=this;return new R.default(function(x){var g=[];if(a<=0||!f){x(g);return}function m(i){return function(){if(i===null)throw new Error("Callback was already called.");var L=i;i=null;for(var A=arguments.length,y=Array(A),E=0;E<A;E++)y[E]=arguments[E];L.apply(this,y)}}function w(i){var L=-1,A=i.length;return function(){return++L<A&&!r.isCancel()?{value:i[L],key:L}:null}}var p=w(f),d=!1,n=0,l=!1;function c(i,L){n-=1,i?(d=!0,g.push(i),x(g)):L==={}||d&&n<=0?(d=!0,x(g)):l||(r.isCancel()?x(g):v())}function T(i,L){o(i).then(function(A){L(null,A)}).catch(function(A){L(A)})}function v(){for(l=!0;n<a&&!d&&!r.isCancel();){var i=p();if(i===null||g.length>0){d=!0,n<=0&&x(g);return}n+=1,T(i.value,m(c))}l=!1}v()})},s.cancel=function(f){this.options.cancelFlag=!0,f&&this.abortMultipartUpload(f.name,f.uploadId,f.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 f={status:0,name:"cancel"};return f}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/json/stringify"),C=s(u),R=N("babel-runtime/core-js/object/keys"),h=s(R);function s(a){return a&&a.__esModule?a:{default:a}}var S=N("./../../shims/crypto/crypto.js"),f=N("is-type-of");k.buildCanonicalizedResource=function(o,r){var x=""+o,g="?";if(f.string(r)&&r.trim()!=="")x+=g+r;else if(f.array(r))r.sort(),x+=g+r.join("&");else if(r){var m=function(d,n){return d[0]>n[0]?1:d[0]<n[0]?-1:0},w=function(d){x+=g+d,r[d]&&(x+="="+r[d]),g="&"};(0,h.default)(r).sort(m).forEach(w)}return x},k.buildCanonicalString=function(o,r,x,g){x=x||{};var m=x.headers||{},w="x-oss-",p=[],d={},n=[o.toUpperCase(),m["Content-Md5"]||"",m["Content-Type"]||m["Content-Type".toLowerCase()],g||m["x-oss-date"]];return(0,h.default)(m).forEach(function(l){var c=l.toLowerCase();c.indexOf(w)===0&&(d[c]=String(m[l]).trim())}),(0,h.default)(d).sort().forEach(function(l){p.push(l+":"+d[l])}),n=n.concat(p),n.push(this.buildCanonicalizedResource(r,x.parameters)),n.join(`
`)},k.computeSignature=function(o,r){var x=S.createHmac("sha1",o);return x.update(P.from(r,"utf8")).digest("base64")},k.authorization=function(o,r,x){return"OSS "+o+":"+this.computeSignature(r,x)},k._signatureForURL=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=arguments[2],g=arguments[3],m={},w=r.subResource,p=w===void 0?{}:w;if(r.process){var d="x-oss-process";p[d]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";p[n]=r.trafficLimit}if(r.response&&(0,h.default)(r.response).forEach(function(v){var i="response-"+v.toLowerCase();p[i]=r.response[v]}),(0,h.default)(r).forEach(function(v){var i=v.toLowerCase(),L=r[v];i.indexOf("x-oss-")===0?m[i]=L:(i.indexOf("content-md5")===0||i.indexOf("content-type")===0)&&(m[v]=L)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(p["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),p.callback=P.from((0,C.default)(l)).toString("base64"),r.callback.customValue){var c={};(0,h.default)(r.callback.customValue).forEach(function(v){c["x:"+v]=r.callback.customValue[v]}),p["callback-var"]=P.from((0,C.default)(c)).toString("base64")}}var T=this.buildCanonicalString(r.method,x,{headers:m,parameters:p},g.toString());return{Signature:this.computeSignature(o,T),subResource:p}}}).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,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkBucketName=void 0,k.checkBucketName=function(P,u){var C=u?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/entries"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(k,"__esModule",{value:!0}),k.checkObjectTag=void 0;var R=N("./checkValid"),h=R.checkValid,s=N("./isObject"),S=s.isObject,f=[{validator:function(x){if(typeof x!="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 (/)"}],a={key:[].concat(f,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(f,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function o(r){if(!S(r))throw new Error("tag must be Object");var x=(0,u.default)(r);if(x.length>10)throw new Error("maximum of 10 tags for a object");var g=["key","value"];x.forEach(function(m){m.forEach(function(w,p){h(w,a[g[p]])})})}k.checkObjectTag=o},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(N,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkValid=void 0;function P(u,C){C.forEach(function(R){if(R.validator)R.validator(u);else if(R.pattern&&!R.pattern.test(u))throw new Error(R.msg)})}k.checkValid=P},{}],38:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/object/assign"),C=R(u);function R(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(k,"__esModule",{value:!0}),k.createRequest=void 0;var h=N("./../../../shims/crypto/crypto.js"),s=N("debug")("ali-oss"),S=N("mime"),f=N("dateformat"),a=N("copy-to"),o=N("path");function r(m,w){return m[w]||m[w.toLowerCase()]}function x(m,w){delete m[w],delete m[w.toLowerCase()]}function g(m){var w=new Date;this.options.amendTimeSkewed&&(w=+new Date+this.options.amendTimeSkewed);var p={"x-oss-date":f(w,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(p["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(p,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(p["x-oss-security-token"]=this.options.stsToken),a(m.headers).to(p),r(p,"Content-Type")||(m.mime&&m.mime.indexOf("/")>0?p["Content-Type"]=m.mime:p["Content-Type"]=S.getType(m.mime||o.extname(m.object||""))),r(p,"Content-Type")||x(p,"Content-Type"),m.content&&(p["Content-Md5"]=h.createHash("md5").update(P.from(m.content,"utf8")).digest("base64"),p["Content-Length"]||(p["Content-Length"]=m.content.length));var d=this._getResource(m);p.authorization=this.authorization(m.method,d,m.subres,p);var n=this._getReqUrl(m);s("request %s %s, with headers %j, !!stream: %s",m.method,n,p,!!m.stream);var l=m.timeout||this.options.timeout,c={method:m.method,content:m.content,stream:m.stream,headers:p,timeout:l,writeStream:m.writeStream,customResponse:m.customResponse,ctx:m.ctx||this.ctx};return this.agent&&(c.agent=this.agent),this.httpsAgent&&(c.httpsAgent=this.httpsAgent),{url:n,params:c}}k.createRequest=g}).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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=h(P),C=N("babel-runtime/helpers/typeof"),R=h(C);function h(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,R.default)(s))!=="object")return s;var S=Array.isArray(s)?[]:{};return(0,u.default)(s).forEach(function(f){S[f]=k.deepCopy(s[f])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=h(P),C=N("babel-runtime/helpers/typeof"),R=h(C);function h(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(k,"__esModule",{value:!0}),k.formatObjKey=void 0;function s(f,a){if(f===null||(typeof f=="undefined"?"undefined":(0,R.default)(f))!=="object")return f;var o=void 0;if(Array.isArray(f)){o=[];for(var r=0;r<f.length;r++)o.push(s(f[r],a))}else o={},(0,u.default)(f).forEach(function(x){o[S(x,a)]=s(f[x],a)});return o}k.formatObjKey=s;function S(f,a){return a==="firstUpperCase"?f=f.replace(/^./,function(o){return o.toUpperCase()}):a==="firstLowerCase"&&(f=f.replace(/^./,function(o){return o.toLowerCase()})),f}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(N,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.getStrBytesCount=void 0;function P(u){for(var C=0,R=0;R<u.length;R++){var h=u.charAt(R);/^[\u00-\uff]$/.test(h)?C+=1:C+=2}return C}k.getStrBytesCount=P},{}],42:[function(N,Y,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,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isBlob=void 0;function P(u){return typeof Blob!="undefined"&&u instanceof Blob}k.isBlob=P},{}],44:[function(N,Y,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,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.isIP=void 0,k.isIP=function(P){var u=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,C=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return u.test(P)||C.test(P)}},{}],46:[function(N,Y,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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=C(P);function C(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(k,"__esModule",{value:!0}),k.obj2xml=void 0;var R=N("./formatObjKey");function h(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function s(S,f){var a="";return f&&f.headers&&(a=`<?xml version="1.0" encoding="UTF-8"?>
`),f&&f.firstUpperCase&&(S=R.formatObjKey(S,"firstUpperCase")),h(S)==="object"?(0,u.default)(S).forEach(function(o){h(S[o])==="string"||h(S[o])==="number"?a+="<"+o+">"+S[o]+"</"+o+">":h(S[o])==="object"?a+="<"+o+">"+s(S[o])+"</"+o+">":h(S[o])==="array"?a+=S[o].map(function(r){return"<"+o+">"+s(r)+"</"+o+">"}).join(""):a+="<"+o+">"+S[o].toString()+"</"+o+">"}):a+=S.toString(),a}k.obj2xml=s},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(N,Y,k){Y.exports=P,Y.exports.HttpsAgent=P;function P(){}},{}],49:[function(N,Y,k){Y.exports=N("./register")().Promise},{"./register":51}],50:[function(N,Y,k){"use strict";var P="@@any-promise/REGISTRATION",u=null;Y.exports=function(C,R){return function(s,S){s=s||null,S=S||{};var f=S.global!==!1;if(u===null&&f&&(u=C[P]||null),u!==null&&s!==null&&u.implementation!==s)throw new Error('any-promise already defined as "'+u.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return u===null&&(s!==null&&typeof S.Promise!="undefined"?u={Promise:S.Promise,implementation:s}:u=R(s),f&&(C[P]=u)),u}}},{}],51:[function(N,Y,k){"use strict";Y.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,Y,k){Y.exports={default:N("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(N,Y,k){Y.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,Y,k){Y.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,Y,k){Y.exports={default:N("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(N,Y,k){Y.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,Y,k){Y.exports={default:N("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(N,Y,k){"use strict";k.__esModule=!0;var P=N("../core-js/symbol/iterator"),u=s(P),C=N("../core-js/symbol"),R=s(C),h=typeof R.default=="function"&&typeof u.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof R.default=="function"&&S.constructor===R.default&&S!==R.default.prototype?"symbol":typeof S};function s(S){return S&&S.__esModule?S:{default:S}}k.default=typeof R.default=="function"&&h(u.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":h(S)}:function(S){return S&&typeof R.default=="function"&&S.constructor===R.default&&S!==R.default.prototype?"symbol":typeof S=="undefined"?"undefined":h(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(N,Y,k){Y.exports=N("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(N,Y,k){"use strict";k.byteLength=f,k.toByteArray=o,k.fromByteArray=g;for(var P=[],u=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,s=R.length;h<s;++h)P[h]=R[h],u[R.charCodeAt(h)]=h;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63;function S(m){var w=m.length;if(w%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=m.indexOf("=");p===-1&&(p=w);var d=p===w?0:4-p%4;return[p,d]}function f(m){var w=S(m),p=w[0],d=w[1];return(p+d)*3/4-d}function a(m,w,p){return(w+p)*3/4-p}function o(m){var w,p=S(m),d=p[0],n=p[1],l=new C(a(m,d,n)),c=0,T=n>0?d-4:d,v;for(v=0;v<T;v+=4)w=u[m.charCodeAt(v)]<<18|u[m.charCodeAt(v+1)]<<12|u[m.charCodeAt(v+2)]<<6|u[m.charCodeAt(v+3)],l[c++]=w>>16&255,l[c++]=w>>8&255,l[c++]=w&255;return n===2&&(w=u[m.charCodeAt(v)]<<2|u[m.charCodeAt(v+1)]>>4,l[c++]=w&255),n===1&&(w=u[m.charCodeAt(v)]<<10|u[m.charCodeAt(v+1)]<<4|u[m.charCodeAt(v+2)]>>2,l[c++]=w>>8&255,l[c++]=w&255),l}function r(m){return P[m>>18&63]+P[m>>12&63]+P[m>>6&63]+P[m&63]}function x(m,w,p){for(var d,n=[],l=w;l<p;l+=3)d=(m[l]<<16&16711680)+(m[l+1]<<8&65280)+(m[l+2]&255),n.push(r(d));return n.join("")}function g(m){for(var w,p=m.length,d=p%3,n=[],l=16383,c=0,T=p-d;c<T;c+=l)n.push(x(m,c,c+l>T?T:c+l));return d===1?(w=m[p-1],n.push(P[w>>2]+P[w<<4&63]+"==")):d===2&&(w=(m[p-2]<<8)+m[p-1],n.push(P[w>>10]+P[w>>4&63]+P[w<<2&63]+"=")),n.join("")}},{}],70:[function(N,Y,k){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(P,u,C){typeof Y!="undefined"&&Y.exports?Y.exports=C():typeof define=="function"&&define.amd?define(u,C):P[u]=C()}(this,"bowser",function(){var P=!0;function u(a){function o(z){var B=a.match(z);return B&&B.length>1&&B[1]||""}function r(z){var B=a.match(z);return B&&B.length>1&&B[2]||""}var x=o(/(ipod|iphone|ipad)/i).toLowerCase(),g=/like android/i.test(a),m=!g&&/android/i.test(a),w=/nexus\s*[0-6]\s*/i.test(a),p=!w&&/nexus\s*[0-9]+/i.test(a),d=/CrOS/.test(a),n=/silk/i.test(a),l=/sailfish/i.test(a),c=/tizen/i.test(a),T=/(web|hpw)(o|0)s/i.test(a),v=/windows phone/i.test(a),i=/SamsungBrowser/i.test(a),L=!v&&/windows/i.test(a),A=!x&&!n&&/macintosh/i.test(a),y=!m&&!l&&!c&&!T&&/linux/i.test(a),E=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),b=o(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(a)&&!/tablet pc/i.test(a),I=!_&&/[^-]mobi/i.test(a),j=/xbox/i.test(a),M;/opera/i.test(a)?M={name:"Opera",opera:P,version:b||o(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(a)?M={name:"Opera",opera:P,version:o(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||b}:/SamsungBrowser/i.test(a)?M={name:"Samsung Internet for Android",samsungBrowser:P,version:b||o(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(a)?M={name:"NAVER Whale browser",whale:P,version:o(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(a)?M={name:"MZ Browser",mzbrowser:P,version:o(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(a)?M={name:"Opera Coast",coast:P,version:b||o(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(a)?M={name:"Focus",focus:P,version:o(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(a)?M={name:"Yandex Browser",yandexbrowser:P,version:b||o(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(a)?M={name:"UC Browser",ucbrowser:P,version:o(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(a)?M={name:"Maxthon",maxthon:P,version:o(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(a)?M={name:"Epiphany",epiphany:P,version:o(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(a)?M={name:"Puffin",puffin:P,version:o(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(a)?M={name:"Sleipnir",sleipnir:P,version:o(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(a)?M={name:"K-Meleon",kMeleon:P,version:o(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},E?(M.msedge=P,M.version=E):(M.msie=P,M.version=o(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?M={name:"Internet Explorer",msie:P,version:o(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?M={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(a)?M={name:"Microsoft Edge",msedge:P,version:E}:/vivaldi/i.test(a)?M={name:"Vivaldi",vivaldi:P,version:o(/vivaldi\/(\d+(\.\d+)?)/i)||b}:l?M={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:o(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?M={name:"SeaMonkey",seamonkey:P,version:o(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(a)?(M={name:"Firefox",firefox:P,version:o(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(M.firefoxos=P,M.osname="Firefox OS")):n?M={name:"Amazon Silk",silk:P,version:o(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(a)?M={name:"PhantomJS",phantom:P,version:o(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(a)?M={name:"SlimerJS",slimer:P,version:o(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:b||o(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:T?(M={name:"WebOS",osname:"WebOS",webos:P,version:b||o(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(M.touchpad=P)):/bada/i.test(a)?M={name:"Bada",osname:"Bada",bada:P,version:o(/dolfin\/(\d+(\.\d+)?)/i)}:c?M={name:"Tizen",osname:"Tizen",tizen:P,version:o(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||b}:/qupzilla/i.test(a)?M={name:"QupZilla",qupzilla:P,version:o(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||b}:/chromium/i.test(a)?M={name:"Chromium",chromium:P,version:o(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||b}:/chrome|crios|crmo/i.test(a)?M={name:"Chrome",chrome:P,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:m?M={name:"Android",version:b}:/safari|applewebkit/i.test(a)?(M={name:"Safari",safari:P},b&&(M.version=b)):x?(M={name:x=="iphone"?"iPhone":x=="ipad"?"iPad":"iPod"},b&&(M.version=b)):/googlebot/i.test(a)?M={name:"Googlebot",googlebot:P,version:o(/googlebot\/(\d+(\.\d+))/i)||b}:M={name:o(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!M.msedge&&/(apple)?webkit/i.test(a)?(/(apple)?webkit\/537\.36/i.test(a)?(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(a)&&(M.name=M.name||"Gecko",M.gecko=P,M.version=M.version||o(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(m||M.silk)?(M.android=P,M.osname="Android"):!M.windowsphone&&x?(M[x]=P,M.ios=P,M.osname="iOS"):A?(M.mac=P,M.osname="macOS"):j?(M.xbox=P,M.osname="Xbox"):L?(M.windows=P,M.osname="Windows"):y&&(M.linux=P,M.osname="Linux");function G(z){switch(z){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var K="";M.windows?K=G(o(/Windows ((NT|XP)( \d\d?.\d)?)/i)):M.windowsphone?K=o(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):M.mac?(K=o(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):x?(K=o(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):m?K=o(/android[ \/-](\d+(\.\d+)*)/i):M.webos?K=o(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):M.blackberry?K=o(/rim\stablet\sos\s(\d+(\.\d+)*)/i):M.bada?K=o(/bada\/(\d+(\.\d+)*)/i):M.tizen&&(K=o(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(M.osversion=K);var H=!M.windows&&K.split(".")[0];return _||p||x=="ipad"||m&&(H==3||H>=4&&!I)||M.silk?M.tablet=P:(I||x=="iphone"||x=="ipod"||m||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=u(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(a){for(var o=0;o<a.length;++o){var r=a[o];if(typeof r=="string"&&r in C)return!0}return!1};function R(a){return a.split(".").length}function h(a,o){var r=[],x;if(Array.prototype.map)return Array.prototype.map.call(a,o);for(x=0;x<a.length;x++)r.push(o(a[x]));return r}function s(a){for(var o=Math.max(R(a[0]),R(a[1])),r=h(a,function(x){var g=o-R(x);return x=x+new Array(g+1).join(".0"),h(x.split("."),function(m){return new Array(20-m.length).join("0")+m}).reverse()});--o>=0;){if(r[0][o]>r[1][o])return 1;if(r[0][o]===r[1][o]){if(o===0)return 0}else return-1}}function S(a,o,r){var x=C;typeof o=="string"&&(r=o,o=void 0),o===void 0&&(o=!1),r&&(x=u(r));var g=""+x.version;for(var m in a)if(a.hasOwnProperty(m)&&x[m]){if(typeof a[m]!="string")throw new Error("Browser version in the minVersion map should be a string: "+m+": "+String(a));return s([g,a[m]])<0}return o}function f(a,o,r){return!S(a,o,r)}return C.isUnsupportedBrowser=S,C.compareVersions=s,C.check=f,C._detect=u,C.detect=u,C})},{}],71:[function(N,Y,k){},{}],72:[function(N,Y,k){var P=N("buffer").Buffer,u=P.isEncoding||function(f){switch(f&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(f){if(f&&!u(f))throw new Error("Unknown encoding: "+f)}var R=k.StringDecoder=function(f){this.encoding=(f||"utf8").toLowerCase().replace(/[-_]/,""),C(f);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=h;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};R.prototype.write=function(f){for(var a="";this.charLength;){var o=f.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:f.length;if(f.copy(this.charBuffer,this.charReceived,0,o),this.charReceived+=o,this.charReceived<this.charLength)return"";f=f.slice(o,f.length),a=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var x=a.charCodeAt(a.length-1);if(x>=55296&&x<=56319){this.charLength+=this.surrogateSize,a="";continue}if(this.charReceived=this.charLength=0,f.length===0)return a;break}this.detectIncompleteChar(f);var r=f.length;this.charLength&&(f.copy(this.charBuffer,0,f.length-this.charReceived,r),r-=this.charReceived),a+=f.toString(this.encoding,0,r);var r=a.length-1,x=a.charCodeAt(r);if(x>=55296&&x<=56319){var g=this.surrogateSize;return this.charLength+=g,this.charReceived+=g,this.charBuffer.copy(this.charBuffer,g,0,g),f.copy(this.charBuffer,0,0,g),a.substring(0,r)}return a},R.prototype.detectIncompleteChar=function(f){for(var a=f.length>=3?3:f.length;a>0;a--){var o=f[f.length-a];if(a==1&&o>>5==6){this.charLength=2;break}if(a<=2&&o>>4==14){this.charLength=3;break}if(a<=3&&o>>3==30){this.charLength=4;break}}this.charReceived=a},R.prototype.end=function(f){var a="";if(f&&f.length&&(a=this.write(f)),this.charReceived){var o=this.charReceived,r=this.charBuffer,x=this.encoding;a+=r.slice(0,o).toString(x)}return a};function h(f){return f.toString(this.encoding)}function s(f){this.charReceived=f.length%2,this.charLength=this.charReceived?2:0}function S(f){this.charReceived=f.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(N,Y,k){(function(P,u){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var C=N("base64-js"),R=N("ieee754"),h=N("isarray");k.Buffer=u,k.SlowBuffer=n,k.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:s(),k.kMaxLength=S();function s(){try{var ae=new Uint8Array(1);return ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ae.foo()===42&&typeof ae.subarray=="function"&&ae.subarray(1,1).byteLength===0}catch(J){return!1}}function S(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(ae,J){if(S()<J)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(ae=new Uint8Array(J),ae.__proto__=u.prototype):(ae===null&&(ae=new u(J)),ae.length=J),ae}function u(ae,J,X){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(ae,J,X);if(typeof ae=="number"){if(typeof J=="string")throw new Error("If encoding is specified then the first argument must be a string");return x(this,ae)}return a(this,ae,J,X)}u.poolSize=8192,u._augment=function(ae){return ae.__proto__=u.prototype,ae};function a(ae,J,X,Q){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?w(ae,J,X,Q):typeof J=="string"?g(ae,J,X):p(ae,J)}u.from=function(ae,J,X){return a(null,ae,J,X)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0}));function o(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be a number');if(ae<0)throw new RangeError('"size" argument must not be negative')}function r(ae,J,X,Q){return o(J),J<=0?f(ae,J):X!==void 0?typeof Q=="string"?f(ae,J).fill(X,Q):f(ae,J).fill(X):f(ae,J)}u.alloc=function(ae,J,X){return r(null,ae,J,X)};function x(ae,J){if(o(J),ae=f(ae,J<0?0:d(J)|0),!u.TYPED_ARRAY_SUPPORT)for(var X=0;X<J;++X)ae[X]=0;return ae}u.allocUnsafe=function(ae){return x(null,ae)},u.allocUnsafeSlow=function(ae){return x(null,ae)};function g(ae,J,X){if((typeof X!="string"||X==="")&&(X="utf8"),!u.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Q=l(J,X)|0;ae=f(ae,Q);var pe=ae.write(J,X);return pe!==Q&&(ae=ae.slice(0,pe)),ae}function m(ae,J){var X=J.length<0?0:d(J.length)|0;ae=f(ae,X);for(var Q=0;Q<X;Q+=1)ae[Q]=J[Q]&255;return ae}function w(ae,J,X,Q){if(J.byteLength,X<0||J.byteLength<X)throw new RangeError("'offset' is out of bounds");if(J.byteLength<X+(Q||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Q===void 0?J=new Uint8Array(J):Q===void 0?J=new Uint8Array(J,X):J=new Uint8Array(J,X,Q),u.TYPED_ARRAY_SUPPORT?(ae=J,ae.__proto__=u.prototype):ae=m(ae,J),ae}function p(ae,J){if(u.isBuffer(J)){var X=d(J.length)|0;return ae=f(ae,X),ae.length===0||J.copy(ae,0,0,X),ae}if(J){if(typeof ArrayBuffer!="undefined"&&J.buffer instanceof ArrayBuffer||"length"in J)return typeof J.length!="number"||Te(J.length)?f(ae,0):m(ae,J);if(J.type==="Buffer"&&h(J.data))return m(ae,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(ae){if(ae>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ae|0}function n(ae){return+ae!=ae&&(ae=0),u.alloc(+ae)}u.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},u.compare=function(J,X){if(!u.isBuffer(J)||!u.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Q=J.length,pe=X.length,ce=0,we=Math.min(Q,pe);ce<we;++ce)if(J[ce]!==X[ce]){Q=J[ce],pe=X[ce];break}return Q<pe?-1:pe<Q?1:0},u.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}},u.concat=function(J,X){if(!h(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return u.alloc(0);var Q;if(X===void 0)for(X=0,Q=0;Q<J.length;++Q)X+=J[Q].length;var pe=u.allocUnsafe(X),ce=0;for(Q=0;Q<J.length;++Q){var we=J[Q];if(!u.isBuffer(we))throw new TypeError('"list" argument must be an Array of Buffers');we.copy(pe,ce),ce+=we.length}return pe};function l(ae,J){if(u.isBuffer(ae))return ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ae)||ae instanceof ArrayBuffer))return ae.byteLength;typeof ae!="string"&&(ae=""+ae);var X=ae.length;if(X===0)return 0;for(var Q=!1;;)switch(J){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return se(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return q(ae).length;default:if(Q)return se(ae).length;J=(""+J).toLowerCase(),Q=!0}}u.byteLength=l;function c(ae,J,X){var Q=!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(ae||(ae="utf8");;)switch(ae){case"hex":return z(this,J,X);case"utf8":case"utf-8":return j(this,J,X);case"ascii":return K(this,J,X);case"latin1":case"binary":return H(this,J,X);case"base64":return I(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,J,X);default:if(Q)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),Q=!0}}u.prototype._isBuffer=!0;function T(ae,J,X){var Q=ae[J];ae[J]=ae[X],ae[X]=Q}u.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},u.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},u.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},u.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?j(this,0,J):c.apply(this,arguments)},u.prototype.equals=function(J){if(!u.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:u.compare(this,J)===0},u.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+">"},u.prototype.compare=function(J,X,Q,pe,ce){if(!u.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=J?J.length:0),pe===void 0&&(pe=0),ce===void 0&&(ce=this.length),X<0||Q>J.length||pe<0||ce>this.length)throw new RangeError("out of range index");if(pe>=ce&&X>=Q)return 0;if(pe>=ce)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,pe>>>=0,ce>>>=0,this===J)return 0;for(var we=ce-pe,ze=Q-X,Ge=Math.min(we,ze),Qe=this.slice(pe,ce),$e=J.slice(X,Q),rt=0;rt<Ge;++rt)if(Qe[rt]!==$e[rt]){we=Qe[rt],ze=$e[rt];break}return we<ze?-1:ze<we?1:0};function v(ae,J,X,Q,pe){if(ae.length===0)return-1;if(typeof X=="string"?(Q=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=pe?0:ae.length-1),X<0&&(X=ae.length+X),X>=ae.length){if(pe)return-1;X=ae.length-1}else if(X<0)if(pe)X=0;else return-1;if(typeof J=="string"&&(J=u.from(J,Q)),u.isBuffer(J))return J.length===0?-1:i(ae,J,X,Q,pe);if(typeof J=="number")return J=J&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?pe?Uint8Array.prototype.indexOf.call(ae,J,X):Uint8Array.prototype.lastIndexOf.call(ae,J,X):i(ae,[J],X,Q,pe);throw new TypeError("val must be string, number or Buffer")}function i(ae,J,X,Q,pe){var ce=1,we=ae.length,ze=J.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ae.length<2||J.length<2)return-1;ce=2,we/=2,ze/=2,X/=2}function Ge(Me,Ce){return ce===1?Me[Ce]:Me.readUInt16BE(Ce*ce)}var Qe;if(pe){var $e=-1;for(Qe=X;Qe<we;Qe++)if(Ge(ae,Qe)===Ge(J,$e===-1?0:Qe-$e)){if($e===-1&&($e=Qe),Qe-$e+1===ze)return $e*ce}else $e!==-1&&(Qe-=Qe-$e),$e=-1}else for(X+ze>we&&(X=we-ze),Qe=X;Qe>=0;Qe--){for(var rt=!0,et=0;et<ze;et++)if(Ge(ae,Qe+et)!==Ge(J,et)){rt=!1;break}if(rt)return Qe}return-1}u.prototype.includes=function(J,X,Q){return this.indexOf(J,X,Q)!==-1},u.prototype.indexOf=function(J,X,Q){return v(this,J,X,Q,!0)},u.prototype.lastIndexOf=function(J,X,Q){return v(this,J,X,Q,!1)};function L(ae,J,X,Q){X=Number(X)||0;var pe=ae.length-X;Q?(Q=Number(Q),Q>pe&&(Q=pe)):Q=pe;var ce=J.length;if(ce%2!==0)throw new TypeError("Invalid hex string");Q>ce/2&&(Q=ce/2);for(var we=0;we<Q;++we){var ze=parseInt(J.substr(we*2,2),16);if(isNaN(ze))return we;ae[X+we]=ze}return we}function A(ae,J,X,Q){return ne(se(J,ae.length-X),ae,X,Q)}function y(ae,J,X,Q){return ne(re(J),ae,X,Q)}function E(ae,J,X,Q){return y(ae,J,X,Q)}function b(ae,J,X,Q){return ne(q(J),ae,X,Q)}function _(ae,J,X,Q){return ne(be(J,ae.length-X),ae,X,Q)}u.prototype.write=function(J,X,Q,pe){if(X===void 0)pe="utf8",Q=this.length,X=0;else if(Q===void 0&&typeof X=="string")pe=X,Q=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Q)?(Q=Q|0,pe===void 0&&(pe="utf8")):(pe=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-X;if((Q===void 0||Q>ce)&&(Q=ce),J.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");pe||(pe="utf8");for(var we=!1;;)switch(pe){case"hex":return L(this,J,X,Q);case"utf8":case"utf-8":return A(this,J,X,Q);case"ascii":return y(this,J,X,Q);case"latin1":case"binary":return E(this,J,X,Q);case"base64":return b(this,J,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,J,X,Q);default:if(we)throw new TypeError("Unknown encoding: "+pe);pe=(""+pe).toLowerCase(),we=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(ae,J,X){return J===0&&X===ae.length?C.fromByteArray(ae):C.fromByteArray(ae.slice(J,X))}function j(ae,J,X){X=Math.min(ae.length,X);for(var Q=[],pe=J;pe<X;){var ce=ae[pe],we=null,ze=ce>239?4:ce>223?3:ce>191?2:1;if(pe+ze<=X){var Ge,Qe,$e,rt;switch(ze){case 1:ce<128&&(we=ce);break;case 2:Ge=ae[pe+1],(Ge&192)===128&&(rt=(ce&31)<<6|Ge&63,rt>127&&(we=rt));break;case 3:Ge=ae[pe+1],Qe=ae[pe+2],(Ge&192)===128&&(Qe&192)===128&&(rt=(ce&15)<<12|(Ge&63)<<6|Qe&63,rt>2047&&(rt<55296||rt>57343)&&(we=rt));break;case 4:Ge=ae[pe+1],Qe=ae[pe+2],$e=ae[pe+3],(Ge&192)===128&&(Qe&192)===128&&($e&192)===128&&(rt=(ce&15)<<18|(Ge&63)<<12|(Qe&63)<<6|$e&63,rt>65535&&rt<1114112&&(we=rt))}}we===null?(we=65533,ze=1):we>65535&&(we-=65536,Q.push(we>>>10&1023|55296),we=56320|we&1023),Q.push(we),pe+=ze}return G(Q)}var M=4096;function G(ae){var J=ae.length;if(J<=M)return String.fromCharCode.apply(String,ae);for(var X="",Q=0;Q<J;)X+=String.fromCharCode.apply(String,ae.slice(Q,Q+=M));return X}function K(ae,J,X){var Q="";X=Math.min(ae.length,X);for(var pe=J;pe<X;++pe)Q+=String.fromCharCode(ae[pe]&127);return Q}function H(ae,J,X){var Q="";X=Math.min(ae.length,X);for(var pe=J;pe<X;++pe)Q+=String.fromCharCode(ae[pe]);return Q}function z(ae,J,X){var Q=ae.length;(!J||J<0)&&(J=0),(!X||X<0||X>Q)&&(X=Q);for(var pe="",ce=J;ce<X;++ce)pe+=ie(ae[ce]);return pe}function B(ae,J,X){for(var Q=ae.slice(J,X),pe="",ce=0;ce<Q.length;ce+=2)pe+=String.fromCharCode(Q[ce]+Q[ce+1]*256);return pe}u.prototype.slice=function(J,X){var Q=this.length;J=~~J,X=X===void 0?Q:~~X,J<0?(J+=Q,J<0&&(J=0)):J>Q&&(J=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),X<J&&(X=J);var pe;if(u.TYPED_ARRAY_SUPPORT)pe=this.subarray(J,X),pe.__proto__=u.prototype;else{var ce=X-J;pe=new u(ce,void 0);for(var we=0;we<ce;++we)pe[we]=this[we+J]}return pe};function W(ae,J,X){if(ae%1!==0||ae<0)throw new RangeError("offset is not uint");if(ae+J>X)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=this[J],ce=1,we=0;++we<X&&(ce*=256);)pe+=this[J+we]*ce;return pe},u.prototype.readUIntBE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=this[J+--X],ce=1;X>0&&(ce*=256);)pe+=this[J+--X]*ce;return pe},u.prototype.readUInt8=function(J,X){return X||W(J,1,this.length),this[J]},u.prototype.readUInt16LE=function(J,X){return X||W(J,2,this.length),this[J]|this[J+1]<<8},u.prototype.readUInt16BE=function(J,X){return X||W(J,2,this.length),this[J]<<8|this[J+1]},u.prototype.readUInt32LE=function(J,X){return X||W(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},u.prototype.readUInt32BE=function(J,X){return X||W(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},u.prototype.readIntLE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=this[J],ce=1,we=0;++we<X&&(ce*=256);)pe+=this[J+we]*ce;return ce*=128,pe>=ce&&(pe-=Math.pow(2,8*X)),pe},u.prototype.readIntBE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=X,ce=1,we=this[J+--pe];pe>0&&(ce*=256);)we+=this[J+--pe]*ce;return ce*=128,we>=ce&&(we-=Math.pow(2,8*X)),we},u.prototype.readInt8=function(J,X){return X||W(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},u.prototype.readInt16LE=function(J,X){X||W(J,2,this.length);var Q=this[J]|this[J+1]<<8;return Q&32768?Q|4294901760:Q},u.prototype.readInt16BE=function(J,X){X||W(J,2,this.length);var Q=this[J+1]|this[J]<<8;return Q&32768?Q|4294901760:Q},u.prototype.readInt32LE=function(J,X){return X||W(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},u.prototype.readInt32BE=function(J,X){return X||W(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},u.prototype.readFloatLE=function(J,X){return X||W(J,4,this.length),R.read(this,J,!0,23,4)},u.prototype.readFloatBE=function(J,X){return X||W(J,4,this.length),R.read(this,J,!1,23,4)},u.prototype.readDoubleLE=function(J,X){return X||W(J,8,this.length),R.read(this,J,!0,52,8)},u.prototype.readDoubleBE=function(J,X){return X||W(J,8,this.length),R.read(this,J,!1,52,8)};function F(ae,J,X,Q,pe,ce){if(!u.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>pe||J<ce)throw new RangeError('"value" argument is out of bounds');if(X+Q>ae.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(J,X,Q,pe){if(J=+J,X=X|0,Q=Q|0,!pe){var ce=Math.pow(2,8*Q)-1;F(this,J,X,Q,ce,0)}var we=1,ze=0;for(this[X]=J&255;++ze<Q&&(we*=256);)this[X+ze]=J/we&255;return X+Q},u.prototype.writeUIntBE=function(J,X,Q,pe){if(J=+J,X=X|0,Q=Q|0,!pe){var ce=Math.pow(2,8*Q)-1;F(this,J,X,Q,ce,0)}var we=Q-1,ze=1;for(this[X+we]=J&255;--we>=0&&(ze*=256);)this[X+we]=J/ze&255;return X+Q},u.prototype.writeUInt8=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,1,255,0),u.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function $(ae,J,X,Q){J<0&&(J=65535+J+1);for(var pe=0,ce=Math.min(ae.length-X,2);pe<ce;++pe)ae[X+pe]=(J&255<<8*(Q?pe:1-pe))>>>(Q?pe:1-pe)*8}u.prototype.writeUInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):$(this,J,X,!0),X+2},u.prototype.writeUInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):$(this,J,X,!1),X+2};function ee(ae,J,X,Q){J<0&&(J=4294967295+J+1);for(var pe=0,ce=Math.min(ae.length-X,4);pe<ce;++pe)ae[X+pe]=J>>>(Q?pe:3-pe)*8&255}u.prototype.writeUInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,4294967295,0),u.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},u.prototype.writeUInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,4294967295,0),u.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},u.prototype.writeIntLE=function(J,X,Q,pe){if(J=+J,X=X|0,!pe){var ce=Math.pow(2,8*Q-1);F(this,J,X,Q,ce-1,-ce)}var we=0,ze=1,Ge=0;for(this[X]=J&255;++we<Q&&(ze*=256);)J<0&&Ge===0&&this[X+we-1]!==0&&(Ge=1),this[X+we]=(J/ze>>0)-Ge&255;return X+Q},u.prototype.writeIntBE=function(J,X,Q,pe){if(J=+J,X=X|0,!pe){var ce=Math.pow(2,8*Q-1);F(this,J,X,Q,ce-1,-ce)}var we=Q-1,ze=1,Ge=0;for(this[X+we]=J&255;--we>=0&&(ze*=256);)J<0&&Ge===0&&this[X+we+1]!==0&&(Ge=1),this[X+we]=(J/ze>>0)-Ge&255;return X+Q},u.prototype.writeInt8=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,1,127,-128),u.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},u.prototype.writeInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):$(this,J,X,!0),X+2},u.prototype.writeInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):$(this,J,X,!1),X+2},u.prototype.writeInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,2147483647,-2147483648),u.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},u.prototype.writeInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),u.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 Z(ae,J,X,Q,pe,ce){if(X+Q>ae.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function ve(ae,J,X,Q,pe){return pe||Z(ae,J,X,4,34028234663852886e22,-34028234663852886e22),R.write(ae,J,X,Q,23,4),X+4}u.prototype.writeFloatLE=function(J,X,Q){return ve(this,J,X,!0,Q)},u.prototype.writeFloatBE=function(J,X,Q){return ve(this,J,X,!1,Q)};function he(ae,J,X,Q,pe){return pe||Z(ae,J,X,8,17976931348623157e292,-17976931348623157e292),R.write(ae,J,X,Q,52,8),X+8}u.prototype.writeDoubleLE=function(J,X,Q){return he(this,J,X,!0,Q)},u.prototype.writeDoubleBE=function(J,X,Q){return he(this,J,X,!1,Q)},u.prototype.copy=function(J,X,Q,pe){if(Q||(Q=0),!pe&&pe!==0&&(pe=this.length),X>=J.length&&(X=J.length),X||(X=0),pe>0&&pe<Q&&(pe=Q),pe===Q)return 0;if(J.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("sourceStart out of bounds");if(pe<0)throw new RangeError("sourceEnd out of bounds");pe>this.length&&(pe=this.length),J.length-X<pe-Q&&(pe=J.length-X+Q);var ce=pe-Q,we;if(this===J&&Q<X&&X<pe)for(we=ce-1;we>=0;--we)J[we+X]=this[we+Q];else if(ce<1e3||!u.TYPED_ARRAY_SUPPORT)for(we=0;we<ce;++we)J[we+X]=this[we+Q];else Uint8Array.prototype.set.call(J,this.subarray(Q,Q+ce),X);return ce},u.prototype.fill=function(J,X,Q,pe){if(typeof J=="string"){if(typeof X=="string"?(pe=X,X=0,Q=this.length):typeof Q=="string"&&(pe=Q,Q=this.length),J.length===1){var ce=J.charCodeAt(0);ce<256&&(J=ce)}if(pe!==void 0&&typeof pe!="string")throw new TypeError("encoding must be a string");if(typeof pe=="string"&&!u.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe)}else typeof J=="number"&&(J=J&255);if(X<0||this.length<X||this.length<Q)throw new RangeError("Out of range index");if(Q<=X)return this;X=X>>>0,Q=Q===void 0?this.length:Q>>>0,J||(J=0);var we;if(typeof J=="number")for(we=X;we<Q;++we)this[we]=J;else{var ze=u.isBuffer(J)?J:se(new u(J,pe).toString()),Ge=ze.length;for(we=0;we<Q-X;++we)this[we+X]=ze[we%Ge]}return this};var le=/[^+\/0-9A-Za-z-_]/g;function Re(ae){if(ae=xe(ae).replace(le,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function xe(ae){return ae.trim?ae.trim():ae.replace(/^\s+|\s+$/g,"")}function ie(ae){return ae<16?"0"+ae.toString(16):ae.toString(16)}function se(ae,J){J=J||Infinity;for(var X,Q=ae.length,pe=null,ce=[],we=0;we<Q;++we){if(X=ae.charCodeAt(we),X>55295&&X<57344){if(!pe){if(X>56319){(J-=3)>-1&&ce.push(239,191,189);continue}else if(we+1===Q){(J-=3)>-1&&ce.push(239,191,189);continue}pe=X;continue}if(X<56320){(J-=3)>-1&&ce.push(239,191,189),pe=X;continue}X=(pe-55296<<10|X-56320)+65536}else pe&&((J-=3)>-1&&ce.push(239,191,189));if(pe=null,X<128){if((J-=1)<0)break;ce.push(X)}else if(X<2048){if((J-=2)<0)break;ce.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;ce.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;ce.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ce}function re(ae){for(var J=[],X=0;X<ae.length;++X)J.push(ae.charCodeAt(X)&255);return J}function be(ae,J){for(var X,Q,pe,ce=[],we=0;we<ae.length&&!((J-=2)<0);++we)X=ae.charCodeAt(we),Q=X>>8,pe=X%256,ce.push(pe),ce.push(Q);return ce}function q(ae){return C.toByteArray(Re(ae))}function ne(ae,J,X,Q){for(var pe=0;pe<Q&&!(pe+X>=J.length||pe>=ae.length);++pe)J[pe+X]=ae[pe];return pe}function Te(ae){return ae!==ae}}).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,Y,k){Y.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,Y,k){Y.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,Y,k){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=Array.prototype.slice;Y.exports=u;function u(R,h){if(!(this instanceof u))return new u(R,h);this.src=R,this._withAccess=h}u.prototype.withAccess=function(R){return this._withAccess=R!==!1,this},u.prototype.pick=function(R){return Array.isArray(R)||(R=P.call(arguments)),R.length&&(this.keys=R),this},u.prototype.to=function(R){if(R=R||{},!this.src)return R;var h=this.keys||Object.keys(this.src);if(!this._withAccess){for(var s=0;s<h.length;s++){if(S=h[s],R[S]!==void 0)continue;R[S]=this.src[S]}return R}for(var s=0;s<h.length;s++){var S=h[s];if(!C(R,S))continue;var f=this.src.__lookupGetter__(S),a=this.src.__lookupSetter__(S);f&&R.__defineGetter__(S,f),a&&R.__defineSetter__(S,a),!f&&!a&&(R[S]=this.src[S])}return R},u.prototype.toCover=function(R){for(var h=this.keys||Object.keys(this.src),s=0;s<h.length;s++){var S=h[s];delete R[S];var f=this.src.__lookupGetter__(S),a=this.src.__lookupSetter__(S);f&&R.__defineGetter__(S,f),a&&R.__defineSetter__(S,a),!f&&!a&&(R[S]=this.src[S])}},u.prototype.override=u.prototype.toCover,u.prototype.and=function(R){var h={};return this.to(h),this.src=R,this.to(h),this.src=h,this};function C(R,h){return R[h]===void 0&&R.__lookupGetter__(h)===void 0&&R.__lookupSetter__(h)===void 0}},{}],77:[function(N,Y,k){N("../../modules/es6.string.iterator"),N("../../modules/es6.array.from"),Y.exports=N("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(N,Y,k){var P=N("../../modules/_core"),u=P.JSON||(P.JSON={stringify:JSON.stringify});Y.exports=function(R){return u.stringify.apply(u,arguments)}},{"../../modules/_core":99}],79:[function(N,Y,k){N("../../modules/es6.object.assign"),Y.exports=N("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(N,Y,k){N("../../modules/es6.object.create");var P=N("../../modules/_core").Object;Y.exports=function(C,R){return P.create(C,R)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(N,Y,k){N("../../modules/es6.object.define-property");var P=N("../../modules/_core").Object;Y.exports=function(C,R,h){return P.defineProperty(C,R,h)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(N,Y,k){N("../../modules/es7.object.entries"),Y.exports=N("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(N,Y,k){N("../../modules/es6.object.get-own-property-names");var P=N("../../modules/_core").Object;Y.exports=function(C){return P.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(N,Y,k){N("../../modules/es6.object.get-prototype-of"),Y.exports=N("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(N,Y,k){N("../../modules/es6.object.keys"),Y.exports=N("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(N,Y,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"),Y.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,Y,k){N("../modules/web.immediate"),Y.exports=N("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(N,Y,k){N("../../modules/es6.string.from-code-point"),Y.exports=N("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(N,Y,k){N("../../modules/es6.function.has-instance"),Y.exports=N("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(N,Y,k){N("../../modules/es6.symbol"),N("../../modules/es6.object.to-string"),N("../../modules/es7.symbol.async-iterator"),N("../../modules/es7.symbol.observable"),Y.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,Y,k){N("../../modules/es6.string.iterator"),N("../../modules/web.dom.iterable"),Y.exports=N("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(N,Y,k){Y.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(N,Y,k){Y.exports=function(){}},{}],94:[function(N,Y,k){Y.exports=function(P,u,C,R){if(!(P instanceof u)||R!==void 0&&R in P)throw TypeError(C+": incorrect invocation!");return P}},{}],95:[function(N,Y,k){var P=N("./_is-object");Y.exports=function(u){if(!P(u))throw TypeError(u+" is not an object!");return u}},{"./_is-object":119}],96:[function(N,Y,k){var P=N("./_to-iobject"),u=N("./_to-length"),C=N("./_to-absolute-index");Y.exports=function(R){return function(h,s,S){var f=P(h),a=u(f.length),o=C(S,a),r;if(R&&s!=s){for(;a>o;)if(r=f[o++],r!=r)return!0}else for(;a>o;o++)if((R||o in f)&&f[o]===s)return R||o||0;return!R&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(N,Y,k){var P=N("./_cof"),u=N("./_wks")("toStringTag"),C=P(function(){return arguments}())=="Arguments",R=function(h,s){try{return h[s]}catch(S){}};Y.exports=function(h){var s,S,f;return h===void 0?"Undefined":h===null?"Null":typeof(S=R(s=Object(h),u))=="string"?S:C?P(s):(f=P(s))=="Object"&&typeof s.callee=="function"?"Arguments":f}},{"./_cof":98,"./_wks":166}],98:[function(N,Y,k){var P={}.toString;Y.exports=function(u){return P.call(u).slice(8,-1)}},{}],99:[function(N,Y,k){var P=Y.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(N,Y,k){"use strict";var P=N("./_object-dp"),u=N("./_property-desc");Y.exports=function(C,R,h){R in C?P.f(C,R,u(0,h)):C[R]=h}},{"./_object-dp":132,"./_property-desc":146}],101:[function(N,Y,k){var P=N("./_a-function");Y.exports=function(u,C,R){if(P(u),C===void 0)return u;switch(R){case 1:return function(h){return u.call(C,h)};case 2:return function(h,s){return u.call(C,h,s)};case 3:return function(h,s,S){return u.call(C,h,s,S)}}return function(){return u.apply(C,arguments)}}},{"./_a-function":92}],102:[function(N,Y,k){Y.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(N,Y,k){Y.exports=!N("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(N,Y,k){var P=N("./_is-object"),u=N("./_global").document,C=P(u)&&P(u.createElement);Y.exports=function(R){return C?u.createElement(R):{}}},{"./_global":110,"./_is-object":119}],105:[function(N,Y,k){Y.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(N,Y,k){var P=N("./_object-keys"),u=N("./_object-gops"),C=N("./_object-pie");Y.exports=function(R){var h=P(R),s=u.f;if(s)for(var S=s(R),f=C.f,a=0,o;S.length>a;)f.call(R,o=S[a++])&&h.push(o);return h}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(N,Y,k){var P=N("./_global"),u=N("./_core"),C=N("./_ctx"),R=N("./_hide"),h=N("./_has"),s="prototype",S=function(f,a,o){var r=f&S.F,x=f&S.G,g=f&S.S,m=f&S.P,w=f&S.B,p=f&S.W,d=x?u:u[a]||(u[a]={}),n=d[s],l=x?P:g?P[a]:(P[a]||{})[s],c,T,v;x&&(o=a);for(c in o){if(T=!r&&l&&l[c]!==void 0,T&&h(d,c))continue;v=T?l[c]:o[c],d[c]=x&&typeof l[c]!="function"?o[c]:w&&T?C(v,P):p&&l[c]==v?function(i){var L=function(A,y,E){if(this instanceof i){switch(arguments.length){case 0:return new i;case 1:return new i(A);case 2:return new i(A,y)}return new i(A,y,E)}return i.apply(this,arguments)};return L[s]=i[s],L}(v):m&&typeof v=="function"?C(Function.call,v):v,m&&((d.virtual||(d.virtual={}))[c]=v,f&S.R&&n&&!n[c]&&R(n,c,v))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,Y.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(N,Y,k){Y.exports=function(P){try{return!!P()}catch(u){return!0}}},{}],109:[function(N,Y,k){var P=N("./_ctx"),u=N("./_iter-call"),C=N("./_is-array-iter"),R=N("./_an-object"),h=N("./_to-length"),s=N("./core.get-iterator-method"),S={},f={},k=Y.exports=function(a,o,r,x,g){var m=g?function(){return a}:s(a),w=P(r,x,o?2:1),p=0,d,n,l,c;if(typeof m!="function")throw TypeError(a+" is not iterable!");if(C(m)){for(d=h(a.length);d>p;p++)if(c=o?w(R(n=a[p])[0],n[1]):w(a[p]),c===S||c===f)return c}else for(l=m.call(a);!(n=l.next()).done;)if(c=u(l,w,n.value,o),c===S||c===f)return c};k.BREAK=S,k.RETURN=f},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(N,Y,k){var P=Y.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,Y,k){var P={}.hasOwnProperty;Y.exports=function(u,C){return P.call(u,C)}},{}],112:[function(N,Y,k){var P=N("./_object-dp"),u=N("./_property-desc");Y.exports=N("./_descriptors")?function(C,R,h){return P.f(C,R,u(1,h))}:function(C,R,h){return C[R]=h,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(N,Y,k){var P=N("./_global").document;Y.exports=P&&P.documentElement},{"./_global":110}],114:[function(N,Y,k){Y.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,Y,k){Y.exports=function(P,u,C){var R=C===void 0;switch(u.length){case 0:return R?P():P.call(C);case 1:return R?P(u[0]):P.call(C,u[0]);case 2:return R?P(u[0],u[1]):P.call(C,u[0],u[1]);case 3:return R?P(u[0],u[1],u[2]):P.call(C,u[0],u[1],u[2]);case 4:return R?P(u[0],u[1],u[2],u[3]):P.call(C,u[0],u[1],u[2],u[3])}return P.apply(C,u)}},{}],116:[function(N,Y,k){var P=N("./_cof");Y.exports=Object("z").propertyIsEnumerable(0)?Object:function(u){return P(u)=="String"?u.split(""):Object(u)}},{"./_cof":98}],117:[function(N,Y,k){var P=N("./_iterators"),u=N("./_wks")("iterator"),C=Array.prototype;Y.exports=function(R){return R!==void 0&&(P.Array===R||C[u]===R)}},{"./_iterators":125,"./_wks":166}],118:[function(N,Y,k){var P=N("./_cof");Y.exports=Array.isArray||function(C){return P(C)=="Array"}},{"./_cof":98}],119:[function(N,Y,k){Y.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(N,Y,k){var P=N("./_an-object");Y.exports=function(u,C,R,h){try{return h?C(P(R)[0],R[1]):C(R)}catch(S){var s=u.return;throw s!==void 0&&P(s.call(u)),S}}},{"./_an-object":95}],121:[function(N,Y,k){"use strict";var P=N("./_object-create"),u=N("./_property-desc"),C=N("./_set-to-string-tag"),R={};N("./_hide")(R,N("./_wks")("iterator"),function(){return this}),Y.exports=function(h,s,S){h.prototype=P(R,{next:u(1,S)}),C(h,s+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(N,Y,k){"use strict";var P=N("./_library"),u=N("./_export"),C=N("./_redefine"),R=N("./_hide"),h=N("./_iterators"),s=N("./_iter-create"),S=N("./_set-to-string-tag"),f=N("./_object-gpo"),a=N("./_wks")("iterator"),o=!([].keys&&"next"in[].keys()),r="@@iterator",x="keys",g="values",m=function(){return this};Y.exports=function(w,p,d,n,l,c,T){s(d,p,n);var v=function(K){if(!o&&K in y)return y[K];switch(K){case x:return function(){return new d(this,K)};case g:return function(){return new d(this,K)}}return function(){return new d(this,K)}},i=p+" Iterator",L=l==g,A=!1,y=w.prototype,E=y[a]||y[r]||l&&y[l],b=E||v(l),_=l?L?v("entries"):b:void 0,I=p=="Array"&&y.entries||E,j,M,G;if(I&&(G=f(I.call(new w)),G!==Object.prototype&&G.next&&(S(G,i,!0),!P&&typeof G[a]!="function"&&R(G,a,m))),L&&E&&E.name!==g&&(A=!0,b=function(){return E.call(this)}),(!P||T)&&(o||A||!y[a])&&R(y,a,b),h[p]=b,h[i]=m,l)if(j={values:L?b:v(g),keys:c?b:v(x),entries:_},T)for(M in j)M in y||C(y,M,j[M]);else u(u.P+u.F*(o||A),p,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,Y,k){var P=N("./_wks")("iterator"),u=!1;try{var C=[7][P]();C.return=function(){u=!0},Array.from(C,function(){throw 2})}catch(R){}Y.exports=function(R,h){if(!h&&!u)return!1;var s=!1;try{var S=[7],f=S[P]();f.next=function(){return{done:s=!0}},S[P]=function(){return f},R(S)}catch(a){}return s}},{"./_wks":166}],124:[function(N,Y,k){Y.exports=function(P,u){return{value:u,done:!!P}}},{}],125:[function(N,Y,k){Y.exports={}},{}],126:[function(N,Y,k){Y.exports=!0},{}],127:[function(N,Y,k){var P=N("./_uid")("meta"),u=N("./_is-object"),C=N("./_has"),R=N("./_object-dp").f,h=0,s=Object.isExtensible||function(){return!0},S=!N("./_fails")(function(){return s(Object.preventExtensions({}))}),f=function(g){R(g,P,{value:{i:"O"+ ++h,w:{}}})},a=function(g,m){if(!u(g))return typeof g=="symbol"?g:(typeof g=="string"?"S":"P")+g;if(!C(g,P)){if(!s(g))return"F";if(!m)return"E";f(g)}return g[P].i},o=function(g,m){if(!C(g,P)){if(!s(g))return!0;if(!m)return!1;f(g)}return g[P].w},r=function(g){return S&&x.NEED&&s(g)&&!C(g,P)&&f(g),g},x=Y.exports={KEY:P,NEED:!1,fastKey:a,getWeak:o,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(N,Y,k){var P=N("./_global"),u=N("./_task").set,C=P.MutationObserver||P.WebKitMutationObserver,R=P.process,h=P.Promise,s=N("./_cof")(R)=="process";Y.exports=function(){var S,f,a,o=function(){var m,w;for(s&&(m=R.domain)&&m.exit();S;){w=S.fn,S=S.next;try{w()}catch(p){throw S?a():f=void 0,p}}f=void 0,m&&m.enter()};if(s)a=function(){R.nextTick(o)};else if(C&&!(P.navigator&&P.navigator.standalone)){var r=!0,x=document.createTextNode("");new C(o).observe(x,{characterData:!0}),a=function(){x.data=r=!r}}else if(h&&h.resolve){var g=h.resolve(void 0);a=function(){g.then(o)}}else a=function(){u.call(P,o)};return function(m){var w={fn:m,next:void 0};f&&(f.next=w),S||(S=w,a()),f=w}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(N,Y,k){"use strict";var P=N("./_a-function");function u(C){var R,h;this.promise=new C(function(s,S){if(R!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");R=s,h=S}),this.resolve=P(R),this.reject=P(h)}Y.exports.f=function(C){return new u(C)}},{"./_a-function":92}],130:[function(N,Y,k){"use strict";var P=N("./_descriptors"),u=N("./_object-keys"),C=N("./_object-gops"),R=N("./_object-pie"),h=N("./_to-object"),s=N("./_iobject"),S=Object.assign;Y.exports=!S||N("./_fails")(function(){var f={},a={},o=Symbol(),r="abcdefghijklmnopqrst";return f[o]=7,r.split("").forEach(function(x){a[x]=x}),S({},f)[o]!=7||Object.keys(S({},a)).join("")!=r})?function(a,o){for(var r=h(a),x=arguments.length,g=1,m=C.f,w=R.f;x>g;)for(var p=s(arguments[g++]),d=m?u(p).concat(m(p)):u(p),n=d.length,l=0,c;n>l;)c=d[l++],(!P||w.call(p,c))&&(r[c]=p[c]);return r}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(N,Y,k){var P=N("./_an-object"),u=N("./_object-dps"),C=N("./_enum-bug-keys"),R=N("./_shared-key")("IE_PROTO"),h=function(){},s="prototype",S=function(){var f=N("./_dom-create")("iframe"),a=C.length,o="<",r=">",x;for(f.style.display="none",N("./_html").appendChild(f),f.src="javascript:",x=f.contentWindow.document,x.open(),x.write(o+"script"+r+"document.F=Object"+o+"/script"+r),x.close(),S=x.F;a--;)delete S[s][C[a]];return S()};Y.exports=Object.create||function(a,o){var r;return a!==null?(h[s]=P(a),r=new h,h[s]=null,r[R]=a):r=S(),o===void 0?r:u(r,o)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(N,Y,k){var P=N("./_an-object"),u=N("./_ie8-dom-define"),C=N("./_to-primitive"),R=Object.defineProperty;k.f=N("./_descriptors")?Object.defineProperty:function(s,S,f){if(P(s),S=C(S,!0),P(f),u)try{return R(s,S,f)}catch(a){}if("get"in f||"set"in f)throw TypeError("Accessors not supported!");return"value"in f&&(s[S]=f.value),s}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(N,Y,k){var P=N("./_object-dp"),u=N("./_an-object"),C=N("./_object-keys");Y.exports=N("./_descriptors")?Object.defineProperties:function(h,s){u(h);for(var S=C(s),f=S.length,a=0,o;f>a;)P.f(h,o=S[a++],s[o]);return h}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(N,Y,k){var P=N("./_object-pie"),u=N("./_property-desc"),C=N("./_to-iobject"),R=N("./_to-primitive"),h=N("./_has"),s=N("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;k.f=N("./_descriptors")?S:function(a,o){if(a=C(a),o=R(o,!0),s)try{return S(a,o)}catch(r){}if(h(a,o))return u(!P.f.call(a,o),a[o])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(N,Y,k){var P=N("./_to-iobject"),u=N("./_object-gopn").f,C={}.toString,R=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(s){try{return u(s)}catch(S){return R.slice()}};Y.exports.f=function(S){return R&&C.call(S)=="[object Window]"?h(S):u(P(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(N,Y,k){var P=N("./_object-keys-internal"),u=N("./_enum-bug-keys").concat("length","prototype");k.f=Object.getOwnPropertyNames||function(R){return P(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(N,Y,k){k.f=Object.getOwnPropertySymbols},{}],138:[function(N,Y,k){var P=N("./_has"),u=N("./_to-object"),C=N("./_shared-key")("IE_PROTO"),R=Object.prototype;Y.exports=Object.getPrototypeOf||function(h){return h=u(h),P(h,C)?h[C]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?R:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(N,Y,k){var P=N("./_has"),u=N("./_to-iobject"),C=N("./_array-includes")(!1),R=N("./_shared-key")("IE_PROTO");Y.exports=function(h,s){var S=u(h),f=0,a=[],o;for(o in S)o!=R&&(P(S,o)&&a.push(o));for(;s.length>f;)P(S,o=s[f++])&&(~C(a,o)||a.push(o));return a}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(N,Y,k){var P=N("./_object-keys-internal"),u=N("./_enum-bug-keys");Y.exports=Object.keys||function(R){return P(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(N,Y,k){k.f={}.propertyIsEnumerable},{}],142:[function(N,Y,k){var P=N("./_export"),u=N("./_core"),C=N("./_fails");Y.exports=function(R,h){var s=(u.Object||{})[R]||Object[R],S={};S[R]=h(s),P(P.S+P.F*C(function(){s(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(N,Y,k){var P=N("./_descriptors"),u=N("./_object-keys"),C=N("./_to-iobject"),R=N("./_object-pie").f;Y.exports=function(h){return function(s){for(var S=C(s),f=u(S),a=f.length,o=0,r=[],x;a>o;)x=f[o++],(!P||R.call(S,x))&&r.push(h?[x,S[x]]:S[x]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(N,Y,k){Y.exports=function(P){try{return{e:!1,v:P()}}catch(u){return{e:!0,v:u}}}},{}],145:[function(N,Y,k){var P=N("./_an-object"),u=N("./_is-object"),C=N("./_new-promise-capability");Y.exports=function(R,h){if(P(R),u(h)&&h.constructor===R)return h;var s=C.f(R),S=s.resolve;return S(h),s.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(N,Y,k){Y.exports=function(P,u){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:u}}},{}],147:[function(N,Y,k){var P=N("./_hide");Y.exports=function(u,C,R){for(var h in C)R&&u[h]?u[h]=C[h]:P(u,h,C[h]);return u}},{"./_hide":112}],148:[function(N,Y,k){Y.exports=N("./_hide")},{"./_hide":112}],149:[function(N,Y,k){"use strict";var P=N("./_global"),u=N("./_core"),C=N("./_object-dp"),R=N("./_descriptors"),h=N("./_wks")("species");Y.exports=function(s){var S=typeof u[s]=="function"?u[s]:P[s];R&&S&&!S[h]&&C.f(S,h,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(N,Y,k){var P=N("./_object-dp").f,u=N("./_has"),C=N("./_wks")("toStringTag");Y.exports=function(R,h,s){R&&!u(R=s?R:R.prototype,C)&&P(R,C,{configurable:!0,value:h})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(N,Y,k){var P=N("./_shared")("keys"),u=N("./_uid");Y.exports=function(C){return P[C]||(P[C]=u(C))}},{"./_shared":152,"./_uid":162}],152:[function(N,Y,k){var P=N("./_core"),u=N("./_global"),C="__core-js_shared__",R=u[C]||(u[C]={});(Y.exports=function(h,s){return R[h]||(R[h]=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,Y,k){var P=N("./_an-object"),u=N("./_a-function"),C=N("./_wks")("species");Y.exports=function(R,h){var s=P(R).constructor,S;return s===void 0||(S=P(s)[C])==null?h:u(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(N,Y,k){var P=N("./_to-integer"),u=N("./_defined");Y.exports=function(C){return function(R,h){var s=String(u(R)),S=P(h),f=s.length,a,o;return S<0||S>=f?C?"":void 0:(a=s.charCodeAt(S),a<55296||a>56319||S+1===f||(o=s.charCodeAt(S+1))<56320||o>57343?C?s.charAt(S):a:C?s.slice(S,S+2):(a-55296<<10)+(o-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(N,Y,k){var P=N("./_ctx"),u=N("./_invoke"),C=N("./_html"),R=N("./_dom-create"),h=N("./_global"),s=h.process,S=h.setImmediate,f=h.clearImmediate,a=h.MessageChannel,o=h.Dispatch,r=0,x={},g="onreadystatechange",m,w,p,d=function(){var l=+this;if(x.hasOwnProperty(l)){var c=x[l];delete x[l],c()}},n=function(l){d.call(l.data)};(!S||!f)&&(S=function(c){for(var T=[],v=1;arguments.length>v;)T.push(arguments[v++]);return x[++r]=function(){u(typeof c=="function"?c:Function(c),T)},m(r),r},f=function(c){delete x[c]},N("./_cof")(s)=="process"?m=function(l){s.nextTick(P(d,l,1))}:o&&o.now?m=function(l){o.now(P(d,l,1))}:a?(w=new a,p=w.port2,w.port1.onmessage=n,m=P(p.postMessage,p,1)):h.addEventListener&&typeof postMessage=="function"&&!h.importScripts?(m=function(l){h.postMessage(l+"","*")},h.addEventListener("message",n,!1)):g in R("script")?m=function(l){C.appendChild(R("script"))[g]=function(){C.removeChild(this),d.call(l)}}:m=function(l){setTimeout(P(d,l,1),0)}),Y.exports={set:S,clear:f}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(N,Y,k){var P=N("./_to-integer"),u=Math.max,C=Math.min;Y.exports=function(R,h){return R=P(R),R<0?u(R+h,0):C(R,h)}},{"./_to-integer":157}],157:[function(N,Y,k){var P=Math.ceil,u=Math.floor;Y.exports=function(C){return isNaN(C=+C)?0:(C>0?u:P)(C)}},{}],158:[function(N,Y,k){var P=N("./_iobject"),u=N("./_defined");Y.exports=function(C){return P(u(C))}},{"./_defined":102,"./_iobject":116}],159:[function(N,Y,k){var P=N("./_to-integer"),u=Math.min;Y.exports=function(C){return C>0?u(P(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(N,Y,k){var P=N("./_defined");Y.exports=function(u){return Object(P(u))}},{"./_defined":102}],161:[function(N,Y,k){var P=N("./_is-object");Y.exports=function(u,C){if(!P(u))return u;var R,h;if(C&&typeof(R=u.toString)=="function"&&!P(h=R.call(u)))return h;if(typeof(R=u.valueOf)=="function"&&!P(h=R.call(u)))return h;if(!C&&typeof(R=u.toString)=="function"&&!P(h=R.call(u)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(N,Y,k){var P=0,u=Math.random();Y.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++P+u).toString(36))}},{}],163:[function(N,Y,k){var P=N("./_global"),u=P.navigator;Y.exports=u&&u.userAgent||""},{"./_global":110}],164:[function(N,Y,k){var P=N("./_global"),u=N("./_core"),C=N("./_library"),R=N("./_wks-ext"),h=N("./_object-dp").f;Y.exports=function(s){var S=u.Symbol||(u.Symbol=C?{}:P.Symbol||{});s.charAt(0)!="_"&&!(s in S)&&h(S,s,{value:R.f(s)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(N,Y,k){k.f=N("./_wks")},{"./_wks":166}],166:[function(N,Y,k){var P=N("./_shared")("wks"),u=N("./_uid"),C=N("./_global").Symbol,R=typeof C=="function",h=Y.exports=function(s){return P[s]||(P[s]=R&&C[s]||(R?C:u)("Symbol."+s))};h.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(N,Y,k){var P=N("./_classof"),u=N("./_wks")("iterator"),C=N("./_iterators");Y.exports=N("./_core").getIteratorMethod=function(R){if(R!=null)return R[u]||R["@@iterator"]||C[P(R)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(N,Y,k){"use strict";var P=N("./_ctx"),u=N("./_export"),C=N("./_to-object"),R=N("./_iter-call"),h=N("./_is-array-iter"),s=N("./_to-length"),S=N("./_create-property"),f=N("./core.get-iterator-method");u(u.S+u.F*!N("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(o){var r=C(o),x=typeof this=="function"?this:Array,g=arguments.length,m=g>1?arguments[1]:void 0,w=m!==void 0,p=0,d=f(r),n,l,c,T;if(w&&(m=P(m,g>2?arguments[2]:void 0,2)),d!=null&&!(x==Array&&h(d)))for(T=d.call(r),l=new x;!(c=T.next()).done;p++)S(l,p,w?R(T,m,[c.value,p],!0):c.value);else for(n=s(r.length),l=new x(n);n>p;p++)S(l,p,w?m(r[p],p):r[p]);return l.length=p,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,Y,k){"use strict";var P=N("./_add-to-unscopables"),u=N("./_iter-step"),C=N("./_iterators"),R=N("./_to-iobject");Y.exports=N("./_iter-define")(Array,"Array",function(h,s){this._t=R(h),this._i=0,this._k=s},function(){var h=this._t,s=this._k,S=this._i++;return!h||S>=h.length?(this._t=void 0,u(1)):s=="keys"?u(0,S):s=="values"?u(0,h[S]):u(0,[S,h[S]])},"values"),C.Arguments=C.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,Y,k){"use strict";var P=N("./_is-object"),u=N("./_object-gpo"),C=N("./_wks")("hasInstance"),R=Function.prototype;C in R||N("./_object-dp").f(R,C,{value:function(h){if(typeof this!="function"||!P(h))return!1;if(!P(this.prototype))return h instanceof this;for(;h=u(h);)if(this.prototype===h)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(N,Y,k){var P=N("./_export");P(P.S+P.F,"Object",{assign:N("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(N,Y,k){var P=N("./_export");P(P.S,"Object",{create:N("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(N,Y,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,Y,k){N("./_object-sap")("getOwnPropertyNames",function(){return N("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(N,Y,k){var P=N("./_to-object"),u=N("./_object-gpo");N("./_object-sap")("getPrototypeOf",function(){return function(R){return u(P(R))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(N,Y,k){var P=N("./_to-object"),u=N("./_object-keys");N("./_object-sap")("keys",function(){return function(R){return u(P(R))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(N,Y,k){arguments[4][71][0].apply(k,arguments)},{dup:71}],178:[function(N,Y,k){"use strict";var P=N("./_library"),u=N("./_global"),C=N("./_ctx"),R=N("./_classof"),h=N("./_export"),s=N("./_is-object"),S=N("./_a-function"),f=N("./_an-instance"),a=N("./_for-of"),o=N("./_species-constructor"),r=N("./_task").set,x=N("./_microtask")(),g=N("./_new-promise-capability"),m=N("./_perform"),w=N("./_user-agent"),p=N("./_promise-resolve"),d="Promise",n=u.TypeError,l=u.process,c=l&&l.versions,T=c&&c.v8||"",v=u[d],i=R(l)=="process",L=function(){},A,y,E,b,_=y=g.f,I=!!function(){try{var W=v.resolve(1),F=(W.constructor={})[N("./_wks")("species")]=function($){$(L,L)};return(i||typeof PromiseRejectionEvent=="function")&&W.then(L)instanceof F&&T.indexOf("6.6")!==0&&w.indexOf("Chrome/66")===-1}catch($){}}(),j=function(W){var F;return s(W)&&typeof(F=W.then)=="function"?F:!1},M=function(W,F){if(W._n)return;W._n=!0;var $=W._c;x(function(){for(var ee=W._v,Z=W._s==1,ve=0,he=function(le){var Re=Z?le.ok:le.fail,xe=le.resolve,ie=le.reject,se=le.domain,re,be,q;try{Re?(Z||(W._h==2&&H(W),W._h=1),Re===!0?re=ee:(se&&se.enter(),re=Re(ee),se&&(se.exit(),q=!0)),re===le.promise?ie(n("Promise-chain cycle")):(be=j(re))?be.call(re,xe,ie):xe(re)):ie(ee)}catch(ne){se&&!q&&se.exit(),ie(ne)}};$.length>ve;)he($[ve++]);W._c=[],W._n=!1,F&&!W._h&&G(W)})},G=function(W){r.call(u,function(){var F=W._v,$=K(W),ee,Z,ve;if($&&(ee=m(function(){i?l.emit("unhandledRejection",F,W):(Z=u.onunhandledrejection)?Z({promise:W,reason:F}):(ve=u.console)&&ve.error&&ve.error("Unhandled promise rejection",F)}),W._h=i||K(W)?2:1),W._a=void 0,$&&ee.e)throw ee.v})},K=function(W){return W._h!==1&&(W._a||W._c).length===0},H=function(W){r.call(u,function(){var F;i?l.emit("rejectionHandled",W):(F=u.onrejectionhandled)&&F({promise:W,reason:W._v})})},z=function(W){var F=this;if(F._d)return;F._d=!0,F=F._w||F,F._v=W,F._s=2,F._a||(F._a=F._c.slice()),M(F,!0)},B=function(W){var F=this,$;if(F._d)return;F._d=!0,F=F._w||F;try{if(F===W)throw n("Promise can't be resolved itself");($=j(W))?x(function(){var ee={_w:F,_d:!1};try{$.call(W,C(B,ee,1),C(z,ee,1))}catch(Z){z.call(ee,Z)}}):(F._v=W,F._s=1,M(F,!1))}catch(ee){z.call({_w:F,_d:!1},ee)}};I||(v=function(F){f(this,v,d,"_h"),S(F),A.call(this);try{F(C(B,this,1),C(z,this,1))}catch($){z.call(this,$)}},A=function(F){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},A.prototype=N("./_redefine-all")(v.prototype,{then:function(F,$){var ee=_(o(this,v));return ee.ok=typeof F=="function"?F:!0,ee.fail=typeof $=="function"&&$,ee.domain=i?l.domain:void 0,this._c.push(ee),this._a&&this._a.push(ee),this._s&&M(this,!1),ee.promise},catch:function(W){return this.then(void 0,W)}}),E=function(){var W=new A;this.promise=W,this.resolve=C(B,W,1),this.reject=C(z,W,1)},g.f=_=function(W){return W===v||W===b?new E(W):y(W)}),h(h.G+h.W+h.F*!I,{Promise:v}),N("./_set-to-string-tag")(v,d),N("./_set-species")(d),b=N("./_core")[d],h(h.S+h.F*!I,d,{reject:function(F){var $=_(this),ee=$.reject;return ee(F),$.promise}}),h(h.S+h.F*(P||!I),d,{resolve:function(F){return p(P&&this===b?v:this,F)}}),h(h.S+h.F*!(I&&N("./_iter-detect")(function(W){v.all(W).catch(L)})),d,{all:function(F){var $=this,ee=_($),Z=ee.resolve,ve=ee.reject,he=m(function(){var le=[],Re=0,xe=1;a(F,!1,function(ie){var se=Re++,re=!1;le.push(void 0),xe++,$.resolve(ie).then(function(be){if(re)return;re=!0,le[se]=be,--xe||Z(le)},ve)}),--xe||Z(le)});return he.e&&ve(he.v),ee.promise},race:function(F){var $=this,ee=_($),Z=ee.reject,ve=m(function(){a(F,!1,function(he){$.resolve(he).then(ee.resolve,Z)})});return ve.e&&Z(ve.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,Y,k){var P=N("./_export"),u=N("./_to-absolute-index"),C=String.fromCharCode,R=String.fromCodePoint;P(P.S+P.F*(!!R&&R.length!=1),"String",{fromCodePoint:function(s){for(var S=[],f=arguments.length,a=0,o;f>a;){if(o=+arguments[a++],u(o,1114111)!==o)throw RangeError(o+" is not a valid code point");S.push(o<65536?C(o):C(((o-=65536)>>10)+55296,o%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(N,Y,k){"use strict";var P=N("./_string-at")(!0);N("./_iter-define")(String,"String",function(u){this._t=String(u),this._i=0},function(){var u=this._t,C=this._i,R;return C>=u.length?{value:void 0,done:!0}:(R=P(u,C),this._i+=R.length,{value:R,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(N,Y,k){"use strict";var P=N("./_global"),u=N("./_has"),C=N("./_descriptors"),R=N("./_export"),h=N("./_redefine"),s=N("./_meta").KEY,S=N("./_fails"),f=N("./_shared"),a=N("./_set-to-string-tag"),o=N("./_uid"),r=N("./_wks"),x=N("./_wks-ext"),g=N("./_wks-define"),m=N("./_enum-keys"),w=N("./_is-array"),p=N("./_an-object"),d=N("./_is-object"),n=N("./_to-object"),l=N("./_to-iobject"),c=N("./_to-primitive"),T=N("./_property-desc"),v=N("./_object-create"),i=N("./_object-gopn-ext"),L=N("./_object-gopd"),A=N("./_object-gops"),y=N("./_object-dp"),E=N("./_object-keys"),b=L.f,_=y.f,I=i.f,j=P.Symbol,M=P.JSON,G=M&&M.stringify,K="prototype",H=r("_hidden"),z=r("toPrimitive"),B={}.propertyIsEnumerable,W=f("symbol-registry"),F=f("symbols"),$=f("op-symbols"),ee=Object[K],Z=typeof j=="function"&&!!A.f,ve=P.QObject,he=!ve||!ve[K]||!ve[K].findChild,le=C&&S(function(){return v(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(ce,we,ze){var Ge=b(ee,we);Ge&&delete ee[we],_(ce,we,ze),Ge&&ce!==ee&&_(ee,we,Ge)}:_,Re=function(ce){var we=F[ce]=v(j[K]);return we._k=ce,we},xe=Z&&typeof j.iterator=="symbol"?function(ce){return typeof ce=="symbol"}:function(ce){return ce instanceof j},ie=function(we,ze,Ge){return we===ee&&ie($,ze,Ge),p(we),ze=c(ze,!0),p(Ge),u(F,ze)?(Ge.enumerable?(u(we,H)&&we[H][ze]&&(we[H][ze]=!1),Ge=v(Ge,{enumerable:T(0,!1)})):(u(we,H)||_(we,H,T(1,{})),we[H][ze]=!0),le(we,ze,Ge)):_(we,ze,Ge)},se=function(we,ze){p(we);for(var Ge=m(ze=l(ze)),Qe=0,$e=Ge.length,rt;$e>Qe;)ie(we,rt=Ge[Qe++],ze[rt]);return we},re=function(we,ze){return ze===void 0?v(we):se(v(we),ze)},be=function(we){var ze=B.call(this,we=c(we,!0));return this===ee&&u(F,we)&&!u($,we)?!1:ze||!u(this,we)||!u(F,we)||u(this,H)&&this[H][we]?ze:!0},q=function(we,ze){if(we=l(we),ze=c(ze,!0),we===ee&&u(F,ze)&&!u($,ze))return;var Ge=b(we,ze);return Ge&&u(F,ze)&&!(u(we,H)&&we[H][ze])&&(Ge.enumerable=!0),Ge},ne=function(we){for(var ze=I(l(we)),Ge=[],Qe=0,$e;ze.length>Qe;)!u(F,$e=ze[Qe++])&&$e!=H&&$e!=s&&Ge.push($e);return Ge},Te=function(we){for(var ze=we===ee,Ge=I(ze?$:l(we)),Qe=[],$e=0,rt;Ge.length>$e;)u(F,rt=Ge[$e++])&&(ze?u(ee,rt):!0)&&Qe.push(F[rt]);return Qe};Z||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var we=o(arguments.length>0?arguments[0]:void 0),ze=function(Ge){this===ee&&ze.call($,Ge),u(this,H)&&u(this[H],we)&&(this[H][we]=!1),le(this,we,T(1,Ge))};return C&&he&&le(ee,we,{configurable:!0,set:ze}),Re(we)},h(j[K],"toString",function(){return this._k}),L.f=q,y.f=ie,N("./_object-gopn").f=i.f=ne,N("./_object-pie").f=be,A.f=Te,C&&!N("./_library")&&h(ee,"propertyIsEnumerable",be,!0),x.f=function(ce){return Re(r(ce))}),R(R.G+R.W+R.F*!Z,{Symbol:j});for(var ae="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;ae.length>J;)r(ae[J++]);for(var X=E(r.store),Q=0;X.length>Q;)g(X[Q++]);R(R.S+R.F*!Z,"Symbol",{for:function(ce){return u(W,ce+="")?W[ce]:W[ce]=j(ce)},keyFor:function(we){if(!xe(we))throw TypeError(we+" is not a symbol!");for(var ze in W)if(W[ze]===we)return ze},useSetter:function(){he=!0},useSimple:function(){he=!1}}),R(R.S+R.F*!Z,"Object",{create:re,defineProperty:ie,defineProperties:se,getOwnPropertyDescriptor:q,getOwnPropertyNames:ne,getOwnPropertySymbols:Te});var pe=S(function(){A.f(1)});R(R.S+R.F*pe,"Object",{getOwnPropertySymbols:function(we){return A.f(n(we))}}),M&&R(R.S+R.F*(!Z||S(function(){var ce=j();return G([ce])!="[null]"||G({a:ce})!="{}"||G(Object(ce))!="{}"})),"JSON",{stringify:function(we){for(var ze=[we],Ge=1,Qe,$e;arguments.length>Ge;)ze.push(arguments[Ge++]);return $e=Qe=ze[1],!d(Qe)&&we===void 0||xe(we)?void 0:(w(Qe)||(Qe=function(rt,et){if(typeof $e=="function"&&(et=$e.call(this,rt,et)),!xe(et))return et}),ze[1]=Qe,G.apply(M,ze))}}),j[K][z]||N("./_hide")(j[K],z,j[K].valueOf),a(j,"Symbol"),a(Math,"Math",!0),a(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,Y,k){var P=N("./_export"),u=N("./_object-to-array")(!0);P(P.S,"Object",{entries:function(R){return u(R)}})},{"./_export":107,"./_object-to-array":143}],183:[function(N,Y,k){"use strict";var P=N("./_export"),u=N("./_core"),C=N("./_global"),R=N("./_species-constructor"),h=N("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(s){var S=R(this,u.Promise||C.Promise),f=typeof s=="function";return this.then(f?function(a){return h(S,s()).then(function(){return a})}:s,f?function(a){return h(S,s()).then(function(){throw a})}:s)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(N,Y,k){"use strict";var P=N("./_export"),u=N("./_new-promise-capability"),C=N("./_perform");P(P.S,"Promise",{try:function(R){var h=u.f(this),s=C(R);return(s.e?h.reject:h.resolve)(s.v),h.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(N,Y,k){N("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(N,Y,k){N("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(N,Y,k){N("./es6.array.iterator");for(var P=N("./_global"),u=N("./_hide"),C=N("./_iterators"),R=N("./_wks")("toStringTag"),h="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<h.length;s++){var S=h[s],f=P[S],a=f&&f.prototype;a&&!a[R]&&u(a,R,S),C[S]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(N,Y,k){var P=N("./_export"),u=N("./_task");P(P.G+P.B,{setImmediate:u.set,clearImmediate:u.clear})},{"./_export":107,"./_task":155}],189:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/helpers/typeof"),C=R(u);function R(c){return c&&c.__esModule?c:{default:c}}function h(c){return Array.isArray?Array.isArray(c):l(c)==="[object Array]"}k.isArray=h;function s(c){return typeof c=="boolean"}k.isBoolean=s;function S(c){return c===null}k.isNull=S;function f(c){return c==null}k.isNullOrUndefined=f;function a(c){return typeof c=="number"}k.isNumber=a;function o(c){return typeof c=="string"}k.isString=o;function r(c){return(typeof c=="undefined"?"undefined":(0,C.default)(c))==="symbol"}k.isSymbol=r;function x(c){return c===void 0}k.isUndefined=x;function g(c){return l(c)==="[object RegExp]"}k.isRegExp=g;function m(c){return(typeof c=="undefined"?"undefined":(0,C.default)(c))==="object"&&c!==null}k.isObject=m;function w(c){return l(c)==="[object Date]"}k.isDate=w;function p(c){return l(c)==="[object Error]"||c instanceof Error}k.isError=p;function d(c){return typeof c=="function"}k.isFunction=d;function n(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||(typeof c=="undefined"?"undefined":(0,C.default)(c))==="symbol"||typeof c=="undefined"}k.isPrimitive=n,k.isBuffer=P.isBuffer;function l(c){return Object.prototype.toString.call(c)}}).call(this,{isBuffer:N("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(N,Y,k){"use strict";var P=N("babel-runtime/helpers/typeof"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(R){"use strict";var h=function(){var o=/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,x=/[^-+\dA-Z]/g;return function(g,m,w,p){if(arguments.length===1&&a(g)==="string"&&!/\d/.test(g)&&(m=g,g=void 0),g=g||new Date,g instanceof Date||(g=new Date(g)),isNaN(g))throw TypeError("Invalid date");m=String(h.masks[m]||m||h.masks.default);var d=m.slice(0,4);(d==="UTC:"||d==="GMT:")&&(m=m.slice(4),w=!0,d==="GMT:"&&(p=!0));var n=w?"getUTC":"get",l=g[n+"Date"](),c=g[n+"Day"](),T=g[n+"Month"](),v=g[n+"FullYear"](),i=g[n+"Hours"](),L=g[n+"Minutes"](),A=g[n+"Seconds"](),y=g[n+"Milliseconds"](),E=w?0:g.getTimezoneOffset(),b=S(g),_=f(g),I={d:l,dd:s(l),ddd:h.i18n.dayNames[c],dddd:h.i18n.dayNames[c+7],m:T+1,mm:s(T+1),mmm:h.i18n.monthNames[T],mmmm:h.i18n.monthNames[T+12],yy:String(v).slice(2),yyyy:v,h:i%12||12,hh:s(i%12||12),H:i,HH:s(i),M:L,MM:s(L),s:A,ss:s(A),l:s(y,3),L:s(Math.round(y/10)),t:i<12?"a":"p",tt:i<12?"am":"pm",T:i<12?"A":"P",TT:i<12?"AM":"PM",Z:p?"GMT":w?"UTC":(String(g).match(r)||[""]).pop().replace(x,""),o:(E>0?"-":"+")+s(Math.floor(Math.abs(E)/60)*100+Math.abs(E)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:b,N:_};return m.replace(o,function(j){return j in I?I[j]:j.slice(1,j.length-1)})}}();h.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"},h.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(o,r){for(o=String(o),r=r||2;o.length<r;)o="0"+o;return o}function S(o){var r=new Date(o.getFullYear(),o.getMonth(),o.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var x=new Date(r.getFullYear(),0,4);x.setDate(x.getDate()-(x.getDay()+6)%7+3);var g=r.getTimezoneOffset()-x.getTimezoneOffset();r.setHours(r.getHours()-g);var m=(r-x)/(864e5*7);return 1+Math.floor(m)}function f(o){var r=o.getDay();return r===0&&(r=7),r}function a(o){return o===null?"null":o===void 0?"undefined":(typeof o=="undefined"?"undefined":(0,u.default)(o))!=="object"?typeof o=="undefined"?"undefined":(0,u.default)(o):Array.isArray(o)?"array":{}.toString.call(o).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return h}):(typeof k=="undefined"?"undefined":(0,u.default)(k))==="object"?Y.exports=h:R.dateFormat=h})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(N,Y,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=/["'&<>]/;Y.exports=u;function u(C){var R=""+C,h=P.exec(R);if(!h)return R;var s,S="",f=0,a=0;for(f=h.index;f<R.length;f++){switch(R.charCodeAt(f)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}a!==f&&(S+=R.substring(a,f)),a=f+1,S+=s}return a!==f?S+R.substring(a,f):S}},{}],192:[function(N,Y,k){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Y.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(s){if(!C(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,f,a,o,r,x;if(this._events||(this._events={}),s==="error"&&(!this._events.error||R(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var g=new Error('Uncaught, unspecified "error" event. ('+S+")");throw g.context=S,g}if(f=this._events[s],h(f))return!1;if(u(f))switch(arguments.length){case 1:f.call(this);break;case 2:f.call(this,arguments[1]);break;case 3:f.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),f.apply(this,o)}else if(R(f))for(o=Array.prototype.slice.call(arguments,1),x=f.slice(),a=x.length,r=0;r<a;r++)x[r].apply(this,o);return!0},P.prototype.addListener=function(s,S){var f;if(!u(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,u(S.listener)?S.listener:S),this._events[s]?R(this._events[s])?this._events[s].push(S):this._events[s]=[this._events[s],S]:this._events[s]=S,R(this._events[s])&&!this._events[s].warned&&(h(this._maxListeners)?f=P.defaultMaxListeners:f=this._maxListeners,f&&f>0&&this._events[s].length>f&&(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(!u(S))throw TypeError("listener must be a function");var f=!1;function a(){this.removeListener(s,a),f||(f=!0,S.apply(this,arguments))}return a.listener=S,this.on(s,a),this},P.prototype.removeListener=function(s,S){var f,a,o,r;if(!u(S))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(f=this._events[s],o=f.length,a=-1,f===S||u(f.listener)&&f.listener===S)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,S);else if(R(f)){for(r=o;r-- >0;)if(f[r]===S||f[r].listener&&f[r].listener===S){a=r;break}if(a<0)return this;f.length===1?(f.length=0,delete this._events[s]):f.splice(a,1),this._events.removeListener&&this.emit("removeListener",s,S)}return this},P.prototype.removeAllListeners=function(s){var S,f;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(f=this._events[s],u(f))this.removeListener(s,f);else if(f)for(;f.length;)this.removeListener(s,f[f.length-1]);return delete this._events[s],this},P.prototype.listeners=function(s){var S;return!this._events||!this._events[s]?S=[]:u(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(u(S))return 1;if(S)return S.length}return 0},P.listenerCount=function(s,S){return s.listenerCount(S)};function u(s){return typeof s=="function"}function C(s){return typeof s=="number"}function R(s){return typeof s=="object"&&s!==null}function h(s){return s===void 0}},{}],193:[function(N,Y,k){var P=N("http"),u=Y.exports;for(var C in P)P.hasOwnProperty(C)&&(u[C]=P[C]);u.request=function(R,h){return R||(R={}),R.scheme="https",R.protocol="https:",P.request.call(this,R,h)}},{http:231}],194:[function(N,Y,k){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var P=N("util"),u=N("ms");Y.exports=function(C){if(typeof C=="number")return C;var R=u(C);if(R===void 0){var h=new Error(P.format("humanize-ms(%j) result undefined",C));console.warn(h.stack)}return R}},{ms:204,util:243}],195:[function(N,Y,k){k.read=function(P,u,C,R,h){var s,S,f=h*8-R-1,a=(1<<f)-1,o=a>>1,r=-7,x=C?h-1:0,g=C?-1:1,m=P[u+x];for(x+=g,s=m&(1<<-r)-1,m>>=-r,r+=f;r>0;s=s*256+P[u+x],x+=g,r-=8);for(S=s&(1<<-r)-1,s>>=-r,r+=R;r>0;S=S*256+P[u+x],x+=g,r-=8);if(s===0)s=1-o;else{if(s===a)return S?NaN:(m?-1:1)*Infinity;S=S+Math.pow(2,R),s=s-o}return(m?-1:1)*S*Math.pow(2,s-R)},k.write=function(P,u,C,R,h,s){var S,f,a,o=s*8-h-1,r=(1<<o)-1,x=r>>1,g=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=R?0:s-1,w=R?1:-1,p=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===Infinity?(f=isNaN(u)?1:0,S=r):(S=Math.floor(Math.log(u)/Math.LN2),u*(a=Math.pow(2,-S))<1&&(S--,a*=2),S+x>=1?u+=g/a:u+=g*Math.pow(2,1-x),u*a>=2&&(S++,a/=2),S+x>=r?(f=0,S=r):S+x>=1?(f=(u*a-1)*Math.pow(2,h),S=S+x):(f=u*Math.pow(2,x-1)*Math.pow(2,h),S=0));h>=8;P[C+m]=f&255,m+=w,f/=256,h-=8);for(S=S<<h|f,o+=h;o>0;P[C+m]=S&255,m+=w,S/=256,o-=8);P[C+m-w]|=p*128}},{}],196:[function(N,Y,k){typeof Object.create=="function"?Y.exports=function(u,C){C&&(u.super_=C,u.prototype=Object.create(C.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}))}:Y.exports=function(u,C){if(C){u.super_=C;var R=function(){};R.prototype=C.prototype,u.prototype=new R,u.prototype.constructor=u}}},{}],197:[function(N,Y,k){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/Y.exports=function(C){return C!=null&&(P(C)||u(C)||!!C._isBuffer)};function P(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function u(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&P(C.slice(0,0))}},{}],198:[function(N,Y,k){var P={}.toString;Y.exports=Array.isArray||function(u){return P.call(u)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(N,Y){typeof exports=="object"&&typeof module!="undefined"?module.exports=Y(N):typeof define=="function"&&define.amd?define(Y):Y(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 Y={},k=0,P=N.length;k<P;k++)Y[N.charAt(k)]=k;return Y}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(N){if(N.length<2){var Y=N.charCodeAt(0);return Y<128?N:Y<2048?fromCharCode(192|Y>>>6)+fromCharCode(128|Y&63):fromCharCode(224|Y>>>12&15)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}else{var Y=65536+(N.charCodeAt(0)-55296)*1024+(N.charCodeAt(1)-56320);return fromCharCode(240|Y>>>18&7)+fromCharCode(128|Y>>>12&63)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&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 Y=[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),Y>=2?"=":b64chars.charAt(k>>>6&63),Y>=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 Y=Object.prototype.toString.call(N)==="[object Uint8Array]";return Y?N.toString("base64"):btoa(utob(String(N)))},encode=function(N,Y){return Y?_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 Y=(7&N.charCodeAt(0))<<18|(63&N.charCodeAt(1))<<12|(63&N.charCodeAt(2))<<6|63&N.charCodeAt(3),k=Y-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 Y=N.length,k=Y%4,P=(Y>0?b64tab[N.charAt(0)]<<18:0)|(Y>1?b64tab[N.charAt(1)]<<12:0)|(Y>2?b64tab[N.charAt(2)]<<6:0)|(Y>3?b64tab[N.charAt(3)]:0),u=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return u.length-=[0,0,2,1][k],u.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(Y){return Y=="-"?"+":"/"}).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,Y,k){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";Y.exports=u;var P=Object.prototype.hasOwnProperty;function u(C,R,h){if(!C)throw new TypeError("argument dest is required");if(!R)throw new TypeError("argument src is required");return h===void 0&&(h=!0),Object.getOwnPropertyNames(R).forEach(function(S){if(!h&&P.call(C,S))return;var f=Object.getOwnPropertyDescriptor(R,S);Object.defineProperty(C,S,f)}),C}},{}],201:[function(N,Y,k){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var u=0;u<arguments.length;u++)this.define(arguments[u]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(u,C){for(var R in u){var h=u[R].map(function(f){return f.toLowerCase()});R=R.toLowerCase();for(var s=0;s<h.length;s++){var S=h[s];if(S[0]=="*")continue;if(!C&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+R+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+R+'".');this._types[S]=R}if(C||!this._extensions[R]){var S=h[0];this._extensions[R]=S[0]!="*"?S:S.substr(1)}}},P.prototype.getType=function(u){u=String(u);var C=u.replace(/^.*[/\\]/,"").toLowerCase(),R=C.replace(/^.*\./,"").toLowerCase(),h=C.length<u.length,s=R.length<C.length-1;return(s||!h)&&this._types[R]||null},P.prototype.getExtension=function(u){return u=/^\s*([^;\s]*)/.test(u)&&RegExp.$1,u&&this._extensions[u.toLowerCase()]||null},Y.exports=P},{}],202:[function(N,Y,k){"use strict";var P=N("./Mime");Y.exports=new P(N("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(N,Y,k){Y.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,Y,k){var P=1e3,u=P*60,C=u*60,R=C*24,h=R*7,s=R*365.25;Y.exports=function(r,x){x=x||{};var g=typeof r;if(g==="string"&&r.length>0)return S(r);if(g==="number"&&isFinite(r))return x.long?a(r):f(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 x=/^(-?(?:\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(!x)return;var g=parseFloat(x[1]),m=(x[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return g*s;case"weeks":case"week":case"w":return g*h;case"days":case"day":case"d":return g*R;case"hours":case"hour":case"hrs":case"hr":case"h":return g*C;case"minutes":case"minute":case"mins":case"min":case"m":return g*u;case"seconds":case"second":case"secs":case"sec":case"s":return g*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}function f(r){var x=Math.abs(r);return x>=R?Math.round(r/R)+"d":x>=C?Math.round(r/C)+"h":x>=u?Math.round(r/u)+"m":x>=P?Math.round(r/P)+"s":r+"ms"}function a(r){var x=Math.abs(r);return x>=R?o(r,x,R,"day"):x>=C?o(r,x,C,"hour"):x>=u?o(r,x,u,"minute"):x>=P?o(r,x,P,"second"):r+" ms"}function o(r,x,g,m){var w=x>=g*1.5;return Math.round(r/g)+" "+m+(w?"s":"")}},{}],205:[function(N,Y,k){(function(P){function u(s,S){for(var f=0,a=s.length-1;a>=0;a--){var o=s[a];o==="."?s.splice(a,1):o===".."?(s.splice(a,1),f++):f&&(s.splice(a,1),f--)}if(S)for(;f--;f)s.unshift("..");return s}k.resolve=function(){for(var s="",S=!1,f=arguments.length-1;f>=-1&&!S;f--){var a=f>=0?arguments[f]:P.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)continue;s=a+"/"+s,S=a.charAt(0)==="/"}return s=u(R(s.split("/"),function(o){return!!o}),!S).join("/"),(S?"/":"")+s||"."},k.normalize=function(s){var S=k.isAbsolute(s),f=h(s,-1)==="/";return s=u(R(s.split("/"),function(a){return!!a}),!S).join("/"),!s&&!S&&(s="."),s&&f&&(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(R(s,function(S,f){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 f(w){for(var p=0;p<w.length&&!(w[p]!=="");p++);for(var d=w.length-1;d>=0&&!(w[d]!=="");d--);return p>d?[]:w.slice(p,d-p+1)}for(var a=f(s.split("/")),o=f(S.split("/")),r=Math.min(a.length,o.length),x=r,g=0;g<r;g++)if(a[g]!==o[g]){x=g;break}for(var m=[],g=x;g<a.length;g++)m.push("..");return m=m.concat(o.slice(x)),m.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),f=S===47,a=-1,o=!0,r=s.length-1;r>=1;--r)if(S=s.charCodeAt(r),S===47){if(!o){a=r;break}}else o=!1;return a===-1?f?"/":".":f&&a===1?"/":s.slice(0,a)};function C(s){typeof s!="string"&&(s=s+"");var S=0,f=-1,a=!0,o;for(o=s.length-1;o>=0;--o)if(s.charCodeAt(o)===47){if(!a){S=o+1;break}}else f===-1&&(a=!1,f=o+1);return f===-1?"":s.slice(S,f)}k.basename=function(s,S){var f=C(s);return S&&f.substr(-1*S.length)===S&&(f=f.substr(0,f.length-S.length)),f},k.extname=function(s){typeof s!="string"&&(s=s+"");for(var S=-1,f=0,a=-1,o=!0,r=0,x=s.length-1;x>=0;--x){var g=s.charCodeAt(x);if(g===47){if(!o){f=x+1;break}continue}a===-1&&(o=!1,a=x+1),g===46?S===-1?S=x:r!==1&&(r=1):S!==-1&&(r=-1)}return S===-1||a===-1||r===0||r===1&&S===a-1&&S===f+1?"":s.slice(S,a)};function R(s,S){if(s.filter)return s.filter(S);for(var f=[],a=0;a<s.length;a++)S(s[a],a,s)&&f.push(s[a]);return f}var h="ab".substr(-1)==="b"?function(s,S,f){return s.substr(S,f)}:function(s,S,f){return S<0&&(S=s.length+S),s.substr(S,f)}}).call(this,N("_process"))},{_process:208}],206:[function(N,Y,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 u={function:!0,object:!0},C=u[typeof window]&&window||this,R=C,h=u[typeof k]&&k,s=u[typeof Y]&&Y&&!Y.nodeType&&Y,S=h&&s&&typeof P=="object"&&P;S&&(S.global===S||S.window===S||S.self===S)&&(C=S);var f=Math.pow(2,53)-1,a=/\bOpera/,o=this,r=Object.prototype,x=r.hasOwnProperty,g=r.toString;function m(y){return y=String(y),y.charAt(0).toUpperCase()+y.slice(1)}function w(y,E,b){var _={"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 E&&b&&/^Win/i.test(y)&&!/^Windows Phone /i.test(y)&&(_=_[/[\d.]+$/.exec(y)])&&(y="Windows "+_),y=String(y),E&&b&&(y=y.replace(RegExp(E,"i"),b)),y=d(y.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]),y}function p(y,E){var b=-1,_=y?y.length:0;if(typeof _=="number"&&_>-1&&_<=f)for(;++b<_;)E(y[b],b,y);else n(y,E)}function d(y){return y=i(y),/^(?:webOS|i(?:OS|P))/.test(y)?y:m(y)}function n(y,E){for(var b in y)x.call(y,b)&&E(y[b],b,y)}function l(y){return y==null?m(y):g.call(y).slice(8,-1)}function c(y,E){var b=y!=null?typeof y[E]:"number";return!/^(?:boolean|number|string|undefined)$/.test(b)&&(b=="object"?!!y[E]:!0)}function T(y){return String(y).replace(/([ -])(?!$)/g,"$1?")}function v(y,E){var b=null;return p(y,function(_,I){b=E(b,_,I,y)}),b}function i(y){return String(y).replace(/^ +| +$/g,"")}function L(y){var E=C,b=y&&typeof y=="object"&&l(y)!="String";b&&(E=y,y=null);var _=E.navigator||{},I=_.userAgent||"";y||(y=I);var j=b||o==R,M=b?!!_.likeChrome:/\bChrome\b/.test(y)&&!/internal|\n/i.test(g.toString()),G="Object",K=b?G:"ScriptBridgingProxyObject",H=b?G:"Environment",z=b&&E.java?"JavaPackage":l(E.java),B=b?G:"RuntimeObject",W=/\bJava/.test(z)&&E.java,F=W&&l(E.environment)==H,$=W?"a":"\u03B1",ee=W?"b":"\u03B2",Z=E.document||{},ve=E.operamini||E.opera,he=a.test(he=b&&ve?ve["[[Class]]"]:l(ve))?he:ve=null,le,Re=y,xe=[],ie=null,se=y==I,re=se&&ve&&typeof ve.version=="function"&&ve.version(),be,q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ne=pe(["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"]),Te=we([{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"]),ae=Q({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=ce(["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 v($e,function(rt,et){return rt||RegExp("\\b"+(et.pattern||T(et))+"\\b","i").exec(y)&&(et.label||et)})}function Q($e){return v($e,function(rt,et,Me){return rt||(et[Te]||et[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Te)]||RegExp("\\b"+T(Me)+"(?:\\b|\\w*\\d)","i").exec(y))&&Me})}function pe($e){return v($e,function(rt,et){return rt||RegExp("\\b"+(et.pattern||T(et))+"\\b","i").exec(y)&&(et.label||et)})}function ce($e){return v($e,function(rt,et){var Me=et.pattern||T(et);return!rt&&(rt=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(y))&&(rt=w(rt,Me,et.label||et)),rt})}function we($e){return v($e,function(rt,et){var Me=et.pattern||T(et);return!rt&&(rt=RegExp("\\b"+Me+" *\\d+[.\\w_]*","i").exec(y)||RegExp("\\b"+Me+" *\\w+-[\\w]*","i").exec(y)||RegExp("\\b"+Me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(y))&&((rt=String(et.label&&!RegExp(Me,"i").test(et.label)?et.label:rt).split("/"))[1]&&!/[\d.]+/.test(rt[0])&&(rt[0]+=" "+rt[1]),et=et.label||et,rt=d(rt[0].replace(RegExp(Me,"i"),et).replace(RegExp("; *(?:"+et+"[_-])?","i")," ").replace(RegExp("("+et+")[-_.]?(\\w)","i"),"$1 $2"))),rt})}function ze($e){return v($e,function(rt,et){return rt||(RegExp(et+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(y)||0)[1]||null})}function Ge(){return this.description||""}if(q&&(q=[q]),ae&&!Te&&(Te=we([ae])),(le=/\bGoogle TV\b/.exec(Te))&&(Te=le[0]),/\bSimulator\b/i.test(y)&&(Te=(Te?Te+" ":"")+"Simulator"),ne=="Opera Mini"&&/\bOPiOS\b/.test(y)&&xe.push("running in Turbo/Uncompressed mode"),ne=="IE"&&/\blike iPhone OS\b/.test(y)?(le=L(y.replace(/like iPhone OS/,"")),ae=le.manufacturer,Te=le.product):/^iP/.test(Te)?(ne||(ne="Safari"),J="iOS"+((le=/ OS ([\d_]+)/i.exec(y))?" "+le[1].replace(/_/g,"."):"")):ne=="Konqueror"&&!/buntu/i.test(J)?J="Kubuntu":ae&&ae!="Google"&&(/Chrome/.test(ne)&&!/\bMobile Safari\b/i.test(y)||/\bVita\b/.test(Te))||/\bAndroid\b/.test(J)&&/^Chrome/.test(ne)&&/\bVersion\//i.test(y)?(ne="Android Browser",J=/\bAndroid\b/.test(J)?J:"Android"):ne=="Silk"?(/\bMobi/i.test(y)||(J="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(y)&&xe.unshift("accelerated")):ne=="PaleMoon"&&(le=/\bFirefox\/([\d.]+)\b/.exec(y))?xe.push("identifying as Firefox "+le[1]):ne=="Firefox"&&(le=/\b(Mobile|Tablet|TV)\b/i.exec(y))?(J||(J="Firefox OS"),Te||(Te=le[1])):!ne||(le=!/\bMinefield\b/i.test(y)&&/\b(?:Firefox|Safari)\b/.exec(ne))?(ne&&!Te&&/[\/,]|^[^(]+?\)/.test(y.slice(y.indexOf(le+"/")+8))&&(ne=null),(le=Te||ae||J)&&(Te||ae||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(J))&&(ne=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(J)?J:le)+" Browser")):ne=="Electron"&&(le=(/\bChrome\/([\d.]+)\b/.exec(y)||0)[1])&&xe.push("Chromium "+le),re||(re=ze(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",T(ne),"(?:Firefox|Minefield|NetFront)"])),(le=q=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(ne)&&(/\bOPR\b/.test(y)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(y)&&!/^(?:Trident|EdgeHTML)$/.test(q)&&"WebKit"||!q&&/\bMSIE\b/i.test(y)&&(J=="Mac OS"?"Tasman":"Trident")||q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ne)&&"NetFront")&&(q=[le]),ne=="IE"&&(le=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(y)||0)[1])?(ne+=" Mobile",J="Windows Phone "+(/\+$/.test(le)?le:le+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(y)?(ne="IE Mobile",J="Windows Phone 8.x",xe.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(y)||0)[1])):ne!="IE"&&q=="Trident"&&(le=/\brv:([\d.]+)/.exec(y))&&(ne&&xe.push("identifying as "+ne+(re?" "+re:"")),ne="IE",re=le[1]),se){if(c(E,"global"))if(W&&(le=W.lang.System,Re=le.getProperty("os.arch"),J=J||le.getProperty("os.name")+" "+le.getProperty("os.version")),F){try{re=E.require("ringo/engine").version.join("."),ne="RingoJS"}catch($e){(le=E.system)&&le.global.system==E.system&&(ne="Narwhal",J||(J=le[0].os||null))}ne||(ne="Rhino")}else typeof E.process=="object"&&!E.process.browser&&(le=E.process)&&(typeof le.versions=="object"&&(typeof le.versions.electron=="string"?(xe.push("Node "+le.versions.node),ne="Electron",re=le.versions.electron):typeof le.versions.nw=="string"&&(xe.push("Chromium "+re,"Node "+le.versions.node),ne="NW.js",re=le.versions.nw)),ne||(ne="Node.js",Re=le.arch,J=le.platform,re=/[\d.]+/.exec(le.version),re=re?re[0]:null));else l(le=E.runtime)==K?(ne="Adobe AIR",J=le.flash.system.Capabilities.os):l(le=E.phantom)==B?(ne="PhantomJS",re=(le=le.version||null)&&le.major+"."+le.minor+"."+le.patch):typeof Z.documentMode=="number"&&(le=/\bTrident\/(\d+)/i.exec(y))?(re=[re,Z.documentMode],(le=+le[1]+4)!=re[1]&&(xe.push("IE "+re[1]+" mode"),q&&(q[1]=""),re[1]=le),re=ne=="IE"?String(re[1].toFixed(1)):re[0]):typeof Z.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ne)&&(xe.push("masking as "+ne+" "+re),ne="IE",re="11.0",q=["Trident"],J="Windows");J=J&&d(J)}if(re&&(le=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(y+";"+(se&&_.appMinorVersion))||/\bMinefield\b/i.test(y)&&"a")&&(ie=/b/i.test(le)?"beta":"alpha",re=re.replace(RegExp(le+"\\+?$"),"")+(ie=="beta"?ee:$)+(/\d+\+?/.exec(le)||"")),ne=="Fennec"||ne=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ne="Firefox Mobile";else if(ne=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Te))Te=="Xbox 360"&&(J=null),Te=="Xbox 360"&&/\bIEMobile\b/.test(y)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ne)||ne&&!Te&&!/Browser|Mobi/.test(ne))&&(J=="Windows CE"||/Mobi/i.test(y)))ne+=" Mobile";else if(ne=="IE"&&se)try{E.external===null&&xe.unshift("platform preview")}catch($e){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(Te)||/\bBB10\b/.test(y))&&(le=(RegExp(Te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(y)||0)[1]||re)?(le=[le,/BB10/.test(y)],J=(le[1]?(Te=null,ae="BlackBerry"):"Device Software")+" "+le[0],re=null):this!=n&&Te!="Wii"&&(se&&ve||/Opera/.test(ne)&&/\b(?:MSIE|Firefox)\b/i.test(y)||ne=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ne=="IE"&&(J&&!/^Win/.test(J)&&re>5.5||/\bWindows XP\b/.test(J)&&re>8||re==8&&!/\bTrident\b/.test(y)))&&!a.test(le=L.call(n,y.replace(a,"")+";"))&&le.name&&(le="ing as "+le.name+((le=le.version)?" "+le:""),a.test(ne)?(/\bIE\b/.test(le)&&J=="Mac OS"&&(J=null),le="identify"+le):(le="mask"+le,he?ne=d(he.replace(/([a-z])([A-Z])/g,"$1 $2")):ne="Opera",/\bIE\b/.test(le)&&(J=null),se||(re=null)),q=["Presto"],xe.push(le));(le=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(y)||0)[1])&&(le=[parseFloat(le.replace(/\.(\d)$/,".0$1")),le],ne=="Safari"&&le[1].slice(-1)=="+"?(ne="WebKit Nightly",ie="alpha",re=le[1].slice(0,-1)):(re==le[1]||re==(le[2]=(/\bSafari\/([\d.]+\+?)/i.exec(y)||0)[1]))&&(re=null),le[1]=(/\bChrome\/([\d.]+)/i.exec(y)||0)[1],le[0]==537.36&&le[2]==537.36&&parseFloat(le[1])>=28&&q=="WebKit"&&(q=["Blink"]),!se||!M&&!le[1]?(q&&(q[1]="like Safari"),le=(le=le[0],le<400?1:le<500?2:le<526?3:le<533?4:le<534?"4+":le<535?5:le<537?6:le<538?7:le<601?8:"8")):(q&&(q[1]="like Chrome"),le=le[1]||(le=le[0],le<530?1:le<532?2:le<532.05?3:le<533?4:le<534.03?5:le<534.07?6:le<534.1?7:le<534.13?8:le<534.16?9:le<534.24?10:le<534.3?11:le<535.01?12:le<535.02?"13+":le<535.07?15:le<535.11?16:le<535.19?17:le<536.05?18:le<536.1?19:le<537.01?20:le<537.11?"21+":le<537.13?23:le<537.18?24:le<537.24?25:le<537.36?26:q!="Blink"?"27":"28")),q&&(q[1]+=" "+(le+=typeof le=="number"?".x":/[.+]/.test(le)?"":"+")),ne=="Safari"&&(!re||parseInt(re)>45)&&(re=le)),ne=="Opera"&&(le=/\bzbov|zvav$/.exec(J))?(ne+=" ",xe.unshift("desktop mode"),le=="zvav"?(ne+="Mini",re=null):ne+="Mobile",J=J.replace(RegExp(" *"+le+"$"),"")):ne=="Safari"&&/\bChrome\b/.exec(q&&q[1])&&(xe.unshift("desktop mode"),ne="Chrome Mobile",re=null,/\bOS X\b/.test(J)?(ae="Apple",J="iOS 4.3+"):J=null),re&&re.indexOf(le=/[\d.]+$/.exec(J))==0&&y.indexOf("/"+le+"-")>-1&&(J=i(J.replace(le,""))),q&&!/\b(?:Avant|Nook)\b/.test(ne)&&(/Browser|Lunascape|Maxthon/.test(ne)||ne!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ne)&&q[1])&&((le=q[q.length-1])&&xe.push(le)),xe.length&&(xe=["("+xe.join("; ")+")"]),ae&&Te&&Te.indexOf(ae)<0&&xe.push("on "+ae),Te&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+Te),J&&(le=/ ([\d.+]+)$/.exec(J),be=le&&J.charAt(J.length-le[0].length-1)=="/",J={architecture:32,family:le&&!be?J.replace(le[0],""):J,version:le?le[1]:null,toString:function(){var $e=this.version;return this.family+($e&&!be?" "+$e:"")+(this.architecture==64?" 64-bit":"")}}),(le=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+le),"")),ne&&(/\bWOW64\b/i.test(y)||se&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(y))&&xe.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ne=="Chrome"&&parseFloat(re)>=39&&(J.architecture=64),y||(y=null);var Qe={};return Qe.description=y,Qe.layout=q&&q[0],Qe.manufacturer=ae,Qe.name=ne,Qe.prerelease=ie,Qe.product=Te,Qe.ua=y,Qe.version=ne&&re,Qe.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},Qe.parse=L,Qe.toString=Ge,Qe.version&&xe.unshift(re),Qe.name&&xe.unshift(ne),J&&ne&&!(J==String(J).split(" ")[0]&&(J==ne.split(" ")[0]||Te))&&xe.push(Te?"("+J+")":"on "+J),xe.length&&(Qe.description=xe.join(" ")),Qe}var A=L();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=A,define(function(){return A})):h&&s?n(A,function(y,E){h[E]=y}):C.platform=A}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(N,Y,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?Y.exports={nextTick:u}:Y.exports=P;function u(C,R,h,s){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,f,a;switch(S){case 0:case 1:return P.nextTick(C);case 2:return P.nextTick(function(){C.call(null,R)});case 3:return P.nextTick(function(){C.call(null,R,h)});case 4:return P.nextTick(function(){C.call(null,R,h,s)});default:for(f=new Array(S-1),a=0;a<f.length;)f[a++]=arguments[a];return P.nextTick(function(){C.apply(null,f)})}}}).call(this,N("_process"))},{_process:208}],208:[function(N,Y,k){var P=Y.exports={},u,C;function R(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?u=setTimeout:u=R}catch(p){u=R}try{typeof clearTimeout=="function"?C=clearTimeout:C=h}catch(p){C=h}})();function s(p){if(u===setTimeout)return setTimeout(p,0);if((u===R||!u)&&setTimeout)return u=setTimeout,setTimeout(p,0);try{return u(p,0)}catch(d){try{return u.call(null,p,0)}catch(n){return u.call(this,p,0)}}}function S(p){if(C===clearTimeout)return clearTimeout(p);if((C===h||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(p);try{return C(p)}catch(d){try{return C.call(null,p)}catch(n){return C.call(this,p)}}}var f=[],a=!1,o,r=-1;function x(){if(!a||!o)return;a=!1,o.length?f=o.concat(f):r=-1,f.length&&g()}function g(){if(a)return;var p=s(x);a=!0;for(var d=f.length;d;){for(o=f,f=[];++r<d;)o&&o[r].run();r=-1,d=f.length}o=null,a=!1,S(p)}P.nextTick=function(p){var d=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)d[n-1]=arguments[n];f.push(new m(p,d)),f.length===1&&!a&&s(g)};function m(p,d){this.fun=p,this.array=d}m.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(p){return[]},P.binding=function(p){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(p){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(N,Y,k){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(u){var C=typeof k=="object"&&k&&!k.nodeType&&k,R=typeof Y=="object"&&Y&&!Y.nodeType&&Y,h=typeof P=="object"&&P;(h.global===h||h.window===h||h.self===h)&&(u=h);var s,S=2147483647,f=36,a=1,o=26,r=38,x=700,g=72,m=128,w="-",p=/^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"},c=f-a,T=Math.floor,v=String.fromCharCode,i;function L(z){throw new RangeError(l[z])}function A(z,B){for(var W=z.length,F=[];W--;)F[W]=B(z[W]);return F}function y(z,B){var W=z.split("@"),F="";W.length>1&&(F=W[0]+"@",z=W[1]),z=z.replace(n,".");var $=z.split("."),ee=A($,B).join(".");return F+ee}function E(z){for(var B=[],W=0,F=z.length,$,ee;W<F;)$=z.charCodeAt(W++),$>=55296&&$<=56319&&W<F?(ee=z.charCodeAt(W++),(ee&64512)==56320?B.push((($&1023)<<10)+(ee&1023)+65536):(B.push($),W--)):B.push($);return B}function b(z){return A(z,function(B){var W="";return B>65535&&(B-=65536,W+=v(B>>>10&1023|55296),B=56320|B&1023),W+=v(B),W}).join("")}function _(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:f}function I(z,B){return z+22+75*(z<26)-((B!=0)<<5)}function j(z,B,W){var F=0;for(z=W?T(z/x):z>>1,z+=T(z/B);z>c*o>>1;F+=f)z=T(z/c);return T(F+(c+1)*z/(z+r))}function M(z){var B=[],W=z.length,F,$=0,ee=m,Z=g,ve,he,le,Re,xe,ie,se,re,be;for(ve=z.lastIndexOf(w),ve<0&&(ve=0),he=0;he<ve;++he)z.charCodeAt(he)>=128&&L("not-basic"),B.push(z.charCodeAt(he));for(le=ve>0?ve+1:0;le<W;){for(Re=$,xe=1,ie=f;!(le>=W&&L("invalid-input"),se=_(z.charCodeAt(le++)),(se>=f||se>T((S-$)/xe))&&L("overflow"),$+=se*xe,re=ie<=Z?a:ie>=Z+o?o:ie-Z,se<re);ie+=f)be=f-re,xe>T(S/be)&&L("overflow"),xe*=be;F=B.length+1,Z=j($-Re,F,Re==0),T($/F)>S-ee&&L("overflow"),ee+=T($/F),$%=F,B.splice($++,0,ee)}return b(B)}function G(z){var B,W,F,$,ee,Z,ve,he,le,Re,xe,ie=[],se,re,be,q;for(z=E(z),se=z.length,B=m,W=0,ee=g,Z=0;Z<se;++Z)xe=z[Z],xe<128&&ie.push(v(xe));for(F=$=ie.length,$&&ie.push(w);F<se;){for(ve=S,Z=0;Z<se;++Z)xe=z[Z],xe>=B&&xe<ve&&(ve=xe);for(re=F+1,ve-B>T((S-W)/re)&&L("overflow"),W+=(ve-B)*re,B=ve,Z=0;Z<se;++Z)if(xe=z[Z],xe<B&&++W>S&&L("overflow"),xe==B){for(he=W,le=f;!(Re=le<=ee?a:le>=ee+o?o:le-ee,he<Re);le+=f)q=he-Re,be=f-Re,ie.push(v(I(Re+q%be,0))),he=T(q/be);ie.push(v(I(he,0))),ee=j(W,re,F==$),W=0,++F}++W,++B}return ie.join("")}function K(z){return y(z,function(B){return p.test(B)?M(B.slice(4).toLowerCase()):B})}function H(z){return y(z,function(B){return d.test(B)?"xn--"+G(B):B})}if(s={version:"1.4.1",ucs2:{decode:E,encode:b},decode:M,encode:G,toASCII:H,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return s});else if(C&&R)if(Y.exports==C)R.exports=s;else for(i in s)s.hasOwnProperty(i)&&(C[i]=s[i]);else u.punycode=s})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(N,Y,k){"use strict";function P(C,R){return Object.prototype.hasOwnProperty.call(C,R)}Y.exports=function(C,R,h,s){R=R||"&",h=h||"=";var S={};if(typeof C!="string"||C.length===0)return S;var f=/\+/g;C=C.split(R);var a=1e3;s&&typeof s.maxKeys=="number"&&(a=s.maxKeys);var o=C.length;a>0&&o>a&&(o=a);for(var r=0;r<o;++r){var x=C[r].replace(f,"%20"),g=x.indexOf(h),m,w,p,d;g>=0?(m=x.substr(0,g),w=x.substr(g+1)):(m=x,w=""),p=decodeURIComponent(m),d=decodeURIComponent(w),P(S,p)?u(S[p])?S[p].push(d):S[p]=[S[p],d]:S[p]=d}return S};var u=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(N,Y,k){"use strict";var P=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};Y.exports=function(h,s,S,f){return s=s||"&",S=S||"=",h===null&&(h=void 0),typeof h=="object"?C(R(h),function(a){var o=encodeURIComponent(P(a))+S;return u(h[a])?C(h[a],function(r){return o+encodeURIComponent(P(r))}).join(s):o+encodeURIComponent(P(h[a]))}).join(s):f?encodeURIComponent(P(f))+S+encodeURIComponent(P(h)):""};var u=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function C(h,s){if(h.map)return h.map(s);for(var S=[],f=0;f<h.length;f++)S.push(s(h[f],f));return S}var R=Object.keys||function(h){var s=[];for(var S in h)Object.prototype.hasOwnProperty.call(h,S)&&s.push(S);return s}},{}],212:[function(N,Y,k){"use strict";k.decode=k.parse=N("./decode"),k.encode=k.stringify=N("./encode")},{"./decode":210,"./encode":211}],213:[function(N,Y,k){Y.exports=N("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=h(P),C=N("babel-runtime/core-js/object/keys"),R=h(C);function h(d){return d&&d.__esModule?d:{default:d}}var s=N("process-nextick-args"),S=R.default||function(d){var n=[];for(var l in d)n.push(l);return n};Y.exports=m;var f=(0,u.default)(N("core-util-is"));f.inherits=N("inherits");var a=N("./_stream_readable"),o=N("./_stream_writable");f.inherits(m,a);for(var r=S(o.prototype),x=0;x<r.length;x++){var g=r[x];m.prototype[g]||(m.prototype[g]=o.prototype[g])}function m(d){if(!(this instanceof m))return new m(d);a.call(this,d),o.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(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function w(){if(this.allowHalfOpen||this._writableState.ended)return;s.nextTick(p,this)}function p(d){d.end()}Object.defineProperty(m.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}}),m.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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(S){return S&&S.__esModule?S:{default:S}}Y.exports=s;var R=N("./_stream_transform"),h=(0,u.default)(N("core-util-is"));h.inherits=N("inherits"),h.inherits(s,R);function s(S){if(!(this instanceof s))return new s(S);R.call(this,S)}s.prototype._transform=function(S,f,a){a(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(N,Y,k){(function(P,u){"use strict";var C=N("babel-runtime/core-js/object/get-prototype-of"),R=S(C),h=N("babel-runtime/core-js/object/create"),s=S(h);function S(q){return q&&q.__esModule?q:{default:q}}var f=N("process-nextick-args");Y.exports=E;var a=N("isarray"),o;E.ReadableState=y;var r=N("events").EventEmitter,x=function(ne,Te){return ne.listeners(Te).length},g=N("./internal/streams/stream"),m=N("safe-buffer").Buffer,w=u.Uint8Array||function(){};function p(q){return m.from(q)}function d(q){return m.isBuffer(q)||q instanceof w}var n=(0,s.default)(N("core-util-is"));n.inherits=N("inherits");var l=N("util"),c=void 0;l&&l.debuglog?c=l.debuglog("stream"):c=function(){};var T=N("./internal/streams/BufferList"),v=N("./internal/streams/destroy"),i;n.inherits(E,g);var L=["error","close","destroy","pause","resume"];function A(q,ne,Te){if(typeof q.prependListener=="function")return q.prependListener(ne,Te);!q._events||!q._events[ne]?q.on(ne,Te):a(q._events[ne])?q._events[ne].unshift(Te):q._events[ne]=[Te,q._events[ne]]}function y(q,ne){o=o||N("./_stream_duplex"),q=q||{};var Te=ne instanceof o;this.objectMode=!!q.objectMode,Te&&(this.objectMode=this.objectMode||!!q.readableObjectMode);var ae=q.highWaterMark,J=q.readableHighWaterMark,X=this.objectMode?16:16*1024;ae||ae===0?this.highWaterMark=ae:Te&&(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=q.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,q.encoding&&(i||(i=N("string_decoder/").StringDecoder),this.decoder=new i(q.encoding),this.encoding=q.encoding)}function E(q){if(o=o||N("./_stream_duplex"),!(this instanceof E))return new E(q);this._readableState=new y(q,this),this.readable=!0,q&&(typeof q.read=="function"&&(this._read=q.read),typeof q.destroy=="function"&&(this._destroy=q.destroy)),g.call(this)}Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ne){if(!this._readableState)return;this._readableState.destroyed=ne}}),E.prototype.destroy=v.destroy,E.prototype._undestroy=v.undestroy,E.prototype._destroy=function(q,ne){this.push(null),ne(q)},E.prototype.push=function(q,ne){var Te=this._readableState,ae;return Te.objectMode?ae=!0:typeof q=="string"&&(ne=ne||Te.defaultEncoding,ne!==Te.encoding&&(q=m.from(q,ne),ne=""),ae=!0),b(this,q,ne,!1,ae)},E.prototype.unshift=function(q){return b(this,q,null,!0,!1)};function b(q,ne,Te,ae,J){var X=q._readableState;if(ne===null)X.reading=!1,H(q,X);else{var Q;J||(Q=I(X,ne)),Q?q.emit("error",Q):X.objectMode||ne&&ne.length>0?(typeof ne!="string"&&!X.objectMode&&(0,R.default)(ne)!==m.prototype&&(ne=p(ne)),ae?X.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):_(q,X,ne,!0):X.ended?q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Te?(ne=X.decoder.write(ne),X.objectMode||ne.length!==0?_(q,X,ne,!1):W(q,X)):_(q,X,ne,!1))):ae||(X.reading=!1)}return j(X)}function _(q,ne,Te,ae){ne.flowing&&ne.length===0&&!ne.sync?(q.emit("data",Te),q.read(0)):(ne.length+=ne.objectMode?1:Te.length,ae?ne.buffer.unshift(Te):ne.buffer.push(Te),ne.needReadable&&z(q)),W(q,ne)}function I(q,ne){var Te;return!d(ne)&&typeof ne!="string"&&ne!==void 0&&!q.objectMode&&(Te=new TypeError("Invalid non-string/buffer chunk")),Te}function j(q){return!q.ended&&(q.needReadable||q.length<q.highWaterMark||q.length===0)}E.prototype.isPaused=function(){return this._readableState.flowing===!1},E.prototype.setEncoding=function(q){return i||(i=N("string_decoder/").StringDecoder),this._readableState.decoder=new i(q),this._readableState.encoding=q,this};var M=8388608;function G(q){return q>=M?q=M:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function K(q,ne){return q<=0||ne.length===0&&ne.ended?0:ne.objectMode?1:q!==q?ne.flowing&&ne.length?ne.buffer.head.data.length:ne.length:(q>ne.highWaterMark&&(ne.highWaterMark=G(q)),q<=ne.length?q:ne.ended?ne.length:(ne.needReadable=!0,0))}E.prototype.read=function(q){c("read",q),q=parseInt(q,10);var ne=this._readableState,Te=q;if(q!==0&&(ne.emittedReadable=!1),q===0&&ne.needReadable&&(ne.length>=ne.highWaterMark||ne.ended))return c("read: emitReadable",ne.length,ne.ended),ne.length===0&&ne.ended?se(this):z(this),null;if(q=K(q,ne),q===0&&ne.ended)return ne.length===0&&se(this),null;var ae=ne.needReadable;c("need readable",ae),(ne.length===0||ne.length-q<ne.highWaterMark)&&(ae=!0,c("length less than watermark",ae)),ne.ended||ne.reading?(ae=!1,c("reading or ended",ae)):ae&&(c("do read"),ne.reading=!0,ne.sync=!0,ne.length===0&&(ne.needReadable=!0),this._read(ne.highWaterMark),ne.sync=!1,ne.reading||(q=K(Te,ne)));var J;return q>0?J=le(q,ne):J=null,J===null?(ne.needReadable=!0,q=0):ne.length-=q,ne.length===0&&(ne.ended||(ne.needReadable=!0),Te!==q&&ne.ended&&se(this)),J!==null&&this.emit("data",J),J};function H(q,ne){if(ne.ended)return;if(ne.decoder){var Te=ne.decoder.end();Te&&Te.length&&(ne.buffer.push(Te),ne.length+=ne.objectMode?1:Te.length)}ne.ended=!0,z(q)}function z(q){var ne=q._readableState;ne.needReadable=!1,ne.emittedReadable||(c("emitReadable",ne.flowing),ne.emittedReadable=!0,ne.sync?f.nextTick(B,q):B(q))}function B(q){c("emit readable"),q.emit("readable"),he(q)}function W(q,ne){ne.readingMore||(ne.readingMore=!0,f.nextTick(F,q,ne))}function F(q,ne){for(var Te=ne.length;!ne.reading&&!ne.flowing&&!ne.ended&&ne.length<ne.highWaterMark&&!(c("maybeReadMore read 0"),q.read(0),Te===ne.length);)Te=ne.length;ne.readingMore=!1}E.prototype._read=function(q){this.emit("error",new Error("_read() is not implemented"))},E.prototype.pipe=function(q,ne){var Te=this,ae=this._readableState;switch(ae.pipesCount){case 0:ae.pipes=q;break;case 1:ae.pipes=[ae.pipes,q];break;default:ae.pipes.push(q);break}ae.pipesCount+=1,c("pipe count=%d opts=%j",ae.pipesCount,ne);var J=(!ne||ne.end!==!1)&&q!==P.stdout&&q!==P.stderr,X=J?pe:Me;ae.endEmitted?f.nextTick(X):Te.once("end",X),q.on("unpipe",Q);function Q(Ce,Ve){c("onunpipe"),Ce===Te&&(Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,ze()))}function pe(){c("onend"),q.end()}var ce=$(Te);q.on("drain",ce);var we=!1;function ze(){c("cleanup"),q.removeListener("close",rt),q.removeListener("finish",et),q.removeListener("drain",ce),q.removeListener("error",$e),q.removeListener("unpipe",Q),Te.removeListener("end",pe),Te.removeListener("end",Me),Te.removeListener("data",Qe),we=!0,ae.awaitDrain&&(!q._writableState||q._writableState.needDrain)&&ce()}var Ge=!1;Te.on("data",Qe);function Qe(Ce){c("ondata"),Ge=!1;var Ve=q.write(Ce);Ve===!1&&!Ge&&((ae.pipesCount===1&&ae.pipes===q||ae.pipesCount>1&&be(ae.pipes,q)!==-1)&&!we&&(c("false write response, pause",Te._readableState.awaitDrain),Te._readableState.awaitDrain++,Ge=!0),Te.pause())}function $e(Ce){c("onerror",Ce),Me(),q.removeListener("error",$e),x(q,"error")===0&&q.emit("error",Ce)}A(q,"error",$e);function rt(){q.removeListener("finish",et),Me()}q.once("close",rt);function et(){c("onfinish"),q.removeListener("close",rt),Me()}q.once("finish",et);function Me(){c("unpipe"),Te.unpipe(q)}return q.emit("pipe",Te),ae.flowing||(c("pipe resume"),Te.resume()),q};function $(q){return function(){var ne=q._readableState;c("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&x(q,"data")&&(ne.flowing=!0,he(q))}}E.prototype.unpipe=function(q){var ne=this._readableState,Te={hasUnpiped:!1};if(ne.pipesCount===0)return this;if(ne.pipesCount===1)return q&&q!==ne.pipes?this:(q||(q=ne.pipes),ne.pipes=null,ne.pipesCount=0,ne.flowing=!1,q&&q.emit("unpipe",this,Te),this);if(!q){var ae=ne.pipes,J=ne.pipesCount;ne.pipes=null,ne.pipesCount=0,ne.flowing=!1;for(var X=0;X<J;X++)ae[X].emit("unpipe",this,Te);return this}var Q=be(ne.pipes,q);return Q===-1?this:(ne.pipes.splice(Q,1),ne.pipesCount-=1,ne.pipesCount===1&&(ne.pipes=ne.pipes[0]),q.emit("unpipe",this,Te),this)},E.prototype.on=function(q,ne){var Te=g.prototype.on.call(this,q,ne);if(q==="data")this._readableState.flowing!==!1&&this.resume();else if(q==="readable"){var ae=this._readableState;!ae.endEmitted&&!ae.readableListening&&(ae.readableListening=ae.needReadable=!0,ae.emittedReadable=!1,ae.reading?ae.length&&z(this):f.nextTick(ee,this))}return Te},E.prototype.addListener=E.prototype.on;function ee(q){c("readable nexttick read 0"),q.read(0)}E.prototype.resume=function(){var q=this._readableState;return q.flowing||(c("resume"),q.flowing=!0,Z(this,q)),this};function Z(q,ne){ne.resumeScheduled||(ne.resumeScheduled=!0,f.nextTick(ve,q,ne))}function ve(q,ne){ne.reading||(c("resume read 0"),q.read(0)),ne.resumeScheduled=!1,ne.awaitDrain=0,q.emit("resume"),he(q),ne.flowing&&!ne.reading&&q.read(0)}E.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function he(q){var ne=q._readableState;for(c("flow",ne.flowing);ne.flowing&&q.read()!==null;);}E.prototype.wrap=function(q){var ne=this,Te=this._readableState,ae=!1;q.on("end",function(){if(c("wrapped end"),Te.decoder&&!Te.ended){var Q=Te.decoder.end();Q&&Q.length&&ne.push(Q)}ne.push(null)}),q.on("data",function(Q){if(c("wrapped data"),Te.decoder&&(Q=Te.decoder.write(Q)),Te.objectMode&&Q==null)return;if(!Te.objectMode&&(!Q||!Q.length))return;var pe=ne.push(Q);pe||(ae=!0,q.pause())});for(var J in q)this[J]===void 0&&typeof q[J]=="function"&&(this[J]=function(Q){return function(){return q[Q].apply(q,arguments)}}(J));for(var X=0;X<L.length;X++)q.on(L[X],this.emit.bind(this,L[X]));return this._read=function(Q){c("wrapped _read",Q),ae&&(ae=!1,q.resume())},this},Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),E._fromList=le;function le(q,ne){if(ne.length===0)return null;var Te;return ne.objectMode?Te=ne.buffer.shift():!q||q>=ne.length?(ne.decoder?Te=ne.buffer.join(""):ne.buffer.length===1?Te=ne.buffer.head.data:Te=ne.buffer.concat(ne.length),ne.buffer.clear()):Te=Re(q,ne.buffer,ne.decoder),Te}function Re(q,ne,Te){var ae;return q<ne.head.data.length?(ae=ne.head.data.slice(0,q),ne.head.data=ne.head.data.slice(q)):q===ne.head.data.length?ae=ne.shift():ae=Te?xe(q,ne):ie(q,ne),ae}function xe(q,ne){var Te=ne.head,ae=1,J=Te.data;for(q-=J.length;Te=Te.next;){var X=Te.data,Q=q>X.length?X.length:q;if(Q===X.length?J+=X:J+=X.slice(0,q),q-=Q,q===0){Q===X.length?(++ae,Te.next?ne.head=Te.next:ne.head=ne.tail=null):(ne.head=Te,Te.data=X.slice(Q));break}++ae}return ne.length-=ae,J}function ie(q,ne){var Te=m.allocUnsafe(q),ae=ne.head,J=1;for(ae.data.copy(Te),q-=ae.data.length;ae=ae.next;){var X=ae.data,Q=q>X.length?X.length:q;if(X.copy(Te,Te.length-q,0,Q),q-=Q,q===0){Q===X.length?(++J,ae.next?ne.head=ae.next:ne.head=ne.tail=null):(ne.head=ae,ae.data=X.slice(Q));break}++J}return ne.length-=J,Te}function se(q){var ne=q._readableState;if(ne.length>0)throw new Error('"endReadable()" called on non-empty stream');ne.endEmitted||(ne.ended=!0,f.nextTick(re,ne,q))}function re(q,ne){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,ne.readable=!1,ne.emit("end"))}function be(q,ne){for(var Te=0,ae=q.length;Te<ae;Te++)if(q[Te]===ne)return Te;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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(o){return o&&o.__esModule?o:{default:o}}Y.exports=S;var R=N("./_stream_duplex"),h=(0,u.default)(N("core-util-is"));h.inherits=N("inherits"),h.inherits(S,R);function s(o,r){var x=this._transformState;x.transforming=!1;var g=x.writecb;if(!g)return this.emit("error",new Error("write callback called multiple times"));x.writechunk=null,x.writecb=null,r!=null&&this.push(r),g(o);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}function S(o){if(!(this instanceof S))return new S(o);R.call(this,o),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",f)}function f(){var o=this;typeof this._flush=="function"?this._flush(function(r,x){a(o,r,x)}):a(this,null,null)}S.prototype.push=function(o,r){return this._transformState.needTransform=!1,R.prototype.push.call(this,o,r)},S.prototype._transform=function(o,r,x){throw new Error("_transform() is not implemented")},S.prototype._write=function(o,r,x){var g=this._transformState;if(g.writecb=x,g.writechunk=o,g.writeencoding=r,!g.transforming){var m=this._readableState;(g.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}},S.prototype._read=function(o){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(o,r){var x=this;R.prototype._destroy.call(this,o,function(g){r(g),x.emit("close")})};function a(o,r,x){if(r)return o.emit("error",r);if(x!=null&&o.push(x),o._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(o._transformState.transforming)throw new Error("Calling transform done when still transforming");return o.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(N,Y,k){(function(P,u){"use strict";var C=N("babel-runtime/core-js/object/define-property"),R=g(C),h=N("babel-runtime/core-js/symbol/has-instance"),s=g(h),S=N("babel-runtime/core-js/symbol"),f=g(S),a=N("babel-runtime/core-js/object/create"),o=g(a),r=N("babel-runtime/core-js/set-immediate"),x=g(r);function g(ie){return ie&&ie.__esModule?ie:{default:ie}}var m=N("process-nextick-args");Y.exports=I;function w(ie,se,re){this.chunk=ie,this.encoding=se,this.callback=re,this.next=null}function p(ie){var se=this;this.next=null,this.entry=null,this.finish=function(){xe(se,ie)}}var d=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?x.default:m.nextTick,n;I.WritableState=b;var l=(0,o.default)(N("core-util-is"));l.inherits=N("inherits");var c={deprecate:N("util-deprecate")},T=N("./internal/streams/stream"),v=N("safe-buffer").Buffer,i=u.Uint8Array||function(){};function L(ie){return v.from(ie)}function A(ie){return v.isBuffer(ie)||ie instanceof i}var y=N("./internal/streams/destroy");l.inherits(I,T);function E(){}function b(ie,se){n=n||N("./_stream_duplex"),ie=ie||{};var re=se instanceof n;this.objectMode=!!ie.objectMode,re&&(this.objectMode=this.objectMode||!!ie.writableObjectMode);var be=ie.highWaterMark,q=ie.writableHighWaterMark,ne=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:re&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=ne,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 Te=ie.decodeStrings===!1;this.decodeStrings=!Te,this.defaultEncoding=ie.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ae){W(se,ae)},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 p(this)}b.prototype.getBuffer=function(){for(var se=this.bufferedRequest,re=[];se;)re.push(se),se=se.next;return re},function(){try{Object.defineProperty(b.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ie){}}();var _;typeof f.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(_=Function.prototype[s.default],(0,R.default)(I,s.default,{value:function(se){return _.call(this,se)?!0:this!==I?!1:se&&se._writableState instanceof b}})):_=function(se){return se instanceof this};function I(ie){if(n=n||N("./_stream_duplex"),!_.call(I,this)&&!(this instanceof n))return new I(ie);this._writableState=new b(ie,this),this.writable=!0,ie&&(typeof ie.write=="function"&&(this._write=ie.write),typeof ie.writev=="function"&&(this._writev=ie.writev),typeof ie.destroy=="function"&&(this._destroy=ie.destroy),typeof ie.final=="function"&&(this._final=ie.final)),T.call(this)}I.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(ie,se){var re=new Error("write after end");ie.emit("error",re),m.nextTick(se,re)}function M(ie,se,re,be){var q=!0,ne=!1;return re===null?ne=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!se.objectMode&&(ne=new TypeError("Invalid non-string/buffer chunk")),ne&&(ie.emit("error",ne),m.nextTick(be,ne),q=!1),q}I.prototype.write=function(ie,se,re){var be=this._writableState,q=!1,ne=!be.objectMode&&A(ie);return ne&&!v.isBuffer(ie)&&(ie=L(ie)),typeof se=="function"&&(re=se,se=null),ne?se="buffer":se||(se=be.defaultEncoding),typeof re!="function"&&(re=E),be.ended?j(this,re):(ne||M(this,be,ie,re))&&(be.pendingcb++,q=K(this,be,ne,ie,se,re)),q},I.prototype.cork=function(){var ie=this._writableState;ie.corked++},I.prototype.uncork=function(){var ie=this._writableState;ie.corked&&(ie.corked--,!ie.writing&&!ie.corked&&!ie.finished&&!ie.bufferProcessing&&ie.bufferedRequest&&ee(this,ie))},I.prototype.setDefaultEncoding=function(se){if(typeof se=="string"&&(se=se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((se+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+se);return this._writableState.defaultEncoding=se,this};function G(ie,se,re){return!ie.objectMode&&ie.decodeStrings!==!1&&typeof se=="string"&&(se=v.from(se,re)),se}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(ie,se,re,be,q,ne){if(!re){var Te=G(se,be,q);be!==Te&&(re=!0,q="buffer",be=Te)}var ae=se.objectMode?1:be.length;se.length+=ae;var J=se.length<se.highWaterMark;if(J||(se.needDrain=!0),se.writing||se.corked){var X=se.lastBufferedRequest;se.lastBufferedRequest={chunk:be,encoding:q,isBuf:re,callback:ne,next:null},X?X.next=se.lastBufferedRequest:se.bufferedRequest=se.lastBufferedRequest,se.bufferedRequestCount+=1}else H(ie,se,!1,ae,be,q,ne);return J}function H(ie,se,re,be,q,ne,Te){se.writelen=be,se.writecb=Te,se.writing=!0,se.sync=!0,re?ie._writev(q,se.onwrite):ie._write(q,ne,se.onwrite),se.sync=!1}function z(ie,se,re,be,q){--se.pendingcb,re?(m.nextTick(q,be),m.nextTick(le,ie,se),ie._writableState.errorEmitted=!0,ie.emit("error",be)):(q(be),ie._writableState.errorEmitted=!0,ie.emit("error",be),le(ie,se))}function B(ie){ie.writing=!1,ie.writecb=null,ie.length-=ie.writelen,ie.writelen=0}function W(ie,se){var re=ie._writableState,be=re.sync,q=re.writecb;if(B(re),se)z(ie,re,be,se,q);else{var ne=Z(re);!ne&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&ee(ie,re),be?d(F,ie,re,ne,q):F(ie,re,ne,q)}}function F(ie,se,re,be){re||$(ie,se),se.pendingcb--,be(),le(ie,se)}function $(ie,se){se.length===0&&se.needDrain&&(se.needDrain=!1,ie.emit("drain"))}function ee(ie,se){se.bufferProcessing=!0;var re=se.bufferedRequest;if(ie._writev&&re&&re.next){var be=se.bufferedRequestCount,q=new Array(be),ne=se.corkedRequestsFree;ne.entry=re;for(var Te=0,ae=!0;re;)q[Te]=re,re.isBuf||(ae=!1),re=re.next,Te+=1;q.allBuffers=ae,H(ie,se,!0,se.length,q,"",ne.finish),se.pendingcb++,se.lastBufferedRequest=null,ne.next?(se.corkedRequestsFree=ne.next,ne.next=null):se.corkedRequestsFree=new p(se),se.bufferedRequestCount=0}else{for(;re;){var J=re.chunk,X=re.encoding,Q=re.callback,pe=se.objectMode?1:J.length;if(H(ie,se,!1,pe,J,X,Q),re=re.next,se.bufferedRequestCount--,se.writing)break}re===null&&(se.lastBufferedRequest=null)}se.bufferedRequest=re,se.bufferProcessing=!1}I.prototype._write=function(ie,se,re){re(new Error("_write() is not implemented"))},I.prototype._writev=null,I.prototype.end=function(ie,se,re){var be=this._writableState;typeof ie=="function"?(re=ie,ie=null,se=null):typeof se=="function"&&(re=se,se=null),ie!=null&&this.write(ie,se),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&Re(this,be,re)};function Z(ie){return ie.ending&&ie.length===0&&ie.bufferedRequest===null&&!ie.finished&&!ie.writing}function ve(ie,se){ie._final(function(re){se.pendingcb--,re&&ie.emit("error",re),se.prefinished=!0,ie.emit("prefinish"),le(ie,se)})}function he(ie,se){!se.prefinished&&!se.finalCalled&&(typeof ie._final=="function"?(se.pendingcb++,se.finalCalled=!0,m.nextTick(ve,ie,se)):(se.prefinished=!0,ie.emit("prefinish")))}function le(ie,se){var re=Z(se);return re&&(he(ie,se),se.pendingcb===0&&(se.finished=!0,ie.emit("finish"))),re}function Re(ie,se,re){se.ending=!0,le(ie,se),re&&(se.finished?m.nextTick(re):ie.once("finish",re)),se.ended=!0,ie.writable=!1}function xe(ie,se,re){var be=ie.entry;for(ie.entry=null;be;){var q=be.callback;se.pendingcb--,q(re),be=be.next}se.corkedRequestsFree?se.corkedRequestsFree.next=ie:se.corkedRequestsFree=ie}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(se){if(!this._writableState)return;this._writableState.destroyed=se}}),I.prototype.destroy=y.destroy,I.prototype._undestroy=y.undestroy,I.prototype._destroy=function(ie,se){this.end(),se(ie)}}).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,Y,k){"use strict";function P(h,s){if(!(h instanceof s))throw new TypeError("Cannot call a class as a function")}var u=N("safe-buffer").Buffer,C=N("util");function R(h,s,S){h.copy(s,S)}Y.exports=function(){function h(){P(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(S){var f={data:S,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length},h.prototype.unshift=function(S){var f={data:S,next:this.head};this.length===0&&(this.tail=f),this.head=f,++this.length},h.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},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(S){if(this.length===0)return"";for(var f=this.head,a=""+f.data;f=f.next;)a+=S+f.data;return a},h.prototype.concat=function(S){if(this.length===0)return u.alloc(0);if(this.length===1)return this.head.data;for(var f=u.allocUnsafe(S>>>0),a=this.head,o=0;a;)R(a.data,f,o),o+=a.data.length,a=a.next;return f},h}(),C&&C.inspect&&C.inspect.custom&&(Y.exports.prototype[C.inspect.custom]=function(){var h=C.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":228,util:71}],220:[function(N,Y,k){"use strict";var P=N("process-nextick-args");function u(h,s){var S=this,f=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return f||a?(s?s(h):h&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(R,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(o){!s&&o?(P.nextTick(R,S,o),S._writableState&&(S._writableState.errorEmitted=!0)):s&&s(o)}),this)}function C(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function R(h,s){h.emit("error",s)}Y.exports={destroy:u,undestroy:C}},{"process-nextick-args":207}],221:[function(N,Y,k){"use strict";Y.exports=N("events").EventEmitter},{events:192}],222:[function(N,Y,k){Y.exports=N("./readable").PassThrough},{"./readable":223}],223:[function(N,Y,k){k=Y.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,Y,k){Y.exports=N("./readable").Transform},{"./readable":223}],225:[function(N,Y,k){Y.exports=N("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(N,Y,k){var P=function(){return this}()||Function("return this")(),u=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,C=u&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,Y.exports=N("./runtime"),u)P.regeneratorRuntime=C;else try{delete P.regeneratorRuntime}catch(R){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(N,Y,k){!function(P){"use strict";var u=Object.prototype,C=u.hasOwnProperty,R,h=typeof Symbol=="function"?Symbol:{},s=h.iterator||"@@iterator",S=h.asyncIterator||"@@asyncIterator",f=h.toStringTag||"@@toStringTag",a=typeof Y=="object",o=P.regeneratorRuntime;if(o){a&&(Y.exports=o);return}o=P.regeneratorRuntime=a?Y.exports:{};function r(K,H,z,B){var W=H&&H.prototype instanceof n?H:n,F=Object.create(W.prototype),$=new j(B||[]);return F._invoke=E(K,z,$),F}o.wrap=r;function x(K,H,z){try{return{type:"normal",arg:K.call(H,z)}}catch(B){return{type:"throw",arg:B}}}var g="suspendedStart",m="suspendedYield",w="executing",p="completed",d={};function n(){}function l(){}function c(){}var T={};T[s]=function(){return this};var v=Object.getPrototypeOf,i=v&&v(v(M([])));i&&i!==u&&C.call(i,s)&&(T=i);var L=c.prototype=n.prototype=Object.create(T);l.prototype=L.constructor=c,c.constructor=l,c[f]=l.displayName="GeneratorFunction";function A(K){["next","throw","return"].forEach(function(H){K[H]=function(z){return this._invoke(H,z)}})}o.isGeneratorFunction=function(K){var H=typeof K=="function"&&K.constructor;return H?H===l||(H.displayName||H.name)==="GeneratorFunction":!1},o.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,c):(K.__proto__=c,f in K||(K[f]="GeneratorFunction")),K.prototype=Object.create(L),K},o.awrap=function(K){return{__await:K}};function y(K){function H(W,F,$,ee){var Z=x(K[W],K,F);if(Z.type==="throw")ee(Z.arg);else{var ve=Z.arg,he=ve.value;return he&&typeof he=="object"&&C.call(he,"__await")?Promise.resolve(he.__await).then(function(le){H("next",le,$,ee)},function(le){H("throw",le,$,ee)}):Promise.resolve(he).then(function(le){ve.value=le,$(ve)},ee)}}var z;function B(W,F){function $(){return new Promise(function(ee,Z){H(W,F,ee,Z)})}return z=z?z.then($,$):$()}this._invoke=B}A(y.prototype),y.prototype[S]=function(){return this},o.AsyncIterator=y,o.async=function(K,H,z,B){var W=new y(r(K,H,z,B));return o.isGeneratorFunction(H)?W:W.next().then(function(F){return F.done?F.value:W.next()})};function E(K,H,z){var B=g;return function(F,$){if(B===w)throw new Error("Generator is already running");if(B===p){if(F==="throw")throw $;return G()}for(z.method=F,z.arg=$;;){var ee=z.delegate;if(ee){var Z=b(ee,z);if(Z){if(Z===d)continue;return Z}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(B===g)throw B=p,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);B=w;var ve=x(K,H,z);if(ve.type==="normal"){if(B=z.done?p:m,ve.arg===d)continue;return{value:ve.arg,done:z.done}}else ve.type==="throw"&&(B=p,z.method="throw",z.arg=ve.arg)}}}function b(K,H){var z=K.iterator[H.method];if(z===R){if(H.delegate=null,H.method==="throw"){if(K.iterator.return&&(H.method="return",H.arg=R,b(K,H),H.method==="throw"))return d;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var B=x(z,K.iterator,H.arg);if(B.type==="throw")return H.method="throw",H.arg=B.arg,H.delegate=null,d;var W=B.arg;if(!W)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,d;if(W.done)H[K.resultName]=W.value,H.next=K.nextLoc,H.method!=="return"&&(H.method="next",H.arg=R);else return W;return H.delegate=null,d}A(L),L[f]="Generator",L[s]=function(){return this},L.toString=function(){return"[object Generator]"};function _(K){var H={tryLoc:K[0]};1 in K&&(H.catchLoc=K[1]),2 in K&&(H.finallyLoc=K[2],H.afterLoc=K[3]),this.tryEntries.push(H)}function I(K){var H=K.completion||{};H.type="normal",delete H.arg,K.completion=H}function j(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(_,this),this.reset(!0)}o.keys=function(K){var H=[];for(var z in K)H.push(z);return H.reverse(),function B(){for(;H.length;){var W=H.pop();if(W in K)return B.value=W,B.done=!1,B}return B.done=!0,B}};function M(K){if(K){var H=K[s];if(H)return H.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var z=-1,B=function W(){for(;++z<K.length;)if(C.call(K,z))return W.value=K[z],W.done=!1,W;return W.value=R,W.done=!0,W};return B.next=B}}return{next:G}}o.values=M;function G(){return{value:R,done:!0}}j.prototype={constructor:j,reset:function(K){if(this.prev=0,this.next=0,this.sent=this._sent=R,this.done=!1,this.delegate=null,this.method="next",this.arg=R,this.tryEntries.forEach(I),!K)for(var H in this)H.charAt(0)==="t"&&C.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=R)},stop:function(){this.done=!0;var K=this.tryEntries[0],H=K.completion;if(H.type==="throw")throw H.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var H=this;function z(Z,ve){return F.type="throw",F.arg=K,H.next=Z,ve&&(H.method="next",H.arg=R),!!ve}for(var B=this.tryEntries.length-1;B>=0;--B){var W=this.tryEntries[B],F=W.completion;if(W.tryLoc==="root")return z("end");if(W.tryLoc<=this.prev){var $=C.call(W,"catchLoc"),ee=C.call(W,"finallyLoc");if($&&ee){if(this.prev<W.catchLoc)return z(W.catchLoc,!0);if(this.prev<W.finallyLoc)return z(W.finallyLoc)}else if($){if(this.prev<W.catchLoc)return z(W.catchLoc,!0)}else if(ee){if(this.prev<W.finallyLoc)return z(W.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,H){for(var z=this.tryEntries.length-1;z>=0;--z){var B=this.tryEntries[z];if(B.tryLoc<=this.prev&&C.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var W=B;break}}W&&(K==="break"||K==="continue")&&W.tryLoc<=H&&H<=W.finallyLoc&&(W=null);var F=W?W.completion:{};return F.type=K,F.arg=H,W?(this.method="next",this.next=W.finallyLoc,d):this.complete(F)},complete:function(K,H){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&H&&(this.next=H),d},finish:function(K){for(var H=this.tryEntries.length-1;H>=0;--H){var z=this.tryEntries[H];if(z.finallyLoc===K)return this.complete(z.completion,z.afterLoc),I(z),d}},catch:function(K){for(var H=this.tryEntries.length-1;H>=0;--H){var z=this.tryEntries[H];if(z.tryLoc===K){var B=z.completion;if(B.type==="throw"){var W=B.arg;I(z)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(K,H,z){return this.delegate={iterator:M(K),resultName:H,nextLoc:z},this.method==="next"&&(this.arg=R),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(N,Y,k){var P=N("buffer"),u=P.Buffer;function C(h,s){for(var S in h)s[S]=h[S]}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?Y.exports=P:(C(P,k),k.Buffer=R);function R(h,s,S){return u(h,s,S)}C(u,R),R.from=function(h,s,S){if(typeof h=="number")throw new TypeError("Argument must not be a number");return u(h,s,S)},R.alloc=function(h,s,S){if(typeof h!="number")throw new TypeError("Argument must be a number");var f=u(h);return s!==void 0?typeof S=="string"?f.fill(s,S):f.fill(s):f.fill(0),f},R.allocUnsafe=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return u(h)},R.allocUnsafeSlow=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(h)}},{buffer:73}],229:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/string/from-code-point"),C=m(u),R=N("babel-runtime/core-js/json/stringify"),h=m(R),s=N("babel-runtime/helpers/typeof"),S=m(s),f=N("babel-runtime/core-js/object/define-property"),a=m(f),o=N("babel-runtime/core-js/object/keys"),r=m(o),x=N("babel-runtime/core-js/object/create"),g=m(x);function m(w){return w&&w.__esModule?w:{default:w}}(function(w){w.parser=function(X,Q){return new d(X,Q)},w.SAXParser=d,w.SAXStream=L,w.createStream=i,w.MAX_BUFFER_LENGTH=64*1024;var p=["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,Q){if(!(this instanceof d))return new d(X,Q);var pe=this;l(pe),pe.q=pe.c="",pe.bufferCheckPosition=w.MAX_BUFFER_LENGTH,pe.opt=Q||{},pe.opt.lowercase=pe.opt.lowercase||pe.opt.lowercasetags,pe.looseCase=pe.opt.lowercase?"toLowerCase":"toUpperCase",pe.tags=[],pe.closed=pe.closedRoot=pe.sawRoot=!1,pe.tag=pe.error=null,pe.strict=!!X,pe.noscript=!!(X||pe.opt.noscript),pe.state=F.BEGIN,pe.strictEntities=pe.opt.strictEntities,pe.ENTITIES=pe.strictEntities?(0,g.default)(w.XML_ENTITIES):(0,g.default)(w.ENTITIES),pe.attribList=[],pe.opt.xmlns&&(pe.ns=(0,g.default)(_)),pe.trackPosition=pe.opt.position!==!1,pe.trackPosition&&(pe.position=pe.line=pe.column=0),ee(pe,"onready")}g.default||(Object.create=function(X){function Q(){}Q.prototype=X;var pe=new Q;return pe}),r.default||(Object.keys=function(X){var Q=[];for(var pe in X)X.hasOwnProperty(pe)&&Q.push(pe);return Q});function n(X){for(var Q=Math.max(w.MAX_BUFFER_LENGTH,10),pe=0,ce=0,we=p.length;ce<we;ce++){var ze=X[p[ce]].length;if(ze>Q)switch(p[ce]){case"textNode":ve(X);break;case"cdata":Z(X,"oncdata",X.cdata),X.cdata="";break;case"script":Z(X,"onscript",X.script),X.script="";break;default:le(X,"Max buffer length exceeded: "+p[ce])}pe=Math.max(pe,ze)}var Ge=w.MAX_BUFFER_LENGTH-pe;X.bufferCheckPosition=Ge+X.position}function l(X){for(var Q=0,pe=p.length;Q<pe;Q++)X[p[Q]]=""}function c(X){ve(X),X.cdata!==""&&(Z(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(Z(X,"onscript",X.script),X.script="")}d.prototype={end:function(){Re(this)},write:J,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var T;try{T=N("stream").Stream}catch(X){T=function(){}}var v=w.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function i(X,Q){return new L(X,Q)}function L(X,Q){if(!(this instanceof L))return new L(X,Q);T.apply(this),this._parser=new d(X,Q),this.writable=!0,this.readable=!0;var pe=this;this._parser.onend=function(){pe.emit("end")},this._parser.onerror=function(ce){pe.emit("error",ce),pe._parser.error=null},this._decoder=null,v.forEach(function(ce){(0,a.default)(pe,"on"+ce,{get:function(){return pe._parser["on"+ce]},set:function(ze){if(!ze)return pe.removeAllListeners(ce),pe._parser["on"+ce]=ze,ze;pe.on(ce,ze)},enumerable:!0,configurable:!1})})}L.prototype=(0,g.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 Q=N("string_decoder").StringDecoder;this._decoder=new Q("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,Q){var pe=this;return!pe._parser["on"+X]&&v.indexOf(X)!==-1&&(pe._parser["on"+X]=function(){var ce=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ce.splice(0,0,X),pe.emit.apply(pe,ce)}),T.prototype.on.call(pe,X,Q)};var A="[CDATA[",y="DOCTYPE",E="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",_={xml:E,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]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function K(X){return X===" "||X===`
`||X==="\r"||X===" "}function H(X){return X==='"'||X==="'"}function z(X){return X===">"||K(X)}function B(X,Q){return X.test(Q)}function W(X,Q){return!B(X,Q)}var F=0;w.STATE={BEGIN:F++,BEGIN_WHITESPACE:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_CLOSED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},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 Q=w.ENTITIES[X],pe=typeof Q=="number"?String.fromCharCode(Q):Q;w.ENTITIES[X]=pe});for(var $ in w.STATE)w.STATE[w.STATE[$]]=$;F=w.STATE;function ee(X,Q,pe){X[Q]&&X[Q](pe)}function Z(X,Q,pe){X.textNode&&ve(X),ee(X,Q,pe)}function ve(X){X.textNode=he(X.opt,X.textNode),X.textNode&&ee(X,"ontext",X.textNode),X.textNode=""}function he(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function le(X,Q){return ve(X),X.trackPosition&&(Q+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),Q=new Error(Q),X.error=Q,ee(X,"onerror",Q),X}function Re(X){return X.sawRoot&&!X.closedRoot&&xe(X,"Unclosed root tag"),X.state!==F.BEGIN&&X.state!==F.BEGIN_WHITESPACE&&X.state!==F.TEXT&&le(X,"Unexpected end"),ve(X),X.c="",X.closed=!0,ee(X,"onend"),d.call(X,X.strict,X.opt),X}function xe(X,Q){if((typeof X=="undefined"?"undefined":(0,S.default)(X))!=="object"||!(X instanceof d))throw new Error("bad call to strictFail");X.strict&&le(X,Q)}function ie(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,pe=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(pe.ns=Q.ns),X.attribList.length=0,Z(X,"onopentagstart",pe)}function se(X,Q){var pe=X.indexOf(":"),ce=pe<0?["",X]:X.split(":"),we=ce[0],ze=ce[1];return Q&&X==="xmlns"&&(we="xmlns",ze=""),{prefix:we,local:ze}}function re(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 Q=se(X.attribName,!0),pe=Q.prefix,ce=Q.local;if(pe==="xmlns")if(ce==="xml"&&X.attribValue!==E)xe(X,"xml: prefix must be bound to "+E+`
Actual: `+X.attribValue);else if(ce==="xmlns"&&X.attribValue!==b)xe(X,"xmlns: prefix must be bound to "+b+`
Actual: `+X.attribValue);else{var we=X.tag,ze=X.tags[X.tags.length-1]||X;we.ns===ze.ns&&(we.ns=(0,g.default)(ze.ns)),we.ns[ce]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,Z(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,Q){if(X.opt.xmlns){var pe=X.tag,ce=se(X.tagName);pe.prefix=ce.prefix,pe.local=ce.local,pe.uri=pe.ns[ce.prefix]||"",pe.prefix&&!pe.uri&&(xe(X,"Unbound namespace prefix: "+(0,h.default)(X.tagName)),pe.uri=ce.prefix);var we=X.tags[X.tags.length-1]||X;pe.ns&&we.ns!==pe.ns&&(0,r.default)(pe.ns).forEach(function(He){Z(X,"onopennamespace",{prefix:He,uri:pe.ns[He]})});for(var ze=0,Ge=X.attribList.length;ze<Ge;ze++){var Qe=X.attribList[ze],$e=Qe[0],rt=Qe[1],et=se($e,!0),Me=et.prefix,Ce=et.local,Ve=Me===""?"":pe.ns[Me]||"",tt={name:$e,value:rt,prefix:Me,local:Ce,uri:Ve};Me&&Me!=="xmlns"&&!Ve&&(xe(X,"Unbound namespace prefix: "+(0,h.default)(Me)),tt.uri=Me),X.tag.attributes[$e]=tt,Z(X,"onattribute",tt)}X.attribList.length=0}X.tag.isSelfClosing=!!Q,X.sawRoot=!0,X.tags.push(X.tag),Z(X,"onopentag",X.tag),Q||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=F.SCRIPT:X.state=F.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function q(X){if(!X.tagName){xe(X,"Weird empty close tag."),X.textNode+="</>",X.state=F.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=F.SCRIPT;return}Z(X,"onscript",X.script),X.script=""}var Q=X.tags.length,pe=X.tagName;X.strict||(pe=pe[X.looseCase]());for(var ce=pe;Q--;){var we=X.tags[Q];if(we.name!==ce)xe(X,"Unexpected close tag");else break}if(Q<0){xe(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=F.TEXT;return}X.tagName=pe;for(var ze=X.tags.length;ze-- >Q;){var Ge=X.tag=X.tags.pop();X.tagName=X.tag.name,Z(X,"onclosetag",X.tagName);var Qe={};for(var $e in Ge.ns)Qe[$e]=Ge.ns[$e];var rt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Ge.ns!==rt.ns&&(0,r.default)(Ge.ns).forEach(function(et){var Me=Ge.ns[et];Z(X,"onclosenamespace",{prefix:et,uri:Me})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=F.TEXT}function ne(X){var Q=X.entity,pe=Q.toLowerCase(),ce,we="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[pe]?X.ENTITIES[pe]:(Q=pe,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ce=parseInt(Q,16),we=ce.toString(16)):(Q=Q.slice(1),ce=parseInt(Q,10),we=ce.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ce)||we.toLowerCase()!==Q?(xe(X,"Invalid character entity"),"&"+X.entity+";"):(0,C.default)(ce))}function Te(X,Q){Q==="<"?(X.state=F.OPEN_WAKA,X.startTagPosition=X.position):K(Q)||(xe(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=F.TEXT)}function ae(X,Q){var pe="";return Q<X.length&&(pe=X.charAt(Q)),pe}function J(X){var Q=this;if(this.error)throw this.error;if(Q.closed)return le(Q,"Cannot write after close. Assign an onready handler.");if(X===null)return Re(Q);(typeof X=="undefined"?"undefined":(0,S.default)(X))==="object"&&(X=X.toString());for(var pe=0,ce="";!(ce=ae(X,pe++),Q.c=ce,!ce);){Q.trackPosition&&(Q.position++,ce===`
`?(Q.line++,Q.column=0):Q.column++);switch(Q.state){case F.BEGIN:if(Q.state=F.BEGIN_WHITESPACE,ce==="\uFEFF")continue;Te(Q,ce);continue;case F.BEGIN_WHITESPACE:Te(Q,ce);continue;case F.TEXT:if(Q.sawRoot&&!Q.closedRoot){for(var we=pe-1;ce&&ce!=="<"&&ce!=="&";)ce=ae(X,pe++),ce&&Q.trackPosition&&(Q.position++,ce===`
`?(Q.line++,Q.column=0):Q.column++);Q.textNode+=X.substring(we,pe-1)}ce==="<"&&!(Q.sawRoot&&Q.closedRoot&&!Q.strict)?(Q.state=F.OPEN_WAKA,Q.startTagPosition=Q.position):(!K(ce)&&(!Q.sawRoot||Q.closedRoot)&&xe(Q,"Text data outside of root node."),ce==="&"?Q.state=F.TEXT_ENTITY:Q.textNode+=ce);continue;case F.SCRIPT:ce==="<"?Q.state=F.SCRIPT_ENDING:Q.script+=ce;continue;case F.SCRIPT_ENDING:ce==="/"?Q.state=F.CLOSE_TAG:(Q.script+="<"+ce,Q.state=F.SCRIPT);continue;case F.OPEN_WAKA:if(ce==="!")Q.state=F.SGML_DECL,Q.sgmlDecl="";else if(!K(ce))if(B(I,ce))Q.state=F.OPEN_TAG,Q.tagName=ce;else if(ce==="/")Q.state=F.CLOSE_TAG,Q.tagName="";else if(ce==="?")Q.state=F.PROC_INST,Q.procInstName=Q.procInstBody="";else{if(xe(Q,"Unencoded <"),Q.startTagPosition+1<Q.position){var ze=Q.position-Q.startTagPosition;ce=new Array(ze).join(" ")+ce}Q.textNode+="<"+ce,Q.state=F.TEXT}continue;case F.SGML_DECL:(Q.sgmlDecl+ce).toUpperCase()===A?(Z(Q,"onopencdata"),Q.state=F.CDATA,Q.sgmlDecl="",Q.cdata=""):Q.sgmlDecl+ce==="--"?(Q.state=F.COMMENT,Q.comment="",Q.sgmlDecl=""):(Q.sgmlDecl+ce).toUpperCase()===y?(Q.state=F.DOCTYPE,(Q.doctype||Q.sawRoot)&&xe(Q,"Inappropriately located doctype declaration"),Q.doctype="",Q.sgmlDecl=""):ce===">"?(Z(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=F.TEXT):(H(ce)&&(Q.state=F.SGML_DECL_QUOTED),Q.sgmlDecl+=ce);continue;case F.SGML_DECL_QUOTED:ce===Q.q&&(Q.state=F.SGML_DECL,Q.q=""),Q.sgmlDecl+=ce;continue;case F.DOCTYPE:ce===">"?(Q.state=F.TEXT,Z(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=ce,ce==="["?Q.state=F.DOCTYPE_DTD:H(ce)&&(Q.state=F.DOCTYPE_QUOTED,Q.q=ce));continue;case F.DOCTYPE_QUOTED:Q.doctype+=ce,ce===Q.q&&(Q.q="",Q.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:Q.doctype+=ce,ce==="]"?Q.state=F.DOCTYPE:H(ce)&&(Q.state=F.DOCTYPE_DTD_QUOTED,Q.q=ce);continue;case F.DOCTYPE_DTD_QUOTED:Q.doctype+=ce,ce===Q.q&&(Q.state=F.DOCTYPE_DTD,Q.q="");continue;case F.COMMENT:ce==="-"?Q.state=F.COMMENT_ENDING:Q.comment+=ce;continue;case F.COMMENT_ENDING:ce==="-"?(Q.state=F.COMMENT_ENDED,Q.comment=he(Q.opt,Q.comment),Q.comment&&Z(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+ce,Q.state=F.COMMENT);continue;case F.COMMENT_ENDED:ce!==">"?(xe(Q,"Malformed comment"),Q.comment+="--"+ce,Q.state=F.COMMENT):Q.state=F.TEXT;continue;case F.CDATA:ce==="]"?Q.state=F.CDATA_ENDING:Q.cdata+=ce;continue;case F.CDATA_ENDING:ce==="]"?Q.state=F.CDATA_ENDING_2:(Q.cdata+="]"+ce,Q.state=F.CDATA);continue;case F.CDATA_ENDING_2:ce===">"?(Q.cdata&&Z(Q,"oncdata",Q.cdata),Z(Q,"onclosecdata"),Q.cdata="",Q.state=F.TEXT):ce==="]"?Q.cdata+="]":(Q.cdata+="]]"+ce,Q.state=F.CDATA);continue;case F.PROC_INST:ce==="?"?Q.state=F.PROC_INST_ENDING:K(ce)?Q.state=F.PROC_INST_BODY:Q.procInstName+=ce;continue;case F.PROC_INST_BODY:if(!Q.procInstBody&&K(ce))continue;ce==="?"?Q.state=F.PROC_INST_ENDING:Q.procInstBody+=ce;continue;case F.PROC_INST_ENDING:ce===">"?(Z(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=F.TEXT):(Q.procInstBody+="?"+ce,Q.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:B(j,ce)?Q.tagName+=ce:(ie(Q),ce===">"?be(Q):ce==="/"?Q.state=F.OPEN_TAG_SLASH:(K(ce)||xe(Q,"Invalid character in tag name"),Q.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:ce===">"?(be(Q,!0),q(Q)):(xe(Q,"Forward-slash in opening tag not followed by >"),Q.state=F.ATTRIB);continue;case F.ATTRIB:if(K(ce))continue;ce===">"?be(Q):ce==="/"?Q.state=F.OPEN_TAG_SLASH:B(I,ce)?(Q.attribName=ce,Q.attribValue="",Q.state=F.ATTRIB_NAME):xe(Q,"Invalid attribute name");continue;case F.ATTRIB_NAME:ce==="="?Q.state=F.ATTRIB_VALUE:ce===">"?(xe(Q,"Attribute without value"),Q.attribValue=Q.attribName,re(Q),be(Q)):K(ce)?Q.state=F.ATTRIB_NAME_SAW_WHITE:B(j,ce)?Q.attribName+=ce:xe(Q,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if(ce==="=")Q.state=F.ATTRIB_VALUE;else{if(K(ce))continue;xe(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",Z(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",ce===">"?be(Q):B(I,ce)?(Q.attribName=ce,Q.state=F.ATTRIB_NAME):(xe(Q,"Invalid attribute name"),Q.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(K(ce))continue;H(ce)?(Q.q=ce,Q.state=F.ATTRIB_VALUE_QUOTED):(xe(Q,"Unquoted attribute value"),Q.state=F.ATTRIB_VALUE_UNQUOTED,Q.attribValue=ce);continue;case F.ATTRIB_VALUE_QUOTED:if(ce!==Q.q){ce==="&"?Q.state=F.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=ce;continue}re(Q),Q.q="",Q.state=F.ATTRIB_VALUE_CLOSED;continue;case F.ATTRIB_VALUE_CLOSED:K(ce)?Q.state=F.ATTRIB:ce===">"?be(Q):ce==="/"?Q.state=F.OPEN_TAG_SLASH:B(I,ce)?(xe(Q,"No whitespace between attributes"),Q.attribName=ce,Q.attribValue="",Q.state=F.ATTRIB_NAME):xe(Q,"Invalid attribute name");continue;case F.ATTRIB_VALUE_UNQUOTED:if(!z(ce)){ce==="&"?Q.state=F.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=ce;continue}re(Q),ce===">"?be(Q):Q.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(Q.tagName)ce===">"?q(Q):B(j,ce)?Q.tagName+=ce:Q.script?(Q.script+="</"+Q.tagName,Q.tagName="",Q.state=F.SCRIPT):(K(ce)||xe(Q,"Invalid tagname in closing tag"),Q.state=F.CLOSE_TAG_SAW_WHITE);else{if(K(ce))continue;W(I,ce)?Q.script?(Q.script+="</"+ce,Q.state=F.SCRIPT):xe(Q,"Invalid tagname in closing tag."):Q.tagName=ce}continue;case F.CLOSE_TAG_SAW_WHITE:if(K(ce))continue;ce===">"?q(Q):xe(Q,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:var Ge,Qe;switch(Q.state){case F.TEXT_ENTITY:Ge=F.TEXT,Qe="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:Ge=F.ATTRIB_VALUE_QUOTED,Qe="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:Ge=F.ATTRIB_VALUE_UNQUOTED,Qe="attribValue";break}ce===";"?(Q[Qe]+=ne(Q),Q.entity="",Q.state=Ge):B(Q.entity.length?G:M,ce)?Q.entity+=ce:(xe(Q,"Invalid character in entity name"),Q[Qe]+="&"+Q.entity+ce,Q.entity="",Q.state=Ge);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&n(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var X=String.fromCharCode,Q=Math.floor,pe=function(){var we=16384,ze=[],Ge,Qe,$e=-1,rt=arguments.length;if(!rt)return"";for(var et="";++$e<rt;){var Me=Number(arguments[$e]);if(!isFinite(Me)||Me<0||Me>1114111||Q(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?ze.push(Me):(Me-=65536,Ge=(Me>>10)+55296,Qe=Me%1024+56320,ze.push(Ge,Qe)),($e+1===rt||ze.length>we)&&(et+=X.apply(null,ze),ze.length=0)}return et};a.default?Object.defineProperty(String,"fromCodePoint",{value:pe,configurable:!0,writable:!0}):String.fromCodePoint=pe}()})(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,Y,k){Y.exports=C;var P=N("events").EventEmitter,u=N("inherits");u(C,P),C.Readable=N("readable-stream/readable.js"),C.Writable=N("readable-stream/writable.js"),C.Duplex=N("readable-stream/duplex.js"),C.Transform=N("readable-stream/transform.js"),C.PassThrough=N("readable-stream/passthrough.js"),C.Stream=C;function C(){P.call(this)}C.prototype.pipe=function(R,h){var s=this;function S(m){R.writable&&(R.write(m)===!1&&s.pause&&s.pause())}s.on("data",S);function f(){s.readable&&s.resume&&s.resume()}R.on("drain",f),!R._isStdio&&(!h||h.end!==!1)&&(s.on("end",o),s.on("close",r));var a=!1;function o(){if(a)return;a=!0,R.end()}function r(){if(a)return;a=!0,typeof R.destroy=="function"&&R.destroy()}function x(m){if(g(),P.listenerCount(this,"error")===0)throw m}s.on("error",x),R.on("error",x);function g(){s.removeListener("data",S),R.removeListener("drain",f),s.removeListener("end",o),s.removeListener("close",r),s.removeListener("error",x),R.removeListener("error",x),s.removeListener("end",g),s.removeListener("close",g),R.removeListener("close",g)}return s.on("end",g),s.on("close",g),R.on("close",g),R.emit("pipe",s),R}},{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,Y,k){(function(P){var u=N("./lib/request"),C=N("./lib/response"),R=N("xtend"),h=N("builtin-status-codes"),s=N("url"),S=k;S.request=function(f,a){typeof f=="string"?f=s.parse(f):f=R(f);var o=P.location.protocol.search(/^https?:$/)===-1?"http:":"",r=f.protocol||o,x=f.hostname||f.host,g=f.port,m=f.path||"/";x&&x.indexOf(":")!==-1&&(x="["+x+"]"),f.url=(x?r+"//"+x:"")+(g?":"+g:"")+m,f.method=(f.method||"GET").toUpperCase(),f.headers=f.headers||{};var w=new u(f);return a&&w.on("response",a),w},S.get=function(a,o){var r=S.request(a,o);return r.end(),r},S.ClientRequest=u,S.IncomingMessage=C.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=h,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,Y,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(f){}var u;function C(){if(u!==void 0)return u;if(P.XMLHttpRequest){u=new P.XMLHttpRequest;try{u.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(f){u=null}}else u=null;return u}function R(f){var a=C();if(!a)return!1;try{return a.responseType=f,a.responseType===f}catch(o){}return!1}var h=typeof P.ArrayBuffer!="undefined",s=h&&S(P.ArrayBuffer.prototype.slice);k.arraybuffer=k.fetch||h&&R("arraybuffer"),k.msstream=!k.fetch&&s&&R("ms-stream"),k.mozchunkedarraybuffer=!k.fetch&&h&&R("moz-chunked-arraybuffer"),k.overrideMimeType=k.fetch||(C()?S(C().overrideMimeType):!1),k.vbArray=S(P.VBArray);function S(f){return typeof f=="function"}u=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(N,Y,k){(function(P,u,C){"use strict";var R=N("babel-runtime/core-js/object/keys"),h=s(R);function s(n){return n&&n.__esModule?n:{default:n}}var S=N("./capability"),f=N("inherits"),a=N("./response"),o=N("readable-stream"),r=N("to-arraybuffer"),x=a.IncomingMessage,g=a.readyStates;function m(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=Y.exports=function(n){var l=this;o.Writable.call(l),l._opts=n,l._body=[],l._headers={},n.auth&&l.setHeader("Authorization","Basic "+new C(n.auth).toString("base64")),(0,h.default)(n.headers).forEach(function(v){l.setHeader(v,n.headers[v])});var c,T=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!S.abortController)T=!1,c=!0;else if(n.mode==="prefer-streaming")c=!1;else if(n.mode==="allow-wrong-content-type")c=!S.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")c=!0;else throw new Error("Invalid value for opts.mode");l._mode=m(c,T),l._fetchTimer=null,l.on("finish",function(){l._onFinish()})};f(w,o.Writable),w.prototype.setHeader=function(n,l){var c=this,T=n.toLowerCase();if(d.indexOf(T)!==-1)return;c._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,c=n._headers,T=null;l.method!=="GET"&&l.method!=="HEAD"&&(S.arraybuffer?T=r(C.concat(n._body)):S.blobConstructor?T=new u.Blob(n._body.map(function(E){return r(E)}),{type:(c["content-type"]||{}).value||""}):T=C.concat(n._body).toString());var v=[];if((0,h.default)(c).forEach(function(E){var b=c[E].name,_=c[E].value;Array.isArray(_)?_.forEach(function(I){v.push([b,I])}):v.push([b,_])}),n._mode==="fetch"){var i=null,L=null;if(S.abortController){var A=new AbortController;i=A.signal,n._fetchAbortController=A,"requestTimeout"in l&&l.requestTimeout!==0&&(n._fetchTimer=u.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},l.requestTimeout))}u.fetch(n._opts.url,{method:n._opts.method,headers:v,body:T||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:i}).then(function(E){n._fetchResponse=E,n._connect()},function(E){u.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",E)})}else{var y=n._xhr=new u.XMLHttpRequest;try{y.open(n._opts.method,n._opts.url,!0)}catch(E){P.nextTick(function(){n.emit("error",E)});return}"responseType"in y&&(y.responseType=n._mode.split(":")[0]),"withCredentials"in y&&(y.withCredentials=!!l.withCredentials),n._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(y.timeout=l.requestTimeout,y.ontimeout=function(){n.emit("requestTimeout")}),v.forEach(function(E){y.setRequestHeader(E[0],E[1])}),n._response=null,y.onreadystatechange=function(){switch(y.readyState){case g.LOADING:case g.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){n._onXHRProgress()}),y.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{y.send(T)}catch(E){P.nextTick(function(){n.emit("error",E)});return}}};function p(n){try{var l=n.status;return l!==null&&l!==0}catch(c){return!1}}w.prototype._onXHRProgress=function(){var n=this;if(!p(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 x(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,c){var T=this;T._body.push(n),c()},w.prototype.abort=w.prototype.destroy=function(){var n=this;n._destroyed=!0,u.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,c){var T=this;typeof n=="function"&&(c=n,n=void 0),o.Writable.prototype.end.call(T,n,l,c)},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,Y,k){(function(P,u,C){"use strict";var R=N("babel-runtime/core-js/promise"),h=s(R);function s(x){return x&&x.__esModule?x:{default:x}}var S=N("./capability"),f=N("inherits"),a=N("readable-stream"),o=k.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=k.IncomingMessage=function(x,g,m,w){var p=this;if(a.Readable.call(p),p._mode=m,p.headers={},p.rawHeaders=[],p.trailers={},p.rawTrailers=[],p.on("end",function(){P.nextTick(function(){p.emit("close")})}),m==="fetch"){var d=function i(){l.read().then(function(L){if(p._destroyed)return;if(L.done){u.clearTimeout(w),p.push(null);return}p.push(new C(L.value)),i()}).catch(function(L){u.clearTimeout(w),p._destroyed||p.emit("error",L)})};if(p._fetchResponse=g,p.url=g.url,p.statusCode=g.status,p.statusMessage=g.statusText,g.headers.forEach(function(i,L){p.headers[L.toLowerCase()]=i,p.rawHeaders.push(L,i)}),S.writableStream){var n=new WritableStream({write:function(L){return new h.default(function(A,y){p._destroyed?y():p.push(new C(L))?A():p._resumeFetch=A})},close:function(){u.clearTimeout(w),p._destroyed||p.push(null)},abort:function(L){p._destroyed||p.emit("error",L)}});try{g.body.pipeTo(n).catch(function(i){u.clearTimeout(w),p._destroyed||p.emit("error",i)});return}catch(i){}}var l=g.body.getReader();d()}else{p._xhr=x,p._pos=0,p.url=x.responseURL,p.statusCode=x.status,p.statusMessage=x.statusText;var c=x.getAllResponseHeaders().split(/\r?\n/);if(c.forEach(function(i){var L=i.match(/^([^:]+):\s*(.*)/);if(L){var A=L[1].toLowerCase();A==="set-cookie"?(p.headers[A]===void 0&&(p.headers[A]=[]),p.headers[A].push(L[2])):p.headers[A]!==void 0?p.headers[A]+=", "+L[2]:p.headers[A]=L[2],p.rawHeaders.push(L[1],L[2])}}),p._charset="x-user-defined",!S.overrideMimeType){var T=p.rawHeaders["mime-type"];if(T){var v=T.match(/;\s*charset=([^;])(;|$)/);v&&(p._charset=v[1].toLowerCase())}p._charset||(p._charset="utf-8")}}};f(r,a.Readable),r.prototype._read=function(){var x=this,g=x._resumeFetch;g&&(x._resumeFetch=null,g())},r.prototype._onXHRProgress=function(){var x=this,g=x._xhr,m=null;switch(x._mode){case"text:vbarray":if(g.readyState!==o.DONE)break;try{m=new u.VBArray(g.responseBody).toArray()}catch(l){}if(m!==null){x.push(new C(m));break}case"text":try{m=g.responseText}catch(l){x._mode="text:vbarray";break}if(m.length>x._pos){var w=m.substr(x._pos);if(x._charset==="x-user-defined"){for(var p=new C(w.length),d=0;d<w.length;d++)p[d]=w.charCodeAt(d)&255;x.push(p)}else x.push(w,x._charset);x._pos=m.length}break;case"arraybuffer":if(g.readyState!==o.DONE||!g.response)break;m=g.response,x.push(new C(new Uint8Array(m)));break;case"moz-chunked-arraybuffer":if(m=g.response,g.readyState!==o.LOADING||!m)break;x.push(new C(new Uint8Array(m)));break;case"ms-stream":if(m=g.response,g.readyState!==o.LOADING)break;var n=new u.MSStreamReader;n.onprogress=function(){n.result.byteLength>x._pos&&(x.push(new C(new Uint8Array(n.result.slice(x._pos)))),x._pos=n.result.byteLength)},n.onload=function(){x.push(null)},n.readAsArrayBuffer(m);break}x._xhr.readyState===o.DONE&&x._mode!=="ms-stream"&&x.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,Y,k){"use strict";var P=N("safe-buffer").Buffer,u=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 C(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 R(n){var l=C(n);if(typeof l!="string"&&(P.isEncoding===u||!u(n)))throw new Error("Unknown encoding: "+n);return l||n}k.StringDecoder=h;function h(n){this.encoding=R(n);var l;switch(this.encoding){case"utf16le":this.text=x,this.end=g,l=4;break;case"utf8":this.fillLast=a,l=4;break;case"base64":this.text=m,this.end=w,l=3;break;default:this.write=p,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(l)}h.prototype.write=function(n){if(n.length===0)return"";var l,c;if(this.lastNeed){if(l=this.fillLast(n),l===void 0)return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c<n.length?l?l+this.text(n,c):this.text(n,c):l||""},h.prototype.end=r,h.prototype.text=o,h.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,c){var T=l.length-1;if(T<c)return 0;var v=s(l[T]);return v>=0?(v>0&&(n.lastNeed=v-1),v):--T<c||v===-2?0:(v=s(l[T]),v>=0?(v>0&&(n.lastNeed=v-2),v):--T<c||v===-2?0:(v=s(l[T]),v>=0?(v>0&&(v===2?v=0:n.lastNeed=v-3),v):0))}function f(n,l,c){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 a(n){var l=this.lastTotal-this.lastNeed,c=f(this,n,l);if(c!==void 0)return c;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 o(n,l){var c=S(this,n,l);if(!this.lastNeed)return n.toString("utf8",l);this.lastTotal=c;var T=n.length-(c-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 x(n,l){if((n.length-l)%2===0){var c=n.toString("utf16le",l);if(c){var T=c.charCodeAt(c.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],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",l,n.length-1)}function g(n){var l=n&&n.length?this.write(n):"";if(this.lastNeed){var c=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,c)}return l}function m(n,l){var c=(n.length-l)%3;return c===0?n.toString("base64",l):(this.lastNeed=3-c,this.lastTotal=3,c===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-c))}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 p(n){return n.toString(this.encoding)}function d(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(N,Y,k){(function(P,u){var C=N("process/browser.js").nextTick,R=Function.prototype.apply,h=Array.prototype.slice,s={},S=0;k.setTimeout=function(){return new f(R.call(setTimeout,window,arguments),clearTimeout)},k.setInterval=function(){return new f(R.call(setInterval,window,arguments),clearInterval)},k.clearTimeout=k.clearInterval=function(a){a.close()};function f(a,o){this._id=a,this._clearFn=o}f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},k.enroll=function(a,o){clearTimeout(a._idleTimeoutId),a._idleTimeout=o},k.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},k._unrefActive=k.active=function(a){clearTimeout(a._idleTimeoutId);var o=a._idleTimeout;o>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},o))},k.setImmediate=typeof P=="function"?P:function(a){var o=S++,r=arguments.length<2?!1:h.call(arguments,1);return s[o]=!0,C(function(){s[o]&&(r?a.apply(null,r):a.call(null),k.clearImmediate(o))}),o},k.clearImmediate=typeof u=="function"?u:function(a){delete s[a]}}).call(this,N("timers").setImmediate,N("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(N,Y,k){var P=N("buffer").Buffer;Y.exports=function(u){if(u instanceof Uint8Array){if(u.byteOffset===0&&u.byteLength===u.buffer.byteLength)return u.buffer;if(typeof u.buffer.slice=="function")return u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength)}if(P.isBuffer(u)){for(var C=new Uint8Array(u.length),R=u.length,h=0;h<R;h++)C[h]=u[h];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(N,Y,k){"use strict";var P=N("punycode"),u=N("./util");k.parse=l,k.resolve=T,k.resolveObject=v,k.format=c,k.Url=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var R=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
`," "],f=["{","}","|","\\","^","`"].concat(S),a=["'"].concat(f),o=["%","/","?",";","#"].concat(a),r=["/","?","#"],x=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},p={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(i,L,A){if(i&&u.isObject(i)&&i instanceof C)return i;var y=new C;return y.parse(i,L,A),y}C.prototype.parse=function(i,L,A){if(!u.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var y=i.indexOf("?"),E=y!==-1&&y<i.indexOf("#")?"?":"#",b=i.split(E),_=/\\/g;b[0]=b[0].replace(_,"/"),i=b.join(E);var I=i;if(I=I.trim(),!A&&i.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=R.exec(I);if(M){M=M[0];var G=M.toLowerCase();this.protocol=G,I=I.substr(M.length)}if(A||M||I.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=I.substr(0,2)==="//";K&&!(M&&p[M])&&(I=I.substr(2),this.slashes=!0)}if(!p[M]&&(K||M&&!d[M])){for(var H=-1,z=0;z<r.length;z++){var B=I.indexOf(r[z]);B!==-1&&(H===-1||B<H)&&(H=B)}var W,F;H===-1?F=I.lastIndexOf("@"):F=I.lastIndexOf("@",H),F!==-1&&(W=I.slice(0,F),I=I.slice(F+1),this.auth=decodeURIComponent(W)),H=-1;for(var z=0;z<o.length;z++){var B=I.indexOf(o[z]);B!==-1&&(H===-1||B<H)&&(H=B)}H===-1&&(H=I.length),this.host=I.slice(0,H),I=I.slice(H),this.parseHost(),this.hostname=this.hostname||"";var $=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!$)for(var ee=this.hostname.split(/\./),z=0,Z=ee.length;z<Z;z++){var ve=ee[z];if(!ve)continue;if(!ve.match(g)){for(var he="",le=0,Re=ve.length;le<Re;le++)ve.charCodeAt(le)>127?he+="x":he+=ve[le];if(!he.match(g)){var xe=ee.slice(0,z),ie=ee.slice(z+1),se=ve.match(m);se&&(xe.push(se[1]),ie.unshift(se[2])),ie.length&&(I="/"+ie.join(".")+I),this.hostname=xe.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),$||(this.hostname=P.toASCII(this.hostname));var re=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+re,this.href+=this.host,$&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!w[G])for(var z=0,Z=a.length;z<Z;z++){var q=a[z];if(I.indexOf(q)===-1)continue;var ne=encodeURIComponent(q);ne===q&&(ne=escape(q)),I=I.split(q).join(ne)}var Te=I.indexOf("#");Te!==-1&&(this.hash=I.substr(Te),I=I.slice(0,Te));var ae=I.indexOf("?");if(ae!==-1?(this.search=I.substr(ae),this.query=I.substr(ae+1),L&&(this.query=n.parse(this.query)),I=I.slice(0,ae)):L&&(this.search="",this.query={}),I&&(this.pathname=I),d[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",J=this.search||"";this.path=re+J}return this.href=this.format(),this};function c(i){return u.isString(i)&&(i=l(i)),i instanceof C?i.format():C.prototype.format.call(i)}C.prototype.format=function(){var i=this.auth||"";i&&(i=encodeURIComponent(i),i=i.replace(/%3A/i,":"),i+="@");var L=this.protocol||"",A=this.pathname||"",y=this.hash||"",E=!1,b="";this.host?E=i+this.host:this.hostname&&(E=i+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(E+=":"+this.port)),this.query&&u.isObject(this.query)&&Object.keys(this.query).length&&(b=n.stringify(this.query));var _=this.search||b&&"?"+b||"";return L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||d[L])&&E!==!1?(E="//"+(E||""),A&&A.charAt(0)!=="/"&&(A="/"+A)):E||(E=""),y&&y.charAt(0)!=="#"&&(y="#"+y),_&&_.charAt(0)!=="?"&&(_="?"+_),A=A.replace(/[?#]/g,function(I){return encodeURIComponent(I)}),_=_.replace("#","%23"),L+E+A+_+y};function T(i,L){return l(i,!1,!0).resolve(L)}C.prototype.resolve=function(i){return this.resolveObject(l(i,!1,!0)).format()};function v(i,L){return i?l(i,!1,!0).resolveObject(L):L}C.prototype.resolveObject=function(i){if(u.isString(i)){var L=new C;L.parse(i,!1,!0),i=L}for(var A=new C,y=Object.keys(this),E=0;E<y.length;E++){var b=y[E];A[b]=this[b]}if(A.hash=i.hash,i.href==="")return A.href=A.format(),A;if(i.slashes&&!i.protocol){for(var _=Object.keys(i),I=0;I<_.length;I++){var j=_[I];j!=="protocol"&&(A[j]=i[j])}return d[A.protocol]&&A.hostname&&!A.pathname&&(A.path=A.pathname="/"),A.href=A.format(),A}if(i.protocol&&i.protocol!==A.protocol){if(!d[i.protocol]){for(var M=Object.keys(i),G=0;G<M.length;G++){var K=M[G];A[K]=i[K]}return A.href=A.format(),A}if(A.protocol=i.protocol,!i.host&&!p[i.protocol]){for(var Z=(i.pathname||"").split("/");Z.length&&!(i.host=Z.shift()););i.host||(i.host=""),i.hostname||(i.hostname=""),Z[0]!==""&&Z.unshift(""),Z.length<2&&Z.unshift(""),A.pathname=Z.join("/")}else A.pathname=i.pathname;if(A.search=i.search,A.query=i.query,A.host=i.host||"",A.auth=i.auth,A.hostname=i.hostname||i.host,A.port=i.port,A.pathname||A.search){var H=A.pathname||"",z=A.search||"";A.path=H+z}return A.slashes=A.slashes||i.slashes,A.href=A.format(),A}var B=A.pathname&&A.pathname.charAt(0)==="/",W=i.host||i.pathname&&i.pathname.charAt(0)==="/",F=W||B||A.host&&i.pathname,$=F,ee=A.pathname&&A.pathname.split("/")||[],Z=i.pathname&&i.pathname.split("/")||[],ve=A.protocol&&!d[A.protocol];if(ve&&(A.hostname="",A.port=null,A.host&&(ee[0]===""?ee[0]=A.host:ee.unshift(A.host)),A.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(Z[0]===""?Z[0]=i.host:Z.unshift(i.host)),i.host=null),F=F&&(Z[0]===""||ee[0]==="")),W)A.host=i.host||i.host===""?i.host:A.host,A.hostname=i.hostname||i.hostname===""?i.hostname:A.hostname,A.search=i.search,A.query=i.query,ee=Z;else if(Z.length)ee||(ee=[]),ee.pop(),ee=ee.concat(Z),A.search=i.search,A.query=i.query;else if(!u.isNullOrUndefined(i.search)){if(ve){A.hostname=A.host=ee.shift();var he=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;he&&(A.auth=he.shift(),A.host=A.hostname=he.shift())}return A.search=i.search,A.query=i.query,(!u.isNull(A.pathname)||!u.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A}if(!ee.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var le=ee.slice(-1)[0],Re=(A.host||i.host||ee.length>1)&&(le==="."||le==="..")||le==="",xe=0,ie=ee.length;ie>=0;ie--)le=ee[ie],le==="."?ee.splice(ie,1):le===".."?(ee.splice(ie,1),xe++):xe&&(ee.splice(ie,1),xe--);if(!F&&!$)for(;xe--;xe)ee.unshift("..");F&&ee[0]!==""&&(!ee[0]||ee[0].charAt(0)!=="/")&&ee.unshift(""),Re&&ee.join("/").substr(-1)!=="/"&&ee.push("");var se=ee[0]===""||ee[0]&&ee[0].charAt(0)==="/";if(ve){A.hostname=A.host=se?"":ee.length?ee.shift():"";var he=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;he&&(A.auth=he.shift(),A.host=A.hostname=he.shift())}return F=F||A.host&&ee.length,F&&!se&&ee.unshift(""),ee.length?A.pathname=ee.join("/"):(A.pathname=null,A.path=null),(!u.isNull(A.pathname)||!u.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=i.auth||A.auth,A.slashes=A.slashes||i.slashes,A.href=A.format(),A},C.prototype.parseHost=function(){var i=this.host,L=h.exec(i);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),i=i.substr(0,i.length-L.length)),i&&(this.hostname=i)}},{"./util":239,punycode:209,querystring:212}],239:[function(N,Y,k){"use strict";Y.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,Y,k){(function(P){Y.exports=u;function u(R,h){if(C("noDeprecation"))return R;var s=!1;function S(){if(!s){if(C("throwDeprecation"))throw new Error(h);C("traceDeprecation")?console.trace(h):console.warn(h),s=!0}return R.apply(this,arguments)}return S}function C(R){try{if(!P.localStorage)return!1}catch(s){return!1}var h=P.localStorage[R];return h==null?!1:String(h).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(N,Y,k){typeof Object.create=="function"?Y.exports=function(u,C){u.super_=C,u.prototype=Object.create(C.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})}:Y.exports=function(u,C){u.super_=C;var R=function(){};R.prototype=C.prototype,u.prototype=new R,u.prototype.constructor=u}},{}],242:[function(N,Y,k){Y.exports=function(u){return u&&typeof u=="object"&&typeof u.copy=="function"&&typeof u.fill=="function"&&typeof u.readUInt8=="function"}},{}],243:[function(N,Y,k){(function(P,u){var C=/%[sdj%]/g;k.format=function(H){if(!T(H)){for(var z=[],B=0;B<arguments.length;B++)z.push(s(arguments[B]));return z.join(" ")}for(var B=1,W=arguments,F=W.length,$=String(H).replace(C,function(Z){if(Z==="%%")return"%";if(B>=F)return Z;switch(Z){case"%s":return String(W[B++]);case"%d":return Number(W[B++]);case"%j":try{return JSON.stringify(W[B++])}catch(ve){return"[Circular]"}default:return Z}}),ee=W[B];B<F;ee=W[++B])n(ee)||!A(ee)?$+=" "+ee:$+=" "+s(ee);return $},k.deprecate=function(H,z){if(i(u.process))return function(){return k.deprecate(H,z).apply(this,arguments)};if(P.noDeprecation===!0)return H;var B=!1;function W(){if(!B){if(P.throwDeprecation)throw new Error(z);P.traceDeprecation?console.trace(z):console.error(z),B=!0}return H.apply(this,arguments)}return W};var R={},h;k.debuglog=function(H){if(i(h)&&(h=P.env.NODE_DEBUG||""),H=H.toUpperCase(),!R[H])if(new RegExp("\\b"+H+"\\b","i").test(h)){var z=P.pid;R[H]=function(){var B=k.format.apply(k,arguments);console.error("%s %d: %s",H,z,B)}}else R[H]=function(){};return R[H]};function s(H,z){var B={seen:[],stylize:f};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),d(z)?B.showHidden=z:z&&k._extend(B,z),i(B.showHidden)&&(B.showHidden=!1),i(B.depth)&&(B.depth=2),i(B.colors)&&(B.colors=!1),i(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=S),o(B,H,B.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(H,z){var B=s.styles[z];return B?"["+s.colors[B][0]+"m"+H+"["+s.colors[B][1]+"m":H}function f(H,z){return H}function a(H){var z={};return H.forEach(function(B,W){z[B]=!0}),z}function o(H,z,B){if(H.customInspect&&z&&b(z.inspect)&&z.inspect!==k.inspect&&!(z.constructor&&z.constructor.prototype===z)){var W=z.inspect(B,H);return T(W)||(W=o(H,W,B)),W}var F=r(H,z);if(F)return F;var $=Object.keys(z),ee=a($);if(H.showHidden&&($=Object.getOwnPropertyNames(z)),E(z)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return x(z);if($.length===0){if(b(z)){var Z=z.name?": "+z.name:"";return H.stylize("[Function"+Z+"]","special")}if(L(z))return H.stylize(RegExp.prototype.toString.call(z),"regexp");if(y(z))return H.stylize(Date.prototype.toString.call(z),"date");if(E(z))return x(z)}var ve="",he=!1,le=["{","}"];if(p(z)&&(he=!0,le=["[","]"]),b(z)){var Re=z.name?": "+z.name:"";ve=" [Function"+Re+"]"}if(L(z)&&(ve=" "+RegExp.prototype.toString.call(z)),y(z)&&(ve=" "+Date.prototype.toUTCString.call(z)),E(z)&&(ve=" "+x(z)),$.length===0&&(!he||z.length==0))return le[0]+ve+le[1];if(B<0)return L(z)?H.stylize(RegExp.prototype.toString.call(z),"regexp"):H.stylize("[Object]","special");H.seen.push(z);var xe;return he?xe=g(H,z,B,ee,$):xe=$.map(function(ie){return m(H,z,B,ee,ie,he)}),H.seen.pop(),w(xe,ve,le)}function r(H,z){if(i(z))return H.stylize("undefined","undefined");if(T(z)){var B="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(B,"string")}if(c(z))return H.stylize(""+z,"number");if(d(z))return H.stylize(""+z,"boolean");if(n(z))return H.stylize("null","null")}function x(H){return"["+Error.prototype.toString.call(H)+"]"}function g(H,z,B,W,F){for(var $=[],ee=0,Z=z.length;ee<Z;++ee)K(z,String(ee))?$.push(m(H,z,B,W,String(ee),!0)):$.push("");return F.forEach(function(ve){ve.match(/^\d+$/)||$.push(m(H,z,B,W,ve,!0))}),$}function m(H,z,B,W,F,$){var ee,Z,ve;if(ve=Object.getOwnPropertyDescriptor(z,F)||{value:z[F]},ve.get?ve.set?Z=H.stylize("[Getter/Setter]","special"):Z=H.stylize("[Getter]","special"):ve.set&&(Z=H.stylize("[Setter]","special")),K(W,F)||(ee="["+F+"]"),Z||(H.seen.indexOf(ve.value)<0?(n(B)?Z=o(H,ve.value,null):Z=o(H,ve.value,B-1),Z.indexOf(`
`)>-1&&($?Z=Z.split(`
`).map(function(he){return" "+he}).join(`
`).substr(2):Z=`
`+Z.split(`
`).map(function(he){return" "+he}).join(`
`))):Z=H.stylize("[Circular]","special")),i(ee)){if($&&F.match(/^\d+$/))return Z;ee=JSON.stringify(""+F),ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ee=ee.substr(1,ee.length-2),ee=H.stylize(ee,"name")):(ee=ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ee=H.stylize(ee,"string"))}return ee+": "+Z}function w(H,z,B){var W=0,F=H.reduce(function($,ee){return W++,ee.indexOf(`
`)>=0&&W++,$+ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?B[0]+(z===""?"":z+`
`)+" "+H.join(`,
`)+" "+B[1]:B[0]+z+" "+H.join(", ")+" "+B[1]}function p(H){return Array.isArray(H)}k.isArray=p;function d(H){return typeof H=="boolean"}k.isBoolean=d;function n(H){return H===null}k.isNull=n;function l(H){return H==null}k.isNullOrUndefined=l;function c(H){return typeof H=="number"}k.isNumber=c;function T(H){return typeof H=="string"}k.isString=T;function v(H){return typeof H=="symbol"}k.isSymbol=v;function i(H){return H===void 0}k.isUndefined=i;function L(H){return A(H)&&I(H)==="[object RegExp]"}k.isRegExp=L;function A(H){return typeof H=="object"&&H!==null}k.isObject=A;function y(H){return A(H)&&I(H)==="[object Date]"}k.isDate=y;function E(H){return A(H)&&(I(H)==="[object Error]"||H instanceof Error)}k.isError=E;function b(H){return typeof H=="function"}k.isFunction=b;function _(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}k.isPrimitive=_,k.isBuffer=N("./support/isBuffer");function I(H){return Object.prototype.toString.call(H)}function j(H){return H<10?"0"+H.toString(10):H.toString(10)}var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var H=new Date,z=[j(H.getHours()),j(H.getMinutes()),j(H.getSeconds())].join(":");return[H.getDate(),M[H.getMonth()],z].join(" ")}k.log=function(){console.log("%s - %s",G(),k.format.apply(k,arguments))},k.inherits=N("inherits"),k._extend=function(H,z){if(!z||!A(z))return H;for(var B=Object.keys(z),W=B.length;W--;)H[B[W]]=z[B[W]];return H};function K(H,z){return Object.prototype.hasOwnProperty.call(H,z)}}).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,Y,k){"use strict";(function(){"use strict";k.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(N,Y,k){"use strict";var P=N("babel-runtime/helpers/typeof"),u=h(P),C=N("babel-runtime/core-js/object/keys"),R=h(C);function h(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,S,f,a,o,r={}.hasOwnProperty;s=N("xmlbuilder"),S=N("./defaults").defaults,a=function(g){return typeof g=="string"&&(g.indexOf("&")>=0||g.indexOf(">")>=0||g.indexOf("<")>=0)},o=function(g){return"<![CDATA["+f(g)+"]]>"},f=function(g){return g.replace("]]>","]]]]><![CDATA[>")},k.Builder=function(){function x(g){var m,w,p;this.options={},w=S["0.2"];for(m in w){if(!r.call(w,m))continue;p=w[m],this.options[m]=p}for(m in g){if(!r.call(g,m))continue;p=g[m],this.options[m]=p}}return x.prototype.buildObject=function(g){var m,w,p,d,n;return m=this.options.attrkey,w=this.options.charkey,(0,R.default)(g).length===1&&this.options.rootName===S["0.2"].rootName?(n=(0,R.default)(g)[0],g=g[n]):n=this.options.rootName,p=function(l){return function(c,T){var v,i,L,A,y,E;if((typeof T=="undefined"?"undefined":(0,u.default)(T))!=="object")l.options.cdata&&a(T)?c.raw(o(T)):c.txt(T);else if(Array.isArray(T))for(A in T){if(!r.call(T,A))continue;i=T[A];for(y in i)L=i[y],c=p(c.ele(y),L).up()}else for(y in T){if(!r.call(T,y))continue;if(i=T[y],y===m){if((typeof i=="undefined"?"undefined":(0,u.default)(i))==="object")for(v in i)E=i[v],c=c.att(v,E)}else if(y===w)l.options.cdata&&a(i)?c=c.raw(o(i)):c=c.txt(i);else if(Array.isArray(i))for(A in i){if(!r.call(i,A))continue;L=i[A],typeof L=="string"?l.options.cdata&&a(L)?c=c.ele(y).raw(o(L)).up():c=c.ele(y,L).up():c=p(c.ele(y),L).up()}else(typeof i=="undefined"?"undefined":(0,u.default)(i))==="object"?c=p(c.ele(y),i).up():typeof i=="string"&&l.options.cdata&&a(i)?c=c.ele(y).raw(o(i)).up():(i==null&&(i=""),c=c.ele(y,i.toString()).up())}return c}}(this),d=s.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),p(d,g).end(this.options.renderOpts)},x}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(N,Y,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,Y,k){"use strict";var P=N("babel-runtime/core-js/promise"),u=a(P),C=N("babel-runtime/core-js/object/get-own-property-names"),R=a(C),h=N("babel-runtime/core-js/object/keys"),s=a(h),S=N("babel-runtime/helpers/typeof"),f=a(S);function a(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,r,x,g,m,w,p,d,n=function(v,i){return function(){return v.apply(i,arguments)}},l=function(v,i){for(var L in i)c.call(i,L)&&(v[L]=i[L]);function A(){this.constructor=v}return A.prototype=i.prototype,v.prototype=new A,v.__super__=i.prototype,v},c={}.hasOwnProperty;p=N("sax"),x=N("events"),o=N("./bom"),w=N("./processors"),d=N("timers").setImmediate,r=N("./defaults").defaults,g=function(v){return(typeof v=="undefined"?"undefined":(0,f.default)(v))==="object"&&v!=null&&(0,s.default)(v).length===0},m=function(v,i,L){var A,y,E;for(A=0,y=v.length;A<y;A++)E=v[A],i=E(i,L);return i},k.Parser=function(T){l(v,T);function v(i){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,A,y;if(!(this instanceof k.Parser))return new k.Parser(i);this.options={},A=r["0.2"];for(L in A){if(!c.call(A,L))continue;y=A[L],this.options[L]=y}for(L in i){if(!c.call(i,L))continue;y=i[L],this.options[L]=y}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 v.prototype.processAsync=function(){var i,L;try{return this.remaining.length<=this.options.chunkSize?(i=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(i),this.saxParser.close()):(i=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(i),d(this.processAsync))}catch(A){if(L=A,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(L)}},v.prototype.assignOrPush=function(i,L,A){return L in i?(i[L]instanceof Array||(i[L]=[i[L]]),i[L].push(A)):this.options.explicitArray?i[L]=[A]:i[L]=A},v.prototype.reset=function(){var i,L,A,y;return this.removeAllListeners(),this.saxParser=p.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(E){return function(b){if(E.saxParser.resume(),!E.saxParser.errThrown)return E.saxParser.errThrown=!0,E.emit("error",b)}}(this),this.saxParser.onend=function(E){return function(){if(!E.saxParser.ended)return E.saxParser.ended=!0,E.emit("end",E.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,y=[],i=this.options.attrkey,L=this.options.charkey,this.saxParser.onopentag=function(E){return function(b){var _,I,j,M,G;if(j={},j[L]="",!E.options.ignoreAttrs){G=b.attributes;for(_ in G){if(!c.call(G,_))continue;!(i in j)&&!E.options.mergeAttrs&&(j[i]={}),I=E.options.attrValueProcessors?m(E.options.attrValueProcessors,b.attributes[_],_):b.attributes[_],M=E.options.attrNameProcessors?m(E.options.attrNameProcessors,_):_,E.options.mergeAttrs?E.assignOrPush(j,M,I):j[i][M]=I}}return j["#name"]=E.options.tagNameProcessors?m(E.options.tagNameProcessors,b.name):b.name,E.options.xmlns&&(j[E.options.xmlnskey]={uri:b.uri,local:b.local}),y.push(j)}}(this),this.saxParser.onclosetag=function(E){return function(){var b,_,I,j,M,G,K,H,z,B;if(G=y.pop(),M=G["#name"],(!E.options.explicitChildren||!E.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(b=G.cdata,delete G.cdata),z=y[y.length-1],G[L].match(/^\s*$/)&&!b?(_=G[L],delete G[L]):(E.options.trim&&(G[L]=G[L].trim()),E.options.normalize&&(G[L]=G[L].replace(/\s{2,}/g," ").trim()),G[L]=E.options.valueProcessors?m(E.options.valueProcessors,G[L],M):G[L],(0,s.default)(G).length===1&&L in G&&!E.EXPLICIT_CHARKEY&&(G=G[L])),g(G)&&(G=E.options.emptyTag!==""?E.options.emptyTag:_),E.options.validator!=null&&(B="/"+function(){var W,F,$;for($=[],W=0,F=y.length;W<F;W++)j=y[W],$.push(j["#name"]);return $}().concat(M).join("/"),function(){var W;try{return G=E.options.validator(B,z&&z[M],G)}catch(F){return W=F,E.emit("error",W)}}()),E.options.explicitChildren&&!E.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,f.default)(G))==="object"){if(!E.options.preserveChildrenOrder)j={},E.options.attrkey in G&&(j[E.options.attrkey]=G[E.options.attrkey],delete G[E.options.attrkey]),!E.options.charsAsChildren&&E.options.charkey in G&&(j[E.options.charkey]=G[E.options.charkey],delete G[E.options.charkey]),(0,R.default)(G).length>0&&(j[E.options.childkey]=G),G=j;else if(z){z[E.options.childkey]=z[E.options.childkey]||[],K={};for(I in G){if(!c.call(G,I))continue;K[I]=G[I]}z[E.options.childkey].push(K),delete G["#name"],(0,s.default)(G).length===1&&L in G&&!E.EXPLICIT_CHARKEY&&(G=G[L])}}return y.length>0?E.assignOrPush(z,M,G):(E.options.explicitRoot&&(H=G,G={},G[M]=H),E.resultObject=G,E.saxParser.ended=!0,E.emit("end",E.resultObject))}}(this),A=function(E){return function(b){var _,I;if(I=y[y.length-1],I)return I[L]+=b,E.options.explicitChildren&&E.options.preserveChildrenOrder&&E.options.charsAsChildren&&(E.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(I[E.options.childkey]=I[E.options.childkey]||[],_={"#name":"__text__"},_[L]=b,E.options.normalize&&(_[L]=_[L].replace(/\s{2,}/g," ").trim()),I[E.options.childkey].push(_)),I}}(this),this.saxParser.ontext=A,this.saxParser.oncdata=function(E){return function(b){var _;if(_=A(b),_)return _.cdata=!0}}(this)},v.prototype.parseString=function(i,L){var A;L!=null&&typeof L=="function"&&(this.on("end",function(y){return this.reset(),L(null,y)}),this.on("error",function(y){return this.reset(),L(y)}));try{return i=i.toString(),i.trim()===""?(this.emit("end",null),!0):(i=o.stripBOM(i),this.options.async?(this.remaining=i,d(this.processAsync),this.saxParser):this.saxParser.write(i).close())}catch(y){if(A=y,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw A}else return this.emit("error",A),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(i){return new u.default(function(L){return function(A,y){return L.parseString(i,function(E,b){return E?y(E):A(b)})}}(this))},v}(x),k.parseString=function(T,v,i){var L,A,y;return i!=null?(typeof i=="function"&&(L=i),(typeof v=="undefined"?"undefined":(0,f.default)(v))==="object"&&(A=v)):(typeof v=="function"&&(L=v),A={}),y=new k.Parser(A),y.parseString(T,L)},k.parseStringPromise=function(T,v){var i,L;return(typeof v=="undefined"?"undefined":(0,f.default)(v))==="object"&&(i=v),L=new k.Parser(i),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,Y,k){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),k.normalize=function(u){return u.toLowerCase()},k.firstCharLowerCase=function(u){return u.charAt(0).toLowerCase()+u.slice(1)},k.stripPrefix=function(u){return u.replace(P,"")},k.parseNumbers=function(u){return isNaN(u)||(u=u%1===0?parseInt(u,10):parseFloat(u)),u},k.parseBooleans=function(u){return/^(?:true|false)$/i.test(u)&&(u=u.toLowerCase()==="true"),u}}).call(void 0)},{}],249:[function(N,Y,k){"use strict";(function(){"use strict";var P,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;u=N("./defaults"),P=N("./builder"),C=N("./parser"),R=N("./processors"),k.defaults=u.defaults,k.processors=R,k.ValidationError=function(S){h(f,S);function f(a){this.message=a}return f}(Error),k.Builder=P.Builder,k.Parser=C.Parser,k.parseString=C.parseString,k.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(N,Y,k){"use strict";(function(){Y.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(N,Y,k){"use strict";(function(){Y.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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/get-prototype-of"),u=S(P),C=N("babel-runtime/helpers/typeof"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(f){return f&&f.__esModule?f:{default:f}}(function(){var f,a,o,r,x,g,m,w=[].slice,p={}.hasOwnProperty;f=function(){var n,l,c,T,v,i;if(i=arguments[0],v=2<=arguments.length?w.call(arguments,1):[],x(s.default))s.default.apply(null,arguments);else for(n=0,c=v.length;n<c;n++)if(T=v[n],T!=null)for(l in T){if(!p.call(T,l))continue;i[l]=T[l]}return i},x=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},g=function(n){var l;return!!n&&((l=typeof n=="undefined"?"undefined":(0,R.default)(n))==="function"||l==="object")},o=function(n){return x(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},r=function(n){var l;if(o(n))return!n.length;for(l in n){if(!p.call(n,l))continue;return!1}return!0},m=function(n){var l,c;return g(n)&&(c=(0,u.default)(n))&&(l=c.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},a=function(n){return x(n.valueOf)?n.valueOf():n},Y.exports.assign=f,Y.exports.isFunction=x,Y.exports.isObject=g,Y.exports.isArray=o,Y.exports.isEmpty=r,Y.exports.isPlainObject=m,Y.exports.getValue=a}).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,Y,k){"use strict";(function(){Y.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s;R=N("./NodeType"),s=N("./XMLNode"),Y.exports=h=function(){function S(f,a,o){if(this.parent=f,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),a==null)throw new Error("Missing attribute name. "+this.debugInfo(a));this.name=this.stringify.name(a),this.value=this.stringify.attValue(o),this.type=R.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(a){return this.value=a||""}}),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,u.default)(this)},S.prototype.toString=function(f){return this.options.writer.attribute(this,this.options.writer.filterOptions(f))},S.prototype.debugInfo=function(f){return f=f||this.name,f==null?"parent: <"+this.parent.name+">":"attribute: {"+f+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(f){return f.namespaceURI!==this.namespaceURI||(f.prefix!==this.prefix||f.localName!==this.localName)?!1:!(f.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)f.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),s=N("./XMLCharacterData"),Y.exports=h=function(a){S(o,a);function o(r,x){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=R.CData,this.value=this.stringify.cdata(x)}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s=function(a,o){for(var r in o)S.call(o,r)&&(a[r]=o[r]);function x(){this.constructor=a}return x.prototype=o.prototype,a.prototype=new x,a.__super__=o.prototype,a},S={}.hasOwnProperty;h=N("./XMLNode"),Y.exports=R=function(f){s(a,f);function a(o){a.__super__.constructor.call(this,o),this.value=""}return Object.defineProperty(a.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(a.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),a.prototype.clone=function(){return(0,u.default)(this)},a.prototype.substringData=function(o,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.insertData=function(o,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.deleteData=function(o,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceData=function(o,r,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.isEqualNode=function(o){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)?!(o.data!==this.data):!1},a}(h)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)f.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),h=N("./XMLCharacterData"),Y.exports=s=function(a){S(o,a);function o(r,x){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=R.Comment,this.value=this.stringify.comment(x)}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=h(P),C=N("babel-runtime/core-js/object/create"),R=h(C);function h(s){return s&&s.__esModule?s:{default:s}}(function(){var s,S,f;S=N("./XMLDOMErrorHandler"),f=N("./XMLDOMStringList"),Y.exports=s=function(){function a(){var o;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=o=(0,R.default)(this.defaultParams)}return Object.defineProperty(a.prototype,"parameterNames",{get:function(){return new f((0,u.default)(this.defaultParams))}}),a.prototype.getParameter=function(o){return this.params.hasOwnProperty(o)?this.params[o]:null},a.prototype.canSetParameter=function(o,r){return!0},a.prototype.setParameter=function(o,r){return r!=null?this.params[o]=r:delete this.params[o]},a}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(N,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(){}return u.prototype.handleError=function(C){throw new Error(C)},u}()}).call(void 0)},{}],260:[function(N,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(){}return u.prototype.hasFeature=function(C,R){return!0},u.prototype.createDocumentType=function(C,R,h){throw new Error("This DOM method is not implemented.")},u.prototype.createDocument=function(C,R,h){throw new Error("This DOM method is not implemented.")},u.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},u.prototype.getFeature=function(C,R){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{}],261:[function(N,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(C){this.arr=C||[]}return Object.defineProperty(u.prototype,"length",{get:function(){return this.arr.length}}),u.prototype.item=function(C){return this.arr[C]||null},u.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},u}()}).call(void 0)},{}],262:[function(N,Y,k){"use strict";(function(){var P,u,C,R=function(S,f){for(var a in f)h.call(f,a)&&(S[a]=f[a]);function o(){this.constructor=S}return o.prototype=f.prototype,S.prototype=new o,S.__super__=f.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(s){R(S,s);function S(f,a,o,r,x,g){if(S.__super__.constructor.call(this,f),a==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(o==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(a));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(a));if(!x)throw new Error("Missing DTD attribute default. "+this.debugInfo(a));if(x.indexOf("#")!==0&&(x="#"+x),!x.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(a));if(g&&!x.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(a));this.elementName=this.stringify.name(a),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(r),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=x}return S.prototype.toString=function(f){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(f))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(N,Y,k){"use strict";(function(){var P,u,C,R=function(S,f){for(var a in f)h.call(f,a)&&(S[a]=f[a]);function o(){this.constructor=S}return o.prototype=f.prototype,S.prototype=new o,S.__super__=f.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(s){R(S,s);function S(f,a,o){if(S.__super__.constructor.call(this,f),a==null)throw new Error("Missing DTD element name. "+this.debugInfo());o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.name(a),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return S.prototype.toString=function(f){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(f))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;R=N("./Utility").isObject,C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(S){h(f,S);function f(a,o,r,x){if(f.__super__.constructor.call(this,a),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(x==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!o,this.name=this.stringify.name(r),this.type=P.EntityDeclaration,!R(x))this.value=this.stringify.dtdEntityValue(x),this.internal=!0;else{if(!x.pubID&&!x.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(x.pubID&&!x.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,x.pubID!=null&&(this.pubID=this.stringify.dtdPubID(x.pubID)),x.sysID!=null&&(this.sysID=this.stringify.dtdSysID(x.sysID)),x.nData!=null&&(this.nData=this.stringify.dtdNData(x.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(f.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(f.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(f.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(f.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(f.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(f.prototype,"xmlVersion",{get:function(){return null}}),f.prototype.toString=function(a){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(a))},f}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(N,Y,k){"use strict";(function(){var P,u,C,R=function(S,f){for(var a in f)h.call(f,a)&&(S[a]=f[a]);function o(){this.constructor=S}return o.prototype=f.prototype,S.prototype=new o,S.__super__=f.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(s){R(S,s);function S(f,a,o){if(S.__super__.constructor.call(this,f),a==null)throw new Error("Missing DTD notation name. "+this.debugInfo(a));if(!o.pubID&&!o.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(a));this.name=this.stringify.name(a),this.type=P.NotationDeclaration,o.pubID!=null&&(this.pubID=this.stringify.dtdPubID(o.pubID)),o.sysID!=null&&(this.sysID=this.stringify.dtdSysID(o.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(f){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(f))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;R=N("./Utility").isObject,C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(S){h(f,S);function f(a,o,r,x){var g;f.__super__.constructor.call(this,a),R(o)&&(g=o,o=g.version,r=g.encoding,x=g.standalone),o||(o="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(o),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),x!=null&&(this.standalone=this.stringify.xmlStandalone(x))}return f.prototype.toString=function(a){return this.options.writer.declaration(this,this.options.writer.filterOptions(a))},f}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,f,a,o=function(g,m){for(var w in m)r.call(m,w)&&(g[w]=m[w]);function p(){this.constructor=g}return p.prototype=m.prototype,g.prototype=new p,g.__super__=m.prototype,g},r={}.hasOwnProperty;a=N("./Utility").isObject,f=N("./XMLNode"),P=N("./NodeType"),u=N("./XMLDTDAttList"),R=N("./XMLDTDEntity"),C=N("./XMLDTDElement"),h=N("./XMLDTDNotation"),S=N("./XMLNamedNodeMap"),Y.exports=s=function(x){o(g,x);function g(m,w,p){var d,n,l,c,T,v;if(g.__super__.constructor.call(this,m),this.type=P.DocType,m.children){for(c=m.children,n=0,l=c.length;n<l;n++)if(d=c[n],d.type===P.Element){this.name=d.name;break}}this.documentObject=m,a(w)&&(T=w,w=T.pubID,p=T.sysID),p==null&&(v=[w,p],p=v[0],w=v[1]),w!=null&&(this.pubID=this.stringify.dtdPubID(w)),p!=null&&(this.sysID=this.stringify.dtdSysID(p))}return Object.defineProperty(g.prototype,"entities",{get:function(){var w,p,d,n,l;for(n={},l=this.children,p=0,d=l.length;p<d;p++)w=l[p],w.type===P.EntityDeclaration&&!w.pe&&(n[w.name]=w);return new S(n)}}),Object.defineProperty(g.prototype,"notations",{get:function(){var w,p,d,n,l;for(n={},l=this.children,p=0,d=l.length;p<d;p++)w=l[p],w.type===P.NotationDeclaration&&(n[w.name]=w);return new S(n)}}),Object.defineProperty(g.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(g.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(g.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),g.prototype.element=function(m,w){var p;return p=new C(this,m,w),this.children.push(p),this},g.prototype.attList=function(m,w,p,d,n){var l;return l=new u(this,m,w,p,d,n),this.children.push(l),this},g.prototype.entity=function(m,w){var p;return p=new R(this,!1,m,w),this.children.push(p),this},g.prototype.pEntity=function(m,w){var p;return p=new R(this,!0,m,w),this.children.push(p),this},g.prototype.notation=function(m,w){var p;return p=new h(this,m,w),this.children.push(p),this},g.prototype.toString=function(m){return this.options.writer.docType(this,this.options.writer.filterOptions(m))},g.prototype.ele=function(m,w){return this.element(m,w)},g.prototype.att=function(m,w,p,d,n){return this.attList(m,w,p,d,n)},g.prototype.ent=function(m,w){return this.entity(m,w)},g.prototype.pent=function(m,w){return this.pEntity(m,w)},g.prototype.not=function(m,w){return this.notation(m,w)},g.prototype.up=function(){return this.root()||this.documentObject},g.prototype.isEqualNode=function(m){return g.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)?m.name!==this.name||m.publicId!==this.publicId?!1:!(m.systemId!==this.systemId):!1},g}(f)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,f,a=function(x,g){for(var m in g)o.call(g,m)&&(x[m]=g[m]);function w(){this.constructor=x}return w.prototype=g.prototype,x.prototype=new w,x.__super__=g.prototype,x},o={}.hasOwnProperty;f=N("./Utility").isPlainObject,C=N("./XMLDOMImplementation"),u=N("./XMLDOMConfiguration"),h=N("./XMLNode"),P=N("./NodeType"),S=N("./XMLStringifier"),s=N("./XMLStringWriter"),Y.exports=R=function(r){a(x,r);function x(g){x.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new u,g||(g={}),g.writer||(g.writer=new s),this.options=g,this.stringify=new S(g)}return Object.defineProperty(x.prototype,"implementation",{value:new C}),Object.defineProperty(x.prototype,"doctype",{get:function(){var m,w,p,d;for(d=this.children,w=0,p=d.length;w<p;w++)if(m=d[w],m.type===P.DocType)return m;return null}}),Object.defineProperty(x.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(x.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(x.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(x.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(x.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(x.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(x.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(x.prototype,"origin",{get:function(){return null}}),Object.defineProperty(x.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(x.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(x.prototype,"contentType",{get:function(){return null}}),x.prototype.end=function(g){var m;return m={},g?f(g)&&(m=g,g=this.options.writer):g=this.options.writer,g.document(this,g.filterOptions(m))},x.prototype.toString=function(g){return this.options.writer.document(this,this.options.writer.filterOptions(g))},x.prototype.createElement=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createTextNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createComment=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createCDATASection=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createProcessingInstruction=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createAttribute=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createEntityReference=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.importNode=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createElementNS=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createAttributeNS=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getElementsByTagNameNS=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getElementById=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.adoptNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.renameNode=function(g,m,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createEvent=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createNodeIterator=function(g,m,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},x.prototype.createTreeWalker=function(g,m,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},x}(h)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,f,a,o,r,x,g,m,w,p,d,n,l,c,T,v,i,L,A={}.hasOwnProperty;L=N("./Utility"),v=L.isObject,T=L.isFunction,i=L.isPlainObject,c=L.getValue,P=N("./NodeType"),x=N("./XMLDocument"),m=N("./XMLElement"),R=N("./XMLCData"),h=N("./XMLComment"),p=N("./XMLRaw"),l=N("./XMLText"),w=N("./XMLProcessingInstruction"),o=N("./XMLDeclaration"),r=N("./XMLDocType"),s=N("./XMLDTDAttList"),f=N("./XMLDTDEntity"),S=N("./XMLDTDElement"),a=N("./XMLDTDNotation"),C=N("./XMLAttribute"),n=N("./XMLStringifier"),d=N("./XMLStringWriter"),u=N("./WriterState"),Y.exports=g=function(){function y(E,b,_){var I;this.name="?xml",this.type=P.Document,E||(E={}),I={},E.writer?i(E.writer)&&(I=E.writer,E.writer=new d):E.writer=new d,this.options=E,this.writer=E.writer,this.writerOptions=this.writer.filterOptions(I),this.stringify=new n(E),this.onDataCallback=b||function(){},this.onEndCallback=_||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return y.prototype.createChildNode=function(E){var b,_,I,j,M,G,K,H;switch(E.type){case P.CData:this.cdata(E.value);break;case P.Comment:this.comment(E.value);break;case P.Element:I={},K=E.attribs;for(_ in K){if(!A.call(K,_))continue;b=K[_],I[_]=b.value}this.node(E.name,I);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(E.value);break;case P.Text:this.text(E.value);break;case P.ProcessingInstruction:this.instruction(E.target,E.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+E.constructor.name)}for(H=E.children,M=0,G=H.length;M<G;M++)j=H[M],this.createChildNode(j),j.type===P.Element&&this.up();return this},y.prototype.dummy=function(){return this},y.prototype.node=function(E,b,_){var I;if(E==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(E));return this.openCurrent(),E=c(E),b==null&&(b={}),b=c(b),v(b)||(I=[b,_],_=I[0],b=I[1]),this.currentNode=new m(this,E,b),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,_!=null&&this.text(_),this},y.prototype.element=function(E,b,_){var I,j,M,G,K,H;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(E)||v(E)||T(E))for(G=this.options.noValidation,this.options.noValidation=!0,H=new x(this.options).element("TEMP_ROOT"),H.element(E),this.options.noValidation=G,K=H.children,j=0,M=K.length;j<M;j++)I=K[j],this.createChildNode(I),I.type===P.Element&&this.up();else this.node(E,b,_);return this},y.prototype.attribute=function(E,b){var _,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(E));if(E!=null&&(E=c(E)),v(E))for(_ in E){if(!A.call(E,_))continue;I=E[_],this.attribute(_,I)}else T(b)&&(b=b.apply()),this.options.keepNullAttributes&&b==null?this.currentNode.attribs[E]=new C(this,E,""):b!=null&&(this.currentNode.attribs[E]=new C(this,E,b));return this},y.prototype.text=function(E){var b;return this.openCurrent(),b=new l(this,E),this.onData(this.writer.text(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.cdata=function(E){var b;return this.openCurrent(),b=new R(this,E),this.onData(this.writer.cdata(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.comment=function(E){var b;return this.openCurrent(),b=new h(this,E),this.onData(this.writer.comment(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.raw=function(E){var b;return this.openCurrent(),b=new p(this,E),this.onData(this.writer.raw(b,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.instruction=function(E,b){var _,I,j,M,G;if(this.openCurrent(),E!=null&&(E=c(E)),b!=null&&(b=c(b)),Array.isArray(E))for(_=0,M=E.length;_<M;_++)I=E[_],this.instruction(I);else if(v(E))for(I in E){if(!A.call(E,I))continue;j=E[I],this.instruction(I,j)}else T(b)&&(b=b.apply()),G=new w(this,E,b),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},y.prototype.declaration=function(E,b,_){var I;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return I=new o(this,E,b,_),this.onData(this.writer.declaration(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.doctype=function(E,b,_){if(this.openCurrent(),E==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,_),this.currentNode.rootNodeName=E,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},y.prototype.dtdElement=function(E,b){var _;return this.openCurrent(),_=new S(this,E,b),this.onData(this.writer.dtdElement(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.attList=function(E,b,_,I,j){var M;return this.openCurrent(),M=new s(this,E,b,_,I,j),this.onData(this.writer.dtdAttList(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.entity=function(E,b){var _;return this.openCurrent(),_=new f(this,!1,E,b),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.pEntity=function(E,b){var _;return this.openCurrent(),_=new f(this,!0,E,b),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.notation=function(E,b){var _;return this.openCurrent(),_=new a(this,E,b),this.onData(this.writer.dtdNotation(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.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},y.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},y.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},y.prototype.openNode=function(E){var b,_,I,j;if(!E.isOpen){if(!this.root&&this.currentLevel===0&&E.type===P.Element&&(this.root=E),_="",E.type===P.Element){this.writerOptions.state=u.OpenTag,_=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<"+E.name,j=E.attribs;for(I in j){if(!A.call(j,I))continue;b=j[I],_+=this.writer.attribute(b,this.writerOptions,this.currentLevel)}_+=(E.children?">":"/>")+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=u.InsideTag}else this.writerOptions.state=u.OpenTag,_=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+E.rootNodeName,E.pubID&&E.sysID?_+=' PUBLIC "'+E.pubID+'" "'+E.sysID+'"':E.sysID&&(_+=' SYSTEM "'+E.sysID+'"'),E.children?(_+=" [",this.writerOptions.state=u.InsideTag):(this.writerOptions.state=u.CloseTag,_+=">"),_+=this.writer.endline(E,this.writerOptions,this.currentLevel);return this.onData(_,this.currentLevel),E.isOpen=!0}},y.prototype.closeNode=function(E){var b;if(!E.isClosed)return b="",this.writerOptions.state=u.CloseTag,E.type===P.Element?b=this.writer.indent(E,this.writerOptions,this.currentLevel)+"</"+E.name+">"+this.writer.endline(E,this.writerOptions,this.currentLevel):b=this.writer.indent(E,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=u.None,this.onData(b,this.currentLevel),E.isClosed=!0},y.prototype.onData=function(E,b){return this.documentStarted=!0,this.onDataCallback(E,b+1)},y.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},y.prototype.debugInfo=function(E){return E==null?"":"node: <"+E+">"},y.prototype.ele=function(){return this.element.apply(this,arguments)},y.prototype.nod=function(E,b,_){return this.node(E,b,_)},y.prototype.txt=function(E){return this.text(E)},y.prototype.dat=function(E){return this.cdata(E)},y.prototype.com=function(E){return this.comment(E)},y.prototype.ins=function(E,b){return this.instruction(E,b)},y.prototype.dec=function(E,b,_){return this.declaration(E,b,_)},y.prototype.dtd=function(E,b,_){return this.doctype(E,b,_)},y.prototype.e=function(E,b,_){return this.element(E,b,_)},y.prototype.n=function(E,b,_){return this.node(E,b,_)},y.prototype.t=function(E){return this.text(E)},y.prototype.d=function(E){return this.cdata(E)},y.prototype.c=function(E){return this.comment(E)},y.prototype.r=function(E){return this.raw(E)},y.prototype.i=function(E,b){return this.instruction(E,b)},y.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.ent=function(E,b){return this.entity(E,b)},y.prototype.pent=function(E,b){return this.pEntity(E,b)},y.prototype.not=function(E,b){return this.notation(E,b)},y}()}).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,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)f.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;s=N("./XMLNode"),R=N("./NodeType"),Y.exports=h=function(a){S(o,a);function o(r){o.__super__.constructor.call(this,r),this.type=R.Dummy}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return""},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S,f,a,o,r,x,g=function(p,d){for(var n in d)m.call(d,n)&&(p[n]=d[n]);function l(){this.constructor=p}return l.prototype=d.prototype,p.prototype=new l,p.__super__=d.prototype,p},m={}.hasOwnProperty;x=N("./Utility"),r=x.isObject,o=x.isFunction,a=x.getValue,f=N("./XMLNode"),R=N("./NodeType"),h=N("./XMLAttribute"),S=N("./XMLNamedNodeMap"),Y.exports=s=function(w){g(p,w);function p(d,n,l){var c,T,v,i;if(p.__super__.constructor.call(this,d),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=R.Element,this.attribs={},this.schemaTypeInfo=null,l!=null&&this.attribute(l),d.type===R.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(i=d.children,T=0,v=i.length;T<v;T++)if(c=i[T],c.type===R.DocType){c.name=this.name;break}}}return Object.defineProperty(p.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(p.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(p.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(p.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(p.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(p.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(p.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(p.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),p.prototype.clone=function(){var d,n,l,c;l=(0,u.default)(this),l.isRoot&&(l.documentObject=null),l.attribs={},c=this.attribs;for(n in c){if(!m.call(c,n))continue;d=c[n],l.attribs[n]=d.clone()}return l.children=[],this.children.forEach(function(T){var v;return v=T.clone(),v.parent=l,l.children.push(v)}),l},p.prototype.attribute=function(d,n){var l,c;if(d!=null&&(d=a(d)),r(d))for(l in d){if(!m.call(d,l))continue;c=d[l],this.attribute(l,c)}else o(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[d]=new h(this,d,""):n!=null&&(this.attribs[d]=new h(this,d,n));return this},p.prototype.removeAttribute=function(d){var n,l,c;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=a(d),Array.isArray(d))for(l=0,c=d.length;l<c;l++)n=d[l],delete this.attribs[n];else delete this.attribs[d];return this},p.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},p.prototype.att=function(d,n){return this.attribute(d,n)},p.prototype.a=function(d,n){return this.attribute(d,n)},p.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},p.prototype.setAttribute=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},p.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setAttributeNS=function(d,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.removeAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getAttributeNodeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagNameNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},p.prototype.hasAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setIdAttribute=function(d,n){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:n},p.prototype.setIdAttributeNS=function(d,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setIdAttributeNode=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagNameNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(d){var n,l,c;if(!p.__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,c=this.attribs.length-1;0<=c?l<=c:l>=c;n=0<=c?++l:--l)if(!this.attribs[n].isEqualNode(d.attribs[n]))return!1;return!0},p}(f)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R;Y.exports=R=function(){function h(s){this.nodes=s}return Object.defineProperty(h.prototype,"length",{get:function(){return(0,u.default)(this.nodes).length||0}}),h.prototype.clone=function(){return this.nodes=null},h.prototype.getNamedItem=function(s){return this.nodes[s]},h.prototype.setNamedItem=function(s){var S;return S=this.nodes[s.nodeName],this.nodes[s.nodeName]=s,S||null},h.prototype.removeNamedItem=function(s){var S;return S=this.nodes[s],delete this.nodes[s],S||null},h.prototype.item=function(s){return this.nodes[(0,u.default)(this.nodes)[s]]||null},h.prototype.getNamedItemNS=function(s,S){throw new Error("This DOM method is not implemented.")},h.prototype.setNamedItemNS=function(s){throw new Error("This DOM method is not implemented.")},h.prototype.removeNamedItemNS=function(s,S){throw new Error("This DOM method is not implemented.")},h}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,f,a,o,r,x,g,m,w,p,d,n,l,c={}.hasOwnProperty;l=N("./Utility"),n=l.isObject,d=l.isFunction,p=l.isEmpty,w=l.getValue,f=null,C=null,R=null,h=null,s=null,g=null,m=null,x=null,S=null,u=null,r=null,a=null,P=null,Y.exports=o=function(){function T(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,f||(f=N("./XMLElement"),C=N("./XMLCData"),R=N("./XMLComment"),h=N("./XMLDeclaration"),s=N("./XMLDocType"),g=N("./XMLRaw"),m=N("./XMLText"),x=N("./XMLProcessingInstruction"),S=N("./XMLDummy"),u=N("./NodeType"),r=N("./XMLNodeList"),a=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 i;return i=this.parent.children.indexOf(this),this.parent.children[i-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var i;return i=this.parent.children.indexOf(this),this.parent.children[i+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var i,L,A,y,E;if(this.nodeType===u.Element||this.nodeType===u.DocumentFragment){for(E="",y=this.children,L=0,A=y.length;L<A;L++)i=y[L],i.textContent&&(E+=i.textContent);return E}else return null},set:function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.setParent=function(v){var i,L,A,y,E;for(this.parent=v,v&&(this.options=v.options,this.stringify=v.stringify),y=this.children,E=[],L=0,A=y.length;L<A;L++)i=y[L],E.push(i.setParent(this));return E},T.prototype.element=function(v,i,L){var A,y,E,b,_,I,j,M,G,K,H;if(I=null,i===null&&L==null&&(G=[{},null],i=G[0],L=G[1]),i==null&&(i={}),i=w(i),n(i)||(K=[i,L],L=K[0],i=K[1]),v!=null&&(v=w(v)),Array.isArray(v))for(E=0,j=v.length;E<j;E++)y=v[E],I=this.element(y);else if(d(v))I=this.element(v.apply());else if(n(v))for(_ in v){if(!c.call(v,_))continue;if(H=v[_],d(H)&&(H=H.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&_.indexOf(this.stringify.convertAttKey)===0)I=this.attribute(_.substr(this.stringify.convertAttKey.length),H);else if(!this.options.separateArrayItems&&Array.isArray(H)&&p(H))I=this.dummy();else if(n(H)&&p(H))I=this.element(_);else if(!this.options.keepNullNodes&&H==null)I=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(H))for(b=0,M=H.length;b<M;b++)y=H[b],A={},A[_]=y,I=this.element(A);else n(H)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?I=this.element(H):(I=this.element(_),I.element(H)):I=this.element(_,H)}else!this.options.keepNullNodes&&L===null?I=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?I=this.text(L):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?I=this.cdata(L):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?I=this.comment(L):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?I=this.raw(L):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?I=this.instruction(v.substr(this.stringify.convertPIKey.length),L):I=this.node(v,i,L);if(I==null)throw new Error("Could not create any elements with: "+v+". "+this.debugInfo());return I},T.prototype.insertBefore=function(v,i,L){var A,y,E,b,_;if(v!=null?v.type:void 0)return E=v,b=i,E.setParent(this),b?(y=children.indexOf(b),_=children.splice(y),children.push(E),Array.prototype.push.apply(children,_)):children.push(E),E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return y=this.parent.children.indexOf(this),_=this.parent.children.splice(y),A=this.parent.element(v,i,L),Array.prototype.push.apply(this.parent.children,_),A},T.prototype.insertAfter=function(v,i,L){var A,y,E;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return y=this.parent.children.indexOf(this),E=this.parent.children.splice(y+1),A=this.parent.element(v,i,L),Array.prototype.push.apply(this.parent.children,E),A},T.prototype.remove=function(){var v,i;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat(i=[])),this.parent},T.prototype.node=function(v,i,L){var A,y;return v!=null&&(v=w(v)),i||(i={}),i=w(i),n(i)||(y=[i,L],L=y[0],i=y[1]),A=new f(this,v,i),L!=null&&A.text(L),this.children.push(A),A},T.prototype.text=function(v){var i;return n(v)&&this.element(v),i=new m(this,v),this.children.push(i),this},T.prototype.cdata=function(v){var i;return i=new C(this,v),this.children.push(i),this},T.prototype.comment=function(v){var i;return i=new R(this,v),this.children.push(i),this},T.prototype.commentBefore=function(v){var i,L,A;return L=this.parent.children.indexOf(this),A=this.parent.children.splice(L),i=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.commentAfter=function(v){var i,L,A;return L=this.parent.children.indexOf(this),A=this.parent.children.splice(L+1),i=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.raw=function(v){var i;return i=new g(this,v),this.children.push(i),this},T.prototype.dummy=function(){var v;return v=new S(this),v},T.prototype.instruction=function(v,i){var L,A,y,E,b;if(v!=null&&(v=w(v)),i!=null&&(i=w(i)),Array.isArray(v))for(E=0,b=v.length;E<b;E++)L=v[E],this.instruction(L);else if(n(v))for(L in v){if(!c.call(v,L))continue;A=v[L],this.instruction(L,A)}else d(i)&&(i=i.apply()),y=new x(this,v,i),this.children.push(y);return this},T.prototype.instructionBefore=function(v,i){var L,A,y;return A=this.parent.children.indexOf(this),y=this.parent.children.splice(A),L=this.parent.instruction(v,i),Array.prototype.push.apply(this.parent.children,y),this},T.prototype.instructionAfter=function(v,i){var L,A,y;return A=this.parent.children.indexOf(this),y=this.parent.children.splice(A+1),L=this.parent.instruction(v,i),Array.prototype.push.apply(this.parent.children,y),this},T.prototype.declaration=function(v,i,L){var A,y;return A=this.document(),y=new h(A,v,i,L),A.children.length===0?A.children.unshift(y):A.children[0].type===u.Declaration?A.children[0]=y:A.children.unshift(y),A.root()||A},T.prototype.dtd=function(v,i){var L,A,y,E,b,_,I,j,M,G;for(A=this.document(),y=new s(A,v,i),M=A.children,E=b=0,I=M.length;b<I;E=++b)if(L=M[E],L.type===u.DocType)return A.children[E]=y,y;for(G=A.children,E=_=0,j=G.length;_<j;E=++_)if(L=G[E],L.isRoot)return A.children.splice(E,0,y),y;return A.children.push(y),y},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 v;for(v=this;v;){if(v.type===u.Document)return v.rootObject;if(v.isRoot)return v;v=v.parent}},T.prototype.document=function(){var v;for(v=this;v;){if(v.type===u.Document)return v;v=v.parent}},T.prototype.end=function(v){return this.document().end(v)},T.prototype.prev=function(){var v;if(v=this.parent.children.indexOf(this),v<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[v-1]},T.prototype.next=function(){var v;if(v=this.parent.children.indexOf(this),v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[v+1]},T.prototype.importDocument=function(v){var i;return i=v.root().clone(),i.parent=this,i.isRoot=!1,this.children.push(i),this},T.prototype.debugInfo=function(v){var i,L;return v=v||this.name,v==null&&!((i=this.parent)!=null?i.name:void 0)?"":v==null?"parent: <"+this.parent.name+">":((L=this.parent)!=null?L.name:void 0)?"node: <"+v+">, parent: <"+this.parent.name+">":"node: <"+v+">"},T.prototype.ele=function(v,i,L){return this.element(v,i,L)},T.prototype.nod=function(v,i,L){return this.node(v,i,L)},T.prototype.txt=function(v){return this.text(v)},T.prototype.dat=function(v){return this.cdata(v)},T.prototype.com=function(v){return this.comment(v)},T.prototype.ins=function(v,i){return this.instruction(v,i)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(v,i,L){return this.declaration(v,i,L)},T.prototype.e=function(v,i,L){return this.element(v,i,L)},T.prototype.n=function(v,i,L){return this.node(v,i,L)},T.prototype.t=function(v){return this.text(v)},T.prototype.d=function(v){return this.cdata(v)},T.prototype.c=function(v){return this.comment(v)},T.prototype.r=function(v){return this.raw(v)},T.prototype.i=function(v,i){return this.instruction(v,i)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(v){return this.importDocument(v)},T.prototype.replaceChild=function(v,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(v){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(v,i){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(v){var i,L;return i=this,i===v?0:this.document()!==v.document()?(L=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?L|=P.Preceding:L|=P.Following,L):i.isAncestor(v)?P.Contains|P.Preceding:i.isDescendant(v)?P.Contains|P.Following:i.isPreceding(v)?P.Preceding:P.Following},T.prototype.isSameNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(v){var i,L,A;if(v.nodeType!==this.nodeType)return!1;if(v.children.length!==this.children.length)return!1;for(i=L=0,A=this.children.length-1;0<=A?L<=A:L>=A;i=0<=A?++L:--L)if(!this.children[i].isEqualNode(v.children[i]))return!1;return!0},T.prototype.getFeature=function(v,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(v,i,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(v){return v?v===this||this.isDescendant(v):!1},T.prototype.isDescendant=function(v){var i,L,A,y,E;for(E=this.children,A=0,y=E.length;A<y;A++){if(i=E[A],v===i)return!0;if(L=i.isDescendant(v),L)return!0}return!1},T.prototype.isAncestor=function(v){return v.isDescendant(this)},T.prototype.isPreceding=function(v){var i,L;return i=this.treePosition(v),L=this.treePosition(this),i===-1||L===-1?!1:i<L},T.prototype.isFollowing=function(v){var i,L;return i=this.treePosition(v),L=this.treePosition(this),i===-1||L===-1?!1:i>L},T.prototype.treePosition=function(v){var i,L;return L=0,i=!1,this.foreachTreeNode(this.document(),function(A){if(L++,!i&&A===v)return i=!0}),i?L:-1},T.prototype.foreachTreeNode=function(v,i){var L,A,y,E,b;for(v||(v=this.document()),E=v.children,A=0,y=E.length;A<y;A++){if(L=E[A],b=i(L))return b;if(b=this.foreachTreeNode(L,i),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,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(C){this.nodes=C}return Object.defineProperty(u.prototype,"length",{get:function(){return this.nodes.length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.item=function(C){return this.nodes[C]||null},u}()}).call(void 0)},{}],275:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)f.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),h=N("./XMLCharacterData"),Y.exports=s=function(a){S(o,a);function o(r,x,g){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=R.ProcessingInstruction,this.target=this.stringify.insTarget(x),this.name=this.target,g&&(this.value=this.stringify.insValue(g))}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},o.prototype.isEqualNode=function(r){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)f.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),h=N("./XMLNode"),Y.exports=s=function(a){S(o,a);function o(r,x){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=R.Raw,this.value=this.stringify.raw(x)}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;P=N("./NodeType"),R=N("./XMLWriterBase"),u=N("./WriterState"),Y.exports=C=function(S){h(f,S);function f(a,o){this.stream=a,f.__super__.constructor.call(this,o)}return f.prototype.endline=function(a,o,r){return a.isLastRootNode&&o.state===u.CloseTag?"":f.__super__.endline.call(this,a,o,r)},f.prototype.document=function(a,o){var r,x,g,m,w,p,d,n,l;for(d=a.children,x=g=0,w=d.length;g<w;x=++g)r=d[x],r.isLastRootNode=x===a.children.length-1;for(o=this.filterOptions(o),n=a.children,l=[],m=0,p=n.length;m<p;m++)r=n[m],l.push(this.writeChildNode(r,o,0));return l},f.prototype.attribute=function(a,o,r){return this.stream.write(f.__super__.attribute.call(this,a,o,r))},f.prototype.cdata=function(a,o,r){return this.stream.write(f.__super__.cdata.call(this,a,o,r))},f.prototype.comment=function(a,o,r){return this.stream.write(f.__super__.comment.call(this,a,o,r))},f.prototype.declaration=function(a,o,r){return this.stream.write(f.__super__.declaration.call(this,a,o,r))},f.prototype.docType=function(a,o,r){var x,g,m,w;if(r||(r=0),this.openNode(a,o,r),o.state=u.OpenTag,this.stream.write(this.indent(a,o,r)),this.stream.write("<!DOCTYPE "+a.root().name),a.pubID&&a.sysID?this.stream.write(' PUBLIC "'+a.pubID+'" "'+a.sysID+'"'):a.sysID&&this.stream.write(' SYSTEM "'+a.sysID+'"'),a.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(a,o,r)),o.state=u.InsideTag,w=a.children,g=0,m=w.length;g<m;g++)x=w[g],this.writeChildNode(x,o,r+1);o.state=u.CloseTag,this.stream.write("]")}return o.state=u.CloseTag,this.stream.write(o.spaceBeforeSlash+">"),this.stream.write(this.endline(a,o,r)),o.state=u.None,this.closeNode(a,o,r)},f.prototype.element=function(a,o,r){var x,g,m,w,p,d,n,l,c,T;r||(r=0),this.openNode(a,o,r),o.state=u.OpenTag,this.stream.write(this.indent(a,o,r)+"<"+a.name),c=a.attribs;for(n in c){if(!s.call(c,n))continue;x=c[n],this.attribute(x,o,r)}if(m=a.children.length,w=m===0?null:a.children[0],m===0||a.children.every(function(v){return(v.type===P.Text||v.type===P.Raw)&&v.value===""}))o.allowEmpty?(this.stream.write(">"),o.state=u.CloseTag,this.stream.write("</"+a.name+">")):(o.state=u.CloseTag,this.stream.write(o.spaceBeforeSlash+"/>"));else if(o.pretty&&m===1&&(w.type===P.Text||w.type===P.Raw)&&w.value!=null)this.stream.write(">"),o.state=u.InsideTag,o.suppressPrettyCount++,l=!0,this.writeChildNode(w,o,r+1),o.suppressPrettyCount--,l=!1,o.state=u.CloseTag,this.stream.write("</"+a.name+">");else{for(this.stream.write(">"+this.endline(a,o,r)),o.state=u.InsideTag,T=a.children,p=0,d=T.length;p<d;p++)g=T[p],this.writeChildNode(g,o,r+1);o.state=u.CloseTag,this.stream.write(this.indent(a,o,r)+"</"+a.name+">")}return this.stream.write(this.endline(a,o,r)),o.state=u.None,this.closeNode(a,o,r)},f.prototype.processingInstruction=function(a,o,r){return this.stream.write(f.__super__.processingInstruction.call(this,a,o,r))},f.prototype.raw=function(a,o,r){return this.stream.write(f.__super__.raw.call(this,a,o,r))},f.prototype.text=function(a,o,r){return this.stream.write(f.__super__.text.call(this,a,o,r))},f.prototype.dtdAttList=function(a,o,r){return this.stream.write(f.__super__.dtdAttList.call(this,a,o,r))},f.prototype.dtdElement=function(a,o,r){return this.stream.write(f.__super__.dtdElement.call(this,a,o,r))},f.prototype.dtdEntity=function(a,o,r){return this.stream.write(f.__super__.dtdEntity.call(this,a,o,r))},f.prototype.dtdNotation=function(a,o,r){return this.stream.write(f.__super__.dtdNotation.call(this,a,o,r))},f}(R)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(N,Y,k){"use strict";(function(){var P,u,C=function(s,S){for(var f in S)R.call(S,f)&&(s[f]=S[f]);function a(){this.constructor=s}return a.prototype=S.prototype,s.prototype=new a,s.__super__=S.prototype,s},R={}.hasOwnProperty;u=N("./XMLWriterBase"),Y.exports=P=function(h){C(s,h);function s(S){s.__super__.constructor.call(this,S)}return s.prototype.document=function(S,f){var a,o,r,x,g;for(f=this.filterOptions(f),x="",g=S.children,o=0,r=g.length;o<r;o++)a=g[o],x+=this.writeChildNode(a,f,0);return f.pretty&&x.slice(-f.newline.length)===f.newline&&(x=x.slice(0,-f.newline.length)),x},s}(u)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(N,Y,k){"use strict";(function(){var P,u=function(h,s){return function(){return h.apply(s,arguments)}},C={}.hasOwnProperty;Y.exports=P=function(){function R(h){this.assertLegalName=u(this.assertLegalName,this),this.assertLegalChar=u(this.assertLegalChar,this);var s,S,f;h||(h={}),this.options=h,this.options.version||(this.options.version="1.0"),S=h.stringify||{};for(s in S){if(!C.call(S,s))continue;f=S[s],this[s]=f}}return R.prototype.name=function(h){return this.options.noValidation?h:this.assertLegalName(""+h||"")},R.prototype.text=function(h){return this.options.noValidation?h:this.assertLegalChar(this.textEscape(""+h||""))},R.prototype.cdata=function(h){return this.options.noValidation?h:(h=""+h||"",h=h.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(h))},R.prototype.comment=function(h){if(this.options.noValidation)return h;if(h=""+h||"",h.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+h);return this.assertLegalChar(h)},R.prototype.raw=function(h){return this.options.noValidation?h:""+h||""},R.prototype.attValue=function(h){return this.options.noValidation?h:this.assertLegalChar(this.attEscape(h=""+h||""))},R.prototype.insTarget=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.insValue=function(h){if(this.options.noValidation)return h;if(h=""+h||"",h.match(/\?>/))throw new Error("Invalid processing instruction value: "+h);return this.assertLegalChar(h)},R.prototype.xmlVersion=function(h){if(this.options.noValidation)return h;if(h=""+h||"",!h.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+h);return h},R.prototype.xmlEncoding=function(h){if(this.options.noValidation)return h;if(h=""+h||"",!h.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+h);return this.assertLegalChar(h)},R.prototype.xmlStandalone=function(h){return this.options.noValidation?h:h?"yes":"no"},R.prototype.dtdPubID=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdSysID=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdElementValue=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdAttType=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdAttDefault=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdEntityValue=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdNData=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.convertAttKey="@",R.prototype.convertPIKey="?",R.prototype.convertTextKey="#text",R.prototype.convertCDataKey="#cdata",R.prototype.convertCommentKey="#comment",R.prototype.convertRawKey="#raw",R.prototype.assertLegalChar=function(h){var s,S;if(this.options.noValidation)return h;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=h.match(s))throw new Error("Invalid character in string: "+h+" at index "+S.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=h.match(s)))throw new Error("Invalid character in string: "+h+" at index "+S.index);return h},R.prototype.assertLegalName=function(h){var s;if(this.options.noValidation)return h;if(this.assertLegalChar(h),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])*$/,!h.match(s))throw new Error("Invalid character in name");return h},R.prototype.textEscape=function(h){var s;return this.options.noValidation?h:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(s,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},R.prototype.attEscape=function(h){var s;return this.options.noValidation?h:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(s,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},R}()}).call(void 0)},{}],280:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)f.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),h=N("./XMLCharacterData"),Y.exports=s=function(a){S(o,a);function o(r,x){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=R.Text,this.value=this.stringify.text(x)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var x,g,m;for(m="",g=this.previousSibling;g;)m=g.data+m,g=g.previousSibling;for(m+=this.data,x=this.nextSibling;x;)m=m+x.data,x=x.nextSibling;return m}}),o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},o.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,f,a,o,r,x,g,m,w,p,d,n={}.hasOwnProperty;d=N("./Utility").assign,P=N("./NodeType"),a=N("./XMLDeclaration"),o=N("./XMLDocType"),C=N("./XMLCData"),R=N("./XMLComment"),x=N("./XMLElement"),m=N("./XMLRaw"),w=N("./XMLText"),g=N("./XMLProcessingInstruction"),r=N("./XMLDummy"),h=N("./XMLDTDAttList"),s=N("./XMLDTDElement"),S=N("./XMLDTDEntity"),f=N("./XMLDTDNotation"),u=N("./WriterState"),Y.exports=p=function(){function l(c){var T,v,i;c||(c={}),this.options=c,v=c.writer||{};for(T in v){if(!n.call(v,T))continue;i=v[T],this["_"+T]=this[T],this[T]=i}}return l.prototype.filterOptions=function(c){var T,v,i,L,A,y,E,b;return c||(c={}),c=d({},this.options,c),T={writer:this},T.pretty=c.pretty||!1,T.allowEmpty=c.allowEmpty||!1,T.indent=(v=c.indent)!=null?v:" ",T.newline=(i=c.newline)!=null?i:`
`,T.offset=(L=c.offset)!=null?L:0,T.dontPrettyTextNodes=(A=(y=c.dontPrettyTextNodes)!=null?y:c.dontprettytextnodes)!=null?A:0,T.spaceBeforeSlash=(E=(b=c.spaceBeforeSlash)!=null?b:c.spacebeforeslash)!=null?E:"",T.spaceBeforeSlash===!0&&(T.spaceBeforeSlash=" "),T.suppressPrettyCount=0,T.user={},T.state=u.None,T},l.prototype.indent=function(c,T,v){var i;return!T.pretty||T.suppressPrettyCount?"":T.pretty&&(i=(v||0)+T.offset+1,i>0)?new Array(i).join(T.indent):""},l.prototype.endline=function(c,T,v){return!T.pretty||T.suppressPrettyCount?"":T.newline},l.prototype.attribute=function(c,T,v){var i;return this.openAttribute(c,T,v),i=" "+c.name+'="'+c.value+'"',this.closeAttribute(c,T,v),i},l.prototype.cdata=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<![CDATA[",T.state=u.InsideTag,i+=c.value,T.state=u.CloseTag,i+="]]>"+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.comment=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<!-- ",T.state=u.InsideTag,i+=c.value,T.state=u.CloseTag,i+=" -->"+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.declaration=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<?xml",T.state=u.InsideTag,i+=' version="'+c.version+'"',c.encoding!=null&&(i+=' encoding="'+c.encoding+'"'),c.standalone!=null&&(i+=' standalone="'+c.standalone+'"'),T.state=u.CloseTag,i+=T.spaceBeforeSlash+"?>",i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.docType=function(c,T,v){var i,L,A,y,E;if(v||(v=0),this.openNode(c,T,v),T.state=u.OpenTag,y=this.indent(c,T,v),y+="<!DOCTYPE "+c.root().name,c.pubID&&c.sysID?y+=' PUBLIC "'+c.pubID+'" "'+c.sysID+'"':c.sysID&&(y+=' SYSTEM "'+c.sysID+'"'),c.children.length>0){for(y+=" [",y+=this.endline(c,T,v),T.state=u.InsideTag,E=c.children,L=0,A=E.length;L<A;L++)i=E[L],y+=this.writeChildNode(i,T,v+1);T.state=u.CloseTag,y+="]"}return T.state=u.CloseTag,y+=T.spaceBeforeSlash+">",y+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),y},l.prototype.element=function(c,T,v){var i,L,A,y,E,b,_,I,j,M,G,K,H,z;v||(v=0),M=!1,G="",this.openNode(c,T,v),T.state=u.OpenTag,G+=this.indent(c,T,v)+"<"+c.name,K=c.attribs;for(j in K){if(!n.call(K,j))continue;i=K[j],G+=this.attribute(i,T,v)}if(A=c.children.length,y=A===0?null:c.children[0],A===0||c.children.every(function(B){return(B.type===P.Text||B.type===P.Raw)&&B.value===""}))T.allowEmpty?(G+=">",T.state=u.CloseTag,G+="</"+c.name+">"+this.endline(c,T,v)):(T.state=u.CloseTag,G+=T.spaceBeforeSlash+"/>"+this.endline(c,T,v));else if(T.pretty&&A===1&&(y.type===P.Text||y.type===P.Raw)&&y.value!=null)G+=">",T.state=u.InsideTag,T.suppressPrettyCount++,M=!0,G+=this.writeChildNode(y,T,v+1),T.suppressPrettyCount--,M=!1,T.state=u.CloseTag,G+="</"+c.name+">"+this.endline(c,T,v);else{if(T.dontPrettyTextNodes){for(H=c.children,E=0,_=H.length;E<_;E++)if(L=H[E],(L.type===P.Text||L.type===P.Raw)&&L.value!=null){T.suppressPrettyCount++,M=!0;break}}for(G+=">"+this.endline(c,T,v),T.state=u.InsideTag,z=c.children,b=0,I=z.length;b<I;b++)L=z[b],G+=this.writeChildNode(L,T,v+1);T.state=u.CloseTag,G+=this.indent(c,T,v)+"</"+c.name+">",M&&T.suppressPrettyCount--,G+=this.endline(c,T,v),T.state=u.None}return this.closeNode(c,T,v),G},l.prototype.writeChildNode=function(c,T,v){switch(c.type){case P.CData:return this.cdata(c,T,v);case P.Comment:return this.comment(c,T,v);case P.Element:return this.element(c,T,v);case P.Raw:return this.raw(c,T,v);case P.Text:return this.text(c,T,v);case P.ProcessingInstruction:return this.processingInstruction(c,T,v);case P.Dummy:return"";case P.Declaration:return this.declaration(c,T,v);case P.DocType:return this.docType(c,T,v);case P.AttributeDeclaration:return this.dtdAttList(c,T,v);case P.ElementDeclaration:return this.dtdElement(c,T,v);case P.EntityDeclaration:return this.dtdEntity(c,T,v);case P.NotationDeclaration:return this.dtdNotation(c,T,v);default:throw new Error("Unknown XML node type: "+c.constructor.name)}},l.prototype.processingInstruction=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<?",T.state=u.InsideTag,i+=c.target,c.value&&(i+=" "+c.value),T.state=u.CloseTag,i+=T.spaceBeforeSlash+"?>",i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.raw=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v),T.state=u.InsideTag,i+=c.value,T.state=u.CloseTag,i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.text=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v),T.state=u.InsideTag,i+=c.value,T.state=u.CloseTag,i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdAttList=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<!ATTLIST",T.state=u.InsideTag,i+=" "+c.elementName+" "+c.attributeName+" "+c.attributeType,c.defaultValueType!=="#DEFAULT"&&(i+=" "+c.defaultValueType),c.defaultValue&&(i+=' "'+c.defaultValue+'"'),T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdElement=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<!ELEMENT",T.state=u.InsideTag,i+=" "+c.name+" "+c.value,T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdEntity=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<!ENTITY",T.state=u.InsideTag,c.pe&&(i+=" %"),i+=" "+c.name,c.value?i+=' "'+c.value+'"':(c.pubID&&c.sysID?i+=' PUBLIC "'+c.pubID+'" "'+c.sysID+'"':c.sysID&&(i+=' SYSTEM "'+c.sysID+'"'),c.nData&&(i+=" NDATA "+c.nData)),T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdNotation=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<!NOTATION",T.state=u.InsideTag,i+=" "+c.name,c.pubID&&c.sysID?i+=' PUBLIC "'+c.pubID+'" "'+c.sysID+'"':c.pubID?i+=' PUBLIC "'+c.pubID+'"':c.sysID&&(i+=' SYSTEM "'+c.sysID+'"'),T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.openNode=function(c,T,v){},l.prototype.closeNode=function(c,T,v){},l.prototype.openAttribute=function(c,T,v){},l.prototype.closeAttribute=function(c,T,v){},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,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,f,a,o;o=N("./Utility"),f=o.assign,a=o.isFunction,C=N("./XMLDOMImplementation"),R=N("./XMLDocument"),h=N("./XMLDocumentCB"),S=N("./XMLStringWriter"),s=N("./XMLStreamWriter"),P=N("./NodeType"),u=N("./WriterState"),Y.exports.create=function(r,x,g,m){var w,p;if(r==null)throw new Error("Root element needs a name.");return m=f({},x,g,m),w=new R(m),p=w.element(r),m.headless||(w.declaration(m),(m.pubID!=null||m.sysID!=null)&&w.dtd(m)),p},Y.exports.begin=function(r,x,g){var m;return a(r)&&(m=[r,x],x=m[0],g=m[1],r={}),x?new h(r,x,g):new R(r)},Y.exports.stringWriter=function(r){return new S(r)},Y.exports.streamWriter=function(r,x){return new s(r,x)},Y.exports.implementation=new C,Y.exports.nodeType=P,Y.exports.writerState=u}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(N,Y,k){Y.exports=u;var P=Object.prototype.hasOwnProperty;function u(){for(var C={},R=0;R<arguments.length;R++){var h=arguments[R];for(var s in h)P.call(h,s)&&(C[s]=h[s])}return C}},{}],284:[function(N,Y,k){"use strict";var P=N("buffer").Buffer,u=N("./sha"),C=N("./md5"),R={sha1:u,md5:C},h=64,s=P.alloc(h);s.fill(0);function S(o,r,x){P.isBuffer(r)||(r=P.from(r)),P.isBuffer(x)||(x=P.from(x)),r.length>h?r=o(r):r.length<h&&(r=P.concat([r,s],h));for(var g=P.alloc(h),m=P.alloc(h),w=0;w<h;w++)g[w]=r[w]^54,m[w]=r[w]^92;var p=o(P.concat([g,x]));return o(P.concat([m,p]))}function f(o,r){o=o||"sha1";var x=R[o],g=[],m=0;return x||a("algorithm:",o,"is not yet supported"),{update:function(p){return P.isBuffer(p)||(p=P.from(p)),g.push(p),m+=p.length,this},digest:function(p){var d=P.concat(g),n=r?S(x,r,d):x(d);return g=null,p?n.toString(p):n}}}function a(){var o=[].slice.call(arguments).join(" ");throw new Error([o,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}k.createHash=function(o){return f(o)},k.createHmac=function(o,r){return f(o,r)},k.createCredentials=function(){a("sorry,createCredentials is not implemented yet")},k.createCipher=function(){a("sorry,createCipher is not implemented yet")},k.createCipheriv=function(){a("sorry,createCipheriv is not implemented yet")},k.createDecipher=function(){a("sorry,createDecipher is not implemented yet")},k.createDecipheriv=function(){a("sorry,createDecipheriv is not implemented yet")},k.createSign=function(){a("sorry,createSign is not implemented yet")},k.createVerify=function(){a("sorry,createVerify is not implemented yet")},k.createDiffieHellman=function(){a("sorry,createDiffieHellman is not implemented yet")},k.pbkdf2=function(){a("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(N,Y,k){"use strict";var P=N("buffer").Buffer,u=4,C=P.alloc(u);C.fill(0);var R=8;function h(f,a){if(f.length%u!==0){var o=f.length+(u-f.length%u);f=P.concat([f,C],o)}for(var r=[],x=a?f.readInt32BE:f.readInt32LE,g=0;g<f.length;g+=u)r.push(x.call(f,g));return r}function s(f,a,o){for(var r=P.alloc(a),x=o?r.writeInt32BE:r.writeInt32LE,g=0;g<f.length;g++)x.call(r,f[g],g*4,!0);return r}function S(f,a,o,r){P.isBuffer(f)||(f=P.from(f));var x=a(h(f,r),f.length*R);return s(x,o,r)}Y.exports={hash:S}},{buffer:73}],286:[function(N,Y,k){"use strict";var P=N("./helpers");function u(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(r,x){r[x>>5]|=128<<x%32,r[(x+64>>>9<<4)+14]=x;for(var g=1732584193,m=-271733879,w=-1732584194,p=271733878,d=0;d<r.length;d+=16){var n=g,l=m,c=w,T=p;g=h(g,m,w,p,r[d+0],7,-680876936),p=h(p,g,m,w,r[d+1],12,-389564586),w=h(w,p,g,m,r[d+2],17,606105819),m=h(m,w,p,g,r[d+3],22,-1044525330),g=h(g,m,w,p,r[d+4],7,-176418897),p=h(p,g,m,w,r[d+5],12,1200080426),w=h(w,p,g,m,r[d+6],17,-1473231341),m=h(m,w,p,g,r[d+7],22,-45705983),g=h(g,m,w,p,r[d+8],7,1770035416),p=h(p,g,m,w,r[d+9],12,-1958414417),w=h(w,p,g,m,r[d+10],17,-42063),m=h(m,w,p,g,r[d+11],22,-1990404162),g=h(g,m,w,p,r[d+12],7,1804603682),p=h(p,g,m,w,r[d+13],12,-40341101),w=h(w,p,g,m,r[d+14],17,-1502002290),m=h(m,w,p,g,r[d+15],22,1236535329),g=s(g,m,w,p,r[d+1],5,-165796510),p=s(p,g,m,w,r[d+6],9,-1069501632),w=s(w,p,g,m,r[d+11],14,643717713),m=s(m,w,p,g,r[d+0],20,-373897302),g=s(g,m,w,p,r[d+5],5,-701558691),p=s(p,g,m,w,r[d+10],9,38016083),w=s(w,p,g,m,r[d+15],14,-660478335),m=s(m,w,p,g,r[d+4],20,-405537848),g=s(g,m,w,p,r[d+9],5,568446438),p=s(p,g,m,w,r[d+14],9,-1019803690),w=s(w,p,g,m,r[d+3],14,-187363961),m=s(m,w,p,g,r[d+8],20,1163531501),g=s(g,m,w,p,r[d+13],5,-1444681467),p=s(p,g,m,w,r[d+2],9,-51403784),w=s(w,p,g,m,r[d+7],14,1735328473),m=s(m,w,p,g,r[d+12],20,-1926607734),g=S(g,m,w,p,r[d+5],4,-378558),p=S(p,g,m,w,r[d+8],11,-2022574463),w=S(w,p,g,m,r[d+11],16,1839030562),m=S(m,w,p,g,r[d+14],23,-35309556),g=S(g,m,w,p,r[d+1],4,-1530992060),p=S(p,g,m,w,r[d+4],11,1272893353),w=S(w,p,g,m,r[d+7],16,-155497632),m=S(m,w,p,g,r[d+10],23,-1094730640),g=S(g,m,w,p,r[d+13],4,681279174),p=S(p,g,m,w,r[d+0],11,-358537222),w=S(w,p,g,m,r[d+3],16,-722521979),m=S(m,w,p,g,r[d+6],23,76029189),g=S(g,m,w,p,r[d+9],4,-640364487),p=S(p,g,m,w,r[d+12],11,-421815835),w=S(w,p,g,m,r[d+15],16,530742520),m=S(m,w,p,g,r[d+2],23,-995338651),g=f(g,m,w,p,r[d+0],6,-198630844),p=f(p,g,m,w,r[d+7],10,1126891415),w=f(w,p,g,m,r[d+14],15,-1416354905),m=f(m,w,p,g,r[d+5],21,-57434055),g=f(g,m,w,p,r[d+12],6,1700485571),p=f(p,g,m,w,r[d+3],10,-1894986606),w=f(w,p,g,m,r[d+10],15,-1051523),m=f(m,w,p,g,r[d+1],21,-2054922799),g=f(g,m,w,p,r[d+8],6,1873313359),p=f(p,g,m,w,r[d+15],10,-30611744),w=f(w,p,g,m,r[d+6],15,-1560198380),m=f(m,w,p,g,r[d+13],21,1309151649),g=f(g,m,w,p,r[d+4],6,-145523070),p=f(p,g,m,w,r[d+11],10,-1120210379),w=f(w,p,g,m,r[d+2],15,718787259),m=f(m,w,p,g,r[d+9],21,-343485551),g=a(g,n),m=a(m,l),w=a(w,c),p=a(p,T)}return Array(g,m,w,p)}function R(r,x,g,m,w,p){return a(o(a(a(x,r),a(m,p)),w),g)}function h(r,x,g,m,w,p,d){return R(x&g|~x&m,r,x,w,p,d)}function s(r,x,g,m,w,p,d){return R(x&m|g&~m,r,x,w,p,d)}function S(r,x,g,m,w,p,d){return R(x^g^m,r,x,w,p,d)}function f(r,x,g,m,w,p,d){return R(g^(x|~m),r,x,w,p,d)}function a(r,x){var g=(r&65535)+(x&65535),m=(r>>16)+(x>>16)+(g>>16);return m<<16|g&65535}function o(r,x){return r<<x|r>>>32-x}Y.exports=function(x){return P.hash(x,C,16)}},{"./helpers":285}],287:[function(N,Y,k){"use strict";var P=N("./helpers");function u(S,f){S[f>>5]|=128<<24-f%32,S[(f+64>>9<<4)+15]=f;for(var a=Array(80),o=1732584193,r=-271733879,x=-1732584194,g=271733878,m=-1009589776,w=0;w<S.length;w+=16){for(var p=o,d=r,n=x,l=g,c=m,T=0;T<80;T++){T<16?a[T]=S[w+T]:a[T]=s(a[T-3]^a[T-8]^a[T-14]^a[T-16],1);var v=h(h(s(o,5),C(T,r,x,g)),h(h(m,a[T]),R(T)));m=g,g=x,x=s(r,30),r=o,o=v}o=h(o,p),r=h(r,d),x=h(x,n),g=h(g,l),m=h(m,c)}return Array(o,r,x,g,m)}function C(S,f,a,o){return S<20?f&a|~f&o:S<40?f^a^o:S<60?f&a|f&o|a&o:f^a^o}function R(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function h(S,f){var a=(S&65535)+(f&65535),o=(S>>16)+(f>>16)+(a>>16);return o<<16|a&65535}function s(S,f){return S<<f|S>>>32-f}Y.exports=function(f){return P.hash(f,u,20,!0)}},{"./helpers":285}],288:[function(N,Y,k){"use strict";Y.exports=function(){return function(){}}},{}],289:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/helpers/typeof"),C=R(u);function R(o){return o&&o.__esModule?o:{default:o}}var h=N("stream"),s=h.Stream,S=N("../lib/common/utils/isArray"),f=S.isArray;Y.exports.string=function(r){return typeof r=="string"},Y.exports.array=f,Y.exports.buffer=P.isBuffer;function a(o){return o instanceof s}Y.exports.writableStream=function(r){return a(r)&&typeof r._write=="function"&&(0,C.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,Y,k){"use strict";k.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(u){return P}},k.escape=N("escape-html"),k.timestamp=function(u){if(u){var C=u;return typeof C=="string"&&(C=Number(C)),String(u).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(N,Y,k){(function(P,u){"use strict";var C=N("babel-runtime/core-js/json/stringify"),R=S(C),h=N("babel-runtime/helpers/typeof"),s=S(h);function S(T){return T&&T.__esModule?T:{default:T}}var f=N("util"),a=N("url"),o=N("http"),r=N("https"),x=N("debug")("urllib"),g=N("humanize-ms"),m,w=0,p=Math.pow(2,31)-10,d=/^https?:\/\//i;function n(T,v){return T===void 0?v:T}function l(T,v){return function(i,L,A){if(i)return v(i);T({data:L,status:A.statusCode,headers:A.headers,res:A})}}k.TIMEOUTS=[g("300s"),g("300s")];var c=["json","text"];k.request=function(v,i,L){return arguments.length===2&&typeof i=="function"&&(L=i,i=null),typeof L=="function"?k.requestWithCallback(v,i,L):(m||(m=N("any-promise")),new m(function(A,y){k.requestWithCallback(v,i,l(A,y))}))},k.requestWithCallback=function(v,i,L){if(!v||typeof v!="string"&&(typeof v=="undefined"?"undefined":(0,s.default)(v))!=="object"){var A=f.format("expect request url to be a string or a http request options, but got %j",v);throw new Error(A)}arguments.length===2&&typeof i=="function"&&(L=i,i=null),i=i||{},w>=p&&(w=0);var y=++w;i.requestUrls=i.requestUrls||[];var E={requestId:y,url:v,args:i,ctx:i.ctx};i.emitter&&i.emitter.emit("request",E),i.timeout=i.timeout||k.TIMEOUTS,i.maxRedirects=i.maxRedirects||10,i.streaming=i.streaming||i.customResponse;var b=Date.now(),_;typeof v=="string"?(d.test(v)||(v="http://"+v),_=a.parse(v)):_=v;var I=(i.type||i.method||_.method||"GET").toUpperCase(),j=_.port||80,M=o,G=n(i.agent,k.agent),K=i.fixJSONCtlChars;_.protocol==="https:"&&(M=r,G=n(i.httpsAgent,k.httpsAgent),_.port||(j=443));var H={host:_.hostname||_.host||"localhost",path:_.path||"/",method:I,port:j,agent:G,headers:i.headers||{},lookup:i.lookup};Array.isArray(i.timeout)?H.requestTimeout=i.timeout[i.timeout.length-1]:typeof i.timeout!="undefined"&&(H.requestTimeout=i.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<z.length;B++){var W=z[B];i.hasOwnProperty(W)&&(H[W]=i[W])}H.rejectUnauthorized===!1&&!H.hasOwnProperty("secureOptions")&&(H.secureOptions=N("constants").SSL_OP_NO_TLSv1_2);var F=i.auth||_.auth;F&&(H.auth=F);var $=i.content||i.data,ee=I==="GET"||I==="HEAD"||i.dataAsQueryString;if(!i.content&&($&&!(typeof $=="string"||u.isBuffer($))))if(ee)$=i.nestedQuerystring?qs.stringify($):querystring.stringify($);else{var Z=H.headers["Content-Type"]||H.headers["content-type"];Z||(i.contentType==="json"?Z="application/json":Z="application/x-www-form-urlencoded",H.headers["Content-Type"]=Z),parseContentType(Z).type==="application/json"?$=(0,R.default)($):$=i.nestedQuerystring?qs.stringify($):querystring.stringify($)}ee&&$&&(H.path+=(_.query?"&":"?")+$,$=null);var ve=0;if($){var he=$.length;u.isBuffer($)||(he=u.byteLength($)),ve=H.headers["Content-Length"]=he}i.dataType==="json"&&(H.headers.Accept="application/json"),typeof i.beforeRequest=="function"&&i.beforeRequest(H);var le=null,Re=null,xe=null,ie=!1,se=!1,re=0,be=-1,q=!1,ne="",Te="",ae=null;i.timing&&(ae={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function J(){le&&(clearTimeout(le),le=null)}function X(){Re&&(clearTimeout(Re),Re=null)}function Q(Ce,Ve,tt){if(X(),!L){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),y,P.pid,H.method,v),Ce&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),y,P.pid,Ce.name,Ce.message,Ce.stack);return}var He=L;L=null;var Je={};if(tt&&(be=tt.statusCode,Je=tt.headers),be===401&&Je["www-authenticate"]&&(!i.headers||!i.headers.Authorization)&&i.digestAuth){var _e=Je["www-authenticate"];if(_e.indexOf("Digest ")>=0)return x("Request#%d %s: got digest auth header WWW-Authenticate: %s",y,v,_e),i.headers=i.headers||{},i.headers.Authorization=digestAuthHeader(H.method,H.path,_e,i.digestAuth),x("Request#%d %s: auth with digest header: %s",y,v,i.headers.Authorization),tt.headers["set-cookie"]&&(i.headers.Cookie=tt.headers["set-cookie"].join(";")),k.requestWithCallback(v,i,He)}var Se=Date.now()-b;ae&&(ae.contentDownload=Se),x("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Se,re,be,H.method,H.host,H.path,se,ae);var Oe={status:be,statusCode:be,headers:Je,size:re,aborted:q,rt:Se,keepAliveSocket:se,data:Ve,requestUrls:i.requestUrls,timing:ae,remoteAddress:ne,remotePort:Te};if(Ce){var de="";G&&typeof G.getCurrentStatus=="function"&&(de=", agent status: "+(0,R.default)(G.getCurrentStatus())),Ce.message+=", "+H.method+" "+v+" "+be+" (connected: "+ie+", keepalive socket: "+se+de+`)
headers: `+(0,R.default)(Je),Ce.data=Ve,Ce.path=H.path,Ce.status=be,Ce.headers=Je,Ce.res=Oe}He(Ce,Ve,i.streaming?tt:Oe),i.emitter&&(E.url=v,E.socket=et&&et.connection,E.options=H,E.size=ve,i.emitter.emit("response",{requestId:y,error:Ce,ctx:i.ctx,req:E,res:Oe}))}function pe(Ce){var Ve=null;if(i.followRedirect&&statuses.redirect[Ce.statusCode]){i._followRedirectCount=(i._followRedirectCount||0)+1;var tt=Ce.headers.location;if(!tt)Ve=new Error("Got statusCode "+Ce.statusCode+" but cannot resolve next location from headers"),Ve.name="FollowRedirectError";else if(i._followRedirectCount>i.maxRedirects)Ve=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+v),Ve.name="MaxRedirectError";else{var He=i.formatRedirectUrl?i.formatRedirectUrl(v,tt):a.resolve(v,tt);x("Request#%d %s: `redirected` from %s to %s",y,H.path,v,He),X(),i.headers&&i.headers.Host&&d.test(tt)&&(i.headers.Host=null);var Je=L;return L=null,k.requestWithCallback(He,i,Je),{redirect:!0,error:null}}}return{redirect:!1,error:Ve}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),i.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function ce(Ce,Ve,tt){var He=Ce.headers["content-encoding"];return tt(null,Ve,He)}var we=i.writeStream;x("Request#%d %s %s with headers %j, options.path: %s",y,I,v,H.headers,H.path),i.requestUrls.push(v);function ze(Ce){if(ae&&(ae.waiting=Date.now()-b),x("Request#%d %s `req response` event emit: status %d, headers: %j",y,v,Ce.statusCode,Ce.headers),i.streaming){var Ve=pe(Ce);if(Ve.redirect){Ce.resume();return}return Ve.error?(Ce.resume(),Q(Ve.error,null,Ce)):Q(null,null,Ce)}if(Ce.on("close",function(){x("Request#%d %s: `res close` event emit, total size %d",y,v,re)}),Ce.on("error",function(){x("Request#%d %s: `res error` event emit, total size %d",y,v,re)}),Ce.on("aborted",function(){q=!0,x("Request#%d %s: `res aborted` event emit, total size %d",y,v,re)}),we){var Ve=pe(Ce);if(Ve.redirect){Ce.resume();return}return Ve.error?(Ce.resume(),we.end(),Q(Ve.error,null,Ce)):(i.consumeWriteStream===!1?Ce.on("end",Q.bind(null,null,null,Ce)):isNode010||isNode012?first([[we,"close"],[Ce,"aborted"]],function(Je,_e,Se){x("Request#%d %s: writeStream or res %s event emitted",y,v,Se),Q(xe||null,null,Ce)}):we.on("close",function(){x("Request#%d %s: writeStream close event emitted",y,v),Q(xe||null,null,Ce)}),Ce.pipe(we))}var tt=[];Ce.on("data",function(He){x("Request#%d %s: `res data` event emit, size %d",y,v,He.length),re+=He.length,tt.push(He)}),Ce.on("end",function(){var He=u.concat(tt,re);if(x("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",y,v,re,Ce._dumped),xe)return Q(xe,He,Ce);var Je=pe(Ce);if(Je.error)return Q(Je.error,He,Ce);if(Je.redirect)return;ce(Ce,He,function(_e,Se,Oe){if(_e)return Q(_e,He,Ce);if(!Oe&&c.indexOf(i.dataType)>=0){try{Se=decodeBodyByCharset(Se,Ce)}catch(ye){return x("decodeBodyByCharset error: %s",ye),Q(null,Se,Ce)}if(i.dataType==="json")if(re===0)Se=null;else{var de=parseJSON(Se,K);de.error?_e=de.error:Se=de.data}}q&&x("Request#%d %s: Remote socket was terminated before `response.end()` was called",y,v),Q(_e,Se,Ce)})})}var Ge,Qe;Array.isArray(i.timeout)?(Ge=g(i.timeout[0]),Qe=g(i.timeout[1])):Ge=Qe=g(i.timeout),x("ConnectTimeout: %d, ResponseTimeout: %d",Ge,Qe);function $e(){x("Connect timer ticking, timeout: %d",Ge),le=setTimeout(function(){le=null,be===-1&&(be=-2);var Ce="Connect timeout for "+Ge+"ms",Ve="ConnectionTimeoutError";et.socket||(Ve="SocketAssignTimeoutError",Ce+=", working sockets is full"),xe=new Error(Ce),xe.name=Ve,xe.requestId=y,x("ConnectTimeout: Request#%d %s %s: %s, connected: %s",y,v,xe.name,Ce,ie),Me()},Ge)}function rt(){x("Response timer ticking, timeout: %d",Qe),Re=setTimeout(function(){Re=null;var Ce="Response timeout for "+Qe+"ms",Ve="ResponseTimeoutError";xe=new Error(Ce),xe.name=Ve,xe.requestId=y,x("ResponseTimeout: Request#%d %s %s: %s, connected: %s",y,v,xe.name,Ce,ie),Me()},Qe)}var et;H.mode=i.mode?i.mode:"";try{et=M.request(H,ze)}catch(Ce){return Q(Ce)}typeof window=="undefined"?$e():et.on("requestTimeout",function(){be===-1&&(be=-2);var Ce="Connect timeout for "+Ge+"ms",Ve="ConnectionTimeoutError";xe=new Error(Ce),xe.name=Ve,xe.requestId=y,Me()});function Me(){x("Request#%d %s abort, connected: %s",y,v,ie),et.socket||(xe.noSocket=!0,Q(xe)),et.abort()}return ae&&et.on("finish",function(){ae.requestSent=Date.now()-b}),et.once("socket",function(Ce){ae&&(ae.queuing=Date.now()-b),isNode010&&Ce.socket&&(Ce=Ce.socket);var Ve=Ce.readyState;if(Ve==="opening"){Ce.once("lookup",function(tt,He,Je){x("Request#%d %s lookup: %s, %s, %s",y,v,tt,He,Je),ae&&(ae.dnslookup=Date.now()-b),He&&(ne=He)}),Ce.once("connect",function(){ae&&(ae.connected=Date.now()-b),J(),rt(),x("Request#%d %s new socket connected",y,v),ie=!0,ne||(ne=Ce.remoteAddress),Te=Ce.remotePort});return}x("Request#%d %s reuse socket connected, readyState: %s",y,v,Ve),ie=!0,se=!0,ne||(ne=Ce.remoteAddress),Te=Ce.remotePort,J(),rt()}),et.on("error",function(Ce){(Ce.name==="Error"||Ce.name==="TypeError")&&(Ce.name=ie?"ResponseError":"RequestError"),Ce.message+=' (req "error")',x("Request#%d %s `req error` event emit, %s: %s",y,v,Ce.name,Ce.message),Q(xe||Ce)}),we&&we.once("error",function(Ce){Ce.message+=' (writeStream "error")',xe=Ce,x("Request#%d %s `writeStream error` event emit, %s: %s",y,v,Ce.name,Ce.message),Me()}),i.stream?(i.stream.pipe(et),i.stream.once("error",function(Ce){Ce.message+=' (stream "error")',xe=Ce,x("Request#%d %s `readStream error` event emit, %s: %s",y,v,Ce.name,Ce.message),Me()})):et.end($),et.requestId=y,et}}).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,Y,k){"use strict";k.d(Y,"a",function(){return f});var P=k("q1tI"),u=k("biw7"),C=k("fyJ8");function R(a){var o=a.className,r=a.index,x=a.children,g=a.colSpan,m=a.rowSpan,w=P.useContext(u.a),p=w.prefixCls,d=w.fixedInfoList,n=d[r];return P.createElement(C.a,Object.assign({className:o,index:r,component:"td",prefixCls:p,record:null,dataIndex:null,render:function(){return{children:x,props:{colSpan:g,rowSpan:m}}}},n))}function h(a){return P.createElement("tr",Object.assign({},a))}function s(a){var o=a.children,r=P.useContext(u.a),x=r.prefixCls;return P.createElement("tfoot",{className:"".concat(x,"-summary")},o)}var S=Y.b=s,f={Cell:R,Row:h}},nj2k:function(N,Y,k){N.exports=k.p+"static/nodata.c3b0b86c.svg"},oRuE:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(u,C){var R=C*4,h=R-u.sigBytes%R;u.concat(P.lib.WordArray.random(h-1)).concat(P.lib.WordArray.create([h<<24],1))},unpad:function(u){var C=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=C}},P.pad.Iso10126})},osHv:function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"use strict";var u=P.Pos;function C(d,n){return d.line-n.line||d.ch-n.ch}var R="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",h=R+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",s=new RegExp("<(/?)(["+R+"]["+h+"]*)","g");function S(d,n,l,c){this.line=n,this.ch=l,this.cm=d,this.text=d.getLine(n),this.min=c?Math.max(c.from,d.firstLine()):d.firstLine(),this.max=c?Math.min(c.to-1,d.lastLine()):d.lastLine()}function f(d,n){var l=d.cm.getTokenTypeAt(u(d.line,n));return l&&/\btag\b/.test(l)}function a(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function o(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(a(d))continue;return}if(!f(d,n+1)){d.ch=n+1;continue}var l=d.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(d.text.slice(l+1,n));return d.ch=n+1,c?"selfClose":"regular"}}function x(d){for(;;){var n=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(n==-1){if(o(d))continue;return}if(!f(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 g(d){for(;;){s.lastIndex=d.ch;var n=s.exec(d.text);if(!n){if(a(d))continue;return}if(!f(d,n.index+1)){d.ch=n.index+1;continue}return d.ch=n.index+n[0].length,n}}function m(d){for(;;){var n=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(n==-1){if(o(d))continue;return}if(!f(d,n+1)){d.ch=n;continue}var l=d.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(d.text.slice(l+1,n));return d.ch=n+1,c?"selfClose":"regular"}}function w(d,n){for(var l=[];;){var c=g(d),T,v=d.line,i=d.ch-(c?c[0].length:0);if(!c||!(T=r(d)))return;if(T=="selfClose")continue;if(c[1]){for(var L=l.length-1;L>=0;--L)if(l[L]==c[2]){l.length=L;break}if(L<0&&(!n||n==c[2]))return{tag:c[2],from:u(v,i),to:u(d.line,d.ch)}}else l.push(c[2])}}function p(d,n){for(var l=[];;){var c=m(d);if(!c)return;if(c=="selfClose"){x(d);continue}var T=d.line,v=d.ch,i=x(d);if(!i)return;if(i[1])l.push(i[2]);else{for(var L=l.length-1;L>=0;--L)if(l[L]==i[2]){l.length=L;break}if(L<0&&(!n||n==i[2]))return{tag:i[2],from:u(d.line,d.ch),to:u(T,v)}}}}P.registerHelper("fold","xml",function(d,n){for(var l=new S(d,n.line,0);;){var c=g(l);if(!c||l.line!=n.line)return;var T=r(l);if(!T)return;if(!c[1]&&T!="selfClose"){var v=u(l.line,l.ch),i=w(l,c[2]);return i&&C(i.from,v)>0?{from:v,to:i.from}:null}}}),P.findMatchingTag=function(d,n,l){var c=new S(d,n.line,n.ch,l);if(c.text.indexOf(">")==-1&&c.text.indexOf("<")==-1)return;var T=r(c),v=T&&u(c.line,c.ch),i=T&&x(c);if(!T||!i||C(c,n)>0)return;var L={from:u(c.line,c.ch),to:v,tag:i[2]};return T=="selfClose"?{open:L,close:null,at:"open"}:i[1]?{open:p(c,i[2]),close:L,at:"close"}:(c=new S(d,v.line,v.ch,l),{open:L,close:w(c,i[2]),at:"open"})},P.findEnclosingTag=function(d,n,l,c){for(var T=new S(d,n.line,n.ch,l);;){var v=p(T,c);if(!v)break;var i=new S(d,n.line,n.ch,l),L=w(i,v.tag);if(L)return{open:v,close:L}}},P.scanForClosingTag=function(d,n,l,c){var T=new S(d,n.line,n.ch,c?{from:0,to:c}:null);return w(T,l)}})},p5ED:function(N,Y,k){"use strict";var P=k("+L6B"),u=k("2/Rp"),C=k("5Dmo"),R=k("3S7+"),h=k("k1fw"),s=k("tJVT"),S=k("q1tI"),f=k.n(S),a=k("vHTk"),o=k.n(a),r=k("yEEn"),x=k("ZW9T"),g=k("1vsH");Y.a=function(m){var w=m.name,p=m.data,d=m.theme,n=m.type,l=m.filename,c=m.monacoEditor,T=m.className,v=m.style,i=m.close,L=m.onClose,A=m.hasMask,y=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(s.a)(y,2),b=E[0],_=E[1],I=Object(S.useState)(""),j=Object(s.a)(I,2),M=j[0],G=j[1],K=Object(S.useRef)();l&&(c.filename=l),Object(S.useEffect)(function(){var B,W,F=(B=document.cookie)===null||B===void 0||((W=B.replace(/\s/g,""))===null||W===void 0)?void 0:W.split(";");F==null||F.map(function($){var ee=$.split("=");ee[0]==="_educoder_session"&&G(ee[1])})},[]);var H=function(){if(p.startsWith("http")||p.startsWith("/")){z();return}Object(g.x)(l||"educoder",p,l)},z=function(){Object(g.v)(l||w,p)};return f.a.createElement("div",{style:Object(h.a)({},v||{}),className:"".concat(A&&o.a.bgBlack," ").concat(n?o.a.wrp:"hide")},i&&f.a.createElement("div",{className:o.a.close,ref:K},f.a.createElement(R.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return K.current}},f.a.createElement("span",{onClick:z},f.a.createElement("i",{className:"icon-quxiaozhiding"}))),f.a.createElement(R.a,{title:"\u5173\u95ED",getPopupContainer:function(){return K.current}},f.a.createElement("span",{className:"",onClick:L},f.a.createElement("i",{className:"icon-guanbi1"})))),f.a.createElement("div",{className:"".concat(o.a[T]," ").concat(T," ").concat(o.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&f.a.createElement(x.b,c)),n==="audio"&&f.a.createElement("audio",{src:"".concat(p!=null&&p.startsWith("/")||(p==null?void 0:p.indexOf("https://"))>-1?p:"data:audio/mp3;base64,").concat(p),autoPlay:!0}),n==="video"&&f.a.createElement(f.a.Fragment,null,p!=null&&p.startsWith("/")?f.a.createElement("video",{controls:!0,src:"".concat(p),autoPlay:!0}):f.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(p),autoPlay:!0})),n==="pdf"&&f.a.createElement("embed",{className:o.a.embed,src:p}),n==="image"&&f.a.createElement(f.a.Fragment,null,f.a.createElement("img",{src:"".concat(p!=null&&p.startsWith("/")||(p==null?void 0:p.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(p)})),n==="other"&&f.a.createElement("div",null,f.a.createElement(u.a,{type:"primary",size:"large",onClick:H},f.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&f.a.createElement(u.a,{type:"primary",size:"large",onClick:H},f.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(N,Y,k){},pA7S:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=C.BlockCipher,s=u.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],f=[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],a=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=[{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],x=s.DES=h.extend({_doReset:function(){for(var p=this._key,d=p.words,n=[],l=0;l<56;l++){var c=S[l]-1;n[l]=d[c>>>5]>>>31-c%32&1}for(var T=this._subKeys=[],v=0;v<16;v++){for(var i=T[v]=[],L=a[v],l=0;l<24;l++)i[l/6|0]|=n[(f[l]-1+L)%28]<<31-l%6,i[4+(l/6|0)]|=n[28+(f[l+24]-1+L)%28]<<31-l%6;i[0]=i[0]<<1|i[0]>>>31;for(var l=1;l<7;l++)i[l]=i[l]>>>(l-1)*4+3;i[7]=i[7]<<5|i[7]>>>27}for(var A=this._invSubKeys=[],l=0;l<16;l++)A[l]=T[15-l]},encryptBlock:function(p,d){this._doCryptBlock(p,d,this._subKeys)},decryptBlock:function(p,d){this._doCryptBlock(p,d,this._invSubKeys)},_doCryptBlock:function(p,d,n){this._lBlock=p[d],this._rBlock=p[d+1],g.call(this,4,252645135),g.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),g.call(this,1,1431655765);for(var l=0;l<16;l++){for(var c=n[l],T=this._lBlock,v=this._rBlock,i=0,L=0;L<8;L++)i|=o[L][((v^c[L])&r[L])>>>0];this._lBlock=v,this._rBlock=T^i}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,g.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),p[d]=this._lBlock,p[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(p,d){var n=(this._lBlock>>>p^this._rBlock)&d;this._rBlock^=n,this._lBlock^=n<<p}function m(p,d){var n=(this._rBlock>>>p^this._lBlock)&d;this._lBlock^=n,this._rBlock^=n<<p}u.DES=h._createHelper(x);var w=s.TripleDES=h.extend({_doReset:function(){var p=this._key,d=p.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),c=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=x.createEncryptor(R.create(n)),this._des2=x.createEncryptor(R.create(l)),this._des3=x.createEncryptor(R.create(c))},encryptBlock:function(p,d){this._des1.encryptBlock(p,d),this._des2.decryptBlock(p,d),this._des3.encryptBlock(p,d)},decryptBlock:function(p,d){this._des3.decryptBlock(p,d),this._des2.encryptBlock(p,d),this._des1.decryptBlock(p,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});u.TripleDES=h._createHelper(w)}(),P.TripleDES})},qBft:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(u,C){var R=u.sigBytes,h=C*4,s=h-R%h,S=R+s-1;u.clamp(),u.words[S>>>2]|=s<<24-S%4*8,u.sigBytes+=s},unpad:function(u){var C=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=C}},P.pad.Ansix923})},qM6L:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.enc,s=h.Utf16=h.Utf16BE={stringify:function(f){for(var a=f.words,o=f.sigBytes,r=[],x=0;x<o;x+=2){var g=a[x>>>2]>>>16-x%4*8&65535;r.push(String.fromCharCode(g))}return r.join("")},parse:function(f){for(var a=f.length,o=[],r=0;r<a;r++)o[r>>>1]|=f.charCodeAt(r)<<16-r%2*16;return R.create(o,a*2)}};h.Utf16LE={stringify:function(f){for(var a=f.words,o=f.sigBytes,r=[],x=0;x<o;x+=2){var g=S(a[x>>>2]>>>16-x%4*8&65535);r.push(String.fromCharCode(g))}return r.join("")},parse:function(f){for(var a=f.length,o=[],r=0;r<a;r++)o[r>>>1]|=S(f.charCodeAt(r)<<16-r%2*16);return R.create(o,a*2)}};function S(f){return f<<8&4278255360|f>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(N,Y,k){(function(P,u,C){N.exports=Y=u(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 u=P.lib.BlockCipherMode.extend();function C(s){if((s>>24&255)===255){var S=s>>16&255,f=s>>8&255,a=s&255;S===255?(S=0,f===255?(f=0,a===255?a=0:++a):++f):++S,s=0,s+=S<<16,s+=f<<8,s+=a}else s+=1<<24;return s}function R(s){return(s[0]=C(s[0]))===0&&(s[1]=C(s[1])),s}var h=u.Encryptor=u.extend({processBlock:function(s,S){var f=this._cipher,a=f.blockSize,o=this._iv,r=this._counter;o&&(r=this._counter=o.slice(0),this._iv=void 0),R(r);var x=r.slice(0);f.encryptBlock(x,0);for(var g=0;g<a;g++)s[S+g]^=x[g]}});return u.Decryptor=h,u}(),P.mode.CTRGladman})},"rAM+":function(N,Y,k){"use strict";k.d(Y,"a",function(){return u});var P=k("Qw5x");function u(C,R){var h;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(h=Object(P.a)(C))||R&&C&&typeof C.length=="number"){h&&(C=h);var s=0,S=function(){};return{s:S,n:function(){return s>=C.length?{done:!0}:{done:!1,value:C[s++]}},e:function(x){throw x},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 f=!0,a=!1,o;return{s:function(){h=C[Symbol.iterator]()},n:function(){var x=h.next();return f=x.done,x},e:function(x){a=!0,o=x},f:function(){try{!f&&h.return!=null&&h.return()}finally{if(a)throw o}}}}},rUJ1:function(N,Y){const k=/[&<>"']/,P=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,R={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},h=A=>R[A];function s(A,y){if(y){if(k.test(A))return A.replace(P,h)}else if(u.test(A))return A.replace(C,h);return A}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(A){return A.replace(S,(y,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const a=/(^|[^\[])\^/g;function o(A,y){A=A.source||A,y=y||"";const E={replace:(b,_)=>(_=_.source||_,_=_.replace(a,"$1"),A=A.replace(b,_),E),getRegex:()=>new RegExp(A,y)};return E}const r=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(A,y,E){if(A){let b;try{b=decodeURIComponent(f(E)).replace(r,"").toLowerCase()}catch(_){return null}if(b.indexOf("javascript:")===0||b.indexOf("vbscript:")===0||b.indexOf("data:")===0)return null}y&&!x.test(E)&&(E=n(y,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(b){return null}return E}const m={},w=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(A,y){m[" "+A]||(w.test(A)?m[" "+A]=A+"/":m[" "+A]=v(A,"/",!0)),A=m[" "+A];const E=A.indexOf(":")===-1;return y.substring(0,2)==="//"?E?y:A.replace(p,"$1")+y:y.charAt(0)==="/"?E?y:A.replace(d,"$1")+y:A+y}const l={exec:function(){}};function c(A){let y=1,E,b;for(;y<arguments.length;y++){E=arguments[y];for(b in E)Object.prototype.hasOwnProperty.call(E,b)&&(A[b]=E[b])}return A}function T(A,y){const E=A.replace(/\|/g,(I,j,M)=>{let G=!1,K=j;for(;--K>=0&&M[K]==="\\";)G=!G;return G?"|":" |"}),b=E.split(/ \|/);let _=0;if(b.length>y)b.splice(y);else for(;b.length<y;)b.push("");for(;_<b.length;_++)b[_]=b[_].trim().replace(/\\\|/g,"|");return b}function v(A,y,E){const b=A.length;if(b===0)return"";let _=0;for(;_<b;){const I=A.charAt(b-_-1);if(I===y&&!E)_++;else if(I!==y&&E)_++;else break}return A.substr(0,b-_)}function i(A,y){if(A.indexOf(y[1])===-1)return-1;const E=A.length;let b=0,_=0;for(;_<E;_++)if(A[_]==="\\")_++;else if(A[_]===y[0])b++;else if(A[_]===y[1]&&(b--,b<0))return _;return-1}function L(A){A&&A.sanitize&&!A.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:f,edit:o,cleanUrl:g,resolveUrl:n,noopTest:l,merge:c,splitCells:T,rtrim:v,findClosingBracket:i,checkSanitizeDeprecation:L}},rWjI:function(N,Y,k){"use strict";k.r(Y),k.d(Y,"Types",function(){return Xt});var P=k("P2fV"),u=k("NJEC"),C=k("CiB2"),R=k("DYRE"),h=k("zeV3"),s=k("sRBo"),S=k("kaz8"),f=k("7Kak"),a=k("9yH6"),o=k("giR+"),r=k("fyUT"),x=k("OaEy"),g=k("2fM7"),m=k("oBTY"),w=k("rAM+"),p=k("T2oS"),d=k("W9HT"),n=k("g9YV"),l=k("wCAj"),c=k("+L6B"),T=k("2/Rp"),v=k("14J3"),i=k("BMrR"),L=k("jCWc"),A=k("kPKH"),y=k("miYZ"),E=k("tsqr"),b=k("9og8"),_=k("y8nQ"),I=k("Vl3Y"),j=k("tJVT"),M=k("k1fw"),G=k("fu2T"),K=k("gK9i"),H=k("2qtc"),z=k("kLXV"),B=k("5NDa"),W=k("5rEg"),F=k("WmNS"),$=k.n(F),ee=k("q1tI"),Z=k.n(ee),ve=k("eRFJ"),he=k.n(ve),le=k("jrin"),Re,xe=g.a.Option,ie;(function(pt){pt[pt.language=0]="language",pt[pt.difficulty=1]="difficulty",pt[pt.category=2]="category",pt[pt.openOrNot=3]="openOrNot"})(ie||(ie={}));var se=(Re={},Object(le.a)(Re,ie.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(le.a)(Re,ie.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(le.a)(Re,ie.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(le.a)(Re,ie.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),Re);function re(pt){return se[pt].map(function(Tt){return Z.a.createElement(xe,{key:Tt.title,value:Tt.key}," ",Tt.title," ")})}function be(pt,Tt){pt.map(function(ht){var Tr=ht.id,Rr=ht.name,Pt=ht.sub_disciplines,_t={value:Tr,label:Rr};Tt.push(_t),Pt&&Pt.length>0&&(_t.children=[],be(Pt,_t.children))})}function q(pt,Tt){for(var ht=[],Tr=0;Tr<pt.length;Tr++){var Rr,Pt=pt[Tr];if(((Rr=Pt.sub_disciplines)===null||Rr===void 0?void 0:Rr.length)>0){ht[0]=Pt.id;for(var _t=0;_t<Pt.sub_disciplines.length;_t++){var Lr=Pt.sub_disciplines[_t];if(Lr.id===Tt)return ht[1]=Lr.id,[ht,Lr.tag_disciplines||Lr.sub_disciplines||[]]}}}return[ht,[]]}var ne=k("Ty5D"),Te=k("9kvl"),ae=k("J66h"),J=k("GIiI"),X=k("2BaD"),Q=k("Ot1p"),pe=k("ErOA");function ce(pt){return Object(pe.f)("practices.json",pt)}function we(){return Object(pe.c)("problems/new.json")}function ze(pt){return Object(pe.c)("practices/".concat(pt,"/edit.json"))}function Ge(pt,Tt){return Object(pe.g)("practices/".concat(pt),Tt)}function Qe(pt,Tt){return Object(pe.f)("exercises/".concat(pt,"/exercise_questions.json"),Tt)}function $e(pt,Tt){return Object(pe.g)("exercise_questions/".concat(pt,".json"),Tt)}var rt=k("cDPC"),et=k("bbsP"),Me=k("/wGt"),Ce=k("0Owb"),Ve=k("ZW9T"),tt=k("ZD9Y"),He=k("M8RZ"),Je=k("bCnd"),_e=k("1T2W"),Se=k.n(_e),Oe={theme:Object(Je.a)("cmCodeMode","vs-dark"),fontSize:Object(Je.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Je.a)("cmTabToSpace",!0)},de;(function(pt){pt[pt.set_font_size=0]="set_font_size",pt[pt.set_theme=1]="set_theme",pt[pt.on_tab_to_space=2]="on_tab_to_space",pt[pt.set_show_editor_setting=3]="set_show_editor_setting"})(de||(de={}));function ye(pt,Tt){switch(Tt.type){case de.set_show_editor_setting:return Object(M.a)(Object(M.a)({},pt),{},{showEditorSetting:Tt.payload});case de.set_theme:return Object(M.a)(Object(M.a)({},pt),{},{theme:Tt.payload});case de.set_font_size:return Object(M.a)(Object(M.a)({},pt),{},{fontSize:Tt.payload});case de.on_tab_to_space:return Object(M.a)(Object(M.a)({},pt),{},{tabToSpace:Tt.payload});default:throw new Error}}var Ee=function(pt){var Tt=pt.value,ht=pt.onChange,Tr=pt.language,Rr=pt.onLanguage,Pt=pt.languageItems,_t=pt.ActionBarRender,Lr=_t===void 0?function(sr){return Z.a.createElement(De,{languageItems:Pt,onLanguage:Rr,language:Tr,onShowCodeSetting:sr})}:_t,cn=Object(ee.useReducer)(ye,Oe),Mr=Object(j.a)(cn,2),ot=Mr[0],Ot=Mr[1],lt=ot.theme,un=ot.fontSize,Sn=ot.showEditorSetting,dn=ot.tabToSpace;console.log(Tt,Tr,"value");var jr={onFontSizeChange:function(nr){Ot({type:de.set_font_size,payload:nr}),Object(Je.b)("cmFontSize",nr)},tabToSpace:dn,cmFontSize:un,className:"oj",cmCodeMode:lt,onTabToSpace:function(nr){Ot({type:de.on_tab_to_space,payload:nr}),Object(Je.b)("cmTabToSpace",nr)},onCodeModeChange:function(nr){Ot({type:de.set_theme,payload:nr}),Object(Je.b)("cmCodeMode",nr)}};function wt(){Ot({type:de.set_show_editor_setting,payload:!1})}function fn(){Ot({type:de.set_show_editor_setting,payload:!0})}var Fr={value:Tt,language:Tr,onChange:ht,theme:lt,height:"calc(100% - 56px)",options:{fontSize:un,insertSpaces:dn}};return Z.a.createElement(ee.Fragment,null,Z.a.createElement("div",{className:Se.a["code-panel-container"]},Lr(fn),Z.a.createElement(Ve.b,Object(Ce.a)({key:Tr},Fr))),Z.a.createElement(He.a,null,Z.a.createElement(Me.a,{className:"oj",title:null,placement:"right",closable:!1,visible:Sn,onClose:wt},Z.a.createElement(tt.a,jr))))};function De(pt){var Tt=pt.languageItems,ht=pt.language,Tr=pt.onShowCodeSetting,Rr=pt.onLanguage;return Z.a.createElement("div",{className:Se.a["action-oj-bar"]},Tt==null?void 0:Tt.map(function(Pt){return Z.a.createElement("div",{className:ht===(Pt==null?void 0:Pt.language)?Se.a.active:"",onClick:function(){return Rr(Pt==null?void 0:Pt.language)},key:Pt==null?void 0:Pt.language},Pt==null?void 0:Pt.language)}),Z.a.createElement("a",{onClick:Tr},Z.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Be=k("Znn+"),Xe=k("ZTPi"),nt=k("L9qf"),dt=k.n(nt),Et=function(Tt){var ht=Tt.visible,Tr=Tt.onOK,Rr=Tt.onCancel,Pt=Object(ee.useState)(!1),_t=Object(j.a)(Pt,2),Lr=_t[0],cn=_t[1],Mr=Object(ee.useState)(!1),ot=Object(j.a)(Mr,2),Ot=ot[0],lt=ot[1],un=Object(ee.useState)("1"),Sn=Object(j.a)(un,2),dn=Sn[0],jr=Sn[1],wt=Object(ee.useState)(""),fn=Object(j.a)(wt,2),Fr=fn[0],sr=fn[1],nr=Object(ee.useState)([]),qn=Object(j.a)(nr,2),Rn=qn[0],an=qn[1],ea=function(){var on=Object(b.a)($.a.mark(function Jt(){var zr;return $.a.wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(Fr){kt.next=3;break}return E.b.warn("\u9898\u76EE".concat(vn,"\u4E0D\u80FD\u4E3A\u7A7A")),kt.abrupt("return");case 3:return lt(!0),kt.next=6,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:ht,name:Fr}});case 6:if(zr=kt.sent,!((zr==null?void 0:zr.status)===0)){kt.next=10;break}return Tr(),kt.abrupt("return");case 10:lt(!1);case 11:case"end":return kt.stop()}},Jt)}));return function(){return on.apply(this,arguments)}}(),ta=function(){var on=Object(b.a)($.a.mark(function Jt(){var zr,Gt,kt=arguments;return $.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return zr=kt.length>0&&kt[0]!==void 0?kt[0]:"",cn(!0),hr.next=4,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:ht,search:zr}});case 4:Gt=hr.sent,an(Gt.tag_disciplines||[]),cn(!1);case 7:case"end":return hr.stop()}},Jt)}));return function(){return on.apply(this,arguments)}}(),Cn=function(Jt){var zr=Jt.name;z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:Z.a.createElement("div",null,Z.a.createElement(W.a,{defaultValue:zr,placeholder:"\u8BF7\u8F93\u5165".concat(vn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(kt){zr=kt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Gt=Object(b.a)($.a.mark(function Qt(){var hr;return $.a.wrap(function(Jr){for(;;)switch(Jr.prev=Jr.next){case 0:if(zr){Jr.next=3;break}return E.b.warn("\u9898\u76EE".concat(vn,"\u4E0D\u80FD\u4E3A\u7A7A")),Jr.abrupt("return",Promise.reject());case 3:return Jr.next=5,Object(pe.a)("/api/tag_disciplines/".concat(Jt.id,"/rename.json"),{method:"post",body:{id:Jt.id,name:zr}});case 5:hr=Jr.sent,(hr==null?void 0:hr.status)===0&&ta();case 7:case"end":return Jr.stop()}},Qt)}));function kt(){return Gt.apply(this,arguments)}return kt}()})},Sr=function(Jt){z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:ht==="practice"?Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",Z.a.createElement("span",{className:"c-light-primary"},Jt.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",Z.a.createElement("span",{className:"c-light-primary"},Jt.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.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 zr=Object(b.a)($.a.mark(function kt(){var Qt;return $.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Ir.next=2,Object(pe.a)("/api/tag_disciplines/".concat(Jt.id,".json"),{method:"delete",body:{id:Jt.id}});case 2:Qt=Ir.sent,(Qt==null?void 0:Qt.status)===0&&ta();case 4:case"end":return Ir.stop()}},kt)}));function Gt(){return zr.apply(this,arguments)}return Gt}()})},Ln=function(Jt){ta(Jt)},vn=ht==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return Z.a.createElement(z.a,{afterClose:function(){lt(!1),cn(!1),sr(""),jr("1"),an([])},centered:!0,keyboard:!1,width:600,title:"".concat(vn,"\u7BA1\u7406"),visible:!!ht,className:dt.a.customModal,footer:null,onCancel:Rr},Z.a.createElement("section",{className:dt.a.wrap},Z.a.createElement(Xe.a,{activeKey:dn,onChange:function(Jt){sr(""),jr(Jt),ta()}},Z.a.createElement(Xe.a.TabPane,{tab:"\u65B0\u589E".concat(vn),key:"1"},Z.a.createElement(W.a,{value:Fr,onChange:function(Jt){return sr(Jt.target.value)},className:dt.a.in,placeholder:"\u8F93\u5165".concat(vn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),Z.a.createElement("div",{className:dt.a.btns},Z.a.createElement(T.a,{onClick:Rr,className:"mr20"},"\u53D6\u6D88 "),Z.a.createElement(T.a,{loading:Ot,onClick:ea,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),Z.a.createElement(Xe.a.TabPane,{tab:"\u5DF2\u6709".concat(vn),key:"2"},Z.a.createElement(W.a.Search,{allowClear:!0,onSearch:Ln,value:Fr,onChange:function(Jt){return sr(Jt.target.value)},className:dt.a.in,placeholder:"\u8F93\u5165".concat(vn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),Z.a.createElement(l.a,{dataSource:Rn,bordered:!1,loading:Lr,scroll:Rn.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(vn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(Jt,zr){return Z.a.createElement("span",null,Z.a.createElement("span",{onClick:function(){return Cn(zr)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),Z.a.createElement("span",{onClick:function(){return Sr(zr)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},ft=Et,jt=k("m3rI"),Ct=k("B7Ph"),xt=k("wd/R"),Yt=k.n(xt),$t=k("1vsH"),Vt=k("9Bee"),xr=k("xKgJ"),Lt=W.a.TextArea,Er=z.a.confirm,fr=K.a.Panel,Wt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Xt;(function(pt){pt[pt.SET_INITAL_DATA=0]="SET_INITAL_DATA",pt[pt.SET_LOADING=1]="SET_LOADING",pt[pt.SET_STATUS=2]="SET_STATUS"})(Xt||(Xt={}));var $r="#### \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 Tn(pt,Tt){switch(Tt.type){case Xt.SET_INITAL_DATA:return Object(M.a)(Object(M.a)({},pt),Tt.payload);case Xt.SET_LOADING:return Object(M.a)(Object(M.a)({},pt),{},{loading:Tt.payload});case Xt.SET_STATUS:return Object(M.a)(Object(M.a)({},pt),{},{status:Tt.payload});default:throw new Error}}var wr=Y.default=function(){var pt,Tt,ht,Tr=Object(ne.h)(),Rr=Object(ne.g)(),Pt=Object(ne.i)(),_t=Pt.id,Lr=I.a.useForm(),cn=Object(j.a)(Lr,1),Mr=cn[0],ot=Object(ee.useState)(),Ot=Object(j.a)(ot,2),lt=Ot[0],un=Ot[1],Sn=Object(ee.useState)(!1),dn=Object(j.a)(Sn,2),jr=dn[0],wt=dn[1],fn=Object(ee.useState)([]),Fr=Object(j.a)(fn,2),sr=Fr[0],nr=Fr[1],qn=Object(ee.useState)([]),Rn=Object(j.a)(qn,2),an=Rn[0],ea=Rn[1],ta=Object(ee.useState)([]),Cn=Object(j.a)(ta,2),Sr=Cn[0],Ln=Cn[1],vn=Object(ee.useState)([]),on=Object(j.a)(vn,2),Jt=on[0],zr=on[1],Gt=Object(ee.useState)([]),kt=Object(j.a)(Gt,2),Qt=kt[0],hr=kt[1],Ir=Object(ee.useState)("C"),Jr=Object(j.a)(Ir,2),Mn=Jr[0],Ba=Jr[1],wa=Object(ee.useReducer)(Tn,Wt),Ma=Object(j.a)(wa,2),ia=Ma[0],en=Ma[1],Pa=ia.loading,Hr=ia.data,Wn=ia.user,jn=ia.status,Gr=Hr==null?void 0:Hr.hack_sets,_n=Hr==null||((pt=Hr.hack)===null||pt===void 0)?void 0:pt.test_set_average,ka=Object(ee.useState)(!1),ga=Object(j.a)(ka,2),ua=ga[0],Va=ga[1],Ca=Object(ee.useRef)([]),Rt=Object(ee.useState)(!1),Kt=Object(j.a)(Rt,2),Bt=Kt[0],pr=Kt[1],mr=Object(ee.useState)(!1),Pr=Object(j.a)(mr,2),Xr=Pr[0],Br=Pr[1],tn=Object(ee.useRef)(!0),Hn=Object(ee.useState)({}),Cr=Object(j.a)(Hn,2),ur=Cr[0],yn=Cr[1];Object(ee.useEffect)(function(){return Object(Te.d)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Te.d)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Te.d)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Te.d)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(ee.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var ca=function(){var Ut=Object(b.a)($.a.mark(function bt(){var zt,Zt;return $.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return zt=ir.sent,ir.next=5,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:Zt=ir.sent,ea(zt.tag_disciplines||[]),Ln(Zt.tag_disciplines||[]);case 8:case"end":return ir.stop()}},bt)}));return function(){return Ut.apply(this,arguments)}}(),Kn=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Ta=Object(ee.useCallback)(Object(b.a)($.a.mark(function Ut(){var bt,zt,Zt,kr,ir,hn,rn,va,On,Pn,Un,Ua,Le,Ue,Ke,Pe,fe,Ae,ge,ke,Ne,We,Fe,Ye,at,ct,ut;return $.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(en({type:Xt.SET_LOADING,payload:!0}),!_t){Mt.next=19;break}return Mt.next=4,ze(_t);case 4:bt=Mt.sent,zt=bt.user,Zt=bt.language,kr=bt.practice_sets,ir=bt.practice_codes,hn=bt.description,rn=bt.difficulty,va=bt.name,On=bt.open_or_not,Pn=bt.time_limit,Un=bt.test_set_average,Ua=bt.test_set_score,Le=bt.status,Ue=bt.tag_discipline_ids,Ke=bt.source_discipline_ids,Pe=bt.item_banks_group_id,fe=bt.is_file,Ae=fe===void 0?!1:fe,ge=bt.hide_actual_output,ke=bt.review_privilege,Ne=bt.review_description,We={review_privilege:ke,status:Le,review_description:Ne,name:va},yn(We),Va(ge),Fe=Ae?[{input:"",output:"",score:100,position:1}]:kr,Ae?(nr(kr),Mr.setFieldsValue({hack_sets:Fe})):nr([]),Ye={loading:!0,user:zt,status:Le,data:{hack:{difficulty:rn,name:va,description:hn,open_or_not:On,time_limit:Pn,test_set_average:Un,test_set_score:Ua,tag_discipline_ids:Ue,source_discipline_ids:Ke,is_file:Ae},hack_sets:Fe}},en({type:Xt.SET_INITAL_DATA,payload:Ye}),un({hack:{difficulty:rn,name:va,description:hn,open_or_not:On,time_limit:Pn,test_set_average:Un,test_set_score:Ua,tag_discipline_ids:Ue,source_discipline_ids:Ke,is_file:Ae}}),at=ir==null?void 0:ir.map(function(qt){return Object(M.a)(Object(M.a)({},qt),{},{code:ae.Base64.decode(qt==null?void 0:qt.code)})}),hr(at),Ca.current=at,Mt.next=27;break;case 19:return Mt.next=21,we();case 21:ct=Mt.sent,ut=ct.user,en({type:Xt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:ut,data:{hack:{difficulty:"",time_limit:3,description:$r,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),un({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),hr(Kn),Ca.current=Kn;case 27:en({type:Xt.SET_LOADING,payload:!1});case 28:case"end":return Mt.stop()}},Ut)})),[_t]);Object(ee.useEffect)(function(){try{Ta(),ca()}catch(Ut){console.log(Ut,"----")}},[]);function Ya(Ut,bt){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(b.a)($.a.mark(function Ut(bt,zt){var Zt,kr,ir,hn,rn,va,On,Pn,Un,Ua,Le,Ue,Ke,Pe,fe,Ae,ge,ke;return $.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:kr=Object(M.a)({},bt),ir=kr.hack_sets,hn=kr.hack,hn.hide_actual_output=ua,rn=[],va=[],On=0,Pn=hn!=null&&hn.is_file?sr.map(function(Fe,Ye){return Object(M.a)(Object(M.a)({},Fe),{},{position:Ye+1})}):ir.map(function(Fe){return Object(M.a)(Object(M.a)({},Fe),{},{is_file:!1})}),Un=Object(w.a)(Pn);try{for(Un.s();!(Ua=Un.n()).done;)Le=Ua.value,On+=Le.score,Le.id&&Le.id>=0?rn.push(Le):va.push(Le)}catch(Fe){Un.e(Fe)}finally{Un.f()}if(Pn!=null&&Pn.length){We.next=11;break}return E.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 11:if(!(On!==100&&!hn.test_set_score)){We.next=14;break}return E.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),We.abrupt("return");case 14:if(!(Pn!=null&&Pn.some(function(Fe){return!Fe.output}))){We.next=17;break}return E.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 17:if(tn.current?pr(!0):Br(!0),Ke=Qt==null?void 0:Qt.map(function(Fe){return Object(M.a)(Object(M.a)({},Fe),{},{code:ae.Base64.encode(Fe==null?void 0:Fe.code)})}),!_t){We.next=25;break}return We.next=22,Ge(_t,{practice:hn,practice_codes:Ke,practice_sets:va,update_practice_sets:rn});case 22:Ue=We.sent,We.next=28;break;case 25:return We.next=27,ce({practice:hn,practice_codes:Ke,practice_sets:Pn,publish:!tn.current});case 27:Ue=We.sent;case 28:if(pr(!1),Br(!1),!(((Zt=Ue)===null||Zt===void 0?void 0:Zt.status)===0)){We.next=46;break}if(!((Pe=Ue)!==null&&Pe!==void 0&&(fe=Pe.similar_practice)!==null&&fe!==void 0&&fe.length)){We.next=35;break}return wt(!0),zr((Ae=Ue)===null||Ae===void 0?void 0:Ae.similar_practice),We.abrupt("return");case 35:if(!_t){We.next=44;break}if(E.b.success("\u4FDD\u5B58\u6210\u529F"),tn.current){We.next=42;break}return We.next=40,Object(pe.a)("/api/practices/".concat(_t,"/start"),{method:"get"});case 40:ge=We.sent,(ge==null?void 0:ge.status)===0&&Rr.push("/problems/".concat(ge==null?void 0:ge.identifier,"/oj/").concat(_t));case 42:We.next=46;break;case 44:E.b.success("\u65B0\u5EFA\u6210\u529F"),Rr.replace("/problems/".concat((ke=Ue)===null||ke===void 0?void 0:ke.identifier,"/ojedit"));case 46:case"end":return We.stop()}},Ut)})),Wa.apply(this,arguments)}function hi(){Rr.replace("/problems")}var Ha=function(bt){var zt=Math.floor(100/bt.length),Zt=zt+100%bt.length;bt=bt.map(function(kr,ir){return ir===bt.length-1?Object(M.a)(Object(M.a)({},kr),{},{score:Zt}):Object(M.a)(Object(M.a)({},kr),{},{score:zt})}),nr(bt)};function Ci(Ut){Ut.target.value||Ha(sr),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack:Object(M.a)(Object(M.a)({},Hr.hack),{},{test_set_score:Ut.target.value})})}})}function ni(Ut){en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack:Object(M.a)(Object(M.a)({},Hr.hack),{},{is_file:Ut.target.value})})}})}function ai(Ut){Va(Ut.target.checked)}function pi(Ut){var bt=Ut.target.value;bt&&Ha(sr),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack:Object(M.a)(Object(M.a)({},Hr.hack),{},{test_set_average:bt})})}})}function _a(){var Ut=Mr.getFieldValue("hack_sets"),bt=Ut.length+1,zt=Math.floor(100/bt),Zt=100%bt;Ut.map(function(kr,ir){return _n&&(kr.score=zt),kr.position=ir+1,kr}),Ut.push({input:"",output:"",position:bt,score:_n?zt+Zt:0}),Mr.setFieldsValue({hack_sets:Ut}),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack_sets:Ut})}})}Object(ee.useEffect)(function(){if(_n){var Ut=Gr==null?void 0:Gr.length,bt=Math.floor(100/Ut),zt=100%Ut;Gr==null||Gr.map(function(Zt,kr){return Zt.score=bt,Zt.position=kr+1,kr===Ut-1&&(Zt.score=bt+zt),Zt}),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack_sets:Gr})}}),Mr.setFieldsValue({hack_sets:Gr})}},[_n]);function Ia(Ut){var bt=Mr.getFieldValue("hack_sets"),zt=(bt==null?void 0:bt.length)-1,Zt=Math.ceil(100/zt),kr=100%zt;bt.splice(Ut,1),bt==null||bt.map(function(ir,hn){return _n&&(ir.score=Zt,hn===zt-1&&(ir.score=Zt+kr)),ir.position=hn+1,ir}),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack_sets:bt})}}),Mr.setFieldsValue({hack_sets:bt})}function _i(Ut){Ba(Ut)}var ii=function(bt){var zt,Zt=(zt=Ca.current)===null||zt===void 0?void 0:zt.findIndex(function(kr){return kr.language===Mn});Ca.current[Zt].code=bt,hr(Ca.current)},_r=function(bt){un(Object(M.a)({},Mr.getFieldsValue()))},cr=function(){var Ut=Object(b.a)($.a.mark(function bt(zt){var Zt;return $.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(pe.a)("/api/practices/".concat(zt,"/start"),{method:"get"});case 2:Zt=ir.sent,(Zt==null?void 0:Zt.status)===0&&Object($t.Q)("/problems/".concat(Zt==null?void 0:Zt.identifier,"/oj/").concat(zt));case 4:case"end":return ir.stop()}},bt)}));return function(zt){return Ut.apply(this,arguments)}}(),ar=function(){var Ut=Object(b.a)($.a.mark(function bt(){var zt,Zt,kr,ir,hn,rn;return $.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,ze(_t);case 2:zt=On.sent,Zt=zt.name,kr=zt.status,ir=zt.review_privilege,hn=zt.review_description,rn={review_privilege:ir,status:kr,review_description:hn,name:Zt},yn(rn);case 6:case"end":return On.stop()}},bt)}));return function(){return Ut.apply(this,arguments)}}(),Jn=function(){var bt="";z.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Z.a.createElement("div",{className:"mt20"},Z.a.createElement(Q.a,{className:he.a.MdEditor,defaultValue:bt,onChange:function(Zt){bt=Zt}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var zt=Object(b.a)($.a.mark(function kr(){var ir;return $.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(bt){rn.next=3;break}return E.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),rn.abrupt("return",Promise.reject());case 3:return rn.next=5,Object(pe.a)("/api/practices/".concat(_t,"/review.json"),{method:"post",body:{op:"fail",description:bt}});case 5:ir=rn.sent,(ir==null?void 0:ir.status)===0&&(E.b.success("\u63D0\u4EA4\u6210\u529F"),ar());case 7:case"end":return rn.stop()}},kr)}));function Zt(){return zt.apply(this,arguments)}return Zt}()})},Na=function(){var Ut=Object(b.a)($.a.mark(function bt(){return $.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(ur==null?void 0:ur.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kr=Object(b.a)($.a.mark(function hn(){var rn;return $.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(pe.a)("/api/practices/".concat(_t,"/review.json"),{method:"post",body:{op:"pass"}});case 2:rn=On.sent,(rn==null?void 0:rn.status)===0&&(E.b.success("\u63D0\u4EA4\u6210\u529F"),ar());case 4:case"end":return On.stop()}},hn)}));function ir(){return kr.apply(this,arguments)}return ir}()});case 1:case"end":return Zt.stop()}},bt)}));return function(){return Ut.apply(this,arguments)}}(),ja=function(){var bt=z.a.confirm({icon:null,width:700,className:"".concat(he.a.cusModal," custom-modal-divider"),centered:!0,title:Z.a.createElement(i.a,null,Z.a.createElement(A.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Z.a.createElement(A.a,null,Z.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return bt.destroy()}}))),content:Z.a.createElement("div",null,Z.a.createElement(Vt.a,{className:"mt20",value:(ur==null?void 0:ur.review_description)||""}))})};return Z.a.createElement(d.a,{spinning:Pa,size:"large",className:he.a["oj-custom-large-spin"]},Hr?Z.a.createElement(ee.Fragment,null,Z.a.createElement("header",{className:he.a.header},Z.a.createElement("div",null,Z.a.createElement("img",{src:"".concat(jt.a.IMG_SERVER,"/images/").concat(Wn==null?void 0:Wn.image_url),alt:"user",width:30}),Z.a.createElement("span",null,Wn==null?void 0:Wn.name)),Z.a.createElement("h2",null," ",Hr==null||((Tt=Hr.hack)===null||Tt===void 0)?void 0:Tt.name," "),_t?Z.a.createElement("a",{className:he.a.btn_back,onClick:hi}," ",Z.a.createElement(J.a,null),"\u9000\u51FA"):null),Z.a.createElement(I.a,{form:Mr,initialValues:Hr,layout:"vertical",className:he.a["oj-form-container"],onValuesChange:_r,onFinish:Ya},Z.a.createElement(rt.a,{hideResize:!0,className:he.a["oj-problems"],leftChild:Z.a.createElement(aa,{formValue:lt,onRemoveTestCase:Ia,onAddTestCase:_a,hack:Hr.hack,onChangeScore:Ci,onChangehide:ai,onChangeAverage:pi,onChangeFile:ni,uploadData:sr,setUploadData:nr,handleUploadRatio:Ha,ischecked:ua,pointData:an,sourceData:Sr,getPointData:ca}),rightChild:Z.a.createElement(Ee,{value:Qt==null||((ht=Qt.find(function(Ut){return Ut.language===Mn}))===null||ht===void 0)?void 0:ht.code,onChange:ii,onLanguage:_i,languageItems:Qt,language:Mn})}),Z.a.createElement("div",{className:he.a.footer},!!_t&&Z.a.createElement("div",{className:he.a.result},Z.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),ur!=null&&ur.review_privilege?Z.a.createElement(Z.a.Fragment,null,Z.a.createElement("div",{onClick:Na,className:he.a.pass},"\u901A\u8FC7"),Z.a.createElement("div",{onClick:Jn,className:he.a.noPass},"\u4E0D\u901A\u8FC7")):Z.a.createElement(Z.a.Fragment,null,(ur==null?void 0:ur.status)===0&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(ur==null?void 0:ur.status)===1&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(ur==null?void 0:ur.status)===2&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(ur==null?void 0:ur.status)===3&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(ur==null?void 0:ur.status)===4&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(ur==null?void 0:ur.status)===5&&Z.a.createElement("div",{className:he.a.noPassText},Z.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Z.a.createElement("span",{onClick:ja},"\u67E5\u770B\u539F\u56E0")))),Z.a.createElement(T.a,{type:"primary",ghost:!0,onClick:hi},"\u9000\u51FA\u7F16\u8F91"),Z.a.createElement(T.a,{disabled:Xr,loading:Bt,type:"primary",onClick:function(){tn.current=!0,Mr.submit()}},"\u4FDD\u5B58 "),_t?Z.a.createElement(T.a,{disabled:Bt,loading:Xr,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){tn.current=!1,Mr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Z.a.createElement(T.a,{disabled:Bt,loading:Xr,type:"primary",onClick:function(){tn.current=!1,Mr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Z.a.createElement(z.a,{centered:!0,destroyOnClose:!0,footer:null,visible:jr,onCancel:function(){return wt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Z.a.createElement("div",null,Z.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"),Z.a.createElement(l.a,{dataSource:Jt,bordered:!1,scroll:Jt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(bt,zt){return Z.a.createElement("span",{onClick:function(){return cr(zt==null?void 0:zt.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},bt)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(bt){var zt;return(zt=Yt()(bt))===null||zt===void 0?void 0:zt.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function aa(pt){var Tt,ht,Tr=pt.ischecked,Rr=pt.formValue,Pt=pt.hack,_t=pt.onChangeAverage,Lr=pt.onChangeScore,cn=pt.onChangehide,Mr=pt.onChangeFile,ot=pt.onAddTestCase,Ot=pt.onRemoveTestCase,lt=pt.uploadData,un=pt.setUploadData,Sn=pt.handleUploadRatio,dn=pt.pointData,jr=pt.sourceData,wt=pt.getPointData,fn=Pt.test_set_average,Fr=Pt.test_set_score,sr=Object(ee.useState)(!1),nr=Object(j.a)(sr,2),qn=nr[0],Rn=nr[1],an=Object(ee.useState)(!1),ea=Object(j.a)(an,2),ta=ea[0],Cn=ea[1],Sr=function(kt,Qt){var hr=Object(m.a)(lt);hr.splice(Qt,1),fn?Sn(hr):un(hr)},Ln=function(kt,Qt){console.log(kt,Qt);var hr=lt.map(function(Ir,Jr){return Jr===Qt?Object(M.a)(Object(M.a)({},Ir),{},{score:kt.target.value?Number(kt.target.value):0}):Ir});un(hr)},vn=function(kt){var Qt=lt.concat(kt);Pt.test_set_average?Sn(Qt):un(Qt)};function on(Gt){Gt.stopPropagation()}function Jt(){if(Object(xr.u)()){Cn("practice");return}var Gt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Z.a.createElement("div",null,Z.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Qt){Gt=Qt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kt=Object(b.a)($.a.mark(function hr(){var Ir;return $.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:Gt}});case 2:Ir=Mn.sent,(Ir==null?void 0:Ir.status)===0&&wt();case 4:case"end":return Mn.stop()}},hr)}));function Qt(){return kt.apply(this,arguments)}return Qt}()})}function zr(){if(Object(xr.u)()){Cn("practice_source");return}var Gt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Z.a.createElement("div",null,Z.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Qt){Gt=Qt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kt=Object(b.a)($.a.mark(function hr(){var Ir;return $.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:Gt}});case 2:Ir=Mn.sent,(Ir==null?void 0:Ir.status)===0&&wt();case 4:case"end":return Mn.stop()}},hr)}));function Qt(){return kt.apply(this,arguments)}return Qt}()})}return Z.a.createElement("div",{className:he.a["oj-left-panel"]},Z.a.createElement("div",{className:he.a["oj-form-info"]},Z.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:he.a.inputOne},Z.a.createElement(W.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Z.a.createElement("span",null,(Rr==null||((Tt=Rr.hack)===null||Tt===void 0||((ht=Tt.name)===null||ht===void 0))?void 0:ht.length)||0,"/",Z.a.createElement("span",{className:"c-grey-999"},"60"))})),Z.a.createElement(I.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Z.a.createElement(Q.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.a},Z.a.createElement(I.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Z.a.createElement(g.a,null,re(ie.difficulty)))),Z.a.createElement("div",{className:he.a.b},Z.a.createElement(I.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Z.a.createElement(g.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(kt){return kt.parentNode}},jr.map(function(Gt){return Z.a.createElement(g.a.Option,{key:Gt.id,value:Gt.id},Gt.name)}))),Z.a.createElement(T.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return zr()}},Object(xr.u)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.b,style:{width:"100%",marginLeft:0}},Z.a.createElement(I.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Z.a.createElement(g.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(kt){return kt.parentNode}},dn.map(function(Gt){return Z.a.createElement(g.a.Option,{key:Gt.id,value:Gt.id},Gt.name)}))),Z.a.createElement(T.a,{type:"primary",ghost:!0,onClick:function(){return Jt()}},Object(xr.u)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Z.a.createElement("div",{className:he.a.field},Z.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:he.a.inputTwo,extra:Z.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Z.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Z.a.createElement(r.a,{style:{width:185},min:3}))),Z.a.createElement("div",{className:"tst-case-info"},Z.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Pt.is_file&&Z.a.createElement(T.a,{style:{height:40},type:"primary",ghost:!0,onClick:ot},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Z.a.createElement(I.a.Item,{name:["hack","test_set_score"]},Z.a.createElement(a.a.Group,{onChange:Lr},Z.a.createElement(a.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Z.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")),Z.a.createElement(a.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Z.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")))),Z.a.createElement(S.a,{style:{marginBottom:"5px"},checked:Tr,onChange:cn},"\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"),Z.a.createElement(I.a.Item,{className:he.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Z.a.createElement(a.a.Group,{onChange:Mr},Z.a.createElement(h.a,{direction:"horizontal"},Z.a.createElement(a.a,{value:!1},"\u6587\u672C"),Z.a.createElement(a.a,{value:!0},"\u6587\u4EF6")))),!Pt.test_set_score&&Z.a.createElement(I.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Z.a.createElement(a.a.Group,{onChange:_t},Z.a.createElement(a.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Z.a.createElement(a.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Pt.is_file&&Z.a.createElement("div",{className:he.a.upBtn},Z.a.createElement(T.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Rn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Z.a.createElement(Ct.a,{disabled:Pt==null?void 0:Pt.test_set_average,inputChange:Ln,showScore:!Pt.test_set_score,data:lt,onRemove:Sr})),!Pt.is_file&&Z.a.createElement(I.a.List,{name:"hack_sets"},function(Gt,kt){return Object(C.a)(kt),Z.a.createElement(K.a,{accordion:!0},Gt.map(function(Qt,hr){return Z.a.createElement(fr,{key:"".concat(Qt.key,"--").concat(hr),header:Z.a.createElement("a",{className:he.a["test-case-name"]},Z.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",hr+1),Fr?null:Z.a.createElement(Z.a.Fragment,null,Z.a.createElement(I.a.Item,{name:[Qt.name,"score"],fieldKey:[Qt.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(hr+1,"\u8BC4\u5206")}]},Z.a.createElement(r.a,{onClick:on,min:0,max:100,disabled:fn})),Z.a.createElement("span",null,"%"))),extra:hr>0?Z.a.createElement("div",{onClick:on},Z.a.createElement(u.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(hr+1),onConfirm:function(){Ot(hr)}},Z.a.createElement(X.a,{className:he.a["btn-remove-case"]}))):null},Z.a.createElement(I.a.Item,{label:"\u8F93\u5165",name:[Qt.name,"input"],fieldKey:[Qt.fieldKey,"input"]},Z.a.createElement(Lt,null)),Z.a.createElement(I.a.Item,{label:"\u8F93\u51FA",name:[Qt.name,"output"],fieldKey:[Qt.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Z.a.createElement(Lt,null)))}))}))),Z.a.createElement(Ct.b,{rootIdentifier:null,visible:qn,onClose:function(){return Rn(!1)},onOK:vn}),Z.a.createElement(ft,{visible:ta,onCancel:function(){Cn(!1),wt()},onOK:function(){Cn(!1),wt()}}))}},rdUC:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"localStorage",read:R,write:h,each:s,remove:S,clearAll:f};function C(){return u.localStorage}function R(a){return C().getItem(a)}function h(a,o){return C().setItem(a,o)}function s(a){for(var o=C().length-1;o>=0;o--){var r=C().key(o);a(R(r),r)}}function S(a){return C().removeItem(a)}function f(){return C().clear()}},sR1s:function(N,Y,k){"use strict";k.d(Y,"b",function(){return R}),k.d(Y,"a",function(){return h}),k.d(Y,"c",function(){return s}),k.d(Y,"d",function(){return S});var P=k("U8pU"),u="RC_TABLE_KEY";function C(f){return f==null?[]:Array.isArray(f)?f:[f]}function R(f,a){if(!a&&typeof a!="number")return f;for(var o=C(a),r=f,x=0;x<o.length;x+=1){if(!r)return null;var g=o[x];r=r[g]}return r}function h(f){var a=[],o={};return f.forEach(function(r){for(var x=r||{},g=x.key,m=x.dataIndex,w=g||C(m).join("-")||u;o[w];)w="".concat(w,"_next");o[w]=!0,a.push(w)}),a}function s(){var f={};function a(g,m){m&&Object.keys(m).forEach(function(w){var p=m[w];p&&Object(P.a)(p)==="object"?(g[w]=g[w]||{},a(g[w],p)):g[w]=p})}for(var o=arguments.length,r=new Array(o),x=0;x<o;x++)r[x]=arguments[x];return r.forEach(function(g){a(f,g)}),f}function S(f){return f!=null}},sboe:function(N,Y,k){"use strict";k.d(Y,"a",function(){return C});var P=k("q1tI"),u=k.n(P),C=P.createContext(null)},t23M:function(N,Y,k){"use strict";var P=k("VTBJ"),u=k("1OyB"),C=k("vuIU"),R=k("Ji7U"),h=k("LK+K"),s=k("q1tI"),S=k.n(s),f=k("m+aA"),a=k("Zm9Q"),o=k("Kwbf"),r=k("c+Xe"),x=k("bdgK"),g="rc-observer-key",m=function(w){Object(R.a)(d,w);var p=Object(h.a)(d);function d(){var n;return Object(u.a)(this,d),n=p.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 c=n.props.onResize,T=l[0].target,v=T.getBoundingClientRect(),i=v.width,L=v.height,A=T.offsetWidth,y=T.offsetHeight,E=Math.floor(i),b=Math.floor(L);if(n.state.width!==E||n.state.height!==b||n.state.offsetWidth!==A||n.state.offsetHeight!==y){var _={width:E,height:b,offsetWidth:A,offsetHeight:y};n.setState(_),c&&Promise.resolve().then(function(){c(Object(P.a)(Object(P.a)({},_),{},{offsetWidth:A,offsetHeight:y}))})}},n.setChildNode=function(l){n.childNode=l},n}return Object(C.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 c=Object(f.a)(this.childNode||this),T=c!==this.currentElement;T&&(this.destroyObserver(),this.currentElement=c),!this.resizeObserver&&c&&(this.resizeObserver=new x.default(this.onResize),this.resizeObserver.observe(c))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,c=Object(a.a)(l);if(c.length>1)Object(o.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(c.length===0)return Object(o.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=c[0];if(s.isValidElement(T)&&Object(r.c)(T)){var v=T.ref;c[0]=s.cloneElement(T,{ref:Object(r.a)(v,this.setChildNode)})}return c.length===1?c[0]:c.map(function(i,L){return!s.isValidElement(i)||"key"in i&&i.key!==null?i:s.cloneElement(i,{key:"".concat(g,"-").concat(L)})})}}]),d}(s.Component);m.displayName="ResizeObserver",Y.a=m},uGsb:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("MlIO"),k("1uat"))})(this,function(P){return function(){var u=P,C=u.x64,R=C.Word,h=C.WordArray,s=u.algo,S=s.SHA512,f=s.SHA384=S.extend({_doReset:function(){this._hash=new h.init([new R.init(3418070365,3238371032),new R.init(1654270250,914150663),new R.init(2438529370,812702999),new R.init(355462360,4144912697),new R.init(1731405415,4290775857),new R.init(2394180231,1750603025),new R.init(3675008525,1694076839),new R.init(1203062813,3204075428)])},_doFinalize:function(){var a=S._doFinalize.call(this);return a.sigBytes-=16,a}});u.SHA384=S._createHelper(f),u.HmacSHA384=S._createHmacHelper(f)}(),P.SHA384})},uGxW:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uQRt:function(N,Y,k){N.exports=P;function P(){return k("gaXo"),{}}},ulZh:function(N,Y,k){typeof window!="undefined"&&function(u,C){N.exports=C()}(this,function(){return function(P){var u={};function C(R){if(u[R])return u[R].exports;var h=u[R]={i:R,l:!1,exports:{}};return P[R].call(h.exports,h,h.exports,C),h.l=!0,h.exports}return C.m=P,C.c=u,C.d=function(R,h,s){C.o(R,h)||Object.defineProperty(R,h,{enumerable:!0,get:s})},C.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})},C.t=function(R,h){if(h&1&&(R=C(R)),h&8)return R;if(h&4&&typeof R=="object"&&R&&R.__esModule)return R;var s=Object.create(null);if(C.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:R}),h&2&&typeof R!="string")for(var S in R)C.d(s,S,function(f){return R[f]}.bind(null,S));return s},C.n=function(R){var h=R&&R.__esModule?function(){return R.default}:function(){return R};return C.d(h,"a",h),h},C.o=function(R,h){return Object.prototype.hasOwnProperty.call(R,h)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,u,C){"use strict";var R=Object.prototype.hasOwnProperty,h="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(h=!1));function S(r,x,g){this.fn=r,this.context=x,this.once=g||!1}function f(r,x,g,m,w){if(typeof g!="function")throw new TypeError("The listener must be a function");var p=new S(g,m||r,w),d=h?h+x:x;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],p]:r._events[d].push(p):(r._events[d]=p,r._eventsCount++),r}function a(r,x){--r._eventsCount===0?r._events=new s:delete r._events[x]}function o(){this._events=new s,this._eventsCount=0}o.prototype.eventNames=function(){var x=[],g,m;if(this._eventsCount===0)return x;for(m in g=this._events)R.call(g,m)&&x.push(h?m.slice(1):m);return Object.getOwnPropertySymbols?x.concat(Object.getOwnPropertySymbols(g)):x},o.prototype.listeners=function(x){var g=h?h+x:x,m=this._events[g];if(!m)return[];if(m.fn)return[m.fn];for(var w=0,p=m.length,d=new Array(p);w<p;w++)d[w]=m[w].fn;return d},o.prototype.listenerCount=function(x){var g=h?h+x:x,m=this._events[g];return m?m.fn?1:m.length:0},o.prototype.emit=function(x,g,m,w,p,d){var n=h?h+x:x;if(!this._events[n])return!1;var l=this._events[n],c=arguments.length,T,v;if(l.fn){l.once&&this.removeListener(x,l.fn,void 0,!0);switch(c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,g),!0;case 3:return l.fn.call(l.context,g,m),!0;case 4:return l.fn.call(l.context,g,m,w),!0;case 5:return l.fn.call(l.context,g,m,w,p),!0;case 6:return l.fn.call(l.context,g,m,w,p,d),!0}for(v=1,T=new Array(c-1);v<c;v++)T[v-1]=arguments[v];l.fn.apply(l.context,T)}else{var i=l.length,L;for(v=0;v<i;v++){l[v].once&&this.removeListener(x,l[v].fn,void 0,!0);switch(c){case 1:l[v].fn.call(l[v].context);break;case 2:l[v].fn.call(l[v].context,g);break;case 3:l[v].fn.call(l[v].context,g,m);break;case 4:l[v].fn.call(l[v].context,g,m,w);break;default:if(!T)for(L=1,T=new Array(c-1);L<c;L++)T[L-1]=arguments[L];l[v].fn.apply(l[v].context,T)}}}return!0},o.prototype.on=function(x,g,m){return f(this,x,g,m,!1)},o.prototype.once=function(x,g,m){return f(this,x,g,m,!0)},o.prototype.removeListener=function(x,g,m,w){var p=h?h+x:x;if(!this._events[p])return this;if(!g)return a(this,p),this;var d=this._events[p];if(d.fn)d.fn===g&&(!w||d.once)&&(!m||d.context===m)&&a(this,p);else{for(var n=0,l=[],c=d.length;n<c;n++)(d[n].fn!==g||w&&!d[n].once||m&&d[n].context!==m)&&l.push(d[n]);l.length?this._events[p]=l.length===1?l[0]:l:a(this,p)}return this},o.prototype.removeAllListeners=function(x){var g;return x?(g=h?h+x:x,this._events[g]&&a(this,g)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=h,o.EventEmitter=o,P.exports=o},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,u,C){(function(R){var h=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,s=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(o,r,x){if(x=x||{},o=o.trim(),r=r.trim(),!r){if(!x.alwaysNormalize)return o;var g=a.parseURL(o);if(!g)throw new Error("Error trying to parse base URL.");return g.path=a.normalizePath(g.path),a.buildURLFromParts(g)}var m=a.parseURL(r);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return x.alwaysNormalize?(m.path=a.normalizePath(m.path),a.buildURLFromParts(m)):r;var w=a.parseURL(o);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var p=s.exec(w.path);w.netLoc=p[1],w.path=p[2]}w.netLoc&&!w.path&&(w.path="/");var d={scheme:w.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(d.netLoc=w.netLoc,m.path[0]!=="/"))if(!m.path)d.path=w.path,m.params||(d.params=w.params,m.query||(d.query=w.query));else{var n=w.path,l=n.substring(0,n.lastIndexOf("/")+1)+m.path;d.path=a.normalizePath(l)}return d.path===null&&(d.path=x.alwaysNormalize?a.normalizePath(m.path):m.path),a.buildURLFromParts(d)},parseURL:function(o){var r=h.exec(o);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(o){for(o=o.split("").reverse().join("").replace(S,"");o.length!==(o=o.replace(f,"")).length;);return o.split("").reverse().join("")},buildURLFromParts:function(o){return o.scheme+o.netLoc+o.path+o.params+o.query+o.fragment}};P.exports=a})(this)},"./node_modules/webworkify-webpack/index.js":function(P,u,C){function R(x){var g={};function m(p){if(g[p])return g[p].exports;var d=g[p]={i:p,l:!1,exports:{}};return x[p].call(d.exports,d,d.exports,m),d.l=!0,d.exports}m.m=x,m.c=g,m.i=function(p){return p},m.d=function(p,d,n){m.o(p,d)||Object.defineProperty(p,d,{configurable:!1,enumerable:!0,get:n})},m.r=function(p){Object.defineProperty(p,"__esModule",{value:!0})},m.n=function(p){var d=p&&p.__esModule?function(){return p.default}:function(){return p};return m.d(d,"a",d),d},m.o=function(p,d){return Object.prototype.hasOwnProperty.call(p,d)},m.p="/",m.oe=function(p){throw console.error(p),p};var w=m(m.s=ENTRY_MODULE);return w.default||w}var h="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+h+").*?\\)";function S(x){return(x+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function f(x){return!isNaN(1*x)}function a(x,g,m){var w={};w[m]=[];var p=g.toString(),d=p.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"),c;c=l.exec(p);){if(c[3]==="dll-reference")continue;w[m].push(c[3])}for(l=new RegExp("\\("+S(n)+'\\("(dll-reference\\s('+h+'))"\\)\\)'+s,"g");c=l.exec(p);)x[c[2]]||(w[m].push(c[1]),x[c[2]]=C(c[1]).m),w[c[2]]=w[c[2]]||[],w[c[2]].push(c[4]);for(var T=Object.keys(w),v=0;v<T.length;v++)for(var i=0;i<w[T[v]].length;i++)f(w[T[v]][i])&&(w[T[v]][i]=1*w[T[v]][i]);return w}function o(x){var g=Object.keys(x);return g.reduce(function(m,w){return m||x[w].length>0},!1)}function r(x,g){for(var m={main:[g]},w={main:[]},p={main:{}};o(m);)for(var d=Object.keys(m),n=0;n<d.length;n++){var l=d[n],c=m[l],T=c.pop();if(p[l]=p[l]||{},p[l][T]||!x[l][T])continue;p[l][T]=!0,w[l]=w[l]||[],w[l].push(T);for(var v=a(x,x[l][T],l),i=Object.keys(v),L=0;L<i.length;L++)m[i[L]]=m[i[L]]||[],m[i[L]]=m[i[L]].concat(v[i[L]])}return w}P.exports=function(x,g){g=g||{};var m={main:C.m},w=g.all?{main:Object.keys(m.main)}:r(m,x),p="";Object.keys(w).filter(function(T){return T!=="main"}).forEach(function(T){for(var v=0;w[T][v];)v++;w[T].push(v),m[T][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",p=p+"var "+T+" = ("+R.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+w[T].map(function(i){return""+JSON.stringify(i)+": "+m[T][i].toString()}).join(",")+`});
`}),p=p+"new (("+R.toString().replace("ENTRY_MODULE",JSON.stringify(x))+")({"+w.main.map(function(T){return""+JSON.stringify(T)+": "+m.main[T].toString()}).join(",")+"}))(self);";var d=new window.Blob([p],{type:"text/javascript"});if(g.bare)return d;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,l=n.createObjectURL(d),c=new window.Worker(l);return c.objectURL=l,c}},"./src/config.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"hlsDefaultConfig",function(){return L}),C.d(u,"mergeConfig",function(){return y}),C.d(u,"enableStreamingMode",function(){return E});var R=C("./src/controller/abr-controller.ts"),h=C("./src/controller/audio-stream-controller.ts"),s=C("./src/controller/audio-track-controller.ts"),S=C("./src/controller/subtitle-stream-controller.ts"),f=C("./src/controller/subtitle-track-controller.ts"),a=C("./src/controller/buffer-controller.ts"),o=C("./src/controller/timeline-controller.ts"),r=C("./src/controller/cap-level-controller.ts"),x=C("./src/controller/fps-controller.ts"),g=C("./src/controller/eme-controller.ts"),m=C("./src/controller/cmcd-controller.ts"),w=C("./src/utils/xhr-loader.ts"),p=C("./src/utils/fetch-loader.ts"),d=C("./src/utils/cues.ts"),n=C("./src/utils/mediakeys-helper.ts"),l=C("./src/utils/logger.ts");function c(){return c=Object.assign||function(b){for(var _=1;_<arguments.length;_++){var I=arguments[_];for(var j in I)Object.prototype.hasOwnProperty.call(I,j)&&(b[j]=I[j])}return b},c.apply(this,arguments)}function T(b,_){var I=Object.keys(b);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(b);_&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(b,M).enumerable})),I.push.apply(I,j)}return I}function v(b){for(var _=1;_<arguments.length;_++){var I=arguments[_]!=null?arguments[_]:{};_%2?T(Object(I),!0).forEach(function(j){i(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 i(b,_,I){return _ in b?Object.defineProperty(b,_,{value:I,enumerable:!0,configurable:!0,writable:!0}):b[_]=I,b}var L=v(v({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:R.default,bufferController:a.default,capLevelController:r.default,fpsController:x.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},A()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:f.default,timelineController:o.TimelineController,audioStreamController:h.default,audioTrackController:s.default,emeController:g.default,cmcdController:m.default});function A(){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 y(b,_){if((_.liveSyncDurationCount||_.liveMaxLatencyDurationCount)&&(_.liveSyncDuration||_.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(_.liveMaxLatencyDurationCount!==void 0&&(_.liveSyncDurationCount===void 0||_.liveMaxLatencyDurationCount<=_.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(_.liveMaxLatencyDuration!==void 0&&(_.liveSyncDuration===void 0||_.liveMaxLatencyDuration<=_.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return c({},b,_)}function E(b){var _=b.loader;if(_!==p.default&&_!==w.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),b.progressive=!1;else{var I=Object(p.fetchSupported)();I&&(b.loader=p.default,b.progressive=!0,b.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/utils/ewma-bandwidth-estimator.ts"),s=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),f=C("./src/errors.ts"),a=C("./src/types/loader.ts"),o=C("./src/utils/logger.ts");function r(m,w){for(var p=0;p<w.length;p++){var d=w[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(m,d.key,d)}}function x(m,w,p){return w&&r(m.prototype,w),p&&r(m,p),m}var g=function(){function m(p){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=p;var d=p.config;this.bwEstimator=new h.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var w=m.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===a.PlaylistLevelType.MAIN&&!this.timer){var c;this.fragCurrent=l,this.partCurrent=(c=n.part)!=null?c: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,c=l.autoLevelEnabled,T=l.config,v=l.media;if(!d||!v)return;var i=n?n.stats:d.stats,L=n?n.duration:d.duration;if(i.aborted){o.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!c||v.paused||!v.playbackRate||!v.readyState)return;var A=performance.now()-i.loading.start,y=Math.abs(v.playbackRate);if(A<=500*L/y)return;var E=l.levels,b=l.minAutoLevel,_=E[d.level],I=i.total||Math.max(i.loaded,Math.round(L*_.maxBitrate/8)),j=Math.max(1,i.bwEstimate?i.bwEstimate/8:i.loaded*1e3/A),M=(I-i.loaded)/j,G=v.currentTime,K=(S.BufferHelper.bufferInfo(v,G,T.maxBufferHole).end-G)/y;if(K>=2*L/y||M<=K)return;var H=Number.POSITIVE_INFINITY,z;for(z=d.level-1;z>b;z--){var B=E[z].maxBitrate;if(H=L*B/(8*.8*j),H<K)break}if(H>=M)return;var W=this.bwEstimator.getEstimate();o.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 "+z+`
Current BW estimate: `+(Object(R.isFiniteNumber)(W)?(W/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+M.toFixed(3)+` s
Estimated load time for the next fragment: `+H.toFixed(3)+` s
Time to underbuffer: `+K.toFixed(3)+" s"),l.nextLoadLevel=z,this.bwEstimator.sample(A,i.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:i})},w.onFragLoaded=function(d,n){var l=n.frag,c=n.part;if(l.type===a.PlaylistLevelType.MAIN&&Object(R.isFiniteNumber)(l.sn)){var T=c?c.stats:l.stats,v=c?c.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var i=this.hls.levels[l.level],L=(i.loaded?i.loaded.bytes:0)+T.loaded,A=(i.loaded?i.loaded.duration:0)+v;i.loaded={bytes:L,duration:A},i.realBitrate=Math.round(8*L/A)}if(l.bitrateTest){var y={stats:T,frag:l,part:c,id:l.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,y),l.bitrateTest=!1}}},w.onFragBuffered=function(d,n){var l=n.frag,c=n.part,T=c?c.stats:l.stats;if(T.aborted)return;if(l.type!==a.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var v=T.parsing.end-T.loading.start;this.bwEstimator.sample(v,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},w.onError=function(d,n){switch(n.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.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,c=l.maxAutoLevel,T=l.config,v=l.minAutoLevel,i=l.media,L=n?n.duration:d?d.duration:0,A=i?i.currentTime:0,y=i&&i.playbackRate!==0?Math.abs(i.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,b=(S.BufferHelper.bufferInfo(i,A,T.maxBufferHole).end-A)/y,_=this.findBestLevel(E,v,c,b,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(_>=0)return _;o.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 G=this.bitrateTestDelay;if(G){var K=L?Math.min(L,T.maxLoadingDelay):T.maxLoadingDelay;I=K-G,o.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*I)+" ms"),j=M=1}}return _=this.findBestLevel(E,v,c,b+I,j,M),Math.max(_,0)},w.findBestLevel=function(d,n,l,c,T,v){for(var i,L=this.fragCurrent,A=this.partCurrent,y=this.lastLoadedFragLevel,E=this.hls.levels,b=E[y],_=!!(b!=null&&(i=b.details)!==null&&i!==void 0&&i.live),I=b==null?void 0:b.codecSet,j=A?A.duration:L?L.duration:0,M=l;M>=n;M--){var G=E[M];if(!G||I&&G.codecSet!==I)continue;var K=G.details,H=(A?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||j,z=void 0;M<=y?z=T*d:z=v*d;var B=E[M].maxBitrate,W=B*H/z;if(o.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+M+"/"+Math.round(z)+"/"+B+"/"+H+"/"+c+"/"+W),z>B&&(!W||_&&!this.bitrateTestDelay||W<c))return M}return-1},x(m,[{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}}]),m}();u.default=g},"./src/controller/audio-stream-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/controller/base-stream-controller.ts"),s=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),f=C("./src/controller/fragment-tracker.ts"),a=C("./src/types/level.ts"),o=C("./src/types/loader.ts"),r=C("./src/loader/fragment.ts"),x=C("./src/demux/chunk-cache.ts"),g=C("./src/demux/transmuxer-interface.ts"),m=C("./src/types/transmuxer.ts"),w=C("./src/controller/fragment-finders.ts"),p=C("./src/utils/discontinuities.ts"),d=C("./src/errors.ts"),n=C("./src/utils/logger.ts");function l(){return l=Object.assign||function(L){for(var A=1;A<arguments.length;A++){var y=arguments[A];for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(L[E]=y[E])}return L},l.apply(this,arguments)}function c(L,A){L.prototype=Object.create(A.prototype),L.prototype.constructor=L,T(L,A)}function T(L,A){return T=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},T(L,A)}var v=100,i=function(L){c(A,L);function A(E,b){var _;return _=L.call(this,E,b,"[audio-stream-controller]")||this,_.videoBuffer=null,_.videoTrackCC=-1,_.waitingVideoCC=-1,_.audioSwitch=!1,_.trackId=-1,_.waitingData=null,_.mainDetails=null,_.bufferFlushed=!1,_._registerListeners(),_}var y=A.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._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)},y._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)},y.onInitPtsFound=function(b,_){var I=_.frag,j=_.id,M=_.initPTS;if(j==="main"){var G=I.cc;this.initPTS[I.cc]=M,this.log("InitPTS for cc: "+G+" found from main: "+M),this.videoTrackCC=G,this.state===h.State.WAITING_INIT_PTS&&this.tick()}},y.startLoad=function(b){if(!this.levels){this.startPosition=b,this.state=h.State.STOPPED;return}var _=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,_>0&&b===-1?(this.log("Override startPosition with lastCurrentTime @"+_.toFixed(3)),this.state=h.State.IDLE):(this.loadedmetadata=!1,this.state=h.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()},y.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_TRACK:{var b,_=this.levels,I=this.trackId,j=_==null||((b=_[I])===null||b===void 0)?void 0:b.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=h.State.WAITING_INIT_PTS}break}case h.State.FRAG_LOADING_WAITING_RETRY:{var M,G=performance.now(),K=this.retryDate;(!K||G>=K||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=h.State.IDLE);break}case h.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var z=H.frag,B=H.part,W=H.cache,F=H.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.FRAG_LOADING;var $=W.flush(),ee={frag:z,part:B,payload:$,networkDetails:null};this._handleFragmentLoadProgress(ee),F&&L.prototype._handleFragmentLoadComplete.call(this,ee)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Z=this.getLoadPosition(),ve=S.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),he=Object(w.fragmentWithinToleranceTest)(ve.end,this.config.maxFragLookUpTolerance,z);he<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+ve.end+" is needed"),this.clearWaitingFragment())}}else this.state=h.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var b=this.waitingData;b&&(this.fragmentTracker.removeFragment(b.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.IDLE)},y.onTickEnd=function(){var b=this.media;if(!b||!b.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:b,I=_.buffered;!this.loadedmetadata&&I.length&&(this.loadedmetadata=!0),this.lastCurrentTime=b.currentTime},y.doTickIdle=function(){var b,_,I=this.hls,j=this.levels,M=this.media,G=this.trackId,K=I.config;if(!j||!j[G])return;if(!M&&(this.startFragRequested||!K.startFragPrefetch))return;var H=j[G],z=H.details;if(!z||z.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(z)){this.state=h.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,o.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,o.PlaylistLevelType.AUDIO);if(B===null)return;var W=B.len,F=this.getMaxBufferLength(),$=this.audioSwitch;if(W>=F&&!$)return;if(!$&&this._streamEnded(B,z)){I.trigger(s.Events.BUFFER_EOS,{type:"audio"}),this.state=h.State.ENDED;return}var ee=z.fragments,Z=ee[0].start,ve=B.end;if($){var he=this.getLoadPosition();ve=he,z.PTSKnown&&he<Z&&((B.end>Z||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=Z+.05))}var le=this.getNextFragment(ve,z);if(!le){this.bufferFlushed=!0;return}((b=le.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((_=le.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(le,z):this.loadFragment(le,z,ve)},y.getMaxBufferLength=function(){var b=L.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,o.PlaylistLevelType.MAIN);return _===null?b:Math.max(b,_.len)},y.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(b,_){var I=_.audioTracks;this.resetTransmuxer(),this.levels=I.map(function(j){return new a.Level(j)})},y.onAudioTrackSwitching=function(b,_){var I=!!_.url;this.trackId=_.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),I?this.setInterval(v):this.resetTransmuxer(),I?(this.audioSwitch=!0,this.state=h.State.IDLE):this.state=h.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(b,_){this.mainDetails=_.details},y.onAudioTrackLoaded=function(b,_){var I,j=this.levels,M=_.details,G=_.id;if(!j){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+M.startSN+","+M.endSN+"],duration:"+M.totalduration);var K=j[G],H=0;if(M.live||(I=K.details)!==null&&I!==void 0&&I.live){var z=this.mainDetails;if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed||!z)return;!K.details&&M.hasProgramDateTime&&z.hasProgramDateTime?(Object(p.alignMediaPlaylistByPDT)(M,z),H=M.fragments[0].start):H=this.alignPlaylists(M,K.details)}K.details=M,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!M.live)&&this.setStartPosition(K.details,H),this.state===h.State.WAITING_TRACK&&!this.waitForCdnTuneIn(M)&&(this.state=h.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(b){var _,I=b.frag,j=b.part,M=b.payload,G=this.config,K=this.trackId,H=this.levels;if(!H){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 z=H[K];console.assert(z,"Audio track is defined on fragment load progress");var B=z.details;console.assert(B,"Audio track details are defined on fragment load progress");var W=G.defaultAudioCodec||z.audioCodec||"mp4a.40.2",F=this.transmuxer;F||(F=this.transmuxer=new g.default(this.hls,o.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[I.cc],ee=(_=I.initSegment)===null||_===void 0?void 0:_.data;if($!==void 0){var Z=!1,ve=j?j.index:-1,he=ve!==-1,le=new m.ChunkMetadata(I.level,I.sn,I.stats.chunkCount,M.byteLength,ve,he);F.push(M,ee,W,"",I,j,B.totalduration,Z,le,$)}else{n.logger.log("Unknown video PTS for cc "+I.cc+", waiting for video PTS before demuxing audio frag "+I.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+K);var Re=this.waitingData=this.waitingData||{frag:I,part:j,cache:new x.default,complete:!1},xe=Re.cache;xe.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=h.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(b){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,b)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(b,_){var I=_.tracks.audio;I&&(this.mediaBuffer=I.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},y.onFragBuffered=function(b,_){var I=_.frag,j=_.part;if(I.type!==o.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)},y.onError=function(b,_){switch(_.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(o.PlaylistLevelType.AUDIO,_);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==h.State.ERROR&&this.state!==h.State.STOPPED&&(this.state=_.fatal?h.State.ERROR:h.State.IDLE,this.warn(_.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(_.parent==="audio"&&(this.state===h.State.PARSING||this.state===h.State.PARSED)){var I=!0,j=this.getFwdBufferInfo(this.mediaBuffer,o.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}},y.onBufferFlushed=function(b,_){var I=_.type;I===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(b){var _,I="audio",j=this.hls,M=b.remuxResult,G=b.chunkMeta,K=this.getCurrentContext(G);if(!K){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var H=K.frag,z=K.part,B=M.audio,W=M.text,F=M.id3,$=M.initSegment;if(this.fragContextChanged(H))return;if(this.state=h.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,H,G),j.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:I,tracks:$.tracks})),B){var ee=B.startPTS,Z=B.endPTS,ve=B.startDTS,he=B.endDTS;z&&(z.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:Z,startDTS:ve,endDTS:he}),H.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ee,Z,ve,he),this.bufferFragmentData(B,H,z,G)}if(F!=null&&(_=F.samples)!==null&&_!==void 0&&_.length){var le=l({frag:H,id:I},F);j.trigger(s.Events.FRAG_PARSING_METADATA,le)}if(W){var Re=l({frag:H,id:I},W);j.trigger(s.Events.FRAG_PARSING_USERDATA,Re)}},y._bufferInitSegment=function(b,_,I){if(this.state!==h.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 G={type:"audio",frag:_,part:null,chunkMeta:I,parent:_.type,data:M};this.hls.trigger(s.Events.BUFFER_APPENDING,G)}this.tick()},y.loadFragment=function(b,_,I){var j=this.fragmentTracker.getState(b);this.fragCurrent=b,(this.audioSwitch||j===f.FragmentState.NOT_LOADED||j===f.FragmentState.PARTIAL)&&(b.sn==="initSegment"?this._loadInitSegment(b):_.live&&!Object(R.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=h.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,b,_,I)))},y.completeAudioSwitch=function(){var b=this.hls,_=this.media,I=this.trackId;_&&(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})},A}(h.default);u.default=i},"./src/controller/audio-track-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function f(g,m){for(var w=0;w<m.length;w++){var p=m[w];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function a(g,m,w){return m&&f(g.prototype,m),w&&f(g,w),g}function o(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,r(g,m)}function r(g,m){return r=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},r(g,m)}var x=function(g){o(m,g);function m(p){var d;return d=g.call(this,p,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var w=m.prototype;return w.registerListeners=function(){var d=this.hls;d.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(R.Events.ERROR,this.onError,this)},w.unregisterListeners=function(){var d=this.hls;d.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(R.Events.ERROR,this.onError,this)},w.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,g.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,c=n.details,T=this.tracksInGroup[l];if(!T){this.warn("Invalid audio track id "+l);return}var v=T.details;T.details=n.details,this.log("audioTrack "+l+" loaded ["+c.startSN+"-"+c.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,n,v))},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 c=this.tracks.filter(function(v){return!l||v.groupId===l});this.selectDefaultTrack&&!c.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=c;var T={audioTracks:c};this.log("Updating audio tracks, "+c.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(R.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},w.onError=function(d,n){if(g.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 c=n[d],T=c.id,v=c.groupId,i=v===void 0?"":v,L=c.name,A=c.type,y=c.url;if(this.trackId=d,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:i,name:L,type:A,url:y}),c.details&&!c.details.live)return;var E=this.switchParams(c.url,l==null?void 0:l.details);this.loadPlaylist(E)},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(R.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},w.findTrackId=function(d){for(var n=this.tracksInGroup,l=0;l<n.length;l++){var c=n[l];if((!this.selectDefaultTrack||c.default)&&(!d||d===c.name))return c.id}return-1},w.loadPlaylist=function(d){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var l=n.id,c=n.groupId,T=n.url;if(d)try{T=d.addDirectives(T)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(R.Events.AUDIO_TRACK_LOADING,{url:T,id:l,groupId:c,deliveryDirectives:d||null})}},a(m,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1,this.setAudioTrack(d)}}]),m}(s.default);u.default=x},"./src/controller/base-playlist-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return a});var R=C("./src/polyfills/number.ts"),h=C("./src/types/level.ts"),s=C("./src/controller/level-helper.ts"),S=C("./src/utils/logger.ts"),f=C("./src/errors.ts"),a=function(){function o(x,g){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,g+":"),this.warn=S.logger.warn.bind(S.logger,g+":"),this.hls=x}var r=o.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(g,m){m.fatal&&m.type===f.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(g,m){var w=m==null?void 0:m.renditionReports;if(w)for(var p=0;p<w.length;p++){var d=w[p],n=""+d.URI;if(n===g.substr(-n.length)){var l=parseInt(d["LAST-MSN"]),c=parseInt(d["LAST-PART"]);if(m&&this.hls.config.lowLatencyMode){var T=Math.min(m.age-m.partTarget,m.targetduration);c!==void 0&&T>m.partTarget&&(c+=1)}if(Object(R.isFiniteNumber)(l))return new h.HlsUrlParameters(l,Object(R.isFiniteNumber)(c)?c:void 0,h.HlsSkip.No)}}},r.loadPlaylist=function(g){},r.shouldLoadTrack=function(g){return this.canLoad&&g&&!!g.url&&(!g.details||g.details.live)},r.playlistLoaded=function(g,m,w){var p=this,d=m.details,n=m.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 "+g+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),w&&d.fragments.length>0&&Object(s.mergeDetails)(w,d),!this.canLoad||!d.live)return;var c,T=void 0,v=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var i=this.hls.config.lowLatencyMode,L=d.lastPartSn,A=d.endSN,y=d.lastPartIndex,E=y!==-1,b=L===A,_=i?0:y;E?(T=b?A+1:L,v=b?_:y+1):T=A+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 G=Math.floor(M/d.targetduration);if(T+=G,v!==void 0){var K=Math.round(M%d.targetduration/d.partTarget);v+=K}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+I.toFixed(2)+"s goal: "+M+" skip sn "+G+" to part "+v)}d.tuneInGoal=M}if(c=this.getDeliveryDirectives(d,m.deliveryDirectives,T,v),i||!b){this.loadPlaylist(c);return}}else c=this.getDeliveryDirectives(d,m.deliveryDirectives,T,v);var H=Object(s.computeReloadInterval)(d,n);T!==void 0&&d.canBlockReload&&(H-=d.partTarget||1),this.log("reload live playlist "+g+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return p.loadPlaylist(c)},H)}else this.clearTimer()},r.getDeliveryDirectives=function(g,m,w,p){var d=Object(h.getSkipValue)(g,w);return m!=null&&m.skip&&g.deltaUpdateFailed&&(w=m.msn,p=m.part,d=h.HlsSkip.No),new h.HlsUrlParameters(w,p,d)},r.retryLoadingOrFail=function(g){var m=this,w=this.hls.config,p=this.retryCount<w.levelLoadingMaxRetry;if(p){var d;if(this.retryCount++,g.details.indexOf("LoadTimeOut")>-1&&(d=g.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+g.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*w.levelLoadingRetryDelay,w.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return m.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+g.details+'"')}}else this.warn('cannot recover from error "'+g.details+'"'),this.clearTimer(),g.fatal=!0;return p},o}()},"./src/controller/base-stream-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"State",function(){return A}),C.d(u,"default",function(){return y});var R=C("./src/polyfills/number.ts"),h=C("./src/task-loop.ts"),s=C("./src/controller/fragment-tracker.ts"),S=C("./src/utils/buffer-helper.ts"),f=C("./src/utils/logger.ts"),a=C("./src/events.ts"),o=C("./src/errors.ts"),r=C("./src/types/transmuxer.ts"),x=C("./src/utils/mp4-tools.ts"),g=C("./src/utils/discontinuities.ts"),m=C("./src/controller/fragment-finders.ts"),w=C("./src/controller/level-helper.ts"),p=C("./src/loader/fragment-loader.ts"),d=C("./src/crypt/decrypter.ts"),n=C("./src/utils/time-ranges.ts"),l=C("./src/types/loader.ts");function c(E,b){for(var _=0;_<b.length;_++){var I=b[_];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(E,I.key,I)}}function T(E,b,_){return b&&c(E.prototype,b),_&&c(E,_),E}function v(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function i(E,b){E.prototype=Object.create(b.prototype),E.prototype.constructor=E,L(E,b)}function L(E,b){return L=Object.setPrototypeOf||function(I,j){return I.__proto__=j,I},L(E,b)}var A={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"},y=function(E){i(b,E);function b(I,j,M){var G;return G=E.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=A.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=M,G.log=f.logger.log.bind(f.logger,M+":"),G.warn=f.logger.warn.bind(f.logger,M+":"),G.hls=I,G.fragmentLoader=new p.default(I.config),G.fragmentTracker=j,G.config=I.config,G.decrypter=new d.default(I,I.config),I.on(a.Events.KEY_LOADED,G.onKeyLoaded,v(G)),G}var _=b.prototype;return _.doTick=function(){this.onTickEnd()},_.onTickEnd=function(){},_.startLoad=function(j){},_.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=A.STOPPED},_._streamEnded=function(j,M){var G=this.fragCurrent,K=this.fragmentTracker;if(!M.live&&G&&G.sn===M.endSN&&!j.nextStart){var H=K.getState(G);return H===s.FragmentState.PARTIAL||H===s.FragmentState.OK}return!1},_.onMediaAttached=function(j,M){var G=this.media=this.mediaBuffer=M.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===A.STOPPED&&this.startLoad(K.startPosition)},_.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()},_.onMediaSeeking=function(){var j=this.config,M=this.fragCurrent,G=this.media,K=this.mediaBuffer,H=this.state,z=G?G.currentTime:0,B=S.BufferHelper.bufferInfo(K||G,z,j.maxBufferHole);if(this.log("media seeking to "+(Object(R.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+H),H===A.ENDED)this.resetLoadingState();else if(M&&!B.len){var W=j.maxFragLookUpTolerance,F=M.start-W,$=M.start+M.duration+W,ee=z>$;(z<F||ee)&&(ee&&M.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),M.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=z),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},_.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},_.onKeyLoaded=function(j,M){if(this.state!==A.KEY_LOADING||M.frag!==this.fragCurrent||!this.levels)return;this.state=A.IDLE;var G=this.levels[M.frag.level].details;G&&this.loadFragment(M.frag,G,M.frag.start)},_.onHandlerDestroying=function(){this.stopLoad(),E.prototype.onHandlerDestroying.call(this)},_.onHandlerDestroyed=function(){this.state=A.STOPPED,this.hls.off(a.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,E.prototype.onHandlerDestroyed.call(this)},_.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=A.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(a.Events.KEY_LOADING,{frag:j})},_.loadFragment=function(j,M,G){this._loadFragForPlayback(j,M,G)},_._loadFragForPlayback=function(j,M,G){var K=this,H=function(B){if(K.fragContextChanged(j)){K.warn("Fragment "+j.sn+(B.part?" p: "+B.part.index:"")+" of level "+j.level+" was dropped during download."),K.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,K._handleFragmentLoadProgress(B)};this._doFragLoad(j,M,G,H).then(function(z){if(!z)return;K.fragLoadError=0;var B=K.state;if(K.fragContextChanged(j)){(B===A.FRAG_LOADING||B===A.BACKTRACKING||!K.fragCurrent&&B===A.PARSING)&&(K.fragmentTracker.removeFragment(j),K.state=A.IDLE);return}if("payload"in z&&(K.log("Loaded fragment "+j.sn+" of level "+j.level),K.hls.trigger(a.Events.FRAG_LOADED,z),K.state===A.BACKTRACKING)){K.fragmentTracker.backtrack(j,z),K.resetFragmentLoading(j);return}K._handleFragmentLoadComplete(z)}).catch(function(z){K.warn(z),K.resetFragmentLoading(j)})},_.flushMainBuffer=function(j,M,G){if(G===void 0&&(G=null),!(j-M))return;var K={startOffset:j,endOffset:M,type:G};this.fragLoadError=0,this.hls.trigger(a.Events.BUFFER_FLUSHING,K)},_._loadInitSegment=function(j){var M=this;this._doFragLoad(j).then(function(G){if(!G||M.fragContextChanged(j)||!M.levels)throw new Error("init load aborted");return G}).then(function(G){var K=M.hls,H=G.payload,z=j.decryptdata;if(H&&H.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var B=self.performance.now();return M.decrypter.webCryptoDecrypt(new Uint8Array(H),z.key.buffer,z.iv.buffer).then(function(W){var F=self.performance.now();return K.trigger(a.Events.FRAG_DECRYPTED,{frag:j,payload:W,stats:{tstart:B,tdecrypt:F}}),G.payload=W,G})}return G}).then(function(G){var K=M.fragCurrent,H=M.hls,z=M.levels;if(!z)throw new Error("init load aborted, missing levels");var B=z[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var W=j.stats;M.state=A.IDLE,M.fragLoadError=0,j.data=new Uint8Array(G.payload),W.parsing.start=W.buffering.start=self.performance.now(),W.parsing.end=W.buffering.end=self.performance.now(),G.frag===K&&H.trigger(a.Events.FRAG_BUFFERED,{stats:W,frag:K,part:null,id:j.type}),M.tick()}).catch(function(G){M.warn(G),M.resetFragmentLoading(j)})},_.fragContextChanged=function(j){var M=this.fragCurrent;return!j||!M||j.level!==M.level||j.sn!==M.sn||j.urlId!==M.urlId},_.fragBufferedComplete=function(j,M){var G=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(G))),this.state=A.IDLE,this.tick()},_._handleFragmentLoadComplete=function(j){var M=this.transmuxer;if(!M)return;var G=j.frag,K=j.part,H=j.partsLoaded,z=!H||H.length===0||H.some(function(W){return!W}),B=new r.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,K?K.index:-1,!z);M.flush(B)},_._handleFragmentLoadProgress=function(j){},_._doFragLoad=function(j,M,G,K){var H=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(j.start,G||0),this.config.lowLatencyMode&&M){var z=M.partList;if(z&&K){G>j.end&&M.fragmentHint&&(j=M.fragmentHint);var B=this.getNextPart(z,j,G);if(B>-1){var W=z[B];return this.log("Loading part sn: "+j.sn+" p: "+W.index+" cc: "+j.cc+" of playlist ["+M.startSN+"-"+M.endSN+"] parts [0-"+B+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=W.start+W.duration,this.state=A.FRAG_LOADING,this.hls.trigger(a.Events.FRAG_LOADING,{frag:j,part:z[B],targetBufferTime:G}),this.doFragPartsLoad(j,z,B,K).catch(function(F){return H.handleFragLoadError(F)})}else if(!j.url||this.loadedEndOfParts(z,G))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(G.toFixed(3))),Object(R.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=A.FRAG_LOADING,this.hls.trigger(a.Events.FRAG_LOADING,{frag:j,targetBufferTime:G}),this.fragmentLoader.load(j,K).catch(function(F){return H.handleFragLoadError(F)})},_.doFragPartsLoad=function(j,M,G,K){var H=this;return new Promise(function(z,B){var W=[],F=function $(ee){var Z=M[ee];H.fragmentLoader.loadPart(j,Z,K).then(function(ve){W[Z.index]=ve;var he=ve.part;H.hls.trigger(a.Events.FRAG_LOADED,ve);var le=M[ee+1];if(le&&le.fragment===j)$(ee+1);else return z({frag:j,part:he,partsLoaded:W})}).catch(B)};F(G)})},_.handleFragLoadError=function(j){var M=j.data;return M&&M.details===o.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(M.frag,M.part):this.hls.trigger(a.Events.ERROR,M),null},_._handleTransmuxerFlush=function(j){var M=this.getCurrentContext(j);if(!M||this.state!==A.PARSING){this.fragCurrent||(this.state=A.IDLE);return}var G=M.frag,K=M.part,H=M.level,z=self.performance.now();G.stats.parsing.end=z,K&&(K.stats.parsing.end=z),this.updateLevelTiming(G,K,H,j.partial)},_.getCurrentContext=function(j){var M=this.levels,G=j.level,K=j.sn,H=j.part;if(!M||!M[G])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+G+". The current chunk will not be buffered."),null;var z=M[G],B=H>-1?Object(w.getPartWith)(z,K,H):null,W=B?B.fragment:Object(w.getFragmentWithSN)(z,K,this.fragCurrent);return W?{frag:W,part:B,level:z}:null},_.bufferFragmentData=function(j,M,G,K){if(!j||this.state!==A.PARSING)return;var H=j.data1,z=j.data2,B=H;if(H&&z&&(B=Object(x.appendUint8Array)(H,z)),!B||!B.length)return;var W={type:j.type,frag:M,part:G,chunkMeta:K,parent:M.type,data:B};this.hls.trigger(a.Events.BUFFER_APPENDING,W),j.dropped&&j.independent&&!G&&this.flushBufferGap(M)},_.flushBufferGap=function(j){var M=this.media;if(!M)return;if(!S.BufferHelper.isBuffered(M,M.currentTime)){this.flushMainBuffer(0,j.start);return}var G=M.currentTime,K=S.BufferHelper.bufferInfo(M,G,0),H=j.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),B=Math.max(Math.min(j.start-z,K.end-z),G+z);j.start-B>z&&this.flushMainBuffer(B,j.start)},_.getFwdBufferInfo=function(j,M){var G=this.config,K=this.getLoadPosition();if(!Object(R.isFiniteNumber)(K))return null;var H=S.BufferHelper.bufferInfo(j,K,G.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(K,M);if(z&&H.nextStart<z.end)return S.BufferHelper.bufferInfo(j,K,Math.max(H.nextStart,G.maxBufferHole))}return H},_.getMaxBufferLength=function(j){var M=this.config,G;return j?G=Math.max(8*M.maxBufferSize/j,M.maxBufferLength):G=M.maxBufferLength,Math.min(G,M.maxMaxBufferLength)},_.reduceMaxBufferLength=function(j){var M=this.config,G=j||M.maxBufferLength;return M.maxMaxBufferLength>=G?(M.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+M.maxMaxBufferLength+"s"),!0):!1},_.getNextFragment=function(j,M){var G,K,H=M.fragments,z=H.length;if(!z)return null;var B=this.config,W=H[0].start,F;if(M.live){var $=B.initialLiveManifestSize;if(z<$)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+$+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(F=this.getInitialLiveFragment(M,H),this.startPosition=F?this.hls.liveSyncPosition||F.start:j)}else j<=W&&(F=H[0]);if(!F){var ee=B.lowLatencyMode?M.partEnd:M.fragmentEnd;F=this.getFragmentAtPosition(j,ee,M)}return(G=F)!==null&&G!==void 0&&G.initSegment&&!((K=F)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(F=F.initSegment),F},_.getNextPart=function(j,M,G){for(var K=-1,H=!1,z=!0,B=0,W=j.length;B<W;B++){var F=j[B];if(z=z&&!F.independent,K>-1&&G<F.start)break;var $=F.loaded;!$&&(H||F.independent||z)&&F.fragment===M&&(K=B),H=$}return K},_.loadedEndOfParts=function(j,M){var G=j[j.length-1];return G&&M>G.start&&G.loaded},_.getInitialLiveFragment=function(j,M){var G=this.fragPrevious,K=null;if(G){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),K=Object(m.findFragmentByPDT)(M,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var H=G.sn+1;if(H>=j.startSN&&H<=j.endSN){var z=M[H-j.startSN];G.cc===z.cc&&(K=z,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(m.findFragWithCC)(M,G.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(K=this.getFragmentAtPosition(B,this.bitrateTest?j.fragmentEnd:j.edge,j))}return K},_.getFragmentAtPosition=function(j,M,G){var K=this.config,H=this.fragPrevious,z=G.fragments,B=G.endSN,W=G.fragmentHint,F=K.maxFragLookUpTolerance,$=!!(K.lowLatencyMode&&G.partList&&W);$&&W&&!this.bitrateTest&&(z=z.concat(W),B=W.sn);var ee;if(j<M){var Z=j>M-F?0:F;ee=Object(m.findFragmentByPTS)(H,z,j,Z)}else ee=z[z.length-1];if(ee){var ve=ee.sn-G.startSN,he=H&&ee.level===H.level,le=z[ve+1],Re=this.fragmentTracker.getState(ee);if(Re===s.FragmentState.BACKTRACKED){ee=null;for(var xe=ve;z[xe]&&this.fragmentTracker.getState(z[xe])===s.FragmentState.BACKTRACKED;)H?ee=z[xe--]:ee=z[--xe];ee||(ee=le)}else H&&ee.sn===H.sn&&!$&&(he&&(ee.sn<B&&this.fragmentTracker.getState(le)!==s.FragmentState.OK?(this.log("SN "+ee.sn+" just loaded, load next one: "+le.sn),ee=le):ee=null))}return ee},_.synchronizeToLiveEdge=function(j){var M=this.config,G=this.media;if(!G)return;var K=this.hls.liveSyncPosition,H=G.currentTime,z=j.fragments[0].start,B=j.edge,W=H>=z-M.maxFragLookUpTolerance&&H<=B;if(K!==null&&G.duration>K&&(H<K||!W)){var F=M.liveMaxLatencyDuration!==void 0?M.liveMaxLatencyDuration:M.liveMaxLatencyDurationCount*j.targetduration;(!W&&G.readyState<4||H<B-F)&&(this.loadedmetadata||(this.nextLoadPosition=K),G.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+K.toFixed(3)),G.currentTime=K))}},_.alignPlaylists=function(j,M){var G=this.levels,K=this.levelLastLoaded,H=this.fragPrevious,z=K!==null?G[K]:null,B=j.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var W=j.fragments[0].start,F=!M,$=j.alignedSliding&&Object(R.isFiniteNumber)(W);if(F||!$&&!W){Object(g.alignStream)(H,z,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: "+(H?H.sn:"na")+" fragments: "+B),ee}return W},_.waitForCdnTuneIn=function(j){var M=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*M)},_.setStartPosition=function(j,M){var G=this.startPosition;if(G<M&&(G=-1),G===-1||this.lastCurrentTime===-1){var K=j.startTimeOffset;Object(R.isFiniteNumber)(K)?(G=M+K,K<0&&(G+=j.totalduration),G=Math.min(Math.max(M,G),M+j.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+G),this.startPosition=G):j.live?G=this.hls.liveSyncPosition||M:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},_.getLoadPosition=function(){var j=this.media,M=0;return this.loadedmetadata&&j?M=j.currentTime:this.nextLoadPosition&&(M=this.nextLoadPosition),M},_.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))},_.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=A.IDLE)},_.onFragmentOrKeyLoadError=function(j,M){if(M.fatal)return;var G=M.frag;if(!G||G.type!==j)return;var K=this.fragCurrent;console.assert(K&&G.sn===K.sn&&G.level===K.level&&G.urlId===K.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+j+" "+G.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=A.FRAG_LOADING_WAITING_RETRY}else M.levelRetry?(j===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=A.IDLE):(f.logger.error(M.details+" reaches max retry, redispatch as fatal ..."),M.fatal=!0,this.hls.stopLoad(),this.state=A.ERROR)},_.afterBufferFlushed=function(j,M,G){if(!j)return;var K=S.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(M,K,G),this.state===A.ENDED&&this.resetLoadingState()},_.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=A.IDLE},_.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},_.updateLevelTiming=function(j,M,G,K){var H=this,z=G.details;console.assert(!!z,"level.details must be defined");var B=Object.keys(j.elementaryStreams).reduce(function(W,F){var $=j.elementaryStreams[F];if($){var ee=$.endPTS-$.startPTS;if(ee<=0)return H.warn("Could not parse fragment "+j.sn+" "+F+" duration reliably ("+ee+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),W||!1;var Z=K?0:Object(w.updateFragPTSDTS)(z,j,$.startPTS,$.endPTS,$.startDTS,$.endDTS);return H.hls.trigger(a.Events.LEVEL_PTS_UPDATED,{details:z,level:G,drift:Z,type:F,frag:j,start:$.startPTS,end:$.endPTS}),!0}return W},!1);B?(this.state=A.PARSED,this.hls.trigger(a.Events.FRAG_PARSED,{frag:j,part:M})):this.resetLoadingState()},_.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}(h.default)},"./src/controller/buffer-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m});var R=C("./src/polyfills/number.ts"),h=C("./src/events.ts"),s=C("./src/utils/logger.ts"),S=C("./src/errors.ts"),f=C("./src/utils/buffer-helper.ts"),a=C("./src/utils/mediasource-helper.ts"),o=C("./src/loader/fragment.ts"),r=C("./src/controller/buffer-operation-queue.ts"),x=Object(a.getMediaSource)(),g=/([ha]vc.)(?:\.[^.,]+)+/,m=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,c=n.media,T=n.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),c&&(n.updateMediaElementDuration(),l.trigger(h.Events.MEDIA_ATTACHED,{media:c})),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 p=w.prototype;return p.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},p.destroy=function(){this.unregisterListeners(),this.details=null},p.registerListeners=function(){var n=this.hls;n.on(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(h.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(h.Events.BUFFER_RESET,this.onBufferReset,this),n.on(h.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(h.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(h.Events.BUFFER_EOS,this.onBufferEos,this),n.on(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(h.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(h.Events.FRAG_PARSED,this.onFragParsed,this),n.on(h.Events.FRAG_CHANGED,this.onFragChanged,this)},p.unregisterListeners=function(){var n=this.hls;n.off(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(h.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(h.Events.BUFFER_RESET,this.onBufferReset,this),n.off(h.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(h.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(h.Events.BUFFER_EOS,this.onBufferEos,this),n.off(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(h.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(h.Events.FRAG_PARSED,this.onFragParsed,this),n.off(h.Events.FRAG_CHANGED,this.onFragChanged,this)},p._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},p.onManifestParsed=function(n,l){var c=2;(l.audio&&!l.video||!l.altAudio)&&(c=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=c,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},p.onMediaAttaching=function(n,l){var c=this.media=l.media;if(c&&x){var T=this.mediaSource=new x;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),c.src=self.URL.createObjectURL(T),this._objectUrl=c.src}},p.onMediaDetaching=function(){var n=this.media,l=this.mediaSource,c=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&&(c&&self.URL.revokeObjectURL(c),n.src===c?(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(h.Events.MEDIA_DETACHED,void 0)},p.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(l){var c=n.sourceBuffer[l];try{c&&(n.removeBufferListeners(l),n.mediaSource&&n.mediaSource.removeSourceBuffer(c),n.sourceBuffer[l]=void 0)}catch(T){s.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",T)}}),this._initSourceBuffer()},p.onBufferCodecs=function(n,l){var c=this,T=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(v){if(T){var i=c.tracks[v];if(i&&typeof i.buffer.changeType=="function"){var L=l[v],A=L.codec,y=L.levelCodec,E=L.container,b=(i.levelCodec||i.codec).replace(g,"$1"),_=(y||A).replace(g,"$1");if(b!==_){var I=E+";codecs="+(y||A);c.appendChangeType(v,I)}}}else c.pendingTracks[v]=l[v]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},p.appendChangeType=function(n,l){var c=this,T=this.operationQueue,v={execute:function(){var L=c.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(v,n)},p.onBufferAppending=function(n,l){var c=this,T=this.hls,v=this.operationQueue,i=this.tracks,L=l.data,A=l.type,y=l.frag,E=l.part,b=l.chunkMeta,_=b.buffering[A],I=self.performance.now();_.start=I;var j=y.stats.buffering,M=E?E.stats.buffering:null;j.start===0&&(j.start=I),M&&M.start===0&&(M.start=I);var G=i.audio,K=A==="audio"&&b.id===1&&(G==null?void 0:G.container)==="audio/mpeg",H={execute:function(){if(_.executeStart=self.performance.now(),K){var B=c.sourceBuffer[A];if(B){var W=y.start-B.timestampOffset;Math.abs(W)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+W+") sn: "+y.sn+")"),B.timestampOffset=y.start)}}c.appendExecutor(L,A)},onStart:function(){},onComplete:function(){var B=self.performance.now();_.executeEnd=_.end=B,j.first===0&&(j.first=B),M&&M.first===0&&(M.first=B);var W=c.sourceBuffer,F={};for(var $ in W)F[$]=f.BufferHelper.getBuffered(W[$]);c.appendError=0,c.hls.trigger(h.Events.BUFFER_APPENDED,{type:A,frag:y,part:E,chunkMeta:b,parent:y.type,timeRanges:F})},onError:function(B){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+A+" SourceBuffer",B);var W={type:S.ErrorTypes.MEDIA_ERROR,parent:y.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?W.details=S.ErrorDetails.BUFFER_FULL_ERROR:(c.appendError++,W.details=S.ErrorDetails.BUFFER_APPEND_ERROR,c.appendError>T.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),W.fatal=!0)),T.trigger(h.Events.ERROR,W)}};v.append(H,A)},p.onBufferFlushing=function(n,l){var c=this,T=this.operationQueue,v=function(L){return{execute:c.removeExecutor.bind(c,L,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){c.hls.trigger(h.Events.BUFFER_FLUSHED,{type:L})},onError:function(y){s.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",y)}}};l.type?T.append(v(l.type),l.type):this.getSourceBufferTypes().forEach(function(i){T.append(v(i),i)})},p.onFragParsed=function(n,l){var c=this,T=l.frag,v=l.part,i=[],L=v?v.elementaryStreams:T.elementaryStreams;L[o.ElementaryStreamTypes.AUDIOVIDEO]?i.push("audiovideo"):(L[o.ElementaryStreamTypes.AUDIO]&&i.push("audio"),L[o.ElementaryStreamTypes.VIDEO]&&i.push("video"));var A=function(){var E=self.performance.now();T.stats.buffering.end=E,v&&(v.stats.buffering.end=E);var b=v?v.stats:T.stats;c.hls.trigger(h.Events.FRAG_BUFFERED,{frag:T,part:v,stats:b,id:T.type})};i.length===0&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(A,i)},p.onFragChanged=function(n,l){this.flushBackBuffer()},p.onBufferEos=function(n,l){var c=this,T=this.getSourceBufferTypes().reduce(function(v,i){var L=c.sourceBuffer[i];return(!l.type||l.type===i)&&(L&&!L.ended&&(L.ended=!0,s.logger.log("[buffer-controller]: "+i+" sourceBuffer now EOS"))),v&&!!(!L||L.ended)},!0);T&&this.blockBuffers(function(){var v=c.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},p.onLevelUpdated=function(n,l){var c=l.details;if(!c.fragments.length)return;this.details=c,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},p.flushBackBuffer=function(){var n=this.hls,l=this.details,c=this.media,T=this.sourceBuffer;if(!c||l===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var i=l.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(R.isFiniteNumber)(i)||i<0)return;var L=c.currentTime,A=l.levelTargetDuration,y=Math.max(i,A),E=Math.floor(L/A)*A-y;v.forEach(function(b){var _=T[b];if(_){var I=f.BufferHelper.getBuffered(_);I.length>0&&E>I.start(0)&&(n.trigger(h.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),l.live&&n.trigger(h.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(h.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:b}))}})},p.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,l=this.hls,c=this.media,T=this.mediaSource,v=n.fragments[0].start+n.totalduration,i=c.duration,L=Object(R.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)):(v>L&&v>i||!Object(R.isFiniteNumber)(i))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),T.duration=v)},p.updateSeekableRange=function(n){var l=this.mediaSource,c=n.fragments,T=c.length;if(T&&n.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var v=Math.max(0,c[0].start),i=Math.max(v,v+n.totalduration);l.setLiveSeekableRange(v,i)}},p.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,l=this.operationQueue,c=this.pendingTracks,T=Object.keys(c).length;if(T&&!n||T===2){this.createSourceBuffers(c),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(h.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}v.forEach(function(i){l.executeNext(i)})}},p.createSourceBuffers=function(n){var l=this.sourceBuffer,c=this.mediaSource;if(!c)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var v in n)if(!l[v]){var i=n[v];if(!i)throw Error("source buffer exists for track "+v+", however track does not");var L=i.levelCodec||i.codec,A=i.container+";codecs="+L;s.logger.log("[buffer-controller]: creating sourceBuffer("+A+")");try{var y=l[v]=c.addSourceBuffer(A),E=v;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[v]={buffer:y,codec:L,container:i.container,levelCodec:i.levelCodec,id:i.id},T++}catch(b){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+b.message),this.hls.trigger(h.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:b,mimeType:A})}}T&&this.hls.trigger(h.Events.BUFFER_CREATED,{tracks:this.tracks})},p._onSBUpdateStart=function(n){var l=this.operationQueue,c=l.current(n);c.onStart()},p._onSBUpdateEnd=function(n){var l=this.operationQueue,c=l.current(n);c.onComplete(),l.shiftAndExecuteNext(n)},p._onSBUpdateError=function(n,l){s.logger.error("[buffer-controller]: "+n+" SourceBuffer error",l),this.hls.trigger(h.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var c=this.operationQueue.current(n);c&&c.onError(l)},p.removeExecutor=function(n,l,c){var T=this.media,v=this.mediaSource,i=this.operationQueue,L=this.sourceBuffer,A=L[n];if(!T||!v||!A){s.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(n);return}var y=Object(R.isFiniteNumber)(T.duration)?T.duration:Infinity,E=Object(R.isFiniteNumber)(v.duration)?v.duration:Infinity,b=Math.max(0,l),_=Math.min(c,y,E);_>b?(s.logger.log("[buffer-controller]: Removing ["+b+","+_+"] from the "+n+" SourceBuffer"),console.assert(!A.updating,n+" sourceBuffer must not be updating"),A.remove(b,_)):i.shiftAndExecuteNext(n)},p.appendExecutor=function(n,l){var c=this.operationQueue,T=this.sourceBuffer,v=T[l];if(!v){s.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),c.shiftAndExecuteNext(l);return}v.ended=!1,console.assert(!v.updating,l+" sourceBuffer must not be updating"),v.appendBuffer(n)},p.blockBuffers=function(n,l){var c=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,v=l.map(function(i){return T.appendBlocker(i)});Promise.all(v).then(function(){n(),l.forEach(function(i){var L=c.sourceBuffer[i];(!L||!L.updating)&&T.shiftAndExecuteNext(i)})})},p.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},p.addBufferListener=function(n,l,c){var T=this.sourceBuffer[n];if(!T)return;var v=c.bind(this,n);this.listeners[n].push({event:l,listener:v}),T.addEventListener(l,v)},p.removeBufferListeners=function(n){var l=this.sourceBuffer[n];if(!l)return;this.listeners[n].forEach(function(c){l.removeEventListener(c.event,c.listener)})},w}()},"./src/controller/buffer-operation-queue.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return h});var R=C("./src/utils/logger.ts"),h=function(){function s(f){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=f}var S=s.prototype;return S.append=function(a,o){var r=this.queues[o];r.push(a),r.length===1&&this.buffers[o]&&this.executeNext(o)},S.insertAbort=function(a,o){var r=this.queues[o];r.unshift(a),this.executeNext(o)},S.appendBlocker=function(a){var o,r=new Promise(function(g){o=g}),x={execute:o,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(x,a),r},S.executeNext=function(a){var o=this.buffers,r=this.queues,x=o[a],g=r[a];if(g.length){var m=g[0];try{m.execute()}catch(w){R.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),m.onError(w),(!x||!x.updating)&&(g.shift(),this.executeNext(a))}}},S.shiftAndExecuteNext=function(a){this.queues[a].shift(),this.executeNext(a)},S.current=function(a){return this.queues[a][0]},s}()},"./src/controller/cap-level-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts");function h(f,a){for(var o=0;o<a.length;o++){var r=a[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(f,r.key,r)}}function s(f,a,o){return a&&h(f.prototype,a),o&&h(f,o),f}var S=function(){function f(o){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=o,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var a=f.prototype;return a.setStreamController=function(r){this.streamController=r},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var r=this.hls;r.on(R.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var r=this.hls;r.off(R.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(r,x){f.isLevelAllowed(x.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(x.droppedLevel)},a.onMediaAttaching=function(r,x){this.media=x.media instanceof HTMLVideoElement?x.media:null},a.onManifestParsed=function(r,x){var g=this.hls;this.restrictedLevels=[],this.firstLevel=x.firstLevel,g.config.capLevelToPlayerSize&&x.video&&this.startCapping()},a.onBufferCodecs=function(r,x){var g=this.hls;g.config.capLevelToPlayerSize&&x.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var x=this.hls;x.autoLevelCapping=this.getMaxLevel(r.length-1),x.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=x.autoLevelCapping}}},a.getMaxLevel=function(r){var x=this,g=this.hls.levels;if(!g.length)return-1;var m=g.filter(function(w,p){return f.isLevelAllowed(p,x.restrictedLevels)&&p<=r});return this.clientRect=null,f.getMaxLevelByMediaSize(m,this.mediaWidth,this.mediaHeight)},a.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()},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,x={width:0,height:0};if(r){var g=r.getBoundingClientRect();x.width=g.width,x.height=g.height,!x.width&&!x.height&&(x.width=g.right-g.left||r.width||0,x.height=g.bottom-g.top||r.height||0)}return this.clientRect=x,x},f.isLevelAllowed=function(r,x){return x===void 0&&(x=[]),x.indexOf(r)===-1},f.getMaxLevelByMediaSize=function(r,x,g){if(!r||!r.length)return-1;for(var m=function(l,c){return c?l.width!==c.width||l.height!==c.height:!0},w=r.length-1,p=0;p<r.length;p+=1){var d=r[p];if((d.width>=x||d.height>=g)&&m(d,r[p+1])){w=p;break}}return w},s(f,[{key:"mediaWidth",get:function(){return this.getDimensions().width*f.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*f.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(x){}return r}}]),f}();u.default=S},"./src/controller/cmcd-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m});var R=C("./src/events.ts"),h=C("./src/types/cmcd.ts"),s=C("./src/utils/buffer-helper.ts"),S=C("./src/utils/logger.ts");function f(w,p){for(var d=0;d<p.length;d++){var n=p[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(w,n.key,n)}}function a(w,p,d){return p&&f(w.prototype,p),d&&f(w,d),w}function o(w,p){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))||p&&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,p){if(!w)return;if(typeof w=="string")return x(w,p);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 x(w,p)}function x(w,p){(p==null||p>w.length)&&(p=w.length);for(var d=0,n=new Array(p);d<p;d++)n[d]=w[d];return n}function g(){return g=Object.assign||function(w){for(var p=1;p<arguments.length;p++){var d=arguments[p];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(w[n]=d[n])}return w},g.apply(this,arguments)}var m=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:h.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(v){S.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(T){try{var v=T.frag,i=n.hls.levels[v.level],L=n.getObjectType(v),A={d:v.duration*1e3,ot:L};(L===h.CMCDObjectType.VIDEO||L===h.CMCDObjectType.AUDIO||L==h.CMCDObjectType.MUXED)&&(A.br=i.bitrate/1e3,A.tb=n.getTopBandwidth(L),A.bl=n.getBufferLength(L)),n.apply(T,A)}catch(y){S.logger.warn("Could not generate segment CMCD data.",y)}},this.hls=d;var l=this.config=d.config,c=l.cmcd;c!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=c.sessionId||w.uuid(),this.cid=c.contentId,this.useHeaders=c.useHeaders===!0,this.registerListeners())}var p=w.prototype;return p.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this)},p.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},p.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},p.onMediaAttached=function(n,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},p.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},p.onBufferCreated=function(n,l){var c,T;this.audioBuffer=(c=l.tracks.audio)===null||c===void 0?void 0:c.buffer,this.videoBuffer=(T=l.tracks.video)===null||T===void 0?void 0:T.buffer},p.createData=function(){var n;return{v:h.CMCDVersion,sf:h.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}},p.apply=function(n,l){l===void 0&&(l={}),g(l,this.createData());var c=l.ot===h.CMCDObjectType.INIT||l.ot===h.CMCDObjectType.VIDEO||l.ot===h.CMCDObjectType.MUXED;if(this.starved&&c&&(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={}),g(n.headers,T)}else{var v=w.toQuery(l);if(!v)return;n.url=w.appendQueryToUri(n.url,v)}},p.getObjectType=function(n){var l=n.type;return l==="subtitle"?h.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?h.CMCDObjectType.INIT:l==="audio"?h.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?h.CMCDObjectType.VIDEO:h.CMCDObjectType.MUXED:void 0},p.getTopBandwidth=function(n){for(var l=0,c=n===h.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,T=o(c),v;!(v=T()).done;){var i=v.value;i.bitrate>l&&(l=i.bitrate)}return l>0?l:NaN},p.getBufferLength=function(n){var l=this.hls.media,c=n===h.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!c||!l)return NaN;var T=s.BufferHelper.bufferInfo(c,l.currentTime,this.config.maxBufferHole);return T.len*1e3},p.createPlaylistLoader=function(){var n=this.config.pLoader,l=this.applyPlaylistData,c=n||this.config.loader;return function(){function T(i){this.loader=void 0,this.loader=new c(i)}var v=T.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(L,A,y){l(L),this.loader.load(L,A,y)},a(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},p.createFragmentLoader=function(){var n=this.config.fLoader,l=this.applyFragmentData,c=n||this.config.loader;return function(){function T(i){this.loader=void 0,this.loader=new c(i)}var v=T.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(L,A,y){l(L),this.loader.load(L,A,y)},a(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=[],c=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},T=function(K){return Math.round(K)},v=function(K){return T(K/100)*100},i=function(K){return encodeURIComponent(K)},L={br:T,d:T,bl:v,dl:v,mtp:v,nor:i,rtp:v,tb:T},A=Object.keys(n||{}).sort(),y=o(A),E;!(E=y()).done;){var b=E.value,_=n[b];if(!c(_))continue;if(b==="v"&&_===1)continue;if(b=="pr"&&_===1)continue;var I=L[b];I&&(_=I(_));var j=typeof _,M=void 0;b==="ot"||b==="sf"||b==="st"?M=b+"="+_:j==="boolean"?M=b:j==="number"?M=b+"="+_:M=b+"="+JSON.stringify(_),l.push(M)}return l.join(",")},w.toHeaders=function(n){for(var l=Object.keys(n),c={},T=["Object","Request","Session","Status"],v=[{},{},{},{}],i={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,A=l;L<A.length;L++){var y=A[L],E=i[y]!=null?i[y]:1;v[E][y]=n[y]}for(var b=0;b<v.length;b++){var _=w.serialize(v[b]);_&&(c["CMCD-"+T[b]]=_)}return c},w.toQuery=function(n){return"CMCD="+encodeURIComponent(w.serialize(n))},w.appendQueryToUri=function(n,l){if(!l)return n;var c=n.includes("?")?"&":"?";return""+n+c+l},w}()},"./src/controller/eme-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/utils/logger.ts"),S=C("./src/utils/mediakeys-helper.ts");function f(m,w){for(var p=0;p<w.length;p++){var d=w[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(m,d.key,d)}}function a(m,w,p){return w&&f(m.prototype,w),p&&f(m,p),m}var o=3,r=function(w,p,d){var n={audioCapabilities:[],videoCapabilities:[]};return w.forEach(function(l){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:d.audioRobustness||""})}),p.forEach(function(l){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:d.videoRobustness||""})}),[n]},x=function(w,p,d,n){switch(w){case S.KeySystems.WIDEVINE:return r(p,d,n);default:throw new Error("Unknown key-system: "+w)}},g=function(){function m(p){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=p,this._config=p.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=m.prototype;return w.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},w._registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this)},w._unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(R.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 c=this,T=x(d,n,l,this._drmSystemOptions);s.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(d,T);this.mediaKeysPromise=v.then(function(i){return c._onMediaKeySystemAccessObtained(d,i)}),v.catch(function(i){s.logger.error('Failed to obtain key-system "'+d+'" access:',i)})},w._onMediaKeySystemAccessObtained=function(d,n){var l=this;s.logger.log('Access for key-system "'+d+'" obtained');var c={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:d};this._mediaKeysList.push(c);var T=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(v){return c.mediaKeys=v,s.logger.log('Media-keys created for key-system "'+d+'"'),l._onMediaKeysCreated(),v});return T.catch(function(v){s.logger.error("Failed to create media-keys:",v)}),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(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.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(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.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,c=this._mediaKeysList[0];if(!c){s.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(c.mediaKeysSessionInitialized){s.logger.warn("Key-Session already initialized but requested again");return}var T=c.mediaKeysSession;if(!T){s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.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(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}s.logger.log('Generating key-session request for "'+d+'" init data type'),c.mediaKeysSessionInitialized=!0,T.generateRequest(d,n).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(v){s.logger.error("Error generating key-session request:",v),l.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},w._createLicenseXhr=function(d,n,l){var c=new XMLHttpRequest;c.responseType="arraybuffer",c.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,c,d,n,l);var T=this._licenseXhrSetup;if(T)try{T.call(this.hls,c,d),T=void 0}catch(v){s.logger.error(v)}try{c.readyState||c.open("POST",d,!0),T&&T.call(this.hls,c,d)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return c},w._onLicenseRequestReadyStageChange=function(d,n,l,c){switch(d.readyState){case 4:if(d.status===200){this._requestLicenseFailureCount=0,s.logger.log("License request succeeded");var T=d.response,v=this._licenseResponseCallback;if(v)try{T=v.call(this.hls,d,n)}catch(L){s.logger.error(L)}c(T)}else{if(s.logger.error("License Request XHR failed ("+n+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>o){this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var i=o-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+i+" attempts left"),this._requestLicense(l,c)}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(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var c=this.getLicenseServerUrl(l.mediaKeySystemDomain),T=this._createLicenseXhr(c,d,n);s.logger.log("Sending license request to URL: "+c);var v=this._generateLicenseRequestChallenge(l,d);T.send(v)}catch(i){s.logger.error("Failure requesting DRM license: "+i),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.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}),c=n.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,l,c)},a(m,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),m}();u.default=g},"./src/controller/fps-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/utils/logger.ts"),s=function(){function S(a){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=a,this.registerListeners()}var f=S.prototype;return f.setStreamController=function(o){this.streamController=o},f.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},f.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching)},f.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},f.onMediaAttaching=function(o,r){var x=this.hls.config;if(x.capLevelOnFPSDrop){var g=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=g,g&&typeof g.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),x.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(o,r,x){var g=performance.now();if(r){if(this.lastTime){var m=g-this.lastTime,w=x-this.lastDroppedFrames,p=r-this.lastDecodedFrames,d=1e3*w/m,n=this.hls;if(n.trigger(R.Events.FPS_DROP,{currentDropped:w,currentDecoded:p,totalDroppedFrames:x}),d>0&&w>n.config.fpsDroppedMonitoringThreshold*p){var l=n.currentLevel;h.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(R.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:n.currentLevel}),n.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=g,this.lastDroppedFrames=x,this.lastDecodedFrames=r}},f.checkFPSInterval=function(){var o=this.media;if(o)if(this.isVideoPlaybackQualityAvailable){var r=o.getVideoPlaybackQuality();this.checkFPS(o,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},S}();u.default=s},"./src/controller/fragment-finders.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"findFragmentByPDT",function(){return s}),C.d(u,"findFragmentByPTS",function(){return S}),C.d(u,"fragmentWithinToleranceTest",function(){return f}),C.d(u,"pdtWithinToleranceTest",function(){return a}),C.d(u,"findFragWithCC",function(){return o});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/binary-search.ts");function s(r,x,g){if(x===null||!Array.isArray(r)||!r.length||!Object(R.isFiniteNumber)(x))return null;var m=r[0].programDateTime;if(x<(m||0))return null;var w=r[r.length-1].endProgramDateTime;if(x>=(w||0))return null;g=g||0;for(var p=0;p<r.length;++p){var d=r[p];if(a(x,g,d))return d}return null}function S(r,x,g,m){g===void 0&&(g=0),m===void 0&&(m=0);var w=null;if(r?w=x[r.sn-x[0].sn+1]||null:g===0&&x[0].start===0&&(w=x[0]),w&&f(g,m,w)===0)return w;var p=h.default.search(x,f.bind(null,g,m));return p||w}function f(r,x,g){r===void 0&&(r=0),x===void 0&&(x=0);var m=Math.min(x,g.duration+(g.deltaPTS?g.deltaPTS:0));return g.start+g.duration-m<=r?1:g.start-m>r&&g.start?-1:0}function a(r,x,g){var m=Math.min(x,g.duration+(g.deltaPTS?g.deltaPTS:0))*1e3,w=g.endProgramDateTime||0;return w-m>r}function o(r,x){return h.default.search(r,function(g){return g.cc<x?1:g.cc>x?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"FragmentState",function(){return s}),C.d(u,"FragmentTracker",function(){return S});var R=C("./src/events.ts"),h=C("./src/types/loader.ts"),s;(function(o){o.NOT_LOADED="NOT_LOADED",o.BACKTRACKED="BACKTRACKED",o.APPENDING="APPENDING",o.PARTIAL="PARTIAL",o.OK="OK"})(s||(s={}));var S=function(){function o(x){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=x,this._registerListeners()}var r=o.prototype;return r._registerListeners=function(){var g=this.hls;g.on(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.on(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var g=this.hls;g.off(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.off(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(g,m){if(m===h.PlaylistLevelType.MAIN){var w=this.activeFragment,p=this.activeParts;if(!w)return null;if(p)for(var d=p.length;d--;){var n=p[d],l=n?n.end:w.appendedPTS;if(n.start<=g&&l!==void 0&&g<=l)return d>9&&(this.activeParts=p.slice(d-9)),n}else if(w.start<=g&&w.appendedPTS!==void 0&&g<=w.appendedPTS)return w}return this.getBufferedFrag(g,m)},r.getBufferedFrag=function(g,m){for(var w=this.fragments,p=Object.keys(w),d=p.length;d--;){var n=w[p[d]];if((n==null?void 0:n.body.type)===m&&n.buffered){var l=n.body;if(l.start<=g&&g<=l.end)return l}}return null},r.detectEvictedFragments=function(g,m,w){var p=this;Object.keys(this.fragments).forEach(function(d){var n=p.fragments[d];if(!n)return;if(!n.buffered){n.body.type===w&&p.removeFragment(n.body);return}var l=n.range[g];if(!l)return;l.time.some(function(c){var T=!p.isTimeBuffered(c.startPTS,c.endPTS,m);return T&&p.removeFragment(n.body),T})})},r.detectPartialFragments=function(g){var m=this,w=this.timeRanges,p=g.frag,d=g.part;if(!w||p.sn==="initSegment")return;var n=a(p),l=this.fragments[n];if(!l)return;Object.keys(w).forEach(function(c){var T=p.elementaryStreams[c];if(!T)return;var v=w[c],i=d!==null||T.partial===!0;l.range[c]=m.getBufferedTimes(p,d,i,v)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},r.fragBuffered=function(g){var m=a(g),w=this.fragments[m];w&&(w.backtrack=w.loaded=null,w.buffered=!0)},r.getBufferedTimes=function(g,m,w,p){for(var d={time:[],partial:w},n=m?m.start:g.start,l=m?m.end:g.end,c=g.minEndPTS||l,T=g.maxStartPTS||n,v=0;v<p.length;v++){var i=p.start(v)-this.bufferPadding,L=p.end(v)+this.bufferPadding;if(T>=i&&c<=L){d.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});break}else if(n<L&&l>i)d.partial=!0,d.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});else if(l<=i)break}return d},r.getPartialFragment=function(g){var m=null,w,p,d,n=0,l=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach(function(T){var v=c[T];if(!v)return;f(v)&&(p=v.body.start-l,d=v.body.end+l,g>=p&&g<=d&&(w=Math.min(g-p,d-g),n<=w&&(m=v.body,n=w)))}),m},r.getState=function(g){var m=a(g),w=this.fragments[m];return w?w.buffered?f(w)?s.PARTIAL:s.OK:w.backtrack?s.BACKTRACKED:s.APPENDING:s.NOT_LOADED},r.backtrack=function(g,m){var w=a(g),p=this.fragments[w];if(!p||p.backtrack)return null;var d=p.backtrack=m||p.loaded;return p.loaded=null,d},r.getBacktrackData=function(g){var m=a(g),w=this.fragments[m];if(w){var p,d=w.backtrack;if(d!=null&&(p=d.payload)!==null&&p!==void 0&&p.byteLength)return d;this.removeFragment(g)}return null},r.isTimeBuffered=function(g,m,w){for(var p,d,n=0;n<w.length;n++){if(p=w.start(n)-this.bufferPadding,d=w.end(n)+this.bufferPadding,g>=p&&m<=d)return!0;if(m<=p)return!1}return!1},r.onFragLoaded=function(g,m){var w=m.frag,p=m.part;if(w.sn==="initSegment"||w.bitrateTest||p)return;var d=a(w);this.fragments[d]={body:w,loaded:m,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(g,m){var w=this,p=m.frag,d=m.part,n=m.timeRanges;if(p.type===h.PlaylistLevelType.MAIN)if(this.activeFragment=p,d){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(d)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(c){var T=n[c];if(w.detectEvictedFragments(c,T),!d)for(var v=0;v<T.length;v++)p.appendedPTS=Math.max(T.end(v),p.appendedPTS||0)})},r.onFragBuffered=function(g,m){this.detectPartialFragments(m)},r.hasFragment=function(g){var m=a(g);return!!this.fragments[m]},r.removeFragmentsInRange=function(g,m,w){var p=this;Object.keys(this.fragments).forEach(function(d){var n=p.fragments[d];if(!n)return;if(n.buffered){var l=n.body;l.type===w&&l.start<m&&l.end>g&&p.removeFragment(l)}})},r.removeFragment=function(g){var m=a(g);g.stats.loaded=0,g.clearElementaryStreamInfo(),delete this.fragments[m]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},o}();function f(o){var r,x;return o.buffered&&(((r=o.range.video)===null||r===void 0?void 0:r.partial)||((x=o.range.audio)===null||x===void 0?void 0:x.partial))}function a(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn}},"./src/controller/gap-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"STALL_MINIMUM_DURATION_MS",function(){return f}),C.d(u,"MAX_START_GAP_JUMP",function(){return a}),C.d(u,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return o}),C.d(u,"SKIP_BUFFER_RANGE_START",function(){return r}),C.d(u,"default",function(){return x});var R=C("./src/utils/buffer-helper.ts"),h=C("./src/errors.ts"),s=C("./src/events.ts"),S=C("./src/utils/logger.ts"),f=250,a=2,o=.1,r=.05,x=function(){function g(w,p,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=p,this.fragmentTracker=d,this.hls=n}var m=g.prototype;return m.destroy=function(){this.hls=this.fragmentTracker=this.media=null},m.poll=function(p){var d=this.config,n=this.media,l=this.stalled,c=n.currentTime,T=n.seeking,v=this.seeking&&!T,i=!this.seeking&&T;if(this.seeking=T,c!==p){if(this.moved=!0,l!==null){if(this.stallReported){var L=self.performance.now()-l;S.logger.warn("playback not stuck anymore @"+c+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((i||v)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!R.BufferHelper.getBuffered(n).length)return;var A=R.BufferHelper.bufferInfo(n,c,0),y=A.len>0,E=A.nextStart||0;if(!y&&!E)return;if(T){var b=A.len>a,_=!E||E-c>a&&!this.fragmentTracker.getPartialFragment(c);if(b||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var I,j=Math.max(E,A.start||0)-c,M=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=M==null||((I=M.details)===null||I===void 0)?void 0:I.live,K=G?M.details.targetduration*2:a;if(j>0&&j<=K){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(l===null){this.stalled=H;return}var z=H-l;!T&&z>=f&&this._reportStall(A.len);var B=R.BufferHelper.bufferInfo(n,c,d.maxBufferHole);this._tryFixBufferStall(B,z)},m._tryFixBufferStall=function(p,d){var n=this.config,l=this.fragmentTracker,c=this.media,T=c.currentTime,v=l.getPartialFragment(T);if(v){var i=this._trySkipBufferHole(v);if(i)return}p.len>n.maxBufferHole&&d>n.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},m._reportStall=function(p){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="+p+")"),d.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:p}))},m._trySkipBufferHole=function(p){for(var d=this.config,n=this.hls,l=this.media,c=l.currentTime,T=0,v=R.BufferHelper.getBuffered(l),i=0;i<v.length;i++){var L=v.start(i);if(c+d.maxBufferHole>=T&&c<L){var A=Math.max(L+r,l.currentTime+o);return S.logger.warn("skipping hole, adjusting currentTime from "+c+" to "+A),this.moved=!0,this.stalled=null,l.currentTime=A,p&&n.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+c+" to "+A,frag:p}),A}T=v.end(i)}return 0},m._tryNudgeBuffer=function(){var p=this.config,d=this.hls,n=this.media,l=n.currentTime,c=(this.nudgeRetry||0)+1;if(this.nudgeRetry=c,c<p.nudgeMaxRetry){var T=l+c*p.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+l+" to "+T),n.currentTime=T,d.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+p.nudgeMaxRetry+" nudges"),d.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},g}()},"./src/controller/id3-track-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/utils/texttrack-utils.ts"),s=C("./src/demux/id3.ts"),S=.25,f=function(){function a(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var o=a.prototype;return o.destroy=function(){this._unregisterListeners()},o._registerListeners=function(){var x=this.hls;x.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(R.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),x.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},o._unregisterListeners=function(){var x=this.hls;x.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(R.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),x.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},o.onMediaAttached=function(x,g){this.media=g.media},o.onMediaDetaching=function(){if(!this.id3Track)return;Object(h.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},o.getID3Track=function(x){if(!this.media)return;for(var g=0;g<x.length;g++){var m=x[g];if(m.kind==="metadata"&&m.label==="id3")return Object(h.sendAddTrackEvent)(m,this.media),m}return this.media.addTextTrack("metadata","id3")},o.onFragParsingMetadata=function(x,g){if(!this.media)return;var m=g.frag,w=g.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var p=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,c=d<w.length-1?w[d+1].pts:m.end,T=c-l;T<=0&&(c=l+S);for(var v=0;v<n.length;v++){var i=n[v];if(!s.isTimeStampFrame(i)){var L=new p(l,c,"");L.value=i,this.id3Track.addCue(L)}}}}},o.onBufferFlushing=function(x,g){var m=g.startOffset,w=g.endOffset,p=g.type;if(!p||p==="audio"){var d=this.id3Track;d&&Object(h.removeCuesInRange)(d,m,w)}},a}();u.default=f},"./src/controller/latency-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return a});var R=C("./src/errors.ts"),h=C("./src/events.ts"),s=C("./src/utils/logger.ts");function S(o,r){for(var x=0;x<r.length;x++){var g=r[x];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}function f(o,r,x){return r&&S(o.prototype,r),x&&S(o,x),o}var a=function(){function o(x){var g=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 g.timeupdate()},this.hls=x,this.config=x.config,this.registerListeners()}var r=o.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(h.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(h.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(h.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(h.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(h.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(h.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(h.Events.ERROR,this.onError)},r.onMediaAttached=function(g,m){this.media=m.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(g,m){var w=m.details;this.levelDetails=w,w.advanced&&this.timeupdate(),!w.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(g,m){if(m.details!==R.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,s.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var g=this.media,m=this.levelDetails;if(!g||!m)return;this.currentTime=g.currentTime;var w=this.computeLatency();if(w===null)return;this._latency=w;var p=this.config,d=p.lowLatencyMode,n=p.maxLiveSyncPlaybackRate;if(!d||n===1)return;var l=this.targetLatency;if(l===null)return;var c=w-l,T=Math.min(this.maxLatency,l+m.targetduration),v=c<T;if(m.live&&v&&c>.05&&this.forwardBufferLength>1){var i=Math.min(2,Math.max(1,n)),L=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20;g.playbackRate=Math.min(i,Math.max(1,L))}else g.playbackRate!==1&&g.playbackRate!==0&&(g.playbackRate=1)},r.estimateLiveEdge=function(){var g=this.levelDetails;return g===null?null:g.edge+g.age},r.computeLatency=function(){var g=this.estimateLiveEdge();return g===null?null:g-this.currentTime},f(o,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var g=this.config,m=this.levelDetails;return g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:m?g.liveMaxLatencyDurationCount*m.targetduration:0}},{key:"targetLatency",get:function(){var g=this.levelDetails;if(g===null)return null;var m=g.holdBack,w=g.partHoldBack,p=g.targetduration,d=this.config,n=d.liveSyncDuration,l=d.liveSyncDurationCount,c=d.lowLatencyMode,T=this.hls.userConfig,v=c&&w||m;(T.liveSyncDuration||T.liveSyncDurationCount||v===0)&&(v=n!==void 0?n:l*p);var i=p,L=1;return v+Math.min(this.stallCount*L,i)}},{key:"liveSyncPosition",get:function(){var g=this.estimateLiveEdge(),m=this.targetLatency,w=this.levelDetails;if(g===null||m===null||w===null)return null;var p=w.edge,d=g-m-this.edgeStalled,n=p-w.totalduration,l=p-(this.config.lowLatencyMode&&w.partTarget||w.targetduration);return Math.min(Math.max(n,d),l)}},{key:"drift",get:function(){var g=this.levelDetails;return g===null?1:g.drift}},{key:"edgeStalled",get:function(){var g=this.levelDetails;if(g===null)return 0;var m=(this.config.lowLatencyMode&&g.partTarget||g.targetduration)*3;return Math.max(g.age-m,0)}},{key:"forwardBufferLength",get:function(){var g=this.media,m=this.levelDetails;if(!g||!m)return 0;var w=g.buffered.length;return w?g.buffered.end(w-1):m.edge-this.currentTime}}]),o}()},"./src/controller/level-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return d});var R=C("./src/types/level.ts"),h=C("./src/events.ts"),s=C("./src/errors.ts"),S=C("./src/utils/codecs.ts"),f=C("./src/controller/level-helper.ts"),a=C("./src/controller/base-playlist-controller.ts"),o=C("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var l=1;l<arguments.length;l++){var c=arguments[l];for(var T in c)Object.prototype.hasOwnProperty.call(c,T)&&(n[T]=c[T])}return n},r.apply(this,arguments)}function x(n,l){for(var c=0;c<l.length;c++){var T=l[c];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function g(n,l,c){return l&&x(n.prototype,l),c&&x(n,c),n}function m(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,v){return T.__proto__=v,T},w(n,l)}var p=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(n){m(l,n);function l(T){var v;return v=n.call(this,T,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var c=l.prototype;return c._registerListeners=function(){var v=this.hls;v.on(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(h.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(h.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(h.Events.ERROR,this.onError,this)},c._unregisterListeners=function(){var v=this.hls;v.off(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(h.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(h.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(h.Events.ERROR,this.onError,this)},c.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},c.startLoad=function(){var v=this._levels;v.forEach(function(i){i.loadError=0}),n.prototype.startLoad.call(this)},c.onManifestLoaded=function(v,i){var L=[],A=[],y=[],E,b={},_,I=!1,j=!1,M=!1;if(i.levels.forEach(function(z){var B=z.attrs;I=I||!!(z.width&&z.height),j=j||!!z.videoCodec,M=M||!!z.audioCodec,p&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var W=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;_=b[W],_?_.url.push(z.url):(_=new R.Level(z),b[W]=_,L.push(_)),B&&(B.AUDIO&&Object(f.addGroupId)(_,"audio",B.AUDIO),B.SUBTITLES&&Object(f.addGroupId)(_,"text",B.SUBTITLES))}),(I||j)&&M&&(L=L.filter(function(z){var B=z.videoCodec,W=z.width,F=z.height;return!!B||!!(W&&F)})),L=L.filter(function(z){var B=z.audioCodec,W=z.videoCodec;return(!B||Object(S.isCodecSupportedInMp4)(B,"audio"))&&(!W||Object(S.isCodecSupportedInMp4)(W,"video"))}),i.audioTracks&&(A=i.audioTracks.filter(function(z){return!z.audioCodec||Object(S.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(f.assignTrackIdsByGroup)(A)),i.subtitles&&(y=i.subtitles,Object(f.assignTrackIdsByGroup)(y)),L.length>0){E=L[0].bitrate,L.sort(function(z,B){return z.bitrate-B.bitrate}),this._levels=L;for(var G=0;G<L.length;G++)if(L[G].bitrate===E){this._firstLevel=G,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+E);break}var K=M&&!j,H={levels:L,audioTracks:A,subtitleTracks:y,firstLevel:this._firstLevel,stats:i.stats,audio:M,video:j,altAudio:!K&&A.some(function(z){return!!z.url})};this.hls.trigger(h.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(h.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:i.url,reason:"no level with compatible codecs found in manifest"})},c.onError=function(v,i){if(n.prototype.onError.call(this,v,i),i.fatal)return;var L=i.context,A=this._levels[this.currentLevelIndex];if(L&&(L.type===o.PlaylistContextType.AUDIO_TRACK&&A.audioGroupIds&&L.groupId===A.audioGroupIds[A.urlId]||L.type===o.PlaylistContextType.SUBTITLE_TRACK&&A.textGroupIds&&L.groupId===A.textGroupIds[A.urlId])){this.redundantFailover(this.currentLevelIndex);return}var y=!1,E=!0,b;switch(i.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(i.frag){var _=this._levels[i.frag.level];_?(_.fragmentError++,_.fragmentError>this.hls.config.fragLoadingMaxRetry&&(b=i.frag.level)):b=i.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(E=!1),b=L.level),y=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:b=i.level,y=!0;break}b!==void 0&&this.recoverLevel(i,b,y,E)},c.recoverLevel=function(v,i,L,A){var y=v.details,E=this._levels[i];if(E.loadError++,L){var b=this.retryLoadingOrFail(v);if(b)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(A){var _=E.url.length;if(_>1&&E.loadError<_)v.levelRetry=!0,this.redundantFailover(i);else if(this.manualLevelIndex===-1){var I=i===0?this._levels.length-1:i-1;this.currentLevelIndex!==I&&this._levels[I].loadError===0&&(this.warn(y+": switch to "+I),v.levelRetry=!0,this.hls.nextAutoLevel=I)}}},c.redundantFailover=function(v){var i=this._levels[v],L=i.url.length;if(L>1){var A=(i.urlId+1)%L;this.warn("Switching to redundant URL-id "+A),this._levels.forEach(function(y){y.urlId=A}),this.level=v}},c.onFragLoaded=function(v,i){var L=i.frag;if(L!==void 0&&L.type===o.PlaylistLevelType.MAIN){var A=this._levels[L.level];A!==void 0&&(A.fragmentError=0,A.loadError=0)}},c.onLevelLoaded=function(v,i){var L,A=i.level,y=i.details,E=this._levels[A];if(!E){var b;this.warn("Invalid level index "+A),(b=i.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(y.deltaUpdateFailed=!0);return}A===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(A,i,E.details)):(L=i.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(y.deltaUpdateFailed=!0)},c.onAudioTrackSwitched=function(v,i){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var A=-1,y=this.hls.audioTracks[i.id].groupId,E=0;E<L.audioGroupIds.length;E++)if(L.audioGroupIds[E]===y){A=E;break}A!==L.urlId&&(L.urlId=A,this.startLoad())}},c.loadPlaylist=function(v){var i=this.currentLevelIndex,L=this._levels[i];if(this.canLoad&&L&&L.url.length>0){var A=L.urlId,y=L.url[A];if(v)try{y=v.addDirectives(y)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+i+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+A+" "+y),this.clearTimer(),this.hls.trigger(h.Events.LEVEL_LOADING,{url:y,level:i,id:A,deliveryDirectives:v||null})}},c.removeLevel=function(v,i){var L=function(E,b){return b!==i},A=this._levels.filter(function(y,E){return E!==v?!0:y.url.length>1&&i!==void 0?(y.url=y.url.filter(L),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(L)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(L)),y.urlId=0,!0):!1}).map(function(y,E){var b=y.details;return b!=null&&b.fragments&&b.fragments.forEach(function(_){_.level=E}),y});this._levels=A,this.hls.trigger(h.Events.LEVELS_UPDATED,{levels:A})},g(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var i,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===v&&(i=L[v])!==null&&i!==void 0&&i.details)return;if(v<0||v>=L.length){var A=v<0;if(this.hls.trigger(h.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:A,reason:"invalid level idx"}),A)return;v=Math.min(v,L.length-1)}this.clearTimer();var y=this.currentLevelIndex,E=L[y],b=L[v];this.log("switching to level "+v+" from "+y),this.currentLevelIndex=v;var _=r({},b,{level:v,maxBitrate:b.maxBitrate,uri:b.uri,urlId:b.urlId});delete _._urlId,this.hls.trigger(h.Events.LEVEL_SWITCHING,_);var I=b.details;if(!I||I.live){var j=this.switchParams(b.uri,E==null?void 0:E.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),l}(a.default)},"./src/controller/level-helper.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"addGroupId",function(){return s}),C.d(u,"assignTrackIdsByGroup",function(){return S}),C.d(u,"updatePTS",function(){return f}),C.d(u,"updateFragPTSDTS",function(){return o}),C.d(u,"mergeDetails",function(){return r}),C.d(u,"mapPartIntersection",function(){return x}),C.d(u,"mapFragmentIntersection",function(){return g}),C.d(u,"adjustSliding",function(){return m}),C.d(u,"addSliding",function(){return w}),C.d(u,"computeReloadInterval",function(){return p}),C.d(u,"getFragmentWithSN",function(){return d}),C.d(u,"getPartWith",function(){return n});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/logger.ts");function s(l,c,T){switch(c){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 c={};l.forEach(function(T){var v=T.groupId||"";T.id=c[v]=c[v]||0,c[v]++})}function f(l,c,T){var v=l[c],i=l[T];a(v,i)}function a(l,c){var T=c.startPTS;if(Object(R.isFiniteNumber)(T)){var v=0,i;c.sn>l.sn?(v=T-l.start,i=l):(v=l.start-T,i=c),i.duration!==v&&(i.duration=v)}else if(c.sn>l.sn){var L=l.cc===c.cc;L&&l.minEndPTS?c.start=l.start+(l.minEndPTS-l.start):c.start=l.start+l.duration}else c.start=Math.max(l.start-c.duration,0)}function o(l,c,T,v,i,L){var A=v-T;A<=0&&(h.logger.warn("Fragment should have a positive duration",c),v=T+c.duration,L=i+c.duration);var y=T,E=v,b=c.startPTS,_=c.endPTS;if(Object(R.isFiniteNumber)(b)){var I=Math.abs(b-T);Object(R.isFiniteNumber)(c.deltaPTS)?c.deltaPTS=Math.max(I,c.deltaPTS):c.deltaPTS=I,y=Math.max(T,b),T=Math.min(T,b),i=Math.min(i,c.startDTS),E=Math.min(v,_),v=Math.max(v,_),L=Math.max(L,c.endDTS)}c.duration=v-T;var j=T-c.start;c.appendedPTS=v,c.start=c.startPTS=T,c.maxStartPTS=y,c.startDTS=i,c.endPTS=v,c.minEndPTS=E,c.endDTS=L;var M=c.sn;if(!l||M<l.startSN||M>l.endSN)return 0;var G,K=M-l.startSN,H=l.fragments;for(H[K]=c,G=K;G>0;G--)a(H[G],H[G-1]);for(G=K;G<H.length-1;G++)a(H[G],H[G+1]);return l.fragmentHint&&a(H[H.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,j}function r(l,c){for(var T=null,v=l.fragments,i=v.length-1;i>=0;i--){var L=v[i].initSegment;if(L){T=L;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var A=0,y;if(g(l,c,function(G,K){G.relurl&&(A=G.cc-K.cc),Object(R.isFiniteNumber)(G.startPTS)&&Object(R.isFiniteNumber)(G.endPTS)&&(K.start=K.startPTS=G.startPTS,K.startDTS=G.startDTS,K.appendedPTS=G.appendedPTS,K.maxStartPTS=G.maxStartPTS,K.endPTS=G.endPTS,K.endDTS=G.endDTS,K.minEndPTS=G.minEndPTS,K.duration=G.endPTS-G.startPTS,K.duration&&(y=K),c.PTSKnown=c.alignedSliding=!0),K.elementaryStreams=G.elementaryStreams,K.loader=G.loader,K.stats=G.stats,K.urlId=G.urlId,G.initSegment&&(K.initSegment=G.initSegment,T=G.initSegment)}),T){var E=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;E.forEach(function(G){var K;(!G.initSegment||G.initSegment.relurl===((K=T)===null||K===void 0?void 0:K.relurl))&&(G.initSegment=T)})}if(c.skippedSegments&&(c.deltaUpdateFailed=c.fragments.some(function(G){return!G}),c.deltaUpdateFailed)){h.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var b=c.skippedSegments;b--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}var _=c.fragments;if(A){h.logger.warn("discontinuity sliding from playlist, take drift into account");for(var I=0;I<_.length;I++)_[I].cc+=A}c.skippedSegments&&(c.startCC=c.fragments[0].cc),x(l.partList,c.partList,function(G,K){K.elementaryStreams=G.elementaryStreams,K.stats=G.stats}),y?o(c,y,y.startPTS,y.endPTS,y.startDTS,y.endDTS):m(l,c),_.length&&(c.totalduration=c.edge-_[0].start),c.driftStartTime=l.driftStartTime,c.driftStart=l.driftStart;var j=c.advancedDateTime;if(c.advanced&&j){var M=c.edge;c.driftStart||(c.driftStartTime=j,c.driftStart=M),c.driftEndTime=j,c.driftEnd=M}else c.driftEndTime=l.driftEndTime,c.driftEnd=l.driftEnd,c.advancedDateTime=l.advancedDateTime}function x(l,c,T){if(l&&c)for(var v=0,i=0,L=l.length;i<=L;i++){var A=l[i],y=c[i+v];A&&y&&A.index===y.index&&A.fragment.sn===y.fragment.sn?T(A,y):v--}}function g(l,c,T){for(var v=c.skippedSegments,i=Math.max(l.startSN,c.startSN)-c.startSN,L=(l.fragmentHint?1:0)+(v?c.endSN:Math.min(l.endSN,c.endSN))-c.startSN,A=c.startSN-l.startSN,y=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,E=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,b=i;b<=L;b++){var _=E[A+b],I=y[b];v&&!I&&b<v&&(I=c.fragments[b]=_),_&&I&&T(_,I)}}function m(l,c){var T=c.startSN+c.skippedSegments-l.startSN,v=l.fragments;if(T<0||T>=v.length)return;w(c,v[T].start)}function w(l,c){if(c){for(var T=l.fragments,v=l.skippedSegments;v<T.length;v++)T[v].start+=c;l.fragmentHint&&(l.fragmentHint.start+=c)}}function p(l,c){var T=1e3*l.levelTargetDuration,v=T/2,i=l.age,L=i>0&&i<T*3,A=c.loading.end-c.loading.start,y,E=l.availabilityDelay;if(l.updated===!1)if(L){var b=333*l.misses;y=Math.max(Math.min(v,A*2),b),l.availabilityDelay=(l.availabilityDelay||0)+y}else y=v;else L?(E=Math.min(E||T/2,i),l.availabilityDelay=E,y=E+T-i):y=T-A;return Math.round(y)}function d(l,c,T){if(!l||!l.details)return null;var v=l.details,i=v.fragments[c-v.startSN];return i||(i=v.fragmentHint,i&&i.sn===c?i:c<v.startSN&&T&&T.sn===c?T:null)}function n(l,c,T){if(!l||!l.details)return null;var v=l.details.partList;if(v)for(var i=v.length;i--;){var L=v[i];if(L.index===T&&L.fragment.sn===c)return L}return null}},"./src/controller/stream-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return v});var R=C("./src/polyfills/number.ts"),h=C("./src/controller/base-stream-controller.ts"),s=C("./src/is-supported.ts"),S=C("./src/events.ts"),f=C("./src/utils/buffer-helper.ts"),a=C("./src/controller/fragment-tracker.ts"),o=C("./src/types/loader.ts"),r=C("./src/loader/fragment.ts"),x=C("./src/demux/transmuxer-interface.ts"),g=C("./src/types/transmuxer.ts"),m=C("./src/controller/gap-controller.ts"),w=C("./src/errors.ts"),p=C("./src/utils/logger.ts");function d(i,L){for(var A=0;A<L.length;A++){var y=L[A];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,y.key,y)}}function n(i,L,A){return L&&d(i.prototype,L),A&&d(i,A),i}function l(i,L){i.prototype=Object.create(L.prototype),i.prototype.constructor=i,c(i,L)}function c(i,L){return c=Object.setPrototypeOf||function(y,E){return y.__proto__=E,y},c(i,L)}var T=100,v=function(i){l(L,i);function L(y,E){var b;return b=i.call(this,y,E,"[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 A=L.prototype;return A._registerListeners=function(){var E=this.hls;E.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),E.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.on(S.Events.ERROR,this.onError,this),E.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A._unregisterListeners=function(){var E=this.hls;E.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),E.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),E.off(S.Events.ERROR,this.onError,this),E.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),E.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},A.startLoad=function(E){if(this.levels){var b=this.lastCurrentTime,_=this.hls;if(this.stopLoad(),this.setInterval(T),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var I=_.startLevel;I===-1&&(_.config.testBandwidth?(I=0,this.bitrateTest=!0):I=_.nextAutoLevel),this.level=_.nextLoadLevel=I,this.loadedmetadata=!1}b>0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+b.toFixed(3)),E=b),this.state=h.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=h.State.STOPPED},A.stopLoad=function(){this._forceStartLoad=!1,i.prototype.stopLoad.call(this)},A.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_LEVEL:{var E,b=this.levels,_=this.level,I=b==null||((E=b[_])===null||E===void 0)?void 0:E.details;if(I&&(!I.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(I))break;this.state=h.State.IDLE;break}break}case h.State.FRAG_LOADING_WAITING_RETRY:{var j,M=self.performance.now(),G=this.retryDate;(!G||M>=G||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=h.State.IDLE)}break;default:break}this.onTickEnd()},A.onTickEnd=function(){i.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},A.doTickIdle=function(){var E,b,_=this.hls,I=this.levelLastLoaded,j=this.levels,M=this.media,G=_.config,K=_.nextLoadLevel;if(I===null||!M&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[K])return;var H=j[K];this.level=_.nextLoadLevel=K;var z=H.details;if(!z||this.state===h.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==K){this.state=h.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:M,o.PlaylistLevelType.MAIN);if(B===null)return;var W=B.len,F=this.getMaxBufferLength(H.maxBitrate);if(W>=F)return;if(this._streamEnded(B,z)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,$),this.state=h.State.ENDED;return}var ee=B.end,Z=this.getNextFragment(ee,z);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var ve=Z.sn-z.startSN;ve>1&&(Z=z.fragments[ve-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===a.FragmentState.OK&&this.nextLoadPosition>ee){var he=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,he,o.PlaylistLevelType.MAIN),Z=this.getNextFragment(this.nextLoadPosition,z)}if(!Z)return;Z.initSegment&&!Z.initSegment.data&&!this.bitrateTest&&(Z=Z.initSegment),((E=Z.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((b=Z.decryptdata)!==null&&b!==void 0&&b.key)?this.loadKey(Z,z):this.loadFragment(Z,z,ee)},A.loadFragment=function(E,b,_){var I,j=this.fragmentTracker.getState(E);if(this.fragCurrent=E,j===a.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(E);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);return}else j=a.FragmentState.NOT_LOADED}j===a.FragmentState.NOT_LOADED||j===a.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,i.prototype.loadFragment.call(this,E,b,_)):j===a.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((I=this.media)===null||I===void 0?void 0:I.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},A.getAppendedFrag=function(E){var b=this.fragmentTracker.getAppendedFrag(E,o.PlaylistLevelType.MAIN);return b&&"fragment"in b?b.fragment:b},A.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,o.PlaylistLevelType.MAIN)},A.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},A.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},A.nextLevelSwitch=function(){var E=this.levels,b=this.media;if(b!=null&&b.readyState){var _,I=this.getAppendedFrag(b.currentTime);if(I&&I.start>1&&this.flushMainBuffer(0,I.start-1),!b.paused&&E){var j=this.hls.nextLoadLevel,M=E[j],G=this.fragLastKbps;G&&this.fragCurrent?_=this.fragCurrent.duration*M.maxBitrate/(1e3*G)+1:_=0}else _=0;var K=this.getBufferedFrag(b.currentTime+_);if(K){var H=this.followingBufferedFrag(K);if(H){this.abortCurrentFrag();var z=H.maxStartPTS?H.maxStartPTS:H.start,B=H.duration,W=Math.max(K.end,z+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(W,Number.POSITIVE_INFINITY)}}}},A.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===h.State.KEY_LOADING&&(this.state=h.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},A.flushMainBuffer=function(E,b){i.prototype.flushMainBuffer.call(this,E,b,this.altAudio?"video":null)},A.onMediaAttached=function(E,b){i.prototype.onMediaAttached.call(this,E,b);var _=b.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),_.addEventListener("playing",this.onvplaying),_.addEventListener("seeked",this.onvseeked),this.gapController=new m.default(this.config,_,this.fragmentTracker,this.hls)},A.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),i.prototype.onMediaDetaching.call(this)},A.onMediaPlaying=function(){this.tick()},A.onMediaSeeked=function(){var E=this.media,b=E?E.currentTime:null;Object(R.isFiniteNumber)(b)&&this.log("Media seeked to "+b.toFixed(3)),this.tick()},A.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},A.onManifestParsed=function(E,b){var _=!1,I=!1,j;b.levels.forEach(function(M){j=M.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(_=!0),j.indexOf("mp4a.40.5")!==-1&&(I=!0))}),this.audioCodecSwitch=_&&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},A.onLevelLoading=function(E,b){var _=this.levels;if(!_||this.state!==h.State.IDLE)return;var I=_[b.level];(!I.details||I.details.live&&this.levelLastLoaded!==b.level||this.waitForCdnTuneIn(I.details))&&(this.state=h.State.WAITING_LEVEL)},A.onLevelLoaded=function(E,b){var _,I=this.levels,j=b.level,M=b.details,G=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:"+G);var K=this.fragCurrent;K&&(this.state===h.State.FRAG_LOADING||this.state===h.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==b.level&&K.loader&&(this.state=h.State.IDLE,K.loader.abort()));var H=I[j],z=0;if(M.live||(_=H.details)!==null&&_!==void 0&&_.live){if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed)return;z=this.alignPlaylists(M,H.details)}if(H.details=M,this.levelLastLoaded=j,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:M,level:j}),this.state===h.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(M))return;this.state=h.State.IDLE}this.startFragRequested?M.live&&this.synchronizeToLiveEdge(M):this.setStartPosition(M,z),this.tick()},A._handleFragmentLoadProgress=function(E){var b,_=E.frag,I=E.part,j=E.payload,M=this.levels;if(!M){this.warn("Levels were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var G=M[_.level],K=G.details;if(!K){this.warn("Dropping fragment "+_.sn+" of level "+_.level+" after level details were reset");return}var H=G.videoCodec,z=K.PTSKnown||!K.live,B=(b=_.initSegment)===null||b===void 0?void 0:b.data,W=this._getAudioCodec(G),F=this.transmuxer=this.transmuxer||new x.default(this.hls,o.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=I?I.index:-1,ee=$!==-1,Z=new g.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,j.byteLength,$,ee),ve=this.initPTS[_.cc];F.push(j,B,W,H,_,I,K.totalduration,z,Z,ve)},A.onAudioTrackSwitching=function(E,b){var _=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 G=this.hls;_&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:j})}},A.onAudioTrackSwitched=function(E,b){var _=b.id,I=!!this.hls.audioTracks[_].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()},A.onBufferCreated=function(E,b){var _=b.tracks,I,j,M=!1;for(var G in _){var K=_[G];if(K.id==="main"){if(j=G,I=K,G==="video"){var H=_[G];H&&(this.videoBuffer=H.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},A.onFragBuffered=function(E,b){var _=b.frag,I=b.part;if(_&&_.type!==o.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(I?" p: "+I.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state),this.state===h.State.PARSED&&(this.state=h.State.IDLE);return}var j=I?I.stats:_.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),_.sn!=="initSegment"&&(this.fragPrevious=_),this.fragBufferedComplete(_,I)},A.onError=function(E,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(o.PlaylistLevelType.MAIN,b);break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==h.State.ERROR&&(b.fatal?(this.warn(""+b.details),this.state=h.State.ERROR):!b.levelRetry&&this.state===h.State.WAITING_LEVEL&&(this.state=h.State.IDLE));break;case w.ErrorDetails.BUFFER_FULL_ERROR:if(b.parent==="main"&&(this.state===h.State.PARSING||this.state===h.State.PARSED)){var _=!0,I=this.getFwdBufferInfo(this.media,o.PlaylistLevelType.MAIN);I&&I.len>.5&&(_=!this.reduceMaxBufferLength(I.len)),_&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},A.checkBuffer=function(){var E=this.media,b=this.gapController;if(!E||!b||!E.readyState)return;var _=f.BufferHelper.getBuffered(E);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):b.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},A.onFragLoadEmergencyAborted=function(){this.state=h.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},A.onBufferFlushed=function(E,b){var _=b.type;if(_!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var I=(_===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(I,_,o.PlaylistLevelType.MAIN)}},A.onLevelsUpdated=function(E,b){this.levels=b.levels},A.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},A.seekToStartPos=function(){var E=this.media,b=E.currentTime,_=this.startPosition;if(_>=0&&b<_){if(E.seeking){p.logger.log("could not seek to "+_+", already seeking at "+b);return}var I=f.BufferHelper.getBuffered(E),j=I.length?I.start(0):0,M=j-_;M>0&&(M<this.config.maxBufferHole||M<this.config.maxFragLookUpTolerance)&&(p.logger.log("adjusting start position by "+M+" to match buffer start"),_+=M,this.startPosition=_),this.log("seek to target start position "+_+" from current time "+b),E.currentTime=_}},A._getAudioCodec=function(E){var b=this.config.defaultAudioCodec||E.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},A._loadBitrateTestFrag=function(E){var b=this;this._doFragLoad(E).then(function(_){var I=b.hls;if(!_||I.nextLoadLevel||b.fragContextChanged(E))return;b.fragLoadError=0,b.state=h.State.IDLE,b.startFragRequested=!1,b.bitrateTest=!1;var j=E.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),I.trigger(S.Events.FRAG_LOADED,_)})},A._handleTransmuxComplete=function(E){var b,_="main",I=this.hls,j=E.remuxResult,M=E.chunkMeta,G=this.getCurrentContext(M);if(!G){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 K=G.frag,H=G.part,z=G.level,B=j.video,W=j.text,F=j.id3,$=j.initSegment,ee=this.altAudio?void 0:j.audio;if(this.fragContextChanged(K))return;if(this.state=h.State.PARSING,$){$.tracks&&(this._bufferInitSegment(z,$.tracks,K,M),I.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:_,tracks:$.tracks}));var Z=$.initPTS,ve=$.timescale;Object(R.isFiniteNumber)(Z)&&(this.initPTS[K.cc]=Z,I.trigger(S.Events.INIT_PTS_FOUND,{frag:K,id:_,initPTS:Z,timescale:ve}))}if(B&&j.independent!==!1){if(z.details){var he=B.startPTS,le=B.endPTS,Re=B.startDTS,xe=B.endDTS;if(H)H.elementaryStreams[B.type]={startPTS:he,endPTS:le,startDTS:Re,endDTS:xe};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var ie=this.getLoadPosition()+this.config.maxBufferHole;if(ie<he){this.backtrack(K);return}K.setElementaryStreamInfo(B.type,K.start,le,K.start,xe,!0)}K.setElementaryStreamInfo(B.type,he,le,Re,xe),this.bufferFragmentData(B,K,H,M)}}else if(j.independent===!1){this.backtrack(K);return}if(ee){var se=ee.startPTS,re=ee.endPTS,be=ee.startDTS,q=ee.endDTS;H&&(H.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:se,endPTS:re,startDTS:be,endDTS:q}),K.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,se,re,be,q),this.bufferFragmentData(ee,K,H,M)}if(F!=null&&(b=F.samples)!==null&&b!==void 0&&b.length){var ne={frag:K,id:_,samples:F.samples};I.trigger(S.Events.FRAG_PARSING_METADATA,ne)}if(W){var Te={frag:K,id:_,samples:W.samples};I.trigger(S.Events.FRAG_PARSING_USERDATA,Te)}},A._bufferInitSegment=function(E,b,_,I){var j=this;if(this.state!==h.State.PARSING)return;this.audioOnly=!!b.audio&&!b.video,this.altAudio&&!this.audioOnly&&delete b.audio;var M=b.audio,G=b.video,K=b.audiovideo;if(M){var H=E.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),M.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(H="mp4a.40.5")),z.indexOf("android")!==-1&&M.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),E.audioCodec&&E.audioCodec!==H&&this.log('Swapping manifest audio codec "'+E.audioCodec+'" for "'+H+'"'),M.levelCodec=H,M.id="main",this.log("Init audio buffer, container:"+M.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(E.audioCodec||"")+"/"+M.codec+"]")}G&&(G.levelCodec=E.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(E.videoCodec||"")+"/"+G.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(E.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,b),Object.keys(b).forEach(function(B){var W=b[B],F=W.initSegment;F!=null&&F.byteLength&&j.hls.trigger(S.Events.BUFFER_APPENDING,{type:B,data:F,frag:_,part:null,chunkMeta:I,parent:_.type})}),this.tick()},A.backtrack=function(E){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(E);var b=this.fragmentTracker.backtrack(E);this.fragPrevious=null,this.nextLoadPosition=E.start,b?this.resetFragmentLoading(E):this.state=h.State.BACKTRACKING},A.checkFragmentChanged=function(){var E=this.media,b=null;if(E&&E.readyState>1&&E.seeking===!1){var _=E.currentTime;if(f.BufferHelper.isBuffered(E,_)?b=this.getAppendedFrag(_):f.BufferHelper.isBuffered(E,_+.1)&&(b=this.getAppendedFrag(_+.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 E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var b=this.getAppendedFrag(E.currentTime);if(b)return b.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var b=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(b)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(h.default)},"./src/controller/subtitle-stream-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"SubtitleStreamController",function(){return l});var R=C("./src/events.ts"),h=C("./src/utils/logger.ts"),s=C("./src/utils/buffer-helper.ts"),S=C("./src/controller/fragment-finders.ts"),f=C("./src/utils/discontinuities.ts"),a=C("./src/controller/level-helper.ts"),o=C("./src/controller/fragment-tracker.ts"),r=C("./src/controller/base-stream-controller.ts"),x=C("./src/types/loader.ts"),g=C("./src/types/level.ts");function m(c,T){for(var v=0;v<T.length;v++){var i=T[v];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function w(c,T,v){return T&&m(c.prototype,T),v&&m(c,v),c}function p(c,T){c.prototype=Object.create(T.prototype),c.prototype.constructor=c,d(c,T)}function d(c,T){return d=Object.setPrototypeOf||function(i,L){return i.__proto__=L,i},d(c,T)}var n=500,l=function(c){p(T,c);function T(i,L){var A;return A=c.call(this,i,L,"[subtitle-stream-controller]")||this,A.levels=[],A.currentTrackId=-1,A.tracksBuffered=[],A.mainDetails=null,A._registerListeners(),A}var v=T.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var L=this.hls;L.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(R.Events.ERROR,this.onError,this),L.on(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(R.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(R.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var L=this.hls;L.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(R.Events.ERROR,this.onError,this),L.off(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(R.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(R.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(n),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(L,A){this.mainDetails=A.details},v.onSubtitleFragProcessed=function(L,A){var y=A.frag,E=A.success;if(this.fragPrevious=y,this.state=r.State.IDLE,!E)return;var b=this.tracksBuffered[this.currentTrackId];if(!b)return;for(var _,I=y.start,j=0;j<b.length;j++)if(I>=b[j].start&&I<=b[j].end){_=b[j];break}var M=y.start+y.duration;_?_.end=M:(_={start:I,end:M},b.push(_)),this.fragmentTracker.fragBuffered(y)},v.onBufferFlushing=function(L,A){var y=A.startOffset,E=A.endOffset;if(y===0&&E!==Number.POSITIVE_INFINITY){var b=this.currentTrackId,_=this.levels;if(!_.length||!_[b]||!_[b].details)return;var I=_[b].details,j=I.targetduration,M=E-j;if(M<=0)return;A.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(G){for(var K=0;K<G.length;){if(G[K].end<=M){G.shift();continue}else if(G[K].start<M)G[K].start=M;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(y,M,x.PlaylistLevelType.SUBTITLE)}},v.onError=function(L,A){var y,E=A.frag;if(!E||E.type!==x.PlaylistLevelType.SUBTITLE)return;(y=this.fragCurrent)!==null&&y!==void 0&&y.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},v.onSubtitleTracksUpdated=function(L,A){var y=this,E=A.subtitleTracks;this.tracksBuffered=[],this.levels=E.map(function(b){return new g.Level(b)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(b){y.tracksBuffered[b.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(L,A){if(this.currentTrackId=A.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var y=this.levels[this.currentTrackId];y!=null&&y.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,y&&this.setInterval(n)},v.onSubtitleTrackLoaded=function(L,A){var y,E=A.details,b=A.id,_=this.currentTrackId,I=this.levels;if(!I.length)return;var j=I[_];if(b>=I.length||b!==_||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(y=j.details)!==null&&y!==void 0&&y.live){var M=this.mainDetails;if(E.deltaUpdateFailed||!M)return;var G=M.fragments[0];if(!j.details)E.hasProgramDateTime&&M.hasProgramDateTime?Object(f.alignMediaPlaylistByPDT)(E,M):G&&Object(a.addSliding)(E,G.start);else{var K=this.alignPlaylists(E,j.details);K===0&&G&&Object(a.addSliding)(E,G.start)}}if(j.details=E,this.levelLastLoaded=b,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var H=Object(S.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},v._handleFragmentLoadComplete=function(L){var A=L.frag,y=L.payload,E=A.decryptdata,b=this.hls;if(this.fragContextChanged(A))return;if(y&&y.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),E.key.buffer,E.iv.buffer).then(function(I){var j=performance.now();b.trigger(R.Events.FRAG_DECRYPTED,{frag:A,payload:I,stats:{tstart:_,tdecrypt:j}})})}},v.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var L,A=this.currentTrackId,y=this.levels;if(!y.length||!y[A]||!y[A].details)return;var E=y[A].details,b=E.targetduration,_=this.config,I=this.media,j=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,I.currentTime-b,_.maxBufferHole),M=j.end,G=j.len,K=this.getMaxBufferLength()+b;if(G>K)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var H=E.fragments,z=H.length,B=E.edge,W,F=this.fragPrevious;if(M<B){var $=_.maxFragLookUpTolerance;F&&E.hasProgramDateTime&&(W=Object(S.findFragmentByPDT)(H,F.endProgramDateTime,$)),W||(W=Object(S.findFragmentByPTS)(F,H,M,$),!W&&F&&F.start<H[0].start&&(W=H[0]))}else W=H[z-1];(L=W)!==null&&L!==void 0&&L.encrypted?(h.logger.log("Loading key for "+W.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(R.Events.KEY_LOADING,{frag:W})):W&&this.fragmentTracker.getState(W)===o.FragmentState.NOT_LOADED&&this.loadFragment(W,E,M)}},v.loadFragment=function(L,A,y){this.fragCurrent=L,c.prototype.loadFragment.call(this,L,A,y)},w(T,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),T}(r.default)},"./src/controller/subtitle-track-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/utils/texttrack-utils.ts"),s=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function f(m,w){for(var p=0;p<w.length;p++){var d=w[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(m,d.key,d)}}function a(m,w,p){return w&&f(m.prototype,w),p&&f(m,p),m}function o(m,w){m.prototype=Object.create(w.prototype),m.prototype.constructor=m,r(m,w)}function r(m,w){return r=Object.setPrototypeOf||function(d,n){return d.__proto__=n,d},r(m,w)}var x=function(m){o(w,m);function w(d){var n;return n=m.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 p=w.prototype;return p.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,m.prototype.destroy.call(this)},p.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(R.Events.ERROR,this.onError,this)},p.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(R.Events.ERROR,this.onError,this)},p.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)},p.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},p.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=g(this.media.textTracks);n.forEach(function(l){Object(h.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},p.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},p.onManifestParsed=function(n,l){this.tracks=l.subtitleTracks},p.onSubtitleTrackLoaded=function(n,l){var c=l.id,T=l.details,v=this.trackId,i=this.tracksInGroup[v];if(!i){this.warn("Invalid subtitle track id "+c);return}var L=i.details;i.details=l.details,this.log("subtitle track "+c+" loaded ["+T.startSN+"-"+T.endSN+"]"),c===this.trackId&&(this.retryCount=0,this.playlistLoaded(c,l,L))},p.onLevelLoading=function(n,l){this.switchLevel(l.level)},p.onLevelSwitching=function(n,l){this.switchLevel(l.level)},p.switchLevel=function(n){var l=this.hls.levels[n];if(!(l!=null&&l.textGroupIds))return;var c=l.textGroupIds[l.urlId];if(this.groupId!==c){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(A){return!c||A.groupId===c});this.tracksInGroup=v;var i=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=c;var L={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+c+'" group-id'),this.hls.trigger(R.Events.SUBTITLE_TRACKS_UPDATED,L),i!==-1&&this.setSubtitleTrack(i,T)}},p.findTrackId=function(n){for(var l=this.tracksInGroup,c=0;c<l.length;c++){var T=l[c];if((!this.selectDefaultTrack||T.default)&&(!n||n===T.name))return T.id}return-1},p.onError=function(n,l){if(m.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)},p.loadPlaylist=function(n){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var c=l.id,T=l.groupId,v=l.url;if(n)try{v=n.addDirectives(v)}catch(i){this.warn("Could not construct new URL with HLS Delivery Directives: "+i)}this.log("Loading subtitle playlist for id "+c),this.hls.trigger(R.Events.SUBTITLE_TRACK_LOADING,{url:v,id:c,groupId:T,deliveryDirectives:n||null})}},p.toggleTrackModes=function(n){var l=this,c=this.media,T=this.subtitleDisplay,v=this.trackId;if(!c)return;var i=g(c.textTracks),L=i.filter(function(E){return E.groupId===l.groupId});if(n===-1)[].slice.call(i).forEach(function(E){E.mode="disabled"});else{var A=L[v];A&&(A.mode="disabled")}var y=L[n];y&&(y.mode=T?"showing":"hidden")},p.setSubtitleTrack=function(n,l){var c,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(c=T[n])!==null&&c!==void 0&&c.details)||n<-1||n>=T.length)return;this.clearTimer();var v=T[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,v){var i=v.id,L=v.groupId,A=L===void 0?"":L,y=v.name,E=v.type,b=v.url;this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:i,groupId:A,name:y,type:E,url:b});var _=this.switchParams(v.url,l==null?void 0:l.details);this.loadPlaylist(_)}else this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:n})},p.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,l=g(this.media.textTracks),c=0;c<l.length;c++)if(l[c].mode==="hidden")n=c;else if(l[c].mode==="showing"){n=c;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},a(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 g(m){for(var w=[],p=0;p<m.length;p++){var d=m[p];d.kind==="subtitles"&&d.label&&w.push(m[p])}return w}u.default=x},"./src/controller/timeline-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"TimelineController",function(){return g});var R=C("./src/polyfills/number.ts"),h=C("./src/events.ts"),s=C("./src/utils/cea-608-parser.ts"),S=C("./src/utils/output-filter.ts"),f=C("./src/utils/webvtt-parser.ts"),a=C("./src/utils/texttrack-utils.ts"),o=C("./src/utils/imsc1-ttml-parser.ts"),r=C("./src/types/loader.ts"),x=C("./src/utils/logger.ts"),g=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=p(),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 c=new S.default(this,"textTrack1"),T=new S.default(this,"textTrack2"),v=new S.default(this,"textTrack3"),i=new S.default(this,"textTrack4");this.cea608Parser1=new s.default(1,c,T),this.cea608Parser2=new s.default(3,v,i)}l.on(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(h.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(h.Events.FRAG_LOADING,this.onFragLoading,this),l.on(h.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(h.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(h.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(h.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=d.prototype;return n.destroy=function(){var c=this.hls;c.off(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),c.off(h.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),c.off(h.Events.FRAG_LOADING,this.onFragLoading,this),c.off(h.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(h.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),c.off(h.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),c.off(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.off(h.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),c.off(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(c,T,v,i,L){for(var A=!1,y=L.length;y--;){var E=L[y],b=w(E[0],E[1],T,v);if(b>=0&&(E[0]=Math.min(E[0],T),E[1]=Math.max(E[1],v),A=!0,b/(v-T)>.5))return}if(A||L.push([T,v]),this.config.renderTextTracksNatively){var _=this.captionsTracks[c];this.Cues.newCue(_,T,v,i)}else{var I=this.Cues.newCue(null,T,v,i);this.hls.trigger(h.Events.CUES_PARSED,{type:"captions",cues:I,track:c})}},n.onInitPtsFound=function(c,T){var v=this,i=T.frag,L=T.id,A=T.initPTS,y=T.timescale,E=this.unparsedVttFrags;L==="main"&&(this.initPTS[i.cc]=A,this.timescale[i.cc]=y),E.length&&(this.unparsedVttFrags=[],E.forEach(function(b){v.onFragLoaded(h.Events.FRAG_LOADED,b)}))},n.getExistingTrack=function(c){var T=this.media;if(T)for(var v=0;v<T.textTracks.length;v++){var i=T.textTracks[v];if(i[c])return i}return null},n.createCaptionsTrack=function(c){this.config.renderTextTracksNatively?this.createNativeTrack(c):this.createNonNativeTrack(c)},n.createNativeTrack=function(c){if(this.captionsTracks[c])return;var T=this.captionsProperties,v=this.captionsTracks,i=this.media,L=T[c],A=L.label,y=L.languageCode,E=this.getExistingTrack(c);if(E)v[c]=E,Object(a.clearCurrentCues)(v[c]),Object(a.sendAddTrackEvent)(v[c],i);else{var b=this.createTextTrack("captions",A,y);b&&(b[c]=!0,v[c]=b)}},n.createNonNativeTrack=function(c){if(this.nonNativeCaptionsTracks[c])return;var T=this.captionsProperties[c];if(!T)return;var v=T.label,i={_id:c,label:v,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[c]=i,this.hls.trigger(h.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})},n.createTextTrack=function(c,T,v){var i=this.media;return i?i.addTextTrack(c,T,v):void 0},n.onMediaAttaching=function(c,T){this.media=T.media,this._cleanTracks()},n.onMediaDetaching=function(){var c=this.captionsTracks;Object.keys(c).forEach(function(T){Object(a.clearCurrentCues)(c[T]),delete c[T]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p(),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 c=this.media;if(!c)return;var T=c.textTracks;if(T)for(var v=0;v<T.length;v++)Object(a.clearCurrentCues)(T[v])},n.onSubtitleTracksUpdated=function(c,T){var v=this;this.textTracks=[];var i=T.subtitleTracks||[],L=i.some(function(b){return b.textCodec===o.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var A=this.tracks&&i&&this.tracks.length===i.length;if(this.tracks=i||[],this.config.renderTextTracksNatively){var y=this.media?this.media.textTracks:[];this.tracks.forEach(function(b,_){var I;if(_<y.length){for(var j=null,M=0;M<y.length;M++)if(m(y[M],b)){j=y[M];break}j&&(I=j)}I?Object(a.clearCurrentCues)(I):(I=v.createTextTrack("subtitles",b.name,b.lang),I&&(I.mode="disabled")),I&&(I.groupId=b.groupId,v.textTracks.push(I))})}else if(!A&&this.tracks&&this.tracks.length){var E=this.tracks.map(function(b){return{label:b.name,kind:b.type.toLowerCase(),default:b.default,subtitleTrack:b}});this.hls.trigger(h.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:E})}}},n.onManifestLoaded=function(c,T){var v=this;this.config.enableCEA708Captions&&T.captions&&T.captions.forEach(function(i){var L=/(?:CC|SERVICE)([1-4])/.exec(i.instreamId);if(!L)return;var A="textTrack"+L[1],y=v.captionsProperties[A];if(!y)return;y.label=i.name,i.lang&&(y.languageCode=i.lang),y.media=i})},n.onFragLoading=function(c,T){var v=this.cea608Parser1,i=this.cea608Parser2,L=this.lastSn,A=this.lastPartIndex;if(!this.enabled||!(v&&i))return;if(T.frag.type===r.PlaylistLevelType.MAIN){var y,E,b=T.frag.sn,_=(y=T==null||((E=T.part)===null||E===void 0)?void 0:E.index)!=null?y:-1;b===L+1||b===L&&_===A+1||(v.reset(),i.reset()),this.lastSn=b,this.lastPartIndex=_}},n.onFragLoaded=function(c,T){var v=T.frag,i=T.payload,L=this.initPTS,A=this.unparsedVttFrags;if(v.type===r.PlaylistLevelType.SUBTITLE)if(i.byteLength){if(!Object(R.isFiniteNumber)(L[v.cc])){A.push(T),L.length&&this.hls.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var y=v.decryptdata;if(y==null||y.key==null||y.method!=="AES-128"){var E=this.tracks[v.level],b=this.vttCCs;b[v.cc]||(b[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),E&&E.textCodec===o.IMSC1_CODEC?this._parseIMSC1(v,i):this._parseVTTs(v,i,b)}}else this.hls.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(c,T){var v=this,i=this.hls;Object(o.parseIMSC1)(T,this.initPTS[c.cc],this.timescale[c.cc],function(L){v._appendCues(L,c.level),i.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(L){x.logger.log("Failed to parse IMSC1: "+L),i.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:L})})},n._parseVTTs=function(c,T,v){var i=this,L=this.hls;Object(f.parseWebVTT)(T,this.initPTS[c.cc],this.timescale[c.cc],v,c.cc,c.start,function(A){i._appendCues(A,c.level),L.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(A){i._fallbackToIMSC1(c,T),x.logger.log("Failed to parse VTT cue: "+A),L.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:A})})},n._fallbackToIMSC1=function(c,T){var v=this,i=this.tracks[c.level];i.textCodec||Object(o.parseIMSC1)(T,this.initPTS[c.cc],this.timescale[c.cc],function(){i.textCodec=o.IMSC1_CODEC,v._parseIMSC1(c,T)},function(){i.textCodec="wvtt"})},n._appendCues=function(c,T){var v=this.hls;if(this.config.renderTextTracksNatively){var i=this.textTracks[T];if(i.mode==="disabled")return;c.forEach(function(y){return Object(a.addCueToTrack)(i,y)})}else{var L=this.tracks[T],A=L.default?"default":"subtitles"+T;v.trigger(h.Events.CUES_PARSED,{type:"subtitles",cues:c,track:A})}},n.onFragDecrypted=function(c,T){var v=T.frag;if(v.type===r.PlaylistLevelType.SUBTITLE){if(!Object(R.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(T);return}this.onFragLoaded(h.Events.FRAG_LOADED,T)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(c,T){var v=this.cea608Parser1,i=this.cea608Parser2;if(!this.enabled||!(v&&i))return;for(var L=0;L<T.samples.length;L++){var A=T.samples[L].bytes;if(A){var y=this.extractCea608Data(A);v.addData(T.samples[L].pts,y[0]),i.addData(T.samples[L].pts,y[1])}}},n.onBufferFlushing=function(c,T){var v=T.startOffset,i=T.endOffset,L=T.endOffsetSubtitles,A=T.type,y=this.media;if(!y||y.currentTime<i)return;if(!A||A==="video"){var E=this.captionsTracks;Object.keys(E).forEach(function(_){return Object(a.removeCuesInRange)(E[_],v,i)})}if(this.config.renderTextTracksNatively&&(v===0&&L!==void 0)){var b=this.textTracks;Object.keys(b).forEach(function(_){return Object(a.removeCuesInRange)(b[_],v,L)})}},n.extractCea608Data=function(c){for(var T=c[0]&31,v=2,i=[[],[]],L=0;L<T;L++){var A=c[v++],y=127&c[v++],E=127&c[v++],b=(4&A)!==0,_=3&A;if(y===0&&E===0)continue;b&&((_===0||_===1)&&(i[_].push(y),i[_].push(E)))}return i},d}();function m(d,n){return d&&d.label===n.name&&!(d.textTrack1||d.textTrack2)}function w(d,n,l,c){return Math.min(n,c)-Math.max(d,l)}function p(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(S,f){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=f}var s=h.prototype;return s.decrypt=function(f,a){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},a,f)},h}()},"./src/crypt/aes-decryptor.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"removePadding",function(){return h}),C.d(u,"default",function(){return s});var R=C("./src/utils/typed-array.ts");function h(S){var f=S.byteLength,a=f&&new DataView(S.buffer).getUint8(f-1);return a?Object(R.sliceUint8)(S,0,f-a):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 f=S.prototype;return f.uint8ArrayToUint32Array_=function(o){for(var r=new DataView(o),x=new Uint32Array(4),g=0;g<4;g++)x[g]=r.getUint32(g*4);return x},f.initTable=function(){var o=this.sBox,r=this.invSBox,x=this.subMix,g=x[0],m=x[1],w=x[2],p=x[3],d=this.invSubMix,n=d[0],l=d[1],c=d[2],T=d[3],v=new Uint32Array(256),i=0,L=0,A=0;for(A=0;A<256;A++)A<128?v[A]=A<<1:v[A]=A<<1^283;for(A=0;A<256;A++){var y=L^L<<1^L<<2^L<<3^L<<4;y=y>>>8^y&255^99,o[i]=y,r[y]=i;var E=v[i],b=v[E],_=v[b],I=v[y]*257^y*16843008;g[i]=I<<24|I>>>8,m[i]=I<<16|I>>>16,w[i]=I<<8|I>>>24,p[i]=I,I=_*16843009^b*65537^E*257^i*16843008,n[y]=I<<24|I>>>8,l[y]=I<<16|I>>>16,c[y]=I<<8|I>>>24,T[y]=I,i?(i=E^v[v[v[_^E]]],L^=v[v[L]]):i=L=1}},f.expandKey=function(o){for(var r=this.uint8ArrayToUint32Array_(o),x=!0,g=0;g<r.length&&x;)x=r[g]===this.key[g],g++;if(x)return;this.key=r;var m=this.keySize=r.length;if(m!==4&&m!==6&&m!==8)throw new Error("Invalid aes key size="+m);var w=this.ksRows=(m+6+1)*4,p,d,n=this.keySchedule=new Uint32Array(w),l=this.invKeySchedule=new Uint32Array(w),c=this.sBox,T=this.rcon,v=this.invSubMix,i=v[0],L=v[1],A=v[2],y=v[3],E,b;for(p=0;p<w;p++){if(p<m){E=n[p]=r[p];continue}b=E,p%m===0?(b=b<<8|b>>>24,b=c[b>>>24]<<24|c[b>>>16&255]<<16|c[b>>>8&255]<<8|c[b&255],b^=T[p/m|0]<<24):m>6&&p%m===4&&(b=c[b>>>24]<<24|c[b>>>16&255]<<16|c[b>>>8&255]<<8|c[b&255]),n[p]=E=(n[p-m]^b)>>>0}for(d=0;d<w;d++)p=w-d,d&3?b=n[p]:b=n[p-4],d<4||p<=4?l[d]=b:l[d]=i[c[b>>>24]]^L[c[b>>>16&255]]^A[c[b>>>8&255]]^y[c[b&255]],l[d]=l[d]>>>0},f.networkToHostOrderSwap=function(o){return o<<24|(o&65280)<<8|(o&16711680)>>8|o>>>24},f.decrypt=function(o,r,x){for(var g=this.keySize+6,m=this.invKeySchedule,w=this.invSBox,p=this.invSubMix,d=p[0],n=p[1],l=p[2],c=p[3],T=this.uint8ArrayToUint32Array_(x),v=T[0],i=T[1],L=T[2],A=T[3],y=new Int32Array(o),E=new Int32Array(y.length),b,_,I,j,M,G,K,H,z,B,W,F,$,ee,Z=this.networkToHostOrderSwap;r<y.length;){for(z=Z(y[r]),B=Z(y[r+1]),W=Z(y[r+2]),F=Z(y[r+3]),M=z^m[0],G=F^m[1],K=W^m[2],H=B^m[3],$=4,ee=1;ee<g;ee++)b=d[M>>>24]^n[G>>16&255]^l[K>>8&255]^c[H&255]^m[$],_=d[G>>>24]^n[K>>16&255]^l[H>>8&255]^c[M&255]^m[$+1],I=d[K>>>24]^n[H>>16&255]^l[M>>8&255]^c[G&255]^m[$+2],j=d[H>>>24]^n[M>>16&255]^l[G>>8&255]^c[K&255]^m[$+3],M=b,G=_,K=I,H=j,$=$+4;b=w[M>>>24]<<24^w[G>>16&255]<<16^w[K>>8&255]<<8^w[H&255]^m[$],_=w[G>>>24]<<24^w[K>>16&255]<<16^w[H>>8&255]<<8^w[M&255]^m[$+1],I=w[K>>>24]<<24^w[H>>16&255]<<16^w[M>>8&255]<<8^w[G&255]^m[$+2],j=w[H>>>24]<<24^w[M>>16&255]<<16^w[G>>8&255]<<8^w[K&255]^m[$+3],E[r]=Z(b^v),E[r+1]=Z(j^i),E[r+2]=Z(I^L),E[r+3]=Z(_^A),v=z,i=B,L=W,A=F,r=r+4}return E.buffer},S}()},"./src/crypt/decrypter.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return r});var R=C("./src/crypt/aes-crypto.ts"),h=C("./src/crypt/fast-aes-key.ts"),s=C("./src/crypt/aes-decryptor.ts"),S=C("./src/utils/logger.ts"),f=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/typed-array.ts"),o=16,r=function(){function x(m,w,p){var d=p===void 0?{}:p,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=m,this.config=w,this.removePKCS7Padding=l,l)try{var c=self.crypto;c&&(this.subtle=c.subtle||c.webkitSubtle)}catch(T){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var g=x.prototype;return g.destroy=function(){this.observer=null},g.isSync=function(){return this.config.enableSoftwareAES},g.flush=function(){var w=this.currentResult;if(!w){this.reset();return}var p=new Uint8Array(w);return this.reset(),this.removePKCS7Padding?Object(s.removePadding)(p):p},g.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},g.decrypt=function(w,p,d,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(w),p,d);var l=this.flush();l&&n(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(w),p,d).then(n)},g.softwareDecrypt=function(w,p,d){var n=this.currentIV,l=this.currentResult,c=this.remainderData;this.logOnce("JS AES decrypt"),c&&(w=Object(f.appendUint8Array)(c,w),this.remainderData=null);var T=this.getValidChunk(w);if(!T.length)return null;n&&(d=n);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new s.default),v.expandKey(p);var i=l;return this.currentResult=v.decrypt(T.buffer,0,d),this.currentIV=Object(a.sliceUint8)(T,-16).buffer,i||null},g.webCryptoDecrypt=function(w,p,d){var n=this,l=this.subtle;return(this.key!==p||!this.fastAesKey)&&(this.key=p,this.fastAesKey=new h.default(l,p)),this.fastAesKey.expandKey().then(function(c){if(!l)return Promise.reject(new Error("web crypto not initialized"));var T=new R.default(l,d);return T.decrypt(w.buffer,c)}).catch(function(c){return n.onWebCryptoError(c,w,p,d)})},g.onWebCryptoError=function(w,p,d,n){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",w),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(p,d,n)},g.getValidChunk=function(w){var p=w,d=w.length-w.length%o;return d!==w.length&&(p=Object(a.sliceUint8)(w,0,d),this.remainderData=Object(a.sliceUint8)(w,d)),p},g.logOnce=function(w){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+w),this.logEnabled=!1},x}()},"./src/crypt/fast-aes-key.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(S,f){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=f}var s=h.prototype;return s.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},h}()},"./src/demux/aacdemuxer.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/demux/base-audio-demuxer.ts"),h=C("./src/demux/adts.ts"),s=C("./src/utils/logger.ts"),S=C("./src/demux/id3.ts");function f(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,a(r,x)}function a(r,x){return a=Object.setPrototypeOf||function(m,w){return m.__proto__=w,m},a(r,x)}var o=function(r){f(x,r);function x(m,w){var p;return p=r.call(this)||this,p.observer=void 0,p.config=void 0,p.observer=m,p.config=w,p}var g=x.prototype;return g.resetInitSegment=function(w,p,d){r.prototype.resetInitSegment.call(this,w,p,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}},x.probe=function(w){if(!w)return!1;for(var p=S.getID3Data(w,0)||[],d=p.length,n=w.length;d<n;d++)if(h.probe(w,d))return s.logger.log("ADTS sync word found !"),!0;return!1},g.canParse=function(w,p){return h.canParse(w,p)},g.appendFrame=function(w,p,d){h.initTrackConfig(w,this.observer,p,d,w.manifestCodec);var n=h.appendFrame(w,p,d,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},x}(R.default);o.minProbeByteLength=9,u.default=o},"./src/demux/adts.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"getAudioConfig",function(){return S}),C.d(u,"isHeaderPattern",function(){return f}),C.d(u,"getHeaderLength",function(){return a}),C.d(u,"getFullFrameLength",function(){return o}),C.d(u,"canGetFrameLength",function(){return r}),C.d(u,"isHeader",function(){return x}),C.d(u,"canParse",function(){return g}),C.d(u,"probe",function(){return m}),C.d(u,"initTrackConfig",function(){return w}),C.d(u,"getFrameDuration",function(){return p}),C.d(u,"parseFrameHeader",function(){return d}),C.d(u,"appendFrame",function(){return n});var R=C("./src/utils/logger.ts"),h=C("./src/errors.ts"),s=C("./src/events.ts");function S(l,c,T,v){var i,L,A,y,E=navigator.userAgent.toLowerCase(),b=v,_=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=((c[T+2]&192)>>>6)+1;var I=(c[T+2]&60)>>>2;if(I>_.length-1){l.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+I});return}return A=(c[T+2]&1)<<2,A|=(c[T+3]&192)>>>6,R.logger.log("manifest codec:"+v+", ADTS type:"+i+", samplingIndex:"+I),/firefox/i.test(E)?I>=6?(i=5,y=new Array(4),L=I-3):(i=2,y=new Array(2),L=I):E.indexOf("android")!==-1?(i=2,y=new Array(2),L=I):(i=5,y=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&I>=6?L=I-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(I>=6&&A===1||/vivaldi/i.test(E))||!v&&A===1)&&(i=2,y=new Array(2)),L=I)),y[0]=i<<3,y[0]|=(I&14)>>1,y[1]|=(I&1)<<7,y[1]|=A<<3,i===5&&(y[1]|=(L&14)>>1,y[2]=(L&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:_[I],channelCount:A,codec:"mp4a.40."+i,manifestCodec:b}}function f(l,c){return l[c]===255&&(l[c+1]&246)===240}function a(l,c){return l[c+1]&1?7:9}function o(l,c){return(l[c+3]&3)<<11|l[c+4]<<3|(l[c+5]&224)>>>5}function r(l,c){return c+5<l.length}function x(l,c){return c+1<l.length&&f(l,c)}function g(l,c){return r(l,c)&&f(l,c)&&o(l,c)<=l.length-c}function m(l,c){if(x(l,c)){var T=a(l,c);if(c+T>=l.length)return!1;var v=o(l,c);if(v<=T)return!1;var i=c+v;return i===l.length||x(l,i)}return!1}function w(l,c,T,v,i){if(!l.samplerate){var L=S(c,T,v,i);if(!L)return;l.config=L.config,l.samplerate=L.samplerate,l.channelCount=L.channelCount,l.codec=L.codec,l.manifestCodec=L.manifestCodec,R.logger.log("parsed codec:"+l.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function p(l){return 1024*9e4/l}function d(l,c,T,v,i){var L=a(l,c),A=o(l,c);if(A-=L,A>0){var y=T+v*i;return{headerLength:L,frameLength:A,stamp:y}}}function n(l,c,T,v,i){var L=p(l.samplerate),A=d(c,T,v,i,L);if(A){var y=A.frameLength,E=A.headerLength,b=A.stamp,_=E+y,I=Math.max(0,T+_-c.length),j;I?(j=new Uint8Array(_-E),j.set(c.subarray(T+E,c.length),0)):j=c.subarray(T+E,T+_);var M={unit:j,pts:b};return I||l.samples.push(M),{sample:M,length:_,missing:I}}}},"./src/demux/base-audio-demuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"initPTSFn",function(){return o});var R=C("./src/polyfills/number.ts"),h=C("./src/demux/id3.ts"),s=C("./src/demux/dummy-demuxed-track.ts"),S=C("./src/utils/mp4-tools.ts"),f=C("./src/utils/typed-array.ts"),a=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var x=r.prototype;return x.resetInitSegment=function(m,w,p){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},x.resetTimeStamp=function(){},x.resetContiguity=function(){},x.canParse=function(m,w){return!1},x.appendFrame=function(m,w,p){},x.demux=function(m,w){this.cachedData&&(m=Object(S.appendUint8Array)(this.cachedData,m),this.cachedData=null);var p=h.getID3Data(m,0),d=p?p.length:0,n,l,c=this._audioTrack,T=this._id3Track,v=p?h.getTimeStamp(p):void 0,i=m.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=o(v,w)),p&&p.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:p}),l=this.initPTS;d<i;){if(this.canParse(m,d)){var L=this.appendFrame(c,m,d);L?(this.frameIndex++,l=L.sample.pts,d+=L.length,n=d):d=i}else h.canParse(m,d)?(p=h.getID3Data(m,d),T.samples.push({pts:l,dts:l,data:p}),d+=p.length,n=d):d++;if(d===i&&n!==i){var A=Object(f.sliceUint8)(m,n);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,A):this.cachedData=A}}return{audioTrack:c,avcTrack:Object(s.dummyTrack)(),id3Track:T,textTrack:Object(s.dummyTrack)()}},x.demuxSampleAes=function(m,w,p){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},x.flush=function(m){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)()}},x.destroy=function(){},r}(),o=function(x,g){return Object(R.isFiniteNumber)(x)?x*90:g*9e4};u.default=a},"./src/demux/chunk-cache.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function s(){this.chunks=[],this.dataLength=0}var S=s.prototype;return S.push=function(a){this.chunks.push(a),this.dataLength+=a.length},S.flush=function(){var a=this.chunks,o=this.dataLength,r;if(a.length)a.length===1?r=a[0]:r=h(a,o);else return new Uint8Array(0);return this.reset(),r},S.reset=function(){this.chunks.length=0,this.dataLength=0},s}();function h(s,S){for(var f=new Uint8Array(S),a=0,o=0;o<s.length;o++){var r=s[o];f.set(r,a),a+=r.length}return f}},"./src/demux/dummy-demuxed-track.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"dummyTrack",function(){return R});function R(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/utils/logger.ts"),h=function(){function s(f){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=f,this.bytesAvailable=f.byteLength,this.word=0,this.bitsAvailable=0}var S=s.prototype;return S.loadWord=function(){var a=this.data,o=this.bytesAvailable,r=a.byteLength-o,x=new Uint8Array(4),g=Math.min(4,o);if(g===0)throw new Error("no bytes available");x.set(a.subarray(r,r+g)),this.word=new DataView(x.buffer).getUint32(0),this.bitsAvailable=g*8,this.bytesAvailable-=g},S.skipBits=function(a){var o;this.bitsAvailable>a?(this.word<<=a,this.bitsAvailable-=a):(a-=this.bitsAvailable,o=a>>3,a-=o>>3,this.bytesAvailable-=o,this.loadWord(),this.word<<=a,this.bitsAvailable-=a)},S.readBits=function(a){var o=Math.min(this.bitsAvailable,a),r=this.word>>>32-o;return a>32&&R.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=o,this.bitsAvailable>0?this.word<<=o:this.bytesAvailable>0&&this.loadWord(),o=a-o,o>0&&this.bitsAvailable?r<<o|this.readBits(o):r},S.skipLZ=function(){var a;for(a=0;a<this.bitsAvailable;++a)if((this.word&2147483648>>>a)!==0)return this.word<<=a,this.bitsAvailable-=a,a;return this.loadWord(),a+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var a=this.skipLZ();return this.readBits(a+1)-1},S.readEG=function(){var a=this.readUEG();return 1&a?1+a>>>1:-1*(a>>>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(a){for(var o=8,r=8,x,g=0;g<a;g++)r!==0&&(x=this.readEG(),r=(o+x+256)%256),o=r===0?o:r},S.readSPS=function(){var a=0,o=0,r=0,x=0,g,m,w,p=this.readUByte.bind(this),d=this.readBits.bind(this),n=this.readUEG.bind(this),l=this.readBoolean.bind(this),c=this.skipBits.bind(this),T=this.skipEG.bind(this),v=this.skipUEG.bind(this),i=this.skipScalingList.bind(this);p();var L=p();if(d(5),c(3),p(),v(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var A=n();if(A===3&&c(1),v(),v(),c(1),l())for(m=A!==3?8:12,w=0;w<m;w++)l()&&(w<6?i(16):i(64))}v();var y=n();if(y===0)n();else if(y===1)for(c(1),T(),T(),g=n(),w=0;w<g;w++)T();v(),c(1);var E=n(),b=n(),_=d(1);_===0&&c(1),c(1),l()&&(a=n(),o=n(),r=n(),x=n());var I=[1,1];if(l()&&l()){var j=p();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=[p()<<8|p(),p()<<8|p()];break}}}return{width:Math.ceil((E+1)*16-a*2-o*2),height:(2-_)*(b+1)*16-(_?2:4)*(r+x),pixelRatio:I}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},s}();u.default=h},"./src/demux/id3.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"isHeader",function(){return R}),C.d(u,"isFooter",function(){return h}),C.d(u,"getID3Data",function(){return s}),C.d(u,"canParse",function(){return f}),C.d(u,"getTimeStamp",function(){return a}),C.d(u,"isTimeStampFrame",function(){return o}),C.d(u,"getID3Frames",function(){return x}),C.d(u,"decodeFrame",function(){return g}),C.d(u,"utf8ArrayToStr",function(){return n}),C.d(u,"testables",function(){return l});var R=function(i,L){return L+10<=i.length&&(i[L]===73&&i[L+1]===68&&i[L+2]===51&&(i[L+3]<255&&i[L+4]<255&&(i[L+6]<128&&i[L+7]<128&&i[L+8]<128&&i[L+9]<128)))},h=function(i,L){return L+10<=i.length&&(i[L]===51&&i[L+1]===68&&i[L+2]===73&&(i[L+3]<255&&i[L+4]<255&&(i[L+6]<128&&i[L+7]<128&&i[L+8]<128&&i[L+9]<128)))},s=function(i,L){for(var A=L,y=0;R(i,L);){y+=10;var E=S(i,L+6);y+=E,h(i,L+10)&&(y+=10),L+=y}return y>0?i.subarray(A,A+y):void 0},S=function(i,L){var A=0;return A=(i[L]&127)<<21,A|=(i[L+1]&127)<<14,A|=(i[L+2]&127)<<7,A|=i[L+3]&127,A},f=function(i,L){return R(i,L)&&S(i,L+6)+10<=i.length-L},a=function(i){for(var L=x(i),A=0;A<L.length;A++){var y=L[A];if(o(y))return d(y)}return},o=function(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"},r=function(i){var L=String.fromCharCode(i[0],i[1],i[2],i[3]),A=S(i,4),y=10;return{type:L,size:A,data:i.subarray(y,y+A)}},x=function(i){for(var L=0,A=[];R(i,L);){var y=S(i,L+6);L+=10;for(var E=L+y;L+8<E;){var b=r(i.subarray(L)),_=g(b);_&&A.push(_),L+=b.size+10}h(i,L)&&(L+=10)}return A},g=function(i){return i.type==="PRIV"?m(i):i.type[0]==="W"?p(i):w(i)},m=function(i){if(i.size<2)return;var L=n(i.data,!0),A=new Uint8Array(i.data.subarray(L.length+1));return{key:i.type,info:L,data:A.buffer}},w=function(i){if(i.size<2)return;if(i.type==="TXXX"){var L=1,A=n(i.data.subarray(L),!0);L+=A.length+1;var y=n(i.data.subarray(L));return{key:i.type,info:A,data:y}}var E=n(i.data.subarray(1));return{key:i.type,data:E}},p=function(i){if(i.type==="WXXX"){if(i.size<2)return;var L=1,A=n(i.data.subarray(L),!0);L+=A.length+1;var y=n(i.data.subarray(L));return{key:i.type,info:A,data:y}}var E=n(i.data);return{key:i.type,data:E}},d=function(i){if(i.data.byteLength===8){var L=new Uint8Array(i.data),A=L[3]&1,y=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return y/=45,A&&(y+=4772185884e-2),Math.round(y)}return},n=function(i,L){L===void 0&&(L=!1);var A=T();if(A){var y=A.decode(i);if(L){var E=y.indexOf("\0");return E!==-1?y.substring(0,E):y}return y.replace(/\0/g,"")}for(var b=i.length,_,I,j,M="",G=0;G<b;){if(_=i[G++],_===0&&L)return M;if(_===0||_===3)continue;switch(_>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:M+=String.fromCharCode(_);break;case 12:case 13:I=i[G++],M+=String.fromCharCode((_&31)<<6|I&63);break;case 14:I=i[G++],j=i[G++],M+=String.fromCharCode((_&15)<<12|(I&63)<<6|(j&63)<<0);break;default:}}return M},l={decodeTextFrame:w},c;function T(){return!c&&typeof self.TextDecoder!="undefined"&&(c=new self.TextDecoder("utf-8")),c}},"./src/demux/mp3demuxer.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/demux/base-audio-demuxer.ts"),h=C("./src/demux/id3.ts"),s=C("./src/utils/logger.ts"),S=C("./src/demux/mpegaudio.ts");function f(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,a(r,x)}function a(r,x){return a=Object.setPrototypeOf||function(m,w){return m.__proto__=w,m},a(r,x)}var o=function(r){f(x,r);function x(){return r.apply(this,arguments)||this}var g=x.prototype;return g.resetInitSegment=function(w,p,d){r.prototype.resetInitSegment.call(this,w,p,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}},x.probe=function(w){if(!w)return!1;for(var p=h.getID3Data(w,0)||[],d=p.length,n=w.length;d<n;d++)if(S.probe(w,d))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},g.canParse=function(w,p){return S.canParse(w,p)},g.appendFrame=function(w,p,d){return this.initPTS===null?void 0:S.appendFrame(w,p,d,this.initPTS,this.frameIndex)},x}(R.default);o.minProbeByteLength=4,u.default=o},"./src/demux/mp4demuxer.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/utils/mp4-tools.ts"),h=C("./src/demux/dummy-demuxed-track.ts"),s=function(){function S(a,o){this.remainderData=null,this.config=void 0,this.config=o}var f=S.prototype;return f.resetTimeStamp=function(){},f.resetInitSegment=function(){},f.resetContiguity=function(){},S.probe=function(o){return Object(R.findBox)({data:o,start:0,end:Math.min(o.length,16384)},["moof"]).length>0},f.demux=function(o){var r=o,x=Object(h.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(R.appendUint8Array)(this.remainderData,o));var g=Object(R.segmentValidRange)(r);this.remainderData=g.remainder,x.samples=g.valid||new Uint8Array}else x.samples=r;return{audioTrack:Object(h.dummyTrack)(),avcTrack:x,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},f.flush=function(){var o=Object(h.dummyTrack)();return o.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(h.dummyTrack)(),avcTrack:o,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},f.demuxSampleAes=function(o,r,x){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},f.destroy=function(){},S}();s.minProbeByteLength=1024,u.default=s},"./src/demux/mpegaudio.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"appendFrame",function(){return a}),C.d(u,"parseHeader",function(){return o}),C.d(u,"isHeaderPattern",function(){return r}),C.d(u,"isHeader",function(){return x}),C.d(u,"canParse",function(){return g}),C.d(u,"probe",function(){return m});var R=null,h=[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]],f=[0,1,1,4];function a(w,p,d,n,l){if(d+24>p.length)return;var c=o(p,d);if(c&&d+c.frameLength<=p.length){var T=c.samplesPerFrame*9e4/c.sampleRate,v=n+l*T,i={unit:p.subarray(d,d+c.frameLength),pts:v,dts:v};return w.config=[],w.channelCount=c.channelCount,w.samplerate=c.sampleRate,w.samples.push(i),{sample:i,length:c.frameLength,missing:0}}}function o(w,p){var d=w[p+1]>>3&3,n=w[p+1]>>1&3,l=w[p+2]>>4&15,c=w[p+2]>>2&3;if(d!==1&&l!==0&&l!==15&&c!==3){var T=w[p+2]>>1&1,v=w[p+3]>>6,i=d===3?3-n:n===3?3:4,L=h[i*14+l-1]*1e3,A=d===3?0:d===2?1:2,y=s[A*3+c],E=v===3?1:2,b=S[d][n],_=f[n],I=b*8*_,j=Math.floor(b*L/y+T)*_;if(R===null){var M=navigator.userAgent||"",G=M.match(/Chrome\/(\d+)/i);R=G?parseInt(G[1]):0}var K=!!R&&R<=87;return K&&n===2&&L>=224e3&&v===0&&(w[p+3]=w[p+3]|128),{sampleRate:y,channelCount:E,frameLength:j,samplesPerFrame:I}}}function r(w,p){return w[p]===255&&(w[p+1]&224)===224&&(w[p+1]&6)!==0}function x(w,p){return p+1<w.length&&r(w,p)}function g(w,p){var d=4;return r(w,p)&&d<=w.length-p}function m(w,p){if(p+1<w.length&&r(w,p)){var d=4,n=o(w,p),l=d;n!=null&&n.frameLength&&(l=n.frameLength);var c=p+l;return c===w.length||x(w,c)}return!1}},"./src/demux/sample-aes.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/crypt/decrypter.ts"),h=C("./src/demux/tsdemuxer.ts"),s=function(){function S(a,o,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new R.default(a,o,{removePKCS7Padding:!1})}var f=S.prototype;return f.decryptBuffer=function(o,r){this.decrypter.decrypt(o,this.keyData.key.buffer,this.keyData.iv.buffer,r)},f.decryptAacSample=function(o,r,x,g){var m=o[r].unit,w=m.subarray(16,m.length-m.length%16),p=w.buffer.slice(w.byteOffset,w.byteOffset+w.length),d=this;this.decryptBuffer(p,function(n){var l=new Uint8Array(n);m.set(l,16),g||d.decryptAacSamples(o,r+1,x)})},f.decryptAacSamples=function(o,r,x){for(;;r++){if(r>=o.length){x();return}if(o[r].unit.length<32)continue;var g=this.decrypter.isSync();if(this.decryptAacSample(o,r,x,g),!g)return}},f.getAvcEncryptedData=function(o){for(var r=Math.floor((o.length-48)/160)*16+16,x=new Int8Array(r),g=0,m=32;m<=o.length-16;m+=160,g+=16)x.set(o.subarray(m,m+16),g);return x},f.getAvcDecryptedUnit=function(o,r){for(var x=new Uint8Array(r),g=0,m=32;m<=o.length-16;m+=160,g+=16)o.set(x.subarray(g,g+16),m);return o},f.decryptAvcSample=function(o,r,x,g,m,w){var p=Object(h.discardEPB)(m.data),d=this.getAvcEncryptedData(p),n=this;this.decryptBuffer(d.buffer,function(l){m.data=n.getAvcDecryptedUnit(p,l),w||n.decryptAvcSamples(o,r,x+1,g)})},f.decryptAvcSamples=function(o,r,x,g){if(o instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,x=0){if(r>=o.length){g();return}for(var m=o[r].units;!(x>=m.length);x++){var w=m[x];if(w.data.length<=48||w.type!==1&&w.type!==5)continue;var p=this.decrypter.isSync();if(this.decryptAvcSample(o,r,x,g,w,p),!p)return}}},S}();u.default=s},"./src/demux/transmuxer-interface.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m});var R=C("./node_modules/webworkify-webpack/index.js"),h=C.n(R),s=C("./src/events.ts"),S=C("./src/demux/transmuxer.ts"),f=C("./src/utils/logger.ts"),a=C("./src/errors.ts"),o=C("./src/utils/mediasource-helper.ts"),r=C("./node_modules/eventemitter3/index.js"),x=C.n(r),g=Object(o.getMediaSource)()||{isTypeSupported:function(){return!1}},m=function(){function w(d,n,l,c){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=c;var v=d.config,i=function(b,_){_=_||{},_.frag=T.frag,_.id=T.id,d.trigger(b,_)};this.observer=new r.EventEmitter,this.observer.on(s.Events.FRAG_DECRYPTED,i),this.observer.on(s.Events.ERROR,i);var L={mp4:g.isTypeSupported("video/mp4"),mpeg:g.isTypeSupported("audio/mpeg"),mp3:g.isTypeSupported('audio/mp4; codecs="mp3"')},A=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){f.logger.log("demuxing in webworker");var y;try{y=this.worker=R("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(E){d.trigger(s.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},y.postMessage({cmd:"init",typeSupported:L,vendor:A,id:n,config:JSON.stringify(v)})}catch(E){f.logger.warn("Error in worker:",E),f.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new S.default(this.observer,L,v,A,n),this.worker=null}}else this.transmuxer=new S.default(this.observer,L,v,A,n)}var p=w.prototype;return p.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 c=this.observer;c&&c.removeAllListeners(),this.observer=null},p.push=function(n,l,c,T,v,i,L,A,y,E){var b=this;y.transmuxing.start=self.performance.now();var _=this.transmuxer,I=this.worker,j=i?i.start:v.start,M=v.decryptdata,G=this.frag,K=!(G&&v.cc===G.cc),H=!(G&&y.level===G.level),z=G?y.sn-G.sn:-1,B=this.part?y.part-this.part.index:1,W=!H&&(z===1||z===0&&B===1),F=self.performance.now();(H||z||v.stats.parsing.start===0)&&(v.stats.parsing.start=F),i&&(B||!W)&&(i.stats.parsing.start=F);var $=new S.TransmuxState(K,W,A,H,j);if(!W||K){f.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+`
discontinuity: `+K+`
trackSwitch: `+H+`
contiguous: `+W+`
accurateTimeOffset: `+A+`
timeOffset: `+j);var ee=new S.TransmuxConfig(c,T,l,L,E);this.configureTransmuxer(ee)}if(this.frag=v,this.part=i,I)I.postMessage({cmd:"demux",data:n,decryptdata:M,chunkMeta:y,state:$},n instanceof ArrayBuffer?[n]:[]);else if(_){var Z=_.push(n,M,y,$);Object(S.isPromise)(Z)?Z.then(function(ve){b.handleTransmuxComplete(ve)}):this.handleTransmuxComplete(Z)}},p.flush=function(n){var l=this;n.transmuxing.start=self.performance.now();var c=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:n});else if(c){var v=c.flush(n);Object(S.isPromise)(v)?v.then(function(i){l.handleFlushResult(i,n)}):this.handleFlushResult(v,n)}},p.handleFlushResult=function(n,l){var c=this;n.forEach(function(T){c.handleTransmuxComplete(T)}),this.onFlush(l)},p.onWorkerMessage=function(n){var l=n.data,c=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,c.trigger(l.event,l.data);break}}},p.configureTransmuxer=function(n){var l=this.worker,c=this.transmuxer;l?l.postMessage({cmd:"configure",config:n}):c&&c.configure(n)},p.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},w}()},"./src/demux/transmuxer-worker.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return a});var R=C("./src/demux/transmuxer.ts"),h=C("./src/events.ts"),s=C("./src/utils/logger.ts"),S=C("./node_modules/eventemitter3/index.js"),f=C.n(S);function a(m){var w=new S.EventEmitter,p=function(n,l){m.postMessage({event:n,data:l})};w.on(h.Events.FRAG_DECRYPTED,p),w.on(h.Events.ERROR,p),m.addEventListener("message",function(d){var n=d.data;switch(n.cmd){case"init":{var l=JSON.parse(n.config);m.transmuxer=new R.default(w,n.typeSupported,l,n.vendor,n.id),Object(s.enableLogs)(l.debug),p("init",null);break}case"configure":{m.transmuxer.configure(n.config);break}case"demux":{var c=m.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(R.isPromise)(c)?c.then(function(i){o(m,i)}):o(m,c);break}case"flush":{var T=n.chunkMeta,v=m.transmuxer.flush(T);Object(R.isPromise)(v)?v.then(function(i){x(m,i,T)}):x(m,v,T);break}default:break}})}function o(m,w){if(g(w.remuxResult))return;var p=[],d=w.remuxResult,n=d.audio,l=d.video;n&&r(p,n),l&&r(p,l),m.postMessage({event:"transmuxComplete",data:w},p)}function r(m,w){w.data1&&m.push(w.data1.buffer),w.data2&&m.push(w.data2.buffer)}function x(m,w,p){w.forEach(function(d){o(m,d)}),m.postMessage({event:"flush",data:p})}function g(m){return!m.audio&&!m.video&&!m.text&&!m.id3&&!m.initSegment}},"./src/demux/transmuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return l}),C.d(u,"isPromise",function(){return v}),C.d(u,"TransmuxConfig",function(){return i}),C.d(u,"TransmuxState",function(){return L});var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/crypt/decrypter.ts"),S=C("./src/demux/aacdemuxer.ts"),f=C("./src/demux/mp4demuxer.ts"),a=C("./src/demux/tsdemuxer.ts"),o=C("./src/demux/mp3demuxer.ts"),r=C("./src/remux/mp4-remuxer.ts"),x=C("./src/remux/passthrough-remuxer.ts"),g=C("./src/demux/chunk-cache.ts"),m=C("./src/utils/mp4-tools.ts"),w=C("./src/utils/logger.ts"),p;try{p=self.performance.now.bind(self.performance)}catch(A){w.logger.debug("Unable to use Performance API on this environment"),p=self.Date.now}var d=[{demux:a.default,remux:r.default},{demux:f.default,remux:x.default},{demux:S.default,remux:r.default},{demux:o.default,remux:r.default}],n=1024;d.forEach(function(A){var y=A.demux;n=Math.max(n,y.minProbeByteLength)});var l=function(){function A(E,b,_,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 g.default,this.observer=E,this.typeSupported=b,this.config=_,this.vendor=I,this.id=j}var y=A.prototype;return y.configure=function(b){this.transmuxConfig=b,this.decrypter&&this.decrypter.reset()},y.push=function(b,_,I,j){var M=this,G=I.transmuxing;G.executeStart=p();var K=new Uint8Array(b),H=this.cache,z=this.config,B=this.currentTransmuxState,W=this.transmuxConfig;j&&(this.currentTransmuxState=j);var F=c(K,_);if(F&&F.method==="AES-128"){var $=this.getDecrypter();if(z.enableSoftwareAES){var ee=$.softwareDecrypt(K,F.key.buffer,F.iv.buffer);if(!ee)return G.executeEnd=p(),T(I);K=new Uint8Array(ee)}else return this.decryptionPromise=$.webCryptoDecrypt(K,F.key.buffer,F.iv.buffer).then(function(J){var X=M.push(J,null,I);return M.decryptionPromise=null,X}),this.decryptionPromise}var Z=j||B,ve=Z.contiguous,he=Z.discontinuity,le=Z.trackSwitch,Re=Z.accurateTimeOffset,xe=Z.timeOffset,ie=W.audioCodec,se=W.videoCodec,re=W.defaultInitPts,be=W.duration,q=W.initSegmentData;if((he||le)&&this.resetInitSegment(q,ie,se,be),he&&this.resetInitialTimestamp(re),ve||this.resetContiguity(),this.needsProbing(K,he,le)){if(H.dataLength){var ne=H.flush();K=Object(m.appendUint8Array)(ne,K)}this.configureTransmuxer(K,W)}var Te=this.transmux(K,F,xe,Re,I),ae=this.currentTransmuxState;return ae.contiguous=!0,ae.discontinuity=!1,ae.trackSwitch=!1,G.executeEnd=p(),Te},y.flush=function(b){var _=this,I=b.transmuxing;I.executeStart=p();var j=this.decrypter,M=this.cache,G=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return _.flush(b)});var H=[],z=G.timeOffset;if(j){var B=j.flush();B&&H.push(this.push(B,null,b))}var W=M.dataLength;M.reset();var F=this.demuxer,$=this.remuxer;if(!F||!$)return W>=n&&this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),I.executeEnd=p(),[T(b)];var ee=F.flush(z);return v(ee)?ee.then(function(Z){return _.flushRemux(H,Z,b),H}):(this.flushRemux(H,ee,b),H)},y.flushRemux=function(b,_,I){var j=_.audioTrack,M=_.avcTrack,G=_.id3Track,K=_.textTrack,H=this.currentTransmuxState,z=H.accurateTimeOffset,B=H.timeOffset;w.logger.log("[transmuxer.ts]: Flushed fragment "+I.sn+(I.part>-1?" p: "+I.part:"")+" of level "+I.level);var W=this.remuxer.remux(j,M,G,K,B,z,!0,this.id);b.push({remuxResult:W,chunkMeta:I}),I.transmuxing.executeEnd=p()},y.resetInitialTimestamp=function(b){var _=this.demuxer,I=this.remuxer;if(!_||!I)return;_.resetTimeStamp(b),I.resetTimeStamp(b)},y.resetContiguity=function(){var b=this.demuxer,_=this.remuxer;if(!b||!_)return;b.resetContiguity(),_.resetNextTimestamp()},y.resetInitSegment=function(b,_,I,j){var M=this.demuxer,G=this.remuxer;if(!M||!G)return;M.resetInitSegment(_,I,j),G.resetInitSegment(b,_,I)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(b,_,I,j,M){var G;return _&&_.method==="SAMPLE-AES"?G=this.transmuxSampleAes(b,_,I,j,M):G=this.transmuxUnencrypted(b,I,j,M),G},y.transmuxUnencrypted=function(b,_,I,j){var M=this.demuxer.demux(b,_,!1,!this.config.progressive),G=M.audioTrack,K=M.avcTrack,H=M.id3Track,z=M.textTrack,B=this.remuxer.remux(G,K,H,z,_,I,!1,this.id);return{remuxResult:B,chunkMeta:j}},y.transmuxSampleAes=function(b,_,I,j,M){var G=this;return this.demuxer.demuxSampleAes(b,_,I).then(function(K){var H=G.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,I,j,!1,G.id);return{remuxResult:H,chunkMeta:M}})},y.configureTransmuxer=function(b,_){for(var I=this.config,j=this.observer,M=this.typeSupported,G=this.vendor,K=_.audioCodec,H=_.defaultInitPts,z=_.duration,B=_.initSegmentData,W=_.videoCodec,F,$=0,ee=d.length;$<ee;$++)if(d[$].demux.probe(b)){F=d[$];break}F||(w.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),F={demux:f.default,remux:x.default});var Z=this.demuxer,ve=this.remuxer,he=F.remux,le=F.demux;(!ve||!(ve instanceof he))&&(this.remuxer=new he(j,I,M,G)),(!Z||!(Z instanceof le))&&(this.demuxer=new le(j,I,M),this.probe=le.probe),this.resetInitSegment(B,K,W,z),this.resetInitialTimestamp(H)},y.needsProbing=function(b,_,I){return!this.demuxer||!this.remuxer||_||I},y.getDecrypter=function(){var b=this.decrypter;return b||(b=this.decrypter=new s.default(this.observer,this.config)),b},A}();function c(A,y){var E=null;return A.byteLength>0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(E=y),E}var T=function(y){return{remuxResult:{},chunkMeta:y}};function v(A){return"then"in A&&A.then instanceof Function}var i=function(y,E,b,_,I){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=E,this.initSegmentData=b,this.duration=_,this.defaultInitPts=I},L=function(y,E,b,_,I){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=E,this.accurateTimeOffset=b,this.trackSwitch=_,this.timeOffset=I}},"./src/demux/tsdemuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"discardEPB",function(){return T});var R=C("./src/demux/adts.ts"),h=C("./src/demux/mpegaudio.ts"),s=C("./src/demux/exp-golomb.ts"),S=C("./src/demux/id3.ts"),f=C("./src/demux/sample-aes.ts"),a=C("./src/events.ts"),o=C("./src/utils/mp4-tools.ts"),r=C("./src/utils/logger.ts"),x=C("./src/errors.ts"),g={video:1,audio:2,id3:3,text:4},m=function(){function v(L,A,y){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=A,this.typeSupported=y}v.probe=function(A){var y=v.syncOffset(A);return y<0?!1:(y&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},v.syncOffset=function(A){for(var y=Math.min(1e3,A.length-3*188),E=0;E<y;){if(A[E]===71&&A[E+188]===71&&A[E+2*188]===71)return E;E++}return-1},v.createTrack=function(A,y){return{container:A==="video"||A==="audio"?"video/mp2t":void 0,type:A,id:g[A],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:A==="audio"?y:void 0}};var i=v.prototype;return i.resetInitSegment=function(A,y,E){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",E),this._audioTrack=v.createTrack("audio",E),this._id3Track=v.createTrack("id3",E),this._txtTrack=v.createTrack("text",E),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=A,this.videoCodec=y,this._duration=E},i.resetTimeStamp=function(){},i.resetContiguity=function(){var A=this._audioTrack,y=this._avcTrack,E=this._id3Track;A&&(A.pesData=null),y&&(y.pesData=null),E&&(E.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},i.demux=function(A,y,E,b){E===void 0&&(E=!1),b===void 0&&(b=!1),E||(this.sampleAes=null);var _,I=this._avcTrack,j=this._audioTrack,M=this._id3Track,G=I.pid,K=I.pesData,H=j.pid,z=M.pid,B=j.pesData,W=M.pesData,F=!1,$=this.pmtParsed,ee=this._pmtId,Z=A.length;if(this.remainderData&&(A=Object(o.appendUint8Array)(this.remainderData,A),Z=A.length,this.remainderData=null),Z<188&&!b)return this.remainderData=A,{audioTrack:j,avcTrack:I,id3Track:M,textTrack:this._txtTrack};var ve=Math.max(0,v.syncOffset(A));Z-=(Z+ve)%188,Z<A.byteLength&&!b&&(this.remainderData=new Uint8Array(A.buffer,Z,A.buffer.byteLength-Z));for(var he=ve;he<Z;he+=188)if(A[he]===71){var le=!!(A[he+1]&64),Re=((A[he+1]&31)<<8)+A[he+2],xe=(A[he+3]&48)>>4,ie=void 0;if(xe>1){if(ie=he+5+A[he+4],ie===he+188)continue}else ie=he+4;switch(Re){case G:le&&(K&&(_=n(K))&&this.parseAVCPES(_,!1),K={data:[],size:0}),K&&(K.data.push(A.subarray(ie,he+188)),K.size+=he+188-ie);break;case H:le&&(B&&(_=n(B))&&(j.isAAC?this.parseAACPES(_):this.parseMPEGPES(_)),B={data:[],size:0}),B&&(B.data.push(A.subarray(ie,he+188)),B.size+=he+188-ie);break;case z:le&&(W&&(_=n(W))&&this.parseID3PES(_),W={data:[],size:0}),W&&(W.data.push(A.subarray(ie,he+188)),W.size+=he+188-ie);break;case 0:le&&(ie+=A[ie]+1),ee=this._pmtId=p(A,ie);break;case ee:{le&&(ie+=A[ie]+1);var se=d(A,ie,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);G=se.avc,G>0&&(I.pid=G),H=se.audio,H>0&&(j.pid=H,j.isAAC=se.isAAC),z=se.id3,z>0&&(M.pid=z),F&&!$&&(r.logger.log("reparse from beginning"),F=!1,he=ve-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:F=!0;break}}else this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:x.ErrorTypes.MEDIA_ERROR,details:x.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});I.pesData=K,j.pesData=B,M.pesData=W;var re={audioTrack:j,avcTrack:I,id3Track:M,textTrack:this._txtTrack};return b&&this.extractRemainingSamples(re),re},i.flush=function(){var A=this.remainderData;this.remainderData=null;var y;return A?y=this.demux(A,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},i.extractRemainingSamples=function(A){var y=A.audioTrack,E=A.avcTrack,b=A.id3Track,_=E.pesData,I=y.pesData,j=b.pesData,M;_&&(M=n(_))?(this.parseAVCPES(M,!0),E.pesData=null):E.pesData=_,I&&(M=n(I))?(y.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),y.pesData=null):(I!=null&&I.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=I),j&&(M=n(j))?(this.parseID3PES(M),b.pesData=null):b.pesData=j},i.demuxSampleAes=function(A,y,E){var b=this.demux(A,E,!0,!this.config.progressive),_=this.sampleAes=new f.default(this.observer,this.config,y);return this.decrypt(b,_)},i.decrypt=function(A,y){return new Promise(function(E){var b=A.audioTrack,_=A.avcTrack;b.samples&&b.isAAC?y.decryptAacSamples(b.samples,0,function(){_.samples?y.decryptAvcSamples(_.samples,0,0,function(){E(A)}):E(A)}):_.samples&&y.decryptAvcSamples(_.samples,0,0,function(){E(A)})})},i.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},i.parseAVCPES=function(A,y){var E=this,b=this._avcTrack,_=this.parseAVCNALu(A.data),I=!1,j=this.avcSample,M,G=!1;A.data=null,j&&_.length&&!b.audFound&&(l(j,b),j=this.avcSample=w(!1,A.pts,A.dts,"")),_.forEach(function(K){switch(K.type){case 1:{M=!0,j||(j=E.avcSample=w(!0,A.pts,A.dts,"")),I&&(j.debug+="NDR "),j.frame=!0;var H=K.data;if(G&&H.length>4){var z=new s.default(H).readSliceType();(z===2||z===4||z===7||z===9)&&(j.key=!0)}break}case 5:M=!0,j||(j=E.avcSample=w(!0,A.pts,A.dts,"")),I&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{M=!0,I&&j&&(j.debug+="SEI ");var B=new s.default(T(K.data));B.readUByte();for(var W=0,F=0,$=!1,ee=0;!$&&B.bytesAvailable>1;){W=0;do ee=B.readUByte(),W+=ee;while(ee===255);F=0;do ee=B.readUByte(),F+=ee;while(ee===255);if(W===4&&B.bytesAvailable!==0){$=!0;var Z=B.readUByte();if(Z===181){var ve=B.readUShort();if(ve===49){var he=B.readUInt();if(he===1195456820){var le=B.readUByte();if(le===3){for(var Re=B.readUByte(),xe=B.readUByte(),ie=31&Re,se=[Re,xe],re=0;re<ie;re++)se.push(B.readUByte()),se.push(B.readUByte()),se.push(B.readUByte());c(E._txtTrack.samples,{type:3,pts:A.pts,bytes:se})}}}}}else if(W===5&&B.bytesAvailable!==0){if($=!0,F>16){for(var be=[],q=0;q<16;q++)be.push(B.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&be.push("-");for(var ne=F-16,Te=new Uint8Array(ne),ae=0;ae<ne;ae++)Te[ae]=B.readUByte();c(E._txtTrack.samples,{pts:A.pts,payloadType:W,uuid:be.join(""),userData:Object(S.utf8ArrayToStr)(Te),userDataBytes:Te})}}else if(F<B.bytesAvailable)for(var J=0;J<F;J++)B.readUByte()}break}case 7:if(M=!0,G=!0,I&&j&&(j.debug+="SPS "),!b.sps){var X=new s.default(K.data),Q=X.readSPS();b.width=Q.width,b.height=Q.height,b.pixelRatio=Q.pixelRatio,b.sps=[K.data],b.duration=E._duration;for(var pe=K.data.subarray(1,4),ce="avc1.",we=0;we<3;we++){var ze=pe[we].toString(16);ze.length<2&&(ze="0"+ze),ce+=ze}b.codec=ce}break;case 8:M=!0,I&&j&&(j.debug+="PPS "),b.pps||(b.pps=[K.data]);break;case 9:M=!1,b.audFound=!0,j&&l(j,b),j=E.avcSample=w(!1,A.pts,A.dts,I?"AUD ":"");break;case 12:M=!1;break;default:M=!1,j&&(j.debug+="unknown NAL "+K.type+" ");break}if(j&&M){var Ge=j.units;Ge.push(K)}}),y&&j&&(l(j,b),this.avcSample=null)},i.getLastNalUnit=function(){var A,y=this.avcSample,E;if(!y||y.units.length===0){var b=this._avcTrack.samples;y=b[b.length-1]}if((A=y)!==null&&A!==void 0&&A.units){var _=y.units;E=_[_.length-1]}return E},i.parseAVCNALu=function(A){var y=A.byteLength,E=this._avcTrack,b=E.naluState||0,_=b,I=[],j=0,M,G,K,H=-1,z=0;for(b===-1&&(H=0,z=A[0]&31,b=0,j=1);j<y;){if(M=A[j++],!b){b=M?0:1;continue}if(b===1){b=M?0:2;continue}if(!M)b=3;else if(M===1){if(H>=0){var B={data:A.subarray(H,j-b-1),type:z};I.push(B)}else{var W=this.getLastNalUnit();if(W&&(_&&j<=4-_&&(W.state&&(W.data=W.data.subarray(0,W.data.byteLength-_))),G=j-b-1,G>0)){var F=new Uint8Array(W.data.byteLength+G);F.set(W.data,0),F.set(A.subarray(0,G),W.data.byteLength),W.data=F,W.state=0}}j<y?(K=A[j]&31,H=j,z=K,b=0):b=-1}else b=0}if(H>=0&&b>=0){var $={data:A.subarray(H,y),type:z,state:b};I.push($)}if(I.length===0){var ee=this.getLastNalUnit();if(ee){var Z=new Uint8Array(ee.data.byteLength+A.byteLength);Z.set(ee.data,0),Z.set(A,ee.data.byteLength),ee.data=Z}}return E.naluState=b,I},i.parseAACPES=function(A){var y=0,E=this._audioTrack,b=this.aacOverFlow,_=A.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(_.subarray(0,j),M),E.samples.push(b.sample),y=b.missing}var G,K;for(G=y,K=_.length;G<K-1&&!R.isHeader(_,G);G++);if(G!==y){var H,z;if(G<K-1?(H="AAC PES did not start with ADTS header,offset:"+G,z=!1):(H="no ADTS header found in AAC PES",z=!0),r.logger.warn("parsing error:"+H),this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:x.ErrorTypes.MEDIA_ERROR,details:x.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:H}),z)return}R.initTrackConfig(E,this.observer,_,G,this.audioCodec);var B;if(A.pts!==void 0)B=A.pts;else if(b){var W=R.getFrameDuration(E.samplerate);B=b.sample.pts+W}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var F=0;G<K;)if(R.isHeader(_,G)){if(G+5<K){var $=R.appendFrame(E,_,G,B,F);if($)if($.missing)this.aacOverFlow=$;else{G+=$.length,F++;continue}}break}else G++},i.parseMPEGPES=function(A){var y=A.data,E=y.length,b=0,_=0,I=A.pts;if(I===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;_<E;)if(h.isHeader(y,_)){var j=h.appendFrame(this._audioTrack,y,_,I,b);if(j)_+=j.length,b++;else break}else _++},i.parseID3PES=function(A){if(A.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(A)},v}();m.minProbeByteLength=188;function w(v,i,L,A){return{key:v,frame:!1,pts:i,dts:L,units:[],debug:A,length:0}}function p(v,i){return(v[i+10]&31)<<8|v[i+11]}function d(v,i,L,A){var y={audio:-1,avc:-1,id3:-1,isAAC:!0},E=(v[i+1]&15)<<8|v[i+2],b=i+3+E-4,_=(v[i+10]&15)<<8|v[i+11];for(i+=12+_;i<b;){var I=(v[i+1]&31)<<8|v[i+2];switch(v[i]){case 207:if(!A){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:y.audio===-1&&(y.audio=I);break;case 21:y.id3===-1&&(y.id3=I);break;case 219:if(!A){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:y.avc===-1&&(y.avc=I);break;case 3:case 4:L?y.audio===-1&&(y.audio=I,y.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}i+=((v[i+3]&15)<<8|v[i+4])+5}return y}function n(v){var i=0,L,A,y,E,b,_=v.data;if(!v||v.size===0)return null;for(;_[0].length<19&&_.length>1;){var I=new Uint8Array(_[0].length+_[1].length);I.set(_[0]),I.set(_[1],_[0].length),_[0]=I,_.splice(1,1)}L=_[0];var j=(L[0]<<16)+(L[1]<<8)+L[2];if(j===1){if(A=(L[4]<<8)+L[5],A&&A>v.size-6)return null;var M=L[7];M&192&&(E=(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,E-b>60*9e4&&(r.logger.warn(Math.round((E-b)/9e4)+"s delta between PTS and DTS, align them"),E=b)):b=E),y=L[8];var G=y+9;if(v.size<=G)return null;v.size-=G;for(var K=new Uint8Array(v.size),H=0,z=_.length;H<z;H++){L=_[H];var B=L.byteLength;if(G)if(G>B){G-=B;continue}else L=L.subarray(G),B-=G,G=0;K.set(L,i),i+=B}return A&&(A-=y+3),{data:K,pts:E,dts:b,len:A}}return null}function l(v,i){if(v.units.length&&v.frame){if(v.pts===void 0){var L=i.samples,A=L.length;if(A){var y=L[A-1];v.pts=y.pts,v.dts=y.dts}else{i.dropped++;return}}i.samples.push(v)}v.debug.length&&r.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function c(v,i){var L=v.length;if(L>0){if(i.pts>=v[L-1].pts)v.push(i);else for(var A=L-1;A>=0;A--)if(i.pts<v[A].pts){v.splice(A,0,i);break}}else v.push(i)}function T(v){for(var i=v.byteLength,L=[],A=1;A<i-2;)v[A]===0&&v[A+1]===0&&v[A+2]===3?(L.push(A+2),A+=2):A++;if(L.length===0)return v;var y=i-L.length,E=new Uint8Array(y),b=0;for(A=0;A<y;b++,A++)b===L[0]&&(b++,L.shift()),E[A]=v[b];return E}u.default=m},"./src/errors.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"ErrorTypes",function(){return R}),C.d(u,"ErrorDetails",function(){return h});var R;(function(s){s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError"})(R||(R={}));var h;(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"})(h||(h={}))},"./src/events.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"Events",function(){return R});var R;(function(h){h.MEDIA_ATTACHING="hlsMediaAttaching",h.MEDIA_ATTACHED="hlsMediaAttached",h.MEDIA_DETACHING="hlsMediaDetaching",h.MEDIA_DETACHED="hlsMediaDetached",h.BUFFER_RESET="hlsBufferReset",h.BUFFER_CODECS="hlsBufferCodecs",h.BUFFER_CREATED="hlsBufferCreated",h.BUFFER_APPENDING="hlsBufferAppending",h.BUFFER_APPENDED="hlsBufferAppended",h.BUFFER_EOS="hlsBufferEos",h.BUFFER_FLUSHING="hlsBufferFlushing",h.BUFFER_FLUSHED="hlsBufferFlushed",h.MANIFEST_LOADING="hlsManifestLoading",h.MANIFEST_LOADED="hlsManifestLoaded",h.MANIFEST_PARSED="hlsManifestParsed",h.LEVEL_SWITCHING="hlsLevelSwitching",h.LEVEL_SWITCHED="hlsLevelSwitched",h.LEVEL_LOADING="hlsLevelLoading",h.LEVEL_LOADED="hlsLevelLoaded",h.LEVEL_UPDATED="hlsLevelUpdated",h.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",h.LEVELS_UPDATED="hlsLevelsUpdated",h.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",h.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",h.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",h.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",h.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",h.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",h.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",h.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",h.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",h.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",h.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",h.CUES_PARSED="hlsCuesParsed",h.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",h.INIT_PTS_FOUND="hlsInitPtsFound",h.FRAG_LOADING="hlsFragLoading",h.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",h.FRAG_LOADED="hlsFragLoaded",h.FRAG_DECRYPTED="hlsFragDecrypted",h.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",h.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",h.FRAG_PARSING_METADATA="hlsFragParsingMetadata",h.FRAG_PARSED="hlsFragParsed",h.FRAG_BUFFERED="hlsFragBuffered",h.FRAG_CHANGED="hlsFragChanged",h.FPS_DROP="hlsFpsDrop",h.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",h.ERROR="hlsError",h.DESTROYING="hlsDestroying",h.KEY_LOADING="hlsKeyLoading",h.KEY_LOADED="hlsKeyLoaded",h.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",h.BACK_BUFFER_REACHED="hlsBackBufferReached"})(R||(R={}))},"./src/hls.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return v});var R=C("./node_modules/url-toolkit/src/url-toolkit.js"),h=C.n(R),s=C("./src/loader/playlist-loader.ts"),S=C("./src/loader/key-loader.ts"),f=C("./src/controller/id3-track-controller.ts"),a=C("./src/controller/latency-controller.ts"),o=C("./src/controller/level-controller.ts"),r=C("./src/controller/fragment-tracker.ts"),x=C("./src/controller/stream-controller.ts"),g=C("./src/is-supported.ts"),m=C("./src/utils/logger.ts"),w=C("./src/config.ts"),p=C("./node_modules/eventemitter3/index.js"),d=C.n(p),n=C("./src/events.ts"),l=C("./src/errors.ts");function c(i,L){for(var A=0;A<L.length;A++){var y=L[A];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,y.key,y)}}function T(i,L,A){return L&&c(i.prototype,L),A&&c(i,A),i}var v=function(){i.isSupported=function(){return Object(g.isSupported)()};function i(A){A===void 0&&(A={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.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 y=this.config=Object(w.mergeConfig)(i.DefaultConfig,A);this.userConfig=A,Object(m.enableLogs)(y.debug),this._autoLevelCapping=-1,y.progressive&&Object(w.enableStreamingMode)(y);var E=y.abrController,b=y.bufferController,_=y.capLevelController,I=y.fpsController,j=this.abrController=new E(this),M=this.bufferController=new b(this),G=this.capLevelController=new _(this),K=new I(this),H=new s.default(this),z=new S.default(this),B=new f.default(this),W=this.levelController=new o.default(this),F=new r.FragmentTracker(this),$=this.streamController=new x.default(this,F);G.setStreamController($),K.setStreamController($);var ee=[W,$];this.networkControllers=ee;var Z=[H,z,j,M,G,K,B,F];this.audioTrackController=this.createController(y.audioTrackController,null,ee),this.createController(y.audioStreamController,F,ee),this.subtitleTrackController=this.createController(y.subtitleTrackController,null,ee),this.createController(y.subtitleStreamController,F,ee),this.createController(y.timelineController,null,Z),this.emeController=this.createController(y.emeController,null,Z),this.cmcdController=this.createController(y.cmcdController,null,Z),this.latencyController=this.createController(a.default,null,Z),this.coreComponents=Z}var L=i.prototype;return L.createController=function(y,E,b){if(y){var _=E?new y(this,E):new y(this);return b&&b.push(_),_}return null},L.on=function(y,E,b){b===void 0&&(b=this),this._emitter.on(y,E,b)},L.once=function(y,E,b){b===void 0&&(b=this),this._emitter.once(y,E,b)},L.removeAllListeners=function(y){this._emitter.removeAllListeners(y)},L.off=function(y,E,b,_){b===void 0&&(b=this),this._emitter.off(y,E,b,_)},L.listeners=function(y){return this._emitter.listeners(y)},L.emit=function(y,E,b){return this._emitter.emit(y,E,b)},L.trigger=function(y,E){if(this.config.debug)return this.emit(y,y,E);try{return this.emit(y,y,E)}catch(b){m.logger.error("An internal error happened while handling event "+y+'. 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:y,error:b})}return!1},L.listenerCount=function(y){return this._emitter.listenerCount(y)},L.destroy=function(){m.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(y){return y.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(y){return y.destroy()}),this.coreComponents.length=0},L.attachMedia=function(y){m.logger.log("attachMedia"),this._media=y,this.trigger(n.Events.MEDIA_ATTACHING,{media:y})},L.detachMedia=function(){m.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(y){this.stopLoad();var E=this.media,b=this.url,_=this.url=R.buildAbsoluteURL(self.location.href,y,{alwaysNormalize:!0});m.logger.log("loadSource:"+_),E&&b&&b!==_&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(E)),this.trigger(n.Events.MANIFEST_LOADING,{url:y})},L.startLoad=function(y){y===void 0&&(y=-1),m.logger.log("startLoad("+y+")"),this.networkControllers.forEach(function(E){E.startLoad(y)})},L.stopLoad=function(){m.logger.log("stopLoad"),this.networkControllers.forEach(function(y){y.stopLoad()})},L.swapAudioCodec=function(){m.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){m.logger.log("recoverMediaError");var y=this._media;this.detachMedia(),y&&this.attachMedia(y)},L.removeLevel=function(y,E){E===void 0&&(E=0),this.levelController.removeLevel(y,E)},T(i,[{key:"levels",get:function(){var y=this.levelController.levels;return y||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(y){m.logger.log("set currentLevel:"+y),this.loadLevel=y,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(y){m.logger.log("set nextLevel:"+y),this.levelController.manualLevel=y,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(y){m.logger.log("set loadLevel:"+y),this.levelController.manualLevel=y}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(y){this.levelController.nextLoadLevel=y}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(y){m.logger.log("set firstLevel:"+y),this.levelController.firstLevel=y}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(y){m.logger.log("set startLevel:"+y),y!==-1&&(y=Math.max(y,this.minAutoLevel)),this.levelController.startLevel=y}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(y){var E=!!y;E!==this.config.capLevelToPlayerSize&&(E?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=E)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(y){this._autoLevelCapping!==y&&(m.logger.log("set autoLevelCapping:"+y),this._autoLevelCapping=y)}},{key:"bandwidthEstimate",get:function(){var y=this.abrController.bwEstimator;return y?y.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var y=this.levels,E=this.config.minAutoBitrate;if(!y)return 0;for(var b=y.length,_=0;_<b;_++)if(y[_].maxBitrate>E)return _;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,E=this.autoLevelCapping,b;return E===-1&&y&&y.length?b=y.length-1:b=E,b}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var E=this.audioTrackController;E&&(E.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var E=this.subtitleTrackController;E&&(E.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{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 i.defaultConfig?i.defaultConfig:w.hlsDefaultConfig},set:function(y){i.defaultConfig=y}}]),i}();v.defaultConfig=void 0},"./src/is-supported.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"isSupported",function(){return s}),C.d(u,"changeTypeSupported",function(){return S});var R=C("./src/utils/mediasource-helper.ts");function h(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var f=Object(R.getMediaSource)();if(!f)return!1;var a=h(),o=f&&typeof f.isTypeSupported=="function"&&f.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!a||a.prototype&&typeof a.prototype.appendBuffer=="function"&&typeof a.prototype.remove=="function";return!!o&&!!r}function S(){var f,a=h();return typeof(a==null||((f=a.prototype)===null||f===void 0)?void 0:f.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m}),C.d(u,"LoadError",function(){return p});var R=C("./src/polyfills/number.ts"),h=C("./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(c){if(c===null||!o(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(c))return n.get(c);n.set(c,T)}function T(){return f(c,arguments,x(this).constructor)}return T.prototype=Object.create(c.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),r(T,c)},S(d)}function f(d,n,l){return a()?f=Reflect.construct:f=function(T,v,i){var L=[null];L.push.apply(L,v);var A=Function.bind.apply(T,L),y=new A;return i&&r(y,i.prototype),y},f.apply(null,arguments)}function a(){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 o(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,n){return r=Object.setPrototypeOf||function(c,T){return c.__proto__=T,c},r(d,n)}function x(d){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},x(d)}var g=Math.pow(2,17),m=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(c,T){var v=this,i=c.url;if(!i)return Promise.reject(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var L=this.config,A=L.fLoader,y=L.loader;return new Promise(function(E,b){v.loader&&v.loader.destroy();var _=v.loader=c.loader=A?new A(L):new y(L),I=w(c),j={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};c.stats=_.stats,_.load(I,j,{onSuccess:function(G,K,H,z){v.resetLoader(c,_),E({frag:c,part:null,payload:G.data,networkDetails:z})},onError:function(G,K,H){v.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,response:G,networkDetails:H}))},onAbort:function(G,K,H){v.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,networkDetails:H}))},onTimeout:function(G,K,H){v.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,networkDetails:H}))},onProgress:function(G,K,H,z){T&&T({frag:c,part:null,payload:H,networkDetails:z})}})})},n.loadPart=function(c,T,v){var i=this;this.abort();var L=this.config,A=L.fLoader,y=L.loader;return new Promise(function(E,b){i.loader&&i.loader.destroy();var _=i.loader=c.loader=A?new A(L):new y(L),I=w(c,T),j={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};T.stats=_.stats,_.load(I,j,{onSuccess:function(G,K,H,z){i.resetLoader(c,_),i.updateStatsFromPart(c,T);var B={frag:c,part:T,payload:G.data,networkDetails:z};v(B),E(B)},onError:function(G,K,H){i.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,part:T,response:G,networkDetails:H}))},onAbort:function(G,K,H){c.stats.aborted=T.stats.aborted,i.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,part:T,networkDetails:H}))},onTimeout:function(G,K,H){i.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,part:T,networkDetails:H}))}})})},n.updateStatsFromPart=function(c,T){var v=c.stats,i=T.stats,L=i.total;if(v.loaded+=i.loaded,L){var A=Math.round(c.duration/T.duration),y=Math.min(Math.round(v.loaded/L),A),E=A-y,b=E*Math.round(v.loaded/y);v.total=v.loaded+b}else v.total=Math.max(v.loaded,v.total);var _=v.loading,I=i.loading;_.start?_.first+=I.first-I.start:(_.start=I.start,_.first=I.first),_.end=I.end},n.resetLoader=function(c,T){c.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,c={frag:d,part:n,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},T=l.byteRangeStartOffset,v=l.byteRangeEndOffset;return Object(R.isFiniteNumber)(T)&&Object(R.isFiniteNumber)(v)&&(c.rangeStart=T,c.rangeEnd=v),c}var p=function(d){s(n,d);function n(l){for(var c,T=arguments.length,v=new Array(T>1?T-1:0),i=1;i<T;i++)v[i-1]=arguments[i];return c=d.call.apply(d,[this].concat(v))||this,c.data=void 0,c.data=l,c}return n}(S(Error))},"./src/loader/fragment.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"ElementaryStreamTypes",function(){return m}),C.d(u,"BaseSegment",function(){return w}),C.d(u,"Fragment",function(){return p}),C.d(u,"Part",function(){return d});var R=C("./src/polyfills/number.ts"),h=C("./node_modules/url-toolkit/src/url-toolkit.js"),s=C.n(h),S=C("./src/utils/logger.ts"),f=C("./src/loader/level-key.ts"),a=C("./src/loader/load-stats.ts");function o(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,v){return T.__proto__=v,T},r(n,l)}function x(n,l){for(var c=0;c<l.length;c++){var T=l[c];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function g(n,l,c){return l&&x(n.prototype,l),c&&x(n,c),n}var m;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(m||(m={}));var w=function(){function n(c){var T;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(T={},T[m.AUDIO]=null,T[m.VIDEO]=null,T[m.AUDIOVIDEO]=null,T),this.baseurl=c}var l=n.prototype;return l.setByteRange=function(T,v){var i=T.split("@",2),L=[];i.length===1?L[0]=v?v.byteRangeEndOffset:0:L[0]=parseInt(i[1]),L[1]=parseInt(i[0])+L[0],this._byteRange=L},g(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(h.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(T){this._url=T}}]),n}(),p=function(n){o(l,n);function l(T,v){var i;return i=n.call(this,v)||this,i._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkey=void 0,i.type=void 0,i.loader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new a.LoadStats,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.type=T,i}var c=l.prototype;return c.createInitializationVector=function(v){for(var i=new Uint8Array(16),L=12;L<16;L++)i[L]=v>>8*(15-L)&255;return i},c.setDecryptDataFromLevelKey=function(v,i){var L=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(L=f.LevelKey.fromURI(v.uri),L.method=v.method,L.iv=this.createInitializationVector(i),L.keyFormat="identity"),L},c.setElementaryStreamInfo=function(v,i,L,A,y,E){E===void 0&&(E=!1);var b=this.elementaryStreams,_=b[v];if(!_){b[v]={startPTS:i,endPTS:L,startDTS:A,endDTS:y,partial:E};return}_.startPTS=Math.min(_.startPTS,i),_.endPTS=Math.max(_.endPTS,L),_.startDTS=Math.min(_.startDTS,A),_.endDTS=Math.max(_.endDTS,y)},c.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[m.AUDIO]=null,v[m.VIDEO]=null,v[m.AUDIOVIDEO]=null},g(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="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'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(R.isFiniteNumber)(this.programDateTime))return null;var v=Object(R.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),l}(w),d=function(n){o(l,n);function l(c,T,v,i,L){var A;A=n.call(this,v)||this,A.fragOffset=0,A.duration=0,A.gap=!1,A.independent=!1,A.relurl=void 0,A.fragment=void 0,A.index=void 0,A.stats=new a.LoadStats,A.duration=c.decimalFloatingPoint("DURATION"),A.gap=c.bool("GAP"),A.independent=c.bool("INDEPENDENT"),A.relurl=c.enumeratedString("URI"),A.fragment=T,A.index=i;var y=c.enumeratedString("BYTERANGE");return y&&A.setByteRange(y,L),L&&(A.fragOffset=L.fragOffset+L.duration),A}return g(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,u,C){"use strict";C.r(u),C.d(u,"default",function(){return S});var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/utils/logger.ts"),S=function(){function f(o){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=o,this._registerListeners()}var a=f.prototype;return a._registerListeners=function(){this.hls.on(R.Events.KEY_LOADING,this.onKeyLoading,this)},a._unregisterListeners=function(){this.hls.off(R.Events.KEY_LOADING,this.onKeyLoading)},a.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var x=this.loaders[r];x&&x.destroy()}this.loaders={}},a.onKeyLoading=function(r,x){var g=x.frag,m=g.type,w=this.loaders[m];if(!g.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var p=g.decryptdata.uri;if(p!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(w&&(s.logger.warn("abort previous key loader for type:"+m),w.abort()),!p){s.logger.warn("key uri is falsy");return}var n=d.loader,l=g.loader=this.loaders[m]=new n(d);this.decrypturl=p,this.decryptkey=null;var c={url:p,frag:g,responseType:"arraybuffer"},T={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(c,T,v)}else this.decryptkey&&(g.decryptdata.key=this.decryptkey,this.hls.trigger(R.Events.KEY_LOADED,{frag:g}))},a.loadsuccess=function(r,x,g){var m=g.frag;if(!m.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=m.decryptdata.key=new Uint8Array(r.data),m.loader=null,delete this.loaders[m.type],this.hls.trigger(R.Events.KEY_LOADED,{frag:m})},a.loaderror=function(r,x){var g=x.frag,m=g.loader;m&&m.abort(),delete this.loaders[g.type],this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:g,response:r})},a.loadtimeout=function(r,x){var g=x.frag,m=g.loader;m&&m.abort(),delete this.loaders[g.type],this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:g})},f}()},"./src/loader/level-details.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"LevelDetails",function(){return f});var R=C("./src/polyfills/number.ts");function h(a,o){for(var r=0;r<o.length;r++){var x=o[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(a,x.key,x)}}function s(a,o,r){return o&&h(a.prototype,o),r&&h(a,r),a}var S=10,f=function(){function a(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 o=a.prototype;return o.reloaded=function(x){if(!x){this.advanced=!0,this.updated=!0;return}var g=this.lastPartSn-x.lastPartSn,m=this.lastPartIndex-x.lastPartIndex;this.updated=this.endSN!==x.endSN||!!m||!!g,this.advanced=this.endSN>x.endSN||g>0||g===0&&m>0,this.updated||this.advanced?this.misses=Math.floor(x.misses*.6):this.misses=x.misses+1,this.availabilityDelay=x.availabilityDelay},s(a,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(R.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var x=this.driftEndTime-this.driftStartTime;if(x>0){var g=this.driftEnd-this.driftStart;return g*1e3/x}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var x;return(x=this.partList)!==null&&x!==void 0&&x.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var x;return(x=this.fragments)!==null&&x!==void 0&&x.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 x;return(x=this.partList)!==null&&x!==void 0&&x.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var x;return(x=this.partList)!==null&&x!==void 0&&x.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),a}()},"./src/loader/level-key.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"LevelKey",function(){return f});var R=C("./node_modules/url-toolkit/src/url-toolkit.js"),h=C.n(R);function s(a,o){for(var r=0;r<o.length;r++){var x=o[r];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(a,x.key,x)}}function S(a,o,r){return o&&s(a.prototype,o),r&&s(a,r),a}var f=function(){a.fromURL=function(r,x){return new a(r,x)},a.fromURI=function(r){return new a(r)};function a(o,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(R.buildAbsoluteURL)(o,r,{alwaysNormalize:!0}):this._uri=o}return S(a,[{key:"uri",get:function(){return this._uri}}]),a}()},"./src/loader/load-stats.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"LoadStats",function(){return R});var R=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,u,C){"use strict";C.r(u),C.d(u,"default",function(){return l});var R=C("./src/polyfills/number.ts"),h=C("./node_modules/url-toolkit/src/url-toolkit.js"),s=C.n(h),S=C("./src/loader/fragment.ts"),f=C("./src/loader/level-details.ts"),a=C("./src/loader/level-key.ts"),o=C("./src/utils/attr-list.ts"),r=C("./src/utils/logger.ts"),x=C("./src/utils/codecs.ts"),g=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,m=/#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"),p=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 A,y;return d.test((A=(y=h.parseURL(L))===null||y===void 0?void 0:y.path)!=null?A:"")}var l=function(){function L(){}return L.findGroup=function(y,E){for(var b=0;b<y.length;b++){var _=y[b];if(_.id===E)return _}},L.convertAVC1ToAVCOTI=function(y){var E=y.split(".");if(E.length>2){var b=E.shift()+".";return b+=parseInt(E.shift()).toString(16),b+=("000"+parseInt(E.shift()).toString(16)).substr(-4),b}return y},L.resolve=function(y,E){return h.buildAbsoluteURL(E,y,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(y,E){var b=[],_={},I=!1;g.lastIndex=0;for(var j;(j=g.exec(y))!=null;)if(j[1]){var M=new o.AttrList(j[1]),G={attrs:M,bitrate:M.decimalInteger("AVERAGE-BANDWIDTH")||M.decimalInteger("BANDWIDTH"),name:M.NAME,url:L.resolve(j[2],E)},K=M.decimalResolution("RESOLUTION");K&&(G.width=K.width,G.height=K.height),c((M.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=L.convertAVC1ToAVCOTI(G.videoCodec)),b.push(G)}else if(j[3]){var H=new o.AttrList(j[3]);H["DATA-ID"]&&(I=!0,_[H["DATA-ID"]]=H)}return{levels:b,sessionData:I?_:null}},L.parseMasterPlaylistMedia=function(y,E,b,_){_===void 0&&(_=[]);var I,j=[],M=0;for(m.lastIndex=0;(I=m.exec(y))!==null;){var G=new o.AttrList(I[1]);if(G.TYPE===b){var K={attrs:G,bitrate:0,id:M++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:b,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?L.resolve(G.URI,E):""};if(_.length){var H=L.findGroup(_,K.groupId)||_[0];T(K,H,"audioCodec"),T(K,H,"textCodec")}j.push(K)}}return j},L.parseLevelPlaylist=function(y,E,b,_,I){var j=new f.LevelDetails(E),M=j.fragments,G=null,K=0,H=0,z=0,B=0,W=null,F=new S.Fragment(_,E),$,ee,Z,ve=-1,he=!1;for(w.lastIndex=0,j.m3u8=y;($=w.exec(y))!==null;){he&&(he=!1,F=new S.Fragment(_,E),F.start=z,F.sn=K,F.cc=B,F.level=b,G&&(F.initSegment=G,F.rawProgramDateTime=G.rawProgramDateTime));var le=$[1];if(le){F.duration=parseFloat(le);var Re=(" "+$[2]).slice(1);F.title=Re||null,F.tagList.push(Re?["INF",le,Re]:["INF",le])}else if($[3])Object(R.isFiniteNumber)(F.duration)&&(F.start=z,Z&&(F.levelkey=Z),F.sn=K,F.level=b,F.cc=B,F.urlId=I,M.push(F),F.relurl=(" "+$[3]).slice(1),i(F,W),W=F,z+=F.duration,K++,H=0,he=!0);else if($[4]){var xe=(" "+$[4]).slice(1);W?F.setByteRange(xe,W):F.setByteRange(xe)}else if($[5])F.rawProgramDateTime=(" "+$[5]).slice(1),F.tagList.push(["PROGRAM-DATE-TIME",F.rawProgramDateTime]),ve===-1&&(ve=M.length);else{if($=$[0].match(p),!$){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee<$.length&&!(typeof $[ee]!="undefined");ee++);var ie=(" "+$[ee]).slice(1),se=(" "+$[ee+1]).slice(1),re=$[ee+2]?(" "+$[ee+2]).slice(1):"";switch(ie){case"PLAYLIST-TYPE":j.type=se.toUpperCase();break;case"MEDIA-SEQUENCE":K=j.startSN=parseInt(se);break;case"SKIP":{var be=new o.AttrList(se),q=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(R.isFiniteNumber)(q)){j.skippedSegments=q;for(var ne=q;ne--;)M.unshift(null);K+=q}var Te=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Te&&(j.recentlyRemovedDateranges=Te.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(se);break;case"VERSION":j.version=parseInt(se);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(se||re)&&F.tagList.push(re?[se,re]:[se]);break;case"DIS":B++;case"GAP":F.tagList.push([ie]);break;case"BITRATE":F.tagList.push([ie,se]);break;case"DISCONTINUITY-SEQ":B=parseInt(se);break;case"KEY":{var ae,J=new o.AttrList(se),X=J.enumeratedString("METHOD"),Q=J.URI,pe=J.hexadecimalInteger("IV"),ce=J.enumeratedString("KEYFORMATVERSIONS"),we=J.enumeratedString("KEYID"),ze=(ae=J.enumeratedString("KEYFORMAT"))!=null?ae:"identity",Ge=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ge.indexOf(ze)>-1){r.logger.warn("Keyformat "+ze+" is not supported from the manifest");continue}else if(ze!=="identity")continue;X&&(Z=a.LevelKey.fromURL(E,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(Z.method=X,Z.keyFormat=ze,we&&(Z.keyID=we),ce&&(Z.keyFormatVersions=ce),Z.iv=pe));break}case"START":{var Qe=new o.AttrList(se),$e=Qe.decimalFloatingPoint("TIME-OFFSET");Object(R.isFiniteNumber)($e)&&(j.startTimeOffset=$e);break}case"MAP":{var rt=new o.AttrList(se);F.relurl=rt.URI,rt.BYTERANGE&&F.setByteRange(rt.BYTERANGE),F.level=b,F.sn="initSegment",Z&&(F.levelkey=Z),F.initSegment=null,G=F,he=!0;break}case"SERVER-CONTROL":{var et=new o.AttrList(se);j.canBlockReload=et.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=et.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&et.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=et.optionalFloat("PART-HOLD-BACK",0),j.holdBack=et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new o.AttrList(se);j.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=j.partList;Ce||(Ce=j.partList=[]);var Ve=H>0?Ce[Ce.length-1]:void 0,tt=H++,He=new S.Part(new o.AttrList(se),F,E,tt,Ve);Ce.push(He),F.duration+=He.duration;break}case"PRELOAD-HINT":{var Je=new o.AttrList(se);j.preloadHint=Je;break}case"RENDITION-REPORT":{var _e=new o.AttrList(se);j.renditionReports=j.renditionReports||[],j.renditionReports.push(_e);break}default:r.logger.warn("line parsed but not handled: "+$);break}}}W&&!W.relurl?(M.pop(),z-=W.duration,j.partList&&(j.fragmentHint=W)):j.partList&&(i(F,W),F.cc=B,j.fragmentHint=F);var Se=M.length,Oe=M[0],de=M[Se-1];if(z+=j.skippedSegments*j.targetduration,z>0&&Se&&de){j.averagetargetduration=z/Se;var ye=de.sn;j.endSN=ye!=="initSegment"?ye:0,Oe&&(j.startCC=Oe.cc,Oe.initSegment||j.fragments.every(function(Ee){return Ee.relurl&&n(Ee.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),F=new S.Fragment(_,E),F.relurl=de.relurl,F.level=b,F.sn="initSegment",Oe.initSegment=F,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(z+=j.fragmentHint.duration),j.totalduration=z,j.endCC=B,ve>0&&v(M,ve),j},L}();function c(L,A){["video","audio","text"].forEach(function(y){var E=L.filter(function(_){return Object(x.isCodecType)(_,y)});if(E.length){var b=E.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});A[y+"Codec"]=b.length>0?b[0]:E[0],L=L.filter(function(_){return E.indexOf(_)===-1})}}),A.unknownCodecs=L}function T(L,A,y){var E=A[y];E&&(L[y]=E)}function v(L,A){for(var y=L[A],E=A;E--;){var b=L[E];if(!b)return;b.programDateTime=y.programDateTime-b.duration*1e3,y=b}}function i(L,A){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):A!=null&&A.programDateTime&&(L.programDateTime=A.endProgramDateTime),Object(R.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/events.ts"),s=C("./src/errors.ts"),S=C("./src/utils/logger.ts"),f=C("./src/utils/mp4-tools.ts"),a=C("./src/loader/m3u8-parser.ts"),o=C("./src/types/loader.ts"),r=C("./src/utils/attr-list.ts");function x(w){var p=w.type;switch(p){case o.PlaylistContextType.AUDIO_TRACK:return o.PlaylistLevelType.AUDIO;case o.PlaylistContextType.SUBTITLE_TRACK:return o.PlaylistLevelType.SUBTITLE;default:return o.PlaylistLevelType.MAIN}}function g(w,p){var d=w.url;return(d===void 0||d.indexOf("data:")===0)&&(d=p.url),d}var m=function(){function w(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var p=w.prototype;return p.registerListeners=function(){var n=this.hls;n.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(h.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(h.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(h.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.unregisterListeners=function(){var n=this.hls;n.off(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(h.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(h.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(h.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},p.createInternalLoader=function(n){var l=this.hls.config,c=l.pLoader,T=l.loader,v=c||T,i=new v(l);return n.loader=i,this.loaders[n.type]=i,i},p.getInternalLoader=function(n){return this.loaders[n.type]},p.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},p.destroyInternalLoaders=function(){for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy(),this.resetInternalLoader(n)}},p.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},p.onManifestLoading=function(n,l){var c=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:o.PlaylistContextType.MANIFEST,url:c,deliveryDirectives:null})},p.onLevelLoading=function(n,l){var c=l.id,T=l.level,v=l.url,i=l.deliveryDirectives;this.load({id:c,groupId:null,level:T,responseType:"text",type:o.PlaylistContextType.LEVEL,url:v,deliveryDirectives:i})},p.onAudioTrackLoading=function(n,l){var c=l.id,T=l.groupId,v=l.url,i=l.deliveryDirectives;this.load({id:c,groupId:T,level:null,responseType:"text",type:o.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:i})},p.onSubtitleTrackLoading=function(n,l){var c=l.id,T=l.groupId,v=l.url,i=l.deliveryDirectives;this.load({id:c,groupId:T,level:null,responseType:"text",type:o.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:i})},p.load=function(n){var l,c=this.hls.config,T=this.getInternalLoader(n);if(T){var v=T.context;if(v&&v.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 i,L,A,y;switch(n.type){case o.PlaylistContextType.MANIFEST:i=c.manifestLoadingMaxRetry,L=c.manifestLoadingTimeOut,A=c.manifestLoadingRetryDelay,y=c.manifestLoadingMaxRetryTimeout;break;case o.PlaylistContextType.LEVEL:case o.PlaylistContextType.AUDIO_TRACK:case o.PlaylistContextType.SUBTITLE_TRACK:i=0,L=c.levelLoadingTimeOut;break;default:i=c.levelLoadingMaxRetry,L=c.levelLoadingTimeOut,A=c.levelLoadingRetryDelay,y=c.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(n),(l=n.deliveryDirectives)!==null&&l!==void 0&&l.part){var E;if(n.type===o.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===o.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===o.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var b=E.partTarget,_=E.targetduration;b&&_&&(L=Math.min(Math.max(b*3,_*.8)*1e3,L))}}var I={timeout:L,maxRetry:i,retryDelay:A,maxRetryDelay:y,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(n,I,j)},p.loadsuccess=function(n,l,c,T){if(T===void 0&&(T=null),c.isSidxRequest){this.handleSidxRequest(n,c),this.handlePlaylistLoaded(n,l,c,T);return}this.resetInternalLoader(c.type);var v=n.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,c,"no EXTM3U delimiter",T);return}l.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,l,c,T):this.handleMasterPlaylist(n,l,c,T)},p.loaderror=function(n,l,c){c===void 0&&(c=null),this.handleNetworkError(l,c,!1,n)},p.loadtimeout=function(n,l,c){c===void 0&&(c=null),this.handleNetworkError(l,c,!0)},p.handleMasterPlaylist=function(n,l,c,T){var v=this.hls,i=n.data,L=g(n,c),A=a.default.parseMasterPlaylist(i,L),y=A.levels,E=A.sessionData;if(!y.length){this.handleManifestParsingError(n,c,"no level found in manifest",T);return}var b=y.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),_=y.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),I=a.default.parseMasterPlaylistMedia(i,L,"AUDIO",b),j=a.default.parseMasterPlaylistMedia(i,L,"SUBTITLES",_),M=a.default.parseMasterPlaylistMedia(i,L,"CLOSED-CAPTIONS");if(I.length){var G=I.some(function(K){return!K.url});!G&&y[0].audioCodec&&!y[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:""}))}v.trigger(h.Events.MANIFEST_LOADED,{levels:y,audioTracks:I,subtitles:j,captions:M,url:L,stats:l,networkDetails:T,sessionData:E})},p.handleTrackOrLevelPlaylist=function(n,l,c,T){var v=this.hls,i=c.id,L=c.level,A=c.type,y=g(n,c),E=Object(R.isFiniteNumber)(i)?i:0,b=Object(R.isFiniteNumber)(L)?L:E,_=x(c),I=a.default.parseLevelPlaylist(n.data,y,b,_,E);if(!I.fragments.length){v.trigger(h.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof c.level=="number"?c.level:void 0});return}if(A===o.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:I,name:"",url:y};v.trigger(h.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:y,stats:l,networkDetails:T,sessionData:null})}if(l.parsing.end=performance.now(),I.needSidxRanges){var M,G=(M=I.fragments[0].initSegment)===null||M===void 0?void 0:M.url;this.load({url:G,isSidxRequest:!0,type:A,level:L,levelDetails:I,id:i,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}c.levelDetails=I,this.handlePlaylistLoaded(n,l,c,T)},p.handleSidxRequest=function(n,l){var c=Object(f.parseSegmentIndex)(new Uint8Array(n.data));if(!c)return;var T=c.references,v=l.levelDetails;T.forEach(function(i,L){var A=i.info,y=v.fragments[L];y.byteRange.length===0&&y.setByteRange(String(1+A.end-A.start)+"@"+String(A.start)),y.initSegment&&y.initSegment.setByteRange(String(c.moovEndOffset)+"@0")})},p.handleManifestParsingError=function(n,l,c,T){this.hls.trigger(h.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===o.PlaylistContextType.MANIFEST,url:n.url,reason:c,response:n,context:l,networkDetails:T})},p.handleNetworkError=function(n,l,c,T){c===void 0&&(c=!1),S.logger.warn("[playlist-loader]: A network "+(c?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var v=s.ErrorDetails.UNKNOWN,i=!1,L=this.getInternalLoader(n);switch(n.type){case o.PlaylistContextType.MANIFEST:v=c?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case o.PlaylistContextType.LEVEL:v=c?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case o.PlaylistContextType.AUDIO_TRACK:v=c?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1;break;case o.PlaylistContextType.SUBTITLE_TRACK:v=c?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,i=!1;break}L&&this.resetInternalLoader(n.type);var A={type:s.ErrorTypes.NETWORK_ERROR,details:v,fatal:i,url:n.url,loader:L,context:n,networkDetails:l};T&&(A.response=T),this.hls.trigger(h.Events.ERROR,A)},p.handlePlaylistLoaded=function(n,l,c,T){var v=c.type,i=c.level,L=c.id,A=c.groupId,y=c.loader,E=c.levelDetails,b=c.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,c,"invalid target duration",T);return}if(!y)return;E.live&&(y.getCacheAge&&(E.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(v){case o.PlaylistContextType.MANIFEST:case o.PlaylistContextType.LEVEL:this.hls.trigger(h.Events.LEVEL_LOADED,{details:E,level:i||0,id:L||0,stats:l,networkDetails:T,deliveryDirectives:b});break;case o.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(h.Events.AUDIO_TRACK_LOADED,{details:E,id:L||0,groupId:A||"",stats:l,networkDetails:T,deliveryDirectives:b});break;case o.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(h.Events.SUBTITLE_TRACK_LOADED,{details:E,id:L||0,groupId:A||"",stats:l,networkDetails:T,deliveryDirectives:b});break}},w}();u.default=m},"./src/polyfills/number.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"isFiniteNumber",function(){return R}),C.d(u,"MAX_SAFE_INTEGER",function(){return h});var R=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},h=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,u,C){"use strict";C.r(u);var R=function(){function h(){}return h.getSilentFrame=function(S,f){switch(S){case"mp4a.40.2":if(f===1)return new Uint8Array([0,200,0,128,35,128]);if(f===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(f===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(f===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(f===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(f===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(f===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(f===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(f===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},h}();u.default=R},"./src/remux/mp4-generator.ts":function(P,u,C){"use strict";C.r(u);var R=Math.pow(2,32)-1,h=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 f;for(f in s.types)s.types.hasOwnProperty(f)&&(s.types[f]=[f.charCodeAt(0),f.charCodeAt(1),f.charCodeAt(2),f.charCodeAt(3)]);var a=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]),o=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:a,audio:o};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),x=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=x,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 g=new Uint8Array([105,115,111,109]),m=new Uint8Array([97,118,99,49]),w=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,g,w,g,m),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,r))},s.box=function(f){for(var a=8,o=arguments.length,r=new Array(o>1?o-1:0),x=1;x<o;x++)r[x-1]=arguments[x];for(var g=r.length,m=g;g--;)a+=r[g].byteLength;var w=new Uint8Array(a);for(w[0]=a>>24&255,w[1]=a>>16&255,w[2]=a>>8&255,w[3]=a&255,w.set(f,4),g=0,a=8;g<m;g++)w.set(r[g],a),a+=r[g].byteLength;return w},s.hdlr=function(f){return s.box(s.types.hdlr,s.HDLR_TYPES[f])},s.mdat=function(f){return s.box(s.types.mdat,f)},s.mdhd=function(f,a){a*=f;var o=Math.floor(a/(R+1)),r=Math.floor(a%(R+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,f>>24&255,f>>16&255,f>>8&255,f&255,o>>24,o>>16&255,o>>8&255,o&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},s.mdia=function(f){return s.box(s.types.mdia,s.mdhd(f.timescale,f.duration),s.hdlr(f.type),s.minf(f))},s.mfhd=function(f){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255]))},s.minf=function(f){return f.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(f)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(f))},s.moof=function(f,a,o){return s.box(s.types.moof,s.mfhd(f),s.traf(o,a))},s.moov=function(f){for(var a=f.length,o=[];a--;)o[a]=s.trak(f[a]);return s.box.apply(null,[s.types.moov,s.mvhd(f[0].timescale,f[0].duration)].concat(o).concat(s.mvex(f)))},s.mvex=function(f){for(var a=f.length,o=[];a--;)o[a]=s.trex(f[a]);return s.box.apply(null,[s.types.mvex].concat(o))},s.mvhd=function(f,a){a*=f;var o=Math.floor(a/(R+1)),r=Math.floor(a%(R+1)),x=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,f>>24&255,f>>16&255,f>>8&255,f&255,o>>24,o>>16&255,o>>8&255,o&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,x)},s.sdtp=function(f){var a=f.samples||[],o=new Uint8Array(4+a.length),r,x;for(r=0;r<a.length;r++)x=a[r].flags,o[r+4]=x.dependsOn<<4|x.isDependedOn<<2|x.hasRedundancy;return s.box(s.types.sdtp,o)},s.stbl=function(f){return s.box(s.types.stbl,s.stsd(f),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(f){var a=[],o=[],r,x,g;for(r=0;r<f.sps.length;r++)x=f.sps[r],g=x.byteLength,a.push(g>>>8&255),a.push(g&255),a=a.concat(Array.prototype.slice.call(x));for(r=0;r<f.pps.length;r++)x=f.pps[r],g=x.byteLength,o.push(g>>>8&255),o.push(g&255),o=o.concat(Array.prototype.slice.call(x));var m=s.box(s.types.avcC,new Uint8Array([1,a[3],a[4],a[5],252|3,224|f.sps.length].concat(a).concat([f.pps.length]).concat(o))),w=f.width,p=f.height,d=f.pixelRatio[0],n=f.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,p>>8&255,p&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]),m,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(f){var a=f.config.length;return new Uint8Array([0,0,0,0,3,23+a,0,1,0,4,15+a,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([a]).concat(f.config).concat([6,1,2]))},s.mp4a=function(f){var a=f.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,f.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]),s.box(s.types.esds,s.esds(f)))},s.mp3=function(f){var a=f.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,f.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]))},s.stsd=function(f){return f.type==="audio"?!f.isAAC&&f.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(f)):s.box(s.types.stsd,s.STSD,s.mp4a(f)):s.box(s.types.stsd,s.STSD,s.avc1(f))},s.tkhd=function(f){var a=f.id,o=f.duration*f.timescale,r=f.width,x=f.height,g=Math.floor(o/(R+1)),m=Math.floor(o%(R+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,a>>24&255,a>>16&255,a>>8&255,a&255,0,0,0,0,g>>24,g>>16&255,g>>8&255,g&255,m>>24,m>>16&255,m>>8&255,m&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,x>>8&255,x&255,0,0]))},s.traf=function(f,a){var o=s.sdtp(f),r=f.id,x=Math.floor(a/(R+1)),g=Math.floor(a%(R+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,x>>24,x>>16&255,x>>8&255,x&255,g>>24,g>>16&255,g>>8&255,g&255])),s.trun(f,o.length+16+20+8+16+8+8),o)},s.trak=function(f){return f.duration=f.duration||4294967295,s.box(s.types.trak,s.tkhd(f),s.mdia(f))},s.trex=function(f){var a=f.id;return s.box(s.types.trex,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},s.trun=function(f,a){var o=f.samples||[],r=o.length,x=12+16*r,g=new Uint8Array(x),m,w,p,d,n,l;for(a+=8+x,g.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255],0),m=0;m<r;m++)w=o[m],p=w.duration,d=w.size,n=w.flags,l=w.cts,g.set([p>>>24&255,p>>>16&255,p>>>8&255,p&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*m);return s.box(s.types.trun,g)},s.initSegment=function(f){s.types||s.init();var a=s.moov(f),o=new Uint8Array(s.FTYP.byteLength+a.byteLength);return o.set(s.FTYP),o.set(a,s.FTYP.byteLength),o},s}();h.types=void 0,h.HDLR_TYPES=void 0,h.STTS=void 0,h.STSC=void 0,h.STCO=void 0,h.STSZ=void 0,h.VMHD=void 0,h.SMHD=void 0,h.STSD=void 0,h.FTYP=void 0,h.DINF=void 0,u.default=h},"./src/remux/mp4-remuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return l}),C.d(u,"normalizePts",function(){return c});var R=C("./src/polyfills/number.ts"),h=C("./src/remux/aac-helper.ts"),s=C("./src/remux/mp4-generator.ts"),S=C("./src/events.ts"),f=C("./src/errors.ts"),a=C("./src/utils/logger.ts"),o=C("./src/types/loader.ts"),r=C("./src/utils/timescale-conversion.ts");function x(){return x=Object.assign||function(L){for(var A=1;A<arguments.length;A++){var y=arguments[A];for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(L[E]=y[E])}return L},x.apply(this,arguments)}var g=10*1e3,m=1024,w=1152,p=null,d=null,n=!1,l=function(){function L(y,E,b,_){if(_===void 0&&(_=""),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=y,this.config=E,this.typeSupported=b,this.ISGenerated=!1,p===null){var I=navigator.userAgent||"",j=I.match(/Chrome\/(\d+)/i);p=j?parseInt(j[1]):0}if(d===null){var M=navigator.userAgent.match(/Safari\/(\d+)/i);d=M?parseInt(M[1]):0}n=!!p&&p<75||!!d&&d<600}var A=L.prototype;return A.destroy=function(){},A.resetTimeStamp=function(E){a.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=E},A.resetNextTimestamp=function(){a.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},A.resetInitSegment=function(){a.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},A.getVideoStartPts=function(E){var b=!1,_=E.reduce(function(I,j){var M=j.pts-I;return M<-4294967296?(b=!0,c(I,j.pts)):M>0?I:j.pts},E[0].pts);return b&&a.logger.debug("PTS rollover detected"),_},A.remux=function(E,b,_,I,j,M,G,K){var H,z,B,W,F,$,ee=j,Z=j,ve=E.pid>-1,he=b.pid>-1,le=b.samples.length,Re=E.samples.length>0,xe=le>1,ie=(!ve||Re)&&(!he||xe)||this.ISGenerated||G;if(ie){this.ISGenerated||(B=this.generateIS(E,b,j));var se=this.isVideoContiguous,re=-1;if(xe&&(re=T(b.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,re>0){a.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+le+" video samples due to a missing keyframe");var be=this.getVideoStartPts(b.samples);b.samples=b.samples.slice(re),b.dropped+=re,Z+=(b.samples[0].pts-be)/(b.timescale||9e4)}else re===-1&&(a.logger.warn("[mp4-remuxer]: No keyframe found out of "+le+" video samples"),$=!1);if(this.ISGenerated){if(Re&&xe){var q=this.getVideoStartPts(b.samples),ne=c(E.samples[0].pts,q)-q,Te=ne/b.inputTimeScale;ee+=Math.max(0,Te),Z+=Math.max(0,-Te)}if(Re){if(E.samplerate||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(E,b,j)),z=this.remuxAudio(E,ee,this.isAudioContiguous,M,he||xe||K===o.PlaylistLevelType.AUDIO?Z:void 0),xe){var ae=z?z.endPTS-z.startPTS:0;b.inputTimeScale||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(E,b,j)),H=this.remuxVideo(b,Z,se,ae)}}else xe&&(H=this.remuxVideo(b,Z,se,0));H&&(H.firstKeyFrame=re,H.independent=re!==-1)}}return this.ISGenerated&&(_.samples.length&&(F=this.remuxID3(_,j)),I.samples.length&&(W=this.remuxText(I,j))),{audio:z,video:H,initSegment:B,independent:$,text:W,id3:F}},A.generateIS=function(E,b,_){var I=E.samples,j=b.samples,M=this.typeSupported,G={},K=!Object(R.isFiniteNumber)(this._initPTS),H="audio/mp4",z,B,W;if(K&&(z=B=Infinity),E.config&&I.length&&(E.timescale=E.samplerate,E.isAAC||(M.mpeg?(H="audio/mpeg",E.codec=""):M.mp3&&(E.codec="mp3")),G.audio={id:"audio",container:H,codec:E.codec,initSegment:!E.isAAC&&M.mpeg?new Uint8Array(0):s.default.initSegment([E]),metadata:{channelCount:E.channelCount}},K&&(W=E.inputTimeScale,z=B=I[0].pts-Math.round(W*_))),b.sps&&b.pps&&j.length&&(b.timescale=b.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:b.codec,initSegment:s.default.initSegment([b]),metadata:{width:b.width,height:b.height}},K)){W=b.inputTimeScale;var F=this.getVideoStartPts(j),$=Math.round(W*_);B=Math.min(B,c(j[0].dts,F)-$),z=Math.min(z,F-$)}if(Object.keys(G).length)return this.ISGenerated=!0,K&&(this._initPTS=z,this._initDTS=B),{tracks:G,initPTS:z,timescale:W}},A.remuxVideo=function(E,b,_,I){var j=E.inputTimeScale,M=E.samples,G=[],K=M.length,H=this._initPTS,z=this.nextAvcDts,B=8,W,F,$,ee=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,ve=0,he=!1;if(!_||z===null){var le=b*j,Re=M[0].pts-c(M[0].dts,M[0].pts);z=le-Re}for(var xe=0;xe<K;xe++){var ie=M[xe];if(ie.pts=c(ie.pts-H,z),ie.dts=c(ie.dts-H,z),ie.dts>ie.pts){var se=9e4*.2;ve=Math.max(Math.min(ve,ie.pts-ie.dts),-1*se)}ie.dts<M[xe>0?xe-1:xe].dts&&(he=!0)}he&&M.sort(function(jt,Ct){var xt=jt.dts-Ct.dts,Yt=jt.pts-Ct.pts;return xt||Yt}),F=M[0].dts,$=M[M.length-1].dts;var re=Math.round(($-F)/(K-1));if(ve<0){if(ve<re*-2){a.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-re,!0)+" ms");for(var be=ve,q=0;q<K;q++)M[q].dts=be=Math.max(be,M[q].pts-re),M[q].pts=Math.max(be,M[q].pts)}else{a.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(ve,!0)+" ms to overcome this issue");for(var ne=0;ne<K;ne++)M[ne].dts=M[ne].dts+ve}F=M[0].dts}if(_){var Te=F-z,ae=Te>re,J=Te<-1;if(ae||J){ae?a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(Te,!0)+" ms ("+Te+"dts) hole between fragments detected, filling it"):a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-Te,!0)+" ms ("+Te+"dts) overlapping between fragments detected"),F=z;var X=M[0].pts-Te;M[0].dts=F,M[0].pts=X,a.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(X,!0)+"/"+Object(r.toMsFromMpegTsClock)(F,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(Te,!0)+" ms")}}n&&(F=Math.max(0,F));for(var Q=0,pe=0,ce=0;ce<K;ce++){for(var we=M[ce],ze=we.units,Ge=ze.length,Qe=0,$e=0;$e<Ge;$e++)Qe+=ze[$e].data.length;pe+=Qe,Q+=Ge,we.length=Qe,we.dts=Math.max(we.dts,F),we.pts=Math.max(we.pts,we.dts,0),ee=Math.min(we.pts,ee),Z=Math.max(we.pts,Z)}$=M[K-1].dts;var rt=pe+4*Q+8,et;try{et=new Uint8Array(rt)}catch(jt){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:f.ErrorTypes.MUX_ERROR,details:f.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:rt,reason:"fail allocating video mdat "+rt});return}var Me=new DataView(et.buffer);Me.setUint32(0,rt),et.set(s.default.types.mdat,4);for(var Ce=0;Ce<K;Ce++){for(var Ve=M[Ce],tt=Ve.units,He=0,Je=0,_e=tt.length;Je<_e;Je++){var Se=tt[Je],Oe=Se.data,de=Se.data.byteLength;Me.setUint32(B,de),B+=4,et.set(Oe,B),B+=de,He+=4+de}if(Ce<K-1)W=M[Ce+1].dts-Ve.dts;else{var ye=this.config,Ee=Ve.dts-M[Ce>0?Ce-1:Ce].dts;if(ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(ye.maxBufferHole*j),Be=(I?ee+I*j:this.nextAudioPts)-Ve.pts;Be>De?(W=Be-Ee,W<0&&(W=Ee),a.logger.log("[mp4-remuxer]: It is approximately "+Be/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=Ee}else W=Ee}var Xe=Math.round(Ve.pts-Ve.dts);G.push(new v(Ve.key,W,He,Xe))}if(G.length&&p&&p<70){var nt=G[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=$+W,this.isVideoContiguous=!0;var dt=s.default.moof(E.sequenceNumber++,F,x({},E,{samples:G})),Et="video",ft={data1:dt,data2:et,startPTS:ee/j,endPTS:(Z+W)/j,startDTS:F/j,endDTS:z/j,type:Et,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(et.length,"MDAT length must not be zero"),ft},A.remuxAudio=function(E,b,_,I,j){var M=E.inputTimeScale,G=E.samplerate?E.samplerate:M,K=M/G,H=E.isAAC?m:w,z=H*K,B=this._initPTS,W=!E.isAAC&&this.typeSupported.mpeg,F=[],$=E.samples,ee=W?0:8,Z=this.nextAudioPts||-1,ve=b*M;if(this.isAudioContiguous=_=_||$.length&&Z>0&&(I&&Math.abs(ve-Z)<9e3||Math.abs(c($[0].pts-B,ve)-Z)<20*z),$.forEach(function(Oe){Oe.pts=c(Oe.pts-B,ve)}),!_||Z<0){if($=$.filter(function(Oe){return Oe.pts>=0}),!$.length)return;j===0?Z=0:I?Z=Math.max(0,ve):Z=$[0].pts}if(E.isAAC)for(var he=j!==void 0,le=this.config.maxAudioFramesDrift,Re=0,xe=Z;Re<$.length;Re++){var ie=$[Re],se=ie.pts,re=se-xe,be=Math.abs(1e3*re/M);if(re<=-le*z&&he)Re===0&&(a.logger.warn("Audio frame @ "+(se/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/M)+" ms."),this.nextAudioPts=Z=xe=se);else if(re>=le*z&&be<g&&he){var q=Math.round(re/z);xe=se-q*z,xe<0&&(q--,xe+=z),Re===0&&(this.nextAudioPts=Z=xe),a.logger.warn("[mp4-remuxer]: Injecting "+q+" audio frame @ "+(xe/M).toFixed(3)+"s due to "+Math.round(1e3*re/M)+" ms gap.");for(var ne=0;ne<q;ne++){var Te=Math.max(xe,0),ae=h.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);ae||(a.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ae=ie.unit.subarray()),$.splice(Re,0,{unit:ae,pts:Te}),xe+=z,Re++}}ie.pts=xe,xe+=z}for(var J=null,X=null,Q,pe=0,ce=$.length;ce--;)pe+=$[ce].unit.byteLength;for(var we=0,ze=$.length;we<ze;we++){var Ge=$[we],Qe=Ge.unit,$e=Ge.pts;if(X!==null){var rt=F[we-1];rt.duration=Math.round(($e-X)/K)}else if(_&&E.isAAC&&($e=Z),J=$e,pe>0){pe+=ee;try{Q=new Uint8Array(pe)}catch(Oe){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:f.ErrorTypes.MUX_ERROR,details:f.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:pe,reason:"fail allocating audio mdat "+pe});return}if(!W){var et=new DataView(Q.buffer);et.setUint32(0,pe),Q.set(s.default.types.mdat,4)}}else return;Q.set(Qe,ee);var Me=Qe.byteLength;ee+=Me,F.push(new v(!0,H,Me,0)),X=$e}var Ce=F.length;if(!Ce)return;var Ve=F[F.length-1];this.nextAudioPts=Z=X+K*Ve.duration;var tt=W?new Uint8Array(0):s.default.moof(E.sequenceNumber++,J/K,x({},E,{samples:F}));E.samples=[];var He=J/M,Je=Z/M,_e="audio",Se={data1:tt,data2:Q,startPTS:He,endPTS:Je,startDTS:He,endDTS:Je,type:_e,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),Se},A.remuxEmptyAudio=function(E,b,_,I){var j=E.inputTimeScale,M=E.samplerate?E.samplerate:j,G=j/M,K=this.nextAudioPts,H=(K!==null?K:I.startDTS*j)+this._initDTS,z=I.endDTS*j+this._initDTS,B=G*m,W=Math.ceil((z-H)/B),F=h.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(a.logger.warn("[mp4-remuxer]: remux empty Audio"),!F){a.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],ee=0;ee<W;ee++){var Z=H+ee*B;$.push({unit:F,pts:Z,dts:Z})}return E.samples=$,this.remuxAudio(E,b,_,!1)},A.remuxID3=function(E,b){var _=E.samples.length;if(!_)return;for(var I=E.inputTimeScale,j=this._initPTS,M=this._initDTS,G=0;G<_;G++){var K=E.samples[G];K.pts=c(K.pts-j,b*I)/I,K.dts=c(K.dts-M,b*I)/I}var H=E.samples;return E.samples=[],{samples:H}},A.remuxText=function(E,b){var _=E.samples.length;if(!_)return;for(var I=E.inputTimeScale,j=this._initPTS,M=0;M<_;M++){var G=E.samples[M];G.pts=c(G.pts-j,b*I)/I}E.samples.sort(function(H,z){return H.pts-z.pts});var K=E.samples;return E.samples=[],{samples:K}},L}();function c(L,A){var y;if(A===null)return L;for(A<L?y=-8589934592:y=8589934592;Math.abs(L-A)>4294967296;)L+=y;return L}function T(L){for(var A=0;A<L.length;A++)if(L[A].key)return A;return-1}var v=function(A,y,E,b){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=y,this.size=E,this.cts=b,this.flags=new i(A)},i=function(A){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=A?2:1,this.isNonSync=A?0:1}},"./src/remux/passthrough-remuxer.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/utils/mp4-tools.ts"),s=C("./src/loader/fragment.ts"),S=C("./src/utils/logger.ts"),f=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 x=r.prototype;return x.destroy=function(){},x.resetTimeStamp=function(m){this.initPTS=m,this.lastEndDTS=null},x.resetNextTimestamp=function(){this.lastEndDTS=null},x.resetInitSegment=function(m,w,p){this.audioCodec=w,this.videoCodec=p,this.generateInitSegment(m),this.emitInitSegment=!0},x.generateInitSegment=function(m){var w=this.audioCodec,p=this.videoCodec;if(!m||!m.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(h.parseInitSegment)(m);w||(w=o(d.audio,s.ElementaryStreamTypes.AUDIO)),p||(p=o(d.video,s.ElementaryStreamTypes.VIDEO));var n={};d.audio&&d.video?n.audiovideo={container:"video/mp4",codec:w+","+p,initSegment:m,id:"main"}:d.audio?n.audio={container:"audio/mp4",codec:w,initSegment:m,id:"audio"}:d.video?n.video={container:"video/mp4",codec:p,initSegment:m,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},x.remux=function(m,w,p,d,n){var l=this.initPTS,c=this.lastEndDTS,T={audio:void 0,video:void 0,text:d,id3:p,initSegment:void 0};Object(R.isFiniteNumber)(c)||(c=this.lastEndDTS=n||0);var v=w.samples;if(!v||!v.length)return T;var i={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(v),L=this.initData),!L||!L.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),T;this.emitInitSegment&&(i.tracks=this.initTracks,this.emitInitSegment=!1),Object(R.isFiniteNumber)(l)||(this.initPTS=i.initPTS=l=a(L,v,c));var A=Object(h.getDuration)(v,L),y=c,E=A+y;Object(h.offsetStartDTS)(L,v,l),A>0?this.lastEndDTS=E:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!L.audio,_=!!L.video,I="";b&&(I+="audio"),_&&(I+="video");var j={data1:v,startPTS:y,startDTS:y,endPTS:E,endDTS:E,type:I,hasAudio:b,hasVideo:_,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=p,T.initSegment=i,T},r}(),a=function(x,g,m){return Object(h.getStartDTS)(x,g)-m};function o(r,x){var g=r==null?void 0:r.codec;return g&&g.length>4?g:g==="hvc1"?"hvc1.1.c.L120.90":g==="av01"?"av01.0.04M.08":g==="avc1"||x===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}u.default=f},"./src/task-loop.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var s=h.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(f){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,f),!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(){},h}()},"./src/types/cmcd.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"CMCDVersion",function(){return R}),C.d(u,"CMCDObjectType",function(){return h}),C.d(u,"CMCDStreamingFormat",function(){return s}),C.d(u,"CMCDStreamType",function(){return S});var R=1,h;(function(f){f.MANIFEST="m",f.AUDIO="a",f.VIDEO="v",f.MUXED="av",f.INIT="i",f.CAPTION="c",f.TIMED_TEXT="tt",f.KEY="k",f.OTHER="o"})(h||(h={}));var s;(function(f){f.DASH="d",f.HLS="h",f.SMOOTH="s",f.OTHER="o"})(s||(s={}));var S;(function(f){f.VOD="v",f.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"HlsSkip",function(){return s}),C.d(u,"getSkipValue",function(){return S}),C.d(u,"HlsUrlParameters",function(){return f}),C.d(u,"Level",function(){return a});function R(o,r){for(var x=0;x<r.length;x++){var g=r[x];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}function h(o,r,x){return r&&R(o.prototype,r),x&&R(o,x),o}var s;(function(o){o.No="",o.Yes="YES",o.v2="v2"})(s||(s={}));function S(o,r){var x=o.canSkipUntil,g=o.canSkipDateRanges,m=o.endSN,w=r!==void 0?r-m:0;return x&&w<x?g?s.v2:s.Yes:s.No}var f=function(){function o(x,g,m){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=x,this.part=g,this.skip=m}var r=o.prototype;return r.addDirectives=function(g){var m=new self.URL(g);return this.msn!==void 0&&m.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&m.searchParams.set("_HLS_part",this.part.toString()),this.skip&&m.searchParams.set("_HLS_skip",this.skip),m.toString()},o}(),a=function(){function o(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(x){return x}).join(",").replace(/\.[^.,]+/g,"")}return h(o,[{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(x){var g=x%this.url.length;this._urlId!==g&&(this.details=void 0,this._urlId=g)}}]),o}()},"./src/types/loader.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"PlaylistContextType",function(){return R}),C.d(u,"PlaylistLevelType",function(){return h});var R;(function(s){s.MANIFEST="manifest",s.LEVEL="level",s.AUDIO_TRACK="audioTrack",s.SUBTITLE_TRACK="subtitleTrack"})(R||(R={}));var h;(function(s){s.MAIN="main",s.AUDIO="audio",s.SUBTITLE="subtitle"})(h||(h={}))},"./src/types/transmuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"ChunkMetadata",function(){return R});var R=function(S,f,a,o,r,x){o===void 0&&(o=0),r===void 0&&(r=-1),x===void 0&&(x=!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=h(),this.buffering={audio:h(),video:h(),audiovideo:h()},this.level=S,this.sn=f,this.id=a,this.size=o,this.part=r,this.partial=x};function h(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"AttrList",function(){return s});var R=/^(\d+)x(\d+)$/,h=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function S(a){typeof a=="string"&&(a=S.parseAttrList(a));for(var o in a)a.hasOwnProperty(o)&&(this[o]=a[o])}var f=S.prototype;return f.decimalInteger=function(o){var r=parseInt(this[o],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},f.hexadecimalInteger=function(o){if(this[o]){var r=(this[o]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var x=new Uint8Array(r.length/2),g=0;g<r.length/2;g++)x[g]=parseInt(r.slice(g*2,g*2+2),16);return x}else return null},f.hexadecimalIntegerAsNumber=function(o){var r=parseInt(this[o],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},f.decimalFloatingPoint=function(o){return parseFloat(this[o])},f.optionalFloat=function(o,r){var x=this[o];return x?parseFloat(x):r},f.enumeratedString=function(o){return this[o]},f.bool=function(o){return this[o]==="YES"},f.decimalResolution=function(o){var r=R.exec(this[o]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},S.parseAttrList=function(o){var r,x={},g='"';for(h.lastIndex=0;(r=h.exec(o))!==null;){var m=r[2];m.indexOf(g)===0&&m.lastIndexOf(g)===m.length-1&&(m=m.slice(1,-1)),x[r[1]]=m}return x},S}()},"./src/utils/binary-search.ts":function(P,u,C){"use strict";C.r(u);var R={search:function(s,S){for(var f=0,a=s.length-1,o=null,r=null;f<=a;){o=(f+a)/2|0,r=s[o];var x=S(r);if(x>0)f=o+1;else if(x<0)a=o-1;else return r}return null}};u.default=R},"./src/utils/buffer-helper.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"BufferHelper",function(){return s});var R=C("./src/utils/logger.ts"),h={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function S(){}return S.isBuffered=function(a,o){try{if(a){for(var r=S.getBuffered(a),x=0;x<r.length;x++)if(o>=r.start(x)&&o<=r.end(x))return!0}}catch(g){}return!1},S.bufferInfo=function(a,o,r){try{if(a){var x=S.getBuffered(a),g=[],m;for(m=0;m<x.length;m++)g.push({start:x.start(m),end:x.end(m)});return this.bufferedInfo(g,o,r)}}catch(w){}return{len:0,start:o,end:o,nextStart:void 0}},S.bufferedInfo=function(a,o,r){o=Math.max(0,o),a.sort(function(i,L){var A=i.start-L.start;return A||L.end-i.end});var x=[];if(r)for(var g=0;g<a.length;g++){var m=x.length;if(m){var w=x[m-1].end;a[g].start-w<r?a[g].end>w&&(x[m-1].end=a[g].end):x.push(a[g])}else x.push(a[g])}else x=a;for(var p=0,d,n=o,l=o,c=0;c<x.length;c++){var T=x[c].start,v=x[c].end;if(o+r>=T&&o<v)n=T,l=v,p=l-o;else if(o+r<T){d=T;break}}return{len:p,start:n||0,end:l||0,nextStart:d}},S.getBuffered=function(a){try{return a.buffered}catch(o){return R.logger.log("failed to get media.buffered",o),h}},S}()},"./src/utils/cea-608-parser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"Row",function(){return l}),C.d(u,"CaptionScreen",function(){return c});var R=C("./src/utils/logger.ts"),h={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(E){var b=E;return h.hasOwnProperty(E)&&(b=h[E]),String.fromCharCode(b)},S=15,f=100,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={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},x={25:2,26:4,29:6,30:8,31:10,27:13,28:15},g=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],m;(function(y){y[y.ERROR=0]="ERROR",y[y.TEXT=1]="TEXT",y[y.WARNING=2]="WARNING",y[y.INFO=2]="INFO",y[y.DEBUG=3]="DEBUG",y[y.DATA=3]="DATA"})(m||(m={}));var w=function(){function y(){this.time=null,this.verboseLevel=m.ERROR}var E=y.prototype;return E.log=function(_,I){this.verboseLevel>=_&&R.logger.log(this.time+" ["+_+"] "+I)},y}(),p=function(E){for(var b=[],_=0;_<E.length;_++)b.push(E[_].toString(16));return b},d=function(){function y(b,_,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=_||!1,this.italics=I||!1,this.background=j||"black",this.flash=M||!1}var E=y.prototype;return E.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},E.setStyles=function(_){for(var I=["foreground","underline","italics","background","flash"],j=0;j<I.length;j++){var M=I[j];_.hasOwnProperty(M)&&(this[M]=_[M])}},E.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},E.equals=function(_){return this.foreground===_.foreground&&this.underline===_.underline&&this.italics===_.italics&&this.background===_.background&&this.flash===_.flash},E.copy=function(_){this.foreground=_.foreground,this.underline=_.underline,this.italics=_.italics,this.background=_.background,this.flash=_.flash},E.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},y}(),n=function(){function y(b,_,I,j,M,G){this.uchar=void 0,this.penState=void 0,this.uchar=b||" ",this.penState=new d(_,I,j,M,G)}var E=y.prototype;return E.reset=function(){this.uchar=" ",this.penState.reset()},E.setChar=function(_,I){this.uchar=_,this.penState.copy(I)},E.setPenState=function(_){this.penState.copy(_)},E.equals=function(_){return this.uchar===_.uchar&&this.penState.equals(_.penState)},E.copy=function(_){this.uchar=_.uchar,this.penState.copy(_.penState)},E.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},y}(),l=function(){function y(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 _=0;_<f;_++)this.chars.push(new n);this.logger=b,this.pos=0,this.currPenState=new d}var E=y.prototype;return E.equals=function(_){for(var I=!0,j=0;j<f;j++)if(!this.chars[j].equals(_.chars[j])){I=!1;break}return I},E.copy=function(_){for(var I=0;I<f;I++)this.chars[I].copy(_.chars[I])},E.isEmpty=function(){for(var _=!0,I=0;I<f;I++)if(!this.chars[I].isEmpty()){_=!1;break}return _},E.setCursor=function(_){this.pos!==_&&(this.pos=_),this.pos<0?(this.logger.log(m.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>f&&(this.logger.log(m.DEBUG,"Too large cursor position "+this.pos),this.pos=f)},E.moveCursor=function(_){var I=this.pos+_;if(_>1)for(var j=this.pos+1;j<I+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(I)},E.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},E.insertChar=function(_){_>=144&&this.backSpace();var I=s(_);if(this.pos>=f){this.logger.log(m.ERROR,"Cannot insert "+_.toString(16)+" ("+I+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(I,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(_){var I;for(I=_;I<f;I++)this.chars[I].reset()},E.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},E.clearToEndOfRow=function(){this.clearFromPos(this.pos)},E.getTextString=function(){for(var _=[],I=!0,j=0;j<f;j++){var M=this.chars[j].uchar;M!==" "&&(I=!1),_.push(M)}return I?"":_.join("")},E.setPenStyles=function(_){this.currPenState.setStyles(_);var I=this.chars[this.pos];I.setPenState(this.currPenState)},y}(),c=function(){function y(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 _=0;_<S;_++)this.rows.push(new l(b));this.logger=b,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var E=y.prototype;return E.reset=function(){for(var _=0;_<S;_++)this.rows[_].clear();this.currRow=S-1},E.equals=function(_){for(var I=!0,j=0;j<S;j++)if(!this.rows[j].equals(_.rows[j])){I=!1;break}return I},E.copy=function(_){for(var I=0;I<S;I++)this.rows[I].copy(_.rows[I])},E.isEmpty=function(){for(var _=!0,I=0;I<S;I++)if(!this.rows[I].isEmpty()){_=!1;break}return _},E.backSpace=function(){var _=this.rows[this.currRow];_.backSpace()},E.clearToEndOfRow=function(){var _=this.rows[this.currRow];_.clearToEndOfRow()},E.insertChar=function(_){var I=this.rows[this.currRow];I.insertChar(_)},E.setPen=function(_){var I=this.rows[this.currRow];I.setPenStyles(_)},E.moveCursor=function(_){var I=this.rows[this.currRow];I.moveCursor(_)},E.setCursor=function(_){this.logger.log(m.INFO,"setCursor: "+_);var I=this.rows[this.currRow];I.setCursor(_)},E.setPAC=function(_){this.logger.log(m.INFO,"pacData = "+JSON.stringify(_));var I=_.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,G=this.lastOutputScreen;if(G){var K=G.rows[M].cueStartTime,H=this.logger.time;if(K&&H!==null&&K<H)for(var z=0;z<this.nrRollUpRows;z++)this.rows[I-this.nrRollUpRows+z+1].copy(G.rows[M+z])}}this.currRow=I;var B=this.rows[this.currRow];if(_.indent!==null){var W=_.indent,F=Math.max(W-1,0);B.setCursor(_.indent),_.color=B.chars[F].penState.foreground}var $={foreground:_.color,underline:_.underline,italics:_.italics,background:"black",flash:!1};this.setPen($)},E.setBkgData=function(_){this.logger.log(m.INFO,"bkgData = "+JSON.stringify(_)),this.backSpace(),this.setPen(_),this.insertChar(32)},E.setRollUpRows=function(_){this.nrRollUpRows=_},E.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(m.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(m.TEXT,this.getDisplayText());var _=this.currRow+1-this.nrRollUpRows,I=this.rows.splice(_,1)[0];I.clear(),this.rows.splice(this.currRow,0,I),this.logger.log(m.INFO,"Rolling up")},E.getDisplayText=function(_){_=_||!1;for(var I=[],j="",M=-1,G=0;G<S;G++){var K=this.rows[G].getTextString();K&&(M=G+1,_?I.push("Row "+M+": '"+K+"'"):I.push(K.trim()))}return I.length>0&&(_?j="["+I.join(" | ")+"]":j=I.join(`
`)),j},E.getTextAndFormat=function(){return this.rows},y}(),T=function(){function y(b,_,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=_,this.mode=null,this.verbose=0,this.displayedMemory=new c(I),this.nonDisplayedMemory=new c(I),this.lastOutputScreen=new c(I),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=I}var E=y.prototype;return E.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},E.getHandler=function(){return this.outputFilter},E.setHandler=function(_){this.outputFilter=_},E.setPAC=function(_){this.writeScreen.setPAC(_)},E.setBkgData=function(_){this.writeScreen.setBkgData(_)},E.setMode=function(_){if(_===this.mode)return;this.mode=_,this.logger.log(m.INFO,"MODE="+_),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=_},E.insertChars=function(_){for(var I=0;I<_.length;I++)this.writeScreen.insertChar(_[I]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(m.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(m.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(m.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(m.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(m.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(_){this.logger.log(m.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},E.ccFON=function(){this.logger.log(m.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(m.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(m.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(m.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(m.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(m.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(m.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(m.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var _=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=_,this.writeScreen=this.nonDisplayedMemory,this.logger.log(m.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(_){this.logger.log(m.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},E.ccMIDROW=function(_){var I={flash:!1};if(I.underline=_%2===1,I.italics=_>=46,I.italics)I.foreground="white";else{var j=Math.floor(_/2)-16,M=["white","green","blue","cyan","red","yellow","magenta"];I.foreground=M[j]}this.logger.log(m.INFO,"MIDROW: "+JSON.stringify(I)),this.writeScreen.setPen(I)},E.outputDataUpdate=function(_){_===void 0&&(_=!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),_&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:I),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(_){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,_,this.displayedMemory),this.cueStartTime=_))},y}(),v=function(){function y(b,_,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,_,j),new T(b+1,I,j)],this.cmdHistory=A(),this.logger=j}var E=y.prototype;return E.getHandler=function(_){return this.channels[_].getHandler()},E.setHandler=function(_,I){this.channels[_].setHandler(I)},E.addData=function(_,I){var j,M,G,K=!1;this.logger.time=_;for(var H=0;H<I.length;H+=2){if(M=I[H]&127,G=I[H+1]&127,M===0&&G===0)continue;if(this.logger.log(m.DATA,"["+p([I[H],I[H+1]])+"] -> ("+p([M,G])+")"),j=this.parseCmd(M,G),j||(j=this.parseMidrow(M,G)),j||(j=this.parsePAC(M,G)),j||(j=this.parseBackgroundAttributes(M,G)),!j&&(K=this.parseChars(M,G),K)){var z=this.currentChannel;if(z&&z>0){var B=this.channels[z];B.insertChars(K)}else this.logger.log(m.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!K&&this.logger.log(m.WARNING,"Couldn't parse cleaned data "+p([M,G])+" orig: "+p([I[H],I[H+1]]))}},E.parseCmd=function(_,I){var j=this.cmdHistory,M=(_===20||_===28||_===21||_===29)&&I>=32&&I<=47,G=(_===23||_===31)&&I>=33&&I<=35;if(!(M||G))return!1;if(L(_,I,j))return i(null,null,j),this.logger.log(m.DEBUG,"Repeated command ("+p([_,I])+") is dropped"),!0;var K=_===20||_===21||_===23?1:2,H=this.channels[K];return _===20||_===21||_===28||_===29?I===32?H.ccRCL():I===33?H.ccBS():I===34?H.ccAOF():I===35?H.ccAON():I===36?H.ccDER():I===37?H.ccRU(2):I===38?H.ccRU(3):I===39?H.ccRU(4):I===40?H.ccFON():I===41?H.ccRDC():I===42?H.ccTR():I===43?H.ccRTD():I===44?H.ccEDM():I===45?H.ccCR():I===46?H.ccENM():I===47&&H.ccEOC():H.ccTO(I-32),i(_,I,j),this.currentChannel=K,!0},E.parseMidrow=function(_,I){var j=0;if((_===17||_===25)&&I>=32&&I<=47){if(_===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(m.ERROR,"Mismatch channel in midrow parsing"),!1;var M=this.channels[j];return M?(M.ccMIDROW(I),this.logger.log(m.DEBUG,"MIDROW ("+p([_,I])+")"),!0):!1}return!1},E.parsePAC=function(_,I){var j,M=this.cmdHistory,G=(_>=17&&_<=23||_>=25&&_<=31)&&I>=64&&I<=127,K=(_===16||_===24)&&I>=64&&I<=95;if(!(G||K))return!1;if(L(_,I,M))return i(null,null,M),!0;var H=_<=23?1:2;I>=64&&I<=95?j=H===1?a[_]:r[_]:j=H===1?o[_]:x[_];var z=this.channels[H];return z?(z.setPAC(this.interpretPAC(j,I)),i(_,I,M),this.currentChannel=H,!0):!1},E.interpretPAC=function(_,I){var j,M={color:null,italics:!1,indent:null,underline:!1,row:_};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},E.parseChars=function(_,I){var j,M=null,G=null;if(_>=25?(j=2,G=_-8):(j=1,G=_),G>=17&&G<=19){var K;G===17?K=I+80:G===18?K=I+112:K=I+144,this.logger.log(m.INFO,"Special char '"+s(K)+"' in channel "+j),M=[K]}else _>=32&&_<=127&&(M=I===0?[_]:[_,I]);if(M){var H=p(M);this.logger.log(m.DEBUG,"Char codes = "+H.join(",")),i(_,I,this.cmdHistory)}return M},E.parseBackgroundAttributes=function(_,I){var j=(_===16||_===24)&&I>=32&&I<=47,M=(_===23||_===31)&&I>=45&&I<=47;if(!(j||M))return!1;var G,K={};_===16||_===24?(G=Math.floor((I-32)/2),K.background=g[G],I%2===1&&(K.background=K.background+"_semi")):I===45?K.background="transparent":(K.foreground="black",I===47&&(K.underline=!0));var H=_<=23?1:2,z=this.channels[H];return z.setBkgData(K),i(_,I,this.cmdHistory),!0},E.reset=function(){for(var _=0;_<Object.keys(this.channels).length;_++){var I=this.channels[_];I&&I.reset()}this.cmdHistory=A()},E.cueSplitAtTime=function(_){for(var I=0;I<this.channels.length;I++){var j=this.channels[I];j&&j.cueSplitAtTime(_)}},y}();function i(y,E,b){b.a=y,b.b=E}function L(y,E,b){return b.a===y&&b.b===E}function A(){return{a:null,b:null}}u.default=v},"./src/utils/codecs.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"isCodecType",function(){return h}),C.d(u,"isCodecSupportedInMp4",function(){return s});var R={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 h(S,f){var a=R[f];return!!a&&a[S.slice(0,4)]===!0}function s(S,f){return MediaSource.isTypeSupported((f||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/utils/vttparser.ts"),h=C("./src/utils/webvtt-parser.ts"),s=C("./src/utils/texttrack-utils.ts"),S=/\s/,f={newCue:function(o,r,x,g){for(var m=[],w,p,d,n,l,c=self.VTTCue||self.TextTrackCue,T=0;T<g.rows.length;T++)if(w=g.rows[T],d=!0,n=0,l="",!w.isEmpty()){for(var v=0;v<w.chars.length;v++)S.test(w.chars[v].uchar)&&d?n++:(l+=w.chars[v].uchar,d=!1);w.cueStartTime=r,r===x&&(x+=1e-4),n>=16?n--:n++;var i=Object(R.fixLineBreaks)(l.trim()),L=Object(h.generateCueId)(r,x,i);(!o||!o.cues||!o.cues.getCueById(L))&&(p=new c(r,x,i),p.id=L,p.line=T+1,p.align="left",p.position=10+Math.min(80,Math.floor(n*8/32)*10),m.push(p))}return o&&m.length&&(m.sort(function(A,y){return A.line==="auto"||y.line==="auto"?0:A.line>8&&y.line>8?y.line-A.line:A.line-y.line}),m.forEach(function(A){return Object(s.addCueToTrack)(o,A)})),m}};u.default=f},"./src/utils/discontinuities.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"findFirstFragWithCC",function(){return S}),C.d(u,"shouldAlignOnDiscontinuities",function(){return f}),C.d(u,"findDiscontinuousReferenceFrag",function(){return a}),C.d(u,"adjustSlidingStart",function(){return r}),C.d(u,"alignStream",function(){return x}),C.d(u,"alignPDT",function(){return m}),C.d(u,"alignFragmentByPDTDelta",function(){return w}),C.d(u,"alignMediaPlaylistByPDT",function(){return p});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/logger.ts"),s=C("./src/controller/level-helper.ts");function S(d,n){for(var l=null,c=0,T=d.length;c<T;c++){var v=d[c];if(v&&v.cc===n){l=v;break}}return l}function f(d,n,l){return!!(n.details&&(l.endCC>l.startCC||d&&d.cc<l.startCC))}function a(d,n){var l=d.fragments,c=n.fragments;if(!c.length||!l.length){h.logger.log("No fragments to align");return}var T=S(l,c[0].cc);if(!T||T&&!T.startPTS){h.logger.log("No frag in previous level to align on");return}return T}function o(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,c=0,T=l.length;c<T;c++)o(l[c],d);n.fragmentHint&&o(n.fragmentHint,d),n.alignedSliding=!0}function x(d,n,l){if(!n)return;g(d,l,n),!l.alignedSliding&&n.details&&m(l,n.details),!l.alignedSliding&&n.details&&!l.skippedSegments&&Object(s.adjustSliding)(n.details,l)}function g(d,n,l){if(f(d,l,n)){var c=a(l.details,n);c&&Object(R.isFiniteNumber)(c.start)&&(h.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),r(c.start,n))}}function m(d,n){if(!n.fragments.length||!d.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,c=d.fragments[0].programDateTime,T=(c-l)/1e3+n.fragments[0].start;T&&Object(R.isFiniteNumber)(T)&&(h.logger.log("Adjusting PTS using programDateTime delta "+(c-l)+"ms, sliding:"+T.toFixed(3)+" "+d.url+" "),r(T,d))}function w(d,n){var l=d.programDateTime;if(!l)return;var c=(l-n)/1e3;d.start=d.startPTS=c,d.endPTS=c+d.duration}function p(d,n){if(!n.fragments.length||!d.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,c=n.fragments[0].start,T=l-c*1e3;d.fragments.forEach(function(v){w(v,T)}),d.fragmentHint&&w(d.fragmentHint,T),d.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/utils/ewma.ts"),h=function(){function s(f,a,o){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new R.default(f),this.fast_=new R.default(a)}var S=s.prototype;return S.update=function(a,o){var r=this.slow_,x=this.fast_;this.slow_.halfLife!==a&&(this.slow_=new R.default(a,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==o&&(this.fast_=new R.default(o,x.getEstimate(),x.getTotalWeight()))},S.sample=function(a,o){a=Math.max(a,this.minDelayMs_);var r=8*o,x=a/1e3,g=r/x;this.fast_.sample(x,g),this.slow_.sample(x,g)},S.canEstimate=function(){var a=this.fast_;return a&&a.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},s}();u.default=h},"./src/utils/ewma.ts":function(P,u,C){"use strict";C.r(u);var R=function(){function h(S,f,a){f===void 0&&(f=0),a===void 0&&(a=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_=f,this.totalWeight_=a}var s=h.prototype;return s.sample=function(f,a){var o=Math.pow(this.alpha_,f);this.estimate_=a*(1-o)+o*this.estimate_,this.totalWeight_+=f},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var f=1-Math.pow(this.alpha_,this.totalWeight_);if(f)return this.estimate_/f}return this.estimate_},h}();u.default=R},"./src/utils/fetch-loader.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"fetchSupported",function(){return w});var R=C("./src/polyfills/number.ts"),h=C("./src/loader/load-stats.ts"),s=C("./src/demux/chunk-cache.ts");function S(c,T){c.prototype=Object.create(T.prototype),c.prototype.constructor=c,x(c,T)}function f(c){var T=typeof Map=="function"?new Map:void 0;return f=function(i){if(i===null||!r(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(i))return T.get(i);T.set(i,L)}function L(){return a(i,arguments,g(this).constructor)}return L.prototype=Object.create(i.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),x(L,i)},f(c)}function a(c,T,v){return o()?a=Reflect.construct:a=function(L,A,y){var E=[null];E.push.apply(E,A);var b=Function.bind.apply(L,E),_=new b;return y&&x(_,y.prototype),_},a.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(c){return!1}}function r(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function x(c,T){return x=Object.setPrototypeOf||function(i,L){return i.__proto__=L,i},x(c,T)}function g(c){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},g(c)}function m(){return m=Object.assign||function(c){for(var T=1;T<arguments.length;T++){var v=arguments[T];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(c[i]=v[i])}return c},m.apply(this,arguments)}function w(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(c){}return!1}var p=function(){function c(v){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=v.fetchSetup||n,this.controller=new self.AbortController,this.stats=new h.LoadStats}var T=c.prototype;return T.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},T.abortInternal=function(){var i=this.response;(!i||!i.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(i,L,A){var y=this,E=this.stats;if(E.loading.start)throw new Error("Loader can only be used once.");E.loading.start=self.performance.now();var b=d(i,this.controller.signal),_=A.onProgress,I=i.responseType==="arraybuffer",j=I?"byteLength":"length";this.context=i,this.config=L,this.callbacks=A,this.request=this.fetchSetup(i,b),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){y.abortInternal(),A.onTimeout(E,i,y.response)},L.timeout),self.fetch(this.request).then(function(M){if(y.response=y.loader=M,!M.ok){var G=M.status,K=M.statusText;throw new l(K||"fetch, bad network response",G,M)}return E.loading.first=Math.max(self.performance.now(),E.loading.start),E.total=parseInt(M.headers.get("Content-Length")||"0"),_&&Object(R.isFiniteNumber)(L.highWaterMark)?y.loadProgressively(M,E,i,L.highWaterMark,_):I?M.arrayBuffer():M.text()}).then(function(M){var G=y.response;self.clearTimeout(y.requestTimeout),E.loading.end=Math.max(self.performance.now(),E.loading.first),E.loaded=E.total=M[j];var K={url:G.url,data:M};_&&!Object(R.isFiniteNumber)(L.highWaterMark)&&_(E,i,M,G),A.onSuccess(K,E,i,G)}).catch(function(M){if(self.clearTimeout(y.requestTimeout),E.aborted)return;var G=M.code||0;A.onError({code:G,text:M.message},i,M.details)})},T.getCacheAge=function(){var i=null;if(this.response){var L=this.response.headers.get("age");i=L?parseFloat(L):null}return i},T.loadProgressively=function(i,L,A,y,E){y===void 0&&(y=0);var b=new s.default,_=i.body.getReader(),I=function j(){return _.read().then(function(M){if(M.done)return b.dataLength&&E(L,A,b.flush(),i),Promise.resolve(new ArrayBuffer(0));var G=M.value,K=G.length;return L.loaded+=K,K<y||b.dataLength?(b.push(G),b.dataLength>=y&&E(L,A,b.flush(),i)):E(L,A,G,i),j()}).catch(function(){return Promise.reject()})};return I()},c}();function d(c,T){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(m({},c.headers))};return c.rangeEnd&&v.headers.set("Range","bytes="+c.rangeStart+"-"+String(c.rangeEnd-1)),v}function n(c,T){return new self.Request(c.url,T)}var l=function(c){S(T,c);function T(v,i,L){var A;return A=c.call(this,v)||this,A.code=void 0,A.details=void 0,A.code=i,A.details=L,A}return T}(f(Error));u.default=p},"./src/utils/imsc1-ttml-parser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"IMSC1_CODEC",function(){return r}),C.d(u,"parseIMSC1",function(){return w});var R=C("./src/utils/mp4-tools.ts"),h=C("./src/utils/vttparser.ts"),s=C("./src/utils/vttcue.ts"),S=C("./src/demux/id3.ts"),f=C("./src/utils/timescale-conversion.ts"),a=C("./src/utils/webvtt-parser.ts");function o(){return o=Object.assign||function(y){for(var E=1;E<arguments.length;E++){var b=arguments[E];for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(y[_]=b[_])}return y},o.apply(this,arguments)}var r="stpp.ttml.im1t",x=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,g=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,m={left:"start",center:"center",right:"end",start:"start",end:"end"};function w(y,E,b,_,I){var j=Object(R.findBox)(new Uint8Array(y),["mdat"]);if(j.length===0){I(new Error("Could not parse IMSC1 mdat"));return}var M=j[0],G=Object(S.utf8ArrayToStr)(new Uint8Array(y,M.start,M.end-M.start)),K=Object(f.toTimescaleFromScale)(E,1,b);try{_(p(G,K))}catch(H){I(H)}}function p(y,E){var b=new DOMParser,_=b.parseFromString(y,"text/xml"),I=_.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(B,W){return B[W]=I.getAttribute("ttp:"+W)||j[W],B},{}),G=I.getAttribute("xml:space")!=="preserve",K=n(d(I,"styling","style")),H=n(d(I,"layout","region")),z=d(I,"body","[begin]");return[].map.call(z,function(B){var W=l(B,G);if(!W||!B.hasAttribute("begin"))return null;var F=i(B.getAttribute("begin"),M),$=i(B.getAttribute("dur"),M),ee=i(B.getAttribute("end"),M);if(F===null)throw v(B);if(ee===null){if($===null)throw v(B);ee=F+$}var Z=new s.default(F-E,ee-E,W);Z.id=Object(a.generateCueId)(Z.startTime,Z.endTime,Z.text);var ve=H[B.getAttribute("region")],he=K[B.getAttribute("style")];Z.position=10,Z.size=80;var le=c(ve,he),Re=le.textAlign;if(Re){var xe=m[Re];xe&&(Z.lineAlign=xe),Z.align=Re}return o(Z,le),Z}).filter(function(B){return B!==null})}function d(y,E,b){var _=y.getElementsByTagName(E)[0];return _?[].slice.call(_.querySelectorAll(b)):[]}function n(y){return y.reduce(function(E,b){var _=b.getAttribute("xml:id");return _&&(E[_]=b),E},{})}function l(y,E){return[].slice.call(y.childNodes).reduce(function(b,_,I){var j;return _.nodeName==="br"&&I?b+`
`:(j=_.childNodes)!==null&&j!==void 0&&j.length?l(_,E):E?b+_.textContent.trim().replace(/\s+/g," "):b+_.textContent},"")}function c(y,E){var b="http://www.w3.org/ns/ttml#styling",_=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return _.reduce(function(I,j){var M=T(E,b,j)||T(y,b,j);return M&&(I[j]=M),I},{})}function T(y,E,b){return y.hasAttributeNS(E,b)?y.getAttributeNS(E,b):null}function v(y){return new Error("Could not parse ttml timestamp "+y)}function i(y,E){if(!y)return null;var b=Object(h.parseTimeStamp)(y);return b===null&&(x.test(y)?b=L(y,E):g.test(y)&&(b=A(y,E))),b}function L(y,E){var b=x.exec(y),_=(b[4]|0)+(b[5]|0)/E.subFrameRate;return(b[1]|0)*3600+(b[2]|0)*60+(b[3]|0)+_/E.frameRate}function A(y,E){var b=g.exec(y),_=Number(b[1]),I=b[2];switch(I){case"h":return _*3600;case"m":return _*60;case"ms":return _*1e3;case"f":return _/E.frameRate;case"t":return _/E.tickRate}return _}},"./src/utils/logger.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"enableLogs",function(){return a}),C.d(u,"logger",function(){return o});var R=function(){},h={trace:R,debug:R,log:R,warn:R,info:R,error:R},s=h;function S(r){var x=self.console[r];return x?x.bind(self.console,"["+r+"] >"):R}function f(r){for(var x=arguments.length,g=new Array(x>1?x-1:0),m=1;m<x;m++)g[m-1]=arguments[m];g.forEach(function(w){s[w]=r[w]?r[w].bind(r):S(w)})}function a(r){if(self.console&&r===!0||typeof r=="object"){f(r,"debug","log","info","warn","error");try{s.log()}catch(x){s=h}}else s=h}var o=s},"./src/utils/mediakeys-helper.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"KeySystems",function(){return R}),C.d(u,"requestMediaKeySystemAccess",function(){return h});var R;(function(s){s.WIDEVINE="com.widevine.alpha",s.PLAYREADY="com.microsoft.playready"})(R||(R={}));var h=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"getMediaSource",function(){return R});function R(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"bin2str",function(){return f}),C.d(u,"readUint16",function(){return a}),C.d(u,"readUint32",function(){return o}),C.d(u,"writeUint32",function(){return r}),C.d(u,"findBox",function(){return x}),C.d(u,"parseSegmentIndex",function(){return g}),C.d(u,"parseInitSegment",function(){return m}),C.d(u,"getStartDTS",function(){return w}),C.d(u,"getDuration",function(){return p}),C.d(u,"computeRawDurationFromSamples",function(){return d}),C.d(u,"offsetStartDTS",function(){return n}),C.d(u,"segmentValidRange",function(){return l}),C.d(u,"appendUint8Array",function(){return c});var R=C("./src/utils/typed-array.ts"),h=C("./src/loader/fragment.ts"),s=Math.pow(2,32)-1,S=[].push;function f(T){return String.fromCharCode.apply(null,T)}function a(T,v){"data"in T&&(v+=T.start,T=T.data);var i=T[v]<<8|T[v+1];return i<0?65536+i:i}function o(T,v){"data"in T&&(v+=T.start,T=T.data);var i=T[v]<<24|T[v+1]<<16|T[v+2]<<8|T[v+3];return i<0?4294967296+i:i}function r(T,v,i){"data"in T&&(v+=T.start,T=T.data),T[v]=i>>24,T[v+1]=i>>16&255,T[v+2]=i>>8&255,T[v+3]=i&255}function x(T,v){var i=[];if(!v.length)return i;var L,A,y;"data"in T?(L=T.data,A=T.start,y=T.end):(L=T,A=0,y=L.byteLength);for(var E=A;E<y;){var b=o(L,E),_=f(L.subarray(E+4,E+8)),I=b>1?E+b:y;if(_===v[0])if(v.length===1)i.push({data:L,start:E+8,end:I});else{var j=x({data:L,start:E+8,end:I},v.slice(1));j.length&&S.apply(i,j)}E=I}return i}function g(T){var v=x(T,["moov"]),i=v[0],L=i?i.end:null,A=x(T,["sidx"]);if(!A||!A[0])return null;var y=[],E=A[0],b=E.data[0],_=b===0?8:16,I=o(E,_);_+=4;var j=0,M=0;b===0?_+=8:_+=16,_+=2;var G=E.end+M,K=a(E,_);_+=2;for(var H=0;H<K;H++){var z=_,B=o(E,z);z+=4;var W=B&2147483647,F=(B&2147483648)>>>31;if(F===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=o(E,z);z+=4,y.push({referenceSize:W,subsegmentDuration:$,info:{duration:$/I,start:G,end:G+W-1}}),G+=W,z+=4,_=z}return{earliestPresentationTime:j,timescale:I,version:b,referencesCount:K,references:y,moovEndOffset:L}}function m(T){for(var v=[],i=x(T,["moov","trak"]),L=0;L<i.length;L++){var A=i[L],y=x(A,["tkhd"])[0];if(y){var E=y.data[y.start],b=E===0?12:20,_=o(y,b),I=x(A,["mdia","mdhd"])[0];if(I){E=I.data[I.start],b=E===0?12:20;var j=o(I,b),M=x(A,["mdia","hdlr"])[0];if(M){var G=f(M.data.subarray(M.start+8,M.start+12)),K={soun:h.ElementaryStreamTypes.AUDIO,vide:h.ElementaryStreamTypes.VIDEO}[G];if(K){var H=x(A,["mdia","minf","stbl","stsd"])[0],z=void 0;H&&(z=f(H.data.subarray(H.start+12,H.start+16))),v[_]={timescale:j,type:K},v[K]={timescale:j,id:_,codec:z}}}}}}var B=x(T,["moov","mvex","trex"]);return B.forEach(function(W){var F=o(W,4),$=v[F];$&&($.default={duration:o(W,12),flags:o(W,20)})}),v}function w(T,v){return x(v,["moof","traf"]).reduce(function(i,L){var A=x(L,["tfdt"])[0],y=A.data[A.start],E=x(L,["tfhd"]).reduce(function(b,_){var I=o(_,4),j=T[I];if(j){var M=o(A,4);y===1&&(M*=Math.pow(2,32),M+=o(A,8));var G=j.timescale||9e4,K=M/G;if(isFinite(K)&&(b===null||K<b))return K}return b},null);return E!==null&&isFinite(E)&&(i===null||E<i)?E:i},null)||0}function p(T,v){for(var i=0,L=0,A=0,y=x(T,["moof","traf"]),E=0;E<y.length;E++){var b=y[E],_=x(b,["tfhd"])[0],I=o(_,4),j=v[I];if(!j)continue;var M=j.default,G=o(_,0)|(M==null?void 0:M.flags),K=M==null?void 0:M.duration;G&8&&(G&2?K=o(_,12):K=o(_,8));for(var H=j.timescale||9e4,z=x(b,["trun"]),B=0;B<z.length;B++){if(K){var W=o(z[B],4);i=K*W}else i=d(z[B]);j.type===h.ElementaryStreamTypes.VIDEO?L+=i/H:j.type===h.ElementaryStreamTypes.AUDIO&&(A+=i/H)}}if(L===0&&A===0){var F=g(T);if(F!=null&&F.references)return F.references.reduce(function($,ee){return $+ee.info.duration||0},0)}return L||A}function d(T){var v=o(T,0),i=8;v&1&&(i+=4),v&4&&(i+=4);for(var L=0,A=o(T,4),y=0;y<A;y++){if(v&256){var E=o(T,i);L+=E,i+=4}v&512&&(i+=4),v&1024&&(i+=4),v&2048&&(i+=4)}return L}function n(T,v,i){x(v,["moof","traf"]).forEach(function(L){x(L,["tfhd"]).forEach(function(A){var y=o(A,4),E=T[y];if(!E)return;var b=E.timescale||9e4;x(L,["tfdt"]).forEach(function(_){var I=_.data[_.start],j=o(_,4);if(I===0)r(_,4,j-i*b);else{j*=Math.pow(2,32),j+=o(_,8),j-=i*b,j=Math.max(j,0);var M=Math.floor(j/(s+1)),G=Math.floor(j%(s+1));r(_,4,M),r(_,8,G)}})})})}function l(T){var v={valid:null,remainder:null},i=x(T,["moof"]);if(i){if(i.length<2)return v.remainder=T,v}else return v;var L=i[i.length-1];return v.valid=Object(R.sliceUint8)(T,0,L.start-8),v.remainder=Object(R.sliceUint8)(T,L.start-8),v}function c(T,v){var i=new Uint8Array(T.length+v.length);return i.set(T),i.set(v,T.length),i}},"./src/utils/output-filter.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(S,f){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=f}var s=h.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(f,a,o){(this.startTime===null||this.startTime>f)&&(this.startTime=f),this.endTime=a,this.screen=o,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},h}()},"./src/utils/texttrack-utils.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"sendAddTrackEvent",function(){return h}),C.d(u,"addCueToTrack",function(){return s}),C.d(u,"clearCurrentCues",function(){return S}),C.d(u,"removeCuesInRange",function(){return f}),C.d(u,"getCuesInRange",function(){return o});var R=C("./src/utils/logger.ts");function h(r,x){var g;try{g=new Event("addtrack")}catch(m){g=document.createEvent("Event"),g.initEvent("addtrack",!1,!1)}g.track=r,x.dispatchEvent(g)}function s(r,x){var g=r.mode;if(g==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(x.id))try{if(r.addCue(x),!r.cues.getCueById(x.id))throw new Error("addCue is failed for: "+x)}catch(w){R.logger.debug("[texttrack-utils]: "+w);var m=new self.TextTrackCue(x.startTime,x.endTime,x.text);m.id=x.id,r.addCue(m)}g==="disabled"&&(r.mode=g)}function S(r){var x=r.mode;if(x==="disabled"&&(r.mode="hidden"),r.cues)for(var g=r.cues.length;g--;)r.removeCue(r.cues[g]);x==="disabled"&&(r.mode=x)}function f(r,x,g){var m=r.mode;if(m==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var w=o(r.cues,x,g),p=0;p<w.length;p++)r.removeCue(w[p]);m==="disabled"&&(r.mode=m)}function a(r,x){if(x<r[0].startTime)return 0;var g=r.length-1;if(x>r[g].endTime)return-1;for(var m=0,w=g;m<=w;){var p=Math.floor((w+m)/2);if(x<r[p].startTime)w=p-1;else if(x>r[p].startTime&&m<g)m=p+1;else return p}return r[m].startTime-x<x-r[w].startTime?m:w}function o(r,x,g){var m=[],w=a(r,x);if(w>-1)for(var p=w,d=r.length;p<d;p++){var n=r[p];if(n.startTime>=x&&n.endTime<=g)m.push(n);else if(n.startTime>g)return m}return m}},"./src/utils/time-ranges.ts":function(P,u,C){"use strict";C.r(u);var R={toString:function(s){for(var S="",f=s.length,a=0;a<f;a++)S+="["+s.start(a).toFixed(3)+","+s.end(a).toFixed(3)+"]";return S}};u.default=R},"./src/utils/timescale-conversion.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"toTimescaleFromBase",function(){return h}),C.d(u,"toTimescaleFromScale",function(){return s}),C.d(u,"toMsFromMpegTsClock",function(){return S}),C.d(u,"toMpegTsClockFromTimescale",function(){return f});var R=9e4;function h(a,o,r,x){r===void 0&&(r=1),x===void 0&&(x=!1);var g=a*o*r;return x?Math.round(g):g}function s(a,o,r,x){return r===void 0&&(r=1),x===void 0&&(x=!1),h(a,o,1/r,x)}function S(a,o){return o===void 0&&(o=!1),h(a,1e3,1/R,o)}function f(a,o){return o===void 0&&(o=1),h(a,R,1/o)}},"./src/utils/typed-array.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"sliceUint8",function(){return R});function R(h,s,S){return Uint8Array.prototype.slice?h.slice(s,S):new Uint8Array(Array.prototype.slice.call(h,s,S))}},"./src/utils/vttcue.ts":function(P,u,C){"use strict";C.r(u),u.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var R=["","lr","rl"],h=["start","middle","end","left","right"];function s(r,x){if(typeof x!="string")return!1;if(!Array.isArray(r))return!1;var g=x.toLowerCase();return~r.indexOf(g)?g:!1}function S(r){return s(R,r)}function f(r){return s(h,r)}function a(r){for(var x=arguments.length,g=new Array(x>1?x-1:0),m=1;m<x;m++)g[m-1]=arguments[m];for(var w=1;w<arguments.length;w++){var p=arguments[w];for(var d in p)r[d]=p[d]}return r}function o(r,x,g){var m=this,w={enumerable:!0};m.hasBeenReset=!1;var p="",d=!1,n=r,l=x,c=g,T=null,v="",i=!0,L="auto",A="start",y=50,E="middle",b=50,_="middle";Object.defineProperty(m,"id",a({},w,{get:function(){return p},set:function(j){p=""+j}})),Object.defineProperty(m,"pauseOnExit",a({},w,{get:function(){return d},set:function(j){d=!!j}})),Object.defineProperty(m,"startTime",a({},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(m,"endTime",a({},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(m,"text",a({},w,{get:function(){return c},set:function(j){c=""+j,this.hasBeenReset=!0}})),Object.defineProperty(m,"region",a({},w,{get:function(){return T},set:function(j){T=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"vertical",a({},w,{get:function(){return v},set:function(j){var M=S(j);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"snapToLines",a({},w,{get:function(){return i},set:function(j){i=!!j,this.hasBeenReset=!0}})),Object.defineProperty(m,"line",a({},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(m,"lineAlign",a({},w,{get:function(){return A},set:function(j){var M=f(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");A=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"position",a({},w,{get:function(){return y},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");y=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",a({},w,{get:function(){return E},set:function(j){var M=f(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");E=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",a({},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(m,"align",a({},w,{get:function(){return _},set:function(j){var M=f(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");_=M,this.hasBeenReset=!0}})),m.displayState=void 0}return o.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"parseTimeStamp",function(){return s}),C.d(u,"fixLineBreaks",function(){return x}),C.d(u,"VTTParser",function(){return g});var R=C("./src/utils/vttcue.ts"),h=function(){function m(){}var w=m.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))},m}();function s(m){function w(d,n,l,c){return(d|0)*3600+(n|0)*60+(l|0)+parseFloat(c||0)}var p=m.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return p?parseFloat(p[2])>59?w(p[2],p[3],0,p[4]):w(p[1],p[2],p[3],p[4]):null}var S=function(){function m(){this.values=Object.create(null)}var w=m.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 c=0;c<l.length;++c)if(n===l[c]){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},m}();function f(m,w,p,d){var n=d?m.split(d):[m];for(var l in n){if(typeof n[l]!="string")continue;var c=n[l].split(p);if(c.length!==2)continue;var T=c[0],v=c[1];w(T,v)}}var a=new R.default(0,0,""),o=a.align==="middle"?"middle":"center";function r(m,w,p){var d=m;function n(){var T=s(m);if(T===null)throw new Error("Malformed timestamp: "+d);return m=m.replace(/^[^\sa-zA-Z-]+/,""),T}function l(T,v){var i=new S;f(T,function(y,E){var b;switch(y){case"region":for(var _=p.length-1;_>=0;_--)if(p[_].id===E){i.set(y,p[_].region);break}break;case"vertical":i.alt(y,E,["rl","lr"]);break;case"line":b=E.split(","),i.integer(y,b[0]),i.percent(y,b[0])&&i.set("snapToLines",!1),i.alt(y,b[0],["auto"]),b.length===2&&i.alt("lineAlign",b[1],["start",o,"end"]);break;case"position":b=E.split(","),i.percent(y,b[0]),b.length===2&&i.alt("positionAlign",b[1],["start",o,"end","line-left","line-right","auto"]);break;case"size":i.percent(y,E);break;case"align":i.alt(y,E,["start",o,"end","left","right"]);break}},/:/,/\s/),v.region=i.get("region",null),v.vertical=i.get("vertical","");var L=i.get("line","auto");L==="auto"&&a.line===-1&&(L=-1),v.line=L,v.lineAlign=i.get("lineAlign","start"),v.snapToLines=i.get("snapToLines",!0),v.size=i.get("size",100),v.align=i.get("align",o);var A=i.get("position","auto");A==="auto"&&a.position===50&&(A=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=A}function c(){m=m.replace(/^\s+/,"")}if(c(),w.startTime=n(),c(),m.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);m=m.substr(3),c(),w.endTime=n(),c(),l(m,w)}function x(m){return m.replace(/<br(?: \/)?>/gi,`
`)}var g=function(){function m(){this.state="INITIAL",this.buffer="",this.decoder=new h,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var w=m.prototype;return w.parse=function(d){var n=this;d&&(n.buffer+=n.decoder.decode(d,{stream:!0}));function l(){var A=n.buffer,y=0;for(A=x(A);y<A.length&&A[y]!=="\r"&&A[y]!==`
`;)++y;var E=A.substr(0,y);return A[y]==="\r"&&++y,A[y]===`
`&&++y,n.buffer=A.substr(y),E}function c(A){f(A,function(y,E){},/:/)}try{var T="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;T=l();var v=T.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var i=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;i?i=!1:T=l();switch(n.state){case"HEADER":/:/.test(T)?c(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 R.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(A){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var L=T.indexOf("-->")!==-1;if(!T||L&&(i=!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(A){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},m}()},"./src/utils/webvtt-parser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"generateCueId",function(){return g}),C.d(u,"parseWebVTT",function(){return w});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/vttparser.ts"),s=C("./src/demux/id3.ts"),S=C("./src/utils/timescale-conversion.ts"),f=C("./src/remux/mp4-remuxer.ts"),a=/\r\n|\n\r|\n|\r/g,o=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)),c=parseInt(d.substr(-9,2)),T=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(R.isFiniteNumber)(n)||!Object(R.isFiniteNumber)(l)||!Object(R.isFiniteNumber)(c)||!Object(R.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return n+=1e3*l,n+=60*1e3*c,n+=60*60*1e3*T,n},x=function(d){for(var n=5381,l=d.length;l;)n=n*33^d.charCodeAt(--l);return(n>>>0).toString()};function g(p,d,n){return x(p.toString())+x(d.toString())+x(n)}var m=function(d,n,l){var c=d[n],T=d[c.prevCC];if(!T||!T.new&&c.new){d.ccOffset=d.presentationOffset=c.start,c.new=!1;return}for(;(v=T)!==null&&v!==void 0&&v.new;){var v;d.ccOffset+=c.start-T.start,c.new=!1,c=T,T=d[c.prevCC]}d.presentationOffset=l};function w(p,d,n,l,c,T,v,i){var L=new h.VTTParser,A=Object(s.utf8ArrayToStr)(new Uint8Array(p)).trim().replace(a,`
`).split(`
`),y=[],E=Object(S.toMpegTsClockFromTimescale)(d,n),b="00:00.000",_=0,I=0,j,M=!0,G=!1;L.oncue=function(K){var H=l[c],z=l.ccOffset,B=(_-E)/9e4;if(H!=null&&H.new&&(I!==void 0?z=l.ccOffset=H.start:m(l,c,B)),B&&(z=B-l.presentationOffset),G){var W=K.endTime-K.startTime,F=Object(f.normalizePts)((K.startTime+z-I)*9e4,T*9e4)/9e4;K.startTime=F,K.endTime=F+W}var $=K.text.trim();K.text=decodeURIComponent(encodeURIComponent($)),K.id||(K.id=g(K.startTime,K.endTime,$)),K.endTime>0&&y.push(K)},L.onparsingerror=function(K){j=K},L.onflush=function(){if(j){i(j);return}v(y)},A.forEach(function(K){if(M)if(o(K,"X-TIMESTAMP-MAP=")){M=!1,G=!0,K.substr(16).split(",").forEach(function(H){o(H,"LOCAL:")?b=H.substr(6):o(H,"MPEGTS:")&&(_=parseInt(H.substr(7)))});try{I=r(b)/1e3}catch(H){G=!1,j=H}return}else K===""&&(M=!1);L.parse(K+`
`)}),L.flush()}},"./src/utils/xhr-loader.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/utils/logger.ts"),h=C("./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,S=function(){function f(o){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=o?o.xhrSetup:null,this.stats=new h.LoadStats,this.retryDelay=0}var a=f.prototype;return a.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},a.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()))},a.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},a.load=function(r,x,g){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=x,this.callbacks=g,this.retryDelay=x.retryDelay,this.loadInternal()},a.loadInternal=function(){var r=this.config,x=this.context;if(!r)return;var g=this.loader=new self.XMLHttpRequest,m=this.stats;m.loading.first=0,m.loaded=0;var w=this.xhrSetup;try{if(w)try{w(g,x.url)}catch(n){g.open("GET",x.url,!0),w(g,x.url)}g.readyState||g.open("GET",x.url,!0);var p=this.context.headers;if(p)for(var d in p)g.setRequestHeader(d,p[d])}catch(n){this.callbacks.onError({code:g.status,text:n.message},x,g);return}x.rangeEnd&&g.setRequestHeader("Range","bytes="+x.rangeStart+"-"+(x.rangeEnd-1)),g.onreadystatechange=this.readystatechange.bind(this),g.onprogress=this.loadprogress.bind(this),g.responseType=x.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),g.send()},a.readystatechange=function(){var r=this.context,x=this.loader,g=this.stats;if(!r||!x)return;var m=x.readyState,w=this.config;if(g.aborted)return;if(m>=2)if(self.clearTimeout(this.requestTimeout),g.loading.first===0&&(g.loading.first=Math.max(self.performance.now(),g.loading.start)),m===4){x.onreadystatechange=null,x.onprogress=null;var p=x.status;if(p>=200&&p<300){g.loading.end=Math.max(self.performance.now(),g.loading.first);var d,n;if(r.responseType==="arraybuffer"?(d=x.response,n=d.byteLength):(d=x.responseText,n=d.length),g.loaded=g.total=n,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(g,r,d,x),!this.callbacks)return;var c={url:x.responseURL,data:d};this.callbacks.onSuccess(c,g,r,x)}else g.retry>=w.maxRetry||p>=400&&p<499?(R.logger.error(p+" while loading "+r.url),this.callbacks.onError({code:p,text:x.statusText},r,x)):(R.logger.warn(p+" 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),g.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),w.timeout)},a.loadtimeout=function(){R.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},a.loadprogress=function(r){var x=this.stats;x.loaded=r.loaded,r.lengthComputable&&(x.total=r.total)},a.getCacheAge=function(){var r=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var x=this.loader.getResponseHeader("age");r=x?parseFloat(x):null}return r},f}();u.default=S}}).default})},vHTk:function(N,Y,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,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.StreamCipher,h=u.algo,s=h.RC4=R.extend({_doReset:function(){for(var a=this._key,o=a.words,r=a.sigBytes,x=this._S=[],g=0;g<256;g++)x[g]=g;for(var g=0,m=0;g<256;g++){var w=g%r,p=o[w>>>2]>>>24-w%4*8&255;m=(m+x[g]+p)%256;var d=x[g];x[g]=x[m],x[m]=d}this._i=this._j=0},_doProcessBlock:function(a,o){a[o]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var a=this._S,o=this._i,r=this._j,x=0,g=0;g<4;g++){o=(o+1)%256,r=(r+a[o])%256;var m=a[o];a[o]=a[r],a[r]=m,x|=a[(a[o]+a[r])%256]<<24-g*8}return this._i=o,this._j=r,x}u.RC4=R._createHelper(s);var f=h.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)S.call(this)}});u.RC4Drop=R._createHelper(f)}(),P.RC4})},wCXF:function(N,Y,k){"use strict";k.d(Y,"a",function(){return Qe});var P=k("rePB"),u=k("VTBJ"),C=k("KQm4"),R=k("U8pU"),h=k("ODXe"),s=k("q1tI"),S=k("TSYQ"),f=k.n(S),a=k("Gytx"),o=k.n(a),r=k("Kwbf"),x=k("t23M"),g=k("qx4F"),m=k("6eGT"),w=k("IBYe"),p=k("Ff2n"),d=k("c+Xe"),n=k("fyJ8"),l=k("biw7");function c(Me,Ce,Ve,tt,He){var Je=Ve[Me]||{},_e=Ve[Ce]||{},Se,Oe;Je.fixed==="left"?Se=tt.left[Me]:_e.fixed==="right"&&(Oe=tt.right[Ce]);var de=!1,ye=!1,Ee=!1,De=!1,Be=Ve[Ce+1],Xe=Ve[Me-1];if(He==="rtl"){if(Se!==void 0){var nt=Xe&&Xe.fixed==="left";De=!nt}else if(Oe!==void 0){var dt=Be&&Be.fixed==="right";Ee=!dt}}else if(Se!==void 0){var Et=Be&&Be.fixed==="left";de=!Et}else if(Oe!==void 0){var ft=Xe&&Xe.fixed==="right";ye=!ft}return{fixLeft:Se,fixRight:Oe,lastFixLeft:de,firstFixRight:ye,lastFixRight:Ee,firstFixLeft:De,isSticky:tt.isSticky}}var T=k("sR1s");function v(Me){var Ce=Me.cells,Ve=Me.stickyOffsets,tt=Me.flattenColumns,He=Me.rowComponent,Je=Me.cellComponent,_e=Me.onHeaderRow,Se=Me.index,Oe=s.useContext(l.a),de=Oe.prefixCls,ye=Oe.direction,Ee;_e&&(Ee=_e(Ce.map(function(Be){return Be.column}),Se));var De=Object(T.a)(Ce.map(function(Be){return Be.column}));return s.createElement(He,Object.assign({},Ee),Ce.map(function(Be,Xe){var nt=Be.column,dt=c(Be.colStart,Be.colEnd,tt,Ve,ye),Et;return nt&&nt.onHeaderCell&&(Et=Be.column.onHeaderCell(nt)),s.createElement(n.a,Object.assign({},Be,{ellipsis:nt.ellipsis,align:nt.align,component:Je,prefixCls:de,key:De[Xe]},dt,{additionalProps:Et,rowType:"header"}))}))}v.displayName="HeaderRow";var i=v;function L(Me){var Ce=[];function Ve(_e,Se){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[Oe]=Ce[Oe]||[];var de=Se,ye=_e.filter(Boolean).map(function(Ee){var De={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:de},Be=1,Xe=Ee.children;return Xe&&Xe.length>0&&(Be=Ve(Xe,de,Oe+1).reduce(function(nt,dt){return nt+dt},0),De.hasSubColumns=!0),"colSpan"in Ee&&(Be=Ee.colSpan),"rowSpan"in Ee&&(De.rowSpan=Ee.rowSpan),De.colSpan=Be,De.colEnd=De.colStart+Be-1,Ce[Oe].push(De),de+=Be,Be});return ye}Ve(Me,0);for(var tt=Ce.length,He=function(Se){Ce[Se].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=tt-Se)})},Je=0;Je<tt;Je+=1)He(Je);return Ce}function A(Me){var Ce=Me.stickyOffsets,Ve=Me.columns,tt=Me.flattenColumns,He=Me.onHeaderRow,Je=s.useContext(l.a),_e=Je.prefixCls,Se=Je.getComponent,Oe=s.useMemo(function(){return L(Ve)},[Ve]),de=Se(["header","wrapper"],"thead"),ye=Se(["header","row"],"tr"),Ee=Se(["header","cell"],"th");return s.createElement(de,{className:"".concat(_e,"-thead")},Oe.map(function(De,Be){var Xe=s.createElement(i,{key:Be,flattenColumns:tt,cells:De,stickyOffsets:Ce,rowComponent:ye,cellComponent:Ee,onHeaderRow:He,index:Be});return Xe}))}var y=A,E=k("hW8S");function b(Me){for(var Ce=Me.colWidths,Ve=Me.columns,tt=Me.columCount,He=[],Je=tt||Ve.length,_e=!1,Se=Je-1;Se>=0;Se-=1){var Oe=Ce[Se],de=Ve&&Ve[Se],ye=de&&de[E.a];(Oe||ye||_e)&&(He.unshift(s.createElement("col",Object.assign({key:Se,style:{width:Oe,minWidth:Oe}},ye))),_e=!0)}return s.createElement("colgroup",null,He)}var _=b;function I(Me,Ce){return Object(s.useMemo)(function(){for(var Ve=[],tt=0;tt<Ce;tt+=1){var He=Me[tt];if(He!==void 0)Ve[tt]=He;else return null}return Ve},[Me.join("_"),Ce])}var j=s.forwardRef(function(Me,Ce){var Ve=Me.noData,tt=Me.columns,He=Me.flattenColumns,Je=Me.colWidths,_e=Me.columCount,Se=Me.stickyOffsets,Oe=Me.direction,de=Me.fixHeader,ye=Me.offsetHeader,Ee=Me.stickyClassName,De=Me.onScroll,Be=Object(p.a)(Me,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Xe=s.useContext(l.a),nt=Xe.prefixCls,dt=Xe.scrollbarSize,Et=Xe.isSticky,ft=Et&&!de?0:dt,jt=s.useRef(null),Ct=s.useCallback(function(Er){Object(d.b)(Ce,Er),Object(d.b)(jt,Er)},[]);s.useEffect(function(){var Er;function fr(Wt){var Xt=Wt.currentTarget,$r=Wt.deltaX;$r&&(De({currentTarget:Xt,scrollLeft:Xt.scrollLeft+$r}),Wt.preventDefault())}return(Er=jt.current)===null||Er===void 0||Er.addEventListener("wheel",fr),function(){var Wt;(Wt=jt.current)===null||Wt===void 0||Wt.removeEventListener("wheel",fr)}},[]);var xt=He[He.length-1],Yt={fixed:xt?xt.fixed:null,onHeaderCell:function(){return{className:"".concat(nt,"-cell-scrollbar")}}},$t=Object(s.useMemo)(function(){return ft?[].concat(Object(C.a)(tt),[Yt]):tt},[ft,tt]),Vt=Object(s.useMemo)(function(){return ft?[].concat(Object(C.a)(He),[Yt]):He},[ft,He]),xr=Object(s.useMemo)(function(){var Er=Se.right,fr=Se.left;return Object(u.a)(Object(u.a)({},Se),{},{left:Oe==="rtl"?[].concat(Object(C.a)(fr.map(function(Wt){return Wt+ft})),[0]):fr,right:Oe==="rtl"?Er:[].concat(Object(C.a)(Er.map(function(Wt){return Wt+ft})),[0]),isSticky:Et})},[ft,Se,Et]),Lt=I(Je,_e);return s.createElement("div",{style:Object(u.a)({overflow:"hidden"},Et?{top:ye}:{}),ref:Ct,className:f()("".concat(nt,"-header"),Object(P.a)({},Ee,!!Ee))},s.createElement("table",{style:{tableLayout:"fixed",visibility:Ve||Lt?null:"hidden"}},s.createElement(_,{colWidths:Lt?[].concat(Object(C.a)(Lt),[ft]):[],columCount:_e+1,columns:Vt}),s.createElement(y,Object.assign({},Be,{stickyOffsets:xr,columns:$t,flattenColumns:Vt}))))});j.displayName="FixedHeader";var M=j,G=s.createContext(null),K=G;function H(Me){var Ce=Me.prefixCls,Ve=Me.children,tt=Me.component,He=Me.cellComponent,Je=Me.fixHeader,_e=Me.fixColumn,Se=Me.horizonScroll,Oe=Me.className,de=Me.expanded,ye=Me.componentWidth,Ee=Me.colSpan,De=s.useContext(l.a),Be=De.scrollbarSize;return s.useMemo(function(){var Xe=Ve;return _e&&(Xe=s.createElement("div",{style:{width:ye-(Je?Be:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Xe)),s.createElement(tt,{className:Oe,style:{display:de?null:"none"}},s.createElement(n.a,{component:He,prefixCls:Ce,colSpan:Ee},Xe))},[Ve,tt,Je,Se,Oe,de,ye,Ee,Be])}var z=H;function B(Me){var Ce=Me.className,Ve=Me.style,tt=Me.record,He=Me.index,Je=Me.rowKey,_e=Me.getRowKey,Se=Me.rowExpandable,Oe=Me.expandedKeys,de=Me.onRow,ye=Me.indent,Ee=ye===void 0?0:ye,De=Me.rowComponent,Be=Me.cellComponent,Xe=Me.childrenColumnName,nt=s.useContext(l.a),dt=nt.prefixCls,Et=nt.fixedInfoList,ft=s.useContext(K),jt=ft.fixHeader,Ct=ft.fixColumn,xt=ft.horizonScroll,Yt=ft.componentWidth,$t=ft.flattenColumns,Vt=ft.expandableType,xr=ft.expandRowByClick,Lt=ft.onTriggerExpand,Er=ft.rowClassName,fr=ft.expandedRowClassName,Wt=ft.indentSize,Xt=ft.expandIcon,$r=ft.expandedRowRender,Tn=ft.expandIconColumnIndex,wr=s.useState(!1),aa=Object(h.a)(wr,2),pt=aa[0],Tt=aa[1],ht=Oe&&Oe.has(Me.recordKey);s.useEffect(function(){ht&&Tt(!0)},[ht]);var Tr=Vt==="row"&&(!Se||Se(tt)),Rr=Vt==="nest",Pt=Xe&&tt&&tt[Xe],_t=Tr||Rr,Lr;de&&(Lr=de(tt,He));var cn=function(wt){if(xr&&_t&&Lt(tt,wt),Lr&&Lr.onClick){for(var fn,Fr=arguments.length,sr=new Array(Fr>1?Fr-1:0),nr=1;nr<Fr;nr++)sr[nr-1]=arguments[nr];(fn=Lr).onClick.apply(fn,[wt].concat(sr))}},Mr;typeof Er=="string"?Mr=Er:typeof Er=="function"&&(Mr=Er(tt,He,Ee));var ot=Object(T.a)($t),Ot=s.createElement(De,Object.assign({},Lr,{"data-row-key":Je,className:f()(Ce,"".concat(dt,"-row"),"".concat(dt,"-row-level-").concat(Ee),Mr,Lr&&Lr.className),style:Object(u.a)(Object(u.a)({},Ve),Lr?Lr.style:null),onClick:cn}),$t.map(function(jr,wt){var fn=jr.render,Fr=jr.dataIndex,sr=jr.className,nr=ot[wt],qn=Et[wt],Rn;wt===(Tn||0)&&Rr&&(Rn=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(Wt*Ee,"px")},className:"".concat(dt,"-row-indent indent-level-").concat(Ee)}),Xt({prefixCls:dt,expanded:ht,expandable:Pt,record:tt,onExpand:Lt})));var an;return jr.onCell&&(an=jr.onCell(tt,He)),s.createElement(n.a,Object.assign({className:sr,ellipsis:jr.ellipsis,align:jr.align,component:Be,prefixCls:dt,key:nr,record:tt,index:He,dataIndex:Fr,render:fn,shouldCellUpdate:jr.shouldCellUpdate},qn,{appendNode:Rn,additionalProps:an}))})),lt;if(Tr&&(pt||ht)){var un=$r(tt,He,Ee+1,ht),Sn=fr&&fr(tt,He,Ee);lt=s.createElement(z,{expanded:ht,className:f()("".concat(dt,"-expanded-row"),"".concat(dt,"-expanded-row-level-").concat(Ee+1),Sn),prefixCls:dt,fixHeader:jt,fixColumn:Ct,horizonScroll:xt,component:De,componentWidth:Yt,cellComponent:Be,colSpan:$t.length},un)}var dn;return Pt&&ht&&(dn=(tt[Xe]||[]).map(function(jr,wt){var fn=_e(jr,wt);return s.createElement(B,Object.assign({},Me,{key:fn,rowKey:fn,record:jr,recordKey:fn,index:wt,indent:Ee+1}))})),s.createElement(s.Fragment,null,Ot,lt,dn)}B.displayName="BodyRow";var W=B,F=s.createContext(null),$=F;function ee(Me){var Ce=Me.columnKey,Ve=Me.onColumnResize,tt=s.useRef();return s.useEffect(function(){tt.current&&Ve(Ce,tt.current.offsetWidth)},[]),s.createElement(x.a,{onResize:function(Je){var _e=Je.offsetWidth;Ve(Ce,_e)}},s.createElement("td",{ref:tt,style:{padding:0,border:0,height:0}},s.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Z(Me){var Ce=Me.data,Ve=Me.getRowKey,tt=Me.measureColumnWidth,He=Me.expandedKeys,Je=Me.onRow,_e=Me.rowExpandable,Se=Me.emptyNode,Oe=Me.childrenColumnName,de=s.useContext($),ye=de.onColumnResize,Ee=s.useContext(l.a),De=Ee.prefixCls,Be=Ee.getComponent,Xe=s.useContext(K),nt=Xe.fixHeader,dt=Xe.horizonScroll,Et=Xe.flattenColumns,ft=Xe.componentWidth;return s.useMemo(function(){var jt=Be(["body","wrapper"],"tbody"),Ct=Be(["body","row"],"tr"),xt=Be(["body","cell"],"td"),Yt;Ce.length?Yt=Ce.map(function(Vt,xr){var Lt=Ve(Vt,xr);return s.createElement(W,{key:Lt,rowKey:Lt,record:Vt,recordKey:Lt,index:xr,rowComponent:Ct,cellComponent:xt,expandedKeys:He,onRow:Je,getRowKey:Ve,rowExpandable:_e,childrenColumnName:Oe})}):Yt=s.createElement(z,{expanded:!0,className:"".concat(De,"-placeholder"),prefixCls:De,fixHeader:nt,fixColumn:dt,horizonScroll:dt,component:Ct,componentWidth:ft,cellComponent:xt,colSpan:Et.length},Se);var $t=Object(T.a)(Et);return s.createElement(jt,{className:"".concat(De,"-tbody")},tt&&s.createElement("tr",{"aria-hidden":"true",className:"".concat(De,"-measure-row"),style:{height:0}},$t.map(function(Vt){return s.createElement(ee,{key:Vt,columnKey:Vt,onColumnResize:ye})})),Yt)},[Ce,De,Je,tt,He,Ve,Be,ft,Se,Et])}var ve=s.memo(Z);ve.displayName="Body";var he=ve,le=k("wRmb"),Re=k("xEkU"),xe=k.n(Re);function ie(Me){var Ce=Object(s.useRef)(Me),Ve=Object(s.useState)({}),tt=Object(h.a)(Ve,2),He=tt[1],Je=Object(s.useRef)(null),_e=Object(s.useRef)([]);function Se(Oe){Je.current===null&&(_e.current=[],Je.current=xe()(function(){_e.current.forEach(function(de){Ce.current=de(Ce.current)}),Je.current=null,He({})})),_e.current.push(Oe)}return Object(s.useEffect)(function(){return function(){xe.a.cancel(Je.current)}},[]),[Ce.current,Se]}function se(Me){var Ce=Object(s.useRef)(Me),Ve=Object(s.useRef)(null);function tt(){window.clearTimeout(Ve.current)}function He(_e){Ce.current=_e,tt(),Ve.current=window.setTimeout(function(){Ce.current=null,Ve.current=null},100)}function Je(){return Ce.current}return Object(s.useEffect)(function(){return tt},[]),[He,Je]}function re(Me,Ce,Ve){var tt=Object(s.useMemo)(function(){for(var He=[],Je=[],_e=0,Se=0,Oe=0;Oe<Ce;Oe+=1)if(Ve==="rtl"){Je[Oe]=Se,Se+=Me[Oe]||0;var de=Ce-Oe-1;He[de]=_e,_e+=Me[de]||0}else{He[Oe]=_e,_e+=Me[Oe]||0;var ye=Ce-Oe-1;Je[ye]=Se,Se+=Me[ye]||0}return{left:He,right:Je}},[Me,Ce,Ve]);return tt}var be=re;function q(Me){var Ce=Me.className,Ve=Me.children;return s.createElement("div",{className:Ce},Ve)}var ne=q,Te=k("n6Qo");function ae(Me){var Ce,Ve=Me.prefixCls,tt=Me.record,He=Me.onExpand,Je=Me.expanded,_e=Me.expandable,Se="".concat(Ve,"-row-expand-icon");if(!_e)return s.createElement("span",{className:f()(Se,"".concat(Ve,"-row-spaced"))});var Oe=function(ye){He(tt,ye),ye.stopPropagation()};return s.createElement("span",{className:f()(Se,(Ce={},Object(P.a)(Ce,"".concat(Ve,"-row-expanded"),Je),Object(P.a)(Ce,"".concat(Ve,"-row-collapsed"),!Je),Ce)),onClick:Oe})}function J(Me,Ce,Ve){var tt=[];function He(Je){(Je||[]).forEach(function(_e,Se){tt.push(Ce(_e,Se)),He(_e[Ve])})}return He(Me),tt}var X=k("zT1h"),Q=k("y0+3"),pe=function(Ce,Ve){var tt,He,Je=Ce.scrollBodyRef,_e=Ce.onScroll,Se=Ce.offsetScroll,Oe=s.useContext(l.a),de=Oe.prefixCls,ye=((tt=Je.current)===null||tt===void 0?void 0:tt.scrollWidth)||0,Ee=((He=Je.current)===null||He===void 0?void 0:He.clientWidth)||0,De=ye&&Ee*(Ee/ye),Be=s.useRef(),Xe=ie({scrollLeft:0,isHiddenScrollBar:!1}),nt=Object(h.a)(Xe,2),dt=nt[0],Et=nt[1],ft=s.useRef({delta:0,x:0}),jt=s.useState(!1),Ct=Object(h.a)(jt,2),xt=Ct[0],Yt=Ct[1],$t=function(){Yt(!1)},Vt=function(Wt){Wt.persist(),ft.current.delta=Wt.pageX-dt.scrollLeft,ft.current.x=0,Yt(!0),Wt.preventDefault()},xr=function(Wt){var Xt,$r=Wt||((Xt=window)===null||Xt===void 0?void 0:Xt.event),Tn=$r.buttons;if(!xt||Tn===0){xt&&Yt(!1);return}var wr=ft.current.x+Wt.pageX-ft.current.x-ft.current.delta;wr<=0&&(wr=0),wr+De>=Ee&&(wr=Ee-De),_e({scrollLeft:wr/Ee*(ye+2)}),ft.current.x=Wt.pageX},Lt=function(){var Wt=Object(Q.b)(Je.current).top,Xt=Wt+Je.current.offsetHeight,$r=document.documentElement.scrollTop+window.innerHeight;Xt-Object(g.a)()<=$r||Wt>=$r-Se?Et(function(Tn){return Object(u.a)(Object(u.a)({},Tn),{},{isHiddenScrollBar:!0})}):Et(function(Tn){return Object(u.a)(Object(u.a)({},Tn),{},{isHiddenScrollBar:!1})})},Er=function(Wt){Et(function(Xt){return Object(u.a)(Object(u.a)({},Xt),{},{scrollLeft:Wt/ye*Ee||0})})};return s.useImperativeHandle(Ve,function(){return{setScrollLeft:Er}}),s.useEffect(function(){var fr=Object(X.a)(document.body,"mouseup",$t,!1),Wt=Object(X.a)(document.body,"mousemove",xr,!1);return Lt(),function(){fr.remove(),Wt.remove()}},[De,xt]),s.useEffect(function(){var fr=Object(X.a)(window,"scroll",Lt,!1),Wt=Object(X.a)(window,"resize",Lt,!1);return function(){fr.remove(),Wt.remove()}},[]),s.useEffect(function(){dt.isHiddenScrollBar||Et(function(fr){var Wt,Xt;return Object(u.a)(Object(u.a)({},fr),{},{scrollLeft:Je.current.scrollLeft/((Wt=Je.current)===null||Wt===void 0?void 0:Wt.scrollWidth)*((Xt=Je.current)===null||Xt===void 0?void 0:Xt.clientWidth)})})},[dt.isHiddenScrollBar]),ye<=Ee||!De||dt.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(g.a)(),width:Ee,bottom:Se},className:"".concat(de,"-sticky-scroll")},s.createElement("div",{onMouseDown:Vt,ref:Be,className:f()("".concat(de,"-sticky-scroll-bar"),Object(P.a)({},"".concat(de,"-sticky-scroll-bar-active"),xt)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(dt.scrollLeft,"px, 0, 0)")}}))},ce=s.forwardRef(pe);function we(Me,Ce){return s.useMemo(function(){var Ve=!!Me;return{isSticky:Ve,stickyClassName:Ve?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(R.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(R.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Ce])}var ze=[],Ge={},Qe="rc-table-internal-hook",$e=s.memo(function(Me){var Ce=Me.children;return Ce},function(Me,Ce){return o()(Me.props,Ce.props)?Me.pingLeft!==Ce.pingLeft||Me.pingRight!==Ce.pingRight:!1});function rt(Me){var Ce,Ve=Me.prefixCls,tt=Me.className,He=Me.rowClassName,Je=Me.style,_e=Me.data,Se=Me.rowKey,Oe=Me.scroll,de=Me.tableLayout,ye=Me.direction,Ee=Me.title,De=Me.footer,Be=Me.summary,Xe=Me.id,nt=Me.showHeader,dt=Me.components,Et=Me.emptyText,ft=Me.onRow,jt=Me.onHeaderRow,Ct=Me.internalHooks,xt=Me.transformColumns,Yt=Me.internalRefs,$t=Me.sticky,Vt=_e||ze,xr=!!Vt.length,Lt=s.useState(0),Er=Object(h.a)(Lt,2),fr=Er[0],Wt=Er[1];s.useEffect(function(){Wt(Object(g.a)())});var Xt=s.useMemo(function(){return Object(T.c)(dt,{})},[dt]),$r=s.useCallback(function(_r,cr){return Object(T.b)(Xt,_r)||cr},[Xt]),Tn=s.useMemo(function(){return typeof Se=="function"?Se:function(_r){var cr=_r&&_r[Se];return cr}},[Se]),wr=Object(E.c)(Me),aa=wr.expandIcon,pt=wr.expandedRowKeys,Tt=wr.defaultExpandedRowKeys,ht=wr.defaultExpandAllRows,Tr=wr.expandedRowRender,Rr=wr.onExpand,Pt=wr.onExpandedRowsChange,_t=wr.expandRowByClick,Lr=wr.rowExpandable,cn=wr.expandIconColumnIndex,Mr=wr.expandedRowClassName,ot=wr.childrenColumnName,Ot=wr.indentSize,lt=aa||ae,un=ot||"children",Sn=s.useMemo(function(){return Tr?"row":Me.expandable&&Ct===Qe&&Me.expandable.__PARENT_RENDER_ICON__||Vt.some(function(_r){return _r&&Object(R.a)(_r)==="object"&&_r[un]})?"nest":!1},[!!Tr,Vt]),dn=s.useState(function(){return Tt||(ht?J(Vt,Tn,un):[])}),jr=Object(h.a)(dn,2),wt=jr[0],fn=jr[1],Fr=s.useMemo(function(){return new Set(pt||wt||[])},[pt,wt]),sr=s.useCallback(function(_r){var cr=Tn(_r,Vt.indexOf(_r)),ar,Jn=Fr.has(cr);Jn?(Fr.delete(cr),ar=Object(C.a)(Fr)):ar=[].concat(Object(C.a)(Fr),[cr]),fn(ar),Rr&&Rr(!Jn,_r),Pt&&Pt(ar)},[Tn,Fr,Vt,Rr,Pt]),nr=s.useState(0),qn=Object(h.a)(nr,2),Rn=qn[0],an=qn[1],ea=Object(le.b)(Object(u.a)(Object(u.a)(Object(u.a)({},Me),wr),{},{expandable:!!Tr,expandedKeys:Fr,getRowKey:Tn,onTriggerExpand:sr,expandIcon:lt,expandIconColumnIndex:cn,direction:ye}),Ct===Qe?xt:null),ta=Object(h.a)(ea,2),Cn=ta[0],Sr=ta[1],Ln=s.useMemo(function(){return{columns:Cn,flattenColumns:Sr}},[Cn,Sr]),vn=s.useRef(),on=s.useRef(),Jt=s.useRef(),zr=s.useState(!1),Gt=Object(h.a)(zr,2),kt=Gt[0],Qt=Gt[1],hr=s.useState(!1),Ir=Object(h.a)(hr,2),Jr=Ir[0],Mn=Ir[1],Ba=ie(new Map),wa=Object(h.a)(Ba,2),Ma=wa[0],ia=wa[1],en=Object(T.a)(Sr),Pa=en.map(function(_r){return Ma.get(_r)}),Hr=s.useMemo(function(){return Pa},[Pa.join("_")]),Wn=be(Hr,Sr.length,ye),jn=Oe&&Object(T.d)(Oe.y),Gr=Oe&&Object(T.d)(Oe.x),_n=Gr&&Sr.some(function(_r){var cr=_r.fixed;return cr}),ka=s.useRef(),ga=we($t,Ve),ua=ga.isSticky,Va=ga.offsetHeader,Ca=ga.offsetScroll,Rt=ga.stickyClassName,Kt,Bt,pr;jn&&(Bt={overflowY:"scroll",maxHeight:Oe.y}),Gr&&(Kt={overflowX:"auto"},jn||(Bt={overflowY:"hidden"}),pr={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var mr=s.useCallback(function(_r,cr){ia(function(ar){var Jn=new Map(ar);return Jn.set(_r,cr),Jn})},[]),Pr=se(null),Xr=Object(h.a)(Pr,2),Br=Xr[0],tn=Xr[1];function Hn(_r,cr){if(!cr)return;typeof cr=="function"?cr(_r):cr.scrollLeft!==_r&&(cr.scrollLeft=_r)}var Cr=function(cr){var ar=cr.currentTarget,Jn=cr.scrollLeft,Na=typeof Jn=="number"?Jn:ar.scrollLeft,ja=ar||Ge;if(!tn()||tn()===ja){var Ut;Br(ja),Hn(Na,on.current),Hn(Na,Jt.current),Hn(Na,(Ut=ka.current)===null||Ut===void 0?void 0:Ut.setScrollLeft)}if(ar){var bt=ar.scrollWidth,zt=ar.clientWidth;Qt(Na>0),Mn(Na<bt-zt)}},ur=function(){Jt.current&&Cr({currentTarget:Jt.current})},yn=function(cr){var ar=cr.width;ur(),an(vn.current?vn.current.offsetWidth:ar)};s.useEffect(function(){return ur},[]),s.useEffect(function(){Gr&&ur()},[Gr]),s.useEffect(function(){Ct===Qe&&Yt&&(Yt.body.current=Jt.current)});var ca=$r(["table"],"table"),Kn=s.useMemo(function(){return de||(_n?Oe.x==="max-content"?"auto":"fixed":jn||Sr.some(function(_r){var cr=_r.ellipsis;return cr})?"fixed":"auto")},[jn,_n,Sr,de]),Ta,Ya={colWidths:Hr,columCount:Sr.length,stickyOffsets:Wn,onHeaderRow:jt,fixHeader:jn},Wa=s.useMemo(function(){return xr?null:typeof Et=="function"?Et():Et},[xr,Et]),hi=s.createElement(he,{data:Vt,measureColumnWidth:jn||Gr||ua,expandedKeys:Fr,rowExpandable:Lr,getRowKey:Tn,onRow:ft,emptyNode:Wa,childrenColumnName:un}),Ha=s.createElement(_,{colWidths:Sr.map(function(_r){var cr=_r.width;return cr}),columns:Sr}),Ci=Be&&s.createElement(Te.b,null,Be(Vt)),ni=$r(["body"]);if(jn||ua){var ai;typeof ni=="function"?(ai=ni(Vt,{scrollbarSize:fr,ref:Jt,onScroll:Cr}),Ya.colWidths=Sr.map(function(_r,cr){var ar=_r.width,Jn=cr===Cn.length-1?ar-fr:ar;return typeof Jn=="number"&&!Number.isNaN(Jn)?Jn:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ai=s.createElement("div",{style:Object(u.a)(Object(u.a)({},Kt),Bt),onScroll:Cr,ref:Jt,className:f()("".concat(Ve,"-body"))},s.createElement(ca,{style:Object(u.a)(Object(u.a)({},pr),{},{tableLayout:Kn})},Ha,hi,Ci),ua&&s.createElement(ce,{ref:ka,offsetScroll:Ca,scrollBodyRef:Jt,onScroll:Cr})),Ta=s.createElement(s.Fragment,null,nt!==!1&&s.createElement(M,Object.assign({noData:!Vt.length},Ya,Ln,{direction:ye,offsetHeader:Va,stickyClassName:Rt,ref:on,onScroll:Cr})),ai)}else Ta=s.createElement("div",{style:Object(u.a)(Object(u.a)({},Kt),Bt),className:f()("".concat(Ve,"-content")),onScroll:Cr,ref:Jt},s.createElement(ca,{style:Object(u.a)(Object(u.a)({},pr),{},{tableLayout:Kn})},Ha,nt!==!1&&s.createElement(y,Object.assign({},Ya,Ln)),hi,Ci));var pi=Object(E.b)(Me),_a=s.createElement("div",Object.assign({className:f()(Ve,tt,(Ce={},Object(P.a)(Ce,"".concat(Ve,"-rtl"),ye==="rtl"),Object(P.a)(Ce,"".concat(Ve,"-ping-left"),kt),Object(P.a)(Ce,"".concat(Ve,"-ping-right"),Jr),Object(P.a)(Ce,"".concat(Ve,"-layout-fixed"),de==="fixed"),Object(P.a)(Ce,"".concat(Ve,"-fixed-header"),jn),Object(P.a)(Ce,"".concat(Ve,"-fixed-column"),_n),Object(P.a)(Ce,"".concat(Ve,"-scroll-horizontal"),Gr),Object(P.a)(Ce,"".concat(Ve,"-has-fix-left"),Sr[0]&&Sr[0].fixed),Object(P.a)(Ce,"".concat(Ve,"-has-fix-right"),Sr[Sr.length-1]&&Sr[Sr.length-1].fixed==="right"),Ce)),style:Je,id:Xe,ref:vn},pi),s.createElement($e,{pingLeft:kt,pingRight:Jr,props:Object(u.a)(Object(u.a)({},Me),{},{stickyOffsets:Wn,mergedExpandedKeys:Fr})},Ee&&s.createElement(ne,{className:"".concat(Ve,"-title")},Ee(Vt)),s.createElement("div",{className:"".concat(Ve,"-container")},Ta),De&&s.createElement(ne,{className:"".concat(Ve,"-footer")},De(Vt))));Gr&&(_a=s.createElement(x.a,{onResize:yn},_a));var Ia=s.useMemo(function(){return{prefixCls:Ve,getComponent:$r,scrollbarSize:fr,direction:ye,fixedInfoList:Sr.map(function(_r,cr){return c(cr,cr,Sr,Wn,ye)}),isSticky:ua}},[Ve,$r,fr,ye,Sr,Wn,ye,ua]),_i=s.useMemo(function(){return Object(u.a)(Object(u.a)({},Ln),{},{tableLayout:Kn,rowClassName:He,expandedRowClassName:Mr,componentWidth:Rn,fixHeader:jn,fixColumn:_n,horizonScroll:Gr,expandIcon:lt,expandableType:Sn,expandRowByClick:_t,expandedRowRender:Tr,onTriggerExpand:sr,expandIconColumnIndex:cn,indentSize:Ot})},[Ln,Kn,He,Mr,Rn,jn,_n,Gr,lt,Sn,_t,Tr,sr,cn,Ot]),ii=s.useMemo(function(){return{onColumnResize:mr}},[mr]);return s.createElement(l.a.Provider,{value:Ia},s.createElement(K.Provider,{value:_i},s.createElement($.Provider,{value:ii},_a)))}rt.Column=w.a,rt.ColumnGroup=m.a,rt.Summary=Te.a,rt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var et=Y.b=rt},wRmb:function(N,Y,k){"use strict";k.d(Y,"a",function(){return o});var P=k("rePB"),u=k("KQm4"),C=k("VTBJ"),R=k("Ff2n"),h=k("q1tI"),s=k.n(h),S=k("Kwbf"),f=k("Zm9Q"),a=k("hW8S");function o(w){return Object(f.a)(w).filter(function(p){return h.isValidElement(p)}).map(function(p){var d=p.key,n=p.props,l=n.children,c=Object(R.a)(n,["children"]),T=Object(C.a)({key:d},c);return l&&(T.children=o(l)),T})}function r(w){return w.reduce(function(p,d){var n=d.fixed,l=n===!0?"left":n,c=d.children;return c&&c.length>0?[].concat(Object(u.a)(p),Object(u.a)(r(c).map(function(T){return Object(C.a)({fixed:l},T)}))):[].concat(Object(u.a)(p),[Object(C.a)(Object(C.a)({},d),{},{fixed:l})])},[])}function x(w){for(var p=!0,d=0;d<w.length;d+=1){var n=w[d];if(p&&n.fixed!=="left")p=!1;else if(!p&&n.fixed==="left"){Object(S.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,c=w.length-1;c>=0;c-=1){var T=w[c];if(l&&T.fixed!=="right")l=!1;else if(!l&&T.fixed==="right"){Object(S.a)(!1,"Index ".concat(c+1," of `columns` missing `fixed='right'` prop."));break}}}function g(w){return w.map(function(p){var d=p.fixed,n=Object(R.a)(p,["fixed"]),l=d;return d==="left"?l="right":d==="right"&&(l="left"),Object(C.a)({fixed:l},n)})}function m(w,p){var d=w.prefixCls,n=w.columns,l=w.children,c=w.expandable,T=w.expandedKeys,v=w.getRowKey,i=w.onTriggerExpand,L=w.expandIcon,A=w.rowExpandable,y=w.expandIconColumnIndex,E=w.direction,b=w.expandRowByClick,_=h.useMemo(function(){return n||o(l)},[n,l]),I=h.useMemo(function(){if(c){var G,K=y||0,H=_[K],z=(G={},Object(P.a)(G,a.a,{className:"".concat(d,"-expand-icon-col")}),Object(P.a)(G,"title",""),Object(P.a)(G,"fixed",H?H.fixed:null),Object(P.a)(G,"className","".concat(d,"-row-expand-icon-cell")),Object(P.a)(G,"render",function(F,$,ee){var Z=v($,ee),ve=T.has(Z),he=A?A($):!0,le=L({prefixCls:d,expanded:ve,expandable:he,record:$,onExpand:i});return b?h.createElement("span",{onClick:function(xe){return xe.stopPropagation()}},le):le}),G),B=_.slice();return K>=0&&B.splice(K,0,z),B}return _},[c,_,v,T,L,E]),j=h.useMemo(function(){var G=I;return p&&(G=p(G)),G.length||(G=[{render:function(){return null}}]),G},[p,I,E]),M=h.useMemo(function(){return E==="rtl"?g(r(j)):r(j)},[j,E]);return[j,M]}Y.b=m},wZgz:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.BlockCipher,h=u.algo,s=[],S=[],f=[],a=[],o=[],r=[],x=[],g=[],m=[],w=[];(function(){for(var n=[],l=0;l<256;l++)l<128?n[l]=l<<1:n[l]=l<<1^283;for(var c=0,T=0,l=0;l<256;l++){var v=T^T<<1^T<<2^T<<3^T<<4;v=v>>>8^v&255^99,s[c]=v,S[v]=c;var i=n[c],L=n[i],A=n[L],y=n[v]*257^v*16843008;f[c]=y<<24|y>>>8,a[c]=y<<16|y>>>16,o[c]=y<<8|y>>>24,r[c]=y;var y=A*16843009^L*65537^i*257^c*16843008;x[v]=y<<24|y>>>8,g[v]=y<<16|y>>>16,m[v]=y<<8|y>>>24,w[v]=y,c?(c=i^n[n[n[A^i]]],T^=n[n[T]]):c=T=1}})();var p=[0,1,2,4,8,16,32,64,128,27,54],d=h.AES=R.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var l=this._keyPriorReset=this._key,c=l.words,T=l.sigBytes/4,v=this._nRounds=T+6,i=(v+1)*4,L=this._keySchedule=[],A=0;A<i;A++)A<T?L[A]=c[A]:(n=L[A-1],A%T?T>6&&A%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^=p[A/T|0]<<24),L[A]=L[A-T]^n);for(var y=this._invKeySchedule=[],E=0;E<i;E++){var A=i-E;if(E%4)var n=L[A];else var n=L[A-4];E<4||A<=4?y[E]=n:y[E]=x[s[n>>>24]]^g[s[n>>>16&255]]^m[s[n>>>8&255]]^w[s[n&255]]}},encryptBlock:function(n,l){this._doCryptBlock(n,l,this._keySchedule,f,a,o,r,s)},decryptBlock:function(n,l){var c=n[l+1];n[l+1]=n[l+3],n[l+3]=c,this._doCryptBlock(n,l,this._invKeySchedule,x,g,m,w,S);var c=n[l+1];n[l+1]=n[l+3],n[l+3]=c},_doCryptBlock:function(n,l,c,T,v,i,L,A){for(var y=this._nRounds,E=n[l]^c[0],b=n[l+1]^c[1],_=n[l+2]^c[2],I=n[l+3]^c[3],j=4,M=1;M<y;M++){var G=T[E>>>24]^v[b>>>16&255]^i[_>>>8&255]^L[I&255]^c[j++],K=T[b>>>24]^v[_>>>16&255]^i[I>>>8&255]^L[E&255]^c[j++],H=T[_>>>24]^v[I>>>16&255]^i[E>>>8&255]^L[b&255]^c[j++],z=T[I>>>24]^v[E>>>16&255]^i[b>>>8&255]^L[_&255]^c[j++];E=G,b=K,_=H,I=z}var G=(A[E>>>24]<<24|A[b>>>16&255]<<16|A[_>>>8&255]<<8|A[I&255])^c[j++],K=(A[b>>>24]<<24|A[_>>>16&255]<<16|A[I>>>8&255]<<8|A[E&255])^c[j++],H=(A[_>>>24]<<24|A[I>>>16&255]<<16|A[E>>>8&255]<<8|A[b&255])^c[j++],z=(A[I>>>24]<<24|A[E>>>16&255]<<16|A[b>>>8&255]<<8|A[_&255])^c[j++];n[l]=G,n[l+1]=K,n[l+2]=H,n[l+3]=z},keySize:256/32});u.AES=R._createHelper(d)}(),P.AES})},wbyO:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.enc,s=h.Base64url={stringify:function(f,a=!0){var o=f.words,r=f.sigBytes,x=a?this._safe_map:this._map;f.clamp();for(var g=[],m=0;m<r;m+=3)for(var w=o[m>>>2]>>>24-m%4*8&255,p=o[m+1>>>2]>>>24-(m+1)%4*8&255,d=o[m+2>>>2]>>>24-(m+2)%4*8&255,n=w<<16|p<<8|d,l=0;l<4&&m+l*.75<r;l++)g.push(x.charAt(n>>>6*(3-l)&63));var c=x.charAt(64);if(c)for(;g.length%4;)g.push(c);return g.join("")},parse:function(f,a=!0){var o=f.length,r=a?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var g=0;g<r.length;g++)x[r.charCodeAt(g)]=g}var m=r.charAt(64);if(m){var w=f.indexOf(m);w!==-1&&(o=w)}return S(f,o,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(f,a,o){for(var r=[],x=0,g=0;g<a;g++)if(g%4){var m=o[f.charCodeAt(g-1)]<<g%4*2,w=o[f.charCodeAt(g)]>>>6-g%4*2,p=m|w;r[x>>>2]|=p<<24-x%4*8,x++}return R.create(r,x)}}(),P.enc.Base64url})},"y0+3":function(N,Y,k){"use strict";k.d(Y,"a",function(){return r}),k.d(Y,"b",function(){return g});var P=/margin|padding|width|height|max|min|offset/,u={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function R(m){return m.nodeType===1?m.ownerDocument.defaultView.getComputedStyle(m,null):{}}function h(m,w,p){if(w=w.toLowerCase(),p==="auto"){if(w==="height")return m.offsetHeight;if(w==="width")return m.offsetWidth}return w in u||(u[w]=P.test(w)),u[w]?parseFloat(p)||0:p}function s(m,w){var p=arguments.length,d=R(m);return w=C[w]?"cssFloat"in m.style?"cssFloat":"styleFloat":w,p===1?d:h(m,w,d[w]||m.style[w])}function S(m,w,p){var d=arguments.length;if(w=C[w]?"cssFloat"in m.style?"cssFloat":"styleFloat":w,d===3)return typeof p=="number"&&P.test(w)&&(p="".concat(p,"px")),m.style[w]=p,p;for(var n in w)w.hasOwnProperty(n)&&S(m,n,w[n]);return R(m)}function f(m){return m===document.body?document.documentElement.clientWidth:m.offsetWidth}function a(m){return m===document.body?window.innerHeight||document.documentElement.clientHeight:m.offsetHeight}function o(){var m=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),w=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:m,height:w}}function r(){var m=document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight;return{width:m,height:w}}function x(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function g(m){var w=m.getBoundingClientRect(),p=document.documentElement;return{left:w.left+(window.pageXOffset||p.scrollLeft)-(p.clientLeft||document.body.clientLeft||0),top:w.top+(window.pageYOffset||p.scrollTop)-(p.clientTop||document.body.clientTop||0)}}},ynwM:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"oldFF-globalStorage",read:R,write:h,each:s,remove:S,clearAll:f};var C=u.globalStorage;function R(a){return C[a]}function h(a,o){C[a]=o}function s(a){for(var o=C.length-1;o>=0;o--){var r=C.key(o);a(C[r],r)}}function S(a){return C.removeItem(a)}function f(){s(function(a,o){delete C[a]})}}}]);